PageSourceSearch

https://orbitvocab.app/assets/facade__virtual_vinext-rsc-entry-DXzGzw1a.js

js orbitvocab.app collected 2026-09-24 14:31:51 UTC 835,141 bytes, 68 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f297fafb-e619-56c8-96bd-f86e450a74c5")}catch(e){}}();
3const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/router-Duk2dCyI.js","assets/index-D5Znv-y2.js","assets/framework-CAin0s4y.js","assets/index.client-CrdxbqjL.js","assets/index-Cpm6m2rZ.js","assets/instrumentation-client-DMKxhuIx.js"])))=>i.map(i=>d[i]);
4import{r as f,j as a,R as Ai,d as Tt,b as fh,e as nx,g as ph}from"./framework-CAin0s4y.js";import{t as rx,g as ox,s as ix,_ as _t,u as Vn,r as sx,p as ax,a as Pi,b as no,c as ro,d as lx}from"./index-D5Znv-y2.js";function cx(e,t){const n=t&&t.cache?t.cache:gx,r=t&&t.serializer?t.serializer:px;return(t&&t.strategy?t.strategy:hx)(e,{cache:n,serializer:r})}function ux(e){return e==null||typeof e=="number"||typeof e=="boolean"}function dx(e,t,n,r){const o=ux(r)?r:n(r);let i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function mh(e,t,n){const r=Array.prototype.slice.call(arguments,3),o=n(r);let i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function gh(e,t,n,r,o){return n.bind(t,e,r,o)}function hx(e,t){const n=e.length===1?dx:mh;return gh(e,this,n,t.cache.create(),t.serializer)}function fx(e,t){return gh(e,this,mh,t.cache.create(),t.serializer)}const px=function(){return JSON.stringify(arguments)};var mx=class{constructor(){this.cache=Object.create(null)}get(t){return this.cache[t]}set(t,n){this.cache[t]=n}};const gx={create:function(){return new mx}},bx={variadic:fx};let xn=class extends Error{constructor(t,n){let r=t;n&&(r+=": "+n),super(r),this.code=t,n&&(this.originalMessage=n)}};var At=(function(e){return e.MISSING_MESSAGE="MISSING_MESSAGE",e.MISSING_FORMAT="MISSING_FORMAT",e.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",e.INSUFFICIENT_PATH="INSUFFICIENT_PATH",e.INVALID_MESSAGE="INVALID_MESSAGE",e.INVALID_KEY="INVALID_KEY",e.FORMATTING_ERROR="FORMATTING_ERROR",e})(At||{});function xx(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function bh(e,t){return cx(e,{cache:(n=t,{create:()=>({get:r=>n[r],set(r,o){n[r]=o}})}),strategy:bx.variadic});var n}function Zn(e,t){return bh(((...n)=>new e(...n)),t)}function vx(e){return{getDateTimeFormat:Zn(Intl.DateTimeFormat,e.dateTime),getNumberFormat:Zn(Intl.NumberFormat,e.number),getPluralRules:Zn(Intl.PluralRules,e.pluralRules),getRelativeTimeFormat:Zn(Intl.RelativeTimeFormat,e.relativeTime),getListFormat:Zn(Intl.ListFormat,e.list),getDisplayNames:Zn(Intl.DisplayNames,e.displayNames)}}function hs(e,t){const n=t&&t.cache?t.cache:kx,r=t&&t.serializer?t.serializer:Sx;return(t&&t.strategy?t.strategy:_x)(e,{cache:n,serializer:r})}function yx(e){return e==null||typeof e=="number"||typeof e=="boolean"}function wx(e,t,n,r){const o=yx(r)?r:n(r);let i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function xh(e,t,n){const r=Array.prototype.slice.call(arguments,3),o=n(r);let i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function vh(e,t,n,r,o){return n.bind(t,e,r,o)}function _x(e,t){const n=e.length===1?wx:xh;return vh(e,this,n,t.cache.create(),t.serializer)}function Cx(e,t){return vh(e,this,xh,t.cache.create(),t.serializer)}const Sx=function(){return JSON.stringify(arguments)};class Ex{cache;constructor(){this.cache=Object.create(null)}get(t){return this.cache[t]}set(t,n){this.cache[t]=n}}const kx={create:function(){return new Ex}},fs={variadic:Cx},Ix=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Nx(e){const t={};return e.replace(Ix,n=>{const r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-4];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}const Tx=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Ax(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");const t=e.split(Tx).filter(r=>r.length>0),n=[];for(const r of t){let o=r.split("/");if(o.length===0)throw new Error("Invalid number skeleton");const[i,...s]=o;for(const l of s)if(l.length===0)throw new Error("Invalid number skeleton");n.push({stem:i,options:s})}return n}function Px(e){return e.replace(/^(.*?)-/,"")}const pc=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,yh=/^(@+)?(\+|#+)?[rs]?$/g,Rx=/(\*)(0+)|(#+)(0+)|(0+)/g,wh=/^(0+)$/;function mc(e){const t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(yh,function(n,r,o){return typeof o!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):o==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof o=="str
4ing"?o.length:0)),""}),t}function _h(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function jx(e){let t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){const n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!wh.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function gc(e){const t={},n=_h(e);return n||t}function Ox(e){let t={};for(const n of e){switch(n.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=n.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=Px(n.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t={...t,notation:"scientific",...n.options.reduce((i,s)=>({...i,...gc(s)}),{})};continue;case"engineering":t={...t,notation:"engineering",...n.options.reduce((i,s)=>({...i,...gc(s)}),{})};continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(n.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(n.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(Rx,function(i,s,l,c,u,d){if(s)t.minimumIntegerDigits=l.length;else{if(c&&u)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(wh.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(pc.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(pc,function(s,l,c,u,d,h){return c==="*"?t.minimumFractionDigits=l.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:d&&h?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+h.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});const i=n.options[0];i==="w"?t={...t,trailingZeroDisplay:"stripIfInteger"}:i&&(t={...t,...mc(i)});continue}if(yh.test(n.stem)){t={...t,...mc(n.stem)};continue}const r=_h(n.stem);r&&(t={...t,...r});const o=jx(n.stem);o&&(t={...t,...o})}return t}let $e=(function(e){return e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag",e})({}),ci=(function(e){return e[e.number=0]="number",e[e.dateTime=1]="dateTime",e})({});function bc(e){return e.type===$e.literal}function Lx(e){return e.type===$e.argument}function Ch(e){return e.type===$e.number}function Sh(e){return e.type===$e.date}function Eh(e){return e.type===$e.time}function kh(e){return e.type===$e.select}function Ih(e){return e.type===$e.plural}function Mx(e){return e.type===$e.pound}function Nh(e){return e.type===$e.tag}function Th(e){return!!(e&&typeof e=="object"&&e.type===ci.number)}function aa(e){return!!(e&&typeof e=="object"&&e.type===ci.dateTime)}let ke=(function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_
4NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG",e})({});const Ah=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ao={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function Dx(e,t){let n="";for(let r=0;r<e.length;r++){const o=e.charAt(r);if(o==="j"){let i=0;for(;r+1<e.length&&e.charAt(r+1)===o;)i++,r++;let s=1+(i&1),l=i<2?1:3+(i>>1),c="a",u=Fx(t);for((u=="H"||u=="k")&&(l=0);l-- >0;)n+=c;for(;s-- >0;)n=u+n}else o==="J"?n+="H":n+=o}return n}function Fx(e){let t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}const n=e.language;let r;return n!=="root"&&(r=e.maximize().region),(Ao[r||""]||Ao[n||""]||Ao[`${n}-001`]||Ao["001"])[0]}const Ux=new RegExp(`^${Ah.source}*`),zx=new RegExp(`${Ah.source}*$`);function Se(e,t){return{start:e,end:t}}const Bx=!!Object.fromEntries,$x=!!String.prototype.trimStart,Hx=!!String.prototype.trimEnd,xc=Bx?Object.fromEntries:function(t){const n={};for(const[r,o]of t)n[r]=o;return n},Vx=$x?function(t){return t.trimStart()}:function(t){return t.replace(Ux,"")},Wx=Hx?function(t){return t.trimEnd()}:function(t){return t.replace(zx,"")},vc=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");
4function qx(e,t){return vc.lastIndex=t,vc.exec(e)[1]??""}class Gx{message;position;locale;ignoreTag;requiresOtherClause;shouldParseSkeletons;constructor(t,n={}){this.message=t,this.position={offset:0,line:1,column:1},this.ignoreTag=!!n.ignoreTag,this.locale=n.locale,this.requiresOtherClause=!!n.requiresOtherClause,this.shouldParseSkeletons=!!n.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(t,n,r){let o=[];for(;!this.isEOF();){const i=this.char();if(i===123){const s=this.parseArgument(t,r);if(s.err)return s;o.push(s.val)}else{if(i===125&&t>0)break;if(i===35&&(n==="plural"||n==="selectordinal")){const s=this.clonePosition();this.bump(),o.push({type:$e.pound,location:Se(s,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(r)break;return this.error(ke.UNMATCHED_CLOSING_TAG,Se(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&la(this.peek()||0)){const s=this.parseTag(t,n);if(s.err)return s;o.push(s.val)}else{const s=this.parseLiteral(t,n);if(s.err)return s;o.push(s.val)}}}return{val:o,err:null}}parseTag(t,n){const r=this.clonePosition();this.bump();const o=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:$e.literal,value:`<${o}/>`,location:Se(r,this.clonePosition())},err:null};if(this.bumpIf(">")){const i=this.parseMessage(t+1,n,!0);if(i.err)return i;const s=i.val,l=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!la(this.char()))return this.error(ke.INVALID_TAG,Se(l,this.clonePosition()));const c=this.clonePosition(),u=this.parseTagName();return o!==u?this.error(ke.UNMATCHED_CLOSING_TAG,Se(c,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:$e.tag,value:o,children:s,location:Se(r,this.clonePosition())},err:null}:this.error(ke.INVALID_TAG,Se(l,this.clonePosition())))}else return this.error(ke.UNCLOSED_TAG,Se(r,this.clonePosition()))}else return this.error(ke.INVALID_TAG,Se(r,this.clonePosition()))}parseTagName(){const t=this.offset();for(this.bump();!this.isEOF()&&Xx(this.char());)this.bump();return this.message.slice(t,this.offset())}parseLiteral(t,n){const r=this.clonePosition();let o="";for(;;){const s=this.tryParseQuote(n);if(s){o+=s;continue}const l=this.tryParseUnquoted(t,n);if(l){o+=l;continue}const c=this.tryParseLeftAngleBracket();if(c){o+=c;continue}break}const i=Se(r,this.clonePosition());return{val:{type:$e.literal,value:o,location:i},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!Kx(this.peek()||0))?(this.bump(),"<"):null}tryParseQuote(t){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(t==="plural"||t==="selectordinal")break;return null;default:return null}this.bump();const n=[this.char()];for(this.bump();!this.isEOF();){const r=this.char();if(r===39)if(this.peek()===39)n.push(39),this.bump();else{this.bump();break}else n.push(r);this.bump()}return String.fromCodePoint(...n)}tryParseUnquoted(t,n){if(this.isEOF())return null;const r=this.char();return r===60||r===123||r===35&&(n==="plural"||n==="selectordinal")||r===125&&t>0?null:(this.bump(),String.fromCodePoint(r))}parseArgument(t,n){const r=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(ke.EXPECT_ARGUMENT_CLOSING_BRACE,Se(r,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(ke.EMPTY_ARGUMENT,Se(r,this.clonePosition()));let o=this.parseIdentifierIfPossible().value;if(!o)return this.error(ke.MALFORMED_ARGUMENT,Se(r,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(ke.EXPECT_ARGUMENT_CLOSING_BRACE,Se(r,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:$e.argument,value:o,location:Se(r,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(ke.EXPECT_ARGUMENT_CLOSING_BRACE,Se(r,this.clonePosition())):this.parseArgumentOptions(t,n,o,r);default:return this.error(ke.MALFORMED_ARGUMENT,Se(r,this.clonePosition()))}}parseIdentifierIfPossible(){const t=this.clonePosition(),n=this.offset(),r=qx(this.message,n),o=n+r.length;this.bumpTo(o);const i=this.clonePosition(),s=Se(t,i);return{value:r,location:s}}parseArgumentOptions(t,n,r,o){let i=this.clonePosition(),s=this.parseIdentifierIfPossible().value,l=this.clonePosition();switch(s){case"":return this.error(ke.EXPECT_ARGUMENT_TYPE,Se(i,l));case"number":case"date":case"time":{this.bumpSpace();let c=null;if(this.bumpIf(",")){this.bumpSpace();const h=this.clonePosition(),p=this.parseSimpleArgStyleIfPossible();if(p.err)return p;const m=Wx(p.val);if(m.length===0)return this.error(ke.EXPECT_ARGUMENT_STYLE,Se(this.clonePosition(),this.clonePosition()));const g=Se(h,this.clonePosition());c={style:m,styleLocation:g}}const u=this.tryParseArgumentClose(o);if(u.err)return u;const d=Se(o,this.clonePosition());if(c&&c.style.startsWith("::")){let h=Vx(c.style.slice(2));if(s==="number"){const p=this.parseNumberSkeletonFromString(h,c.styleLocation);return p.err?p:{val:{type:$e.number,value:r,location:d,style:p.val},err:null}}else{if(h.length===0)return this.error(ke.EXPECT_DATE_TIME_SKELETON,d);let p=h;this.locale&&(p=Dx(h,this.locale));const m={type:ci.dateTime,pattern:p,location:c.styleLocation,parsedOptions:this.shouldParseSkeletons?Nx(p):{}};return{val:{type:s==="date"?$e.date:$e.time,value:r,location:d,style:m},err:null}}}return{val:{type:s==="number"?$e.number:s==="date"?$e.date:$e.time,value:r,location:d,style:c?.style??null},err:null}}
4case"plural":case"selectordinal":case"select":{const c=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(ke.EXPECT_SELECT_ARGUMENT_OPTIONS,Se(c,{...c}));this.bumpSpace();let u=this.parseIdentifierIfPossible(),d=0;if(s!=="select"&&u.value==="offset"){if(!this.bumpIf(":"))return this.error(ke.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Se(this.clonePosition(),this.clonePosition()));this.bumpSpace();const g=this.tryParseDecimalInteger(ke.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,ke.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(g.err)return g;this.bumpSpace(),u=this.parseIdentifierIfPossible(),d=g.val}const h=this.tryParsePluralOrSelectOptions(t,s,n,u);if(h.err)return h;const p=this.tryParseArgumentClose(o);if(p.err)return p;const m=Se(o,this.clonePosition());return s==="select"?{val:{type:$e.select,value:r,options:xc(h.val),location:m},err:null}:{val:{type:$e.plural,value:r,options:xc(h.val),offset:d,pluralType:s==="plural"?"cardinal":"ordinal",location:m},err:null}}default:return this.error(ke.INVALID_ARGUMENT_TYPE,Se(i,l))}}tryParseArgumentClose(t){return this.isEOF()||this.char()!==125?this.error(ke.EXPECT_ARGUMENT_CLOSING_BRACE,Se(t,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let t=0;const n=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let o=this.clonePosition();if(!this.bumpUntil("'"))return this.error(ke.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Se(o,this.clonePosition()));this.bump();break}case 123:{t+=1,this.bump();break}case 125:{if(t>0)t-=1;else return{val:this.message.slice(n.offset,this.offset()),err:null};break}default:this.bump();break}return{val:this.message.slice(n.offset,this.offset()),err:null}}parseNumberSkeletonFromString(t,n){let r=[];try{r=Ax(t)}catch{return this.error(ke.INVALID_NUMBER_SKELETON,n)}return{val:{type:ci.number,tokens:r,location:n,parsedOptions:this.shouldParseSkeletons?Ox(r):{}},err:null}}tryParsePluralOrSelectOptions(t,n,r,o){let i=!1;const s=[],l=new Set;let{value:c,location:u}=o;for(;;){if(c.length===0){const m=this.clonePosition();if(n!=="select"&&this.bumpIf("=")){const g=this.tryParseDecimalInteger(ke.EXPECT_PLURAL_ARGUMENT_SELECTOR,ke.INVALID_PLURAL_ARGUMENT_SELECTOR);if(g.err)return g;u=Se(m,this.clonePosition()),c=this.message.slice(m.offset,this.offset())}else break}if(l.has(c))return this.error(n==="select"?ke.DUPLICATE_SELECT_ARGUMENT_SELECTOR:ke.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,u);c==="other"&&(i=!0),this.bumpSpace();const d=this.clonePosition();if(!this.bumpIf("{"))return this.error(n==="select"?ke.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:ke.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Se(this.clonePosition(),this.clonePosition()));const h=this.parseMessage(t+1,n,r);if(h.err)return h;const p=this.tryParseArgumentClose(d);if(p.err)return p;s.push([c,{value:h.val,location:Se(d,this.clonePosition())}]),l.add(c),this.bumpSpace(),{value:c,location:u}=this.parseIdentifierIfPossible()}return s.length===0?this.error(n==="select"?ke.EXPECT_SELECT_ARGUMENT_SELECTOR:ke.EXPECT_PLURAL_ARGUMENT_SELECTOR,Se(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!i?this.error(ke.MISSING_OTHER_CLAUSE,Se(this.clonePosition(),this.clonePosition())):{val:s,err:null}}tryParseDecimalInteger(t,n){let r=1;const o=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(r=-1);let i=!1,s=0;for(;!this.isEOF();){const c=this.char();if(c>=48&&c<=57)i=!0,s=s*10+(c-48),this.bump();else break}const l=Se(o,this.clonePosition());return i?(s*=r,Number.isSafeInteger(s)?{val:s,err:null}:this.error(n,l)):this.error(t,l)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const t=this.position.offset;if(t>=this.message.length)throw Error("out of bound");const n=this.message.codePointAt(t);if(n===void 0)throw Error(`Offset ${t} is at invalid UTF-16 code unit boundary`);return n}error(t,n){return{val:null,err:{kind:t,message:this.message,location:n}}}bump(){if(this.isEOF())return;const t=this.char();t===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=t<65536?1:2)}bumpIf(t){if(this.message.startsWith(t,this.offset())){for(let n=0;n<t.length;n++)this.bump();return!0}return!1}bumpUntil(t){const n=this.offset(),r=this.message.indexOf(t,n);return r>=0?(this.bumpTo(r),!0):(this.bumpTo(this.message.length),!1)}bumpTo(t){if(this.offset()>t)throw Error(`targetOffset ${t} must be greater than or equal to the current offset ${this.offset()}`);for(t=Math.min(t,this.message.length);;){const n=this.offset();if(n===t)break;
4if(n>t)throw Error(`targetOffset ${t} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&Yx(this.char());)this.bump()}peek(){if(this.isEOF())return null;const t=this.char(),n=this.offset();return this.message.charCodeAt(n+(t>=65536?2:1))??null}}function la(e){return e>=97&&e<=122||e>=65&&e<=90}function Kx(e){return la(e)||e===47}function Xx(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function Yx(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function ca(e){e.forEach(t=>{if(delete t.location,kh(t)||Ih(t))for(const n in t.options)delete t.options[n].location,ca(t.options[n].value);else Ch(t)&&Th(t.style)||(Sh(t)||Eh(t))&&aa(t.style)?delete t.style.location:Nh(t)&&ca(t.children)})}function Jx(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const n=new Gx(e,t).parse();if(n.err){const r=SyntaxError(ke[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||ca(n.val),n.val}let Ri=(function(e){return e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API",e})({});
4class ji extends Error{code;originalMessage;constructor(t,n,r){super(t),this.code=n,this.originalMessage=r}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}}class yc extends ji{constructor(t,n,r,o){super(`Invalid values for "${t}": "${n}". Options are "${Object.keys(r).join('", "')}"`,Ri.INVALID_VALUE,o)}}class Zx extends ji{constructor(t,n,r){super(`Value for "${t}" must be of type ${n}`,Ri.INVALID_VALUE,r)}}class Qx extends ji{constructor(t,n){super(`The intl string context variable "${t}" was not provided to the string "${n}"`,Ri.MISSING_VALUE,n)}}let ct=(function(e){return e[e.literal=0]="literal",e[e.object=1]="object",e})({});function e1(e){return e.length<2?e:e.reduce((t,n)=>{const r=t[t.length-1];return!r||r.type!==ct.literal||n.type!==ct.literal?t.push(n):r.value+=n.value,t},[])}function t1(e){return typeof e=="function"}function Jo(e,t,n,r,o,i,s){if(e.length===1&&bc(e[0]))return[{type:ct.literal,value:e[0].value}];const l=[];for(const c of e){if(bc(c)){l.push({type:ct.literal,value:c.value});continue}if(Mx(c)){typeof i=="number"&&l.push({type:ct.literal,value:n.getNumberFormat(t).format(i)});continue}const{value:u}=c;if(!(o&&u in o))throw new Qx(u,s);let d=o[u];if(Lx(c)){(!d||typeof d=="string"||typeof d=="number"||typeof d=="bigint")&&(d=typeof d=="string"||typeof d=="number"||typeof d=="bigint"?String(d):""),l.push({type:typeof d=="string"?ct.literal:ct.object,value:d});continue}if(Sh(c)){const h=typeof c.style=="string"?r.date[c.style]:aa(c.style)?c.style.parsedOptions:void 0;l.push({type:ct.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(Eh(c)){const h=typeof c.style=="string"?r.time[c.style]:aa(c.style)?c.style.parsedOptions:r.time.medium;l.push({type:ct.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(Ch(c)){const h=typeof c.style=="string"?r.number[c.style]:Th(c.style)?c.style.parsedOptions:void 0;if(h&&h.scale){const p=h.scale||1;if(typeof d=="bigint"){if(!Number.isInteger(p))throw new TypeError(`Cannot apply fractional scale ${p} to bigint value. Scale must be an integer when formatting bigint.`);d=d*BigInt(p)}else d=d*p}l.push({type:ct.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(Nh(c)){const{children:h,value:p}=c,m=o[p];if(!t1(m))throw new Zx(p,"function",s);const g=Jo(h,t,n,r,o,i);let b=m(g.map(v=>v.value));Array.isArray(b)||(b=[b]),l.push(...b.map(v=>({type:typeof v=="string"?ct.literal:ct.object,value:v})))}if(kh(c)){const h=d,p=(Object.prototype.hasOwnProperty.call(c.options,h)?c.options[h]:void 0)||c.options.other;if(!p)throw new yc(c.value,d,Object.keys(c.options),s);l.push(...Jo(p.value,t,n,r,o));continue}if(Ih(c)){const h=`=${d}`;let p=Object.prototype.hasOwnProperty.call(c.options,h)?c.options[h]:void 0;if(!p){if(!Intl.PluralRules)throw new ji(`Intl.PluralRules is not available in this environment.
5Try polyfilling it using "@formatjs/intl-pluralrules"
6`,Ri.MISSING_INTL_API,s);const g=typeof d=="bigint"?Number(d):d,b=n.getPluralRules(t,{type:c.pluralType}).select(g-(c.offset||0));p=(Object.prototype.hasOwnProperty.call(c.options,b)?c.options[b]:void 0)||c.options.other}if(!p)throw new yc(c.value,d,Object.keys(c.options),s);const m=typeof d=="bigint"?Number(d):d;l.push(...Jo(p.value,t,n,r,o,m-(c.offset||0)));continue}}return e1(l)}function n1(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function r1(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=n1(e[r],t[r]),n),{...e}):e}function ps(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function o1(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:hs((...t)=>new Intl.NumberFormat(...t),{cache:ps(e.number),strategy:fs.variadic}),getDateTimeFormat:hs((...t)=>new Intl.DateTimeFormat(...t),{cache:ps(e.dateTime),strategy:fs.variadic}),getPluralRules:hs((...t)=>new Intl.PluralRules(...t),{cache:ps(e.pluralRules),strategy:fs.variadic})}}class mt{ast;locales;resolvedLocale;formatters;formats;message;formatterCache={number:{},dateTime:{},pluralRules:{}};constructor(t,n=mt.defaultLocale,r,o){if(this.locales=n,this.resolvedLocale=mt.resolveLocale(n),typeof t=="string"){if(this.message=t,!mt.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...i}=o||{};this.ast=mt.__parse(t,{...i,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=r1(mt.formats,r),this.formatters=o&&o.formatters||o1(this.formatterCache)}format=t=>{const n=this.formatToParts(t);if(n.length===1)return n[0].value;const r=n.reduce((o,i)=>(!o.length||i.type!==ct.literal||typeof o[o.length-1]!="string"?o.push(i.value):o[o.length-1]+=i.value,o),[]);return r.length<=1?r[0]||"":r};formatToParts=t=>Jo(this.ast,this.locales,this.formatters,this.formats,t,void 0,this.message);resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]});getAst=()=>this.ast;static memoizedDefaultLocale=null;static get defaultLocale(){return mt.memoizedDefaultLocale||(mt.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),mt.memoizedDefaultLocale}static resolveLocale=t=>{if(typeof Intl.Locale>"u")return;const n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])};static __parse=Jx;static formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}function Ph(...[e,t,n,r]){if(Array.isArray(t))throw new xn(At.INVALID_MESSAGE,void 0);if(typeof t=="object")throw new xn(At.INSUFFICIENT_PATH,void 0);if(typeof t=="string"){const p=(function(m,g){return g||/'[{}]/.test(m)?void 0:m})(t,n);if(p)return p}const{cache:o,formats:i,formatters:s,globalFormats:l,locale:c,timeZone:u}=r;let d;s.getMessageFormat||(s.getMessageFormat=(function(p,m){return bh(((...g)=>new mt(g[0],g[1],g[2],{formatters:m,...g[3]})),p.message)})(o,s));try{d=s.getMessageFormat(t,c,(function(p,m,g){const b=mt.formats.date,v=mt.formats.time,x={...p?.dateTime,...m?.dateTime},E={date:{...b,...x},time:{...v,...x},number:{...p?.number,...m?.number}};return g&&["date","time"].forEach((y=>{const k=E[y];for(const[I,C]of Object.entries(k))k[I]={timeZone:g,...C}})),E})(l,i,u),{formatters:{...s,getDateTimeFormat:(p,m)=>s.getDateTimeFormat(p,{...m,timeZone:m?.timeZone??u})}})}catch{throw new xn(At.INVALID_MESSAGE,void 0)}const h=d.format(n);return f.isValidElement(h)||Array.isArray(h)||typeof h=="string"?h:String(h)}Ph.raw=!0;function Xa(...e){return e.filter(Boolean).join(".")}function Rh(e){return Xa(e.namespace,e.key)}function i1(e){console.error(e)}function Po(e,t,n,r){const o=Xa(r,n);if(!t)throw new Error(o);let i=t;return n.split(".").forEach((s=>{const l=i[s];if(s==null||l==null)throw new Error(o+` (${e})`);i=l})),i}function s1(e){const t=(function(n,r,o){try{if(!r)throw new Error(void 0);const i=o?Po(n,r,o):r;if(!i)throw new Error(o);return i}catch(i){return new xn(At.MISSING_MESSAGE,i.message)}})(e.locale,e.messages,e.namespace);
6return(function({cache:n,formats:r,formatters:o,getMessageFallback:i=Rh,locale:s,messagesOrError:l,namespace:c,onError:u,timeZone:d}){const h=l instanceof xn;function p(b,v,x,E){const y=new xn(v,x);return u(y),E??i({error:y,key:b,namespace:c})}function m(b,v,x,E){const y=E;let k;if(h){if(!y)return u(l),i({error:l,key:b,namespace:c});k=y}else{const I=l;try{k=Po(s,I,b,c)}catch(C){if(!y)return p(b,At.MISSING_MESSAGE,C.message,y);k=y}}try{const I=Xa(c,b);return Ph(I,k,v&&(function(C){const A={};return Object.keys(C).forEach((T=>{let L=0;const D=C[T];let S;S=typeof D=="function"?j=>{const P=D(j);return f.isValidElement(P)?f.cloneElement(P,{key:T+L++}):P}:D,A[T]=S})),A})(v),{cache:n,formatters:o,globalFormats:r,formats:x,locale:s,timeZone:d})}catch(I){let C,A;return I instanceof xn?(C=I.code,A=I.originalMessage):(C=At.FORMATTING_ERROR,A=I.message),p(b,C,A,y)}}function g(b,v,x,E){const y=m(b,v,x,E);return typeof y!="string"?p(b,At.INVALID_MESSAGE,void 0):y}return g.rich=m,g.markup=(b,v,x,E)=>m(b,v,x,E),g.raw=b=>{if(h)return u(l),i({error:l,key:b,namespace:c});const v=l;try{return Po(s,v,b,c)}catch(x){return p(b,At.MISSING_MESSAGE,x.message)}},g.has=b=>{if(h)return!1;try{return Po(s,l,b,c),!0}catch{return!1}},g})({...e,messagesOrError:t})}function a1(e,t){return e===t?void 0:e.slice((t+".").length)}function l1({formats:e,getMessageFallback:t,messages:n,onError:r,...o}){return{...o,formats:e||void 0,messages:n||void 0,onError:r||i1,getMessageFallback:t||Rh}}const ua=f.createContext(void 0);function c1({children:e,formats:t,getMessageFallback:n,locale:r,messages:o,now:i,onError:s,timeZone:l}){const c=f.useContext(ua),u=f.useMemo((()=>c?.cache||xx()),[r,c?.cache]),d=f.useMemo((()=>c?.formatters||vx(u)),[u,c?.formatters]),h=f.useMemo((()=>({...l1({locale:r,formats:t===void 0?c?.formats:t,getMessageFallback:n||c?.getMessageFallback,messages:o===void 0?c?.messages:o,now:i||c?.now,onError:s||c?.onError,timeZone:l||c?.timeZone}),formatters:d,cache:u})),[u,t,d,n,r,o,i,s,c,l]);return a.jsx(ua.Provider,{value:h,children:e})}function da(){const e=f.useContext(ua);if(!e)throw new Error(void 0);return e}let wc=!1;const u1=typeof window>"u";function d1(e){return(function(t,n,r){const{cache:o,formats:i,formatters:s,getMessageFallback:l,locale:c,onError:u,timeZone:d}=da(),h=t[r],p=a1(n,r);return d||wc||!u1||(wc=!0,u(new xn(At.ENVIRONMENT_FALLBACK,void 0))),f.useMemo((()=>s1({cache:o,formatters:s,getMessageFallback:l,messages:h,namespace:p,onError:u,formats:i,locale:c,timeZone:d})),[o,s,l,h,p,u,i,c,d])})({"!":da().messages},e?`!.${e}`:"!","!")}function Mt(){return da().locale}function h1(e){return{...e,localePrefix:(n=e.localePrefix,typeof n=="object"?n:{mode:n||"always"}),localeCookie:(t=e.localeCookie,!!(t??1)&&{name:"NEXT_LOCALE",sameSite:"lax",...typeof t=="object"&&t}),localeDetection:e.localeDetection??!0,alternateLinks:e.alternateLinks??!0};var t,n}var f1=Ai["use".trim()],p1={};function jh(e){return(function(t){return typeof t=="object"?t.host==null&&t.hostname==null:!/^[a-z]+:/i.test(t)})(e)&&!(function(t){const n=typeof t=="object"?t.pathname:t;return n!=null&&!n.startsWith("/")})(e)}function _c(e,t){return e.replace(new RegExp(`^${t}`),"")||"/"}function m1(e,t){let n=e;return/^\/(\?.*)?$/.test(t)&&(t=t.slice(1)),n+=t,n}function Cc(e,t){return t===e||t.startsWith(`${e}/`)}function Oh(e,t,n){return typeof e=="string"?e:e[t]||n}function ha(e){const t=(function(){try{return p1._next_intl_trailing_slash==="true"}catch{return!1}})(),[n,...r]=e.split("#"),o=r.join("#");let i=n;if(i!=="/"){const s=i.endsWith("/");t&&!s?i+="/":!t&&s&&(i=i.slice(0,-1))}return o&&(i+="#"+o),i}function Sc(e,t){const n=ha(e),r=ha(t);return g1(n).test(r)}function Lh(e,t){return t.mode!=="never"&&t.prefixes?.[e]||Mh(e)}function Mh(e){return"/"+e}function g1(e){const t=e.replace(/\/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[\[(\.\.\.[^\]]+)\]\]/g,"(?:/(.*))?").replace(/\[(\.\.\.[^\]]+)\]/g,"(.+)").replace(/\[([^\]]+)\]/g,"([^/]+)");return new RegExp(`^${t}$`)}function Ro(e){return e.includes("[[...")}function jo(e){return e.includes("[...")}function Oo(e){return e.includes("[")}function b1(e,t){const n=e.split("/"),r=t.split("/"),o=Math.max(n.length,r.length);for(let i=0;i<o;i++){const s=n[i],l=r[i];if(!s&&l)return-1;if(s&&!l)return 1;if(s||l){if(!Oo(s)&&Oo(l))return-1;if(Oo(s)&&!Oo(l))return 1;if(!jo(s)&&jo(l))return-1;if(jo(s)&&!jo(l))return 1;if(!Ro(s)&&Ro(l))return-1;if(Ro(s)&&!Ro(l))return 1}}return 0}function x1(e){return e.sort(b1)}function v1(e){return typeof e.then=="function"}const y1=/^[\s\u200B\uFEFF]*(javascript|data|vbscript)\s*:/i;function w1(e){return y1.test(e)}
6const _1=f.createContext({pending:!1});function C1(e){if(typeof e=="string")return e;let t=e.pathname??"/";if(e.query){const n=new URLSearchParams(e.query);t+=`?${n.toString()}`}return t}function S1(e){if(e.startsWith("#"))return!0;try{const t=new URL(window.location.href),n=new URL(e,window.location.href);return t.pathname===n.pathname&&t.search===n.search&&n.hash!==""}catch{return!1}}function E1(e){if(typeof window>"u"||e.startsWith("/")||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//"))return e;try{const t=new URL(e,window.location.href);return t.pathname+t.search+t.hash}catch{return e}}function Ec(e){if(!e||e==="#"){window.scrollTo(0,0);return}const t=e.slice(1),n=document.getElementById(t);n&&n.scrollIntoView({behavior:"auto"})}function k1(e){if(typeof window>"u")return;const t=e;if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("//"))return;const n=rx(t),r=ox();if(r.has(n))return;r.add(n),(window.requestIdleCallback??(i=>setTimeout(i,100)))(()=>{const i=window;if(typeof i.__VINEXT_RSC_NAVIGATE__=="function")fetch(n,{headers:{Accept:"text/x-component"},credentials:"include",priority:"low",purpose:"prefetch"}).then(s=>{s.ok?ix(n,s):r.delete(n)}).catch(()=>{r.delete(n)});else if(i.__NEXT_DATA__?.__vinext?.pageModuleUrl){const s=document.createElement("link");s.rel="prefetch",s.href=t,s.as="document",document.head.appendChild(s)}})}let kr=null;const ui=new WeakMap;function I1(){return typeof window>"u"||typeof IntersectionObserver>"u"?null:kr||(kr=new IntersectionObserver(e=>{for(const t of e)if(t.isIntersecting){const n=ui.get(t.target);n&&(n(),kr?.unobserve(t.target),ui.delete(t.target))}},{rootMargin:"250px"}),kr)}function N1(){return typeof window<"u"?window.__VINEXT_DEFAULT_LOCALE__:globalThis.__VINEXT_DEFAULT_LOCALE__}function T1(e,t){if(t===!1||t===void 0)return e;const n=N1();return t===n||e.startsWith(`/${t}/`)||e===`/${t}`?e:`/${t}${e.startsWith("/")?e:`/${e}`}`}const Qe=f.forwardRef(function({href:t,as:n,replace:r=!1,prefetch:o,scroll:i=!0,children:s,onClick:l,onNavigate:c,...u},d){const{locale:h,...p}=u,m=n??C1(t),g=typeof m=="string"&&w1(m),b=T1(g?"/":m,h),v=b,[x,E]=f.useState(!1),y=f.useRef(!0);f.useEffect(()=>(y.current=!0,()=>{y.current=!1}),[]);const k=f.useRef(null),I=o!==!1&&!g,C=f.useCallback(S=>{k.current=S,typeof d=="function"?d(S):d&&(d.current=S)},[d]);f.useEffect(()=>{if(!I||typeof window>"u")return;const S=k.current;if(!S||b.startsWith("http://")||b.startsWith("https://")||b.startsWith("//"))return;const j=I1();if(j)return ui.set(S,()=>k1(b)),j.observe(S),()=>{j.unobserve(S),ui.delete(S)}},[I,b]);const A=async S=>{if(l&&l(S),S.defaultPrevented||S.button!==0||S.metaKey||S.ctrlKey||S.shiftKey||S.altKey||S.currentTarget.target&&S.currentTarget.target!=="_self"||m.startsWith("http://")||m.startsWith("https://")||m.startsWith("//"))return;if(S.preventDefault(),c)try{const O=new URL(m,window.location.origin);let U=!1;const $={url:O,preventDefault(){U=!0},get defaultPrevented(){return U}};if(c($),$.defaultPrevented)return}catch{}if(!r){const O=window.history.state??{};window.history.replaceState({...O,__vinext_scrollX:window.scrollX,__vinext_scrollY:window.scrollY},"")}const j=E1(m),P=j;if(typeof window<"u"&&S1(P)){const O=P.includes("#")?P.slice(P.indexOf("#")):"";r?window.history.replaceState(null,"",P):window.history.pushState(null,"",P),i&&Ec(O);return}const M=P.indexOf("#"),_=M!==-1?P.slice(M):"",R=window;if(typeof R.__VINEXT_RSC_NAVIGATE__=="function"){r?window.history.replaceState(null,"",P):window.history.pushState(null,"",P),E(!0);try{await R.__VINEXT_RSC_NAVIGATE__(P)}finally{y.current&&E(!1)}}else try{const U=(await _t(()=>import("./router-Duk2dCyI.js"),__vite__mapDeps([0,1,2]))).default;r?await U.replace(j,void 0,{scroll:i}):await U.push(j,void 0,{scroll:i})}catch{r?window.history.replaceState({},"",P):window.history.pushState({},"",P),window.dispatchEvent(new PopStateEvent("popstate"))}i&&(_?Ec(_):window.scrollTo(0,0))},{passHref:T,...L}=p,D=Tt.useMemo(()=>({pending:x}),[x]);return g?a.jsx("a",{...L,children:s}):a.jsx(_1.Provider,{value:D,children:a.jsx("a",{ref:C,href:v,onClick:A,...L,children:s})})});function A1(e){return typeof e=="string"?{pathname:e}:e}function Dh(e){function t(r){return String(r)}const n=new URLSearchParams;for(const[r,o]of Object.entries(e))Array.isArray(o)?o.forEach((i=>{n.append(r,t(i))})):n.set(r,t(o));return"?"+n.toString()}function P1({pathname:e,locale:t,params:n,pathnames:r,query:o}){function i(s){const l=r[s];let c;
6return l?(c=Oh(l,t,s),n&&Object.entries(n).forEach((([d,h])=>{let p,m;Array.isArray(h)?(p=`(\\[)?\\[...${d}\\](\\])?`,m=h.map((g=>String(g))).join("/")):(p=`\\[${d}\\]`,m=String(h)),c=c.replace(new RegExp(p,"g"),m)})),c=c.replace(/\[\[\.\.\..+\]\]/g,""),c=(function(d){return new URL(d,"http://l").pathname})(c)):c=s,c=ha(c),o&&(c+=Dh(o)),c}if(typeof e=="string")return i(e);{const{pathname:s,...l}=e;return{...l,pathname:i(s)}}}function R1(e,t,n){const r=x1(Object.keys(n)),o=decodeURI(t);for(const i of r){const s=n[i];if(typeof s=="string"){if(Sc(s,o))return i}else if(Sc(Oh(s,e,i),o))return i}return t}function j1(e,t=window.location.pathname){return e==="/"?t:t.replace(e,"")}function O1(e,t,n,r){const{mode:o}=n.localePrefix;let i;return r!==void 0?i=r:jh(e)&&(o==="always"?i=!0:o==="as-needed"&&(i=n.domains?!n.domains.some((s=>s.defaultLocale===t)):t!==n.defaultLocale)),i?m1(Lh(t,n.localePrefix),e):e}function Fh(e,t,n,r){if(!e||!(r!==n&&r!=null)||!t)return;const o=j1(t),i=o!==""?o:"/",{name:s,...l}=e;l.path||(l.path=i);let c=`${s}=${r};`;for(const[u,d]of Object.entries(l))c+=`${u==="maxAge"?"max-age":u}`,typeof d!="boolean"&&(c+="="+d),c+=";";document.cookie=c}function L1({href:e,locale:t,localeCookie:n,onClick:r,prefetch:o,...i},s){const l=Mt(),c=t!=null&&t!==l,u=Vn();return c&&(o=!1),a.jsx(Qe,{ref:s,href:e,hrefLang:c?t:void 0,onClick:function(d){Fh(n,u,l,t),r&&r(d)},prefetch:o,...i})}var Uh=f.forwardRef(L1);function M1(e,t){const n=h1(t||{}),r=n.pathnames;function o({href:d,locale:h,...p},m){let g,b;typeof d=="object"?(g=d.pathname,b=d.params):g=d;const v=jh(d),x=e(),E=v1(x)?f1(x):x,y=v?s({locale:h||E,href:r==null?g:{pathname:g,params:b},forcePrefix:h!=null||void 0}):g;return a.jsx(Uh,{ref:m,href:typeof d=="object"?{...d,pathname:y}:y,locale:h,localeCookie:n.localeCookie,...p})}const i=f.forwardRef(o);function s(d){const{forcePrefix:h,href:p,locale:m}=d;let g;return r==null?typeof p=="object"?(g=p.pathname,p.query&&(g+=Dh(p.query))):g=p:g=P1({locale:m,...A1(p),pathnames:n.pathnames}),O1(g,m,n,h)}function l(d){return function(h,...p){return d(s(h),...p)}}const c=l(sx),u=l(ax);return{config:n,Link:i,redirect:c,permanentRedirect:u,getPathname:s}}function D1(e){const t=Vn(),n=Mt();return f.useMemo((()=>{if(!t)return t;let r=t;const o=Lh(n,e.localePrefix);if(Cc(o,t))r=_c(t,o);else if(e.localePrefix.mode!=="never"&&e.localePrefix.prefixes){const i=Mh(n);Cc(i,t)&&(r=_c(t,i))}return r}),[e.localePrefix,n,t])}function F1(e){const{Link:t,config:n,getPathname:r,...o}=M1(Mt,e);return{...o,Link:t,usePathname:function(){const i=D1(n),s=Mt();return f.useMemo((()=>i&&n.pathnames?R1(s,i,n.pathnames):i),[s,i])},useRouter:function(){const i=Pi(),s=Mt(),l=Vn();return f.useMemo((()=>{function c(u){return function(d,h){const{locale:p,...m}=h||{},g=[r({href:d,locale:p||s,forcePrefix:p!=null||void 0})];Object.keys(m).length>0&&g.push(m),Fh(n.localeCookie,l,s,p),u(...g)}}return{...i,push:c(i.push),replace:c(i.replace),prefetch:c(i.prefetch)}}),[s,l,i])},getPathname:r}}const U1="en",z1=[{code:"en",label:{en:"English",ko:"영어",ja:"英語","zh-Hans":"英语","zh-Hant":"英語","es-MX":"inglés","pt-BR":"inglês","de-DE":"Englisch","fr-FR":"anglais"},webMessageFile:"apps/web/messages/en.json",flutterArbFile:"apps/flutter/lib/l10n/app_en.arb",chromeExtensionLocale:"en",androidLocale:"en",iosLocale:"en",googlePlayBadge:"en"},{code:"ko",label:{en:"Korean",ko:"한국어",ja:"韓国語","zh-Hans":"韩语","zh-Hant":"韓語","es-MX":"coreano","pt-BR":"coreano","de-DE":"Koreanisch","fr-FR":"coréen"},webMessageFile:"apps/web/messages/ko.json",flutterArbFile:"apps/flutter/lib/l10n/app_ko.arb",chromeExtensionLocale:"ko",androidLocale:"ko",iosLocale:"ko",googlePlayBadge:"ko"},{code:"ja",label:{en:"Japanese",ko:"일본어",ja:"日本語","zh-Hans":"日语","zh-Hant":"日語","es-MX":"japonés","pt-BR":"japonês","de-DE":"Japanisch","fr-FR":"japonais"},webMessageFile:"apps/web/messages/ja.json",flutterArbFile:"apps/flutter/lib/l10n/app_ja.arb",chromeExtensionLocale:"ja",androidLocale:"ja",iosLocale:"ja",googlePlayBadge:"en"},{code:"zh-Hans",label:{en:"Simplified Chinese",ko:"중국어 간체",ja:"簡体字中国語","zh-Hans":"简体中文","zh-Hant":"簡體中文","es-MX":"chino simplificado","pt-BR":"chinês simplificado","de-DE":"Vereinfachtes Chinesisch","fr-FR":"chinois simplifié"},webMessageFile:"apps/web/messages/zh-Hans.json",flutterArbFile:"apps/flutter/lib/l10n/app_zh_Hans.arb",flutterBaseFallbackArbFile:"apps/flutter/lib/l10n/app_zh.arb",chromeExtensionLocale:"zh_CN",androidLocale:"zh-Hans",iosLocale:"zh-Hans",googlePlayBadge:"en"},{code:"zh-Hant",label:{en:"Traditional Chinese",ko:"중국어 번체",ja:"繁体字中国語","zh-Hans":"繁体中文","zh-Hant":"繁體中文","es-MX":"chino tradicional","pt-BR":"chinês tradicional","de-DE":"Traditionelles Chinesisch","fr-FR":"chinois traditionnel"},webMessageFile:"apps/web/messages/zh-Hant.json",flutterArbFile:"apps/flutter/lib/l10n/app_zh_Hant.arb",chromeExtensionLocale:"zh_TW",androidLocale:"zh-Hant",iosLocale:"zh-Hant",googlePlayBadge:"en"},{code:"es-MX",label:{en:"Spanish (Mexico)",ko:"스페인어(멕시코)",
6ja:"スペイン語(メキシコ)","zh-Hans":"西班牙语(墨西哥)","zh-Hant":"西班牙文(墨西哥)","es-MX":"español (México)","pt-BR":"espanhol (México)","de-DE":"Spanisch (Mexiko)","fr-FR":"espagnol (Mexique)"},webMessageFile:"apps/web/messages/es-MX.json",flutterArbFile:"apps/flutter/lib/l10n/app_es_MX.arb",flutterBaseFallbackArbFile:"apps/flutter/lib/l10n/app_es.arb",chromeExtensionLocale:"es_419",androidLocale:"es-MX",iosLocale:"es-MX",googlePlayBadge:"en"},{code:"pt-BR",label:{en:"Portuguese (Brazil)",ko:"포르투갈어(브라질)",ja:"ポルトガル語(ブラジル)","zh-Hans":"葡萄牙语(巴西)","zh-Hant":"葡萄牙文(巴西)","es-MX":"portugués (Brasil)","pt-BR":"português (Brasil)","de-DE":"Portugiesisch (Brasilien)","fr-FR":"portugais (Brésil)"},webMessageFile:"apps/web/messages/pt-BR.json",flutterArbFile:"apps/flutter/lib/l10n/app_pt_BR.arb",flutterBaseFallbackArbFile:"apps/flutter/lib/l10n/app_pt.arb",chromeExtensionLocale:"pt_BR",androidLocale:"pt-BR",iosLocale:"pt-BR",googlePlayBadge:"en"}
6,{code:"de-DE",label:{en:"German",ko:"독일어",ja:"ドイツ語","zh-Hans":"德语","zh-Hant":"德文","es-MX":"alemán","pt-BR":"alemão","de-DE":"Deutsch","fr-FR":"allemand"},webMessageFile:"apps/web/messages/de-DE.json",flutterArbFile:"apps/flutter/lib/l10n/app_de_DE.arb",flutterBaseFallbackArbFile:"apps/flutter/lib/l10n/app_de.arb",chromeExtensionLocale:"de",androidLocale:"de-DE",iosLocale:"de-DE",googlePlayBadge:"en"},{code:"fr-FR",label:{en:"French",ko:"프랑스어",ja:"フランス語","zh-Hans":"法语","zh-Hant":"法文","es-MX":"francés","pt-BR":"francês","de-DE":"Französisch","fr-FR":"français"},webMessageFile:"apps/web/messages/fr-FR.json",flutterArbFile:"apps/flutter/lib/l10n/app_fr_FR.arb",flutterBaseFallbackArbFile:"apps/flutter/lib/l10n/app_fr.arb",chromeExtensionLocale:"fr",androidLocale:"fr-FR",iosLocale:"fr-FR",googlePlayBadge:"en"}],B1={fallbackText:""},Oi={defaultLocale:U1,serviceLocales:z1,missingMessage:B1},zh=["en","ko","ja","zh-Hans","zh-Hant","es-MX","pt-BR","de-DE","fr-FR"],Ya=Oi.defaultLocale;function Bh(e){return!!(e&&zh.includes(e))}function $1(e){return Bh(e)?e:Ya}function H1(e){return Oi.serviceLocales.map(t=>({value:t.code,label:t.label[e]??t.label[Ya]}))}const V1=Object.fromEntries(Oi.serviceLocales.map(e=>[e.code,e.googlePlayBadge]));function W1(e){return V1[e]==="ko"?"ko":"en"}const q1={locales:zh,defaultLocale:Ya,localePrefix:"always"},$h=F1(q1),{Link:Ve,usePathname:Ja}=$h,Hh=$h.useRouter;function G1(e,t){return(...n)=>{try{return t(...n)}catch{throw new Error(void 0)}}}const se=G1(0,d1);function K1({locale:e,...t}){if(!e)throw new Error(void 0);return a.jsx(c1,{locale:e,...t})}const Vh=768;function Wh(){if(typeof window>"u")return!1;const e=window.visualViewport?.width??Number.POSITIVE_INFINITY,t=document.documentElement.clientWidth||Number.POSITIVE_INFINITY,n=window.innerWidth||Number.POSITIVE_INFINITY;return Math.min(e,t,n)<Vh}function X1(){const[e,t]=f.useState(void 0);return f.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Vh-1}px)`),r=()=>{t(Wh())};return r(),n.addEventListener("change",r),window.visualViewport?.addEventListener("resize",r),window.addEventListener("orientationchange",r),()=>{n.removeEventListener("change",r),window.visualViewport?.removeEventListener("resize",r),window.removeEventListener("orientationchange",r)}},[]),!!e}function qh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=qh(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gh(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=qh(e))&&(r&&(r+=" "),r+=t);return r}const Y1=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},J1=(e,t)=>({classGroupId:e,validator:t}),Kh=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),di="-",kc=[],Z1="arbitrary..",Q1=e=>{const t=tv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return ev(s);const l=s.split(di),c=l[0]===""&&l.length>1?1:0;return Xh(l,c,t)},getConflictingClassGroupIds:(s,l)=>{if(l){const c=r[s],u=n[s];return c?u?Y1(u,c):c:u||kc}return n[s]||kc}}},Xh=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=Xh(e,t+1,i);if(u)return u}const s=n.validators;if(s===null)return;const l=t===0?e.join(di):e.slice(t).join(di),c=s.length;for(let u=0;u<c;u++){const d=s[u];if(d.validator(l))return d.classGroupId}},ev=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Z1+r:void 0})(),tv=e=>{const{theme:t,classGroups:n}=e;return nv(n,t)},nv=(e,t)=>{const n=Kh();for(const r in e){const o=e[r];Za(o,n,r,t)}return n},Za=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];rv(s,t,n,r)}},rv=(e,t,n,r)=>{if(typeof e=="string"){ov(e,t,n);return}if(typeof e=="function"){iv(e,t,n,r);return}sv(e,t,n,r)},ov=(e,t,n)=>{const r=e===""?t:Yh(t,e);r.classGroupId=n},iv=(e,t,n,r)=>{if(av(e)){Za(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(J1(n,e))},sv=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[l,c]=o[s];Za(c,Yh(t,l),n,r)}},Yh=(e,t)=>{let n=e;const r=t.split(di),o=r.length;for(let i=0;i<o;i++){const s=r[i];let l=n.nextPart.get(s);l||(l=Kh(),n.nextPart.set(s,l)),n=l}return n},av=e=>
vendor: 6,517 bytes, line 6
6"isThemeGetter"in e&&e.isThemeGetter===!0,lv=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},fa="!",Ic=":",cv=[],Nc=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),uv=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,l=0,c=0,u;const d=o.length;for(let b=0;b<d;b++){const v=o[b];if(s===0&&l===0){if(v===Ic){i.push(o.slice(c,b)),c=b+1;continue}if(v==="/"){u=b;continue}}v==="["?s++:v==="]"?s--:v==="("?l++:v===")"&&l--}const h=i.length===0?o:o.slice(c);let p=h,m=!1;h.endsWith(fa)?(p=h.slice(0,-1),m=!0):h.startsWith(fa)&&(p=h.slice(1),m=!0);const g=u&&u>c?u-c:void 0;return Nc(i,m,p,g)};if(t){const o=t+Ic,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):Nc(cv,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},dv=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],l=s[0]==="[",c=t.has(s);l||c?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},hv=e=>({cache:lv(e.cacheSize),parseClassName:uv(e),sortModifiers:dv(e),...Q1(e)}),fv=/\s+/,pv=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],l=e.trim().split(fv);let c="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{isExternal:h,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:b}=n(d);if(h){c=d+(c.length>0?" "+c:c);continue}let v=!!b,x=r(v?g.substring(0,b):g);if(!x){if(!v){c=d+(c.length>0?" "+c:c);continue}if(x=r(g),!x){c=d+(c.length>0?" "+c:c);continue}v=!1}const E=p.length===0?"":p.length===1?p[0]:i(p).join(":"),y=m?E+fa:E,k=y+x;if(s.indexOf(k)>-1)continue;s.push(k);const I=o(x,v);for(let C=0;C<I.length;++C){const A=I[C];s.push(y+A)}c=d+(c.length>0?" "+c:c)}return c},mv=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Jh(n))&&(o&&(o+=" "),o+=r);return o},Jh=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Jh(e[r]))&&(n&&(n+=" "),n+=t);return n},gv=(e,...t)=>{let n,r,o,i;const s=c=>{const u=t.reduce((d,h)=>h(d),e());return n=hv(u),r=n.cache.get,o=n.cache.set,i=l,l(c)},l=c=>{const u=r(c);if(u)return u;const d=pv(c,n);return o(c,d),d};return i=s,(...c)=>i(mv(...c))},bv=[],Ke=e=>{const t=n=>n[e]||bv;return t.isThemeGetter=!0,t},Zh=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qh=/^\((?:(\w[\w-]*):)?(.+)\)$/i,xv=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_v=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=e=>xv.test(e),we=e=>!!e&&!Number.isNaN(Number(e)),an=e=>!!e&&Number.isInteger(Number(e)),ms=e=>e.endsWith("%")&&we(e.slice(0,-1)),Vt=e=>vv.test(e),ef=()=>!0,Sv=e=>yv.test(e)&&!wv.test(e),Qa=()=>!1,Ev=e=>_v.test(e),kv=e=>Cv.test(e),Iv=e=>!Q(e)&&!ee(e),Nv=e=>En(e,rf,Qa),Q=e=>Zh.test(e),jn=e=>En(e,of,Sv),Tc=e=>En(e,Mv,we),Tv=e=>En(e,af,ef),Av=e=>En(e,sf,Qa),Ac=e=>En(e,tf,Qa),Pv=e=>En(e,nf,kv),Lo=e=>En(e,lf,Ev),ee=e=>Qh.test(e),Ir=e=>Wn(e,of),Rv=e=>Wn(e,sf),Pc=e=>Wn(e,tf),jv=e=>Wn(e,rf),Ov=e=>Wn(e,nf),Mo=e=>Wn(e,lf,!0),Lv=e=>Wn(e,af,!0),En=(e,t,n)=>{const r=Zh.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Wn=(e,t,n=!1)=>{const r=Qh.exec(e);return r?r[1]?t(r[1]):n:!1},tf=e=>e==="position"||e==="percentage",nf=e=>e==="image"||e==="url",rf=e=>e==="length"||e==="size"||e==="bg-size",of=e=>e==="length",Mv=e=>e==="number",sf=e=>e==="family-name",af=e=>e==="number"||e==="weight",lf=e=>e==="shadow",Dv=()=>{const e=Ke("color"),t=Ke("font"),n=Ke("text"),r=Ke("font-weight"),o=Ke("tracking"),i=Ke("leading"),s=Ke("breakpoint"),l=Ke("container"),c=Ke("spacing"),u=Ke("radius"),d=Ke("shadow"),h=Ke("inset-shadow"),p=Ke("text-shadow"),m=Ke("drop-shadow"),g=Ke("blur"),b=Ke("perspective"),v=Ke("aspect"),x=Ke("ease"),E=Ke("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...k(),ee,Q],C=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],T=()=>[ee,Q,c],L=()=>[sn,"full","auto",...T()],D=()=>[an,"none","subgrid",ee,Q],S=()=>["auto",{span:["full",an,ee,Q]},an,ee,Q],j=()=>[an,"auto",ee,Q],P=()=>["auto","min","max","fr",ee,Q],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...T()],O=()=>[sn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],U=()=>[sn,"screen","full","dvw","lvw","svw","min","max","fit",...T()],$=()=>[sn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],w=()=>[e,ee,Q],te=()=>[...k(),Pc,Ac,{position:[ee,Q]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",jv,Nv,{size:[ee,Q]}],fe=()=>[ms,Ir,jn],re=()=>["","none","full",u,ee,Q],Y=()=>["",we,Ir,jn],pe=()=>["solid","dashed","dotted","double"],ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],X=()=>[we,ms,Pc,Ac],Re=()=>["","none",g,ee,Q],Ie=()=>["none",we,ee,Q],oe=()=>["none",we,ee,Q],xe=()=>[we,ee,Q],G=()=>[sn,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vt],breakpoint:[Vt],color:[ef],container:[Vt],"drop-shadow":[Vt],ease:["in","out","in-out"],font:[Iv],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vt],shadow:[Vt],spacing:["px",we],text:[Vt],"text-shadow":[Vt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sn,Q,ee,v]}
vendor: 6,076 bytes, line 6
6],container:["container"],columns:[{columns:[we,Q,ee,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:I()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{"inset-s":L(),start:L()}],end:[{"inset-e":L(),end:L()}],"inset-bs":[{"inset-bs":L()}],"inset-be":[{"inset-be":L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[an,"auto",ee,Q]}],basis:[{basis:[sn,"full","auto",l,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[we,sn,"auto","initial","none",Q]}],grow:[{grow:["",we,ee,Q]}],shrink:[{shrink:["",we,ee,Q]}],order:[{order:[an,"first","last","none",ee,Q]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:S()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:S()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mbs:[{mbs:R()}],mbe:[{mbe:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[l,"screen",...O()]}],"min-w":[{"min-w":[l,"screen","none",...O()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",n,Ir,jn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Lv,Tv]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ms,Q]}],"font-family":[{font:[Rv,Av,t]}],"font-features":[{"font-features":[Q]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ee,Q]}],"line-clamp":[{"line-clamp":[we,"none",ee,Tc]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ee,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[we,"from-font","auto",ee,jn]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[we,"auto",ee,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,Q]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},an,ee,Q],radial:["",ee,Q],conic:[an,ee,Q]},Ov,Pv]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:fe()}
vendor: 7,338 bytes, line 6
6],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-bs":[{"border-bs":w()}],"border-color-be":[{"border-be":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[we,ee,Q]}],"outline-w":[{outline:["",we,Ir,jn]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",d,Mo,Lo]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",h,Mo,Lo]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[we,jn]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",p,Mo,Lo]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[we,ee,Q]}],"mix-blend":[{"mix-blend":[...ye(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ye()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[we]}],"mask-image-linear-from-pos":[{"mask-linear-from":X()}],"mask-image-linear-to-pos":[{"mask-linear-to":X()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":X()}],"mask-image-t-to-pos":[{"mask-t-to":X()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":X()}],"mask-image-r-to-pos":[{"mask-r-to":X()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":X()}],"mask-image-b-to-pos":[{"mask-b-to":X()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":X()}],"mask-image-l-to-pos":[{"mask-l-to":X()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":X()}],"mask-image-x-to-pos":[{"mask-x-to":X()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":X()}],"mask-image-y-to-pos":[{"mask-y-to":X()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[ee,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":X()}],"mask-image-radial-to-pos":[{"mask-radial-to":X()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[we]}],"mask-image-conic-from-pos":[{"mask-conic-from":X()}],"mask-image-conic-to-pos":[{"mask-conic-to":X()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,Q]}],filter:[{filter:["","none",ee,Q]}],blur:[{blur:Re()}],brightness:[{brightness:[we,ee,Q]}],contrast:[{contrast:[we,ee,Q]}],"drop-shadow":[{"drop-shadow":["","none",m,Mo,Lo]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",we,ee,Q]}],"hue-rotate":[{"hue-rotate":[we,ee,Q]}],invert:[{invert:["",we,ee,Q]}],saturate:[{saturate:[we,ee,Q]}],sepia:[{sepia:["",we,ee,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,Q]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[we,ee,Q]}],"backdrop-contrast":[{"backdrop-contrast":[we,ee,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",we,ee,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[we,ee,Q]}],"backdrop-invert":[{"backdrop-invert":["",we,ee,Q]}],"backdrop-opacity":[{"backdrop-opacity":[we,ee,Q]}],"backdrop-saturate":[{"backdrop-saturate":[we,ee,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",we,ee,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[we,"initial",ee,Q]}],ease:[{ease:["linear","initial",x,ee,Q]}],delay:[{delay:[we,ee,Q]}],animate:[{animate:["none",E,ee,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ee,Q]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Ie()}],"rotate-x":[{"rotate-x":Ie()}],"rotate-y":[{"rotate-y":Ie()}],"rotate-z":[{"rotate-z":Ie()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[ee,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}
6],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee,Q]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee,Q]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[we,Ir,jn,Tc]}],stroke:[{stroke:["none",...w()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Fv=gv(Dv);function Te(...e){return Fv(Gh(e))}const Uv="sidebar_state",zv=3600*24*7,Bv="16rem",$v="min(15rem, 82vw)",Hv="3rem",Vv="b",cf=f.createContext(null);function oo(){const e=f.useContext(cf);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Wv({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s}){const l=X1(),[c,u]=f.useState(!1),[d,h]=f.useState(e),p=t??d,m=f.useCallback(x=>{const E=typeof x=="function"?x(p):x;n?n(E):h(E),document.cookie=`${Uv}=${E}; path=/; max-age=${zv}`},[n,p]),g=f.useCallback(()=>l||Wh()?u(x=>
6!x):m(x=>!x),[l,m,u]);f.useEffect(()=>{const x=E=>{E.key===Vv&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),g())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[g]);const b=p?"expanded":"collapsed",v=f.useMemo(()=>({state:b,open:p,setOpen:m,isMobile:l,openMobile:c,setOpenMobile:u,toggleSidebar:g}),[b,p,m,l,c,u,g]);return a.jsx(cf.Provider,{value:v,children:a.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Bv,"--sidebar-width-icon":Hv,...o},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...s,children:i})})}function Rc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Li(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Rc(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Rc(e[o],null)}}}}function Ye(...e){return f.useCallback(Li(...e),e)}function pr(e){const t=qv(e),n=f.forwardRef((r,o)=>{const{children:i,...s}=r,l=f.Children.toArray(i),c=l.find(Kv);if(c){const u=c.props.children,d=l.map(h=>h===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:h);return a.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,d):null})}return a.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var uf=pr("Slot");function qv(e){const t=f.forwardRef((n,r)=>{const{children:o,...i}=n;if(f.isValidElement(o)){const s=Yv(o),l=Xv(i,o.props);return o.type!==f.Fragment&&(l.ref=r?Li(r,s):s),f.cloneElement(o,l)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var df=Symbol("radix.slottable");function Gv(e){const t=({children:n})=>a.jsx(a.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=df,t}function Kv(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===df}function Xv(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...l)=>{const c=i(...l);return o(...l),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function Yv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=Jv.reduce((e,t)=>{const n=pr(`Primitive.${t}`),r=f.forwardRef((o,i)=>{const{asChild:s,...l}=o,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hf(e,t){e&&fh.flushSync(()=>e.dispatchEvent(t))}var Zv=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qv="VisuallyHidden",ff=f.forwardRef((e,t)=>a.jsx(He.span,{...e,ref:t,style:{...Zv,...e.style}}));ff.displayName=Qv;var ey=ff;function ty(e,t){const n=f.createContext(t),r=i=>{const{children:s,...l}=i,c=f.useMemo(()=>l,Object.values(l));return a.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(i){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function qn(e,t=[]){let n=[];function r(i,s){const l=f.createContext(s),c=n.length;n=[...n,s];const u=h=>{const{scope:p,children:m,...g}=h,b=p?.[e]?.[c]||l,v=f.useMemo(()=>g,Object.values(g));return a.jsx(b.Provider,{value:v,children:m})};u.displayName=i+"Provider";function d(h,p){const m=p?.[e]?.[c]||l,g=f.useContext(m);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[u,d]}const o=()=>{const i=n.map(s=>f.createContext(s));return function(l){const c=l?.[e]||i;return f.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return o.scopeName=e,[r,ny(o,...t)]}function ny(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));
6return function(i){const s=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(i)[`__scope${u}`];return{...l,...h}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function pf(e){const t=e+"CollectionProvider",[n,r]=qn(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=b=>{const{scope:v,children:x}=b,E=Tt.useRef(null),y=Tt.useRef(new Map).current;return a.jsx(o,{scope:v,itemMap:y,collectionRef:E,children:x})};s.displayName=t;const l=e+"CollectionSlot",c=pr(l),u=Tt.forwardRef((b,v)=>{const{scope:x,children:E}=b,y=i(l,x),k=Ye(v,y.collectionRef);return a.jsx(c,{ref:k,children:E})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",p=pr(d),m=Tt.forwardRef((b,v)=>{const{scope:x,children:E,...y}=b,k=Tt.useRef(null),I=Ye(v,k),C=i(d,x);return Tt.useEffect(()=>(C.itemMap.set(k,{ref:k,...y}),()=>{C.itemMap.delete(k)})),a.jsx(p,{[h]:"",ref:I,children:E})});m.displayName=d;function g(b){const v=i(e+"CollectionConsumer",b);return Tt.useCallback(()=>{const E=v.collectionRef.current;if(!E)return[];const y=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((C,A)=>y.indexOf(C.ref.current)-y.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},g,r]}function be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var _n=globalThis?.document?f.useLayoutEffect:()=>{},ry=Ai[" useInsertionEffect ".trim().toString()]||_n;function Mi({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=oy({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:o;{const d=f.useRef(e!==void 0);f.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=f.useCallback(d=>{if(l){const h=iy(d)?d(e):d;h!==e&&s.current?.(h)}else i(d)},[l,e,i,s]);return[c,u]}function oy({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),i=f.useRef(t);return ry(()=>{i.current=t},[t]),f.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function iy(e){return typeof e=="function"}function sy(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Bt=e=>{const{present:t,children:n}=e,r=ay(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),i=Ye(r.ref,ly(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:i}):null};Bt.displayName="Presence";function ay(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),i=f.useRef("none"),s=e?"mounted":"unmounted",[l,c]=sy(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Do(r.current);i.current=l==="mounted"?u:"none"},[l]),_n(()=>{const u=r.current,d=o.current;if(d!==e){const p=i.current,m=Do(u);e?c("MOUNT"):m==="none"||u?.display==="none"?c("UNMOUNT"):c(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),_n(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=m=>{const b=Do(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&b&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=m=>{m.target===t&&(i.current=Do(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Do(e){return e?.animationName||"none"}function ly(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var cy=Ai[" useId ".trim().toString()]||(()=>{}),uy=0;function Dn(e){const[t,n]=f.useState(cy());return _n(()=>{n(r=>r??String(uy++))},[e]),e||(t?`radix-${t}`:"")}var dy=f.createContext(void 0);function mf(e){const t=f.useContext(dy);return e||t||"ltr"}function Jt(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>t.current?.(...n),[])}function hy(e,t=globalThis?.document){const n=Jt(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}
6var fy="DismissableLayer",pa="dismissableLayer.update",py="dismissableLayer.pointerDownOutside",my="dismissableLayer.focusOutside",jc,gf=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Di=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:l,...c}=e,u=f.useContext(gf),[d,h]=f.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=f.useState({}),g=Ye(t,A=>h(A)),b=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=b.indexOf(v),E=d?b.indexOf(d):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,k=E>=x,I=xy(A=>{const T=A.target,L=[...u.branches].some(D=>D.contains(T));!k||L||(o?.(A),s?.(A),A.defaultPrevented||l?.())},p),C=vy(A=>{const T=A.target;[...u.branches].some(D=>D.contains(T))||(i?.(A),s?.(A),A.defaultPrevented||l?.())},p);return hy(A=>{E===u.layers.size-1&&(r?.(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},p),f.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Oc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=jc)}},[d,p,n,u]),f.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Oc())},[d,u]),f.useEffect(()=>{const A=()=>m({});return document.addEventListener(pa,A),()=>document.removeEventListener(pa,A)},[]),a.jsx(He.div,{...c,ref:g,style:{pointerEvents:y?k?"auto":"none":void 0,...e.style},onFocusCapture:be(e.onFocusCapture,C.onFocusCapture),onBlurCapture:be(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:be(e.onPointerDownCapture,I.onPointerDownCapture)})});Di.displayName=fy;var gy="DismissableLayerBranch",by=f.forwardRef((e,t)=>{const n=f.useContext(gf),r=f.useRef(null),o=Ye(t,r);return f.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),a.jsx(He.div,{...e,ref:o})});by.displayName=gy;function xy(e,t=globalThis?.document){const n=Jt(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){bf(py,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vy(e,t=globalThis?.document){const n=Jt(e),r=f.useRef(!1);return f.useEffect(()=>{const o=i=>{i.target&&!r.current&&bf(my,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Oc(){const e=new CustomEvent(pa);document.dispatchEvent(e)}function bf(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hf(o,i):o.dispatchEvent(i)}var gs="focusScope.autoFocusOnMount",bs="focusScope.autoFocusOnUnmount",Lc={bubbles:!1,cancelable:!0},yy="FocusScope",el=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[l,c]=f.useState(null),u=Jt(o),d=Jt(i),h=f.useRef(null),p=Ye(t,b=>c(b)),m=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let b=function(y){if(m.paused||!l)return;const k=y.target;l.contains(k)?h.current=k:fn(h.current,{select:!0})},v=function(y){if(m.paused||!l)return;const k=y.relatedTarget;k!==null&&(l.contains(k)||fn(h.current,{select:!0}))},x=function(y){if(document.activeElement===document.body)for(const I of y)I.removedNodes.length>0&&fn(l)};document.addEventListener("focusin",b),document.addEventListener("focusout",v);const E=new MutationObserver(x);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",v),E.disconnect()}}},[r,l,m.paused]),f.useEffect(()=>{if(l){Dc.add(m);const b=document.activeElement;if(!l.contains(b)){const x=new CustomEvent(gs,Lc);l.addEventListener(gs,u),l.dispatchEvent(x),x.defaultPrevented||(wy(ky(xf(l)),{select:!0}),document.activeElement===b&&fn(l))}return()=>{l.removeEventListener(gs,u),setTimeout(()=>{const x=new CustomEvent(bs,Lc);l.addEventListener(bs,d),l.dispatchEvent(x),x.defaultPrevented||fn(b??document.body,{select:!0}),l.removeEventListener(bs,d),Dc.remove(m)},0)}}},[l,u,d,m]);const g=f.useCallback(b=>{if(!n&&!r||m.paused)return;const v=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,x=document.activeElement;if(v&&x){const E=b.currentTarget,[y,k]=_y(E);y&&k?!b.shiftKey&&x===k?(b.preventDefault(),n&&fn(y,{select:!0})):b.shiftKey&&x===y&&(b.preventDefault(),n&&fn(k,{select:!0})):x===E&&b.preventDefault()}},[n,r,m.paused]);return a.jsx(He.div,{tabIndex:-1,...s,ref:p,onKeyDown:g})});el.displayName=yy;function wy(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fn(r,{select:t}),document.activeElement!==n)return}function _y(e){const t=xf(e),n=Mc(t,e),r=Mc(t.reverse(),e);return[n,r]}function xf(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Mc(e,t){for(const n of e)if(!Cy(n,{upTo:t}))return n}function Cy(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sy(e){return e instanceof HTMLInputElement&&"select"in e}function fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Sy(e)&&t&&e.select()}}var Dc=Ey();function Ey(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Fc(e,t),e.unshift(t)},remove(t){e=Fc(e,t),e[0]?.resume()}}}function Fc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ky(e){return e.filter(t=>t.tagName!=="A")}var Iy="Portal",Fi=f.forwardRef((e,t)=>
6{const{container:n,...r}=e,[o,i]=f.useState(!1);_n(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?nx.createPortal(a.jsx(He.div,{...r,ref:t}),s):null});Fi.displayName=Iy;var xs=0;function vf(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Uc()),document.body.insertAdjacentElement("beforeend",e[1]??Uc()),xs++,()=>{xs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xs--}},[])}function Uc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Pt=function(){return Pt=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Pt.apply(this,arguments)};function yf(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ny(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Zo="right-scroll-bar-position",Qo="width-before-scroll-bar",Ty="with-scroll-bars-hidden",Ay="--removed-body-scroll-bar-size";function vs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Py(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Ry=typeof window<"u"?f.useLayoutEffect:f.useEffect,zc=new WeakMap;function jy(e,t){var n=Py(null,function(r){return e.forEach(function(o){return vs(o,r)})});return Ry(function(){var r=zc.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(l){i.has(l)||vs(l,null)}),i.forEach(function(l){o.has(l)||vs(l,s)})}zc.set(n,e)},[e]),n}function Oy(e){return e}function Ly(e,t){t===void 0&&(t=Oy);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(l){return l!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var l=n;n=[],l.forEach(i),s=n}var c=function(){var d=s;s=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return o}function My(e){e===void 0&&(e={});var t=Ly(null);return t.options=Pt({async:!0,ssr:!1},e),t}var wf=function(e){var t=e.sideCar,n=yf(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,Pt({},n))};wf.isSideCarExport=!0;function Dy(e,t){return e.useMedium(t),wf}var _f=My(),ys=function(){},Ui=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:ys,onWheelCapture:ys,onTouchMoveCapture:ys}),o=r[0],i=r[1],s=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,p=e.sideCar,m=e.noRelative,g=e.noIsolation,b=e.inert,v=e.allowPinchZoom,x=e.as,E=x===void 0?"div":x,y=e.gapMode,k=yf(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=p,C=jy([n,t]),A=Pt(Pt({},k),o);return f.createElement(f.Fragment,null,d&&f.createElement(I,{sideCar:_f,removeScrollBar:u,shards:h,noRelative:m,noIsolation:g,inert:b,setCallbacks:i,allowPinchZoom:!!v,lockRef:n,gapMode:y}),s?f.cloneElement(f.Children.only(l),Pt(Pt({},A),{ref:C})):f.createElement(E,Pt({},A,{className:c,ref:C}),l))});Ui.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ui.classNames={fullWidth:Qo,zeroRight:Zo};var Fy=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Uy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Fy();return t&&e.setAttribute("nonce",t),e}function zy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function By(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var $y=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Uy())&&(zy(t,n),By(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hy=function(){var e=$y();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Cf=function(){var e=Hy(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Vy={left:0,top:0,right:0,gap:0},ws=function(e){return parseInt(e||"",10)||0},Wy=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ws(n),ws(r),ws(o)]},qy=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Vy;var t=Wy(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Gy=Cf(),ir="data-scroll-locked",Ky=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,l=e.gap;return n===void 0&&(n="margin"),`
7  .`.concat(Ty,` {
8   overflow: hidden `).concat(r,`;
9   padding-right: `).concat(l,"px ").concat(r,`;
10  }
11  body[`).concat(ir,`] {
12    overflow: hidden `).concat(r,`;
13    overscroll-behavior: contain;
14    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
15    padding-left: `.concat(o,`px;
16    padding-top: `).concat(i,`px;
17    padding-right: `).concat(s,`px;
18    margin-left:0;
19    margin-top:0;
20    margin-right: `).concat(l,"px ").concat(r,`;
21    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
21")].filter(Boolean).join(""),`
22  }
23  
24  .`).concat(Zo,` {
25    right: `).concat(l,"px ").concat(r,`;
26  }
27  
28  .`).concat(Qo,` {
29    margin-right: `).concat(l,"px ").concat(r,`;
30  }
31  
32  .`).concat(Zo," .").concat(Zo,` {
33    right: 0 `).concat(r,`;
34  }
35  
36  .`).concat(Qo," .").concat(Qo,` {
37    margin-right: 0 `).concat(r,`;
38  }
39  
40  body[`).concat(ir,`] {
41    `).concat(Ay,": ").concat(l,`px;
42  }
43`)},Bc=function(){var e=parseInt(document.body.getAttribute(ir)||"0",10);return isFinite(e)?e:0},Xy=function(){f.useEffect(function(){return document.body.setAttribute(ir,(Bc()+1).toString()),function(){var e=Bc()-1;e<=0?document.body.removeAttribute(ir):document.body.setAttribute(ir,e.toString())}},[])},Yy=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Xy();var i=f.useMemo(function(){return qy(o)},[o]);return f.createElement(Gy,{styles:Ky(i,!t,o,n?"":"!important")})},ma=!1;if(typeof window<"u")try{var Fo=Object.defineProperty({},"passive",{get:function(){return ma=!0,!0}});window.addEventListener("test",Fo,Fo),window.removeEventListener("test",Fo,Fo)}catch{ma=!1}var Qn=ma?{passive:!1}:!1,Jy=function(e){return e.tagName==="TEXTAREA"},Sf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Jy(e)&&n[t]==="visible")},Zy=function(e){return Sf(e,"overflowY")},Qy=function(e){return Sf(e,"overflowX")},$c=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ef(e,r);if(o){var i=kf(e,r),s=i[1],l=i[2];if(s>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ew=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},tw=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ef=function(e,t){return e==="v"?Zy(t):Qy(t)},kf=function(e,t){return e==="v"?ew(t):tw(t)},nw=function(e,t){return e==="h"&&t==="rtl"?-1:1},rw=function(e,t,n,r,o){var i=nw(e,window.getComputedStyle(t).direction),s=i*r,l=n.target,c=t.contains(l),u=!1,d=s>0,h=0,p=0;do{if(!l)break;var m=kf(e,l),g=m[0],b=m[1],v=m[2],x=b-v-i*g;(g||x)&&Ef(e,l)&&(h+=x,p+=g);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(h)<1||!d&&Math.abs(p)<1)&&(u=!0),u},Uo=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hc=function(e){return[e.deltaX,e.deltaY]},Vc=function(e){return e&&"current"in e?e.current:e},ow=function(e,t){return e[0]===t[0]&&e[1]===t[1]},iw=function(e){return`
44  .block-interactivity-`.concat(e,` {pointer-events: none;}
45  .allow-interactivity-`).concat(e,` {pointer-events: all;}
46`)},sw=0,er=[];function aw(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(sw++)[0],i=f.useState(Cf)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=Ny([e.lockRef.current],(e.shards||[]).map(Vc),!0).filter(Boolean);return b.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var l=f.useCallback(function(b,v){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!s.current.allowPinchZoom;var x=Uo(b),E=n.current,y="deltaX"in b?b.deltaX:E[0]-x[0],k="deltaY"in b?b.deltaY:E[1]-x[1],I,C=b.target,A=Math.abs(y)>Math.abs(k)?"h":"v";if("touches"in b&&A==="h"&&C.type==="range")return!1;var T=window.getSelection(),L=T&&T.anchorNode,D=L?L===C||L.contains(C):!1;if(D)return!1;var S=$c(A,C);if(!S)return!0;if(S?I=A:(I=A==="v"?"h":"v",S=$c(A,C)),!S)return!1;if(!r.current&&"changedTouches"in b&&(y||k)&&(r.current=I),!I)return!0;var j=r.current||I;return rw(j,v,b,j==="h"?y:k)},[]),c=f.useCallback(function(b){var v=b;if(!(!er.length||er[er.length-1]!==i)){var x="deltaY"in v?Hc(v):Uo(v),E=t.current.filter(function(I){return I.name===v.type&&(I.target===v.target||v.target===I.shadowParent)&&ow(I.delta,x)})[0];if(E&&E.should){v.cancelable&&v.preventDefault();return}
vendor: 4,338 bytes, line 46
46if(!E){var y=(s.current.shards||[]).map(Vc).filter(Boolean).filter(function(I){return I.contains(v.target)}),k=y.length>0?l(v,y[0]):!s.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(b,v,x,E){var y={name:b,delta:v,target:x,should:E,shadowParent:lw(x)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(k){return k!==y})},1)},[]),d=f.useCallback(function(b){n.current=Uo(b),r.current=void 0},[]),h=f.useCallback(function(b){u(b.type,Hc(b),b.target,l(b,e.lockRef.current))},[]),p=f.useCallback(function(b){u(b.type,Uo(b),b.target,l(b,e.lockRef.current))},[]);f.useEffect(function(){return er.push(i),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Qn),document.addEventListener("touchmove",c,Qn),document.addEventListener("touchstart",d,Qn),function(){er=er.filter(function(b){return b!==i}),document.removeEventListener("wheel",c,Qn),document.removeEventListener("touchmove",c,Qn),document.removeEventListener("touchstart",d,Qn)}},[]);var m=e.removeScrollBar,g=e.inert;return f.createElement(f.Fragment,null,g?f.createElement(i,{styles:iw(o)}):null,m?f.createElement(Yy,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function lw(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cw=Dy(_f,aw);var tl=f.forwardRef(function(e,t){return f.createElement(Ui,Pt({},e,{ref:t,sideCar:cw}))});tl.classNames=Ui.classNames;var uw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},tr=new WeakMap,zo=new WeakMap,Bo={},_s=0,If=function(e){return e&&(e.host||If(e.parentNode))},dw=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=If(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hw=function(e,t,n,r){var o=dw(t,Array.isArray(e)?e:[e]);Bo[n]||(Bo[n]=new WeakMap);var i=Bo[n],s=[],l=new Set,c=new Set(o),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};o.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(p){if(l.has(p))d(p);else try{var m=p.getAttribute(r),g=m!==null&&m!=="false",b=(tr.get(p)||0)+1,v=(i.get(p)||0)+1;tr.set(p,b),i.set(p,v),s.push(p),b===1&&g&&zo.set(p,!0),v===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return d(t),l.clear(),_s++,function(){s.forEach(function(h){var p=tr.get(h)-1,m=i.get(h)-1;tr.set(h,p),i.set(h,m),p||(zo.has(h)||h.removeAttribute(r),zo.delete(h)),m||h.removeAttribute(n)}),_s--,_s||(tr=new WeakMap,tr=new WeakMap,zo=new WeakMap,Bo={})}},Nf=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=uw(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),hw(r,o,n,"aria-hidden")):function(){return null}},zi="Dialog",[Tf]=qn(zi),[fw,kt]=Tf(zi),Af=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,l=f.useRef(null),c=f.useRef(null),[u,d]=Mi({prop:r,defaultProp:o??!1,onChange:i,caller:zi});return a.jsx(fw,{scope:t,triggerRef:l,contentRef:c,contentId:Dn(),titleId:Dn(),descriptionId:Dn(),open:u,onOpenChange:d,onOpenToggle:f.useCallback(()=>d(h=>!h),[d]),modal:s,children:n})};Af.displayName=zi;var Pf="DialogTrigger",pw=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(Pf,n),i=Ye(t,o.triggerRef);return a.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ol(o.open),...r,ref:i,onClick:be(e.onClick,o.onOpenToggle)})});pw.displayName=Pf;var nl="DialogPortal",[mw,Rf]=Tf(nl,{forceMount:void 0}),jf=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=kt(nl,t);return a.jsx(mw,{scope:t,forceMount:n,children:f.Children.map(r,s=>a.jsx(Bt,{present:n||i.open,children:a.jsx(Fi,{asChild:!0,container:o,children:s})}))})};jf.displayName=nl;var hi="DialogOverlay",Of=f.forwardRef((e,t)=>{const n=Rf(hi,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=kt(hi,e.__scopeDialog);return i.modal?a.jsx(Bt,{present:r||i.open,children:a.jsx(bw,{...o,ref:t})}):null});Of.displayName=hi;var gw=pr("DialogOverlay.RemoveScroll"),bw=f.forwardRef((e,t)=>
46{const{__scopeDialog:n,...r}=e,o=kt(hi,n);return a.jsx(tl,{as:gw,allowPinchZoom:!0,shards:[o.contentRef],children:a.jsx(He.div,{"data-state":ol(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Bn="DialogContent",Lf=f.forwardRef((e,t)=>{const n=Rf(Bn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=kt(Bn,e.__scopeDialog);return a.jsx(Bt,{present:r||i.open,children:i.modal?a.jsx(xw,{...o,ref:t}):a.jsx(vw,{...o,ref:t})})});Lf.displayName=Bn;var xw=f.forwardRef((e,t)=>{const n=kt(Bn,e.__scopeDialog),r=f.useRef(null),o=Ye(t,n.contentRef,r);return f.useEffect(()=>{const i=r.current;if(i)return Nf(i)},[]),a.jsx(Mf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:be(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:be(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0;(s.button===2||l)&&i.preventDefault()}),onFocusOutside:be(e.onFocusOutside,i=>i.preventDefault())})}),vw=f.forwardRef((e,t)=>{const n=kt(Bn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return a.jsx(Mf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Mf=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,l=kt(Bn,n),c=f.useRef(null),u=Ye(t,c);return vf(),a.jsxs(a.Fragment,{children:[a.jsx(el,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:a.jsx(Di,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":ol(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(yw,{titleId:l.titleId}),a.jsx(_w,{contentRef:c,descriptionId:l.descriptionId})]})]})}),rl="DialogTitle",Df=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(rl,n);return a.jsx(He.h2,{id:o.titleId,...r,ref:t})});Df.displayName=rl;var Ff="DialogDescription",Uf=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(Ff,n);return a.jsx(He.p,{id:o.descriptionId,...r,ref:t})});Uf.displayName=Ff;var zf="DialogClose",Bf=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=kt(zf,n);return a.jsx(He.button,{type:"button",...r,ref:t,onClick:be(e.onClick,()=>o.onOpenChange(!1))})});Bf.displayName=zf;function ol(e){return e?"open":"closed"}var $f="DialogTitleWarning",[Kj,Hf]=ty($f,{contentName:Bn,titleName:rl,docsSlug:"dialog"}),yw=({titleId:e})=>{const t=Hf($f),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
47
48If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
49
50For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ww="DialogDescriptionWarning",_w=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Hf(ww).contentName}}.`;return f.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},io=Af,so=jf,ao=Of,lo=Lf,co=Df,Bi=Uf,ga=Bf;function Cw(e){const[t,n]=f.useState(void 0);return _n(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,l=u.blockSize}else s=e.offsetWidth,l=e.offsetHeight;n({width:s,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Sw=["top","right","bottom","left"],Cn=Math.min,ut=Math.max,fi=Math.round,$o=Math.floor,Dt=e=>({x:e,y:e}
50),Ew={left:"right",right:"left",bottom:"top",top:"bottom"};function ba(e,t,n){return ut(e,Cn(t,n))}function Zt(e,t){return typeof e=="function"?e(t):e}function Qt(e){return e.split("-")[0]}function yr(e){return e.split("-")[1]}function il(e){return e==="x"?"y":"x"}function sl(e){return e==="y"?"height":"width"}function Lt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function al(e){return il(Lt(e))}function kw(e,t,n){n===void 0&&(n=!1);const r=yr(e),o=al(e),i=sl(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=pi(s)),[s,pi(s)]}function Iw(e){const t=pi(e);return[xa(e),t,xa(t)]}function xa(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Wc=["left","right"],qc=["right","left"],Nw=["top","bottom"],Tw=["bottom","top"];function Aw(e,t,n){switch(e){case"top":case"bottom":return n?t?qc:Wc:t?Wc:qc;case"left":case"right":return t?Nw:Tw;default:return[]}}function Pw(e,t,n,r){const o=yr(e);let i=Aw(Qt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(xa)))),i}function pi(e){const t=Qt(e);return Ew[t]+e.slice(t.length)}function Rw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vf(e){return typeof e!="number"?Rw(e):{top:e,right:e,bottom:e,left:e}}function mi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Gc(e,t,n){let{reference:r,floating:o}=e;const i=Lt(t),s=al(t),l=sl(s),c=Qt(t),u=i==="y",d=r.x+r.width/2-o.width/2,h=r.y+r.height/2-o.height/2,p=r[l]/2-o[l]/2;let m;switch(c){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-o.width,y:h};break;default:m={x:r.x,y:r.y}}switch(yr(t)){case"start":m[s]-=p*(n&&u?-1:1);break;case"end":m[s]+=p*(n&&u?-1:1);break}return m}async function jw(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:p=!1,padding:m=0}=Zt(t,e),g=Vf(m),v=l[p?h==="floating"?"reference":"floating":h],x=mi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),E=h==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),k=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},I=mi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:y,strategy:c}):E);return{top:(x.top-I.top+g.top)/k.y,bottom:(I.bottom-x.bottom+g.bottom)/k.y,left:(x.left-I.left+g.left)/k.x,right:(I.right-x.right+g.right)/k.x}}const Ow=50,Lw=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,l=s.detectOverflow?s:{...s,detectOverflow:jw},c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:h}=Gc(u,r,c),p=r,m=0;const g={};for(let b=0;b<i.length;b++){const v=i[b];if(!v)continue;const{name:x,fn:E}=v,{x:y,y:k,data:I,reset:C}=await E({x:d,y:h,initialPlacement:r,placement:p,strategy:o,middlewareData:g,rects:u,platform:l,elements:{reference:e,floating:t}});d=y??d,h=k??h,g[x]={...g[x],...I},C&&m<Ow&&(m++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:h}=Gc(u,p,c)),b=-1)}return{x:d,y:h,placement:p,strategy:o,middlewareData:g}},Mw=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Zt(e,t)||{};if(u==null)return{};const h=Vf(d),p={x:n,y:r},m=al(o),g=sl(m),b=await s.getDimensions(u),v=m==="y",x=v?"top":"left",E=v?"bottom":"right",y=v?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[m]-p[m]-i.floating[g],I=p[m]-i.reference[m],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let A=C?C[y]:0;
50(!A||!await(s.isElement==null?void 0:s.isElement(C)))&&(A=l.floating[y]||i.floating[g]);const T=k/2-I/2,L=A/2-b[g]/2-1,D=Cn(h[x],L),S=Cn(h[E],L),j=D,P=A-b[g]-S,M=A/2-b[g]/2+T,_=ba(j,M,P),R=!c.arrow&&yr(o)!=null&&M!==_&&i.reference[g]/2-(M<j?D:S)-b[g]/2<0,O=R?M<j?M-j:M-P:0;return{[m]:p[m]+O,data:{[m]:_,centerOffset:M-_-O,...R&&{alignmentOffset:O}},reset:R}}}),Dw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:b=!0,...v}=Zt(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=Qt(o),E=Lt(l),y=Qt(l)===l,k=await(c.isRTL==null?void 0:c.isRTL(u.floating)),I=p||(y||!b?[pi(l)]:Iw(l)),C=g!=="none";!p&&C&&I.push(...Pw(l,b,g,k));const A=[l,...I],T=await c.detectOverflow(t,v),L=[];let D=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&L.push(T[x]),h){const M=kw(o,s,k);L.push(T[M[0]],T[M[1]])}if(D=[...D,{placement:o,overflows:L}],!L.every(M=>M<=0)){var S,j;const M=(((S=i.flip)==null?void 0:S.index)||0)+1,_=A[M];if(_&&(!(h==="alignment"?E!==Lt(_):!1)||D.every(U=>Lt(U.placement)===E?U.overflows[0]>0:!0)))return{data:{index:M,overflows:D},reset:{placement:_}};let R=(j=D.filter(O=>O.overflows[0]<=0).sort((O,U)=>O.overflows[1]-U.overflows[1])[0])==null?void 0:j.placement;if(!R)switch(m){case"bestFit":{var P;const O=(P=D.filter(U=>{if(C){const $=Lt(U.placement);return $===E||$==="y"}return!0}).map(U=>[U.placement,U.overflows.filter($=>$>0).reduce(($,w)=>$+w,0)]).sort((U,$)=>U[1]-$[1])[0])==null?void 0:P[0];O&&(R=O);break}case"initialPlacement":R=l;break}if(o!==R)return{reset:{placement:R}}}return{}}}};function Kc(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Xc(e){return Sw.some(t=>e[t]>=0)}const Fw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=Zt(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),l=Kc(s,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:Xc(l)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),l=Kc(s,n.floating);return{data:{escapedOffsets:l,escaped:Xc(l)}}}default:return{}}}}},Wf=new Set(["left","top"]);async function Uw(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Qt(n),l=yr(n),c=Lt(n)==="y",u=Wf.has(s)?-1:1,d=i&&c?-1:1,h=Zt(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:g}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof g=="number"&&(m=l==="end"?g*-1:g),c?{x:m*d,y:p*u}:{x:p*u,y:m*d}}const zw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:l}=t,c=await Uw(t,e);return s===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:s}}}}},Bw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:l=!1,limiter:c={fn:x=>{let{x:E,y}=x;return{x:E,y}}},...u}=Zt(e,t),d={x:n,y:r},h=await i.detectOverflow(t,u),p=Lt(Qt(o)),m=il(p);let g=d[m],b=d[p];if(s){const x=m==="y"?"top":"left",E=m==="y"?"bottom":"right",y=g+h[x],k=g-h[E];g=ba(y,g,k)}if(l){const x=p==="y"?"top":"left",E=p==="y"?"bottom":"right",y=b+h[x],k=b-h[E];b=ba(y,b,k)}const v=c.fn({...t,[m]:g,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[p]:l}}}}}},$w=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Zt(e,t),d={x:n,y:r},h=Lt(o),p=il(h);let m=d[p],g=d[h];const b=Zt(l,t),v=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(c){const y=p==="y"?"height":"width",k=i.reference[p]-i.floating[y]+v.mainAxis,I=i.reference[p]+i.reference[y]-v.mainAxis;m<k?m=k:m>I&&(m=I)}if(u){var x,E;const y=p==="y"?"width":"height",k=Wf.has(Qt(o)),I=i.reference[h]-i.floating[y]+(k&&((x=s.offset)==null?void 0:x[h])||0)+(k?0:v.crossAxis),C=i.reference[h]+i.reference[y]+(k?0:((E=s.offset)==null?void 0:E[h])||0)-(k?v.crossAxis:0);g<I?g=I:g>C&&(g=C)}return{[p]:m,[h]:g}}}},Hw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:l}=t,{apply:c=()=>{},...u}
50=Zt(e,t),d=await s.detectOverflow(t,u),h=Qt(o),p=yr(o),m=Lt(o)==="y",{width:g,height:b}=i.floating;let v,x;h==="top"||h==="bottom"?(v=h,x=p===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(x=h,v=p==="end"?"top":"bottom");const E=b-d.top-d.bottom,y=g-d.left-d.right,k=Cn(b-d[v],E),I=Cn(g-d[x],y),C=!t.middlewareData.shift;let A=k,T=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=E),C&&!p){const D=ut(d.left,0),S=ut(d.right,0),j=ut(d.top,0),P=ut(d.bottom,0);m?T=g-2*(D!==0||S!==0?D+S:ut(d.left,d.right)):A=b-2*(j!==0||P!==0?j+P:ut(d.top,d.bottom))}await c({...t,availableWidth:T,availableHeight:A});const L=await s.getDimensions(l.floating);return g!==L.width||b!==L.height?{reset:{rects:!0}}:{}}}};function $i(){return typeof window<"u"}function wr(e){return qf(e)?(e.nodeName||"").toLowerCase():"#document"}function ft(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $t(e){var t;return(t=(qf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qf(e){return $i()?e instanceof Node||e instanceof ft(e).Node:!1}function Ct(e){return $i()?e instanceof Element||e instanceof ft(e).Element:!1}function rn(e){return $i()?e instanceof HTMLElement||e instanceof ft(e).HTMLElement:!1}function Yc(e){return!$i()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ft(e).ShadowRoot}function uo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=St(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Vw(e){return/^(table|td|th)$/.test(wr(e))}function Hi(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Ww=/transform|translate|scale|rotate|perspective|filter/,qw=/paint|layout|strict|content/,On=e=>!!e&&e!=="none";let Cs;function ll(e){const t=Ct(e)?St(e):e;return On(t.transform)||On(t.translate)||On(t.scale)||On(t.rotate)||On(t.perspective)||!cl()&&(On(t.backdropFilter)||On(t.filter))||Ww.test(t.willChange||"")||qw.test(t.contain||"")}function Gw(e){let t=Sn(e);for(;rn(t)&&!mr(t);){if(ll(t))return t;if(Hi(t))return null;t=Sn(t)}return null}function cl(){return Cs==null&&(Cs=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Cs}function mr(e){return/^(html|body|#document)$/.test(wr(e))}function St(e){return ft(e).getComputedStyle(e)}function Vi(e){return Ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sn(e){if(wr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Yc(e)&&e.host||$t(e);return Yc(t)?t.host:t}function Gf(e){const t=Sn(e);return mr(t)?e.ownerDocument?e.ownerDocument.body:e.body:rn(t)&&uo(t)?t:Gf(t)}function Hr(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Gf(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=ft(o);if(i){const l=va(s);return t.concat(s,s.visualViewport||[],uo(o)?o:[],l&&n?Hr(l):[])}else return t.concat(o,Hr(o,[],n))}function va(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kf(e){const t=St(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=rn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,l=fi(n)!==i||fi(r)!==s;return l&&(n=i,r=s),{width:n,height:r,$:l}}function ul(e){return Ct(e)?e:e.contextElement}function sr(e){const t=ul(e);if(!rn(t))return Dt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Kf(t);let s=(i?fi(n.width):n.width)/r,l=(i?fi(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Kw=Dt(0);function Xf(e){const t=ft(e);return!cl()||!t.visualViewport?Kw:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xw(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ft(e)?!1:t}function $n(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ul(e);let s=Dt(1);t&&(r?Ct(r)&&(s=sr(r)):s=sr(e));const l=Xw(i,n,r)?Xf(i):Dt(0);let c=(o.left+l.x)/s.x,u=(o.top+l.y)/s.y,d=o.width/s.x,h=o.height/s.y;if(i){const p=ft(i),m=r&&Ct(r)?ft(r):r;let g=p,b=va(g);for(;b&&r&&m!==g;){const v=sr(b),x=b.getBoundingClientRect(),E=St(b),y=x.left+(b.clientLeft+parseFloat(E.paddingLeft))*v.x,k=x.top+(b.clientTop+parseFloat(E.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,h*=v.y,c+=y,u+=k,g=ft(b),b=va(g)}}return mi({width:d,height:h,x:c,y:u})}function Wi(e,t){const n=Vi(e).scrollLeft;return t?t.left+n:$n($t(e)).left+n}function Yf(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Wi(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function Yw(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=$t(r),l=t?Hi(t.floating):!1;if(r===s||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=Dt(1);const d=Dt(0),h=rn(r);if((h||!h&&!i)&&((wr(r)!=="body"||uo(s))&&(c=Vi(r)),h)){const m=$n(r);u=sr(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=s&&!h&&!i?Yf(s,c):Dt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function Jw(e){return Array.from(e.getClientRects())}function Zw(e){const t=$t(e),n=Vi(e),r=e.ownerDocument.body,o=ut(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ut(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Wi(e);const l=-n.scrollTop;return St(r).direction==="rtl"&&(s+=ut(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:l}}const Jc=25;
50function Qw(e,t){const n=ft(e),r=$t(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,l=0,c=0;if(o){i=o.width,s=o.height;const d=cl();(!d||d&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}const u=Wi(r);if(u<=0){const d=r.ownerDocument,h=d.body,p=getComputedStyle(h),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(r.clientWidth-h.clientWidth-m);g<=Jc&&(i-=g)}else u<=Jc&&(i+=u);return{width:i,height:s,x:l,y:c}}function e0(e,t){const n=$n(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=rn(e)?sr(e):Dt(1),s=e.clientWidth*i.x,l=e.clientHeight*i.y,c=o*i.x,u=r*i.y;return{width:s,height:l,x:c,y:u}}function Zc(e,t,n){let r;if(t==="viewport")r=Qw(e,n);else if(t==="document")r=Zw($t(e));else if(Ct(t))r=e0(t,n);else{const o=Xf(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return mi(r)}function Jf(e,t){const n=Sn(e);return n===t||!Ct(n)||mr(n)?!1:St(n).position==="fixed"||Jf(n,t)}function t0(e,t){const n=t.get(e);if(n)return n;let r=Hr(e,[],!1).filter(l=>Ct(l)&&wr(l)!=="body"),o=null;const i=St(e).position==="fixed";let s=i?Sn(e):e;for(;Ct(s)&&!mr(s);){const l=St(s),c=ll(s);!c&&l.position==="fixed"&&(o=null),(i?!c&&!o:!c&&l.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||uo(s)&&!c&&Jf(e,s))?r=r.filter(d=>d!==s):o=l,s=Sn(s)}return t.set(e,r),r}function n0(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Hi(t)?[]:t0(t,this._c):[].concat(n),r],l=Zc(t,s[0],o);let c=l.top,u=l.right,d=l.bottom,h=l.left;for(let p=1;p<s.length;p++){const m=Zc(t,s[p],o);c=ut(m.top,c),u=Cn(m.right,u),d=Cn(m.bottom,d),h=ut(m.left,h)}return{width:u-h,height:d-c,x:h,y:c}}function r0(e){const{width:t,height:n}=Kf(e);return{width:t,height:n}}function o0(e,t,n){const r=rn(t),o=$t(t),i=n==="fixed",s=$n(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=Dt(0);function u(){c.x=Wi(o)}if(r||!r&&!i)if((wr(t)!=="body"||uo(o))&&(l=Vi(t)),r){const m=$n(t,!0,i,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else o&&u();i&&!r&&o&&u();const d=o&&!r&&!i?Yf(o,l):Dt(0),h=s.left+l.scrollLeft-c.x-d.x,p=s.top+l.scrollTop-c.y-d.y;return{x:h,y:p,width:s.width,height:s.height}}function Ss(e){return St(e).position==="static"}function Qc(e,t){if(!rn(e)||St(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return $t(e)===n&&(n=n.ownerDocument.body),n}function Zf(e,t){const n=ft(e);if(Hi(e))return n;if(!rn(e)){let o=Sn(e);for(;o&&!mr(o);){if(Ct(o)&&!Ss(o))return o;o=Sn(o)}return n}let r=Qc(e,t);for(;r&&Vw(r)&&Ss(r);)r=Qc(r,t);return r&&mr(r)&&Ss(r)&&!ll(r)?n:r||Gw(e)||n}const i0=async function(e){const t=this.getOffsetParent||Zf,n=this.getDimensions,r=await n(e.floating);return{reference:o0(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function s0(e){return St(e).direction==="rtl"}const a0={convertOffsetParentRelativeRectToViewportRelativeRect:Yw,getDocumentElement:$t,getClippingRect:n0,getOffsetParent:Zf,getElementRects:i0,getClientRects:Jw,getDimensions:r0,getScale:sr,isElement:Ct,isRTL:s0};function Qf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function l0(e,t){let n=null,r;const o=$t(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function s(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:h,width:p,height:m}=u;if(l||t(),!p||!m)return;const g=$o(h),b=$o(o.clientWidth-(d+p)),v=$o(o.clientHeight-(h+m)),x=$o(d),y={rootMargin:-g+"px "+-b+"px "+-v+"px "+-x+"px",threshold:ut(0,Cn(1,c))||1};let k=!0;function I(C){const A=C[0].intersectionRatio;if(A!==c){if(!k)return s();A?s(!1,A):r=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!Qf(u,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(I,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(I,y)}n.observe(e)}return s(!0),i}function c0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=ul(e),d=o||i?[...u?Hr(u):[],...t?Hr(t):[]]:[];d.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const h=u&&l?l0(u,n):null;let p=-1,m=null;s&&(m=new ResizeObserver(x=>{let[E]=x;E&&E.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),n()}),u&&!c&&m.observe(u),t&&m.observe(t));let g,b=c?$n(e):null;c&&v();function v(){const x=$n(e);b&&!Qf(b,x)&&n(),b=x,g=requestAnimationFrame(v)}return n(),()=>{var x;d.forEach(E=>{o&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),h?.(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(g)}}const u0=zw,d0=Bw,h0=Dw,f0=Hw,p0=Fw,eu=Mw,m0=$w,g0=(e,t,n)=>{const r=new Map,o={platform:a0,...n},i={...o.platform,_c:r};return Lw(e,t,{...o,platform:i})};var b0=typeof document<"u",x0=function(){},ei=b0?f.useLayoutEffect:x0;function gi(e,t){if(e===t)return!0;
50if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!gi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!gi(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ep(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function tu(e,t){const n=ep(e);return Math.round(t*n)/n}function Es(e){const t=f.useRef(e);return ei(()=>{t.current=e}),t}function v0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=f.useState(r);gi(p,r)||m(r);const[g,b]=f.useState(null),[v,x]=f.useState(null),E=f.useCallback(U=>{U!==C.current&&(C.current=U,b(U))},[]),y=f.useCallback(U=>{U!==A.current&&(A.current=U,x(U))},[]),k=i||g,I=s||v,C=f.useRef(null),A=f.useRef(null),T=f.useRef(d),L=c!=null,D=Es(c),S=Es(o),j=Es(u),P=f.useCallback(()=>{if(!C.current||!A.current)return;const U={placement:t,strategy:n,middleware:p};S.current&&(U.platform=S.current),g0(C.current,A.current,U).then($=>{const w={...$,isPositioned:j.current!==!1};M.current&&!gi(T.current,w)&&(T.current=w,fh.flushSync(()=>{h(w)}))})},[p,t,n,S,j]);ei(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(U=>({...U,isPositioned:!1})))},[u]);const M=f.useRef(!1);ei(()=>(M.current=!0,()=>{M.current=!1}),[]),ei(()=>{if(k&&(C.current=k),I&&(A.current=I),k&&I){if(D.current)return D.current(k,I,P);P()}},[k,I,P,D,L]);const _=f.useMemo(()=>({reference:C,floating:A,setReference:E,setFloating:y}),[E,y]),R=f.useMemo(()=>({reference:k,floating:I}),[k,I]),O=f.useMemo(()=>{const U={position:n,left:0,top:0};if(!R.floating)return U;const $=tu(R.floating,d.x),w=tu(R.floating,d.y);return l?{...U,transform:"translate("+$+"px, "+w+"px)",...ep(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:w}},[n,l,R.floating,d.x,d.y]);return f.useMemo(()=>({...d,update:P,refs:_,elements:R,floatingStyles:O}),[d,P,_,R,O])}const y0=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?eu({element:r.current,padding:o}).fn(n):{}:r?eu({element:r,padding:o}).fn(n):{}}}},w0=(e,t)=>{const n=u0(e);return{name:n.name,fn:n.fn,options:[e,t]}},_0=(e,t)=>{const n=d0(e);return{name:n.name,fn:n.fn,options:[e,t]}},C0=(e,t)=>({fn:m0(e).fn,options:[e,t]}),S0=(e,t)=>{const n=h0(e);return{name:n.name,fn:n.fn,options:[e,t]}},E0=(e,t)=>{const n=f0(e);return{name:n.name,fn:n.fn,options:[e,t]}},k0=(e,t)=>{const n=p0(e);return{name:n.name,fn:n.fn,options:[e,t]}},I0=(e,t)=>{const n=y0(e);return{name:n.name,fn:n.fn,options:[e,t]}};var N0="Arrow",tp=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return a.jsx(He.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});tp.displayName=N0;var T0=tp,dl="Popper",[np,qi]=qn(dl),[A0,rp]=np(dl),op=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return a.jsx(A0,{scope:t,anchor:r,onAnchorChange:o,children:n})};op.displayName=dl;var ip="PopperAnchor",sp=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=rp(ip,n),s=f.useRef(null),l=Ye(t,s),c=f.useRef(null);return f.useEffect(()=>{const u=c.current;c.current=r?.current||s.current,u!==c.current&&i.onAnchorChange(c.current)}),r?null:a.jsx(He.div,{...o,ref:l})});sp.displayName=ip;var hl="PopperContent",[P0,R0]=np(hl),ap=f.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...b}=e,v=rp(hl,n),[x,E]=f.useState(null),y=Ye(t,pe=>E(pe)),[k,I]=f.useState(null),C=Cw(k),A=C?.width??0,T=C?.height??0,L=r+(i!=="center"?"-"+i:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},S=Array.isArray(u)?u:[u],j=S.length>0,P={padding:D,boundary:S.filter(O0),altBoundary:j},{refs:M,floatingStyles:_,placement:R,isPositioned:O,middlewareData:U}=v0({strategy:"fixed",placement:L,whileElementsMounted:(...pe)=>c0(...pe,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[w0({mainAxis:o+T,alignmentAxis:s}),c&&_0({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?C0():void 0,...P}),c&&S0({...P}),E0({...P,apply:({elements:pe,rects:ye,availableWidth:X,availableHeight:Re})=>{const{width:Ie,height:oe}=ye.reference,xe=pe.floating.style;xe.setProperty("--radix-popper-available-width",`${X}px`),xe.setProperty("--radix-popper-available-height",`${Re}px`),xe.setProperty("--radix-popper-anchor-width",`${Ie}px`),xe.setProperty("--radix-popper-anchor-height",`${oe}px`)}}),k&&I0({element:k,padding:l}),L0({arrowWidth:A,arrowHeight:T}),p&&k0({strategy:"referenceHidden",...P})]}),[$,w]=up(R),te=Jt(g);_n(()=>{O&&te?.()},[O,te]);const K=U.arrow?.x,N=U.arrow?.y,fe=U.arrow?.centerOffset!==0,[re,Y]=f.useState();return _n(()=>{x&&Y(window.getComputedStyle(x).zIndex)},[x]),a.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:O?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(P0,{scope:n,placedSide:$,onArrowChange:I,arrowX:K,arrowY:N,shouldHideArrow:fe,children:a.jsx(He.div,{"data-side":$,"data-align":w,...b,ref:y,style:{...b.style,animation:O?void 0:"none"}})})})});ap.displayName=hl;var lp="PopperArrow",j0={top:"bottom",right:"left",bottom:"top",left:"r
50ight"},cp=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=R0(lp,r),s=j0[i.placedSide];return a.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:a.jsx(T0,{...o,ref:n,style:{...o.style,display:"block"}})})});cp.displayName=lp;function O0(e){return e!==null}var L0=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,l=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,d]=up(n),h={start:"0%",center:"50%",end:"100%"}[d],p=(o.arrow?.x??0)+l/2,m=(o.arrow?.y??0)+c/2;let g="",b="";return u==="bottom"?(g=s?h:`${p}px`,b=`${-c}px`):u==="top"?(g=s?h:`${p}px`,b=`${r.floating.height+c}px`):u==="right"?(g=`${-c}px`,b=s?h:`${m}px`):u==="left"&&(g=`${r.floating.width+c}px`,b=s?h:`${m}px`),{data:{x:g,y:b}}}});function up(e){const[t,n="center"]=e.split("-");return[t,n]}var dp=op,hp=sp,fp=ap,pp=cp,ks="rovingFocusGroup.onEntryFocus",M0={bubbles:!1,cancelable:!0},ho="RovingFocusGroup",[ya,mp,D0]=pf(ho),[F0,gp]=qn(ho,[D0]),[U0,z0]=F0(ho),bp=f.forwardRef((e,t)=>a.jsx(ya.Provider,{scope:e.__scopeRovingFocusGroup,children:a.jsx(ya.Slot,{scope:e.__scopeRovingFocusGroup,children:a.jsx(B0,{...e,ref:t})})}));bp.displayName=ho;var B0=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,p=f.useRef(null),m=Ye(t,p),g=mf(i),[b,v]=Mi({prop:s,defaultProp:l??null,onChange:c,caller:ho}),[x,E]=f.useState(!1),y=Jt(u),k=mp(n),I=f.useRef(!1),[C,A]=f.useState(0);return f.useEffect(()=>{const T=p.current;if(T)return T.addEventListener(ks,y),()=>T.removeEventListener(ks,y)},[y]),a.jsx(U0,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:b,onItemFocus:f.useCallback(T=>v(T),[v]),onItemShiftTab:f.useCallback(()=>E(!0),[]),onFocusableItemAdd:f.useCallback(()=>A(T=>T+1),[]),onFocusableItemRemove:f.useCallback(()=>A(T=>T-1),[]),children:a.jsx(He.div,{tabIndex:x||C===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:be(e.onMouseDown,()=>{I.current=!0}),onFocus:be(e.onFocus,T=>{const L=!I.current;if(T.target===T.currentTarget&&L&&!x){const D=new CustomEvent(ks,M0);if(T.currentTarget.dispatchEvent(D),!D.defaultPrevented){const S=k().filter(R=>R.focusable),j=S.find(R=>R.active),P=S.find(R=>R.id===b),_=[j,P,...S].filter(Boolean).map(R=>R.ref.current);yp(_,d)}}I.current=!1}),onBlur:be(e.onBlur,()=>E(!1))})})}),xp="RovingFocusGroupItem",vp=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,children:s,...l}=e,c=Dn(),u=i||c,d=z0(xp,n),h=d.currentTabStopId===u,p=mp(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:b}=d;return f.useEffect(()=>{if(r)return m(),()=>g()}
50,[r,m,g]),a.jsx(ya.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:a.jsx(He.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:be(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:be(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:be(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=V0(v,d.orientation,d.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let y=p().filter(k=>k.focusable).map(k=>k.ref.current);if(x==="last")y.reverse();else if(x==="prev"||x==="next"){x==="prev"&&y.reverse();const k=y.indexOf(v.currentTarget);y=d.loop?W0(y,k+1):y.slice(k+1)}setTimeout(()=>yp(y))}}),children:typeof s=="function"?s({isCurrentTabStop:h,hasTabStop:b!=null}):s})})});vp.displayName=xp;var $0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function H0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function V0(e,t,n){const r=H0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $0[r]}function yp(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function W0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var q0=bp,G0=vp,wa=["Enter"," "],K0=["ArrowDown","PageUp","Home"],wp=["ArrowUp","PageDown","End"],X0=[...K0,...wp],Y0={ltr:[...wa,"ArrowRight"],rtl:[...wa,"ArrowLeft"]},J0={ltr:["ArrowLeft"],rtl:["ArrowRight"]},fo="Menu",[Vr,Z0,Q0]=pf(fo),[Gn,_p]=qn(fo,[Q0,qi,gp]),Gi=qi(),Cp=gp(),[e4,Kn]=Gn(fo),[t4,po]=Gn(fo),Sp=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,l=Gi(t),[c,u]=f.useState(null),d=f.useRef(!1),h=Jt(i),p=mf(o);return f.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),a.jsx(dp,{...l,children:a.jsx(e4,{scope:t,open:n,onOpenChange:h,content:c,onContentChange:u,children:a.jsx(t4,{scope:t,onClose:f.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:d,dir:p,modal:s,children:r})})})};Sp.displayName=fo;var n4="MenuAnchor",fl=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gi(n);return a.jsx(hp,{...o,...r,ref:t})});fl.displayName=n4;var pl="MenuPortal",[r4,Ep]=Gn(pl,{forceMount:void 0}),kp=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Kn(pl,t);return a.jsx(r4,{scope:t,forceMount:n,children:a.jsx(Bt,{present:n||i.open,children:a.jsx(Fi,{asChild:!0,container:o,children:r})})})};kp.displayName=pl;var bt="MenuContent",[o4,ml]=Gn(bt),Ip=f.forwardRef((e,t)=>{const n=Ep(bt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Kn(bt,e.__scopeMenu),s=po(bt,e.__scopeMenu);return a.jsx(Vr.Provider,{scope:e.__scopeMenu,children:a.jsx(Bt,{present:r||i.open,children:a.jsx(Vr.Slot,{scope:e.__scopeMenu,children:s.modal?a.jsx(i4,{...o,ref:t}):a.jsx(s4,{...o,ref:t})})})})}),i4=f.forwardRef((e,t)=>{const n=Kn(bt,e.__scopeMenu),r=f.useRef(null),o=Ye(t,r);return f.useEffect(()=>{const i=r.current;if(i)return Nf(i)},[]),a.jsx(gl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:be(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),s4=f.forwardRef((e,t)=>{const n=Kn(bt,e.__scopeMenu);return a.jsx(gl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),a4=pr("MenuContent.ScrollLock"),gl=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:m,disableOutsideScroll:g,...b}=e,v=Kn(bt,n),x=po(bt,n),E=Gi(n),y=Cp(n),k=Z0(n),[I,C]=f.useState(null),A=f.useRef(null),T=Ye(t,A,v.onContentChange),L=f.useRef(0),D=f.useRef(""),S=f.useRef(0),j=f.useRef(null),P=f.useRef("right"),M=f.useRef(0),_=g?tl:f.Fragment,R=g?{as:a4,allowPinchZoom:!0}:void 0,O=$=>{const w=D.current+$,te=k().filter(pe=>!pe.disabled),K=document.activeElement,N=te.find(pe=>pe.ref.current===K)?.textValue,fe=te.map(pe=>pe.textValue),re=v4(fe,w,N),Y=te.find(pe=>pe.textValue===re)?.ref.current;(function pe(ye){D.current=ye,window.clearTimeout(L.current),ye!==""&&(L.current=window.setTimeout(()=>pe(""),1e3))})(w),Y&&setTimeout(()=>Y.focus())};f.useEffect(()=>()=>window.clearTimeout(L.current),[]),vf();const U=f.useCallback($=>P.current===j.current?.side&&w4($,j.current?.area),[]);return a.jsx(o4,{scope:n,searchRef:D,onItemEnter:f.useCallback($=>{U($)&&$.preventDefault()},[U]),onItemLeave:f.useCallback($=>{U($)||(A.current?.focus(),C(null))},[U]),onTriggerLeave:f.useCallback($=>{U($)&&$.preventDefault()},[U]),pointerGraceTimerRef:S,onPointerGraceIntentChange:f.useCallback($=>{j.current=$},[]),children:a.jsx(_,{...R,children:a.jsx(el,{asChild:!0,trapped:o,onMountAutoFocus:be(i,$=>{$.preventDefault(),A.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:a.jsx(Di,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:m,children:a.jsx(q0,{asChild:!0,...y,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:I,onCurrentTabStopIdChange:C,onEntryFocus:be(c,$=>{x.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsx(fp,{role:"menu","aria-orientation":"vertical","data-state":Hp(v.open),"data-radix-menu-content":"",dir:x.dir,...E,...b,ref:T,style:{outline:"none",...b.style},onKeyDown:be(b.onKeyDown,$=>{const te=$.target.closest("[data-radix-menu-content]")===$.currentTarget,K=$.ctrlKey||$.altKey||$.metaKey,N=$.key.length===1;te&&($.key==="Tab"&&$.preventDefault(),!K&&N&&O($.key));const fe=A.current;if($.target!==fe||!X0.includes($.key))return;$.preventDefault();const Y=k().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);wp.includes($.key)&&Y.reverse(),b4(Y)}),onBlur:be(e.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(L.current),D.current="")}),onPointerMove:be(e.onPointerMove,Wr($=>{const w=$.target,te=M.current!==$.clientX;if($.currentTarget.contains(w)&&te){const K=$.clientX>M.current?"right":"left";P.current=K,M.current=$.clientX}}))})})})})})})});Ip.displayName=bt;var l4="MenuGroup",bl=f.forwardRef((e,t)=>
50{const{__scopeMenu:n,...r}=e;return a.jsx(He.div,{role:"group",...r,ref:t})});bl.displayName=l4;var c4="MenuLabel",Np=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(He.div,{...r,ref:t})});Np.displayName=c4;var bi="MenuItem",nu="menu.itemSelect",Ki=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=f.useRef(null),s=po(bi,e.__scopeMenu),l=ml(bi,e.__scopeMenu),c=Ye(t,i),u=f.useRef(!1),d=()=>{const h=i.current;if(!n&&h){const p=new CustomEvent(nu,{bubbles:!0,cancelable:!0});h.addEventListener(nu,m=>r?.(m),{once:!0}),hf(h,p),p.defaultPrevented?u.current=!1:s.onClose()}};return a.jsx(Tp,{...o,ref:c,disabled:n,onClick:be(e.onClick,d),onPointerDown:h=>{e.onPointerDown?.(h),u.current=!0},onPointerUp:be(e.onPointerUp,h=>{u.current||h.currentTarget?.click()}),onKeyDown:be(e.onKeyDown,h=>{const p=l.searchRef.current!=="";n||p&&h.key===" "||wa.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Ki.displayName=bi;var Tp=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,s=ml(bi,n),l=Cp(n),c=f.useRef(null),u=Ye(t,c),[d,h]=f.useState(!1),[p,m]=f.useState("");return f.useEffect(()=>{const g=c.current;g&&m((g.textContent??"").trim())},[i.children]),a.jsx(Vr.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:a.jsx(G0,{asChild:!0,...l,focusable:!r,children:a.jsx(He.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:be(e.onPointerMove,Wr(g=>{r?s.onItemLeave(g):(s.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:be(e.onPointerLeave,Wr(g=>s.onItemLeave(g))),onFocus:be(e.onFocus,()=>h(!0)),onBlur:be(e.onBlur,()=>h(!1))})})})}),u4="MenuCheckboxItem",Ap=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return a.jsx(Lp,{scope:e.__scopeMenu,checked:n,children:a.jsx(Ki,{role:"menuitemcheckbox","aria-checked":xi(n)?"mixed":n,...o,ref:t,"data-state":vl(n),onSelect:be(o.onSelect,()=>r?.(xi(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ap.displayName=u4;var Pp="MenuRadioGroup",[d4,h4]=Gn(Pp,{value:void 0,onValueChange:()=>{}}),Rp=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Jt(r);return a.jsx(d4,{scope:e.__scopeMenu,value:n,onValueChange:i,children:a.jsx(bl,{...o,ref:t})})});Rp.displayName=Pp;var jp="MenuRadioItem",Op=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=h4(jp,e.__scopeMenu),i=n===o.value;return a.jsx(Lp,{scope:e.__scopeMenu,checked:i,children:a.jsx(Ki,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":vl(i),onSelect:be(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Op.displayName=jp;var xl="MenuItemIndicator",[Lp,f4]=Gn(xl,{checked:!1}),Mp=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=f4(xl,n);return a.jsx(Bt,{present:r||xi(i.checked)||i.checked===!0,children:a.jsx(He.span,{...o,ref:t,"data-state":vl(i.checked)})})});Mp.displayName=xl;var p4="MenuSeparator",Dp=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return a.jsx(He.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Dp.displayName=p4;var m4="MenuArrow",Fp=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gi(n);return a.jsx(pp,{...o,...r,ref:t})});Fp.displayName=m4;var g4="MenuSub",[Xj,Up]=Gn(g4),Or="MenuSubTrigger",zp=f.forwardRef((e,t)=>{const n=Kn(Or,e.__scopeMenu),r=po(Or,e.__scopeMenu),o=Up(Or,e.__scopeMenu),i=ml(Or,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>d,[d]),f.useEffect(()=>{const h=l.current;return()=>{window.clearTimeout(h),c(null)}},[l,c]),a.jsx(fl,{asChild:!0,...u,children:a.jsx(Tp,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Hp(n.open),...e,ref:Li(t,o.onTriggerChange),onClick:h=>{e.onClick?.(h),!(e.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:be(e.onPointerMove,Wr(h=>{i.onItemEnter(h),!h.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:be(e.onPointerLeave,Wr(h=>{d();const p=n.content?.getBoundingClientRect();if(p){const m=n.content?.dataset.side,g=m==="right",b=g?-5:5,v=p[g?"left"
50:"right"],x=p[g?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+b,y:h.clientY},{x:v,y:p.top},{x,y:p.top},{x,y:p.bottom},{x:v,y:p.bottom}],side:m}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:be(e.onKeyDown,h=>{const p=i.searchRef.current!=="";e.disabled||p&&h.key===" "||Y0[r.dir].includes(h.key)&&(n.onOpenChange(!0),n.content?.focus(),h.preventDefault())})})})});zp.displayName=Or;var Bp="MenuSubContent",$p=f.forwardRef((e,t)=>{const n=Ep(bt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Kn(bt,e.__scopeMenu),s=po(bt,e.__scopeMenu),l=Up(Bp,e.__scopeMenu),c=f.useRef(null),u=Ye(t,c);return a.jsx(Vr.Provider,{scope:e.__scopeMenu,children:a.jsx(Bt,{present:r||i.open,children:a.jsx(Vr.Slot,{scope:e.__scopeMenu,children:a.jsx(gl,{id:l.contentId,"aria-labelledby":l.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{s.isUsingKeyboardRef.current&&c.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:be(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:be(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:be(e.onKeyDown,d=>{const h=d.currentTarget.contains(d.target),p=J0[s.dir].includes(d.key);h&&p&&(i.onOpenChange(!1),l.trigger?.focus(),d.preventDefault())})})})})})});$p.displayName=Bp;function Hp(e){return e?"open":"closed"}function xi(e){return e==="indeterminate"}function vl(e){return xi(e)?"indeterminate":e?"checked":"unchecked"}function b4(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function x4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function v4(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=x4(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const c=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function y4(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const l=t[i],c=t[s],u=l.x,d=l.y,h=c.x,p=c.y;d>r!=p>r&&n<(h-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function w4(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return y4(n,t)}function Wr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var _4=Sp,C4=fl,S4=kp,E4=Ip,k4=bl,I4=Np,N4=Ki,T4=Ap,A4=Rp,P4=Op,R4=Mp,j4=Dp,O4=Fp,L4=zp,M4=$p,Xi="DropdownMenu",[D4]=qn(Xi,[_p]),tt=_p(),[F4,Vp]=D4(Xi),Wp=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:l=!0}=e,c=tt(t),u=f.useRef(null),[d,h]=Mi({prop:o,defaultProp:i??!1,onChange:s,caller:Xi});return a.jsx(F4,{scope:t,triggerId:Dn(),triggerRef:u,contentId:Dn(),open:d,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(p=>!p),[h]),modal:l,children:a.jsx(_4,{...c,open:d,onOpenChange:h,dir:r,modal:l,children:n})})};Wp.displayName=Xi;var qp="DropdownMenuTrigger",Gp=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Vp(qp,n),s=tt(n);return a.jsx(C4,{asChild:!0,...s,children:a.jsx(He.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Li(t,i.triggerRef),onPointerDown:be(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:be(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});Gp.displayName=qp;var U4="DropdownMenuPortal",Kp=e=>{const{__scopeDropdownMenu:t,...n}=e,r=tt(t);return a.jsx(S4,{...r,...n})};Kp.displayName=U4;var Xp="DropdownMenuContent",Yp=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vp(Xp,n),i=tt(n),s=f.useRef(!1);return a.jsx(E4,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...r,ref:t,onCloseAutoFocus:be(e.onCloseAutoFocus,l=>{s.current||o.triggerRef.current?.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:be(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Yp.displayName=Xp;var z4="DropdownMenuGroup",B4=f.forwardRef((e,t)=>
50{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(k4,{...o,...r,ref:t})});B4.displayName=z4;var $4="DropdownMenuLabel",Jp=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(I4,{...o,...r,ref:t})});Jp.displayName=$4;var H4="DropdownMenuItem",Zp=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(N4,{...o,...r,ref:t})});Zp.displayName=H4;var V4="DropdownMenuCheckboxItem",W4=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(T4,{...o,...r,ref:t})});W4.displayName=V4;var q4="DropdownMenuRadioGroup",G4=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(A4,{...o,...r,ref:t})});G4.displayName=q4;var K4="DropdownMenuRadioItem",X4=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(P4,{...o,...r,ref:t})});X4.displayName=K4;var Y4="DropdownMenuItemIndicator",J4=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(R4,{...o,...r,ref:t})});J4.displayName=Y4;var Z4="DropdownMenuSeparator",Qp=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(j4,{...o,...r,ref:t})});Qp.displayName=Z4;var Q4="DropdownMenuArrow",e6=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(O4,{...o,...r,ref:t})});e6.displayName=Q4;var t6="DropdownMenuSubTrigger",n6=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(L4,{...o,...r,ref:t})});n6.displayName=t6;var r6="DropdownMenuSubContent",o6=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=tt(n);return a.jsx(M4,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});o6.displayName=r6;var i6=Wp,s6=Gp,a6=Kp,em=Yp,tm=Jp,nm=Zp,rm=Qp,[Yi]=qn("Tooltip",[qi]),Ji=qi(),om="TooltipProvider",l6=700,_a="tooltip.open",[c6,yl]=Yi(om),im=e=>{const{__scopeTooltip:t,delayDuration:n=l6,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=f.useRef(!0),l=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(c6,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:f.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:i})};im.displayName=om;var qr="Tooltip",[u6,mo]=Yi(qr),sm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:l}=e,c=yl(qr,e.__scopeTooltip),u=Ji(t),[d,h]=f.useState(null),p=Dn(),m=f.useRef(0),g=s??c.disableHoverableContent,b=l??c.delayDuration,v=f.useRef(!1),[x,E]=Mi({prop:r,defaultProp:o??!1,onChange:A=>{A?(c.onOpen(),document.dispatchEvent(new CustomEvent(_a))):c.onClose(),i?.(A)},caller:qr}),y=f.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),k=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,E(!0)},[E]),I=f.useCallback(()=>{window.clearTimeout(m.current),m.current=0,E(!1)},[E]),C=f.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,E(!0),m.current=0},b)},[b,E]);return f.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),a.jsx(dp,{...u,children:a.jsx(u6,{scope:t,contentId:p,open:x,stateAttribute:y,trigger:d,onTriggerChange:h,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayedRef.current?C():k()},[c.isOpenDelayedRef,C,k]),onTriggerLeave:f.useCallback(()=>{g?I():(window.clearTimeout(m.current),m.current=0)},[I,g]),onOpen:k,onClose:I,disableHoverableContent:g,children:n})})};sm.displayName=qr;var Ca="TooltipTrigger",am=f.forwardRef((e,t)=>
50{const{__scopeTooltip:n,...r}=e,o=mo(Ca,n),i=yl(Ca,n),s=Ji(n),l=f.useRef(null),c=Ye(t,l,o.onTriggerChange),u=f.useRef(!1),d=f.useRef(!1),h=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(hp,{asChild:!0,...s,children:a.jsx(He.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:be(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:be(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:be(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:be(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:be(e.onBlur,o.onClose),onClick:be(e.onClick,o.onClose)})})});am.displayName=Ca;var wl="TooltipPortal",[d6,h6]=Yi(wl,{forceMount:void 0}),lm=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=mo(wl,t);return a.jsx(d6,{scope:t,forceMount:n,children:a.jsx(Bt,{present:n||i.open,children:a.jsx(Fi,{asChild:!0,container:o,children:r})})})};lm.displayName=wl;var gr="TooltipContent",cm=f.forwardRef((e,t)=>{const n=h6(gr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=mo(gr,e.__scopeTooltip);return a.jsx(Bt,{present:r||s.open,children:s.disableHoverableContent?a.jsx(um,{side:o,...i,ref:t}):a.jsx(f6,{side:o,...i,ref:t})})}),f6=f.forwardRef((e,t)=>{const n=mo(gr,e.__scopeTooltip),r=yl(gr,e.__scopeTooltip),o=f.useRef(null),i=Ye(t,o),[s,l]=f.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:h}=r,p=f.useCallback(()=>{l(null),h(!1)},[h]),m=f.useCallback((g,b)=>{const v=g.currentTarget,x={x:g.clientX,y:g.clientY},E=b6(x,v.getBoundingClientRect()),y=x6(x,E),k=v6(b.getBoundingClientRect()),I=w6([...y,...k]);l(I),h(!0)},[h]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(c&&d){const g=v=>m(v,d),b=v=>m(v,c);return c.addEventListener("pointerleave",g),d.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",b)}}},[c,d,m,p]),f.useEffect(()=>{if(s){const g=b=>{const v=b.target,x={x:b.clientX,y:b.clientY},E=c?.contains(v)||d?.contains(v),y=!y6(x,s);E?p():y&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,d,s,u,p]),a.jsx(um,{...e,ref:i})}),[p6,m6]=Yi(qr,{isInside:!1}),g6=Gv("TooltipContent"),um=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...l}=e,c=mo(gr,n),u=Ji(n),{onClose:d}=c;return f.useEffect(()=>(document.addEventListener(_a,d),()=>document.removeEventListener(_a,d)),[d]),f.useEffect(()=>{if(c.trigger){const h=p=>{p.target?.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),a.jsx(Di,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:a.jsxs(fp,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(g6,{children:r}),a.jsx(p6,{scope:n,isInside:!0,children:a.jsx(ey,{id:c.contentId,role:"tooltip",children:o||r})})]})})});cm.displayName=gr;var dm="TooltipArrow",hm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ji(n);return m6(dm,n).isInside?null:a.jsx(pp,{...o,...r,ref:t})});hm.displayName=dm;function b6(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function x6(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function v6(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function y6(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const l=t[i],c=t[s],u=l.x,d=l.y,h=c.x,p=c.y;d>r!=p>
50r&&n<(h-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function w6(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),_6(t)}function _6(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var C6=im,S6=sm,E6=am,k6=lm,I6=cm,N6=hm;const fm=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const T6=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const A6=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ru=e=>{const t=A6(e);return t.charAt(0).toUpperCase()+t.slice(1)};var P6={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const R6=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};const j6=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},c)=>f.createElement("svg",{ref:c,...P6,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:fm("lucide",o),...!i&&!R6(l)&&{"aria-hidden":"true"},...l},[...s.map(([u,d])=>f.createElement(u,d)),...Array.isArray(i)?i:[i]]));const Le=(e,t)=>{const n=f.forwardRef(({className:r,...o},i)=>f.createElement(j6,{ref:i,iconNode:t,className:fm(`lucide-${T6(ru(e))}`,`lucide-${e}`,r),...o}));return n.displayName=ru(e),n};const O6=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],L6=Le("arrow-up-right",O6);const M6=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],D6=Le("book-open",M6);const F6=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],pm=Le("check",F6);const U6=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sa=Le("chevron-down",U6);const z6=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],B6=Le("chevrons-up-down",z6);const $6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],H6=Le("circle-check",$6);const V6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],W6=Le("circle-question-mark",V6);const q6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],G6=Le("circle-x",q6);const K6=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],X6=Le("eye-off",K6);const Y6=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],J6=Le("eye",Y6);const Z6=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],ou=Le("flame",Z6);const Q6=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],e3=Le("inbox",Q6);const t3=[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]],n3=Le("library",t3);const r3=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],o3=Le("log-out",r3);const i3=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],mm=Le("monitor",i3);const s3=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],gm=Le("moon",s3);const a3=[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]],l3=Le("orbit",a3);const c3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],u3=Le("panel-left",c3);const d3=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}
vendor: 4,144 bytes, line 50
50],["path",{d:"M9 8V2",key:"14iosj"}]],h3=Le("plug",d3);const f3=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],p3=Le("refresh-cw",f3);const m3=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],g3=Le("settings",m3);const b3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],x3=Le("square",b3);const v3=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],y3=Le("star",v3);const w3=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],bm=Le("sun",w3);const _3=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],xm=Le("trash-2",_3);const C3=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]],S3=Le("volume-2",C3);const E3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xn=Le("x",E3),iu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,su=Gh,vm=(e,t)=>n=>{var r;if(t?.variants==null)return su(e,n?.class,n?.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const d=n?.[u],h=i?.[u];if(d===null)return null;const p=iu(d)||iu(h);return o[u][p]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,p]=d;return p===void 0||(u[h]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:p,...m}=d;return Object.entries(m).every(g=>{let[b,v]=g;return Array.isArray(v)?v.includes({...i,...l}[b]):{...i,...l}[b]===v})?[...u,h,p]:u},[]);return su(e,s,c,n?.class,n?.className)},k3=vm("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border hover:bg-input/50 hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:bg-input/30",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",de
50structive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-7 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3.5",xs:"h-5 gap-1 rounded-sm px-2 text-[0.625rem] has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-2.5",sm:"h-6 gap-1 px-2 text-xs/relaxed has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5 [&_svg:not([class*='size-'])]:size-3",lg:"h-8 gap-1 px-2.5 text-xs/relaxed has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2 [&_svg:not([class*='size-'])]:size-4",icon:"size-7 [&_svg:not([class*='size-'])]:size-3.5","icon-xs":"size-5 rounded-sm [&_svg:not([class*='size-'])]:size-2.5","icon-sm":"size-6 [&_svg:not([class*='size-'])]:size-3","icon-lg":"size-8 [&_svg:not([class*='size-'])]:size-4"}},defaultVariants:{variant:"default",size:"default"}});function ym({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const i=r?uf:"button";return a.jsx(i,{"data-slot":"button","data-variant":t,"data-size":n,className:Te(k3({variant:t,size:n,className:e})),...o})}function I3({...e}){return a.jsx(io,{"data-slot":"sheet",...e})}function N3({...e}){return a.jsx(so,{"data-slot":"sheet-portal",...e})}function T3({className:e,...t}){return a.jsx(ao,{"data-slot":"sheet-overlay",className:Te("fixed inset-0 z-50 bg-black/80 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",e),...t})}function A3({className:e,children:t,side:n="right",showCloseButton:r=!0,overlayClassName:o,...i}){return a.jsxs(N3,{children:[a.jsx(T3,{className:o}),a.jsxs(lo,{"data-slot":"sheet-content","data-side":n,className:Te("fixed z-50 flex flex-col bg-background bg-clip-padding text-xs/relaxed shadow-lg transition duration-200 ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10",e),...i,children:[t,r&&a.jsx(ga,{"data-slot":"sheet-close",asChild:!0,children:a.jsxs(ym,{variant:"ghost",className:"absolute top-4 end-4",size:"icon-sm",children:[a.jsx(Xn,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})})]})]})}function P3({className:e,...t}){return a.jsx("div",{"data-slot":"sheet-header",className:Te("flex flex-col gap-1.5 p-6",e),...t})}function R3({className:e,...t}){return a.jsx(co,{"data-slot":"sheet-title",className:Te("text-sm font-medium text-foreground",e),...t})}function j3({className:e,...t}){return a.jsx(Bi,{"data-slot":"sheet-description",className:Te("text-xs/relaxed text-muted-foreground",e),...t})}function O3({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,dir:i,...s}){const{isMobile:l,state:c,openMobile:u,setOpenMobile:d}=oo();return n==="none"?a.jsx("div",{"data-slot":"sidebar",className:Te("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...s,children:o}):l?a.jsx(I3,{open:u,onOpenChange:d,...s,children:a.jsxs(A3,{dir:i,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"console-mobile-sidebar w-(--sidebar-width) max-w-[260px] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",overlayClassName:"console-mobile-sidebar-overlay",style:{"--sidebar-width":$v},side:e,children:[a.jsxs(P3,{className:"sr-only",children:[a.jsx(R3,{children:"Sidebar"}),a.jsx(j3,{children:"Displays the mobile sidebar."})]}),a.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):a.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":c==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[a.jsx("div",{"data-slot":"sidebar-gap",className:Te("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(6)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),a.jsx("div",{"data-slot":"sidebar-container","data-side":e,className:Te("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",t==="floating"||t==="inset"?"p-3 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(6))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",r),...s,children:a.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-[var(--sidebar-border)] group-data-[variant=floating]:bg-[color-mix(in_srgb,var(--sidebar)_96%,transparent)] group-data-[variant=floating]:shadow-[var(--shadow-soft)] group-data-[variant=floating]:backdrop-blur-[18px] group-data-[variant=floating]:[-webkit-backdrop-filter:blur(18px)]",children:o})})]})}function L3({className:e,onClick:t,...n}){const{toggleSidebar:r}=oo();return a.jsxs(ym,{"data-sidebar":"trigger","data-slot":"sidebar-tr
50igger",variant:"ghost",size:"icon-sm",className:Te(e),onClick:o=>{t?.(o),r()},...n,children:[a.jsx(u3,{className:"rtl:rotate-180"}),a.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function M3({className:e,...t}){return a.jsx("main",{"data-slot":"sidebar-inset",className:Te("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",e),...t})}function D3({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t})}function F3({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:Te("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function U3({className:e,...t}){return a.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col px-2 py-1",e),...t})}function wm({delayDuration:e=0,...t}){return a.jsx(C6,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function _m({...e}){return a.jsx(S6,{"data-slot":"tooltip",...e})}function Cm({...e}){return a.jsx(E6,{"data-slot":"tooltip-trigger",...e})}function Sm({className:e,sideOffset:t=0,children:n,...r}){return a.jsx(k6,{children:a.jsxs(I6,{"data-slot":"tooltip-content",sideOffset:t,className:Te("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...r,children:[n,a.jsx(N6,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function au({className:e,...t}){return a.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-px",e),...t})}function Ho({className:e,...t}){return a.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t})}const z3=vm("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-[calc(var(--radius-sm)+2px)] p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Vo({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s}){const l=e?uf:"button",{isMobile:c,state:u}=oo(),d=a.jsx(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:Te(z3({variant:n,size:r}),i),...s});
50return o?(typeof o=="string"&&(o={children:o}),a.jsxs(_m,{children:[a.jsx(Cm,{asChild:!0,children:d}),a.jsx(Sm,{side:"right",align:"center",hidden:u!=="collapsed"||c,...o})]})):d}const _l=i6,Cl=s6,Zi=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>a.jsx(a6,{children:a.jsx(em,{ref:r,sideOffset:t,className:Te("z-50 min-w-[8rem] overflow-hidden rounded-xl border border-(--line-soft) bg-(--bg-surface) p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Zi.displayName=em.displayName;const Fn=f.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(nm,{ref:r,className:Te("relative flex min-h-11 cursor-pointer select-none items-center gap-2.5 rounded-lg px-3 py-2.5 text-[0.84rem] text-(--fg-body) outline-none transition-colors","focus:bg-(--hover-overlay) focus:text-(--fg-body)","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Fn.displayName=nm.displayName;const Em=f.forwardRef(({className:e,...t},n)=>a.jsx(rm,{ref:n,className:Te("my-0.5 mx-1 h-px bg-(--line-soft)",e),...t}));Em.displayName=rm.displayName;const km=f.forwardRef(({className:e,inset:t,...n},r)=>a.jsx(tm,{ref:r,className:Te("px-3 py-1.5 text-[0.75rem] font-semibold text-(--fg-muted)",t&&"pl-8",e),...n}));km.displayName=tm.displayName;function Gr({height:e=20,className:t,style:n}){return a.jsxs("span",{className:t,style:{display:"inline-flex",alignItems:"center",gap:"0.3em",fontSize:e,lineHeight:1,...n},children:[a.jsx(Im,{size:"1em"}),a.jsx("span",{style:{fontFamily:"var(--font-display-web)",fontWeight:400,lineHeight:1},children:"Orvoca"})]})}function Im({size:e=16,className:t,style:n,...r}){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",fill:"none",style:{width:e,height:e,display:"block",flexShrink:0,...n},"aria-hidden":"true",className:t,...r,children:[a.jsx("path",{d:"M689.394 522.631C689.462 528.913 688.62 537.099 687.422 543.252C687.053 545.176 686.802 544.122 686.517 545.438C685.95 547.999 685.705 550.481 684.996 552.991C684.757 553.821 684.331 552.617 684.092 553.488C682.777 558.245 681.778 562.824 680.184 567.587C672.295 590.97 659.944 612.436 643.175 630.96C637.656 637.1 629.928 643.471 623.646 649.187C622.914 649.859 623.903 650.141 623.802 650.317C622.182 653.06 621.868 651.081 620.22 652.109C613.668 656.182 606.629 660.883 600.459 664.947C597.829 666.671 601.442 666.648 598.196 667.362C597.972 667.411 598.194 666.171 597.396 666.507C595.591 667.278 592.425 669.178 591.039 669.795C588.375 670.982 587.949 671.199 585.461 672.371C582.043 673.963 577.753 675.266 574.071 676.932C573.284 677.291 574.72 677.856 573.49 678.519C572.262 679.19 568.788 680.353 567.537 680.506C566.289 680.667 566.532 679.706 566.266 679.595C564.087 678.638 560.75 681.992 560.223 682.199C550.944 685.899 542.253 686.344 533.089 687.526C526.153 688.425 518.721 689.351 512 689.346C511.944 689.346 511.889 689.346 511.833 689.346C503.782 689.311 497.079 688.286 489.339 687.478C488.523 687.389 489.301 688.888 488.298 688.78C477.634 687.621 467.13 685.185 457.277 681.047C456.29 680.629 457.989 679.842 457.034 679.352C451.108 676.432 442.894 670.285 437.034 673.726C433.091 671.697 428.381 669.043 425.506 666.118C423.661 664.232 426.504 664.21 423.521 663.196C422.85 662.962 423.001 664.5 422.037 664.062C417.966 662.211 414.104 659.251 410.117 657.268C409.304 656.866 408.849 657.931 408.521 657.951C405.778 658.062 404.514 653.715 404.037 653.09C400.262 648.334 396.636 646.05 392.589 642.341C391.656 641.476 391.721 643.632 390.78 642.834C385.915 638.673 381.349 633.8 377.76 628.643C376.966 627.493 378.812 627.583 378.488 626.991C377.073 624.397 374.72 625.512 373.37 622.988C373.086 622.457 374.19 622.002 374.221 621.84C374.725 619.313 371.637 619.892 371.317 619.58C367.297 615.719 367.676 611.161 364.483 607.03C364.097 606.53 363.641 608.518 362.628 607.056C355.872 597.31 350.508 585.768 347.483 574.447C347.011 572.686 348.51 573.508 348.597 573.352C349.956 570.881 346.87 570.756 346.567 570.227C344.27 566.069 345.341 561.257 341.197 559.121C337.872 543.539 334.737 527.838 335.874 512C335.874 512 335.874 512 335.874 512C336.155 508.092 336.694 504.281 337.554 500.46C337.606 500.216 338.998 500.75 339.095 500.265C340.334 494.448 338.054 495.45 335.798 491.168C335.236 490.071 338.876 487.482 339.154 487.269C340.164 486.439 342.116 487.728 342.331 487.434C344.043 485.046 337.048 484.387 337.679 480.744C337.711 480.633 338.894 481.331 339.074 481.052C339.636 480.187 339.306 479.168 339.919 478.341C341.341 476.451 344.797 476.437 343.58 472.893C343.427 472.439 339.402 472.155 340.37 469.011C340.737 467.765 342.216 462.146 342.956 460.687C343.674 459.219 344.566 460.654 344.653 460.558C347.553 456.948 347.733 458.723 350.76 457.502C353.783 456.323 348.006 454.941 347.675 453.891C347.342 452.838 349.743 450.351 350.474 449.816C351.201 449.274 351.608 450.456 352.108 449.921C355.413 446.41 350.118 446.994 349.816 445.245C349.149 441.073 354.309 440.261 356.062 437.577C356.543 436.843 355.338 437.054 355.595 436.311C356.642 433.3
5066 358.684 432.35 359.267 428.678C359.354 428.086 358.488 424.282 361.093 423.647C361.464 423.562 362.02 424.745 362.898 423.738C364.204 422.236 366.266 419.371 367.124 417.42C367.758 415.975 365.287 416.487 366.84 415.151C367.532 414.563 367.493 416.48 368.717 415.336C369.929 414.193 372.284 410.79 373.205 409.51C374.114 408.227 372.527 408.115 372.53 407.959C372.573 407.026 373.934 404.207 374.11 403.997C382.512 393.126 392.965 385.78 402.698 376.949C403.47 376.256 402.068 375.616 402.177 375.499C404.617 372.829 404.692 377.432 407.372 376.889C405.382 374.905 406.834 374.401 408.654 372.672C409.531 371.839 408.367 371.36 408.389 371.206C408.876 368.823 411.144 369.811 411.648 369.982C413.525 370.598 413.513 368.335 414.778 368.756C416.027 369.18 415.391 371.485 417.33 370.154C417.336 368.962 414.418 367.793 415.705 366.438C420.569 361.195 432.951 356.712 438.039 354.679C443.12 352.557 444.717 351.743 447.815 350.87C453.434 349.369 450.799 348.4 453.933 346.387C457.115 344.414 456.884 349.287 457.686 350.043C458.468 350.808 458.671 349.685 459.429 350.001C460.181 350.319 459.117 351.36 460.555 351.105C461.983 350.839 465.272 348.065 465.519 346.96C466.011 344.609 463.633 342.908 467.681 342.661C467.913 342.65 467.497 343.973 468.368 343.872C475.229 343.046 482.239 341.752 489.082 341.644C490.022 341.631 489.362 343.007 489.907 343.014C495.58 343.143 493.336 341.257 496.225 338.596C495.821 341.814 497.681 343.538 501.899 343.284C504.451 343.148 503.927 341.812 505.553 340.784C506.043 340.474 507.888 341.356 508.203 340.713C509.257 338.614 507.468 336.272 512 337.195C512.002 337.195 512.004 337.195 512.006 337.196C512.076 337.212 512.042 337.363 512 337.555C511.944 337.808 511.874 338.132 512 338.313C512.05 338.385 512.131 338.434 512.257 338.447C516.649 338.944 517.207 336.79 522.012 336.803C525.804 336.814 532.313 338.773 536.465 339.612C535.921 342.922 539.895 342.725 541.894 340.766C544.587 341.338 547.512 341.804 550.042 342.704C550.909 343.012 550.114 343.805 550.204 343.931C551.549 345.888 553.195 344.034 553.794 344.098C560.238 344.886 564.731 347.983 570.994 348.579C571.214 348.599 572.305 346.658 573.293 348.748C573.351 348.888 571.113 349.1 573.778 350.201C576.454 351.307 580.974 354.442 584.981 355.25C585.947 355.435 588.92 354.964 590.075 357.067C590.226 357.349 589.698 357.759 589.881 358.23C590.47 359.734 592.042 358.158 592.457 360.421C592.869 362.687 594.774 365.196 598.784 366.147C598.909 366.179 600.562 365.243 601.621 365.927C603.307 367.013 605.511 368.832 607.243 369.987C608.074 370.54 608.106 369.353 608.26 369.435C614.153 372.804 617.488 376.438 622.752 381.352C623.714 382.244 627.439 383.797 628.622 386.303C629.902 389.038 624.708 390.384 630 393.952C632.099 395.369 638.54 393.859 639.482 399.317C646.008 405.635 649.931 413.133 655.629 420.181C655.885 420.497 657.79 420.823 658.278 421.662C659.002 422.903 658.836 423.918 659.319 424.814C661.321 428.581 663.672 431.752 665.436 435.486C666.102 436.904 665.281 436.7 666.057 438.389C666.825 440.074 668.116 440.85 668.765 443.328C669.248 445.209 668.437 447.594 669.197 449.972C670.753 449.457 671.38 451.072 672.833 453.827C673.111 454.356 673.422 453.569 673.58 453.81C674.235 454.792 674.147 455.946 674.787 456.878C674.941 457.106 675.457 456.945 675.611 457.123C676.946 458.636 676.683 461.931 676.63 462.479C676.445 464.613 677.349 465.32 677.457 466.881C677.561 468.435 676.604 466.331 676.89 468.097C677.483 471.738 678.634 476.322 679.309 479.982C679.583 481.442 680.028 480.329 680.082 480.535C680.806 483.546 680.624 486.738 682.078 488.258C679.196 490.805 682.661 490.055 682.487 494.56C682.469 494.911 681.068 495.492 680.708 494.195C680.345 492.898 680.562 490.843 679.96 489.071C679.827 488.643 678.03 486.41 677.878 486.095C676.744 483.604 678.95 482.85 679.056 482.685C680.145 480.859 677.987 478.161 677.694 477.412C676.409 473.929 675.98 470.867 674.785 468.011C674.002 466.15 672.345 466.422 671.932 464.932C670.512 460.02 672.195 457.47 668.466 453.645C667.653 452.832 666.254 454.477 666.244 450.501C666.244 450.256 666.471 447.17 664.975 446.06C664.787 445.922 664.258 446.158 664.103 445.938C663.073 444.461 662.992 443.207 661.937 441.578C660.883 439.956 659.51 438.058 658.642 436.049C658.12 434.839 658.29 432.826 658.219 432.133C658.039 430.169 655.893 429.171 656.172 427.722C656.448 426.245 658.907 427.389 657.919 424.483C656.462 425.229 654.892 425.881 653.391 426.587C650.012 421.156 646.791 415.708 642.699 410.735C642.189 410.122 641.962 411.329 641.396 410.693C639.008 408.022 637.474 405.217 634.742 402.663C632.623 400.691 629.664 399.159 627.328 397.292C627.522 394.526 623.743 391.977 621.42 389.737C620.606 388.947 621.049 388.561 620.557 387.893C618.676 385.389 618.508 387.785 617.669 387.488C614.06 386.272 616.64 382.649 613.154 380.131C612.968 379.985 609.303 380.283 608.91 380.202C606.383 379.625 609.086 379.294 607.963 378.289C605.904 376.468 604.634 374.903 601.518 373.789C600.603 373.461 597.879 373.612 596.941 371.676C596.817 371.42 597.359 370.78 597.217 370.641C594.603 368.185 593.193 370.412 591.031 370.258C588.87 370.11 587.029 367.148 586.7 366.396C585.86 364.451 588.092 366.432 588.23 366.357C589.904 365.421 587.771 364.631 586.275 363.754C587.23 361.301 584.943 360.368 584.717 362.858C584.695 363.13 586.017 363.493 586.275 363.754C583.75 365.377 581.296 364.618 579.618 361.234C578.824 359.653 580.569 358.915 576.488 357.746C574.637 357.234 574.616 359.219 572.881 359.089C568.933 358.808 564.897 355.589 561.033 354.728C559.646 354.423 560.659 355.808 559.705 355.639C557.181 355.207 555.21 353.868 552.606 353.654C552.372 353.637 552.646 354.839 551.874 354.671C546.015 353.435 541 351.787 534.762 350.964C531.751 350.553 526.287 350.698 523.173 350.423C519.667 350.091 515.719 349.248 512 348.877C509.952 348.671 508.015 348.608 506.359 348.832C503.329 349.25 504.062 350.42 502.811 351.319C500.429 353.061 495.857 350.68 495.194 350.314C495.175 350.297 497.74 349.739 496.297 349.267C495.362 348.065 495.222 350.305 495.194 350.314C494.77 350.055 489.539 350.46 488.556 350.872C488.019 351.084 488.497 352.181 488.216 352.271C481.509 354.395 474.933 356.214 468.082 357.668C467.957 357.68 467.773 356.35 467.482 356.395C463.411 356.994 461.399 359.399 458.624 361.454C455.844 363.519 453.346 364.204 450.637 362.826C448.428 364.071 444.711 364.639 442.548 364.993C440.381 365.345 441.292 367.88 441.154 368.007C436.854 372.107 433.313 372.35 428.144 375.268C425.682 376.645 421.276 380.095 419.019 382.144C417.233 383.754 415.7 384.118 414.213 385.81C414.013 386.038 414.997 386.814 414.955 386.908C413.952 389.578 413.02 386.506 412.291 386.406C409.649 386.057 408.058 386.003 406.224 388.801C405.788 389.452 407.051 394.113 406.277 395.181C405.248 396.576 404.664 394.992 403.62 396.502C403.531 396.631 404.208 397.306 403.391 398.039C399.606 401.452 395.376 405.147 392.019 409.282C391.56 409.843 393.325 410.133 392.688 410.956C389.7 414.818 386.456 419.026 383.173 422.541C382.361 423.405 381.881 422.181 381.471 422.209C378.96 422.418 380.094 425.883 379.951 426.212C376.445 434.283 370.984 438.944 368.427 447.642C368.277 448.133 369.662 452.725 366.618 453.255C366.416 453.285 363.281 453.836 364.494 455.878C364.572 456.002 366.231 455.542 365.475 457.163C364.716 458.797 364.662 461.773 362.459 463.641C361.766 464.223 358.607 465.219 360.
50037 468.083C360.122 468.299 363.906 472.996 360.345 473.375C359.761 473.436 356.329 472.355 357.463 475.518C357.69 476.119 358.68 475.362 358.855 476.835C359.131 479.082 357.622 481.674 358.742 484.53C358.937 485.037 361.014 487.315 358.967 488.555C358.645 488.751 357.53 488.116 357.278 488.907C356.076 492.688 356.428 496.871 355.327 500.775C354.942 502.171 353.057 501.316 352.451 502.788C351.842 504.262 351.228 507.272 352.089 508.871C352.949 510.455 356.053 508.803 356.278 511.112C356.309 511.408 356.337 511.704 356.364 512C356.364 512 356.364 512 356.364 512C357.243 521.638 356.394 531.301 357.907 540.948C358.142 542.411 358.991 541.004 359.428 543.124C360.957 551.052 365.932 563.828 366.512 571.139C366.941 577.071 362.902 571.02 363.888 575.35C364.394 577.47 368.569 578.079 368.874 578.475C371.951 582.427 372.111 586.155 374.692 589.803C375.226 590.549 376.029 589.063 376.467 589.699C377.971 591.856 378.85 594.554 380.3 596.619C380.953 597.541 381.751 596.772 382.241 597.682C383.431 599.852 384.288 601.914 384.884 604.486C384.941 604.723 382.97 604.291 384.019 605.832C385.715 608.313 387.238 611.927 390.25 613.951C391.15 614.548 393.029 612.981 393.173 615.76C393.208 616.338 390.608 617.856 394.216 618.099C394.832 618.168 400.182 618.979 400.063 622.004C400.029 622.806 399.337 625.526 400.491 626.138C400.652 626.213 401.09 624.805 401.906 625.434C404.762 627.658 407.438 630.319 410.5 632.417C411.318 632.972 411.074 630.996 412.258 631.848C415.506 634.186 419.211 637.525 422.162 640.15C423.248 641.121 421.808 641.441 421.824 641.6C422.113 644.194 424.436 642.6 424.977 642.787C428.364 643.992 429.958 646.464 432.897 647.856C433.705 648.24 433.785 646.843 433.992 646.839C436.097 646.836 433.82 648.07 434.703 648.872C437.188 651.127 440.459 652.778 443.496 654.116C444.609 654.603 444.004 652.718 444.989 653.165C450.828 655.781 456.897 658.474 462.58 661.26C463.654 661.787 462.618 662.56 462.776 662.873C463.888 665.061 466.985 663.598 467.585 663.551C470.359 663.347 471.086 664.53 473.361 664.966C484.424 667.131 498.091 669.756 508.835 670.444C509.904 670.52 510.958 670.588 512 670.648C524.498 671.316 534.92 671.125 547.076 668.488C547.911 668.303 546.792 667.247 547.503 667.074C556.666 664.885 565.767 662.662 574.463 658.828C575.176 658.515 573.693 657.893 574.816 657.358C577.116 656.254 580.083 655.044 582.586 654.267C583.805 653.886 582.694 655.455 583.917 655.047C586.765 654.091 589.658 652.699 592.26 651.077C593.363 650.385 591.09 650.371 592.559 649.55C602.548 643.894 611.7 637.365 621.419 630.627C622.083 630.167 624.019 631.193 625.026 629.735C624.73 629.239 624.263 628.764 623.885 628.291C636.136 616.696 647.333 603.904 655.958 589.048C656.319 588.425 654.893 589.071 655.588 587.866C659.592 580.856 662.781 573.738 666.566 566.274C666.935 565.531 668.17 566.411 668.8 564.035C668.917 563.619 669.945 560.068 669.937 559.08C669.933 558.944 669.094 559.391 669.445 558.266C671.497 551.704 673.455 544.789 675.097 538.055C675.362 536.965 675.765 538.234 675.957 537.456C677.292 531.949 677.619 525.796 678.544 520.399C679.141 516.803 680.018 518.176 681.052 516.253C681.199 515.98 681.283 513.695 681.821 513.579C683.182 513.281 684.67 514.425 686.125 513.978C686.368 513.905 686.196 512.001 686.459 512C686.459 512 686.46 512 686.46 512C686.538 512 686.656 512.166 686.835 512.594C686.891 512.725 687.173 515.026 687.432 515.598C687.614 515.997 688.165 515.295 688.402 516.108C688.64 516.924 688.173 517.797 688.436 519.143C688.699 520.496 689.367 519.916 689.394 522.631ZM432.784 366.873C430.419 366.715 432.485 370.975 433.775 368.953C433.835 368.851 432.904 366.879 432.784 366.873ZM648.58 414.474C648.113 411.552 645.412 411.319 645.695 413.405C645.969 415.469 648.719 415.352 648.58 414.474ZM663.636 437.324C663.096 434.114 659.344 435.514 661.572 438.047C661.7 438.195 663.667 437.51 663.636 437.324ZM680.768 525.33C680.799 525.305 680.961 523.669 680.935 523.628C680.362 522.715 680.029 525.972 680.768 525.33ZM674.695 462.317C674.872 461.251 673.471 458.743 673.278 460.078C673.133 461.145 674.488 463.638 674.695 462.317ZM358.31 438.557C358.228 438.553 357.66 439.594 358.054 439.752C359.32 440.258 359.673 438.622 358.31 438.557ZM682.255 508.193C682.115 501.351 684.206 496.909 684.301 504.541C684.309 505.91 683.433 501.627 683.295 503.379C683.062 506.557 684.539 508.65 683.767 511.94C683.642 512.525 682.274 508.576 682.251 508.181C682.252 508.185 682.254 508.189 682.255 508.193ZM429.032 362.475C428.964 362.438 427.5 363.194 427.497 363.269C427.471 365.008 430.391 363.496 429.032 362.475ZM338.707 505.01C338.55 505.092 338.307 508.962 338.447 509.093C341.032 511.125 341.52 503.427 338.707 505.01ZM536.518 339.71C538.499 338.659 540.737 338.883 541.886 340.762C540.115 340.358 538.303 340.052 536.518 339.71Z",fill:"#E7A534"}),a.jsx("path",{d:"M878.276 183.797C882.5 198.625 880.004 216.352 876.775 228.492C875.749 232.344 875.411 230.196 874.624 232.857C873.104 237.841 872.116 242.726 870.226 247.468C869.6 249.012 869.031 246.66 868.401 248.283C864.875 257.342 861.862 265.997 857.881 274.62C837.691 317.65 812.783 356.247 785.485 394.494C776.458 407.084 764.396 421.605 755.072 434.627C753.993 436.138 755.542 435.93 755.4 436.266C753.128 441.527 752.48 438.703 750.02 441.407C740.239 452.161 730.172 464.591 721.696 475.568C718.063 480.269 723.552 477.067 718.78 480.906C718.45 481.174 718.511 479.26 717.371 480.44C714.829 483.072 710.549 488.514 708.632 490.637C704.953 494.708 704.335 495.453 700.973 499.37C696.392 504.686 690.395 510.718 685.567 516.611C684.548 517.86 686.863 517.052 685.316 519.119C683.772 521.186 679.149 526.243 677.388 527.784C675.631 529.325 675.584 527.958 675.148 528.12C671.523 529.435 668.116 536.989 667.478 537.78C655.758 552.278 643.773 562.973 631.737 575.533C622.614 585.054 613.184 595.339 604.22 604.22C604.146 604.294 
50604.072 604.367 603.998 604.44C593.256 615.054 583.743 623.439 573.274 633.618C572.172 634.686 574.45 634.466 573.105 635.772C558.741 649.716 544.056 663.092 528.594 675.645C527.036 676.908 528.132 674.262 526.527 675.467C516.784 682.839 500.572 693.664 498.634 702.399C492.133 707.675 484.365 713.907 477.953 717.786C473.803 720.3 476.536 716.298 472.362 720.475C471.421 721.413 473.503 721.24 472.033 722.577C465.881 728.174 458.502 733.616 452.408 739.209C451.174 740.346 452.19 740.896 451.937 741.34C449.792 745.008 442.92 747.113 441.649 747.859C432.045 753.532 425.949 758.827 417.654 764.929C415.739 766.334 418.845 765.814 417.031 767.206C407.519 774.475 397.451 781.525 387.39 787.703C385.176 789.056 386.446 786.703 385.354 787.297C380.563 789.905 380.867 792.474 376.173 795.039C375.19 795.577 375.132 794.362 374.899 794.381C371.263 794.661 370.397 798.281 369.751 798.775C361.67 805.022 354.567 806.425 346.378 811.95C345.379 812.624 348.381 812.317 345.529 814.14C326.748 826.141 305.862 837.465 285.369 845.958C282.196 847.268 283.993 845.333 283.745 845.315C279.762 845.076 278.883 848.266 277.813 848.853C269.875 853.18 261.451 854.25 256.903 859.166C229.219 867.382 194.416 881.788 166.974 857.735C161.18 851.628 158.12 843.754 157.094 836.062C157.027 835.578 158.43 836.174 158.297 835.222C157.286 823.634 155.924 825.931 153.597 818.118C153.042 816.054 156.525 810.301 156.82 809.926C157.832 808.181 159.437 810.333 159.667 809.739C161.561 804.91 155.299 804.564 156.699 797.693C156.755 797.479 157.674 798.626 157.908 798.07C158.64 796.352 158.621 794.434 159.449 792.729C161.316 789.083 164.534 788.546 164.697 782.028C164.725 781.221 160.947 781.357 163.068 775.481C163.912 773.014 167.618 762.817 169.071 759.951C170.463 757.113 170.698 759.547 170.828 759.356C175.321 752.38 174.712 755.508 178.36 752.616C182.033 749.731 176.776 748.641 176.941 746.832C177.096 745.034 180.701 740.196 181.747 739.02C182.773 737.864 182.624 739.845 183.411 738.759C188.68 731.514 182.763 734.118 183.27 731.187C184.446 724.377 190.535 721.135 193.689 716.079C194.568 714.667 193.142 715.439 193.775 714.094C196.316 708.764 199.169 706.144 201.489 699.86C201.865 698.832 202.592 692.909 205.913 690.702C206.376 690.408 206.499 692.099 207.952 690.087C210.117 687.086 213.819 681.419 215.727 677.752C217.111 675.079 213.944 677.124 216.335 674.244C217.399 672.968 216.567 676.051 218.502 673.611C220.415 671.196 224.706 664.435 226.376 661.835C227.977 659.326 226.071 660.023 226.133 659.778C226.532 658.306 229.238 653.158 229.533 652.726C243.824 631.061 259.481 612.912 274.228 592.468C275.382 590.874 273.569 591.137 273.734 590.886C277.424 585.195 276.875 591.498 280.663 588.449C278.19 587.402 280.26 585.479 283 581.502C284.318 579.587 282.744 579.969 282.795 579.736C283.667 576.139 286.686 575.5 287.379 575.274C289.935 574.432 290.084 571.42 291.82 570.833C293.55 570.244 292.486 573.921 295.328 570.327C295.406 568.74 291.375 569.89 293.248 566.915C300.24 555.712 317.3 538.134 324.366 530.21C331.31 522.376 333.405 519.72 337.701 515.296C345.48 507.331 341.406 509.248 345.339 503.55C349.299 497.848 350.391 503.305 351.76 503.199C353.119 503.108 353.093 501.662 354.292 501.108C355.488 500.558 354.228 502.938 356.269 500.954C358.327 498.944 362.22 492.104 362.159 490.692C362.021 487.704 358.023 488.793 363.657 483.773C363.982 483.485 363.898 485.307 365.101 484.166C374.691 475.01 383.959 465.179 393.598 456.237C394.917 455.016 394.748 457.073 395.526 456.373C403.66 449.09 399.39 450.385 401.813 444.377C403.188 447.613 406.964 446.538 412.715 440.691C416.195 437.161 414.591 436.78 416.141 433.789C416.605 432.89 419.776 431.067 419.756 430.145C419.706 427.117 415.62 427.764 422.368 422.368C422.371 422.366 422.374 422.364 422.377 422.361C422.482 422.279 422.549 422.436 422.635 422.635C422.747 422.897 422.891 423.233 423.195 423.195C423.316 423.18 423.461 423.107 423.64 422.947C429.932 417.338 429.045 415.015 435.304 408.478C440.159 403.401 450.314 395.503 456.271 390.155C458.643 392.916 463.613 387.046 464.16 383.092C468.06 379.56 472.096 375.598 476.025 372.434C477.383 371.339 477.259 372.889 477.497 372.824C481.203 371.829 481.232 368.489 482.005 367.65C49
500.424 358.666 499.098 353.348 506.659 344.25C506.925 343.929 505.758 341.584 509.314 340.914C509.548 340.878 507.425 344.274 511.59 340.734C515.828 337.126 524.572 331.333 529.572 325.538C530.81 324.11 533.082 319.486 536.993 318.29C537.517 318.134 537.565 319.041 538.377 318.884C540.99 318.367 540.324 315.59 543.811 315.506C547.274 315.443 552.719 313.018 557.735 306.984C557.897 306.796 558.028 304.073 559.921 302.576C562.927 300.2 567.472 297.08 570.647 294.532C572.16 293.317 570.405 293.108 570.655 292.88C580.351 284.27 588.463 279.373 599.768 271.429C601.885 269.94 606.77 264.137 611.52 262.326C616.747 260.335 615.863 268.594 625.121 260.062C628.849 256.65 629.39 246.626 639.235 244.723C652.966 233.971 667.776 226.67 681.87 216.277C682.515 215.803 683.519 212.621 685.124 211.681C687.508 210.289 689.319 210.394 691.018 209.456C698.378 205.424 704.254 201.035 711.473 197.208C714.161 195.789 713.742 197.218 716.918 195.566C720.06 193.944 721.546 191.574 726.249 189.904C729.833 188.641 734.15 189.644 738.811 187.754C737.754 185.157 740.872 183.684 745.885 180.574C746.848 179.977 745.346 179.589 745.781 179.26C747.529 177.911 749.862 177.756 751.564 176.415C751.985 176.089 751.625 175.201 751.948 174.885C754.688 172.146 760.861 171.951 762.015 171.905C766.181 171.785 767.394 170 770.309 169.524C773.211 169.066 769.363 171.206 772.712 170.358C779.775 168.553 788.392 165.723 795.328 164.129C798.191 163.466 795.951 162.681 796.354 162.557C802.144 160.863 808.326 161.268 811.264 158.384C815.949 164.562 814.896 157.138 823.568 158.393C824.277 158.517 825.029 161.627 822.464 162.061C820.058 162.503 816.199 161.701 812.735 162.8C811.953 163.026 807.739 166.546 807.134 166.846C802.407 169.042 800.972 164.669 800.607 164.466C797.02 162.361 791.916 166.886 790.599 167.492C783.958 170.344 778.328 171.537 772.827 174.279C769.45 176.006 770.18 178.996 767.347 179.995C757.919 183.413 752.906 180.991 745.905 188.273C744.393 189.858 747.693 191.944 739.929 192.78C739.379 192.858 733.572 193.045 731.457 195.833C731.194 196.182 731.646 197.04 731.222 197.349C728.404 199.386 725.806 199.871 722.768 201.912C719.657 203.992 715.93 206.657 711.916 208.536C709.58 209.619 705.818 209.687 704.508 209.932C700.814 210.586 698.553 214.342 695.842 214.158C693.175 213.94 695.647 209.716 690.194 211.809C691.309 214.081 692.223 216.551 693.24 218.9C682.324 225.374 671.271 231.445 660.789 238.541C659.483 239.428 661.579 239.662 660.198 240.645C654.321 244.826 648.672 247.507 642.79 252.068C638.182 255.645 633.944 260.406 629.287 264.208C624.604 264.016 617.946 270.079 612.629 273.719C610.752 275.003 610.412 274.296 608.962 275.067C603.492 278.011 607.325 278.324 606.221 279.657C601.547 285.345 597.62 281.074 590.964 286.391C590.613 286.666 588.126 292.498 587.658 293.111C584.696 297.017 586.381 292.749 583.901 294.406C579.367 297.445 575.922 299.239 571.423 304.007C570.086 305.422 567.872 309.673 564.111 310.825C563.618 310.977 563.18 310.022 562.844 310.219C556.809 313.867 558.688 316.47 556.284 319.858C553.884 323.244 547.815 325.446 546.434 325.778C542.867 326.626 547.905 323.624 547.936 323.391C548.299 320.584 545.077 323.706 542.338 325.804C539.939 323.726 536.366 326.996 539.506 327.993C539.855 328.096 541.718 326.139 542.338 325.804C542.027 330.086 538.163 333.872 531.936 335.431C528.996 336.184 529.929 333.296 524.019 339.164C521.335 341.837 523.853 342.507 521.722 345.144C516.832 351.185 508.224 356.118 502.547 361.649C500.495 363.648 503.358 362.662 501.984 364.059C498.394 367.723 494.455 370.103 490.937 373.938C490.62 374.286 492.3 374.424 491.123 375.523C482.164 383.936 473.975 390.501 464.693 399.305C460.263 403.502 452.784 411.661 448.137 416.018C442.975 420.85 436.603 426.021 431.007 431.007C427.913 433.763 425.075 436.44 422.822 438.941C418.697 443.518 420.532 443.424 419.291 445.889C416.933 450.617 408.526 455.09 407.364 455.648C407.325 455.664 410.809 451.644 408.382 453.24C406.285 453.505 407.401 455.601 407.364 455.648C406.59 456.018 399.074 463.449 397.818 465.124C397.13 466.035 398.416 466.382 398.042 466.842C389.007 477.873 379.641 488.394 369.608 498.642C369.422 498.812 368.705 497.652 368.279 498.063C362.336 503.759 359.887 508.906 356.095 514.62C352.307 520.334 348.488 524.225 344.123 525.82C340.928 529.925 335.414 534.82 332.171 537.705C328.926 540.59 330.495 542.691 330.29 543.011C323.991 552.98 318.554 557.241 310.725 566.495C307.067 570.801 300.093 580.106 296.521 585.118C293.702 589.07 291.349 591.118 288.872 594.948C288.537 595.467 289.816 595.668 289.736 595.844C287.719 600.687 287.007 597.064 285.976 597.591C282.226 599.52 280.111 600.
50695 276.822 606.469C276.062 607.799 276.637 613.7 275.213 616.014C273.354 619.022 272.989 617.104 271.092 620.267C270.928 620.538 271.682 621.002 270.311 622.81C263.819 631.393 256.763 640.423 250.581 649.576C249.744 650.811 251.981 650.03 250.793 651.824C245.141 660.364 239.027 669.497 233.078 677.61C231.631 679.573 231.622 677.759 231.093 678.049C227.853 679.853 227.642 685.031 227.25 685.758C218.781 701.798 209.747 712.702 202.221 729.432C201.78 730.394 200.757 738.424 197.194 740.376C196.949 740.517 193.251 742.588 193.467 745.996C193.484 746.205 195.493 744.846 193.827 748.093C192.203 751.255 190.474 757.092 187.311 761.104C186.327 762.334 182.617 764.953 182.691 770.092C182.666 770.48 184.273 778.564 180.616 780.099C180.033 780.319 177.1 778.957 176.963 784.685C176.952 785.77 178.186 784.178 177.796 786.925C177.137 791.379 174.907 796.29 175.182 801.736C175.223 802.714 176.626 806.532 174.564 809.29C174.243 809.71 173.326 808.678 172.982 810.214C171.374 817.398 171.78 825.085 172.184 831.548C172.362 833.843 170.423 833.003 170.572 835.51C170.691 838.081 172.219 842.735 174.219 844.145C176.159 845.518 176.97 842.135 178.958 844.215C179.22 844.468 179.486 844.713 179.758 844.951C187.838 852.782 207.364 854.106 225.689 849.901C228.568 849.246 226.067 848.873 230.094 847.82C245.387 844.064 271.284 832.107 285.034 827.414C295.964 823.812 283.661 831.384 291.81 828.045C295.754 826.41 298.573 821.341 299.345 820.816C307.643 815.247 314.53 812.967 322.189 807.997C323.787 806.956 321.526 806.796 322.892 805.921C327.562 802.914 332.609 800.53 337.096 797.632C339.085 796.341 338.234 795.716 340.085 794.65C344.481 792.099 348.553 789.991 353.349 787.973C353.788 787.788 351.805 790.529 355.098 788.444C360.279 785.157 367.241 781.613 372.661 776.778C374.237 775.359 373.029 773.48 377.649 772.169C378.62 771.887 379.142 774.807 382.203 769.84C382.754 768.993 388.225 761.309 392.929 760.405C394.175 760.166 397.864 760.221 399.752 758.421C400.002 758.171 398.161 758.023 399.822 756.67C405.673 751.926 411.91 747.458 417.911 742.448C419.486 741.127 416.317 741.966 418.654 740.052C425.04 734.821 433.701 728.508 440.275 723.802C442.735 722.042 441.738 724.146 441.979 724.098C445.89 723.329 446.007 720.082 446.84 719.233C452.115 713.913 457.025 711.419 462.092 706.868C463.485 705.619 461.715 705.552 461.936 705.235C464.267 701.992 463.386 705.45 465.424 704.07C471.153 700.196 476.82 695.33 482.037 690.707C483.945 689.013 480.878 689.831 482.599 688.322C492.648 679.472 503.327 670.33 513.598 662.166C515.545 660.621 515.079 662.442 515.625 662.276C519.409 661.144 521.776 655.932 522.498 654.984C525.85 650.61 528.036 649.871 531.477 646.485C548.223 630.007 569.708 610.292 585.659 594.942C587.261 593.403 588.838 591.888 590.393 590.393C609.073 572.408 624.319 557.769 641.456 538.94C642.629 537.65 640.406 537.999 641.415 536.863C654.48 522.229 667.594 508.396 680.135 493.276C681.159 492.044 678.651 492.926 680.257 490.921C683.533 486.818 687.918 481.792 691.702 477.962C693.538 476.101 692.151 479.505 693.981 477.616C698.249 473.211 702.438 468.329 706.307 463.288C707.933 461.162 704.328 463.421 706.52 460.726C721.355 442.411 735.399 424.102 750.978 405.958C752.043 404.716 755.07 405.246 756.716 402.1C756.256 401.436 755.522 400.919 754.932 400.345C774.818 372.302 794.426 344.764 811.522 315.162C812.23 313.931 809.754 315.339 811.111 312.958C819.094 298.893 825.889 285.003 833.849 270.815C834.642 269.375 836.675 271.161 838.225 266.61C838.518 265.793 840.907 259.172 841.085 257.149C841.099 256.885 839.51 257.66 840.321 255.499C844.973 243.086 849.42 230.098 852.27 217.758C852.731 215.717 853.627 218.12 853.961 216.662C856.298 206.51 855.521 195.458 853.964 187.266C852.783 181.869 855.474 182.855 855.846 178.921C855.932 178.332 853.718 175.119 854.49 174.176C856.525 171.647 860.698 171.304 862.743 168.446C863.289 167.728 857.536 162.843 861.891 164.843C862.246 164.924 866.231 168.891 867.413 169.807C868.284 170.402 868.408 168.2 869.94 169.644C871.462 171.133 871.635 173.632 873.486 176.444C875.217 179.247 876.299 177.297 878.276 183.797ZM317.745 550.671C314.278 552.932 317.357 556.249 319.263 552.268C319.35 552.074 317.92 550.554 317.745 550.671ZM669.619 228.583C664.124 229.774 662.841 234.109 666.668 233.429C670.594 232.689 671.272 228.234 669.619 228.583ZM714.812 199.867C708.726 201.438 710.996 207.46 716.045 203.201C716.338 202.957 715.166 199.777 714.812 199.867ZM861.314 193.985C861.385 193.908 860.967 190.905 860.877 190.865C859.227 189.587 860.054 195.401 861.314 193.985ZM761.919 175.471C759.737 175.412 755.309 178.358 757.823 178.461C759.799 178.55 764.525 175.574 761.919 175.471ZM195.695 716.973C195.605 716.997 194.479 718.969 194.836 719.105C195.978 719.545 197.172 716.602 195.695 716.973ZM847.919 166.967C842.601 163.488 837.665 161.042 836.108 159.38C834.49 157.87 836.365 156.489 843.784 159.448C846.343 160.479 837.566 159.067 840.765 160.651C846.145 163.385 851.959 162.786 855.726 168.812C856.033 169.357 854.223 168.706 852.268 168.161C850.312 167.589 848.196 167.153 847.897 166.961C847.904 166.963 847.912 166.965 847.919 166.967ZM312.141 548.987C312.043 549.011 309.953 551.451 309.951 551.547C309.944 553.792 314.148 548.883 312.141 548.987ZM160.886 844.306C160.668 844.601 164.335 851.58 164.76 851.623C166.919 852.579 165.613 849.906 164.304 847.413C162.933 844.885 161.404 842.283 160.886 844.306ZM456.429 390.138C457.925 386.733 460.898 383.689 464.147 383.101C461.565 385.402 458.975 387.835 456.429 390.138Z",fill:"#E7A534"})]})}const Ht="https://apps.apple.com/us/app/orvoca-reading-vocabulary/id6800200805",B3="orvoca-marketing-attribution",$3=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","ref","source"],H3=[{slug:"what-is-orvoca",question:"Orvoca는 어떤 서비스인가요?",answer:["Orvoca는 읽는 흐름을 끊지 않고, 다시 보고 싶은 단어를 남기는 서비스입니다.","Web, Chrome Extension, iPhone/iPad, Android에서 단어를 보내면 먼저 Inbox에서 뜻과 원문을 확인하고, 직접 저장한 항목만 Vocabulary에서 복습합니다."]},{slug:"different-from-dictionary",question:"사전이나 번역기와 뭐가 다른가요?",answer:["사전과 번역기는 그 순간 뜻을 이해하게 도와줍니다.","Orvoca는 찾고 끝나는 단어를 Inbox에 남기고, 원문 문맥을 확인한 뒤 Vocabulary에 보관하고 복습하는 다음 단계를 돕습니다."]},{slug:"available-now",question:"지금 바로 사용할 수 있나요?",answer:["Web과 Chrome Extension은 공개 FAQ와 설치 흐름에서 바로 사용할 수 있고, Android는 Google Play 배포를 사용합니다.","iPhone/iPad용 앱과 Safari Extension도 공개 지원합니다. iOS에서는 Share → Orvoca 또는 Orvoca로 돌아온 뒤 표시되는 Save를 사용하세요."]},{slug:"android-availability",question:"Android에서도 사용할 수 있나요?",answer:["네. Android app은 Google Play에서 사용할 수 있습니다.","다른 앱에서 텍스트를 선택하거나 공유한 뒤 Android 공유 시트에서 Orvoca를 선택하면 됩니다. 단어는 Inbox로 가고, 문장은 단어를 고른 뒤 계속해야 저장됩니다.",`Google Play: ${It()}`]},{slug:"ios-availability",question:"iPhone이나 iPad에서도 사용할 수 있나요?",answer:["iPhone/iPad 앱에는 다른 앱의 공유 메뉴와 클립보드 확인을 통해 단어를 Inbox로 보내는 흐름이 있습니다.","iPhone/iPad 앱은 App Store에서 공개적으로 사용할 수 있습니다. 설치한 뒤 Share → Orvoca 또는 Orvoca로 돌아온 뒤 표시되는 Save를 사용하세요.","Safari Extension은 iOS/iPadOS 16.4 이상에서 별도로 켜고 사이트 접근 권한을 허용해야 합니다.","App Store: "+Ht]},{slug:"exam-prep-fit",question:"시험 준비용 앱인가요?",answer:["주력 용도는 시험 대비가 아닙니다.","Orvoca는 뉴스, 칼럼, 에세이, 책처럼 실제 읽기에서 만난 단어를 남기고 싶은 사용자에게 더 잘 맞습니다."]},{slug:"who-is-it-for",question:"어떤 사람에게 잘 맞나요?",answer:["영어 글을 읽다가 모르는 단어를 그냥 넘기기 아깝다고 느끼는 사람에게 잘 맞습니다.","단어 목록을 따로 만들기보다 실제 문장과 함께 단어를 저장하고 나중에 다시 보고 싶은 사용자에게 특히 적합합니다."]},{slug:"how-review-works",question:"단어를 저장하면 바로 학습 목록에 들어가나요?",answer:["외부에서 수집한 항목은 바로 복습 목록에 들어가지 않고 먼저 Inbox에 도착합니다.","Inbox에서 뜻을 선택하거나 Edit로 수정한 뒤 Save를 눌러야 Vocabulary에 등록됩니다. Skip 또는 Reject를 선택하면 보관하지 않습니다."]},{slug:"site-scoped-capture",question:"아무 사이트에서나 작동하나요?",answer:["아닙니다.","Chrome Extension의 Site capture를 켜고 권한을 허용한 사이트에서만 웹페이지 선택 캡처가 작동합니다. 웹 콘솔 자체는 웹페이지를 자동으로 읽거나 저장하지 않습니다."]},{slug:"web-console-manual",question:"웹 콘솔에서 단어를 직접 추가할 수 있나요?",answer:["가능합니다. Vocabulary에서 Add word를 누르고 word, language, part of speech, meaning을 입력하세요.","이 경로는 Inbox를 거치
50지 않고 바로 Vocabulary에 등록됩니다. 원문 문맥과 source URL은 자동으로 생기지 않습니다."],steps:[{text:"Vocabulary를 엽니다.",imageKey:"capture.web.vocabulary"},{text:"Add word를 누르고 단어 정보를 입력합니다.",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"웹 콘솔이 현재 웹페이지의 단어를 자동으로 수집하나요?",answer:["아닙니다. Web Console은 Vocabulary와 Inbox를 관리하는 화면이며 웹페이지를 자동으로 읽지 않습니다.","웹에서 읽다가 저장하려면 Chrome Extension을 사용하고, 수집 항목은 Inbox에서 확인하세요."],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"Chrome에서 웹페이지의 단어를 어떻게 저장하나요?",answer:["읽다가 단어를 선택하고 선택 영역 주변의 Orvoca에 저장을 누르는 상황에 사용합니다.","선택한 word가 Inbox에 저장되고, 설정과 페이지가 허용하면 주변 문장과 정리된 page URL도 함께 저장됩니다."],steps:[{text:"단어를 드래그해 선택합니다.",imageKey:"capture.chrome.selection"},{text:"선택 영역 주변의 Orvoca에 저장을 누릅니다.",imageKey:"capture.chrome.overlay"},{text:"Inbox에서 뜻을 확인하고 Save를 누릅니다."}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"Chrome 우클릭 메뉴로도 저장할 수 있나요?",answer:["선택 영역 주변의 버튼이 보이지 않을 때 텍스트를 선택하고 우클릭 메뉴의 Add to Orvoca를 사용하세요.","선택한 word 또는 phrase와 page URL이 Inbox로 전송됩니다. 이 경로는 주변 문장을 자동으로 붙이지 않습니다."],steps:[{text:"단어나 구를 선택하고 우클릭 메뉴에서 Add to Orvoca를 누릅니다.",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"Chrome에서 복사만 해도 자동으로 저장되나요?",answer:["아닙니다. Chrome Extension은 Ctrl+C나 복사 이벤트만으로 저장하지 않습니다.","텍스트를 선택한 뒤 Orvoca에 저장 또는 우클릭 메뉴의 Add to Orvoca를 직접 눌러야 Inbox에 들어갑니다."],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"iPhone/iPad에서 공유 메뉴로 단어를 저장하려면 어떻게 하나요?",answer:["다른 앱에서 word 또는 sentence를 선택하고 Share에서 Orvoca를 선택하세요.","word를 공유하면 word만 Inbox에 저장됩니다. sentence를 공유하면 단어를 고르고 Continue를 눌러 word와 원문 문장을 함께 저장합니다. 단어를 고르지 않으면 문장형 항목으로 남습니다."],steps:[{text:"텍스트를 선택하고 Share에서 Orvoca를 선택한 뒤 문장이라면 Continue를 누릅니다.",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"iPhone/iPad에서 복사한 텍스트도 저장할 수 있나요?",answer:["가능합니다. 다른 앱에서 복사한 뒤 Orvoca로 돌아와 확인 화면에서 Save를 누르세요.","복사한 word는 문맥과 URL 없이 저장됩니다. sentence를 복사했다면 단어를 고르고 Continue를 눌러 원문 문장과 함께 저장할 수 있으며, Cancel을 누르면 저장하지 않습니다."],steps:[{text:"텍스트를 복사하고 Orvoca로 돌아와 Save를 누릅니다.",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"Safari에서 읽다가 바로 저장할 수 있나요?",answer:["iOS/iPadOS 16.4 이상에서 Settings → Safari → Extensions에서 Orvoca를 켜고 사이트 접근을 허용하세요.","Safari에서 단어를 선택하고 Orvoca에 저장을 누르면 word, 가능한 주변 문장, 정리된 page URL이 Inbox로 갑니다. URL만 따로 저장하거나 권한 없는 사이트에서 저장할 수는 없습니다."],steps:[{text:"확장 프로그램을 켜고 사이트를 허용한 뒤 단어를 선택해 Orvoca에 저장을 누릅니다.",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"Android에서 단어를 어떻게 저장하나요?",answer:["다른 앱에서 word 또는 sentence를 선택하거나 공유한 뒤 Android 공유 시트에서 Orvoca를 선택하세요.","word는 Inbox로 가고, sentence는 단어를 고른 뒤 Continue를 눌러 선택한 word와 원문 문장을 함께 저장합니다. 일반 공유 경로에는 보통 page URL이 없습니다."],steps:[{text:"텍스트를 공유하고 Orvoca를 선택한 뒤 문장이라면 Continue를 누릅니다.",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"Android에서 복사한 텍스트도 저장할 수 있나요?",answer:["가능합니다. 텍스트를 복사한 뒤 Orvoca를 열거나 다시 활성화하고 확인 화면에서 Save를 누르세요.","복사한 word는 문맥과 URL 없이 저장됩니다. sentence는 단어를 고르고 Continue를 눌러 원문 문장과 함께 저장합니다. 백그라운드에서 클립보드를 몰래 저장하지는 않습니다."],steps:[{text:"텍스트를 복사하고 Orvoca를 열어 Save를 누릅니다.",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"수집한 단어는 어디에서 확인하고 단어장에 넣나요?",answer:["Chrome, Safari, 공유 메뉴, 클립보드에서 들어온 외부 수집 항목은 먼저 Inbox에서 확인합니다.","Inbox에서 뜻을 선택하고 필요하면 Edit로 고친 뒤 Save를 누르면 Vocabulary에 등록됩니다. 문장형 항목은 먼저 학습할 word를 선택해야 합니다."],steps:[{text:"Inbox에서 뜻을 선택하거나 Edit로 수정한 뒤 Save를 누릅니다.",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"단어와 원문 문장, URL이 모두 저장되나요?",answer:["수집 경로에 따라 다릅니다. Chrome 선택 캡처와 Safari Extension은 주변 문장과 정리된 page URL을 붙일 수 있고, Chrome 우클릭은 선택 텍스트와 page URL을 보냅니다.","공유나 클립보드로 word만 보낸 경우 문맥과 URL이 없을 수 있습니다. 시스템이 없는 문맥이나 URL을 임의로 만들지는 않습니다."],category:"inbox"},{slug:"capture-not-saving",question:"저장했는데 Inbox에 보이지 않으면 무엇을 확인하나요?",answer:["Saved to inbox 확인이 표시되었는지, 계정이 연결되어 있는지, 사이트 capture 권한이 켜져 있는지 확인하세요.","모바일 공유와 클립보드 수집은 Orvoca를 다시 열어야 가져ì˜
50¤ê¸°ê°€ 끝날 수 있습니다. 오프라인이었다면 다시 연결한 뒤 Inbox를 새로고침하세요."],category:"troubleshooting"},{slug:"site-capture-disabled",question:"Chrome에서 Orvoca 버튼이 보이지 않으면 어떻게 하나요?",answer:["Chrome Extension 팝업에서 현재 사이트의 Site capture를 확인하고 Toggle site capture를 누른 뒤 요청된 사이트 권한을 허용하세요.","브라우저 내부 페이지, 입력창, 권한이 없는 사이트에서는 버튼이 나타나지 않습니다. 권한을 바꾼 뒤 페이지를 새로고침하고 단어를 다시 선택하세요."],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"저장할 수 없는 텍스트나 길이 제한이 있나요?",answer:["빈 텍스트, 유효한 캡처로 보기 어려운 입력, 너무 긴 텍스트는 거부될 수 있습니다. 일반 캡처 입력은 최대 500자입니다.","문장 전체가 자동으로 단어장 단어가 되지는 않으므로 학습할 word를 선택하세요. Inbox 대기 항목 수에도 제한이 있습니다."],category:"troubleshooting"}],V3=[{slug:"what-is-orvoca",question:"What is Orvoca?",answer:["Orvoca helps you keep words worth seeing again without breaking your reading flow.","Send a word from the web, Chrome Extension, iPhone/iPad, or Android to Inbox first. Check the meaning there, then save selected items to Vocabulary for review."]},{slug:"different-from-dictionary",question:"How is Orvoca different from a dictionary or translator?",answer:["Dictionaries and translators solve the immediate meaning problem.","Orvoca focuses on what happens next: keeping the word in Inbox, checking it with its original context, and saving it to Vocabulary for later review."]},{slug:"available-now",question:"Can I use Orvoca right now?",answer:["The public web and Chrome Extension flows are available now, and the Android app is distributed through Google Play.","The iPhone/iPad app and Safari Extension are publicly supported. On iOS, use Share → Orvoca or return to Orvoca and choose Save from the copied-text prompt."]},{slug:"android-availability",question:"Is Android supported?",answer:["Yes. The Android app is available on Google Play.","Select or share a word or sentence from another app, choose Orvoca in the Android share sheet, and confirm sentence words with Continue when prompted.",`Google Play: ${It()}`]},{slug:"ios-availability",question:"Can I use Orvoca on iPhone or iPad?",answer:["Yes. The iPhone/iPad app is publicly available through the App Store. It can send text from Share or confirm copied text before adding it to Inbox.","After installation, use Share → Orvoca or the copied-text Save prompt. Safari Extension requires iOS/iPadOS 16.4 or later and separate site permission.","App Store: "+Ht]},{slug:"exam-prep-fit",question:"Is Orvoca for exam prep?",answer:["Exam prep is not the primary use case.","Orvoca is built for people who read in another language and want to keep useful words from real articles, essays, books, and everyday pages, with the original reading context when available."]},{slug:"who-is-it-for",question:"Who is Orvoca for?",answer:["Orvoca is for readers who hate losing good words while reading in a second language.","It is especially useful if you want vocabulary from real reading instead of disconnected word lists, and want to decide in Inbox what is worth keeping."]},{slug:"how-review-works",question:"Do captured words go straight into review?",answer:["Not by default.","Captured items first land in Inbox. Choose a meaning, use Edit if needed, and choose Save before the word enters Vocabulary; Skip or Reject leaves it out."]},{slug:"site-scoped-capture",question:"Does Orvoca run on every website?",answer:["No.","The Chrome Extension only captures on sites where Site capture is enabled and permission is allowed. The Web Console does not read or capture the current webpage by itself."]},{slug:"web-console-manual",question:"Can I add a word directly from the Web Console?",answer:["Yes. Open Vocabulary, choose Add word, and enter the word, language, part of speech, and meaning.","This path goes directly to Vocabulary instead of Inbox. No reading context or source URL is created automatically."],steps:[{text:"Open Vocabulary.",imageKey:"capture.web.vocabulary"}
50,{text:"Choose Add word and enter the word details.",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"Does the Web Console automatically capture words from the current page?",answer:["No. The Web Console manages Vocabulary and Inbox; it does not read the webpage automatically.","Use the Chrome Extension while reading on the web, then review the captured item in Inbox."],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"How do I save a word from a webpage in Chrome?",answer:["While reading, select a word and choose Save to Orvoca from the button beside the selection.","The selected word goes to Inbox. When the setting and page allow it, Orvoca also keeps the surrounding sentence and a sanitized page URL."],steps:[{text:"Drag across the word.",imageKey:"capture.chrome.selection"},{text:"Choose Save to Orvoca beside the selection.",imageKey:"capture.chrome.overlay"},{text:"Open Inbox and choose Save after checking the meaning."}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"Can I save a word with the Chrome right-click menu?",answer:["Yes. Select the text, open the right-click menu, and choose Add to Orvoca.","The selected word or phrase and the page URL go to Inbox. This route does not automatically add the surrounding sentence."],steps:[{text:"Select the word, then choose Add to Orvoca.",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"Does copying text save it automatically in Chrome?",answer:["No. The Chrome Extension does not save text from Ctrl+C or a copy event by itself.","Select the text and choose Save to Orvoca, or use Add to Orvoca from the right-click menu, to send it to Inbox."],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"How do I save a word from the Share menu on iPhone or iPad?",answer:["Select a word or sentence in another app, open Share, and choose Orvoca.","A shared word is saved as a word-only Inbox item. A shared sentence asks you to choose a word and Continue; without a word selection it remains a sentence item."],steps:[{text:"Select text, open Share, choose Orvoca, then tap Continue for a sentence.",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"Can I save copied text on iPhone or iPad?",answer:["Copy the text in another app, return to Orvoca, and choose Save on the confirmation screen.","A copied word has no context or URL. For a copied sentence, choose a word and Continue to keep it with the original sentence; Cancel does not save it."],steps:[{text:"Copy text, return to Orvoca, and choose Save.",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"Can I save a word directly from Safari?",answer:["On iOS/iPadOS 16.4 or later, enable Orvoca in Settings → Safari → Extensions and allow access to the site.","Select a word in Safari and choose Save to Orvoca. The Inbox item can include the word, surrounding sentence, and sanitized page URL; URL-only capture is not supported."],steps:[{text:"Enable the extension, allow the site, then choose Save to Orvoca after selecting a word.",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"How do I save a word on Android?",answer:["Select or share a word or sentence from another app, then choose Orvoca in the Android share sheet.","A shared word goes to Inbox. A shared sentence asks you to choose a word and tap Continue; the selected word and original sentence are saved. The normal share route generally has no page URL."],steps:[{text:"Share text, choose Orvoca, then tap Continue for a sentence.",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"Can I save copied text on Android?",answer:["Copy the text, open or return to Orvoca, and choose Save on the confirmation screen.","A copied word has no context or URL. For a sentence, choose a word and Continue to save it with the original sentence. Orvoca does not silently save clipboard contents in the background."],steps:[{text:"Copy text, open Orvoca, and choose Save.",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"Where do captured words go, and how do I add them to Vocabulary?",answer:["Items from Chrome, Safari, Share, and clipboard capture arrive in Inbox first.","Choose a meaning, use Edit if needed, and choose Save to add a word to Vocabulary. Sentence items need a word selection first."],steps:[{text:"Open Inbox, choose a meaning or Edit, then choose Save.",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"Are the original sentence and URL saved with a word?",answer:["Chrome selection capture and Safari Extension can keep the surrounding sentence and a sanitized page URL; Chrome right-click keeps the selected text and page URL.","A word sent through Share or clipboard may have no context or URL. Orvoca does not invent missing context or URLs."],category:"inbox"},{slug:"capture-not-saving",question:"What should I check if a saved item is not in Inbox?",answer:["Check for the Saved to inbox confirmation, confirm that your account is connected, and verify site capture permission.","Mobile Share and clipboard captures may finish importing when you open Orvoca again. If you were offline, reconnect and refresh Inbox."],category:"troubleshooting"},{slug:"site-capture-disabled",question:"What if the Orvoca button does not appear in Chrome?",answer:["Open the Chrome Extension popup, check Site capture, choose Toggle site capture, and allow the requested site permission.","The button does not appear on browser internal pages, inside editable fields, or on sites without permission. Reload and select the word again."],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"Are there text or length limits?",answer:["Empty text, invalid capture text, and overly long input may be rejected. Ordinary capture input is limited to 500 characters.","A full sentence is not automatically stored as a vocabulary word; choose the word to learn. Inbox also has a capacity limit."],category:"troubleshooting"}],W3=[{slug:"what-is-orvoca",question:"Orvocaはどんなサービスですか?",answer:["Orvocaは、読む流れを止めずに、あとで見直したい単語を残せるサービスです。","Web、Chrome Extension、iPhone/iPad、Androidから単語をInboxに送り、意味と元の文を確認してから
50Vocabularyに保存します。"]},{slug:"different-from-dictionary",question:"辞書や翻訳アプリとは何が違いますか?",answer:["辞書や翻訳アプリは、その場で意味を理解するためのものです。","Orvocaはその先に焦点を当てます。単語をInboxに保存し、元の文脈を確認してからVocabularyに登録し、あとで復習できます。"]},{slug:"available-now",question:"今すぐ使えますか?",answer:["公開WebとChrome Extensionは現在利用でき、AndroidアプリはGoogle Playから配布しています。","iPhone/iPadアプリとSafari Extensionも公開対応しています。iOSではShare → Orvoca、またはOrvocaに戻ってコピー後のSaveを使います。"]},{slug:"android-availability",question:"Androidに対応していますか?",answer:["はい。AndroidアプリはGoogle Playで利用できます。","別のアプリで単語や文を選択または共有し、Androidの共有シートでOrvocaを選びます。文の場合は単語を選んでContinueを押します。",`Google Play: ${It()}`]},{slug:"ios-availability",question:"iPhoneやiPadに対応していますか?",answer:["iPhone/iPadアプリでは、別のアプリのShareやコピー後の確認画面からテキストをInboxに送れます。","iPhone/iPadアプリはApp Storeで公開されています。インストール後はShare → Orvoca、またはコピー後に表示されるSaveを使います。Safari ExtensionはiOS/iPadOS 16.4以上で別途有効化が必要です。","App Store: "+Ht]},{slug:"exam-prep-fit",question:"試験対策用のアプリですか?",answer:["主な用途は試験対策ではありません。","Orvocaは、ニュース、コラム、エッセイ、書籍など、実際の読書で出会った単語を残したい人に向いています。"]},{slug:"who-is-it-for",question:"どんな人に向いていますか?",answer:["外国語の文章を読んでいて、よい単語をそのまま失いたくない人に向いています。","単語リストを別に作るより、元の文と一緒に保存してあとで見直したい人に特に役立ちます。"]},{slug:"how-review-works",question:"保存した単語はすぐ復習に入りますか?",answer:["外部から保存した項目は、すぐに復習には入らず、まずInboxに届きます。","Inboxで意味を選び、必要ならEditで修正してからSaveを押すとVocabularyに登録されます。SkipやRejectでは保存されません。"]},{slug:"site-scoped-capture",question:"どのサイトでも動作しますか?",answer:["いいえ。","Chrome ExtensionのSite captureを有効にし、権限を許可したサイトでのみWebページの選択キャプチャが動作します。Webコンソール自体がページを自動で読み取ることはありません。"]},{slug:"web-console-manual",question:"Webコンソールから単語を直接追加できますか?",answer:["はい。VocabularyでAdd wordを選び、word、language、part of speech、meaningを入力します。","この方法はInboxを経由せずVocabularyに直接登録されます。元の文脈やsource URLは自動では作られません。"],steps:[{text:"Vocabularyを開きます。",imageKey:"capture.web.vocabulary"},{text:"Add wordを選び、単語情報を入力します。",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"Webコンソールは現在のページから単語を自動保存しますか?",answer:["いいえ。WebコンソールはVocabularyとInboxを管理する画面で、ページを自動で読み取りません。","Webで読むときはChrome Extensionを使い、保存した項目をInboxで確認します。"],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"ChromeのWebページから単語を保存するにはどうすればよいですか?",answer:["読んでいる途中で単語を選択し、選択範囲の近くにあるOrvocaに保存を押します。","選択したwordはInboxに入り、設定とページが許可していれば周辺の文と整理されたpage URLも保存さã
50‚Œã¾ã™ã€‚"],steps:[{text:"単語をドラッグして選択します。",imageKey:"capture.chrome.selection"},{text:"選択範囲の近くにあるOrvocaに保存を押します。",imageKey:"capture.chrome.overlay"},{text:"Inboxで意味を確認してSaveを押します。"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"Chromeの右クリックメニューからも保存できますか?",answer:["選択範囲のボタンが使えないときは、テキストを選択して右クリックメニューからAdd to Orvocaを選びます。","選択したwordまたはphraseとpage URLがInboxに送られます。この方法では周辺の文は自動追加されません。"],steps:[{text:"単語を選択し、右クリックメニューからAdd to Orvocaを選びます。",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"Chromeでコピーするだけで自動保存されますか?",answer:["いいえ。Chrome ExtensionはCtrl+Cやコピーイベントだけでは保存しません。","テキストを選択してOrvocaに保存を押すか、右クリックメニューのAdd to Orvocaを選び、Inboxに送ります。"],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"iPhone/iPadのShareメニューから単語を保存するには?",answer:["別のアプリでwordまたはsentenceを選択し、ShareからOrvocaを選びます。","wordはwordだけのInbox項目になります。sentenceの場合は単語を選びContinueを押すとwordと元の文が保存され、単語を選ばなければ文として残ります。"],steps:[{text:"テキストを選択し、ShareでOrvocaを選び、文ならContinueを押します。",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"iPhone/iPadでコピーしたテキストも保存できますか?",answer:["別のアプリでコピーしてOrvocaに戻り、確認画面でSaveを選びます。","コピーしたwordには文脈とURLがありません。sentenceの場合は単語を選んでContinueを押すと元の文と保存できます。Cancelでは保存されません。"],steps:[{text:"テキストをコピーし、Orvocaに戻ってSaveを選びます。",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"Safariで読んでいるページから直接保存できますか?",answer:["iOS/iPadOS 16.4以上で、Settings → Safari → ExtensionsからOrvocaを有効にし、サイトへのアクセスを許可します。","Safariで単語を選択してOrvocaに保存を押すと、word、周辺の文、整理されたpage URLをInboxに送れます。URLだけの保存には対応していません。"],steps:[{text:"拡張機能を有効にしてサイトを許可し、単語を選んでOrvocaに保存を押します。",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"Androidで単語を保存するにはどうすればよいですか?",answer:["別のアプリでwordまたはsentenceを選択または共有し、Androidの共有シートでOrvocaを選びます。","wordはInboxに入り、sentenceは単語を選んでContinueを押すとwordと元の文が保存されます。通常の共有ではpage URLはありません。"],steps:[{text:"テキストを共有し、Orvocaを選び、文ならContinueを押します。",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"Androidでコピーしたテキストも保存できますか?",answer:["テキストをコピーしてOrvocaを開くか戻り、確認画面でSaveを選びます。","コピーしたwordには文脈とURLがありません。sentenceは単語を選んでContinueを押すと元の文と保存できます。バックグラウンドでクリップボードを黙って保存することはありません。"],steps:[{text:"テキストをコピーし、Orvocaを開いてSaveを選びます。",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"保存した単語はどこで確認し、Vocabularyに入れますか?",answer:["Chrome、Safari、Share、クリップボードから届いた項目はまずInboxで確認します。","Inboxで意味を選び、必要ならEditで修正してSaveを押すとVocabularyに登録されます。文の項目は先に学習するwordを選びます。"],steps:[{text:"Inboxで意味を選ぶかEditで修正し、Saveを押します。",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"元の文やURLも単語と一緒に保存さã
50‚Œã¾ã™ã‹ï¼Ÿ",answer:["保存方法によります。Chromeの選択キャプチャとSafari Extensionは周辺の文と整理されたpage URLを保存でき、Chromeの右クリックは選択テキストとpage URLを保存します。","Shareやクリップボードでwordだけ送った場合、文脈やURLがないことがあります。ない情報をOrvocaが推測して作ることはありません。"],category:"inbox"},{slug:"capture-not-saving",question:"保存した項目がInboxに見つからないときは?",answer:["Saved to inboxの表示、アカウント接続、サイトのcapture権限を確認してください。","モバイルのShareやクリップボードの項目は、Orvocaをもう一度開くと取り込みが完了することがあります。オフラインなら再接続してInboxを更新します。"],category:"troubleshooting"},{slug:"site-capture-disabled",question:"ChromeでOrvocaのボタンが表示されないときは?",answer:["Chrome ExtensionのポップアップでSite captureを確認し、必要ならToggle site captureを押してサイト権限を許可します。","ブラウザ内部ページ、入力欄、権限のないサイトでは表示されません。権限を変更したらページを更新して単語を選び直します。"],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"保存できないテキストや文字数の制限はありますか?",answer:["空のテキスト、有効なキャプチャではない入力、長すぎるテキストは拒否されることがあります。通常のキャプチャは最大500文字です。","文全体が自動でVocabularyの単語になるわけではないため、学習するwordを選びます。Inboxの保留項目数にも上限があります。"],category:"troubleshooting"}],q3=[{slug:"what-is-orvoca",question:"Orvoca 是什么服务?",answer:["Orvoca 帮你在不打断阅读节奏的情况下,保存以后想再看的单词。","你可以从 Web、Chrome Extension、iPhone/iPad 或 Android 把单词发送到 Inbox,确认释义后再保存到 Vocabulary 复习。"]},{slug:"different-from-dictionary",question:"Orvoca 和词典或翻译工具有什么不同?",answer:["词典和翻译工具解决的是当下理解意思的问题。","Orvoca 关注的是之后发生的事:把单词留在 Inbox,结合原文语境确认,再保存到 Vocabulary 供以后复习。"]},{slug:"available-now",question:"现在可以使用 Orvoca 吗?",answer:["公开 Web 和 Chrome Extension 目前可以使用,Android app 通过 Google Play 分发。","iPhone/iPad app 和 Safari Extension 也提供公开支持。在 iOS 上,可以使用 Share → Orvoca,或返回 Orvoca 后在复制文本提示中点按 Save。"]},{slug:"android-availability",question:"支持 Android 吗?",answer:["支持。Android app 已在 Google Play 上架。","在其他 app 中选择或分享单词或句子,然后在 Android 分享面板中选择 Orvoca。分享句子时,选择单词并点按 Continue。",`Google Play: ${It()}`]},{slug:"ios-availability",question:"支持 iPhone 或 iPad 吗?",answer:["iPhone/iPad app 支持通过其他 app 的 Share 菜单,或返回 Orvoca 后确认复制的文本,将内容发送到 Inbox。","iPhone/iPad app 已在 App Store 公开提供。安装后可以使用 Share → Orvoca,或复制文本后出现的 Save。Safari Extension 需要 iOS/iPadOS 16.4 或更高版本,并且要单独启用。","App Store: "+Ht]},{slug:"exam-prep-fit",question:"Orvoca 是考试备考应用吗?",answer:["考试备考不是主要使用场景。","Orvoca 更适合阅读新闻、专栏、散文或书籍时,希望留下真实语境中遇到的单词的用户。"]},{slug:"who-is-it-for",question:"Orvoca 适合谁?",answer:["适合那些在阅读外语内容时,不想错过好词的人。","如果你想把单词和原句一起保存,之后在 Inbox 中决定哪些内容值得保留,Orvoca 会特别有用。"]},{slug:"how-review-works",question:"捕捉的单词会直接进入复习吗?",answer:["默认情况下不会。","捕捉的内容会先进入 Inbox。选择释义,需要时使用 Edit 修改,然后选择 Save 才会进入 Vocabulary;Skip 或 Reject 不会保存。"]},{slug:"site-scoped-capture",question:"Orvoca 会在所有网站上运行吗?",answer:["不会。","Chrome Extension 只会在启用 Site capture 并允许权限的网站上捕捉。Web Console 不会自动读取当前网页。"]},{slug:"web-console-manual",question:"可以在 Web Console 中直接添加单词吗?",answer:["可以。在 Vocabulary 中选择 Add word,然后填写 word、language、part of speech 和 meaning。","这条路径会直接添加到 Vocabulary,不经过 Inbox,也不会自动生成原文语境或 source URL。"],steps:[{text:"打开 Vocabulary。",
50imageKey:"capture.web.vocabulary"},{text:"选择 Add word 并填写单词信息。",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"Web Console 会自动捕捉当前网页中的单词吗?",answer:["不会。Web Console 用于管理 Vocabulary 和 Inbox,不会自动读取网页。","在 Web 上阅读时,请使用 Chrome Extension,然后在 Inbox 中查看捕捉的内容。"],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"在 Chrome 网页中如何保存单词?",answer:["阅读时选中单词,然后点击选区旁边的保存到 Orvoca。","选中的 word 会进入 Inbox。如果设置和网页允许,还会保存周围句子和经过清理的 page URL。"],steps:[{text:"拖动选中单词。",imageKey:"capture.chrome.selection"},{text:"点击选区旁边的保存到 Orvoca。",imageKey:"capture.chrome.overlay"},{text:"打开 Inbox,确认释义后选择 Save。"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"可以通过 Chrome 右键菜单保存吗?",answer:["可以。选中文本后打开右键菜单,选择 Add to Orvoca。","选中的 word 或 phrase 和 page URL 会进入 Inbox。这条路径不会自动添加周围句子。"],steps:[{text:"选中单词,然后在右键菜单中选择 Add to Orvoca。",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"在 Chrome 中只复制文本也会自动保存吗?",answer:["不会。Chrome Extension 不会因为 Ctrl+C 或复制事件自动保存文本。","请选中文本后点击保存到 Orvoca,或在右键菜单中选择 Add to Orvoca,才能将内容发送到 Inbox。"],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"如何从 iPhone/iPad 的 Share 菜单保存单词?",answer:["在其他 app 中选中 word 或 sentence,然后打开 Share 并选择 Orvoca。","分享 word 时会保存为只有 word 的 Inbox 条目。分享 sentence 时,请选择一个单词并点按 Continue,才能把 word 和原句一起保存;不选择单词则会保留为句子条目。"],steps:[{text:"选中文本,在 Share 中选择 Orvoca;如果是句子,再点按 Continue。",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"可以在 iPhone/iPad 上保存复制的文本吗?",answer:["可以。在其他 app 中复制文本后返回 Orvoca,在确认页面选择 Save。","复制的 word 不带语境或 URL。复制 sentence 时,选择单词并点按 Continue 可将 word 与原句一起保存;选择 Cancel 则不会保存。"],steps:[{text:"复制文本,返回 Orvoca,然后选择 Save。",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"可以直接从 Safari 保存单词吗?",answer:["在 iOS/iPadOS 16.4 或更高版本中ï¼
50Œå‰å¾€ Settings → Safari → Extensions 启用 Orvoca,并允许访问该网站。","在 Safari 中选中单词并选择保存到 Orvoca。Inbox 条目可以包含 word、周围句子和经过清理的 page URL;不支持只保存 URL。"],steps:[{text:"启用扩展、允许网站访问,选中单词后选择保存到 Orvoca。",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"如何在 Android 上保存单词?",answer:["在其他 app 中选择或分享 word 或 sentence,然后在 Android 分享面板中选择 Orvoca。","分享 word 会进入 Inbox。分享 sentence 时,选择单词并点按 Continue 才会保存 word 和原句;普通分享通常不会带 page URL。"],steps:[{text:"分享文本,选择 Orvoca;如果是句子,再点按 Continue。",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"可以在 Android 上保存复制的文本吗?",answer:["可以。复制文本后打开或返回 Orvoca,在确认页面选择 Save。","复制的 word 不带语境或 URL。复制 sentence 时,选择单词并点按 Continue 可与原句一起保存。Orvoca 不会在后台悄悄保存剪贴板内容。"],steps:[{text:"复制文本,打开 Orvoca,然后选择 Save。",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"捕捉的单词在哪里查看,如何添加到 Vocabulary?",answer:["来自 Chrome、Safari、Share 和剪贴板的内容会先进入 Inbox。","在 Inbox 中选择释义,需要时使用 Edit 修改,再选择 Save 才会添加到 Vocabulary。句子条目需要先选择要学习的 word。"],steps:[{text:"打开 Inbox,选择释义或 Edit,然后选择 Save。",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"原句和 URL 会与单词一起保存吗?",answer:["取决于捕捉路径。Chrome 选区捕捉和 Safari Extension 可以保存周围句子与经过清理的 page URL;Chrome 右键菜单会保存选中文本和 page URL。","通过 Share 或剪贴板发送的 word 可能没有语境或 URL。Orvoca 不会编造缺失的语境或 URL。"],category:"inbox"},{slug:"capture-not-saving",question:"保存后在 Inbox 中找不到内容怎么办?",answer:["请确认是否看到 Saved to inbox,账号是否已连接,以及网站的 capture 权限是否已开启。","移动端 Share 和剪贴板内容可能需要重新打开 Orvoca 才会完成导入。如果当时离线,请重新连接并刷新 Inbox。"],category:"troubleshooting"},{slug:"site-capture-disabled",question:"Chrome 中没有显示 Orvoca 按钮怎么办?",answer:["打开 Chrome Extension 弹窗,检查 Site capture,选择 Toggle site capture,并允许请求的网站权限。","浏览器内部页面、输入框或未授权的网站不会显示按钮。修改权限后刷新页面,再次选中单词。"],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"可保存的文本有长度或其他限制吗?",answer:["空文本、无效的捕捉文本和过长的输入可能会被拒绝。普通捕捉输入最多 500 个字符。","完整句子不会自动变成 Vocabulary 中的单词,请选择要学习的 word。Inbox 的待处理条目数量也有限制。"],category:"troubleshooting"}],G3=[{slug:"what-is-orvoca",question:"Orvoca 是什麼服務?",answer:["Orvoca 讓你在不打斷閱讀節奏的情況下,留下之後值得再看的單字。","先將單字從 Web、Chrome Extension、iPhone/iPad 或 Android 傳送到 Inbox。在 Inbox 確認意思,再將選定的項目儲存到 Vocabulary 以便複習。"]},{slug:"different-from-dictionary",question:"Orvoca 和字典或翻譯工具有什麼不同?",answer:["字典和翻譯工具解決的是當下理解意思的問題。","Orvoca 關注的是接下來的步驟:把單字留在 Inbox,結合原始語境確認,再儲存到 Vocabulary 供日後複習。"]},{slug:"available-now",question:"現在就能使用 Orvoca 嗎?",answer:["公開提供的 Web 和 Chrome Extension 現在就能使用,Android app 透過 Google Play 發布。","iPhone/iPad app 與 Safari Extension 也公開支援。在 iOS 上,使用 Share → Orvoca,或返回 Orvoca 後,在複製文字提示中選擇 Save。"]},{slug:"android-availability",question:"支援 Android 嗎?",answer:["是的。Android app 可在 Google Play 使用。","在其他 app 選取或分享單字或句子,於 Android 分享面板選擇 Orvoca;出現提示時選取句子中的單字並選擇 Continue。",`Google Play: ${It()}`]},{slug:"ios-availability",question:"可以在 iPhone 或 iPad 上使用 Orvoca 嗎?",answer:["iPhone/iPad app 可透過其他 app 的 Shareï¼
50Œæˆ–確認複製的文字,將內容送到 Inbox。","iPhone/iPad app 已在 App Store 公開提供。安裝後使用 Share → Orvoca,或在複製文字提示中選擇 Save。Safari Extension 需要 iOS/iPadOS 16.4 或以上版本,並另外授予網站權限。","App Store: "+Ht]},{slug:"exam-prep-fit",question:"Orvoca 適合準備考試嗎?",answer:["考試準備不是主要使用情境。","Orvoca 適合在閱讀新聞、專欄、散文、書籍等實際內容時,想保留遇到的實用單字,並在可用時連同原始閱讀語境一起保存的人。"]},{slug:"who-is-it-for",question:"Orvoca 適合哪些人?",answer:["適合用第二語言閱讀時,不想錯過好單字的讀者。","如果你想從實際閱讀中累積詞彙,而不是使用互不相關的單字清單,並在 Inbox 中決定哪些值得保留,Orvoca 特別適合你。"]},{slug:"how-review-works",question:"捕捉的單字會直接進入複習嗎?",answer:["預設不會。","捕捉的項目會先進到 Inbox。選擇意思,需要時用 Edit 修改,再選擇 Save,單字才會進入 Vocabulary;Skip 或 Reject 則不會保留。"]},{slug:"site-scoped-capture",question:"Orvoca 會在所有網站上執行嗎?",answer:["不會。","Chrome Extension 只會在啟用 Site capture 且已允許權限的網站上捕捉。Web Console 不會自行讀取或捕捉目前的網頁。"]},{slug:"web-console-manual",question:"可以直接從 Web Console 新增單字嗎?",answer:["可以。開啟 Vocabulary,選擇 Add word,輸入 word、language、part of speech 和 meaning。","這條路徑會直接進入 Vocabulary,不經過 Inbox。系統不會自動建立閱讀語境或 source URL。"],steps:[{text:"開啟 Vocabulary。",imageKey:"capture.web.vocabulary"},{text:"選擇 Add word 並輸入單字資訊。",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"Web Console 會自動從目前頁面捕捉單字嗎?",answer:["不會。Web Console 用來管理 Vocabulary 和 Inbox,不會自動讀取網頁。","在 Web 上閱讀時使用 Chrome Extension,再到 Inbox 查看捕捉的項目。"],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"在 Chrome 網頁上要如何儲存單字?",answer:["閱讀時選取單字,從選取範圍旁的按鈕選擇 Save to Orvoca。","選取的單字會進入 Inbox。如果設定和網頁允許,Orvoca 也會保留周圍句子和經過清理的 page URL。"],steps:[{text:"拖曳選取單字。",imageKey:"capture.chrome.selection"},{text:"從選取範圍旁選擇 Save to Orvoca。",imageKey:"capture.chrome.overlay"},{text:"開啟 Inbox,確認意思後選擇 Save。"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"可以用 Chrome 右鍵選單儲存單字嗎?",answer:["可以。選取文字、開啟右鍵選單,然後選擇 Add to Orvoca。","選取的單字或片語和 page URL 會進入 Inbox。這條路徑不會自動加入周圍句子。"],steps:[{text:"選取單字,然後在右鍵選單中選擇 Add to Orvoca。",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"在 Chrome 複製文字會自動儲存嗎?",answer:["不會。Chrome Extension 不會自行儲存 Ctrl+C 或複製事件中的文字。","選取文字後選擇 Save to Orvoca,或在右鍵選單選擇 Add to Orvoca,將其傳送到 Inbox。"],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"如何從 iPhone 或 iPad 的 Share 選單儲存單字?",answer:["在其他 app 選取單字或句子,開啟 Share,選擇 Orvoca。","分享單字時會儲存為只有單字的 Inbox 項目。分享句子時,系統會要求選取單字並選擇 Continue;未選取單字時,會保留為句子項目。"],steps:[{text:"選取文字,開啟 Share,選擇 Orvoca;如果是句子,再選擇 Continue。",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"可以在 iPhone 或 iPad 儲存複製的文字嗎?",answer:["在其他 app 複製文字,回到 Orvoca,在確認畫面選擇 Save。","複製的單字沒有語境或 URL。複製句子時,選擇單字並選擇 Continue,讓它與原句一起保留;Cancel 不會儲存。"],steps:[{text:"複製文字,回到 Orvoca,然後選擇 Save。",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"可以直接從 Safari 儲存單字嗎?",answer:["在 iOS/iPadOS 16.4 或以上版本,於 Settings → Safari → Extensions 啟用 Orvoca,並允許存取該網站。","在 Safari 選取單字,選擇 Save to Orvoca。Inbox 項目可包含單字、周圍句子與經過清理的 page URL;不支援只捕捉 URL。"],steps:[{text:"啟用 Extension、允許網站存取,選取單字後選擇 Save to Orvoca。",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"如何在 Android 上儲存單字?",answer:["在其他 app 選取或分享單字或句子,然後在 Android 分享面板中選擇 Orvoca。","分享單字會進入 Inbox。分享句子時,選取單字並點選 Continue,系統會儲存選取的單字和原句。一般分享通常不會附帶 page URL。"],steps:[{text:"分享文字,選擇 Orvoca;如果是句子,再點選 Continue。",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"可以在 Android 上儲存複製的文字嗎?",answer:["複製文字後開啟或返回 Orvoca,在確認畫面選擇 Save。","複製的單字沒有語境或 URL。複製句子時,選取單字並選擇 Continue,讓它與原句一起儲存。Orvoca 不會在背景中默默儲存剪貼簿內容。"],steps:[{text:"複製文字,開啟 Orvoca,然後選擇 Save。",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"捕捉的單字會到哪裡?如何加到 Vocabulary?",answer:["來自 Chrome、Safari、Share 和剪貼簿的項目會先進入 Inbox。","在 Inbox 選擇意思,需要時用 Edit 修改,再選擇 Save 將單字加入 Vocabulary。句子項目必須先選取單字。"],steps:[{text:"開啟 Inbox,選擇意思或 Edit,然後選擇 Save。",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"原句和 URL 會與單字一起儲存嗎?",answer:["取決於捕捉方式。Chrome 選取捕捉和 Safari Extension 可以保留周圍句子與經過清理的 page URL;Chrome 右鍵選單則會保留選取的文字和 page URL。","透過 Share 或剪貼簿傳送的單字可能沒有語境或 URL。Orvoca 不會自行編造缺少的語境或 URL。"],category:"inbox"},{slug:"capture-not-saving",question:"儲存後在 Inbox 找不到項目時,該檢查什麼?",answer:["確認是否看到 Saved to inbox,帳戶是否已連線,以及網站的捕捉權限是否已允許。","行動裝置的 Share 和剪貼簿捕捉可能要等你再次開啟 Orvoca 才會完成匯入。如果當時離線,請重新連線並重新整理 Inbox。"],category:"troubleshooting"},{slug:"site-capture-disabled",question:"Chrome 中沒有顯示 Orvoca 按鈕時怎麼辦?",answer:["開啟 Chrome Extension 彈出視窗,檢查 Site capture,選擇 Toggle site capture,並允許要求的網站權限。","瀏覽器內部頁面、可編輯欄位或未獲得權限的網站不會顯示按鈕。重新載入頁面,再次選取單字。"],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"可儲存的文字有長度或其他限制嗎?",answer:["空白文字、無效的捕捉文字和過長的輸入可能會被拒絕。一般捕捉輸入上限為 500 個字元。","完整句子不會自動成為 Vocabulary 中的單字,請選取要學習的單
50字。Inbox 的待處理項目數量也有上限。"],category:"troubleshooting"}],K3=[{slug:"what-is-orvoca",question:"¿Qué es Orvoca?",answer:["Orvoca te ayuda a guardar las palabras que quieres volver a ver sin interrumpir tu lectura.","Envía primero una palabra desde Web, Chrome Extension, iPhone/iPad o Android a Inbox. Consulta ahí su significado y luego guarda los elementos seleccionados en Vocabulary para repasarlos."]},{slug:"different-from-dictionary",question:"¿En qué se diferencia Orvoca de un diccionario o traductor?",answer:["Los diccionarios y traductores resuelven la duda inmediata sobre el significado.","Orvoca se enfoca en lo que sigue: conservar la palabra en Inbox, revisarla con su contexto original y guardarla en Vocabulary para repasarla después."]},{slug:"available-now",question:"¿Puedo usar Orvoca ahora mismo?",answer:["Los flujos públicos de Web y Chrome Extension ya están disponibles, y la app de Android se distribuye mediante Google Play.","La app para iPhone/iPad y Safari Extension también tienen soporte público. En iOS, usa Share → Orvoca o vuelve a Orvoca y elige Save en el aviso del texto copiado."]},{slug:"android-availability",question:"¿Es compatible con Android?",answer:["Sí. La app de Android está disponible en Google Play.","Selecciona o comparte una palabra o una oración desde otra app, elige Orvoca en la hoja para compartir de Android y, cuando se te solicite, confirma las palabras de la oración con Continue.",`Google Play: ${It()}`]},{slug:"ios-availability",question:"¿Puedo usar Orvoca en iPhone o iPad?",answer:["Sí. La app para iPhone/iPad está disponible públicamente en App Store. Puede enviar texto desde Share o confirmar el texto copiado antes de añadirlo a Inbox.","Después de instalarla, usa Share → Orvoca o el aviso de texto copiado para elegir Save. Safari Extension requiere iOS/iPadOS 16.4 o posterior y permiso independiente para el sitio.","App Store: "+Ht]},{slug:"exam-prep-fit",question:"¿Orvoca sirve para preparar exámenes?",answer:["Prepararse para exámenes no es su caso de uso principal.","Orvoca está pensado para quienes leen en otro idioma y quieren conservar palabras útiles de artículos, ensayos, libros y páginas cotidianas reales, junto con el contexto original cuando esté disponible."]},{slug:"who-is-it-for",question:"¿Para quién es Orvoca?",answer:["Orvoca es para lectores a quienes les molesta perder palabras valiosas mientras leen en un segundo idioma.","Es especialmente útil si quieres aprender vocabulario de lecturas reales en lugar de listas de palabras aisladas y decidir en Inbox qué vale la pena conservar."]},{slug:"how-review-works",question:"¿Las palabras capturadas pasan directamente al repaso?",answer:["No de forma predeterminada.","Los elementos capturados llegan primero a Inbox. Elige un significado, usa Edit si hace falta y elige Save antes de que la palabra entre en Vocabulary; Skip o Reject la dejan fuera."]},{slug:"site-scoped-capture",question:"¿Orvoca funciona en todos los sitios web?",answer:["No.","Chrome Extension solo captura en sitios donde Site capture está activado y se ha concedido el permiso. Web Console no lee ni captura por sí sola la página actual."]},{slug:"web-console-manual",question:"¿Puedo añadir una palabra directamente desde Web Console?",answer:["Sí. Abre Vocabulary, elige Add word e introduce word, language, part of speech y meaning.","Este flujo va directamente a Vocabulary en lugar de Inbox. No se crea automáticamente contexto de lectura ni source URL."],steps:[{text:"Abre Vocabulary.",imageKey:"capture.web.vocabulary"},{text:"Elige Add word e introduce los datos de la palabra.",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"¿Web Console captura automáticamente palabras de la página actual?",answer:["No. Web Console administra Vocabulary e Inbox; no lee la página web automáticamente.","Usa Chrome Extension mientras lees en la web y después revisa el elemento capturado en Inbox."],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"¿Cómo guardo una palabra de una página web en Chrome?",answer:["Mientras lees, selecciona una palabra y elige Save to Orvoca en el botón junto a la selección.","La palabra seleccionad
50a va a Inbox. Si la configuración y la página lo permiten, Orvoca también conserva la oración circundante y una page URL depurada."],steps:[{text:"Arrastra sobre la palabra para seleccionarla.",imageKey:"capture.chrome.selection"},{text:"Elige Save to Orvoca junto a la selección.",imageKey:"capture.chrome.overlay"},{text:"Abre Inbox y elige Save después de revisar el significado."}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"¿Puedo guardar una palabra con el menú contextual de Chrome?",answer:["Sí. Selecciona el texto, abre el menú contextual y elige Add to Orvoca.","La palabra o frase seleccionada y la page URL llegan a Inbox. Esta ruta no añade automáticamente la oración circundante."],steps:[{text:"Selecciona la palabra y elige Add to Orvoca en el menú contextual.",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"¿Copiar texto lo guarda automáticamente en Chrome?",answer:["No. Chrome Extension no guarda por sí sola el texto de Ctrl+C ni de un evento de copia.","Selecciona el texto y elige Save to Orvoca, o usa Add to Orvoca en el menú contextual, para enviarlo a Inbox."],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"¿Cómo guardo una palabra desde el menú Share en iPhone o iPad?",answer:["Selecciona una palabra o una oración en otra app, abre Share y elige Orvoca.","Una palabra compartida se guarda como un elemento de Inbox que contiene solo la palabra. Si compartes una oración, se te pedirá elegir una palabra y pulsar Continue; sin seleccionar una palabra, se conserva como un elemento de oración."],steps:[{text:"Selecciona el texto, abre Share, elige Orvoca y pulsa Continue si es una oración.",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"¿Puedo guardar texto copiado en iPhone o iPad?",answer:["Copia el texto en otra app, vuelve a Orvoca y elige Save en la pantalla de confirmación.","Una palabra copiada no tiene contexto ni URL. Si copias una oración, elige una palabra y pulsa Continue para conservarla con la oración original; Cancel no la guarda."],steps:[{text:"Copia el texto, vuelve a Orvoca y elige Save.",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"¿Puedo guardar una palabra directamente desde Safari?",answer:["En iOS/iPadOS 16.4 o posterior, activa Orvoca en Settings → Safari → Extensions y permite el acceso al sitio.","Selecciona una palabra en Safari y elige Save to Orvoca. El elemento de Inbox puede incluir la palabra, la oración circundante y una page URL depurada; no se admite capturar solo la URL."],steps:[{text:"Activa la Extension, permite el acceso al sitio y elige Save to Orvoca después de seleccionar una palabra.",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"¿Cómo guardo una palabra en Android?",answer:["Selecciona o comparte una palabra o una oración desde otra app y luego elige Orvoca en la hoja para compartir de Android.","Una palabra compartida va a Inbox. Si compartes una oración, elige una palabra y pulsa Continue para guardar la palabra seleccionada y la oración original. La ruta normal para compartir generalmente no incluye una page URL."],steps:[{text:"Comparte el texto, elige Orvoca y pulsa Continue si es una oración.",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"¿Puedo guardar texto copiado en Android?",answer:["Copia el texto, abre Orvoca o vuelve a ella y elige Save en la pantalla de confirmación.","Una palabra copiada no tiene contexto ni URL. Si copias una oración, elige una palabra y pulsa Continue para guardarla con la oración original. Orvoca no guarda el contenido del portapapeles silenciosamente en segundo plano."],steps:[{text:"Copia el texto, abre Orvoca y elige Save.",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"¿Dónde llegan las palabras capturadas y cómo las añado a Vocabulary?",answer:["Los elementos capturados desde Chrome, Safari, Share y el portapapeles llegan primero a Inbox.","Elige un significado, usa Edit si hace falta y elige Save para añadir una palabra a Vocabulary. Los elementos de oración requieren elegir primero una palabra."],steps:[{text:"Abre Inbox, elige un significado o Edit y después elige Save.",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"¿La oración original y la URL se guardan con la palabra?",answer:["Depende de la forma de captura. La captura por selección de Chrome y Safari Extension pueden conservar la oración circundante y una page URL depurada; el menú contextual de Chrome conserva el texto seleccionado y la page URL.","Una palabra enviada mediante Share o el portapapeles puede no tener contexto ni URL. Orvoca no inventa el contexto ni las URL que faltan."],category:"inbox"},{slug:"capture-not-saving",question:"¿Qué debo revisar si un elemento guardado no aparece en Inbox?",answer:["Comprueba que aparezca la confirmación Saved to inbox, confirma que tu cuenta esté conectada y verifica el permiso de captura del sitio.","Las capturas móviles hechas con Share o el portapapeles pueden terminar de importarse cuando vuelves a abrir Orvoca. Si estabas sin conexión, reconéctate y actualiza Inbox."],category:"troubleshooting"},{slug:"site-capture-disabled",question:"¿Qué hago si el botón de Orvoca no aparece en Chrome?",answer:["Abre la ventana emergente de Chrome Extension, revisa Site capture, elige Toggle site capture y permite el permiso del sitio solicitado.","El botón no aparece en páginas internas del navegador, dentro de campos editables ni en sitios sin permiso. Recarga la página y vuelve a seleccionar la palabra."],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"¿Hay límites de texto o de longitud?",answer:["El texto vacío, el texto de captura no válido y las entradas demasiado largas pueden rechazarse. La entrada de captura normal tiene un límite de 500 caracteres.","Una oración completa no se guarda automáticamente como palabra de vocabulario; elige la palabra que quieres aprender. Inbox también tiene un límite de capacidad."],category:"troubleshooting"}],X3=[{slug:"what-is-orvoca",question:"O que é Orvoca?",answer:["Orvoca ajuda você a guardar palavras que vale a pena rever sem interromper seu fluxo de leitura.","Envie primeiro uma palavra da Web, Chrome Extension, iPhone/iPad ou Android para o Inbox. Confira o significado ali e depois salve os itens escolhidos no Vocabulary para revisão."]},{slug:"different-from-dictionary",question:"Como o Orvoca é diferente de um dicionário ou tradutor?",answer:["Dicionários e tradutores resolvem a dúvida imediata sobre o significado.","O Orvoca se concentra no que vem depois: manter a palavra no Inbox, conferir seu contexto original e salvá-la no Vocabulary para revisar mais tarde."]},{slug:"available-now",question:"Posso usar o Orvoca agora?",answer:["Os fluxos públicos da Web e do Chrome Extension já estão disponíveis, e o app para Android é distribuído pelo Google Play.","O app para iPhone/iPad e o Safari Extension também têm suporte público. No iOS, use Share → Orvoca ou volte ao Orvoca e escolha Save no aviso de texto copiado."]},{slug:"android-availability",question:"O Orvoca é compatível com Android?",answer:["Sim. O app para Android está disponível no Google Play.","Selecione ou compartilhe uma palavra ou frase em outro app, escolha Orvoca na folha de compartilhamento do Android e confirme as palavras da frase com Continue quando solicitado.",`Google Play: ${It()}`]},{slug:"ios-availability",question:"Posso usar o Orvoca no iPhone ou iPad?",answer:["Sim. O app para iPhone/iPad está disponível publicamente na App Store. Ele pode enviar texto pelo Share ou confirmar um texto copiado antes de adicioná-lo ao Inbox.","Depois da instalação, use Share → Orvoca ou o aviso de texto copiado para escolher Save. O Safari Extension requer iOS/iPadOS 16.4 ou posterior e uma permissão separada para o site.","App Store: "+Ht]},{slug:"exam-prep-fit",question:"O Orvoca serve para preparação para provas?",answer:["A preparação para provas não é o principal caso de uso.","O Orvoca foi criado para quem lê em outro idioma e quer guardar palavras úteis encontradas em artigos, ensaios, livros e páginas do dia a dia, junto do contexto original quando ele estiver disponível."]},{slug:"who-is-it-for",question:"Para quem é o Orvoca?",answer:["O Orvoca é para leitores que não gostam de perder palavras interessantes enquanto leem em um segundo idioma.","Ele é especialmente útil se você quer aprender vocabulário a partir de leituras reais, em vez de listas de palavras 
50soltas, e decidir no Inbox o que vale a pena guardar."]},{slug:"how-review-works",question:"As palavras capturadas vão direto para a revisão?",answer:["Não por padrão.","Os itens capturados chegam primeiro ao Inbox. Escolha um significado, use Edit se necessário e escolha Save antes que a palavra entre no Vocabulary; Skip ou Reject a deixam de fora."]},{slug:"site-scoped-capture",question:"O Orvoca funciona em todos os sites?",answer:["Não.","O Chrome Extension só captura em sites onde o Site capture está ativado e a permissão foi concedida. O Web Console não lê nem captura a página atual por conta própria."]},{slug:"web-console-manual",question:"Posso adicionar uma palavra diretamente pelo Web Console?",answer:["Sim. Abra o Vocabulary, escolha Add word e informe word, language, part of speech e meaning.","Esse caminho vai direto para o Vocabulary, sem passar pelo Inbox. Nenhum contexto de leitura ou source URL é criado automaticamente."],steps:[{text:"Abra o Vocabulary.",imageKey:"capture.web.vocabulary"},{text:"Escolha Add word e informe os dados da palavra.",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"O Web Console captura palavras automaticamente da página atual?",answer:["Não. O Web Console gerencia o Vocabulary e o Inbox; ele não lê a página automaticamente.","Use o Chrome Extension enquanto lê na Web e depois confira o item capturado no Inbox."],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"Como salvo uma palavra de uma página no Chrome?",answer:["Durante a leitura, selecione uma palavra e escolha Save to Orvoca no botão ao lado da seleção.","A palavra selecionada vai para o Inbox. Quando as configurações e a página permitem, o Orvoca também mantém a frase ao redor e uma page URL limpa."],steps:[{text:"Arraste sobre a palavra para selecioná-la.",imageKey:"capture.chrome.selection"},{text:"Escolha Save to Orvoca ao lado da seleção.",imageKey:"capture.chrome.overlay"},{text:"Abra o Inbox e escolha Save depois de conferir o significado."}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"Posso salvar uma palavra pelo menu de contexto do Chrome?",answer:["Sim. Selecione o texto, abra o menu do botão direito e escolha Add to Orvoca.","A palavra ou frase selecionada e a page URL vão para o Inbox. Esse caminho não adiciona automaticamente a frase ao redor."],steps:[{text:"Selecione a palavra e escolha Add to Orvoca no menu do botão direito.",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"Copiar um texto o salva automaticamente no Chrome?",answer:["Não. O Chrome Extension não salva texto automaticamente a partir de Ctrl+C ou de um evento de cópia.","Selecione o texto e escolha Save to Orvoca, ou use Add to Orvoca no menu do botão direito, para enviá-lo ao Inbox."],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"Como salvo uma palavra pelo menu Share no iPhone ou iPad?",answer:["Selecione uma palavra ou frase em outro app, abra o Share e escolha Orvoca.","Uma palavra compartilhada é salva como um item do Inbox contendo apenas a palavra. Ao compartilhar uma frase, escolha uma palavra e toque em Continue; sem selecionar uma palavra, ela continua como um item de frase."],steps:[{text:"Selecione o texto, abra o Share, escolha Orvoca e toque em Continue se for uma frase.",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"Posso salvar um texto copiado no iPhone ou iPad?",answer:["Copie o texto em outro app, volte ao Orvoca e escolha Save na tela de confirmação.","Uma palavra copiada não tem contexto nem URL. Para uma frase copiada, escolha uma palavra e toque em Continue para mantê-la com a frase original; Cancel não salva o item."],steps:[{text:"Copie o texto, volte ao Orvoca e escolha Save.",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"Posso salvar uma palavra diretamente pelo Safari?",answer:["No iOS/iPadOS 16.4 ou posterior, ative o Orvoca em Settings → Safari → Extensions e permita o acesso ao site.","Selecione uma palavra no Safari e escolha Save to Orvoca. O item do Inbox pode incluir a palavra, a frase ao redor e uma page URL limpa;
50 não é possível capturar apenas a URL."],steps:[{text:"Ative a Extension, permita o acesso ao site e escolha Save to Orvoca depois de selecionar uma palavra.",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"Como salvo uma palavra no Android?",answer:["Selecione ou compartilhe uma palavra ou frase em outro app e escolha Orvoca na folha de compartilhamento do Android.","Uma palavra compartilhada vai para o Inbox. Ao compartilhar uma frase, escolha uma palavra e toque em Continue para salvar a palavra selecionada e a frase original. O compartilhamento normal geralmente não inclui uma page URL."],steps:[{text:"Compartilhe o texto, escolha Orvoca e toque em Continue se for uma frase.",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"Posso salvar um texto copiado no Android?",answer:["Copie o texto, abra ou volte ao Orvoca e escolha Save na tela de confirmação.","Uma palavra copiada não tem contexto nem URL. Para uma frase, escolha uma palavra e toque em Continue para salvá-la com a frase original. O Orvoca não salva o conteúdo da área de transferência silenciosamente em segundo plano."],steps:[{text:"Copie o texto, abra o Orvoca e escolha Save.",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"Onde vão as palavras capturadas e como as adiciono ao Vocabulary?",answer:["Os itens capturados pelo Chrome, Safari, Share e pela área de transferência chegam primeiro ao Inbox.","Escolha um significado, use Edit se necessário e escolha Save para adicionar uma palavra ao Vocabulary. Itens de frase precisam de uma seleção de palavra primeiro."],steps:[{text:"Abra o Inbox, escolha um significado ou Edit e depois escolha Save.",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"A frase original e a URL são salvas com a palavra?",answer:["Depende da forma de captura. A captura por seleção do Chrome e o Safari Extension podem manter a frase ao redor e uma page URL limpa; o menu do botão direito do Chrome mantém o texto selecionado e a page URL.","Uma palavra enviada pelo Share ou pela área de transferência pode não ter contexto nem URL. O Orvoca não inventa contextos ou URLs ausentes."],category:"inbox"},{slug:"capture-not-saving",question:"O que devo conferir se um item salvo não aparecer no Inbox?",answer:["Confira se a confirmação Saved to inbox apareceu, confirme que sua conta está conectada e verifique a permissão de captura do site.","As capturas móveis feitas pelo Share ou pela área de transferência podem terminar de importar quando você abre o Orvoca novamente. Se estava offline, conecte-se de novo e atualize o Inbox."],category:"troubleshooting"},{slug:"site-capture-disabled",question:"O que faço se o botão do Orvoca não aparecer no Chrome?",answer:["Abra o popup do Chrome Extension, confira o Site capture, escolha Toggle site capture e permita a permissão do site solicitada.","O botão não aparece em páginas internas do navegador, dentro de campos editáveis ou em sites sem permissão. Recarregue a página e selecione a palavra novamente."],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"Há limites de texto ou de comprimento?",answer:["Textos vazios, textos de captura inválidos e entradas longas demais podem ser rejeitados. A entrada de captura comum tem limite de 500 caracteres.","Uma frase inteira não é salva automaticamente como uma palavra no Vocabulary; escolha a palavra que quer aprender. O Inbox também tem um limite de capacidade."],category:"troubleshooting"}],Y3=[{slug:"what-is-orvoca",question:"Was ist Orvoca?",answer:["Orvoca hilft dir, Wörter festzuhalten, die du später noch einmal ansehen möchtest, ohne deinen Lesefluss zu unterbrechen.","Sende ein Wort zuer
50st aus dem Web, der Chrome Extension, von iPhone/iPad oder Android an Inbox. Prüfe dort die Bedeutung und speichere anschließend ausgewählte Einträge zur Wiederholung in Vocabulary."]},{slug:"different-from-dictionary",question:"Wie unterscheidet sich Orvoca von einem Wörterbuch oder Übersetzer?",answer:["Wörterbücher und Übersetzer helfen beim unmittelbaren Verständnis einer Bedeutung.","Orvoca konzentriert sich auf den nächsten Schritt: das Wort in Inbox zu behalten, es im ursprünglichen Kontext zu prüfen und für späteres Wiederholen in Vocabulary zu speichern."]},{slug:"available-now",question:"Kann ich Orvoca sofort nutzen?",answer:["Die öffentlichen Abläufe von Web und Chrome Extension sind jetzt verfügbar, und die Android-App wird über Google Play verteilt.","Die iPhone/iPad-App und Safari Extension werden ebenfalls öffentlich unterstützt. Unter iOS kannst du Share → Orvoca verwenden oder zu Orvoca zurückkehren und im Hinweis für kopierten Text Save wählen."]},{slug:"android-availability",question:"Wird Android unterstützt?",answer:["Ja. Die Android-App ist bei Google Play verfügbar.","Wähle in einer anderen App ein Wort oder einen Satz aus oder teile ihn, wähle Orvoca im Android-Teilen-Menü und bestätige bei Aufforderung die Wörter des Satzes mit Continue.",`Google Play: ${It()}`]},{slug:"ios-availability",question:"Kann ich Orvoca auf iPhone oder iPad nutzen?",answer:["Ja. Die iPhone/iPad-App ist öffentlich im App Store verfügbar. Sie kann Text über Share senden oder kopierten Text bestätigen, bevor er zu Inbox hinzugefügt wird.","Verwende nach der Installation Share → Orvoca oder wähle Save im Hinweis für kopierten Text. Safari Extension erfordert iOS/iPadOS 16.4 oder neuer sowie eine separate Berechtigung für die Website.","App Store: "+Ht]},{slug:"exam-prep-fit",question:"Ist Orvoca für die Prüfungsvorbereitung gedacht?",answer:["Die Prüfungsvorbereitung ist nicht der hauptsächliche Anwendungsfall.","Orvoca ist für Menschen gedacht, die in einer anderen Sprache lesen und nützliche Wörter aus echten Artikeln, Essays, Büchern und alltäglichen Seiten zusammen mit dem ursprünglichen Lesekontext festhalten möchten, sofern dieser verfügbar ist."]},{slug:"who-is-it-for",question:"Für wen ist Orvoca gedacht?",answer:["Orvoca richtet sich an Leserinnen und Leser, die beim Lesen in einer zweiten Sprache ungern gute Wörter verlieren.","Besonders nützlich ist es, wenn du Wortsc
50hatz aus echten Lektüren statt aus losgelösten Wortlisten sammeln und in Inbox selbst entscheiden möchtest, was sich zu behalten lohnt."]},{slug:"how-review-works",question:"Gelangen erfasste Wörter direkt in die Wiederholung?",answer:["Standardmäßig nicht.","Erfasste Einträge landen zuerst in Inbox. Wähle eine Bedeutung, nutze bei Bedarf Edit und wähle Save, bevor das Wort in Vocabulary gelangt; Skip oder Reject lassen es außen vor."]},{slug:"site-scoped-capture",question:"Funktioniert Orvoca auf jeder Website?",answer:["Nein.","Die Chrome Extension erfasst nur auf Websites, auf denen Site capture aktiviert und die Berechtigung erteilt wurde. Die Web Console liest oder erfasst die aktuelle Webseite nicht selbst."]},{slug:"web-console-manual",question:"Kann ich ein Wort direkt über die Web Console hinzufügen?",answer:["Ja. Öffne Vocabulary, wähle Add word und gib word, language, part of speech und meaning ein.","Dieser Weg führt direkt in Vocabulary statt in Inbox. Ein Lesekontext oder eine source URL wird nicht automatisch erstellt."],steps:[{text:"Öffne Vocabulary.",imageKey:"capture.web.vocabulary"},{text:"Wähle Add word und gib die Wortangaben ein.",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"Erfasst die Web Console automatisch Wörter von der aktuellen Seite?",answer:["Nein. Die Web Console verwaltet Vocabulary und Inbox; sie liest die Webseite nicht automatisch.","Verwende beim Lesen im Web die Chrome Extension und prüfe den erfassten Eintrag anschließend in Inbox."],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"Wie speichere ich ein Wort von einer Webseite in Chrome?",answer:["Wähle beim Lesen ein Wort aus und klicke auf die Schaltfläche neben der Auswahl, um Save to Orvoca zu wählen.","Das ausgewählte Wort gelangt in Inbox. Wenn Einstellungen und Webseite es erlauben, speichert Orvoca außerdem den umgebenden Satz und eine bereinigte page URL."],steps:[{text:"Ziehe über das Wort, um es auszuwählen.",imageKey:"capture.chrome.selection"},{text:"Wähle neben der Auswahl Save to Orvoca.",imageKey:"capture.chrome.overlay"},{text:"Öffne Inbox und wähle Save, nachdem du die Bedeutung geprüft hast."}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"Kann ich ein Wort über das Chrome-Rechtsklickmenü speichern?",answer:["Ja. Wähle den Text aus, öffne das Rechtsklickmenü und wähle Add to Orvoca.","Das ausgewählte Wort oder die ausgewählte Wortgruppe und die page URL gelangen in Inbox. Bei diesem Weg wird der umgebende Satz nicht automatisch hinzugefügt."],steps:[{text:"Wähle das Wort aus und wähle anschließend im Rechtsklickmenü Add to Orvoca.",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"Wird kopierter Text in Chrome automatisch gespeichert?",answer:["Nein. Die Chrome Extension speichert Text aus Ctrl+C oder einem Kopiervorgang nicht automatisch.","Wähle den Text aus und wähle Save to Orvoca oder nutze Add to Orvoca im Rechtsklickmenü, um ihn an Inbox zu senden."],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"Wie speichere ich ein Wort über das Share-Menü auf iPhone oder iPad?",answer:["Wähle in einer anderen App ein Wort oder einen Satz aus, öffne Share und wähle Orvoca.","Ein geteiltes Wort wird als Inbox-Eintrag nur mit dem Wort gespeichert. Bei einem geteilten Satz wählst du ein Wort und tippst auf Continue; ohne Wortauswahl bleibt er ein Satz-Eintrag."],steps:[{text:"Wähle Text aus, öffne Share, wähle Orvoca und tippe bei einem Satz auf Continue.",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"Kann ich kopierten Text auf iPhone oder iPad speichern?",answer:["Kopiere den Text in einer anderen App, kehre zu Orvoca zurück und wähle auf dem Bestätigungsbildschirm Save.","Ein kopiertes Wort hat keinen Kontext und keine URL. Wähle bei einem kopierten Satz ein Wort und tippe auf Continue, um ihn mit dem ursprünglichen Satz zu behalten; Cancel speichert ihn nicht."],steps:[{text:"Kopiere Text, kehre zu Orvoca zurück und wähle Save.",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"Kann ich ein Wort direkt aus Safari speichern?",answer:["Aktiviere Orvoca unter Settings → Safari → Extensions in iOS/iPadOS 16.4 oder neuer und erlaube den Zugriff auf die Website.","Wähle in Safari ein Wort aus und wähle Save to Orvoca. Der Inbox-Eintrag kann das Wort, den umgebenden Satz und eine bereinigte page URL enthalten; nur die URL zu erfassen wird nicht unterstützt."],steps:[{text:"Aktiviere die Extension, erlaube den Websitezugriff und wähle nach der Wortauswahl Save to Orvoca.",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"Wie speichere ich ein Wort auf Android?",answer:["Wähle in einer anderen App ein Wort oder einen Satz aus oder teile ihn und wähle anschließend Orvoca im Android-Teilen-Menü.","Ein geteiltes Wort gelangt in Inbox. Bei einem geteilten Satz wählst du ein Wort und tippst auf Continue, um das ausgewählte Wort und den ursprünglichen Satz zu speichern. Über den normalen Teilen-Weg wird in der Regel keine page URL übertragen."],steps:[{text:"Teile den Text, wähle Orvoca und tippe bei einem Satz auf Continue.",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"Kann ich kopierten Text auf Android speichern?",answer:["Kopiere den Text, öffne Orvoca oder kehre dorthin zurück und wähle auf dem Bestätigungsbildschirm Save.","Ein kopiertes Wort hat keinen Kontext und keine URL. Wähle bei einem Satz ein Wort und tippe auf Continue, um ihn mit dem ursprünglichen Satz zu speichern. Orvoca speichert Inhalte der Zwischenablage nicht unbemerkt im Hintergrund."],steps:[{text:"Kopiere Text, öffne Orvoca und wähle Save.",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"Wo landen erfasste Wörter und wie füge ich sie zu Vocabulary hinzu?",answer:["Einträge aus Chrome, Safari, Share und der Zwischenablage kommen zuerst in Inbox an.","Wähle eine Bedeutung, nutze bei Bedarf Edit und wähle Save, um ein Wort zu Vocabulary hinzuzufügen. Bei Satz-Einträgen muss zuerst ein Wort ausgewählt werden."],steps:[{text:"Öffne Inbox, wähle eine Bedeutung oder Edit und wähle anschließend Save.",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"Werden der ursprüngliche Satz und die URL mit dem Wort gespeichert?",answer:["Das hängt vom Erfassungsweg ab. Die Auswahl-Erfassung von Chrome und die Safari Extension können den umgebenden Satz und eine bereinigte page URL behalten; das Chrome-Rechtsklickmenü behält den ausgewählten Text und die page URL.","Ein über Share oder die Zwischenablage gesendetes Wort hat möglicherweise keinen Kontext und keine URL. Orvoca erfindet fehlenden Kontext oder fehlende URLs nicht."],category:"inbox"},{slug:"capture-not-saving",question:"Was sollte ich prüfen, wenn ein gespeicherter Eintrag nicht in Inbox erscheint?",answer:["Prüfe, ob die Bestätigung Saved to inbox angezeigt wurde, ob dein Konto verbunden ist und ob die Erfassungsberechtigung für die Website vorhanden ist.","Mobile Erfassungen über Share und die Zwischenablage werden möglicherweise erst importiert, wenn du Orvoca erneut öffnest. Warst du offline, stelle die Verbindung wieder her und aktualisiere Inbox."],category:"troubleshooting"},{slug:"site-capture-disabled",question:"Was kann ich tun, wenn die Orvoca-Schaltfläche in Chrome nicht erscheint?",answer:["Öffne das Popup der Chrome Extension, prüfe Site capture, wähle Toggle site capture und erlaube die angeforderte Websiteberechtigung.","Auf internen Browserseiten, in bearbeitbaren Feldern oder auf Websites ohne Berechtigung erscheint die Schaltfläche nicht. Lade die Seite neu und wähle das Wort erneut aus."],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"Gibt es Text- oder Längenbeschränkungen?",answer:["Leerer Text, ungültiger Erfassungstext und zu lange Eingaben können abgelehnt werden. Normale Erfassungseingaben sind auf 500 Zeichen begrenzt.","Ein vollständiger Satz wird nicht automatisch als Wort in Vocabulary gespeichert; wähle das Wort aus, das du lernen möchtest. Auch die Anzahl der Einträge in Inbox ist begrenzt."],category:"troubleshooting"}],J3=[{slug:"what-is-orvoca",question:"Qu’est-ce qu’Orvoca ?",answer:["Orvoca vous aide à garder les mots que vous voudrez revoir, sans interrompre votre lecture.","Envoyez d’abord un mot depuis le Web, Chrome Extension, iPhone/iPad ou Android vers Inbox. Vérifiez son sens, puis enregistrez les éléments choisis dans Vocabulary pour les revoir."]},{slug:"different-from-dictionary",question:"Quelle est la différence entre Orvoca et un dictionnaire ou un traducteur ?",answer:["Les dictionnaires et les traducteurs répondent à la question immédiate du sens d’un mot.","Orvoca s’intéresse à la suite : garder le mot dans Inbox, le vérifier dans son contexte d’origine, puis l’enregistrer dans Vocabulary pour le revoir plus tard."]},{slug:"available-now",question:"Puis-je utiliser Orvoca dès maintenant ?",answer:["Les parcours publics Web et Chrome Extension sont disponibles dès maintenant, et l’app Android est distribuée via Google Play.","L’app iPhone/iPad et Safari Extension sont également pris en charge publiquement. Sur iOS, utilisez Share → Orvoca ou revenez dans Orvoca et choisissez Save dans l’invite de texte copié."]},{slug:"android-availability",question:"Android est-il pris en charge ?",answer:["Oui. L’app Android est disponible sur Google Play.","Sélectionnez ou partagez un mot ou une phrase depuis une autre app, choisissez Orvoca dans la feuille de partage Android, puis confirmez les mots de la phrase avec Continue lorsque l’app vous le demande.",`Google Play: ${It()}`]},{slug:"ios-availability",question:"Puis-je utiliser Orvoca sur iPhone ou iPad ?",answer:["Oui. L’app iPhone/iPad est disponible publiquement sur l’App Store. Elle peut envoyer du texte depuis Share ou confirmer un texte copié avant de l’ajouter à Inbox.","Après l’installation, utilisez Share → Orvoca ou choisissez Save dans l’invite de texte copié. Safari Extension nécessite iOS/iPadOS 16.4 ou une version ultérieure, ainsi qu’une autorisation distincte pour le site.","App Store: "+Ht]},{slug:"exam-prep-fit",question:"Orvoca est-il conçu pour préparer un examen ?",answer:["La préparation aux examens n’est pas son usage principal.","Orvoca est conçu pour les personnes qui lisent dans une autre langue et veulent garder les mots utiles rencontrés dans de vrais articles, essais, livres et pages du quotidien, avec le contexte de lecture d’origine lorsqu’il est disponible."]},{slug:"who-is-it-for",question:"À qui s’adresse Orvoca ?",answer:["Orvoca s’adresse aux lecteurs qui n’aiment pas laisser échapper de bons mots lorsqu’ils lisent dans une deuxième langue.","Il est particulièrement utile si vous voulez apprendre du vocabulaire à partir de lectures réelles plutôt que de listes de mots isolés, et décider dans Inbox de ce qui mérite d’être gardé."]},{slug:"how-review-works",question:"Les mots capturés passent-ils directement en révision ?",answer:["Pas par défaut.","Les éléments capturés arrivent d’abord dans Inbox. Choisissez un sens, utilisez Edit si nécessaire, puis choisissez Save avant que le mot n’entre dans Vocabulary ; Skip ou Reject le laissent de côté."]},{slug:"site-scoped-capture",question:"Orvoca fonctionne-t-il sur tous les sites web ?",answer:["Non.","Chrome Extension ne capture que sur les sites où Site capture est activé et où l’autorisation a été accordée. Web Console ne lit ni ne capture la page actuelle de lui-même."]},{slug:"web-console-manual",question:"Puis-je ajouter un mot directement depuis Web Console ?",answer:["Oui. Ouvrez Vocabulary, choisissez Add word, puis saisissez word, language, part of speech et meaning.","Ce parcours ajoute directement le mot dans Vocabulary, sans passer par Inbox. Aucun contexte de lecture ni source URL n’est créé automatiquement."],steps:[{text:"Ouvrez Vocabulary.",imageKey:"capture.web.vocabulary"},{text:"Choisissez Add word et saisissez les informations du mot.",imageKey:"capture.web.add-word"}],category:"getting_started",platform:"web_console"},{slug:"web-console-no-auto-capture",question:"Web Console capture-t-il automatiquement les mots de la page actuelle ?",answer:["Non. Web Console gère Vocabulary et Inbox, mais ne lit pas automatiquement la page web.","Utilisez Chrome Extension pendant votre lecture sur le Web, puis vérifiez l’élément capturé dans Inbox."],category:"capture",platform:"web_console"},{slug:"chrome-selection",question:"Comment enregistrer un mot depuis une page web dans Chrome ?",answer:["Pendant votre lecture, sélectionnez un mot et 
50choisissez Save to Orvoca dans le bouton à côté de la sélection.","Le mot sélectionné arrive dans Inbox. Si les réglages et la page l’autorisent, Orvoca conserve aussi la phrase autour du mot et une page URL nettoyée."],steps:[{text:"Faites glisser le curseur sur le mot pour le sélectionner.",imageKey:"capture.chrome.selection"},{text:"Choisissez Save to Orvoca à côté de la sélection.",imageKey:"capture.chrome.overlay"},{text:"Ouvrez Inbox et choisissez Save après avoir vérifié le sens."}],category:"capture",platform:"chrome_extension"},{slug:"chrome-context-menu",question:"Puis-je enregistrer un mot avec le menu contextuel de Chrome ?",answer:["Oui. Sélectionnez le texte, ouvrez le menu contextuel et choisissez Add to Orvoca.","Le mot ou l’expression sélectionné et la page URL arrivent dans Inbox. Ce parcours n’ajoute pas automatiquement la phrase autour du mot."],steps:[{text:"Sélectionnez le mot, puis choisissez Add to Orvoca dans le menu contextuel.",imageKey:"capture.chrome.context-menu"}],category:"capture",platform:"chrome_extension"},{slug:"chrome-copy",question:"Copier du texte l’enregistre-t-il automatiquement dans Chrome ?",answer:["Non. Chrome Extension n’enregistre pas automatiquement le texte de Ctrl+C ou d’un événement de copie.","Sélectionnez le texte et choisissez Save to Orvoca, ou utilisez Add to Orvoca dans le menu contextuel, pour l’envoyer dans Inbox."],category:"capture",platform:"chrome_extension"},{slug:"ios-share",question:"Comment enregistrer un mot depuis le menu Share sur iPhone ou iPad ?",answer:["Sélectionnez un mot ou une phrase dans une autre app, ouvrez Share et choisissez Orvoca.","Un mot partagé est enregistré comme un élément Inbox contenant uniquement le mot. Pour une phrase partagée, choisissez un mot et touchez Continue ; sans sélection de mot, elle reste un élément de type phrase."],steps:[{text:"Sélectionnez le texte, ouvrez Share, choisissez Orvoca et touchez Continue s’il s’agit d’une phrase.",imageKey:"capture.ios.share"}],category:"capture",platform:"ios"},{slug:"ios-clipboard",question:"Puis-je enregistrer du texte copié sur iPhone ou iPad ?",answer:["Copiez le texte dans une autre app, revenez dans Orvoca et choisissez Save sur l’écran de confirmation.","Un mot copié n’a ni contexte ni URL. Pour une phrase copiée, choisissez un mot et touchez Continue pour la conserver avec la phrase d’origine ; Cancel ne l’enregistre pas."],steps:[{text:"Copiez le texte, revenez dans Orvoca et choisissez Save.",imageKey:"capture.ios.clipboard"}],category:"capture",platform:"ios"},{slug:"ios-safari",question:"Puis-je enregistrer un mot directement depuis Safari ?",answer:["Sur iOS/iPadOS 16.4 ou une version ultérieure, activez Orvoca dans Settings → Safari → Extensions et autorisez l’accès au site.","Sélectionnez un mot dans Safari et choisissez Save to Orvoca. L’élément Inbox peut contenir le mot, la phrase autour et une page URL nettoyée ; la capture d’une URL seule n’est pas prise en charge."],steps:[{text:"Activez l’Extension, autorisez l’accès au site, puis choisissez Save to Orvoca après avoir sélectionné un mot.",imageKey:"capture.ios.safari"}],category:"capture",platform:"ios"},{slug:"android-share",question:"Comment enregistrer un mot sur Android ?",answer:["Sélectionnez ou partagez un mot ou une phrase depuis une autre app, puis choisissez Orvoca dans la feuille de partage Android.","Un mot partagé arrive dans Inbox. Pour une phrase partagée, choisissez un mot et touchez Continue pour enregistrer le mot sélectionné et la phrase d’origine. Le partage standard ne contient généralement pas de page URL."],steps:[{text:"Partagez le texte, choisissez Orvoca et touchez Continue s’il s’agit d’une phrase.",imageKey:"capture.android.share"}],category:"capture",platform:"android"},{slug:"android-clipboard",question:"Puis-je enregistrer du texte copié sur Android ?",answer:["Copiez le texte, ouvrez Orvoca ou revenez-y, puis choisissez Save sur l’écran de confirmation.","Un mot copié n’a ni contexte ni URL. Pour une phrase, choisissez un mot et touchez Continue pour l’enregistrer avec la phrase d’origine. Orvoca n’enregistre pas discrètement le contenu du presse-papiers en arrière-plan."],steps:[{text:"Copiez le texte, ouvrez Orvoca et choisissez Save.",imageKey:"capture.android.clipboard"}],category:"capture",platform:"android"},{slug:"inbox-review",question:"Où vont les mots capturés et comment les ajouter à Vocabulary ?",answer:["Les éléments capturés depuis Chrome, Safari, Share et le presse-papiers arrivent d’abord dans Inbox.","Choisissez un sens, utilisez Edit si nécessaire, puis choisissez Save pour ajouter un mot à Vocabulary. Les éléments de type phrase nécessitent d’abord la sélection d’un mot."],steps:[{text:"Ouvrez Inbox, choisissez un sens ou Edit, puis choisissez Save.",imageKey:"capture.inbox.review"}],category:"inbox"},{slug:"context-preserved",question:"La phrase d’origine et l’URL sont-elles enregistrées avec le mot ?",answer:["Cela dépend du mode de capture. La capture par sélection de Chrome et Safari Extension peuvent conserver la phrase autour du mot et une page URL nettoyée ; le menu contextuel de Chrome conserve le texte sélectionné et la page URL.","Un mot envoyé via Share ou le presse-papiers peut ne pas avoir de contexte ni d’URL. Orvoca n’invente pas les informations manquantes."],category:"inbox"},{slug:"capture-not-saving",question:"Que vérifier si un élément enregistré n’apparaît pas dans Inbox ?",answer:["Vérifiez que la confirmation Saved to inbox s’est affichée, que votre compte est connecté et que l’autorisation de capture du site est bien accordée.","Les captures mobiles faites avec Share ou le presse-papiers peuvent finir de s’importer lorsque vous rouvrez Orvoca. Si vous étiez hors ligne, reconnectez-vous et actualisez Inbox."],category:"troubleshooting"},{slug:"site-capture-disabled",question:"Que faire si le bouton Orvoca n’apparaît pas dans Chrome ?",answer:["Ouvrez la fenêtre popup de Chrome Extension, vérifiez Site capture, choisissez Toggle site capture et autorisez le site demandé.","Le bouton n’apparaît pas sur les pages internes du navigateur, dans les champs modifiables ou sur les sites sans autorisation. Rechargez la page et sélectionnez à nouveau le mot."],category:"troubleshooting",platform:"chrome_extension"},{slug:"capture-limits",question:"Y a-t-il des limites de texte ou de longueur ?",answer:["Un texte vide, un texte de capture invalide ou une entrée trop longue peut être refusé. Les entrées de capture ordinaires sont limitées à 500 caractères.","Une phrase complète n’est pas automatiquement enregistrée comme mot dans Vocabulary. Choisissez le mot à apprendre. Inbox a également une capacité maximale."],category:"troubleshooting"}];function Z3(){return typeof window>"u"||!window.localStorage?null:window.localStorage}function Q3(e){const t=e?.trim();return t?`https://chromewebstore.google.com/detail/${t}`:null}function e5(e){const t=e?.trim();return!t||!/^\d+$/.test(t)?null:`https://apps.apple.com/app/id${t}`}function It(){return"https://play.google.com/store/apps/details?id=app.orbitvocab.orvoca"}const t5={en:V3,ko:H3,ja:W3,"zh-Hans":q3,"zh-Hant":G3,"es-MX":K3,"pt-BR":X3,"de-DE":Y3,"fr-FR":J3};function n5(e){const t=Bh(e)?e:"en";return t5[t]}function r5(e){const t=new URL(e),n={};for(const o of $3){const i=t.searchParams.get(o);i&&(n[o]=i)}const r=Z3();return r&&Object.keys(n).length>0&&r.setItem(B3,JSON.stringify(n)),n}function Nm(e){const t=e.toLowerCase();return/\b(android|iphone|ipad|ipod|mobile|tablet)\b/.test(t)||/\b(crios|fxios|edgios|opios)\b/.test(t)}function Tm(e){if(Nm(e))return!1;const t=e.toLowerCase();return/\b(samsungbrowser|firefox)\//.test(t)?!1:/\b(chrome|chromium|edg|opr|whale)\/\d+/.test(t)}function o5(e){const t=e.toLowerCase();if(/\b(crios|fxios|edgios|opios)\//.test(t)||!/\b(iphone|ipad|ipod)\b/.test(t)&&!/\bmobile\//.test(t)||!/\bsafari\//.test(t))return!1;const n=t.match(/\bversion\/(\d+)(?:\.(\d+))?/);if(!n)return!1;const r=Number(n[1]),o=Number(n[2]??0);return r>16||r===16&&o>=4}function Am(e){return Tm(e)?"chrome":o5(e)?"safari":null}function i5(){return typeof navigator>"u"?null:Am(navigator.userAgent)}function s5(e){return e===null?"unsupported":"not_connected"}function a5(){return typeof navigator>"u"?!1:Tm(navigator.userAgent)}function l5(e){return/\bandroid\b/.test(e.toLowerCase())}function Sl(){return typeof navigator>"u"?!1:l5(navigator.userAgent)}function c5(e){const t=e.toLowerCase();return/\b(iphone|ipad|ipod)\b/.test(t)||/\bmacintosh\b/.test(t)&&/\bmobile\//.test(t)}function u5(){return typeof navigator>"u"?!1:c5(navigator.userAgent)}function d5(){return typeof navigator>"u"?!1:Nm(navigator.userAgent)}function yn(){return d5()?"mobile":"desktop"}function h5(e){return e==="connected"?{headlineKey:"headline_connected",bodyKey:"body_connected",ctaKey:"open_console",ctaKind:"primary"}:e==="unsupported"?{headlineKey:"headline_unsupported",bodyKey:"body_unsupported",ctaKey:"open_console",ctaKind:"primary"}:e==="not_connected"?{headlineKey:"headline_not_connected",bodyKey:"body_not_connected",ctaKey:"install_extension",ctaKind:"primary"}:{headlineKey:"headline_checking",bodyKey:"body_checking",ctaKey:"install_extension",ctaKind:"secondary"}}function f5({status:e,canInstallExtension:t,installHref:n}){return t&&!!n?.trim()&&(e==="checking"||e==="not_connected")}function p5(e,t){const n=Am(e);return n?n==="chrome"?{platform:n,href:Q3(t.chromeExtensionId)}:{platform:n,href:t.safariExtensionPublic==="true"?e5(t.safariAppId):null}:null}function El(){return typeof navigator>"u"?null:p5(navigator.userAgent,{chromeExtensionId:"kgfnkbjmdjbecfmlhohogegidgkhcggb",safariAppId:"6800200805",safariExtensionPublic:""})}
50class Ut extends Error{code;status;method;path;url;responseBody;constructor(t){super(t.message,{cause:t.cause}),this.name="ApiRequestError",this.code=t.code,this.status=t.status,this.method=t.method,this.path=t.path,this.url=t.url,this.responseBody=t.responseBody??null}}async function m5(e){try{const t=await fetch(`${e}/v1/announcements/active`,{signal:AbortSignal.timeout(5e3)});return t.ok?(await t.json()).data:null}catch{return null}}function g5(e,t,n){const r=e.includes("?")?"&":"?";return`${e}${r}${encodeURIComponent(t)}=${encodeURIComponent(n)}`}function kl(e){function t(r,o){return{"x-orbit-client-command-id":o?.clientCommandId??`${r}:${globalThis.crypto?.randomUUID?.()??Math.random().toString(36).slice(2)}`}}async function n(r,o){const[i,s]=await Promise.all([e.getToken?e.getToken():Promise.resolve(null),e.getDevUserId?e.getDevUserId():Promise.resolve(null)]),l=(o?.method??"GET").toUpperCase(),c=e.devUserIdTransport==="query"&&!!s,u=c&&s?g5(r,"dev_user_id",s):r,d=`${e.baseUrl}${u}`,h=new Headers(o?.headers),p=o?.body!==void 0&&o?.body!==null,m=e.preferSimpleRequests===!0&&p&&!i&&c;p&&!m&&!h.has("content-type")&&h.set("content-type","application/json"),i&&h.set("authorization",`Bearer ${i}`),h.set("x-orbit-client","web"),s&&!c&&h.set("x-dev-user-id",s);let g;try{g=await fetch(d,{...o,headers:h,signal:o?.signal?AbortSignal.any([o.signal,AbortSignal.timeout(e.requestTimeoutMs??1e4)]):AbortSignal.timeout(e.requestTimeoutMs??1e4)})}catch(b){throw new Ut({code:"network_error",message:`Network error (${l} ${u})`,status:null,method:l,path:u,url:d,cause:b})}if(!g.ok){const b=await g.text().catch(()=>""),v=new Ut({code:"http_error",message:`API error ${g.status} (${l} ${u})`,status:g.status,method:l,path:u,url:d,responseBody:b});try{await e.onResponseError?.(v)}catch{}throw v}return await g.json()}return{adminMe:()=>n("/v1/admin/me"),adminAccounts:()=>n("/v1/admin/accounts"),adminCreateAccount:r=>n("/v1/admin/accounts",{method:"POST",body:JSON.stringify(r)}),adminDeleteAccount:r=>n("/v1/admin/accounts",{method:"DELETE",body:JSON.stringify(r)}),adminOverview:()=>n("/v1/admin/overview"),adminReleaseStatus:r=>{const o=r?.env??"prod";return n(`/v1/admin/release-status?env=${encodeURIComponent(o)}`)},adminAppMinVersions:()=>n("/v1/internal/app-min-versions"),adminUpdateAppMinVersion:(r,o)=>n(`/v1/internal/app-min-versions/${encodeURIComponent(r)}`,{method:"PATCH",body:JSON.stringify(o)}),adminFeedback:r=>{const o=new URLSearchParams;r?.cursor&&o.set("cursor",r.cursor),r?.type&&o.set("type",r.type);const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/admin/feedback${i}`)},adminErrorReports:r=>{const o=new URLSearchParams;r?.cursor&&o.set("cursor",r.cursor),typeof r?.limit=="number"&&o.set("limit",String(r.limit));const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/admin/error-reports${i}`)},adminUpdateCase:(r,o,i)=>n(`/v1/admin/cases/${r}/${encodeURIComponent(o)}`,{method:"PATCH",body:JSON.stringify(i)}),adminUsers:r=>{const o=new URLSearchParams;r?.cursor&&o.set("cursor",r.cursor),typeof r?.limit=="number"&&o.set("limit",String(r.limit)),r?.q&&o.set("q",r.q),r?.plan&&o.set("plan",r.plan);const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/admin/users${i}`)},adminAuditLogs:r=>{const o=new URLSearchParams;r?.cursor&&o.set("cursor",r.cursor),typeof r?.limit=="number"&&o.set("limit",String(r.limit));const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/admin/audit-logs${i}`)},adminUpdateUserPlan:(r,o)=>n(`/v1/admin/users/${r}/plan`,{method:"PATCH",body:JSON.stringify(o)}),adminCreateCoupon:r=>n("/v1/admin/coupons",{method:"POST",body:JSON.stringify(r)}),adminIssueIncidentCoupon:r=>n("/v1/admin/coupons/incident",{method:"POST",body:JSON.stringify(r)}),adminRevokeIncidentCoupon:r=>n(`/v1/admin/coupons/${r}/revoke`,{method:"POST"}),adminSetCouponActive:(r,o)=>n(`/v1/admin/coupons/${r}`,{method:"PATCH",body:JSON.stringify({isActive:o})}),adminListCoupons:r=>{const o=new URLSearchParams;r?.cursor&&o.set("cursor",r.cursor),typeof r?.limit=="number"&&o.set("limit",String(r.limit));const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/admin/coupons${i}`)}
50,adminUserDetail:r=>n(`/v1/admin/users/${encodeURIComponent(r)}`),adminUserAuthSummary:r=>n(`/v1/admin/users/${encodeURIComponent(r)}/auth-provider`,{method:"POST"}),adminPushDevices:r=>n(`/v1/internal/users/${encodeURIComponent(r)}/push-devices`),adminNotificationTestDevices:()=>n("/v1/internal/notifications/test-devices"),adminSendTestNotification:r=>n("/v1/internal/notifications/test-device",{method:"POST",body:JSON.stringify(r)}),adminKpi:()=>n("/v1/internal/events/kpi"),adminOnboardingStats:(r="week")=>n(`/v1/admin/onboarding-stats?period=${r}`),adminApiStatus:()=>n("/v1/internal/api-status"),adminUpdateApiBudget:(r,o)=>n(`/v1/internal/api-budgets/${encodeURIComponent(r)}`,{method:"PATCH",body:JSON.stringify(o)}),adminOpsHealth:()=>n("/v1/internal/ops-health"),adminRunEnrichRecovery:r=>n(`/v1/internal/enrich/run?limit=${r.limit}`,{method:"POST",body:JSON.stringify({reason:r.reason,confirmation:r.confirmation})}),adminListAnnouncements:()=>n("/v1/admin/announcements"),adminCreateAnnouncement:r=>n("/v1/admin/announcements",{method:"POST",body:JSON.stringify(r)}),adminUpdateAnnouncement:(r,o)=>n(`/v1/admin/announcements/${r}`,{method:"PATCH",body:JSON.stringify(o)}),adminDeleteAnnouncement:r=>n(`/v1/admin/announcements/${r}`,{method:"DELETE"}),adminListCampaigns:()=>n("/v1/internal/campaigns"),adminGetCampaign:r=>n(`/v1/internal/campaigns/${r}`),adminCreateCampaign:r=>n("/v1/internal/campaigns",{method:"POST",body:JSON.stringify(r)}),adminSendCampaign:r=>n(`/v1/internal/campaigns/${r}/send`,{method:"POST",body:JSON.stringify({})}),adminCancelCampaign:r=>n(`/v1/internal/campaigns/${r}`,{method:"DELETE"}),getPublishedFaq:r=>{const o=new URLSearchParams;r?.locale&&o.set("locale",r.locale),r?.platform&&o.set("platform",r.platform),r?.visibility&&o.set("visibility",r.visibility);const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/content/faq${i}`)},adminListContent:r=>n(`/v1/admin/content/${r}`),adminCreateContent:r=>n("/v1/admin/content",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),adminUpdateContent:(r,o)=>n(`/v1/admin/content/${encodeURIComponent(r)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)}),adminDeleteContent:r=>n(`/v1/admin/content/${encodeURIComponent(r)}`,{method:"DELETE"}),previewEmail:r=>n("/v1/internal/email/preview",{method:"POST",body:JSON.stringify(r)}),sendTestEmail:r=>n("/v1/internal/email/send-test",{method:"POST",body:JSON.stringify(r)}),me:()=>n("/v1/me"),getSessionSnapshot:()=>n("/v1/session/snapshot"),orbitState:()=>n("/v1/orbit/state"),getStats:()=>n("/v1/stats"),getSettings:()=>n("/v1/settings"),updateCaptureSettings:r=>n("/v1/settings/capture",{method:"PUT",body:JSON.stringify(r)}),updateSentenceSuggestionSettings:r=>n("/v1/settings/sentence-suggestions",{method:"PUT",body:JSON.stringify(r)}),updatePaletteSettings:r=>n("/v1/settings/palette",{method:"PUT",body:JSON.stringify(r)}),updateDefinitionLanguage:r=>n("/v1/settings/definition-language",{method:"PUT",body:JSON.stringify(r)}),completeWelcome:r=>n("/v1/settings/welcome",{method:"PUT",body:JSON.stringify(r)}),getChecklist:()=>n("/v1/checklist"),markGuideSeen:()=>n("/v1/settings/guide-seen",{method:"PUT"}),updateAnalyticsConsent:r=>n("/v1/settings/analytics-consent",{method:"PUT",body:JSON.stringify({analyticsConsent:r})}),submitReferral:r=>n("/v1/survey/referral",{method:"POST",body:JSON.stringify({referral_source:r})}),dismissReferral:()=>n("/v1/survey/referral/dismiss",{method:"POST",body:JSON.stringify({})}),listVocabLanguages:()=>n("/v1/vocab/languages"),listVocab:r=>{const o=new URLSearchParams;r?.language&&o.set("language",r.language),r?.cursor&&o.set("cursor",r.cursor),typeof r?.limit=="number"&&o.set("limit",String(r.limit)),r?.q&&o.set("q",r.q),r?.sort&&o.set("sort",r.sort);const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/vocab${i}`)},captureInbox:r=>{const o=new URLSearchParams;r?.cursor&&o.set("cursor",r.cursor),typeof r?.limit=="number"&&o.set("limit",String(r.limit));const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/capture/inbox${i}`)},enrichNextInbox:()=>n("/v1/capture/inbox/enrich-next",{method:"POST"}),approveCapture:(r,o)=>n(`/v1/capture/${r}/approve`,{method:"POST",headers:t("capture.approve",o),body:o?.mergeWithExisting?JSON.stringify({merge_with_existing:!0}):o?.selectedChildren?JSON.stringify({selected_children:o.selectedChildren}):void 0}),rejectCapture:(r,o)=>n(`/v1/capture/${r}/reject`,{method:"POST",headers:t("capture.reject",o)}),retryEnrich:(r,o)=>n(`/v1/capture/${r}/enrich`,{method:"POST",headers:t("capture.enrich",o)}),retrySentenceSuggestions:r=>n(`/v1/capture/inbox/${r}/retry-suggestions`,{method:"POST"}),getStudySession:r=>{const o=r!==void 0?`?limit=${r}`:"";return n(`/v1/study/session${o}`)},gradeVocab:(r,o,i)=>n("/v1/review/grade",{method:"POST",headers:t("review.grade",i),body:JSON.stringify({vocabId:r,grade:o})}),exportVocabUrl:(r="csv")=>`${e.baseUrl}/v1/vocab/export?format=${r}`,deleteAccount:()=>n("/v1/account",{method:"DELETE",body:JSON.stringify({mode:"immediate",acknowledgeDataLoss:!0})}),getBillingAccountToken:()=>n("/v1/billing/account-token"),getEntitlement:()=>n("/v1/billing/entitlement"),getAnalysisUsage:()=>n("/v1/billing/usage"),claimAdMobReward:r=>n("/v1/billing/admob/reward-claim",{method:"POST",headers:{"x-orbit-client-command-id":r}}),redeemIncidentCoupon:r=>n("/v1/billing/coupons/redeem",{method:"POST",body:JSON.stringify({code:r})}),verifyPurchase:r=>n("/v1/billing/verify",{method:"POST",body:JSON.stringify(r)}
50),createVocab:(r,o)=>n("/v1/vocab",{method:"POST",headers:t("vocab.create",o),body:JSON.stringify(r)}),updateVocab:(r,o,i)=>n(`/v1/vocab/${r}`,{method:"PUT",headers:t("vocab.update",i),body:JSON.stringify(o)}),deleteVocab:(r,o)=>n(`/v1/vocab/${r}`,{method:"DELETE",headers:t("vocab.delete",o)}),updateCaptureItem:(r,o,i)=>n(`/v1/capture/${r}`,{method:"PATCH",headers:t("capture.update",i),body:JSON.stringify(o)}),trashVocab:(r,o)=>n(`/v1/vocab/${r}/trash`,{method:"POST",headers:t("vocab.trash",o)}),restoreVocab:(r,o)=>n(`/v1/vocab/${r}/restore`,{method:"POST",headers:t("vocab.restore",o)}),captureBatch:(r,o)=>n("/v1/capture/batch",{method:"POST",headers:t("capture.batch",o),body:JSON.stringify({items:r})}),listVocabSources:r=>n(`/v1/vocab/${r}/sources`),mergeVocab:(r,o,i)=>n("/v1/vocab/merge",{method:"POST",headers:t("vocab.merge",i),body:JSON.stringify({keep_id:r,merge_id:o})}),splitVocab:(r,o,i)=>n(`/v1/vocab/${r}/split`,{method:"POST",headers:t("vocab.split",i),body:JSON.stringify(o)}),listTrash:r=>{const o=new URLSearchParams;r?.cursor&&o.set("cursor",r.cursor),typeof r?.limit=="number"&&o.set("limit",String(r.limit));const i=o.toString()?`?${o.toString()}`:"";return n(`/v1/vocab/trash${i}`)},emptyTrash:()=>n("/v1/vocab/trash",{method:"DELETE"}),unsubscribePush:r=>n("/v1/notifications/subscribe",{method:"DELETE",body:JSON.stringify({endpoint:r})}),getNotificationSettings:()=>n("/v1/notifications/settings"),updateNotificationSettings:r=>n("/v1/notifications/settings",{method:"PUT",body:JSON.stringify(r)}),reportError:r=>n("/v1/report/error",{method:"POST",body:JSON.stringify(r)})}}var b5={};const x5=new Set(["context","surface","route","apiRoute","fromRoute","targetRoute","method","errorCode","captureId","jobId","vocabItemId","campaignId","subscriptionId","language","platform","appVersion","digest"]),v5=new Set(["status","attempts","itemCount","acceptedCount","rejectedCount","size","durationMs"]),y5=new Set(["retrying","permanentFailure"]),w5=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|(?:cap|vocab|job|camp|sub)_[a-zA-Z0-9_-]+|[a-zA-Z0-9_-]{16,})$/i;function lu(e){return e.split("/").map(t=>w5.test(t)?":id":t).join("/")}function Is(e){if(typeof e!="string")return;const t=e.trim();if(t){if(t.startsWith("/")){const[n]=t.split(/[?#]/,1);return n?lu(n):void 0}try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?void 0:`${n.origin}${lu(n.pathname)}`}catch{return}}}function Qi(e){const t={};for(const[n,r]of Object.entries(e)){if(n==="route"||n==="fromRoute"||n==="targetRoute"){const o=Is(r);o&&(t[n]=o);continue}if(n==="apiRoute"){const o=Is(r);o&&(t.apiRoute=o);continue}if(x5.has(n)&&typeof r=="string"&&r.trim()){t[n]=r.trim().slice(0,160);continue}if(v5.has(n)&&typeof r=="number"&&Number.isFinite(r)){t[n]=r;continue}if(y5.has(n)&&typeof r=="boolean"){t[n]=r;continue}if(n==="url"){const o=Is(r);o&&(t.url=o)}}return t}function _5(e){try{const t=JSON.parse(e.responseBody??"");return typeof t.error=="string"?t.error.slice(0,80):void 0}catch{return}}function Pm(e=b5){return e.NODE_ENV!=="development"&&e.NODE_ENV!=="test"}function C5(e,t){console.error("local_web_error",{error:e,extra:Qi({surface:"web",context:t.context,route:t.route,method:t.method,status:t.status,...t.extras})})}function S5(e,t){const n={message:e,extra:Qi({surface:"web",context:t.context,route:t.route,...t.extras})};if(t.level==="error"){console.error("local_web_message",n);return}console.warn("local_web_message",n)}let cu=null;function Rm(e){cu??=typeof window>"u"?_t(()=>import("./index.client-CrdxbqjL.js"),__vite__mapDeps([3,4,0,1,2])):_t(()=>import("./instrumentation-client-DMKxhuIx.js"),__vite__mapDeps([5,4,0,1,2])).then(()=>_t(()=>import("./index.client-CrdxbqjL.js"),__vite__mapDeps([3,4,0,1,2]))),cu.then(e).catch(t=>{console.error("sentry_client_load_failed",t)})}async function Xe(e,t){return e instanceof Ut?e.status===401?(await t.handle401(),!0):e.status===403?(await t.handle403(_5(e)),!0):!1:!1}function ae(e,t){const n=typeof t.status=="number"?t.status:e instanceof Ut&&typeof e.status=="number"?e.status:void 0;if(!Pm()){C5(e,{context:t.context,route:t.route,method:t.method,status:n,extras:t.extras});return}Rm(r=>{r.captureException(e,{tags:{surface:"web",context:t.context},extra:Qi({surface:"web",context:t.context,route:t.route,method:t.method,status:n,...t.extras})})})}function E5(e,t){if(!Pm()){S5(e,t);return}Rm(n=>{n.captureMessage(e,{level:t.level??"warning",tags:{surface:"web",context:t.context},extra:Qi({surface:"web",context:t.context,route:t.route,...t.extras})})})}const k5=1500;function uu({photoUrl:e,initials:t}){const[n,r]=f.useState(!1),o=!!e&&!n;return a.jsx("div",{className:"flex aspect-square size-7 items-center justify-center rounded-full shrink-0 select-none overflow-hidden",style:o?void 0:{background:"linear-gradient(135deg, var(--brand-gold), var(--brand-teal))",color:"var(--bg-page)"},"aria-hidden":"true",children:o?a.jsx("img",{src:e,alt:"",className:"size-full object-cover",referrerPolicy:"no-referrer",onError:()=>r(!0)}):a.jsx("span",{className:"text-[0.62rem] font-bold",children:t})})}function I5(e){const t=e.split("@")[0]??"",n=t.split(/[._-]/);return n.length>=2?((n[0]?.[0]??"")+(n[1]?.[0]??"")).toUpperCase():t.slice(0,2).toUpperCase()}function N5(e){if(e==="/console")return"orbit";if(e==="/console/inbox")return"inbox";if(e==="/console/vocabulary")return"vocabulary";if(e==="/console/review")return"review"}function T5(e){return e==="/console"?l3:e==="/console/vocabulary"?n3:e==="/console/inbox"?e3:e==="/console/review"?D6:e==="/console/trash"?xm:null}function Ns(e,t){return e==="/console"?t==="/console"||t==="/console/"||t.startsWith("/console/orbit"):t.startsWith(e)}const A5=f.memo(function({navItems:t,activePathname:n,pendingCount:r=0,userEmail:o,userPhotoUrl:i,onSignOut:s,...l}){const c=se("Console.sidebar"),{isMobile:u}=oo(),[d,h]=f.useState(null),[p,m]=f.useState(null),g=f.useRef(null),b=I5(o),v=n.startsWith("/console/settings");f.useEffect(()=>{h(El()?.href??null)},[]),f.useEffect(()=>{const A=g.current;!A||!Ns(A.href,n)||(clearTimeout(A.timer),g.current=null,m(null))},[n]),f.useEffect(()=>()=>{g.current&&clearTimeout(g.current.timer),m(null)},[]);function x(A,T){if(T.defaultPrevented||T.button!==0||T.metaKey||T.ctrlKey||T.shiftKey||T.altKey||Ns(A.href,n))return;g.current&&clearTimeout(g.current.timer);const L=performance.now(),D=n,S=setTimeout(()=>{const j=g.current;if(!j||j.href!==A.href)return;const P=Math.round(performance.now()-j.startedAt);E5("console_sidebar_navigation_stalled",{context:"console_sidebar_navigation",route:j.href,extras:{fromRoute:j.fromPathname,targetRoute:j.href,durationMs:P,isMobile:u}}),m(null),g.current=null},k5);g.current={href:A.href,fromPathname:D,startedAt:L,timer:S},m(A.href)}const E=t.filter(A=>A.href!=="/console/trash"&&A.href!=="/console/faq"),y=t.find(A=>A.href==="/console/trash"),k=t.find(A=>A.href==="/console/faq"),I=n.startsWith("/console/trash"),C=n.startsWith("/console/faq");return a.jsxs(O3,{...l,children:[a.jsxs(F3,{className:"pt-2",children:[a.jsxs("div",{className:"flex items-center gap-2.5 px-4 pt-3 pb-4",children:[a.jsx(Im,{size:20}),a.jsx("span",{className:"text-[1.05rem] font-semibold tracking-[-0.02em] text-(--fg-strong)",style:{fontFamily:"var(--font-display-web)"},children:"Orvoca"})]}),a.jsx(U3,{className:"px-3 py-1",children:a.jsx(au,{className:"gap-0.5",children:E.map(A=>{const T=Ns(A.href,n),L=A.href==="/console/inbox",D=T5(A.href);return a.jsx(Ho,{children:a.jsx(Vo,{asChild:!0,isActive:T,"aria-current":T?"page":void 0,className:"console-sidebar-nav-item min-h-10 rounded-lg border border-transparent px-3 text-[0.86rem] font-medium text-(--fg-muted) transition-[background,color,box-shadow,opacity,transform] duration-140 hover:bg-[color-mix(in_srgb,var(--bg-elevated)_92%,transparent)] hover:text-(--fg-body) data-[navigation-pending=true]:opacity-70","data-navigation-pending":p===A.href?"true":void 0,children:a.jsxs(Ve,{href:A.href,"data-tour":N5(A.href),"aria-busy":p===A.href,onClick:S=>x(A,S),children:[D&&a.jsx(D,{size:15,strokeWidth:T?2.2:1.8,className:T?"text-(--fg-strong)":"text-(--fg-muted) opacity-70","aria-hidden":"true"}),a.jsx("span",{className:"tracking-[-0.01em]",children:A.label}),L&&r>0?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sr-only",children:" "}),a.jsx("span",{className:"ml-auto inline-flex min-h-5 min-w-5 items-center justify-center rounded-full border border-(--line-warning) bg-(--tint-warning) px-1.5 text-[0.66rem] font-bold text-(--fg-warning-on-tint)","aria-label":`${r} pending`,children:r})]}):null]})})},A.href)})})})]}),a.jsx(D3,{className:"gap-1 p-3",children:a.jsxs(au,{children:[d?a.jsx(Ho,{children:a.jsx(Vo,{asChild:!0,className:"min-h-9 rounded-lg border border-transparent px-3 text-[0.8rem] font-medium text-(--fg-muted) transition-[background,border-color,color] duration-140 hover:border-(--line-soft) hover:bg-[color-mix(in_srgb,var(--bg-elevated)_92%,transparent)] hover:text-(--fg-body)",children:a.jsxs("a",{href:d,target:"_blank",rel:"noreferrer","data-tour":"extension-install",children:[a.jsx(h3,{size:13,strokeWidth:1.8,className:"opacity-60","aria-hidden":"true"}),a.jsx("span",{className:"tracking-[-0.01em]",children:c("install_extension")}),a.jsx(L6,{size:12,strokeWidth:1.6,className:"ml-auto opacity-45","aria-hidden":"true"})]})})}):null,k?a.jsx(Ho,{children:a.jsx(Vo,{asChild:!0,isActive:C,"aria-current":C?"page":void 0,tooltip:k.label,className:"console-sidebar-nav-item console-sidebar-faq-item min-h-9 rounded-lg border border-transparent px-3 text-[0.8rem] font-medium text-(--fg-muted) transition-[background,color,box-shadow,opacity,transform] duration-140 hover:bg-[color-mix(in_srgb,var(--bg-elevated)_92%,transparent)] hover:text-(--fg-body)","data-navigation-pending":p===k.href?"true":void 0,children:a.jsxs(Ve,{href:k.href,"aria-busy":p===k.href,onClick:A=>x(k,A),children:[a.jsx(W6,{size:15,strokeWidth:C?2.2:1.8,className:C?"text-(--fg-strong)":"text-(--fg-muted) opacity-70","aria-hidden":"true"}),a.jsx("span",{className:"tracking-[-0.01em]",children:k.label})]})})}):null,a.jsx(Ho,{children:a.jsxs(_l,{children:[a.jsx(Cl,{asChild:!0,children:a.jsxs(Vo,{size:"lg",className:"min-h-11 rounded-xl border border-(--line-soft) bg-[color-mix(in_srgb,var(--bg-panel)_94%,transparent)] data-[state=open]:bg-[color-mix(in_srgb,var(--bg-elevated)_98%,transparent)] data-[state=open]:text-(--fg-body) shadow-none",children:[a.jsx(uu,{p
50hotoUrl:i,initials:b}),a.jsx("div",{className:"flex-1 min-w-0 text-left",children:a.jsx("p",{className:"text-[0.76rem] text-(--fg-muted) overflow-hidden text-ellipsis whitespace-nowrap leading-snug",title:o,children:o})}),a.jsx(B6,{size:14,className:"ml-auto shrink-0 text-(--fg-muted) opacity-50","aria-hidden":"true"})]})}),a.jsxs(Zi,{className:"console-account-menu w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-xl border p-1",side:u?"top":"right",align:u?"start":"end",sideOffset:8,collisionPadding:12,children:[a.jsxs(km,{className:"flex items-center gap-2.5 px-3 py-2 font-normal",children:[a.jsx(uu,{photoUrl:i,initials:b}),a.jsx("span",{className:"text-[0.76rem] text-(--fg-muted) overflow-hidden text-ellipsis whitespace-nowrap",title:o,children:o})]}),a.jsx(Fn,{asChild:!0,children:a.jsxs(Ve,{href:"/console/settings",className:["no-underline",v?"bg-(--tint-brand) text-(--fg-strong) font-semibold":""].join(" "),children:[a.jsx(g3,{size:14,className:"shrink-0 opacity-60","aria-hidden":"true"}),c("settings")]})}),y&&a.jsx(Fn,{asChild:!0,children:a.jsxs(Ve,{href:"/console/trash",className:["no-underline",I?"bg-(--tint-brand) text-(--fg-strong) font-semibold":""].join(" "),children:[a.jsx(xm,{size:14,className:"shrink-0 opacity-60","aria-hidden":"true"}),y.label]})}),a.jsx(Em,{}),a.jsxs(Fn,{onSelect:s,className:"text-(--fg-danger-on-tint) focus:bg-(--tint-danger) focus:text-(--fg-danger-on-tint)",children:[a.jsx(o3,{size:14,className:"shrink-0 opacity-60","aria-hidden":"true"}),c("log_out")]})]})]})})]})})]})});const P5=()=>{};var du={};const jm=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++){let o=e.charCodeAt(r);o<128?t[n++]=o:o<2048?(t[n++]=o>>6|192,t[n++]=o&63|128):(o&64512)===55296&&r+1<e.length&&(e.charCodeAt(r+1)&64512)===56320?(o=65536+((o&1023)<<10)+(e.charCodeAt(++r)&1023),t[n++]=o>>18|240,t[n++]=o>>12&63|128,t[n++]=o>>6&63|128,t[n++]=o&63|128):(t[n++]=o>>12|224,t[n++]=o>>6&63|128,t[n++]=o&63|128)}return t},R5=function(e){const t=[];let n=0,r=0;for(;n<e.length;){const o=e[n++];if(o<128)t[r++]=String.fromCharCode(o);else if(o>191&&o<224){const i=e[n++];t[r++]=String.fromCharCode((o&31)<<6|i&63)}else if(o>239&&o<365){const i=e[n++],s=e[n++],l=e[n++],c=((o&7)<<18|(i&63)<<12|(s&63)<<6|l&63)-65536;t[r++]=String.fromCharCode(55296+(c>>10)),t[r++]=String.fromCharCode(56320+(c&1023))}else{const i=e[n++],s=e[n++];t[r++]=String.fromCharCode((o&15)<<12|(i&63)<<6|s&63)}}return t.join("")},Om={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(e,t){if(!Array.isArray(e))throw Error("encodeByteArray takes an array as a parameter");this.init_();const n=t?this.byteToCharMapWebSafe_:this.byteToCharMap_,r=[];for(let o=0;o<e.length;o+=3){const i=e[o],s=o+1<e.length,l=s?e[o+1]:0,c=o+2<e.length,u=c?e[o+2]:0,d=i>>2,h=(i&3)<<4|l>>4;let p=(l&15)<<2|u>>6,m=u&63;c||(m=64,s||(p=64)),r.push(n[d],n[h],n[p],n[m])}return r.join("")},encodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?btoa(e):this.encodeByteArray(jm(e),t)},decodeString(e,t){return this.HAS_NATIVE_SUPPORT&&!t?atob(e):R5(this.decodeStringToByteArray(e,t))},decodeStringToByteArray(e,t){this.init_();const n=t?this.charToByteMapWebSafe_:this.charToByteMap_,r=[];for(let o=0;o<e.length;){const i=n[e.charAt(o++)],l=o<e.length?n[e.charAt(o)]:0;++o;const u=o<e.length?n[e.charAt(o)]:64;++o;const h=o<e.length?n[e.charAt(o)]:64;if(++o,i==null||l==null||u==null||h==null)throw new j5;const p=i<<2|l>>4;if(r.push(p),u!==64){const m=l<<4&240|u>>2;if(r.push(m),h!==64){const g=u<<6&192|h;r.push(g)}}}return r},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let e=0;e<this.ENCODED_VALS.length;e++)this.byteToCharMap_[e]=this.ENCODED_VALS.charAt(e),this.charToByteMap_[this.byteToCharMap_[e]]=e,this.byteToCharMapWebSafe_[e]=this.ENCODED_VALS_WEBSAFE.charAt(e),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[e]]=e,e>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(e)]=e,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(e)]=e)}}};
50class j5 extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const O5=function(e){const t=jm(e);return Om.encodeByteArray(t,!0)},Lm=function(e){return O5(e).replace(/\./g,"")},Mm=function(e){try{return Om.decodeString(e,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};function L5(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}const M5=()=>L5().__FIREBASE_DEFAULTS__,D5=()=>{if(typeof process>"u"||typeof du>"u")return;const e=du.__FIREBASE_DEFAULTS__;if(e)return JSON.parse(e)},F5=()=>{if(typeof document>"u")return;let e;try{e=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const t=e&&Mm(e[1]);return t&&JSON.parse(t)},Il=()=>{try{return P5()||M5()||D5()||F5()}catch(e){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);return}},U5=e=>Il()?.emulatorHosts?.[e],Dm=()=>Il()?.config,Fm=e=>Il()?.[`_${e}`];class Um{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}wrapCallback(t){return(n,r)=>{n?this.reject(n):this.resolve(r),typeof t=="function"&&(this.promise.catch(()=>{}),t.length===1?t(n):t(n,r))}}}function et(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function z5(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(et())}function B5(){return typeof navigator<"u"&&navigator.userAgent==="Cloudflare-Workers"}function $5(){const e=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof e=="object"&&e.id!==void 0}function H5(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function V5(){const e=et();return e.indexOf("MSIE ")>=0||e.indexOf("Trident/")>=0}function W5(){try{return typeof indexedDB=="object"}catch{return!1}}function q5(){return new Promise((e,t)=>{try{let n=!0;const r="validate-browser-context-for-indexeddb-analytics-module",o=self.indexedDB.open(r);o.onsuccess=()=>{o.result.close(),n||self.indexedDB.deleteDatabase(r),e(!0)},o.onupgradeneeded=()=>{n=!1},o.onerror=()=>{t(o.error?.message||"")}}catch(n){t(n)}})}const G5="FirebaseError";class kn extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name=G5,Object.setPrototypeOf(this,kn.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,go.prototype.create)}}class go{constructor(t,n,r){this.service=t,this.serviceName=n,this.errors=r}create(t,...n){const r=n[0]||{},o=`${this.service}/${t}`,i=this.errors[t],s=i?K5(i,r):"Error",l=`${this.serviceName}: ${s} (${o}).`;return new kn(o,l,r)}}function K5(e,t){try{let n=0,r="";for(;n<e.length;){const o=e.indexOf("{$",n);if(o===-1){r+=e.substring(n);break}const i=e.indexOf("}",o+2);if(i===-1){r+=e.substring(n);break}const s=e.substring(o+2,i),l=t[s];r+=e.substring(n,o)+(l!=null?String(l):`<${s}?>`),n=i+1}return r}catch{return e}}function X5(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}function br(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);for(const o of n){if(!r.includes(o))return!1;const i=e[o],s=t[o];if(hu(i)&&hu(s)){if(!br(i,s))return!1}else if(i!==s)return!1}for(const o of r)if(!n.includes(o))return!1;return!0}function hu(e){return e!==null&&typeof e=="object"}function bo(e){const t=[];for(const[n,r]of Object.entries(e))Array.isArray(r)?r.forEach(o=>{t.push(encodeURIComponent(n)+"="+encodeURIComponent(o))}):t.push(encodeURIComponent(n)+"="+encodeURIComponent(r));return t.length?"&"+t.join("&"):""}function Lr(e){const t={};return e.replace(/^\?/,"").split("&").forEach(r=>{if(r){const[o,i]=r.split("=");
50t[decodeURIComponent(o)]=decodeURIComponent(i)}}),t}function Mr(e){const t=e.indexOf("?");if(!t)return"";const n=e.indexOf("#",t);return e.substring(t,n>0?n:void 0)}function Y5(e,t){const n=new J5(e,t);return n.subscribe.bind(n)}class J5{constructor(t,n){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=n,this.task.then(()=>{t(this)}).catch(r=>{this.error(r)})}next(t){this.forEachObserver(n=>{n.next(t)})}error(t){this.forEachObserver(n=>{n.error(t)}),this.close(t)}complete(){this.forEachObserver(t=>{t.complete()}),this.close()}subscribe(t,n,r){let o;if(t===void 0&&n===void 0&&r===void 0)throw new Error("Missing Observer.");Z5(t,["next","error","complete"])?o=t:o={next:t,error:n,complete:r},o.next===void 0&&(o.next=Ts),o.error===void 0&&(o.error=Ts),o.complete===void 0&&(o.complete=Ts);const i=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?o.error(this.finalError):o.complete()}catch{}}),this.observers.push(o),i}unsubscribeOne(t){this.observers===void 0||this.observers[t]===void 0||(delete this.observers[t],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(t){if(!this.finalized)for(let n=0;n<this.observers.length;n++)this.sendOne(n,t)}sendOne(t,n){this.task.then(()=>{if(this.observers!==void 0&&this.observers[t]!==void 0)try{n(this.observers[t])}catch(r){typeof console<"u"&&console.error&&console.error(r)}})}close(t){this.finalized||(this.finalized=!0,t!==void 0&&(this.finalError=t),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function Z5(e,t){if(typeof e!="object"||e===null)return!1;for(const n of t)if(n in e&&typeof e[n]=="function")return!0;return!1}function Ts(){}function st(e){return e&&e._delegate?e._delegate:e}function Nl(e){try{return(e.startsWith("http://")||e.startsWith("https://")?new URL(e).hostname:e).endsWith(".cloudworkstations.dev")}catch{return!1}}async function Q5(e){return(await fetch(e,{credentials:"include"})).ok}class xr{constructor(t,n,r){this.name=t,this.instanceFactory=n,this.type=r,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}const Mn="[DEFAULT]";class e_{constructor(t,n){this.name=t,this.container=n,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(t){const n=this.normalizeInstanceIdentifier(t);if(!this.instancesDeferred.has(n)){const r=new Um;if(this.instancesDeferred.set(n,r),this.isInitialized(n)||this.shouldAutoInitialize())try{const o=this.getOrInitializeService({instanceIdentifier:n});o&&r.resolve(o)}catch{}}return this.instancesDeferred.get(n).promise}getImmediate(t){const n=this.normalizeInstanceIdentifier(t?.identifier),r=t?.optional??!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(o){if(r)return null;throw o}else{if(r)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(t){if(t.name!==this.name)throw Error(`Mismatching Component ${t.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=t,!!this.shouldAutoInitialize()){if(n_(t))try{this.getOrInitializeService({instanceIdentifier:Mn})}catch{}for(const[n,r]of this.instancesDeferred.entries()){const o=this.normalizeInstanceIdentifier(n);try{const i=this.getOrInitializeService({instanceIdentifier:o});r.resolve(i)}catch{}}}}clearInstance(t=Mn){this.instancesDeferred.delete(t),this.instancesOptions.delete(t),this.instances.delete(t)}async delete(){const t=Array.from(this.instances.values());await Promise.all([...t.filter(n=>"INTERNAL"in n).map(n=>n.INTERNAL.delete()),...t.filter(n=>"_delete"in n).map(n=>n._delete())])}isComponentSet(){return this.component!=null}isInitialized(t=Mn){return this.instances.has(t)}getOptions(t=Mn){return this.instancesOptions.get(t)||{}}initialize(t={}){const{options:n={}}=t,r=this.normalizeInstanceIdentifier(t.instanceIdentifier);if(this.isInitialized(r))throw Error(`${this.name}(${r}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const o=this.getOrInitializeService({instanceIdentifier:r,options:n});for(const[i,s]of this.instancesDeferred.entries()){const l=this.normalizeInstanceIdentifier(i);r===l&&s.resolve(o)}return o}onInit(t,n){const r=this.normalizeInstanceIdentifier(n),o=this.onInitCallbacks.get(r)??new Set;o.add(t),this.onInitCallbacks.set(r,o);const i=this.instances.get(r);return i&&t(i,r),()=>{o.delete(t)}}invokeOnInitCallbacks(t,n){const r=this.onInitCallbacks.get(n);if(r)for(const o of r)try{o(t,n)}catch{}}getOrInitializeService({instanceIdentifier:t,options:n={}}){let r=this.instances.get(t);if(!r&&this.component&&(r=this.component.instanceFactory(this.container,{instanceIdentifier:t_(t),options:n}),this.instances.set(t,r),this.instancesOptions.set(t,n),this.invokeOnInitCallbacks(r,t),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,t,r)}catch{}return r||null}normalizeInstanceIdentifier(t=Mn){return this.component?this.component.multipleInstances?t:Mn:t}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function t_(e){return e===Mn?void 0:e}function n_(e){return e.instantiationMode==="EAGER"}class r_{constructor(t){this.name=t,this.providers=new Map}addComponent(t){const n=this.getProvider(t.name);if(n.isComponentSet())throw new Error(`Component ${t.name} has already been registered with ${this.name}`);n.setComponent(t)}addOrOverwriteComponent(t){this.getProvider(t.name).isComponentSet()&&this.providers.delete(t.name),this.addComponent(t)}getProvider(t){if(this.providers.has(t))return this.providers.get(t);const n=new e_(t,this);return this.providers.set(t,n),n}getProviders(){return Array.from(this.providers.values())}}var Oe;(function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.E
50RROR=4]="ERROR",e[e.SILENT=5]="SILENT"})(Oe||(Oe={}));const o_={debug:Oe.DEBUG,verbose:Oe.VERBOSE,info:Oe.INFO,warn:Oe.WARN,error:Oe.ERROR,silent:Oe.SILENT},i_=Oe.INFO,s_={[Oe.DEBUG]:"log",[Oe.VERBOSE]:"log",[Oe.INFO]:"info",[Oe.WARN]:"warn",[Oe.ERROR]:"error"},a_=(e,t,...n)=>{if(t<e.logLevel)return;const r=new Date().toISOString(),o=s_[t];if(o)console[o](`[${r}]  ${e.name}:`,...n);else throw new Error(`Attempted to log a message with an invalid logType (value: ${t})`)};class zm{constructor(t){this.name=t,this._logLevel=i_,this._logHandler=a_,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(t){if(!(t in Oe))throw new TypeError(`Invalid value "${t}" assigned to \`logLevel\``);this._logLevel=t}setLogLevel(t){this._logLevel=typeof t=="string"?o_[t]:t}get logHandler(){return this._logHandler}set logHandler(t){if(typeof t!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=t}get userLogHandler(){return this._userLogHandler}set userLogHandler(t){this._userLogHandler=t}debug(...t){this._userLogHandler&&this._userLogHandler(this,Oe.DEBUG,...t),this._logHandler(this,Oe.DEBUG,...t)}log(...t){this._userLogHandler&&this._userLogHandler(this,Oe.VERBOSE,...t),this._logHandler(this,Oe.VERBOSE,...t)}info(...t){this._userLogHandler&&this._userLogHandler(this,Oe.INFO,...t),this._logHandler(this,Oe.INFO,...t)}warn(...t){this._userLogHandler&&this._userLogHandler(this,Oe.WARN,...t),this._logHandler(this,Oe.WARN,...t)}error(...t){this._userLogHandler&&this._userLogHandler(this,Oe.ERROR,...t),this._logHandler(this,Oe.ERROR,...t)}}const l_=(e,t)=>t.some(n=>e instanceof n);let fu,pu;function c_(){return fu||(fu=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function u_(){return pu||(pu=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Bm=new WeakMap,Ea=new WeakMap,$m=new WeakMap,As=new WeakMap,Tl=new WeakMap;function d_(e){const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",s)},i=()=>{n(wn(e.result)),o()},s=()=>{r(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",s)});return t.then(n=>{n instanceof IDBCursor&&Bm.set(n,e)}).catch(()=>{}),Tl.set(t,e),t}function h_(e){if(Ea.has(e))return;const t=new Promise((n,r)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",s),e.removeEventListener("abort",s)},i=()=>{n(),o()},s=()=>{r(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",s),e.addEventListener("abort",s)});Ea.set(e,t)}let ka={get(e,t,n){if(e instanceof IDBTransaction){if(t==="done")return Ea.get(e);if(t==="objectStoreNames")return e.objectStoreNames||$m.get(e);if(t==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return wn(e[t])},set(e,t,n){return e[t]=n,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function f_(e){ka=e(ka)}function p_(e){return e===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(t,...n){const r=e.call(Ps(this),t,...n);return $m.set(r,t.sort?t.sort():[t]),wn(r)}:u_().includes(e)?function(...t){return e.apply(Ps(this),t),wn(Bm.get(this))}:function(...t){return wn(e.apply(Ps(this),t))}}function m_(e){return typeof e=="function"?p_(e):(e instanceof IDBTransaction&&h_(e),l_(e,c_())?new Proxy(e,ka):e)}function wn(e){if(e instanceof IDBRequest)return d_(e);if(As.has(e))return As.get(e);const t=m_(e);return t!==e&&(As.set(e,t),Tl.set(t,e)),t}const Ps=e=>Tl.get(e);function g_(e,t,{blocked:n,upgrade:r,blocking:o,terminated:i}={}){const s=indexedDB.open(e,t),l=wn(s);return r&&s.addEventListener("upgradeneeded",c=>{r(wn(s.result),c.oldVersion,c.newVersion,wn(s.transaction),c)}),n&&s.addEventListener("blocked",c=>n(c.oldVersion,c.newVersion,c)),l.then(c=>{i&&c.addEventListener("close",()=>i()),o&&c.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),l}const b_=["get","getKey","getAll","getAllKeys","count"],x_=["put","add","delete","clear"],Rs=new Map;function mu(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Rs.get(t))return Rs.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,o=x_.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!(o||b_.includes(n)))return;const i=async function(s,...l){const c=this.transaction(s,o?"readwrite":"readonly");let u=c.store;
50return r&&(u=u.index(l.shift())),(await Promise.all([u[n](...l),o&&c.done]))[0]};return Rs.set(t,i),i}f_(e=>({...e,get:(t,n,r)=>mu(t,n)||e.get(t,n,r),has:(t,n)=>!!mu(t,n)||e.has(t,n)}));class v_{constructor(t){this.container=t}getPlatformInfoString(){return this.container.getProviders().map(n=>{if(y_(n)){const r=n.getImmediate();return`${r.library}/${r.version}`}else return null}).filter(n=>n).join(" ")}}function y_(e){return e.getComponent()?.type==="VERSION"}const Ia="@firebase/app",gu="0.16.1";const en=new zm("@firebase/app"),w_="@firebase/app-compat",__="@firebase/analytics-compat",C_="@firebase/analytics",S_="@firebase/app-check-compat",E_="@firebase/app-check",k_="@firebase/auth",I_="@firebase/auth-compat",N_="@firebase/database",T_="@firebase/data-connect",A_="@firebase/database-compat",P_="@firebase/functions",R_="@firebase/functions-compat",j_="@firebase/installations",O_="@firebase/installations-compat",L_="@firebase/messaging",M_="@firebase/messaging-compat",D_="@firebase/performance",F_="@firebase/performance-compat",U_="@firebase/remote-config",z_="@firebase/remote-config-compat",B_="@firebase/storage",$_="@firebase/storage-compat",H_="@firebase/firestore",V_="@firebase/ai",W_="@firebase/firestore-compat",q_="firebase",G_="12.18.0";const Na="[DEFAULT]",K_={[Ia]:"fire-core",[w_]:"fire-core-compat",[C_]:"fire-analytics",[__]:"fire-analytics-compat",[E_]:"fire-app-check",[S_]:"fire-app-check-compat",[k_]:"fire-auth",[I_]:"fire-auth-compat",[N_]:"fire-rtdb",[T_]:"fire-data-connect",[A_]:"fire-rtdb-compat",[P_]:"fire-fn",[R_]:"fire-fn-compat",[j_]:"fire-iid",[O_]:"fire-iid-compat",[L_]:"fire-fcm",[M_]:"fire-fcm-compat",[D_]:"fire-perf",[F_]:"fire-perf-compat",[U_]:"fire-rc",[z_]:"fire-rc-compat",[B_]:"fire-gcs",[$_]:"fire-gcs-compat",[H_]:"fire-fst",[W_]:"fire-fst-compat",[V_]:"fire-vertex","fire-js":"fire-js",[q_]:"fire-js-all"};const Kr=new Map,X_=new Map,Ta=new Map;function bu(e,t){try{e.container.addComponent(t)}catch(n){en.debug(`Component ${t.name} failed to register with FirebaseApp ${e.name}`,n)}}function Xr(e){const t=e.name;if(Ta.has(t))return en.debug(`There were multiple attempts to register component ${t}.`),!1;Ta.set(t,e);for(const n of Kr.values())bu(n,e);for(const n of X_.values())bu(n,e);return!0}function Hm(e,t){const n=e.container.getProvider("heartbeat").getImmediate({optional:!0});return n&&n.triggerHeartbeat(),e.container.getProvider(t)}function dt(e){return e==null?!1:e.settings!==void 0}const Y_={"no-app":"No Firebase App '{$appName}' has been created - call initializeApp() first","bad-app-name":"Illegal App name: '{$appName}'","duplicate-app":"Firebase App named '{$appName}' already exists with different {$mismatchedParam}. Existing: '{$oldValue}'. New: '{$newValue}'.","app-deleted":"Firebase App named '{$appName}' already deleted","server-app-deleted":"Firebase Server App has been deleted","no-options":"Need to provide options, when not being deployed to hosting via source.","invalid-app-argument":"firebase.{$appName}() takes either no argument or a Firebase App instance.","invali
50d-log-argument":"First argument to `onLog` must be null or a function.","idb-open":"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.","idb-get":"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.","idb-set":"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.","idb-delete":"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.","finalization-registry-not-supported":"FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.","invalid-server-app-environment":"FirebaseServerApp is not for use in browser environments."},Gt=new go("app","Firebase",Y_);class J_{constructor(t,n,r){this._isDeleted=!1,this._options={...t},this._config={...n},this._name=n.name,this._automaticDataCollectionEnabled=n.automaticDataCollectionEnabled,this._container=r,this.container.addComponent(new xr("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(t){this.checkDestroyed(),this._automaticDataCollectionEnabled=t}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(t){this._isDeleted=t}checkDestroyed(){if(this.isDeleted)throw Gt.create("app-deleted",{appName:this._name})}}const xo=G_;function Vm(e,t={}){let n=e;typeof t!="object"&&(t={name:t});const r={name:Na,automaticDataCollectionEnabled:!0,...t},o=r.name;if(typeof o!="string"||!o)throw Gt.create("bad-app-name",{appName:String(o)});if(n||(n=Dm()),!n)throw Gt.create("no-options");const i=Kr.get(o);if(i)if(br(n,i.options)){if(br(r,i.config))return i;throw Gt.create("duplicate-app",{appName:o,mismatchedParam:"config",oldValue:JSON.stringify(i.config),newValue:JSON.stringify(r)})}else throw Gt.create("duplicate-app",{appName:o,mismatchedParam:"options",oldValue:JSON.stringify(i.options),newValue:JSON.stringify(n)});const s=new r_(o);for(const c of Ta.values())s.addComponent(c);const l=new J_(n,r,s);return Kr.set(o,l),l}function Z_(e=Na){const t=Kr.get(e);if(!t&&e===Na&&Dm())return Vm();if(!t)throw Gt.create("no-app",{appName:e});return t}function Q_(){return Array.from(Kr.values())}function ar(e,t,n){let r=K_[e]??e;n&&(r+=`-${n}`);const o=r.match(/\s|\//),i=t.match(/\s|\//);if(o||i){const s=[`Unable to register library "${r}" with version "${t}":`];o&&s.push(`library name "${r}" contains illegal characters (whitespace or "/")`),o&&i&&s.push("and"),i&&s.push(`version name "${t}" contains illegal characters (whitespace or "/")`),en.warn(s.join(" "));return}Xr(new xr(`${r}-version`,()=>({library:r,version:t}),"VERSION"))}const e2="firebase-heartbeat-database",t2=1,Yr="firebase-heartbeat-store";let js=null;function Wm(){return js||(js=g_(e2,t2,{upgrade:(e,t)=>{switch(t){case 0:try{e.createObjectStore(Yr)}catch(n){console.warn(n)}}}}).catch(e=>{throw Gt.create("idb-open",{originalErrorMessage:e.message})})),js}async function n2(e){try{const n=(await Wm()).transaction(Yr),r=await n.objectStore(Yr).get(qm(e));return await n.done,r}catch(t){if(t instanceof kn)en.warn(t.message);else{const n=Gt.create("idb-get",{originalErrorMessage:t?.message});en.warn(n.message)}}}async function xu(e,t){try{const r=(await Wm()).transaction(Yr,"readwrite");await r.objectStore(Yr).put(t,qm(e)),await r.done}catch(n){if(n instanceof kn)en.warn(n.message);else{const r=Gt.create("idb-set",{originalErrorMessage:n?.message});en.warn(r.message)}}}function qm(e){return`${e.name}!${e.options.appId}`}const r2=1024,o2=30;class i2{constructor(t){this.container=t,this._heartbeatsCache=null;const n=this.container.getProvider("app").getImmediate();this._storage=new a2(n),this._heartbeatsCachePromise=this._storage.read().then(r=>(this._heartbeatsCache=r,r))}async triggerHeartbeat(){try{const n=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),r=vu();if(this._heartbeatsCache?.heartbeats==null&&(this._heartbeatsCache=await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null)||this._heartbeatsCache.lastSentHeartbeatDate===r||this._heartbeatsCache.heartbeats.some(o=>o.date===r))return;if(this._heartbeatsCache.heartbeats.push({date:r,agent:n}),this._heartbeatsCache.heartbeats.length>o2){const o=l2(this._heartbeatsCache.heartbeats);this._heartbeatsCache.heartbeats.splice(o,1)}return this._storage.overwrite(this._heartbeatsCache)}catch(t){en.warn(t)}}async getHeartbeatsHeader(){try{if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache?.heartbeats==null||this._heartbeatsCache.heartbeats.length===0)return"";const t=vu(),{heartbeatsToSend:n,unsentEntries:r}=s2(this._heartbeatsCache.heartbeats),o=Lm(JSON.stringify({version:2,heartbeats:n}));return this._heartbeatsCache.lastSentHeartbeatDate=t,r.length>0?(this._heartbeatsCache.heartbeats=r,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),o}catch(t){return en.warn(t),""}}}function vu(){return new Date().toISOString().substring(0,10)}function s2(e,t=r2){const n=[];let r=e.slice();for(const o of e){const i=n.find(s=>s.agent===o.agent);if(i){if(i.dates.push(o.date),yu(n)>t){i.dates.pop();break}}else if(n.push({agent:o.agent,dates:[o.date]}),yu(n)>t){n.pop();break}r=r.slice(1)}return{heartbeatsToSend:n,unsentEntries:r}}class a2{constructor(t){this.app=t,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return W5()?q5().then(()=>!0).catch(()=>!1):!1}async read(){if(await this._canUseIndexedDBPromise){const n=await n2(this.app);return n?.heartbeats?n:{heartbeats:[]}}else return{heartbeats:[]}}async overwrite(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return xu(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:t.heartbeats})}else return}async add(t){if(await this._canUseIndexedDBPromise){const r=await this.read();return xu(this.app,{lastSentHeartbeatDate:t.lastSentHeartbeatDate??r.lastSentHeartbeatDate,heartbeats:[...r.heartbeats,...t.heartbeats]})}else return}}function yu(e){return Lm(JSON.stringify({version:2,heartbeats:e})).length}function l2(e){if(e.length===0)return-1;let t=0,n=e[0].date;for(let r=1;r<e.length;r++)e[r].date<n&&(n=e[r].date,t=r);return t}function c2(e){Xr(new xr("platform-logger",t=>new v_(t),"PRIVATE")),Xr(new xr("heartbeat",t=>new i2(t),"PRIVATE")),ar(Ia,gu,e),ar(Ia,gu,"esm2020"),ar("fire-js","")}c2("");var u2="firebase",d2="12.18.0";ar(u2,d2,"app");function Gm(){return{"dependent-sdk-initialized-before-auth":"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const h2=Gm,Km=new go("auth","Firebase",Gm());const vi=new zm("@firebase/auth");function Xm(e,...t){vi.logLevel<=Oe.WARN&&vi.warn(`Auth (${xo}): ${e}`,...t)}function ti(e,...t){vi.logLevel<=Oe.ERROR&&vi.error(`Auth (${xo}): ${e}`,...t)}function vt(e,...t){throw Pl(e,...t)}function xt(e,...t){return Pl(e,...t)}function Al(e,t,n){const r={...h2(),[t]:n};
50return new go("auth","Firebase",r).create(t,{appName:e.name})}function Yt(e){return Al(e,"operation-not-supported-in-this-environment","Operations that alter the current user are not supported in conjunction with FirebaseServerApp")}function Ym(e,t,n){const r=n;if(!(t instanceof r))throw r.name!==t.constructor.name&&vt(e,"argument-error"),Al(e,"argument-error",`Type of ${t.constructor.name} does not match expected instance.Did you pass a reference from a different Auth SDK?`)}function Pl(e,...t){if(typeof e!="string"){const n=t[0],r=[...t.slice(1)];return r[0]&&(r[0].appName=e.name),e._errorFactory.create(n,...r)}return Km.create(e,...t)}function ce(e,t,...n){if(!e)throw Pl(t,...n)}function Kt(e){const t="INTERNAL ASSERTION FAILED: "+e;throw ti(t),new Error(t)}function tn(e,t){e||Kt(t)}function Aa(){return typeof self<"u"&&self.location?.href||""}function f2(){return wu()==="http:"||wu()==="https:"}function wu(){return typeof self<"u"&&self.location?.protocol||null}function p2(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(f2()||$5()||"connection"in navigator)?navigator.onLine:!0}function m2(){if(typeof navigator>"u")return null;const e=navigator;return e.languages&&e.languages[0]||e.language||null}class vo{constructor(t,n){this.shortDelay=t,this.longDelay=n,tn(n>t,"Short delay should be less than long delay!"),this.isMobile=z5()||H5()}get(){return p2()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}function Rl(e,t){tn(e.emulator,"Emulator should always be set here");const{url:n}=e.emulator;return t?`${n}${t.startsWith("/")?t.slice(1):t}`:n}class Jm{static initialize(t,n,r){this.fetchImpl=t,n&&(this.headersImpl=n),r&&(this.responseImpl=r)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;if(typeof globalThis<"u"&&globalThis.fetch)return globalThis.fetch;if(typeof fetch<"u")return fetch;Kt("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;if(typeof globalThis<"u"&&globalThis.Headers)return globalThis.Headers;if(typeof Headers<"u")return Headers;Kt("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;if(typeof globalThis<"u"&&globalThis.Response)return globalThis.Response;if(typeof Response<"u")return Response;Kt("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}const g2={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"missing-password",INVALID_LOGIN_CREDENTIALS:"invalid-credential",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",PASSWORD_DOES_NOT_MEET_REQUIREMENTS:"password-does-not-meet-requirements",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error",RECAPTCHA_NOT_ENABLED:"recaptcha-not-enabled",MISSING_RECAPTCHA_TOKEN:"missing-rec
50aptcha-token",INVALID_RECAPTCHA_TOKEN:"invalid-recaptcha-token",INVALID_RECAPTCHA_ACTION:"invalid-recaptcha-action",MISSING_CLIENT_TYPE:"missing-client-type",MISSING_RECAPTCHA_VERSION:"missing-recaptcha-version",INVALID_RECAPTCHA_VERSION:"invalid-recaptcha-version",INVALID_REQ_TYPE:"invalid-req-type"};const b2=["/v1/accounts:signInWithCustomToken","/v1/accounts:signInWithEmailLink","/v1/accounts:signInWithIdp","/v1/accounts:signInWithPassword","/v1/accounts:signInWithPhoneNumber","/v1/token"],x2=new vo(3e4,6e4);function In(e,t){return e.tenantId&&!t.tenantId?{...t,tenantId:e.tenantId}:t}async function on(e,t,n,r,o={}){return Zm(e,o,async()=>{let i={},s={};r&&(t==="GET"?s=r:i={body:JSON.stringify(r)});const l=bo({...s,key:e.config.apiKey}).slice(1),c=await e._getAdditionalHeaders();c["Content-Type"]="application/json",e.languageCode&&(c["X-Firebase-Locale"]=e.languageCode);const u={method:t,headers:c,...i};return B5()||(u.referrerPolicy="strict-origin-when-cross-origin"),e.emulatorConfig&&Nl(e.emulatorConfig.host)&&(u.credentials="include"),Jm.fetch()(await Qm(e,e.config.apiHost,n,l),u)})}async function Zm(e,t,n){e._canInitEmulator=!1;const r={...g2,...t};try{const o=new y2(e),i=await Promise.race([n(),o.promise]);o.clearNetworkTimeout();const s=await i.json();if("needConfirmation"in s)throw Wo(e,"account-exists-with-different-credential",s);if(i.ok&&!("errorMessage"in s))return s;{const l=i.ok?s.errorMessage:s.error.message,[c,u]=l.split(" : ");if(c==="FEDERATED_USER_ID_ALREADY_LINKED")throw Wo(e,"credential-already-in-use",s);if(c==="EMAIL_EXISTS")throw Wo(e,"email-already-in-use",s);if(c==="USER_DISABLED")throw Wo(e,"user-disabled",s);const d=r[c]||c.toLowerCase().replace(/[_\s]+/g,"-");if(u)throw Al(e,d,u);vt(e,d)}}catch(o){if(o instanceof kn)throw o;vt(e,"network-request-failed",{message:String(o)})}}async function yo(e,t,n,r,o={}){const i=await on(e,t,n,r,o);return"mfaPendingCredential"in i&&vt(e,"multi-factor-auth-required",{_serverResponse:i}),i}async function Qm(e,t,n,r){const o=`${t}${n}?${r}`,i=e,s=i.config.emulator?Rl(e.config,o):`${e.config.apiScheme}://${o}`;return b2.includes(n)&&(await i._persistenceManagerAvailable,i._getPersistenceType()==="COOKIE")?i._getPersistence()._getFinalTarget(s).toString():s}function v2(e){switch(e){case"ENFORCE":return"ENFORCE";case"AUDIT":return"AUDIT";case"OFF":return"OFF";default:return"ENFORCEMENT_STATE_UNSPECIFIED"}}class y2{clearNetworkTimeout(){clearTimeout(this.timer)}constructor(t){this.auth=t,this.timer=null,this.promise=new Promise((n,r)=>{this.timer=setTimeout(()=>r(xt(this.auth,"network-request-failed")),x2.get())})}}function Wo(e,t,n){const r={appName:e.name};n.email&&(r.email=n.email),n.phoneNumber&&(r.phoneNumber=n.phoneNumber);const o=xt(e,t,r);return o.customData._tokenResponse=n,o}function _u(e){return e!==void 0&&e.enterprise!==void 0}class w2{constructor(t){if(this.siteKey="",this.recaptchaEnforcementState=[],t.recaptchaKey===void 0)throw new Error("recaptchaKey undefined");this.siteKey=t.recaptchaKey.split("/")[3],this.recaptchaEnforcementState=t.recaptchaEnforcementState}getProviderEnforcementState(t){if(!this.recaptchaEnforcementState||this.recaptchaEnforcementState.length===0)return null;for(const n of this.recaptchaEnforcementState)if(n.provider&&n.provider===t)return v2(n.enforcementState);return null}isProviderEnabled(t){return this.getProviderEnforcementState(t)==="ENFORCE"||this.getProviderEnforcementState(t)==="AUDIT"}isAnyProviderEnabled(){return this.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")||this.isProviderEnabled("PHONE_PROVIDER")}}async function _2(e,t){return on(e,"GET","/v2/recaptchaConfig",In(e,t))}async function C2(e,t){return on(e,"POST","/v1/accounts:delete",t)}async function yi(e,t){return on(e,"POST","/v1/accounts:lookup",t)}function Dr(e){if(e)try{const t=new Date(Number(e));if(!isNaN(t.getTime()))return t.toUTCString()}catch{}}async function S2(e,t=!1){const n=st(e),r=await n.getIdToken(t),o=jl(r);ce(o&&o.exp&&o.auth_time&&o.iat,n.auth,"internal-error");const i=typeof o.firebase=="object"?o.firebase:void 0,s=i?.sign_in_provider;return{claims:o,token:r,authTime:Dr(Os(o.auth_time)),issuedAtTime:Dr(Os(o.iat)),expirationTime:Dr(Os(o.exp)),signInProvider:s||null,signInSecondFactor:i?.sign_in_second_factor||null}}function Os(e){return Number(e)*1e3}function jl(e){const[t,n,r]=e.split(".");if(t===void 0||n===void 0||r===void 0)return ti("JWT malformed, contained fewer than 3 sections"),null;try{const o=Mm(n);return o?JSON.parse(o):(ti("Failed to decode base64 JWT payload"),null)}catch(o){return ti("Caught error parsing JWT payload as JSON",o?.toString()),null}}function Cu(e){const t=jl(e);return ce(t,"internal-error"),ce(typeof t.exp<"u","internal-error"),ce(typeof t.iat<"u","internal-error"),Number(t.exp)-Number(t.iat)}async function vr(e,t,n=!1){if(n)return t;try{return await t}catch(r){throw r instanceof kn&&E2(r)&&e.auth.currentUser===e&&await e.auth.signOut(),r}}function E2({code:e}){return e==="auth/user-disabled"||e==="auth/user-token-expired"}class k2{constructor(t){this.user=t,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(t){if(t){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const r=(this.user.stsTokenManager.expirationTime??0)-Date.now()-3e5;return Math.max(0,r)}}schedule(t=!1){if(!this.isRunning)return;const n=this.getInterval(t);this.timerId=setTimeout(async()=>{await this.iteration()},n)}async iteration(){try{await this.user.getIdToken(!0)}catch(t){t?.code==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}class Pa{constructor(t,n){this.createdAt=t,this.lastLoginAt=n,this._initializeTime()}_initializeTime(){this.lastSignInTime=Dr(this.lastLoginAt),this.creationTime=Dr(this.createdAt)}_copy(t){this.createdAt=t.createdAt,this.lastLoginAt=t.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}async function Jr(e){const t=e.auth,n=await e.getIdToken(),r=await vr(e,yi(t,{idToken:n}));ce(r?.users.length,t,"internal-error");const o=r.users[0];e._notifyReloadListener(o);const i=o.providerUserInfo?.length?eg(o.providerUserInfo):[],s=N2(e.providerData,i),l=e.isAnonymous,c=!(e.email&&o.passwordHash)&&!s?.length,u=l?c:!1,d={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:s,metadata:new Pa(o.createdAt,o.lastLoginAt),isAnonymous:u};Object.assign(e,d)}async function I2(e){const t=st(e);await Jr(t),await t.auth._persistUserIfCurrent(t),t.auth._notifyListenersIfCurrent(t)}function N2(e,t){return[...e.filter(r=>!t.some(o=>o.providerId===r.providerId)),...t]}function eg(e){return e.map(({providerId:t,...n})=>
50({providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}))}async function T2(e,t){const n=await Zm(e,{},async()=>{const r=bo({grant_type:"refresh_token",refresh_token:t}).slice(1),{tokenApiHost:o,apiKey:i}=e.config,s=await Qm(e,o,"/v1/token",`key=${i}`),l=await e._getAdditionalHeaders();l["Content-Type"]="application/x-www-form-urlencoded";const c={method:"POST",headers:l,body:r};return e.emulatorConfig&&Nl(e.emulatorConfig.host)&&(c.credentials="include"),Jm.fetch()(s,c)});return{accessToken:n.access_token,expiresIn:n.expires_in,refreshToken:n.refresh_token}}async function A2(e,t){return on(e,"POST","/v2/accounts:revokeToken",In(e,t))}class lr{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(t){ce(t.idToken,"internal-error"),ce(typeof t.idToken<"u","internal-error"),ce(typeof t.refreshToken<"u","internal-error");const n="expiresIn"in t&&typeof t.expiresIn<"u"?Number(t.expiresIn):Cu(t.idToken);this.updateTokensAndExpiration(t.idToken,t.refreshToken,n)}updateFromIdToken(t){ce(t.length!==0,"internal-error");const n=Cu(t);this.updateTokensAndExpiration(t,null,n)}async getToken(t,n=!1){return!n&&this.accessToken&&!this.isExpired?this.accessToken:(ce(this.refreshToken,t,"user-token-expired"),this.refreshToken?(await this.refresh(t,this.refreshToken),this.accessToken):null)}clearRefreshToken(){this.refreshToken=null}async refresh(t,n){const{accessToken:r,refreshToken:o,expiresIn:i}=await T2(t,n);this.updateTokensAndExpiration(r,o,Number(i))}updateTokensAndExpiration(t,n,r){this.refreshToken=n||null,this.accessToken=t||null,this.expirationTime=Date.now()+r*1e3}static fromJSON(t,n){const{refreshToken:r,accessToken:o,expirationTime:i}=n,s=new lr;return r&&(ce(typeof r=="string","internal-error",{appName:t}),s.refreshToken=r),o&&(ce(typeof o=="string","internal-error",{appName:t}),s.accessToken=o),i&&(ce(typeof i=="number","internal-error",{appName:t}),s.expirationTime=i),s}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(t){this.accessToken=t.accessToken,this.refreshToken=t.refreshToken,this.expirationTime=t.expirationTime}_clone(){return Object.assign(new lr,this.toJSON())}_performRefresh(){return Kt("not implemented")}}function ln(e,t){ce(typeof e=="string"||typeof e>"u","internal-error",{appName:t})}class wt{constructor({uid:t,auth:n,stsTokenManager:r,...o}){this.providerId="firebase",this.proactiveRefresh=new k2(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=r,this.accessToken=r.accessToken,this.displayName=o.displayName||null,this.email=o.email||null,this.emailVerified=o.emailVerified||!1,this.phoneNumber=o.phoneNumber||null,this.photoURL=o.photoURL||null,this.isAnonymous=o.isAnonymous||!1,this.tenantId=o.tenantId||null,this.providerData=o.providerData?[...o.providerData]:[],this.metadata=new Pa(o.createdAt||void 0,o.lastLoginAt||void 0)}async getIdToken(t){const n=await vr(this,this.stsTokenManager.getToken(this.auth,t));return ce(n,this.auth,"internal-error"),this.accessToken!==n&&(this.accessToken=n,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),n}getIdTokenResult(t){return S2(this,t)}reload(){return I2(this)}_assign(t){this!==t&&(ce(this.uid===t.uid,this.auth,"internal-error"),this.displayName=t.displayName,this.photoURL=t.photoURL,this.email=t.email,this.emailVerified=t.emailVerified,this.phoneNumber=t.phoneNumber,this.isAnonymous=t.isAnonymous,this.tenantId=t.tenantId,this.providerData=t.providerData.map(n=>({...n})),this.metadata._copy(t.metadata),this.stsTokenManager._assign(t.stsTokenManager))}_clone(t){const n=new wt({...this,auth:t,stsTokenManager:this.stsTokenManager._clone()});return n.metadata._copy(this.metadata),n}_onReload(t){ce(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=t,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(t){this.reloadListener?this.reloadListener(t):this.reloadUserInfo=t}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(t,n=!1){let r=!1;t.idToken&&t.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(t),r=!0),n&&await Jr(this),await this.auth._persistUserIfCurrent(this),r&&this.auth._notifyListenersIfCurrent(this)}async delete(){if(dt(this.auth.app))return Promise.reject(Yt(this.auth));const t=await this.getIdToken();return await vr(this,C2(this.auth,{idToken:t})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return{uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isA
50nonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(t=>({...t})),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId,...this.metadata.toJSON(),apiKey:this.auth.config.apiKey,appName:this.auth.name}}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(t,n){const r=n.displayName??void 0,o=n.email??void 0,i=n.phoneNumber??void 0,s=n.photoURL??void 0,l=n.tenantId??void 0,c=n._redirectEventId??void 0,u=n.createdAt??void 0,d=n.lastLoginAt??void 0,{uid:h,emailVerified:p,isAnonymous:m,providerData:g,stsTokenManager:b}=n;ce(h&&b,t,"internal-error");const v=lr.fromJSON(this.name,b);ce(typeof h=="string",t,"internal-error"),ln(r,t.name),ln(o,t.name),ce(typeof p=="boolean",t,"internal-error"),ce(typeof m=="boolean",t,"internal-error"),ln(i,t.name),ln(s,t.name),ln(l,t.name),ln(c,t.name),ln(u,t.name),ln(d,t.name);const x=new wt({uid:h,auth:t,email:o,emailVerified:p,displayName:r,isAnonymous:m,photoURL:s,phoneNumber:i,tenantId:l,stsTokenManager:v,createdAt:u,lastLoginAt:d});return g&&Array.isArray(g)&&(x.providerData=g.map(E=>({...E}))),c&&(x._redirectEventId=c),x}static async _fromIdTokenResponse(t,n,r=!1){const o=new lr;o.updateFromServerResponse(n);const i=new wt({uid:n.localId,auth:t,stsTokenManager:o,isAnonymous:r});return await Jr(i),i}static async _fromGetAccountInfoResponse(t,n,r){const o=n.users[0];ce(o.localId!==void 0,"internal-error");const i=o.providerUserInfo!==void 0?eg(o.providerUserInfo):[],s=!(o.email&&o.passwordHash)&&!i?.length,l=new lr;l.updateFromIdToken(r);const c=new wt({uid:o.localId,auth:t,stsTokenManager:l,isAnonymous:s}),u={uid:o.localId,displayName:o.displayName||null,photoURL:o.photoUrl||null,email:o.email||null,emailVerified:o.emailVerified||!1,phoneNumber:o.phoneNumber||null,tenantId:o.tenantId||null,providerData:i,metadata:new Pa(o.createdAt,o.lastLoginAt),isAnonymous:!(o.email&&o.passwordHash)&&!i?.length};return Object.assign(c,u),c}}const Su=new Map;function Xt(e){tn(e instanceof Function,"Expected a class definition");let t=Su.get(e);return t?(tn(t instanceof e,"Instance stored in cache mismatched with class"),t):(t=new e,Su.set(e,t),t)}class tg{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(t,n){this.storage[t]=n}async _get(t){const n=this.storage[t];return n===void 0?null:n}async _remove(t){delete this.storage[t]}_addListener(t,n){}_removeListener(t,n){}}tg.type="NONE";const Eu=tg;function ni(e,t,n){return`firebase:${e}:${t}:${n}`}class cr{constructor(t,n,r){this.persistence=t,this.auth=n,this.userKey=r;const{config:o,name:i}=this.auth;this.fullUserKey=ni(this.userKey,o.apiKey,i),this.fullPersistenceKey=ni("persistence",o.apiKey,i),this.boundEventHandler=n._onStorageEvent.bind(n),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(t){return this.persistence._set(this.fullUserKey,t.toJSON())}async getCurrentUser(){const t=await this.persistence._get(this.fullUserKey);if(!t)return null;if(typeof t=="string"){const n=await yi(this.auth,{idToken:t}).catch(()=>{});return n?wt._fromGetAccountInfoResponse(this.auth,n,t):null}return wt._fromJSON(this.auth,t)}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(t){if(this.persistence===t)return;const n=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=t,n)return this.setCurrentUser(n)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(t,n,r="authUser"){if(!n.length)return new cr(Xt(Eu),t,r);const o=(await Promise.all(n.map(async u=>{if(await u._isAvailable())return u}))).filter(u=>u);let i=o[0]||Xt(Eu);const s=ni(r,t.config.apiKey,t.name);let l=null;for(const u of n)try{const d=await u._get(s);if(d){let h;if(typeof d=="string"){const p=await yi(t,{idToken:d}).catch(()=>{});if(!p)break;h=await wt._fromGetAccountInfoResponse(t,p,d)}else h=wt._fromJSON(t,d);u!==i&&(l=h),i=u;break}}catch{}const c=o.filter(u=>u._shouldAllowMigration);return!i._shouldAllowMigration||!c.length?new cr(i,t,r):(i=c[0],l&&await i._set(s,l.toJSON()),await Promise.all(n.map(async u=>
50{if(u!==i)try{await u._remove(s)}catch{}})),new cr(i,t,r))}}function ku(e){const t=e.toLowerCase();if(t.includes("opera/")||t.includes("opr/")||t.includes("opios/"))return"Opera";if(ig(t))return"IEMobile";if(t.includes("msie")||t.includes("trident/"))return"IE";if(t.includes("edge/"))return"Edge";if(ng(t))return"Firefox";if(t.includes("silk/"))return"Silk";if(ag(t))return"Blackberry";if(lg(t))return"Webos";if(rg(t))return"Safari";if((t.includes("chrome/")||og(t))&&!t.includes("edge/"))return"Chrome";if(sg(t))return"Android";{const n=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,r=e.match(n);if(r?.length===2)return r[1]}return"Other"}function ng(e=et()){return/firefox\//i.test(e)}function rg(e=et()){const t=e.toLowerCase();return t.includes("safari/")&&!t.includes("chrome/")&&!t.includes("crios/")&&!t.includes("android")}function og(e=et()){return/crios\//i.test(e)}function ig(e=et()){return/iemobile/i.test(e)}function sg(e=et()){return/android/i.test(e)}function ag(e=et()){return/blackberry/i.test(e)}function lg(e=et()){return/webos/i.test(e)}function Ol(e=et()){return/iphone|ipad|ipod/i.test(e)||/macintosh/i.test(e)&&/mobile/i.test(e)}function P2(e=et()){return Ol(e)&&!!window.navigator?.standalone}function R2(){return V5()&&document.documentMode===10}function cg(e=et()){return Ol(e)||sg(e)||lg(e)||ag(e)||/windows phone/i.test(e)||ig(e)}function ug(e,t=[]){let n;switch(e){case"Browser":n=ku(et());break;case"Worker":n=`${ku(et())}-${e}`;break;default:n=e}const r=t.length?t.join(","):"FirebaseCore-web";return`${n}/JsCore/${xo}/${r}`}class j2{constructor(t){this.auth=t,this.queue=[]}pushCallback(t,n){const r=i=>new Promise((s,l)=>{try{const c=t(i);s(c)}catch(c){l(c)}});r.onAbort=n,this.queue.push(r);const o=this.queue.length-1;return()=>{this.queue[o]=()=>Promise.resolve()}}async runMiddleware(t){if(this.auth.currentUser===t)return;const n=[];try{for(const r of this.queue)await r(t),r.onAbort&&n.push(r.onAbort)}catch(r){n.reverse();for(const o of n)try{o()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:r?.message})}}}async function O2(e,t={}){return on(e,"GET","/v2/passwordPolicy",In(e,t))}const L2=6;class M2{constructor(t){const n=t.customStrengthOptions;this.customStrengthOptions={},this.customStrengthOptions.minPasswordLength=n.minPasswordLength??L2,n.maxPasswordLength&&(this.customStrengthOptions.maxPasswordLength=n.maxPasswordLength),n.containsLowercaseCharacter!==void 0&&(this.customStrengthOptions.containsLowercaseLetter=n.containsLowercaseCharacter),n.containsUppercaseCharacter!==void 0&&(this.customStrengthOptions.containsUppercaseLetter=n.containsUppercaseCharacter),n.containsNumericCharacter!==void 0&&(this.customStrengthOptions.containsNumericCharacter=n.containsNumericCharacter),n.containsNonAlphanumericCharacter!==void 0&&(this.customStrengthOptions.containsNonAlphanumericCharacter=n.containsNonAlphanumericCharacter),this.enforcementState=t.enforcementState,this.enforcementState==="ENFORCEMENT_STATE_UNSPECIFIED"&&(this.enforcementState="OFF"),this.allowedNonAlphanumericCharacters=t.allowedNonAlphanumericCharacters?.join("")??"",this.forceUpgradeOnSignin=t.forceUpgradeOnSignin??!1,this.schemaVersion=t.schemaVersion}validatePassword(t){const n={isValid:!0,passwordPolicy:this};return this.validatePasswordLengthOptions(t,n),this.validatePasswordCharacterOptions(t,n),n.isValid&&(n.isValid=n.meetsMinPasswordLength??!0),n.isValid&&(n.isValid=n.meetsMaxPasswordLength??!0),n.isValid&&(n.isValid=n.containsLowercaseLetter??!0),n.isValid&&(n.isValid=n.containsUppercaseLetter??!0),n.isValid&&(n.isValid=n.containsNumericCharacter??!0),n.isValid&&(n.isValid=n.containsNonAlphanumericCharacter??!0),n}validatePasswordLengthOptions(t,n){const r=this.customStrengthOptions.minPasswordLength,o=this.customStrengthOptions.maxPasswordLength;r&&(n.meetsMinPasswordLength=t.length>=r),o&&(n.meetsMaxPasswordLength=t.length<=o)}validatePasswordCharacterOptions(t,n){this.updatePasswordCharacterOptionsStatuses(n,!1,
50!1,!1,!1);let r;for(let o=0;o<t.length;o++)r=t.charAt(o),this.updatePasswordCharacterOptionsStatuses(n,r>="a"&&r<="z",r>="A"&&r<="Z",r>="0"&&r<="9",this.allowedNonAlphanumericCharacters.includes(r))}updatePasswordCharacterOptionsStatuses(t,n,r,o,i){this.customStrengthOptions.containsLowercaseLetter&&(t.containsLowercaseLetter||(t.containsLowercaseLetter=n)),this.customStrengthOptions.containsUppercaseLetter&&(t.containsUppercaseLetter||(t.containsUppercaseLetter=r)),this.customStrengthOptions.containsNumericCharacter&&(t.containsNumericCharacter||(t.containsNumericCharacter=o)),this.customStrengthOptions.containsNonAlphanumericCharacter&&(t.containsNonAlphanumericCharacter||(t.containsNonAlphanumericCharacter=i))}}class D2{constructor(t,n,r,o){this.app=t,this.heartbeatServiceProvider=n,this.appCheckServiceProvider=r,this.config=o,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new Iu(this),this.idTokenSubscription=new Iu(this),this.beforeStateQueue=new j2(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION=1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=Km,this._agentRecaptchaConfig=null,this._tenantRecaptchaConfigs={},this._projectPasswordPolicy=null,this._tenantPasswordPolicies={},this._resolvePersistenceManagerAvailable=void 0,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=t.name,this.clientVersion=o.sdkClientVersion,this._persistenceManagerAvailable=new Promise(i=>this._resolvePersistenceManagerAvailable=i)}_initializeWithPersistence(t,n){return n&&(this._popupRedirectResolver=Xt(n)),this._initializationPromise=this.queue(async()=>{if(!this._deleted&&(this.persistenceManager=await cr.create(this,t),this._resolvePersistenceManagerAvailable?.(),!this._deleted)){if(this._popupRedirectResolver?._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(n),this.lastNotifiedUid=this.currentUser?.uid||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const t=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!t)){if(this.currentUser&&t&&this.currentUser.uid===t.uid){this._currentUser._assign(t),await this.currentUser.getIdToken();return}await this._updateCurrentUser(t,!0)}}async initializeCurrentUserFromIdToken(t){try{const n=await yi(this,{idToken:t}),r=await wt._fromGetAccountInfoResponse(this,n,t);await this.directlySetCurrentUser(r)}catch(n){console.warn("FirebaseServerApp could not login user with provided authIdToken: ",n),await this.directlySetCurrentUser(null)}}async initializeCurrentUser(t){if(dt(this.app)){const i=this.app.settings.authIdToken;return i?new Promise(s=>{setTimeout(()=>this.initializeCurrentUserFromIdToken(i).then(s,s))}):this.directlySetCurrentUser(null)}const n=await this.assertedPersistence.getCurrentUser();let r=n,o=!1;if(t&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const i=this.redirectUser?._redirectEventId,s=r?._redirectEventId,l=await this.tryRedirectSignIn(t);(!i||i===s)&&l?.user&&(r=l.user,o=!0)}if(!r)return this.directlySetCurrentUser(null);if(!r._redirectEventId){if(o)try{await this.beforeStateQueue.runMiddleware(r)}catch(i){r=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(i))}return r?this.reloadAndSetCurrentUserOrClear(r):this.directlySetCurrentUser(null)}return ce(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===r._redirectEventId?this.directlySetCurrentUser(r):this.reloadAndSetCurrentUserOrClear(r)}async tryRedirectSignIn(t){let n=null;try{n=await this._popupRedirectResolver._completeRedirectFn(this,t,!0)}catch{await this._setRedirectUser(null)}return n}async reloadAndSetCurrentUserOrClear(t){try{await Jr(t)}catch(n){if(n?.code!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(t)}useDeviceLanguage(){this.languageCode=m2()}async _delete(){this._deleted=!0}
50async updateCurrentUser(t){if(dt(this.app))return Promise.reject(Yt(this));const n=t?st(t):null;return n&&ce(n.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(n&&n._clone(this))}async _updateCurrentUser(t,n=!1){if(!this._deleted)return t&&ce(this.tenantId===t.tenantId,this,"tenant-id-mismatch"),n||await this.beforeStateQueue.runMiddleware(t),this.queue(async()=>{await this.directlySetCurrentUser(t),this.notifyAuthListeners()})}async signOut(){return dt(this.app)?Promise.reject(Yt(this)):(await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0))}setPersistence(t){return dt(this.app)?Promise.reject(Yt(this)):this.queue(async()=>{await this.assertedPersistence.setPersistence(Xt(t))})}_getRecaptchaConfig(){return this.tenantId==null?this._agentRecaptchaConfig:this._tenantRecaptchaConfigs[this.tenantId]}async validatePassword(t){this._getPasswordPolicyInternal()||await this._updatePasswordPolicy();const n=this._getPasswordPolicyInternal();return n.schemaVersion!==this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION?Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version",{})):n.validatePassword(t)}_getPasswordPolicyInternal(){return this.tenantId===null?this._projectPasswordPolicy:this._tenantPasswordPolicies[this.tenantId]}async _updatePasswordPolicy(){const t=await O2(this),n=new M2(t);this.tenantId===null?this._projectPasswordPolicy=n:this._tenantPasswordPolicies[this.tenantId]=n}_getPersistenceType(){return this.assertedPersistence.persistence.type}_getPersistence(){return this.assertedPersistence.persistence}_updateErrorMap(t){this._errorFactory=new go("auth","Firebase",t())}onAuthStateChanged(t,n,r){return this.registerStateListener(this.authStateSubscription,t,n,r)}beforeAuthStateChanged(t,n){return this.beforeStateQueue.pushCallback(t,n)}onIdTokenChanged(t,n,r){return this.registerStateListener(this.idTokenSubscription,t,n,r)}authStateReady(){return new Promise((t,n)=>{if(this.currentUser)t();else{const r=this.onAuthStateChanged(()=>{r(),t()},n)}})}async revokeAccessToken(t){if(this.currentUser){const n=await this.currentUser.getIdToken(),r={providerId:"apple.com",tokenType:"ACCESS_TOKEN",token:t,idToken:n};this.tenantId!=null&&(r.tenantId=this.tenantId),await A2(this,r)}}toJSON(){return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:this._currentUser?.toJSON()}}async _setRedirectUser(t,n){const r=await this.getOrInitRedirectPersistenceManager(n);return t===null?r.removeCurrentUser():r.setCurrentUser(t)}async getOrInitRedirectPersistenceManager(t){if(!this.redirectPersistenceManager){const n=t&&Xt(t)||this._popupRedirectResolver;ce(n,this,"argument-error"),this.redirectPersistenceManager=await cr.create(this,[Xt(n._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(t){return this._isInitialized&&await this.queue(async()=>{}),this._currentUser?._redirectEventId===t?this._currentUser:this.redirectUser?._redirectEventId===t?this.redirectUser:null}async _persistUserIfCurrent(t){if(t===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(t))}_notifyListenersIfCurrent(t){t===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const t=this.currentUser?.uid??null;this.lastNotifiedUid!==t&&(this.lastNotifiedUid=t,this.authStateSubscription.next(this.currentUser))}registerStateListener(t,n,r,o){if(this._deleted)return()=>{};const i=typeof n=="function"?n:n.next.bind(n);let s=!1;const l=this._isInitialized?Promise.resolve():this._initializationPromise;if(ce(l,this,"internal-error"),l.then(()=>{s||i(this.currentUser)}),typeof n=="function"){const c=t.addObserver(n,r,o);return()=>{s=!0,c()}}else{const c=t.addObserver(n);return()=>{s=!0,c()}}}async directlySetCurrentUser(t){this.currentUser&&this.currentUser!==t&&this._currentUser._stopProactiveRefresh(),t&&this.isProactiveRefreshEnabled&&t._startProactiveRefresh(),this.currentUser=t,t?await this.assertedPersistence.setCurrentUser(t):await this.assertedPersistence.removeCurrentUser()}queue(t){return this.operations=this.operations.then(t,t),this.operations}get assertedPersistence(){return ce(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(t){!t||this.frameworks.includes(t)||(this.frameworks.push(t),this.frameworks.sort(),this.clientVersion=ug(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){const t={"X-Client-Version":this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await this.heartbeatServiceProvider.getImmediate({optional:!0})?.getHeartbeatsHeader();n&&(t["X-Firebase-Client"]=n);const r=await this._getAppCheckToken();return r&&(t["X-Firebase-AppCheck"]=r),t}async _getAppCheckToken(){if(dt(this.app)&&this.app.settings.appCheckToken)return this.app.settings.appCheckToken;const t=await this.appCheckServiceProvider.getImmediate({optional:!0})?.getToken();return t?.error&&Xm(`Error while retrieving App Check token: ${t.error}`),t?.token}}function Nn(e){return st(e)}class Iu{constructor(t){this.auth=t,this.observer=null,this.addObserver=Y5(n=>this.observer=n)}get next(){return ce(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}let es={async loadJS(){throw new Error("Unable to load external scripts")},recaptchaV2Script:"",recaptchaEnterpriseScript:"",gapiScript:""};function F2(e){es=e}function dg(e){return es.loadJS(e)}function U2(){return es.recaptchaEnterpriseScript}function z2(){return es.gapiScript}function B2(e){return`__${e}${Math.floor(Math.random()*1e6)}`}class $2{constructor(){this.enterprise=new H2}ready(t){t()}execute(t,n){return Promise.resolve("token")}render(t,n){return""}}class H2{ready(t){t()}execute(t,n){return Promise.resolve("token")}render(t,n){return""}}const V2="recaptcha-enterprise",hg="NO_RECAPTCHA",Nu="onFirebaseAuthREInstanceReady";class pn{constructor(t){this.type=V2,this.auth=Nn(t)}
50async verify(t="verify",n=!1){async function r(i){if(!n){if(i.tenantId==null&&i._agentRecaptchaConfig!=null)return i._agentRecaptchaConfig.siteKey;if(i.tenantId!=null&&i._tenantRecaptchaConfigs[i.tenantId]!==void 0)return i._tenantRecaptchaConfigs[i.tenantId].siteKey}return new Promise(async(s,l)=>{_2(i,{clientType:"CLIENT_TYPE_WEB",version:"RECAPTCHA_ENTERPRISE"}).then(c=>{if(c.recaptchaKey===void 0)l(new Error("recaptcha Enterprise site key undefined"));else{const u=new w2(c);return i.tenantId==null?i._agentRecaptchaConfig=u:i._tenantRecaptchaConfigs[i.tenantId]=u,s(u.siteKey)}}).catch(c=>{l(c)})})}function o(i,s,l){const c=window.grecaptcha;_u(c)?c.enterprise.ready(()=>{c.enterprise.execute(i,{action:t}).then(u=>{s(u)}).catch(()=>{s(hg)})}):l(Error("No reCAPTCHA enterprise script loaded."))}return this.auth.settings.appVerificationDisabledForTesting?new $2().execute("siteKey",{action:"verify"}):new Promise((i,s)=>{r(this.auth).then(async l=>{if(!n&&_u(window.grecaptcha)&&pn.scriptInjectionDeferred)await pn.scriptInjectionDeferred.promise,o(l,i,s);else{if(typeof window>"u"){s(new Error("RecaptchaVerifier is only supported in browser"));return}let c=U2();c.length!==0&&(c+=l+`&onload=${Nu}`),pn.scriptInjectionDeferred=new Um,window[Nu]=()=>{pn.scriptInjectionDeferred?.resolve()},dg(c).then(()=>pn.scriptInjectionDeferred?.promise).then(()=>{o(l,i,s)}).catch(u=>{s(u)})}}).catch(l=>{s(l)})})}}pn.scriptInjectionDeferred=null;async function Tu(e,t,n,r=!1,o=!1){const i=new pn(e);let s;if(o)s=hg;else try{s=await i.verify(n)}catch{s=await i.verify(n,!0)}const l={...t};if(n==="mfaSmsEnrollment"||n==="mfaSmsSignIn"){if("phoneEnrollmentInfo"in l){const c=l.phoneEnrollmentInfo.phoneNumber,u=l.phoneEnrollmentInfo.recaptchaToken;Object.assign(l,{phoneEnrollmentInfo:{phoneNumber:c,recaptchaToken:u,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}else if("phoneSignInInfo"in l){const c=l.phoneSignInInfo.recaptchaToken;Object.assign(l,{phoneSignInInfo:{recaptchaToken:c,captchaResponse:s,clientType:"CLIENT_TYPE_WEB",recaptchaVersion:"RECAPTCHA_ENTERPRISE"}})}return l}return r?Object.assign(l,{captchaResp:s}):Object.assign(l,{captchaResponse:s}),Object.assign(l,{clientType:"CLIENT_TYPE_WEB"}),Object.assign(l,{recaptchaVersion:"RECAPTCHA_ENTERPRISE"}),l}async function Ra(e,t,n,r,o){if(e._getRecaptchaConfig()?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER")){const i=await Tu(e,t,n,n==="getOobCode");return r(e,i)}else return r(e,t).catch(async i=>{if(i.code==="auth/missing-recaptcha-token"){console.log(`${n} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);const s=await Tu(e,t,n,n==="getOobCode");return r(e,s)}else return Promise.reject(i)})}function W2(e,t){const n=Hm(e,"auth");if(n.isInitialized()){const o=n.getImmediate(),i=n.getOptions();if(br(i,t??{}))return o;vt(o,"already-initialized")}return n.initialize({options:t})}function q2(e,t){const n=t?.persistence||[],r=(Array.isArray(n)?n:[n]).map(Xt);t?.errorMap&&e._updateErrorMap(t.errorMap),e._initializeWithPersistence(r,t?.popupRedirectResolver)}function G2(e,t,n){const r=Nn(e);ce(/^https?:\/\//.test(t),r,"invalid-emulator-scheme");const o=!1,i=fg(t),{host:s,port:l}=K2(t),c=l===null?"":`:${l}`,u={url:`${i}//${s}${c}/`},d=Object.freeze({host:s,port:l,protocol:i.replace(":",""),options:Object.freeze({disableWarnings:o})});if(!r._canInitEmulator){ce(r.config.emulator&&r.emulatorConfig,r,"emulator-config-failed"),ce(br(u,r.config.emulator)&&br(d,r.emulatorConfig),r,"emulator-config-failed");return}r.config.emulator=u,r.emulatorConfig=d,r.settings.appVerificationDisabledForTesting=!0,Nl(s)?Q5(`${i}//${s}${c}`):X2()}function fg(e){const t=e.indexOf(":");return t<0?"":e.substr(0,t+1)}function K2(e){const t=fg(e),n=/(\/\/)?([^?#/]+)/.exec(e.substr(t.length));if(!n)return{host:"",port:null};const r=n[2].split("@").pop()||"",o=/^(\[[^\]]+\])(:|$)/.exec(r);if(o){const i=o[1];return{host:i,port:Au(r.substr(i.length+1))}}else{const[i,s]=r.split(":");return{host:i,port:Au(s)}}}function Au(e){if(!e)return null;const t=Number(e);return isNaN(t)?null:t}function X2(){function e(){const t=document.createElement("p"),n=t.style;t.innerText="Running in emulator mode. Do not use with production credentials.",n.position="fixed",n.width="100%",n.backgroundColor="#ffffff",n.border=".1em solid #000000",n.color="#b50000",n.bottom="0px",n.left="0px",n.margin="0px",n.zIndex="10000",n.textAlign="center",t.classList.add("firebase-emulator-warning"),document.body.appendChild(t)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",e):e())}class Ll{constructor(t,n){this.providerId=t,this.signInMethod=n}toJSON(){return Kt("not implemented")}_getIdTokenResponse(t){return Kt("not implemented")}_linkToIdToken(t,n){return Kt("not implemented")}_getReauthenticationResolver(t){return Kt("not implemented")}}async function Y2(e,t){return on(e,"POST","/v1/accounts:signUp",t)}async function J2(e,t){return yo(e,"POST","/v1/accounts:signInWithPassword",In(e,t))}async function Z2(e,t){return yo(e,"POST","/v1/accounts:signInWithEmailLink",In(e,t))}async function Q2(e,t){return yo(e,"POST","/v1/accounts:signInWithEmailLink",In(e,t))}class Zr extends Ll{constructor(t,n,r,o=null){super("password",r),this._email=t,this._password=n,this._tenantId=o}static _fromEmailAndPassword(t,n){return new Zr(t,n,"password")}static _fromEmailAndCode(t,n,r=null){return new Zr(t,n,"emailLink",r)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;if(n?.email&&n?.password){if(n.signInMethod==="password")return this._fromEmailAndPassword(n.email,n.password);if(n.signInMethod==="emailLink")return this._fromEmailAndCode(n.email,n.password,n.tenantId)}return null}async _getIdTokenResponse(t){switch(this.signInMethod){case"password":const n={returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Ra(t,n,"signInWithPassword",J2);case"emailLink":return Z2(t,{email:this._email,oobCode:this._password});default:vt(t,"internal-error")}}async _linkToIdToken(t,n){switch(this.signInMethod){case"password":const r={idToken:n,returnSecureToken:!0,email:this._email,password:this._password,clientType:"CLIENT_TYPE_WEB"};return Ra(t,r,"signUpPassword",Y2);case"emailLink":return Q2(t,{idToken:n,email:this._email,oobCode:this._password});default:vt(t,"internal-error")}}_getReauthenticationResolver(t){return this._getIdTokenResponse(t)}}async function ur(e,t){return yo(e,"POST","/v1/accounts:signInWithIdp",In(e,t))}const eC="http://localhost";class nn extends Ll{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(t){const n=new nn(t.providerId,t.signInMethod);return t.idToken||t.accessToken?(t.idToken&&(n.idToken=t.idToken),t.accessToken&&(n.accessToken=t.accessToken),t.nonce&&!t.pen
50dingToken&&(n.nonce=t.nonce),t.pendingToken&&(n.pendingToken=t.pendingToken)):t.oauthToken&&t.oauthTokenSecret?(n.accessToken=t.oauthToken,n.secret=t.oauthTokenSecret):vt("argument-error"),n}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(t){const n=typeof t=="string"?JSON.parse(t):t,{providerId:r,signInMethod:o,...i}=n;if(!r||!o)return null;const s=new nn(r,o);return s.idToken=i.idToken||void 0,s.accessToken=i.accessToken||void 0,s.secret=i.secret,s.nonce=i.nonce,s.pendingToken=i.pendingToken||null,s}_getIdTokenResponse(t){const n=this.buildRequest();return ur(t,n)}_linkToIdToken(t,n){const r=this.buildRequest();return r.idToken=n,ur(t,r)}_getReauthenticationResolver(t){const n=this.buildRequest();return n.autoCreate=!1,ur(t,n)}buildRequest(){const t={requestUri:eC,returnSecureToken:!0};if(this.pendingToken)t.pendingToken=this.pendingToken;else{const n={};this.idToken&&(n.id_token=this.idToken),this.accessToken&&(n.access_token=this.accessToken),this.secret&&(n.oauth_token_secret=this.secret),n.providerId=this.providerId,this.nonce&&!this.pendingToken&&(n.nonce=this.nonce),t.postBody=bo(n)}return t}}function tC(e){switch(e){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function nC(e){const t=Lr(Mr(e)).link,n=t?Lr(Mr(t)).deep_link_id:null,r=Lr(Mr(e)).deep_link_id;return(r?Lr(Mr(r)).link:null)||r||n||t||e}class Ml{constructor(t){const n=Lr(Mr(t)),r=n.apiKey??null,o=n.oobCode??null,i=tC(n.mode??null);ce(r&&o&&i,"argument-error"),this.apiKey=r,this.operation=i,this.code=o,this.continueUrl=n.continueUrl??null,this.languageCode=n.lang??null,this.tenantId=n.tenantId??null}static parseLink(t){const n=nC(t);try{return new Ml(n)}catch{return null}}}class Yn{constructor(){this.providerId=Yn.PROVIDER_ID}static credential(t,n){return Zr._fromEmailAndPassword(t,n)}static credentialWithLink(t,n){const r=Ml.parseLink(n);return ce(r,"argument-error"),Zr._fromEmailAndCode(t,r.code,r.tenantId)}}Yn.PROVIDER_ID="password";Yn.EMAIL_PASSWORD_SIGN_IN_METHOD="password";Yn.EMAIL_LINK_SIGN_IN_METHOD="emailLink";class ts{constructor(t){this.providerId=t,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(t){this.defaultLanguageCode=t}setCustomParameters(t){return this.customParameters=t,this}getCustomParameters(){return this.customParameters}}class _r extends ts{constructor(){super(...arguments),this.scopes=[]}addScope(t){return this.scopes.includes(t)||this.scopes.push(t),this}getScopes(){return[...this.scopes]}}class Un extends _r{static credentialFromJSON(t){const n=typeof t=="string"?JSON.parse(t):t;return ce("providerId"in n&&"signInMethod"in n,"argument-error"),nn._fromParams(n)}credential(t){return this._credential({...t,nonce:t.rawNonce})}_credential(t){return ce(t.idToken||t.accessToken,"argument-error"),nn._fromParams({...t,providerId:this.providerId,sign
50InMethod:this.providerId})}static credentialFromResult(t){return Un.oauthCredentialFromTaggedObject(t)}static credentialFromError(t){return Un.oauthCredentialFromTaggedObject(t.customData||{})}static oauthCredentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r,oauthTokenSecret:o,pendingToken:i,nonce:s,providerId:l}=t;if(!r&&!o&&!n&&!i||!l)return null;try{return new Un(l)._credential({idToken:n,accessToken:r,nonce:s,pendingToken:i})}catch{return null}}}class mn extends _r{constructor(){super("facebook.com")}static credential(t){return nn._fromParams({providerId:mn.PROVIDER_ID,signInMethod:mn.FACEBOOK_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return mn.credentialFromTaggedObject(t)}static credentialFromError(t){return mn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return mn.credential(t.oauthAccessToken)}catch{return null}}}mn.FACEBOOK_SIGN_IN_METHOD="facebook.com";mn.PROVIDER_ID="facebook.com";class yt extends _r{constructor(){super("google.com"),this.addScope("profile")}static credential(t,n){return nn._fromParams({providerId:yt.PROVIDER_ID,signInMethod:yt.GOOGLE_SIGN_IN_METHOD,idToken:t,accessToken:n})}static credentialFromResult(t){return yt.credentialFromTaggedObject(t)}static credentialFromError(t){return yt.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthIdToken:n,oauthAccessToken:r}=t;if(!n&&!r)return null;try{return yt.credential(n,r)}catch{return null}}}yt.GOOGLE_SIGN_IN_METHOD="google.com";yt.PROVIDER_ID="google.com";class gn extends _r{constructor(){super("github.com")}static credential(t){return nn._fromParams({providerId:gn.PROVIDER_ID,signInMethod:gn.GITHUB_SIGN_IN_METHOD,accessToken:t})}static credentialFromResult(t){return gn.credentialFromTaggedObject(t)}static credentialFromError(t){return gn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t||!("oauthAccessToken"in t)||!t.oauthAccessToken)return null;try{return gn.credential(t.oauthAccessToken)}catch{return null}}}gn.GITHUB_SIGN_IN_METHOD="github.com";gn.PROVIDER_ID="github.com";class bn extends _r{constructor(){super("twitter.com")}static credential(t,n){return nn._fromParams({providerId:bn.PROVIDER_ID,signInMethod:bn.TWITTER_SIGN_IN_METHOD,oauthToken:t,oauthTokenSecret:n})}static credentialFromResult(t){return bn.credentialFromTaggedObject(t)}static credentialFromError(t){return bn.credentialFromTaggedObject(t.customData||{})}static credentialFromTaggedObject({_tokenResponse:t}){if(!t)return null;const{oauthAccessToken:n,oauthTokenSecret:r}=t;if(!n||!r)return null;try{return bn.credential(n,r)}catch{return null}}}bn.TWITTER_SIGN_IN_METHOD="twitter.com";bn.PROVIDER_ID="twitter.com";async function rC(e,t){return yo(e,"POST","/v1/accounts:signUp",In(e,t))}class Hn{constructor(t){this.user=t.user,this.providerId=t.providerId,this._tokenResponse=t._tokenResponse,this.operationType=t.operationType}static async _fromIdTokenResponse(t,n,r,o=!1){const i=await wt._fromIdTokenResponse(t,r,o),s=Pu(r);return new Hn({user:i,providerId:s,_tokenResponse:r,operationType:n})}static async _forOperation(t,n,r){await t._updateTokensIfNecessary(r,!0);const o=Pu(r);return new Hn({user:t,providerId:o,_tokenResponse:r,operationType:n})}}function Pu(e){return e.providerId?e.providerId:"phoneNumber"in e?"phone":null}class wi extends kn{constructor(t,n,r,o){super(n.code,n.message),this.operationType=r,this.user=o,Object.setPrototypeOf(this,wi.prototype),this.customData={appName:t.name,tenantId:t.tenantId??void 0,_serverResponse:n.customData._serverResponse,operationType:r}}static _fromErrorAndOperation(t,n,r,o){return new wi(t,n,r,o)}}function pg(e,t,n,r){return(t==="reauthenticate"?n._getReauthenticationResolver(e):n._getIdTokenResponse(e)).catch(i=>{throw i.code==="auth/multi-factor-auth-required"?wi._fromErrorAndOperation(e,i,t,r):i})}function oC(e){return new Set(e.map(({providerId:t})=>t).filter(t=>!!t))}async function mg(e,t,n=!1){const r=await vr(e,t._linkToIdToken(e.auth,await e.getIdToken()),n);return Hn._forOperation(e,"link",r)}async function iC(e,t,n){await Jr(t);const r=oC(t.providerData);ce(r.has(n)===e,t.auth,"provider-already-linked")}async function gg(e,t,n=!1){const{auth:r}=e;if(dt(r.app))return Promise.reject(Yt(r));const o="reauthenticate";try{const i=await vr(e,pg(r,o,t,e),n);ce(i.idToken,r,"internal-error");const s=jl(i.idToken);ce(s,r,"internal-error");const{sub:l}=s;return ce(e.uid===l,r,"user-mismatch"),Hn._forOperation(e,o,i)}catch(i){throw i?.code==="auth/user-not-found"&&vt(r,"user-mismatch"),i}}async function bg(e,t,n=!1){if(dt(e.app))return Promise.reject(Yt(e));const r="signIn",o=await pg(e,r,t),i=await Hn._fromIdTokenResponse(e,r,o);return n||await e._updateCurrentUser(i.user),i}async function sC(e,t){return bg(Nn(e),t)}async function aC(e,t){const n=st(e);return await iC(!1,n,t.providerId),mg(n,t)}async function lC(e,t){return gg(st(e),t)}async function xg(e){const t=Nn(e);t._getPasswordPolicyInternal()&&await t._updatePasswordPolicy()}async function cC(e,t,n){if(dt(e.app))return Promise.reject(Yt(e));const r=Nn(e),s=await Ra(r,{returnSecureToken:!0,email:t,password:n,clientType:"CLIENT_TYPE_WEB"},"signUpPassword",rC).catch(c=>{throw c.code==="auth/password-does-not-meet-requirements"&&xg(e),c}),l=await Hn._fromIdTokenResponse(r,"signIn",s);return await r._updateCurrentUser(l.user),l}function uC(e,t,n){return dt(e.app)?Promise.reject(Yt(e)):sC(st(e),Yn.credential(t,n)).catch(async r=>{throw r.code==="auth/password-does-not-meet-requirements"&&xg(e),r})}async function dC(e,t){return on(e,"POST","/v1/accounts:update",t)}async function vg(e,{displayName:t,photoURL:n}){if(t===void 0&&n===void 0)return;const r=st(e),i={idToken:await r.getIdToken(),displayName:t,photoUrl:n,returnSecureToken:!0},s=await vr(r,dC(r.auth,i));r.displayName=s.displayName||null,r.photoURL=s.photoUrl||null;const l=r.providerData.find(({providerId:c})=>c==="password");
50l&&(l.displayName=r.displayName,l.photoURL=r.photoURL),await r._updateTokensIfNecessary(s)}function ns(e,t,n,r){return st(e).onIdTokenChanged(t,n,r)}function hC(e,t,n){return st(e).beforeAuthStateChanged(t,n)}function fC(e,t,n,r){return st(e).onAuthStateChanged(t,n,r)}function pC(e){return st(e).signOut()}async function mC(e){return st(e).delete()}const _i="__sak";class yg{constructor(t,n){this.storageRetriever=t,this.type=n}_isAvailable(){try{return this.storage?(this.storage.setItem(_i,"1"),this.storage.removeItem(_i),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(t,n){return this.storage.setItem(t,JSON.stringify(n)),Promise.resolve()}_get(t){const n=this.storage.getItem(t);return Promise.resolve(n?JSON.parse(n):null)}_remove(t){return this.storage.removeItem(t),Promise.resolve()}get storage(){return this.storageRetriever()}}const gC=1e3,bC=10;class wg extends yg{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(t,n)=>this.onStorageEvent(t,n),this.listeners={},this.localCache={},this.pollTimer=null,this.fallbackToPolling=cg(),this._shouldAllowMigration=!0}forAllChangedKeys(t){for(const n of Object.keys(this.listeners)){const r=this.storage.getItem(n),o=this.localCache[n];r!==o&&t(n,o,r)}}onStorageEvent(t,n=!1){if(!t.key){this.forAllChangedKeys((s,l,c)=>{this.notifyListeners(s,c)});return}const r=t.key;n?this.detachListener():this.stopPolling();const o=()=>{const s=this.storage.getItem(r);!n&&this.localCache[r]===s||this.notifyListeners(r,s)},i=this.storage.getItem(r);R2()&&i!==t.newValue&&t.newValue!==t.oldValue?setTimeout(o,bC):o()}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const o of Array.from(r))o(n&&JSON.parse(n))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((t,n,r)=>{this.onStorageEvent(new StorageEvent("storage",{key:t,oldValue:n,newValue:r}),!0)})},gC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[t]||(this.listeners[t]=new Set,this.localCache[t]=this.storage.getItem(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(t,n){await super._set(t,n),this.localCache[t]=JSON.stringify(n)}async _get(t){const n=await super._get(t);return this.localCache[t]=JSON.stringify(n),n}async _remove(t){await super._remove(t),delete this.localCache[t]}}wg.type="LOCAL";const xC=wg;class _g extends yg{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(t,n){}_removeListener(t,n){}}_g.type="SESSION";const Cg=_g;function vC(e){return Promise.all(e.map(async t=>{try{return{fulfilled:!0,value:await t}}catch(n){return{fulfilled:!1,reason:n}}}))}class rs{constructor(t){this.eventTarget=t,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(t){const n=this.receivers.find(o=>o.isListeningto(t));if(n)return n;const r=new rs(t);return this.receivers.push(r),r}isListeningto(t){return this.eventTarget===t}async handleEvent(t){const n=t,{eventId:r,eventType:o,data:i}=n.data,s=this.handlersMap[o];if(!s?.size)return;n.ports[0].postMessage({status:"ack",eventId:r,eventType:o});const l=Array.from(s).map(async u=>u(n.origin,i)),c=await vC(l);n.ports[0].postMessage({status:"done",eventId:r,eventType:o,response:c})}_subscribe(t,n){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[t]||(this.handlersMap[t]=new Set),this.handlersMap[t].add(n)}_unsubscribe(t,n){this.handlersMap[t]&&n&&this.handlersMap[t].delete(n),(!n||this.handlersMap[t].size===0)&&delete this.handlersMap[t],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}rs.receivers=[];function Dl(e="",t=10){let n="";for(let r=0;r<t;r++)n+=Math.floor(Math.random()*10);return e+n}class yC{constructor(t){this.target=t,this.handlers=new Set}removeMessageHandler(t){t.messageChannel&&(t.messageChannel.port1.removeEventListener("message",t.onMessage),t.messageChannel.port1.close()),this.handlers.delete(t)}async _send(t,n,r=50){const o=typeof MessageChannel<"u"?new MessageChannel:null;if(!o)throw new Error("connection_unavailable");let i,s;return new Promise((l,c)=>{const u=Dl("",20);o.port1.start();const d=setTimeout(()=>{c(new Error("unsupported_event"))},r);s={messageChannel:o,onMessage(h){const p=h;if(p.data.eventId===u)switch(p.data.status){case"ack":clearTimeout(d),i=setTimeout(()=>{c(new Error("timeout"))},3e3);break;case"done":clearTimeout(i),l(p.data.response);break;default:clearTimeout(d),clearTimeout(i),c(new Error("invalid_response"));break}}},this.handlers.add(s),o.port1.addEventListener("message",s.onMessage),this.target.postMessage({eventType:t,eventId:u,data:n},[o.port2])}).finally(()=>{s&&this.removeMessageHandler(s)})}}function Ft(){return window}
50function wC(e){Ft().location.href=e}function Sg(){return typeof Ft().WorkerGlobalScope<"u"&&typeof Ft().importScripts=="function"}async function _C(){if(!navigator?.serviceWorker)return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function CC(){return navigator?.serviceWorker?.controller||null}function SC(){return Sg()?self:null}const Eg="firebaseLocalStorageDb",EC=1,Ci="firebaseLocalStorage",kg="fbase_key";class wo{constructor(t){this.request=t}toPromise(){return new Promise((t,n)=>{this.request.addEventListener("success",()=>{t(this.request.result)}),this.request.addEventListener("error",()=>{n(this.request.error)})})}}function os(e,t){return e.transaction([Ci],t?"readwrite":"readonly").objectStore(Ci)}function kC(){const e=indexedDB.deleteDatabase(Eg);return new wo(e).toPromise()}function Ig(){const e=indexedDB.open(Eg,EC);return new Promise((t,n)=>{e.addEventListener("error",()=>{n(e.error)}),e.addEventListener("upgradeneeded",()=>{const r=e.result;try{r.createObjectStore(Ci,{keyPath:kg})}catch(o){n(o)}}),e.addEventListener("success",async()=>{const r=e.result;r.objectStoreNames.contains(Ci)?t(r):(r.close(),await kC(),t(await Ig()))})})}async function Ru(e,t,n){const r=os(e,!0).put({[kg]:t,value:n});return new wo(r).toPromise()}async function IC(e,t){const n=os(e,!1).get(t),r=await new wo(n).toPromise();return r===void 0?null:r.value}function ju(e,t){const n=os(e,!0).delete(t);return new wo(n).toPromise()}const NC=800,TC=3;class Ng{registerLifecycleListeners(){typeof window<"u"&&typeof window.addEventListener=="function"&&(window.addEventListener("pagehide",this.onPageHide),window.addEventListener("pageshow",this.onPageShow))}unregisterLifecycleListeners(){typeof window<"u"&&typeof window.removeEventListener=="function"&&(window.removeEventListener("pagehide",this.onPageHide),window.removeEventListener("pageshow",this.onPageShow))}constructor(){this.type="LOCAL",this.dbPromise=null,this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.isClosing=!1,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this.onPageHide=()=>{this.isClosing=!0,this.stopPolling(),this.dbPromise&&(this.dbPromise.then(t=>t.close()).catch(()=>{}),this.dbPromise=null)},this.onPageShow=()=>{this.isClosing&&(this.isClosing=!1,Object.keys(this.listeners).length>0&&this.startPolling())},this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){if(this.isClosing)throw new Error("Database is closing");return this.dbPromise?this.dbPromise:(this.dbPromise=Ig(),this.dbPromise.catch(()=>{this.dbPromise=null}),this.dbPromise)}async _withRetries(t){let n=0;for(;;)try{const r=await this._openDb();return await t(r)}catch(r){if(this.isClosing||n++>TC)throw r;this.dbPromise&&((await this.dbPromise).close(),this.dbPromise=null)}}async initializeServiceWorkerMessaging(){return Sg()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=rs._getInstance(SC()),this.receiver._subscribe("keyChanged",async(t,n)=>({keyProcessed:(await this._poll()).includes(n.key)}
50)),this.receiver._subscribe("ping",async(t,n)=>["keyChanged"])}async initializeSender(){if(this.activeServiceWorker=await _C(),!this.activeServiceWorker)return;this.sender=new yC(this.activeServiceWorker);const t=await this.sender._send("ping",{},800);t&&t[0]?.fulfilled&&t[0]?.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(t){if(!(!this.sender||!this.activeServiceWorker||CC()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:t},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{return indexedDB?(await this._withRetries(async t=>{await Ru(t,_i,"1"),await ju(t,_i)}),!0):!1}catch{}return!1}async _withPendingWrite(t){this.pendingWrites++;try{await t()}finally{this.pendingWrites--}}async _set(t,n){return this._withPendingWrite(async()=>(await this._withRetries(r=>Ru(r,t,n)),this.localCache[t]=n,this.notifyServiceWorker(t)))}async _get(t){const n=await this._withRetries(r=>IC(r,t));return this.localCache[t]=n,n}async _remove(t){return this._withPendingWrite(async()=>(await this._withRetries(n=>ju(n,t)),delete this.localCache[t],this.notifyServiceWorker(t)))}async _poll(){if(this.isClosing)return[];try{const t=await this._withRetries(o=>{const i=os(o,!1).getAll();return new wo(i).toPromise()});if(this.isClosing)return[];if(!t)return[];if(this.pendingWrites!==0)return[];const n=[],r=new Set;if(t.length!==0)for(const{fbase_key:o,value:i}of t)r.add(o),JSON.stringify(this.localCache[o])!==JSON.stringify(i)&&(this.notifyListeners(o,i),n.push(o));for(const o of Object.keys(this.localCache))this.localCache[o]&&!r.has(o)&&(this.notifyListeners(o,null),n.push(o));return n}catch(t){return this.isClosing||Xm(`Firebase Auth cross-tab polling failed with error: ${t}`),[]}}notifyListeners(t,n){this.localCache[t]=n;const r=this.listeners[t];if(r)for(const o of Array.from(r))o(n)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),NC)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(t,n){Object.keys(this.listeners).length===0&&(this.startPolling(),this.registerLifecycleListeners()),this.listeners[t]||(this.listeners[t]=new Set,this._get(t)),this.listeners[t].add(n)}_removeListener(t,n){this.listeners[t]&&(this.listeners[t].delete(n),this.listeners[t].size===0&&delete this.listeners[t]),Object.keys(this.listeners).length===0&&(this.stopPolling(),this.unregisterLifecycleListeners())}}Ng.type="LOCAL";const AC=Ng;new vo(3e4,6e4);function Fl(e,t){return t?Xt(t):(ce(e._popupRedirectResolver,e,"argument-error"),e._popupRedirectResolver)}class Ul extends Ll{constructor(t){super("custom","custom"),this.params=t}_getIdTokenResponse(t){return ur(t,this._buildIdpRequest())}_linkToIdToken(t,n){return ur(t,this._buildIdpRequest(n))}_getReauthenticationResolver(t){return ur(t,this._buildIdpRequest())}_buildIdpRequest(t){const n={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return t&&(n.idToken=t),n}}function PC(e){return bg(e.auth,new Ul(e),e.bypassAuthState)}function RC(e){const{auth:t,user:n}=e;return ce(n,t,"internal-error"),gg(n,new Ul(e),e.bypassAuthState)}async function jC(e){const{auth:t,user:n}=e;return ce(n,t,"internal-error"),mg(n,new Ul(e),e.bypassAuthState)}class Tg{constructor(t,n,r,o,i=!1){this.auth=t,this.resolver=r,this.user=o,this.bypassAuthState=i,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(n)?n:[n]}execute(){return new Promise(async(t,n)=>{this.pendingPromise={resolve:t,reject:n};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(r){this.reject(r)}})}async onAuthEvent(t){const{urlResponse:n,sessionId:r,postBody:o,tenantId:i,error:s,type:l}=t;if(s){this.reject(s);return}const c={auth:this.auth,requestUri:n,sessionId:r,tenantId:i||void 0,postBody:o||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(l)(c))}catch(u){this.reject(u)}}onError(t){this.reject(t)}getIdpTask(t){switch(t){case"signInViaPopup":case"signInViaRedirect":return PC;case"linkViaPopup":case"linkViaRedirect":return jC;case"reauthViaPopup":case"reauthViaRedirect":return RC;default:vt(this.auth,"internal-error")}}resolve(t){tn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(t),this.unregisterAndCleanUp()}reject(t){tn(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(t),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}const OC=new vo(2e3,1e4);async function Ag(e,t,n){if(dt(e.app))return Promise.reject(xt(e,"operation-not-supported-in-this-environment"));const r=Nn(e);Ym(e,t,ts);const o=Fl(r,n);return new vn(r,"signInViaPopup",t,o).executeNotNull()}async function Ou(e,t,n){const r=st(e);if(dt(r.auth.app))return Promise.reject(xt(r.auth,"operation-not-supported-in-this-environment"));Ym(r.auth,t,ts);const o=Fl(r.auth,n);return new vn(r.auth,"reauthViaPopup",t,o,r).executeNotNull()}class vn extends Tg{constructor(t,n,r,o,i){super(t,n,o,i),this.provider=r,this.authWindow=null,this.pollId=null,vn.currentPopupAction&&vn.currentPopupAction.cancel(),vn.currentPopupAction=this}async executeNotNull(){const t=await this.execute();return ce(t,this.auth,"internal-error"),t}async onExecution(){tn(this.filter.length===1,"Popup operations only handle one event");const t=Dl();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],t),this.authWindow.associatedEvent=t,this.resolver._originValidation(this.auth).catch(n=>{this.reject(n)}),this.resolver._isIframeWebStorageSupported(this.auth,n=>{n||this.reject(xt(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){return this.authWindow?.associatedEvent||null}cancel(){this.reject(xt(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,vn.currentPopupAction=null}pollUserCancellation(){const t=()=>{if(this.authWindow?.window?.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(xt(this.auth,"popup-closed-by-user"))},8e3);return}this.pollId=window.setTimeout(t,OC.get())};t()}}vn.currentPopupAction=null;const LC="pendingRedirect",ri=new Map;class MC extends Tg{constructor(t,n,r=!1){super(t,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],n,void 0,r),this.eventId=null}async execute(){let t=ri.get(this.auth._key());if(!t){try{const r=await DC(this.resolver,this.auth)?await super.execute():null;t=()=>Promise.resolve(r)}catch(n){t=()=>Promise.reject(n)}ri.set(this.auth._key(),t)}return this.bypassAuthState||ri.set(this.auth._key(),()=>Promise.resolve(null)),t()}
50async onAuthEvent(t){if(t.type==="signInViaRedirect")return super.onAuthEvent(t);if(t.type==="unknown"){this.resolve(null);return}if(t.eventId){const n=await this.auth._redirectUserForId(t.eventId);if(n)return this.user=n,super.onAuthEvent(t);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function DC(e,t){const n=zC(t),r=UC(e);if(!await r._isAvailable())return!1;const o=await r._get(n)==="true";return await r._remove(n),o}function FC(e,t){ri.set(e._key(),t)}function UC(e){return Xt(e._redirectPersistence)}function zC(e){return ni(LC,e.config.apiKey,e.name)}async function BC(e,t,n=!1){if(dt(e.app))return Promise.reject(Yt(e));const r=Nn(e),o=Fl(r,t),s=await new MC(r,o,n).execute();return s&&!n&&(delete s.user._redirectEventId,await r._persistUserIfCurrent(s.user),await r._setRedirectUser(null,t)),s}const $C=600*1e3;class HC{constructor(t){this.auth=t,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(t){this.consumers.add(t),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,t)&&(this.sendToConsumer(this.queuedRedirectEvent,t),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(t){this.consumers.delete(t)}onEvent(t){if(this.hasEventBeenHandled(t))return!1;let n=!1;return this.consumers.forEach(r=>{this.isEventForConsumer(t,r)&&(n=!0,this.sendToConsumer(t,r),this.saveEventToCache(t))}),this.hasHandledPotentialRedirect||!VC(t)||(this.hasHandledPotentialRedirect=!0,n||(this.queuedRedirectEvent=t,n=!0)),n}sendToConsumer(t,n){if(t.error&&!Pg(t)){const r=t.error.code?.split("auth/")[1]||"internal-error";n.onError(xt(this.auth,r))}else n.onAuthEvent(t)}isEventForConsumer(t,n){const r=n.eventId===null||!!t.eventId&&t.eventId===n.eventId;return n.filter.includes(t.type)&&r}hasEventBeenHandled(t){return Date.now()-this.lastProcessedEventTime>=$C&&this.cachedEventUids.clear(),this.cachedEventUids.has(Lu(t))}saveEventToCache(t){this.cachedEventUids.add(Lu(t)),this.lastProcessedEventTime=Date.now()}}function Lu(e){return[e.type,e.eventId,e.sessionId,e.tenantId].filter(t=>t).join("-")}function Pg({type:e,error:t}){return e==="unknown"&&t?.code==="auth/no-auth-event"}function VC(e){switch(e.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Pg(e);default:return!1}}async function WC(e,t={}){return on(e,"GET","/v1/projects",t)}const qC=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,GC=/^https?/;async function KC(e){if(e.config.emulator)return;const{authorizedDomains:t}=await WC(e);for(const n of t)try{if(XC(n))return}catch{}vt(e,"unauthorized-domain")}function XC(e){const t=Aa(),{protocol:n,hostname:r}=new URL(t);if(e.startsWith("chrome-extension://")){const s=new URL(e);return s.hostname===""&&r===""?n==="chrome-extension:"&&e.replace("chrome-extension://","")===t.replace("chrome-extension://",""):n==="chrome-extension:"&&s.hostname===r}if(!GC.test(n))return!1;if(qC.test(e))return r===e;const o=e.replace(/\./g,"\\.");return new RegExp("^(.+\\."+o+"|"+o+")$","i").test(r)}const YC=new vo(3e4,6e4);function Mu(){const e=Ft().___jsl;if(e?.H){for(const t of Object.keys(e.H))if(e.H[t].r=e.H[t].r||[],e.H[t].L=e.H[t].L||[],e.H[t].r=[...e.H[t].L],e.CP)for(let n=0;n<e.CP.length;n++)e.CP[n]=null}}function JC(e){return new Promise((t,n)=>{function r(){Mu(),gapi.load("gapi.iframes",{callback:()=>{t(gapi.iframes.getContext())},ontimeout:()=>{Mu(),n(xt(e,"network-request-failed"))},timeout:YC.get()})}if(Ft().gapi?.iframes?.Iframe)t(gapi.iframes.getContext());else if(Ft().gapi?.load)r();else{const o=B2("iframefcb");return Ft()[o]=()=>{gapi.load?r():n(xt(e,"network-request-failed"))},dg(`${z2()}?onload=${o}`).catch(i=>n(i))}}).catch(t=>{throw oi=null,t})}let oi=null;function ZC(e){return oi=oi||JC(e),oi}const QC=new vo(5e3,15e3),eS="__/auth/iframe",tS="emulator/auth/iframe",nS={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},rS=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function oS(e){const t=e.config;ce(t.authDomain,e,"auth-domain-config-required");const n=t.emulator?Rl(t,tS):`https://${e.config.authDomain}/${eS}
50`,r={apiKey:t.apiKey,appName:e.name,v:xo},o=rS.get(e.config.apiHost);o&&(r.eid=o);const i=e._getFrameworks();return i.length&&(r.fw=i.join(",")),`${n}?${bo(r).slice(1)}`}async function iS(e){const t=await ZC(e),n=Ft().gapi;return ce(n,e,"internal-error"),t.open({where:document.body,url:oS(e),messageHandlersFilter:n.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:nS,dontclear:!0},r=>new Promise(async(o,i)=>{await r.restyle({setHideOnLeave:!1});const s=xt(e,"network-request-failed"),l=Ft().setTimeout(()=>{i(s)},QC.get());function c(){Ft().clearTimeout(l),o(r)}r.ping(c).then(c,()=>{i(s)})}))}const sS={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},aS=500,lS=600,cS="_blank",uS="http://localhost";class Du{constructor(t){this.window=t,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function dS(e,t,n,r=aS,o=lS){const i=Math.max((window.screen.availHeight-o)/2,0).toString(),s=Math.max((window.screen.availWidth-r)/2,0).toString();let l="";const c={...sS,width:r.toString(),height:o.toString(),top:i,left:s},u=et().toLowerCase();n&&(l=og(u)?cS:n),ng(u)&&(t=t||uS,c.scrollbars="yes");const d=Object.entries(c).reduce((p,[m,g])=>`${p}${m}=${g},`,"");if(P2(u)&&l!=="_self")return hS(t||"",l),new Du(null);const h=window.open(t||"",l,d);ce(h,e,"popup-blocked");try{h.focus()}catch{}return new Du(h)}function hS(e,t){const n=document.createElement("a");n.href=e,n.target=t;const r=document.createEvent("MouseEvent");r.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),n.dispatchEvent(r)}const fS="__/auth/handler",pS="emulator/auth/handler",mS=encodeURIComponent("fac");async function Fu(e,t,n,r,o,i){ce(e.config.authDomain,e,"auth-domain-config-required"),ce(e.config.apiKey,e,"invalid-api-key");const s={apiKey:e.config.apiKey,appName:e.name,authType:n,redirectUrl:r,v:xo,eventId:o};if(t instanceof ts){t.setDefaultLanguage(e.languageCode),s.providerId=t.providerId||"",X5(t.getCustomParameters())||(s.customParameters=JSON.stringify(t.getCustomParameters()));for(const[d,h]of Object.entries({}))s[d]=h}if(t instanceof _r){const d=t.getScopes().filter(h=>h!=="");d.length>0&&(s.scopes=d.join(","))}e.tenantId&&(s.tid=e.tenantId);const l=s;for(const d of Object.keys(l))l[d]===void 0&&delete l[d];const c=await e._getAppCheckToken(),u=c?`#${mS}=${encodeURIComponent(c)}`:"";return`${gS(e)}?${bo(l).slice(1)}${u}`}function gS({config:e}){return e.emulator?Rl(e,pS):`https://${e.authDomain}/${fS}`}const Ls="webStorageSupport";class bS{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Cg,this._completeRedirectFn=BC,this._overrideRedirectResult=FC}async _openPopup(t,n,r,o){tn(this.eventManagers[t._key()]?.manager,"_initialize() not called before _openPopup()");const i=await Fu(t,n,r,Aa(),o);return dS(t,i,Dl())}async _openRedirect(t,n,r,o){await this._originValidation(t);const i=await Fu(t,n,r,Aa(),o);return wC(i),new Promise(()=>{})}_initialize(t){const n=t._key();if(this.eventManagers[n]){const{manager:o,promise:i}=this.eventManagers[n];return o?Promise.resolve(o):(tn(i,"If manager is not set, promise should be"),i)}const r=this.initAndGetManager(t);return this.eventManagers[n]={promise:r},r.catch(()=>{delete this.eventManagers[n]}),r}async initAndGetManager(t){const n=await iS(t),r=new HC(t);return n.register("authEvent",o=>
50(ce(o?.authEvent,t,"invalid-auth-event"),{status:r.onEvent(o.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[t._key()]={manager:r},this.iframes[t._key()]=n,r}_isIframeWebStorageSupported(t,n){this.iframes[t._key()].send(Ls,{type:Ls},o=>{const i=o?.[0]?.[Ls];i!==void 0&&n(!!i),vt(t,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(t){const n=t._key();return this.originValidationPromises[n]||(this.originValidationPromises[n]=KC(t)),this.originValidationPromises[n]}get _shouldInitProactively(){return cg()||rg()||Ol()}}const xS=bS;var Uu="@firebase/auth",zu="1.13.5";class vS{constructor(t){this.auth=t,this.internalListeners=new Map}getUid(){return this.assertAuthConfigured(),this.auth.currentUser?.uid||null}async getToken(t){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(t)}:null}addAuthTokenListener(t){if(this.assertAuthConfigured(),this.internalListeners.has(t))return;const n=this.auth.onIdTokenChanged(r=>{t(r?.stsTokenManager.accessToken||null)});this.internalListeners.set(t,n),this.updateProactiveRefresh()}removeAuthTokenListener(t){this.assertAuthConfigured();const n=this.internalListeners.get(t);n&&(this.internalListeners.delete(t),n(),this.updateProactiveRefresh())}assertAuthConfigured(){ce(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}function yS(e){switch(e){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";case"WebExtension":return"web-extension";default:return}}function wS(e){Xr(new xr("auth",(t,{options:n})=>{const r=t.getProvider("app").getImmediate(),o=t.getProvider("heartbeat"),i=t.getProvider("app-check-internal"),{apiKey:s,authDomain:l}=r.options;ce(s&&!s.includes(":"),"invalid-api-key",{appName:r.name});const c={apiKey:s,authDomain:l,clientPlatform:e,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:ug(e)},u=new D2(r,o,i,c);return q2(u,n),u},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((t,n,r)=>{t.getProvider("auth-internal").initialize()})),Xr(new xr("auth-internal",t=>{const n=Nn(t.getProvider("auth").getImmediate());return(r=>new vS(r))(n)},"PRIVATE").setInstantiationMode("EXPLICIT")),ar(Uu,zu,yS(e)),ar(Uu,zu,"esm2020")}const _S=300,CS=Fm("authIdTokenMaxAge")||_S;let Bu=null;const SS=e=>async t=>{const n=t&&await t.getIdTokenResult(),r=n&&(new Date().getTime()-Date.parse(n.issuedAtTime))/1e3;if(r&&r>CS)return;const o=n?.token;Bu!==o&&(Bu=o,await fetch(e,{method:o?"POST":"DELETE",headers:o?{Authorization:`Bearer ${o}`}:{}}))};function ES(e=Z_()){const t=Hm(e,"auth");if(t.isInitialized())return t.getImmediate();const n=W2(e,{popupRedirectResolver:xS,persistence:[AC,xC,Cg]}),r=Fm("authTokenSyncURL");if(r&&typeof isSecureContext=="boolean"&&isSecureContext){const i=new URL(r,location.origin);if(location.origin===i.origin){const s=SS(i.toString());hC(n,s,()=>s(n.currentUser)),ns(n,l=>s(l))}}const o=U5("auth");return o&&G2(n,`http://${o}`),n}function kS(){return document.getElementsByTagName("head")?.[0]??document}F2({loadJS(e){return new Promise((t,n)=>{const r=document.createElement("script");r.setAttribute("src",e),r.onload=t,r.onerror=o=>{const i=xt("internal-error");i.customData=o,n(i)},r.type="text/javascript",r.charset="UTF-8",kS().appendChild(r)})},gapiScript:"https://apis.google.com/js/api.js",recaptchaV2Script:"https://www.google.com/recaptcha/api.js",recaptchaEnterpriseScript:"https://www.google.com/recaptcha/enterprise.js?render="});wS("Browser");const IS={apiKey:"AIzaSyApTUcSVeN6yp00POd0f13mGLYA1ESLMfg",authDomain:"auth.orvoca.app",projectId:"orbit-vocab",storageBucket:"orbit-vocab.firebasestorage.app",messagingSenderId:"1042454645712",appId:"1:1042454645712:web:324132dc3142e75a57c7d5"};function NS(){const e=Q_()[0];return e||Vm(IS)}function Et(){return ES(NS())}async function $u(e,t){const n=Et();return(await uC(n,e,t)).user}async function TS(e,t,n,r){const o=Et(),i=await cC(o,e,t);try{await jg(i.user)}catch(l){try{await mC(i.user)}catch(c){ae(c,{context:"signup_consent_cleanup"})}throw l}await vg(i.user,{displayName:n});const s=await i.user.getIdToken(!0);try{await Og(s,r)}catch(l){ae(l,{context:"signup_verification_email",route:"/v1/auth/send-verification",method:"POST"})}return i.user}async function AS(){const e=Et(),t=new yt;return t.setCustomParameters({prompt:"select_account"}),Ag(e,t)}async function PS(){const e=Et(),t=new Un("apple.com");return t.addScope("email"),t.addScope("name"),Ag(e,t)}async function RS(e,t,n){if(t==="password"){if(!e.email||!n)throw new Error("reauthentication_password_required");await lC(e,Yn.credential(e.email,n))}else if(t==="google.com"){const r=new yt;e.email&&r.setCustomParameters({login_hint:e.email}),await Ou(e,r)}
50else{const r=new Un("apple.com");r.addScope("email"),await Ou(e,r)}await e.getIdToken(!0)}function Rg(){return"https://api.orbitvocab.app".replace(/\/+$/,"")}async function jS(e){const t=await e.getIdToken(),n=await fetch(`${Rg()}/v1/auth/signup-status`,{headers:{Authorization:`Bearer ${t}`}});if(!n.ok)throw new Error("signup_status_failed");const r=await n.json();if(typeof r.consentRequired!="boolean")throw new Error("signup_status_invalid");return r.consentRequired}async function jg(e){const t=await e.getIdToken();if(!(await fetch(`${Rg()}/v1/auth/consent`,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({ageConfirmed:!0,termsAccepted:!0,privacyAccepted:!0,source:"web"})})).ok)throw new Error("signup_consent_failed")}async function OS(e,t,n){const o=`${"https://api.orbitvocab.app".replace(/\/+$/,"")}/v1/auth/forgot-password`;if(!(await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,locale:t,turnstileToken:n})})).ok)throw new Error("password_reset_failed")}async function LS(e){const t="https://api.orbitvocab.app".replace(/\/+$/,"");return(await fetch(`${t}/v1/auth/verify-turnstile`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e})})).ok}async function Og(e,t){const n="https://api.orbitvocab.app".replace(/\/+$/,""),r=t?`${n}/v1/auth/send-verification?locale=${encodeURIComponent(t)}`:`${n}/v1/auth/send-verification`,o=await fetch(r,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!o.ok){const i=await o.json().catch(()=>({}));throw Object.assign(new Error(i.error??"send_verification_failed"),{retryAfter:i.retryAfter})}}async function ii(){const e=Et();await pC(e)}function zl(e){const t=Et();return fC(t,e)}async function Rt(e,t=!1){return e.getIdToken(t)}function MS(e){const t=e;return yt.credentialFromError(t)??Un.credentialFromError(t)??null}function DS(e){return e.customData?.email??""}async function FS(e,t){return aC(e,t)}async function US(e,t){await vg(e,{displayName:t.trim()||null})}function zS(e,t){switch(e){case"plan_viewed":return[{event:"upgrade_page_viewed",properties:{}}];case"review_session_started":return[{event:"study_session_started",properties:{card_count:t.card_count}}];case"review_session_completed":{const n=t;return[{event:"study_session_completed",properties:{card_count:n.card_count,knew:n.knew_count,missed:n.missed_count}}]}case"user_logged_in":{const n=t;return n.method==="email"?[]:[{event:"user_logged_in_with_social",properties:{provider:n.method}}]}default:return[]}}function BS(e){const t=e.trim().toLowerCase();return t==="localhost"||t==="::1"||t==="[::1]"||t==="127.0.0.1"||t.startsWith("127.")}function $S(e){return e?.hostname?!BS(e.hostname):!1}const Lg="orbit_analytics_consent";function Bl(){try{const e=localStorage.getItem(Lg);return e==="granted"||e==="denied"?e:null}catch{return null}}function Hu(e){try{localStorage.setItem(Lg,e)}catch{}}const HS=new Set(["orvoca.app","www.orvoca.app","orbitvocab.app","www.orbitvocab.app"]);let Vu=null,Wu=null;function VS(){return Vu??=_t(()=>import("./module-hJ5y4VjW.js"),[]),Vu.then(e=>e.default)}function Mg(){const e="phc_uaNHp93gWEALmNqkiWvuZqQFbhsp2u9TeazkEAPmhjgo".trim();return typeof window>"u"||!e||!HS.has(window.location.hostname)||Bl()!=="granted"?null:(Wu??=VS().then(t=>(t.__loaded||t.init(e,{api_host:"/ingest",ui_host:"https://us.posthog.com",defaults:"2026-01-30",autocapture:!1,capture_pageview:!0,capture_pageleave:!1,capture_exceptions:!0,disable_session_recording:!0,mask_all_text:!0,mask_all_element_attributes:!0,debug:!1,loaded:n=>{n.register({environment:"production",surface:"web"})}}),t)),Wu)}function $l(e){const t=Mg();t&&t.then(e).catch(console.error)}function WS(){Mg()}const qS="web";function Hl(){return typeof window<"u"&&$S(window.location)&&Bl()==="granted"}function it(e,...t){if(!Hl())return;const n={...t[0]??{},surface:qS};$l(r=>{r.capture(e,n);for(const o of zS(e,t[0]??{}))r.capture(o.event,{...n,...o.properties})})}function Fr(e,t){Hl()&&$l(n=>{n.identify(e,{email:t})})}function ja(){Hl()&&$l(e=>e.reset())}const Ms="https://api.orvoca.app";function _o(e){const t=e?.trim();if(!t)return Ms;try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?Ms:t.replace(/\/+$/,"")}catch{return Ms}}function jt(e,t){return e instanceof Ut?{method:e.method,path:e.path,status:e.status,message:e.message}:e instanceof Error?{method:t.method,path:t.path,status:null,message:e.message}:{method:t.method,path:t.path,status:null,message:"Unknown error"}}function qt(e){return e?`${e.status===null?"network_error":`http_${e.status}`} • ${e.method} ${e.path}`:""}function qu(e){return e.split(/\n|,/).map(t=>t.trim()).filter(t=>t.length>0)}function Ds(e){return e.join(`
51`)}function Dg(e){switch(e){case"selection":return"source_selection";case"paste":case"copy":return"source_copy";case"share":return"source_share";case"context_menu":return"source_context_menu";default:return"source_copy"}}function GS(e){switch(e){case"selection":return"Overlay";case"paste":case"copy":return"Copied";case"share":return"Shared";default:return e.replaceAll("_"," ")}}
51const KS={en:"English",ko:"한국어",ja:"日本語",zh:"中文",es:"Español",fr:"Français",de:"Deutsch"};function si(e){return!e||e==="unknown"?"Unknown":KS[e]??e.toUpperCase()}const XS={enabled:!1,userId:null};function Vl(e){return XS}function YS(e){return e||(typeof window<"u"?`${window.location.pathname}${window.location.search}${window.location.hash}`:"/console")}function Fg(e){const t=Hh(),n=e?.loginNextPath,r=_o("https://api.orbitvocab.app"),o=f.useMemo(()=>Vl(),[r]),i=f.useMemo(()=>!o.enabled||!o.userId?null:{uid:o.userId,email:`${o.userId}@local.qa`,photoURL:null},[o.enabled,o.userId]),[s,l]=f.useState("loading"),c=f.useRef(!1),u=f.useRef(void 0),d=f.useRef(!1),h=f.useCallback(()=>{d.current||(d.current=!0,t.replace(`/login?next=${encodeURIComponent(YS(n))}`))},[n,t]);f.useEffect(()=>{if(i){l(i),Fr(i.uid,i.email??"");return}let x;const E=I=>{window.__orbitToken=I,c.current=!0,l({email:"",photoURL:null}),clearTimeout(x)};window.__orbitTokenCallback=E;const y=typeof navigator<"u"&&navigator.userAgent.includes("OrbitVocabFlutter"),k=(()=>{try{return localStorage.getItem("__orbitFlutterToken")}catch(I){return ae(I,{context:"webview_token_load",route:"/console"}),null}})();return k?(E(k),()=>{window.__orbitTokenCallback=void 0}):typeof window.__orbitToken=="string"?(E(window.__orbitToken),()=>{window.__orbitTokenCallback=void 0}):y?()=>{window.__orbitTokenCallback=void 0}:(x=setTimeout(()=>{if(c.current)return;const I=zl(async C=>{l(C),C?(d.current=!1,Fr(C.uid,C.email??"")):h()});u.current=I},500),()=>{clearTimeout(x),window.__orbitTokenCallback=void 0,u.current?.()})},[i,h]);const p=f.useCallback(async()=>{if(!o.enabled){if(c.current){window.__orbitRequestTokenRefresh?.();return}await ii(),h()}},[o.enabled,h]),m=f.useCallback(async x=>{if(x==="email_not_verified"){if(o.enabled)return;await ii(),h()}},[o.enabled,h]),g=f.useCallback(async()=>{if(o.enabled){ja(),t.replace("/login");return}c.current||(ja(),await ii(),t.replace("/login"))},[o.enabled,t]),b=typeof s=="object"&&s!==null?s.email??"":"",v=typeof s=="object"&&s!==null?s.photoURL??null:null;return{authUser:s,userEmail:b,userPhotoUrl:v,handle401:p,handle403:m,handleSignOut:g,isWebViewMode:c.current}}function JS(e){const[t,n]=f.useState("idle"),r=f.useCallback(async(i,s,l)=>{n("submitting");try{await e.reportError({error_code:i.status!==null?`http_${i.status}`:"network_error",endpoint:`${i.method} ${i.path}`,view:s,memo:l?.trim()||void 0}),n("success")}catch(c){ae(c,{context:"error_report_submit",route:"/v1/report",method:"POST"}),n("error")}},[e]),o=f.useCallback(()=>n("idle"),[]);return{status:t,submit:r,reset:o}}function ZS(){if(typeof window>"u")return[];const e=window,t="app.orbitvocab.orvoca.SafariExtension (6U2MTCB82D)".trim()??"",n="kgfnkbjmdjbecfmlhohogegidgkhcggb".trim()??"",r=[];return t&&e.browser?.runtime?.sendMessage&&r.push({id:t,runtime:e.browser.runtime}),n&&e.chrome?.runtime?.sendMessage&&r.push({id:n,runtime:e.chrome.runtime}),r}function QS({id:e,runtime:t},n){return new Promise(r=>{try{t.sendMessage(e,n,o=>{if(t.lastError){r(!1);return}r(typeof o=="object"&&o!==null&&o.ok===!0)})}catch{r(!1)}})}async function is(e){for(const t of ZS())if(await QS(t,e))return!0;return!1}function zn(e,t){return is({type:"orbit/set-token",token:e,refreshToken:t})}function e7(){return zn("","")}function Fs(e){return is({type:"orbit/update-settings",settings:{captureTriggers:e}})}function t7(e){return is({type:"orbit/update-settings",settings:{themeMode:e}})}function Wl(){return is({type:"orbit/ping"})}const n7={dark:"#090b10",light:"#f8fafc"},r7={dark:"#0c1118",light:"#f3eee5"},o7={dark:"#182946",light:"#d3e3ef"},i7={dark:"#253651",light:"#C5D8E7"},Gu=new Set(["login","signup","welcome","faq","privacy","terms"]);function s7(e){const t=e.pathname.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean);return t.length===0?!0:t.length===1?/^[a-z]{2}$/.test(t[0])||Gu.has(t[0]):/^[a-z]{2}$/.test(t[0])&&Gu.has(t[1])}function a7(e){const t=e.pathname.replace(/^\/+|\/+$/g,"").split("/").filter(Boolean);return t.length===0?!0:t.length===1&&/^[a-z]{2}$/.test(t[0])}function ql(e,t){return e==="system"?t?"dark":"light":e}function l7(e,t){return t.pathname.includes("/console")||t.search.includes("embed=flutter")?i7[e]:a7(t)?o7[e]:s7(t)?r7[e]:n7[e]}function ss(e,t,n){const r=typeof document>"u"?null:document,o=typeof window>"u"?null:window.location;if(!r||!o)return;let i=r.querySelector('meta[name="theme-color"]');i||(i=r.createElement("meta"),i.setAttribute("name","theme-color"),r.head.appendChild(i)),i.setAttribute("content",l7(e,o))}const Ug=f.createContext(null);function Tn(){const e=f.useContext(Ug);if(!e)throw new Error("useConsoleContext must be used inside ConsoleContextProvider");return e}function c7({children:e}){const t=Pi(),n=no(),r=f.useRef(t),{locale:o}=ro();f.useEffect(()=>{r.current=t});const{authUser:i,userEmail:s,userPhotoUrl:l,handle401:c,handle403:u,handleSignOut:d,isWebViewMode:h}=Fg(),p=n.get("embed")==="flutter"||typeof navigator<"u"&&navigator.userAgent.includes("OrbitVocabFlutter")||h,m=_o("https://api.orbitvocab.app"),g=f.useMemo(()=>Vl(),[m]),b=f.useMemo(()=>kl({baseUrl:m,devUserIdTransport:"header",preferSimpleRequests:!0,getToken:async()=>
51{if(g.enabled)return null;if(typeof window<"u"&&typeof window.__orbitToken=="string")return window.__orbitToken;const oe=typeof i=="object"&&i!==null?i:null;return oe?Rt(oe):null},getDevUserId:async()=>g.enabled?g.userId:null}),[m,i,g]),[v,x]=f.useState(null),[E,y]=f.useState(new Set),k=JS(b),I=f.useCallback((oe,xe)=>{x({detail:oe,view:xe}),k.reset()},[k.reset]);f.useEffect(()=>{k.status==="success"&&v!==null&&y(oe=>new Set(oe).add(v.view))},[k.status,v]);const C=f.useCallback(()=>{x(null),k.reset()},[k.reset]),A=f.useCallback((oe,xe,G)=>{k.submit(oe,xe,G)},[k.submit]),[T,L]=f.useState("system");f.useEffect(()=>{try{const oe=localStorage.getItem("orbit-theme");oe==="dark"||oe==="light"||oe==="system"?L(oe):oe==="auto"&&L("system")}catch(oe){ae(oe,{context:"theme_load",route:"/console"})}},[]),f.useEffect(()=>{function oe(J){const Ne=ql(J,window.matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.setAttribute("data-theme",Ne),ss(Ne)}oe(T);try{localStorage.setItem("orbit-theme",T)}catch(J){ae(J,{context:"theme_save",route:"/console"})}if(t7(T),T!=="system")return;const xe=window.matchMedia("(prefers-color-scheme: dark)");function G(){oe("system")}return xe.addEventListener("change",G),()=>xe.removeEventListener("change",G)},[T]);const D=f.useCallback(oe=>{L(oe)},[]);f.useEffect(()=>(document.documentElement.toggleAttribute("data-embed-flutter",p),document.body.toggleAttribute("data-embed-flutter",p),()=>{document.documentElement.removeAttribute("data-embed-flutter"),document.body.removeAttribute("data-embed-flutter")}),[p]),f.useEffect(()=>{if(!(p||g.enabled))return ns(Et(),async oe=>{if(!oe){e7();return}try{const xe=await oe.getIdToken();zn(xe,oe.refreshToken)}catch(xe){ae(xe,{context:"extension_pair_auto",route:"/console"})}})},[p,g.enabled]);const[S,j]=f.useState("idle"),P=S==="ready",[M,_]=f.useState(null),[R,O]=f.useState(null);f.useEffect(()=>{if(i==="loading"||i===null)return;let oe=!0;async function xe(){j("loading");try{const G=await b.getSessionSnapshot(),{settings:J,stats:Ne}=G;if(!oe)return;if(G.needsWelcome){const H=`${window.location.pathname}${window.location.search}`;r.current.replace(`/${o}/welcome?next=${encodeURIComponent(H)}`);return}O(J),J.definition_language&&K(J.definition_language),fe(H=>{const F=J.palette_json,B=Object.keys(H),q=Object.keys(F);if(B.length!==q.length)return F;for(const Z of B)if(H[Z]!==F[Z])return F;return H}),_(Ne),Y(Ne.inbox),j("ready")}catch(G){if(!oe)return;if(G.status===401){await c();return}ae(G,{context:"console_auth_verify",route:"/v1/session/snapshot",method:"GET"}),j("ready")}}return xe(),()=>{oe=!1}},[b,i]);const[U,$]=f.useState(null),w=f.useCallback(oe=>$(oe),[]),[te,K]=f.useState("en"),[N,fe]=f.useState({}),[re,Y]=f.useState(0),[pe,ye]=f.useState(null),X=f.useCallback(async()=>{try{await b.markGuideSeen()}catch(oe){ae(oe,{context:"guide_seen_mark",route:"/v1/me/guide-seen",method:"POST"})}ye(!0)},[b]),Re=f.useCallback(async oe=>{if(!i||i==="loading")return!1;try{const xe=g.enabled?null:h?window.__orbitToken??null:await Rt(i);if(!g.enabled&&!xe)return ae(new Error("vocab_export_missing_token"),{context:"vocab_export",route:"/v1/vocab/export",method:"GET"}),!1;const G=b.exportVocabUrl(oe),J=new Headers({"x-orbit-client":"web"});g.enabled&&g.userId?J.set("x-dev-user-id",g.userId):xe&&J.set("authorization",`Bearer ${xe}`);const Ne=await fetch(G,{headers:J});if(!Ne.ok)return ae(new Error("vocab_export_failed"),{context:"vocab_export",route:"/v1/vocab/export",method:"GET",status:Ne.status}),!1;const H=await Ne.blob(),F=document.createElement("a");return F.href=URL.createObjectURL(H),F.download=`orbit-vocab-${new Date().toISOString().slice(0,10)}.${oe}`,F.click(),URL.revokeObjectURL(F.href),!0}catch(xe){return ae(xe,{context:"vocab_export",route:"/v1/vocab/export",method:"GET"}),!1}},[i,g,h,b]),Ie=f.useMemo(()=>({apiClient:b,authUser:i,userEmail:s,userPhotoUrl:l,isReady:P,handle401:c,handle403:u,handleSignOut:d,isWebViewMode:h,isEmbeddedApp:p,theme:T,setThemeMode:D,pendingCount:re,setPendingCount:Y,statsSnapshot:M,settingsSnapshot:R,palette:N,setPalette:fe,downloadExport:Re,headerActions:U,setHeaderActions:w,reportTarget:v,reportStatus:k.status,reportedViews:E,handleReport:I,handleReportClose:C,handleReportSubmit:A,guideSeen:pe,setGuideSeen:ye,markGuideSeen:X,definitionLanguage:te}),[b,i,s,l,P,c,u,d,h,p,T,D,re,Y,M,R,N,fe,Re,U,w,v,k.status,E,I,C,A,pe,ye,X,te]);return a.jsx(Ug.Provider,{value:Ie,children:e})}const zg="orbit_announcement_v1",u7=300*1e3;function d7(){try{const e=localStorage.getItem(zg);
51if(!e)return;const t=JSON.parse(e);return Date.now()-t.cachedAt>u7?void 0:t.data}catch{return}}function h7(e){try{const t={data:e,cachedAt:Date.now()};localStorage.setItem(zg,JSON.stringify(t))}catch{}}function Ku(e){try{return!!localStorage.getItem(`orbit_dismissed_${e}`)}catch{return!1}}function f7(e){try{localStorage.setItem(`orbit_dismissed_${e}`,"1")}catch{}}function p7(e){const[t,n]=f.useState(null);f.useEffect(()=>{const o=d7();if(o!==void 0){o&&!Ku(o.id)&&n(o);return}m5(e).then(i=>{h7(i),i&&!Ku(i.id)&&n(i)})},[e]);function r(){t&&(f7(t.id),n(null))}return{announcement:t,dismiss:r}}const m7={info:{bg:"bg-[color-mix(in_srgb,var(--accent-primary)_18%,var(--bg-elevated))] border-b border-[color-mix(in_srgb,var(--accent-primary)_30%,transparent)]",text:"text-(--fg-strong)",linkText:"text-(--accent-primary) hover:opacity-80",closeText:"text-(--fg-muted) hover:text-(--fg-strong)"},warning:{bg:"bg-[color-mix(in_srgb,var(--orbit-sun)_20%,var(--bg-elevated))] border-b border-[color-mix(in_srgb,var(--orbit-sun)_30%,transparent)]",text:"text-(--fg-strong)",linkText:"text-(--orbit-sun) hover:opacity-80",closeText:"text-(--fg-muted) hover:text-(--fg-strong)"},maintenance:{bg:"bg-[color-mix(in_srgb,var(--state-danger)_18%,var(--bg-elevated))] border-b border-[color-mix(in_srgb,var(--state-danger)_30%,transparent)]",text:"text-(--fg-strong)",linkText:"text-(--state-danger) hover:opacity-80",closeText:"text-(--fg-muted) hover:text-(--fg-strong)"}};function g7(e,t){return t==="ko"?{message:e.messageKo??e.messageEn,linkLabel:e.linkLabelKo??e.linkLabelEn}:{message:e.messageEn??e.messageKo,linkLabel:e.linkLabelEn??e.linkLabelKo}}function b7({announcement:e,locale:t,onDismiss:n}){const{message:r,linkLabel:o}=g7(e,t);if(!r)return null;const i=m7[e.type];return a.jsx("div",{className:`w-full ${i.bg} px-4 py-2`,children:a.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-4",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-3 text-sm",children:[a.jsx("span",{className:`${i.text} text-sm leading-snug`,children:r}),e.linkUrl&&o&&a.jsxs("a",{href:e.linkUrl,target:"_blank",rel:"noopener noreferrer",className:`shrink-0 underline underline-offset-2 ${i.linkText} text-sm transition-colors`,children:[o," →"]})]}),e.isDismissible&&a.jsx("button",{onClick:n,"aria-label":"배너 닫기",className:`shrink-0 text-lg leading-none transition-colors ${i.closeText}`,children:a.jsx(Xn,{size:16,strokeWidth:2,"aria-hidden":"true"})})]})})}function Bg(){const e=Mt(),t=_o("https://api.orbitvocab.app"),{announcement:n,dismiss:r}=p7(t);return n?a.jsx(b7,{announcement:n,locale:e,onDismiss:r}):null}const x7=["source_google","source_sns","source_youtube","source_referral","source_product_hunt","source_community","source_blog","source_other"],v7=["google","sns","youtube","referral","product_hunt","community","blog","other"],Xu="9999999999999";function y7({apiClient:e,isReady:t}){const n=se("Onboarding.referral"),[r,o]=f.useState(!1),[i,s]=f.useState(!1),[l,c]=f.useState(!1),u=f.useRef(!1);f.useEffect(()=>{if(!t||u.current)return;const p=localStorage.getItem("orbit-referral-hidden-at");if(p){const m=Date.now()-Number(p),g=10080*60*1e3;if(m<g)return}u.current=!0,e.getChecklist().then(m=>{if(!m.first_inbox_review)return;const g=m.account_created&&m.extension_installed&&m.first_capture&&m.first_inbox_review&&m.first_study,b=localStorage.getItem("orbit-checklist-minimized")==="1";!g&&!b||o(!0)}).catch(()=>{})},[e,t]);async function d(p){if(!l){c(!0);try{await e.submitReferral(p)}catch(m){ae(m,{context:"referral_submit"}),c(!1);return}localStorage.setItem("orbit-referral-hidden-at",Xu),s(!0),setTimeout(()=>o(!1),1500)}}async function h(){if(!l){c(!0);try{(await e.dismissReferral()).should_hide?localStorage.setItem("orbit-referral-hidden-at",Xu):localStorage.setItem("orbit-referral-hidden-at",String(Date.now()))}catch{}o(!1)}}return r?a.jsxs("div",{className:"hidden sm:block fixed bottom-6 left-6 z-40 w-72 rounded-2xl border border-[var(--border-default)] bg-[var(--bg-surface)] shadow-2xl",children:[a.jsxs("div",{className:"flex items-start justify-between px-4 pt-4",children:[a.jsx("p",{className:"text-[0.88rem] font-semibold text-[var(--text-primary)]",children:n(i?"thank_you":"question")}),!i&&a.jsx("button",{type:"button",onClick:()=>{h()},disabled:l,className:"ml-2 flex h-10 w-10 shrink-0 items-center justify-center rounded text-[var(--text-muted)] hover:text-[var(--text-primary)]","aria-label":n("close_label"),children:a.jsx(Xn,{size:14})})]}),i?a.jsx("p",{className:"px-4 pb-4 pt-1 text-[0.82rem] text-[var(--text-muted)]",children:n("thank_you_body")}):a.jsx("ul",{className:"px-3 py-2",children:x7.map((p,m)=>a.jsx("li",{children:a.jsx("button",{type:"button",onClick:()=>{d(v7[m])},disabled:l,className:"w-full rounded-lg px-3 py-2.5 text-left text-[0.82rem] text-[var(--text-secondary)] hover:bg-[var(--bg-elevated)] hover:text-[var(--text-primary)]",children:n(p)})},p))})]}):null}function Gl({size:e=80,className:t}){return a.jsxs("div",{className:`orbit-loader${t?` ${t}`:""}`,style:{"--loader-size":`${e}px`},role:"status","aria-label":"Loading",children:[a.jsx("div",{className:"orbit-loader__ring"}),a.jsx("div",{className:"orbit-loader__orbit",children:a.jsx("div",{className:"orbit-loader__blob"})})]})}
51function Yu({detail:e,view:t,status:n,onSubmit:r,onClose:o}){const i=se("Console.error_report"),[s,l]=f.useState(""),c=f.useRef(null),u=f.useRef(null),d=e!==null&&t!==null;if(f.useEffect(()=>{if(n!=="success")return;const m=setTimeout(()=>{o(),l("")},2e3);return()=>clearTimeout(m)},[n,o]),f.useEffect(()=>{d||l("")},[d]),f.useEffect(()=>{d&&n==="idle"&&c.current?.focus()},[d,n]),f.useEffect(()=>{function m(g){g.key==="Escape"&&n!=="submitting"&&o()}return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[n,o]),f.useEffect(()=>{if(!d)return;const m=u.current;if(!m)return;const g=m.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),b=g[0],v=g[g.length-1];function x(E){E.key==="Tab"&&(E.shiftKey?document.activeElement===b&&(E.preventDefault(),v.focus()):document.activeElement===v&&(E.preventDefault(),b.focus()))}return m.addEventListener("keydown",x),()=>m.removeEventListener("keydown",x)},[d]),!d)return null;const h=e.status!==null?`http_${e.status}`:"network_error";function p(){!e||!t||n==="submitting"||r(e,t,s)}return a.jsxs("div",{className:"fixed inset-0 z-50 flex items-end justify-center pb-6 sm:items-center",role:"dialog","aria-modal":"true","aria-label":i("title"),children:[a.jsx("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-sm",onClick:n!=="submitting"?o:void 0,"aria-hidden":"true"}),a.jsx("div",{ref:u,className:"relative z-10 w-full max-w-sm rounded-2xl border border-(--line-strong) bg-(--bg-elevated) p-5 shadow-2xl",children:n==="success"?a.jsxs("div",{className:"flex flex-col items-center gap-3 py-4 text-center",children:[a.jsx("svg",{width:"24",height:"24",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",className:"text-(--state-success)",children:a.jsx("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55530 4.54530 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor"})}),a.jsx("p",{className:"text-sm font-semibold text-(--fg-strong)",children:i("thank_you")}),a.jsx("p",{className:"text-[0.82rem] text-(--fg-muted)",children:i("success_message")})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mb-4",children:[a.jsx("p",{className:"mb-2 text-sm font-semibold text-(--fg-strong)",children:i("title")}),a.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-md bg-(--tint-danger) px-2 py-1",children:[a.jsx("svg",{width:"11",height:"11",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",className:"text-(--fg-danger)",children:a.jsx("path",{d:"M7.5 1.5C4.18629 1.5 1.5 4.18629 1.5 7.5C1.5 10.8137 4.18629 13.5 7.5 13.5C10.8137 13.5 13.5 10.8137 13.5 7.5C13.5 4.18629 10.8137 1.5 7.5 1.5ZM7.5 4C7.77614 4 8 4.22386 8 4.5V8C8 8.27614 7.77614 8.5 7.5 8.5C7.22386 8.5 7 8.27614 7 8V4.5C7 4.22386 7.22386 4 7.5 4ZM7.5 10C7.22386 10 7 10.2239 7 10.5C7 10.7761 7.22386 11 7.5 11C7.77614 11 8 10.7761 8 10.5C8 10.2239 7.77614 10 7.5 10Z",fill:"currentColor"})}),a.jsxs("code",{className:"text-[0.75rem] text-(--fg-danger)",children:[h," · ",e.method," ",e.path]})]})]}),a.jsxs("div",{className:"mb-4",children:[a.jsxs("label",{htmlFor:"error-report-memo",className:"mb-1.5 block text-[0.78rem] text-(--fg-muted)",children:[i("memo")," ",a.jsxs("span",{className:"text-(--fg-subtle)",children:["(",i("optional"),")"]})]}),a.jsx("textarea",{id:"error-report-memo",ref:c,value:s,onChange:m=>l(m.target.value),placeholder:i("memo_placeholder"),rows:3,style:{resize:"none"},className:"w-full rounded-lg border border-(--line-strong) bg-(--bg-elevated) px-3 py-2 text-[0.82rem] text-(--fg-strong) placeholder:text-(--fg-muted) focus:outline-none focus:ring-1 focus:ring-(--brand-teal)"})]}),n==="error"&&a.jsx("p",{className:"mb-3 text-[0.78rem] text-(--fg-danger)",children:i("retry_later")}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",onClick:p,disabled:n==="submitting",className:Te("flex-1 rounded-lg bg-(--accent-primary) px-4 py-2 text-[0.82rem] font-semibold text-(--primary-foreground) transition-opacity",n==="submitting"?"opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--fg-strong) focus-visible:ring-offset-2 focus-visible:ring-offset-(--bg-elevated)":"hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--fg-strong) focus-visible:ring-offset-2 focus-visible:ring-offset-(--bg-elevated)"),children:i(n==="submitting"?"submitting":"report")}),a.jsx("button",{type:"button",onClick:o,disabled:n==="submitting",className:"rounded-lg border border-(--line-strong) px-4 py-2 text-[0.82rem] text-(--fg-muted) transition-opacity hover:opacity-80 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--brand-teal)",children:i("cancel")})]})]})})]})}function w7(){const e=se("Console.shell");return f.useMemo(()=>[{href:"/console",label:e("title_orbit")},{href:"/console/vocabulary",label:e("title_vocabulary")}
51,{href:"/console/inbox",label:e("title_inbox")},{href:"/console/review",label:e("title_review")},{href:"/console/trash",label:e("title_trash")},{href:"/console/faq",label:e("title_faq")}],[e])}function _7(e){const t=se("Console.shell");return e==="/console"||e==="/console/"||e.startsWith("/console/orbit")?t("title_orbit"):e.startsWith("/console/vocabulary")?t("title_vocabulary"):e.startsWith("/console/inbox")?t("title_inbox"):e.startsWith("/console/review")?t("title_review"):e.startsWith("/console/trash")?t("title_trash"):e.startsWith("/console/faq")?t("title_faq"):e.startsWith("/console/settings")?t("title_settings"):t("title_default")}function C7(){const e=Ja(),{setOpenMobile:t}=oo();return f.useEffect(()=>{t(!1)},[e,t]),null}function S7({children:e}){const{apiClient:t,isReady:n,userEmail:r,userPhotoUrl:o,handleSignOut:i,pendingCount:s,headerActions:l,isEmbeddedApp:c,reportTarget:u,reportStatus:d,handleReportClose:h,handleReportSubmit:p,theme:m,setThemeMode:g}=Tn(),b={system:"dark",dark:"light",light:"system"},v=m==="dark"?gm:m==="light"?bm:mm,x=Ja(),E=_7(x),y=w7(),k=f.useCallback(()=>{i()},[i]),I=f.useRef(null),C=f.useRef(0),A=se("Console.settings"),T=A(m==="system"?"theme_system":m==="light"?"theme_light":"theme_dark"),L=f.useCallback(D=>{cancelAnimationFrame(C.current),C.current=requestAnimationFrame(()=>{const S=I.current;if(!S)return;const j=S.closest(".console-shell");if(!j)return;const P=j.getBoundingClientRect(),M=(D.clientX-P.left)/P.width*100,_=(D.clientY-P.top)/P.height*100;j.style.setProperty("--mouse-x",`${M.toFixed(1)}%`),j.style.setProperty("--mouse-y",`${_.toFixed(1)}%`)})},[]);return f.useEffect(()=>{if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const S=I.current;if(S)return S.addEventListener("mousemove",L,{passive:!0}),()=>{S.removeEventListener("mousemove",L),cancelAnimationFrame(C.current)}},[L]),c?a.jsxs("div",{className:"console-shell console-shell--embed h-svh overflow-hidden bg-(--bg-page)",children:[a.jsx("div",{ref:I,className:"flex min-h-0 h-full flex-1 flex-col overflow-hidden",children:e}),a.jsx(Yu,{detail:u?.detail??null,view:u?.view??null,status:d,onSubmit:p,onClose:h})]}):a.jsxs(Wv,{className:"console-shell h-svh",children:[a.jsx(C7,{}),a.jsx(A5,{activePathname:x,pendingCount:s,navItems:y,userEmail:r,userPhotoUrl:o,onSignOut:k}),a.jsxs(M3,{className:"min-w-0 overflow-hidden bg-transparent",children:[a.jsx(Bg,{}),a.jsx(y7,{apiClient:t,isReady:n}),a.jsxs("header",{className:"console-shell-header relative z-10 flex h-16 shrink-0 items-center gap-3 border-b border-(--line-soft) px-4 sm:px-6 lg:px-8",children:[a.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[a.jsx(L3,{className:"min-h-11 min-w-11 rounded-xl border-0! bg-transparent! text-(--fg-strong) shadow-none hover:bg-transparent!"}),a.jsx("div",{className:"flex items-center min-w-0",children:a.jsx("div",{className:"min-w-0",children:a.jsx("span",{className:"block truncate text-[1.28rem] text-(--fg-strong)",style:{fontFamily:"var(--font-display-web)"},children:E})})})]}),a.jsxs("div",{className:"ml-auto flex shrink-0 items-center gap-2",children:[!c&&a.jsx("button",{type:"button",onClick:()=>g(b[m]),"aria-label":`${A("theme_label")}: ${T}`,className:"flex h-[44px] w-[44px] items-center justify-center rounded-full bg-transparent text-(--fg-muted) transition-colors duration-150 hover:text-(--fg-body) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--brand-gold) focus-visible:ring-offset-2 focus-visible:ring-offset-(--bg-page)",children:a.jsx(v,{size:16,strokeWidth:1.8})}),l&&a.jsx("div",{className:"flex shrink-0 items-center gap-2",children:l})]})]}),a.jsx("div",{ref:I,className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:e})]}),a.jsx(Yu,{detail:u?.detail??null,view:u?.view??null,status:d,onSubmit:p,onClose:h})]})}function E7({children:e}){const{authUser:t}=Tn();return t==="loading"||t===null?a.jsx("div",{className:"console-shell fixed inset-0 z-50 flex items-center justify-center bg-transparent",children:a.jsx(Gl,{size:80})}):a.jsx(S7,{children:e})}function k7({children:e}){return a.jsx(c7,{children:a.jsx(E7,{children:e})})}function I7({error:e,reset:t}){const r=ro()?.locale??"en",o=se("Console.error_boundary");return f.useEffect(()=>{ae(e,{context:"console_error_boundary",extras:{digest:e.digest}})},[e]),a.jsxs("div",{role:"alert",style:{display:"flex",flex:1,flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"12px",padding:"48px 24px",textAlign:"center"},children:[a.jsx("p",{style:{margin:0,fontSize:"11px",letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--accent-cold)"},children:o("label")}),a.jsx("h2",{style:{margin:0,fontSize:"18px",fontWeight:500,color:"var(--ink-0)"},children:o("title")}),a.jsx("p",{style:{margin:0,fontSize:"13px",color:"var(--ink-muted)",maxWidth:"280px"},children:o("body")}),e.digest&&a.jsx("p",{style:{margin:0,fontFamily:"monospace",fontSize:"11px",color:"var(--ink-subtle)"},children:e.digest}),a.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[a.jsx("button",{type:"button",onClick:t,style:{padding:"8px 16px",borderRadius:"8px",border:"1px solid var(--line-strong)",background:"none",color:"var(--ink-muted)",fontSize:"13px",cursor:"pointer",fontFamily:"inherit"},children:o("retry")}),a.jsx(Qe,{href:`/${r}/console`,style:{display:"inline-block",padding:"8px 16px",borderRadius:"8px",border:"1px solid var(--line-strong)",color:"var(--ink-muted)",fontSize:"13px",textDecoration:"none"},children:o("home")})]})]})}const N7={"capture.web.vocabulary":"/faq/web-vocabulary.png","capture.web.add-word":"/faq/web-add-word.png","capture.chrome.selection":"/faq/chrome-selection.png","capture.chrome.overlay":"/faq/chrome-selection.png","capture.ios.share":"/faq/ios-share.jpg","capture.android.share":"/faq/android-share.jpg","capture.inbox.review":"/faq/inbox-review.png"};function T7(e){return e?N7[e]??null:null}const Ju=["getting_started","capture","inbox","troubleshooting"],A7=["web_console","chrome_extension","ios","android"],Zu={en:{filterLabel:"Filter FAQ topics",allTopics:"All topics",allPlatforms:"All platforms",noResults:"No FAQ matches these filters.",categories:{getting_started:"Getting started",capture:"Collecting words",inbox:"Inbox & review",troubleshooting:"Troubleshooting"},platforms:{common:"General",web_console:"Web",chrome_extension:"Chrome",ios:"iPhone / iPad",android:"Android"}},ko:{filterLabel:"FAQ 주제 필터",allTopics:"전체 주제",allPlatforms:"전체 플랫폼",noResults:"선택한 조건에 맞는 FAQ가 없습니다.",categories:{getting_started:"시작하기",capture:"단어 수집",inbox:"Inbox와 복습",troubleshooting:"문제 해결"},platforms:{common:"공통",web_console:"웹",chrome_extension:"Chrome",ios:"iPhone / iPad",android:"Android"}},ja:{filterLabel:"FAQのトピックを絞り込む",allTopics:"すべてのトピック",allPlatforms:"すべてのプラットフォーム",noResults:"条件に一致するFAQはありません。",categories:{getting_started:"はじめに",capture:"単語を保存する",inbox:"Inboxと復習",troubleshooting:"トラブルシューティング"},platforms:{common:"共通",web_console:"Web",chrome_extension:"Chrome",ios:"iPhone / iPad",android:"Android"}},"zh-Hans":{filterLabel:"筛选 FAQ 主题",allTopics:"全部主题",allPlatforms:"全部平台",noResults:"没有符合这些条件的 FAQ。",categories:{getting_started:"开始使用",capture:"收集单词",inbox:"Inbox 与复习",troubleshooting:"问题排查"},platforms:{common:"通用",web_console:"Web",chrome_extension:"Chrome",ios:"iPhone / iPad",android:"Android"}}};function P7(e){return e==="ko"||e==="ja"||e==="zh-Hans"?Zu[e]:Zu.en}function $g({entries:e,locale:t}){const n=P7(t),[r,o]=f.useState("all"),[i,s]=f.useState("all"),l=e.filter(u=>{const d=u.category??"getting_started",h=u.platform??"common";return(r==="all"||d===r)&&(i==="all"||h==="common"||h===i)}),c=Ju.map(u=>({category:u,entries:l.filter(d=>(d.category??"getting_started")===u)})).filter(u=>u.entries.length>0);return a.jsxs("div",{className:"flex flex-col gap-8",children:[a.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between","aria-label":n.filterLabel,children:[a.jsxs("div",{className:"flex flex-wrap gap-2 sm:min-w-0 sm:flex-1",children:[a.jsx("button",{type:"button","aria-pressed":r==="all",onClick:()=>o("all"),className:["rounded-full border px-3.5 py-2 text-[0.78rem] font-semibold transition-colors",r==="all"?"border-[var(--text-primary)] bg-[var(--text-primary)] text-[var(--bg-canvas)]":"border-[var(--border-subtle)] bg-[var(--bg-surface)] text-[var(--text-secondary)] hover:border-[var(--text-muted)]"].join(" "),children:n.allTopics}),Ju.map(u=>a.jsx("button",{type:"button","aria-pressed":r===u,onClick:()=>o(u),className:["rounded-full border px-3.5 py-2 text-[0.78rem] font-semibold transition-colors",r===u?"border-[var(--text-primary)] bg-[var(--text-primary)] text-[var(--bg-canvas)]":"border-[var(--border-subtle)] bg-[var(--bg-surface)] text-[var(--text-secondary)] hover:border-[var(--text-muted)]"].join(" "),children:n.categories[u]},u))]}),a.jsxs(_l,{children:[a.jsx(Cl,{asChild:!0,children:a.jsxs("button",{type:"button","aria-label":n.allPlatforms,className:"inline-flex w-fit self-end items-center gap-2 rounded-full border border-[var(--border-subtle)] bg-[var(--bg-surface)] px-3.5 py-2 text-[0.78rem] font-semibold text-[var(--text-secondary)] outline-none transition-colors hover:border-[var(--text-muted)] focus-visible:border-[var(--text-muted)] sm:shrink-0 sm:self-auto",children:[i==="all"?n.allPlatforms:n.platforms[i],a.jsx(Sa,{size:15,"aria-hidden":"true"})]})}),a.jsxs(Zi,{align:"end",className:"min-w-44",children:[a.jsx(Fn,{className:i==="all"?"bg-[var(--hover-overlay)]":void 0,onSelect:()=>s("all"),children:n.allPlatforms}),A7.map(u=>a.jsx(Fn,{className:i===u?"bg-[var(--hover-overlay)]":void 0,onSelect:()=>s(u),children:n.platforms[u]},u))]})]})]}),c.length===0?a.jsx("p",{className:"m-0 rounded-[16px] border border-[var(--border-subtle)] bg-[var(--bg-surface)] px-6 py-5 text-[0.94rem] text-[var(--text-secondary)]",children:n.noResults}):c.map(u=>a.jsxs("section",{className:"flex flex-col gap-3","aria-labelledby":`faq-category-${u.category}`,children:[a.jsxs("div",{className:"flex items-end justify-between gap-4 px-1",children:[a.jsx("h2",{id:`faq-category-${u.category}`,className:"m-0 text-[1.35rem] font-semibold tracking-[-0.02em] text-[var(--text-primary)]",children:n.categories[u.category]}),a.jsx("span",{className:"text-[0.72rem] font-semibold tabular-nums text-[var(--text-muted)]",children:u.entries.length})]}),a.jsx("div",{className:"flex flex-col gap-3",children:u.entries.map(d=>a.jsxs("details",{id:d.slug,className:"faq-item rounded-[16px] border border-[var(--border-subtle)] bg-[
51color-mix(in_srgb,var(--bg-surface)_78%,transparent)] backdrop-blur-[10px]",onToggle:h=>{h.currentTarget.open&&it("faq_item_expanded",{slug:d.slug,locale:t})},children:[a.jsxs("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-4 px-6 py-5 marker:hidden",children:[a.jsxs("span",{className:"flex min-w-0 flex-col gap-2",children:[a.jsx("span",{className:"flex flex-wrap gap-1.5",children:a.jsx("span",{className:"w-fit rounded-full border border-[var(--border-subtle)] px-2 py-0.5 text-[0.64rem] font-semibold uppercase tracking-[0.08em] text-[var(--text-muted)]",children:n.platforms[d.platform??"common"]})}),a.jsx("span",{className:"text-[0.98rem] font-semibold leading-[1.45] text-[var(--text-primary)]",children:d.question})]}),a.jsx(Sa,{size:17,className:"faq-chevron shrink-0 text-[var(--text-muted)] transition-transform duration-200","aria-hidden":"true"})]}),a.jsxs("div",{className:"max-w-[72ch] px-6 pb-6 text-[0.94rem] leading-[1.74] text-[var(--text-secondary)] text-pretty",children:[d.answer.map(h=>a.jsx("p",{className:"m-0 mt-0 text-pretty [&+p]:mt-3",children:h},h)),d.steps&&d.steps.length>0&&a.jsx("ol",{className:"mt-4 list-decimal space-y-2 pl-5",children:d.steps.map(h=>{const p=T7(h.imageKey);return a.jsxs("li",{children:[a.jsx("span",{children:h.text}),p?a.jsx("img",{src:p,alt:h.text,loading:"lazy",className:"mt-3 max-h-[34rem] w-full rounded-[12px] border border-[var(--border-subtle)] bg-[var(--bg-canvas)] object-contain object-top"}):null]},h.text)})})]})]},d.slug))})]},u.category))]})}function R7(e){return e==="how-review-works"?"inbox":e==="site-scoped-capture"?"capture":"getting_started"}function j7(e){return e==="android-availability"?"android":e==="ios-availability"?"ios":"common"}function O7(e){return n5(e).map(t=>({...t,steps:t.steps??[],category:t.category??R7(t.slug),platform:t.platform??j7(t.slug)}))}function L7(){const{locale:e}=ro(),t=se("Console.faq"),n=f.useMemo(()=>e||"en",[e]),r=f.useMemo(()=>O7(n),[n]);return a.jsx("main",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto px-4 py-8 sm:px-6 lg:px-8",children:a.jsxs("div",{className:"mx-auto w-full max-w-3xl space-y-8",children:[a.jsxs("header",{children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.16em] text-(--fg-muted)",children:t("kicker")}),a.jsx("h1",{className:"m-0 text-3xl font-semibold tracking-tight text-(--fg-strong)",children:t("title")})]}),a.jsx("p",{className:"mt-4 mb-0 max-w-2xl text-sm leading-6 text-(--fg-muted)",children:t("description")})]}),r.length===0&&a.jsx("p",{className:"text-sm text-(--fg-muted)",children:t("empty")}),r.length>0&&a.jsx($g,{entries:r,locale:n})]})})}function M7(e){return e.find(t=>t.parent_capture_id==null&&t.item_subtype!=="sentence"&&t.language_guess!=null&&t.language_guess!=="unknown"&&!t.definition?.trim()&&(!t.senses||t.senses.length===0)&&(t.enrich_status==null||t.enrich_status==="pending"||t.enrich_status==="delayed"))}function D7(e,t){if(!t||e.some(r=>r.id===t.item.id))return e;const n=[...e];return n.splice(Math.min(t.index,n.length),0,t.item),n}function F7(e,t){return t<=1||e>=t?1:e+1}function U7(e,t){return t<=0?1:Math.min(Math.max(e,1),t)}let z7=0;function B7(e,t,n,r,o){const[i,s]=f.useState([]),[l,c]=f.useState("idle"),[u,d]=f.useState(null),[h,p]=f.useState(1),[m,g]=f.useState(new Set),[b,v]=f.useState([]),[x,E]=f.useState(null),[y,k]=f.useState(!1),[I,C]=f.useState(null),[A,T]=f.useState("idle"),[L,D]=f.useState(null),[S,j]=f.useState("idle"),P=f.useRef(new Set),M=f.useRef(new Map),_=f.useRef(null),R=f.useRef(!0),O=f.useRef(new Set),U=f.useRef(new Set),$=f.useRef(!1),w=f.useRef(!1),te=f.useRef(o);te.current=o;function K(F){if(P.current.has(F))return!1;const B=new Set(P.current);return B.add(F),P.current=B,g(B),!0}function N(F){const B=new Set(P.current);B.delete(F),P.current=B,g(B)}const fe=f.useCallback(F=>{v(q=>q.filter(Z=>Z.id!==F));const B=M.current.get(F);B&&(clearTimeout(B),M.current.delete(F))},[]),re=f.useCallback((F,B)=>{const q=String(++z7);v(ue=>[...ue,{id:q,type:F,message:B}]);const Z=setTimeout(()=>fe(q),3500);M.current.set(q,Z)},[fe]);f.useEffect(()=>(R.current=!0,()=>{R.current=!1;for(const F of M.current.values())clearTimeout(F);_.current&&clearTimeout(_.current)}),[]);const Y=f.useCallback(async function F(B){const q=B?.cursor??"0",Z=!B?.append&&q==="0";if(Z&&_.current&&(clearTimeout(_.current),_.current=null),Z&&w.current)return!1;Z&&(w.current=!0),B?.silent||c("loading");try{const ue=await e.captureInbox({limit:20,cursor:q});if(Z){const ne=new Set(ue.items.map(je=>je.id));for(const je of U.current)ne.has(je)||U.current.delete(je)}const ge=ue.items.filter(ne=>!U.current.has(ne.id)),Ce=!B?.append&&q==="0"&&!$.current,Pe=Ce?M7(ge):void 0;Ce&&($.current=!0);const z=new Set(ge.map(ne=>ne.id));for(const ne of O.current)z.has(ne)||O.current.delete(ne);const V=ue.items.filter(ne=>!O.current.has(ne.id)),ie=ue.items.filter(ne=>O.current.has(ne.id)),he=[...V,...ie].filter(ne=>!U.current.has(ne.id)).map(ne=>ne.id===Pe?.id?{...ne,enrich_status:"pending"}:ne);return f.startTransition(()=>{s(ne=>{if(!B?.append)return he;const je=new Set(ne.map(qe=>qe.id)),Fe=[...ne];for(const qe of he)je.has(qe.id)||Fe.push(qe);return Fe}
51),E(ue.nextCursor),c("ready"),d(null)}),Ce&&e.enrichNextInbox().then(ne=>{if(ne.status==="no_op"){Pe&&s(je=>je.map(Fe=>Fe.id===Pe.id?{...Fe,enrich_status:Pe.enrich_status}:Fe));return}s(je=>je.map(Fe=>Fe.id===ne.captureId?{...Fe,enrich_status:"pending"}:Fe.id===Pe?.id?{...Fe,enrich_status:Pe.enrich_status}:Fe)),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{_.current=null,!(!R.current||document.hidden)&&F({silent:!0})},4e3)}).catch(async ne=>{if(Pe&&s(Fe=>Fe.map(qe=>qe.id===Pe.id?{...qe,enrich_status:Pe.enrich_status}:qe)),await Xe(ne,{handle401:t,handle403:n}))return;if(ae(ne,{context:"inbox_enrich_next",route:"/v1/capture/inbox/enrich-next",method:"POST"}),ne instanceof Ut&&ne.status===429){re("error",te.current?.toastAnalysisLimit??"Today's AI analysis limit reached.");return}const je=jt(ne,{method:"POST",path:"/v1/capture/inbox/enrich-next"});re("error",te.current?.toastActionFailed(qt(je))??`Analysis failed (${qt(je)}).`)}),!0}catch(ue){return await Xe(ue,{handle401:t,handle403:n})||(ae(ue,{context:"inbox_load",route:"/v1/capture/inbox",method:"GET"}),c("error"),d(jt(ue,{method:"GET",path:"/v1/capture/inbox"}))),!1}finally{Z&&(w.current=!1)}},[re,e,t,n]);f.useEffect(()=>{r&&Y()},[r,Y]),f.useEffect(()=>{p(F=>U7(F,i.length))},[i.length]),f.useEffect(()=>{if(!r)return;const F=new BroadcastChannel("orbit-inbox");return F.onmessage=()=>{document.hidden||Y({silent:!0})},()=>F.close()},[r,Y]),f.useEffect(()=>{if(!r)return;function F(){document.hidden||Y({silent:!0})}return document.addEventListener("visibilitychange",F),()=>document.removeEventListener("visibilitychange",F)},[r,Y]);async function pe(F,B,q,Z,ue,ge){if(K(F))if(B==="approve"){const Ce=i.findIndex(z=>z.id===F),Pe=Ce===-1?null:{item:i[Ce],index:Ce};U.current.add(F),s(z=>z.filter(V=>V.id!==F));try{await e.approveCapture(F,ue?{mergeWithExisting:!0}:ge?{selectedChildren:ge}:void 0),re("success",o?.toastApproved??"Capture approved and synced.")}catch(z){if(U.current.delete(F),s(ie=>D7(ie,Pe)),await Xe(z,{handle401:t,handle403:n}))return;ae(z,{context:"inbox_approve",route:"/v1/capture/:id/approve",method:"POST",extras:{captureId:F}});const V=jt(z,{method:"POST",path:`/v1/capture/${F}/approve`});re("error",o?.toastActionFailed(qt(V))??`Action failed (${qt(V)}).`)}finally{N(F)}}else try{await e.rejectCapture(F),s(Ce=>Ce.filter(Pe=>Pe.id!==F))}catch(Ce){if(await Xe(Ce,{handle401:t,handle403:n}))return;ae(Ce,{context:"inbox_reject",route:"/v1/capture/:id/reject",method:"POST",extras:{captureId:F}});const Pe=jt(Ce,{method:"POST",path:`/v1/capture/${F}/reject`});re("error",o?.toastActionFailed(qt(Pe))??`Action failed (${qt(Pe)}).`)}finally{N(F)}}function ye(F){O.current.add(F);const B=i.length;i.findIndex(q=>q.id===F)===-1||B<=1||(p(q=>F7(q,B)),s(q=>{const Z=q.findIndex(ge=>ge.id===F);if(Z===-1||q.length<=1)return q;const ue=q[Z];return[...q.slice(0,Z),...q.slice(Z+1),ue]}))}function X(F){C(F)}function Re(){C(null)}async function Ie(F,B){T("saving");try{await e.updateCaptureItem(F,B),s(q=>q.map(Z=>Z.id===F?{...Z,raw_text:B.raw_text??Z.raw_text,language_guess:B.language_guess!==void 0?B.language_guess:Z.language_guess,definition:"definition"in B?B.definition??null:Z.definition}:Z)),C(null)}catch(q){if(await Xe(q,{handle401:t,handle403:n}))return;ae(q,{context:"inbox_edit_save",route:"/v1/capture/:id",method:"PATCH",extras:{captureId:F}}),re("error",o?.toastEditFailed??"Failed to save edits.")}finally{T("idle")}}function oe(F){D(F),C(null)}function xe(){D(null)}async function G(F,B){const q=i.find(ue=>ue.id===F)?.selected_sense??null;if(q===B||!K(F))return;const Z=q;s(ue=>ue.map(ge=>ge.id===F?{...ge,selected_sense:B}:ge));try{await e.updateCaptureItem(F,{selected_sense:B})}catch(ue){if(s(ge=>ge.map(Ce=>Ce.id===F?{...Ce,selected_sense:Z}:Ce)),await Xe(ue,{handle401:t,handle403:n}))return;ae(ue,{context:"inbox_sense_select",route:"/v1/capture/:id",method:"PATCH",extras:{captureId:F}})}finally{N(F)}}async function J(F){if(K(F)){s(B=>B.map(q=>q.id===F?{...q,enrich_status:"pending"}:q));try{await e.retryEnrich(F),_.current&&clearTimeout(_.current),_.current=setTimeout(()=>{_.current=null,!(!R.current||document.hidden)&&Y({silent:!0})},4e3)}
51catch(B){if(await Xe(B,{handle401:t,handle403:n}))return;if(s(q=>q.map(Z=>Z.id===F?{...Z,enrich_status:"failed"}:Z)),ae(B,{context:"inbox_retry_enrich",route:"/v1/capture/:id/enrich",method:"POST",extras:{captureId:F}}),B.status===422)re("error",o?.toastEnrichLanguageUnknown??"Set the word's language first, then retry.");else{const q=jt(B,{method:"POST",path:`/v1/capture/${F}/enrich`});re("error",o?.toastActionFailed(qt(q))??`Retry failed (${qt(q)}).`)}}finally{N(F)}}}async function Ne(F,B){if(S!=="saving"){j("saving");try{const q=crypto.randomUUID(),Z=await e.captureBatch([{text:F,source:"copy",clientId:q}]);if(D(null),Z.rejected>0){ae(new Error("capture_batch_rejected"),{context:"inbox_split_save",route:"/v1/capture/batch",method:"POST",extras:{rejectedCount:Z.rejected,reason:Z.results.find(ge=>ge.status==="rejected")?.reason??null}}),re("error",o?.toastCaptureRejected??"The word wasn't saved.");return}Z.results.find(ge=>ge.clientId===q)?.outcome==="new_inbox"&&B&&B!=="unknown"&&await e.updateCaptureItem(q,{language_guess:B}),await Y({silent:!0})}catch(q){if(await Xe(q,{handle401:t,handle403:n}))return;const Z=q;if(Z.status===422&&Z.responseBody?.includes('"inbox_full"')){re("error",o?.toastInboxFull??"Your Inbox has 30 items. Review some before adding more."),D(null);return}ae(q,{context:"inbox_split_save",route:"/v1/capture/batch",method:"POST"}),re("error",o?.toastSplitFailed??"Split failed."),D(null)}finally{j("idle")}}}async function H(){if(!(!x||y||l==="loading")){k(!0);try{await Y({silent:!0,append:!0,cursor:x})}finally{k(!1)}}}return{inbox:i,currentPosition:h,inboxStatus:l,inboxError:u,actionItems:m,toasts:b,dismissToast:fe,nextCursor:x,isLoadingMore:y,loadInbox:Y,handleInboxAction:pe,handleSkip:ye,handleLoadMore:H,editingId:I,editState:A,handleEditStart:X,handleEditCancel:Re,handleEditSave:Ie,splittingId:L,splitState:S,handleSplitStart:oe,handleSplitCancel:xe,handleSplitSave:Ne,handleSenseSelect:G,handleRetryEnrich:J}}function Qu(e){return e.trim().replace(/^[\s"“”]+|[\s"“”]+$/g,"")}function Hg(e){const t=e.raw_text.trim(),n=e.normalized_text.trim(),r=e.item_type==="phrase"&&e.item_subtype==="sentence",o=r?t||n:n||t,s=Qu(e.context??"")||(!r&&t!==o&&t.length>o.length+4?Qu(t):"");return{text:o,context:s,reading:r?"":e.reading?.trim()??""}}function Co(e){const t=e.senses??[],n=e.selected_sense??0,r=t.length===0?void 0:n>=0&&n<t.length?t[n]:t[0],o=e.surface.trim(),i=e.lemma.trim(),s=e.context?.trim()??"",l=i.length>0&&o.includes(i)&&Array.from(o).length>=Array.from(i).length+8&&/[.!?。!?]/.test(o);return{surface:i.length>0&&i!==o&&(o===s||l)?i:o,pos:r?.pos.trim()||e.pos,definition:r?.definition.trim()||e.definition?.trim()||"",example:r?.example?.trim()??"",reading:e.reading?.trim()??"",context:s}}function So({detail:e,onRetry:t,onReport:n,reported:r,className:o}){const i=se("Console.error_report"),s=e.status!==null?`http_${e.status}`:"network_error";return a.jsxs("div",{className:Te("flex flex-col items-center justify-center gap-3 rounded-xl py-10 text-center",o),role:"alert",children:[a.jsx("svg",{width:"20",height:"20",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",className:"text-(--fg-danger) opacity-60",children:a.jsx("path",{d:"M7.5 1.5C4.18629 1.5 1.5 4.18629 1.5 7.5C1.5 10.8137 4.18629 13.5 7.5 13.5C10.8137 13.5 13.5 10.8137 13.5 7.5C13.5 4.18629 10.8137 1.5 7.5 1.5ZM7.5 4C7.77614 4 8 4.22386 8 4.5V8C8 8.27614 7.77614 8.5 7.5 8.5C7.22386 8.5 7 8.27614 7 8V4.5C7 4.22386 7.22386 4 7.5 4ZM7.5 10C7.22386 10 7 10.2239 7 10.5C7 10.7761 7.22386 11 7.5 11C7.77614 11 8 10.7761 8 10.5C8 10.2239 7.77614 10 7.5 10Z",fill:"currentColor"})}),a.jsx("p",{className:"text-[0.82rem] text-(--fg-muted)",children:i("data_load_failed")}),a.jsxs("p",{className:"font-mono text-[0.75rem] text-(--fg-subtle)",children:[s," · ",e.method," ",e.path]}),a.jsxs("div",{className:"flex gap-2",children:[t&&a.jsx("button",{type:"button",onClick:t,className:"rounded-lg border border-(--line-strong) px-3 py-2.5 text-[0.78rem] text-(--fg-muted) transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--brand-teal)",children:i("retry")}),a.jsx("button",{type:"button",onClick:()=>n(e),disabled:r,className:Te("rounded-lg px-3 py-2.5 text-[0.78rem] transition-opacity",r?"cursor-default border border-(--line-strong) text-(--fg-subtle) o
51pacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--brand-teal)":"border border-(--line-danger) text-(--fg-danger) hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--brand-teal)"),children:i(r?"reported":"report")})]})]})}const $7=["en","ko","ja","zh","es","fr","de","unknown"];function H7(){return a.jsx("svg",{className:"inbox-edit-select-arrow",width:"11",height:"11",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor"})})}function Vg({value:e,onChange:t,disabled:n,ariaLabel:r}){return a.jsxs("div",{className:"inbox-edit-select-wrap",children:[a.jsx("select",{className:"inbox-edit-select",value:e,onChange:o=>t(o.target.value),disabled:n,"aria-label":r,children:$7.map(o=>a.jsx("option",{value:o,children:si(o)},o))}),a.jsx(H7,{})]})}function V7({senses:e,selectedSense:t,disabled:n,onSelect:r}){const o=se("Console.inbox");return e.length===0?null:a.jsx("div",{className:"inbox-senses",children:e.map((i,s)=>{const l=t!==null&&s===t,c=i.short!==i.definition;return a.jsxs("button",{type:"button",className:`inbox-sense-item${l?" inbox-sense-item--selected":""}`,onClick:()=>r(s),disabled:n,"aria-pressed":l,children:[a.jsx("span",{className:"inbox-sense-pos",children:i.pos}),c?a.jsxs("span",{className:"inbox-sense-content",children:[a.jsx("span",{className:"inbox-sense-short",children:i.short}),a.jsx("span",{className:"inbox-sense-def",children:i.definition})]}):a.jsx("span",{className:"inbox-sense-def",children:i.definition}),l&&a.jsx("span",{className:"inbox-sense-badge",children:o("selectedBadge")})]},`${i.pos}-${s}`)})})}function W7({item:e,editState:t,onSave:n,onCancel:r,onSplitStart:o}){const i=se("Console.inbox"),s=se("Console.common"),[l,c]=f.useState(Hg(e).text),[u,d]=f.useState(e.language_guess??"unknown"),[h,p]=f.useState(e.definition??"");function m(b){b.preventDefault(),n({raw_text:l,language_guess:u,definition:h.trim()||null})}const g=t==="saving";return a.jsxs("form",{onSubmit:m,className:"inbox-edit-form",children:[a.jsxs("div",{className:"inbox-edit-fields",children:[a.jsx("input",{type:"text",className:"inbox-edit-input",value:l,onChange:b=>c(b.target.value),disabled:g,"aria-label":"Edit raw text",autoFocus:!0}),a.jsx(Vg,{value:u,onChange:d,disabled:g,ariaLabel:"Edit language"})]}),a.jsx("textarea",{className:"inbox-edit-definition",value:h,onChange:b=>p(b.target.value),disabled:g,placeholder:i("definition_placeholder"),rows:2,"aria-label":"Edit definition"}),a.jsxs("div",{className:"inbox-edit-actions",children:[a.jsxs("div",{className:"inbox-edit-primary-actions",children:[a.jsx("button",{type:"submit",className:"inbox-edit-save",disabled:g,children:s(g?"saving":"save")}),a.jsx("button",{type:"button",className:"inbox-edit-cancel",onClick:r,disabled:g,children:s("cancel")})]}),a.jsx("button",{type:"button",className:"inbox-edit-split",onClick:o,disabled:g,title:i("split_hint"),children:i("split_word")})]})]})}function q7({item:e,splitState:t,onSave:n,onCancel:r}){const o=se("Console.inbox"),i=se("Console.common"),[s,l]=f.useState(e.raw_text),[c,u]=f.useState(e.language_guess??"unknown"),d=t==="saving";function h(p){p.preventDefault(),s.trim()&&n(s.trim(),c)}return a.jsxs("form",{onSubmit:h,className:"inbox-edit-form","aria-busy":d,children:[a.jsx("p",{className:"text-[0.72rem] text-(--fg-muted) mb-2",children:o("split_hint")}),a.jsxs("div",{className:"inbox-edit-fields",children:[a.jsx("input",{type:"text",className:"inbox-edit-input",value:s,onChange:p=>l(p.target.value),disabled:d,"aria-label":"Split text",autoFocus:!0}),a.jsx(Vg,{value:c,onChange:u,disabled:d,ariaLabel:"Split language"})]}),a.jsx("div",{className:"inbox-edit-actions",children:a.jsxs("div",{className:"inbox-edit-primary-actions",children:[a.jsx("button",{type:"submit",className:"inbox-edit-save",disabled:!s.trim()||d,children:i(d?"saving":"split")}
51),a.jsx("button",{type:"button",className:"inbox-edit-cancel",onClick:r,disabled:d,children:i("cancel")})]})})]})}function G7({inbox:e,currentPosition:t,inboxStatus:n,inboxError:r,actionItems:o,nextCursor:i,isLoadingMore:s,editingId:l,editState:c,splittingId:u,splitState:d,onAction:h,onMergeWithExisting:p,onLoadMore:m,onRetry:g,onEditStart:b,onEditCancel:v,onEditSave:x,onSplitStart:E,onSplitCancel:y,onSplitSave:k,onSkip:I,onSenseSelect:C,onRetryEnrich:A,onReport:T,reported:L,definitionLanguage:D="en"}){const S=se("Console.inbox"),j=se("Console.common");if(n==="loading"&&e.length===0)return a.jsxs("section",{"aria-label":"Capture inbox",className:"inbox-review",children:[a.jsx("div",{className:"inbox-review__header",children:a.jsx("div",{className:"inbox-review__skeleton-count"})}),a.jsx("div",{className:"inbox-review__card-stack",children:a.jsxs("article",{className:"inbox-review-card inbox-review-card--skeleton","aria-busy":"true",children:[a.jsx("div",{className:"inbox-review__skeleton-eyebrow"}),a.jsx("div",{className:"inbox-review__skeleton-word"}),a.jsx("div",{className:"inbox-review__skeleton-def"}),a.jsx("div",{className:"inbox-review__skeleton-divider"}),a.jsx("div",{className:"inbox-review__skeleton-actions"})]})})]});if(n==="error"&&r)return a.jsx("section",{"aria-label":"Capture inbox",className:"inbox-review",children:a.jsx(So,{detail:r,onRetry:g,onReport:T,reported:L})});if(e.length===0)return a.jsx("section",{"aria-label":"Capture inbox",className:"inbox-review",children:a.jsxs("div",{className:"console-empty-panel",children:[a.jsx("p",{className:"console-empty-title",children:S("empty_title")}),a.jsx("p",{className:"console-empty-copy",children:S("empty_copy")}),a.jsx("div",{className:"console-empty-actions",children:a.jsx(Ve,{href:"/setup",className:"primary-btn",children:S("empty_install_extension")})})]})});
51const P=e[0],M=Hg(P),_=o.has(P.id),R=P.sub_status==="needs_review"&&P.sense_resolution==="ambiguous"&&!!p;return a.jsxs("section",{"aria-label":"Capture inbox",className:"inbox-review",children:[a.jsx("h1",{className:"sr-only",children:"Inbox"}),a.jsxs("div",{className:"inbox-review__header",children:[a.jsx("span",{className:"inbox-review__remaining",children:S("progress",{current:String(t),total:`${e.length}${i?"+":""}`})}),i&&a.jsx("button",{type:"button",className:"inbox-review__load-more",onClick:m,disabled:s,children:j(s?"loading":"load_more")})]}),a.jsx("div",{className:"inbox-review__card-stack",children:u===P.id?a.jsxs("article",{className:"inbox-review-card","data-inbox-item-id":P.id,children:[a.jsx("p",{className:"inbox-review-card__eyebrow",children:S("split_word")}),a.jsx(q7,{item:P,splitState:d,onSave:(O,U)=>k(O,U),onCancel:y})]},`split-${P.id}`):l===P.id?a.jsxs("article",{className:"inbox-review-card","data-inbox-item-id":P.id,children:[a.jsx("p",{className:"inbox-review-card__eyebrow",children:j("edit")}),a.jsx(W7,{item:P,editState:c,onSave:O=>x(P.id,O),onCancel:v,onSplitStart:()=>E(P.id)})]},`edit-${P.id}`):a.jsxs("article",{className:"inbox-review-card","data-inbox-item-id":P.i
51d,"data-action-pending":_?"true":void 0,"aria-busy":_,children:[a.jsxs("div",{className:"inbox-review-card__term",children:[a.jsx("strong",{children:M.text}),M.reading&&a.jsx("span",{children:M.reading})]}),P.language_guess&&P.language_guess!=="unknown"&&a.jsx("div",{className:"inbox-review-card__eyebrow-row",children:a.jsx("span",{className:"inbox-review-card__lang",children:si(P.language_guess)})}),P.item_subtype==="sentence"?a.jsx("p",{className:"inbox-review-card__definition",children:S("no_senses")}):P.senses&&P.senses.length>0?a.jsxs(a.Fragment,{children:[a.jsx(V7,{senses:P.senses,selectedSense:P.selected_sense??null,disabled:_,onSelect:O=>C(P.id,O)}),P.selected_sense===null&&a.jsx("div",{className:"inbox-sense-prompt",children:S("selectSensePrompt")})]}):P.enrich_status==="pending"||P.enrich_status==="delayed"?a.jsx("p",{className:"inbox-review-card__definition inbox-review-card__definition--loading","aria-busy":"true",children:S("fetchingDefinition")}):P.enrich_status==="failed"?a.jsxs("div",{className:"inbox-review-card__enrich-failed",children:[a.jsx("p",{className:"inbox-review-card__definition inbox-review-card__definition--error",children:S("enrich_failed")}),a.jsx("button",{type:"button",className:"inbox-review-action inbox-review-action--tint",onClick:()=>A(P.id),disabled:_,children:_?"…":S("retry_definition")})]}):P.definition&&a.jsx("p",{className:"inbox-review-card__definition",children:P.definition}),a.jsxs("div",{className:"inbox-review-card__header-row",children:[_&&a.jsx("span",{className:"inbox-review-card__action-status",role:"status",children:j("loading")}),a.jsx("span",{className:Te("inbox-review-card__status-badge",P.sub_status==="needs_review"&&"inbox-review-card__status-badge--review"),children:P.sub_status==="needs_review"?S("review_needed"):S("pending_review")})]}),M.context&&a.jsx("p",{className:"inbox-review-card__context-sentence",children:M.context}),a.jsxs("div",{className:"inbox-review-card__meta",children:[a.jsx("span",{children:S("saved_from",{source:GS(P.source_type)})}),P.language_guess&&P.language_guess!=="unknown"&&P.language_guess!==D&&a.jsx("span",{children:S("lang_direction",{lang:si(P.language_guess),targetLang:si(D)})})]}),a.jsxs("div",{className:"inbox-review-card__actions",children:[a.jsx("button",{type:"button",className:"inbox-review-action inbox-review-action--quiet",onClick:()=>I(P.id),disabled:_,children:S("skip")}),a.jsx("button",{type:"button",className:"inbox-review-action inbox-review-action--tint",onClick:()=>b(P.id),disabled:_,children:S("edit")}),a.jsx("button",{type:"button",className:"inbox-review-action inbox-review-action--dim",onClick:()=>h(P.id,"reject"),disabled:_,children:S("reject")}),a.jsx("span",{className:"inbox-review-card__actions-spacer"}),R?a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"inbox-review-action inbox-review-action--solid",onClick:()=>h(P.id,"approve",P.raw_text,P.language_guess),disabled:_,children:_?"…":S("approve")}),a.jsx("button",{type:"button",className:"inbox-review-action inbox-review-action--merge",onClick:()=>p(P.id),disabled:_,title:S("merge_existing_title"),children:_?"…":j("merge")})]}):a.jsx("button",{type:"button",className:"inbox-review-action inbox-review-action--solid",onClick:()=>h(P.id,"approve",P.raw_text,P.language_guess,P.item_subtype==="sentence"?[]:void 0),disabled:_,children:_?"…":S("approve")})]})]},P.id)})]})}function K7({toast:e,onDismiss:t}){const[n,r]=f.useState(!1);return f.useEffect(()=>{const o=requestAnimationFrame(()=>r(!0));return()=>cancelAnimationFrame(o)},[]),a.jsxs("div",{role:"status","aria-live":"polite",className:Te("flex items-center gap-3 rounded-[12px] border px-4 py-3 text-[0.82rem] shadow-lg","transition-all duration-200 ease-out",n?"opacity-100 translate-y-0":"opacity-0 translate-y-2",e.type==="success"?"border-(--line-success) bg-(--tint-success) text-(--fg-success-on-tint)":"border-(--line-danger) bg-(--tint-danger) text-(--fg-danger-on-tint)"),children:[e.type==="success"?a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",className:"shrink-0",children:a.jsx("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55530 4.54530 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:"currentColor"})}):a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",className:"shrink-0",children:a.jsx("path",{d:"M7.5 1.5C4.18629 1.5 1.5 4.18629 1.5 7.5C1.5 10.8137 4.18629 13.5 7.5 13.5C10.8137 13.5 13.5 10.8137 13.5 7.5C13.5 4.18629 10.8137 1.5 7.5 1.5ZM7.5 4C7.77614 4 8 4.22386 8 4.5V8C8 8.27614 7.77614 8.5 7.5 8.5C7.22386 8.5 7 8.27614 7 8V4.5C7 4.22386 7.22386 4 7.5 4ZM7.5 10C7.22386 10 7 10.2239 7 10.5C7 10.7761 7.22386 11 7.5 11C7.77614 11 8 10.7761 8 10.5C8 10.2239 7.77614 10 7.5 10Z",fill:"currentColor"})}),a.jsx("span",{className:"flex-1",children:e.message}),a.jsx("button",{type:"button",className:"ml-1 shrink-0 opacity-60 hover:opacity-100 transition-opacity",onClick:()=>t(e.id),"aria-label":"Dismiss",children:a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"})})})]})}function Kl({toasts:e,onDismiss:t}){return e.length===0?null:a.jsx("div",{className:"fixed bottom-5 right-5 z-50 flex flex-col gap-2 w-72","aria-label":"Notifications",children:e.map(n=>a.jsx(K7,{toast:n,onDismiss:t},n.id))})}function X7(){const{apiClient:e,handle401:t,handle403:n,isReady:r,setPendingCount:o,handleReport:i,reportedViews:s,definitionLanguage:l}=Tn(),c=se("Console.inbox"),u=B7(e,t,n,r,{toastApproved:c("toast_approved"),toastActionFailed:d=>c("toast_action_failed",{detail:d}),toastEditFailed:c("toast_edit_failed"),toastSplitFailed:c("toast_split_failed"),toastCaptureRejected:c("toast_c
51apture_rejected"),toastInboxFull:c("toast_inbox_full"),toastEnrichLanguageUnknown:c("toast_enrich_language_unknown"),toastAnalysisLimit:c("suggestions_cap_exhausted")});return f.useEffect(()=>{o(u.inbox.length)},[u.inbox,o]),a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"console-view",children:a.jsx(G7,{inbox:u.inbox,currentPosition:u.currentPosition,inboxStatus:u.inboxStatus,inboxError:u.inboxError,actionItems:u.actionItems,nextCursor:u.nextCursor,isLoadingMore:u.isLoadingMore,editingId:u.editingId,editState:u.editState,splittingId:u.splittingId,splitState:u.splitState,onEditStart:u.handleEditStart,onEditCancel:u.handleEditCancel,onEditSave:(d,h)=>{u.handleEditSave(d,h)},onSplitStart:u.handleSplitStart,onSplitCancel:u.handleSplitCancel,onSplitSave:(d,h)=>{u.handleSplitSave(d,h)},onAction:(d,h,p,m,g)=>{u.handleInboxAction(d,h,p,m,void 0,g)},onMergeWithExisting:d=>{u.handleInboxAction(d,"approve",void 0,void 0,!0)},onSkip:u.handleSkip,onLoadMore:()=>{u.handleLoadMore()},onRetry:()=>{u.loadInbox()},onSenseSelect:(d,h)=>{u.handleSenseSelect(d,h)},onRetryEnrich:d=>{u.handleRetryEnrich(d)},onReport:d=>i(d,"inbox"),reported:s.has("inbox"),definitionLanguage:l})}),a.jsx(Kl,{toasts:u.toasts,onDismiss:u.dismissToast})]})}function Wg(e,t,n){const[r,o]=f.useState([]),[i,s]=f.useState("idle"),[l,c]=f.useState(null),[u,d]=f.useState(null),[h,p]=f.useState(!1),[m,g]=f.useState(""),[b,v]=f.useState("updated_desc"),x=f.useRef("updated_desc"),E=f.useRef(""),y=f.useRef(""),k=f.useRef(0),I=f.useRef(new Set);async function C(S){const j=S?.cursor??"0",P=S?.language??m.trim().toLowerCase(),M=S?.q?.trim()??"",_=S?.sort??b,R=JSON.stringify([j,P,M,_,!!S?.append]);if(I.current.has(R))return!1;I.current.add(R);const O=S?.append?k.current:++k.current;S?.silent||s("loading"),S?.append||(x.current=_,E.current=P,y.current=M);try{const U=await e.listVocab({cursor:j,limit:20,language:P||void 0,q:M||void 0,sort:_!=="updated_desc"?_:void 0});return O!==k.current?!1:(o($=>{if(!S?.append)return U.items;const w=new Set($.map(K=>K.id)),te=[...$];for(const K of U.items)w.has(K.id)||te.push(K);return te}),d(U.nextCursor),s("ready"),c(null),!0)}catch(U){return await Xe(U,{handle401:t,handle403:n})||O!==k.current||(ae(U,{context:"vocab_load",route:"/v1/vocab",method:"GET"}),s("error"),c(jt(U,{method:"GET",path:"/v1/vocab"}))),!1}finally{I.current.delete(R)}}async function A(S,j){try{const P=await e.updateVocab(S,j);o(M=>M.map(_=>_.id===S?P.item:_))}catch(P){if(await Xe(P,{handle401:t,handle403:n}))return;throw ae(P,{context:"vocab_update",route:"/v1/vocab/:id",method:"PUT",extras:{vocabItemId:S}}),P}}async function T(S){try{const j=await e.createVocab(S);return o(P=>[j.item,...P.filter(M=>M.id!==j.item.id)]),s("ready"),c(null),j.item}catch(j){throw await Xe(j,{handle401:t,handle403:n}),ae(j,{context:"vocab_create",route:"/v1/vocab",method:"POST"}),j}}function L(S){o(j=>j.filter(P=>P.id!==S))}async function D(){if(!(!u||h||i==="loading")){p(!0);try{await C({silent:!0,append:!0,cursor:u,sort:x.current,language:E.current,q:y.current||void 0})}finally{p(!1)}}}return{vocabItems:r,vocabStatus:i,vocabError:l,vocabCursor:u,vocabLoadingMore:h,vocabLanguage:m,setVocabLanguage:g,vocabSort:b,setVocabSort:v,loadVocab:C,handleLoadMoreVocab:D,createVocabItem:T,updateVocabItem:A,removeVocabItem:L}}const cn={dark:["#54d696","#59d8d0","#f59e0b","#8f9ab2","#6b7a8d"]},Y7=[{ringIndex:0,angle:.2,size:.09,color:cn.dark[0],orbitSpeed:.18},{ringIndex:0,angle:2.56,size:.1,color:cn.dark[0],orbitSpeed:.145},{ringIndex:1,angle:1.15,size:.1,color:cn.dark[1],orbitSpeed:.12},{ringIndex:1,angle:3.74,size:.09,color:cn.dark[1],orbitSpeed:.1},{ringIndex:2,angle:.94,size:.11,color:cn.dark[2],orbitSpeed:.082},{ringIndex:2,angle:4.18,size:.1,color:cn.dark[2],orbitSpeed:.07},{ringIndex:3,angle:2.08,size:.1,color:cn.dark[3],orbitSpeed:.06},{ringIndex:4,angle:5.14,size:.11,color:cn.dark[4],orbitSpeed:.052}];function J7(){if(typeof window>"u")return"dark";const e=document.documentElement.getAttribute("data-theme");return e==="light"||e==="dark"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
51k":"light"}function Z7(){const[e,t]=f.useState("dark");return f.useEffect(()=>{const n=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>t(J7()),o=new MutationObserver(r);return r(),o.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),n.addEventListener("change",r),()=>{o.disconnect(),n.removeEventListener("change",r)}},[]),e}const qg=8;function Q7(e){const t=2*Math.PI/e;return Array.from({length:e},(n,r)=>{const o=t*r+Math.sin(r*1.73)*t*.32,i=157+Math.sin(r*2.11)*12,s=127+Math.cos(r*1.37)*11,l=Math.cos(o)*i,c=Math.sin(o)*s;return{x:Number(l.toFixed(2)),y:Number(c.toFixed(2))}})}const e8=Q7(qg);function t8({pendingCount:e,inboxHref:t}){return e>0?a.jsx("g",{className:"orbit-word-field orbit-word-field--pending","aria-label":`${e} words pending in inbox`,children:e8.slice(0,Math.min(e,qg)).map((r,o)=>a.jsx("a",{href:t,className:"owf-chip",title:"Open Inbox","aria-label":"Open Inbox",children:a.jsx("g",{transform:`translate(${r.x} ${r.y})`,children:a.jsxs("g",{className:"owf-chip--pending",style:{opacity:.55+o*.04},children:[a.jsx("circle",{className:"owf-chip--pending-hit",r:22,fill:"transparent",pointerEvents:"all","aria-hidden":"true"}),a.jsx("circle",{r:10,fill:"currentColor",fillOpacity:.07,"aria-hidden":"true"}),a.jsx("circle",{"aria-hidden":"true",className:"owf-chip__dot",r:3,fill:"currentColor",fillOpacity:.85})]})})},`pending-${o}`))}):null}const or={english:"#4DA3FF",en:"#4DA3FF",korean:"#22C55E",ko:"#22C55E",japanese:"#FF6B6B",ja:"#FF6B6B",chinese:"#F59E0B",zh:"#F59E0B",spanish:"#F97316",es:"#F97316",french:"#8B5CF6",fr:"#8B
515CF6",german:"#14B8A6",de:"#14B8A6",other:"#94A3B8"},n8={en:"english",english:"english",ko:"korean",korean:"korean",ja:"japanese",japanese:"japanese",zh:"chinese",chinese:"chinese",es:"spanish",spanish:"spanish",fr:"french",french:"french",de:"german",german:"german"};function Gg(e){return String(e??"").trim().toLowerCase()}function r8(e){const t=Gg(e);return n8[t]??t}function o8(){return{...or}}function Xl({language:e,palette:t={}}){const n=Gg(e);if(t[n])return t[n];const r=r8(n);return t[r]?t[r]:or[n]?or[n]:or[r]?or[r]:or.other}const qo={mastered:365,established:60,familiar:7,learning:1},i8={mastered:0,established:1,familiar:2,learning:3,new:4};function Yl(e){return e==null?"new":e>=qo.mastered?"mastered":e>=qo.established?"established":e>=qo.familiar?"familiar":e>=qo.learning?"learning":"new"}function s8(e){return i8[e]}const a8={maxVisibleNodes:20},Ur={constellationMin:1.5,focusMin:2,maxRepresentativeWords:4,swipeMinPx:44,directionDominance:1.25};function Us(e){return e>=Ur.focusMin?"focus":e>=Ur.constellationMin?"constellation":"overview"}function l8(e,t,n){if(e.length===0)return{index:-1,boundary:!0};const r=Math.min(e.length-1,Math.max(0,t)),o=e[r].ringIndex;if(n==="next-word"||n==="previous-word"){const s=e.map((u,d)=>({item:u,index:d})).filter(({item:u})=>u.ringIndex===o).map(({index:u})=>u),c=s.indexOf(r)+(n==="next-word"?1:-1);return c<0||c>=s.length?{index:r,boundary:!0}:{index:s[c],boundary:!1}}const i=n==="toward-mastered"?-1:1;for(let s=o+i;s>=0&&s<=4;s+=i){const l=e.findIndex(c=>c.ringIndex===s);if(l>=0)return{index:l,boundary:!1}}return{index:r,boundary:!0}}function c8({items:e,theme:t,palette:n={}}){return e.length===0?Y7.map((r,o)=>({...r,id:`placeholder-${o}`,label:void 0})):e.slice(0,a8.maxVisibleNodes).map(r=>({id:r.id,label:r.label,ringIndex:s8(Yl(r.stabilityDays)),angle:r.angleFraction*2*Math.PI,size:r.size,orbitSpeed:r.orbitSpeed,reviewPriority:r.reviewPriority,dueAt:r.dueAt,capturedAt:r.capturedAt,color:Xl({language:r.language,palette:n})}))}const Ln=[52,80,108,136,164],un=200,u8=1.5,ed=2,Wt=1,zs=2,Oa=260,td=2*Math.sqrt(Oa),d8="var(--orbit-line-material)",h8="var(--fg-strong)",f8="0.35 3.1",p8=.48,nd=.8,m8="var(--orbit-line-material)",g8=260,Kg=40,rd=-260,ai=-32,Bs=90,b8=-16,x8=176,v8=176,y8=[144,132,120,108,96],w8=8;function _8(e,t){const n=g8+(e-t)*Kg,r=rd-n,o=rd+n;return`M ${o} ${ai} A ${n} ${n} 0 1 1 ${r} ${ai} A ${n} ${n} 0 1 1 ${o} ${ai}`}const $s=["var(--orbit-legend-mastered)","var(--orbit-legend-established)","var(--orbit-legend-familiar)","var(--orbit-legend-learning)","var(--orbit-legend-new)"];function dn(e){return e.id??`r${e.ringIndex}-${e.angle.toFixed(4)}`}function od(e){const t=[...e.values()];return t.length<2?0:Math.hypot(t[0].x-t[1].x,t[0].y-t[1].y)}function C8(e){const t=[...e.values()];return{x:(t[0].x+t[1].x)/2,y:(t[0].y+t[1].y)/2}}function S8({nodes:e,onNodeClick:t,focusedNodeId:n=null,focusedDefinition:r=null,children:o,zoomLabels:i}){const s=f.useRef(null),l=f.useRef(null),c=f.useRef(Wt),u=f.useRef(un),d=f.useRef(null),h=f.useRef({x:0,y:0}),p=f.useRef(new Map),m=f.useRef(null),g=f.useRef(null),b=f.useRef("overview"),v=f.useRef(null),x=f.useRef(null),E=f.useRef(new Map),y=f.useRef(0),k=f.useRef(null),[I,C]=f.useState(null),[A,T]=f.useState(new Set),[L,D]=f.useState(Wt),[S,j]=f.useState("overview"),[P,M]=f.useState(null),_=f.useMemo(()=>e.filter(H=>H.id&&!H.id.startsWith("placeholder-")),[e]),R=_.findIndex(H=>dn(H)===I),O=R>=0?_[R]:null,U=f.useMemo(()=>Ln.map((H,F)=>e.filter(B=>B.ringIndex===F).length),[e]),$=f.useMemo(()=>{const H=new Set,F=new Set;for(const B of e)if(!(!B.label||F.has(B.ringIndex))&&(H.add(dn(B)),F.add(B.ringIndex),H.size>=Ur.maxRepresentativeWords))break;return H},[e]);function w(H){const F=dn(H);v.current=F,C(F),t?.(H)}function te(){const H=l.current,F=s.current;if(!H||!F)return;const B=Us(c.current);b.current=B,j(B),F.dataset.semanticLevel=B,H.classList.toggle("orbit-labels-visible",c.current>=u8&&B==="constellation");const q=u.current;H.setAttribute("viewBox",`${(-q+h.current.x).toFixed(2)} ${(-q+h.current.y).toFixed(2)} ${(q*2).toFixed(2)} ${(q*2).toFixed(2)}`)}function K(H){return Us(H)==="focus"?un:un/H}function N(){d.current!==null&&(cancelAnimationFrame(d.current),d.current=null)}function fe(H,F=K(H)){const B=b.current;c.current=Math.min(zs,Math.max(Wt,H));const q=Us(c.current);u.current=F,(c.current<=Wt||q==="focus")&&(h.current={x:0,y:0}),q==="focus"&&B!=="focus"&&!v.current&&_[0]&&w(_[0]),D(c.current),te()}function re(H){N(),fe(H)}function Y(H){N();const F=Math.min(zs,Math.max(Wt,H));if(Math.abs(F-c.current)<.001)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){fe(F);return}const B={zoom:c.current,zoomVelocity:0,cameraHalf:u.current,cameraVelocity:0};let q=performance.now();const Z=ue=>{const ge=Math.min((ue-q)/1e3,.032);q=ue,B.zoomVelocity+=(F-B.zoom)*Oa*ge,B.zoomVelocity*=Math.exp(-td*ge),B.zoom+=B.zoomVelocity*ge;const Ce=K(B.zoom);if(B.cameraVelocity+=(Ce-B.cameraHalf)*Oa*ge,B.cameraVelocity*=Math.exp(-td*ge),B.cameraHalf+=B.cameraVelocity*ge,fe(B.zoom,B.cameraHalf),Math.abs(F-B.zoom)<.001&&Math.abs(B.zoomVelocity)<.001&&Math.abs(Ce-B.cameraHalf)<.1&&Math.abs(B.cameraVelocity)<.1){fe(F,K(F)),d.current=null;return}d.current=requestAnimationFrame(Z)};d.current=requestAnimationFrame(Z)}function pe(){h.current={x:0,y:0},v.current=null,C(null),Y(Wt)}function ye(H){window.clearTimeout(y.current),M(H),y.current=window.setTimeout(()=>M(null),220)}function X(H){if(_.length===0)return;const F=R>=0?R:0,B=l8(_,F,H);if(B.boundary){ye(H);return}k.current={direction:H,fromRingIndex:_[F].ringIndex,toRingIndex:_[B.index].ringIndex},w(_[B.index])}f.useEffect(()=>{const H=s.current,F=k.current;if(k.current=null,!H||!F||b.current!=="focus")return;let B=!1,q=null;const Z=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return _t(async()=>{const{gsap:ue}=await import("./index-D4-8ALNT.js");return{gsap:ue}},[]).then(({gsap:ue})=>{B||!s.current||(q=ue.context(()=>{if(Z){ue.fromTo(".orbit-focus-window, .orbit-focus-selected-copy",{opacity:.58},{opacity:1,duration:.12,ease:"none",clearProps:"opacity"});return}if(F.direction==="toward-mastered"||F.direction==="toward-new"){const Ce=(F.toRingIndex-F.fromRingIndex)*Kg;ue.fromTo(".orbit-focus-window",{x:Ce,opacity:.72},{x:0,opacity:1,duration:.36,ease:"power4.out",clearProps:"transform,opacity"}),ue.fromTo(".orbit-focus-selected-copy",{x:Ce,opacity:0}
51,{x:0,opacity:1,duration:.36,ease:"power4.out",clearProps:"transform,opacity"});return}const ge=F.direction==="next-word"?Bs:-Bs;ue.fromTo(".orbit-focus-word-window",{y:ge,opacity:.46},{y:0,opacity:1,duration:.36,ease:"power4.out",clearProps:"transform,opacity"}),ue.fromTo(".orbit-focus-selected-copy",{y:ge>0?12:-12,opacity:0},{y:0,opacity:1,duration:.36,ease:"power4.out",clearProps:"transform,opacity"})},H))}),()=>{B=!0,q?.revert()}},[I]),f.useEffect(()=>{const H=n?_.find(F=>F.id===n):void 0;if(H){const F=dn(H);v.current=F,C(F)}else x.current&&!n&&pe();x.current=n},[_,n]),f.useEffect(()=>{const H=new Set,F=new Map;if(e.forEach(q=>{const Z=dn(q),ue=E.current.get(Z);ue&&(ue.ringIndex!==q.ringIndex||ue.size!==(q.size??.11))&&H.add(Z),F.set(Z,{ringIndex:q.ringIndex,size:q.size??.11})}),E.current=F,T(H),H.size===0)return;const B=window.setTimeout(()=>T(new Set),260);return()=>window.clearTimeout(B)},[e]),f.useEffect(()=>()=>{window.clearTimeout(y.current),N()},[]),f.useEffect(()=>{const H=s.current;if(!H)return;te();function F(B){B.preventDefault();const q=Math.min(Math.abs(B.deltaY)*.001,.06);re(c.current*(B.deltaY<0?1+q:1/(1+q)))}return H.addEventListener("wheel",F,{passive:!1}),()=>H.removeEventListener("wheel",F)},[_]);function Re(H){H.target.closest("a,button,[role='button']")||(N(),H.currentTarget.focus({preventScroll:!0}),p.current.set(H.pointerId,{x:H.clientX,y:H.clientY}),H.currentTarget.setPointerCapture(H.pointerId),p.current.size===1?m.current={sx:H.clientX,sy:H.clientY,px:h.current.x,py:h.current.y,moved:!1}:p.current.size===2&&(m.current=null,g.current={distance:od(p.current),zoom:c.current,cameraHalf:u.current,pan:{...h.current},center:C8(p.current)}))}function Ie(H){if(!p.current.has(H.pointerId))return;if(p.current.set(H.pointerId,{x:H.clientX,y:H.clientY}),p.current.size>=2&&g.current){const Ce=od(p.current);if(g.current.distance>0){const Pe=g.current.zoom*(Ce/g.current.distance),z=K(Pe),V=s.current;if(V){const ie=V.getBoundingClientRect(),he=(g.current.center.x-ie.left)/ie.width,ne=(g.current.center.y-ie.top)/ie.height;h.current={x:g.current.pan.x+(2*he-1)*(g.current.cameraHalf-z),y:g.current.pan.y+(2*ne-1)*(g.current.cameraHalf-z)}}re(Pe)}return}const F=m.current;if(!F)return;const B=H.clientX-F.sx,q=H.clientY-F.sy;if((Math.abs(B)>3||Math.abs(q)>3)&&(F.moved=!0),b.current==="focus"||c.current<=1)return;const Z=l.current;if(!Z)return;const ge=un*2/c.current/(Z.getBoundingClientRect().width||1);h.current={x:F.px-B*ge,y:F.py-q*ge},te()}function oe(H){const F=m.current,B=p.current.size===1;if(p.current.delete(H.pointerId),B&&F?.moved&&b.current==="focus"){const q=H.clientX-F.sx,Z=H.clientY-F.sy,ue=Math.hypot(q,Z),ge=Math.max(Math.abs(q),Math.abs(Z)),Ce=Math.min(Math.abs(q),Math.abs(Z));ue>=Ur.swipeMinPx&&ge>=Ce*Ur.directionDominance&&(Math.abs(Z)>Math.abs(q)?X(Z<0?"next-word":"previous-word"):X(q<0?"toward-mastered":"toward-new"))}p.current.size<2&&(g.current=null),p.current.size===0&&(m.current=null)}function xe(H){if(b.current!=="focus")return;const B={ArrowUp:"next-word",ArrowDown:"previous-word",ArrowLeft:"toward-mastered",ArrowRight:"toward-new"}[H.key];B&&(H.preventDefault(),X(B))}const G=O?_.filter(H=>H.ringIndex===O.ringIndex):[],J=O?G.findIndex(H=>dn(H)===I):-1,Ne=[G[J-1],O,G[J+1]];return a.jsxs("div",{ref:s,className:`orbit-2d-wrapper${P?` orbit-boundary orbit-boundary--${P}`:""}`,"data-semantic-level":S,onPointerDown:Re,onPointerMove:Ie,onPointerUp:oe,onPointerCancel:oe,onKeyDown:xe,tabIndex:S==="focus"?0:-1,children:[a.jsx("div",{className:"sr-only","aria-live":"polite",children:P?i.boundary:i[S]}),O&&S==="focus"&&a.jsxs("div",{className:"orbit-focus-selected-copy",children:[a.jsx("span",{className:"orbit-focus-selected-copy__lane",style:{color:$s[O.ringIndex]},children:i.rings[O.ringIndex]}),a.jsxs("div",{className:"orbit-focus-selected-copy__row",children:[a.jsx("p",{className:"orbit-focus-selected-word",children:O.label}),r&&a.jsx("p",{className:"orbit-focus-selected-meaning",children:r})]})]}),a.jsxs("div",{className:`orbit-zoom-controls${L>Wt?" orbit-zoom-controls--active":""}`,role:"group","aria-label":i.controls,children:[a.jsx("button",{type:"button",className:"orbit-zoom-control",onClick:()=>Y(c.current*1.25),"aria-label":i.zoomIn,disabled:L>=zs,children:"+"}),a.jsxs("output",{className:"orbit-zoom-level","aria-label":i.controls,children:[Math.round(L*100),"%"]}),a.jsx("button",{type:"button",className:"orbit-zoom-control",onClick:()=>Y(c.current/1.25),"aria-label":i.zoomOut,disabled:L<=Wt,children:"−"}),a.jsx("button",{type:"button",className:"orbit-zoom-reset",onClick:pe,"aria-label":i.reset,disabled:L<=Wt,children:a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M3.25 5.25V2.75M3.25 2.75H5.75M3.25 2.75L5.15 4.65A5.25 5.25 0 1 1 3.2 8.75",stroke:"currentColor",strokeWidth:"1.35",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),a.jsxs("svg",{ref:l,viewBox:`${-un} ${-un} ${un*2} ${un*2}`,className:"orbit-2d-svg","aria-label":"Orvoca vocabulary orbit",role:"img",children:[a.jsxs("g",{className:"orbit-standard-scene",children:[Ln.map(H=>a.jsx("circle",{cx:0,cy:0,r:H,fill:"none",stroke:d8,strokeWidth:nd,strokeOpacity:p8,strokeDasharray:f8,strokeLinecap:"round",vectorEffect:"non-scaling-stroke"},H)),a.jsx("circle",{cx:0,cy:0,r:24,fill:"var(--brand-teal)",fillOpacity:.04}),a.jsx("circle",{cx:0,cy:0,r:13,fill:"var(--brand-teal)",fillOpacity:.12}),a.jsx("circle",{cx:0,cy:0,r:6.5,fill:"var(--brand-teal)",fillOpacity:.32}),a.jsx("circle",{cx:0,cy:0,r:3,fill:"white",fillOpacity:.75}),a.jsx("g",{className:"orbit-overview-labels","aria-hidden":"true",children:Ln.map((H,F)=>a.jsxs("text",{x:0,y:-H+18,textAnchor:"middle",fill:h8,children:[i.rings[F]," · ",U[F]]},H))}),a.jsx("g",{className:"orbit-pending-layer",children:o}),Ln.map((H,F)=>a.jsx("g",{className:"orbit-ring-nodes",children:e.filter(B=>B.ringIndex===F).map((B,q)=>
51{const Z=dn(B),ue=Ln[B.ringIndex]??Ln[0],ge=Math.max(3,(B.size??.11)*40),Ce=B.color??"var(--fg-muted)",Pe=y8[F]+q*w8;return a.jsx("g",{className:"orbit-node-orbit",style:{animationDuration:`${Pe}s`},children:a.jsxs("g",{transform:`translate(${(Math.cos(B.angle)*ue).toFixed(2)},${(Math.sin(B.angle)*ue).toFixed(2)})`,className:`orbit-node${$.has(Z)?" orbit-node--representative":""}${A.has(Z)?" orbit-node--updated":""}`,onClick:t?()=>{w(B),Y(Math.max(c.current,ed))}:void 0,style:{cursor:t?"pointer":"default"},role:t?"button":void 0,tabIndex:t?0:void 0,"aria-pressed":t?I===Z:void 0,"aria-label":B.label,onKeyDown:t?z=>{z.key!=="Enter"&&z.key!==" "||(z.preventDefault(),w(B),Y(Math.max(c.current,ed)))}:void 0,children:[a.jsx("circle",{className:"orbit-node-focus-ring",cx:0,cy:0,r:ge*2.7,fill:"none",stroke:"var(--brand-teal)",strokeWidth:1.1,strokeOpacity:.9}),I===Z&&a.jsx("circle",{className:"orbit-node-selection",cx:0,cy:0,r:ge*2.7,fill:"none",stroke:"var(--brand-teal)",strokeWidth:1.1,strokeOpacity:.9}),A.has(Z)&&a.jsx("circle",{className:"orbit-node-update-ring",cx:0,cy:0,r:ge*2.35,fill:"none",stroke:Ce,strokeWidth:1,strokeOpacity:.7}),a.jsx("circle",{cx:0,cy:0,r:ge*1.9,fill:Ce,fillOpacity:.04}),a.jsx("circle",{cx:0,cy:0,r:ge,fill:Ce,fillOpacity:.7}),B.label&&a.jsx("text",{x:0,y:ge+11,textAnchor:"middle",fontSize:8.5,fill:"var(--fg-strong)",fillOpacity:.78,fontFamily:"var(--font-ui)",className:"orbit-node-label orbit-node-label-orient",style:{animationDuration:`${Pe}s`,pointerEvents:"none",userSelect:"none"},children:B.label})]})},Z)})},F))]}),a.jsxs("g",{className:"orbit-focus-scene","aria-hidden":S!=="focus",children:[a.jsxs("g",{className:"orbit-focus-window",children:[a.jsx("g",{className:"orbit-focus-arcs",children:Ln.map((H,F)=>{const B=F===O?.ringIndex;return a.jsx("path",{className:`orbit-focus-arc orbit-focus-arc--${B?"current":"adjacent"}`,d:_8(F,O?.ringIndex??2),fill:"none",stroke:m8,strokeWidth:nd,vectorEffect:"non-scaling-stroke"},F)})}),a.jsx("g",{className:"orbit-focus-word-window",children:Ne.map((H,F)=>{if(!H)return null;const B=F===1,q=B?0:b8,Z=ai+(F-1)*Bs;return a.jsxs("g",{transform:`translate(${q},${Z})`,className:B?"orbit-focus-node orbit-focus-node--active":"orbit-focus-node",children:[B&&a.jsx("circle",{className:"orbit-focus-node-glow",r:15,fill:H.color??$s[H.ringIndex]}),a.jsx("circle",{r:B?7:4,fill:H.color??$s[H.ringIndex],fillOpacity:B?.9:.34}),a.jsx("text",{x:B?0:12,y:B?24:3,textAnchor:B?"middle":"start",fill:"var(--fg-strong)",fillOpacity:B?1:.45,fontSize:8,fontWeight:600,fontFamily:"var(--font-ui)",children:B?"":H.label})]},dn(H))})})]}),a.jsx("text",{x:x8,y:v8,textAnchor:"end",className:"orbit-focus-hint",fill:"var(--fg-muted)",children:i.swipeHint})]})]})]})}const E8={};function k8({orbitItems:e,pendingCount:t,palette:n=E8,onNodeClick:r,focusedNodeId:o=null,focusedDefinition:i=null,inboxHref:s="/console/inbox",zoomLabels:l}){const c=Z7(),u=f.useMemo(()=>c8({items:e,theme:c,palette:n}),[e,c,n]);return a.jsxs("div",{className:"console-orbit-scene",children:[a.jsx("div",{className:"console-orbit-scene__halo","aria-hidden":"true"}),a.jsx("div",{className:"console-orbit-scene__object",children:a.jsx(S8,{nodes:u,focusedNodeId:o,focusedDefinition:i,onNodeClick:r?d=>{d.id&&r(d.id)}:void 0,zoomLabels:l,children:a.jsx(t8,{pendingCount:t,inboxHref:s})})})]})}function Qr({href:e,className:t,target:n,rel:r,onClick:o,children:i}){return a.jsx("a",{href:e,className:t,target:n,rel:r,onClick:o,children:i})}function I8({pendingCount:e}){const t=se("Console.orbit"),[n,r]=f.useState("checking"),[o,i]=f.useState(null),[s,l]=f.useState(!1);f.useEffect(()=>{i(El()?.href??null),l(Sl());let p=!0;return Wl().then(m=>{p&&r(m?"installed":"not_installed")}),()=>{p=!1}},[]);const c=e>0?"pending":n==="installed"?"capture":o?"install":"desktop",u=t(`empty_${c}_title`),d=t(`empty_${c}_body`);let h=null;return c==="pending"?h=a.jsxs(Ve,{href:"/console/inbox",className:"orbit-hud-btn orbit-hud-btn-primary orbit-empty-cta",children:[t("empty_pending_cta")," (",e,")"]}):c==="install"&&n==="not_installed"&&o?h=a.jsx(Qr,{href:o,target:"_blank",rel:"noopener noreferrer",onClick:()=>it("cta_clicked",{cta_target:"extension",placement:"orbit_empty_state",device_type:yn()}),className:"orbit-hud-btn orbit-hud-btn-primary orbit-empty-cta",children:t("empty_install_cta")}):c==="desktop"&&s&&(h=a.jsx(Qr,{href:It(),target:"_blank",rel:"noopener noreferrer",onClick:()=>it("cta_clicked",{cta_target:"android",placement:"orbit_empty_state",device_type:yn()}),className:"orbit-hud-btn orbit-hud-btn-primary orbit-empty-cta",children:t("empty_desktop_cta")})),a.jsxs("div",{className:"console-orbit-empty","aria-live":"polite",children:[a.jsx("p",{className:"console-orbit-empty__title",children:u}),a.jsx("p",{className:"console-orbit-empty__body",children:d}),h]})}const N8=[{lane:"mastered",colorVar:"var(--orbit-legend-mastered)"},{lane:"established",colorVar:"var(--orbit-legend-established)"},{lane:"familiar",colorVar:"var(--orbit-legend-familiar)"},{lane:"learning",colorVar:"var(--orbit-legend-learning)"}
51,{lane:"new",colorVar:"var(--orbit-legend-new)"}],T8={};function A8({status:e,initialError:t,orbitItems:n,pendingCount:r,reviewDueCount:o,streak:i,wordsAddedToday:s=0,stabilityIncreasedToday:l=0,summaryError:c=null,palette:u=T8,onNodeClick:d,onReport:h,reported:p,detailOpen:m=!1,focusedNodeId:g=null,focusedDefinition:b=null}){const v=se("Console.orbit"),E=`/${Mt()}/console/inbox`,[y,k]=f.useState(!0),I=f.useRef(null),C=f.useRef(null),A=f.useRef(null);f.useEffect(()=>{window.matchMedia("(max-width: 640px)").matches&&k(!1)},[]),f.useEffect(()=>{const P=I.current,M=16;function _(){if(!P)return;const O=y?C.current:A.current,U=O?O.offsetHeight:0;P.style.setProperty("--orbit-reserve-bottom",`${U+M}px`)}_();const R=new ResizeObserver(_);return C.current&&R.observe(C.current),A.current&&R.observe(A.current),()=>R.disconnect()},[y]);const T=e==="ready"&&n.length===0,L=r>0?"/console/inbox":"/console/review",D=r>0?v("open_inbox"):v("review"),S=r>0?"/console/review":"/console/vocabulary",j=r>0?v("review"):v("vocabulary");return a.jsx("div",{ref:I,className:`absolute inset-0 z-5${m?" orbit-view--detail-open":""}`,children:e==="error"&&t?a.jsx(So,{detail:t,onRetry:()=>window.location.reload(),onReport:h,reported:p,className:"absolute inset-0 bg-[--bg-page] p-8"}):a.jsxs(a.Fragment,{children:[a.jsx(k8,{orbitItems:n,pendingCount:r,palette:u,onNodeClick:d,focusedNodeId:g,focusedDefinition:b,inboxHref:E,zoomLabels:{zoomIn:v("zoom_in"),zoomOut:v("zoom_out"),reset:v("zoom_reset"),controls:v("zoom_controls"),overview:v("semantic_overview"),constellation:v("semantic_constellation"),focus:v("semantic_focus"),boundary:v("semantic_boundary"),swipeHint:v("semantic_swipe_hint"),rings:N8.map(P=>v(`ring_${P.lane}`))}}),T&&a.jsx(I8,{pendingCount:r}),a.jsxs("div",{className:"pointer-events-none absolute inset-x-4 bottom-4 z-10 flex flex-col items-center gap-2",hidden:T||m,children:[!y&&a.jsx("div",{ref:A,className:"pointer-events-auto",children:a.jsxs("button",{type:"button",onClick:()=>k(!0),className:"orbit-hud-collapsed flex min-h-11 items-center gap-2 px-4 py-2 text-[0.8rem] font-semibold text-(--fg-muted) transition-[transform,border-color] duration-140 hover:-translate-y-0.5 hover:border-(--line-strong) hover:text-(--fg-strong) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--brand-gold) active:translate-y-0 active:duration-80","aria-label":v("expand_summary"),children:[a.jsxs("span",{className:"text-(--fg-muted)",children:[e==="loading"?"—":o," ",v("due_short")]}),a.jsx("span",{className:"text-(--line-strong)",children:"·"}),a.jsxs("span",{children:[e==="loading"?"—":r," ",v("inbox_short")]}),i>0&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-(--line-strong)",children:"·"}),a.jsxs("span",{className:"inline-flex items-center gap-1 text-(--fg-warning-on-tint)",children:[a.jsx(ou,{className:"size-3.5",strokeWidth:2.2,"aria-hidden":"true"}),i]})]}),a.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",className:"shrink-0 opacity-50",children:a.jsx("path",{d:"M2 8L6 4L10 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]})}),y&&a.jsxs("section",{ref:C,className:"pointer-events-auto orbit-hud w-full max-w-[34rem]","aria-label":v("summary_label"),children:[a.jsxs("div",{className:"orbit-hud-main",children:[e!=="loading"&&l>0&&a.jsxs("div",{className:"orbit-hud-hero",children:[a.jsx("span",{className:"orbit-hud-hero-value",children:l}),a.jsx("span",{className:"orbit-hud-hero-label",children:v(l===1?"word_stronger_today":"words_stronger_today")})]}),a.jsxs("div",{className:"orbit-hud-stats",children:[a.jsxs("div",{className:"orbit-hud-stat",children:[a.jsx("span",{className:"orbit-hud-value",style:e!=="loading"&&r>0?{color:"var(--fg-warning-on-tint)"}:void 0,children:e==="loading"?"—":r}),a.jsx("span",{className:"orbit-hud-label",children:v("stat_inbox")})]}),a.jsxs("div",{className:"orbit-hud-stat",children:[a.jsx("span",{className:"orbit-hud-value",children:e==="loading"?"—":o}),a.jsx("span",{className:"orbit-hud-label",children:v("stat_due")})]}),a.jsxs("div",{className:"orbit-hud-stat",children:[a.jsx("span",{className:"orbit-hud-value",style:e!=="loading"&&s>0?{color:"var(--brand-teal)"}:void 0,children:e==="loading"?"—":`+${s}`}),a.jsx("span",{className:"orbit-hud-label",children:v("stat_today")})]}),a.jsxs("div",{className:"orbit-hud-stat",children:[a.jsxs("span",{className:"orbit-hud-value orbit-hud-value--streak",style:i>0?{color:"var(--fg-warning-on-tint)"}:{color:"var(--fg-muted)"},children:[a.jsx(ou,{className:"orbit-hud-streak-icon",strokeWidth:2.2,"aria-hidden":"true"}),a.jsx("span",{children:i})]}),a.jsx("span",{className:"orbit-hud-label",children:v("stat_streak")})]})]}),a.jsx("div",{className:"orbit-hud-divider","aria-hidden":"true"}),a.jsxs("div",{className:"orbit-hud-actions",children:[a.jsx(Ve,{href:L,className:"orbit-hud-btn orbit-hud-btn-primary",children:D}),a.jsx(Ve,{href:S,className:"orbit-hud-btn orbit-hud-btn-secondary",children:j}),a.jsx("button",{type:"button",onClick:()=>k(!1),className:"orbit-hud-collapse focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--brand-gold)","aria-label":v("collapse_summary"),children:a.jsx("svg",{width:"11",height:"11",viewBox:"0 0 12 12",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M2 4L6 8L10 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]}),c?a.jsx("p",{className:"orbit-summary-note mt-2",children:qt(c)}):null]})]})]})})}function P8(e,t){if(!e?.source_url)return t;try{return new URL(e.source_url).hostname.replace(/^www\./,"")}catch{return t}}function Hs(e,t,n){const r=Number.parseFloat(getComputedStyle(e).getPropertyValue(t));return Number.isFinite(r)?r:n}
51function R8({item:e,sources:t,onClose:n}){const r=se("Console.orbit"),o=se("Console.word_detail"),i=f.useRef(null),s=f.useRef(0),[l,c]=f.useState(!1),[u,d]=f.useState(1),[h,p]=f.useState(!1),[m,g]=f.useState(0),[b,v]=f.useState(!1);if(f.useEffect(()=>{const I=navigator.hardwareConcurrency||8,C=navigator.deviceMemory??8;v(I<=4||C<=4)},[]),f.useEffect(()=>{function I(C){C.key==="Escape"&&n()}return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n]),f.useEffect(()=>{const I=i.current;if(!I)return;I.scrollTop=0;const C=()=>c(I.scrollHeight>I.clientHeight+1);C();const A=new ResizeObserver(C);return A.observe(I),()=>A.disconnect()},[e?.id]),f.useEffect(()=>()=>{window.clearTimeout(s.current)},[]),!e)return null;const x=Co(e),E=t[0],y=E?o(Dg(E.source_type)):"—";function k(){const I=i.current;if(!I)return;const C=Math.max(1,I.scrollHeight-I.clientHeight),A=Hs(I,"--functional-panel-scroll-indicator-height",22),T=Hs(I,"--functional-panel-fade-release",16),L=Hs(I,"--functional-panel-scroll-indicator-hide",650),D=Math.max(0,I.clientHeight-A);d(Math.max(0,1-I.scrollTop/T)),g(I.scrollTop/C*D),p(!0),window.clearTimeout(s.current),s.current=window.setTimeout(()=>p(!1),L)}return a.jsxs("aside",{className:"orbit-focus-detail-panel","data-low-power":b?"true":"false","aria-labelledby":"orbit-focus-detail-title",children:[a.jsx("button",{type:"button",className:"orbit-focus-detail-panel__close",onClick:n,"aria-label":r("focus_close"),children:a.jsx(Xn,{size:18,"aria-hidden":"true"})}),a.jsxs("div",{className:"orbit-focus-detail-panel__content",children:[a.jsx("h2",{id:"orbit-focus-detail-title",className:"orbit-focus-detail-panel__title",children:x.surface}),a.jsxs("div",{className:"orbit-focus-detail-panel__rows",children:[a.jsxs("div",{className:"orbit-focus-detail-row",children:[a.jsx("span",{className:"orbit-focus-detail-row__label",children:r("focus_status_label")}),a.jsx("span",{className:"orbit-focus-detail-row__value orbit-focus-detail-row__meta",children:r(`ring_${Yl(e.stability)}`)})]}),a.jsxs("div",{className:"orbit-focus-detail-row orbit-focus-detail-row--definition",children:[a.jsx("span",{className:"orbit-focus-detail-row__label",children:r("focus_meaning_label")}),a.jsxs("div",{className:"orbit-focus-definition-wrap",children:[a.jsx("div",{ref:i,className:`orbit-focus-definition${l?" orbit-focus-definition--overflow":""}`,onScroll:k,tabIndex:l?0:-1,style:l?{"--orbit-definition-fade-progress":u}:void 0,children:x.definition||o("no_definition")}),l&&a.jsx("span",{className:"orbit-focus-definition__indicator",style:{opacity:h?void 0:0,top:m},"aria-hidden":"true"})]})]}),a.jsxs("div",{className:"orbit-focus-detail-row",children:[a.jsx("span",{className:"orbit-focus-detail-row__label",children:r("focus_source_label")}),a.jsx("span",{className:"orbit-focus-detail-row__value orbit-focus-detail-row__meta",children:P8(E,y)})]})]})]})]})}function j8(){const{apiClient:e,handle401:t,handle403:n,isReady:r,pendingCount:o,setPendingCount:i,statsSnapshot:s,palette:l,handleReport:c,reportedViews:u}=Tn(),d=Wg(e,t,n),[h,p]=f.useState(null),[m,g]=f.useState([]),[b,v]=f.useState(s),[x,E]=f.useState(null),[y,k]=f.useState([]),[I,C]=f.useState(null),[A,T]=f.useState(!0),L=f.useRef(d.loadVocab);L.current=d.loadVocab,f.useEffect(()=>{if(!r)return;let S=!0;L.current(),T(!0);async function j(){try{const[P,M]=await Promise.all([e.getStats(),e.orbitState()]);if(!S)return;v(P),i(P.inbox),E(null),k(M.items),C(null)}catch(P){if(!S)return;if(P instanceof Ut&&P.status===401){await t();return}E(jt(P,{method:"GET",path:"/v1/stats"})),C(jt(P,{method:"GET",path:"/v1/orbit/state"}))}finally{S&&T(!1)}}return j(),()=>{S=!1}},[e,t,r,i]),f.useEffect(()=>{let S=!1;if(!h){g([]);return}return e.listVocabSources(h.id).then(j=>{S||g(j.items)}).catch(j=>{S||g([]),ae(j,{context:"orbit_vocab_sources",route:"/v1/vocab/:id/sources",method:"GET"})}),()=>{S=!0}},[e,h?.id]);const D=!r||A?"loading":I?"error":"ready";return a.jsxs("div",{className:"relative min-h-0 flex-1 overflow-hidden",children:[a.jsx(A8,{status:D,initialError:I,orbitItems:y,pendingCount:b?.inbox??o,reviewDueCount:b?.due_count??0,streak:b?.streak??0,wordsAddedToday:b?.words_added_today??0,stabilityIncreasedToday:b?.stability_increased_today??0,summaryError:x,palette:l,onNodeClick:S=>{const j=d.vocabItems.find(P=>P.id===S);j&&p(j)},onReport:S=>c(S,"orbit"),reported:u.has("orbit"),detailOpen:h!==null,focusedNodeId:h?.id??null,focusedDefinition:h?Co(h).definition:null}),a.jsx(R8,{item:h,sources:m,onClose:()=>p(null)})]})}const O8=3*864e5;function id(e){return e===null?!0:Date.now()-Date.parse(e)>=O8}function L8(e,t){const[n,r]=f.useState("off"),[o,i]=f.useState([]),[s,l]=f.useState(0),[c,u]=f.useState(!1),[d,h]=f.useState(0),[p,m]=f.useState(0),[g,b]=f.useState(!1),[v,x]=f.useState(null),[E,y]=f.useState(!1),[k,I]=f.useState(!1),C=f.useRef(new Set),A=f.useRef(!1),T=f.useRef(null);f.useEffect(()=>{if(A.current)return;A.current=!0;const _=e.getStudySession(20);T.current=_,_.then(R=>{i(R.items),I(id(R.last_reviewed_at))}).catch(R=>{T.current=null,ae(R,{context:"study_session_prefetch",route:"/v1/study/session",method:"GET"})})},[e]);
51async function L(_=20){r("loading");try{const R=await(_===20&&T.current?T.current:e.getStudySession(_));T.current=null,R.items.length===0?(r("complete"),i([])):(C.current.clear(),i(R.items),l(0),u(!1),y(!1),h(0),m(0),x(null),I(id(R.last_reviewed_at)),r("active"),it("review_session_started",{card_count:R.items.length}))}catch(R){ae(R,{context:"study_session_start",route:"/v1/study/session",method:"GET",extras:{size:_}}),r("off")}}function D(_,R,O){it("review_session_completed",{card_count:O,knew_count:_,missed_count:R}),r("complete")}function S(_,R,O){const U=s+1;U>=_?D(R,O,_):(l(U),u(!1))}async function j(_){if(g||E)return!1;const R=o[s];if(!R)return!1;b(!0),x(null);try{const O=await e.gradeVocab(R.id,_),U=!C.current.has(R.id),$=_===3&&U?d+1:d,w=_===1&&U?p+1:p;h($),m(w),O.nextReviewAt!==void 0&&i(fe=>fe.map(re=>re.id===R.id?{...re,stability:O.stability??re.stability,next_review_at:O.nextReviewAt??re.next_review_at}:re));const te=s>=o.length-1,K=_===1&&U&&!te;K&&(C.current.add(R.id),i(fe=>[...fe,R]));const N=o.length+(K?1:0);return _===1&&!c?(u(!0),y(!0)):S(N,$,w),!0}catch(O){return ae(O,{context:"study_grade_card",route:"/v1/review/grade",method:"POST",extras:{vocabItemId:R.id}}),x("review_save_failed"),!1}finally{b(!1)}}function P(){E&&(y(!1),S(o.length,d,p))}function M(){x(null)}return{studyMode:n,setStudyMode:r,studyCards:o,studyIndex:s,studyFlipped:c,setStudyFlipped:u,studyKnew:d,studyMissed:p,gradePending:g,gradeError:v,clearGradeError:M,xRevealed:E,showSwipeHint:k,startStudySession:L,gradeCard:j,dismissX:P}}const sd=5,ad=50,M8=5,ld=.28,cd=.998,Vs=16,ud=8;function dd(e,t){if(typeof window>"u")return t/1e3;const n=Number.parseFloat(window.getComputedStyle(document.documentElement).getPropertyValue(e));return Number.isFinite(n)?n/1e3:t/1e3}function D8({studyMode:e,studyCards:t,studyIndex:n,studyFlipped:r,studyKnew:o,studyMissed:i,xRevealed:s,showSwipeHint:l,onStartStudy:c,onGrade:u,onFlip:d,onDismissX:h,onExit:p,onStudyAgain:m,studyError:g=null,gradePending:b=!1,gradeError:v=null,onReport:x,reported:E}){const y=se("Console.review"),k=se("Console.common"),[I,C]=f.useState(20),[A,T]=f.useState(!1),[L,D]=f.useState(!1),[S,j]=f.useState(!1),P=f.useRef(null),M=f.useRef([]),_=f.useRef(null),R=f.useRef(null),O=f.useRef(null),U=f.useRef({active:!1,startX:0,dx:0,lastX:0,lastAt:0,velocityX:0}),$=f.useRef(null),w=f.useRef(!1),te=f.useRef(!1);f.useEffect(()=>{te.current=window.matchMedia("(prefers-reduced-motion: reduce)").matches;let G=!0;return _t(()=>import("./index-D4-8ALNT.js"),[]).then(J=>{G&&(P.current=J.gsap)}),()=>{G=!1,fe(),M.current.forEach(J=>J.revert()),M.current=[]}},[]);function K(G){const J=P.current;if(!J)return;const Ne=J.context(()=>G(J),_.current??void 0);M.current.push(Ne)}function N(G){const J=P.current,Ne=_.current;if(!J||!Ne)return;J.set(Ne,{x:G,rotateZ:G*.045});const H=Math.min(1,Math.max(0,(Math.abs(G)-Vs)/(window.innerWidth*ld-Vs)));R.current&&J.set(R.current,{opacity:G>0?H:0}),O.current&&J.set(O.current,{opacity:G<0?H:0})}function fe(){$.current!==null&&(clearTimeout($.current),$.current=null)}function re(){const G=P.current;G&&(R.current&&G.set(R.current,{opacity:.24}),O.current&&G.set(O.current,{opacity:.24}))}function Y(){const G=_.current;G&&(K(J=>{J.to(G,{x:0,rotateZ:0,duration:te.current?0:dd("--dur-swipe-settle",350),ease:"power3.out"})}),re())}function pe(G){const J=_.current;J&&K(Ne=>{Ne.to(J,{x:G*(J.offsetWidth+200),rotateZ:G*14,opacity:.5,duration:te.current?0:dd("--dur-exit",180),ease:"power2.in"})})}async function ye(G){if(s){pe(G==="o"?1:-1),h();return}if(G==="o"){pe(1),await u(3)||(w.current=!1,Y());return}r?(pe(-1),await u(1)||(w.current=!1,Y())):(Y(),await u(1)||(w.current=!1))}function X(G){b||(T(!0),fe(),D(!1),j(!1),$.current=setTimeout(()=>D(!0),450),U.current={active:!0,startX:G.clientX,dx:0,lastX:G.clientX,lastAt:G.timeStamp,velocityX:0},G.currentTarget.setPointerCapture(G.pointerId))}function Re(G){if(!U.current.active)return;const J=G.timeStamp-U.current.lastAt;J>0&&(U.current.velocityX=(G.clientX-U.current.lastX)/J*1e3),U.current.lastX=G.clientX,U.current.lastAt=G.timeStamp,U.current.dx=G.clientX-U.current.startX,Math.abs(U.current.dx)>ud&&fe(),Math.abs(U.current.dx)>=Vs?j(!0):L||j(!1),te.current||N(U.current.dx)}function Ie(){if(!U.current.active)return;const G=U.current.dx,J=U.current.velocityX,Ne=G+J/1e3*(cd/(1-cd));U.current.active=!1,fe(),D(!1),j(!1),w.current=Math.abs(G)>ud,Math.abs(Ne)>=window.innerWidth*ld?ye(Ne>0?"o":"x"):Y()}function oe(){if(!b){if(w.current){w.current=!1;return}s?h():r||d()}}if(f.useEffect(()=>{w.current=!1,re()},[n,s]),f.useEffect(()=>{function G(J){if(e!=="active"||!(J.key==="ArrowRight"||J.key==="ArrowLeft"||J.key===" "||J.key==="Enter"))return;const H=J.target;if(H instanceof HTMLElement){const F=H.closest("[data-review-shortcuts]"),B=H.closest('button, a, input, select, textarea, [role="button"], [role="link"]');if(H.isContentEditable||B&&(!F||J.key===" "||J.key==="Enter"))return}if(J.preventDefault(),!b){if(T(!0),s){h();return}J.key==="ArrowRight"?u(3):J.key==="ArrowLeft"?u(1):r||d()}}return window.addEventListener("keydown",G),()=>window.removeEventListener("keydown",G)},[e,r,s,d,u,h]),g)return a.jsx("section",{"aria-label":"Review session error",className:"flex items-center justify-center py-32",children:a.jsx(So,{detail:g,onReport:x,reported:E})});if(e==="off"){const G=t.length>0;return a.jsxs("section",{"aria-label":"Review session setup",className:"flex flex-col items-center justify-center gap-12 py-16 text-center",children:[a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx("h1",{className:G?"text-[clamp(2.2rem,5vw,3.2rem)] font-extrabold text-(--fg-strong) tracking-[-0.04em] leading-none":"sr-only",children:y("title")}),a.jsxs("div",{className:"flex items-center gap-1.5",children:[a.jsx("p",{className:"text-(--fg-muted) text-[0.83rem]",children:G?t.length===1?y("one_word_due"):y("words_due",{count:t.length}):y("no_cards_due")}),a.jsx(wm,{children:a.jsxs(_m,{children:[a.jsx(Cm,{asChild:!0,children:a.jsx("button",{type:"button","aria-label":y("algo_help_label"),className:"flex items-center justify-center min-h-11 min-w-11 rounded-full text-[0.62rem] font-bold cursor-help select-none transition-opacity duration-150 opacity-30 hover:opacity-70 focus-visible:opacity-100 text-(--fg-muted)",children:a.jsx("span",{"aria-hidden":"true",className:"flex items-center justify-center w-4 h-4 rounded-full border-[1.5px] border-(--fg-muted)",children:"i"})})}),a.jsxs(Sm,{side:"top",sideOffset:8,className:"block w-60 rounded-xl border border-(--line-soft) bg-(--bg-elevated) px-3 py-2.5 text-left text-[0.72rem] leading-relaxed text-(--fg-muted) shadow-[0_8px_24px_rgba(0,0,0,0.18)]",children:[a.jsx("p",{className:"font-semibold mb-1.5 text-(--fg-strong)",children:y("algo_title")}),a.jsxs("ul",{className:"space-y-0.5 list-none m-0 p-0",children:[a.jsxs("li",{children:[a.jsx("span",{className:"font-medium",style:{color:"var(--state-success)"},children:y("algo_o_label")})," ",y("algo_o_desc")]}),a.jsxs("li",{children:[a.jsx("span",{className:"font-medium",style:{color:"var(--state-danger)"},children:y("algo_x_label")}
51)," ",y("algo_x_desc")]})]}),a.jsx("p",{className:"mt-1.5 opacity-60",children:y("algo_retention")})]})]})})]})]}),G&&t.length>10&&a.jsxs("div",{className:"flex w-full max-w-xs flex-col gap-3",children:[a.jsxs("div",{className:"flex items-baseline justify-between px-1",children:[a.jsx("p",{className:"text-[0.7rem] font-semibold uppercase tracking-widest text-(--fg-muted) opacity-60",children:y("cards")}),a.jsx("output",{className:"text-xl font-extrabold tracking-[-0.04em] text-(--fg-strong)",children:I})]}),a.jsx("input",{type:"range",min:sd,max:ad,step:M8,value:I,onChange:J=>C(Number(J.currentTarget.value)),"aria-label":"Select session size",className:"h-2 w-full cursor-ew-resize accent-(--brand-teal)"}),a.jsxs("div",{className:"flex justify-between px-1 text-[0.65rem] font-medium text-(--fg-muted) opacity-55",children:[a.jsx("span",{children:sd}),a.jsx("span",{children:ad})]})]}),G?a.jsx("button",{type:"button",className:"primary-btn",onClick:()=>c(t.length<=10?t.length:I),children:y("start_cards",{size:t.length<=10?t.length:I})}):a.jsx(Ve,{href:"/console/vocabulary",className:"primary-btn",children:y("go_to_vocabulary")})]})}if(e==="loading")return a.jsx("section",{"aria-label":"Loading review session",className:"flex items-center justify-center py-32",children:a.jsxs("div",{className:"animate-pulse flex flex-col items-center gap-4",children:[a.jsx("div",{className:"h-12 w-44 rounded-2xl bg-(--line-soft)"}),a.jsx("div",{className:"h-3 w-20 rounded-full bg-(--line-soft)"})]})});if(e==="active"){const G=t[n];if(!G)return null;const J=Co(G),Ne=t.length>0?n/t.length:0,H=l&&n===0&&!A&&!s;return a.jsxs("section",{"aria-label":"Flashcard review",className:"flex flex-col flex-1 min-h-0 gap-4 py-2",children:[a.jsxs("div",{className:"flex items-center gap-4 shrink-0",children:[a.jsx("button",{type:"button",onClick:p,"aria-label":"Exit review",className:"flex items-center text-[0.76rem] text-(--fg-muted) hover:text-(--fg-body) transition-colors duration-150 cursor-pointer shrink-0 -ml-2 px-2 py-2.5 rounded-lg hover:bg-(--bg-elevated)",children:y("exit")}),a.jsx("div",{className:"flex-1 h-px overflow-hidden rounded-full bg-(--line-soft)",children:a.jsx("div",{className:"h-full origin-left rounded-full transition-transform bg-(--brand-teal)",style:{transform:`scaleX(${Ne})`,transition:"transform var(--dur-feedback) var(--ease-standard)"}})}),b&&a.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:k("saving")}),a.jsxs("span",{className:"text-[0.76rem] text-(--fg-muted) tabular-nums shrink-0",children:[n+1,a.jsx("span",{className:"opacity-40 mx-0.5",children:"/"}),t.length]})]}),a.jsx("p",{className:"sr-only",id:"swipe-instructions",children:y("sr_swipe_instructions")}),a.jsxs("div",{className:"relative flex-1 min-h-0 w-full",style:{perspective:"1200px"},children:[a.jsxs("div",{"aria-hidden":"true",className:"absolute inset-x-0 bottom-10 z-10 flex h-20 items-end justify-between px-5 sm:px-8 pointer-events-none",style:{opacity:L||S?1:0,transition:"opacity 160ms ease-out"},children:[a.jsxs("div",{ref:O,className:"flex flex-col items-center gap-1 rounded-2xl px-3 py-3 text-center font-extrabold",style:{color:"var(--state-danger)",opacity:.24},children:[a.jsx("span",{className:"text-2xl leading-none",children:"← X"}),a.jsx("span",{className:"text-[0.72rem]",children:y("swipe_x")})]}),a.jsxs("div",{ref:R,className:"flex flex-col items-center gap-1 rounded-2xl px-3 py-3 text-center font-extrabold",style:{color:"var(--state-success)",opacity:.24},children:[a.jsx("span",{className:"text-2xl leading-none",children:"O →"}),a.jsx("span",{className:"text-[0.72rem]",children:y("swipe_o")})]})]}),a.jsx("div",{ref:_,className:"absolute inset-0 touch-none",style:{zIndex:1},role:"button","data-review-shortcuts":!0,tabIndex:0,"aria-busy":b,"aria-roledescription":"flashcard","aria-keyshortcuts":"ArrowRight ArrowLeft","aria-describedby":"swipe-instructions","aria-label":s?y("tap_to_continue"):r?"Card back":"Click to reveal definition",onPointerDown:X,onPointerMove:Re,onPointerUp:Ie,onPointerCancel:Ie,onClick:oe,onKeyDown:F=>F.key==="Enter"||F.key===" "?oe():void 0,children:a.jsx("div",{className:"flashcard-container h-full",children:a.jsxs("div",{className:`flashcard-inner h-full${r?" is-flipped":""}`,children:[a.jsx("div",{className:"flashcard-face flashcard-front","aria-hidden":r,children:a.jsxs("div",{className:"flex flex-col items-center gap-6 w-full",children:[a.jsx("p",{className:"text-[clamp(2.4rem,6vw,4rem)] font-bold text-(--fg-strong) tracking-[-0.04em] leading-tight m-0",children:J.surface}),a.jsxs("div",{className:"flex items-center gap-2 text-[0.68rem] font-bold tracking-[0.14em] uppercase text-(--brand-teal) opacity-70",children:[a.jsx("span",{children:G.language}),J.pos&&J.pos!=="other"&&a.jsx("span",{children:J.pos})]}),G.lemma&&G.lemma!==J.surface&&a.jsx("p",{className:"text-[0.73rem] font-mono m-0 opacity-40 text-(--fg-muted)",children:G.lemma}),a.jsxs("p",{className:"text-[0.7rem] text-(--fg-muted) m-0 mt-4 opacity-35",children:[y("tap_to_reveal"),a.jsx("span",{className:"hidden sm:inline opacity-60 ml-1",children:y("space_hint")})]})]})}),a.jsx("div",{className:"flashcard-face flashcard-back","aria-hidden":!r,children:a.jsxs("div",{className:"flex flex-col items-center gap-6 w-full",children:[a.jsx("p",{className:"text-[clamp(1.8rem,4.5vw,3rem)] font-bold text-(--fg-strong) tracking-[-0.03em] leading-tight m-0",children:J.surface}),J.pos&&J.pos!=="other"&&a.jsx("p",{className:"text-[0.74rem] italic m-0 opacity-55 text-(--fg-muted)",children:J.pos}),a.jsx("p",{className:"text-[1.1rem] text-(--fg-body) leading-relaxed m-0 max-w-sm",children:J.definition||y("no_definition")}),J.example&&a.jsxs("p",{className:"text-[0.85rem] text-(--fg-muted) italic m-0 max-w-sm leading-relaxed",children:["“",J.example,"”"]}),s&&a.jsx("p",{className:"text-[0.72rem] m-0 mt-2 opacity-50 text-(--fg-muted)",children:y("tap_to_continue")})]})})]})})},n),H&&a.jsxs("div",{className:"absolute inset-0 z-20 flex items-end justify-between rounded-[var(--functional-panel-radius)] px-3 pb-10 pointer-events-none sm:items-center sm:px-6 sm:pb-0",style:{background:"color-mix(in srgb, var(--bg-page) 55%, transparent)"},role:"note","aria-label":y("swipe_hint_title"),children:[a.jsxs("div",{className:"flex flex-col items-center gap-1 text-(--state-danger)",children:[a.jsx("span",{className:"text-2xl font-extrabold sm:text-3xl","aria-hidden":"true",children:"← X"}),a.jsx("span",{className:"text-[0.7rem] font-semibold sm:text-[0.78rem]",children:y("swipe_x")})]}),a.jsx("p",{className:"max-w-20 text-center text-[0.72rem] font-semibold text-(--fg-strong) sm:max-w-32 sm:text-[0.8rem]",children:y("swipe_hint_title")}),a.jsxs("div",{className:"flex flex-col items-center gap-1",style:{color:"var(--state-success)"},children:[a.jsx("span",{className:"text-2xl font-extrabold sm:text-3xl","aria-hidden":"true",children:"O →"}),a.jsx("span",{className:"text-[0.7rem] font-semibold sm:text-[0.78rem]",children:y("swipe_o")})]})]})]}),v&&a.jsx("p",{role:"alert",className:"mt-3 rounded-lg border border-(--line-danger) bg-(--tint-danger) px-3 py-2 text-center text-sm text-(--fg-danger-on-tint)",children:y("grade_save_failed")})]})}const xe=o;return a.jsxs("section",{"aria-label":"Review session complete",className:"flex flex-col items-center justify-center gap-12 py-20 text-center",children:[a.jsxs("div",{className:"flex flex-col items-center gap-3",children:[a.jsx("p",{className:"text-[clamp(3.6rem,11vw,6rem)] font-extrabold leading-none tracking-[-0.05em] m-0 text-(--brand-teal)",children:xe>0?`+${xe}`:"0"}),a.jsx("p",{className:"text-(--fg-strong) text-[1.05rem] font-semibold m-0",children:y(xe===1?"word_got_stronger":xe===0?"keep_going":"words_got_stronger")}),i>0&&a.jsx("p",{className:"text-(--fg-muted) text-[0.82rem] m-0 mt-1",children:i===1?y("word_to_revisit",{count:i}):y("words_to_revisit",{count:i})})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",className:"primary-btn",onClick:()=>m(I),children:y("study_again")}),a.jsx(Ve,{href:"/console",className:"ghost-btn",children:y("orbit")})]})]})}function F8(){const{apiClient:e,handleReport:t,reportedViews:n}=Tn(),r=L8(e);return a.jsx("div",{className:"console-view",children:a.jsx(D8,{studyMode:r.studyMode,studyCards:r.studyCards,studyIndex:r.studyIndex,studyFlipped:r.studyFlipped,studyKnew:r.studyKnew,studyMissed:r.studyMissed,xRevealed:r.xRevealed,showSwipeHint:r.showSwipeHint,gradePending:r.gradePending,gradeError:r.gradeError,onStart
51Study:o=>{r.startStudySession(o)},onGrade:o=>r.gradeCard(o),onFlip:()=>r.setStudyFlipped(!0),onDismissX:()=>r.dismissX(),onExit:()=>r.setStudyMode("off"),onStudyAgain:o=>{r.startStudySession(o)},onReport:o=>t(o,"review"),reported:n.has("review")})})}function U8(e,t,n,r){const[o,i]=f.useState(r?"ready":"idle"),[s,l]=f.useState(null),[c,u]=f.useState(()=>r?Ds(r.allowed_hosts):""),[d,h]=f.useState(r?.palette_json??{}),[p,m]=f.useState(r?.capture_triggers??{overlay:!0,context_menu:!0,copy:!1}),[g,b]=f.useState(r?.definition_language??"en"),[v,x]=f.useState(r?.sentence_suggestions??{enabled:!0,words:!0,expressions:!0,grammar:!0}),E=f.useRef(Promise.resolve()),y=f.useRef(null),k=f.useRef(r?.definition_language??null);function I(_){const R=E.current.then(_);return E.current=R.then(()=>{},()=>{}),R}const C=f.useCallback(_=>{u(Ds(_.allowed_hosts)),h(_.palette_json),m(_.capture_triggers),b(_.definition_language??"en"),k.current=_.definition_language??"en",_.sentence_suggestions&&x(_.sentence_suggestions),i("ready"),l(null),Fs(_.capture_triggers)},[]);f.useEffect(()=>{r&&C(r)},[C,r]);function A(_,R,O,U){return ae(_,{context:R,route:U,method:O}),i("error"),l(jt(_,{method:O,path:U})),{ok:!1}}async function T(_){_?.silent||i("loading");try{const R=await e.getSettings();return C(R),!0}catch(R){return await Xe(R,{handle401:t,handle403:n})||(ae(R,{context:"settings_load",route:"/v1/settings",method:"GET"}),i("error"),l(jt(R,{method:"GET",path:"/v1/settings"}))),!1}}async function L(_){const R={capture_mode:"inbox",allowed_hosts:qu(c),capture_triggers:_},O=JSON.stringify(R);if(y.current!==O){y.current=O,i("saving");try{const U=await I(()=>e.updateCaptureSettings(R));if(y.current!==O)return;m(U.settings.capture_triggers),i("ready"),l(null),Fs(U.settings.capture_triggers)}catch(U){if(await Xe(U,{handle401:t,handle403:n}))return;if(y.current!==O){ae(U,{context:"settings_autosave_capture_stale",route:"/v1/settings/capture",method:"PUT"});return}
51y.current=null,A(U,"settings_autosave_capture","PUT","/v1/settings/capture")}}}async function D(){i("saving");try{const _=await I(()=>e.updateCaptureSettings({capture_mode:"inbox",allowed_hosts:qu(c),capture_triggers:p}));return u(Ds(_.settings.allowed_hosts)),m(_.settings.capture_triggers),i("ready"),l(null),Fs(_.settings.capture_triggers),{ok:!0}}catch(_){return await Xe(_,{handle401:t,handle403:n})?{ok:!1}:A(_,"settings_save_capture","PUT","/v1/settings/capture")}}async function S(_){if(k.current===_)return{ok:!0};k.current=_,i("saving");try{const R=await I(()=>e.updateDefinitionLanguage({definition_language:_}));return k.current!==_?{ok:!0}:(b(R.settings.definition_language??"en"),i("ready"),l(null),{ok:!0})}catch(R){return await Xe(R,{handle401:t,handle403:n})?{ok:!1}:k.current!==_?(ae(R,{context:"settings_save_definition_language_stale",route:"/v1/settings/definition-language",method:"PUT"}),{ok:!1}):(k.current=null,A(R,"settings_save_definition_language","PUT","/v1/settings/definition-language"))}}async function j(_){const R=v;i("saving"),l(null),x(_);try{return await I(()=>e.updateSentenceSuggestionSettings(_)),i("ready"),l(null),{ok:!0}}catch(O){return x(R),await Xe(O,{handle401:t,handle403:n})?(i("ready"),{ok:!1}
51):A(O,"settings_save_sentence_suggestions","PUT","/v1/settings/sentence-suggestions")}}function P(_,R){h(O=>({...O,[_]:R}))}async function M(){i("saving");try{const _=await I(()=>e.updatePaletteSettings({palette:d}));return h(_.settings.palette_json),i("ready"),l(null),{ok:!0}}catch(_){return await Xe(_,{handle401:t,handle403:n})?{ok:!1}:A(_,"settings_save_palette","PUT","/v1/settings/palette")}}return{settingsStatus:o,settingsError:s,sentenceSuggestions:v,saveSentenceSuggestions:j,allowedHostsText:c,setAllowedHostsText:u,palettePreview:d,setPalettePreview:h,captureTriggers:p,setCaptureTriggers:m,definitionLanguage:g,setDefinitionLanguage:b,loadSettings:T,saveCaptureSettings:D,saveCaptureWith:L,savePalettePreset:M,setPaletteColor:P,saveDefinitionLanguage:S}}function z8(e){const[t,n]=f.useState("unknown"),[r,o]=f.useState(!1);f.useEffect(()=>{Wl().then(s=>n(s?"connected":"disconnected"))},[]);async function i(){if(!(!e||e==="loading"||r)){o(!0);try{const s=await Rt(e),l=await zn(s,e.refreshToken);n(l?"connected":"disconnected")}catch(s){ae(s,{context:"extension_relink",route:"/console/settings"}),n("disconnected")}finally{o(!1)}}}return{extStatus:t,extRelinking:r,handleRelinkExtension:i}}async function B8(e,t){const n=await Promise.allSettled([Promise.resolve().then(()=>e.unsubscribePush(t.endpoint)),Promise.resolve().then(()=>t.unsubscribe())]),r=n.flatMap(o=>o.status==="rejected"?[o.reason]:[]);return{serverReleased:n[0].status==="fulfilled",browserReleased:n[1].status==="fulfilled",error:r.length===0?null:r.length===1?r[0]:new AggregateError(r,"browser_push_release_failed")}}async function $8(){return typeof navigator>"u"||!("serviceWorker"in navigator)?null:(await navigator.serviceWorker.getRegistration("/sw.js"))?.pushManager?.getSubscription()??null}function H8(e){return f.useEffect(()=>{(async()=>{const t=await $8();if(!t)return;const n=await B8(e,t);if(n.error)throw n.error})().catch(t=>{ae(t,{context:"push_retirement_cleanup",route:"/v1/notifications/subscribe",method:"DELETE"})})},[e]),{enabled:!1,permission:"unsupported",toggle:()=>{}}}let V8=0;function Xg(){const[e,t]=f.useState([]);function n(o,i){const s=String(++V8);t(l=>[...l,{id:s,type:o,message:i}]),setTimeout(()=>r(s),4e3)}function r(o){t(i=>i.filter(s=>s.id!==o))}return{toasts:e,addToast:n,dismissToast:r}}const dr=[{value:"en",label:"English"},{value:"ko",label:"한국어"},{value:"ja",label:"日本語"},{value:"zh",label:"中文"},{value:"zh-Hant",label:"繁體中文"},{value:"es-MX",label:"Español (México)"},{value:"pt-BR",label:"Português (Brasil)"},{value:"de-DE",label:"Deutsch"},{value:"fr-FR",label:"Français"}],La=new Map(dr.map(e=>[e.value.toLowerCase(),e.value]));function W8(e){return typeof e=="string"&&La.get(e.toLowerCase())===e}function hd(e){const t=e.toLowerCase().replace("_","-"),n=t.split("-")[0]??"en",r=La.get(t);if(r)return r;if(t==="zh-tw"||t==="zh-hk"||t==="zh-mo")return"zh-Hant";if(t==="zh-cn"||t==="zh-sg"||t==="zh-hans")return"zh";const o=La.get(n);if(o)return o;const i=dr.find(s=>s.value.toLowerCase().startsWith(`${n}-`));return i?i.value:"en"}function q8({settingsStatus:e,settingsError:t,captureTriggers:n,onCaptureTriggersChange:r,definitionLanguage:o,onDefinitionLanguageChange:i,extStatus:s,extRelinking:l,onRelinkExtension:c,vocabLanguages:u,palettePreview:d,onPaletteColorChange:h,onSavePalette:p,uiLocale:m,uiLocaleOptions:g,onUiLocaleChange:b,onDownloadExport:v,notifEnabled:x,notifPermission:E,onToggleNotifications:y,onReport:k,reported:I}){const[C,A]=f.useState(null),T=se("Console.settings"),L=e==="saving";return f.useEffect(()=>{A(El()?.href??null)},[]),a.jsxs("section",{"aria-label":"Settings",children:[e==="error"&&t&&a.jsx(So,{detail:t,onReport:k,reported:I}),a.jsx("p",{className:"settings-section-label",children:T("section_console")}),a.jsxs("div",{className:"settings-card mb-5",style:{"--card-i":0},children:[a.jsxs("div",{className:"settings-row",children:[a.jsx("div",{className:"settings-row-label",children:a.jsx("label",{htmlFor:"ui-language",className:"settings-label-text",children:T("ui_lang_label")})}),a.jsx("select",{id:"ui-language",className:"form-select settings-select",value:m,onChange:D=>b(D.target.value),children:g.map(D=>a.jsx("option",{value:D.value,children:D.label},D.value))})]}),a.jsx("div",{className:"settings-divider"}),a.jsxs("div",{className:"settings-row",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("span",{id:"review-reminders-label",className:"settings-label-text",children:T("notif_label")}),a.jsx("span",{className:"settings-label-hint",children:T(E==="denied"?"notif_desc_denied":E==="unsupported"?"notif_desc_unsupported":"notif_desc_
51normal")})]}),a.jsx("button",{type:"button",role:"switch","aria-checked":x,"aria-labelledby":"review-reminders-label",className:Te("settings-switch",x&&"settings-switch--on"),onClick:y,disabled:E==="denied"||E==="unsupported"})]})]}),a.jsx("p",{className:"settings-section-label",children:T("capture_title")}),a.jsx("div",{className:"settings-card mb-5",style:{"--card-i":1},children:a.jsxs("div",{className:"settings-row items-start",children:[a.jsx("div",{className:"settings-row-label",children:a.jsx("span",{className:"settings-label-text",children:T("capture_triggers_label")})}),a.jsx("div",{className:"flex flex-col gap-2.5",children:[{key:"overlay",labelKey:"trigger_overlay"},{key:"context_menu",labelKey:"trigger_context_menu"}].map(({key:D,labelKey:S})=>a.jsxs("label",{className:"settings-checkbox-row",children:[a.jsx("span",{className:Te("settings-checkbox",n[D]&&"settings-checkbox--checked"),"aria-hidden":"true",children:n[D]&&a.jsx(pm,{size:10,strokeWidth:3})}),a.jsx("input",{type:"checkbox",className:"sr-only",checked:n[D],onChange:j=>r({...n,[D]:j.target.checked})}),a.jsx("span",{className:"text-[0.84rem] text-(--fg-body) leading-snug",children:T(S)})]},D))})]})}),a.jsx("p",{className:"settings-section-label",children:T("section_vocab")}),a.jsxs("div",{className:"settings-card mb-5",style:{"--card-i":2},children:[a.jsxs("div",{className:"settings-row",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("label",{htmlFor:"definition-language",className:"settings-label-text",children:T("def_lang_label")}),a.jsx("span",{className:"settings-label-hint",children:T("def_lang_hint")})]}),a.jsx("select",{id:"definition-language",className:"form-select settings-select",value:o,onChange:D=>i(D.target.value),children:dr.map(({value:D,label:S})=>a.jsx("option",{value:D,children:S},D))})]}),a.jsx("div",{className:"settings-divider"}),a.jsxs("div",{className:"settings-row items-start",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("span",{className:"settings-label-text",children:T("palette_title")}),a.jsx("span",{className:"settings-label-hint",children:T("palette_hint")})]}),a.jsx("div",{className:"settings-palette-control",children:u.length>0?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"settings-palette-list",children:u.map(D=>{const S=d[D]??"#94A3B8";return a.jsxs("label",{className:"settings-palette-chip",title:T("palette_change_color",{lang:D}),children:[a.jsx("span",{className:"settings-palette-swatch",style:{backgroundColor:S},children:a.jsx("input",{type:"color",className:"absolute -inset-2 size-11 cursor-pointer opacity-0",value:S,onChange:j=>h(D,j.target.value),"aria-label":T("palette_color_label",{lang:D})})}),a.jsx("span",{className:"settings-palette-chip-label",children:D})]},D)})}),a.jsx("div",{className:"settings-actions",children:a.jsx("button",{type:"button",className:"primary-btn",onClick:p,disabled:L,children:T(L?"saving":"palette_save")})})]}):a.jsx("p",{className:"text-[0.83rem] text-(--fg-muted)",children:T("palette_no_vocab")})})]})]}),a.jsx("p",{className:"settings-section-label",children:T("section_data")}),a.jsx("div",{className:"settings-card mb-5",style:{"--card-i":2},children:a.jsxs("div",{className:"settings-row",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("span",{className:"settings-label-text",children:T("export_title")}),a.jsx("span",{className:"settings-label-hint",children:T("export_hint")})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",className:"secondary-btn",onClick:()=>v("csv"),children:"CSV"}),a.jsx("button",{type:"button",className:"secondary-btn",onClick:()=>v("json"),children:"JSON"})]})]})}),a.jsx("p",{className:"settings-section-label",children:T("extension_title")}),a.jsx("div",{className:"settings-card mb-5",style:{"--card-i":3},children:a.jsxs("div",{className:"settings-row",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("span",{className:"settings-label-text",children:T("ext_status_label")}),s==="disconnected"&&C?a.jsxs("span",{className:"settings-label-hint",children:[a.jsx("a",{href:C,target:"_blank",rel:"noopener noreferrer",className:"text-(--brand-teal) 
51no-underline hover:underline",children:T("ext_install_link")})," ",T("ext_install_suffix")]}):null]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[s==="connected"?a.jsx(H6,{size:14,strokeWidth:2,className:"text-(--state-success) shrink-0","aria-hidden":"true"}):s==="disconnected"?a.jsx(G6,{size:14,strokeWidth:2,className:"text-(--fg-muted) shrink-0","aria-hidden":"true"}):a.jsx(p3,{size:13,strokeWidth:2,className:"text-(--fg-muted) shrink-0 animate-spin","aria-hidden":"true"}),a.jsx("span",{className:"text-[0.84rem] text-(--fg-body)",children:T(s==="connected"?"ext_connected":s==="disconnected"?"ext_not_detected":"ext_checking")})]}),a.jsx("button",{type:"button",className:"ghost-btn shrink-0",onClick:c,disabled:l,children:T(l?"ext_relinking":"ext_relink")})]})]})})]})}function Jl({open:e,title:t,description:n,acknowledgementLabel:r,confirmLabel:o,cancelLabel:i,onConfirm:s,onCancel:l}){const c=se("Console.common"),[u,d]=f.useState(!1),h=f.useRef(null),p=f.useRef(!1);e&&!p.current&&(h.current=document.activeElement),p.current=e;function m(){d(!1),h.current?.focus(),l()}function g(){r&&!u||(d(!1),s())}return a.jsx(io,{open:e,onOpenChange:b=>!b&&m(),children:a.jsxs(so,{children:[a.jsx(ao,{className:"confirm-dialog__overlay"}),a.jsxs(lo,{className:"confirm-dialog__content","aria-describedby":"confirm-dialog-desc",children:[a.jsx(co,{className:"confirm-dialog__title",children:t}),a.jsx(Bi,{asChild:!0,children:a.jsxs("div",{id:"confirm-dialog-desc",className:"confirm-dialog__desc",children:[a.jsx("p",{children:n}),r&&a.jsxs("label",{className:"mt-4 flex min-h-11 cursor-pointer items-start gap-3 text-left",children:[a.jsx("input",{type:"checkbox",className:"mt-1 size-4 shrink-0 accent-(--state-danger)",checked:u,onChange:b=>d(b.target.checked)}),a.jsx("span",{children:r})]})]})}),a.jsxs("div",{className:"confirm-dialog__actions",children:[a.jsx("button",{type:"button",className:"confirm-dialog__cancel",onClick:m,children:i??c("cancel")}),a.jsx("button",{type:"button",className:"confirm-dialog__confirm",onClick:g,disabled:!!r&&!u,children:o??c("confirm")})]})]})]})})}function G8({authUser:e,deleteState:t,onSignOut:n,onDeleteAccount:r,onUpdateDisplayName:o}){const i=se("Console.profile"),s=typeof e=="object"&&e!==null?e:null,l=s?.email??null,c=s?.providerData?.map(M=>M.providerId)??[],u=c.includes("google.com")?"signin_method_google":c.includes("apple.com")?"signin_method_apple":"signin_method_email",[d,h]=f.useState(s?.displayName??""),[p,m]=f.useState(s?.displayName??""),[g,b]=f.useState("idle"),[v,x]=f.useState(!1),[E,y]=f.useState(!1),[k,I]=f.useState("idle"),[C,A]=f.useState(""),T=c.includes("google.com")?"google.com":c.includes("apple.com")?"apple.com":c.includes("password")?"password":null,L=d.trim(),D=L!==p.trim();f.useEffect(()=>{const M=s?.displayName??"";h(M),m(M)},[s?.uid,s?.displayName]);async function S(){if(g==="saving"||!D)return;b("saving");const M=await o(L);M.ok&&(h(L),m(L)),b(M.ok?"saved":"error"),setTimeout(()=>b("idle"),2800)}function j(){x(!1),I("idle"),A(""),y(!0)}async function P(M){if(!s||!T){I("error"),A(i("reauth_unavailable"));return}I("loading"),A("");try{await RS(s,T,M),y(!1),r()}catch{I("error"),A(i("reauth_error"))}}return a.jsxs(a.Fragment,{children:[a.jsx(Jl,{open:v,title:i("delete_dialog_title"),description:i("delete_dialog_desc"),acknowledgementLabel:i("delete_dialog_acknowledge"),confirmLabel:i("delete_dialog_confirm"),cancelLabel:i("cancel"),onConfirm:j,onCancel:()=>x(!1)}),T&&s&&a.jsx(K8,{open:E,provider:T,email:l??"",state:k,error:C,onSubmit:M=>{P(M)},onCancel:()=>y(!1)}),a.jsxs("section",{"aria-label":"Profile",className:"mt-2",children:[a.jsx("p",{className:"settings-section-label",children:i("title")}),a.jsx("div",{className:"settings-card mb-5",style:{"--card-i":4},children:l!==null?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"settings-row items-start",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("label",{htmlFor:"display-name",className:"settings-label-text",children:i("display_name_label")}),a.jsx("span",{className:"settings-label-hint",children:i("display_name_hint")})]}),a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("input",{id:"display-name",type:"text",className:"form-input settings-text-input",value:d,onChange:M=>h(M.target.value),placeholder:i("display_name_placeholder"),maxLength:40,onKeyDown:M=>{M.key==="Enter"&&S()}}),a.jsx("button",{type:"button",className:"primary-btn shrink-0",onClick:()=>{S()},disabled:g==="saving"||!D,children:i(g==="saving"?"saving":"save")})]}),g==="saved"&&a.jsx("p",{className:"text-[0.78rem] text-(--state-success)",children:i("display_name_saved")}),g==="error"&&a.jsx("p",{className:"text-[0.78rem] text-(--state-danger)",children:i("display_name_error")})]})]}),a.jsx("div",{className:"settings-divider"}),a.jsxs("div",{className:"settings-row",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("span",{className:"settings-label-text",children:i("email_label")}),a.jsx("span",{className:"settings-label-hint",children:i(u)})]}),a.jsx("span",{className:"text-[0.88rem] text-(--fg-body) font-medium",children:l})]}),a.jsx("div",{className:"settings-divider"}),a.jsxs("div",{className:"settings-row",children:[a.jsx("div",{className:"settings-row-label",children:a.jsx("span",{className:"settings-label-text",children:i("session_label")})}),a.jsx("button",{type:"button",className:"secondary-btn",onClick:n,children:i("sign_out")})]})]}):a.jsx("div",{className:"py-3",children:a.jsx("p",{className:"text-[0.84rem] text-(--fg-muted)",children:e==="loading"?i("loading"):"—"})})}),a.jsx("p",{className:"settings-section-label settings-section-label--danger",children:i("danger_zone_title")}),a.jsx("div",{className:"settings-card settings-card--danger",style:{"--card-i":5},children:a.jsxs("div",{className:"settings-row",children:[a.jsxs("div",{className:"settings-row-label",children:[a.jsx("span",{className:"settings-label-text",children:i("delete_account")}
51),a.jsx("span",{className:"settings-label-hint",children:i("danger_zone_desc")}),t==="error"&&a.jsx("span",{className:"text-[0.78rem] text-(--state-danger) mt-0.5 block",children:i("delete_error")})]}),a.jsx("button",{type:"button",className:"danger-btn shrink-0",disabled:t==="loading"||!s,onClick:()=>x(!0),children:i(t==="loading"?"deleting":"delete_account")})]})})]})]})}function K8({open:e,provider:t,email:n,state:r,error:o,onSubmit:i,onCancel:s}){const l=se("Console.profile"),[c,u]=f.useState(""),d=r==="loading";f.useEffect(()=>{e||u("")},[e]);function h(p){p.preventDefault(),i(t==="password"?c:void 0)}return a.jsx(io,{open:e,onOpenChange:p=>!p&&s(),children:a.jsxs(so,{children:[a.jsx(ao,{className:"confirm-dialog__overlay"}),a.jsxs(lo,{className:"confirm-dialog__content","aria-describedby":"reauth-dialog-desc",children:[a.jsx(co,{className:"confirm-dialog__title",children:l("reauth_title")}),a.jsx(Bi,{asChild:!0,children:a.jsxs("div",{id:"reauth-dialog-desc",className:"confirm-dialog__desc",children:[a.jsx("p",{children:l("reauth_desc")}),a.jsx("p",{className:"mt-3 break-all text-(--fg-muted)",children:n}),t==="password"?a.jsxs("div",{className:"auth-field mt-5",children:[a.jsx("label",{className:"auth-label",htmlFor:"reauth-password",children:l("reauth_password_label")}),a.jsx("input",{id:"reauth-password",className:"auth-input",type:"password",autoComplete:"current-password",value:c,onChange:p=>u(p.target.value),placeholder:l("reauth_password_placeholder"),disabled:d,autoFocus:!0})]}):a.jsx("p",{className:"mt-5 text-(--fg-body)",children:l(t==="google.com"?"reauth_google_desc":"reauth_apple_desc")}),r==="error"&&a.jsx("p",{className:"auth-feedback auth-feedback--error mt-4",role:"alert",children:o})]})}),a.jsxs("form",{className:"confirm-dialog__actions",onSubmit:h,children:[a.jsx("button",{type:"button",className:"confirm-dialog__cancel",onClick:s,children:l("reauth_cancel")}),a.jsx("button",{type:"submit",className:"confirm-dialog__confirm",disabled:d||t==="password"&&!c,children:l(d?"reauth_loading":t==="google.com"?"reauth_google":t==="apple.com"?"reauth_apple":"reauth_confirm")})]})]})]})})}function X8(){const{apiClient:e,handle401:t,handle403:n,authUser:r,handleSignOut:o,downloadExport:i,theme:s,setPalette:l,settingsSnapshot:c,handleReport:u,reportedViews:d}=Tn(),h=U8(e,t,n,c),p=z8(typeof r!="string"?r:null),m=H8(e),g=Xg(),b=se("Console.settings"),v=se("Console.profile"),x=f.useRef(h.loadSettings),[E,y]=f.useState([]),[k,I]=f.useState("idle");f.useEffect(()=>{x.current=h.loadSettings},[h.loadSettings]),f.useEffect(()=>{x.current(),e.listVocabLanguages().then(({languages:O})=>y(O)).catch(async O=>{await Xe(O,{handle401:t,handle403:n})||ae(O,{context:"settings_vocab_languages",route:"/v1/vocab/languages",method:"GET"})})},[e,t,n]),f.useEffect(()=>{if(h.settingsStatus!=="ready"||E.length===0)return;const O=o8(),$={...h.palettePreview};let w=!1;for(const te of E)$[te]||($[te]=Xl({language:te,palette:O}),w=!0);w&&h.setPalettePreview($)},[s,E,h.settingsStatus]);const C=Mt(),A=$1(C),T=H1(A),L=Hh(),D=Ja();function S(O){L.replace(D,{locale:O})}async function j(){(await h.savePalettePreset()).ok?(l(h.palettePreview),g.addToast("success",b("toast_palette_saved"))):g.addToast("error",b("toast_save_failed"))}async function P(O){const U=typeof r=="object"&&r!==null?r:null;if(!U)return{ok:!1};try{return await US(U,O),{ok:!0}}catch($){return ae($,{context:"profile_display_name_update",route:"/console/settings"}),{ok:!1}}}async function M(){I("loading");try{await e.deleteAccount(),ja(),await o()}catch(O){ae(O,{context:"profile_delete_account",route:"/v1/account",method:"DELETE"}),I("error");const U=O instanceof Ut&&O.status===403&&O.responseBody?.includes("recent_login_required");g.addToast("error",v(U?"delete_recent_login":"delete_error"))}}async function _(O){await i(O)||g.addToast("error",b("toast_export_failed"))}const R=g.toasts.map(O=>({id:O.id,type:O.type,message:O.message}));return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"console-view",children:[a.jsx(q8,{settingsStatus:h.settingsStatus,settingsError:h.settingsError,captureTriggers:h.captureTriggers,onCaptureTriggersChange:O=>
51{h.setCaptureTriggers(O),h.saveCaptureWith(O)},definitionLanguage:h.definitionLanguage,onDefinitionLanguageChange:O=>{h.setDefinitionLanguage(O),h.saveDefinitionLanguage(O)},extStatus:p.extStatus,extRelinking:p.extRelinking,onRelinkExtension:()=>{p.handleRelinkExtension()},vocabLanguages:E,palettePreview:h.palettePreview,onPaletteColorChange:h.setPaletteColor,onSavePalette:()=>{j()},uiLocale:A,uiLocaleOptions:T,onUiLocaleChange:S,onDownloadExport:O=>{_(O)},notifEnabled:m.enabled,notifPermission:m.permission,onToggleNotifications:()=>{},onReport:O=>u(O,"settings"),reported:d.has("settings")}),a.jsx(G8,{authUser:r,deleteState:k,onSignOut:()=>{o()},onDeleteAccount:()=>{M()},onUpdateDisplayName:P})]}),a.jsx(Kl,{toasts:R,onDismiss:g.dismissToast})]})}async function Y8(e,t=100){let n=0;for(let r=1;r<=t;r++){const o=await e();if(n+=o.deleted,!o.has_more)return{deleted:n,calls:r};if(o.deleted===0)throw new Error("trash_drain_no_progress")}throw new Error("trash_drain_limit_exceeded")}async function J8(e,t,n){try{await Y8(e),t()}catch(r){await n(r)}}function Z8(){const{apiClient:e,handle401:t,handle403:n,isReady:r,setHeaderActions:o}=Tn(),i=se("Console.trash"),s=se("Console.common"),[l,c]=f.useState([]),[u,d]=f.useState("idle"),[h,p]=f.useState(null),[m,g]=f.useState(!1),[b,v]=f.useState(new Set),[x,E]=f.useState(!1),[y,k]=f.useState(!1),I=f.useCallback(async(S,j,P,M)=>{await Xe(S,{handle401:t,handle403:n})||(ae(S,{context:j,route:P,method:M}),d("error"))},[t,n]),C=f.useCallback(async S=>{S||d("loading");try{const j=await e.listTrash(S?{cursor:S}:void 0);c(P=>S?[...P,...j.items]:j.items),p(j.nextCursor),d("ready")}catch(j){await I(j,"trash_load","/v1/vocab/trash","GET")}},[e,I]);f.useEffect(()=>{r&&C()},[r]),f.useEffect(()=>{if(u!=="ready"||l.length===0){o(null);return}return o(a.jsx("button",{type:"button",className:"ghost-btn py-1.5! px-3! text-sm! text-(--fg-muted) hover:text-(--accent-danger) hover:bg-[color-mix(in_srgb,var(--accent-danger)_8%,transparent)] transition-colors duration-150",onClick:()=>E(!0),children:i("empty_trash")})),()=>o(null)},[u,l.length,o,i]);async function A(S){v(j=>new Set(j).add(S));try{await e.restoreVocab(S),c(j=>j.filter(P=>P.id!==S))}catch(j){await I(j,"trash_restore","/v1/vocab/:id/restore","POST")}finally{v(j=>{const P=new Set(j);return P.delete(S),P})}}async function T(S){v(j=>new Set(j).add(S));try{await e.deleteVocab(S),c(j=>j.filter(P=>P.id!==S))}catch(j){await I(j,"trash_delete","/v1/vocab/:id","DELETE")}finally{v(j=>{const P=new Set(j);return P.delete(S),P})}}async function L(){h&&(g(!0),await C(h),g(!1))}async function D(){k(!0);try{await J8(()=>e.emptyTrash(),()=>{c([]),p(null)},async S=>{await I(S,"trash_empty","/v1/vocab/trash","DELETE"),await C()})}finally{k(!1),E(!1)}}return a.jsxs("section",{className:"console-view","aria-label":"Trash",children:[a.jsx("h1",{className:"sr-only",children:"Trash"}),u==="loading"?a.jsx("div",{className:"inbox-table",children:a.jsx("ul",{className:"m-0 list-none p-0","aria-busy":"true",children:[1,2,3].map(S=>a.jsxs("li",{className:"inbox-table-row animate-pulse",children:[a.jsxs("div",{className:"inbox-table-word",children:[a.jsx("div",{className:"h-3.5 w-2/5 rounded bg-(--line-soft) mb-1.5"}),a.jsx("div",{className:"h-2.5 w-1/4 rounded bg-(--line-soft)"})]}),a.jsx("div",{className:"inbox-table-action-cell",children:a.jsx("div",{className:"h-6 w-28 rounded-full bg-(--line-soft)"})})]},S))})}):u==="error"?a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"error-msg",children:i("failed_to_load")}),a.jsx("button",{type:"button",className:"retry-btn mt-3",onClick:()=>{C()},children:s("retry")})]}):l.length===0?a.jsxs("div",{className:"console-empty-panel",children:[a.jsx("p",{className:"console-empty-title",children:i("empty_title")}),a.jsx("p",{className:"console-empty-copy",children:i("empty_copy")})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"rounded-[1.2rem] border border-(--line-soft) overflow-hidden bg-[color-mix(in_srgb,var(--bg-elevated)_50%,transparent)]",children:a.jsx("ul",{className:"m-0 list-none p-0",children:l.map(S=>a.jsxs("li",{className:"group flex items-center gap-4 min-h-[58px] px-5 py-3 border-b border-(--line-soft) last:border-b-0 transition-colors duration-150 hover:bg-[color-mix(in_srgb,var(--bg-elevated)_70%,transparent)]",children:[a.jsxs("div",{className:"flex-1 flex flex-col justify-center gap-0.5 min-w-0 pr-2",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx("span",{className:"text-[0.9rem] font-[500] tracking-[-0.01em] text-(--fg-strong) truncate",children:S.surface}),S.language&&S.language!=="unknown"&&a.jsx("span",{className:"shrink-0 text-[0.6rem] font-[700] uppercase tracking-[0.07em] text-(--fg-muted) bg-(--line-soft) rounded-[3px] px-[0.32rem] py-[0.1rem]",children:S.language})]}),S.definition&&a.jsx("span",{className:"text-[0.72rem] text-(--fg-muted) truncate leading-[1.35]",children:S.definition})]}),a.jsxs("div",{className:"flex items-center gap-1.5 shrink-0 opacity-50 group-hover:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity duration-150",children:[a.jsx("button",{type:"button",className:"h-[28px] px-[0.85rem] rounded-full text-[0.72rem] font-[600] cursor-pointer bg-[color-mix(in_srgb,var(--accent-success)_15%,transparent)] text-(--fg-success-on-tint) hover:bg-[color-mix(in_srgb,var(--accent-success)_28%,transparent)] transition-colors duration-140 active:scale-[0.96] disabled:opacity-35 disabled:cursor-not-allowed",onClick:()=>{A(S.id)},disabled:b.has(S.id),children:b.has(S.id)?"…":i("restore")}),a.jsx("button",{type:"button",className:"h-[28px] px-[0.85rem] rounded-full text-[0.72rem] font-[600] cursor-pointer bg-transparent text-(--fg-muted) hover:bg-[color-mix(in_srgb,var(--accent-danger)_12%,transparent)] hover:text-(--fg-danger-on-tint) transition-all duration-140 active:scale-[0.96] disabled:opacity-35 disabled:cursor-not-allowed",onClick:()=>{T(S.id)},disabled:b.has(S.id),children:i("delete")})]})]},S.id))})}),h&&a.jsx("button",{type:"button",className:"load-more-btn",onClick:()=>{L()},disabled:m,children:s(m?"loading":"load_more")})]}),a.jsx(Jl,{open:x,title:i("empty_trash_confirm_title"),description:i("empty_trash_confirm_desc"),confirmLabel:i(y?"emptying":"empty_trash_confirm_action"),cancelLabel:s("cancel"),onConfirm:()=>{D()},onCancel:()=>E(!1)})]})}const Yg=[{value:"en",label:"English"},{value:"ko",label:"Korean"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"other",label:"Other"}],Jg=[{value:"noun",label:"Noun"},{value:"verb",label:"Verb"},{value:"adjective",label:"Adjective"},{value:"adverb",label:"Adverb"},{value:"other",label:"Other"}],Q8={en:"en-US",ko:"ko-KR",ja:"ja-JP",zh:"zh-CN",es:"es-ES",fr:"fr-FR",de:"de-DE"};function eE({open:e,onClose:t,onCreate:n}){const r=se("Console.vocab"),o=se("Console.common"),[i,s]=f.useState(""),[l,c]=f.useState("en"),[u,d]=f.useState(""),[h,p]=f.useState("noun"),[m,g]=f.useState(!1),[b,v]=f.useState(null),x=f.useRef(null);f.useEffect(()=>{e||(s(""),d(""),c("en"),p("noun"),g(!1),v(null))},[e]);async function E(y){y.preventDefault();const k=i.trim();if(!(!k||m)){g(!0),v(null);try{await n({surface:k,language:l,pos:h,definition:u.trim()||null}),t()}catch(I){ae(I,{context:"manual_add_word"}),v(r("manual_error"))}finally{g(!1)}}}return a.jsx(io,{open:e,onOpenChange:y=>!y&&t(),children:a.jsxs(so,{children:[a.jsx(ao,{className:"fixed inset-0 z-40 bg-[rgba(12,17,24,0.28)] backdrop-blur-[6px]"}),a.jsxs(lo,{"aria-describedby":void 0,className:"fixed bottom-0 right-0 top-0 z-50 flex w-full max-w-[440px] flex-col border-l border-(--glass-stroke) bg-[linear-gradient(180deg,color-mix(in_srgb,var(--bg-elevated)_94%,transparent),color-mix(in_srgb,var(--bg-panel)_88%,transparent))] shadow-[var(--shadow-panel)] backdrop-blur-[22px] animate-[slideInRight_220ms_ease_both]",onOpenAutoFocus:y=>{y.preventDefault(),x.current?.focus()},children:[a.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-(--line-soft) shrink-0",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[0.68rem] font-bold uppercase tracking-[0.12em] text-(--fg-muted)",children:r("manual_eyebrow")}),a.jsx(co,{className:"m-0 text-[1.5rem] leading-none text-(--fg-strong)",style:{fontFamily:"var(--font-display-web)"},children:r("manual_title")})]}),a.jsx(ga,{asChild:!0,children:a.jsx("button",{type:"button",className:"ghost-btn !py-1 !px-2","aria-label":r("share_card_close"),children:a.jsx(Xn,{size:18,strokeWidth:2,"aria-hidden":"true"})})})]}),a.jsxs("form",{className:"flex-1 overflow-y-auto p-5 flex flex-col gap-4",onSubmit:E,children:[a.jsxs("div",{children:[a.jsxs("label",{className:"form-label",htmlFor:"manual-surface",children:[r("header_word")," ",a.jsx("span",{className:"text-(--state-danger)",children:"*"})]}),a.jsx("input",{id:"manual-surface",ref:x,className:"form-input w-full",value:i,onChange:y=>s(y.target.value),placeholder:"e.g. ephemeral",autoComplete:"off"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"form-label",htmlFor:"manual-language",children:r("filter_language")}),a.jsx("select",{id:"manual-language",className:"form-select w-full",value:l,onCh
51ange:y=>c(y.target.value),children:Yg.map(y=>a.jsx("option",{value:y.value,children:y.label},y.value))})]}),a.jsxs("div",{children:[a.jsx("label",{className:"form-label",htmlFor:"manual-pos",children:r("manual_pos")}),a.jsx("select",{id:"manual-pos",className:"form-select w-full",value:h,onChange:y=>p(y.target.value),children:Jg.map(y=>a.jsx("option",{value:y.value,children:y.label},y.value))})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"form-label",htmlFor:"manual-definition",children:[r("header_definition")," ",a.jsxs("span",{className:"text-(--fg-muted) font-normal",children:["(",r("manual_optional"),")"]})]}),a.jsx("textarea",{id:"manual-definition",className:"form-input w-full resize-none",rows:3,value:u,onChange:y=>d(y.target.value),placeholder:r("manual_definition_placeholder")})]}),b?a.jsx("p",{className:"text-[0.8rem] text-(--state-danger)",role:"alert",children:b}):null,a.jsxs("div",{className:"flex gap-3 mt-2",children:[a.jsx("button",{type:"submit",disabled:m||i.trim().length===0,className:"primary-btn flex-1 disabled:opacity-50 disabled:cursor-not-allowed",children:m?o("loading"):r("manual_submit")}),a.jsx(ga,{asChild:!0,children:a.jsx("button",{type:"button",className:"ghost-btn",children:o("cancel")})})]})]})]})]})})}function tE(e){const t=Yl(e);return t==="familiar"?"familiar":t==="established"||t==="mastered"?"owned":"learning"}function nE(e,t,n,r){return e==="ready"&&(t.length===0||r&&n.length===0)}function rE(e,t,n,r){if(!e)return"—";const o=new Date(e).getTime()-Date.now(),i=Math.ceil(o/(1e3*60*60*24));return i<=0?t:i===1?n:r(i)}function fd(e){return e==="adjective"?"adj.":e==="noun"?"n.":e==="verb"?"v.":e==="adverb"?"adv.":e}function oE(){const e=se("Console.vocab");return a.jsxs("div",{className:"vocab-table-header","aria-hidden":"true",children:[a.jsx("span",{className:"vocab-table-label",children:e("header_word")}),a.jsx("span",{className:"vocab-table-label vocab-table-col--definition",children:e("header_definition")}),a.jsx("span",{className:"vocab-table-label vocab-table-col--status",children:e("header_status")}),a.jsx("span",{className:"vocab-table-label vocab-table-col--review",children:e("header_next_review")}),a.jsx("span",{className:"vocab-table-action-cell"})]})}function iE({item:e,selected:t,langColor:n,onSelect:r,mergeMode:o,isMergeSource:i,onMergeTarget:s,index:l=0}){const c=se("Console.vocab"),u=rE(e.next_review_at,c("due"),c("one_day"),p=>c("n_days",{days:p})),d=e.stability!=null?tE(e.stability):null,h=Co(e);return o&&!i?a.jsxs("li",{className:"vocab-table-row",style:{"--i":Math.min(l,15)},children:[a.jsxs("div",{className:"vocab-table-word",children:[a.jsx("span",{className:"vocab-table-surface",children:h.surface}),h.pos&&h.pos!=="other"&&a.jsx("span",{className:"vocab-pos-label",children:fd(h.pos)})]}),a.jsx("div",{className:"vocab-table-col vocab-table-col--definition"}),a.jsx("div",{className:"vocab-table-col vocab-table-col--status"}),a.jsx("div",{className:"vocab-table-col vocab-table-col--review"}),a.jsx("span",{className:"vocab-table-action-cell",children:a.jsx("button",{type:"button",className:"ghost-btn py-1! px-2.5! text-xs! opacity-80 hover:opacity-100",onClick:()=>s?.(e),children:c("merge_here")})})]}):a.jsxs("li",{role:"button",tabIndex:0,style:{"--i":Math.min(l,15)},className:`vocab-table-row${t?" is-selected":""}${i?" opacity-40 pointer-events-none":""}`,onClick:()=>r(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&r(e)},children:[a.jsxs("div",{className:"vocab-table-word",children:[a.jsx("span",{className:"vocab-table-surface",children:h.surface}),h.pos&&h.pos!=="other"&&a.jsx("span",{className:"vocab-pos-label",children:fd(h.pos)}),e.lemma&&e.lemma!==h.surface&&a.jsx("span",{className:"vocab-table-lemma",children:e.lemma})]}),a.jsx("div",{className:"vocab-table-col vocab-table-col--definition",children:a.jsx("span",{className:"vocab-definition-text",children:h.definition||"—"})}),a.jsx("div",{className:"vocab-table-col vocab-table-col--status",children:d?a.jsx("span",{className:`vocab-status-badge vocab-status-badge--${d}`,children:c(`stage_${d==="owned"?"mastered":d}`)}):"—"}),a.jsx("div",{className:"vocab-table-col vocab-table-col--review",children:a.jsx("span",{className:u===c("due")?"text-[0.8rem] font-semibold text-(--fg-success)":"text-[0.8rem] text-(--fg-muted)",children:u})}),a.jsx("span",{className:"vocab-table-action-cell","aria-hidden":"true",children:a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 15 15",fill:"none",children:a.jsx("path",{d:"M6.14645 3.14645C6.34171 2.95118 6.65829 2.95118 6.85355 3.14645L10.8536 7.14645C11.0488 7.34171 11.0488 7.65829 10.8536 7.85355L6.85355 11.8536C6.65829 12.0488 6.34171 12.0488 6.14645 11.8536C5.95118 11.6583 5.95118 11.3417 6.14645 11.1464L9.79289 7.5L6.14645 3.85355C5.95118 3.65829 5.95118 3.34171 6.14645 3.14645Z",fill:"currentColor"})})})]})}function sE({vocabItems:e,filteredItems:t,vocabStatus:n,vocabError:r,vocabCursor:o,vocabLoadingMore:i,vocabLanguage:s,vocabSort:l,searchQuery:c,selectedItemId:u,vocabTotal:d=null,palette:h={},mergeSourceId:p=null,onSearchQueryChange:m,onVocabLanguageChange:g,onVocabSortChange:b,onApplyFilter:v,onClearFilters:x,onLoadMoreVocab:E,onSelectItem:y,onManualAdd:k,onMergeTarget:I,onMergeCancel:C,onReport:A,reported:T}){const L=se("Console.vocab"),D=se("Console.common"),[S,j]=f.useState(!1),[P,M]=f.useState(!1),[_,R]=f.useState("all"),O=!!(s||c.trim()||l!=="updated_desc"||_!=="all"),U=f.useMemo(()=>[...new Set(e.map(K=>
51K.language).filter(Boolean))].sort(),[e]),$={updated_desc:L("sort_updated_desc"),alpha_asc:L("sort_alpha_asc"),stability_desc:L("sort_stability_desc"),created_desc:L("sort_created_desc")},w=_==="all"?t:t.filter(K=>{const N=K.stability??0;return _==="learning"?N<7:_==="familiar"?N>=7&&N<60:N>=60});function te(){j(!1),R("all"),x()}return a.jsxs(a.Fragment,{children:[a.jsxs("section",{className:"vocab-library","aria-label":"Vocabulary library",children:[a.jsx("h1",{className:"sr-only",children:"Vocabulary"}),p&&a.jsxs("div",{className:"flex items-center gap-3 rounded-[10px] border border-(--brand-teal) bg-[rgba(92,197,255,0.07)] px-4 py-3 mb-1",children:[a.jsx("span",{className:"text-[0.82rem] text-(--brand-teal) flex-1",children:L("merge_banner")}),a.jsx("button",{type:"button",className:"ghost-btn py-1! px-3! text-xs!",onClick:C,children:L("merge_cancel")})]}),a.jsxs("div",{className:"vocab-toolbar",children:[a.jsxs("div",{className:"vocab-toolbar-main",children:[n==="ready"&&e.length>0&&a.jsxs("span",{className:"vocab-count-label",children:[w.length,O?`/${d??e.length}`:""," ",L("filter_words")]}),a.jsx("button",{type:"button",className:"ghost-btn py-1.5! px-3! text-sm!",onClick:()=>M(!0),children:L("add_manually")}),a.jsxs("button",{hidden:n==="ready"&&e.length===0,type:"button",className:`vocab-filter-btn${S?" is-open":""}${O&&!S?" has-active":""}`,onClick:()=>j(K=>!K),"aria-expanded":S,children:[a.jsx("svg",{width:"13",height:"13",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M1 3.5C1 3.22386 1.22386 3 1.5 3H13.5C13.7761 3 14 3.22386 14 3.5C14 3.77614 13.7761 4 13.5 4H1.5C1.22386 4 1 3.77614 1 3.5ZM3 7.5C3 7.22386 3.22386 7 3.5 7H11.5C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8H3.5C3.22386 8 3 7.77614 3 7.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12H9.5C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11H5.5Z",fill:"currentColor"})}),L("filter_btn"),O&&!S&&a.jsx("span",{className:"vocab-filter-dot","aria-hidden":"true"})]})]}),S&&a.jsxs("div",{className:"vocab-filter-panel",children:[a.jsx("div",{className:"vocab-stage-row",children:["all","learning","familiar","mastered"].map(K=>a.jsxs("button",{type:"button",className:`vocab-stage-pill${_===K?" is-active":""}`,onClick:()=>R(K),children:[_===K&&K!=="all"&&a.jsx("span",{className:"w-1.5 h-1.5 rounded-full shrink-0",style:{backgroundColor:`var(--orbit-legend-${K==="learning"?"learning":K==="familiar"?"familiar":"mastered"})`},"aria-hidden":"true"}),L(`stage_${K}`)]},K))}),a.jsxs("div",{className:"vocab-filter-row",children:[a.jsxs("label",{className:"vocab-search-wrap",style:{flex:1},children:[a.jsx("span",{className:"sr-only",children:"Search vocabulary"}),a.jsx("svg",{width:"14",height:"14",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",className:"vocab-search-icon",children:a.jsx("path",{d:"M6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5C7.65834 11.5 8.72479 11.1074 9.57352 10.4481L12.262 13.1365C12.4572 13.3318 12.7738 13.3318 12.9691 13.1365C13.1643 12.9413 13.1643 12.6247 12.9691 12.4294L10.2807 9.74103C10.94 8.8923 11.3326 7.82585 11.3326 6.66751C11.3326 3.90609 9.09404 1.66751 6.33262 1.66751L6.5 1.5ZM2.5 6.5C2.5 4.29086 4.29086 2.5 6.5 2.5C8.70914 2.5 10.5 4.29086 10.5 6.5C10.5 8.70914 8.70914 10.5 6.5 10.5C4.29086 10.5 2.5 8.70914 2.5 6.5Z",fill:"currentColor"})}),a.jsx("input",{className:"vocab-search-input",value:c,onChange:K=>m(K.target.value),placeholder:L("search_placeholder"),autoFocus:!0}),c&&a.jsx("button",{type:"button",className:"vocab-search-clear",onClick:()=>m(""),"aria-label":"Clear search",children:a.jsx("svg",{width:"11",height:"11",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor"})})})]}),a.jsxs("span",{className:"vocab-filter-select-wrap",children:[a.jsxs("select",{className:"vocab-filter-select","aria-label":L("filter_language"),value:s,onChange:K=>g(K.target.value),children:[a.jsx("option",{value:"",children:L("filter_language")}),U.map(K=>a.jsx("option",{value:K,children:K},K))]}),a.jsx("svg",{className:"vocab-filter-select-arrow",width:"10",height:"10",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.564
5164L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor"})})]}),a.jsxs("span",{className:"vocab-filter-select-wrap",children:[a.jsx("select",{className:"vocab-filter-select","aria-label":L("filter_sort"),value:l,onChange:K=>b(K.target.value),children:Object.entries($).filter(([,K])=>K!==void 0).map(([K,N])=>a.jsx("option",{value:K,children:N},K))}),a.jsx("svg",{className:"vocab-filter-select-arrow",width:"10",height:"10",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor"})})]}),a.jsx("div",{className:"vocab-filter-actions",children:O&&a.jsx("button",{type:"button",className:"ghost-btn",onClick:te,children:D("clear")})})]})]})]}),(n==="loading"||n==="idle")&&e.length===0?a.jsx("p",{className:"loading-msg",children:D("loading")}):n==="error"&&r?a.jsx(So,{detail:r,onReport:A,reported:T}):nE(n,e,t,O)?e.length===0?a.jsxs("div",{className:"console-empty-panel",children:[a.jsx("p",{className:"console-empty-title",children:L("empty_no_words_title")}),a.jsx("p",{className:"console-empty-copy",children:L("empty_no_words_copy")}),a.jsxs("div",{className:"console-empty-actions",children:[a.jsx(Ve,{href:"/console/inbox",className:"primary-btn",children:L("open_inbox")}),a.jsx("a",{href:"https://chromewebstore.google.com/detail/kgfnkbjmdjbecfmlhohogegidgkhcggb",target:"_blank",rel:"noopener noreferrer",className:"ghost-btn",children:L("empty_no_words_install")})]}),a.jsx("button",{type:"button",className:"console-empty-link",onClick:()=>M(!0),children:L("add_manually")})]}):a.jsxs("div",{className:"console-empty-panel",children:[a.jsx("p",{className:"console-empty-title",children:L("empty_no_matches_title")}),a.jsx("p",{className:"console-empty-copy",children:L("empty_no_matches_copy")}),a.jsx("div",{className:"console-empty-actions",children:a.jsx("button",{type:"button",className:"primary-btn",onClick:te,children:L("clear_filters")})})]}):e.length>0?a.jsx(a.Fragment,{children:w.length===0&&_!=="all"?a.jsxs("div",{className:"console-empty-panel",children:[a.jsx("p",{className:"console-empty-title",children:L("empty_no_matches_title")}),a.jsx("div",{className:"console-empty-actions",children:a.jsx("button",{type:"button",className:"primary-btn",onClick:()=>R("all"),children:L("stage_all")})})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:`vocab-table${n==="loading"?" is-filtering":""}`,children:[a.jsx(oE,{}),a.jsx("ul",{className:"m-0 list-none p-0",children:w.map((K,N)=>a.jsx(iE,{item:K,index:N,selected:K.id===u,langColor:Xl({language:K.language,palette:h}),onSelect:y,mergeMode:!!p,isMergeSource:K.id===p,onMergeTarget:I},K.id))})]}),o?a.jsx("button",{type:"button",className:"load-more-btn",onClick:E,disabled:i,children:D(i?"loading":"load_more")}):null]})}):null]}),a.jsx(eE,{open:P,onClose:()=>M(!1),onCreate:k})]})}function aE(e){return e<3?"new":e<7?"learning":e<21?"familiar":e<60?"established":"mastered"}function lE(e,t,n,r){if(!e)return"—";const o=new Date(e).getTime()-Date.now(),i=Math.ceil(o/(1e3*60*60*24));return i<=0?t:i===1?n:r(i)}function Ws(e){return{surface:e.surface,lemma:e.lemma??"",language:e.language,pos:e.pos,definition:e.definition??""}}function cE(){return a.jsx("svg",{className:"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-(--fg-muted)",width:"12",height:"12",viewBox:"0 0 15 15",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor"})})}function pd({form:e,setForm:t,disabled:n,hint:r}){const o=se("Console.word_detail");return a.jsxs("div",{className:"flex flex-col gap-5",children:[r&&a.jsx("p",{className:"text-[0.78rem] text-(--fg-muted) leading-relaxed",children:r}),[["surface","surface_label","surface_placeholder"],["lemma","lemma_label","lemma_placeholder"]].map(([i,s,l],c)=>a.jsxs("div",{className:"flex flex-col gap-1.5",children:[a.jsx("label",{htmlFor:`word-${i}`,className:"text-[0.68rem] font-bold uppercase tracking-[0.08em] text-(--fg-muted)",children:o(s)}),a.jsx("input",{id:`word-${i}`,className:"form-input",value:e[i],onChange:u=>t(d=>({...d,[i]:u.target.value})),placeholder:o(l),disabled:n,autoFocus:c===0})]},i)),a.jsx("div",{className:"flex gap-4",children:[["language","language_label",Yg],["pos","pos_label",Jg]].map(([i,s,l])=>a.jsxs("div",{className:"flex flex-col gap-1.5 flex-1",children:[a.jsx("label",{htmlFor:`word-${i}`,className:"text-[0.68rem] font-bold uppercase tracking-[0.08em] text-(--fg-muted)",children:o(s)}),a.jsxs("div",{className:"relative",children:[a.jsx("select",{id:`word-${i}`,className:"form-input appearance-none pr-8!",value:e[i],onChange:c=>t(u=>({...u,[i]:c.target.value})),disabled:n,children:l.map(c=>a.jsx("option",{value:c.value,children:c.value},c.value))}),a.jsx(cE,{})]})]},i))}),a.jsxs("div",{className:"flex flex-col gap-1.5",children:[a.jsx("label",{htmlFor:"word-definition",className:"text-[0.68rem] font-bold uppercase tracking-[0.08em] text-(--fg-muted)",children:o("definition_label")}),a.jsx("textarea",{id:"word-definition",className:"form-input min-h-22 resize-y",value:e.definition,onChange:i=>t(s=>({...s,definition:i.target.value})),placeholder:o("definition_placeholder"),disabled:n})]})]})}function uE({item:e,sources:t=[],onClose:n,onStar:r,onUpdate:o,onDelete:i,onMergeRequest:s,onSplit:l}){const c=se("Console.word_detail"),u=se("Console.orbit"),[d,h]=f.useState(!1),[p,m]=f.useState(!1),[g,b]=f.useState(!0),[v,x]=f.useState(!1),[E,y]=f.useState({surface:"",lemma:"",language:"",pos:"",definition:""}),[k,I]=f.useState(!1),[C,A]=f.useState(!1),[T,L]=f.useState(!1),[D,S]=f.useState(!1),[j,P]=f.useState({surface:"",lemma:"",pos:"noun",language:"",definition:""}),[M,_]=f.useState(!1),R=f.useRef(null),O=f.useRef(!1),U=e!==null;if(U&&!O.current&&(R.current=document.activeElement),O.current=U,f.useEffect(()=>{h(!1),m(!1),x(!1),A(!1),S(!1),e&&(y(Ws(e)),P({surface:e.surface,lemma:"",pos:"noun",language:e.language,definition:""}))},[e?.id]),f.useEffect(()=>{b(typeof window<"u"&&"speechSynthesis"in window)},[]),!e)return null;const $=Co(e);function w(X){C?(X.preventDefault(),A(!1)):D&&(X.preventDefault(),S(!1))}function te(){if(!g||!e)return;if(p){window.speechSynthesis.cancel(),m(!1);return}const X=new SpeechSynthesisUtterance($.surface);X.lang=Q8[e.language]??"en-US",X.onend=()=>m(!1),X.onerror=()=>m(!1),window.speechSynthesis.speak(X),m(!0)}function K(){const X=!d;h(X),r?.(e.id,X)}function N(){y(Ws(e)),x(!0),A(!1)}function fe(){x(!1),y(Ws(e))}async function re(){if(!(!e||!o)){I(!0);try{const X={surface:E.surface,lemma:E.lemma||null,language:E.language,pos:E.pos,definition:E.definition||null};await o(e.id,X),x(!1)}finally{I(!1)}}}async function Y(){if(!(!e||!l)){_(!0);try{await l(e.id,j),S(!1)}finally{_(!1)}}}async function pe(){if(!(!e||!i)){L(!0);try{await i(e.id),n()}finally{L(!1)}}}const ye=lE(e.next_review_at,c("due_now"),c("one_day"),X=>c("n_days",{days:X}));return a.jsx(io,{open:U,modal:!1,onOpenChange:X=>!X&&n(),children:a.jsxs(so,{children:[a.jsx(ao,{className:"pointer-events-none fixed inset-0 z-40 bg-[rgba(12,17,24,0.18)] backdrop-blur-xs transition-opacity duration-200 sm:bg-transparent sm:backdrop-blur-none"}),a.jsxs(lo,{className:"fixed inset-x-0 bottom-0 z-50 flex max-h-[72dvh] w-full flex-col overflow-hidden rounded-t-[24px] border-t border-(--glass-stroke) bg-[color-mix(in_srgb,var(--bg-elevated)_94%,transparent)] shadow-(--shadow-panel) backdrop-blur-[20px] animate-[slideInRight_200ms_cubic-bezier(0.22,1,0.36,1)_both] sm:inset-y-0 sm:left-auto sm:right-0 sm:max-h-none sm:max-w-105 sm:rou
51nded-none sm:border-l sm:border-t-0",onEscapeKeyDown:w,onCloseAutoFocus:X=>{X.preventDefault(),R.current?.focus()},children:[a.jsx(co,{className:"sr-only",children:$.surface}),a.jsx(Bi,{className:"sr-only",children:$.definition||c("no_definition")}),a.jsx("div",{className:"flex items-center justify-end px-6 pt-5 pb-3 shrink-0",children:a.jsx("button",{type:"button",className:"ghost-btn border-none! bg-transparent! shadow-none! py-1! px-2! min-h-11 min-w-11 opacity-50 hover:opacity-100 transition-opacity duration-150 active:scale-[0.95]",onClick:n,"aria-label":"Close",children:a.jsx(Xn,{size:18,strokeWidth:2,"aria-hidden":"true"})})}),a.jsx("div",{className:"flex-1 overflow-y-auto px-8 py-6 flex flex-col gap-8",children:D?a.jsx(pd,{form:j,setForm:P,disabled:M,hint:c("split_hint")}):v?a.jsx(pd,{form:E,setForm:y,disabled:k}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-col gap-3",children:[a.jsx("h2",{className:"m-0 text-[3.2rem] leading-[1.05] tracking-[-0.02em] text-(--fg-strong)",style:{fontFamily:"var(--font-display-web)"},children:$.surface}),$.reading&&a.jsx("p",{className:"text-[0.92rem] text-(--fg-muted)",children:$.reading}),e.lemma&&e.lemma!==$.surface&&a.jsx("p",{className:"text-[0.78rem] text-(--fg-muted) font-mono",children:e.lemma}),a.jsxs("div",{className:"flex gap-2 flex-wrap",children:[e.language&&a.jsx("span",{className:"px-2.5 py-1 rounded-full text-[0.68rem] font-bold uppercase tracking-[0.07em] bg-[rgba(92,197,255,0.1)] text-(--brand-teal)",children:e.language}),$.pos&&$.pos!=="other"&&a.jsx("span",{className:"px-2.5 py-1 rounded-full text-[0.68rem] font-bold uppercase tracking-[0.07em] bg-(--line-soft) text-(--fg-muted)",children:$.pos})]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[1rem] text-(--fg-body) leading-relaxed",children:$.definition||a.jsx("span",{className:"text-(--fg-muted) italic",children:c("no_definition")})}),$.example&&a.jsxs("p",{className:"mt-3 text-[0.85rem] italic leading-relaxed text-(--fg-muted)",children:["“",$.example,"”"]})]}),$.context&&a.jsx("blockquote",{className:"m-0 border-l-3 border-(--brand-teal) px-4 py-3 text-[0.9rem] italic leading-relaxed text-(--fg-body) bg-(--bg-elevated)",children:$.context}),t.length>0&&a.jsxs("section",{"aria-labelledby":"word-source-history",className:"flex flex-col gap-3",children:[a.jsx("h3",{id:"word-source-history",className:"m-0 text-[0.68rem] font-bold uppercase tracking-[0.08em] text-(--fg-muted)",children:c("sources_title")}),a.jsx("ol",{className:"m-0 list-none overflow-hidden rounded-[14px] border border-(--line-soft) bg-(--bg-elevated) p-0",children:t.map((X,Re)=>{let Ie="";if(X.source_url)try{Ie=new URL(X.source_url).host}catch{Ie=""}return a.jsxs("li",{className:`px-4 py-3 ${Re>0?"border-t border-(--line-soft)":""}`,children:[a.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-[0.72rem] text-(--fg-muted)",children:[a.jsx("span",{className:"font-semibold text-(--fg-strong)",children:c(Dg(X.source_type))}),Ie&&a.jsx("span",{children:Ie}),a.jsx("time",{dateTime:X.captured_at,children:new Date(X.captured_at).toLocaleDateString()})]}),X.context&&a.jsxs("p",{className:"mt-2 mb-0 text-[0.84rem] leading-relaxed text-(--fg-body)",children:["“",X.context,"”"]})]},X.id)})})]}),e.senses&&e.senses.length>0&&a.jsxs("div",{className:"vocab-senses",children:[a.jsx("div",{className:"vocab-senses-label",children:c("sense_list_label")}),e.senses.map((X,Re)=>a.jsxs("div",{className:["vocab-sense-item",Re===(e.selected_sense??0)&&"vocab-sense-item--active"].filter(Boolean).join(" "),children:[a.jsx("span",{className:"vocab-sense-pos",children:X.pos}),a.jsx("span",{className:"vocab-sense-def",children:X.definition}),X.example&&a.jsxs("span",{className:"vocab-sense-example",children:["“",X.example,"”"]})]},`${X.pos}-${Re}`))]}),a.jsxs("div",{className:"grid grid-cols-2 gap-6 pt-2 border-t border-(--line-soft)",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-[0.65rem] font-bold uppercase tracking-[0.08em] text-(--fg-muted) mb-1",children:c("stability")}),a.jsx("p",{className:"text-[1rem] font-semibold text-(--fg-strong)",children:e.stability!=null?u(`ring_${aE(e.stability)}`):"—"})]}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[0.65rem] font-bold uppercase tracking-[0.08em] text-(--fg-muted) mb-1",children:c("next_review")}),a.jsx("p",{className:"text-[1rem] font-semibold text-(--fg-strong)",children:ye})]})]})]})}),a.jsx("div",{className:"shrink-0 border-t border-(--line-soft) px-4 py-5 sm:px-8",children:D?a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",className:"primary-btn flex-1 transition-all duration-150 active:scale-[0.97]",onClick:()=>{Y()},disabled:M||!j.surface.trim(),children:c(M?"splitting":"create_split")}
51),a.jsx("button",{type:"button",className:"ghost-btn transition-all duration-150 active:scale-[0.97]",onClick:()=>S(!1),disabled:M,children:c("cancel")})]}):v?a.jsxs("div",{className:"flex gap-2",children:[a.jsx("button",{type:"button",className:"primary-btn flex-1 transition-all duration-150 active:scale-[0.97]",onClick:()=>{re()},disabled:k||!E.surface.trim(),children:c(k?"saving":"save")}),a.jsx("button",{type:"button",className:"ghost-btn transition-all duration-150 active:scale-[0.97]",onClick:fe,disabled:k,children:c("cancel")})]}):C?a.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[a.jsx("span",{className:"min-w-40 flex-1 text-[0.83rem] text-(--fg-muted)",children:c("delete_confirm")}),a.jsx("button",{type:"button",className:"rounded-[8px] px-3 py-1.5 text-[0.8rem] font-semibold bg-(--state-danger) text-(--bg-page) transition-all duration-150 active:scale-[0.96] disabled:opacity-50",onClick:()=>{pe()},disabled:T,children:c(T?"deleting":"delete")}),a.jsx("button",{type:"button",className:"ghost-btn py-1.5! px-3! text-sm! transition-all duration-150 active:scale-[0.96]",onClick:()=>A(!1),disabled:T,children:c("cancel")})]}):a.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[g&&a.jsx("button",{type:"button",onClick:te,className:["ghost-btn py-1.5! px-3! text-sm! min-h-11 min-w-11 transition-all duration-150 active:scale-[0.97]",p?"text-(--brand-teal)":"opacity-60 hover:opacity-100"].join(" "),"aria-label":c(p?"stop":"read_aloud"),title:c(p?"stop":"read_aloud"),children:p?a.jsx(x3,{size:16,strokeWidth:2,"aria-hidden":"true"}):a.jsx(S3,{size:16,strokeWidth:2,"aria-hidden":"true"})}),r&&a.jsx("button",{type:"button",className:["ghost-btn py-1.5! px-3! text-sm! transition-all duration-150 active:scale-[0.97]",d?"":"opacity-60 hover:opacity-100"].join(" "),onClick:K,"aria-label":c(d?"unstar":"star"),title:c(d?"unstar":"star"),children:a.jsx(y3,{size:16,strokeWidth:2,fill:d?"currentColor":"none","aria-hidden":"true"})}),o&&a.jsx("button",{type:"button",className:"ghost-btn py-1.5! px-3! text-sm! opacity-60 hover:opacity-100 transition-all duration-150 active:scale-[0.97]",onClick:N,"aria-label":c("edit"),title:c("edit"),children:c("edit")}),l&&a.jsx("button",{type:"button",className:"ghost-btn py-1.5! px-3! text-sm! opacity-60 hover:opacity-100 transition-all duration-150 active:scale-[0.97]",onClick:()=>S(!0),"aria-label":c("split"),title:c("split"),children:c("split")}),s&&a.jsx("button",{type:"button",className:"ghost-btn py-1.5! px-3! text-sm! opacity-60 hover:opacity-100 transition-all duration-150 active:scale-[0.97]",onClick:()=>s(e.id),"aria-label":c("merge"),title:c("merge"),children:c("merge")}),a.jsx("div",{className:"flex-1"}),i&&a.jsx("button",{type:"button",className:"ghost-btn py-1.5! px-3! text-sm! opacity-40 hover:opacity-100 hover:text-(--accent-danger) transition-all duration-150 active:scale-[0.97]",onClick:()=>A(!0),"aria-label":c("delete"),title:c("delete"),children:c("delete")})]})})]})]})})}function dE(e,t){return[e.surface,e.lemma,e.pos,e.definition??"",e.language].join(" ").toLowerCase().includes(t)}function hE(){const e=se("Console.vocab"),t=se("Console.common"),{apiClient:n,handle401:r,handle403:o,isReady:i,setHeaderActions:s,statsSnapshot:l,palette:c,handleReport:u,reportedViews:d}=Tn(),h=Wg(n,r,o),p=Xg(),[m,g]=f.useState(null),[b,v]=f.useState([]),[x,E]=f.useState(""),[y,k]=f.useState(l?.vocab??null),[I,C]=f.useState(null),[A,T]=f.useState(null),[L,D]=f.useState(null);f.useEffect(()=>{i&&h.loadVocab()},[i]),f.useEffect(()=>{l&&k(l.vocab)},[l]),f.useEffect(()=>y===0?(s(null),()=>s(null)):(s(a.jsx(Ve,{href:"/console/review",className:"primary-btn primary-btn--flat py-1.5! px-4! text-sm!",children:"Review"})),()=>s(null)),[s,y]),f.useEffect(()=>{let _=!1;if(!m){v([]);return}return n.listVocabSources(m.id).then(R=>{_||v(R.items)}).catch(R=>{_||v([]),ae(R,{context:"vocab_sources",route:"/v1/vocab/:id/sources",method:"GET"})}),()=>{_=!0}},[n,m?.id]);const S=x.trim().toLowerCase(),j=S?h.vocabItems.filter(_=>dE(_,S)):h.vocabItems;function P(_){if(!I)return;const R=h.vocabItems.find(O=>O.id===I);R&&(D(null),T({source:R,target:_}))}async function M(){if(!A||!I)return;const{target:_}=A;T(null);try{const R=await n.mergeVocab(I,_.id);h.removeVocabItem(_.id),g(O=>O?.id===I?R.item:O),C(null),D(null)}catch(R){if(R instanceof Ut&&R.status===401){await r();return}ae(R,{context:"vocab_merge",route:"/v1/vocab/:id/merge",method:"POST"}),D(e("merge_error"))}}return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"console-view",children:a.jsx(sE,{vocabItems:h.vocabItems,filteredItems:j,vocabTotal:y,palette:c,vocabStatus:h.vocabStatus,vocabError:h.vocabError,vocabCursor:h.vocabCursor,vocabLoadingMore:h.vocabLoadingMore,vocabLanguage:h.vocabLanguage,searchQuery:x,selectedItemId:m?.id??null,mergeSourceId:I,onSearchQueryChange:E,onVocabLanguageChange:_=>{h.setVocabLanguage(_),h.loadVocab({language:_.trim().toLowerCase(),q:x.trim()||void 0,sort:h.vocabSort})},vocabSort:h.vocabSort,onVocabSortChange:_=>{h.setVocabSort(_),h.loadVocab({language:h.vocabLanguage.trim().toLowerCase(),q:x.trim()||void 0,sort:_})},onApplyFilter:()=>{h.loadVocab({language:h.vocabLanguage.trim().toLowerCase(),q:x.trim()||void 0,sort:h.vocabSort})},onClearFilters:()=>{E(""),h.setVocabLanguage(""),h.setVocabSort("updated_desc"),h.loadVocab({language:"",sort:"updated_desc"})},onLoadMoreVocab:()=>{h.handleLoadMoreVocab()},onSelectItem:_=>{I||g(_)},onManualAdd:async _=>
51{await h.createVocabItem(_),k(R=>R===null?null:R+1),p.addToast("success",e("toast_added"))},onMergeTarget:_=>{P(_)},onMergeCancel:()=>C(null),onReport:_=>u(_,"vocab"),reported:d.has("vocab")})}),a.jsx(uE,{item:m,sources:b,onClose:()=>{g(null),C(null)},onUpdate:async(_,R)=>{await h.updateVocabItem(_,R),g(O=>!O||O.id!==_?O:{...O,...R.surface!==void 0&&{surface:R.surface},...R.lemma!==void 0&&{lemma:R.lemma??""},...R.language!==void 0&&{language:R.language},...R.pos!==void 0&&{pos:R.pos},...R.definition!==void 0&&{definition:R.definition}})},onDelete:async _=>{try{await n.trashVocab(_),h.removeVocabItem(_),k(R=>R!==null?R-1:null),g(null),p.addToast("success",e("toast_trashed"))}catch(R){ae(R,{context:"vocab_trash",route:"/v1/vocab/:id/trash",method:"POST"}),p.addToast("error",e("toast_delete_failed"))}},onMergeRequest:_=>{C(_),g(null)},onSplit:async(_,R)=>{await n.splitVocab(_,{surface:R.surface,lemma:R.lemma||void 0,pos:R.pos||void 0,language:R.language||void 0,definition:R.definition||null}),k(O=>O!==null?O+1:null),await h.loadVocab({silent:!0})}}),a.jsx(Kl,{toasts:p.toasts.map(_=>({id:_.id,type:_.type,message:_.message})),onDismiss:p.dismissToast}),A&&a.jsx(Jl,{open:!0,title:e("merge_title"),description:e("merge_description",{source:A.source.surface,target:A.target.surface}),confirmLabel:t("merge"),cancelLabel:t("cancel"),onConfirm:()=>{M()},onCancel:()=>T(null)}),L&&a.jsxs("div",{role:"alert",className:"fixed bottom-5 left-1/2 -translate-x-1/2 z-50 rounded-[12px] border border-(--line-danger) bg-(--tint-danger) text-(--fg-danger-on-tint) px-4 py-3 text-[0.82rem] shadow-lg",children:[L,a.jsx("button",{type:"button",className:"ml-3 underline underline-offset-2 opacity-70 hover:opacity-100",onClick:()=>D(null),children:e("merge_close")})]})]})}function fE({chromeInstallHref:e,safariInstallHref:t,locale:n}){const r=se("Setup"),[o,i]=f.useState("checking"),[s,l]=f.useState(!1),[c,u]=f.useState(null),d=f.useCallback(async y=>{const k=i5(),I=k!==null;if(u(k),l(I),!I){i("unsupported");return}if(i("checking"),await Wl()){i("connected");return}if(y)try{const C=await Rt(y);if(await zn(C,y.refreshToken)){i("connected");return}}catch(C){ae(C,{context:"setup_extension_pair",route:"/setup"})}i(s5(k))},[]);f.useEffect(()=>ns(Et(),y=>{d(y)}),[d]);const h=o==="connected"?"border-[color-mix(in_srgb,var(--state-success)_28%,transparent)] bg-[color-mix(in_srgb,var(--state-success)_8%,transparent)]":o==="unsupported"?"border-(--border-subtle) bg-[color-mix(in_srgb,var(--text-muted)_6%,transparent)]":o==="not_connected"?"border-[color-mix(in_srgb,var(--state-warning)_28%,transparent)] bg-[color-mix(in_srgb,var(--state-warning)_8%,transparent)]":"border-(--border-subtle) bg-[color-mix(in_srgb,var(--text-muted)_6%,transparent)]",p=o==="connected"?"bg-(--state-success) shadow-[0_0_5px_1px_color-mix(in_srgb,var(--state-success)_50%,transparent)]":o==="unsupported"?"bg-(--text-muted) opacity-60":o==="not_connected"?"bg-(--state-warning)":"bg-(--text-muted) opacity-40",m=r(o==="connected"?"connected":o==="unsupported"?"unsupported":o==="not_connected"?"not_connected":"checking"),g=r(o==="connected"?"connected_body":o==="unsupported"?"unsupported_body":o==="not_connected"?c==="safari"?"safari_not_connected_body":"not_connected_body":"checking_body"),b=h5(o),v=c==="safari"?t:e,x=f5({status:o,canInstallExtension:s,installHref:v}),E=b.ctaKind==="primary"?"bg-(--text-primary) text-(--bg-canvas) shadow-[0_12px_30px_color-mix(in_srgb,var(--text-primary)_14%,transparent)] hover:brightness-[1.03]":"border border-(--border-subtle) bg-[color-mix(in_srgb,var(--text-muted)_6%,transparent)] text-(--text-primary) hover:bg-[color-mix(in_srgb,var(--text-muted)_10%,transparent)]";return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`rounded-[16px] border p-3 ${h}`,children:a.jsxs("div",{className:"flex items-start justify-between gap-3",children:[a.jsxs("div",{className:"min-w-0",children:[a.jsxs("div",{className:"inline-flex items-center gap-[7px] text-[0.78rem] font-semibold text-(--text-primary)",children:[a.jsx("span",{className:`h-[7px] w-[7px] shrink-0 rounded-full ${p}`,"aria-hidden":"true"}),m]}),a.jsx("p",{className:"m-0 mt-1 text-[0.78rem] leading-[1.5] text-(--text-muted)",children:g})]}),o==="not_connected"?a.jsx("button",{type:"button",onClick:()=>{d(Et().currentUser)},className:"min-h-11 shrink-0 rounded-full border border-(--border-subtle) px-4 text-[0.76rem] font-bold text-(--text-primary) transition-[background,transform] duration-150 hover:-translate-y-
51px hover:bg-[rgba(255,255,255,0.06)]",children:r("retry")}):null]})}),a.jsx("h1",{className:"m-0 text-[1.6rem] font-bold leading-[1.2] text-(--text-primary)",children:r(b.headlineKey)}),a.jsx("p",{className:"m-0 text-[0.88rem] leading-[1.65] text-(--text-secondary)",children:r(b.bodyKey)}),b.ctaKey==="open_console"?a.jsx(Qe,{href:`/${n}/console`,className:`block min-h-11 rounded-full px-3 py-3 text-center text-[0.92rem] font-bold no-underline transition-[filter,background,transform] duration-[0.14s] hover:-translate-y-px active:scale-[0.96] ${E}`,children:r(b.ctaKey)}):x&&v?a.jsxs("div",{className:"grid gap-2",children:[a.jsx(Qe,{href:v,className:`block min-h-11 rounded-full px-3 py-3 text-center text-[0.92rem] font-bold no-underline transition-[filter,background,transform] duration-[0.14s] hover:-translate-y-px active:scale-[0.96] ${E}`,children:r(b.ctaKey)}),o==="not_connected"?a.jsx(Qe,{href:`/${n}/console`,className:"auth-secondary-link inline-flex min-h-11 items-center justify-center rounded-full px-3 text-[0.84rem] font-semibold transition-[background-color,transform] duration-150 hover:bg-[color-mix(in_srgb,var(--text-muted)_7%,transparent)] active:scale-[0.96]",children:r("explore_console_first")}):null]}):null]})}const pE=[{mode:"system",labelKey:"theme_system",Icon:mm},{mode:"light",labelKey:"theme_light",Icon:bm},{mode:"dark",labelKey:"theme_dark",Icon:gm}];function mE(){if(typeof window>"u")return"system";try{const e=localStorage.getItem("orbit-theme");if(e==="light"||e==="dark"||e==="system")return e;if(e==="auto")return"system"}catch{return"system"}return"system"}function qs(e){const t=document.documentElement,n=ql(e,window.matchMedia("(prefers-color-scheme: dark)").matches);t.setAttribute("data-theme",n),ss(n)}function eo(){const e=se("Landing.a11y"),[t,n]=f.useState("system");return f.useEffect(()=>{n(mE())},[]),f.useEffect(()=>{qs(t);try{localStorage.setItem("orbit-theme",t)}catch{}if(t!=="system")return;const r=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>qs("system");return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[t]),a.jsx("div",{className:"inline-flex items-center gap-3 rounded-full border border-[var(--border-subtle)] p-1 shadow-[0_12px_32px_rgba(0,0,0,0.04)] backdrop-blur-[16px]",style:{background:"color-mix(in srgb, var(--bg-surface) 92%, transparent)"},"aria-label":e("theme_mode"),role:"group",children:pE.map(({mode:r,labelKey:o,Icon:i})=>{const s=t===r,l=e(o);return a.jsx("button",{type:"button","aria-label":l,"aria-pressed":s,className:"group relative inline-flex h-11 w-11 items-center justify-center rounded-full border border-transparent text-[var(--text-muted)] transition-[transform,color,background-color,border-color,box-shadow] duration-[160ms] hover:-translate-y-[1px] hover:text-[var(--text-primary)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent-secondary)]/45",style:s?{background:"color-mix(in srgb, var(--bg-elevated) 82%, transparent)",borderColor:"var(--border-subtle)",color:"var(--text-primary)",boxShadow:"0 8px 18px rgba(0, 0, 0, 0.08)"}:void 0,onClick:()=>{n(r),qs(r)},children:a.jsx(i,{className:"h-3.5 w-3.5",strokeWidth:1.9})},r)})})}const Ma="orvoca_utm";function gE(e){sessionStorage.getItem(Ma)||sessionStorage.setItem(Ma,JSON.stringify(e))}function bE(){if(typeof window>"u")return{};try{const e=sessionStorage.getItem(Ma);if(!e)return{};const t=JSON.parse(e);return{utm_source:typeof t.utm_source=="string"?t.utm_source:void 0,utm_medium:typeof t.utm_medium=="string"?t.utm_medium:void 0,utm_campaign:typeof t.utm_campaign=="string"?t.utm_campaign:void 0}}catch{return{}}}const md="https://orvoca.app";function Zg(e,t){if(!e?.startsWith("/"))return t;try{const n=new URL(e,md);return n.origin!==md?t:`${n.pathname}${n.search}${n.hash}`}catch{return t}}function xE({value:e,label:t,onChange:n}){const r=dr.find(o=>o.value===e)??dr[0];return a.jsxs(_l,{children:[a.jsx(Cl,{asChild:!0,children:a.jsxs("button",{type:"button","aria-label":t,className:"auth-input flex cursor-pointer items-center justify-between gap-3 text-left",children:[a.jsx("span",{children:r.label}),a.jsx(Sa,{className:"h-4 w-4 shrink-0 text-[var(--text-muted)]",strokeWidth:1.8,"aria-hidden":"true"})]})}),a.jsx(Zi,{align:"start",className:"w-[var(--radix-dropdown-menu-trigger-width)] min-w-0",children:dr.map(o=>a.jsx(Fn,{className:o.value===e?"bg-[var(--hover-overlay)]":void 0,onSelect:()=>
51n(o.value),children:o.label},o.value))})]})}function vE(){const e=se("Welcome"),n=ro().locale??"en",r=Pi(),o=no(),i=Zg(o.get("next"),`/${n}/setup`),s=o.get("preview")==="1",{authUser:l}=Fg({loginNextPath:`/${n}/welcome?next=${encodeURIComponent(i)}`}),c=_o("https://api.orbitvocab.app"),u=f.useMemo(()=>Vl(),[c]),d=f.useMemo(()=>kl({baseUrl:c,devUserIdTransport:"header",preferSimpleRequests:!0,getToken:async()=>{if(u.enabled)return null;const I=typeof l=="object"&&l!==null?l:null;if(!I)return null;try{return await Rt(I)}catch{return null}},getDevUserId:async()=>u.enabled?u.userId:null}),[c,l,u]),h=f.useRef(!1),[p,m]=f.useState(!1),[g,b]=f.useState(!1),[v,x]=f.useState(""),[E,y]=f.useState("en");f.useEffect(()=>{if(typeof window>"u")return;const I=localStorage.getItem("orbit-theme"),A=ql(I==="dark"||I==="light"||I==="system"?I:"system",window.matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.setAttribute("data-theme",A),ss(A)},[]),f.useEffect(()=>{if(l==="loading"||l===null)return;let I=!0;async function C(){try{const[A,T]=await Promise.all([d.me(),d.getSettings()]);if(!I)return;if(!A.needsWelcome&&!s){r.replace(i);return}h.current||(h.current=!0,y(W8(T.definition_language)?T.definition_language:hd(window.navigator.language))),m(!0)}catch(A){if(!I)return;if(A instanceof Ut&&A.status===401&&!u.enabled){r.replace(`/${n}/login?next=${encodeURIComponent(`/${n}/welcome?next=${i}`)}`);return}h.current||(h.current=!0,y(hd(window.navigator.language))),m(!0)}}return C(),()=>{I=!1}},[d,l,n,i,u.enabled,r]);async function k(){b(!0),x("");try{const I=bE();await d.completeWelcome({definition_language:E,...I}),it("onboarding_completed",{definition_language:E}),r.replace(i)}catch{x(e("err_save_failed"))}finally{b(!1)}}return l==="loading"||!p?a.jsxs("main",{className:"auth-page landing-minimal relative isolate min-h-dvh overflow-hidden",children:[a.jsx("div",{className:"landing-starlight-background","aria-hidden":"true"}),a.jsx("div",{className:"auth-page__backdrop","aria-hidden":"true"}),a.jsxs("div",{className:"auth-page__shell relative z-[2] mx-auto flex min-h-dvh w-[min(1120px,calc(100%-clamp(32px,8vw,120px)))] flex-col px-0 pb-6 pt-4",children:[a.jsxs("header",{className:"auth-page__topbar flex items-center justify-between gap-4",children:[a.jsx(Qe,{href:"/","aria-label":"Orvoca",className:"no-underline",children:a.jsx(Gr,{height:18})}),a.jsx(eo,{})]}),a.jsx("section",{className:"auth-stage flex flex-1 items-center justify-center py-5",children:a.jsx(Gl,{size:56,className:"text-[var(--accent-primary)]"})})]})]}):a.jsxs("main",{className:"auth-page landing-minimal relative isolate min-h-dvh overflow-hidden",children:[a.jsx("div",{className:"landing-starlight-background","aria-hidden":"true"}),a.jsx("div",{className:"auth-page__backdrop","aria-hidden":"true"}),a.jsxs("div",{className:"auth-page__shell relative z-[2] mx-auto flex min-h-dvh w-[min(1120px,calc(100%-clamp(32px,8vw,120px)))] flex-col px-0 pb-6 pt-4",children:[a.jsxs("header",{className:"auth-page__topbar flex items-center justify-between gap-4",children:[a.jsx(Qe,{href:"/","aria-label":"Orvoca",className:"no-underline",children:a.jsx(Gr,{height:18})}),a.jsx(eo,{})]}),a.jsx("section",{className:"auth-stage flex flex-1 items-center justify-center py-5",children:a.jsxs("div",{className:"auth-card relative z-[1] w-full max-w-[430px] rounded-[28px] border px-6 py-6 max-[520px]:rounded-[24px] max-[520px]:px-5 max-[520px]:py-5",children:[a.jsxs("div",{className:"flex flex-col gap-2.5",children:[a.jsx("h1",{className:"landing-section-title auth-card__title text-pretty leading-[1.12]",children:e("headline")}),a.jsx("p",{className:"auth-card__description",children:e("body")})]}),a.jsxs("section",{className:"mt-6 flex flex-col gap-5",children:[a.jsxs("div",{className:"auth-field",children:[a.jsx("span",{className:"auth-label",children:e("def_lang_label")}),a.jsx(xE,{value:E,label:e("def_lang_label"),onChange:y})]}),v?a.jsx("p",{className:"auth-feedback auth-feedback--error",role:"alert",children:v}):null,a.jsx("button",{type:"button",className:"auth-primary-button",onClick:()=>{k()},disabled:g,children:e(g?"btn_saving":"btn_continue")})]})]})})]})]})}const yE={ko:{invalid:"유효하지 않은 링크입니다",invali
51dSub:"이메일에서 받은 링크를 다시 확인해 주세요.",doneTitle:"수신 거부 완료",doneSub:"마케팅 이메일 수신이 해제되었습니다.",doneHome:"홈으로 돌아가기",title:"마케팅 이메일 수신 거부",sub:"아래 버튼을 누르면 Orvoca 마케팅 이메일 수신이 해제됩니다.",error:"처리 중 오류가 발생했습니다. 다시 시도해 주세요.",loading:"처리 중…",cta:"수신 거부하기"},en:{invalid:"Invalid link",invalidSub:"Please check the link from your email and try again.",doneTitle:"Unsubscribed",doneSub:"You have been removed from Orvoca marketing emails.",doneHome:"Go to Home",title:"Unsubscribe from marketing emails",sub:"Click the button below to stop receiving Orvoca marketing emails.",error:"Something went wrong. Please try again.",loading:"Processing…",cta:"Unsubscribe"}};function wE(){const e=no(),n=ro()?.locale==="ko"?"ko":"en",r=yE[n],o=e.get("uid")??"",[i,s]=f.useState("idle");async function l(){s("loading");try{const c=_o("https://api.orbitvocab.app");if(!(await fetch(`${c}/v1/email/unsubscribe?uid=${encodeURIComponent(o)}`,{method:"POST"})).ok)throw new Error("unsubscribe failed");s("done")}catch{s("error")}}return a.jsx("main",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"64px 24px",background:"var(--bg-page)",fontFamily:"var(--font-ui)"},children:a.jsxs("div",{style:{width:"100%",maxWidth:"360px",textAlign:"center"},children:[a.jsx("p",{style:{fontSize:"0.68rem",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--fg-muted)",marginBottom:"40px"},children:"Orvoca"}),o?i==="done"?a.jsxs(a.Fragment,{children:[a.jsx("h1",{style:{fontSize:"1.5rem",fontWeight:600,color:"var(--fg-strong)",marginBottom:"12px",fontFamily:"var(--font-display-web)"},children:r.doneTitle}),a.jsx("p",{style:{fontSize:"0.9rem",color:"var(--fg-body)",lineHeight:1.75,marginBottom:"32px"},children:r.doneSub}),a.jsx(Qe,{href:"/",style:{display:"inline-block",padding:"12px 32px",borderRadius:"999px",background:"var(--brand-teal)",color:"var(--token-bg-page)",fontSize:"0.9rem",fontWeight:600,textDecoration:"none"},children:r.doneHome})]}):a.jsxs(a.Fragment,{children:[a.jsx("h1",{style:{fontSize:"1.5rem",fontWeight:600,color:"var(--fg-strong)",marginBottom:"12px",fontFamily:"var(--font-display-web)"},children:r.title}),a.jsx("p",{style:{fontSize:"0.9rem",color:"var(--fg-body)",lineHeight:1.75,marginBottom:"32px",maxWidth:"300px",margin:"0 auto 32px"},children:r.sub}),a.jsx("div",{"aria-live":"polite",children:i==="error"&&a.jsx("p",{style:{fontSize:"0.85rem",color:"var(--token-state-danger)",marginBottom:"16px"},children:r.error})}),a.jsx("button",{type:"button",onClick:l,disabled:i==="loading",style:{display:"block",width:"100%",maxWidth:"260px",margin:"0 auto",padding:"14px",borderRadius:"999px",border:"none",background:"var(--brand-teal)",color:"var(--token-bg-page)",fontSize:"0.9rem",fontWeight:600,cursor:i==="loading"?"not-allowed":"pointer",opacity:i==="loading"?.5:1},children:i==="loading"?r.loading:r.cta})]}):a.jsxs(a.Fragment,{children:[a.jsx("h1",{style:{fontSize:"1.3rem",fontWeight:600,color:"var(--fg-strong)",marginBottom:"12px",fontFamily:"var(--font-display-web)"},children:r.invalid}),a.jsx("p",{style:{fontSize:"0.9rem",color:"var(--fg-muted)",lineHeight:1.7},children:r.invalidSub})]})]})})}function _E(){return a.jsx(f.Suspense,{fallback:a.jsx("main",{style:{minHeight:"100vh",background:"var(--bg-page)"}}),children:a.jsx(wE,{})})}const gd="orvoca:stale-asset-reload",CE=["failed to fetch dynamically imported module","importing a module script failed","chunkloaderror","loading chunk"];function Qg(e){return e instanceof Error?e.message:typeof e=="string"?e:""}function SE(e){const t=Qg(e).toLowerCase();return CE.some(n=>t.includes(n))}function EE(e,t={}){if(!SE(e)||typeof window>"u")return!1;const n=Qg(e),r=t.storage??window.sessionStorage,o=t.reload??(()=>window.location.reload());try{if(r.getItem(gd)===n)return!1;r.setItem(gd,n)}catch{return!1}return o(),!0}function kE({error:e}){return f.useEffect(()=>{EE(e)||ae(e,{context:"global_error_boundary",extras:{digest:e.digest}})},[e]),a.jsx("html",{lang:"en",children:a.jsxs("body",{style:{margin:0,padding:"48px 24px",fontFamily:"system-ui, -apple-system, sans-serif",background:"#0b0f18",color:"#e8edf4",minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",gap:"12px",boxSizing:"border-box"},children:[a.jsx("p",{style:{margin:0,fontSize:"11px",letterSpacing:"0.12em",textTransform:"uppercase",color:"#5cc5ff"},children:"500"}),a.jsx("h1",{style:{margin:0,fontSize:"24px",fontWeight:400,lineHeight:1.25},children:"Something went wrong"}),a.jsx("p",{style:{margin:0,fontSize:"14px",color:"#8899aa",lineHeight:1.65,maxWidth:"300px"},children:"An unexpected error occurred. Please try again or return to the home page."}),e.digest&&a.jsxs("p",{style:{margin:0,fontFamily:"monospace",fontSize:"11px",color:"#5e6e80"},children:["Error ID: ",e.digest]}
51),a.jsxs("div",{style:{display:"flex",gap:"8px",marginTop:"8px"},children:[a.jsx("button",{type:"button",onClick:()=>window.location.reload(),style:{padding:"10px 24px",borderRadius:"999px",border:"1px solid #334155",background:"none",color:"#8899aa",fontSize:"13px",cursor:"pointer"},children:"Try again"}),a.jsx("a",{href:"/",style:{display:"inline-block",padding:"10px 24px",borderRadius:"999px",background:"#5cc5ff",color:"#05111c",fontSize:"13px",fontWeight:600,textDecoration:"none"},children:"Go to Home"})]})]})})}const IE="_banner_w08pa_1",NE="_message_w08pa_20",TE="_actions_w08pa_28",AE="_decline_w08pa_35",PE="_accept_w08pa_36",Nr={banner:IE,message:NE,actions:TE,decline:AE,accept:PE};function bd(e){const t=Et().currentUser;if(!t)return;kl({baseUrl:"https://api.orbitvocab.app",getToken:()=>t.getIdToken()}).updateAnalyticsConsent(e).catch(r=>ae(r,{context:"analytics_consent_sync"}))}function RE(){const e=se("ConsentBanner"),[t,n]=f.useState(!1);if(f.useEffect(()=>{n(Bl()===null)},[]),!t)return null;function r(){Hu("granted"),bd(1),WS(),n(!1)}function o(){Hu("denied"),bd(0),n(!1)}return a.jsxs("div",{className:Nr.banner,role:"region","aria-label":e("message"),children:[a.jsx("p",{className:Nr.message,children:e("message")}),a.jsxs("div",{className:Nr.actions,children:[a.jsx("button",{type:"button",className:Nr.decline,onClick:o,children:e("decline")}),a.jsx("button",{type:"button",className:Nr.accept,onClick:r,children:e("accept")})]})]})}var jE=new Set(["style"]),OE="use"in Ai,LE={srcset:"srcSet",fetchpriority:OE?"fetchPriority":"fetchpriority"},ME=e=>e.startsWith("data-")||e.startsWith("aria-")?e:LE[e]||e.replace(/-./g,t=>t[1].toUpperCase());function Zl(e){return Object.fromEntries(Object.entries(e).map(([t,n])=>[ME(t),jE.has(t)&&n&&typeof n!="string"?Zl(n):n]))}var eb=(e,t)=>{if(!(!e||!t))switch(t){case"constrained":return`(min-width: ${e}px) ${e}px, 100vw`;case"fixed":return`${e}px`;case"fullWidth":return"100vw";default:return}},Tr=e=>e||e===0?`${e}px`:void 0,DE=({width:e,height:t,aspectRatio:n,layout:r,objectFit:o="cover",background:i})=>{const s=[["object-fit",o]];return i?.startsWith("https:")||i?.startsWith("http:")||i?.startsWith("data:")||i?.startsWith("/")?(s.push(["background-image",`url(${i})`]),s.push(["background-size","cover"]),s.push(["background-repeat","no-repeat"])):s.push(["background",i]),r==="fixed"&&(s.push(["width",Tr(e)]),s.push(["height",Tr(t)])),r==="constrained"&&(s.push(["max-width",Tr(e)]),s.push(["max-height",Tr(t)]),s.push(["aspect-ratio",n?`${n}`:void 0]),s.push(["width","100%"])),r==="fullWidth"&&(s.push(["width","100%"]),s.push(["aspect-ratio",n?`${n}`:void 0]),s.push(["height",Tr(t)])),Object.fromEntries(s.filter(([,l])=>l))},FE=[6016,5120,4480,3840,3200,2560,2048,1920,1668,1280,1080,960,828,750,640],xd=24,UE=({width:e,layout:t,resolutions:n=FE})=>{if(t==="fullWidth")return n;if(!e)return[];const r=e*2;return t==="fixed"?[e,r]:t==="constrained"?[e,r,...n.filter(o=>o<r)]:[]},zE=({src:e,width:t,layout:n="constrained",height:r,aspectRatio:o,breakpoints:i,format:s})=>(i||=UE({width:t,layout:n}),i.sort((l,c)=>l-c).map(l=>{let c;return r&&o&&(c=Math.round(l/o)),{url:e,width:l,height:c,format:s}})),tb=e=>{let{src:t,transformer:n,operations:r}=e;return n?zE(e).map(({url:o,...i})=>`${n(t,{...r,...i},e.options)?.toString()} ${i.width}w`).join(`,
52`):""};function nb({width:e,height:t,priority:n,layout:r="constrained",aspectRatio:o,...i}){return e=e&&Number(e)||void 0,t=t&&Number(t)||void 0,n?(i.loading||="eager",i.fetchpriority||="high"):(i.loading||="lazy",i.decoding||="async"),i.alt===""&&(i.role||="presentation"),o?e?t||(t=Math.round(e/o)):t&&(e=Math.round(t*o)):e&&t&&(o=e/t),{width:e,height:t,aspectRatio:o,layout:r,...i}}function BE(e){let{src:t,transformer:n,background:r,layout:o,objectFit:i,breakpoints:s,width:l,height:c,aspectRatio:u,unstyled:d,operations:h,options:p,...m}=nb(e);if(n&&r==="auto"){const b=u?Math.round(xd/u):void 0,v=n(t,{width:xd,height:b},p);v&&(r=v.toString())}const g={width:l,height:c,aspectRatio:u,layout:o,objectFit:i,background:r};if(m.sizes||=eb(l,o),d||(m.style={...DE(g),...m.style}),n){m.srcset=tb({src:t,width:l,height:c,aspectRatio:u,layout:o,breakpoints:s,transformer:n,operations:h,options:p});const b=n(t,{...h,width:l,height:c},p);b&&(t=b),(o==="fullWidth"||o==="constrained")&&(l=void 0,c=void 0)}return{...m,src:t?.toString(),width:l,height:c}}function $E(e){return e?e.startsWith("image/")?{format:e.slice(6),mimeType:e}:{format:e,mimeType:`image/${e==="jpg"?"jpeg":e}`}:{}}function HE({media:e,type:t,...n}){let{src:r,transformer:o,layout:i,breakpoints:s,width:l,height:c,aspectRatio:u,sizes:d,loading:h,decoding:p,operations:m,options:g,...b}=nb(n);if(!o)return{};const{format:v,mimeType:x}=$E(t);d||=eb(l,i);const E=tb({src:r,width:l,height:c,aspectRatio:u,layout:i,breakpoints:s,transformer:o,format:v,operations:m,options:g}),y=o(r,{...m,width:l,height:c},g);y&&(r=y);const k={...b,sizes:d,srcset:E};return e&&(k.media=e),x&&(k.type=x),k}const VE={"images.ctfassets.net":"contentful","cdn.builder.io":"builder.io","images.prismic.io":"imgix","www.datocms-assets.com":"imgix","cdn.sanity.io":"imgix","images.unsplash.com":"imgix","cdn.shopify.com":"shopify","s7d1.scene7.com":"scene7","ip.keycdn.com":"keycdn","assets.c
52aisy.io":"bunny","images.contentstack.io":"contentstack","ucarecdn.com":"uploadcare","imagedelivery.net":"cloudflare_images","wsrv.nl":"wsrv"},WE={"imgix.net":"imgix","wp.com":"wordpress","files.wordpress.com":"wordpress","b-cdn.net":"bunny","storyblok.com":"storyblok","kc-usercontent.com":"kontent.ai","cloudinary.com":"cloudinary","kxcdn.com":"keycdn","imgeng.in":"imageengine","imagekit.io":"imagekit","cloudimg.io":"cloudimage","ucarecdn.com":"uploadcare","supabase.co":"supabase","graphassets.com":"hygraph"},qE={"/cdn-cgi/image/":"cloudflare","/cdn-cgi/imagedelivery/":"cloudflare_images","/_next/image":"nextjs","/_vercel/image":"vercel","/is/image":"scene7","/_ipx/":"ipx","/_image":"astro","/.netlify/images":"netlify","/storage/v1/object/public/":"supabase","/storage/v1/render/image/public/":"supabase","/v1/storage/buckets/":"appwrite"};function Si(e){if(!e)return e;const t=Number(e);return isNaN(t)?e:Math.round(t)}const GE=e=>{const{pathname:t,search:n}=e;return`${t}${n}`},Ee=e=>e.hostname==="n"?GE(e):e.toString(),de=(e,t)=>typeof e=="string"?new URL(e,"http://n/"):e,vd=e=>e===" "?"+":"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"),rb=e=>e?.startsWith("/")?e.slice(1):e,Ql=e=>e?.endsWith("/")?e.slice(0,-1):e,KE=e=>e?.endsWith("/")?e:`${e}/`,XE=(e,t)=>{const n=vd(e),r=vd(t);function o(s){return encodeURIComponent(s).replaceAll(e,n).replaceAll(t,r)}function i(s,l){return`${o(s)}${e}${o(String(l))}`}return s=>(Array.isArray(s)?s:Object.entries(s)).flatMap(([c,u])=>u==null?[]:Array.isArray(u)?u.map(d=>i(c,d)):i(c,u)).join(t)},YE=(e,t)=>e==="="&&t==="&"?QE:n=>{const r=n.toString();return Object.fromEntries(r.split(t).map(o=>{const[i,s]=o.split(e);return[decodeURI(i),decodeURI(s)]}))};function JE(e,t=4e3,n=4e3){let{width:r,height:o}=e;return r=Number(r)||void 0,o=Number(o)||void 0,r&&r>t&&(o&&(o=Math.round(o*t/r)),r=t),o&&o>n&&(r&&(r=Math.round(r*n/o)),o=n),{width:r,height:o}}function Eo(e){const t=de(e),n=Object.fromEntries(t.searchParams.entries());for(const r in["width","height","quality"]){const o=n[r];if(o){const i=Number(o);isNaN(i)||(n[r]=i)}}return t.search="",{operations:n,src:Ee(t)}}function ob({keyMap:e={},formatMap:t={},defaults:n={}},r){r.format&&r.format in t&&(r.format=t[r.format]),r.width&&(r.width=Si(r.width)),r.height&&(r.height=Si(r.height));for(const o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;const i=o;if(e[i]===!1){delete r[i];continue}e[i]&&r[i]&&(r[e[i]]=r[i],delete r[i])}for(const o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;const i=o,s=n[i];if(!r[i]&&s!==void 0){if(e[i]===!1)continue;const l=e[i]??i;if(l in r)continue;r[l]=s}}return r}const yd=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[n,t]));function ZE({keyMap:e={},formatMap:t={},defaults:n={}},r){const o=yd(e),i=yd(t),s=ob({keyMap:o,formatMap:i,defaults:n},r);s.width&&(s.width=Si(s.width)),s.height&&(s.height=Si(s.height));const l=Number(s.quality);return isNaN(l)||(s.quality=l),s}const QE=e=>{const t=de(e);return Object.fromEntries(t.searchParams.entries())};function Cr({kvSeparator:e="=",paramSeparator:t="&",...n}={}){const r=XE(e,t);return o=>{const i=ob(n,o);return r(i)}}function ek({kvSeparator:e="=",paramSeparator:t="&",defaults:n,...r}={}){const o=YE(e,t);return i=>{const s=i?o(i):{};return ZE(r,s)}}function We(e){const t=Cr(e),n=ek(e);return{operationsGenerator:t,operationsParser:n}}function ib(e){if(e!=null)try{return!!JSON.parse(e?.toString())}catch{return!!e}}const tk=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0));function Be(e,t){return((n,r,o)=>{const i=e(n,o);return i?t(i.src,{...i.operations,...tk(r)},{...i.options,...o}):t(n,r,o)})}const nk=new Map(Object.entries(VE)),rk=Object.entries(WE),ok=Object.entries(qE);function as(e){return ik(e)||ko(e)}function ik(e){if(typeof e=="string"&&!e.startsWith("https://"))return!1;const{hostname:t}=de(e),n=nk.get(t);return n||rk.find(([r])=>t.endsWith(r))?.[1]||!1}function ko(e){const{pathname:t}=de(e);return ok.find(([n])=>t.startsWith(n))?.[1]||!1}const sk="/view?",ak="/preview?",{operationsGenerator:lk,operationsParser:ck}=We({keyMap:{format:"output"},kvSeparator:"=",paramSeparator:"&"}),uk=(e,t)=>{const n=de(e.toString().replace(sk,ak)),r=n.searchParams.get("project")??"",o=lk(t);return n.search=o,n.searchParams.append("project",r),Ee(n)},dk=e=>{if(ko(e)!=="appwrite")return null;const t=de(e),n=ck(t);delete n.project;const r=t.searchParams.get("project")??"";return t.search="",t.searchParams.append("project",r),{src:t.href,operations:n}},hk=Be(dk,uk),sb="/_image",{operationsParser:fk,operationsGenerator:pk}=We({keyMap:{format:"f",width:"w",height:"h",quality:"q"},defaults:{fit:"cover"}}),Gs=(e,t,n)=>{const r=de(`${Ql(n?.baseUrl??"")}${n?.endpoint??sb}`),o=pk(t);return r.search=o,r.searchParams.set("href",e.toString()),Ee(r)},mk=e=>{const t=de(e),n=t.searchParams.get("href");if(!n)return null;t.searchParams.delete("href");const r=fk(t);return{src:n,operations:r,options:{baseUrl:t.origin}}},gk=(e,t,n={})=>
52{if(de(e).pathname!==(n?.endpoint??sb))return Gs(e,t,n);const o=mk(e);return o?(n.baseUrl??=o.options.baseUrl,Gs(o.src,{...o.operations,...t},n)):Gs(e,t,n)},bk=Cr({defaults:{fit:"cover",format:"webp",sharp:!0}}),xk=Eo,vk=(e,t)=>{const n=bk(t),r=de(e);return r.search=n,Ee(r)},yk=Be(xk,vk),wk=Cr({keyMap:{format:"output"}}),_k=Eo,Ck=(e,t)=>{const n=wk(t),r=de(e);return r.search=n,Ee(r)},Sk=Be(_k,Ck),Ek=(e,t)=>{const{width:n,height:r}=t;return n&&r&&(t.aspect_ratio??=`${Math.round(Number(n))}:${Math.round(Number(r))}`),Sk(e,t)},{operationsGenerator:kk,operationsParser:Ik}=We({keyMap:{format:"f"},defaults:{format:"auto",fit:"cover"},formatMap:{jpg:"jpeg"},kvSeparator:"=",paramSeparator:","}),Nk=(e,t,n)=>{const r=kk(t),o=de(n?.domain?`https://${n.domain}`:"/");return o.pathname=`/cdn-cgi/image/${r}/${rb(e.toString())}`,Ee(o)},Tk=(e,t)=>{if(ko(e)!=="cloudflare")return null;const n=de(e),[,,,r,...o]=n.pathname.split("/"),i=Ik(r);return{src:Ee(de(o.join("/"))),operations:i,options:{domain:t?.domain??(n.hostname==="n"?void 0:n.hostname)}}},Ak=Be(Tk,Nk),Pk=/https?:\/\/(?<host>[^\/]+)\/cdn-cgi\/imagedelivery\/(?<accountHash>[^\/]+)\/(?<imageId>[^\/]+)\/*(?<transformations>[^\/]+)*$/g,Rk=/https?:\/\/(?<host>imagedelivery.net)\/(?<accountHash>[^\/]+)\/(?<imageId>[^\/]+)\/*(?<transformations>[^\/]+)*$/g,{operationsGenerator:jk,operationsParser:Ok}=We({keyMap:{width:"w",height:"h",format:"f"},defaults:{fit:"cover"},kvSeparator:"=",paramSeparator:","});function ab(e,t){const{host:n,accountHash:r,imageId:o}=e;if(!n||!r||!o)throw new Error("Missing required Cloudflare Images options");return["https:/",...n==="imagedelivery.net"?[n]:[n,"cdn-cgi","imagedelivery"],r,o,t].filter(Boolean).join("/")}const Lk=(e,t,n={})=>{const r=jk(t),o=ab(n,r);return Ee(de(o))},Mk=e=>{const t=de(e),n=[...t.toString().matchAll(Pk),...t.toString().matchAll(Rk)];if(!n[0]?.groups)return null;const{host:r,accountHash:o,imageId:i,transformations:s}=n[0].groups,l=Ok(s||""),c={host:r,accountHash:o,imageId:i};return{src:ab(c),operations:l,options:c}},Dk=(e,t,n={})=>{const r=Mk(e);if(!r)throw new Error("Invalid Cloudflare Images URL");const o={...r.operations,...t};return Lk(r.src,o,{...r.options,...n})},{operationsGenerator:Fk,operationsParser:Uk}=We({keyMap:{format:"force_format",width:"w",height:"h",quality:"q"},defaults:{org_if_sml:1}}),zk=(e,t={},{token:n}={})=>{if(!n)throw new Error("Token is required for Cloudimage URLs"+e);let r=e.toString();r=r.replace(/^https?:\/\//,""),r.includes("?")&&(t.ci_url_encoded=1,r=encodeURIComponent(r));const o=Fk(t),i=new URL(`https://${n}.cloudimg.io/`);return i.pathname=r,i.search=o,i.toString()},Bk=(e,t={})=>{const n=de(e);if(as(n)!=="cloudimage")return null;const r=Uk(n);let o=n.pathname;return r.ci_url_encoded&&(o=decodeURIComponent(o),delete r.ci_url_encoded),t.token??=n.hostname.replace(".cloudimg.io",""),{src:`${n.protocol}/${o}`,operations:r,options:t}},$k=Be(Bk,zk),Hk=/https?:\/\/(?<host>res\.cloudinary\.com)\/(?<cloudName>[a-zA-Z0-9-]+)\/(?<assetType>image|video|raw)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?)*)?\/(?:(?<version>v\d+)\/)?(?<id>(?:[^\s\/]+\/)*[^\s\/]+(?:\.[a-zA-Z0-9]+)?)$/,Vk=/https?:\/\/(?<host>(?<cloudName>[a-zA-Z0-9-]+)-res\.cloudinary\.com|[a-zA-Z0-9.-]+)\/(?<assetType>image|video|raw)\/(?<deliveryType>upload|fetch|private|authenticated|sprite|facebook|twitter|youtube|vimeo)\/?(?<signature>s\-\-[a-zA-Z0-9]+\-\-)?\/?(?<transformations>(?:[^_\/]+_[^,\/]+,?)*)?\/(?:(?<version>v\d+)\/)?(?<id>(?:[^\s\/]+\/)*[^\s\/]+(?:\.[a-zA-Z0-9]+)?)$/,{operationsGenerator:Wk,operationsParser:qk}=We({keyMap:{width:"w",height:"h",format:"f",quality:"q"},defaults:{format:"auto",c:"lfill"},kvSeparator:"_",paramSeparator:","});function Gk({host:e,cloudName:t,assetType:n,deliveryType:r,signature:o,transformations:i,version:s,id:l}){return["https:/",e,e==="res.cloudinary.com"?t:void 0,n,r,o,i,s,l].filter(Boolean).join("/")}function Kk(e){let t=e.toString().match(Hk);return t?.length||(t=e.toString().match(Vk)),t?.length?t.groups||{}:null}const Xk=(e,t)=>{const n=Kk(e.toString());if(!n)return e.toString();const r=qk(n.transformations||"");return n.transformations=Wk({...r,...t}),Gk(n)},Yk=Cr({keyMap:{format:"fm",width:"w",height:"h",quality:"q"},defaults:{fit:"fill"}}),Jk=(e,t)=>{const n=Yk(t),r=new URL(e);return r.search=n,Ee(r)},Zk=Eo,Qk=Be(Zk,Jk),e9=(e,t)=>
52{const{width:n,height:r}=JE(t,4e3,4e3);return Qk(e,{...t,width:n,height:r})},t9=Cr({defaults:{auto:"webp",disable:"upscale"}}),n9=(e,t,{baseURL:n="https://images.contentstack.io/"}={})=>{t.width&&t.height&&(t.fit??="crop");const r=t9(t),o=de(e);return o.hostname==="n"&&(o.protocol="https:",o.hostname=new URL(n).hostname),o.search=r,Ee(o)},r9=e=>{const{src:t,operations:n}=Eo(e)??{};if(!n||!t)return null;const{origin:r}=de(e);return{src:t,operations:n,options:{baseURL:r}}},o9=Be(r9,n9),i9=Cr({defaults:{withoutEnlargement:!0,fit:"cover"}}),s9=(e,t)=>{Array.isArray(t.transforms)&&(t.transforms=JSON.stringify(t.transforms));const n=i9(t),r=de(e);return r.search=n,Ee(r)},a9=e=>{const t=Eo(e);if(t?.operations?.transforms&&typeof t.operations.transforms=="string")try{t.operations.transforms=JSON.parse(t.operations.transforms)}catch{return null}return t},l9=Be(a9,s9),c9=/https:\/\/(?<region>[a-z0-9-]+)\.graphassets\.com\/(?<envId>[a-zA-Z0-9]+)(?:\/(?<transformations>.*?))?\/(?<handle>[a-zA-Z0-9]+)$/;We({keyMap:{width:"width",height:"height",format:"format"},defaults:{format:"auto",fit:"crop"}});const lb=e=>{const n=de(e).toString().match(c9);if(!n?.groups)return null;const{region:r,envId:o,handle:i,transformations:s}=n.groups,l={};return s&&s.split("/").forEach(u=>{const[d,h]=u.split("=");d==="resize"&&h?h.split(",").forEach(p=>{const[m,g]=p.split(":");m==="width"||m==="height"?l[m]=Number(g):m==="fit"&&(l.fit=g)}):d==="output"&&h?h.split(",").forEach(p=>{const[m,g]=p.split(":");m==="format"&&(l.format=g)}):d==="auto_image"&&(l.format="auto")}),{src:`https://${r}.graphassets.com/${o}/${i}`,operations:l,options:{region:r,envId:o,handle:i}}},u9=(e,t,n={})=>{const r=lb(e);if(!r)throw new Error("Invalid Hygraph URL");const{region:o,envId:i,handle:s}={...r.options,...n},l=[];if(t.width||t.height){const h=[];t.width&&t.height?h.push("fit:crop"):t.fit&&h.push(`fit:${t.fit}`),t.width&&h.push(`width:${t.width}`),t.height&&h.push(`height:${t.height}`),h.length&&l.push(`resize=${h.join(",")}`)}t.format==="auto"||!t.format&&!r.operations.format?l.push("auto_image"):t.format&&l.push(`output=format:${t.format}`);const c=`https://${o}.graphassets.com/${i}`,u=l.length>0?"/"+l.join("/"):"",d=de(`${c}${u}/${s}`);return Ee(d)},d9=Be(lb,u9),{operationsGenerator:h9,operationsParser:f9}=We({keyMap:{width:"w",height:"h",format:"f"},defaults:{m:"cropbox"},kvSeparator:"_",paramSeparator:"/"}),p9=(e,t)=>{const n=h9(t),r=de(e);return r.searchParams.set("imgeng",n),Ee(r)},m9=e=>{const t=de(e),n=t.searchParams.get("imgeng");if(!n)return null;const r=f9(n);return t.searchParams.delete("imgeng"),{src:Ee(t),operations:r}},g9=Be(m9,p9),{operationsGenerator:b9,operationsParser:x9}=We({keyMap:{width:"w",height:"h",format:"f",quality:"q"},defaults:{c:"maintain_ratio",fo:"auto"},kvSeparator:"-",paramSeparator:","}),v9=(e,t)=>{const n=b9(t),r=de(e);return r.searchParams.set("tr",n),Ee(r)},y9=e=>{const t=de(e);let n=null,r=t.pathname;if(t.searchParams.has("tr"))n=t.searchParams.get("tr"),t.searchParams.delete("tr");else{const i=t.pathname.split("/"),s=i.findIndex(l=>l.startsWith("tr:"));s!==-1&&(n=i[s].slice(3),r=i.slice(0,s).concat(i.slice(s+1)).join("/"))}if(!n)return null;t.pathname=r;const o=x9(n);return{src:Ee(t),operations:o}},w9=Be(y9,v9),{operationsGenerator:_9,operationsParser:C9}=We({keyMap:{format:"fm",width:"w",height:"h",quality:"q"},defaults:{fit:"min",auto:"format"}}),S9=e=>{const t=de(e),n=C9(e);return t.search="",{src:Ee(t),operations:n}},E9=(e,t)=>{const n=_9(t),r=de(e);return r.search=n,r.searchParams.has("fm")&&r.searchParams.get("auto")==="format"&&r.searchParams.delete("auto"),Ee(r)},k9=Be(S9,E9),{operationsGenerator:I9,operationsParser:N9}=We({keyMap:{width:"w",height:"h",quality:"q",format:"f"},defaults:{f:"auto"},kvSeparator:"_",paramSeparator:","}),wd=(e,t,n)=>{t.width&&t.height&&(t.s=`${t.width}x${t.height}`,delete t.width,delete t.height);const r=I9(t),o=n?.baseURL??"/_ipx",i=de(o);return i.pathname=`${Ql(i.pathname)}/${r}/${rb(e.toString())}`,Ee(i)},T9=e=>{const t=de(e),[,n,r,...o]=t.pathname.split("/");if(!r||!o.length)return null;const i=N9(r);if(i.s){const[s,l]=i.s.split("x").map(Number);i.width=s,i.height=l,delete i.s}return{src:"/"+o.join("/"),operations:i,options:{baseURL:`${t.origin}/${n}`}}}
52,A9=(e,t,n)=>{const r=de(e),o=n?.baseURL;if(o&&r.toString().startsWith(o)||r.pathname.startsWith("/_ipx")){const i=T9(e);if(i)return wd(i.src,{...i.operations,...t},{baseURL:i.options.baseURL})}return wd(e,t,{baseURL:o})},cb=["enlarge","flip","flop","negate","normalize","grayscale","removealpha","olrepeat","progressive","adaptive","lossless","nearlossless","metadata"],{operationsGenerator:P9,operationsParser:R9}=We({defaults:{fit:"cover"},formatMap:{jpg:"jpeg"}}),j9=(e,t)=>{const n=de(e);for(const r of cb)t[r]!==void 0&&(t[r]=t[r]?1:0);return n.search=P9(t),Ee(n)},O9=e=>{const t=de(e),n=R9(t);for(const r of cb)n[r]!==void 0&&(n[r]=ib(n[r]));return t.search="",{src:Ee(t),operations:n}},L9=Be(O9,j9),{operationsGenerator:M9,operationsParser:D9}=We({formatMap:{jpg:"jpeg"},keyMap:{format:"fm",width:"w",height:"h",quality:"q"}}),F9=(e,t)=>{const n=de(e);return t.lossless!==void 0&&(t.lossless=t.lossless?1:0),t.width&&t.height&&(t.fit="crop"),n.search=M9(t),Ee(n)},U9=e=>{const t=de(e),n=D9(t);return n.lossless!==void 0&&(n.lossless=ib(n.lossless)),t.search="",{src:Ee(t),operations:n}},z9=Be(U9,F9),{operationsGenerator:B9,operationsParser:$9}=We({defaults:{fit:"cover"},keyMap:{format:"fm",width:"w",height:"h",quality:"q"}}),H9=(e,t,n={})=>{const r=de(`${n.baseUrl||""}/.netlify/images`);return r.search=B9(t),r.searchParams.set("url",e.toString()),Ee(r)},V9=e=>{if(ko(e)!=="netlify")return null;const t=de(e),n=$9(t);delete n.url;const r=t.searchParams.get("url")||"";return t.search="",{src:r,operations:n,options:{baseUrl:t.hostname==="n"?void 0:t.origin}}},W9=Be(V9,H9),{operationsGenerator:q9,operationsParser:G9}=We({keyMap:{width:"w",quality:"q",height:!1,format:!1},defaults:{q:75}}),ub=(e,t,n={})=>{const r=de(`${n.baseUrl||""}/${n.prefix||"_vercel"}/image`);return r.search=q9(t),r.searchParams.append("url",e.toString()),Ee(r)},db=(e,t={})=>{if(!["vercel","nextjs"].includes(ko(e)||""))return null;const n=de(e),r=n.searchParams.get("url")||"";n.searchParams.delete("url");const o=G9(n);return n.search="",{src:r,operations:o,options:{baseUrl:t.baseUrl??n.origin}}},K9=Be(db,ub),X9=(e,t,n={})=>ub(e,t,{...n,prefix:"_next"}),Y9=(e,t)=>db(e,t),J9=Be(Y9,X9),{operationsGenerator:Z9,operationsParser:Q9}=We({keyMap:{width:"wid",height:"hei",quality:"qlt",format:"fmt"},defaults:{fit:"crop,0"}}),hb="https://s7d1.scene7.com/is/image/",eI=(e,t)=>{const n=new URL(e,hb);return n.search=Z9(t),Ee(n)},tI=e=>{if(as(e)!=="scene7")return null;const t=new URL(e,hb),n=Q9(t);return t.search="",{src:t.toString(),operations:n}},nI=Be(tI,eI),Da=/(.+?)(?:_(?:(pico|icon|thumb|small|compact|medium|large|grande|original|master)|(\d*)x(\d*)))?(?:_crop_([a-z]+))?(\.[a-zA-Z]+)(\.png|\.jpg|\.webp|\.avif)?$/,{operationsGenerator:rI,operationsParser:oI}=We({keyMap:{format:!1}}),iI=(e,t)=>{const n=de(e),r=n.pathname.replace(Da,"$1$6");return n.pathname=r,n.search=rI(t),Ee(n)},sI=e=>{const t=de(e),n=Da.exec(t.pathname),r=oI(t);if(n){const[,,,i,s,l]=n;i&&s&&!r.width&&!r.height&&(r.width=parseInt(i,10),r.height=parseInt(s,10)),l&&(r.crop??=l)}const o=t.pathname.replace(Da,"$1$6");t.pathname=o;for(const i of["width","height","crop","pad_color","format"])t.searchParams.delete(i);return{src:t.toString(),operations:r}},aI=Be(sI,iI),lI=/(?<id>\/f\/\d+\/\d+x\d+\/\w+\/[^\/]+)\/?(?<modifiers>m\/?(?<crop>\d+x\d+:\d+x\d+)?\/?(?<resize>(?<flipx>\-)?(?<width>\d+)x(?<flipy>\-)?(?<height>\d+))?\/?(filters\:(?<filters>[^\/]+))?)?$/,cI=/^(?<modifiers>\/(?<crop>\d+x\d+:\d+x\d+)?\/?(?<resize>(?<flipx>\-)?(?<width>\d+)x(?<flipy>\-)?(?<height>\d+))?\/?(filters\:(?<filters>[^\/]+))?\/?)?(?<id>\/f\/.+)$/,uI=/:(?![^(]*\))/,dI=e=>e?Object.fromEntries(e.split(uI).map(t=>{if(!t)return[];const[n,r]=t.split("(");return[n,r.replace(")","")]})):{},hI=e=>{if(!e)return;const t=Object.entries(e).map(([n,r])=>`${n}(${r??""})`);if(t.length!==0)return`filters:${t.join(":")}`},fI=e=>{const t=de(e),r=(t.hostname==="img2.storyblok.com"?cI:lI).exec(t.pathname);if(!r||!r.groups)return null;const{id:o,crop:i,width:s,height:l,filters:c,flipx:u,flipy:d}=r.groups,{format:h,...p}=dI(c??"");t.hostname==="img2.storyblok.com"&&(t.hostname="a.storyblok.com");const m=Object.fromEntries([["width",Number(s)||void 0],["height",Number(l)||void 0],["format",h],["crop",i],["filters",p],["flipx",u],["flipy",d]].filter(([g,b])=>b!==void 0));return{src:`${t.origin}${o}`,operations:m}},pI=(e,t)=>{const n=de(e),{width:r=0,height:o=0,format:i,crop:s,filters:l={},flipx:c="",flipy:u=""}=t,d=`${c}${r}x${u}${o}`;i&&(l.format=i);
52const h=[n.pathname,"m",s,d,hI(l)].filter(Boolean);return n.pathname=h.join("/"),Ee(n)},mI=Be(fI,pI),Ei="/storage/v1/object/public/",ki="/storage/v1/render/image/public/",gI=e=>e.pathname.startsWith(ki),{operationsGenerator:bI,operationsParser:xI}=We({}),vI=(e,t)=>{const n=de(e),r=n.pathname.replace(ki,Ei);return n.pathname=r,t.format&&t.format!=="origin"&&delete t.format,n.search=bI(t),Ee(n).replace(Ei,ki)},yI=e=>{const t=de(e),n=xI(t),r=gI(t),o=t.pathname.replace(ki,"").replace(Ei,"");return r?{src:`${t.origin}${Ei}${o}`,operations:n}:{src:Ee(t),operations:n}},wI=Be(yI,vI),fb=/^https?:\/\/(?<host>[^\/]+)\/(?<uuid>[^\/]+)(?:\/(?<filename>[^\/]+)?)?/,{operationsGenerator:_I,operationsParser:CI}=We({keyMap:{width:!1,height:!1},defaults:{format:"auto"},kvSeparator:"/",paramSeparator:"/-/"}),SI=e=>{const t=de(e),n=fb.exec(t.toString());if(!n||!n.groups)return null;const{host:r,uuid:o}=n.groups,[,...i]=t.pathname.split("/-/"),s=CI(i.join("/-/")||"");if(s.resize){const[l,c]=s.resize.split("x");l&&(s.width=parseInt(l)),c&&(s.height=parseInt(c)),delete s.resize}return{src:`https://${r}/${o}/`,operations:s,options:{host:r}}},EI=(e,t,n={})=>{const r=de(e),o=n.host||r.hostname,i=fb.exec(r.toString());i?.groups&&(r.pathname=`/${i.groups.uuid}/`),t.resize=t.resize||`${t.width??""}x${t.height??""}`,delete t.width,delete t.height;const s=KE(_I(t));return r.hostname=o,r.pathname=Ql(r.pathname)+(s?`/-/${s}`:"")+(i?.groups?.filename??""),Ee(r)},kI=Be(SI,EI),{operationsGenerator:II,operationsParser:NI}=We({keyMap:{width:"w",height:"h"},defaults:{crop:"1"}}),TI=(e,t)=>{const n=de(e),{crop:r}=t;return typeof r<"u"&&r!=="0"&&(t.crop=r?"1":"0"),n.search=II(t),Ee(n)},AI=e=>{const t=de(e),n=NI(t);return n.crop!==void 0&&(n.crop=n.crop==="1"),t.search="",{src:Ee(t),operations:n}},PI=Be(AI,TI),{operationsGenerator:RI,operationsParser:jI}=We({keyMap:{width:"w",height:"h",format:"output",quality:"q"},defaults:{fit:"cover"}}),OI=e=>{const t=de(e),n=t.searchParams.get("url");if(!n)return null;let r=n;!r.startsWith("http://")&&!r.startsWith("https://")&&(r="https://"+r),t.searchParams.delete("url");const o=jI(t);return{src:r,operations:o}},LI=(e,t)=>{const n=new URL("https://wsrv.nl/"),o=(typeof e=="string"?e:e.toString()).replace(/^https?:\/\//,"");n.searchParams.set("url",o);const i=RI(t),s=new URLSearchParams(i);for(const[l,c]of s)l!=="url"&&n.searchParams.set(l,c);return Ee(n)},MI=Be(OI,LI),DI={appwrite:hk,astro:gk,"builder.io":yk,bunny:Ek,cloudflare:Ak,cloudflare_images:Dk,cloudimage:$k,cloudinary:Xk,contentful:e9,contentstack:o9,directus:l9,hygraph:d9,imageengine:g9,imagekit:w9,imgix:k9,ipx:A9,keycdn:L9,"kontent.ai":z9,netlify:W9,nextjs:J9,scene7:nI,shopify:aI,storyblok:mI,supabase:wI,uploadcare:kI,vercel:K9,wordpress:PI,wsrv:MI};function pb(e){if(e)return DI[e]}function FI({cdn:e,fallback:t,operations:n={},options:r,...o}){if(e??=as(o.src)||t,!e)return o;const i=pb(e);return i?BE({...o,operations:n?.[e],options:r?.[e],transformer:i}):o}function UI({cdn:e,fallback:t,operations:n,options:r,...o}){if(e??=as(o.src)||t,!e)return o;const i=pb(e);return i?HE({...o,operations:n?.[e],options:r?.[e],transformer:i}):o}var _d=f.forwardRef(function(t,n){const r=Zl(FI(t));return a.jsx("img",{...r,ref:n})});f.forwardRef(function(t,n){const r=Zl(UI(t));return a.jsx("source",{...r,ref:n})});function Cd(e,t){let n="^";const r=t==="."?".+":".*",o=t==="."?"[^.]+":"[^/]+",i=e.split("**");for(let s=0;s<i.length;s++){s>0&&(n+=r);const l=i[s].split("*");for(let c=0;c<l.length;c++)c>0&&(n+=o),n+=l[c].replace(/[.+?^${}()|[\]\\]/g,"\\$&")}return n+="$",new RegExp(n)}function zI(e,t){if(e.protocol!==void 0&&e.protocol.replace(/:$/,"")!==t.protocol.replace(/:$/,"")||e.port!==void 0&&e.port!==t.port||!Cd(e.hostname,".").test(t.hostname)||e.search!==void 0&&e.search!==t.search)return!1;const n=e.pathname??"**";return!!Cd(n,"/").test(t.pathname)}function BI(e,t,n){return e.some(r=>n.hostname===r)||t.some(r=>zI(r,n))}const mb=(()=>{try{return JSON.parse("[]")}catch{return[]}})(),gb=(()=>{try{return JSON.parse("[]")}catch{return[]}})(),$I=mb.length>0||gb.length>0,HI=(()=>{try{return JSON.parse("[640,750,828,1080,1200,1920,2048,3840]")}catch{return[640,750,828,1080,1200,1920,2048,3840]}})();function VI(e){if(!$I)return{allowed:!0};let t;try{t=new URL(e,"http://n")}catch{return{allowed:!1,reason:`Invalid URL: ${e}`}}return BI(gb,mb,t)?{allowed:!0}:{allowed:!1,reason:`Image URL "${e}" is not configured in images.remotePatterns or images.domains in next.config.js. See: https://nextjs.org/docs/messages/next-image-unconfigured-host`}}function Sd(e){if(e.startsWith("data:image/")&&!/[)(}{\\'"\n\r]/.test(e))return e}function WI(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")}const Fa=HI;function Ii(e,t,n=75){return`/_vinext/image?url=${encodeURIComponent(e)}&w=${t}&q=${n}`}function qI(e,t,n=75){const r=Fa.filter(o=>o<=t*2);return r.length===0?`${Ii(e,t,n)} ${t}w`:r.map(o=>`${Ii(e,o,n)} ${o}w`).join(", ")}const GI=f.forwardRef(function({src:t,alt:n,width:r,height:o,fill:i,priority:s,quality:l,placeholder:c,blurDataURL:u,loader:d,sizes:h,className:p,style:m,unoptimized:g,overrideSrc:b,loading:v,...x},E){const y=typeof t=="string"?t:t.src,k=r??(typeof t=="object"?t.width:void 0),I=o??(typeof t=="object"?t.height:void 0),C=u??(typeof t=="object"?t.blurDataURL:void 0);if(d){const M=d({src:y,width:k??0,quality:l??75});return a.jsx("img",{ref:E,src:M,alt:n,width:i?void 0:k,height:i?void 0:I,loading:s?"eager":v??"lazy",decoding:"async",sizes:h,className:p,style:i?{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",...m}:m,...x})}if(WI(y)){const M=VI(y);if(!M.allowed)return console.error(`[next/image] ${M.reason}`),null;const _=C?Sd(C):void 0,R=c==="blur"&&_?`url(${_})`:void 0;if(i)return a.jsx(_d,{src:y,alt:n,layout:"fullWidth",priority:s,sizes:h,className:p,background:R});if(k&&I)return a.jsx(_d,{src:y,alt:n,width:k,height:I,layout:"constrained",priority:s,sizes:h,className:p,background:R})}const A=l??75,T=y.endsWith(".svg"),L=g===!0||T&&!0,D=k&&!i&&!L?qI(y,k,A):k&&!i?Fa.filter(M=>M<=k*2).map(M=>`${y} ${M}w`).join(", ")||`${y} ${k}w`:void 0,S=L?y:k?Ii(y,k,A):Ii(y,Fa[0],A),j=C?Sd(C):void 0,P=c==="blur"&&j?{backgroundImage:`url(${j})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"}:void 0;return a.jsx("img",{ref:E,src:S,alt:n,width:i?void 0:k,height:i?void 0:I,loading:s?"eager":v??"lazy",fetchPriority:s?"high":void 0,decoding:"async",srcSet:D,sizes:h??(i?"100vw":void 0),className:p,"data-nimg":i?"fill":"1",style:i?{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover",...P,...m}:{...P,...m},...x})});function KI(){const e=Vn(),t=se("AppBanner"),[n,r]=f.useState(!1),[o,i]=f.useState(!1);if(f.useEffect(()=>i(Sl()),[]),!o||n)return null;const s=e.includes("/console/review")?"review":"inbox";return a.jsxs("div",{role:"region","aria-label":t("message"),className:"relative z-50 flex min-h-20 items-center gap-3 border-b border-(--line-soft) bg-(--bg-elevated) px-3 py-2",children:[a.jsx("button",{type:"button",onClick:()=>r(!0),"aria-label":t("dismiss"),className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-(--fg-muted)",children:a.jsx(Xn,{size:16,"aria-hidden":"true"})}),a.jsx("div",{className:"flex h-13 w-13 shrink-0 items-center justify-center overflow-hidden rounded-xl bg-[#142440]",children:a.jsx(GI,{src:"/icons/icon-192.png",alt:"",width:52,height:52,className:"h-11 w-11",unoptimized:!0})}),a.jsxs("div",{className:"min-w-0 flex-1 leading-tight",children:[a.jsx("p",{className:"truncate text-sm font-semibold text-(--fg-strong)",children:"Orvoca"}),a.jsx("p",{className:"mt-1 truncate text-xs text-(--fg-muted)",children:t("message")})]}),a.jsx("a",{href:`/open/${s}`,className:"shrink-0 px-2 py-3 text-sm font-semibold text-[#3478f6] no-underline",children:t("open")})]})}const XI={en:"en",ko:"ko",ja:"ja","zh-Hans":"zh-Hans","zh-Hant":"zh-Hant","es-MX":"es-MX","pt-B
52R":"pt-BR","de-DE":"de-DE","fr-FR":"fr-FR"},Ed={en:"Download on the App Store",ko:"App Store에서 다운로드하기",ja:"App Storeからダウンロード","zh-Hans":"从 App Store 下载","zh-Hant":"在 App Store 下載","es-MX":"Descárgalo en el App Store","pt-BR":"Baixe na App Store","de-DE":"Laden im App Store","fr-FR":"Télécharger sur l’App Store"},kd={en:119.66407,ko:129.70071,ja:108.85157,"zh-Hans":108.85157,"zh-Hant":108.85157,"es-MX":119.66407,"pt-BR":119.66407,"de-DE":119.66407,"fr-FR":126.50751};function bb({locale:e,position:t}){const n=XI[e]??"en";return a.jsx(Qr,{href:Ht,target:"_blank",rel:"noopener noreferrer",onClick:()=>it("cta_clicked",{cta_target:"ios",placement:t,device_type:yn(),locale:e}),className:"inline-flex w-fit items-center no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--text-secondary)]",children:a.jsx("img",{src:`/badges/app-store-${n}.svg`,alt:Ed[n]??Ed.en,width:kd[n]??kd.en,height:40,loading:"lazy",decoding:"async",className:"block h-[52px] w-auto"})})}const YI="_ctaBack_4qgj6_151",JI={ctaBack:YI};function ZI({label:e}){const[t,n]=f.useState(!1);return f.useEffect(()=>{n(window.history.length>1)},[]),t?a.jsx("button",{type:"button",className:JI.ctaBack,onClick:()=>window.history.back(),"aria-label":e,children:e}):null}function QI(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const eN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nN={};function Id(e,t){return(nN.jsx?tN:eN).test(e)}const rN=/[ \t\n\f\r]/g;function oN(e){return typeof e=="object"?e.type==="text"?Nd(e.value):!1:Nd(e)}function Nd(e){return e.replace(rN,"")===""}class Io{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Io.prototype.normal={};Io.prototype.property={};Io.prototype.space=void 0;function xb(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Io(n,r,t)}function Ua(e){return e.toLowerCase()}class at{constructor(t,n){this.attribute=n,this.property=t}}at.prototype.attribute="";at.prototype.booleanish=!1;at.prototype.boolean=!1;at.prototype.commaOrSpaceSeparated=!1;at.prototype.commaSeparated=!1;at.prototype.defined=!1;at.prototype.mustUseProperty=!1;at.prototype.number=!1;at.prototype.overloadedBoolean=!1;at.prototype.property="";at.prototype.spaceSeparated=!1;at.prototype.space=void 0;let iN=0;const ve=Jn(),Ge=Jn(),za=Jn(),W=Jn(),Me=Jn(),hr=Jn(),lt=Jn();function Jn(){return 2**++iN}const Ba=Object.freeze(Object.defineProperty({__proto__:null,boolean:ve,booleanish:Ge,commaOrSpaceSeparated:lt,commaSeparated:hr,number:W,overloadedBoolean:za,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),Ks=Object.keys(Ba);class ec extends at{constructor(t,n,r,o){let i=-1;if(super(t,n),Td(this,"space",o),typeof r=="number")for(;++i<Ks.length;){const s=Ks[i];Td(this,Ks[i],(r&Ba[s])===Ba[s])}}}ec.prototype.defined=!0;function Td(e,t,n){n&&(e[t]=n)}function Sr(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new ec(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ua(r)]=r,n[Ua(i.attribute)]=r}return new Io(t,n,e.space)}const vb=Sr({properties:{ariaActiveDescendant:null,ariaAtomic:Ge,ariaAutoComplete:null,ariaBusy:Ge,ariaChecked:Ge,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:Ge,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:Ge,ariaFlowTo:Me,ariaGrabbed:Ge,ariaHasPopup:null,ariaHidden:Ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:W,ariaLive:null,ariaModal:Ge,ariaMultiLine:Ge,ariaMultiSelectable:Ge,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:Ge,ariaReadOnly:Ge,ariaRelevant:null,ariaRequired:Ge,ariaRoleDescription:Me,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:Ge,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function yb(e,t){return t in e?e[t]:t}
vendor: 3,213 bytes, line 52
52function wb(e,t){return yb(e,t.toLowerCase())}const sN=Sr({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hr,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:ve,allowPaymentRequest:ve,allowUserMedia:ve,alt:null,as:null,async:ve,autoCapitalize:null,autoComplete:Me,autoFocus:ve,autoPlay:ve,blocking:Me,capture:null,charSet:null,checked:ve,cite:null,className:Me,cols:W,colSpan:null,content:null,contentEditable:Ge,controls:ve,controlsList:Me,coords:W|hr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ve,defer:ve,dir:null,dirName:null,disabled:ve,download:za,draggable:Ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ve,formTarget:null,headers:Me,height:W,hidden:za,high:W,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:ve,inputMode:null,integrity:null,is:null,isMap:ve,itemId:null,itemProp:Me,itemRef:Me,itemScope:ve,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ve,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:ve,muted:ve,name:null,nonce:null,noModule:ve,noValidate:ve,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ve,optimum:W,pattern:null,ping:Me,placeholder:null,playsInline:ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ve,referrerPolicy:null,rel:Me,required:ve,reversed:ve,rows:W,rowSpan:W,sandbox:Me,scope:null,scoped:ve,seamless:ve,selected:ve,shadowRootClonable:ve,shadowRootDelegatesFocus:ve,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:Ge,src:null,
52srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:ve,useMap:null,value:Ge,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ve,declare:ve,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:ve,noHref:ve,noShade:ve,noWrap:ve,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:Ge,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ve,disableRemotePlayback:ve,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:wb}),aN=Sr({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav
52-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:lt,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:Me,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:hr,g2:hr,glyphName:hr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:lt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
52Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lt,rev:lt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lt,requiredFeatures:lt,requiredFonts:lt,requiredFormats:lt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:lt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lt,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yb}),_b=Sr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Cb=Sr({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wb}),Sb=Sr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lN={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},cN=/[A-Z]/g,Ad=/-[a-z]/g,uN=/^data[-\w.:]+$/i;function dN(e,t){const n=Ua(t);let r=t,o=at;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&uN.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Ad,fN);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Ad.test(i)){let s=i.replace(cN,hN);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=ec}return new o(r,t)}function hN(e){return"-"+e.toLowerCase()}function fN(e){return e.charAt(1).toUpperCase()}const pN=xb([vb,sN,_b,Cb,Sb],"html"),tc=xb([vb,aN,_b,Cb,Sb],"svg");function mN(e){return e.join(" ").trim()}var nr={},Xs,Pd;function gN(){if(Pd)return Xs;Pd=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
53`,u="/",d="*",h="",p="comment",m="declaration";function g(v,x){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];x=x||{};var E=1,y=1;function k(M){var _=M.match(t);_&&(E+=_.length);var R=M.lastIndexOf(c);y=~R?M.length-R:y+M.length}function I(){var M={line:E,column:y};return function(_){return _.position=new C(M),L(),_}}function C(M){this.start=M,this.end={line:E,column:y},this.source=x.source}C.prototype.content=v;function A(M){var _=new Error(x.source+":"+E+":"+y+": "+M);if(_.reason=M,_.filename=x.source,_.line=E,_.column=y,_.source=v,!x.silent)throw _}function T(M){var _=M.exec(v);if(_){var R=_[0];return k(R),v=v.slice(R.length),_}}function L(){T(n)}function D(M){var _;
53for(M=M||[];_=S();)_!==!1&&M.push(_);return M}function S(){var M=I();if(!(u!=v.charAt(0)||d!=v.charAt(1))){for(var _=2;h!=v.charAt(_)&&(d!=v.charAt(_)||u!=v.charAt(_+1));)++_;if(_+=2,h===v.charAt(_-1))return A("End of comment missing");var R=v.slice(2,_-2);return y+=2,k(R),v=v.slice(_),y+=2,M({type:p,comment:R})}}function j(){var M=I(),_=T(r);if(_){if(S(),!T(o))return A("property missing ':'");var R=T(i),O=M({type:m,property:b(_[0].replace(e,h)),value:R?b(R[0].replace(e,h)):h});return T(s),O}}function P(){var M=[];D(M);for(var _;_=j();)_!==!1&&(M.push(_),D(M));return M}return L(),P()}function b(v){return v?v.replace(l,h):h}return Xs=g,Xs}var Rd;function bN(){if(Rd)return nr;Rd=1;var e=nr&&nr.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.default=n;const t=e(gN());function n(r,o){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),l=typeof o=="function";return s.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:d}=c;l?o(u,d,c):d&&(i=i||{},i[u]=d)}),i}return nr}var Ar={},jd;function xN(){if(jd)return Ar;jd=1,Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},s=function(u,d){return d.toUpperCase()},l=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(o,l):u=u.replace(r,l),u.replace(t,s))};return Ar.camelCase=c,Ar}var Pr,Od;function vN(){if(Od)return Pr;Od=1;var e=Pr&&Pr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(bN()),n=xN();function r(o,i){var s={};return!o||typeof o!="string"||(0,t.default)(o,function(l,c){l&&c&&(s[(0,n.camelCase)(l,i)]=c)}),s}return r.default=r,Pr=r,Pr}var yN=vN();const wN=ph(yN),Eb=kb("end"),nc=kb("start");function kb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _N(e){const t=nc(e),n=Eb(e);if(t&&n)return{start:t,end:n}}function zr(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ld(e.position):"start"in e||"end"in e?Ld(e):"line"in e||"column"in e?$a(e):""}function $a(e){return Md(e&&e.line)+":"+Md(e&&e.column)}function Ld(e){return $a(e&&e.start)+"-"+$a(e&&e.end)}function Md(e){return e&&typeof e=="number"?e:1}class Je extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(s=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=l?l.line:void 0,this.name=zr(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Je.prototype.file="";Je.prototype.name="";Je.prototype.reason="";Je.prototype.message="";Je.prototype.stack="";Je.prototype.column=void 0;Je.prototype.line=void 0;Je.prototype.ancestors=void 0;Je.prototype.cause=void 0;Je.prototype.fatal=void 0;Je.prototype.place=void 0;Je.prototype.ruleId=void 0;Je.prototype.source=void 0;const rc={}.hasOwnProperty,CN=new Map,SN=/[A-Z]/g,EN=new Set(["table","tbody","thead","tfoot","tr"]),kN=new Set(["td","th"]),Ib="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function IN(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=LN(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 93,192 bytes, lines 53-65
53if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=ON(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tc:pN,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Nb(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Nb(e,t,n){if(t.type==="element")return NN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return TN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return PN(e,t,n);if(t.type==="mdxjsEsm")return AN(e,t);if(t.type==="root")return RN(e,t,n);if(t.type==="text")return jN(e,t)}function NN(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=tc,e.schema=o),e.ancestors.push(t);const i=Ab(e,t.tagName,!1),s=MN(e,t);let l=ic(e,t);return EN.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!oN(c):!0})),Tb(e,s,i,t),oc(s,l),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function TN(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}to(e,t.position)}function AN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);to(e,t.position)}function PN(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=tc,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:Ab(e,t.name,!0),s=DN(e,t),l=ic(e,t);return Tb(e,s,i,t),oc(s,l),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function RN(e,t,n){const r={};return oc(r,ic(e,t)),e.create(t,e.Fragment,r,n)}function jN(e,t){return t.value}function Tb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function oc(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ON(e,t,n){return r;function r(o,i,s,l){const u=Array.isArray(s.children)?n:t;return l?u(i,s,l):u(i,s)}}function LN(e,t){return n;function n(r,o,i,s){const l=Array.isArray(i.children),c=nc(r);return t(o,i,s,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function MN(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&rc.call(t.properties,o)){const i=FN(e,o,t.properties[o]);if(i){const[s,l]=i;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&kN.has(t.tagName)?r=l:n[s]=l}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function DN(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else to(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else to(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function ic(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:CN;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=o.get(c)||0;s=c+"-"+u,o.set(c,u+1)}}const l=Nb(e,i,s);l!==void 0&&n.push(l)}return n}function FN(e,t,n){const r=dN(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?QI(n):mN(n)),r.property==="style"){let o=typeof n=="object"?n:UN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=zN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?lN[r.property]||r.property:r.attribute,n]}}function UN(e,t){try{return wN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Je("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=Ib+"#cannot-parse-style-attribute",o}}function Ab(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,s;for(;++i<o.length;){const l=Id(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}r=s}else r=Id(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return rc.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);to(e)}function to(e,t){const n=new Je("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ib+"#cannot-handle-mdx-estrees-without-createevaluater",n}function zN(e){const t={};let n;for(n in e)rc.call(e,n)&&(t[BN(n)]=e[n]);return t}function BN(e){let t=e.replace(SN,$N);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function $N(e){return"-"+e.toLowerCase()}const Ys={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},HN={};function VN(e,t){const n=HN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Pb(e,r,o)}function Pb(e,t,n){if(WN(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Dd(e.children,t,n)}return Array.isArray(e)?Dd(e,t,n):""}function Dd(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=Pb(e[o],t,n);return r.join("")}function WN(e){return!!(e&&typeof e=="object")}const Fd=document.createElement("i");function sc(e){const t="&"+e+";";Fd.innerHTML=t;const n=Fd.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function zt(e,t,n,r){const o=e.length;let i=0,s;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function gt(e,t){return e.length>0?(zt(e,e.length,0,t),e):t}const Ud={}.hasOwnProperty;function qN(e){const t={};let n=-1;for(;++n<e.length;)GN(t,e[n]);return t}function GN(e,t){let n;for(n in t){const o=(Ud.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){Ud.call(o,s)||(o[s]=[]);const l=i[s];KN(o[s],Array.isArray(l)?l:l?[l]:[])}}}function KN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);zt(e,0,0,r)}function Rb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ot=An(/[A-Za-z]/),ht=An(/[\dA-Za-z]/),XN=An(/[#-'*+\--9=?A-Z^-~]/);function Ha(e){return e!==null&&(e<32||e===127)}const Va=An(/\d/),YN=An(/[\dA-Fa-f]/),JN=An(/[!-/:-@[-`{-~]/);function me(e){return e!==null&&e<-2}function ot(e){return e!==null&&(e<0||e===32)}function Ae(e){return e===-2||e===-1||e===32}const ZN=An(new RegExp("\\p{P}|\\p{S}","u")),QN=An(/\s/);function An(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Er(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&ht(e.charCodeAt(n+1))&&ht(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),o=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+o+1,s=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function De(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(c){return Ae(c)?(e.enter(n),l(c)):t(c)}function l(c){return Ae(c)&&i++<o?(e.consume(c),l):(e.exit(n),t(c))}}const eT={tokenize:tT};function tT(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),De(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return me(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}const nT={tokenize:rT},zd={tokenize:oT};function rT(e){const t=this,n=[];let r=0,o,i,s;return l;function l(y){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,c,u)(y)}return u(y)}function c(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&E();const k=t.events.length;let I=k,C;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){C=t.events[I][1].end;break}x(r);let A=k;for(;A<t.events.length;)t.events[A][1].end={...C},A++;return zt(t.events,I+1,0,t.events.slice(k)),t.events.length=A,u(y)}return l(y)}function u(y){if(r===n.length){if(!o)return p(y);if(o.currentConstruct&&o.currentConstruct.concrete)return g(y);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(zd,d,h)(y)}function d(y){return o&&E(),x(r),p(y)}function h(y){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,g(y)}function p(y){return t.containerState={},e.attempt(zd,m,g)(y)}function m(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function g(y){if(y===null){o&&E(),x(0),e.consume(y);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:i}),b(y)}function b(y){if(y===null){v(e.exit("chunkFlow"),!0),x(0),e.consume(y);return}return me(y)?(e.consume(y),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(y),b)}function v(y,k){const I=t.sliceStream(y);if(k&&I.push(null),y.previous=i,i&&(i.next=y),i=y,o.defineSkip(y.start),o.write(I),t.parser.lazy[y.start.line]){let C=o.events.length;for(;C--;)if(o.events[C][1].start.offset<s&&(!o.events[C][1].end||o.events[C][1].end.offset>s))return;const A=t.events.length;let T=A,L,D;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(L){D=t.events[T][1].end;break}L=!0}for(x(r),C=A;C<t.events.length;)t.events[C][1].end={...D},C++;zt(t.events,T+1,0,t.events.slice(A)),t.events.length=C}}function x(y){let k=n.length;for(;k-- >y;){const I=n[k];t.containerState=I[1],I[0].exit.call(t,e)}n.length=y}function E(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function oT(e,t,n){return De(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bd(e){if(e===null||ot(e)||QN(e))return 1;if(ZN(e))return 2}function ac(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Wa={name:"attention",resolveAll:iT,tokenize:sT};function iT(e,t){let n=-1,r,o,i,s,l,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},p={...e[n][1].start};$d(h,-c),$d(p,c),s={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},o={type:c>1?"strong":"emphasis",start:{...s.start},end:{...l.end}},e[r][1].end={...s.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=gt(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=gt(u,[["enter",o,t],["enter",s,t],["exit",s,t],["enter",i,t]]),u=gt(u,ac(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=gt(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=gt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,zt(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function sT(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Bd(r);let i;return s;function s(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const u=e.exit("attentionSequence"),d=Bd(c),h=!d||d===2&&o||n.includes(c),p=!o||o===2&&d||n.includes(r);return u._open=!!(i===42?h:h&&(o||!p)),u._close=!!(i===42?p:p&&(d||!h)),t(c)}}function $d(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aT={name:"autolink",tokenize:lT};function lT(e,t,n){let r=0;return o;function o(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(m){return Ot(m)?(e.consume(m),s):m===64?n(m):u(m)}function s(m){return m===43||m===45||m===46||ht(m)?(r=1,l(m)):u(m)}function l(m){return m===58?(e.consume(m),r=0,c):(m===43||m===45||m===46||ht(m))&&r++<32?(e.consume(m),l):(r=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Ha(m)?n(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),d):XN(m)?(e.consume(m),u):n(m)}function d(m){return ht(m)?h(m):n(m)}function h(m){return m===46?(e.consume(m),r=0,d):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||ht(m))&&r++<63){const g=m===45?p:h;return e.consume(m),g}return n(m)}}const ls={partial:!0,tokenize:cT};function cT(e,t,n){return r;function r(i){return Ae(i)?De(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||me(i)?t(i):n(i)}}const jb={continuation:{tokenize:dT},exit:hT,name:"blockQuote",tokenize:uT};function uT(e,t,n){const r=this;return o;function o(s){if(s===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return Ae(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function dT(e,t,n){const r=this;return o;function o(s){return Ae(s)?De(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(jb,t,n)(s)}}function hT(e){e.exit("blockQuote")}const Ob={name:"characterEscape",tokenize:fT};function fT(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return JN(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Lb={name:"characterReference",tokenize:pT};function pT(e,t,n){const r=this;let o=0,i,s;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,s=ht,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=YN,d):(e.enter("characterReferenceValue"),i=7,s=Va,d(h))}function d(h){if(h===59&&o){const p=e.exit("characterReferenceValue");return s===ht&&!sc(r.sliceSerialize(p))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(h)&&o++<i?(e.consume(h),d):n(h)}}const Hd={partial:!0,tokenize:gT},Vd={concrete:!0,name:"codeFenced",tokenize:mT};function mT(e,t,n){const r=this,o={partial:!0,tokenize:I};let i=0,s=0,l;return c;function c(C){return u(C)}function u(C){const A=r.events[r.events.length-1];return i=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===l?(s++,e.consume(C),d):s<3?n(C):(e.exit("codeFencedFenceSequence"),Ae(C)?De(e,h,"whitespace")(C):h(C))}function h(C){return C===null||me(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(Hd,b,k)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(C)):Ae(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),De(e,m,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),p)}function m(C){return C===null||me(C)?h(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||me(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(C)):C===96&&C===l?n(C):(e.consume(C),g)}function b(C){return e.attempt(o,k,v)(C)}function v(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),x}function x(C){return i>0&&Ae(C)?De(e,E,"linePrefix",i+1)(C):E(C)}function E(C){return C===null||me(C)?e.check(Hd,b,k)(C):(e.enter("codeFlowValue"),y(C))}function y(C){return C===null||me(C)?(e.exit("codeFlowValue"),E(C)):(e.consume(C),y)}function k(C){return e.exit("codeFenced"),t(C)}function I(C,A,T){let L=0;return D;function D(_){return C.enter("lineEnding"),C.consume(_),C.exit("lineEnding"),S}function S(_){return C.enter("codeFencedFence"),Ae(_)?De(C,j,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):j(_)}function j(_){return _===l?(C.enter("codeFencedFenceSequence"),P(_)):T(_)}function P(_){return _===l?(L++,C.consume(_),P):L>=s?(C.exit("codeFencedFenceSequence"),Ae(_)?De(C,M,"whitespace")(_):M(_)):T(_)}function M(_){return _===null||me(_)?(C.exit("codeFencedFence"),A(_)):T(_)}}}function gT(e,t,n){const r=this;return o;function o(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Js={name:"codeIndented",tokenize:xT},bT={partial:!0,tokenize:vT};function xT(e,t,n){const r=this;return o;function o(u){return e.enter("codeIndented"),De(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?s(u):n(u)}function s(u){return u===null?c(u):me(u)?e.attempt(bT,s,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||me(u)?(e.exit("codeFlowValue"),s(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function vT(e,t,n){const r=this;return o;function o(s){return r.parser.lazy[r.now().line]?n(s):me(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):De(e,i,"linePrefix",5)(s)}function i(s){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):me(s)?o(s):n(s)}}const yT={name:"codeText",previous:_T,resolve:wT,tokenize:CT};function wT(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function _T(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function CT(e,t,n){let r=0,o,i;return s;function s(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(i=e.enter("codeTextSequence"),o=0,d(h)):me(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||me(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),o++,d):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(i.type="codeTextData",u(h))}}class ST{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Rr(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Rr(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Rr(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Rr(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Rr(this.left,n.reverse())}}}function Rr(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Mb(e){const t={};let n=-1,r,o,i,s,l,c,u;const d=new ST(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ET(d,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,o=void 0;i--;)if(s=d.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(o&&(d.get(o)[1].type="lineEndingBlank"),s[1].type="lineEnding",o=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;o&&(r[1].end={...d.get(o)[1].start},l=d.slice(o,n),l.unshift(r),d.splice(o,n-o+1,l))}}return zt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function ET(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const l=s.events,c=[],u={};let d,h,p=-1,m=n,g=0,b=0;const v=[b];for(;m;){for(;e.get(++o)[1]!==m;);i.push(o),m._tokenizer||(d=r.sliceStream(m),m.next||d.push(null),h&&s.defineSkip(m.start),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(d),m._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(b=p+1,v.push(b),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(s.events=[],m?(m._tokenizer=void 0,m.previous=void 0):v.pop(),p=v.length;p--;){const x=l.slice(v[p],v[p+1]),E=i.pop();c.push([E,E+x.length-1]),e.splice(E,2,x)}for(c.reverse(),p=-1;++p<c.length;)u[g+c[p][0]]=g+c[p][1],g+=c[p][1]-c[p][0]-1;return u}const kT={resolve:NT,tokenize:TT},IT={partial:!0,tokenize:AT};function NT(e){return Mb(e),e}function TT(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?i(l):me(l)?e.check(IT,s,i)(l):(e.consume(l),o)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function AT(e,t,n){const r=this;return o;function o(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),De(e,i,"linePrefix")}function i(s){if(s===null||me(s))return n(s);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function Db(e,t,n,r,o,i,s,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(x){return x===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(x),e.exit(i),p):x===null||x===32||x===41||Ha(x)?n(x):(e.enter(r),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),b(x))}function p(x){return x===62?(e.enter(i),e.consume(x),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(l),p(x)):x===null||x===60||me(x)?n(x):(e.consume(x),x===92?g:m)}function g(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function b(x){return!d&&(x===null||x===41||ot(x))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(r),t(x)):d<u&&x===40?(e.consume(x),d++,b):x===41?(e.consume(x),d--,b):x===null||x===32||x===40||Ha(x)?n(x):(e.consume(x),x===92?v:b)}function v(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function Fb(e,t,n,r,o,i){const s=this;let l=0,c;return u;function u(m){return e.enter(r),e.enter(o),e.consume(m),e.exit(o),e.enter(i),d}function d(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(m):m===93?(e.exit(i),e.enter(o),e.consume(m),e.exit(o),e.exit(r),t):me(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===null||m===91||m===93||me(m)||l++>999?(e.exit("chunkString"),d(m)):(e.consume(m),c||(c=!Ae(m)),m===92?p:h)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,h):h(m)}}function Ub(e,t,n,r,o,i){let s;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),s=p===40?41:p,c):n(p)}function c(p){return p===s?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),u(p))}function u(p){return p===s?(e.exit(i),c(s)):p===null?n(p):me(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),De(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===s||p===null||me(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?h:d)}function h(p){return p===s||p===92?(e.consume(p),d):d(p)}}function Br(e,t){let n;return r;function r(o){return me(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ae(o)?De(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const PT={name:"definition",tokenize:jT},RT={partial:!0,tokenize:OT};function jT(e,t,n){const r=this;let o;return i;function i(m){return e.enter("definition"),s(m)}function s(m){return Fb.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return o=fr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return ot(m)?Br(e,u)(m):u(m)}function u(m){return Db(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function d(m){return e.attempt(RT,h,h)(m)}function h(m){return Ae(m)?De(e,p,"whitespace")(m):p(m)}function p(m){return m===null||me(m)?(e.exit("definition"),r.parser.defined.push(o),t(m)):n(m)}}function OT(e,t,n){return r;function r(l){return ot(l)?Br(e,o)(l):n(l)}function o(l){return Ub(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return Ae(l)?De(e,s,"whitespace")(l):s(l)}function s(l){return l===null||me(l)?t(l):n(l)}}const LT={name:"hardBreakEscape",tokenize:MT};function MT(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return me(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const DT={name:"headingAtx",resolve:FT,tokenize:UT};function FT(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},zt(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function UT(e,t,n){let r=0;return o;function o(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),s(d)}function s(d){return d===35&&r++<6?(e.consume(d),s):d===null||ot(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||me(d)?(e.exit("atxHeading"),t(d)):Ae(d)?De(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||ot(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const zT=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Wd=["pre","script","style","textarea"],BT={concrete:!0,name:"htmlFlow",resolveTo:VT,tokenize:WT},$T={partial:!0,tokenize:GT},HT={partial:!0,tokenize:qT};function VT(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function WT(e,t,n){const r=this;let o,i,s,l,c;return u;function u(N){return d(N)}function d(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),h}function h(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),i=!0,b):N===63?(e.consume(N),o=3,r.interrupt?t:w):Ot(N)?(e.consume(N),s=String.fromCharCode(N),v):n(N)}function p(N){return N===45?(e.consume(N),o=2,m):N===91?(e.consume(N),o=5,l=0,g):Ot(N)?(e.consume(N),o=4,r.interrupt?t:w):n(N)}function m(N){return N===45?(e.consume(N),r.interrupt?t:w):n(N)}function g(N){const fe="CDATA[";return N===fe.charCodeAt(l++)?(e.consume(N),l===fe.length?r.interrupt?t:j:g):n(N)}function b(N){return Ot(N)?(e.consume(N),s=String.fromCharCode(N),v):n(N)}function v(N){if(N===null||N===47||N===62||ot(N)){const fe=N===47,re=s.toLowerCase();return!fe&&!i&&Wd.includes(re)?(o=1,r.interrupt?t(N):j(N)):zT.includes(s.toLowerCase())?(o=6,fe?(e.consume(N),x):r.interrupt?t(N):j(N)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):i?E(N):y(N))}return N===45||ht(N)?(e.consume(N),s+=String.fromCharCode(N),v):n(N)}function x(N){return N===62?(e.consume(N),r.interrupt?t:j):n(N)}function E(N){return Ae(N)?(e.consume(N),E):D(N)}function y(N){return N===47?(e.consume(N),D):N===58||N===95||Ot(N)?(e.consume(N),k):Ae(N)?(e.consume(N),y):D(N)}function k(N){return N===45||N===46||N===58||N===95||ht(N)?(e.consume(N),k):I(N)}function I(N){return N===61?(e.consume(N),C):Ae(N)?(e.consume(N),I):y(N)}function C(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),c=N,A):Ae(N)?(e.consume(N),C):T(N)}function A(N){return N===c?(e.consume(N),c=null,L):N===null||me(N)?n(N):(e.consume(N),A)}function T(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||ot(N)?I(N):(e.consume(N),T)}function L(N){return N===47||N===62||Ae(N)?y(N):n(N)}function D(N){return N===62?(e.consume(N),S):n(N)}function S(N){return N===null||me(N)?j(N):Ae(N)?(e.consume(N),S):n(N)}function j(N){return N===45&&o===2?(e.consume(N),R):N===60&&o===1?(e.consume(N),O):N===62&&o===4?(e.consume(N),te):N===63&&o===3?(e.consume(N),w):N===93&&o===5?(e.consume(N),$):me(N)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check($T,K,P)(N)):N===null||me(N)?(e.exit("htmlFlowData"),P(N)):(e.consume(N),j)}function P(N){return e.check(HT,M,K)(N)}function M(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),_}function _(N){return N===null||me(N)?P(N):(e.enter("htmlFlowData"),j(N))}function R(N){return N===45?(e.consume(N),w):j(N)}function O(N){return N===47?(e.consume(N),s="",U):j(N)}function U(N){if(N===62){const fe=s.toLowerCase();return Wd.includes(fe)?(e.consume(N),te):j(N)}return Ot(N)&&s.length<8?(e.consume(N),s+=String.fromCharCode(N),U):j(N)}function $(N){return N===93?(e.consume(N),w):j(N)}function w(N){return N===62?(e.consume(N),te):N===45&&o===2?(e.consume(N),w):j(N)}function te(N){return N===null||me(N)?(e.exit("htmlFlowData"),K(N)):(e.consume(N),te)}function K(N){return e.exit("htmlFlow"),t(N)}}function qT(e,t,n){const r=this;return o;function o(s){return me(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function GT(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ls,t,n)}}const KT={name:"htmlText",tokenize:XT};function XT(e,t,n){const r=this;let o,i,s;return l;function l(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),c}function c(w){return w===33?(e.consume(w),u):w===47?(e.consume(w),I):w===63?(e.consume(w),y):Ot(w)?(e.consume(w),T):n(w)}function u(w){return w===45?(e.consume(w),d):w===91?(e.consume(w),i=0,g):Ot(w)?(e.consume(w),E):n(w)}function d(w){return w===45?(e.consume(w),m):n(w)}function h(w){return w===null?n(w):w===45?(e.consume(w),p):me(w)?(s=h,O(w)):(e.consume(w),h)}function p(w){return w===45?(e.consume(w),m):h(w)}function m(w){return w===62?R(w):w===45?p(w):h(w)}function g(w){const te="CDATA[";return w===te.charCodeAt(i++)?(e.consume(w),i===te.length?b:g):n(w)}function b(w){return w===null?n(w):w===93?(e.consume(w),v):me(w)?(s=b,O(w)):(e.consume(w),b)}function v(w){return w===93?(e.consume(w),x):b(w)}function x(w){return w===62?R(w):w===93?(e.consume(w),x):b(w)}function E(w){return w===null||w===62?R(w):me(w)?(s=E,O(w)):(e.consume(w),E)}function y(w){return w===null?n(w):w===63?(e.consume(w),k):me(w)?(s=y,O(w)):(e.consume(w),y)}function k(w){return w===62?R(w):y(w)}function I(w){return Ot(w)?(e.consume(w),C):n(w)}function C(w){return w===45||ht(w)?(e.consume(w),C):A(w)}function A(w){return me(w)?(s=A,O(w)):Ae(w)?(e.consume(w),A):R(w)}function T(w){return w===45||ht(w)?(e.consume(w),T):w===47||w===62||ot(w)?L(w):n(w)}function L(w){return w===47?(e.consume(w),R):w===58||w===95||Ot(w)?(e.consume(w),D):me(w)?(s=L,O(w)):Ae(w)?(e.consume(w),L):R(w)}function D(w){return w===45||w===46||w===58||w===95||ht(w)?(e.consume(w),D):S(w)}function S(w){return w===61?(e.consume(w),j):me(w)?(s=S,O(w)):Ae(w)?(e.consume(w),S):L(w)}function j(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,P):me(w)?(s=j,O(w)):Ae(w)?(e.consume(w),j):(e.consume(w),M)}function P(w){return w===o?(e.consume(w),o=void 0,_):w===null?n(w):me(w)?(s=P,O(w)):(e.consume(w),P)}function M(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||ot(w)?L(w):(e.consume(w),M)}function _(w){return w===47||w===62||ot(w)?L(w):n(w)}function R(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function O(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),U}function U(w){return Ae(w)?De(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):$(w)}function $(w){return e.enter("htmlTextData"),s(w)}}const lc={name:"labelEnd",resolveAll:QT,resolveTo:eA,tokenize:tA},YT={tokenize:nA},JT={tokenize:rA},ZT={tokenize:oA};function QT(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&zt(e,0,e.length,n),e}function eA(e,t){let n=e.length,r=0,o,i,s,l;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(s=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=gt(l,e.slice(i+1,i+r+3)),l=gt(l,[["enter",d,t]]),l=gt(l,ac(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),l=gt(l,[["exit",d,t],e[s-2],e[s-1],["exit",u,t]]),l=gt(l,e.slice(s+1)),l=gt(l,[["exit",c,t]]),zt(e,i,e.length,l),e}function tA(e,t,n){const r=this;let o=r.events.length,i,s;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return l;function l(p){return i?i._inactive?h(p):(s=r.parser.defined.includes(fr(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(YT,d,s?d:h)(p):p===91?e.attempt(JT,d,s?u:h)(p):s?d(p):h(p)}function u(p){return e.attempt(ZT,d,h)(p)}function d(p){return t(p)}function h(p){return i._balanced=!0,n(p)}}function nA(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),o}function o(h){return ot(h)?Br(e,i)(h):i(h)}function i(h){return h===41?d(h):Db(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return ot(h)?Br(e,c)(h):d(h)}function l(h){return n(h)}function c(h){return h===34||h===39||h===40?Ub(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return ot(h)?Br(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function rA(e,t,n){const r=this;return o;function o(l){return Fb.call(r,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(fr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function oA(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const iA={name:"labelStartImage",resolveAll:lc.resolveAll,tokenize:sA};function sA(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const aA={name:"labelStartLink",resolveAll:lc.resolveAll,tokenize:lA};function lA(e,t,n){const r=this;return o;function o(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Zs={name:"lineEnding",tokenize:cA};function cA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),De(e,t,"linePrefix")}}const li={name:"thematicBreak",tokenize:uA};function uA(e,t,n){let r=0,o;return i;function i(u){return e.enter("thematicBreak"),s(u)}function s(u){return o=u,l(u)}function l(u){return u===o?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||me(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===o?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Ae(u)?De(e,l,"whitespace")(u):l(u))}}const rt={continuation:{tokenize:pA},exit:gA,name:"list",tokenize:fA},dA={partial:!0,tokenize:bA},hA={partial:!0,tokenize:mA};function fA(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return l;function l(m){const g=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Va(m)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(li,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return Va(m)&&++s<10?(e.consume(m),c):(!r.interrupt||s<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ls,r.interrupt?n:d,e.attempt(dA,p,h))}function d(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function h(m){return Ae(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function pA(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ls,o,i);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,De(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!Ae(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hA,t,s)(l))}function s(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,De(e,e.attempt(rt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function mA(e,t,n){const r=this;return De(e,o,"listItemIndent",r.containerState.size+1);function o(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function gA(e){e.exit(this.containerState.type)}function bA(e,t,n){const r=this;return De(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const s=r.events[r.events.length-1];return!Ae(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const qd={name:"setextUnderline",resolveTo:xA,tokenize:vA};function xA(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function vA(e,t,n){const r=this;let o;return i;function i(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),o=u,s(u)):n(u)}function s(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===o?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Ae(u)?De(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||me(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const yA={tokenize:wA};function wA(e){const t=this,n=e.attempt(ls,r,e.attempt(this.parser.constructs.flowInitial,o,De(e,e.attempt(this.parser.constructs.flow,o,e.attempt(kT,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _A={resolveAll:Bb()},CA=zb("string"),SA=zb("text");function zb(e){return{resolveAll:Bb(e==="text"?EA:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,s,l);return s;function s(d){return u(d)?i(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=o[d];let p=-1;if(h)for(;++p<h.length;){const m=h[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function Bb(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function EA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,s=-1,l=0,c;for(;i--;){const u=o[i];if(typeof u=="string"){for(s=u.length;u.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(u===-2)c=!0,l++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const kA={42:rt,43:rt,45:rt,48:rt,49:rt,50:rt,51:rt,52:rt,53:rt,54:rt,55:rt,56:rt,57:rt,62:jb},IA={91:PT},NA={[-2]:Js,[-1]:Js,32:Js},TA={35:DT,42:li,45:[qd,li],60:BT,61:qd,95:li,96:Vd,126:Vd},AA={38:Lb,92:Ob},PA={[-5]:Zs,[-4]:Zs,[-3]:Zs,33:iA,38:Lb,42:Wa,60:[aT,KT],91:aA,92:[LT,Ob],93:lc,95:Wa,96:yT},RA={null:[Wa,_A]},jA={null:[42,95]},OA={null:[]},LA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jA,contentInitial:IA,disable:OA,document:kA,flow:TA,flowInitial:NA,insideSpan:RA,string:AA,text:PA},Symbol.toStringTag,{value:"Module"}));function MA(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let s=[],l=[];const c={attempt:A(I),check:A(C),consume:E,enter:y,exit:k,interrupt:A(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:b,events:[],now:g,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:h};let d=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function h(S){return s=gt(s,S),v(),s[s.length-1]!==null?[]:(T(t,0),u.events=ac(i,u.events,u),u.events)}function p(S,j){return FA(m(S),j)}function m(S){return DA(s,S)}function g(){const{_bufferIndex:S,_index:j,line:P,column:M,offset:_}=r;return{_bufferIndex:S,_index:j,line:P,column:M,offset:_}}function b(S){o[S.line]=S.column,D()}function v(){let S;for(;r._index<s.length;){const j=s[r._index];if(typeof j=="string")for(S=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===S&&r._bufferIndex<j.length;)x(j.charCodeAt(r._bufferIndex));else x(j)}}function x(S){d=d(S)}function E(S){me(S)?(r.line++,r.column=1,r.offset+=S===-3?2:1,D()):S!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=S}function y(S,j){const P=j||{};return P.type=S,P.start=g(),u.events.push(["enter",P,u]),l.push(P),P}function k(S){const j=l.pop();return j.end=g(),u.events.push(["exit",j,u]),j}function I(S,j){T(S,j.from)}function C(S,j){j.restore()}function A(S,j){return P;function P(M,_,R){let O,U,$,w;return Array.isArray(M)?K(M):"tokenize"in M?K([M]):te(M);function te(Y){return pe;function pe(ye){const X=ye!==null&&Y[ye],Re=ye!==null&&Y.null,Ie=[...Array.isArray(X)?X:X?[X]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return K(Ie)(ye)}}function K(Y){return O=Y,U=0,Y.length===0?R:N(Y[U])}function N(Y){return pe;function pe(ye){return w=L(),$=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.includes(Y.name)?re():Y.tokenize.call(j?Object.assign(Object.create(u),j):u,c,fe,re)(ye)}}function fe(Y){return S($,w),_}function re(Y){return w.restore(),++U<O.length?N(O[U]):R}}}function T(S,j){S.resolveAll&&!i.includes(S)&&i.push(S),S.resolve&&zt(u.events,j,u.events.length-j,S.resolve(u.events.slice(j),u)),S.resolveTo&&(u.events=S.resolveTo(u.events,u))}function L(){const S=g(),j=u.previous,P=u.currentConstruct,M=u.events.length,_=Array.from(l);return{from:M,restore:R};function R(){r=S,u.previous=j,u.currentConstruct=P,u.events.length=M,l=_,D()}}function D(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function DA(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let s;if(n===o)s=[e[n].slice(r,i)];else{if(s=e.slice(n,o),r>-1){const l=s[0];typeof l=="string"?s[0]=l.slice(r):s.shift()}i>0&&s.push(e[o].slice(0,i))}return s}function FA(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
54`;break}case-3:{s=`\r
55`;break}case-2:{s=t?" ":"	";break}case-1:{if(!t&&o)continue;s=" ";break}default:s=String.fromCharCode(i)}o=i===-2,r.push(s)}return r.join("")}function UA(e){const r={constructs:qN([LA,...(e||{}).extensions||[]]),content:o(eT),defined:[],document:o(nT),flow:o(yA),lazy:{},string:o(CA),text:o(SA)};return r;function o(i){return s;function s(l){return MA(r,i,l)}}}function zA(e){for(;!Mb(e););return e}const Gd=/[\0\t\n\r]/g;function BA(){let e=1,t="",n=!0,r;return o;function o(i,s,l){const c=[];let u,d,h,p,m;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),h=0,t="",n&&(i.charCodeAt(0)===65279&&h++,n=void 0);h<i.length;){if(Gd.lastIndex=h,u=Gd.exec(i),p=u&&u.index!==void 0?u.index:i.length,m=i.charCodeAt(p),!u){t=i.slice(h);break}if(m===10&&h===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<p&&(c.push(i.slice(h,p)),e+=p-h),m){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const $A=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function HA(e){return e.replace($A,VA)}function VA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Rb(n.slice(i?2:1),i?16:10)}return sc(n)||e}const $b={}.hasOwnProperty;function WA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),qA(n)(zA(UA(n).document().write(BA()(e,t,!0))))}function qA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(B),autolinkProtocol:L,autolinkEmail:L,atxHeading:i(J),blockQuote:i(Re),characterEscape:L,characterReference:L,codeFenced:i(Ie),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Ie,s),codeText:i(oe,s),codeTextData:L,data:L,codeFlowValue:L,definition:i(xe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(G),hardBreakEscape:i(Ne),hardBreakTrailing:i(Ne),htmlFlow:i(H,s),htmlFlowData:L,htmlText:i(H,s),htmlTextData:L,image:i(F),label:s,link:i(B),listItem:i(Z),listItemValue:p,listOrdered:i(q,h),listUnordered:i(q),paragraph:i(ue),reference:N,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(J),strong:i(ge),thematicBreak:i(Pe)},exit:{atxHeading:c(),atxHeadingSequence:I,autolink:c(),autolinkEmail:X,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:Y,characterReference:pe,codeFenced:c(v),codeFencedFence:b,codeFencedFenceInfo:m,codeFencedFenceMeta:g,codeFlowValue:D,codeIndented:c(x),codeText:c(_),codeTextData:D,data:D,definition:c(),definitionDestinationString:k,definitionLabelString:E,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(j),hardBreakTrailing:c(j),htmlFlow:c(P),htmlFlowData:D,htmlText:c(M),htmlTextData:D,image:c(O),label:$,labelText:U,lineEnding:S,link:c(R),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:fe,resourceDestinationString:w,resourceTitleString:te,resource:K,setextHeading:c(T),setextHeadingLineSequence:A,setextHeadingText:C,strong:c(),thematicBreak:c()}};Hb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(z){let V={type:"root",children:[]};const ie={stack:[V],tokenStack:[],config:t,enter:l,exit:u,buffer:s,resume:d,data:n},he=[];let ne=-1;for(;++ne<z.length;)if(z[ne][1].type==="listOrdered"||z[ne][1].type==="listUnordered")if(z[ne][0]==="enter")he.push(ne);else{const je=he.pop();ne=o(z,je,ne)}for(ne=-1;++ne<z.length;){const je=t[z[ne][0]];$b.call(je,z[ne][1].type)&&je[z[ne][1].type].call(Object.assign({sliceSerialize:z[ne][2].sliceSerialize},ie),z[ne][1])}if(ie.tokenStack.length>0){const je=ie.tokenStack[ie.tokenStack.length-1];(je[1]||Kd).call(ie,void 0,je[0])}for(V.position={start:hn(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:hn(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},ne=-1;++ne<t.transforms.length;)V=t.transforms[ne](V)||V;return V}function o(z,V,ie){let he=V-1,ne=-1,je=!1,Fe,qe,Pn,Rn;for(;++he<=ie;){const Ze=z[he];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?ne++:ne--,Rn=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(Fe&&!Rn&&!ne&&!Pn&&(Pn=he),Rn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Rn=void 0}if(!ne&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||ne===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(Fe){let le=he;for(qe=void 0;le--;){const _e=z[le];if(_e[1].type==="lineEnding"||_e[1].type==="lineEndingBlank"){if(_e[0]==="exit")continue;qe&&(z[qe][1].type="lineEndingBlank",je=!0),_e[1].type="lineEnding",qe=le}else if(!(_e[1].type==="linePrefix"||_e[1].type==="blockQuotePrefix"||_e[1].type==="blockQuotePrefixWhitespace"||_e[1].type==="blockQuoteMarker"||_e[1].type==="listItemIndent"))break}Pn&&(!qe||Pn<qe)&&(Fe._spread=!0),Fe.end=Object.assign({},qe?z[qe][1].start:Ze[1].end),z.splice(qe||he,0,["exit",Fe,Ze[2]]),he++,ie++}if(Ze[1].type==="listItemPrefix"){const le={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};Fe=le,z.splice(he,0,["enter",le,Ze[2]]),he++,ie++,Pn=void 0,Rn=!0}}}return z[V][1]._spread=je,ie}function i(z,V){return ie;function ie(he){l.call(this,z(he),he),V&&V.call(this,he)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(z,V,ie){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([V,ie||void 0]),z.position={start:hn(V.start),end:void 0}}function c(z){return V;function V(ie){z&&z.call(this,ie),u.call(this,ie)}}function u(z,V){const ie=this.stack.pop(),he=this.tokenStack.pop();if(he)he[0].type!==z.type&&(V?V.call(this,z,he[0]):(he[1]||Kd).call(this,z,he[0]));else throw new Error("Cannot close `"+z.type+"` ("+zr({start:z.start,end:z.end})+"): it’s not open");ie.position.end=hn(z.end)}function d(){return VN(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function p(z){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function m(){const z=this.resume(),V=this.stack[this.stack.length-1];V.lang=z}function g(){const z=this.resume(),V=this.stack[this.stack.length-1];V.meta=z}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const z=this.resume(),V=this.stack[this.stack.length-1];V.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const z=this.resume(),V=this.stack[this.stack.length-1];V.value=z.replace(/(\r?\n|\r)$/g,"")}function E(z){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.label=V,ie.identifier=fr(this.sliceSerialize(z)).toLowerCase()}function y(){const z=this.resume(),V=this.stack[this.stack.length-1];V.title=z}function k(){const z=this.resume(),V=this.stack[this.stack.length-1];V.url=z}function I(z){const V=this.stack[this.stack.length-1];if(!V.depth){const ie=this.sliceSerialize(z).length;V.depth=ie}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function A(z){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function L(z){const ie=this.stack[this.stack.length-1].children;let he=ie[ie.length-1];(!he||he.type!=="text")&&(he=Ce(),he.position={start:hn(z.start),end:void 0},ie.push(he)),this.stack.push(he)}function D(z){const V=this.stack.pop();V.value+=this.sliceSerialize(z),V.position.end=hn(z.end)}function S(z){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ie=V.children[V.children.length-1];ie.position.end=hn(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(L.call(this,z),D.call(this,z))}function j(){this.data.atHardBreak=!0}function P(){const z=this.resume(),V=this.stack[this.stack.length-1];V.value=z}function M(){const z=this.resume(),V=this.stack[this.stack.length-1];V.value=z}function _(){const z=this.resume(),V=this.stack[this.stack.length-1];V.value=z}function R(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=V,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function O(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=V,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function U(z){const V=this.sliceSerialize(z),ie=this.stack[this.stack.length-2];ie.label=HA(V),ie.identifier=fr(V).toLowerCase()}function $(){const z=this.stack[this.stack.length-1],V=this.resume(),ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,ie.type==="link"){const he=z.children;ie.children=he}else ie.alt=V}function w(){const z=this.resume(),V=this.stack[this.stack.length-1];V.url=z}function te(){const z=this.resume(),V=this.stack[this.stack.length-1];V.title=z}function K(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function fe(z){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.label=V,ie.identifier=fr(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function re(z){this.data.characterReferenceType=z.type}function Y(z){const V=this.sliceSerialize(z),ie=this.data.characterReferenceType;let he;ie?(he=Rb(V,ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):he=sc(V);const ne=this.stack[this.stack.length-1];ne.value+=he}function pe(z){const V=this.stack.pop();V.position.end=hn(z.end)}function ye(z){D.call(this,z);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(z)}function X(z){D.call(this,z);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(z)}function Re(){return{type:"blockquote",children:[]}}function Ie(){return{type:"code",lang:null,meta:null,value:""}}function oe(){return{type:"inlineCode",value:""}}function xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function G(){return{type:"emphasis",children:[]}}function J(){return{type:"heading",depth:0,children:[]}}function Ne(){return{type:"break"}}function H(){return{type:"html",value:""}}function F(){return{type:"image",title:null,url:"",alt:null}}function B(){return{type:"link",title:null,url:"",children:[]}}function q(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function Z(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function ue(){return{type:"paragraph",children:[]}}function ge(){return{type:"strong",children:[]}}function Ce(){return{type:"text",value:""}}function Pe(){return{type:"thematicBreak"}}}function hn(e){return{line:e.line,column:e.column,offset:e.offset}}function Hb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Hb(e,r):GA(e,r)}}function GA(e,t){let n;for(n in t)if($b.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Kd(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+zr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zr({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+zr({start:t.start,end:t.end})+") is still open")}function KA(e){const t=this;t.parser=n;function n(r){return WA(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function XA(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
56`}]}function JA(e,t){const n=t.value?t.value+`
57`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function ZA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function eP(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Er(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function tP(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nP(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Vb(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const s=o[o.length-1];return s&&s.type==="text"?s.value+=r:o.push({type:"text",value:r}),o}function rP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vb(e,t);const o={src:Er(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function oP(e,t){const n={src:Er(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function iP(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function sP(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Vb(e,t);const o={href:Er(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function aP(e,t){const n={href:Er(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lP(e,t,n){const r=e.all(t),o=n?cP(n):Wb(t),i={},s=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(o||l!==0||d.type!=="element"||d.tagName!=="p")&&s.push({type:"text",value:`
58`}),d.type==="element"&&d.tagName==="p"&&!o?s.push(...d.children):s.push(d)}const c=r[r.length-1];c&&(o||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
59`});const u={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,u),e.applyData(t,u)}function cP(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Wb(n[r])}return t}function Wb(e){const t=e.spread;return t??e.children.length>1}function uP(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const s=r[o];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function dP(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hP(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function fP(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pP(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),o.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=nc(t.children[1]),c=Eb(t.children[t.children.length-1]);l&&c&&(s.position={start:l,end:c}),o.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function mP(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const h=t.children[c],p={},m=s?s[c]:void 0;m&&(p.align=m);let g={type:"element",tagName:i,properties:p,children:[]};h&&(g.children=e.all(h),e.patch(h,g),g=e.applyData(h,g)),u.push(g)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function gP(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Xd=9,Yd=32;function bP(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Jd(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Jd(t.slice(o),o>0,!1)),i.join("")}function Jd(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Xd||i===Yd;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Xd||i===Yd;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function xP(e,t){const n={type:"text",value:bP(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vP(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const yP={blockquote:XA,break:YA,code:JA,delete:ZA,emphasis:QA,footnoteReference:eP,heading:tP,html:nP,imageReference:rP,image:oP,inlineCode:iP,linkReference:sP,link:aP,listItem:lP,list:uP,paragraph:dP,root:hP,strong:fP,table:pP,tableCell:gP,tableRow:mP,text:xP,thematicBreak:vP,toml:Go,yaml:Go,definition:Go,footnoteDefinition:Go};function Go(){}const qb=-1,cs=0,$r=1,Ni=2,cc=3,uc=4,dc=5,hc=6,Gb=7,Kb=8,wP=typeof self=="object"?self:globalThis,Zd=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new wP[e](t)},_P=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,s]=t[o];switch(i){case cs:case qb:return n(s,o);case $r:{const l=n([],o);for(const c of s)l.push(r(c));return l}case Ni:{const l=n({},o);for(const[c,u]of s)l[r(c)]=r(u);return l}case cc:return n(new Date(s),o);case uc:{const{source:l,flags:c}=s;return n(new RegExp(l,c),o)}case dc:{const l=n(new Map,o);for(const[c,u]of s)l.set(r(c),r(u));return l}case hc:{const l=n(new Set,o);for(const c of s)l.add(r(c));return l}case Gb:{const{name:l,message:c}=s;return n(Zd(l,c),o)}case Kb:return n(BigInt(s),o);case"BigInt":return n(Object(BigInt(s)),o);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(Zd(i,s),o)};return r},Qd=e=>_P(new Map,e)(0),rr="",{toString:CP}={},{keys:SP}=Object,jr=e=>{const t=typeof e;if(t!=="object"||!e)return[cs,t];const n=CP.call(e).slice(8,-1);switch(n){case"Array":return[$r,rr];case"Object":return[Ni,rr];case"Date":return[cc,rr];case"RegExp":return[uc,rr];case"Map":return[dc,rr];case"Set":return[hc,rr];case"DataView":return[$r,n]}return n.includes("Array")?[$r,n]:n.includes("Error")?[Gb,n]:[Ni,n]},Ko=([e,t])=>e===cs&&(t==="function"||t==="symbol"),EP=(e,t,n,r)=>{const o=(s,l)=>{const c=r.push(s)-1;return n.set(l,c),c},i=s=>{if(n.has(s))return n.get(s);let[l,c]=jr(s);switch(l){case cs:{let d=s;switch(c){case"bigint":l=Kb,d=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return o([qb],s)}return o([l,d],s)}case $r:{if(c){let p=s;return c==="DataView"?p=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(s)),o([c,[...p]],s)}const d=[],h=o([l,d],s);for(const p of s)d.push(i(p));return h}case Ni:{if(c)switch(c){case"BigInt":return o([c,s.toString()],s);case"Boolean":case"Number":case"String":return o([c,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const d=[],h=o([l,d],s);for(const p of SP(s))(e||!Ko(jr(s[p])))&&d.push([i(p),i(s[p])]);return h}case cc:return o([l,s.toISOString()],s);case uc:{const{source:d,flags:h}=s;return o([l,{source:d,flags:h}],s)}case dc:{const d=[],h=o([l,d],s);for(const[p,m]of s)(e||!(Ko(jr(p))||Ko(jr(m))))&&d.push([i(p),i(m)]);return h}case hc:{const d=[],h=o([l,d],s);for(const p of s)(e||!Ko(jr(p)))&&d.push(i(p));return h}}const{message:u}=s;return o([l,{name:c,message:u}],s)};return i},eh=(e,{json:t,lossy:n}={})=>{const r=[];return EP(!(t||n),!!t,new Map,r)(e),r},Ti=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Qd(eh(e,t)):structuredClone(e):(e,t)=>Qd(eh(e,t));function kP(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function IP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function NP(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||kP,r=e.options.footnoteBackLabel||IP,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),p=Er(h.toLowerCase());let m=0;const g=[],b=e.footnoteCounts.get(h);for(;b!==void 0&&++m<=b;){g.length>0&&g.push({type:"text",value:" "});let E=typeof n=="string"?n:n(c,m);typeof E=="string"&&(E={type:"text",value:E}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const E=v.children[v.children.length-1];E&&E.type==="text"?E.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...g)}else d.push(...g);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(d,!0)};e.patch(u,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Ti(s),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
60`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
61`}]}}const Xb=(function(e){if(e==null)return RP;if(typeof e=="function")return us(e);if(typeof e=="object")return Array.isArray(e)?TP(e):AP(e);if(typeof e=="string")return PP(e);throw new Error("Expected function, string, or object as test")});function TP(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xb(e[n]);return us(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function AP(e){const t=e;return us(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function PP(e){return us(t);function t(n){return n&&n.type===e}}function us(e){return t;function t(n,r,o){return!!(jP(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function RP(){return!0}function jP(e){return e!==null&&typeof e=="object"&&"type"in e}const Yb=[],OP=!0,th=!1,LP="skip";function MP(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Xb(o),s=r?-1:1;l(e,void 0,[])();function l(c,u,d){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const m=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=Yb,g,b,v;if((!t||i(c,u,d[d.length-1]||void 0))&&(m=DP(n(c,d)),m[0]===th))return m;if("children"in c&&c.children){const x=c;if(x.children&&m[0]!==LP)for(b=(r?x.children.length:-1)+s,v=d.concat(x);b>-1&&b<x.children.length;){const E=x.children[b];if(g=l(E,b,v)(),g[0]===th)return g;b=typeof g[1]=="number"?g[1]:b+s}}return m}}}function DP(e){return Array.isArray(e)?e:typeof e=="number"?[OP,e]:e==null?Yb:[e]}function Jb(e,t,n,r){let o,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,o=n):(i=t,s=n,o=r),MP(e,i,l,o);function l(c,u){const d=u[u.length-1],h=d?d.children.indexOf(c):void 0;return s(c,h,d)}}const qa={}.hasOwnProperty,FP={};function UP(e,t){const n=t||FP,r=new Map,o=new Map,i=new Map,s={...yP,...n.handlers},l={all:u,applyData:BP,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:s,one:c,options:n,patch:zP,wrap:HP};return Jb(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:o,p=String(d.identifier).toUpperCase();h.has(p)||h.set(p,d)}}),l;function c(d,h){const p=d.type,m=l.handlers[p];if(qa.call(l.handlers,p)&&m)return m(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in d){const{children:b,...v}=d,x=Ti(v);return x.children=l.all(d),x}return Ti(d)}return(l.options.unknownHandler||$P)(l,d,h)}function u(d){const h=[];if("children"in d){const p=d.children;let m=-1;for(;++m<p.length;){const g=l.one(p[m],d);if(g){if(m&&p[m-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=nh(g.value)),!Array.isArray(g)&&g.type==="element")){const b=g.children[0];b&&b.type==="text"&&(b.value=nh(b.value))}Array.isArray(g)?h.push(...g):h.push(g)}}}return h}}function zP(e,t){e.position&&(t.position=_N(e))}function BP(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,Ti(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function $P(e,t){const n=t.data||{},r="value"in t&&!(qa.call(n,"hProperties")||qa.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function HP(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
62`});++r<e.length;)r&&n.push({type:"text",value:`
63`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
64`}),n}function nh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function rh(e,t){const n=UP(e,t),r=n.one(e,void 0),o=NP(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
65`},o),i}function VP(e,t){return e&&"run"in e?async function(n,r){const o=rh(n,{file:r,...t});await e.run(o,r)}:function(n,r){return rh(n,{file:r,...e||t})}}function oh(e){if(e)throw e}var Qs,ih;function WP(){if(ih)return Qs;ih=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),h=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!h)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},s=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},l=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return Qs=function c(){var u,d,h,p,m,g,b=arguments[0],v=1,x=arguments.length,E=!1;for(typeof b=="boolean"&&(E=b,b=arguments[1]||{},v=2),(b==null||typeof b!="object"&&typeof b!="function")&&(b={});v<x;++v)if(u=arguments[v],u!=null)for(d in u)h=l(b,d),p=l(u,d),b!==p&&(E&&p&&(i(p)||(m=o(p)))?(m?(m=!1,g=h&&o(h)?h:[]):g=h&&i(h)?h:{},s(b,{name:d,newValue:c(E,g,p)})):typeof p<"u"&&s(b,{name:d,newValue:p}));return b},Qs}var qP=WP();const ea=ph(qP);function Ga(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function GP(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...o);function l(c,...u){const d=e[++i];let h=-1;if(c){s(c);return}for(;++h<o.length;)(u[h]===null||u[h]===void 0)&&(u[h]=o[h]);o=u,d?KP(d,l)(...u):s(null,...u)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function KP(e,t){let n;return r;function r(...s){const l=e.length>s.length;let c;l&&s.push(o);try{c=e.apply(this,s)}catch(u){const d=u;if(l&&n)throw d;return o(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,o):c instanceof Error?o(c):i(c))}function o(s,...l){n||(n=!0,t(s,...l))}function i(s){o(null,s)}}const Nt={basename:XP,dirname:YP,extname:JP,join:ZP,sep:"/"};function XP(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');No(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else s<0&&(i=!0,s=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function YP(e){if(No(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function JP(e){No(e);let t=e.length,n=-1,r=0,o=-1,i=0,s;for(;t--;){const l=e.codePointAt(t);if(l===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function ZP(...e){let t=-1,n;for(;++t<e.length;)No(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":QP(n)}function QP(e){No(e);const t=e.codePointAt(0)===47;let n=eR(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eR(e,t){let n="",r=0,o=-1,i=0,s=-1,l,c;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=s,i=0;continue}}else if(n.length>0){n="",r=0,o=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),r=s-o-1;o=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function No(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tR={cwd:nR};function nR(){return"/"}function Ka(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rR(e){if(typeof e=="string")e=new URL(e);else if(!Ka(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return oR(e)}function oR(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const ta=["history","path","basename","stem","extname","dirname"];class Zb{constructor(t){let n;t?Ka(t)?n={path:t}:typeof t=="string"||iR(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tR.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<ta.length;){const i=ta[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)ta.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Nt.basename(this.path):void 0}set basename(t){ra(t,"basename"),na(t,"basename"),this.path=Nt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Nt.dirname(this.path):void 0}set dirname(t){sh(this.basename,"dirname"),this.path=Nt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Nt.extname(this.path):void 0}set extname(t){if(na(t,"extname"),sh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Nt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ka(t)&&(t=rR(t)),ra(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Nt.basename(this.path,this.extname):void 0}set stem(t){ra(t,"stem"),na(t,"stem"),this.path=Nt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new Je(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function na(e,t){if(e&&e.includes(Nt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Nt.sep+"`")}function ra(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function sh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function iR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const sR=(function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),aR={}.hasOwnProperty;class fc extends sR{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=GP()}copy(){const t=new fc;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ea(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(sa("data",this.frozen),this.namespace[t]=n,this):aR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(sa("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xo(t),r=this.parser||this.Parser;return oa("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oa("process",this.parser||this.Parser),ia("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,s){const l=Xo(t),c=r.parse(l);r.run(c,l,function(d,h,p){if(d||!h||!p)return u(d);const m=h,g=r.stringify(m,p);uR(g)?p.value=g:p.result=g,u(d,p)});function u(d,h){d||!h?s(d):i?i(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),oa("processSync",this.parser||this.Parser),ia("processSync",this.compiler||this.Compiler),this.process(t,o),lh("processSync","process",n),r;function o(i,s){n=!0,oh(i),r=s}}run(t,n,r){ah(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,l){const c=Xo(n);o.run(t,c,u);function u(d,h,p){const m=h||t;d?l(d):s?s(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),lh("runSync","run",r),o;function i(s,l){oh(s),o=l,r=!0}}stringify(t,n){this.freeze();const r=Xo(n),o=this.compiler||this.Compiler;return ia("stringify",o),ah(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(sa("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;c(d,h)}else s(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function s(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(o.settings=ea(!0,o.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];i(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let h=-1,p=-1;for(;++h<r.length;)if(r[h][0]===u){p=h;break}if(p===-1)r.push([u,...d]);else if(d.length>0){let[m,...g]=d;const b=r[p][1];Ga(b)&&Ga(m)&&(m=ea(!0,b,m)),r[p]=[u,m,...g]}}}}const lR=new fc().freeze();function oa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ia(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sa(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ah(e){if(!Ga(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function lh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xo(e){return cR(e)?e:new Zb(e)}function cR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uR(e){return typeof e=="string"||dR(e)}function dR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const hR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ch=[],uh={allowDangerousHtml:!0},fR=/^(https?|ircs?|mailto|xmpp)$/i,pR=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mR(e){const t=gR(e),n=bR(e);return xR(t.runSync(t.parse(n),n),e)}function gR(e){const t=e.rehypePlugins||ch,n=e.remarkPlugins||ch,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...uh}:uh;return lR().use(KA).use(n).use(VP,r).use(t)}function bR(e){const t=e.children||"",n=new Zb;return typeof t=="string"&&(n.value=t),n}function xR(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||vR;for(const d of pR)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+hR+d.id,void 0);return Jb(e,u),IN(e,{Fragment:a.Fragment,components:o,ignoreInvalidStyle:!0,jsx:a.jsx,jsxs:a.jsxs,passKeys:!0,passNode:!0});function u(d,h,p){if(d.type==="raw"&&p&&typeof h=="number")return s?p.children.splice(h,1):p.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let m;
65for(m in Ys)if(Object.hasOwn(Ys,m)&&Object.hasOwn(d.properties,m)){const g=d.properties[m],b=Ys[m];(b===null||b.includes(d.tagName))&&(d.properties[m]=c(String(g||""),m,d))}}if(d.type==="element"){let m=n?!n.includes(d.tagName):i?i.includes(d.tagName):!1;if(!m&&r&&typeof h=="number"&&(m=!r(d,h,p)),m&&p&&typeof h=="number")return l&&d.children?p.children.splice(h,1,...d.children):p.children.splice(h,1),h}}}function vR(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||fR.test(e.slice(0,t))?e:""}function yR({content:e}){return a.jsx("div",{className:"markdown-body",style:{lineHeight:1.8,fontSize:"1rem",color:"var(--text-secondary)"},children:a.jsx(mR,{components:{h1:({children:t})=>a.jsx("h2",{style:{fontSize:"1.5rem",fontWeight:700,marginTop:"2.5rem",marginBottom:"0.75rem",color:"var(--text-primary)",fontFamily:"var(--font-display-web)",lineHeight:1.3},children:t}),h2:({children:t})=>a.jsx("h3",{style:{fontSize:"1.25rem",fontWeight:600,marginTop:"2rem",marginBottom:"0.625rem",color:"var(--text-primary)",lineHeight:1.35},children:t}),h3:({children:t})=>a.jsx("h4",{style:{fontSize:"1.0625rem",fontWeight:600,marginTop:"1.75rem",marginBottom:"0.5rem",color:"var(--text-primary)"},children:t}),p:({children:t})=>a.jsx("p",{style:{marginBottom:"1.25rem",lineHeight:1.8},children:t}),ul:({children:t})=>a.jsx("ul",{style:{marginBottom:"1.25rem",paddingLeft:"1.5rem",listStyle:"disc"},children:t}),ol:({children:t})=>a.jsx("ol",{style:{marginBottom:"1.25rem",paddingLeft:"1.5rem",listStyle:"decimal"},children:t}),li:({children:t})=>a.jsx("li",{style:{marginBottom:"0.5rem"},children:t}),a:({href:t,children:n})=>a.jsx("a",{href:t,style:{color:"var(--accent-primary)",textDecoration:"underline",textUnderlineOffset:"3px"},target:"_blank",rel:"noopener noreferrer",children:n}),blockquote:({children:t})=>a.jsx("blockquote",{style:{borderLeft:"3px solid var(--border-default)",paddingLeft:"1rem",color:"var(--text-muted)",margin:"1.5rem 0",fontStyle:"italic"},children:t}),code:({children:t})=>a.jsx("code",{style:{background:"var(--bg-elevated)",color:"var(--text-primary)",padding:"0.125rem 0.375rem",borderRadius:"0.25rem",fontSize:"0.875em",border:"1px solid var(--border-subtle)"},children:t}),pre:({children:t})=>a.jsx("pre",{style:{background:"var(--bg-elevated)",border:"1px solid var(--border-subtle)",borderRadius:"8px",padding:"1.25rem",overflowX:"auto",marginBottom:"1.25rem",fontSize:"0.875rem",lineHeight:1.6},children:t}),hr:()=>a.jsx("hr",{style:{border:"none",borderTop:"1px solid var(--border-subtle)",margin:"2rem 0"}}),strong:({children:t})=>a.jsx("strong",{style:{fontWeight:600,color:"var(--text-primary)"},children:t})},children:e})})}function Qb({href:e,className:t,onClick:n,children:r}){const[o,i]=f.useState(!1);return f.useEffect(()=>{i(a5())},[]),!o||!e?null:a.jsx(Qr,{href:e,className:t,target:"_blank",rel:"noopener noreferrer",onClick:n,children:r})}function wR({href:e,locale:t,className:n,children:r}){return a.jsx(Qb,{href:e,className:n,onClick:()=>it("cta_clicked",{cta_target:"extension",placement:"faq",device_type:yn(),locale:t}),children:r})}const _R={ko:"Google Play에서 다운로드하기",en:"Get it on Google Play"};function ex({locale:e,position:t,className:n}){const r=W1(e),o=_R[r],i=`/badges/google-play-${r}.svg`;return a.jsx(Qr,{href:It(),target:"_blank",rel:"noopener noreferrer",onClick:()=>it("cta_clicked",{cta_target:"android",placement:t,device_type:yn(),locale:e}),className:["inline-flex w-fit items-center rounded-lg transition-opacity duration-150 hover:opacity-90","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--text-secondary)]",n].filter(Boolean).join(" "),children:a.jsx("img",{src:i,alt:o,width:162,height:48,loading:"lazy",decoding:"async",className:"block h-[52px] w-auto"})})}function CR({children:e}){const t=f.useRef(null);return f.useEffect(()=>{if(!t.current||window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let n=null;return _t(async()=>{const{gsap:r}=await import("./index-D4-8ALNT.js");return{gsap:r}},[]).then(({gsap:r})=>{t.current&&(n=r.context(()=>{r.timeline({defaults:{ease:"power3.out",duration:.7}}).fromTo(".landing-hero-title-line",{opacity:0,y:28},{opacity:1,y:0,stagger:.13},.05).fromTo(".landing-body-copy--hero",{opacity:0,y:22},{opacity:1,y:0},.38).fromTo(".landing-hero-cta-group",{opacity:0,y:18},{opacity:1,y:0},.52).fromTo(".landing-hero-copy--body .landing-meta-copy",{opacity:0,y:14},{opacity:1,y:0,duration:.5},.63)},t))}),()=>n?.revert()},[]),a.jsx("div",{ref:t,className:"landing-hero-canvas",children:e})}function SR({copy:e}){return a.jsxs("div",{className:"cine-scene cine-s1","aria-hidden":"true",children:[a.jsxs("div",{className:"cine-s1__page",children:[a.jsx("div",{className:"cine-s1__line",style:{width:"82%"}}),a.jsx("div",{className:"cine-s1__line",style:{width:"68%"}}),a.jsx("div",{className:"cine-s1__line cine-s1__line--hi",children:a.jsx("span",{className:"cine-s1__word",children:"ephemeral"})}),a.jsx("div",{className:"cine-s1__line",style:{width:"76%"}}),a.jsx("div",{className:"cine-s1__line",style:{width:"52%"}})]}),a.jsxs("div",{className:"cine-s1__popup",children:[a.jsxs("div",{className:"cine-s1__popup-top",children:[a.jsx("span",{className:"cine-s1__dot"}),a.jsx("span",{className:"cine-s1__popup-name",children:"Orvoca"})]}),a.jsx("p",{className:"cine-s1__popup-word",children:"ephemeral"}),a.jsx("p",{className:"cine-s1__popup-src",children:e.capture_source}),a.jsx("span",{className:"cine-s1__popup-btn",children:e.capture_cta}
65)]})]})}function ER({copy:e}){return a.jsxs("div",{className:"cine-scene cine-s2","aria-hidden":"true",children:[a.jsx("p",{className:"cine-s2__eyebrow",children:"Inbox"}),a.jsx("p",{className:"cine-s2__word",children:"ephemeral"}),a.jsxs("ul",{className:"cine-s2__senses",children:[a.jsx("li",{className:"cine-s2__sense",children:e.inbox_sense_1}),a.jsxs("li",{className:"cine-s2__sense cine-s2__sense--on",children:[a.jsx("span",{className:"cine-s2__check",children:a.jsx(pm,{size:14,strokeWidth:2.5,"aria-hidden":"true"})}),e.inbox_sense_selected]}),a.jsx("li",{className:"cine-s2__sense",children:e.inbox_sense_3})]})]})}function kR({copy:e}){return a.jsxs("div",{className:"cine-scene cine-s3","aria-hidden":"true",children:[a.jsxs("div",{className:"cine-s3__card",children:[a.jsx("p",{className:"cine-s3__pos",children:"ADJ."}),a.jsx("p",{className:"cine-s3__word",children:"lucid"}),a.jsx("p",{className:"cine-s3__def",children:e.review_definition})]}),a.jsxs("div",{className:"cine-s3__btns",children:[a.jsxs("button",{type:"button",className:"cine-s3__btn cine-s3__btn--x",tabIndex:-1,children:[a.jsx("span",{children:"← X"}),a.jsx("span",{className:"cine-s3__iv",children:e.review_didnt_know})]}),a.jsxs("button",{type:"button",className:"cine-s3__btn cine-s3__btn--o",tabIndex:-1,children:[a.jsx("span",{children:"O →"}),a.jsx("span",{className:"cine-s3__iv",children:e.review_knew_it})]})]})]})}function IR({copy:e}){return a.jsxs("div",{className:"cine-scene cine-s4","aria-hidden":"true",children:[a.jsxs("div",{className:"cine-s4__orbit",children:[a.jsx("span",{className:"cine-s4__days",children:"60d"}),a.jsx("span",{className:"cine-s4__label",children:"Own"})]}),a.jsx("p",{className:"cine-s4__note",children:e.own_note})]})}const NR=[SR,ER,kR,IR];function TR({steps:e,sceneCopy:t}){const n=f.useRef(null);return f.useEffect(()=>{const r=n.current;if(!r)return;const o=new IntersectionObserver(([i])=>{i.isIntersecting&&(r.classList.add("is-animated"),o.disconnect())},{threshold:.1});return o.observe(r),()=>o.disconnect()},[]),a.jsx("div",{ref:n,className:"landing-how-steps",children:e.map((r,o)=>{const i=NR[o];return a.jsxs("article",{className:"landing-how-step",children:[i&&a.jsx("div",{className:"landing-how-step__scene",children:a.jsx(i,{copy:t})}),a.jsxs("div",{className:"landing-how-step__body",children:[a.jsx("div",{className:"landing-how-step__index",children:r.index}),a.jsx("h3",{className:"landing-how-step__title",children:r.title}),a.jsx("p",{className:"landing-how-step__desc",children:r.body})]})]},r.index)})})}const AR=!0;function PR({href:e,className:t,position:n,locale:r,mobileNote:o,mobileWebCtaLabel:i,mobileConsoleCtaLabel:s,children:l}){const[c,u]=f.useState(null),[d,h]=f.useState("loading");if(f.useEffect(()=>(u({type:yn(),android:Sl()}),zl(h)),[]),c?.type==="mobile"){const p=n==="hero"?"landing_hero":"landing_footer",m=d!=="loading"&&d!==null,g=u5(),b="flex flex-col items-start gap-3",v=a.jsx(Ve,{href:m?"/console":"/signup",className:t,onClick:()=>it("cta_clicked",{cta_target:m?"console":"signup",placement:p,device_type:yn(),locale:r}),children:m?s:i});return a.jsxs("div",{className:b,children:[c.android&&AR?a.jsxs(a.Fragment,{children:[m?v:null,a.jsx(ex,{locale:r,position:p})]}):g?a.jsxs(a.Fragment,{children:[m?v:null,a.jsx(bb,{locale:r,position:p})]}):v,a.jsx("p",{className:"landing-meta-copy text-[0.84rem] text-[var(--text-muted)]",children:o})]})}return a.jsx(Qb,{href:e,className:t,onClick:()=>it("cta_clicked",{cta_target:"extension",placement:n==="hero"?"landing_hero":"landing_footer",device_type:yn(),locale:r}),children:l})}function RR(){return f.useEffect(()=>{if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;let e=null;return Promise.all([_t(()=>import("./index-D4-8ALNT.js"),[]),_t(()=>import("./ScrollTrigger-BrDuEirF.js"),[])]).then(([{gsap:t},{ScrollTrigger:n}])=>{t.registerPlugin(n),e=t.context(()=>{document.querySelectorAll([".landing-story-section",".landing-capture-section",".landing-preview-section",".landing-review-section",".landing-surface-band--elevated"].join(", ")).forEac
65h(l=>{const c=Array.from(l.querySelectorAll(".landing-kicker, .landing-section-title, .landing-body-copy"));c.length&&t.fromTo(c,{opacity:0,y:22},{opacity:1,y:0,duration:.55,ease:"power3.out",stagger:.08,scrollTrigger:{trigger:l,start:"top 78%",toggleActions:"play none none none"}})});const o=Array.from(document.querySelectorAll(".landing-surface-band--muted article"));o.length&&t.fromTo(o,{opacity:0,y:18},{opacity:1,y:0,duration:.5,ease:"power3.out",stagger:.12,scrollTrigger:{trigger:".landing-surface-band--muted",start:"top 80%",toggleActions:"play none none none"}}),Array.from(document.querySelectorAll(".landing-capture-card, .landing-review-card-shell")).forEach(l=>{t.fromTo(l,{opacity:0,y:28,scale:.97},{opacity:1,y:0,scale:1,duration:.65,ease:"power3.out",scrollTrigger:{trigger:l,start:"top 82%",toggleActions:"play none none none"}})});const s=Array.from(document.querySelectorAll(".landing-proof-card"));s.length&&t.fromTo(s,{opacity:0,y:24},{opacity:1,y:0,duration:.55,ease:"power3.out",stagger:.1,scrollTrigger:{trigger:s[0],start:"top 82%",toggleActions:"play none none none"}})})}),()=>e?.revert()},[]),null}function jR(){const[e,t]=f.useState("loading"),n=Mt(),r=se("Landing");return f.useEffect(()=>zl(i=>{t(i)}),[]),e&&e!=="loading"?a.jsx(Ve,{href:"/console",className:"landing-header-console inline-flex min-h-11 items-center rounded-full border border-[var(--border-default)] bg-[var(--text-primary)] px-4 text-[0.84rem] font-semibold text-[var(--bg-canvas)] no-underline transition-[transform,filter] duration-[140ms] hover:-translate-y-0.5 hover:brightness-[1.03] max-[640px]:px-3.5 max-[640px]:text-[0.8rem] max-[640px]:whitespace-nowrap",children:r("hero.cta_console")}):a.jsxs("div",{className:"flex items-center gap-[10px] max-[640px]:gap-[6px]",children:[a.jsx(Ve,{href:"/login",className:"landing-header-signin landing-text-link inline-flex min-h-11 items-center rounded-full px-3 py-2 text-[0.83rem] font-medium text-[var(--text-muted)] no-underline",children:r("nav.signin")}),a.jsx(Ve,{href:{pathname:"/signup",query:{next:`/${n}/console`}},className:"inline-flex h-10 items-center rounded-full border border-[var(--border-default)] px-4 text-[0.84rem] font-semibold text-[var(--text-primary)] no-underline transition-[transform,background-color,border-color] duration-[140ms] hover:-translate-y-0.5 hover:bg-[var(--bg-surface)] max-[640px]:hidden",children:r("hero.btn_signup")})]})}function OR(){const e=se("Landing"),[t,n]=f.useState(!1),r=f.useRef(0);return f.useEffect(()=>{const o=()=>{cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>n(window.scrollY>18))};return o(),window.addEventListener("scroll",o,{passive:!0}),()=>{window.removeEventListener("scroll",o),cancelAnimationFrame(r.current)}},[]),a.jsx("header",{className:Te("landing-shell-header",t&&"is-scrolled"),children:a.jsx("div",{className:"landing-shell-header__inner landing-container",children:a.jsxs("nav",{className:"landing-shell-nav flex h-[80px] items-center justify-between","aria-label":e("a11y.site_navigation"),children:[a.jsx(Ve,{href:"/","aria-label":e("a11y.home"),className:"landing-home-link no-underline",children:a.jsx(Gr,{height:20})}),a.jsxs("div",{className:"flex items-center gap-[10px] max-[640px]:gap-[6px]",children:[a.jsx(Ve,{href:"/#how-it-works",className:"landing-text-link rounded-full px-3 py-2 text-[0.83rem] font-medium text-[var(--text-muted)] no-underline max-[640px]:hidden",children:e("nav.how_it_works")}),a.jsx(jR,{})]})]})})})}const LR={kicker:"Legal",backHome:"Back home",faq:"FAQ"};function MR({title:e,lastUpdated:t,children:n,footer:r}){const o=LR,[i,s]=f.useState(!1);return f.useEffect(()=>{const l=()=>s(window.scrollY>18);return l(),window.addEventListener("scroll",l,{passive:!0}),()=>window.removeEventListener("scroll",l)},[]),a.jsx("div",{className:"landing-minimal legal-page min-h-screen",children:a.jsxs("div",{className:"flex min-h-screen flex-col bg-[var(--bg-canvas)] text-[var(--text-primary)]",children:[a.jsx("header",{className:Te("landing-shell-header",i&&"is-scrolled"),children:a.jsx("div",{className:"landing-shell-header__inner mx-auto w-[min(1120px,calc(100%-clamp(32px,8vw,120px)))]",children:a.jsxs("nav",{className:"landing-shell-nav legal-shell-nav flex h-[80px] items-center justify-between","aria-label":"Legal page navigation",children:[a.jsx(Ve,{href:"/","aria-label":"Orvoca home",className:"no-underline",children:a.jsx(Gr,{height:18})}),a.jsxs("div",{className:"flex items-center gap-3 max-[640px]:gap-2",children:[a.jsx(Ve,{href:"/faq",className:"rounded-full px-3 py-2 text-[0.83rem] font-medium text-[var(--text-muted)] no-underline transition-colors duration-[140ms] hover:text-[var(--text-primary)] max-[640px]:hidden",children:o.faq}),a.jsx(Ve,{href:"/",className:"rounded-full px-3 py-2 text-[0.83rem] font-medium text-[var(--text-muted)] no-underline transition-colors duration-[140ms] hover:text-[var(--text-primary)] max-[640px]:hidden",children:o.backHome}),a.jsx(eo,{})]})]})})}),a.jsxs("main",{className:"flex-1",children:[a.jsx("section",{className:"legal-hero-section",children:a.jsx("div",{className:"mx-auto flex w-[min(1120px,calc(100%-clamp(32px,8vw,120px)))] flex-col gap-8 pt-[52px] pb-8 max-[900px]:pt-[42px] max-[640px]:pt-[34px] max-[640px]:gap-5",children:a.jsxs("div",{className:"flex flex-col gap-4",children:[a.jsx("p",{className:"landing-kicker text-[0.72rem] font-bold uppercase tracking-[0.16em] text-[var(--text-muted)]",children:o.kicker}),a.jsx("h1",{className:"landing-section-title legal-page-title max-w-[10ch] font-[var(--font-display-web)] text-[var(--text-primary)]",children:e}),a.jsxs("p",{className:"landing-meta-copy text-[0.84rem] text-[var(--text-muted)]",children:["Last updated: ",t]})]})})}),a.jsx("section",{className:"landing-surface-band landing-surface-band--elevated border-y border-[var(--border-subtle)]",children:a.jsx("div",{className:"mx-auto w-[min(1120px,calc(100%-clamp(32px,8vw,120px)))] py-[72px] max-[900px]:py-[60px] max-[640px]:py-[48px]",children:a.jsxs("article",{className:"legal-article flex max-w-[42rem] flex-col gap-12 max-[640px]:gap-8",children:[n,r?a.jsx("footer",{className:"legal-article-footer",children:r}):null]})})})]})]})})}const DR="orvoca_last_active_at";function dh(){typeof window>"u"||localStorage.setItem(DR,String(Date.now()))}const FR="https://challenges.cloudflare.com/turnstile/v0/api.js";let Yo=null;function UR(){return window.turnstile?Promise.resolve():Yo||(Yo=new Promise((e,t)=>
65{const n=document.createElement("script");n.src=FR,n.async=!0,n.onload=()=>e(),n.onerror=()=>t(new Error("turnstile_script_load_failed")),document.head.appendChild(n)}),Yo)}const tx=f.forwardRef(function({siteKey:t,onVerify:n,onExpire:r,onError:o},i){const s=f.useRef(null),l=f.useRef(null),c=f.useRef({onVerify:n,onExpire:r,onError:o});return c.current={onVerify:n,onExpire:r,onError:o},f.useImperativeHandle(i,()=>({reset(){l.current&&window.turnstile&&window.turnstile.reset(l.current)}})),f.useEffect(()=>{let u=!1;return UR().then(()=>{u||!s.current||!window.turnstile||(l.current=window.turnstile.render(s.current,{sitekey:t,callback:d=>c.current.onVerify(d),"expired-callback":()=>c.current.onExpire(),"error-callback":()=>c.current.onError()}))}).catch(()=>{u||c.current.onError()}),()=>{u=!0,l.current&&window.turnstile&&(window.turnstile.remove(l.current),l.current=null)}},[t]),a.jsx("div",{ref:s})});function zR(){return a.jsxs("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"h-[18px] w-[18px] shrink-0",children:[a.jsx("path",{fill:"#4285F4",d:"M21.6 12.23c0-.7-.06-1.37-.18-2.02H12v3.82h5.39a4.61 4.61 0 0 1-2 3.03v2.52h3.24c1.9-1.75 2.97-4.33 2.97-7.35Z"}),a.jsx("path",{fill:"#34A853",d:"M12 22c2.7 0 4.96-.9 6.62-2.42l-3.24-2.52c-.9.6-2.05.97-3.38.97-2.6 0-4.8-1.76-5.58-4.12H3.08v2.6A10 10 0 0 0 12 22Z"}),a.jsx("path",{fill:"#FBBC04",d:"M6.42 13.91A5.99 5.99 0 0 1 6.1 12c0-.66.11-1.3.32-1.91V7.49H3.08A10 10 0 0 0 2 12c0 1.61.39 3.14 1.08 4.51l3.34-2.6Z"}),a.jsx("path",{fill:"#EA4335",d:"M12 5.97c1.47 0 2.8.5 3.84 1.48l2.88-2.88C16.95 2.94 14.69 2 12 2a10 10 0 0 0-8.92 5.49l3.34 2.6C7.2 7.73 9.4 5.97 12 5.97Z"})]})}function BR(){return a.jsx("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:"h-[18px] w-[18px] shrink-0 fill-current",children:a.jsx("path",{d:"M15.2 3.2c0 1-.36 1.93-1 2.68-.72.82-1.89 1.45-3 1.36-.14-.98.3-2 .94-2.73.7-.81 1.93-1.4 3.06-1.31ZM19.1 17.47c-.45 1.04-.99 1.99-1.64 2.85-.88 1.16-1.6 1.96-2.9 1.98-1.16.02-1.53-.74-3.27-.73-1.73 0-2.13.75-3.3.71-1.25-.02-1.95-.75-2.82-1.91-2.42-3.2-2.68-6.95-1.18-9.27 1.06-1.67 2.73-2.65 4.31-2.65 1.23 0 2.4.83 3.26.83.83 0 2.3-1.03 3.88-.88.66.03 2.53.26 3.73 1.93-.1.06-2.22 1.26-2.2 3.77.03 3 2.64 4 2.67 4.01-.02.09-.42 1.43-1.54 3.36Z"})})}function $R({isBusy:e,onSocialSignIn:t}){const n=se("Auth");return a.jsx("div",{className:"auth-social-row mt-5",children:[["google",n("btn_google"),a.jsx(zR,{},"google")],["apple",n("btn_apple"),a.jsx(BR,{},"apple")]].map(([r,o,i])=>a.jsxs("button",{type:"button",className:"auth-social-button",onClick:()=>t(r),disabled:e,"aria-label":o,children:[a.jsx("span",{className:"auth-social-button__icon",children:i}),o]},r))})}function HR({resendState:e,resendCooldown:t,onCheckVerified:n,onResendVerification:r}){const o=se("Auth");return a.jsxs("div",{className:"mt-5 flex flex-col gap-4",children:[a.jsx("button",{type:"button",className:"auth-primary-button",onClick:n,children:o("btn_verified_check")}),a.jsx("button",{type:"button",className:"auth-secondary-link",onClick:r,disabled:e==="loading"||e==="cooldown"||e==="sent",children:e==="loading"?o("btn_resend_sending"):e==="sent"?o("btn_resend_sent"):e==="cooldown"?o("bt
65n_resend_cooldown",{seconds:t}):o("btn_resend")}),e==="error"?a.jsx("p",{className:"auth-feedback auth-feedback--error",role:"alert",children:o("err_resend_failed")}):null,a.jsx("p",{className:"auth-feedback",style:{textAlign:"center",fontSize:"0.8rem"},children:o("verify_spam_hint")})]})}function VR({pendingLinkEmail:e,linkPassword:t,linkState:n,errorMessage:r,linkPasswordRef:o,onLinkPasswordChange:i,onSubmit:s}){const l=se("Auth");return a.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:s,noValidate:!0,children:[a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{className:"auth-label",children:l("field_email")}),a.jsx("input",{className:"auth-input",type:"email",value:e,disabled:!0,readOnly:!0})]}),a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{className:"auth-label",htmlFor:"link-password",children:l("field_password")}),a.jsx("input",{id:"link-password",ref:o,className:"auth-input",type:"password",autoComplete:"current-password",value:t,onChange:c=>i(c.target.value),disabled:n==="loading",placeholder:"••••••••",required:!0})]}),n==="error"?a.jsx("p",{className:"auth-feedback auth-feedback--error",role:"alert",children:r}):null,a.jsx("button",{type:"submit",className:"auth-primary-button",disabled:n==="loading",children:l(n==="loading"?"btn_linking":"btn_link")})]})}function WR({resetEmail:e,resetState:t,emailRef:n,onResetEmailChange:r,onSubmit:o,turnstileSiteKey:i,turnstileRef:s,turnstileToken:l,onTurnstileVerify:c,onTurnstileExpire:u,onTurnstileError:d}){const h=se("Auth");return a.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:o,noValidate:!0,children:[a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{className:"auth-label",htmlFor:"reset-email",children:h("field_email")}),a.jsx("input",{id:"reset-email",ref:n,className:"auth-input",type:"email",autoComplete:"email",value:e,onChange:p=>r(p.target.value),disabled:t==="loading"||t==="sent",placeholder:h("field_email_placeholder"),required:!0})]}),a.jsx(tx,{ref:s,siteKey:i,onVerify:c,onExpire:u,onError:d}),t==="error"?a.jsx("p",{className:"auth-feedback auth-feedback--error",role:"alert",children:h("err_reset_failed")}):null,a.jsx("button",{type:"submit",className:"auth-primary-button",disabled:t==="loading"||t==="sent"||!l,children:h(t==="loading"?"btn_sending":"btn_send_reset")}),a.jsx("p",{className:"auth-feedback",style:{textAlign:"center",fontSize:"0.8rem"},children:h("reset_oauth_hint")})]})}function hh(e,t){return`${e}?next=${encodeURIComponent(t)}`}function qR({mode:e="signIn"}){const t=se("Auth"),n=Mt(),r=Pi(),o=no(),i=Zg(o.get("next"),`/${n}/console`),s=e==="signUp",l=s?"/signup":"/login",[c,u]=f.useState(""),[d,h]=f.useState(""),[p,m]=f.useState(""),[g,b]=f.useState("idle"),[v,x]=f.useState(""),[E,y]=f.useState(!0),[k,I]=f.useState("idle"),[C,A]=f.useState("idle"),[T,L]=f.useState(!1),[D,S]=f.useState(""),[j,P]=f.useState("idle"),[M,_]=f.useState(null),R=f.useRef(null),[O,U]=f.useState(null),$=f.useRef(null),w=f.useRef(!1),[te,K]=f.useState(!1),[N,fe]=f.useState(!1),re="gh secret set NEXT_PUBLIC_TURNSTILE_SITE_KEY --env production",[Y,pe]=f.useState(!1),[ye,X]=f.useState(null),[Re,Ie]=f.useState("idle"),[oe,xe]=f.useState(0),[G,J]=f.useState(!1),[Ne,H]=f.useState(null),[F,B]=f.useState(""),[q,Z]=f.useState(""),[ue,ge]=f.useState("idle"),Ce=f.useRef(null),Pe=f.useRef(null),z=f.useRef(null),V=t(Y?"title_verify_email":G?"title_link":T?"title_reset":s?"title_signup":"title_signin"),ie=Y?t("desc_verify_email",{email:ye?.email??""}):G?t("desc_link"):T?t(j==="sent"?"desc_reset_sent":"desc_reset"):"",he=g==="loading"||g==="locked"||k==="loading"||C==="loading"||j==="loading"||ue==="loading",ne=hh(s?"/login":"/signup",i);f.useEffect(()=>ns(Et(),_e=>{if(y(!1),!_e){X(null),pe(!1);return}if(!w.current){if(!_e.emailVerified&&_e.providerData.every(Ue=>Ue.providerId==="password")){X(_e),pe(!0);return}(async()=>{try{const Ue=await Rt(_e,!0);await zn(Ue,_e.refreshToken)}catch(Ue){ae(Ue,{context:"login_extension_pair",route:l})}r.replace(i)})()}}),[l,i,r]),f.useEffect(()=>{if(G){z.current?.focus();return}if(T){Pe.current?.focus();return}if(s){Ce.current?.focus();return}Pe.current?.focus()},[s,T,G,e]);async function je(le){if(le.preventDefault(),g==="loading"||g==="locked")return;const _e=d.trim(),Ue=c.trim(),nt=p.trim();if(!_e||!nt){b("error"),x(t("err_required"));return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_e)){b("error"),x(t("err_invalid_email"));return}if(s){if(!Ue){b("error"),x(t("err_name_required"));return}if(Ue.length>40){b("error"),x(t("err_name_too_long"));return}if(nt.length<8){b("error"),x(t("err_password_too_short"));return}if(!te){b("error"),x(t("err_consent_required"));return}if(!O){b("error"),x(t("err_turnstile_required"));return}}b("loading"),x("");try{if(s){if(!await LS(O)){$.current?.reset(),U(null),b("error"),x(t("err_turnstile_failed"));return}const ze=await TS(_e,nt,Ue,n);Fr(ze.uid,ze.email??"")}else{const pt=await $u(_e,nt);Fr(pt.uid,pt.email??""),it("user_logged_in",{method:"email"}),dh()}}catch(pt){const ze=pt.code??"";if(!s&&(ze==="auth/too-many-requests"||ze==="auth/user-disabled")){b("locked"),x(t("err_locked"));return}if(s&&ze==="auth/email-already-in-use"){b("error"),x(t("err_email_in_use"));return}if(s&&ze==="auth/weak-password"){b("error"),x(t("err_weak_password"));return}if(ze==="auth/invalid-credential"||ze==="auth/wrong-password"||ze==="auth/user-not-found"||ze==="auth/invalid-email"){b("error"),x(t(s?"err_invalid_email":"err_invalid_credential"));return}b("error"),x(t(s?"err_create_failed":"err_signin_failed"))}}async function Fe(le){if(s&&!te){b("error"),x(t("err_consent_required"));return}const _e=le==="google"?I:A;_e("loading"),x(""),w.current=!0;let Ue=!1;async function nt(){if(Ue){Ue=!1;try{await ii()}catch(pt){ae(pt,{context:"signup_social_cleanup"})}}}try{const ze=(await(le==="google"?AS():PS())).user;if(Ue=!0,await jS(ze)){if(!te){await nt(),s||r.replace(hh(`/${n}/signup`,i)),b("error"),x(t("err_consent_required"));return}await jg(ze)}Fr(ze.uid,ze.email??""),it("user_logged_in",{method:le}),dh();const To=await Rt(ze,!0);try{await zn(To,ze.refreshToken)}catch(ds){ae(ds,{context:"login_extension_pair",route:l})}r.replace(i)}catch(pt){await nt();const ze=pt.code??"";if(ze==="auth/popup-closed-by-user"||ze==="auth/cancelled-popup-request")return;if(ze==="auth/popup-blocked"){b("error"),x(t("err_popup_blocked"));return}if(ze==="auth/operation-not-allowed"){b("error"),x(t("err_provider_disabled",{provider:le==="google"?"Google":"Apple"}));return}if(ze==="auth/account-exists-with-different-credential"){const To=MS(pt),ds=DS(pt);To?(H(To),B(ds),J(!0)):(b("error"),x(t("err_social_signin_failed")));return}b("error"),x(t(s?"err_social_signup_failed":"err_social_signin_failed"))}finally{w.current=!1,_e("idle")}}async function qe(){if(!(!ye||Re==="loading"||Re==="cooldown")){Ie("loading");try{const le=await Rt(ye,!1);await Og(le,n),Ie("sent"),xe(60);const _e=setInterval(()=>{xe(Ue=>Ue<=1?(clearInterval(_e),Ie("idle"),0):Ue-1)},1e3)}catch(le){const _e=le.retryAfter;if(_e){xe(_e),Ie("cooldown");const Ue=setInterval(()=>{xe(nt=>nt<=1?(clearInterval(Ue),Ie("idle"),0):nt-1)},1e3)}else Ie("error")}}}async function Pn(){if(ye)try{if(await Rt(ye,!0),await ye.reload(),ye.emailVerified){const le=await Rt(ye,!0);try{await zn(le,ye.refreshToken)}catch(_e){ae(_e,{context:"verify_extension_pair",route:l})}r.replace(i)}}catch(le){ae(le,{context:"email_verify_check",route:l})}}async function Rn(le){le.preventDefault();const _e=D.trim();if(!(!_e||!M)){if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(_e)){P("error");return}P("loading");try{await OS(_e,void 0,M),P("sent")}catch(Ue){ae(Ue,{context:"password_reset"}),P("error")}finally{R.current?.reset(),_(null)}}}async function Ze(le){if(le.preventDefault(),!Ne||ue==="loading")return;const _e=q.trim();if(_e){ge("loading"),x("");try{const Ue=await $u(F,_e);await FS(Ue,Ne)}catch(Ue){const nt=Ue.code??"";ge("error"),x(t(nt==="auth/invalid-credential"||nt==="auth/wrong-password"||nt==="auth/user-not-found"?"err_invalid_credential":"err_link_failed"))}}}return E?a.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-transparent",children:a.jsx(Gl,{size:80})}):a.jsxs("main",{className:"auth-page landing-minimal relative isolate min-h-dvh overflow-hidden",children:[a.jsx("div",{className:"landing-starlight-background","aria-hidden":"true"}),a.jsx("div",{className:"auth-page__backdrop","aria-hidden":"true"}),a.jsxs("div",{className:"auth-page__shell relative z-[2] mx-auto flex min-h-dvh w-[min(1120px,calc(100%-clamp(32px,8vw,120px)))] flex-col px-0 pb-6 pt-4",children:[a.jsxs("header",{className:"auth-page__topbar flex items-center justify-between gap-4",children:[a.jsx(Qe,{href:"/","aria-label":t("back_to_home_label"),className:"no-underline",children:a.jsx(Gr,{height:18})}),a.jsx(eo,{})]}),a.jsx("section",{className:"auth-stage flex flex-1 items-center justify-center py-5",children:a.jsxs("div",{className:"auth-card relative z-[1] w-full max-w-[430px] rounded-[28px] border px-6 py-6 max-[520px]:rounded-[24px] max-[520px]:px-5 max-[520px]:py-5",children:[a.jsxs("div",{className:"flex flex-col gap-1.5",children:[G?a.jsx("button",{type:"button",className:"auth-back-link mb-1 inline-flex items-center gap-[5px] text-left",onClick:()=>{J(!1),ge("idle"),Z(""),H(null),x("")},children:t("back_to_signin")}):T?a.jsx("button",{type:"button",className:"auth-back-link mb-1 inline-flex items-center gap-[5px] text-left",onClick:()=>{L(!1),P("idle")},children:t("back_to_signin")}):null,a.jsx("h1",{className:"landing-section-title auth-card__title",children:V}),(Y||G||T)&&ie?a.jsx("p",{className:"auth-card__description",children:ie}):null]}),Y?a.jsx(HR,{resendState:Re,resendCooldown:oe,onCheckVerified:()=>{Pn()},onResendVerification:()=>{qe()}}
65):G?a.jsx(VR,{pendingLinkEmail:F,linkPassword:q,linkState:ue,errorMessage:v,linkPasswordRef:z,onLinkPasswordChange:Z,onSubmit:le=>{Ze(le)}}):T?a.jsx(WR,{resetEmail:D,resetState:j,emailRef:Pe,onResetEmailChange:S,onSubmit:le=>{Rn(le)},turnstileSiteKey:re,turnstileRef:R,turnstileToken:M,onTurnstileVerify:_,onTurnstileExpire:()=>_(null),onTurnstileError:()=>_(null)}):a.jsxs(a.Fragment,{children:[a.jsx($R,{isBusy:he||s&&!te,onSocialSignIn:le=>{Fe(le)}}),s?a.jsx("p",{className:"mt-3 text-center text-[0.74rem] leading-relaxed text-[var(--text-muted)]",children:t.rich("social_consent_notice",{tos:le=>a.jsx(Qe,{href:`/${n}/terms`,target:"_blank",rel:"noopener noreferrer",className:"auth-inline-link",children:le}),privacy:le=>a.jsx(Qe,{href:`/${n}/privacy`,target:"_blank",rel:"noopener noreferrer",className:"auth-inline-link",children:le})})}):null,s?a.jsxs("label",{className:"auth-consent mt-3",children:[a.jsx("input",{type:"checkbox",className:"auth-consent-checkbox",checked:te,onChange:le=>K(le.target.checked),disabled:he,required:!0}),a.jsx("span",{children:t.rich("consent_label",{tos:le=>a.jsx(Qe,{href:`/${n}/terms`,target:"_blank",rel:"noopener noreferrer",className:"auth-inline-link",children:le}),privacy:le=>a.jsx(Qe,{href:`/${n}/privacy`,target:"_blank",rel:"noopener noreferrer",className:"auth-inline-link",children:le})})})]}
65):null,a.jsx("div",{className:"login-divider auth-divider mt-5 flex items-center gap-2.5","aria-hidden":"true",children:a.jsx("span",{className:"text-[0.74rem] text-[var(--text-muted)] whitespace-nowrap",children:t("social_divider")})}),a.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:le=>{je(le)},noValidate:!0,children:[s?a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{className:"auth-label",htmlFor:"nickname",children:t("field_name")}),a.jsx("input",{id:"nickname",ref:Ce,className:"auth-input",type:"text",autoComplete:"nickname",value:c,onChange:le=>u(le.target.value),disabled:he,placeholder:t("field_name_placeholder"),required:!0})]}):null,a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{className:"auth-label",htmlFor:"email",children:t("field_email")}),a.jsx("input",{ref:Pe,id:"email",className:"auth-input",type:"email",autoComplete:"email",value:d,onChange:le=>h(le.target.value),disabled:he,placeholder:t("field_email_placeholder"),required:!0})]}),a.jsxs("div",{className:"auth-field",children:[a.jsx("label",{className:"auth-label",htmlFor:"password",children:t(s?"field_password_hint":"field_password")}),a.jsxs("div",{className:"auth-input-wrap",children:[a.jsx("input",{id:"password",className:"auth-input",type:N?"text":"password",autoComplete:s?"new-password":"current-password",value:p,onChange:le=>m(le.target.value),disabled:he,placeholder:"••••••••",required:!0}),a.jsx("button",{type:"button",className:"auth-input-toggle",onClick:()=>fe(le=>!le),"aria-label":t(N?"btn_hide_password":"btn_show_password"),tabIndex:-1,children:N?a.jsx(X6,{size:16}):a.jsx(J6,{size:16})})]})]}),s?a.jsx(tx,{ref:$,siteKey:re,onVerify:U,onExpire:()=>U(null),onError:()=>U(null)}):null,v&&(g==="error"||g==="locked")?a.jsx("p",{className:`auth-feedback ${g==="locked"?"auth-feedback--warning":"auth-feedback--error"}`,role:"alert",children:v}):null,a.jsx("button",{type:"submit",className:"auth-primary-button",disabled:he||s&&(!te||!O),children:t(g==="loading"?s?"btn_creating":"btn_signing_in":s?"btn_create":"btn_signin")}),s?null:a.jsx("button",{type:"button",className:"auth-secondary-link",onClick:()=>{L(!0),S(d),P("idle")},disabled:he,children:t("btn_forgot")})]}),a.jsxs("p",{className:"auth-mode-prompt mt-5 text-center",children:[t(s?"have_account":"no_account")," ",a.jsx(Qe,{href:ne,className:"auth-inline-link is-emphasized",children:t(s?"signin_link":"signup_link")})]})]})]})})]})]})}function GR({pageName:e,locale:t}){return f.useEffect(()=>{r5(window.location.href),it("marketing_page_viewed",{page_name:e,locale:t})},[e,t]),null}function KR(){return Vn().includes("/console")?null:a.jsx(Bg,{})}function XR(){return f.useEffect(()=>{_t(()=>import("./instrumentation-client-DMKxhuIx.js"),__vite__mapDeps([5,4,0,1,2]))},[]),null}function YR(){const e=Vn();return f.useEffect(()=>{const t=document.documentElement.dataset.theme==="light"?"light":"dark";ss(t)},[e]),null}function JR(){const e=no();return f.useEffect(()=>{const t=e.get("utm_source"),n=e.get("utm_medium"),r=e.get("utm_campaign");(t||n||r)&&gE({utm_source:t??void 0,utm_medium:n??void 0,utm_campaign:r??void 0})},[e]),null}function ZR(e){return Oi.missingMessage.fallbackText}function QR({locale:e,messages:t,children:n}){return a.jsx(K1,{locale:e,messages:t,getMessageFallback:ZR,children:n})}class ej extends Tt.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){if(t&&typeof t=="object"&&"digest"in t){const n=String(t.digest);if(n==="NEXT_NOT_FOUND"||n.startsWith("NEXT_HTTP_ERROR_FALLBACK;")||n.startsWith("NEXT_REDIRECT;"))throw t}return{error:t}}reset=()=>{this.setState({error:null})};render(){if(this.state.error){const t=this.props.fallback;return a.jsx(t,{error:this.state.error,reset:this.reset})}return this.props.children}}class tj extends Tt.Component{constructor(t){super(t),this.state={notFound:!1,previousPathname:t.pathname}}static getDerivedStateFromProps(t,n){return t.pathname!==n.previousPathname&&n.notFound?{notFound:!1,previousPathname:t.pathname}:{notFound:n.notFound,previousPathname:t.pathname}}static getDerivedStateFromError(t){if(t&&typeof t=="object"&&"digest"in t){const n=String(t.digest);
65if(n==="NEXT_NOT_FOUND"||n.startsWith("NEXT_HTTP_ERROR_FALLBACK;404"))return{notFound:!0}}throw t}render(){return this.state.notFound?this.props.fallback:this.props.children}}function nj({fallback:e,children:t}){const n=Vn();return a.jsx(tj,{pathname:n,fallback:e,children:t})}function rj({depth:e,children:t}){const n=lx();return n?f.createElement(n.Provider,{value:e},t):t}const oj={ConsoleShell:k7},ij={default:I7},sj={default:L7},aj={default:X7},lj={default:j8},cj={default:F8},uj={default:X8},dj={default:Z8},hj={default:hE},fj={SetupStatusPanel:fE},pj={default:vE},mj={default:_E},gj={default:kE},bj={AnalyticsConsentBanner:RE},xj={AppOpenBanner:KI},vj={AppStoreLink:bb},yj={BackButton:ZI},wj={MarkdownRenderer:yR},_j={FaqInstallLink:wR},Cj={FaqList:$g},Sj={GooglePlayBadge:ex},Ej={LandingHeroGsap:CR},kj={HowItWorksCinematic:TR},Ij={LandingInstallCta:PR},Nj={LandingScrollAnimations:RR},Tj={LandingShellHeader:OR},Aj={LandingThemeToggle:eo},Pj={LegalPageShell:MR},Rj={LoginForm:qR},jj={MarketingPageTracker:GR},Oj={NonConsoleAnnouncementBanner:KR},Lj={SentryClientInit:XR},Mj={ThemeChromeSync:YR},Dj={TooltipProvider:wm},Fj={UtmCapture:JR},Uj={ClientIntlProvider:QR},zj={default:Uh},Bj={ErrorBoundary:ej,NotFoundBoundary:nj},$j={LayoutSegmentProvider:rj},Hj={default:Qe},Yj=Object.freeze(Object.defineProperty({__proto__:null,export_06bd4675c6fe:hj,export_0abad14b2250:Pj,export_0deffcb8ffd7:$j,export_1c7eeb9b7b45:zj,export_26691d515579:Aj,export_2940597b6a98:Ej,export_31072e6e1c02:bj,export_3d3891b5bdb2:mj,export_411c13097356:cj,export_447e7f02a483:Lj,export_48aee60d0e72:jj,export_48e77d3eefc3:Uj,export_4ac548a092c9:ij,export_5b9257d4f7a4:oj,export_657bd4172630:Oj,export_69cf1b4db396:sj,export_6db6f2078072:Fj,export_739d3bd65092:_j,export_7524d7a7c03e:kj,export_786c94015fe8:Mj,export_7eb2b4cb6fbf:dj,export_7f2acaac61ca:lj,export_83e19ef78efc:fj,export_8c4b52fd2ed3:gj,export_943378a021ef:Dj,export_9642d40e0185:Rj,export_96e2fde2764a:wj,export_9857af2b75d5:uj,export_98cbfb9e60bb:aj,export_a93828da47c7:Sj,export_ba0f37e54449:yj,export_bca350a72d8a:Tj,export_c2747888630f:Hj,export_d8bc1198be06:Cj,export_dad449d41c6d:xj,export_e70fd8e36d47:Ij,export_e73be968928d:pj,export_ecb2729fb55b:Nj,export_f29e6e234fea:Bj,export_fb95489cafd5:vj},Symbol.toStringTag,{value:"Module"}));export{Yj as f,WS as i,Pm as s};
66//# sourceMappingURL=facade__virtual_vinext-rsc-entry-DXzGzw1a.js.map
67
68//# debugId=f297fafb-e619-56c8-96bd-f86e450a74c5

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.