@gram-ai/elements 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/assistant-ui/d3-renderer.d.ts +5 -0
- package/dist/elements.cjs +37 -26
- package/dist/elements.css +1 -1
- package/dist/elements.js +18701 -6890
- package/dist/{models-cel0aeUV.js → index-DxNldiiY.js} +281 -281
- package/dist/{models-BuM4eiir.cjs → index-IZN-i8ZU.cjs} +9 -9
- package/dist/server.cjs +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -1
package/dist/elements.cjs
CHANGED
|
@@ -1,49 +1,60 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),P=require("react"),E=require("@assistant-ui/react"),a=require("./models-BuM4eiir.cjs"),Nt=require("motion/react"),Ea=require("motion/react-m"),hr=require("@assistant-ui/react-markdown"),Oa=require("remark-gfm"),ei=require("react-dom"),Ca=require("zustand/shallow");function Or(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(r,o,i.get?i:{enumerable:!0,get:()=>t[o]})}}return r.default=t,Object.freeze(r)}const g=Or(P),br=Or(Ea),ti=Or(ei);var rn=(t,r)=>{if(r==null)return[];let o=t.findIndex(i=>i.id===r);if(o===-1)throw new Error("useVercelAIThreadState: Message not found. This is likely an internal bug in assistant-ui.");for(;t[o+1]?.role==="assistant";)o++;return t.slice(0,o+1)},nn=t=>{const o=[...t.content.filter(i=>i.type!=="file"),...t.attachments?.flatMap(i=>i.content.map(e=>({...e,filename:i.name})))??[]].map(i=>{switch(i.type){case"text":return{type:"text",text:i.text};case"image":return{type:"file",url:i.image,...i.filename&&{filename:i.filename},mediaType:"image/png"};case"file":return{type:"file",url:i.data,mediaType:i.mimeType,...i.filename&&{filename:i.filename}};default:throw new Error(`Unsupported part type: ${i.type}`)}});return{role:t.role,parts:o}};const Pa=()=>{const t={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return e=>{switch(e.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${e.expected}، ولكن تم إدخال ${o(e.input)}`;case"invalid_value":return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${a.stringifyPrimitive(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:n.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${n.suffix}"`:n.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${n.includes}"`:n.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${n.pattern}`:`${i[n.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${a.joinValues(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`;default:return"مدخل غير مقبول"}}};function Ta(){return{localeError:Pa()}}const Aa=()=>{const t={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${e.expected}, daxil olan ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Yanlış dəyər: gözlənilən ${a.stringifyPrimitive(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Yanlış mətn: "${n.prefix}" ilə başlamalıdır`:n.format==="ends_with"?`Yanlış mətn: "${n.suffix}" ilə bitməlidir`:n.format==="includes"?`Yanlış mətn: "${n.includes}" daxil olmalıdır`:n.format==="regex"?`Yanlış mətn: ${n.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[n.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Da(){return{localeError:Aa()}}function on(t,r,o,i){const e=Math.abs(t),n=e%10,s=e%100;return s>=11&&s<=19?i:n===1?r:n>=2&&n<=4?o:i}const Ra=()=>{const t={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"лік";case"object":{if(Array.isArray(e))return"масіў";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return e=>{switch(e.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${e.expected}, атрымана ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Няправільны ўвод: чакалася ${a.stringifyPrimitive(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);if(s){const l=Number(e.maximum),u=on(l,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${s.verb} ${n}${e.maximum.toString()} ${u}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);if(s){const l=Number(e.minimum),u=on(l,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${s.verb} ${n}${e.minimum.toString()} ${u}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${n.prefix}"`:n.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${n.suffix}"`:n.format==="includes"?`Няправільны радок: павінен змяшчаць "${n.includes}"`:n.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${n.pattern}`:`Няправільны ${i[n.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`;default:return"Няправільны ўвод"}}};function Ua(){return{localeError:Ra()}}const za=t=>{const r=typeof t;switch(r){case"number":return Number.isNaN(t)?"NaN":"число";case"object":{if(Array.isArray(t))return"масив";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return r},Ma=()=>{const t={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function r(i){return t[i]??null}const o={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return i=>{switch(i.code){case"invalid_type":return`Невалиден вход: очакван ${i.expected}, получен ${za(i.input)}`;case"invalid_value":return i.values.length===1?`Невалиден вход: очакван ${a.stringifyPrimitive(i.values[0])}`:`Невалидна опция: очаквано едно от ${a.joinValues(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",n=r(i.origin);return n?`Твърде голямо: очаква се ${i.origin??"стойност"} да съдържа ${e}${i.maximum.toString()} ${n.unit??"елемента"}`:`Твърде голямо: очаква се ${i.origin??"стойност"} да бъде ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",n=r(i.origin);return n?`Твърде малко: очаква се ${i.origin} да съдържа ${e}${i.minimum.toString()} ${n.unit}`:`Твърде малко: очаква се ${i.origin} да бъде ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;if(e.format==="starts_with")return`Невалиден низ: трябва да започва с "${e.prefix}"`;if(e.format==="ends_with")return`Невалиден низ: трябва да завършва с "${e.suffix}"`;if(e.format==="includes")return`Невалиден низ: трябва да включва "${e.includes}"`;if(e.format==="regex")return`Невалиден низ: трябва да съвпада с ${e.pattern}`;let n="Невалиден";return e.format==="emoji"&&(n="Невалидно"),e.format==="datetime"&&(n="Невалидно"),e.format==="date"&&(n="Невалидна"),e.format==="time"&&(n="Невалидно"),e.format==="duration"&&(n="Невалидна"),`${n} ${o[e.format]??i.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${i.divisor}`;case"unrecognized_keys":return`Неразпознат${i.keys.length>1?"и":""} ключ${i.keys.length>1?"ове":""}: ${a.joinValues(i.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${i.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${i.origin}`;default:return"Невалиден вход"}}};function La(){return{localeError:Ma()}}const Za=()=>{const t={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return e=>{switch(e.code){case"invalid_type":return`Tipus invàlid: s'esperava ${e.expected}, s'ha rebut ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Valor invàlid: s'esperava ${a.stringifyPrimitive(e.values[0])}`:`Opció invàlida: s'esperava una de ${a.joinValues(e.values," o ")}`;case"too_big":{const n=e.inclusive?"com a màxim":"menys de",s=r(e.origin);return s?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${n} ${e.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"com a mínim":"més de",s=r(e.origin);return s?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Format invàlid: ha de començar amb "${n.prefix}"`:n.format==="ends_with"?`Format invàlid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format invàlid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${n.pattern}`:`Format invàlid per a ${i[n.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`;default:return"Entrada invàlida"}}};function Fa(){return{localeError:Za()}}const Va=()=>{const t={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(e))return"pole";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return e=>{switch(e.code){case"invalid_type":return`Neplatný vstup: očekáváno ${e.expected}, obdrženo ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Neplatný vstup: očekáváno ${a.stringifyPrimitive(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${n}${e.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${n}${e.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Neplatný řetězec: musí začínat na "${n.prefix}"`:n.format==="ends_with"?`Neplatný řetězec: musí končit na "${n.suffix}"`:n.format==="includes"?`Neplatný řetězec: musí obsahovat "${n.includes}"`:n.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${n.pattern}`:`Neplatný formát ${i[n.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`;default:return"Neplatný vstup"}}};function Wa(){return{localeError:Va()}}const Ba=()=>{const t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},r={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function o(s){return t[s]??null}function i(s){return r[s]??s}const e=s=>{const l=typeof s;switch(l){case"number":return Number.isNaN(s)?"NaN":"tal";case"object":return Array.isArray(s)?"liste":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype&&s.constructor?s.constructor.name:"objekt"}return l},n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return s=>{switch(s.code){case"invalid_type":return`Ugyldigt input: forventede ${i(s.expected)}, fik ${i(e(s.input))}`;case"invalid_value":return s.values.length===1?`Ugyldig værdi: forventede ${a.stringifyPrimitive(s.values[0])}`:`Ugyldigt valg: forventede en af følgende ${a.joinValues(s.values,"|")}`;case"too_big":{const l=s.inclusive?"<=":"<",u=o(s.origin),c=i(s.origin);return u?`For stor: forventede ${c??"value"} ${u.verb} ${l} ${s.maximum.toString()} ${u.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${l} ${s.maximum.toString()}`}case"too_small":{const l=s.inclusive?">=":">",u=o(s.origin),c=i(s.origin);return u?`For lille: forventede ${c} ${u.verb} ${l} ${s.minimum.toString()} ${u.unit}`:`For lille: forventede ${c} havde ${l} ${s.minimum.toString()}`}case"invalid_format":{const l=s;return l.format==="starts_with"?`Ugyldig streng: skal starte med "${l.prefix}"`:l.format==="ends_with"?`Ugyldig streng: skal ende med "${l.suffix}"`:l.format==="includes"?`Ugyldig streng: skal indeholde "${l.includes}"`:l.format==="regex"?`Ugyldig streng: skal matche mønsteret ${l.pattern}`:`Ugyldig ${n[l.format]??s.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${s.divisor}`;case"unrecognized_keys":return`${s.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${a.joinValues(s.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${s.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${s.origin}`;default:return"Ugyldigt input"}}};function Ga(){return{localeError:Ba()}}const Ja=()=>{const t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"Zahl";case"object":{if(Array.isArray(e))return"Array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return e=>{switch(e.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${e.expected}, erhalten ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Ungültige Eingabe: erwartet ${a.stringifyPrimitive(e.values[0])}`:`Ungültige Option: erwartet eine von ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${n}${e.maximum.toString()} ist`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Ungültiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ungültiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ungültiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ungültiger String: muss dem Muster ${n.pattern} entsprechen`:`Ungültig: ${i[n.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`;default:return"Ungültige Eingabe"}}};function qa(){return{localeError:Ja()}}const Ka=t=>{const r=typeof t;switch(r){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return r},Ha=()=>{const t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function r(i){return t[i]??null}const o={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${Ka(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${a.stringifyPrimitive(i.values[0])}`:`Invalid option: expected one of ${a.joinValues(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",n=r(i.origin);return n?`Too big: expected ${i.origin??"value"} to have ${e}${i.maximum.toString()} ${n.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",n=r(i.origin);return n?`Too small: expected ${i.origin} to have ${e}${i.minimum.toString()} ${n.unit}`:`Too small: expected ${i.origin} to be ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Invalid string: must start with "${e.prefix}"`:e.format==="ends_with"?`Invalid string: must end with "${e.suffix}"`:e.format==="includes"?`Invalid string: must include "${e.includes}"`:e.format==="regex"?`Invalid string: must match pattern ${e.pattern}`:`Invalid ${o[e.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${a.joinValues(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function ri(){return{localeError:Ha()}}const Xa=t=>{const r=typeof t;switch(r){case"number":return Number.isNaN(t)?"NaN":"nombro";case"object":{if(Array.isArray(t))return"tabelo";if(t===null)return"senvalora";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return r},Ya=()=>{const t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(i){return t[i]??null}const o={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${Xa(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${a.stringifyPrimitive(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${a.joinValues(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",n=r(i.origin);return n?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${e}${i.maximum.toString()} ${n.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",n=r(i.origin);return n?`Tro malgranda: atendiĝis ke ${i.origin} havu ${e}${i.minimum.toString()} ${n.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${e.prefix}"`:e.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${e.suffix}"`:e.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${e.includes}"`:e.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${e.pattern}`:`Nevalida ${o[e.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${a.joinValues(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function Qa(){return{localeError:Ya()}}const es=()=>{const t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},r={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function o(s){return t[s]??null}function i(s){return r[s]??s}const e=s=>{const l=typeof s;switch(l){case"number":return Number.isNaN(s)?"NaN":"number";case"object":return Array.isArray(s)?"array":s===null?"null":Object.getPrototypeOf(s)!==Object.prototype?s.constructor.name:"object"}return l},n={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return s=>{switch(s.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(s.expected)}, recibido ${i(e(s.input))}`;case"invalid_value":return s.values.length===1?`Entrada inválida: se esperaba ${a.stringifyPrimitive(s.values[0])}`:`Opción inválida: se esperaba una de ${a.joinValues(s.values,"|")}`;case"too_big":{const l=s.inclusive?"<=":"<",u=o(s.origin),c=i(s.origin);return u?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${l}${s.maximum.toString()} ${u.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${l}${s.maximum.toString()}`}case"too_small":{const l=s.inclusive?">=":">",u=o(s.origin),c=i(s.origin);return u?`Demasiado pequeño: se esperaba que ${c} tuviera ${l}${s.minimum.toString()} ${u.unit}`:`Demasiado pequeño: se esperaba que ${c} fuera ${l}${s.minimum.toString()}`}case"invalid_format":{const l=s;return l.format==="starts_with"?`Cadena inválida: debe comenzar con "${l.prefix}"`:l.format==="ends_with"?`Cadena inválida: debe terminar en "${l.suffix}"`:l.format==="includes"?`Cadena inválida: debe incluir "${l.includes}"`:l.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${l.pattern}`:`Inválido ${n[l.format]??s.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${s.divisor}`;case"unrecognized_keys":return`Llave${s.keys.length>1?"s":""} desconocida${s.keys.length>1?"s":""}: ${a.joinValues(s.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(s.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(s.origin)}`;default:return"Entrada inválida"}}};function ts(){return{localeError:es()}}const rs=()=>{const t={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":{if(Array.isArray(e))return"آرایه";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return e=>{switch(e.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${e.expected} میبود، ${o(e.input)} دریافت شد`;case"invalid_value":return e.values.length===1?`ورودی نامعتبر: میبایست ${a.stringifyPrimitive(e.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${a.joinValues(e.values,"|")} میبود`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${n}${e.maximum.toString()} باشد`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case"invalid_format":{const n=e;return n.format==="starts_with"?`رشته نامعتبر: باید با "${n.prefix}" شروع شود`:n.format==="ends_with"?`رشته نامعتبر: باید با "${n.suffix}" تمام شود`:n.format==="includes"?`رشته نامعتبر: باید شامل "${n.includes}" باشد`:n.format==="regex"?`رشته نامعتبر: باید با الگوی ${n.pattern} مطابقت داشته باشد`:`${i[n.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`;default:return"ورودی نامعتبر"}}};function ns(){return{localeError:rs()}}const is=()=>{const t={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return e=>{switch(e.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${e.expected}, oli ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Virheellinen syöte: täytyy olla ${a.stringifyPrimitive(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${n}${e.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${n}${e.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen syöte: täytyy sisältää "${n.includes}"`:n.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${n.pattern}`:`Virheellinen ${i[n.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function os(){return{localeError:is()}}const as=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"nombre";case"object":{if(Array.isArray(e))return"tableau";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return e=>{switch(e.code){case"invalid_type":return`Entrée invalide : ${e.expected} attendu, ${o(e.input)} reçu`;case"invalid_value":return e.values.length===1?`Entrée invalide : ${a.stringifyPrimitive(e.values[0])} attendu`:`Option invalide : une valeur parmi ${a.joinValues(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Trop grand : ${e.origin??"valeur"} doit ${s.verb} ${n}${e.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Trop petit : ${e.origin} doit ${s.verb} ${n}${e.minimum.toString()} ${s.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Chaîne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Chaîne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Chaîne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${n.pattern}`:`${i[n.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entrée invalide"}}};function ss(){return{localeError:as()}}const ls=()=>{const t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return e=>{switch(e.code){case"invalid_type":return`Entrée invalide : attendu ${e.expected}, reçu ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Entrée invalide : attendu ${a.stringifyPrimitive(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",s=r(e.origin);return s?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",s=r(e.origin);return s?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Chaîne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Chaîne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Chaîne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Chaîne invalide : doit correspondre au motif ${n.pattern}`:`${i[n.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entrée invalide"}}};function cs(){return{localeError:ls()}}const us=()=>{const t={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},r={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},o=c=>c?t[c]:void 0,i=c=>{const m=o(c);return m?m.label:c??t.unknown.label},e=c=>`ה${i(c)}`,n=c=>(o(c)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",s=c=>c?r[c]??null:null,l=c=>{const m=typeof c;switch(m){case"number":return Number.isNaN(c)?"NaN":"number";case"object":return Array.isArray(c)?"array":c===null?"null":Object.getPrototypeOf(c)!==Object.prototype&&c.constructor?c.constructor.name:"object";default:return m}},u={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}};return c=>{switch(c.code){case"invalid_type":{const m=c.expected,f=i(m),b=l(c.input),p=t[b]?.label??b;return`קלט לא תקין: צריך להיות ${f}, התקבל ${p}`}case"invalid_value":{if(c.values.length===1)return`ערך לא תקין: הערך חייב להיות ${a.stringifyPrimitive(c.values[0])}`;const m=c.values.map(p=>a.stringifyPrimitive(p));if(c.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${m[0]} או ${m[1]}`;const f=m[m.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${m.slice(0,-1).join(", ")} או ${f}`}case"too_big":{const m=s(c.origin),f=e(c.origin??"value");if(c.origin==="string")return`${m?.longLabel??"ארוך"} מדי: ${f} צריכה להכיל ${c.maximum.toString()} ${m?.unit??""} ${c.inclusive?"או פחות":"לכל היותר"}`.trim();if(c.origin==="number"){const h=c.inclusive?`קטן או שווה ל-${c.maximum}`:`קטן מ-${c.maximum}`;return`גדול מדי: ${f} צריך להיות ${h}`}if(c.origin==="array"||c.origin==="set"){const h=c.origin==="set"?"צריכה":"צריך",v=c.inclusive?`${c.maximum} ${m?.unit??""} או פחות`:`פחות מ-${c.maximum} ${m?.unit??""}`;return`גדול מדי: ${f} ${h} להכיל ${v}`.trim()}const b=c.inclusive?"<=":"<",p=n(c.origin??"value");return m?.unit?`${m.longLabel} מדי: ${f} ${p} ${b}${c.maximum.toString()} ${m.unit}`:`${m?.longLabel??"גדול"} מדי: ${f} ${p} ${b}${c.maximum.toString()}`}case"too_small":{const m=s(c.origin),f=e(c.origin??"value");if(c.origin==="string")return`${m?.shortLabel??"קצר"} מדי: ${f} צריכה להכיל ${c.minimum.toString()} ${m?.unit??""} ${c.inclusive?"או יותר":"לפחות"}`.trim();if(c.origin==="number"){const h=c.inclusive?`גדול או שווה ל-${c.minimum}`:`גדול מ-${c.minimum}`;return`קטן מדי: ${f} צריך להיות ${h}`}if(c.origin==="array"||c.origin==="set"){const h=c.origin==="set"?"צריכה":"צריך";if(c.minimum===1&&c.inclusive){const y=(c.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${h} להכיל ${y}`}const v=c.inclusive?`${c.minimum} ${m?.unit??""} או יותר`:`יותר מ-${c.minimum} ${m?.unit??""}`;return`קטן מדי: ${f} ${h} להכיל ${v}`.trim()}const b=c.inclusive?">=":">",p=n(c.origin??"value");return m?.unit?`${m.shortLabel} מדי: ${f} ${p} ${b}${c.minimum.toString()} ${m.unit}`:`${m?.shortLabel??"קטן"} מדי: ${f} ${p} ${b}${c.minimum.toString()}`}case"invalid_format":{const m=c;if(m.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${m.prefix}"`;if(m.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${m.suffix}"`;if(m.format==="includes")return`המחרוזת חייבת לכלול "${m.includes}"`;if(m.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${m.pattern}`;const f=u[m.format],b=f?.label??m.format,h=(f?.gender??"m")==="f"?"תקינה":"תקין";return`${b} לא ${h}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${c.divisor}`;case"unrecognized_keys":return`מפתח${c.keys.length>1?"ות":""} לא מזוה${c.keys.length>1?"ים":"ה"}: ${a.joinValues(c.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${e(c.origin??"array")}`;default:return"קלט לא תקין"}}};function ds(){return{localeError:us()}}const ms=()=>{const t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"szám";case"object":{if(Array.isArray(e))return"tömb";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return e=>{switch(e.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${e.expected}, a kapott érték ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Érvénytelen bemenet: a várt érték ${a.stringifyPrimitive(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${n}${e.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Érvénytelen string: "${n.prefix}" értékkel kell kezdődnie`:n.format==="ends_with"?`Érvénytelen string: "${n.suffix}" értékkel kell végződnie`:n.format==="includes"?`Érvénytelen string: "${n.includes}" értéket kell tartalmaznia`:n.format==="regex"?`Érvénytelen string: ${n.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[n.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`;default:return"Érvénytelen bemenet"}}};function fs(){return{localeError:ms()}}const gs=()=>{const t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`Input tidak valid: diharapkan ${e.expected}, diterima ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Input tidak valid: diharapkan ${a.stringifyPrimitive(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${n}${e.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${i[n.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`;default:return"Input tidak valid"}}};function ps(){return{localeError:gs()}}const vs=t=>{const r=typeof t;switch(r){case"number":return Number.isNaN(t)?"NaN":"númer";case"object":{if(Array.isArray(t))return"fylki";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return r},hs=()=>{const t={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function r(i){return t[i]??null}const o={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return i=>{switch(i.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${vs(i.input)} þar sem á að vera ${i.expected}`;case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${a.stringifyPrimitive(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${a.joinValues(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",n=r(i.origin);return n?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${e}${i.maximum.toString()} ${n.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",n=r(i.origin);return n?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${e}${i.minimum.toString()} ${n.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Ógildur strengur: verður að byrja á "${e.prefix}"`:e.format==="ends_with"?`Ógildur strengur: verður að enda á "${e.suffix}"`:e.format==="includes"?`Ógildur strengur: verður að innihalda "${e.includes}"`:e.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${e.pattern}`:`Rangt ${o[e.format]??i.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`Óþekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${a.joinValues(i.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${i.origin}`;default:return"Rangt gildi"}}};function bs(){return{localeError:hs()}}const ys=()=>{const t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"numero";case"object":{if(Array.isArray(e))return"vettore";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`Input non valido: atteso ${e.expected}, ricevuto ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Input non valido: atteso ${a.stringifyPrimitive(e.values[0])}`:`Opzione non valida: atteso uno tra ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Troppo grande: ${e.origin??"valore"} deve avere ${n}${e.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Invalid ${i[n.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`;default:return"Input non valido"}}};function xs(){return{localeError:ys()}}const $s=()=>{const t={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"数値";case"object":{if(Array.isArray(e))return"配列";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return e=>{switch(e.code){case"invalid_type":return`無効な入力: ${e.expected}が期待されましたが、${o(e.input)}が入力されました`;case"invalid_value":return e.values.length===1?`無効な入力: ${a.stringifyPrimitive(e.values[0])}が期待されました`:`無効な選択: ${a.joinValues(e.values,"、")}のいずれかである必要があります`;case"too_big":{const n=e.inclusive?"以下である":"より小さい",s=r(e.origin);return s?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${s.unit??"要素"}${n}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${n}必要があります`}case"too_small":{const n=e.inclusive?"以上である":"より大きい",s=r(e.origin);return s?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${s.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case"invalid_format":{const n=e;return n.format==="starts_with"?`無効な文字列: "${n.prefix}"で始まる必要があります`:n.format==="ends_with"?`無効な文字列: "${n.suffix}"で終わる必要があります`:n.format==="includes"?`無効な文字列: "${n.includes}"を含む必要があります`:n.format==="regex"?`無効な文字列: パターン${n.pattern}に一致する必要があります`:`無効な${i[n.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${a.joinValues(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`;default:return"無効な入力"}}};function _s(){return{localeError:$s()}}const ws=t=>{const r=typeof t;switch(r){case"number":return Number.isNaN(t)?"NaN":"რიცხვი";case"object":{if(Array.isArray(t))return"მასივი";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[r]??r},Ss=()=>{const t={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function r(i){return t[i]??null}const o={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return i=>{switch(i.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${i.expected}, მიღებული ${ws(i.input)}`;case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${a.stringifyPrimitive(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${a.joinValues(i.values,"|")}-დან`;case"too_big":{const e=i.inclusive?"<=":"<",n=r(i.origin);return n?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${n.verb} ${e}${i.maximum.toString()} ${n.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",n=r(i.origin);return n?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${n.verb} ${e}${i.minimum.toString()} ${n.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${e.prefix}"-ით`:e.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${e.suffix}"-ით`:e.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${e.includes}"-ს`:e.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${e.pattern}`:`არასწორი ${o[e.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${a.joinValues(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Is(){return{localeError:Ss()}}const ks=()=>{const t={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(e))return"អារេ (Array)";if(e===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return e=>{switch(e.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e.expected} ប៉ុន្តែទទួលបាន ${o(e.input)}`;case"invalid_value":return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${a.stringifyPrimitive(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${n.prefix}"`:n.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${n.suffix}"`:n.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${n.includes}"`:n.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${n.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[n.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function ni(){return{localeError:ks()}}function js(){return ni()}const Ns=()=>{const t={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return e=>{switch(e.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${e.expected}, 받은 타입은 ${o(e.input)}입니다`;case"invalid_value":return e.values.length===1?`잘못된 입력: 값은 ${a.stringifyPrimitive(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${a.joinValues(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const n=e.inclusive?"이하":"미만",s=n==="미만"?"이어야 합니다":"여야 합니다",l=r(e.origin),u=l?.unit??"요소";return l?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${u} ${n}${s}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${n}${s}`}case"too_small":{const n=e.inclusive?"이상":"초과",s=n==="이상"?"이어야 합니다":"여야 합니다",l=r(e.origin),u=l?.unit??"요소";return l?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${u} ${n}${s}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${n}${s}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`잘못된 문자열: "${n.prefix}"(으)로 시작해야 합니다`:n.format==="ends_with"?`잘못된 문자열: "${n.suffix}"(으)로 끝나야 합니다`:n.format==="includes"?`잘못된 문자열: "${n.includes}"을(를) 포함해야 합니다`:n.format==="regex"?`잘못된 문자열: 정규식 ${n.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[n.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`;default:return"잘못된 입력"}}};function Es(){return{localeError:Ns()}}const Os=t=>it(typeof t,t),it=(t,r=void 0)=>{switch(t){case"number":return Number.isNaN(r)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return r===void 0?"nežinomas objektas":r===null?"nulinė reikšmė":Array.isArray(r)?"masyvas":Object.getPrototypeOf(r)!==Object.prototype&&r.constructor?r.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return t},rt=t=>t.charAt(0).toUpperCase()+t.slice(1);function an(t){const r=Math.abs(t),o=r%10,i=r%100;return i>=11&&i<=19||o===0?"many":o===1?"one":"few"}const Cs=()=>{const t={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function r(i,e,n,s){const l=t[i]??null;return l===null?l:{unit:l.unit[e],verb:l.verb[s][n?"inclusive":"notInclusive"]}}const o={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return i=>{switch(i.code){case"invalid_type":return`Gautas tipas ${Os(i.input)}, o tikėtasi - ${it(i.expected)}`;case"invalid_value":return i.values.length===1?`Privalo būti ${a.stringifyPrimitive(i.values[0])}`:`Privalo būti vienas iš ${a.joinValues(i.values,"|")} pasirinkimų`;case"too_big":{const e=it(i.origin),n=r(i.origin,an(Number(i.maximum)),i.inclusive??!1,"smaller");if(n?.verb)return`${rt(e??i.origin??"reikšmė")} ${n.verb} ${i.maximum.toString()} ${n.unit??"elementų"}`;const s=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${rt(e??i.origin??"reikšmė")} turi būti ${s} ${i.maximum.toString()} ${n?.unit}`}case"too_small":{const e=it(i.origin),n=r(i.origin,an(Number(i.minimum)),i.inclusive??!1,"bigger");if(n?.verb)return`${rt(e??i.origin??"reikšmė")} ${n.verb} ${i.minimum.toString()} ${n.unit??"elementų"}`;const s=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${rt(e??i.origin??"reikšmė")} turi būti ${s} ${i.minimum.toString()} ${n?.unit}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Eilutė privalo prasidėti "${e.prefix}"`:e.format==="ends_with"?`Eilutė privalo pasibaigti "${e.suffix}"`:e.format==="includes"?`Eilutė privalo įtraukti "${e.includes}"`:e.format==="regex"?`Eilutė privalo atitikti ${e.pattern}`:`Neteisingas ${o[e.format]??i.format}`}case"not_multiple_of":return`Skaičius privalo būti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${a.joinValues(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const e=it(i.origin);return`${rt(e??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Ps(){return{localeError:Cs()}}const Ts=()=>{const t={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"број";case"object":{if(Array.isArray(e))return"низа";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return e=>{switch(e.code){case"invalid_type":return`Грешен внес: се очекува ${e.expected}, примено ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Invalid input: expected ${a.stringifyPrimitive(e.values[0])}`:`Грешана опција: се очекува една ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${n}${e.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Неважечка низа: мора да започнува со "${n.prefix}"`:n.format==="ends_with"?`Неважечка низа: мора да завршува со "${n.suffix}"`:n.format==="includes"?`Неважечка низа: мора да вклучува "${n.includes}"`:n.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${n.pattern}`:`Invalid ${i[n.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`;default:return"Грешен внес"}}};function As(){return{localeError:Ts()}}const Ds=()=>{const t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"nombor";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`Input tidak sah: dijangka ${e.expected}, diterima ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Input tidak sah: dijangka ${a.stringifyPrimitive(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Terlalu besar: dijangka ${e.origin??"nilai"} ${s.verb} ${n}${e.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Terlalu kecil: dijangka ${e.origin} ${s.verb} ${n}${e.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${i[n.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`;default:return"Input tidak sah"}}};function Rs(){return{localeError:Ds()}}const Us=()=>{const t={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"getal";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return e=>{switch(e.code){case"invalid_type":return`Ongeldige invoer: verwacht ${e.expected}, ontving ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Ongeldige invoer: verwacht ${a.stringifyPrimitive(e.values[0])}`:`Ongeldige optie: verwacht één van ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Te groot: verwacht dat ${e.origin??"waarde"} ${s.verb} ${n}${e.maximum.toString()} ${s.unit??"elementen"}`:`Te groot: verwacht dat ${e.origin??"waarde"} ${n}${e.maximum.toString()} is`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Te klein: verwacht dat ${e.origin} ${s.verb} ${n}${e.minimum.toString()} ${s.unit}`:`Te klein: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${i[n.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`;default:return"Ongeldige invoer"}}};function zs(){return{localeError:Us()}}const Ms=()=>{const t={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"tall";case"object":{if(Array.isArray(e))return"liste";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`Ugyldig input: forventet ${e.expected}, fikk ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Ugyldig verdi: forventet ${a.stringifyPrimitive(e.values[0])}`:`Ugyldig valg: forventet en av ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Ugyldig streng: må starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: må ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: må inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: må matche mønsteret ${n.pattern}`:`Ugyldig ${i[n.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`;default:return"Ugyldig input"}}};function Ls(){return{localeError:Ms()}}const Zs=()=>{const t={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"numara";case"object":{if(Array.isArray(e))return"saf";if(e===null)return"gayb";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return e=>{switch(e.code){case"invalid_type":return`Fâsit giren: umulan ${e.expected}, alınan ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Fâsit giren: umulan ${a.stringifyPrimitive(e.values[0])}`:`Fâsit tercih: mûteberler ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${n}${e.maximum.toString()} olmalıydı.`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Fâsit metin: "${n.prefix}" ile başlamalı.`:n.format==="ends_with"?`Fâsit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`Fâsit metin: "${n.includes}" ihtivâ etmeli.`:n.format==="regex"?`Fâsit metin: ${n.pattern} nakşına uymalı.`:`Fâsit ${i[n.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function Fs(){return{localeError:Zs()}}const Vs=()=>{const t={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":{if(Array.isArray(e))return"ارې";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return e=>{switch(e.code){case"invalid_type":return`ناسم ورودي: باید ${e.expected} وای, مګر ${o(e.input)} ترلاسه شو`;case"invalid_value":return e.values.length===1?`ناسم ورودي: باید ${a.stringifyPrimitive(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${a.joinValues(e.values,"|")} څخه وای`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${n}${e.maximum.toString()} وي`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case"invalid_format":{const n=e;return n.format==="starts_with"?`ناسم متن: باید د "${n.prefix}" سره پیل شي`:n.format==="ends_with"?`ناسم متن: باید د "${n.suffix}" سره پای ته ورسيږي`:n.format==="includes"?`ناسم متن: باید "${n.includes}" ولري`:n.format==="regex"?`ناسم متن: باید د ${n.pattern} سره مطابقت ولري`:`${i[n.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`;default:return"ناسمه ورودي"}}};function Ws(){return{localeError:Vs()}}const Bs=()=>{const t={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"liczba";case"object":{if(Array.isArray(e))return"tablica";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return e=>{switch(e.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${e.expected}, otrzymano ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${a.stringifyPrimitive(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${n}${e.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${n.prefix}"`:n.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${n.suffix}"`:n.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${n.includes}"`:n.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${n.pattern}`:`Nieprawidłow(y/a/e) ${i[n.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function Gs(){return{localeError:Bs()}}const Js=()=>{const t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"número";case"object":{if(Array.isArray(e))return"array";if(e===null)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return e=>{switch(e.code){case"invalid_type":return`Tipo inválido: esperado ${e.expected}, recebido ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Entrada inválida: esperado ${a.stringifyPrimitive(e.values[0])}`:`Opção inválida: esperada uma das ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${n}${e.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Muito pequeno: esperado que ${e.origin} tivesse ${n}${e.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Texto inválido: deve começar com "${n.prefix}"`:n.format==="ends_with"?`Texto inválido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inválido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inválido: deve corresponder ao padrão ${n.pattern}`:`${i[n.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function qs(){return{localeError:Js()}}function sn(t,r,o,i){const e=Math.abs(t),n=e%10,s=e%100;return s>=11&&s<=19?i:n===1?r:n>=2&&n<=4?o:i}const Ks=()=>{const t={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"массив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return e=>{switch(e.code){case"invalid_type":return`Неверный ввод: ожидалось ${e.expected}, получено ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Неверный ввод: ожидалось ${a.stringifyPrimitive(e.values[0])}`:`Неверный вариант: ожидалось одно из ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);if(s){const l=Number(e.maximum),u=sn(l,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${n}${e.maximum.toString()} ${u}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);if(s){const l=Number(e.minimum),u=sn(l,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${u}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Неверная строка: должна начинаться с "${n.prefix}"`:n.format==="ends_with"?`Неверная строка: должна заканчиваться на "${n.suffix}"`:n.format==="includes"?`Неверная строка: должна содержать "${n.includes}"`:n.format==="regex"?`Неверная строка: должна соответствовать шаблону ${n.pattern}`:`Неверный ${i[n.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`;default:return"Неверные входные данные"}}};function Hs(){return{localeError:Ks()}}const Xs=()=>{const t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"število";case"object":{if(Array.isArray(e))return"tabela";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return e=>{switch(e.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${e.expected}, prejeto ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Neveljaven vnos: pričakovano ${a.stringifyPrimitive(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${n}${e.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Neveljaven niz: mora se začeti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se končati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${i[n.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`;default:return"Neveljaven vnos"}}};function Ys(){return{localeError:Xs()}}const Qs=()=>{const t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"antal";case"object":{if(Array.isArray(e))return"lista";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return e=>{switch(e.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${e.expected}, fick ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Ogiltig inmatning: förväntat ${a.stringifyPrimitive(e.values[0])}`:`Ogiltigt val: förväntade en av ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Ogiltig sträng: måste börja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig sträng: måste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig sträng: måste innehålla "${n.includes}"`:n.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${n.pattern}"`:`Ogiltig(t) ${i[n.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`;default:return"Ogiltig input"}}};function el(){return{localeError:Qs()}}const tl=()=>{const t={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(e))return"அணி";if(e===null)return"வெறுமை";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return e=>{switch(e.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e.expected}, பெறப்பட்டது ${o(e.input)}`;case"invalid_value":return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${a.stringifyPrimitive(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${a.joinValues(e.values,"|")} இல் ஒன்று`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const n=e;return n.format==="starts_with"?`தவறான சரம்: "${n.prefix}" இல் தொடங்க வேண்டும்`:n.format==="ends_with"?`தவறான சரம்: "${n.suffix}" இல் முடிவடைய வேண்டும்`:n.format==="includes"?`தவறான சரம்: "${n.includes}" ஐ உள்ளடக்க வேண்டும்`:n.format==="regex"?`தவறான சரம்: ${n.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[n.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function rl(){return{localeError:tl()}}const nl=()=>{const t={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(e))return"อาร์เรย์ (Array)";if(e===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return e=>{switch(e.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e.expected} แต่ได้รับ ${o(e.input)}`;case"invalid_value":return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${a.stringifyPrimitive(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"ไม่เกิน":"น้อยกว่า",s=r(e.origin);return s?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${n} ${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"อย่างน้อย":"มากกว่า",s=r(e.origin);return s?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${n.prefix}"`:n.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${n.suffix}"`:n.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${n.includes}" อยู่ในข้อความ`:n.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${n.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[n.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function il(){return{localeError:nl()}}const ol=t=>{const r=typeof t;switch(r){case"number":return Number.isNaN(t)?"NaN":"number";case"object":{if(Array.isArray(t))return"array";if(t===null)return"null";if(Object.getPrototypeOf(t)!==Object.prototype&&t.constructor)return t.constructor.name}}return r},al=()=>{const t={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function r(i){return t[i]??null}const o={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${ol(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${a.stringifyPrimitive(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${a.joinValues(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",n=r(i.origin);return n?`Çok büyük: beklenen ${i.origin??"değer"} ${e}${i.maximum.toString()} ${n.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",n=r(i.origin);return n?`Çok küçük: beklenen ${i.origin} ${e}${i.minimum.toString()} ${n.unit}`:`Çok küçük: beklenen ${i.origin} ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Geçersiz metin: "${e.prefix}" ile başlamalı`:e.format==="ends_with"?`Geçersiz metin: "${e.suffix}" ile bitmeli`:e.format==="includes"?`Geçersiz metin: "${e.includes}" içermeli`:e.format==="regex"?`Geçersiz metin: ${e.pattern} desenine uymalı`:`Geçersiz ${o[e.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${a.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function sl(){return{localeError:al()}}const ll=()=>{const t={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return e=>{switch(e.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${e.expected}, отримано ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Неправильні вхідні дані: очікується ${a.stringifyPrimitive(e.values[0])}`:`Неправильна опція: очікується одне з ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Занадто велике: очікується, що ${e.origin??"значення"} ${s.verb} ${n}${e.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Занадто мале: очікується, що ${e.origin} ${s.verb} ${n}${e.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Неправильний рядок: повинен починатися з "${n.prefix}"`:n.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${n.suffix}"`:n.format==="includes"?`Неправильний рядок: повинен містити "${n.includes}"`:n.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${n.pattern}`:`Неправильний ${i[n.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`;default:return"Неправильні вхідні дані"}}};function ii(){return{localeError:ll()}}function cl(){return ii()}const ul=()=>{const t={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"نمبر";case"object":{if(Array.isArray(e))return"آرے";if(e===null)return"نل";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return e=>{switch(e.code){case"invalid_type":return`غلط ان پٹ: ${e.expected} متوقع تھا، ${o(e.input)} موصول ہوا`;case"invalid_value":return e.values.length===1?`غلط ان پٹ: ${a.stringifyPrimitive(e.values[0])} متوقع تھا`:`غلط آپشن: ${a.joinValues(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`بہت بڑا: ${e.origin??"ویلیو"} کے ${n}${e.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const n=e;return n.format==="starts_with"?`غلط سٹرنگ: "${n.prefix}" سے شروع ہونا چاہیے`:n.format==="ends_with"?`غلط سٹرنگ: "${n.suffix}" پر ختم ہونا چاہیے`:n.format==="includes"?`غلط سٹرنگ: "${n.includes}" شامل ہونا چاہیے`:n.format==="regex"?`غلط سٹرنگ: پیٹرن ${n.pattern} سے میچ ہونا چاہیے`:`غلط ${i[n.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${a.joinValues(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function dl(){return{localeError:ul()}}const ml=()=>{const t={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"số";case"object":{if(Array.isArray(e))return"mảng";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return e=>{switch(e.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${e.expected}, nhận được ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${a.stringifyPrimitive(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${s.verb} ${n}${e.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Quá nhỏ: mong đợi ${e.origin} ${s.verb} ${n}${e.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${n.prefix}"`:n.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${n.suffix}"`:n.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${n.includes}"`:n.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${n.pattern}`:`${i[n.format]??e.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${e.origin}`;default:return"Đầu vào không hợp lệ"}}};function fl(){return{localeError:ml()}}const gl=()=>{const t={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(e))return"数组";if(e===null)return"空值(null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return e=>{switch(e.code){case"invalid_type":return`无效输入:期望 ${e.expected},实际接收 ${o(e.input)}`;case"invalid_value":return e.values.length===1?`无效输入:期望 ${a.stringifyPrimitive(e.values[0])}`:`无效选项:期望以下之一 ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${s.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`无效字符串:必须以 "${n.prefix}" 开头`:n.format==="ends_with"?`无效字符串:必须以 "${n.suffix}" 结尾`:n.format==="includes"?`无效字符串:必须包含 "${n.includes}"`:n.format==="regex"?`无效字符串:必须满足正则表达式 ${n.pattern}`:`无效${i[n.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`;default:return"无效输入"}}};function pl(){return{localeError:gl()}}const vl=()=>{const t={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return e=>{switch(e.code){case"invalid_type":return`無效的輸入值:預期為 ${e.expected},但收到 ${o(e.input)}`;case"invalid_value":return e.values.length===1?`無效的輸入值:預期為 ${a.stringifyPrimitive(e.values[0])}`:`無效的選項:預期為以下其中之一 ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${s.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`無效的字串:必須以 "${n.prefix}" 開頭`:n.format==="ends_with"?`無效的字串:必須以 "${n.suffix}" 結尾`:n.format==="includes"?`無效的字串:必須包含 "${n.includes}"`:n.format==="regex"?`無效的字串:必須符合格式 ${n.pattern}`:`無效的 ${i[n.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${a.joinValues(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`;default:return"無效的輸入值"}}};function hl(){return{localeError:vl()}}const bl=()=>{const t={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function r(e){return t[e]??null}const o=e=>{const n=typeof e;switch(n){case"number":return Number.isNaN(e)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(e))return"akopọ";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return n},i={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return e=>{switch(e.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${e.expected}, àmọ̀ a rí ${o(e.input)}`;case"invalid_value":return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${a.stringifyPrimitive(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${a.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"<=":"<",s=r(e.origin);return s?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${s.verb} ${n}${e.maximum} ${s.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case"too_small":{const n=e.inclusive?">=":">",s=r(e.origin);return s?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${s.verb} ${n}${e.minimum} ${s.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${n.prefix}"`:n.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${n.suffix}"`:n.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${n.includes}"`:n.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${n.pattern}`:`Aṣìṣe: ${i[n.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function yl(){return{localeError:bl()}}const oi=Object.freeze(Object.defineProperty({__proto__:null,ar:Ta,az:Da,be:Ua,bg:La,ca:Fa,cs:Wa,da:Ga,de:qa,en:ri,eo:Qa,es:ts,fa:ns,fi:os,fr:ss,frCA:cs,he:ds,hu:fs,id:ps,is:bs,it:xs,ja:_s,ka:Is,kh:js,km:ni,ko:Es,lt:Ps,mk:As,ms:Rs,nl:zs,no:Ls,ota:Fs,pl:Gs,ps:Ws,pt:qs,ru:Hs,sl:Ys,sv:el,ta:rl,th:il,tr:sl,ua:cl,uk:ii,ur:dl,vi:fl,yo:yl,zhCN:pl,zhTW:hl},Symbol.toStringTag,{value:"Module"})),xl=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),$l=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:a.$ZodAny,$ZodArray:a.$ZodArray,$ZodAsyncError:a.$ZodAsyncError,$ZodBase64:a.$ZodBase64,$ZodBase64URL:a.$ZodBase64URL,$ZodBigInt:a.$ZodBigInt,$ZodBigIntFormat:a.$ZodBigIntFormat,$ZodBoolean:a.$ZodBoolean,$ZodCIDRv4:a.$ZodCIDRv4,$ZodCIDRv6:a.$ZodCIDRv6,$ZodCUID:a.$ZodCUID,$ZodCUID2:a.$ZodCUID2,$ZodCatch:a.$ZodCatch,$ZodCheck:a.$ZodCheck,$ZodCheckBigIntFormat:a.$ZodCheckBigIntFormat,$ZodCheckEndsWith:a.$ZodCheckEndsWith,$ZodCheckGreaterThan:a.$ZodCheckGreaterThan,$ZodCheckIncludes:a.$ZodCheckIncludes,$ZodCheckLengthEquals:a.$ZodCheckLengthEquals,$ZodCheckLessThan:a.$ZodCheckLessThan,$ZodCheckLowerCase:a.$ZodCheckLowerCase,$ZodCheckMaxLength:a.$ZodCheckMaxLength,$ZodCheckMaxSize:a.$ZodCheckMaxSize,$ZodCheckMimeType:a.$ZodCheckMimeType,$ZodCheckMinLength:a.$ZodCheckMinLength,$ZodCheckMinSize:a.$ZodCheckMinSize,$ZodCheckMultipleOf:a.$ZodCheckMultipleOf,$ZodCheckNumberFormat:a.$ZodCheckNumberFormat,$ZodCheckOverwrite:a.$ZodCheckOverwrite,$ZodCheckProperty:a.$ZodCheckProperty,$ZodCheckRegex:a.$ZodCheckRegex,$ZodCheckSizeEquals:a.$ZodCheckSizeEquals,$ZodCheckStartsWith:a.$ZodCheckStartsWith,$ZodCheckStringFormat:a.$ZodCheckStringFormat,$ZodCheckUpperCase:a.$ZodCheckUpperCase,$ZodCodec:a.$ZodCodec,$ZodCustom:a.$ZodCustom,$ZodCustomStringFormat:a.$ZodCustomStringFormat,$ZodDate:a.$ZodDate,$ZodDefault:a.$ZodDefault,$ZodDiscriminatedUnion:a.$ZodDiscriminatedUnion,$ZodE164:a.$ZodE164,$ZodEmail:a.$ZodEmail,$ZodEmoji:a.$ZodEmoji,$ZodEncodeError:a.$ZodEncodeError,$ZodEnum:a.$ZodEnum,$ZodError:a.$ZodError,$ZodFile:a.$ZodFile,$ZodFunction:a.$ZodFunction,$ZodGUID:a.$ZodGUID,$ZodIPv4:a.$ZodIPv4,$ZodIPv6:a.$ZodIPv6,$ZodISODate:a.$ZodISODate,$ZodISODateTime:a.$ZodISODateTime,$ZodISODuration:a.$ZodISODuration,$ZodISOTime:a.$ZodISOTime,$ZodIntersection:a.$ZodIntersection,$ZodJWT:a.$ZodJWT,$ZodKSUID:a.$ZodKSUID,$ZodLazy:a.$ZodLazy,$ZodLiteral:a.$ZodLiteral,$ZodMAC:a.$ZodMAC,$ZodMap:a.$ZodMap,$ZodNaN:a.$ZodNaN,$ZodNanoID:a.$ZodNanoID,$ZodNever:a.$ZodNever,$ZodNonOptional:a.$ZodNonOptional,$ZodNull:a.$ZodNull,$ZodNullable:a.$ZodNullable,$ZodNumber:a.$ZodNumber,$ZodNumberFormat:a.$ZodNumberFormat,$ZodObject:a.$ZodObject,$ZodObjectJIT:a.$ZodObjectJIT,$ZodOptional:a.$ZodOptional,$ZodPipe:a.$ZodPipe,$ZodPrefault:a.$ZodPrefault,$ZodPromise:a.$ZodPromise,$ZodReadonly:a.$ZodReadonly,$ZodRealError:a.$ZodRealError,$ZodRecord:a.$ZodRecord,$ZodRegistry:a.$ZodRegistry,$ZodSet:a.$ZodSet,$ZodString:a.$ZodString,$ZodStringFormat:a.$ZodStringFormat,$ZodSuccess:a.$ZodSuccess,$ZodSymbol:a.$ZodSymbol,$ZodTemplateLiteral:a.$ZodTemplateLiteral,$ZodTransform:a.$ZodTransform,$ZodTuple:a.$ZodTuple,$ZodType:a.$ZodType,$ZodULID:a.$ZodULID,$ZodURL:a.$ZodURL,$ZodUUID:a.$ZodUUID,$ZodUndefined:a.$ZodUndefined,$ZodUnion:a.$ZodUnion,$ZodUnknown:a.$ZodUnknown,$ZodVoid:a.$ZodVoid,$ZodXID:a.$ZodXID,$brand:a.$brand,$constructor:a.$constructor,$input:a.$input,$output:a.$output,Doc:a.Doc,JSONSchema:xl,JSONSchemaGenerator:a.JSONSchemaGenerator,NEVER:a.NEVER,TimePrecision:a.TimePrecision,_any:a._any,_array:a._array,_base64:a._base64,_base64url:a._base64url,_bigint:a._bigint,_boolean:a._boolean,_catch:a._catch,_check:a._check,_cidrv4:a._cidrv4,_cidrv6:a._cidrv6,_coercedBigint:a._coercedBigint,_coercedBoolean:a._coercedBoolean,_coercedDate:a._coercedDate,_coercedNumber:a._coercedNumber,_coercedString:a._coercedString,_cuid:a._cuid,_cuid2:a._cuid2,_custom:a._custom,_date:a._date,_decode:a._decode,_decodeAsync:a._decodeAsync,_default:a._default,_discriminatedUnion:a._discriminatedUnion,_e164:a._e164,_email:a._email,_emoji:a._emoji,_encode:a._encode,_encodeAsync:a._encodeAsync,_endsWith:a._endsWith,_enum:a._enum,_file:a._file,_float32:a._float32,_float64:a._float64,_gt:a._gt,_gte:a._gte,_guid:a._guid,_includes:a._includes,_int:a._int,_int32:a._int32,_int64:a._int64,_intersection:a._intersection,_ipv4:a._ipv4,_ipv6:a._ipv6,_isoDate:a._isoDate,_isoDateTime:a._isoDateTime,_isoDuration:a._isoDuration,_isoTime:a._isoTime,_jwt:a._jwt,_ksuid:a._ksuid,_lazy:a._lazy,_length:a._length,_literal:a._literal,_lowercase:a._lowercase,_lt:a._lt,_lte:a._lte,_mac:a._mac,_map:a._map,_max:a._lte,_maxLength:a._maxLength,_maxSize:a._maxSize,_mime:a._mime,_min:a._gte,_minLength:a._minLength,_minSize:a._minSize,_multipleOf:a._multipleOf,_nan:a._nan,_nanoid:a._nanoid,_nativeEnum:a._nativeEnum,_negative:a._negative,_never:a._never,_nonnegative:a._nonnegative,_nonoptional:a._nonoptional,_nonpositive:a._nonpositive,_normalize:a._normalize,_null:a._null,_nullable:a._nullable,_number:a._number,_optional:a._optional,_overwrite:a._overwrite,_parse:a._parse,_parseAsync:a._parseAsync,_pipe:a._pipe,_positive:a._positive,_promise:a._promise,_property:a._property,_readonly:a._readonly,_record:a._record,_refine:a._refine,_regex:a._regex,_safeDecode:a._safeDecode,_safeDecodeAsync:a._safeDecodeAsync,_safeEncode:a._safeEncode,_safeEncodeAsync:a._safeEncodeAsync,_safeParse:a._safeParse,_safeParseAsync:a._safeParseAsync,_set:a._set,_size:a._size,_slugify:a._slugify,_startsWith:a._startsWith,_string:a._string,_stringFormat:a._stringFormat,_stringbool:a._stringbool,_success:a._success,_superRefine:a._superRefine,_symbol:a._symbol,_templateLiteral:a._templateLiteral,_toLowerCase:a._toLowerCase,_toUpperCase:a._toUpperCase,_transform:a._transform,_trim:a._trim,_tuple:a._tuple,_uint32:a._uint32,_uint64:a._uint64,_ulid:a._ulid,_undefined:a._undefined,_union:a._union,_unknown:a._unknown,_uppercase:a._uppercase,_url:a._url,_uuid:a._uuid,_uuidv4:a._uuidv4,_uuidv6:a._uuidv6,_uuidv7:a._uuidv7,_void:a._void,_xid:a._xid,clone:a.clone,config:a.config,decode:a.decode,decodeAsync:a.decodeAsync,describe:a.describe,encode:a.encode,encodeAsync:a.encodeAsync,flattenError:a.flattenError,formatError:a.formatError,globalConfig:a.globalConfig,globalRegistry:a.globalRegistry,isValidBase64:a.isValidBase64,isValidBase64URL:a.isValidBase64URL,isValidJWT:a.isValidJWT,locales:oi,meta:a.meta,parse:a.parse,parseAsync:a.parseAsync,prettifyError:a.prettifyError,regexes:a.regexes,registry:a.registry,safeDecode:a.safeDecode,safeDecodeAsync:a.safeDecodeAsync,safeEncode:a.safeEncode,safeEncodeAsync:a.safeEncodeAsync,safeParse:a.safeParse,safeParseAsync:a.safeParseAsync,toDotPath:a.toDotPath,toJSONSchema:a.toJSONSchema,treeifyError:a.treeifyError,util:a.util,version:a.version},Symbol.toStringTag,{value:"Module"}));function _l(t){return a._coercedString(a.ZodString,t)}function wl(t){return a._coercedNumber(a.ZodNumber,t)}function Sl(t){return a._coercedBoolean(a.ZodBoolean,t)}function Il(t){return a._coercedBigint(a.ZodBigInt,t)}function kl(t){return a._coercedDate(a.ZodDate,t)}const jl=Object.freeze(Object.defineProperty({__proto__:null,bigint:Il,boolean:Sl,date:kl,number:wl,string:_l},Symbol.toStringTag,{value:"Module"}));a.config(ri());const ln=Object.freeze(Object.defineProperty({__proto__:null,$brand:a.$brand,$input:a.$input,$output:a.$output,NEVER:a.NEVER,TimePrecision:a.TimePrecision,ZodAny:a.ZodAny,ZodArray:a.ZodArray,ZodBase64:a.ZodBase64,ZodBase64URL:a.ZodBase64URL,ZodBigInt:a.ZodBigInt,ZodBigIntFormat:a.ZodBigIntFormat,ZodBoolean:a.ZodBoolean,ZodCIDRv4:a.ZodCIDRv4,ZodCIDRv6:a.ZodCIDRv6,ZodCUID:a.ZodCUID,ZodCUID2:a.ZodCUID2,ZodCatch:a.ZodCatch,ZodCodec:a.ZodCodec,ZodCustom:a.ZodCustom,ZodCustomStringFormat:a.ZodCustomStringFormat,ZodDate:a.ZodDate,ZodDefault:a.ZodDefault,ZodDiscriminatedUnion:a.ZodDiscriminatedUnion,ZodE164:a.ZodE164,ZodEmail:a.ZodEmail,ZodEmoji:a.ZodEmoji,ZodEnum:a.ZodEnum,ZodError:a.ZodError,ZodFile:a.ZodFile,get ZodFirstPartyTypeKind(){return a.ZodFirstPartyTypeKind},ZodFunction:a.ZodFunction,ZodGUID:a.ZodGUID,ZodIPv4:a.ZodIPv4,ZodIPv6:a.ZodIPv6,ZodISODate:a.ZodISODate,ZodISODateTime:a.ZodISODateTime,ZodISODuration:a.ZodISODuration,ZodISOTime:a.ZodISOTime,ZodIntersection:a.ZodIntersection,ZodIssueCode:a.ZodIssueCode,ZodJWT:a.ZodJWT,ZodKSUID:a.ZodKSUID,ZodLazy:a.ZodLazy,ZodLiteral:a.ZodLiteral,ZodMAC:a.ZodMAC,ZodMap:a.ZodMap,ZodNaN:a.ZodNaN,ZodNanoID:a.ZodNanoID,ZodNever:a.ZodNever,ZodNonOptional:a.ZodNonOptional,ZodNull:a.ZodNull,ZodNullable:a.ZodNullable,ZodNumber:a.ZodNumber,ZodNumberFormat:a.ZodNumberFormat,ZodObject:a.ZodObject,ZodOptional:a.ZodOptional,ZodPipe:a.ZodPipe,ZodPrefault:a.ZodPrefault,ZodPromise:a.ZodPromise,ZodReadonly:a.ZodReadonly,ZodRealError:a.ZodRealError,ZodRecord:a.ZodRecord,ZodSet:a.ZodSet,ZodString:a.ZodString,ZodStringFormat:a.ZodStringFormat,ZodSuccess:a.ZodSuccess,ZodSymbol:a.ZodSymbol,ZodTemplateLiteral:a.ZodTemplateLiteral,ZodTransform:a.ZodTransform,ZodTuple:a.ZodTuple,ZodType:a.ZodType,ZodULID:a.ZodULID,ZodURL:a.ZodURL,ZodUUID:a.ZodUUID,ZodUndefined:a.ZodUndefined,ZodUnion:a.ZodUnion,ZodUnknown:a.ZodUnknown,ZodVoid:a.ZodVoid,ZodXID:a.ZodXID,_ZodString:a._ZodString,_default:a._default$1,_function:a._function,any:a.any,array:a.array,base64:a.base64,base64url:a.base64url,bigint:a.bigint,boolean:a.boolean,catch:a._catch$1,check:a.check,cidrv4:a.cidrv4,cidrv6:a.cidrv6,clone:a.clone,codec:a.codec,coerce:jl,config:a.config,core:$l,cuid:a.cuid,cuid2:a.cuid2,custom:a.custom,date:a.date,decode:a.decode$1,decodeAsync:a.decodeAsync$1,describe:a.describe$1,discriminatedUnion:a.discriminatedUnion,e164:a.e164,email:a.email,emoji:a.emoji,encode:a.encode$1,encodeAsync:a.encodeAsync$1,endsWith:a._endsWith,enum:a._enum$1,file:a.file,flattenError:a.flattenError,float32:a.float32,float64:a.float64,formatError:a.formatError,function:a._function,getErrorMap:a.getErrorMap,globalRegistry:a.globalRegistry,gt:a._gt,gte:a._gte,guid:a.guid,hash:a.hash,hex:a.hex,hostname:a.hostname,httpUrl:a.httpUrl,includes:a._includes,instanceof:a._instanceof,int:a.int,int32:a.int32,int64:a.int64,intersection:a.intersection,ipv4:a.ipv4,ipv6:a.ipv6,iso:a.iso,json:a.json,jwt:a.jwt,keyof:a.keyof,ksuid:a.ksuid,lazy:a.lazy,length:a._length,literal:a.literal,locales:oi,looseObject:a.looseObject,lowercase:a._lowercase,lt:a._lt,lte:a._lte,mac:a.mac,map:a.map,maxLength:a._maxLength,maxSize:a._maxSize,meta:a.meta$1,mime:a._mime,minLength:a._minLength,minSize:a._minSize,multipleOf:a._multipleOf,nan:a.nan,nanoid:a.nanoid,nativeEnum:a.nativeEnum,negative:a._negative,never:a.never,nonnegative:a._nonnegative,nonoptional:a.nonoptional,nonpositive:a._nonpositive,normalize:a._normalize,null:a._null$1,nullable:a.nullable,nullish:a.nullish,number:a.number,object:a.object,optional:a.optional,overwrite:a._overwrite,parse:a.parse$1,parseAsync:a.parseAsync$1,partialRecord:a.partialRecord,pipe:a.pipe,positive:a._positive,prefault:a.prefault,preprocess:a.preprocess,prettifyError:a.prettifyError,promise:a.promise,property:a._property,readonly:a.readonly,record:a.record,refine:a.refine,regex:a._regex,regexes:a.regexes,registry:a.registry,safeDecode:a.safeDecode$1,safeDecodeAsync:a.safeDecodeAsync$1,safeEncode:a.safeEncode$1,safeEncodeAsync:a.safeEncodeAsync$1,safeParse:a.safeParse$1,safeParseAsync:a.safeParseAsync$1,set:a.set,setErrorMap:a.setErrorMap,size:a._size,slugify:a._slugify,startsWith:a._startsWith,strictObject:a.strictObject,string:a.string,stringFormat:a.stringFormat,stringbool:a.stringbool,success:a.success,superRefine:a.superRefine,symbol:a.symbol,templateLiteral:a.templateLiteral,toJSONSchema:a.toJSONSchema,toLowerCase:a._toLowerCase,toUpperCase:a._toUpperCase,transform:a.transform,treeifyError:a.treeifyError,trim:a._trim,tuple:a.tuple,uint32:a.uint32,uint64:a.uint64,ulid:a.ulid,undefined:a._undefined$1,union:a.union,unknown:a.unknown,uppercase:a._uppercase,url:a.url,util:a.util,uuid:a.uuid,uuidv4:a.uuidv4,uuidv6:a.uuidv6,uuidv7:a.uuidv7,void:a._void$1,xid:a.xid},Symbol.toStringTag,{value:"Module"}));function Nl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var El=Object.defineProperty,Ol=(t,r)=>{for(var o in r)El(t,o,{get:r[o],enumerable:!0})},ai="AI_NoObjectGeneratedError",si=`vercel.ai.error.${ai}`,Cl=Symbol.for(si),li,cn=class extends a.AISDKError{constructor({message:t="No object generated.",cause:r,text:o,response:i,usage:e,finishReason:n}){super({name:ai,message:t,cause:r}),this[li]=!0,this.text=o,this.response=i,this.usage=e,this.finishReason=n}static isInstance(t){return a.AISDKError.hasMarker(t,si)}};li=Cl;var un="5.0.108",ci=a.union([a.string(),a._instanceof(Uint8Array),a._instanceof(ArrayBuffer),a.custom(t=>{var r,o;return(o=(r=globalThis.Buffer)==null?void 0:r.isBuffer(t))!=null?o:!1},{message:"Must be a Buffer"})]),ct=a.lazy(()=>a.union([a._null$1(),a.string(),a.number(),a.boolean(),a.record(a.string(),ct),a.array(ct)])),B=a.record(a.string(),a.record(a.string(),ct)),ui=a.object({type:a.literal("text"),text:a.string(),providerOptions:B.optional()}),Pl=a.object({type:a.literal("image"),image:a.union([ci,a._instanceof(URL)]),mediaType:a.string().optional(),providerOptions:B.optional()}),di=a.object({type:a.literal("file"),data:a.union([ci,a._instanceof(URL)]),filename:a.string().optional(),mediaType:a.string(),providerOptions:B.optional()}),Tl=a.object({type:a.literal("reasoning"),text:a.string(),providerOptions:B.optional()}),Al=a.object({type:a.literal("tool-call"),toolCallId:a.string(),toolName:a.string(),input:a.unknown(),providerOptions:B.optional(),providerExecuted:a.boolean().optional()}),Dl=a.discriminatedUnion("type",[a.object({type:a.literal("text"),value:a.string()}),a.object({type:a.literal("json"),value:ct}),a.object({type:a.literal("error-text"),value:a.string()}),a.object({type:a.literal("error-json"),value:ct}),a.object({type:a.literal("content"),value:a.array(a.union([a.object({type:a.literal("text"),text:a.string()}),a.object({type:a.literal("media"),data:a.string(),mediaType:a.string()})]))})]),mi=a.object({type:a.literal("tool-result"),toolCallId:a.string(),toolName:a.string(),output:Dl,providerOptions:B.optional()}),Rl=a.object({role:a.literal("system"),content:a.string(),providerOptions:B.optional()}),Ul=a.object({role:a.literal("user"),content:a.union([a.string(),a.array(a.union([ui,Pl,di]))]),providerOptions:B.optional()}),zl=a.object({role:a.literal("assistant"),content:a.union([a.string(),a.array(a.union([ui,di,Tl,Al,mi]))]),providerOptions:B.optional()}),Ml=a.object({role:a.literal("tool"),content:a.array(mi),providerOptions:B.optional()});a.union([Rl,Ul,zl,Ml]);a.createIdGenerator({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(t,r){r.enqueue(`data: ${JSON.stringify(t)}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react/jsx-runtime"),m=require("./index-IZN-i8ZU.cjs"),V=require("@assistant-ui/react"),Q=require("react"),ca=require("motion/react"),F_=require("motion/react-m"),kc=require("@assistant-ui/react-markdown"),Z_=require("remark-gfm"),Lg=require("react-dom"),B_=require("zustand/shallow");function Ou(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const E=Ou(Q),Ic=Ou(F_),Fg=Ou(Lg);var Nd=(e,t)=>{if(t==null)return[];let r=e.findIndex(i=>i.id===t);if(r===-1)throw new Error("useVercelAIThreadState: Message not found. This is likely an internal bug in assistant-ui.");for(;e[r+1]?.role==="assistant";)r++;return e.slice(0,r+1)},Ed=e=>{const r=[...e.content.filter(i=>i.type!=="file"),...e.attachments?.flatMap(i=>i.content.map(n=>({...n,filename:i.name})))??[]].map(i=>{switch(i.type){case"text":return{type:"text",text:i.text};case"image":return{type:"file",url:i.image,...i.filename&&{filename:i.filename},mediaType:"image/png"};case"file":return{type:"file",url:i.data,mediaType:i.mimeType,...i.filename&&{filename:i.filename}};default:throw new Error(`Unsupported part type: ${i.type}`)}});return{role:e.role,parts:r}};const V_=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return n=>{switch(n.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${n.expected}، ولكن تم إدخال ${r(n.input)}`;case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${m.stringifyPrimitive(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()} ${a.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()} ${a.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:o.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${o.suffix}"`:o.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${o.includes}"`:o.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${o.pattern}`:`${i[o.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${m.joinValues(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function W_(){return{localeError:V_()}}const q_=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${n.expected}, daxil olan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${m.stringifyPrimitive(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Yanlış mətn: "${o.prefix}" ilə başlamalıdır`:o.format==="ends_with"?`Yanlış mətn: "${o.suffix}" ilə bitməlidir`:o.format==="includes"?`Yanlış mətn: "${o.includes}" daxil olmalıdır`:o.format==="regex"?`Yanlış mətn: ${o.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[o.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function G_(){return{localeError:q_()}}function Md(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const Y_=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"лік";case"object":{if(Array.isArray(n))return"масіў";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return n=>{switch(n.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${n.expected}, атрымана ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${m.stringifyPrimitive(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=Md(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${a.verb} ${o}${n.maximum.toString()} ${c}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=Md(s,a.unit.one,a.unit.few,a.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${a.verb} ${o}${n.minimum.toString()} ${c}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${o.prefix}"`:o.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${o.suffix}"`:o.format==="includes"?`Няправільны радок: павінен змяшчаць "${o.includes}"`:o.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${o.pattern}`:`Няправільны ${i[o.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function H_(){return{localeError:Y_()}}const X_=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},J_=()=>{const e={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function t(i){return e[i]??null}const r={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"};return i=>{switch(i.code){case"invalid_type":return`Невалиден вход: очакван ${i.expected}, получен ${X_(i.input)}`;case"invalid_value":return i.values.length===1?`Невалиден вход: очакван ${m.stringifyPrimitive(i.values[0])}`:`Невалидна опция: очаквано едно от ${m.joinValues(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Твърде голямо: очаква се ${i.origin??"стойност"} да съдържа ${n}${i.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${i.origin??"стойност"} да бъде ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Твърде малко: очаква се ${i.origin} да съдържа ${n}${i.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${i.origin} да бъде ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;if(n.format==="starts_with")return`Невалиден низ: трябва да започва с "${n.prefix}"`;if(n.format==="ends_with")return`Невалиден низ: трябва да завършва с "${n.suffix}"`;if(n.format==="includes")return`Невалиден низ: трябва да включва "${n.includes}"`;if(n.format==="regex")return`Невалиден низ: трябва да съвпада с ${n.pattern}`;let o="Невалиден";return n.format==="emoji"&&(o="Невалидно"),n.format==="datetime"&&(o="Невалидно"),n.format==="date"&&(o="Невалидна"),n.format==="time"&&(o="Невалидно"),n.format==="duration"&&(o="Невалидна"),`${o} ${r[n.format]??i.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${i.divisor}`;case"unrecognized_keys":return`Неразпознат${i.keys.length>1?"и":""} ключ${i.keys.length>1?"ове":""}: ${m.joinValues(i.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${i.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${i.origin}`;default:return"Невалиден вход"}}};function K_(){return{localeError:J_()}}const Q_=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipus invàlid: s'esperava ${n.expected}, s'ha rebut ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${m.stringifyPrimitive(n.values[0])}`:`Opció invàlida: s'esperava una de ${m.joinValues(n.values," o ")}`;case"too_big":{const o=n.inclusive?"com a màxim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"com a mínim":"més de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingués ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Format invàlid: ha de començar amb "${o.prefix}"`:o.format==="ends_with"?`Format invàlid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format invàlid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${o.pattern}`:`Format invàlid per a ${i[o.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function ex(){return{localeError:Q_()}}const tx=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(n))return"pole";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return n=>{switch(n.code){case"invalid_type":return`Neplatný vstup: očekáváno ${n.expected}, obdrženo ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${m.stringifyPrimitive(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${o}${n.maximum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${o}${n.minimum.toString()} ${a.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neplatný řetězec: musí začínat na "${o.prefix}"`:o.format==="ends_with"?`Neplatný řetězec: musí končit na "${o.suffix}"`:o.format==="includes"?`Neplatný řetězec: musí obsahovat "${o.includes}"`:o.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${o.pattern}`:`Neplatný formát ${i[o.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function nx(){return{localeError:tx()}}const rx=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function r(a){return e[a]??null}function i(a){return t[a]??a}const n=a=>{const s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"tal";case"object":return Array.isArray(a)?"liste":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objekt"}return s},o={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return a=>{switch(a.code){case"invalid_type":return`Ugyldigt input: forventede ${i(a.expected)}, fik ${i(n(a.input))}`;case"invalid_value":return a.values.length===1?`Ugyldig værdi: forventede ${m.stringifyPrimitive(a.values[0])}`:`Ugyldigt valg: forventede en af følgende ${m.joinValues(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=r(a.origin),l=i(a.origin);return c?`For stor: forventede ${l??"value"} ${c.verb} ${s} ${a.maximum.toString()} ${c.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${s} ${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=r(a.origin),l=i(a.origin);return c?`For lille: forventede ${l} ${c.verb} ${s} ${a.minimum.toString()} ${c.unit}`:`For lille: forventede ${l} havde ${s} ${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche mønsteret ${s.pattern}`:`Ugyldig ${o[s.format]??a.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${a.divisor}`;case"unrecognized_keys":return`${a.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${m.joinValues(a.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${a.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${a.origin}`;default:return"Ugyldigt input"}}};function ix(){return{localeError:rx()}}const ox=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"Zahl";case"object":{if(Array.isArray(n))return"Array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return n=>{switch(n.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${n.expected}, erhalten ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${m.stringifyPrimitive(n.values[0])}`:`Ungültige Option: erwartet eine von ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ungültiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ungültiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ungültiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ungültiger String: muss dem Muster ${o.pattern} entsprechen`:`Ungültig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function ax(){return{localeError:ox()}}const sx=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},lx=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(i){return e[i]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${sx(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${m.stringifyPrimitive(i.values[0])}`:`Invalid option: expected one of ${m.joinValues(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${n}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Too small: expected ${i.origin} to have ${n}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${r[n.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${m.joinValues(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Zg(){return{localeError:lx()}}const cx=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},ux=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${cx(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${m.stringifyPrimitive(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${m.joinValues(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Tro malgranda: atendiĝis ke ${i.origin} havu ${n}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${r[n.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${m.joinValues(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function fx(){return{localeError:ux()}}const dx=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function r(a){return e[a]??null}function i(a){return t[a]??a}const n=a=>{const s=typeof a;switch(s){case"number":return Number.isNaN(a)?"NaN":"number";case"object":return Array.isArray(a)?"array":a===null?"null":Object.getPrototypeOf(a)!==Object.prototype?a.constructor.name:"object"}return s},o={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return a=>{switch(a.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(a.expected)}, recibido ${i(n(a.input))}`;case"invalid_value":return a.values.length===1?`Entrada inválida: se esperaba ${m.stringifyPrimitive(a.values[0])}`:`Opción inválida: se esperaba una de ${m.joinValues(a.values,"|")}`;case"too_big":{const s=a.inclusive?"<=":"<",c=r(a.origin),l=i(a.origin);return c?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${s}${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${s}${a.maximum.toString()}`}case"too_small":{const s=a.inclusive?">=":">",c=r(a.origin),l=i(a.origin);return c?`Demasiado pequeño: se esperaba que ${l} tuviera ${s}${a.minimum.toString()} ${c.unit}`:`Demasiado pequeño: se esperaba que ${l} fuera ${s}${a.minimum.toString()}`}case"invalid_format":{const s=a;return s.format==="starts_with"?`Cadena inválida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inválida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inválida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${s.pattern}`:`Inválido ${o[s.format]??a.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${a.divisor}`;case"unrecognized_keys":return`Llave${a.keys.length>1?"s":""} desconocida${a.keys.length>1?"s":""}: ${m.joinValues(a.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(a.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(a.origin)}`;default:return"Entrada inválida"}}};function hx(){return{localeError:dx()}}const mx=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"آرایه";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return n=>{switch(n.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${n.expected} میبود، ${r(n.input)} دریافت شد`;case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${m.stringifyPrimitive(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${m.joinValues(n.values,"|")} میبود`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${o}${n.maximum.toString()} باشد`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${o}${n.minimum.toString()} باشد`}case"invalid_format":{const o=n;return o.format==="starts_with"?`رشته نامعتبر: باید با "${o.prefix}" شروع شود`:o.format==="ends_with"?`رشته نامعتبر: باید با "${o.suffix}" تمام شود`:o.format==="includes"?`رشته نامعتبر: باید شامل "${o.includes}" باشد`:o.format==="regex"?`رشته نامعتبر: باید با الگوی ${o.pattern} مطابقت داشته باشد`:`${i[o.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function gx(){return{localeError:mx()}}const px=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return n=>{switch(n.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${n.expected}, oli ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${m.stringifyPrimitive(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} täytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon täytyy olla ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} täytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon täytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen syöte: täytyy sisältää "${o.includes}"`:o.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${o.pattern}`:`Virheellinen ${i[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function vx(){return{localeError:px()}}const bx=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombre";case"object":{if(Array.isArray(n))return"tableau";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : ${n.expected} attendu, ${r(n.input)} reçu`;case"invalid_value":return n.values.length===1?`Entrée invalide : ${m.stringifyPrimitive(n.values[0])} attendu`:`Option invalide : une valeur parmi ${m.joinValues(n.values,"|")} attendue`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${n.origin??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${n.origin} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${n.origin} doit être ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function yx(){return{localeError:bx()}}const _x=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return n=>{switch(n.code){case"invalid_type":return`Entrée invalide : attendu ${n.expected}, reçu ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${m.stringifyPrimitive(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"≤":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"≥":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chaîne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Chaîne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Chaîne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Chaîne invalide : doit correspondre au motif ${o.pattern}`:`${i[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function xx(){return{localeError:_x()}}const wx=()=>{const e={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},t={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},r=l=>l?e[l]:void 0,i=l=>{const u=r(l);return u?u.label:l??e.unknown.label},n=l=>`ה${i(l)}`,o=l=>(r(l)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",a=l=>l?t[l]??null:null,s=l=>{const u=typeof l;switch(u){case"number":return Number.isNaN(l)?"NaN":"number";case"object":return Array.isArray(l)?"array":l===null?"null":Object.getPrototypeOf(l)!==Object.prototype&&l.constructor?l.constructor.name:"object";default:return u}},c={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}};return l=>{switch(l.code){case"invalid_type":{const u=l.expected,f=i(u),d=s(l.input),h=e[d]?.label??d;return`קלט לא תקין: צריך להיות ${f}, התקבל ${h}`}case"invalid_value":{if(l.values.length===1)return`ערך לא תקין: הערך חייב להיות ${m.stringifyPrimitive(l.values[0])}`;const u=l.values.map(h=>m.stringifyPrimitive(h));if(l.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${u[0]} או ${u[1]}`;const f=u[u.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${u.slice(0,-1).join(", ")} או ${f}`}case"too_big":{const u=a(l.origin),f=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"ארוך"} מדי: ${f} צריכה להכיל ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"או פחות":"לכל היותר"}`.trim();if(l.origin==="number"){const p=l.inclusive?`קטן או שווה ל-${l.maximum}`:`קטן מ-${l.maximum}`;return`גדול מדי: ${f} צריך להיות ${p}`}if(l.origin==="array"||l.origin==="set"){const p=l.origin==="set"?"צריכה":"צריך",g=l.inclusive?`${l.maximum} ${u?.unit??""} או פחות`:`פחות מ-${l.maximum} ${u?.unit??""}`;return`גדול מדי: ${f} ${p} להכיל ${g}`.trim()}const d=l.inclusive?"<=":"<",h=o(l.origin??"value");return u?.unit?`${u.longLabel} מדי: ${f} ${h} ${d}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"גדול"} מדי: ${f} ${h} ${d}${l.maximum.toString()}`}case"too_small":{const u=a(l.origin),f=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"קצר"} מדי: ${f} צריכה להכיל ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"או יותר":"לפחות"}`.trim();if(l.origin==="number"){const p=l.inclusive?`גדול או שווה ל-${l.minimum}`:`גדול מ-${l.minimum}`;return`קטן מדי: ${f} צריך להיות ${p}`}if(l.origin==="array"||l.origin==="set"){const p=l.origin==="set"?"צריכה":"צריך";if(l.minimum===1&&l.inclusive){const v=(l.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${p} להכיל ${v}`}const g=l.inclusive?`${l.minimum} ${u?.unit??""} או יותר`:`יותר מ-${l.minimum} ${u?.unit??""}`;return`קטן מדי: ${f} ${p} להכיל ${g}`.trim()}const d=l.inclusive?">=":">",h=o(l.origin??"value");return u?.unit?`${u.shortLabel} מדי: ${f} ${h} ${d}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"קטן"} מדי: ${f} ${h} ${d}${l.minimum.toString()}`}case"invalid_format":{const u=l;if(u.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${u.prefix}"`;if(u.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${u.suffix}"`;if(u.format==="includes")return`המחרוזת חייבת לכלול "${u.includes}"`;if(u.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${u.pattern}`;const f=c[u.format],d=f?.label??u.format,p=(f?.gender??"m")==="f"?"תקינה":"תקין";return`${d} לא ${p}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${l.divisor}`;case"unrecognized_keys":return`מפתח${l.keys.length>1?"ות":""} לא מזוה${l.keys.length>1?"ים":"ה"}: ${m.joinValues(l.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(l.origin??"array")}`;default:return"קלט לא תקין"}}};function $x(){return{localeError:wx()}}const Sx=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"szám";case"object":{if(Array.isArray(n))return"tömb";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return n=>{switch(n.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${n.expected}, a kapott érték ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${m.stringifyPrimitive(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Érvénytelen string: "${o.prefix}" értékkel kell kezdődnie`:o.format==="ends_with"?`Érvénytelen string: "${o.suffix}" értékkel kell végződnie`:o.format==="includes"?`Érvénytelen string: "${o.includes}" értéket kell tartalmaznia`:o.format==="regex"?`Érvénytelen string: ${o.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[o.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function kx(){return{localeError:Sx()}}const Ix=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak valid: diharapkan ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${m.stringifyPrimitive(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${i[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function Nx(){return{localeError:Ix()}}const Ex=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},Mx=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(i){return e[i]??null}const r={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return i=>{switch(i.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${Ex(i.input)} þar sem á að vera ${i.expected}`;case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${m.stringifyPrimitive(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${m.joinValues(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${n}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${n}${i.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Ógildur strengur: verður að byrja á "${n.prefix}"`:n.format==="ends_with"?`Ógildur strengur: verður að enda á "${n.suffix}"`:n.format==="includes"?`Ógildur strengur: verður að innihalda "${n.includes}"`:n.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${n.pattern}`:`Rangt ${r[n.format]??i.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`Óþekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${m.joinValues(i.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${i.origin}`;default:return"Rangt gildi"}}};function Tx(){return{localeError:Mx()}}const Cx=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numero";case"object":{if(Array.isArray(n))return"vettore";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input non valido: atteso ${n.expected}, ricevuto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input non valido: atteso ${m.stringifyPrimitive(n.values[0])}`:`Opzione non valida: atteso uno tra ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Ax(){return{localeError:Cx()}}const jx=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"数値";case"object":{if(Array.isArray(n))return"配列";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return n=>{switch(n.code){case"invalid_type":return`無効な入力: ${n.expected}が期待されましたが、${r(n.input)}が入力されました`;case"invalid_value":return n.values.length===1?`無効な入力: ${m.stringifyPrimitive(n.values[0])}が期待されました`:`無効な選択: ${m.joinValues(n.values,"、")}のいずれかである必要があります`;case"too_big":{const o=n.inclusive?"以下である":"より小さい",a=t(n.origin);return a?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${a.unit??"要素"}${o}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${o}必要があります`}case"too_small":{const o=n.inclusive?"以上である":"より大きい",a=t(n.origin);return a?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${a.unit}${o}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${o}必要があります`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無効な文字列: "${o.prefix}"で始まる必要があります`:o.format==="ends_with"?`無効な文字列: "${o.suffix}"で終わる必要があります`:o.format==="includes"?`無効な文字列: "${o.includes}"を含む必要があります`:o.format==="regex"?`無効な文字列: パターン${o.pattern}に一致する必要があります`:`無効な${i[o.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${m.joinValues(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function Px(){return{localeError:jx()}}const Ox=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},Rx=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(i){return e[i]??null}const r={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return i=>{switch(i.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${i.expected}, მიღებული ${Ox(i.input)}`;case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${m.stringifyPrimitive(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${m.joinValues(i.values,"|")}-დან`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${o.verb} ${n}${i.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${o.verb} ${n}${i.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${n.prefix}"-ით`:n.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${n.suffix}"-ით`:n.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${n.includes}"-ს`:n.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${n.pattern}`:`არასწორი ${r[n.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${m.joinValues(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Dx(){return{localeError:Rx()}}const Ux=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(n))return"អារេ (Array)";if(n===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return n=>{switch(n.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${n.expected} ប៉ុន្តែទទួលបាន ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${m.stringifyPrimitive(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()} ${a.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${o.prefix}"`:o.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${o.suffix}"`:o.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${o.includes}"`:o.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${o.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[o.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Bg(){return{localeError:Ux()}}function zx(){return Bg()}const Lx=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return n=>{switch(n.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${n.expected}, 받은 타입은 ${r(n.input)}입니다`;case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${m.stringifyPrimitive(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${m.joinValues(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const o=n.inclusive?"이하":"미만",a=o==="미만"?"이어야 합니다":"여야 합니다",s=t(n.origin),c=s?.unit??"요소";return s?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${c} ${o}${a}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${o}${a}`}case"too_small":{const o=n.inclusive?"이상":"초과",a=o==="이상"?"이어야 합니다":"여야 합니다",s=t(n.origin),c=s?.unit??"요소";return s?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${c} ${o}${a}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`잘못된 문자열: "${o.prefix}"(으)로 시작해야 합니다`:o.format==="ends_with"?`잘못된 문자열: "${o.suffix}"(으)로 끝나야 합니다`:o.format==="includes"?`잘못된 문자열: "${o.includes}"을(를) 포함해야 합니다`:o.format==="regex"?`잘못된 문자열: 정규식 ${o.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[o.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function Fx(){return{localeError:Lx()}}const Zx=e=>Si(typeof e,e),Si=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},mi=e=>e.charAt(0).toUpperCase()+e.slice(1);function Td(e){const t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}const Bx=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(i,n,o,a){const s=e[i]??null;return s===null?s:{unit:s.unit[n],verb:s.verb[a][o?"inclusive":"notInclusive"]}}const r={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return i=>{switch(i.code){case"invalid_type":return`Gautas tipas ${Zx(i.input)}, o tikėtasi - ${Si(i.expected)}`;case"invalid_value":return i.values.length===1?`Privalo būti ${m.stringifyPrimitive(i.values[0])}`:`Privalo būti vienas iš ${m.joinValues(i.values,"|")} pasirinkimų`;case"too_big":{const n=Si(i.origin),o=t(i.origin,Td(Number(i.maximum)),i.inclusive??!1,"smaller");if(o?.verb)return`${mi(n??i.origin??"reikšmė")} ${o.verb} ${i.maximum.toString()} ${o.unit??"elementų"}`;const a=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${mi(n??i.origin??"reikšmė")} turi būti ${a} ${i.maximum.toString()} ${o?.unit}`}case"too_small":{const n=Si(i.origin),o=t(i.origin,Td(Number(i.minimum)),i.inclusive??!1,"bigger");if(o?.verb)return`${mi(n??i.origin??"reikšmė")} ${o.verb} ${i.minimum.toString()} ${o.unit??"elementų"}`;const a=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${mi(n??i.origin??"reikšmė")} turi būti ${a} ${i.minimum.toString()} ${o?.unit}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Eilutė privalo prasidėti "${n.prefix}"`:n.format==="ends_with"?`Eilutė privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilutė privalo įtraukti "${n.includes}"`:n.format==="regex"?`Eilutė privalo atitikti ${n.pattern}`:`Neteisingas ${r[n.format]??i.format}`}case"not_multiple_of":return`Skaičius privalo būti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${m.joinValues(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const n=Si(i.origin);return`${mi(n??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Vx(){return{localeError:Bx()}}const Wx=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"број";case"object":{if(Array.isArray(n))return"низа";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return n=>{switch(n.code){case"invalid_type":return`Грешен внес: се очекува ${n.expected}, примено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Invalid input: expected ${m.stringifyPrimitive(n.values[0])}`:`Грешана опција: се очекува една ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${o}${n.maximum.toString()} ${a.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Премногу мал: се очекува ${n.origin} да има ${o}${n.minimum.toString()} ${a.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неважечка низа: мора да започнува со "${o.prefix}"`:o.format==="ends_with"?`Неважечка низа: мора да завршува со "${o.suffix}"`:o.format==="includes"?`Неважечка низа: мора да вклучува "${o.includes}"`:o.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${o.pattern}`:`Invalid ${i[o.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function qx(){return{localeError:Wx()}}const Gx=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nombor";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Input tidak sah: dijangka ${n.expected}, diterima ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${m.stringifyPrimitive(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${i[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Yx(){return{localeError:Gx()}}const Hx=()=>{const e={string:{unit:"tekens",verb:"te hebben"},file:{unit:"bytes",verb:"te hebben"},array:{unit:"elementen",verb:"te hebben"},set:{unit:"elementen",verb:"te hebben"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"getal";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return n=>{switch(n.code){case"invalid_type":return`Ongeldige invoer: verwacht ${n.expected}, ontving ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${m.stringifyPrimitive(n.values[0])}`:`Ongeldige optie: verwacht één van ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Te groot: verwacht dat ${n.origin??"waarde"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elementen"}`:`Te groot: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Te klein: verwacht dat ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Te klein: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${i[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Xx(){return{localeError:Hx()}}const Jx=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"tall";case"object":{if(Array.isArray(n))return"liste";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`Ugyldig input: forventet ${n.expected}, fikk ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${m.stringifyPrimitive(n.values[0])}`:`Ugyldig valg: forventet en av ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til å ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ugyldig streng: må starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: må ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: må inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: må matche mønsteret ${o.pattern}`:`Ugyldig ${i[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Kx(){return{localeError:Jx()}}const Qx=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"numara";case"object":{if(Array.isArray(n))return"saf";if(n===null)return"gayb";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return n=>{switch(n.code){case"invalid_type":return`Fâsit giren: umulan ${n.expected}, alınan ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${m.stringifyPrimitive(n.values[0])}`:`Fâsit tercih: mûteberler ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmalıydı.`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${o}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Fâsit metin: "${o.prefix}" ile başlamalı.`:o.format==="ends_with"?`Fâsit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`Fâsit metin: "${o.includes}" ihtivâ etmeli.`:o.format==="regex"?`Fâsit metin: ${o.pattern} nakşına uymalı.`:`Fâsit ${i[o.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ew(){return{localeError:Qx()}}const tw=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"عدد";case"object":{if(Array.isArray(n))return"ارې";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return n=>{switch(n.code){case"invalid_type":return`ناسم ورودي: باید ${n.expected} وای, مګر ${r(n.input)} ترلاسه شو`;case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${m.stringifyPrimitive(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${m.joinValues(n.values,"|")} څخه وای`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} ${a.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${o}${n.maximum.toString()} وي`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} ${a.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${o}${n.minimum.toString()} وي`}case"invalid_format":{const o=n;return o.format==="starts_with"?`ناسم متن: باید د "${o.prefix}" سره پیل شي`:o.format==="ends_with"?`ناسم متن: باید د "${o.suffix}" سره پای ته ورسيږي`:o.format==="includes"?`ناسم متن: باید "${o.includes}" ولري`:o.format==="regex"?`ناسم متن: باید د ${o.pattern} سره مطابقت ولري`:`${i[o.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function nw(){return{localeError:tw()}}const rw=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"liczba";case"object":{if(Array.isArray(n))return"tablica";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return n=>{switch(n.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${n.expected}, otrzymano ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${m.stringifyPrimitive(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.maximum.toString()} ${a.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${o}${n.minimum.toString()} ${a.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${o.prefix}"`:o.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${o.suffix}"`:o.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${o.includes}"`:o.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${o.pattern}`:`Nieprawidłow(y/a/e) ${i[o.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function iw(){return{localeError:rw()}}const ow=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"número";case"object":{if(Array.isArray(n))return"array";if(n===null)return"nulo";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return n=>{switch(n.code){case"invalid_type":return`Tipo inválido: esperado ${n.expected}, recebido ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${m.stringifyPrimitive(n.values[0])}`:`Opção inválida: esperada uma das ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${o}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Texto inválido: deve começar com "${o.prefix}"`:o.format==="ends_with"?`Texto inválido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inválido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inválido: deve corresponder ao padrão ${o.pattern}`:`${i[o.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function aw(){return{localeError:ow()}}function Cd(e,t,r,i){const n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}const sw=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"массив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return n=>{switch(n.code){case"invalid_type":return`Неверный ввод: ожидалось ${n.expected}, получено ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${m.stringifyPrimitive(n.values[0])}`:`Неверный вариант: ожидалось одно из ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=Cd(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${o}${n.maximum.toString()} ${c}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=Cd(s,a.unit.one,a.unit.few,a.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${o}${n.minimum.toString()} ${c}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неверная строка: должна начинаться с "${o.prefix}"`:o.format==="ends_with"?`Неверная строка: должна заканчиваться на "${o.suffix}"`:o.format==="includes"?`Неверная строка: должна содержать "${o.includes}"`:o.format==="regex"?`Неверная строка: должна соответствовать шаблону ${o.pattern}`:`Неверный ${i[o.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function lw(){return{localeError:sw()}}const cw=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"število";case"object":{if(Array.isArray(n))return"tabela";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return n=>{switch(n.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${n.expected}, prejeto ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${m.stringifyPrimitive(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pričakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Neveljaven niz: mora se začeti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se končati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${i[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function uw(){return{localeError:cw()}}const fw=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"antal";case"object":{if(Array.isArray(n))return"lista";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return n=>{switch(n.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${n.expected}, fick ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${m.stringifyPrimitive(n.values[0])}`:`Ogiltigt val: förväntade en av ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ogiltig sträng: måste börja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig sträng: måste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig sträng: måste innehålla "${o.includes}"`:o.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${o.pattern}"`:`Ogiltig(t) ${i[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function dw(){return{localeError:fw()}}const hw=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(n))return"அணி";if(n===null)return"வெறுமை";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return n=>{switch(n.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${n.expected}, பெறப்பட்டது ${r(n.input)}`;case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${m.stringifyPrimitive(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${m.joinValues(n.values,"|")} இல் ஒன்று`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ${a.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${o}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${o}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const o=n;return o.format==="starts_with"?`தவறான சரம்: "${o.prefix}" இல் தொடங்க வேண்டும்`:o.format==="ends_with"?`தவறான சரம்: "${o.suffix}" இல் முடிவடைய வேண்டும்`:o.format==="includes"?`தவறான சரம்: "${o.includes}" ஐ உள்ளடக்க வேண்டும்`:o.format==="regex"?`தவறான சரம்: ${o.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[o.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function mw(){return{localeError:hw()}}const gw=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(n))return"อาร์เรย์ (Array)";if(n===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return n=>{switch(n.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${n.expected} แต่ได้รับ ${r(n.input)}`;case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${m.stringifyPrimitive(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"ไม่เกิน":"น้อยกว่า",a=t(n.origin);return a?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()} ${a.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${o} ${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?"อย่างน้อย":"มากกว่า",a=t(n.origin);return a?`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()} ${a.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${o} ${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${o.prefix}"`:o.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${o.suffix}"`:o.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${o.includes}" อยู่ในข้อความ`:o.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${o.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[o.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function pw(){return{localeError:gw()}}const vw=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},bw=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(i){return e[i]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${vw(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${m.stringifyPrimitive(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${m.joinValues(i.values,"|")}`;case"too_big":{const n=i.inclusive?"<=":"<",o=t(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${n}${i.maximum.toString()}`}case"too_small":{const n=i.inclusive?">=":">",o=t(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${n}${i.minimum.toString()}`}case"invalid_format":{const n=i;return n.format==="starts_with"?`Geçersiz metin: "${n.prefix}" ile başlamalı`:n.format==="ends_with"?`Geçersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Geçersiz metin: "${n.includes}" içermeli`:n.format==="regex"?`Geçersiz metin: ${n.pattern} desenine uymalı`:`Geçersiz ${r[n.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${m.joinValues(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function yw(){return{localeError:bw()}}const _w=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"число";case"object":{if(Array.isArray(n))return"масив";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return n=>{switch(n.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${n.expected}, отримано ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${m.stringifyPrimitive(n.values[0])}`:`Неправильна опція: очікується одне з ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Занадто велике: очікується, що ${n.origin??"значення"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Занадто мале: очікується, що ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Неправильний рядок: повинен починатися з "${o.prefix}"`:o.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${o.suffix}"`:o.format==="includes"?`Неправильний рядок: повинен містити "${o.includes}"`:o.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${o.pattern}`:`Неправильний ${i[o.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function Vg(){return{localeError:_w()}}function xw(){return Vg()}const ww=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"نمبر";case"object":{if(Array.isArray(n))return"آرے";if(n===null)return"نل";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return n=>{switch(n.code){case"invalid_type":return`غلط ان پٹ: ${n.expected} متوقع تھا، ${r(n.input)} موصول ہوا`;case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${m.stringifyPrimitive(n.values[0])} متوقع تھا`:`غلط آپشن: ${m.joinValues(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`بہت بڑا: ${n.origin??"ویلیو"} کے ${o}${n.maximum.toString()} ${a.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${o}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`بہت چھوٹا: ${n.origin} کے ${o}${n.minimum.toString()} ${a.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${o}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const o=n;return o.format==="starts_with"?`غلط سٹرنگ: "${o.prefix}" سے شروع ہونا چاہیے`:o.format==="ends_with"?`غلط سٹرنگ: "${o.suffix}" پر ختم ہونا چاہیے`:o.format==="includes"?`غلط سٹرنگ: "${o.includes}" شامل ہونا چاہیے`:o.format==="regex"?`غلط سٹرنگ: پیٹرن ${o.pattern} سے میچ ہونا چاہیے`:`غلط ${i[o.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${m.joinValues(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function $w(){return{localeError:ww()}}const Sw=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"số";case"object":{if(Array.isArray(n))return"mảng";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return n=>{switch(n.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${n.expected}, nhận được ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${m.stringifyPrimitive(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Quá nhỏ: mong đợi ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${o.prefix}"`:o.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${o.suffix}"`:o.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${o.includes}"`:o.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${o.pattern}`:`${i[o.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function kw(){return{localeError:Sw()}}const Iw=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(n))return"数组";if(n===null)return"空值(null)";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return n=>{switch(n.code){case"invalid_type":return`无效输入:期望 ${n.expected},实际接收 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`无效输入:期望 ${m.stringifyPrimitive(n.values[0])}`:`无效选项:期望以下之一 ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()} ${a.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`数值过小:期望 ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`无效字符串:必须以 "${o.prefix}" 开头`:o.format==="ends_with"?`无效字符串:必须以 "${o.suffix}" 结尾`:o.format==="includes"?`无效字符串:必须包含 "${o.includes}"`:o.format==="regex"?`无效字符串:必须满足正则表达式 ${o.pattern}`:`无效${i[o.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function Nw(){return{localeError:Iw()}}const Ew=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"number";case"object":{if(Array.isArray(n))return"array";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return n=>{switch(n.code){case"invalid_type":return`無效的輸入值:預期為 ${n.expected},但收到 ${r(n.input)}`;case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${m.stringifyPrimitive(n.values[0])}`:`無效的選項:預期為以下其中之一 ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()} ${a.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${o}${n.maximum.toString()}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()} ${a.unit}`:`數值過小:預期 ${n.origin} 應為 ${o}${n.minimum.toString()}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`無效的字串:必須以 "${o.prefix}" 開頭`:o.format==="ends_with"?`無效的字串:必須以 "${o.suffix}" 結尾`:o.format==="includes"?`無效的字串:必須包含 "${o.includes}"`:o.format==="regex"?`無效的字串:必須符合格式 ${o.pattern}`:`無效的 ${i[o.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${m.joinValues(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Mw(){return{localeError:Ew()}}const Tw=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(n){return e[n]??null}const r=n=>{const o=typeof n;switch(o){case"number":return Number.isNaN(n)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(n))return"akopọ";if(n===null)return"null";if(Object.getPrototypeOf(n)!==Object.prototype&&n.constructor)return n.constructor.name}}return o},i={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return n=>{switch(n.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${n.expected}, àmọ̀ a rí ${r(n.input)}`;case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${m.stringifyPrimitive(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${m.joinValues(n.values,"|")}`;case"too_big":{const o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${o}${n.maximum}`}case"too_small":{const o=n.inclusive?">=":">",a=t(n.origin);return a?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`Kéré ju: a ní láti jẹ́ ${o}${n.minimum}`}case"invalid_format":{const o=n;return o.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${o.prefix}"`:o.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${o.suffix}"`:o.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${o.includes}"`:o.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${o.pattern}`:`Aṣìṣe: ${i[o.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${m.joinValues(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function Cw(){return{localeError:Tw()}}const Wg=Object.freeze(Object.defineProperty({__proto__:null,ar:W_,az:G_,be:H_,bg:K_,ca:ex,cs:nx,da:ix,de:ax,en:Zg,eo:fx,es:hx,fa:gx,fi:vx,fr:yx,frCA:xx,he:$x,hu:kx,id:Nx,is:Tx,it:Ax,ja:Px,ka:Dx,kh:zx,km:Bg,ko:Fx,lt:Vx,mk:qx,ms:Yx,nl:Xx,no:Kx,ota:ew,pl:iw,ps:nw,pt:aw,ru:lw,sl:uw,sv:dw,ta:mw,th:pw,tr:yw,ua:xw,uk:Vg,ur:$w,vi:kw,yo:Cw,zhCN:Nw,zhTW:Mw},Symbol.toStringTag,{value:"Module"})),Aw=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),jw=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:m.$ZodAny,$ZodArray:m.$ZodArray,$ZodAsyncError:m.$ZodAsyncError,$ZodBase64:m.$ZodBase64,$ZodBase64URL:m.$ZodBase64URL,$ZodBigInt:m.$ZodBigInt,$ZodBigIntFormat:m.$ZodBigIntFormat,$ZodBoolean:m.$ZodBoolean,$ZodCIDRv4:m.$ZodCIDRv4,$ZodCIDRv6:m.$ZodCIDRv6,$ZodCUID:m.$ZodCUID,$ZodCUID2:m.$ZodCUID2,$ZodCatch:m.$ZodCatch,$ZodCheck:m.$ZodCheck,$ZodCheckBigIntFormat:m.$ZodCheckBigIntFormat,$ZodCheckEndsWith:m.$ZodCheckEndsWith,$ZodCheckGreaterThan:m.$ZodCheckGreaterThan,$ZodCheckIncludes:m.$ZodCheckIncludes,$ZodCheckLengthEquals:m.$ZodCheckLengthEquals,$ZodCheckLessThan:m.$ZodCheckLessThan,$ZodCheckLowerCase:m.$ZodCheckLowerCase,$ZodCheckMaxLength:m.$ZodCheckMaxLength,$ZodCheckMaxSize:m.$ZodCheckMaxSize,$ZodCheckMimeType:m.$ZodCheckMimeType,$ZodCheckMinLength:m.$ZodCheckMinLength,$ZodCheckMinSize:m.$ZodCheckMinSize,$ZodCheckMultipleOf:m.$ZodCheckMultipleOf,$ZodCheckNumberFormat:m.$ZodCheckNumberFormat,$ZodCheckOverwrite:m.$ZodCheckOverwrite,$ZodCheckProperty:m.$ZodCheckProperty,$ZodCheckRegex:m.$ZodCheckRegex,$ZodCheckSizeEquals:m.$ZodCheckSizeEquals,$ZodCheckStartsWith:m.$ZodCheckStartsWith,$ZodCheckStringFormat:m.$ZodCheckStringFormat,$ZodCheckUpperCase:m.$ZodCheckUpperCase,$ZodCodec:m.$ZodCodec,$ZodCustom:m.$ZodCustom,$ZodCustomStringFormat:m.$ZodCustomStringFormat,$ZodDate:m.$ZodDate,$ZodDefault:m.$ZodDefault,$ZodDiscriminatedUnion:m.$ZodDiscriminatedUnion,$ZodE164:m.$ZodE164,$ZodEmail:m.$ZodEmail,$ZodEmoji:m.$ZodEmoji,$ZodEncodeError:m.$ZodEncodeError,$ZodEnum:m.$ZodEnum,$ZodError:m.$ZodError,$ZodFile:m.$ZodFile,$ZodFunction:m.$ZodFunction,$ZodGUID:m.$ZodGUID,$ZodIPv4:m.$ZodIPv4,$ZodIPv6:m.$ZodIPv6,$ZodISODate:m.$ZodISODate,$ZodISODateTime:m.$ZodISODateTime,$ZodISODuration:m.$ZodISODuration,$ZodISOTime:m.$ZodISOTime,$ZodIntersection:m.$ZodIntersection,$ZodJWT:m.$ZodJWT,$ZodKSUID:m.$ZodKSUID,$ZodLazy:m.$ZodLazy,$ZodLiteral:m.$ZodLiteral,$ZodMAC:m.$ZodMAC,$ZodMap:m.$ZodMap,$ZodNaN:m.$ZodNaN,$ZodNanoID:m.$ZodNanoID,$ZodNever:m.$ZodNever,$ZodNonOptional:m.$ZodNonOptional,$ZodNull:m.$ZodNull,$ZodNullable:m.$ZodNullable,$ZodNumber:m.$ZodNumber,$ZodNumberFormat:m.$ZodNumberFormat,$ZodObject:m.$ZodObject,$ZodObjectJIT:m.$ZodObjectJIT,$ZodOptional:m.$ZodOptional,$ZodPipe:m.$ZodPipe,$ZodPrefault:m.$ZodPrefault,$ZodPromise:m.$ZodPromise,$ZodReadonly:m.$ZodReadonly,$ZodRealError:m.$ZodRealError,$ZodRecord:m.$ZodRecord,$ZodRegistry:m.$ZodRegistry,$ZodSet:m.$ZodSet,$ZodString:m.$ZodString,$ZodStringFormat:m.$ZodStringFormat,$ZodSuccess:m.$ZodSuccess,$ZodSymbol:m.$ZodSymbol,$ZodTemplateLiteral:m.$ZodTemplateLiteral,$ZodTransform:m.$ZodTransform,$ZodTuple:m.$ZodTuple,$ZodType:m.$ZodType,$ZodULID:m.$ZodULID,$ZodURL:m.$ZodURL,$ZodUUID:m.$ZodUUID,$ZodUndefined:m.$ZodUndefined,$ZodUnion:m.$ZodUnion,$ZodUnknown:m.$ZodUnknown,$ZodVoid:m.$ZodVoid,$ZodXID:m.$ZodXID,$brand:m.$brand,$constructor:m.$constructor,$input:m.$input,$output:m.$output,Doc:m.Doc,JSONSchema:Aw,JSONSchemaGenerator:m.JSONSchemaGenerator,NEVER:m.NEVER,TimePrecision:m.TimePrecision,_any:m._any,_array:m._array,_base64:m._base64,_base64url:m._base64url,_bigint:m._bigint,_boolean:m._boolean,_catch:m._catch,_check:m._check,_cidrv4:m._cidrv4,_cidrv6:m._cidrv6,_coercedBigint:m._coercedBigint,_coercedBoolean:m._coercedBoolean,_coercedDate:m._coercedDate,_coercedNumber:m._coercedNumber,_coercedString:m._coercedString,_cuid:m._cuid,_cuid2:m._cuid2,_custom:m._custom,_date:m._date,_decode:m._decode,_decodeAsync:m._decodeAsync,_default:m._default,_discriminatedUnion:m._discriminatedUnion,_e164:m._e164,_email:m._email,_emoji:m._emoji,_encode:m._encode,_encodeAsync:m._encodeAsync,_endsWith:m._endsWith,_enum:m._enum,_file:m._file,_float32:m._float32,_float64:m._float64,_gt:m._gt,_gte:m._gte,_guid:m._guid,_includes:m._includes,_int:m._int,_int32:m._int32,_int64:m._int64,_intersection:m._intersection,_ipv4:m._ipv4,_ipv6:m._ipv6,_isoDate:m._isoDate,_isoDateTime:m._isoDateTime,_isoDuration:m._isoDuration,_isoTime:m._isoTime,_jwt:m._jwt,_ksuid:m._ksuid,_lazy:m._lazy,_length:m._length,_literal:m._literal,_lowercase:m._lowercase,_lt:m._lt,_lte:m._lte,_mac:m._mac,_map:m._map,_max:m._lte,_maxLength:m._maxLength,_maxSize:m._maxSize,_mime:m._mime,_min:m._gte,_minLength:m._minLength,_minSize:m._minSize,_multipleOf:m._multipleOf,_nan:m._nan,_nanoid:m._nanoid,_nativeEnum:m._nativeEnum,_negative:m._negative,_never:m._never,_nonnegative:m._nonnegative,_nonoptional:m._nonoptional,_nonpositive:m._nonpositive,_normalize:m._normalize,_null:m._null,_nullable:m._nullable,_number:m._number,_optional:m._optional,_overwrite:m._overwrite,_parse:m._parse,_parseAsync:m._parseAsync,_pipe:m._pipe,_positive:m._positive,_promise:m._promise,_property:m._property,_readonly:m._readonly,_record:m._record,_refine:m._refine,_regex:m._regex,_safeDecode:m._safeDecode,_safeDecodeAsync:m._safeDecodeAsync,_safeEncode:m._safeEncode,_safeEncodeAsync:m._safeEncodeAsync,_safeParse:m._safeParse,_safeParseAsync:m._safeParseAsync,_set:m._set,_size:m._size,_slugify:m._slugify,_startsWith:m._startsWith,_string:m._string,_stringFormat:m._stringFormat,_stringbool:m._stringbool,_success:m._success,_superRefine:m._superRefine,_symbol:m._symbol,_templateLiteral:m._templateLiteral,_toLowerCase:m._toLowerCase,_toUpperCase:m._toUpperCase,_transform:m._transform,_trim:m._trim,_tuple:m._tuple,_uint32:m._uint32,_uint64:m._uint64,_ulid:m._ulid,_undefined:m._undefined,_union:m._union,_unknown:m._unknown,_uppercase:m._uppercase,_url:m._url,_uuid:m._uuid,_uuidv4:m._uuidv4,_uuidv6:m._uuidv6,_uuidv7:m._uuidv7,_void:m._void,_xid:m._xid,clone:m.clone,config:m.config,decode:m.decode,decodeAsync:m.decodeAsync,describe:m.describe,encode:m.encode,encodeAsync:m.encodeAsync,flattenError:m.flattenError,formatError:m.formatError,globalConfig:m.globalConfig,globalRegistry:m.globalRegistry,isValidBase64:m.isValidBase64,isValidBase64URL:m.isValidBase64URL,isValidJWT:m.isValidJWT,locales:Wg,meta:m.meta,parse:m.parse,parseAsync:m.parseAsync,prettifyError:m.prettifyError,regexes:m.regexes,registry:m.registry,safeDecode:m.safeDecode,safeDecodeAsync:m.safeDecodeAsync,safeEncode:m.safeEncode,safeEncodeAsync:m.safeEncodeAsync,safeParse:m.safeParse,safeParseAsync:m.safeParseAsync,toDotPath:m.toDotPath,toJSONSchema:m.toJSONSchema,treeifyError:m.treeifyError,util:m.util,version:m.version},Symbol.toStringTag,{value:"Module"}));function Pw(e){return m._coercedString(m.ZodString,e)}function Ow(e){return m._coercedNumber(m.ZodNumber,e)}function Rw(e){return m._coercedBoolean(m.ZodBoolean,e)}function Dw(e){return m._coercedBigint(m.ZodBigInt,e)}function Uw(e){return m._coercedDate(m.ZodDate,e)}const zw=Object.freeze(Object.defineProperty({__proto__:null,bigint:Dw,boolean:Rw,date:Uw,number:Ow,string:Pw},Symbol.toStringTag,{value:"Module"}));m.config(Zg());const Ad=Object.freeze(Object.defineProperty({__proto__:null,$brand:m.$brand,$input:m.$input,$output:m.$output,NEVER:m.NEVER,TimePrecision:m.TimePrecision,ZodAny:m.ZodAny,ZodArray:m.ZodArray,ZodBase64:m.ZodBase64,ZodBase64URL:m.ZodBase64URL,ZodBigInt:m.ZodBigInt,ZodBigIntFormat:m.ZodBigIntFormat,ZodBoolean:m.ZodBoolean,ZodCIDRv4:m.ZodCIDRv4,ZodCIDRv6:m.ZodCIDRv6,ZodCUID:m.ZodCUID,ZodCUID2:m.ZodCUID2,ZodCatch:m.ZodCatch,ZodCodec:m.ZodCodec,ZodCustom:m.ZodCustom,ZodCustomStringFormat:m.ZodCustomStringFormat,ZodDate:m.ZodDate,ZodDefault:m.ZodDefault,ZodDiscriminatedUnion:m.ZodDiscriminatedUnion,ZodE164:m.ZodE164,ZodEmail:m.ZodEmail,ZodEmoji:m.ZodEmoji,ZodEnum:m.ZodEnum,ZodError:m.ZodError,ZodFile:m.ZodFile,get ZodFirstPartyTypeKind(){return m.ZodFirstPartyTypeKind},ZodFunction:m.ZodFunction,ZodGUID:m.ZodGUID,ZodIPv4:m.ZodIPv4,ZodIPv6:m.ZodIPv6,ZodISODate:m.ZodISODate,ZodISODateTime:m.ZodISODateTime,ZodISODuration:m.ZodISODuration,ZodISOTime:m.ZodISOTime,ZodIntersection:m.ZodIntersection,ZodIssueCode:m.ZodIssueCode,ZodJWT:m.ZodJWT,ZodKSUID:m.ZodKSUID,ZodLazy:m.ZodLazy,ZodLiteral:m.ZodLiteral,ZodMAC:m.ZodMAC,ZodMap:m.ZodMap,ZodNaN:m.ZodNaN,ZodNanoID:m.ZodNanoID,ZodNever:m.ZodNever,ZodNonOptional:m.ZodNonOptional,ZodNull:m.ZodNull,ZodNullable:m.ZodNullable,ZodNumber:m.ZodNumber,ZodNumberFormat:m.ZodNumberFormat,ZodObject:m.ZodObject,ZodOptional:m.ZodOptional,ZodPipe:m.ZodPipe,ZodPrefault:m.ZodPrefault,ZodPromise:m.ZodPromise,ZodReadonly:m.ZodReadonly,ZodRealError:m.ZodRealError,ZodRecord:m.ZodRecord,ZodSet:m.ZodSet,ZodString:m.ZodString,ZodStringFormat:m.ZodStringFormat,ZodSuccess:m.ZodSuccess,ZodSymbol:m.ZodSymbol,ZodTemplateLiteral:m.ZodTemplateLiteral,ZodTransform:m.ZodTransform,ZodTuple:m.ZodTuple,ZodType:m.ZodType,ZodULID:m.ZodULID,ZodURL:m.ZodURL,ZodUUID:m.ZodUUID,ZodUndefined:m.ZodUndefined,ZodUnion:m.ZodUnion,ZodUnknown:m.ZodUnknown,ZodVoid:m.ZodVoid,ZodXID:m.ZodXID,_ZodString:m._ZodString,_default:m._default$1,_function:m._function,any:m.any,array:m.array,base64:m.base64,base64url:m.base64url,bigint:m.bigint,boolean:m.boolean,catch:m._catch$1,check:m.check,cidrv4:m.cidrv4,cidrv6:m.cidrv6,clone:m.clone,codec:m.codec,coerce:zw,config:m.config,core:jw,cuid:m.cuid,cuid2:m.cuid2,custom:m.custom,date:m.date,decode:m.decode$1,decodeAsync:m.decodeAsync$1,describe:m.describe$1,discriminatedUnion:m.discriminatedUnion,e164:m.e164,email:m.email,emoji:m.emoji,encode:m.encode$1,encodeAsync:m.encodeAsync$1,endsWith:m._endsWith,enum:m._enum$1,file:m.file,flattenError:m.flattenError,float32:m.float32,float64:m.float64,formatError:m.formatError,function:m._function,getErrorMap:m.getErrorMap,globalRegistry:m.globalRegistry,gt:m._gt,gte:m._gte,guid:m.guid,hash:m.hash,hex:m.hex,hostname:m.hostname,httpUrl:m.httpUrl,includes:m._includes,instanceof:m._instanceof,int:m.int,int32:m.int32,int64:m.int64,intersection:m.intersection,ipv4:m.ipv4,ipv6:m.ipv6,iso:m.iso,json:m.json,jwt:m.jwt,keyof:m.keyof,ksuid:m.ksuid,lazy:m.lazy,length:m._length,literal:m.literal,locales:Wg,looseObject:m.looseObject,lowercase:m._lowercase,lt:m._lt,lte:m._lte,mac:m.mac,map:m.map,maxLength:m._maxLength,maxSize:m._maxSize,meta:m.meta$1,mime:m._mime,minLength:m._minLength,minSize:m._minSize,multipleOf:m._multipleOf,nan:m.nan,nanoid:m.nanoid,nativeEnum:m.nativeEnum,negative:m._negative,never:m.never,nonnegative:m._nonnegative,nonoptional:m.nonoptional,nonpositive:m._nonpositive,normalize:m._normalize,null:m._null$1,nullable:m.nullable,nullish:m.nullish,number:m.number,object:m.object,optional:m.optional,overwrite:m._overwrite,parse:m.parse$1,parseAsync:m.parseAsync$1,partialRecord:m.partialRecord,pipe:m.pipe,positive:m._positive,prefault:m.prefault,preprocess:m.preprocess,prettifyError:m.prettifyError,promise:m.promise,property:m._property,readonly:m.readonly,record:m.record,refine:m.refine,regex:m._regex,regexes:m.regexes,registry:m.registry,safeDecode:m.safeDecode$1,safeDecodeAsync:m.safeDecodeAsync$1,safeEncode:m.safeEncode$1,safeEncodeAsync:m.safeEncodeAsync$1,safeParse:m.safeParse$1,safeParseAsync:m.safeParseAsync$1,set:m.set,setErrorMap:m.setErrorMap,size:m._size,slugify:m._slugify,startsWith:m._startsWith,strictObject:m.strictObject,string:m.string,stringFormat:m.stringFormat,stringbool:m.stringbool,success:m.success,superRefine:m.superRefine,symbol:m.symbol,templateLiteral:m.templateLiteral,toJSONSchema:m.toJSONSchema,toLowerCase:m._toLowerCase,toUpperCase:m._toUpperCase,transform:m.transform,treeifyError:m.treeifyError,trim:m._trim,tuple:m.tuple,uint32:m.uint32,uint64:m.uint64,ulid:m.ulid,undefined:m._undefined$1,union:m.union,unknown:m.unknown,uppercase:m._uppercase,url:m.url,util:m.util,uuid:m.uuid,uuidv4:m.uuidv4,uuidv6:m.uuidv6,uuidv7:m.uuidv7,void:m._void$1,xid:m.xid},Symbol.toStringTag,{value:"Module"}));function Lw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fw=Object.defineProperty,Zw=(e,t)=>{for(var r in t)Fw(e,r,{get:t[r],enumerable:!0})},qg="AI_NoObjectGeneratedError",Gg=`vercel.ai.error.${qg}`,Bw=Symbol.for(Gg),Yg,jd=class extends m.AISDKError{constructor({message:e="No object generated.",cause:t,text:r,response:i,usage:n,finishReason:o}){super({name:qg,message:e,cause:t}),this[Yg]=!0,this.text=r,this.response=i,this.usage=n,this.finishReason=o}static isInstance(e){return m.AISDKError.hasMarker(e,Gg)}};Yg=Bw;var Pd="5.0.108",Hg=m.union([m.string(),m._instanceof(Uint8Array),m._instanceof(ArrayBuffer),m.custom(e=>{var t,r;return(r=(t=globalThis.Buffer)==null?void 0:t.isBuffer(e))!=null?r:!1},{message:"Must be a Buffer"})]),Gi=m.lazy(()=>m.union([m._null$1(),m.string(),m.number(),m.boolean(),m.record(m.string(),Gi),m.array(Gi)])),Ie=m.record(m.string(),m.record(m.string(),Gi)),Xg=m.object({type:m.literal("text"),text:m.string(),providerOptions:Ie.optional()}),Vw=m.object({type:m.literal("image"),image:m.union([Hg,m._instanceof(URL)]),mediaType:m.string().optional(),providerOptions:Ie.optional()}),Jg=m.object({type:m.literal("file"),data:m.union([Hg,m._instanceof(URL)]),filename:m.string().optional(),mediaType:m.string(),providerOptions:Ie.optional()}),Ww=m.object({type:m.literal("reasoning"),text:m.string(),providerOptions:Ie.optional()}),qw=m.object({type:m.literal("tool-call"),toolCallId:m.string(),toolName:m.string(),input:m.unknown(),providerOptions:Ie.optional(),providerExecuted:m.boolean().optional()}),Gw=m.discriminatedUnion("type",[m.object({type:m.literal("text"),value:m.string()}),m.object({type:m.literal("json"),value:Gi}),m.object({type:m.literal("error-text"),value:m.string()}),m.object({type:m.literal("error-json"),value:Gi}),m.object({type:m.literal("content"),value:m.array(m.union([m.object({type:m.literal("text"),text:m.string()}),m.object({type:m.literal("media"),data:m.string(),mediaType:m.string()})]))})]),Kg=m.object({type:m.literal("tool-result"),toolCallId:m.string(),toolName:m.string(),output:Gw,providerOptions:Ie.optional()}),Yw=m.object({role:m.literal("system"),content:m.string(),providerOptions:Ie.optional()}),Hw=m.object({role:m.literal("user"),content:m.union([m.string(),m.array(m.union([Xg,Vw,Jg]))]),providerOptions:Ie.optional()}),Xw=m.object({role:m.literal("assistant"),content:m.union([m.string(),m.array(m.union([Xg,Jg,Ww,qw,Kg]))]),providerOptions:Ie.optional()}),Jw=m.object({role:m.literal("tool"),content:m.array(Kg),providerOptions:Ie.optional()});m.union([Yw,Hw,Xw,Jw]);m.createIdGenerator({prefix:"aitxt",size:24});(class extends TransformStream{constructor(){super({transform(e,t){t.enqueue(`data: ${JSON.stringify(e)}
|
|
2
2
|
|
|
3
|
-
`)},flush(
|
|
3
|
+
`)},flush(e){e.enqueue(`data: [DONE]
|
|
4
4
|
|
|
5
|
-
`)}})}});var Ll=a.lazyValidator(()=>a.zodSchema(a.union([a.strictObject({type:a.literal("text-start"),id:a.string(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("text-delta"),id:a.string(),delta:a.string(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("text-end"),id:a.string(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("error"),errorText:a.string()}),a.strictObject({type:a.literal("tool-input-start"),toolCallId:a.string(),toolName:a.string(),providerExecuted:a.boolean().optional(),dynamic:a.boolean().optional()}),a.strictObject({type:a.literal("tool-input-delta"),toolCallId:a.string(),inputTextDelta:a.string()}),a.strictObject({type:a.literal("tool-input-available"),toolCallId:a.string(),toolName:a.string(),input:a.unknown(),providerExecuted:a.boolean().optional(),providerMetadata:B.optional(),dynamic:a.boolean().optional()}),a.strictObject({type:a.literal("tool-input-error"),toolCallId:a.string(),toolName:a.string(),input:a.unknown(),providerExecuted:a.boolean().optional(),providerMetadata:B.optional(),dynamic:a.boolean().optional(),errorText:a.string()}),a.strictObject({type:a.literal("tool-output-available"),toolCallId:a.string(),output:a.unknown(),providerExecuted:a.boolean().optional(),dynamic:a.boolean().optional(),preliminary:a.boolean().optional()}),a.strictObject({type:a.literal("tool-output-error"),toolCallId:a.string(),errorText:a.string(),providerExecuted:a.boolean().optional(),dynamic:a.boolean().optional()}),a.strictObject({type:a.literal("reasoning-start"),id:a.string(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("reasoning-delta"),id:a.string(),delta:a.string(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("reasoning-end"),id:a.string(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("source-url"),sourceId:a.string(),url:a.string(),title:a.string().optional(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("source-document"),sourceId:a.string(),mediaType:a.string(),title:a.string(),filename:a.string().optional(),providerMetadata:B.optional()}),a.strictObject({type:a.literal("file"),url:a.string(),mediaType:a.string(),providerMetadata:B.optional()}),a.strictObject({type:a.custom(t=>typeof t=="string"&&t.startsWith("data-"),{message:'Type must start with "data-"'}),id:a.string().optional(),data:a.unknown(),transient:a.boolean().optional()}),a.strictObject({type:a.literal("start-step")}),a.strictObject({type:a.literal("finish-step")}),a.strictObject({type:a.literal("start"),messageId:a.string().optional(),messageMetadata:a.unknown().optional()}),a.strictObject({type:a.literal("finish"),finishReason:a._enum$1(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:a.unknown().optional()}),a.strictObject({type:a.literal("abort")}),a.strictObject({type:a.literal("message-metadata"),messageMetadata:a.unknown()})])));function Zl(t){return t.type.startsWith("data-")}function fi(t,r){if(t===void 0&&r===void 0)return;if(t===void 0)return r;if(r===void 0)return t;const o={...t};for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)){const e=r[i];if(e===void 0)continue;const n=i in t?t[i]:void 0,s=e!==null&&typeof e=="object"&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof RegExp),l=n!=null&&typeof n=="object"&&!Array.isArray(n)&&!(n instanceof Date)&&!(n instanceof RegExp);s&&l?o[i]=fi(n,e):o[i]=e}return o}function Fl(t){const r=["ROOT"];let o=-1,i=null;function e(u,c,m){switch(u){case'"':{o=c,r.pop(),r.push(m),r.push("INSIDE_STRING");break}case"f":case"t":case"n":{o=c,i=c,r.pop(),r.push(m),r.push("INSIDE_LITERAL");break}case"-":{r.pop(),r.push(m),r.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{o=c,r.pop(),r.push(m),r.push("INSIDE_NUMBER");break}case"{":{o=c,r.pop(),r.push(m),r.push("INSIDE_OBJECT_START");break}case"[":{o=c,r.pop(),r.push(m),r.push("INSIDE_ARRAY_START");break}}}function n(u,c){switch(u){case",":{r.pop(),r.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{o=c,r.pop();break}}}function s(u,c){switch(u){case",":{r.pop(),r.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{o=c,r.pop();break}}}for(let u=0;u<t.length;u++){const c=t[u];switch(r[r.length-1]){case"ROOT":e(c,u,"FINISH");break;case"INSIDE_OBJECT_START":{switch(c){case'"':{r.pop(),r.push("INSIDE_OBJECT_KEY");break}case"}":{o=u,r.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(c){case'"':{r.pop(),r.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(c){case'"':{r.pop(),r.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(c){case":":{r.pop(),r.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{e(c,u,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{n(c,u);break}case"INSIDE_STRING":{switch(c){case'"':{r.pop(),o=u;break}case"\\":{r.push("INSIDE_STRING_ESCAPE");break}default:o=u}break}case"INSIDE_ARRAY_START":{switch(c){case"]":{o=u,r.pop();break}default:{o=u,e(c,u,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(c){case",":{r.pop(),r.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{o=u,r.pop();break}default:{o=u;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{e(c,u,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{r.pop(),o=u;break}case"INSIDE_NUMBER":{switch(c){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{o=u;break}case"e":case"E":case"-":case".":break;case",":{r.pop(),r[r.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(c,u),r[r.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&n(c,u);break}case"}":{r.pop(),r[r.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&n(c,u);break}case"]":{r.pop(),r[r.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(c,u);break}default:{r.pop();break}}break}case"INSIDE_LITERAL":{const f=t.substring(i,u+1);!"false".startsWith(f)&&!"true".startsWith(f)&&!"null".startsWith(f)?(r.pop(),r[r.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?n(c,u):r[r.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&s(c,u)):o=u;break}}}let l=t.slice(0,o+1);for(let u=r.length-1;u>=0;u--)switch(r[u]){case"INSIDE_STRING":{l+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{l+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{l+="]";break}case"INSIDE_LITERAL":{const m=t.substring(i,t.length);"true".startsWith(m)?l+="true".slice(m.length):"false".startsWith(m)?l+="false".slice(m.length):"null".startsWith(m)&&(l+="null".slice(m.length))}}return l}async function gi(t){if(t===void 0)return{value:void 0,state:"undefined-input"};let r=await a.safeParseJSON({text:t});return r.success?{value:r.value,state:"successful-parse"}:(r=await a.safeParseJSON({text:Fl(t)}),r.success?{value:r.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}function lt(t){return t.type.startsWith("tool-")}function Vl(t){return t.type==="dynamic-tool"}function dn(t){return lt(t)||Vl(t)}function mn(t){return t.type.split("-").slice(1).join("-")}function Wl({lastMessage:t,messageId:r}){return{message:t?.role==="assistant"?t:{id:r,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function Bl({stream:t,messageMetadataSchema:r,dataPartSchemas:o,runUpdateMessageJob:i,onError:e,onToolCall:n,onData:s}){return t.pipeThrough(new TransformStream({async transform(l,u){await i(async({state:c,write:m})=>{var f,b,p,h;function v(x){const N=c.message.parts.filter(lt).find(w=>w.toolCallId===x);if(N==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return N}function y(x){const N=c.message.parts.filter(w=>w.type==="dynamic-tool").find(w=>w.toolCallId===x);if(N==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return N}function $(x){var I;const N=c.message.parts.find(T=>lt(T)&&T.toolCallId===x.toolCallId),w=x,S=N;N!=null?(N.state=x.state,S.input=w.input,S.output=w.output,S.errorText=w.errorText,S.rawInput=w.rawInput,S.preliminary=w.preliminary,S.providerExecuted=(I=w.providerExecuted)!=null?I:N.providerExecuted,w.providerMetadata!=null&&N.state==="input-available"&&(N.callProviderMetadata=w.providerMetadata)):c.message.parts.push({type:`tool-${x.toolName}`,toolCallId:x.toolCallId,state:x.state,input:w.input,output:w.output,rawInput:w.rawInput,errorText:w.errorText,providerExecuted:w.providerExecuted,preliminary:w.preliminary,...w.providerMetadata!=null?{callProviderMetadata:w.providerMetadata}:{}})}function _(x){var I,N;const w=c.message.parts.find(R=>R.type==="dynamic-tool"&&R.toolCallId===x.toolCallId),S=x,T=w;w!=null?(w.state=x.state,T.toolName=x.toolName,T.input=S.input,T.output=S.output,T.errorText=S.errorText,T.rawInput=(I=S.rawInput)!=null?I:T.rawInput,T.preliminary=S.preliminary,T.providerExecuted=(N=S.providerExecuted)!=null?N:w.providerExecuted,S.providerMetadata!=null&&w.state==="input-available"&&(w.callProviderMetadata=S.providerMetadata)):c.message.parts.push({type:"dynamic-tool",toolName:x.toolName,toolCallId:x.toolCallId,state:x.state,input:S.input,output:S.output,errorText:S.errorText,preliminary:S.preliminary,providerExecuted:S.providerExecuted,...S.providerMetadata!=null?{callProviderMetadata:S.providerMetadata}:{}})}async function k(x){if(x!=null){const I=c.message.metadata!=null?fi(c.message.metadata,x):x;r!=null&&await a.validateTypes({value:I,schema:r}),c.message.metadata=I}}switch(l.type){case"text-start":{const x={type:"text",text:"",providerMetadata:l.providerMetadata,state:"streaming"};c.activeTextParts[l.id]=x,c.message.parts.push(x),m();break}case"text-delta":{const x=c.activeTextParts[l.id];x.text+=l.delta,x.providerMetadata=(f=l.providerMetadata)!=null?f:x.providerMetadata,m();break}case"text-end":{const x=c.activeTextParts[l.id];x.state="done",x.providerMetadata=(b=l.providerMetadata)!=null?b:x.providerMetadata,delete c.activeTextParts[l.id],m();break}case"reasoning-start":{const x={type:"reasoning",text:"",providerMetadata:l.providerMetadata,state:"streaming"};c.activeReasoningParts[l.id]=x,c.message.parts.push(x),m();break}case"reasoning-delta":{const x=c.activeReasoningParts[l.id];x.text+=l.delta,x.providerMetadata=(p=l.providerMetadata)!=null?p:x.providerMetadata,m();break}case"reasoning-end":{const x=c.activeReasoningParts[l.id];x.providerMetadata=(h=l.providerMetadata)!=null?h:x.providerMetadata,x.state="done",delete c.activeReasoningParts[l.id],m();break}case"file":{c.message.parts.push({type:"file",mediaType:l.mediaType,url:l.url}),m();break}case"source-url":{c.message.parts.push({type:"source-url",sourceId:l.sourceId,url:l.url,title:l.title,providerMetadata:l.providerMetadata}),m();break}case"source-document":{c.message.parts.push({type:"source-document",sourceId:l.sourceId,mediaType:l.mediaType,title:l.title,filename:l.filename,providerMetadata:l.providerMetadata}),m();break}case"tool-input-start":{const x=c.message.parts.filter(lt);c.partialToolCalls[l.toolCallId]={text:"",toolName:l.toolName,index:x.length,dynamic:l.dynamic},l.dynamic?_({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-streaming",input:void 0,providerExecuted:l.providerExecuted}):$({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-streaming",input:void 0,providerExecuted:l.providerExecuted}),m();break}case"tool-input-delta":{const x=c.partialToolCalls[l.toolCallId];x.text+=l.inputTextDelta;const{value:I}=await gi(x.text);x.dynamic?_({toolCallId:l.toolCallId,toolName:x.toolName,state:"input-streaming",input:I}):$({toolCallId:l.toolCallId,toolName:x.toolName,state:"input-streaming",input:I}),m();break}case"tool-input-available":{l.dynamic?_({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-available",input:l.input,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata}):$({toolCallId:l.toolCallId,toolName:l.toolName,state:"input-available",input:l.input,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata}),m(),n&&!l.providerExecuted&&await n({toolCall:l});break}case"tool-input-error":{l.dynamic?_({toolCallId:l.toolCallId,toolName:l.toolName,state:"output-error",input:l.input,errorText:l.errorText,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata}):$({toolCallId:l.toolCallId,toolName:l.toolName,state:"output-error",input:void 0,rawInput:l.input,errorText:l.errorText,providerExecuted:l.providerExecuted,providerMetadata:l.providerMetadata}),m();break}case"tool-output-available":{if(l.dynamic){const x=y(l.toolCallId);_({toolCallId:l.toolCallId,toolName:x.toolName,state:"output-available",input:x.input,output:l.output,preliminary:l.preliminary})}else{const x=v(l.toolCallId);$({toolCallId:l.toolCallId,toolName:mn(x),state:"output-available",input:x.input,output:l.output,providerExecuted:l.providerExecuted,preliminary:l.preliminary})}m();break}case"tool-output-error":{if(l.dynamic){const x=y(l.toolCallId);_({toolCallId:l.toolCallId,toolName:x.toolName,state:"output-error",input:x.input,errorText:l.errorText,providerExecuted:l.providerExecuted})}else{const x=v(l.toolCallId);$({toolCallId:l.toolCallId,toolName:mn(x),state:"output-error",input:x.input,rawInput:x.rawInput,errorText:l.errorText,providerExecuted:l.providerExecuted})}m();break}case"start-step":{c.message.parts.push({type:"step-start"});break}case"finish-step":{c.activeTextParts={},c.activeReasoningParts={};break}case"start":{l.messageId!=null&&(c.message.id=l.messageId),await k(l.messageMetadata),(l.messageId!=null||l.messageMetadata!=null)&&m();break}case"finish":{l.finishReason!=null&&(c.finishReason=l.finishReason),await k(l.messageMetadata),l.messageMetadata!=null&&m();break}case"message-metadata":{await k(l.messageMetadata),l.messageMetadata!=null&&m();break}case"error":{e?.(new Error(l.errorText));break}default:if(Zl(l)){o?.[l.type]!=null&&await a.validateTypes({value:l.data,schema:o[l.type]});const x=l;if(x.transient){s?.(x);break}const I=x.id!=null?c.message.parts.find(N=>x.type===N.type&&x.id===N.id):void 0;I!=null?I.data=x.data:c.message.parts.push(x),s?.(x),m()}}u.enqueue(l)})}}))}async function Gl({stream:t,onError:r}){const o=t.getReader();try{for(;;){const{done:i}=await o.read();if(i)break}}catch(i){r?.(i)}finally{o.releaseLock()}}a.createIdGenerator({prefix:"aitxt",size:24});a.createIdGenerator({prefix:"aiobj",size:24});var Jl=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(t){return new Promise((r,o)=>{this.queue.push(async()=>{try{await t(),r()}catch(i){o(i)}}),this.processQueue()})}};a.createIdGenerator({prefix:"aiobj",size:24});var ql={};Ol(ql,{object:()=>Hl,text:()=>Kl});var Kl=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:t}){return{partial:t}},async parseOutput({text:t}){return t}}),Hl=({schema:t})=>{const r=a.asSchema(t);return{type:"object",responseFormat:{type:"json",schema:r.jsonSchema},async parsePartial({text:o}){const i=await gi(o);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:i.value};default:{const e=i.state;throw new Error(`Unsupported parse state: ${e}`)}}},async parseOutput({text:o},i){const e=await a.safeParseJSON({text:o});if(!e.success)throw new cn({message:"No object generated: could not parse the response.",cause:e.error,text:o,response:i.response,usage:i.usage,finishReason:i.finishReason});const n=await a.safeValidateTypes({value:e.value,schema:r});if(!n.success)throw new cn({message:"No object generated: response did not match schema.",cause:n.error,text:o,response:i.response,usage:i.usage,finishReason:i.finishReason});return n.value}}};async function Xl(t){if(t==null)return[];if(!globalThis.FileList||!(t instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(t).map(async r=>{const{name:o,type:i}=r,e=await new Promise((n,s)=>{const l=new FileReader;l.onload=u=>{var c;n((c=u.target)==null?void 0:c.result)},l.onerror=u=>s(u),l.readAsDataURL(r)});return{type:"file",mediaType:i,filename:o,url:e}}))}var Yl=class{constructor({api:t="/api/chat",credentials:r,headers:o,body:i,fetch:e,prepareSendMessagesRequest:n,prepareReconnectToStreamRequest:s}){this.api=t,this.credentials=r,this.headers=o,this.body=i,this.fetch=e,this.prepareSendMessagesRequest=n,this.prepareReconnectToStreamRequest=s}async sendMessages({abortSignal:t,...r}){var o,i,e,n,s;const l=await a.resolve(this.body),u=await a.resolve(this.headers),c=await a.resolve(this.credentials),m={...a.normalizeHeaders(u),...a.normalizeHeaders(r.headers)},f=await((o=this.prepareSendMessagesRequest)==null?void 0:o.call(this,{api:this.api,id:r.chatId,messages:r.messages,body:{...l,...r.body},headers:m,credentials:c,requestMetadata:r.metadata,trigger:r.trigger,messageId:r.messageId})),b=(i=f?.api)!=null?i:this.api,p=f?.headers!==void 0?a.normalizeHeaders(f.headers):m,h=f?.body!==void 0?f.body:{...l,...r.body,id:r.chatId,messages:r.messages,trigger:r.trigger,messageId:r.messageId},v=(e=f?.credentials)!=null?e:c,$=await((n=this.fetch)!=null?n:globalThis.fetch)(b,{method:"POST",headers:a.withUserAgentSuffix({"Content-Type":"application/json",...p},`ai-sdk/${un}`,a.getRuntimeEnvironmentUserAgent()),body:JSON.stringify(h),credentials:v,signal:t});if(!$.ok)throw new Error((s=await $.text())!=null?s:"Failed to fetch the chat response.");if(!$.body)throw new Error("The response body is empty.");return this.processResponseStream($.body)}async reconnectToStream(t){var r,o,i,e,n;const s=await a.resolve(this.body),l=await a.resolve(this.headers),u=await a.resolve(this.credentials),c={...a.normalizeHeaders(l),...a.normalizeHeaders(t.headers)},m=await((r=this.prepareReconnectToStreamRequest)==null?void 0:r.call(this,{api:this.api,id:t.chatId,body:{...s,...t.body},headers:c,credentials:u,requestMetadata:t.metadata})),f=(o=m?.api)!=null?o:`${this.api}/${t.chatId}/stream`,b=m?.headers!==void 0?a.normalizeHeaders(m.headers):c,p=(i=m?.credentials)!=null?i:u,v=await((e=this.fetch)!=null?e:globalThis.fetch)(f,{method:"GET",headers:a.withUserAgentSuffix(b,`ai-sdk/${un}`,a.getRuntimeEnvironmentUserAgent()),credentials:p});if(v.status===204)return null;if(!v.ok)throw new Error((n=await v.text())!=null?n:"Failed to fetch the chat response.");if(!v.body)throw new Error("The response body is empty.");return this.processResponseStream(v.body)}},pi=class extends Yl{constructor(t={}){super(t)}processResponseStream(t){return a.parseJsonEventStream({stream:t,schema:Ll}).pipeThrough(new TransformStream({async transform(r,o){if(!r.success)throw r.error;o.enqueue(r.value)}}))}},Ql=class{constructor({generateId:t=a.generateId,id:r=t(),transport:o=new pi,messageMetadataSchema:i,dataPartSchemas:e,state:n,onError:s,onToolCall:l,onFinish:u,onData:c,sendAutomaticallyWhen:m}){this.activeResponse=void 0,this.jobExecutor=new Jl,this.sendMessage=async(f,b)=>{var p,h,v,y;if(f==null){await this.makeRequest({trigger:"submit-message",messageId:(p=this.lastMessage)==null?void 0:p.id,...b});return}let $;if("text"in f||"files"in f?$={parts:[...Array.isArray(f.files)?f.files:await Xl(f.files),..."text"in f&&f.text!=null?[{type:"text",text:f.text}]:[]]}:$=f,f.messageId!=null){const _=this.state.messages.findIndex(k=>k.id===f.messageId);if(_===-1)throw new Error(`message with id ${f.messageId} not found`);if(this.state.messages[_].role!=="user")throw new Error(`message with id ${f.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,_+1),this.state.replaceMessage(_,{...$,id:f.messageId,role:(h=$.role)!=null?h:"user",metadata:f.metadata})}else this.state.pushMessage({...$,id:(v=$.id)!=null?v:this.generateId(),role:(y=$.role)!=null?y:"user",metadata:f.metadata});await this.makeRequest({trigger:"submit-message",messageId:f.messageId,...b})},this.regenerate=async({messageId:f,...b}={})=>{const p=f==null?this.state.messages.length-1:this.state.messages.findIndex(h=>h.id===f);if(p===-1)throw new Error(`message ${f} not found`);this.state.messages=this.state.messages.slice(0,this.messages[p].role==="assistant"?p:p+1),await this.makeRequest({trigger:"regenerate-message",messageId:f,...b})},this.resumeStream=async(f={})=>{await this.makeRequest({trigger:"resume-stream",...f})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolOutput=async({state:f="output-available",tool:b,toolCallId:p,output:h,errorText:v})=>this.jobExecutor.run(async()=>{var y,$;const _=this.state.messages,k=_[_.length-1];this.state.replaceMessage(_.length-1,{...k,parts:k.parts.map(x=>dn(x)&&x.toolCallId===p?{...x,state:f,output:h,errorText:v}:x)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(x=>dn(x)&&x.toolCallId===p?{...x,state:f,output:h,errorText:v}:x)),this.status!=="streaming"&&this.status!=="submitted"&&((y=this.sendAutomaticallyWhen)!=null&&y.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:($=this.lastMessage)==null?void 0:$.id})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var f;this.status!=="streaming"&&this.status!=="submitted"||(f=this.activeResponse)!=null&&f.abortController&&this.activeResponse.abortController.abort()},this.id=r,this.transport=o,this.generateId=t,this.messageMetadataSchema=i,this.dataPartSchemas=e,this.state=n,this.onError=s,this.onToolCall=l,this.onFinish=u,this.onData=c,this.sendAutomaticallyWhen=m}get status(){return this.state.status}setStatus({status:t,error:r}){this.status!==t&&(this.state.status=t,this.state.error=r)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(t){this.state.messages=t}async makeRequest({trigger:t,metadata:r,headers:o,body:i,messageId:e}){var n,s,l,u;this.setStatus({status:"submitted",error:void 0});const c=this.lastMessage;let m=!1,f=!1,b=!1;try{const p={state:Wl({lastMessage:this.state.snapshot(c),messageId:this.generateId()}),abortController:new AbortController};p.abortController.signal.addEventListener("abort",()=>{m=!0}),this.activeResponse=p;let h;if(t==="resume-stream"){const y=await this.transport.reconnectToStream({chatId:this.id,metadata:r,headers:o,body:i});if(y==null){this.setStatus({status:"ready"});return}h=y}else h=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:p.abortController.signal,metadata:r,headers:o,body:i,trigger:t,messageId:e});const v=y=>this.jobExecutor.run(()=>y({state:p.state,write:()=>{var $;this.setStatus({status:"streaming"}),p.state.message.id===(($=this.lastMessage)==null?void 0:$.id)?this.state.replaceMessage(this.state.messages.length-1,p.state.message):this.state.pushMessage(p.state.message)}}));await Gl({stream:Bl({stream:h,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:v,onError:y=>{throw y}}),onError:y=>{throw y}}),this.setStatus({status:"ready"})}catch(p){if(m||p.name==="AbortError")return m=!0,this.setStatus({status:"ready"}),null;b=!0,p instanceof TypeError&&(p.message.toLowerCase().includes("fetch")||p.message.toLowerCase().includes("network"))&&(f=!0),this.onError&&p instanceof Error&&this.onError(p),this.setStatus({status:"error",error:p})}finally{try{(s=this.onFinish)==null||s.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:m,isDisconnect:f,isError:b,finishReason:(n=this.activeResponse)==null?void 0:n.state.finishReason})}catch(p){console.error(p)}this.activeResponse=void 0}(l=this.sendAutomaticallyWhen)!=null&&l.call(this,{messages:this.state.messages})&&!b&&await this.makeRequest({trigger:"submit-message",messageId:(u=this.lastMessage)==null?void 0:u.id,metadata:r,headers:o,body:i})}},ec=t=>new Promise((r,o)=>{const i=new FileReader;i.onload=()=>r(i.result),i.onerror=e=>o(e),i.readAsDataURL(t)}),tc={accept:"image/*, text/plain, text/html, text/markdown, text/csv, text/xml, text/json, text/css",async add({file:t}){return{id:a.generateId(),type:t.type.startsWith("image/")?"image":"file",name:t.name,file:t,contentType:t.type,content:[],status:{type:"requires-action",reason:"composer-send"}}},async send(t){return{...t,status:{type:"complete"},content:[{type:"file",mimeType:t.contentType,filename:t.name,data:await ec(t.file)}]}},async remove(){}},fn=t=>E.getExternalStoreMessages(t);function rc(t){return t.replace(/[}\]"]+$/,"")}var rr=(t,r)=>!t.parts||t.parts.length===0?[]:t.parts.filter(o=>o.type!=="step-start"&&o.type!=="file").map(o=>{const i=o.type;if(i==="text")return{type:"text",text:o.text};if(i==="reasoning")return{type:"reasoning",text:o.text};if(lt(o)){const e=i.replace("tool-",""),n=o.toolCallId;let s={},l,u=!1;o.state==="input-streaming"||o.state==="input-available"?s=o.input||{}:o.state==="output-available"?(s=o.input||{},l=o.output):o.state==="output-error"&&(s=o.input||{},u=!0,l={error:o.errorText});let c=JSON.stringify(s);o.state==="input-streaming"&&(c=rc(c));const m=r.toolStatuses?.[n];return{type:"tool-call",toolName:e,toolCallId:n,argsText:c,args:s,result:l,isError:u,...m?.type==="interrupt"&&{interrupt:m.payload,status:{type:"requires-action",reason:"interrupt"}},...m?.type==="cancelled"&&{status:{type:"incomplete",reason:"cancelled",error:m.reason}}}}if(i==="dynamic-tool"){const e=o.toolName,n=o.toolCallId;let s={},l,u=!1;o.state==="input-streaming"||o.state==="input-available"?s=o.input||{}:o.state==="output-available"?(s=o.input||{},l=o.output):o.state==="output-error"&&(s=o.input||{},u=!0,l={error:o.errorText});const c=r.toolStatuses?.[n];return{type:"tool-call",toolName:e,toolCallId:n,argsText:JSON.stringify(s),args:s,result:l,isError:u,...c?.type==="interrupt"&&{interrupt:c.payload,status:{type:"requires-action",reason:"interrupt"}},...c?.type==="cancelled"&&{status:{type:"incomplete",reason:"cancelled",error:c.reason}}}}return i==="source-url"?{type:"source",sourceType:"url",id:o.sourceId,url:o.url,title:o.title||""}:i==="source-document"?(console.warn(`Source document part type ${i} is not yet supported in conversion`),null):i.startsWith("data-")?{type:"data",name:i.substring(5),data:o.data}:(console.warn(`Unsupported message part type: ${i}`),null)}).filter(Boolean),gn=E.unstable_createMessageConverter((t,r)=>{const o=new Date;switch(t.role){case"user":return{role:"user",id:t.id,createdAt:o,content:rr(t,r),attachments:t.parts?.filter(i=>i.type==="file").map((i,e)=>({id:e.toString(),type:i.mediaType.startsWith("image/")?"image":"file",name:i.filename??"file",content:[i.mediaType.startsWith("image/")?{type:"image",image:i.url,filename:i.filename}:{type:"file",filename:i.filename,data:i.url,mimeType:i.mediaType}],contentType:i.mediaType??"unknown/unknown",status:{type:"complete"}}))};case"system":return{role:"system",id:t.id,createdAt:o,content:rr(t,r)};case"assistant":return{role:"assistant",id:t.id,createdAt:o,content:rr(t,r),metadata:{unstable_annotations:t.annotations,unstable_data:Array.isArray(t.data)?t.data:t.data?[t.data]:void 0,custom:{}}};default:return console.warn(`Unsupported message role: ${t.role}`),[]}}),nc={format:"ai-sdk/v5",encode({message:{id:t,parts:r,...o}}){return{...o,parts:r.filter(i=>i.type!=="file")}},decode(t){return{parentId:t.parent_id,message:{id:t.id,...t.content}}},getId(t){return t.id}},{MessageRepository:ic}=E.INTERNAL,oc=(t,r)=>({headId:r.headId,messages:r.messages.map(o=>{const i=t([o.message])[0];return{...o,message:i}})}),ac=(t,r,o,i,e)=>{const n=P.useRef(!1),s=E.useAssistantApi(),l=P.useCallback(()=>s.threadListItem.source?s.threadListItem():null,[s]),[u,c]=P.useState(!1),m=P.useRef(new Set),f=P.useRef(()=>e);return P.useEffect(()=>{f.current=e}),P.useEffect(()=>{if(!r||n.current)return;const b=async()=>{c(!0);try{const p=await r.withFormat?.(i).load();if(p&&p.messages.length>0){const h=oc(o,p);t.current.thread.import(h);const v=new ic;v.import(h);const y=v.getMessages();f.current(y.map(E.getExternalStoreMessages).flat()),m.current=new Set(h.messages.map($=>$.message.id))}}catch(p){console.error("Failed to load message history:",p)}finally{c(!1)}};if(!n.current){if(n.current=!0,!l()?.getState().remoteId){c(!1);return}b()}},[s,r,i,o,t,l]),P.useEffect(()=>t.current.thread.subscribe(async()=>{const{messages:b,isRunning:p}=t.current.thread.getState();if(!p)for(let h=0;h<b.length;h++){const v=b[h];if(v.status===void 0||v.status.type==="complete"||v.status.type==="incomplete"){if(m.current.has(v.id))continue;m.current.add(v.id);const y=h>0?b[h-1].id:null;await r?.withFormat?.(i).append({parentId:y,message:E.getExternalStoreMessages(v)[0]})}}}),[r,i,t]),u},sc=(t,{adapters:r,toCreateMessage:o,cancelPendingToolCallsOnSend:i=!0}={})=>{const e=E.useRuntimeAdapters(),n=t.status==="submitted"||t.status==="streaming",[s,l]=P.useState({}),u=gn.useThreadMessages({isRunning:n,messages:t.messages,metadata:P.useMemo(()=>({toolStatuses:s,...t.error&&{error:t.error.message}}),[s,t.error])}),[c]=P.useState(()=>({get current(){return p}})),m=E.INTERNAL.useToolInvocations({state:{messages:u,isRunning:n},getTools:()=>c.current.thread.getModelContext().tools,onResult:h=>{h.type==="add-tool-result"&&t.addToolResult({tool:h.toolName,toolCallId:h.toolCallId,output:h.result})},setToolStatuses:l}),f=ac(c,r?.history??e?.history,gn.toThreadMessages,nc,h=>{t.setMessages(h)}),b=()=>{if(!i)return;const h=Object.entries(s).filter(v=>v[1]?.type==="interrupt").map(([v])=>({toolCallId:v}));h.length!==0&&(l(v=>{const y={...v};return h.forEach(({toolCallId:$})=>{y[$]={type:"cancelled",reason:"User cancelled tool call by sending a new message."}}),y}),h.forEach(({toolCallId:v})=>{t.setMessages(t.messages.map(y=>y.id===v?{...y,content:[{type:"text",text:"User cancelled tool call by sending a new message."}]}:y))}))},p=E.useExternalStoreRuntime({isRunning:n,messages:u,setMessages:h=>t.setMessages(h.map(fn).filter(Boolean).flat()),onImport:h=>t.setMessages(h.map(fn).filter(Boolean).flat()),onCancel:async()=>{t.stop(),m.abort()},onNew:async h=>{b();const v=(o??nn)(h);await t.sendMessage(v,{metadata:h.runConfig})},onEdit:async h=>{b();const v=rn(t.messages,h.parentId);t.setMessages(v);const y=(o??nn)(h);await t.sendMessage(y,{metadata:h.runConfig})},onReload:async(h,v)=>{b();const y=rn(t.messages,h);t.setMessages(y),await t.regenerate({metadata:v.runConfig})},onAddToolResult:({toolCallId:h,result:v,isError:y})=>{y?t.addToolOutput({state:"output-error",tool:h,toolCallId:h,errorText:typeof v=="string"?v:JSON.stringify(v)}):t.addToolOutput({state:"output-available",tool:h,toolCallId:h,output:v})},onResumeToolCall:h=>m.resume(h.toolCallId,h.payload),adapters:{attachments:tc,...e,...r},isLoading:f});return p},nr,pn;function lc(){if(pn)return nr;pn=1;function t(r,o){if(typeof r!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof r}\`.`);let i,e=0;return function(...s){clearTimeout(i);const l=Date.now(),u=l-e,c=o-u;c<=0?(e=l,r.apply(this,s)):i=setTimeout(()=>{e=Date.now(),r.apply(this,s)},c)}}return nr=t,nr}var cc=lc();const uc=Nl(cc);var yt={exports:{}},ir={};var vn;function dc(){if(vn)return ir;vn=1;var t=P;function r(f,b){return f===b&&(f!==0||1/f===1/b)||f!==f&&b!==b}var o=typeof Object.is=="function"?Object.is:r,i=t.useState,e=t.useEffect,n=t.useLayoutEffect,s=t.useDebugValue;function l(f,b){var p=b(),h=i({inst:{value:p,getSnapshot:b}}),v=h[0].inst,y=h[1];return n(function(){v.value=p,v.getSnapshot=b,u(v)&&y({inst:v})},[f,p,b]),e(function(){return u(v)&&y({inst:v}),f(function(){u(v)&&y({inst:v})})},[f]),s(p),p}function u(f){var b=f.getSnapshot;f=f.value;try{var p=b();return!o(f,p)}catch{return!0}}function c(f,b){return b()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:l;return ir.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:m,ir}var or={};var hn;function mc(){return hn||(hn=1,process.env.NODE_ENV!=="production"&&(function(){function t(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}function r(p,h){m||e.startTransition===void 0||(m=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var v=h();if(!f){var y=h();n(v,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}y=s({inst:{value:v,getSnapshot:h}});var $=y[0].inst,_=y[1];return u(function(){$.value=v,$.getSnapshot=h,o($)&&_({inst:$})},[p,v,h]),l(function(){return o($)&&_({inst:$}),p(function(){o($)&&_({inst:$})})},[p]),c(v),v}function o(p){var h=p.getSnapshot;p=p.value;try{var v=h();return!n(p,v)}catch{return!0}}function i(p,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=P,n=typeof Object.is=="function"?Object.is:t,s=e.useState,l=e.useEffect,u=e.useLayoutEffect,c=e.useDebugValue,m=!1,f=!1,b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:r;or.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),or}var bn;function fc(){return bn||(bn=1,process.env.NODE_ENV==="production"?yt.exports=dc():yt.exports=mc()),yt.exports}var gc=fc(),vi=(t,r,o)=>{if(!r.has(t))throw TypeError("Cannot "+o)},L=(t,r,o)=>(vi(t,r,"read from private field"),o?o.call(t):r.get(t)),de=(t,r,o)=>{if(r.has(t))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(t):r.set(t,o)},we=(t,r,o,i)=>(vi(t,r,"write to private field"),r.set(t,o),o);function pc(t,r){return r!=null?uc(t,r):t}var ie,Et,Ot,ot,at,st,Le,yr,xr,vc=class{constructor(t=[]){de(this,ie,void 0),de(this,Et,"ready"),de(this,Ot,void 0),de(this,ot,new Set),de(this,at,new Set),de(this,st,new Set),this.pushMessage=r=>{we(this,ie,L(this,ie).concat(r)),L(this,Le).call(this)},this.popMessage=()=>{we(this,ie,L(this,ie).slice(0,-1)),L(this,Le).call(this)},this.replaceMessage=(r,o)=>{we(this,ie,[...L(this,ie).slice(0,r),this.snapshot(o),...L(this,ie).slice(r+1)]),L(this,Le).call(this)},this.snapshot=r=>structuredClone(r),this["~registerMessagesCallback"]=(r,o)=>{const i=o?pc(r,o):r;return L(this,ot).add(i),()=>{L(this,ot).delete(i)}},this["~registerStatusCallback"]=r=>(L(this,at).add(r),()=>{L(this,at).delete(r)}),this["~registerErrorCallback"]=r=>(L(this,st).add(r),()=>{L(this,st).delete(r)}),de(this,Le,()=>{L(this,ot).forEach(r=>r())}),de(this,yr,()=>{L(this,at).forEach(r=>r())}),de(this,xr,()=>{L(this,st).forEach(r=>r())}),we(this,ie,t)}get status(){return L(this,Et)}set status(t){we(this,Et,t),L(this,yr).call(this)}get error(){return L(this,Ot)}set error(t){we(this,Ot,t),L(this,xr).call(this)}get messages(){return L(this,ie)}set messages(t){we(this,ie,[...t]),L(this,Le).call(this)}};ie=new WeakMap;Et=new WeakMap;Ot=new WeakMap;ot=new WeakMap;at=new WeakMap;st=new WeakMap;Le=new WeakMap;yr=new WeakMap;xr=new WeakMap;var Ze,yn=class extends Ql{constructor({messages:r,...o}){const i=new vc(r);super({...o,state:i}),de(this,Ze,void 0),this["~registerMessagesCallback"]=(e,n)=>L(this,Ze)["~registerMessagesCallback"](e,n),this["~registerStatusCallback"]=e=>L(this,Ze)["~registerStatusCallback"](e),this["~registerErrorCallback"]=e=>L(this,Ze)["~registerErrorCallback"](e),we(this,Ze,i)}};Ze=new WeakMap;function hc({experimental_throttle:t,resume:r=!1,...o}={}){const i=P.useRef("chat"in o?o.chat:new yn(o));("chat"in o&&o.chat!==i.current||"id"in o&&i.current.id!==o.id)&&(i.current="chat"in o?o.chat:new yn(o));const n=P.useCallback(m=>i.current["~registerMessagesCallback"](m,t),[t,i.current.id]),s=P.useSyncExternalStore(n,()=>i.current.messages,()=>i.current.messages),l=P.useSyncExternalStore(i.current["~registerStatusCallback"],()=>i.current.status,()=>i.current.status),u=P.useSyncExternalStore(i.current["~registerErrorCallback"],()=>i.current.error,()=>i.current.error),c=P.useCallback(m=>{typeof m=="function"&&(m=m(i.current.messages)),i.current.messages=m},[i]);return P.useEffect(()=>{r&&i.current.resumeStream()},[r,i]),{id:i.current.id,messages:s,setMessages:c,sendMessage:i.current.sendMessage,regenerate:i.current.regenerate,clearError:i.current.clearError,stop:i.current.stop,error:u,resumeStream:i.current.resumeStream,status:l,addToolResult:i.current.addToolOutput,addToolOutput:i.current.addToolOutput}}var bc=t=>Object.fromEntries(Object.entries(t).map(([r,o])=>[r,{...o.description?{description:o.description}:void 0,parameters:o.parameters instanceof ln.ZodType?ln.toJSONSchema(o.parameters):o.parameters}])),yc=t=>Object.fromEntries(Object.entries(t).filter(([,r])=>!r.disabled&&r.type!=="backend")),$r=class extends pi{runtime;constructor(t){super({...t,prepareSendMessagesRequest:async r=>{const o=this.runtime?.thread.getModelContext(),i=(await this.runtime?.threads.mainItem.initialize())?.remoteId??r.id,e={...r,body:{callSettings:o?.callSettings,system:o?.system,tools:bc(yc(o?.tools??{})),...r?.body}},n=await t?.prepareSendMessagesRequest?.(e);return{...n,body:n?.body??{...e.body,id:i,messages:r.messages,trigger:r.trigger,messageId:r.messageId,metadata:r.requestMetadata}}}})}setRuntime(t){this.runtime=t}},xc=t=>{const r=P.useRef(t);return P.useEffect(()=>{r.current=t}),P.useMemo(()=>new Proxy(r.current,{get(i,e){const n=r.current[e];return typeof n=="function"?n.bind(r.current):n}}),[])},$c=t=>{const{adapters:r,transport:o,toCreateMessage:i,...e}=t??{},n=xc(o??new $r),s=E.useAssistantState(({threadListItem:c})=>c.id),l=hc({...e,id:s,transport:n}),u=sc(l,{adapters:r,...i&&{toCreateMessage:i}});return n instanceof $r&&n.setRuntime(u),u},_c=({cloud:t,...r}={})=>{const o=E.unstable_useCloudThreadListAdapter({cloud:t});return E.unstable_useRemoteThreadListRuntime({runtimeHook:function(){return $c(r)},adapter:o,allowNesting:!0})};const hi=P.createContext(void 0),wc="/chat/completions",Sc=({children:t,config:r})=>{const[o,i]=P.useState(r.model?.defaultModel??a.MODELS[0]),[e,n]=P.useState(!1),s=_c({transport:new $r({api:r.chatEndpoint??wc,prepareSendMessagesRequest:({id:l,messages:u})=>({body:{messages:u,id:l,config:{mcp:r.mcp,environment:r.environment,projectSlug:r.projectSlug,model:o}}})})});return d.jsx(E.AssistantRuntimeProvider,{runtime:s,children:d.jsx(hi.Provider,{value:{config:r,setModel:i,model:o,isExpanded:e,setIsExpanded:n},children:t})})},se=()=>{const t=P.useContext(hi);if(!t)throw new Error("useElements must be used within a ElementsProvider");return t};const Ic=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),kc=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,i)=>i?i.toUpperCase():o.toLowerCase()),xn=t=>{const r=kc(t);return r.charAt(0).toUpperCase()+r.slice(1)},bi=(...t)=>t.filter((r,o,i)=>!!r&&r.trim()!==""&&i.indexOf(r)===o).join(" ").trim(),jc=t=>{for(const r in t)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};var Nc={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 Ec=P.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:i,className:e="",children:n,iconNode:s,...l},u)=>P.createElement("svg",{ref:u,...Nc,width:r,height:r,stroke:t,strokeWidth:i?Number(o)*24/Number(r):o,className:bi("lucide",e),...!n&&!jc(l)&&{"aria-hidden":"true"},...l},[...s.map(([c,m])=>P.createElement(c,m)),...Array.isArray(n)?n:[n]]));const Y=(t,r)=>{const o=P.forwardRef(({className:i,...e},n)=>P.createElement(Ec,{ref:n,iconNode:r,className:bi(`lucide-${Ic(xn(t))}`,`lucide-${t}`,i),...e}));return o.displayName=xn(t),o};const Oc=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Cc=Y("arrow-down",Oc);const Pc=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Tc=Y("arrow-up",Pc);const Ac=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Dc=Y("bot",Ac);const Rc=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Uc=Y("brain",Rc);const zc=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zt=Y("check",zc);const Mc=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],yi=Y("chevron-down",Mc);const Lc=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Zc=Y("chevron-left",Lc);const Fc=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vc=Y("chevron-right",Fc);const Wc=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],xi=Y("copy",Wc);const Bc=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Gc=Y("file-text",Bc);const Jc=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],qc=Y("maximize-2",Jc);const Kc=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Hc=Y("pencil",Kc);const Xc=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Yc=Y("plus",Xc);const Qc=[["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"}]],eu=Y("refresh-cw",Qc);const tu=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],ru=Y("settings-2",tu);const nu=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],iu=Y("square",nu);const ou=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$i=Y("x",ou);function $n(t,r){if(typeof t=="function")return t(r);t!=null&&(t.current=r)}function Cr(...t){return r=>{let o=!1;const i=t.map(e=>{const n=$n(e,r);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let e=0;e<i.length;e++){const n=i[e];typeof n=="function"?n():$n(t[e],null)}}}}function ee(...t){return g.useCallback(Cr(...t),t)}var au=Symbol.for("react.lazy"),At=g[" use ".trim().toString()];function su(t){return typeof t=="object"&&t!==null&&"then"in t}function _i(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===au&&"_payload"in t&&su(t._payload)}function wi(t){const r=cu(t),o=g.forwardRef((i,e)=>{let{children:n,...s}=i;_i(n)&&typeof At=="function"&&(n=At(n._payload));const l=g.Children.toArray(n),u=l.find(mu);if(u){const c=u.props.children,m=l.map(f=>f===u?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return d.jsx(r,{...s,ref:e,children:g.isValidElement(c)?g.cloneElement(c,void 0,m):null})}return d.jsx(r,{...s,ref:e,children:n})});return o.displayName=`${t}.Slot`,o}var lu=wi("Slot");function cu(t){const r=g.forwardRef((o,i)=>{let{children:e,...n}=o;if(_i(e)&&typeof At=="function"&&(e=At(e._payload)),g.isValidElement(e)){const s=gu(e),l=fu(n,e.props);return e.type!==g.Fragment&&(l.ref=i?Cr(i,s):s),g.cloneElement(e,l)}return g.Children.count(e)>1?g.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Si=Symbol("radix.slottable");function uu(t){const r=({children:o})=>d.jsx(d.Fragment,{children:o});return r.displayName=`${t}.Slottable`,r.__radixId=Si,r}var du=uu("Slottable");function mu(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Si}function fu(t,r){const o={...r};for(const i in r){const e=t[i],n=r[i];/^on[A-Z]/.test(i)?e&&n?o[i]=(...l)=>{const u=n(...l);return e(...l),u}:e&&(o[i]=e):i==="style"?o[i]={...e,...n}:i==="className"&&(o[i]=[e,n].filter(Boolean).join(" "))}return{...t,...o}}function gu(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}function Ii(t){var r,o,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var e=t.length;for(r=0;r<e;r++)t[r]&&(o=Ii(t[r]))&&(i&&(i+=" "),i+=o)}else for(o in t)t[o]&&(i&&(i+=" "),i+=o);return i}function ki(){for(var t,r,o=0,i="",e=arguments.length;o<e;o++)(t=arguments[o])&&(r=Ii(t))&&(i&&(i+=" "),i+=r);return i}const _n=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,wn=ki,pu=(t,r)=>o=>{var i;if(r?.variants==null)return wn(t,o?.class,o?.className);const{variants:e,defaultVariants:n}=r,s=Object.keys(e).map(c=>{const m=o?.[c],f=n?.[c];if(m===null)return null;const b=_n(m)||_n(f);return e[c][b]}),l=o&&Object.entries(o).reduce((c,m)=>{let[f,b]=m;return b===void 0||(c[f]=b),c},{}),u=r==null||(i=r.compoundVariants)===null||i===void 0?void 0:i.reduce((c,m)=>{let{class:f,className:b,...p}=m;return Object.entries(p).every(h=>{let[v,y]=h;return Array.isArray(y)?y.includes({...n,...l}[v]):{...n,...l}[v]===y})?[...c,f,b]:c},[]);return wn(t,s,u,o?.class,o?.className)},vu=(t,r)=>{const o=new Array(t.length+r.length);for(let i=0;i<t.length;i++)o[i]=t[i];for(let i=0;i<r.length;i++)o[t.length+i]=r[i];return o},hu=(t,r)=>({classGroupId:t,validator:r}),ji=(t=new Map,r=null,o)=>({nextPart:t,validators:r,classGroupId:o}),Dt="-",Sn=[],bu="arbitrary..",yu=t=>{const r=$u(t),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return xu(s);const l=s.split(Dt),u=l[0]===""&&l.length>1?1:0;return Ni(l,u,r)},getConflictingClassGroupIds:(s,l)=>{if(l){const u=i[s],c=o[s];return u?c?vu(c,u):u:c||Sn}return o[s]||Sn}}},Ni=(t,r,o)=>{if(t.length-r===0)return o.classGroupId;const e=t[r],n=o.nextPart.get(e);if(n){const c=Ni(t,r+1,n);if(c)return c}const s=o.validators;if(s===null)return;const l=r===0?t.join(Dt):t.slice(r).join(Dt),u=s.length;for(let c=0;c<u;c++){const m=s[c];if(m.validator(l))return m.classGroupId}},xu=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const r=t.slice(1,-1),o=r.indexOf(":"),i=r.slice(0,o);return i?bu+i:void 0})(),$u=t=>{const{theme:r,classGroups:o}=t;return _u(o,r)},_u=(t,r)=>{const o=ji();for(const i in t){const e=t[i];Pr(e,o,i,r)}return o},Pr=(t,r,o,i)=>{const e=t.length;for(let n=0;n<e;n++){const s=t[n];wu(s,r,o,i)}},wu=(t,r,o,i)=>{if(typeof t=="string"){Su(t,r,o);return}if(typeof t=="function"){Iu(t,r,o,i);return}ku(t,r,o,i)},Su=(t,r,o)=>{const i=t===""?r:Ei(r,t);i.classGroupId=o},Iu=(t,r,o,i)=>{if(ju(t)){Pr(t(i),r,o,i);return}r.validators===null&&(r.validators=[]),r.validators.push(hu(o,t))},ku=(t,r,o,i)=>{const e=Object.entries(t),n=e.length;for(let s=0;s<n;s++){const[l,u]=e[s];Pr(u,Ei(r,l),o,i)}},Ei=(t,r)=>{let o=t;const i=r.split(Dt),e=i.length;for(let n=0;n<e;n++){const s=i[n];let l=o.nextPart.get(s);l||(l=ji(),o.nextPart.set(s,l)),o=l}return o},ju=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,Nu=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,o=Object.create(null),i=Object.create(null);const e=(n,s)=>{o[n]=s,r++,r>t&&(r=0,i=o,o=Object.create(null))};return{get(n){let s=o[n];if(s!==void 0)return s;if((s=i[n])!==void 0)return e(n,s),s},set(n,s){n in o?o[n]=s:e(n,s)}}},_r="!",In=":",Eu=[],kn=(t,r,o,i,e)=>({modifiers:t,hasImportantModifier:r,baseClassName:o,maybePostfixModifierPosition:i,isExternal:e}),Ou=t=>{const{prefix:r,experimentalParseClassName:o}=t;let i=e=>{const n=[];let s=0,l=0,u=0,c;const m=e.length;for(let v=0;v<m;v++){const y=e[v];if(s===0&&l===0){if(y===In){n.push(e.slice(u,v)),u=v+1;continue}if(y==="/"){c=v;continue}}y==="["?s++:y==="]"?s--:y==="("?l++:y===")"&&l--}const f=n.length===0?e:e.slice(u);let b=f,p=!1;f.endsWith(_r)?(b=f.slice(0,-1),p=!0):f.startsWith(_r)&&(b=f.slice(1),p=!0);const h=c&&c>u?c-u:void 0;return kn(n,p,b,h)};if(r){const e=r+In,n=i;i=s=>s.startsWith(e)?n(s.slice(e.length)):kn(Eu,!1,s,void 0,!0)}if(o){const e=i;i=n=>o({className:n,parseClassName:e})}return i},Cu=t=>{const r=new Map;return t.orderSensitiveModifiers.forEach((o,i)=>{r.set(o,1e6+i)}),o=>{const i=[];let e=[];for(let n=0;n<o.length;n++){const s=o[n],l=s[0]==="[",u=r.has(s);l||u?(e.length>0&&(e.sort(),i.push(...e),e=[]),i.push(s)):e.push(s)}return e.length>0&&(e.sort(),i.push(...e)),i}},Pu=t=>({cache:Nu(t.cacheSize),parseClassName:Ou(t),sortModifiers:Cu(t),...yu(t)}),Tu=/\s+/,Au=(t,r)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:e,sortModifiers:n}=r,s=[],l=t.trim().split(Tu);let u="";for(let c=l.length-1;c>=0;c-=1){const m=l[c],{isExternal:f,modifiers:b,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:v}=o(m);if(f){u=m+(u.length>0?" "+u:u);continue}let y=!!v,$=i(y?h.substring(0,v):h);if(!$){if(!y){u=m+(u.length>0?" "+u:u);continue}if($=i(h),!$){u=m+(u.length>0?" "+u:u);continue}y=!1}const _=b.length===0?"":b.length===1?b[0]:n(b).join(":"),k=p?_+_r:_,x=k+$;if(s.indexOf(x)>-1)continue;s.push(x);const I=e($,y);for(let N=0;N<I.length;++N){const w=I[N];s.push(k+w)}u=m+(u.length>0?" "+u:u)}return u},Du=(...t)=>{let r=0,o,i,e="";for(;r<t.length;)(o=t[r++])&&(i=Oi(o))&&(e&&(e+=" "),e+=i);return e},Oi=t=>{if(typeof t=="string")return t;let r,o="";for(let i=0;i<t.length;i++)t[i]&&(r=Oi(t[i]))&&(o&&(o+=" "),o+=r);return o},Ru=(t,...r)=>{let o,i,e,n;const s=u=>{const c=r.reduce((m,f)=>f(m),t());return o=Pu(c),i=o.cache.get,e=o.cache.set,n=l,l(u)},l=u=>{const c=i(u);if(c)return c;const m=Au(u,o);return e(u,m),m};return n=s,(...u)=>n(Du(...u))},Uu=[],K=t=>{const r=o=>o[t]||Uu;return r.isThemeGetter=!0,r},Ci=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zu=/^\d+\/\d+$/,Mu=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lu=/\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$/,Zu=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Fu=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vu=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Re=t=>zu.test(t),D=t=>!!t&&!Number.isNaN(Number(t)),_e=t=>!!t&&Number.isInteger(Number(t)),ar=t=>t.endsWith("%")&&D(t.slice(0,-1)),he=t=>Mu.test(t),Wu=()=>!0,Bu=t=>Lu.test(t)&&!Zu.test(t),Ti=()=>!1,Gu=t=>Fu.test(t),Ju=t=>Vu.test(t),qu=t=>!O(t)&&!C(t),Ku=t=>qe(t,Ri,Ti),O=t=>Ci.test(t),Ne=t=>qe(t,Ui,Bu),sr=t=>qe(t,ed,D),jn=t=>qe(t,Ai,Ti),Hu=t=>qe(t,Di,Ju),xt=t=>qe(t,zi,Gu),C=t=>Pi.test(t),nt=t=>Ke(t,Ui),Xu=t=>Ke(t,td),Nn=t=>Ke(t,Ai),Yu=t=>Ke(t,Ri),Qu=t=>Ke(t,Di),$t=t=>Ke(t,zi,!0),qe=(t,r,o)=>{const i=Ci.exec(t);return i?i[1]?r(i[1]):o(i[2]):!1},Ke=(t,r,o=!1)=>{const i=Pi.exec(t);return i?i[1]?r(i[1]):o:!1},Ai=t=>t==="position"||t==="percentage",Di=t=>t==="image"||t==="url",Ri=t=>t==="length"||t==="size"||t==="bg-size",Ui=t=>t==="length",ed=t=>t==="number",td=t=>t==="family-name",zi=t=>t==="shadow",rd=()=>{const t=K("color"),r=K("font"),o=K("text"),i=K("font-weight"),e=K("tracking"),n=K("leading"),s=K("breakpoint"),l=K("container"),u=K("spacing"),c=K("radius"),m=K("shadow"),f=K("inset-shadow"),b=K("text-shadow"),p=K("drop-shadow"),h=K("blur"),v=K("perspective"),y=K("aspect"),$=K("ease"),_=K("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],I=()=>[...x(),C,O],N=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],S=()=>[C,O,u],T=()=>[Re,"full","auto",...S()],R=()=>[_e,"none","subgrid",C,O],F=()=>["auto",{span:["full",_e,C,O]},_e,C,O],V=()=>[_e,"auto",C,O],W=()=>["auto","min","max","fr",C,O],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...S()],z=()=>[Re,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...S()],j=()=>[t,C,O],q=()=>[...x(),Nn,jn,{position:[C,O]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Ye=()=>["auto","cover","contain",Yu,Ku,{size:[C,O]}],Qe=()=>[ar,nt,Ne],X=()=>["","none","full",c,C,O],Q=()=>["",D,nt,Ne],Pe=()=>["solid","dashed","dotted","double"],ht=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[D,ar,Nn,jn],et=()=>["","none",h,C,O],Te=()=>["none",D,C,O],Ae=()=>["none",D,C,O],tt=()=>[D,C,O],De=()=>[Re,"full",...S()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[he],breakpoint:[he],color:[Wu],container:[he],"drop-shadow":[he],ease:["in","out","in-out"],font:[qu],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[he],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[he],shadow:[he],spacing:["px",D],text:[he],"text-shadow":[he],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Re,O,C,y]}],container:["container"],columns:[{columns:[D,O,C,l]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"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:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[_e,"auto",C,O]}],basis:[{basis:[Re,"full","auto",l,...S()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[D,Re,"auto","initial","none",O]}],grow:[{grow:["",D,C,O]}],shrink:[{shrink:["",D,C,O]}],order:[{order:[_e,"first","last","none",C,O]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:S()}],"gap-x":[{"gap-x":S()}],"gap-y":[{"gap-y":S()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:S()}],px:[{px:S()}],py:[{py:S()}],ps:[{ps:S()}],pe:[{pe:S()}],pt:[{pt:S()}],pr:[{pr:S()}],pb:[{pb:S()}],pl:[{pl:S()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":S()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":S()}],"space-y-reverse":["space-y-reverse"],size:[{size:z()}],w:[{w:[l,"screen",...z()]}],"min-w":[{"min-w":[l,"screen","none",...z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...z()]}],h:[{h:["screen","lh",...z()]}],"min-h":[{"min-h":["screen","lh","none",...z()]}],"max-h":[{"max-h":["screen","lh",...z()]}],"font-size":[{text:["base",o,nt,Ne]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,C,sr]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ar,O]}],"font-family":[{font:[Xu,O,r]}],"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:[e,C,O]}],"line-clamp":[{"line-clamp":[D,"none",C,sr]}],leading:[{leading:[n,...S()]}],"list-image":[{"list-image":["none",C,O]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",C,O]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[D,"from-font","auto",C,Ne]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[D,"auto",C,O]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",C,O]}],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",C,O]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:Ye()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_e,C,O],radial:["",C,O],conic:[_e,C,O]},Qu,Hu]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:Qe()}],"gradient-via-pos":[{via:Qe()}],"gradient-to-pos":[{to:Qe()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Pe(),"hidden","none"]}],"divide-style":[{divide:[...Pe(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...Pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[D,C,O]}],"outline-w":[{outline:["",D,nt,Ne]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",m,$t,xt]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",f,$t,xt]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[D,Ne]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",b,$t,xt]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[D,C,O]}],"mix-blend":[{"mix-blend":[...ht(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ht()}],"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":[D]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[C,O]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":x()}],"mask-image-conic-pos":[{"mask-conic":[D]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:Ye()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",C,O]}],filter:[{filter:["","none",C,O]}],blur:[{blur:et()}],brightness:[{brightness:[D,C,O]}],contrast:[{contrast:[D,C,O]}],"drop-shadow":[{"drop-shadow":["","none",p,$t,xt]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",D,C,O]}],"hue-rotate":[{"hue-rotate":[D,C,O]}],invert:[{invert:["",D,C,O]}],saturate:[{saturate:[D,C,O]}],sepia:[{sepia:["",D,C,O]}],"backdrop-filter":[{"backdrop-filter":["","none",C,O]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[D,C,O]}],"backdrop-contrast":[{"backdrop-contrast":[D,C,O]}],"backdrop-grayscale":[{"backdrop-grayscale":["",D,C,O]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D,C,O]}],"backdrop-invert":[{"backdrop-invert":["",D,C,O]}],"backdrop-opacity":[{"backdrop-opacity":[D,C,O]}],"backdrop-saturate":[{"backdrop-saturate":[D,C,O]}],"backdrop-sepia":[{"backdrop-sepia":["",D,C,O]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":S()}],"border-spacing-x":[{"border-spacing-x":S()}],"border-spacing-y":[{"border-spacing-y":S()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",C,O]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[D,"initial",C,O]}],ease:[{ease:["linear","initial",$,C,O]}],delay:[{delay:[D,C,O]}],animate:[{animate:["none",_,C,O]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,C,O]}],"perspective-origin":[{"perspective-origin":I()}],rotate:[{rotate:Te()}],"rotate-x":[{"rotate-x":Te()}],"rotate-y":[{"rotate-y":Te()}],"rotate-z":[{"rotate-z":Te()}],scale:[{scale:Ae()}],"scale-x":[{"scale-x":Ae()}],"scale-y":[{"scale-y":Ae()}],"scale-z":[{"scale-z":Ae()}],"scale-3d":["scale-3d"],skew:[{skew:tt()}],"skew-x":[{"skew-x":tt()}],"skew-y":[{"skew-y":tt()}],transform:[{transform:[C,O,"","none","gpu","cpu"]}],"transform-origin":[{origin:I()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:De()}],"translate-x":[{"translate-x":De()}],"translate-y":[{"translate-y":De()}],"translate-z":[{"translate-z":De()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"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",C,O]}],"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":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"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",C,O]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[D,nt,Ne,sr]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},nd=Ru(rd);function A(...t){return nd(ki(t))}const id=pu("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),be=g.forwardRef(({className:t,variant:r,size:o,asChild:i=!1,...e},n)=>{const s=i?lu:"button";return d.jsx(s,{"data-slot":"button",className:A(id({variant:r,size:o,className:t})),ref:n,...e})});be.displayName="Button";function J(t,r,{checkForDefaultPrevented:o=!0}={}){return function(e){if(t?.(e),o===!1||!e.defaultPrevented)return r?.(e)}}function od(t,r){const o=g.createContext(r),i=n=>{const{children:s,...l}=n,u=g.useMemo(()=>l,Object.values(l));return d.jsx(o.Provider,{value:u,children:s})};i.displayName=t+"Provider";function e(n){const s=g.useContext(o);if(s)return s;if(r!==void 0)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}return[i,e]}function ft(t,r=[]){let o=[];function i(n,s){const l=g.createContext(s),u=o.length;o=[...o,s];const c=f=>{const{scope:b,children:p,...h}=f,v=b?.[t]?.[u]||l,y=g.useMemo(()=>h,Object.values(h));return d.jsx(v.Provider,{value:y,children:p})};c.displayName=n+"Provider";function m(f,b){const p=b?.[t]?.[u]||l,h=g.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${n}\``)}return[c,m]}const e=()=>{const n=o.map(s=>g.createContext(s));return function(l){const u=l?.[t]||n;return g.useMemo(()=>({[`__scope${t}`]:{...l,[t]:u}}),[l,u])}};return e.scopeName=t,[i,ad(e,...r)]}function ad(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const i=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(n){const s=i.reduce((l,{useScope:u,scopeName:c})=>{const f=u(n)[`__scope${c}`];return{...l,...f}},{});return g.useMemo(()=>({[`__scope${r.scopeName}`]:s}),[s])}};return o.scopeName=r.scopeName,o}function Tr(t){const r=sd(t),o=g.forwardRef((i,e)=>{const{children:n,...s}=i,l=g.Children.toArray(n),u=l.find(cd);if(u){const c=u.props.children,m=l.map(f=>f===u?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return d.jsx(r,{...s,ref:e,children:g.isValidElement(c)?g.cloneElement(c,void 0,m):null})}return d.jsx(r,{...s,ref:e,children:n})});return o.displayName=`${t}.Slot`,o}function sd(t){const r=g.forwardRef((o,i)=>{const{children:e,...n}=o;if(g.isValidElement(e)){const s=dd(e),l=ud(n,e.props);return e.type!==g.Fragment&&(l.ref=i?Cr(i,s):s),g.cloneElement(e,l)}return g.Children.count(e)>1?g.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Mi=Symbol("radix.slottable");function ld(t){const r=({children:o})=>d.jsx(d.Fragment,{children:o});return r.displayName=`${t}.Slottable`,r.__radixId=Mi,r}function cd(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Mi}function ud(t,r){const o={...r};for(const i in r){const e=t[i],n=r[i];/^on[A-Z]/.test(i)?e&&n?o[i]=(...l)=>{const u=n(...l);return e(...l),u}:e&&(o[i]=e):i==="style"?o[i]={...e,...n}:i==="className"&&(o[i]=[e,n].filter(Boolean).join(" "))}return{...t,...o}}function dd(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var md=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=md.reduce((t,r)=>{const o=Tr(`Primitive.${r}`),i=g.forwardRef((e,n)=>{const{asChild:s,...l}=e,u=s?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function fd(t,r){t&&ti.flushSync(()=>t.dispatchEvent(r))}function Ee(t){const r=g.useRef(t);return g.useEffect(()=>{r.current=t}),g.useMemo(()=>(...o)=>r.current?.(...o),[])}function gd(t,r=globalThis?.document){const o=Ee(t);g.useEffect(()=>{const i=e=>{e.key==="Escape"&&o(e)};return r.addEventListener("keydown",i,{capture:!0}),()=>r.removeEventListener("keydown",i,{capture:!0})},[o,r])}var pd="DismissableLayer",wr="dismissableLayer.update",vd="dismissableLayer.pointerDownOutside",hd="dismissableLayer.focusOutside",En,Li=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ft=g.forwardRef((t,r)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:e,onFocusOutside:n,onInteractOutside:s,onDismiss:l,...u}=t,c=g.useContext(Li),[m,f]=g.useState(null),b=m?.ownerDocument??globalThis?.document,[,p]=g.useState({}),h=ee(r,w=>f(w)),v=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),$=v.indexOf(y),_=m?v.indexOf(m):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,x=_>=$,I=xd(w=>{const S=w.target,T=[...c.branches].some(R=>R.contains(S));!x||T||(e?.(w),s?.(w),w.defaultPrevented||l?.())},b),N=$d(w=>{const S=w.target;[...c.branches].some(R=>R.contains(S))||(n?.(w),s?.(w),w.defaultPrevented||l?.())},b);return gd(w=>{_===c.layers.size-1&&(i?.(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},b),g.useEffect(()=>{if(m)return o&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(En=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(m)),c.layers.add(m),On(),()=>{o&&c.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=En)}},[m,b,o,c]),g.useEffect(()=>()=>{m&&(c.layers.delete(m),c.layersWithOutsidePointerEventsDisabled.delete(m),On())},[m,c]),g.useEffect(()=>{const w=()=>p({});return document.addEventListener(wr,w),()=>document.removeEventListener(wr,w)},[]),d.jsx(H.div,{...u,ref:h,style:{pointerEvents:k?x?"auto":"none":void 0,...t.style},onFocusCapture:J(t.onFocusCapture,N.onFocusCapture),onBlurCapture:J(t.onBlurCapture,N.onBlurCapture),onPointerDownCapture:J(t.onPointerDownCapture,I.onPointerDownCapture)})});Ft.displayName=pd;var bd="DismissableLayerBranch",yd=g.forwardRef((t,r)=>{const o=g.useContext(Li),i=g.useRef(null),e=ee(r,i);return g.useEffect(()=>{const n=i.current;if(n)return o.branches.add(n),()=>{o.branches.delete(n)}},[o.branches]),d.jsx(H.div,{...t,ref:e})});yd.displayName=bd;function xd(t,r=globalThis?.document){const o=Ee(t),i=g.useRef(!1),e=g.useRef(()=>{});return g.useEffect(()=>{const n=l=>{if(l.target&&!i.current){let u=function(){Zi(vd,o,c,{discrete:!0})};const c={originalEvent:l};l.pointerType==="touch"?(r.removeEventListener("click",e.current),e.current=u,r.addEventListener("click",e.current,{once:!0})):u()}else r.removeEventListener("click",e.current);i.current=!1},s=window.setTimeout(()=>{r.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(s),r.removeEventListener("pointerdown",n),r.removeEventListener("click",e.current)}},[r,o]),{onPointerDownCapture:()=>i.current=!0}}function $d(t,r=globalThis?.document){const o=Ee(t),i=g.useRef(!1);return g.useEffect(()=>{const e=n=>{n.target&&!i.current&&Zi(hd,o,{originalEvent:n},{discrete:!1})};return r.addEventListener("focusin",e),()=>r.removeEventListener("focusin",e)},[r,o]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function On(){const t=new CustomEvent(wr);document.dispatchEvent(t)}function Zi(t,r,o,{discrete:i}){const e=o.originalEvent.target,n=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:o});r&&e.addEventListener(t,r,{once:!0}),i?fd(e,n):e.dispatchEvent(n)}var oe=globalThis?.document?g.useLayoutEffect:()=>{},_d=g[" useId ".trim().toString()]||(()=>{}),wd=0;function Fe(t){const[r,o]=g.useState(_d());return oe(()=>{o(i=>i??String(wd++))},[t]),r?`radix-${r}`:""}const Sd=["top","right","bottom","left"],Ie=Math.min,re=Math.max,Rt=Math.round,_t=Math.floor,ge=t=>({x:t,y:t}),Id={left:"right",right:"left",bottom:"top",top:"bottom"},kd={start:"end",end:"start"};function Sr(t,r,o){return re(t,Ie(r,o))}function ye(t,r){return typeof t=="function"?t(r):t}function xe(t){return t.split("-")[0]}function He(t){return t.split("-")[1]}function Ar(t){return t==="x"?"y":"x"}function Dr(t){return t==="y"?"height":"width"}const jd=new Set(["top","bottom"]);function fe(t){return jd.has(xe(t))?"y":"x"}function Rr(t){return Ar(fe(t))}function Nd(t,r,o){o===void 0&&(o=!1);const i=He(t),e=Rr(t),n=Dr(e);let s=e==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return r.reference[n]>r.floating[n]&&(s=Ut(s)),[s,Ut(s)]}function Ed(t){const r=Ut(t);return[Ir(t),r,Ir(r)]}function Ir(t){return t.replace(/start|end/g,r=>kd[r])}const Cn=["left","right"],Pn=["right","left"],Od=["top","bottom"],Cd=["bottom","top"];function Pd(t,r,o){switch(t){case"top":case"bottom":return o?r?Pn:Cn:r?Cn:Pn;case"left":case"right":return r?Od:Cd;default:return[]}}function Td(t,r,o,i){const e=He(t);let n=Pd(xe(t),o==="start",i);return e&&(n=n.map(s=>s+"-"+e),r&&(n=n.concat(n.map(Ir)))),n}function Ut(t){return t.replace(/left|right|bottom|top/g,r=>Id[r])}function Ad(t){return{top:0,right:0,bottom:0,left:0,...t}}function Fi(t){return typeof t!="number"?Ad(t):{top:t,right:t,bottom:t,left:t}}function zt(t){const{x:r,y:o,width:i,height:e}=t;return{width:i,height:e,top:o,left:r,right:r+i,bottom:o+e,x:r,y:o}}function Tn(t,r,o){let{reference:i,floating:e}=t;const n=fe(r),s=Rr(r),l=Dr(s),u=xe(r),c=n==="y",m=i.x+i.width/2-e.width/2,f=i.y+i.height/2-e.height/2,b=i[l]/2-e[l]/2;let p;switch(u){case"top":p={x:m,y:i.y-e.height};break;case"bottom":p={x:m,y:i.y+i.height};break;case"right":p={x:i.x+i.width,y:f};break;case"left":p={x:i.x-e.width,y:f};break;default:p={x:i.x,y:i.y}}switch(He(r)){case"start":p[s]-=b*(o&&c?-1:1);break;case"end":p[s]+=b*(o&&c?-1:1);break}return p}const Dd=async(t,r,o)=>{const{placement:i="bottom",strategy:e="absolute",middleware:n=[],platform:s}=o,l=n.filter(Boolean),u=await(s.isRTL==null?void 0:s.isRTL(r));let c=await s.getElementRects({reference:t,floating:r,strategy:e}),{x:m,y:f}=Tn(c,i,u),b=i,p={},h=0;for(let v=0;v<l.length;v++){const{name:y,fn:$}=l[v],{x:_,y:k,data:x,reset:I}=await $({x:m,y:f,initialPlacement:i,placement:b,strategy:e,middlewareData:p,rects:c,platform:s,elements:{reference:t,floating:r}});m=_??m,f=k??f,p={...p,[y]:{...p[y],...x}},I&&h<=50&&(h++,typeof I=="object"&&(I.placement&&(b=I.placement),I.rects&&(c=I.rects===!0?await s.getElementRects({reference:t,floating:r,strategy:e}):I.rects),{x:m,y:f}=Tn(c,b,u)),v=-1)}return{x:m,y:f,placement:b,strategy:e,middlewareData:p}};async function ut(t,r){var o;r===void 0&&(r={});const{x:i,y:e,platform:n,rects:s,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:b=!1,padding:p=0}=ye(r,t),h=Fi(p),y=l[b?f==="floating"?"reference":"floating":f],$=zt(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(y)))==null||o?y:y.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(l.floating)),boundary:c,rootBoundary:m,strategy:u})),_=f==="floating"?{x:i,y:e,width:s.floating.width,height:s.floating.height}:s.reference,k=await(n.getOffsetParent==null?void 0:n.getOffsetParent(l.floating)),x=await(n.isElement==null?void 0:n.isElement(k))?await(n.getScale==null?void 0:n.getScale(k))||{x:1,y:1}:{x:1,y:1},I=zt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:k,strategy:u}):_);return{top:($.top-I.top+h.top)/x.y,bottom:(I.bottom-$.bottom+h.bottom)/x.y,left:($.left-I.left+h.left)/x.x,right:(I.right-$.right+h.right)/x.x}}const Rd=t=>({name:"arrow",options:t,async fn(r){const{x:o,y:i,placement:e,rects:n,platform:s,elements:l,middlewareData:u}=r,{element:c,padding:m=0}=ye(t,r)||{};if(c==null)return{};const f=Fi(m),b={x:o,y:i},p=Rr(e),h=Dr(p),v=await s.getDimensions(c),y=p==="y",$=y?"top":"left",_=y?"bottom":"right",k=y?"clientHeight":"clientWidth",x=n.reference[h]+n.reference[p]-b[p]-n.floating[h],I=b[p]-n.reference[p],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let w=N?N[k]:0;(!w||!await(s.isElement==null?void 0:s.isElement(N)))&&(w=l.floating[k]||n.floating[h]);const S=x/2-I/2,T=w/2-v[h]/2-1,R=Ie(f[$],T),F=Ie(f[_],T),V=R,W=w-v[h]-F,M=w/2-v[h]/2+S,G=Sr(V,M,W),U=!u.arrow&&He(e)!=null&&M!==G&&n.reference[h]/2-(M<V?R:F)-v[h]/2<0,z=U?M<V?M-V:M-W:0;return{[p]:b[p]+z,data:{[p]:G,centerOffset:M-G-z,...U&&{alignmentOffset:z}},reset:U}}}),Ud=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(r){var o,i;const{placement:e,middlewareData:n,rects:s,initialPlacement:l,platform:u,elements:c}=r,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:b,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...y}=ye(t,r);if((o=n.arrow)!=null&&o.alignmentOffset)return{};const $=xe(e),_=fe(l),k=xe(l)===l,x=await(u.isRTL==null?void 0:u.isRTL(c.floating)),I=b||(k||!v?[Ut(l)]:Ed(l)),N=h!=="none";!b&&N&&I.push(...Td(l,v,h,x));const w=[l,...I],S=await ut(r,y),T=[];let R=((i=n.flip)==null?void 0:i.overflows)||[];if(m&&T.push(S[$]),f){const M=Nd(e,s,x);T.push(S[M[0]],S[M[1]])}if(R=[...R,{placement:e,overflows:T}],!T.every(M=>M<=0)){var F,V;const M=(((F=n.flip)==null?void 0:F.index)||0)+1,G=w[M];if(G&&(!(f==="alignment"?_!==fe(G):!1)||R.every(j=>fe(j.placement)===_?j.overflows[0]>0:!0)))return{data:{index:M,overflows:R},reset:{placement:G}};let U=(V=R.filter(z=>z.overflows[0]<=0).sort((z,j)=>z.overflows[1]-j.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(p){case"bestFit":{var W;const z=(W=R.filter(j=>{if(N){const q=fe(j.placement);return q===_||q==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(q=>q>0).reduce((q,te)=>q+te,0)]).sort((j,q)=>j[1]-q[1])[0])==null?void 0:W[0];z&&(U=z);break}case"initialPlacement":U=l;break}if(e!==U)return{reset:{placement:U}}}return{}}}};function An(t,r){return{top:t.top-r.height,right:t.right-r.width,bottom:t.bottom-r.height,left:t.left-r.width}}function Dn(t){return Sd.some(r=>t[r]>=0)}const zd=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(r){const{rects:o}=r,{strategy:i="referenceHidden",...e}=ye(t,r);switch(i){case"referenceHidden":{const n=await ut(r,{...e,elementContext:"reference"}),s=An(n,o.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Dn(s)}}}case"escaped":{const n=await ut(r,{...e,altBoundary:!0}),s=An(n,o.floating);return{data:{escapedOffsets:s,escaped:Dn(s)}}}default:return{}}}}},Vi=new Set(["left","top"]);async function Md(t,r){const{placement:o,platform:i,elements:e}=t,n=await(i.isRTL==null?void 0:i.isRTL(e.floating)),s=xe(o),l=He(o),u=fe(o)==="y",c=Vi.has(s)?-1:1,m=n&&u?-1:1,f=ye(r,t);let{mainAxis:b,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof h=="number"&&(p=l==="end"?h*-1:h),u?{x:p*m,y:b*c}:{x:b*c,y:p*m}}const Ld=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(r){var o,i;const{x:e,y:n,placement:s,middlewareData:l}=r,u=await Md(r,t);return s===((o=l.offset)==null?void 0:o.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:e+u.x,y:n+u.y,data:{...u,placement:s}}}}},Zd=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(r){const{x:o,y:i,placement:e}=r,{mainAxis:n=!0,crossAxis:s=!1,limiter:l={fn:y=>{let{x:$,y:_}=y;return{x:$,y:_}}},...u}=ye(t,r),c={x:o,y:i},m=await ut(r,u),f=fe(xe(e)),b=Ar(f);let p=c[b],h=c[f];if(n){const y=b==="y"?"top":"left",$=b==="y"?"bottom":"right",_=p+m[y],k=p-m[$];p=Sr(_,p,k)}if(s){const y=f==="y"?"top":"left",$=f==="y"?"bottom":"right",_=h+m[y],k=h-m[$];h=Sr(_,h,k)}const v=l.fn({...r,[b]:p,[f]:h});return{...v,data:{x:v.x-o,y:v.y-i,enabled:{[b]:n,[f]:s}}}}}},Fd=function(t){return t===void 0&&(t={}),{options:t,fn(r){const{x:o,y:i,placement:e,rects:n,middlewareData:s}=r,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=ye(t,r),m={x:o,y:i},f=fe(e),b=Ar(f);let p=m[b],h=m[f];const v=ye(l,r),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const k=b==="y"?"height":"width",x=n.reference[b]-n.floating[k]+y.mainAxis,I=n.reference[b]+n.reference[k]-y.mainAxis;p<x?p=x:p>I&&(p=I)}if(c){var $,_;const k=b==="y"?"width":"height",x=Vi.has(xe(e)),I=n.reference[f]-n.floating[k]+(x&&(($=s.offset)==null?void 0:$[f])||0)+(x?0:y.crossAxis),N=n.reference[f]+n.reference[k]+(x?0:((_=s.offset)==null?void 0:_[f])||0)-(x?y.crossAxis:0);h<I?h=I:h>N&&(h=N)}return{[b]:p,[f]:h}}}},Vd=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(r){var o,i;const{placement:e,rects:n,platform:s,elements:l}=r,{apply:u=()=>{},...c}=ye(t,r),m=await ut(r,c),f=xe(e),b=He(e),p=fe(e)==="y",{width:h,height:v}=n.floating;let y,$;f==="top"||f==="bottom"?(y=f,$=b===(await(s.isRTL==null?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):($=f,y=b==="end"?"top":"bottom");const _=v-m.top-m.bottom,k=h-m.left-m.right,x=Ie(v-m[y],_),I=Ie(h-m[$],k),N=!r.middlewareData.shift;let w=x,S=I;if((o=r.middlewareData.shift)!=null&&o.enabled.x&&(S=k),(i=r.middlewareData.shift)!=null&&i.enabled.y&&(w=_),N&&!b){const R=re(m.left,0),F=re(m.right,0),V=re(m.top,0),W=re(m.bottom,0);p?S=h-2*(R!==0||F!==0?R+F:re(m.left,m.right)):w=v-2*(V!==0||W!==0?V+W:re(m.top,m.bottom))}await u({...r,availableWidth:S,availableHeight:w});const T=await s.getDimensions(l.floating);return h!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function Vt(){return typeof window<"u"}function Xe(t){return Wi(t)?(t.nodeName||"").toLowerCase():"#document"}function ne(t){var r;return(t==null||(r=t.ownerDocument)==null?void 0:r.defaultView)||window}function ve(t){var r;return(r=(Wi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:r.documentElement}function Wi(t){return Vt()?t instanceof Node||t instanceof ne(t).Node:!1}function le(t){return Vt()?t instanceof Element||t instanceof ne(t).Element:!1}function pe(t){return Vt()?t instanceof HTMLElement||t instanceof ne(t).HTMLElement:!1}function Rn(t){return!Vt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ne(t).ShadowRoot}const Wd=new Set(["inline","contents"]);function gt(t){const{overflow:r,overflowX:o,overflowY:i,display:e}=ce(t);return/auto|scroll|overlay|hidden|clip/.test(r+i+o)&&!Wd.has(e)}const Bd=new Set(["table","td","th"]);function Gd(t){return Bd.has(Xe(t))}const Jd=[":popover-open",":modal"];function Wt(t){return Jd.some(r=>{try{return t.matches(r)}catch{return!1}})}const qd=["transform","translate","scale","rotate","perspective"],Kd=["transform","translate","scale","rotate","perspective","filter"],Hd=["paint","layout","strict","content"];function Ur(t){const r=zr(),o=le(t)?ce(t):t;return qd.some(i=>o[i]?o[i]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!r&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!r&&(o.filter?o.filter!=="none":!1)||Kd.some(i=>(o.willChange||"").includes(i))||Hd.some(i=>(o.contain||"").includes(i))}function Xd(t){let r=ke(t);for(;pe(r)&&!Be(r);){if(Ur(r))return r;if(Wt(r))return null;r=ke(r)}return null}function zr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Yd=new Set(["html","body","#document"]);function Be(t){return Yd.has(Xe(t))}function ce(t){return ne(t).getComputedStyle(t)}function Bt(t){return le(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ke(t){if(Xe(t)==="html")return t;const r=t.assignedSlot||t.parentNode||Rn(t)&&t.host||ve(t);return Rn(r)?r.host:r}function Bi(t){const r=ke(t);return Be(r)?t.ownerDocument?t.ownerDocument.body:t.body:pe(r)&>(r)?r:Bi(r)}function dt(t,r,o){var i;r===void 0&&(r=[]),o===void 0&&(o=!0);const e=Bi(t),n=e===((i=t.ownerDocument)==null?void 0:i.body),s=ne(e);if(n){const l=kr(s);return r.concat(s,s.visualViewport||[],gt(e)?e:[],l&&o?dt(l):[])}return r.concat(e,dt(e,[],o))}function kr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Gi(t){const r=ce(t);let o=parseFloat(r.width)||0,i=parseFloat(r.height)||0;const e=pe(t),n=e?t.offsetWidth:o,s=e?t.offsetHeight:i,l=Rt(o)!==n||Rt(i)!==s;return l&&(o=n,i=s),{width:o,height:i,$:l}}function Mr(t){return le(t)?t:t.contextElement}function Ve(t){const r=Mr(t);if(!pe(r))return ge(1);const o=r.getBoundingClientRect(),{width:i,height:e,$:n}=Gi(r);let s=(n?Rt(o.width):o.width)/i,l=(n?Rt(o.height):o.height)/e;return(!s||!Number.isFinite(s))&&(s=1),(!l||!Number.isFinite(l))&&(l=1),{x:s,y:l}}const Qd=ge(0);function Ji(t){const r=ne(t);return!zr()||!r.visualViewport?Qd:{x:r.visualViewport.offsetLeft,y:r.visualViewport.offsetTop}}function em(t,r,o){return r===void 0&&(r=!1),!o||r&&o!==ne(t)?!1:r}function Oe(t,r,o,i){r===void 0&&(r=!1),o===void 0&&(o=!1);const e=t.getBoundingClientRect(),n=Mr(t);let s=ge(1);r&&(i?le(i)&&(s=Ve(i)):s=Ve(t));const l=em(n,o,i)?Ji(n):ge(0);let u=(e.left+l.x)/s.x,c=(e.top+l.y)/s.y,m=e.width/s.x,f=e.height/s.y;if(n){const b=ne(n),p=i&&le(i)?ne(i):i;let h=b,v=kr(h);for(;v&&i&&p!==h;){const y=Ve(v),$=v.getBoundingClientRect(),_=ce(v),k=$.left+(v.clientLeft+parseFloat(_.paddingLeft))*y.x,x=$.top+(v.clientTop+parseFloat(_.paddingTop))*y.y;u*=y.x,c*=y.y,m*=y.x,f*=y.y,u+=k,c+=x,h=ne(v),v=kr(h)}}return zt({width:m,height:f,x:u,y:c})}function Gt(t,r){const o=Bt(t).scrollLeft;return r?r.left+o:Oe(ve(t)).left+o}function qi(t,r){const o=t.getBoundingClientRect(),i=o.left+r.scrollLeft-Gt(t,o),e=o.top+r.scrollTop;return{x:i,y:e}}function tm(t){let{elements:r,rect:o,offsetParent:i,strategy:e}=t;const n=e==="fixed",s=ve(i),l=r?Wt(r.floating):!1;if(i===s||l&&n)return o;let u={scrollLeft:0,scrollTop:0},c=ge(1);const m=ge(0),f=pe(i);if((f||!f&&!n)&&((Xe(i)!=="body"||gt(s))&&(u=Bt(i)),pe(i))){const p=Oe(i);c=Ve(i),m.x=p.x+i.clientLeft,m.y=p.y+i.clientTop}const b=s&&!f&&!n?qi(s,u):ge(0);return{width:o.width*c.x,height:o.height*c.y,x:o.x*c.x-u.scrollLeft*c.x+m.x+b.x,y:o.y*c.y-u.scrollTop*c.y+m.y+b.y}}function rm(t){return Array.from(t.getClientRects())}function nm(t){const r=ve(t),o=Bt(t),i=t.ownerDocument.body,e=re(r.scrollWidth,r.clientWidth,i.scrollWidth,i.clientWidth),n=re(r.scrollHeight,r.clientHeight,i.scrollHeight,i.clientHeight);let s=-o.scrollLeft+Gt(t);const l=-o.scrollTop;return ce(i).direction==="rtl"&&(s+=re(r.clientWidth,i.clientWidth)-e),{width:e,height:n,x:s,y:l}}const Un=25;function im(t,r){const o=ne(t),i=ve(t),e=o.visualViewport;let n=i.clientWidth,s=i.clientHeight,l=0,u=0;if(e){n=e.width,s=e.height;const m=zr();(!m||m&&r==="fixed")&&(l=e.offsetLeft,u=e.offsetTop)}const c=Gt(i);if(c<=0){const m=i.ownerDocument,f=m.body,b=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,h=Math.abs(i.clientWidth-f.clientWidth-p);h<=Un&&(n-=h)}else c<=Un&&(n+=c);return{width:n,height:s,x:l,y:u}}const om=new Set(["absolute","fixed"]);function am(t,r){const o=Oe(t,!0,r==="fixed"),i=o.top+t.clientTop,e=o.left+t.clientLeft,n=pe(t)?Ve(t):ge(1),s=t.clientWidth*n.x,l=t.clientHeight*n.y,u=e*n.x,c=i*n.y;return{width:s,height:l,x:u,y:c}}function zn(t,r,o){let i;if(r==="viewport")i=im(t,o);else if(r==="document")i=nm(ve(t));else if(le(r))i=am(r,o);else{const e=Ji(t);i={x:r.x-e.x,y:r.y-e.y,width:r.width,height:r.height}}return zt(i)}function Ki(t,r){const o=ke(t);return o===r||!le(o)||Be(o)?!1:ce(o).position==="fixed"||Ki(o,r)}function sm(t,r){const o=r.get(t);if(o)return o;let i=dt(t,[],!1).filter(l=>le(l)&&Xe(l)!=="body"),e=null;const n=ce(t).position==="fixed";let s=n?ke(t):t;for(;le(s)&&!Be(s);){const l=ce(s),u=Ur(s);!u&&l.position==="fixed"&&(e=null),(n?!u&&!e:!u&&l.position==="static"&&!!e&&om.has(e.position)||gt(s)&&!u&&Ki(t,s))?i=i.filter(m=>m!==s):e=l,s=ke(s)}return r.set(t,i),i}function lm(t){let{element:r,boundary:o,rootBoundary:i,strategy:e}=t;const s=[...o==="clippingAncestors"?Wt(r)?[]:sm(r,this._c):[].concat(o),i],l=s[0],u=s.reduce((c,m)=>{const f=zn(r,m,e);return c.top=re(f.top,c.top),c.right=Ie(f.right,c.right),c.bottom=Ie(f.bottom,c.bottom),c.left=re(f.left,c.left),c},zn(r,l,e));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function cm(t){const{width:r,height:o}=Gi(t);return{width:r,height:o}}function um(t,r,o){const i=pe(r),e=ve(r),n=o==="fixed",s=Oe(t,!0,n,r);let l={scrollLeft:0,scrollTop:0};const u=ge(0);function c(){u.x=Gt(e)}if(i||!i&&!n)if((Xe(r)!=="body"||gt(e))&&(l=Bt(r)),i){const p=Oe(r,!0,n,r);u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}else e&&c();n&&!i&&e&&c();const m=e&&!i&&!n?qi(e,l):ge(0),f=s.left+l.scrollLeft-u.x-m.x,b=s.top+l.scrollTop-u.y-m.y;return{x:f,y:b,width:s.width,height:s.height}}function lr(t){return ce(t).position==="static"}function Mn(t,r){if(!pe(t)||ce(t).position==="fixed")return null;if(r)return r(t);let o=t.offsetParent;return ve(t)===o&&(o=o.ownerDocument.body),o}function Hi(t,r){const o=ne(t);if(Wt(t))return o;if(!pe(t)){let e=ke(t);for(;e&&!Be(e);){if(le(e)&&!lr(e))return e;e=ke(e)}return o}let i=Mn(t,r);for(;i&&Gd(i)&&lr(i);)i=Mn(i,r);return i&&Be(i)&&lr(i)&&!Ur(i)?o:i||Xd(t)||o}const dm=async function(t){const r=this.getOffsetParent||Hi,o=this.getDimensions,i=await o(t.floating);return{reference:um(t.reference,await r(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function mm(t){return ce(t).direction==="rtl"}const fm={convertOffsetParentRelativeRectToViewportRelativeRect:tm,getDocumentElement:ve,getClippingRect:lm,getOffsetParent:Hi,getElementRects:dm,getClientRects:rm,getDimensions:cm,getScale:Ve,isElement:le,isRTL:mm};function Xi(t,r){return t.x===r.x&&t.y===r.y&&t.width===r.width&&t.height===r.height}function gm(t,r){let o=null,i;const e=ve(t);function n(){var l;clearTimeout(i),(l=o)==null||l.disconnect(),o=null}function s(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),n();const c=t.getBoundingClientRect(),{left:m,top:f,width:b,height:p}=c;if(l||r(),!b||!p)return;const h=_t(f),v=_t(e.clientWidth-(m+b)),y=_t(e.clientHeight-(f+p)),$=_t(m),k={rootMargin:-h+"px "+-v+"px "+-y+"px "+-$+"px",threshold:re(0,Ie(1,u))||1};let x=!0;function I(N){const w=N[0].intersectionRatio;if(w!==u){if(!x)return s();w?s(!1,w):i=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!Xi(c,t.getBoundingClientRect())&&s(),x=!1}try{o=new IntersectionObserver(I,{...k,root:e.ownerDocument})}catch{o=new IntersectionObserver(I,k)}o.observe(t)}return s(!0),n}function pm(t,r,o,i){i===void 0&&(i={});const{ancestorScroll:e=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,c=Mr(t),m=e||n?[...c?dt(c):[],...dt(r)]:[];m.forEach($=>{e&&$.addEventListener("scroll",o,{passive:!0}),n&&$.addEventListener("resize",o)});const f=c&&l?gm(c,o):null;let b=-1,p=null;s&&(p=new ResizeObserver($=>{let[_]=$;_&&_.target===c&&p&&(p.unobserve(r),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var k;(k=p)==null||k.observe(r)})),o()}),c&&!u&&p.observe(c),p.observe(r));let h,v=u?Oe(t):null;u&&y();function y(){const $=Oe(t);v&&!Xi(v,$)&&o(),v=$,h=requestAnimationFrame(y)}return o(),()=>{var $;m.forEach(_=>{e&&_.removeEventListener("scroll",o),n&&_.removeEventListener("resize",o)}),f?.(),($=p)==null||$.disconnect(),p=null,u&&cancelAnimationFrame(h)}}const vm=Ld,hm=Zd,bm=Ud,ym=Vd,xm=zd,Ln=Rd,$m=Fd,_m=(t,r,o)=>{const i=new Map,e={platform:fm,...o},n={...e.platform,_c:i};return Dd(t,r,{...e,platform:n})};var wm=typeof document<"u",Sm=function(){},Ct=wm?P.useLayoutEffect:Sm;function Mt(t,r){if(t===r)return!0;if(typeof t!=typeof r)return!1;if(typeof t=="function"&&t.toString()===r.toString())return!0;let o,i,e;if(t&&r&&typeof t=="object"){if(Array.isArray(t)){if(o=t.length,o!==r.length)return!1;for(i=o;i--!==0;)if(!Mt(t[i],r[i]))return!1;return!0}if(e=Object.keys(t),o=e.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(r,e[i]))return!1;for(i=o;i--!==0;){const n=e[i];if(!(n==="_owner"&&t.$$typeof)&&!Mt(t[n],r[n]))return!1}return!0}return t!==t&&r!==r}function Yi(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Zn(t,r){const o=Yi(t);return Math.round(r*o)/o}function cr(t){const r=g.useRef(t);return Ct(()=>{r.current=t}),r}function Im(t){t===void 0&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:e,elements:{reference:n,floating:s}={},transform:l=!0,whileElementsMounted:u,open:c}=t,[m,f]=g.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[b,p]=g.useState(i);Mt(b,i)||p(i);const[h,v]=g.useState(null),[y,$]=g.useState(null),_=g.useCallback(j=>{j!==N.current&&(N.current=j,v(j))},[]),k=g.useCallback(j=>{j!==w.current&&(w.current=j,$(j))},[]),x=n||h,I=s||y,N=g.useRef(null),w=g.useRef(null),S=g.useRef(m),T=u!=null,R=cr(u),F=cr(e),V=cr(c),W=g.useCallback(()=>{if(!N.current||!w.current)return;const j={placement:r,strategy:o,middleware:b};F.current&&(j.platform=F.current),_m(N.current,w.current,j).then(q=>{const te={...q,isPositioned:V.current!==!1};M.current&&!Mt(S.current,te)&&(S.current=te,ti.flushSync(()=>{f(te)}))})},[b,r,o,F,V]);Ct(()=>{c===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[c]);const M=g.useRef(!1);Ct(()=>(M.current=!0,()=>{M.current=!1}),[]),Ct(()=>{if(x&&(N.current=x),I&&(w.current=I),x&&I){if(R.current)return R.current(x,I,W);W()}},[x,I,W,R,T]);const G=g.useMemo(()=>({reference:N,floating:w,setReference:_,setFloating:k}),[_,k]),U=g.useMemo(()=>({reference:x,floating:I}),[x,I]),z=g.useMemo(()=>{const j={position:o,left:0,top:0};if(!U.floating)return j;const q=Zn(U.floating,m.x),te=Zn(U.floating,m.y);return l?{...j,transform:"translate("+q+"px, "+te+"px)",...Yi(U.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:q,top:te}},[o,l,U.floating,m.x,m.y]);return g.useMemo(()=>({...m,update:W,refs:G,elements:U,floatingStyles:z}),[m,W,G,U,z])}const km=t=>{function r(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:t,fn(o){const{element:i,padding:e}=typeof t=="function"?t(o):t;return i&&r(i)?i.current!=null?Ln({element:i.current,padding:e}).fn(o):{}:i?Ln({element:i,padding:e}).fn(o):{}}}},jm=(t,r)=>({...vm(t),options:[t,r]}),Nm=(t,r)=>({...hm(t),options:[t,r]}),Em=(t,r)=>({...$m(t),options:[t,r]}),Om=(t,r)=>({...bm(t),options:[t,r]}),Cm=(t,r)=>({...ym(t),options:[t,r]}),Pm=(t,r)=>({...xm(t),options:[t,r]}),Tm=(t,r)=>({...km(t),options:[t,r]});var Am="Arrow",Qi=g.forwardRef((t,r)=>{const{children:o,width:i=10,height:e=5,...n}=t;return d.jsx(H.svg,{...n,ref:r,width:i,height:e,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?o:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qi.displayName=Am;var Dm=Qi;function Rm(t){const[r,o]=g.useState(void 0);return oe(()=>{if(t){o({width:t.offsetWidth,height:t.offsetHeight});const i=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;const n=e[0];let s,l;if("borderBoxSize"in n){const u=n.borderBoxSize,c=Array.isArray(u)?u[0]:u;s=c.inlineSize,l=c.blockSize}else s=t.offsetWidth,l=t.offsetHeight;o({width:s,height:l})});return i.observe(t,{box:"border-box"}),()=>i.unobserve(t)}else o(void 0)},[t]),r}var Lr="Popper",[eo,Jt]=ft(Lr),[Um,to]=eo(Lr),ro=t=>{const{__scopePopper:r,children:o}=t,[i,e]=g.useState(null);return d.jsx(Um,{scope:r,anchor:i,onAnchorChange:e,children:o})};ro.displayName=Lr;var no="PopperAnchor",io=g.forwardRef((t,r)=>{const{__scopePopper:o,virtualRef:i,...e}=t,n=to(no,o),s=g.useRef(null),l=ee(r,s),u=g.useRef(null);return g.useEffect(()=>{const c=u.current;u.current=i?.current||s.current,c!==u.current&&n.onAnchorChange(u.current)}),i?null:d.jsx(H.div,{...e,ref:l})});io.displayName=no;var Zr="PopperContent",[zm,Mm]=eo(Zr),oo=g.forwardRef((t,r)=>{const{__scopePopper:o,side:i="bottom",sideOffset:e=0,align:n="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:c=[],collisionPadding:m=0,sticky:f="partial",hideWhenDetached:b=!1,updatePositionStrategy:p="optimized",onPlaced:h,...v}=t,y=to(Zr,o),[$,_]=g.useState(null),k=ee(r,Z=>_(Z)),[x,I]=g.useState(null),N=Rm(x),w=N?.width??0,S=N?.height??0,T=i+(n!=="center"?"-"+n:""),R=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},F=Array.isArray(c)?c:[c],V=F.length>0,W={padding:R,boundary:F.filter(Zm),altBoundary:V},{refs:M,floatingStyles:G,placement:U,isPositioned:z,middlewareData:j}=Im({strategy:"fixed",placement:T,whileElementsMounted:(...Z)=>pm(...Z,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[jm({mainAxis:e+S,alignmentAxis:s}),u&&Nm({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Em():void 0,...W}),u&&Om({...W}),Cm({...W,apply:({elements:Z,rects:et,availableWidth:Te,availableHeight:Ae})=>{const{width:tt,height:De}=et.reference,bt=Z.floating.style;bt.setProperty("--radix-popper-available-width",`${Te}px`),bt.setProperty("--radix-popper-available-height",`${Ae}px`),bt.setProperty("--radix-popper-anchor-width",`${tt}px`),bt.setProperty("--radix-popper-anchor-height",`${De}px`)}}),x&&Tm({element:x,padding:l}),Fm({arrowWidth:w,arrowHeight:S}),b&&Pm({strategy:"referenceHidden",...W})]}),[q,te]=lo(U),Ye=Ee(h);oe(()=>{z&&Ye?.()},[z,Ye]);const Qe=j.arrow?.x,X=j.arrow?.y,Q=j.arrow?.centerOffset!==0,[Pe,ht]=g.useState();return oe(()=>{$&&ht(window.getComputedStyle($).zIndex)},[$]),d.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:z?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(zm,{scope:o,placedSide:q,onArrowChange:I,arrowX:Qe,arrowY:X,shouldHideArrow:Q,children:d.jsx(H.div,{"data-side":q,"data-align":te,...v,ref:k,style:{...v.style,animation:z?void 0:"none"}})})})});oo.displayName=Zr;var ao="PopperArrow",Lm={top:"bottom",right:"left",bottom:"top",left:"right"},so=g.forwardRef(function(r,o){const{__scopePopper:i,...e}=r,n=Mm(ao,i),s=Lm[n.placedSide];return d.jsx("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:d.jsx(Dm,{...e,ref:o,style:{...e.style,display:"block"}})})});so.displayName=ao;function Zm(t){return t!==null}var Fm=t=>({name:"transformOrigin",options:t,fn(r){const{placement:o,rects:i,middlewareData:e}=r,s=e.arrow?.centerOffset!==0,l=s?0:t.arrowWidth,u=s?0:t.arrowHeight,[c,m]=lo(o),f={start:"0%",center:"50%",end:"100%"}[m],b=(e.arrow?.x??0)+l/2,p=(e.arrow?.y??0)+u/2;let h="",v="";return c==="bottom"?(h=s?f:`${b}px`,v=`${-u}px`):c==="top"?(h=s?f:`${b}px`,v=`${i.floating.height+u}px`):c==="right"?(h=`${-u}px`,v=s?f:`${p}px`):c==="left"&&(h=`${i.floating.width+u}px`,v=s?f:`${p}px`),{data:{x:h,y:v}}}});function lo(t){const[r,o="center"]=t.split("-");return[r,o]}var co=ro,Fr=io,uo=oo,mo=so,Vm="Portal",qt=g.forwardRef((t,r)=>{const{container:o,...i}=t,[e,n]=g.useState(!1);oe(()=>n(!0),[]);const s=o||e&&globalThis?.document?.body;return s?ei.createPortal(d.jsx(H.div,{...i,ref:r}),s):null});qt.displayName=Vm;function Wm(t,r){return g.useReducer((o,i)=>r[o][i]??o,t)}var $e=t=>{const{present:r,children:o}=t,i=Bm(r),e=typeof o=="function"?o({present:i.isPresent}):g.Children.only(o),n=ee(i.ref,Gm(e));return typeof o=="function"||i.isPresent?g.cloneElement(e,{ref:n}):null};$e.displayName="Presence";function Bm(t){const[r,o]=g.useState(),i=g.useRef(null),e=g.useRef(t),n=g.useRef("none"),s=t?"mounted":"unmounted",[l,u]=Wm(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=wt(i.current);n.current=l==="mounted"?c:"none"},[l]),oe(()=>{const c=i.current,m=e.current;if(m!==t){const b=n.current,p=wt(c);t?u("MOUNT"):p==="none"||c?.display==="none"?u("UNMOUNT"):u(m&&b!==p?"ANIMATION_OUT":"UNMOUNT"),e.current=t}},[t,u]),oe(()=>{if(r){let c;const m=r.ownerDocument.defaultView??window,f=p=>{const v=wt(i.current).includes(CSS.escape(p.animationName));if(p.target===r&&v&&(u("ANIMATION_END"),!e.current)){const y=r.style.animationFillMode;r.style.animationFillMode="forwards",c=m.setTimeout(()=>{r.style.animationFillMode==="forwards"&&(r.style.animationFillMode=y)})}},b=p=>{p.target===r&&(n.current=wt(i.current))};return r.addEventListener("animationstart",b),r.addEventListener("animationcancel",f),r.addEventListener("animationend",f),()=>{m.clearTimeout(c),r.removeEventListener("animationstart",b),r.removeEventListener("animationcancel",f),r.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[r,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:g.useCallback(c=>{i.current=c?getComputedStyle(c):null,o(c)},[])}}function wt(t){return t?.animationName||"none"}function Gm(t){let r=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?t.ref:(r=Object.getOwnPropertyDescriptor(t,"ref")?.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?t.props.ref:t.props.ref||t.ref)}var Jm=g[" useInsertionEffect ".trim().toString()]||oe;function Kt({prop:t,defaultProp:r,onChange:o=()=>{},caller:i}){const[e,n,s]=qm({defaultProp:r,onChange:o}),l=t!==void 0,u=l?t:e;{const m=g.useRef(t!==void 0);g.useEffect(()=>{const f=m.current;f!==l&&console.warn(`${i} is changing from ${f?"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.`),m.current=l},[l,i])}const c=g.useCallback(m=>{if(l){const f=Km(m)?m(t):m;f!==t&&s.current?.(f)}else n(m)},[l,t,n,s]);return[u,c]}function qm({defaultProp:t,onChange:r}){const[o,i]=g.useState(t),e=g.useRef(o),n=g.useRef(r);return Jm(()=>{n.current=r},[r]),g.useEffect(()=>{e.current!==o&&(n.current?.(o),e.current=o)},[o,e]),[o,i,n]}function Km(t){return typeof t=="function"}var Hm=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"}),Xm="VisuallyHidden",fo=g.forwardRef((t,r)=>d.jsx(H.span,{...t,ref:r,style:{...Hm,...t.style}}));fo.displayName=Xm;var Ym=fo,[Ht]=ft("Tooltip",[Jt]),Xt=Jt(),go="TooltipProvider",Qm=700,jr="tooltip.open",[ef,Vr]=Ht(go),po=t=>{const{__scopeTooltip:r,delayDuration:o=Qm,skipDelayDuration:i=300,disableHoverableContent:e=!1,children:n}=t,s=g.useRef(!0),l=g.useRef(!1),u=g.useRef(0);return g.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),d.jsx(ef,{scope:r,isOpenDelayedRef:s,delayDuration:o,onOpen:g.useCallback(()=>{window.clearTimeout(u.current),s.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s.current=!0,i)},[i]),isPointerInTransitRef:l,onPointerInTransitChange:g.useCallback(c=>{l.current=c},[]),disableHoverableContent:e,children:n})};po.displayName=go;var mt="Tooltip",[tf,pt]=Ht(mt),vo=t=>{const{__scopeTooltip:r,children:o,open:i,defaultOpen:e,onOpenChange:n,disableHoverableContent:s,delayDuration:l}=t,u=Vr(mt,t.__scopeTooltip),c=Xt(r),[m,f]=g.useState(null),b=Fe(),p=g.useRef(0),h=s??u.disableHoverableContent,v=l??u.delayDuration,y=g.useRef(!1),[$,_]=Kt({prop:i,defaultProp:e??!1,onChange:w=>{w?(u.onOpen(),document.dispatchEvent(new CustomEvent(jr))):u.onClose(),n?.(w)},caller:mt}),k=g.useMemo(()=>$?y.current?"delayed-open":"instant-open":"closed",[$]),x=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y.current=!1,_(!0)},[_]),I=g.useCallback(()=>{window.clearTimeout(p.current),p.current=0,_(!1)},[_]),N=g.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{y.current=!0,_(!0),p.current=0},v)},[v,_]);return g.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),d.jsx(co,{...c,children:d.jsx(tf,{scope:r,contentId:b,open:$,stateAttribute:k,trigger:m,onTriggerChange:f,onTriggerEnter:g.useCallback(()=>{u.isOpenDelayedRef.current?N():x()},[u.isOpenDelayedRef,N,x]),onTriggerLeave:g.useCallback(()=>{h?I():(window.clearTimeout(p.current),p.current=0)},[I,h]),onOpen:x,onClose:I,disableHoverableContent:h,children:o})})};vo.displayName=mt;var Nr="TooltipTrigger",ho=g.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,e=pt(Nr,o),n=Vr(Nr,o),s=Xt(o),l=g.useRef(null),u=ee(r,l,e.onTriggerChange),c=g.useRef(!1),m=g.useRef(!1),f=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),d.jsx(Fr,{asChild:!0,...s,children:d.jsx(H.button,{"aria-describedby":e.open?e.contentId:void 0,"data-state":e.stateAttribute,...i,ref:u,onPointerMove:J(t.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!n.isPointerInTransitRef.current&&(e.onTriggerEnter(),m.current=!0)}),onPointerLeave:J(t.onPointerLeave,()=>{e.onTriggerLeave(),m.current=!1}),onPointerDown:J(t.onPointerDown,()=>{e.open&&e.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:J(t.onFocus,()=>{c.current||e.onOpen()}),onBlur:J(t.onBlur,e.onClose),onClick:J(t.onClick,e.onClose)})})});ho.displayName=Nr;var Wr="TooltipPortal",[rf,nf]=Ht(Wr,{forceMount:void 0}),bo=t=>{const{__scopeTooltip:r,forceMount:o,children:i,container:e}=t,n=pt(Wr,r);return d.jsx(rf,{scope:r,forceMount:o,children:d.jsx($e,{present:o||n.open,children:d.jsx(qt,{asChild:!0,container:e,children:i})})})};bo.displayName=Wr;var Ge="TooltipContent",yo=g.forwardRef((t,r)=>{const o=nf(Ge,t.__scopeTooltip),{forceMount:i=o.forceMount,side:e="top",...n}=t,s=pt(Ge,t.__scopeTooltip);return d.jsx($e,{present:i||s.open,children:s.disableHoverableContent?d.jsx(xo,{side:e,...n,ref:r}):d.jsx(of,{side:e,...n,ref:r})})}),of=g.forwardRef((t,r)=>{const o=pt(Ge,t.__scopeTooltip),i=Vr(Ge,t.__scopeTooltip),e=g.useRef(null),n=ee(r,e),[s,l]=g.useState(null),{trigger:u,onClose:c}=o,m=e.current,{onPointerInTransitChange:f}=i,b=g.useCallback(()=>{l(null),f(!1)},[f]),p=g.useCallback((h,v)=>{const y=h.currentTarget,$={x:h.clientX,y:h.clientY},_=cf($,y.getBoundingClientRect()),k=uf($,_),x=df(v.getBoundingClientRect()),I=ff([...k,...x]);l(I),f(!0)},[f]);return g.useEffect(()=>()=>b(),[b]),g.useEffect(()=>{if(u&&m){const h=y=>p(y,m),v=y=>p(y,u);return u.addEventListener("pointerleave",h),m.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",h),m.removeEventListener("pointerleave",v)}}},[u,m,p,b]),g.useEffect(()=>{if(s){const h=v=>{const y=v.target,$={x:v.clientX,y:v.clientY},_=u?.contains(y)||m?.contains(y),k=!mf($,s);_?b():k&&(b(),c())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[u,m,s,c,b]),d.jsx(xo,{...t,ref:n})}),[af,sf]=Ht(mt,{isInside:!1}),lf=ld("TooltipContent"),xo=g.forwardRef((t,r)=>{const{__scopeTooltip:o,children:i,"aria-label":e,onEscapeKeyDown:n,onPointerDownOutside:s,...l}=t,u=pt(Ge,o),c=Xt(o),{onClose:m}=u;return g.useEffect(()=>(document.addEventListener(jr,m),()=>document.removeEventListener(jr,m)),[m]),g.useEffect(()=>{if(u.trigger){const f=b=>{b.target?.contains(u.trigger)&&m()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,m]),d.jsx(Ft,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:m,children:d.jsxs(uo,{"data-state":u.stateAttribute,...c,...l,ref:r,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:[d.jsx(lf,{children:i}),d.jsx(af,{scope:o,isInside:!0,children:d.jsx(Ym,{id:u.contentId,role:"tooltip",children:e||i})})]})})});yo.displayName=Ge;var $o="TooltipArrow",_o=g.forwardRef((t,r)=>{const{__scopeTooltip:o,...i}=t,e=Xt(o);return sf($o,o).isInside?null:d.jsx(mo,{...e,...i,ref:r})});_o.displayName=$o;function cf(t,r){const o=Math.abs(r.top-t.y),i=Math.abs(r.bottom-t.y),e=Math.abs(r.right-t.x),n=Math.abs(r.left-t.x);switch(Math.min(o,i,e,n)){case n:return"left";case e:return"right";case o:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function uf(t,r,o=5){const i=[];switch(r){case"top":i.push({x:t.x-o,y:t.y+o},{x:t.x+o,y:t.y+o});break;case"bottom":i.push({x:t.x-o,y:t.y-o},{x:t.x+o,y:t.y-o});break;case"left":i.push({x:t.x+o,y:t.y-o},{x:t.x+o,y:t.y+o});break;case"right":i.push({x:t.x-o,y:t.y-o},{x:t.x-o,y:t.y+o});break}return i}function df(t){const{top:r,right:o,bottom:i,left:e}=t;return[{x:e,y:r},{x:o,y:r},{x:o,y:i},{x:e,y:i}]}function mf(t,r){const{x:o,y:i}=t;let e=!1;for(let n=0,s=r.length-1;n<r.length;s=n++){const l=r[n],u=r[s],c=l.x,m=l.y,f=u.x,b=u.y;m>i!=b>i&&o<(f-c)*(i-m)/(b-m)+c&&(e=!e)}return e}function ff(t){const r=t.slice();return r.sort((o,i)=>o.x<i.x?-1:o.x>i.x?1:o.y<i.y?-1:o.y>i.y?1:0),gf(r)}function gf(t){if(t.length<=1)return t.slice();const r=[];for(let i=0;i<t.length;i++){const e=t[i];for(;r.length>=2;){const n=r[r.length-1],s=r[r.length-2];if((n.x-s.x)*(e.y-s.y)>=(n.y-s.y)*(e.x-s.x))r.pop();else break}r.push(e)}r.pop();const o=[];for(let i=t.length-1;i>=0;i--){const e=t[i];for(;o.length>=2;){const n=o[o.length-1],s=o[o.length-2];if((n.x-s.x)*(e.y-s.y)>=(n.y-s.y)*(e.x-s.x))o.pop();else break}o.push(e)}return o.pop(),r.length===1&&o.length===1&&r[0].x===o[0].x&&r[0].y===o[0].y?r:r.concat(o)}var pf=po,vf=vo,hf=ho,bf=bo,yf=yo,xf=_o;function $f({delayDuration:t=0,...r}){return d.jsx(pf,{"data-slot":"tooltip-provider",delayDuration:t,...r})}function wo({...t}){return d.jsx($f,{children:d.jsx(vf,{"data-slot":"tooltip",...t})})}function So({...t}){return d.jsx(hf,{"data-slot":"tooltip-trigger",...t})}function Io({className:t,sideOffset:r=0,children:o,...i}){return d.jsx(bf,{children:d.jsxs(yf,{"data-slot":"tooltip-content",sideOffset:r,className:A("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...i,children:[o,d.jsx(xf,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]"})]})})}const ae=P.forwardRef(({children:t,tooltip:r,side:o="bottom",className:i,...e},n)=>d.jsxs(wo,{children:[d.jsx(So,{asChild:!0,children:d.jsxs(be,{variant:"ghost",size:"icon",...e,className:A("aui-button-icon size-6 p-1",i),ref:n,children:[d.jsx(du,{children:t}),d.jsx("span",{className:"aui-sr-only sr-only",children:r})]})}),d.jsx(Io,{side:o,children:r})]}));ae.displayName="TooltipIconButton";const _f=()=>d.jsx(hr.MarkdownTextPrimitive,{remarkPlugins:[Oa],className:"aui-md",components:If}),ko=P.memo(_f),wf=({language:t,code:r})=>{const{isCopied:o,copyToClipboard:i}=Sf(),e=()=>{!r||o||i(r)};return d.jsxs("div",{className:"aui-code-header-root bg-muted-foreground/15 text-foreground dark:bg-muted-foreground/20 mt-4 flex items-center justify-between gap-4 rounded-t-lg px-4 py-2 text-sm font-semibold",children:[d.jsx("span",{className:"aui-code-header-language lowercase [&>span]:text-xs",children:t}),d.jsxs(ae,{tooltip:"Copy",onClick:e,children:[!o&&d.jsx(xi,{}),o&&d.jsx(Zt,{})]})]})},Sf=({copiedDuration:t=3e3}={})=>{const[r,o]=P.useState(!1);return{isCopied:r,copyToClipboard:e=>{e&&navigator.clipboard.writeText(e).then(()=>{o(!0),setTimeout(()=>o(!1),t)})}}},If=hr.unstable_memoizeMarkdownComponents({h1:({className:t,...r})=>d.jsx("h1",{className:A("aui-md-h1 mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",t),...r}),h2:({className:t,...r})=>d.jsx("h2",{className:A("aui-md-h2 mt-8 mb-4 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",t),...r}),h3:({className:t,...r})=>d.jsx("h3",{className:A("aui-md-h3 mt-6 mb-4 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",t),...r}),h4:({className:t,...r})=>d.jsx("h4",{className:A("aui-md-h4 mt-6 mb-4 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",t),...r}),h5:({className:t,...r})=>d.jsx("h5",{className:A("aui-md-h5 my-4 text-lg font-semibold first:mt-0 last:mb-0",t),...r}),h6:({className:t,...r})=>d.jsx("h6",{className:A("aui-md-h6 my-4 font-semibold first:mt-0 last:mb-0",t),...r}),p:({className:t,...r})=>d.jsx("p",{className:A("aui-md-p mt-5 mb-5 leading-7 first:mt-0 last:mb-0",t),...r}),a:({className:t,...r})=>d.jsx("a",{className:A("aui-md-a text-primary font-medium underline underline-offset-4",t),...r}),blockquote:({className:t,...r})=>d.jsx("blockquote",{className:A("aui-md-blockquote border-l-2 pl-6 italic",t),...r}),ul:({className:t,...r})=>d.jsx("ul",{className:A("aui-md-ul my-5 ml-6 list-disc [&>li]:mt-2",t),...r}),ol:({className:t,...r})=>d.jsx("ol",{className:A("aui-md-ol my-5 ml-6 list-decimal [&>li]:mt-2",t),...r}),hr:({className:t,...r})=>d.jsx("hr",{className:A("aui-md-hr my-5 border-b",t),...r}),table:({className:t,...r})=>d.jsx("table",{className:A("aui-md-table my-5 w-full border-separate border-spacing-0 overflow-y-auto",t),...r}),th:({className:t,...r})=>d.jsx("th",{className:A("aui-md-th bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [[align=center]]:text-center [[align=right]]:text-right",t),...r}),td:({className:t,...r})=>d.jsx("td",{className:A("aui-md-td border-b border-l px-4 py-2 text-left last:border-r [[align=center]]:text-center [[align=right]]:text-right",t),...r}),tr:({className:t,...r})=>d.jsx("tr",{className:A("aui-md-tr m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",t),...r}),sup:({className:t,...r})=>d.jsx("sup",{className:A("aui-md-sup [&>a]:text-xs [&>a]:no-underline",t),...r}),pre:({className:t,...r})=>d.jsx("pre",{className:A("aui-md-pre overflow-x-auto rounded-t-none! rounded-b-lg bg-black p-4 text-white",t),...r}),code:function({className:r,...o}){const i=hr.useIsMarkdownCodeBlock();return d.jsx("code",{className:A(!i&&"aui-md-inline-code bg-muted rounded border font-semibold",r),...o})},CodeHeader:wf}),kf=a.union([a.object({type:a.literal("text"),text:a.string()}),a.object({type:a.literal("image"),data:a.string()})]),jf=a.object({content:a.array(kf)}).or(a._undefined$1()),Nf=({toolName:t,result:r})=>d.jsxs("div",{className:"aui-tool-fallback-root mb-4 flex w-full flex-col gap-3 rounded-lg border py-3",children:[d.jsxs("div",{className:"aui-tool-fallback-header flex items-center gap-2 px-4",children:[d.jsx(Zt,{className:"aui-tool-fallback-icon size-4 text-green-500"}),d.jsxs("p",{className:"aui-tool-fallback-title grow",children:["Called tool: ",d.jsx("b",{children:t})]})]}),Ef(r)]});function Ef(t){return jf.parse(t)?.content?.map(o=>{switch(o.type){case"text":return d.jsx("pre",{className:"aui-tool-fallback-result-content bg-accent max-h-[300px] overflow-y-auto p-4 font-mono whitespace-pre-wrap",children:o.text});case"image":{const i=`data:image/png;base64,${o.data}`;return d.jsx("img",{src:i})}default:return d.jsx("pre",{className:"aui-tool-fallback-result-content whitespace-pre-wrap",children:JSON.stringify(o,null,2)})}})}var Yt="Collapsible",[Of]=ft(Yt),[Cf,Br]=Of(Yt),jo=g.forwardRef((t,r)=>{const{__scopeCollapsible:o,open:i,defaultOpen:e,disabled:n,onOpenChange:s,...l}=t,[u,c]=Kt({prop:i,defaultProp:e??!1,onChange:s,caller:Yt});return d.jsx(Cf,{scope:o,disabled:n,contentId:Fe(),open:u,onOpenToggle:g.useCallback(()=>c(m=>!m),[c]),children:d.jsx(H.div,{"data-state":Jr(u),"data-disabled":n?"":void 0,...l,ref:r})})});jo.displayName=Yt;var No="CollapsibleTrigger",Eo=g.forwardRef((t,r)=>{const{__scopeCollapsible:o,...i}=t,e=Br(No,o);return d.jsx(H.button,{type:"button","aria-controls":e.contentId,"aria-expanded":e.open||!1,"data-state":Jr(e.open),"data-disabled":e.disabled?"":void 0,disabled:e.disabled,...i,ref:r,onClick:J(t.onClick,e.onOpenToggle)})});Eo.displayName=No;var Gr="CollapsibleContent",Oo=g.forwardRef((t,r)=>{const{forceMount:o,...i}=t,e=Br(Gr,t.__scopeCollapsible);return d.jsx($e,{present:o||e.open,children:({present:n})=>d.jsx(Pf,{...i,ref:r,present:n})})});Oo.displayName=Gr;var Pf=g.forwardRef((t,r)=>{const{__scopeCollapsible:o,present:i,children:e,...n}=t,s=Br(Gr,o),[l,u]=g.useState(i),c=g.useRef(null),m=ee(r,c),f=g.useRef(0),b=f.current,p=g.useRef(0),h=p.current,v=s.open||l,y=g.useRef(v),$=g.useRef(void 0);return g.useEffect(()=>{const _=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(_)},[]),oe(()=>{const _=c.current;if(_){$.current=$.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const k=_.getBoundingClientRect();f.current=k.height,p.current=k.width,y.current||(_.style.transitionDuration=$.current.transitionDuration,_.style.animationName=$.current.animationName),u(i)}},[s.open,i]),d.jsx(H.div,{"data-state":Jr(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...n,ref:m,style:{"--radix-collapsible-content-height":b?`${b}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...t.style},children:v&&e})});function Jr(t){return t?"open":"closed"}var Tf=jo;function Af({...t}){return d.jsx(Tf,{"data-slot":"collapsible",...t})}function Df({...t}){return d.jsx(Eo,{"data-slot":"collapsible-trigger",...t})}function Rf({...t}){return d.jsx(Oo,{"data-slot":"collapsible-content",...t})}const Fn=200,Co=({className:t,children:r})=>{const o=P.useRef(null),[i,e]=P.useState(!1),n=E.useScrollLock(o,Fn),s=P.useCallback(l=>{l||n(),e(l)},[n]);return d.jsx(Af,{ref:o,open:i,onOpenChange:s,className:A("aui-reasoning-root mb-4 w-full",t),style:{"--animation-duration":`${Fn}ms`},children:r})};Co.displayName="ReasoningRoot";const Uf=({className:t})=>d.jsx("div",{className:A("aui-reasoning-fade pointer-events-none absolute inset-x-0 bottom-0 z-10 h-16","bg-[linear-gradient(to_top,var(--color-background),transparent)]","fade-in-0 animate-in","group-data-[state=open]/collapsible-content:animate-out","group-data-[state=open]/collapsible-content:fade-out-0","group-data-[state=open]/collapsible-content:delay-[calc(var(--animation-duration)*0.75)]","group-data-[state=open]/collapsible-content:fill-mode-forwards","duration-(--animation-duration)","group-data-[state=open]/collapsible-content:duration-(--animation-duration)",t)}),zf=({active:t,className:r})=>d.jsxs(Df,{className:A("aui-reasoning-trigger group/trigger text-muted-foreground hover:text-foreground -mb-2 flex max-w-[75%] items-center gap-2 py-2 text-sm transition-colors",r,t&&"shimmer"),children:[d.jsx(Uc,{className:"aui-reasoning-trigger-icon size-4 shrink-0"}),d.jsxs("span",{className:"aui-reasoning-trigger-label-wrapper relative inline-block leading-none",children:[d.jsx("span",{children:"Reasoning"}),t?d.jsx("span",{"aria-hidden":!0,className:"aui-reasoning-trigger-shimmer shimmer pointer-events-none absolute inset-0 motion-reduce:animate-none",children:"Reasoning"}):null]}),d.jsx(yi,{className:A("aui-reasoning-trigger-chevron mt-0.5 size-4 shrink-0","transition-transform duration-(--animation-duration) ease-out","group-data-[state=closed]/trigger:-rotate-90","group-data-[state=open]/trigger:rotate-0")})]}),Po=({className:t,children:r,"aria-busy":o})=>d.jsxs(Rf,{className:A("aui-reasoning-content text-muted-foreground relative overflow-hidden text-sm outline-none","group/collapsible-content ease-out","data-[state=closed]:animate-collapsible-up","data-[state=open]:animate-collapsible-down","data-[state=closed]:fill-mode-forwards","data-[state=closed]:pointer-events-none","data-[state=open]:duration-(--animation-duration)","data-[state=closed]:duration-(--animation-duration)",t),"aria-busy":o,children:[r,d.jsx(Uf,{})]});Po.displayName="ReasoningContent";const To=({className:t,children:r})=>d.jsx("div",{className:A("aui-reasoning-text relative z-0 space-y-4 pt-4 pl-6 leading-relaxed","transform-gpu transition-[transform,opacity]","group-data-[state=open]/collapsible-content:animate-in","group-data-[state=closed]/collapsible-content:animate-out","group-data-[state=open]/collapsible-content:fade-in-0","group-data-[state=closed]/collapsible-content:fade-out-0","group-data-[state=open]/collapsible-content:slide-in-from-top-4","group-data-[state=closed]/collapsible-content:slide-out-to-top-4","group-data-[state=open]/collapsible-content:duration-(--animation-duration)","group-data-[state=closed]/collapsible-content:duration-(--animation-duration)","[&_p]:-mb-2",t),children:r});To.displayName="ReasoningText";const Mf=()=>d.jsx(ko,{}),Lf=({children:t,startIndex:r,endIndex:o})=>{const i=E.useAssistantState(({message:e})=>{if(e.status?.type!=="running")return!1;const n=e.parts.length-1;return n<0||e.parts[n]?.type!=="reasoning"?!1:n>=r&&n<=o});return d.jsxs(Co,{children:[d.jsx(zf,{active:i}),d.jsx(Po,{"aria-busy":i,children:d.jsx(To,{children:t})})]})},Ao=P.memo(Mf);Ao.displayName="Reasoning";const Do=P.memo(Lf);Do.displayName="ReasoningGroup";var ur="focusScope.autoFocusOnMount",dr="focusScope.autoFocusOnUnmount",Vn={bubbles:!1,cancelable:!0},Zf="FocusScope",qr=g.forwardRef((t,r)=>{const{loop:o=!1,trapped:i=!1,onMountAutoFocus:e,onUnmountAutoFocus:n,...s}=t,[l,u]=g.useState(null),c=Ee(e),m=Ee(n),f=g.useRef(null),b=ee(r,v=>u(v)),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(i){let v=function(k){if(p.paused||!l)return;const x=k.target;l.contains(x)?f.current=x:Se(f.current,{select:!0})},y=function(k){if(p.paused||!l)return;const x=k.relatedTarget;x!==null&&(l.contains(x)||Se(f.current,{select:!0}))},$=function(k){if(document.activeElement===document.body)for(const I of k)I.removedNodes.length>0&&Se(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const _=new MutationObserver($);return l&&_.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),_.disconnect()}}},[i,l,p.paused]),g.useEffect(()=>{if(l){Bn.add(p);const v=document.activeElement;if(!l.contains(v)){const $=new CustomEvent(ur,Vn);l.addEventListener(ur,c),l.dispatchEvent($),$.defaultPrevented||(Ff(Jf(Ro(l)),{select:!0}),document.activeElement===v&&Se(l))}return()=>{l.removeEventListener(ur,c),setTimeout(()=>{const $=new CustomEvent(dr,Vn);l.addEventListener(dr,m),l.dispatchEvent($),$.defaultPrevented||Se(v??document.body,{select:!0}),l.removeEventListener(dr,m),Bn.remove(p)},0)}}},[l,c,m,p]);const h=g.useCallback(v=>{if(!o&&!i||p.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,$=document.activeElement;if(y&&$){const _=v.currentTarget,[k,x]=Vf(_);k&&x?!v.shiftKey&&$===x?(v.preventDefault(),o&&Se(k,{select:!0})):v.shiftKey&&$===k&&(v.preventDefault(),o&&Se(x,{select:!0})):$===_&&v.preventDefault()}},[o,i,p.paused]);return d.jsx(H.div,{tabIndex:-1,...s,ref:b,onKeyDown:h})});qr.displayName=Zf;function Ff(t,{select:r=!1}={}){const o=document.activeElement;for(const i of t)if(Se(i,{select:r}),document.activeElement!==o)return}function Vf(t){const r=Ro(t),o=Wn(r,t),i=Wn(r.reverse(),t);return[o,i]}function Ro(t){const r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const e=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||e?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)r.push(o.currentNode);return r}function Wn(t,r){for(const o of t)if(!Wf(o,{upTo:r}))return o}function Wf(t,{upTo:r}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(r!==void 0&&t===r)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Bf(t){return t instanceof HTMLInputElement&&"select"in t}function Se(t,{select:r=!1}={}){if(t&&t.focus){const o=document.activeElement;t.focus({preventScroll:!0}),t!==o&&Bf(t)&&r&&t.select()}}var Bn=Gf();function Gf(){let t=[];return{add(r){const o=t[0];r!==o&&o?.pause(),t=Gn(t,r),t.unshift(r)},remove(r){t=Gn(t,r),t[0]?.resume()}}}function Gn(t,r){const o=[...t],i=o.indexOf(r);return i!==-1&&o.splice(i,1),o}function Jf(t){return t.filter(r=>r.tagName!=="A")}var mr=0;function Uo(){g.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Jn()),document.body.insertAdjacentElement("beforeend",t[1]??Jn()),mr++,()=>{mr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),mr--}},[])}function Jn(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var me=function(){return me=Object.assign||function(r){for(var o,i=1,e=arguments.length;i<e;i++){o=arguments[i];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r[n]=o[n])}return r},me.apply(this,arguments)};function zo(t,r){var o={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&r.indexOf(i)<0&&(o[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,i=Object.getOwnPropertySymbols(t);e<i.length;e++)r.indexOf(i[e])<0&&Object.prototype.propertyIsEnumerable.call(t,i[e])&&(o[i[e]]=t[i[e]]);return o}function qf(t,r,o){if(o||arguments.length===2)for(var i=0,e=r.length,n;i<e;i++)(n||!(i in r))&&(n||(n=Array.prototype.slice.call(r,0,i)),n[i]=r[i]);return t.concat(n||Array.prototype.slice.call(r))}var Pt="right-scroll-bar-position",Tt="width-before-scroll-bar",Kf="with-scroll-bars-hidden",Hf="--removed-body-scroll-bar-size";function fr(t,r){return typeof t=="function"?t(r):t&&(t.current=r),t}function Xf(t,r){var o=P.useState(function(){return{value:t,callback:r,facade:{get current(){return o.value},set current(i){var e=o.value;e!==i&&(o.value=i,o.callback(i,e))}}}})[0];return o.callback=r,o.facade}var Yf=typeof window<"u"?g.useLayoutEffect:g.useEffect,qn=new WeakMap;function Qf(t,r){var o=Xf(null,function(i){return t.forEach(function(e){return fr(e,i)})});return Yf(function(){var i=qn.get(o);if(i){var e=new Set(i),n=new Set(t),s=o.current;e.forEach(function(l){n.has(l)||fr(l,null)}),n.forEach(function(l){e.has(l)||fr(l,s)})}qn.set(o,t)},[t]),o}function eg(t){return t}function tg(t,r){r===void 0&&(r=eg);var o=[],i=!1,e={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:t},useMedium:function(n){var s=r(n,i);return o.push(s),function(){o=o.filter(function(l){return l!==s})}},assignSyncMedium:function(n){for(i=!0;o.length;){var s=o;o=[],s.forEach(n)}o={push:function(l){return n(l)},filter:function(){return o}}},assignMedium:function(n){i=!0;var s=[];if(o.length){var l=o;o=[],l.forEach(n),s=o}var u=function(){var m=s;s=[],m.forEach(n)},c=function(){return Promise.resolve().then(u)};c(),o={push:function(m){s.push(m),c()},filter:function(m){return s=s.filter(m),o}}}};return e}function rg(t){t===void 0&&(t={});var r=tg(null);return r.options=me({async:!0,ssr:!1},t),r}var Mo=function(t){var r=t.sideCar,o=zo(t,["sideCar"]);if(!r)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=r.read();if(!i)throw new Error("Sidecar medium not found");return g.createElement(i,me({},o))};Mo.isSideCarExport=!0;function ng(t,r){return t.useMedium(r),Mo}var Lo=rg(),gr=function(){},Qt=g.forwardRef(function(t,r){var o=g.useRef(null),i=g.useState({onScrollCapture:gr,onWheelCapture:gr,onTouchMoveCapture:gr}),e=i[0],n=i[1],s=t.forwardProps,l=t.children,u=t.className,c=t.removeScrollBar,m=t.enabled,f=t.shards,b=t.sideCar,p=t.noRelative,h=t.noIsolation,v=t.inert,y=t.allowPinchZoom,$=t.as,_=$===void 0?"div":$,k=t.gapMode,x=zo(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),I=b,N=Qf([o,r]),w=me(me({},x),e);return g.createElement(g.Fragment,null,m&&g.createElement(I,{sideCar:Lo,removeScrollBar:c,shards:f,noRelative:p,noIsolation:h,inert:v,setCallbacks:n,allowPinchZoom:!!y,lockRef:o,gapMode:k}),s?g.cloneElement(g.Children.only(l),me(me({},w),{ref:N})):g.createElement(_,me({},w,{className:u,ref:N}),l))});Qt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qt.classNames={fullWidth:Tt,zeroRight:Pt};var ig=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function og(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var r=ig();return r&&t.setAttribute("nonce",r),t}function ag(t,r){t.styleSheet?t.styleSheet.cssText=r:t.appendChild(document.createTextNode(r))}function sg(t){var r=document.head||document.getElementsByTagName("head")[0];r.appendChild(t)}var lg=function(){var t=0,r=null;return{add:function(o){t==0&&(r=og())&&(ag(r,o),sg(r)),t++},remove:function(){t--,!t&&r&&(r.parentNode&&r.parentNode.removeChild(r),r=null)}}},cg=function(){var t=lg();return function(r,o){g.useEffect(function(){return t.add(r),function(){t.remove()}},[r&&o])}},Zo=function(){var t=cg(),r=function(o){var i=o.styles,e=o.dynamic;return t(i,e),null};return r},ug={left:0,top:0,right:0,gap:0},pr=function(t){return parseInt(t||"",10)||0},dg=function(t){var r=window.getComputedStyle(document.body),o=r[t==="padding"?"paddingLeft":"marginLeft"],i=r[t==="padding"?"paddingTop":"marginTop"],e=r[t==="padding"?"paddingRight":"marginRight"];return[pr(o),pr(i),pr(e)]},mg=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return ug;var r=dg(t),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:r[0],top:r[1],right:r[2],gap:Math.max(0,i-o+r[2]-r[0])}},fg=Zo(),We="data-scroll-locked",gg=function(t,r,o,i){var e=t.left,n=t.top,s=t.right,l=t.gap;return o===void 0&&(o="margin"),`
|
|
6
|
-
|
|
5
|
+
`)}})}});var Kw=m.lazyValidator(()=>m.zodSchema(m.union([m.strictObject({type:m.literal("text-start"),id:m.string(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("text-delta"),id:m.string(),delta:m.string(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("text-end"),id:m.string(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("error"),errorText:m.string()}),m.strictObject({type:m.literal("tool-input-start"),toolCallId:m.string(),toolName:m.string(),providerExecuted:m.boolean().optional(),dynamic:m.boolean().optional()}),m.strictObject({type:m.literal("tool-input-delta"),toolCallId:m.string(),inputTextDelta:m.string()}),m.strictObject({type:m.literal("tool-input-available"),toolCallId:m.string(),toolName:m.string(),input:m.unknown(),providerExecuted:m.boolean().optional(),providerMetadata:Ie.optional(),dynamic:m.boolean().optional()}),m.strictObject({type:m.literal("tool-input-error"),toolCallId:m.string(),toolName:m.string(),input:m.unknown(),providerExecuted:m.boolean().optional(),providerMetadata:Ie.optional(),dynamic:m.boolean().optional(),errorText:m.string()}),m.strictObject({type:m.literal("tool-output-available"),toolCallId:m.string(),output:m.unknown(),providerExecuted:m.boolean().optional(),dynamic:m.boolean().optional(),preliminary:m.boolean().optional()}),m.strictObject({type:m.literal("tool-output-error"),toolCallId:m.string(),errorText:m.string(),providerExecuted:m.boolean().optional(),dynamic:m.boolean().optional()}),m.strictObject({type:m.literal("reasoning-start"),id:m.string(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("reasoning-delta"),id:m.string(),delta:m.string(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("reasoning-end"),id:m.string(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("source-url"),sourceId:m.string(),url:m.string(),title:m.string().optional(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("source-document"),sourceId:m.string(),mediaType:m.string(),title:m.string(),filename:m.string().optional(),providerMetadata:Ie.optional()}),m.strictObject({type:m.literal("file"),url:m.string(),mediaType:m.string(),providerMetadata:Ie.optional()}),m.strictObject({type:m.custom(e=>typeof e=="string"&&e.startsWith("data-"),{message:'Type must start with "data-"'}),id:m.string().optional(),data:m.unknown(),transient:m.boolean().optional()}),m.strictObject({type:m.literal("start-step")}),m.strictObject({type:m.literal("finish-step")}),m.strictObject({type:m.literal("start"),messageId:m.string().optional(),messageMetadata:m.unknown().optional()}),m.strictObject({type:m.literal("finish"),finishReason:m._enum$1(["stop","length","content-filter","tool-calls","error","other","unknown"]).optional(),messageMetadata:m.unknown().optional()}),m.strictObject({type:m.literal("abort")}),m.strictObject({type:m.literal("message-metadata"),messageMetadata:m.unknown()})])));function Qw(e){return e.type.startsWith("data-")}function Qg(e,t){if(e===void 0&&t===void 0)return;if(e===void 0)return t;if(t===void 0)return e;const r={...e};for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)){const n=t[i];if(n===void 0)continue;const o=i in e?e[i]:void 0,a=n!==null&&typeof n=="object"&&!Array.isArray(n)&&!(n instanceof Date)&&!(n instanceof RegExp),s=o!=null&&typeof o=="object"&&!Array.isArray(o)&&!(o instanceof Date)&&!(o instanceof RegExp);a&&s?r[i]=Qg(o,n):r[i]=n}return r}function e2(e){const t=["ROOT"];let r=-1,i=null;function n(c,l,u){switch(c){case'"':{r=l,t.pop(),t.push(u),t.push("INSIDE_STRING");break}case"f":case"t":case"n":{r=l,i=l,t.pop(),t.push(u),t.push("INSIDE_LITERAL");break}case"-":{t.pop(),t.push(u),t.push("INSIDE_NUMBER");break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=l,t.pop(),t.push(u),t.push("INSIDE_NUMBER");break}case"{":{r=l,t.pop(),t.push(u),t.push("INSIDE_OBJECT_START");break}case"[":{r=l,t.pop(),t.push(u),t.push("INSIDE_ARRAY_START");break}}}function o(c,l){switch(c){case",":{t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break}case"}":{r=l,t.pop();break}}}function a(c,l){switch(c){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=l,t.pop();break}}}for(let c=0;c<e.length;c++){const l=e[c];switch(t[t.length-1]){case"ROOT":n(l,c,"FINISH");break;case"INSIDE_OBJECT_START":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}case"}":{r=c,t.pop();break}}break}case"INSIDE_OBJECT_AFTER_COMMA":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_KEY");break}}break}case"INSIDE_OBJECT_KEY":{switch(l){case'"':{t.pop(),t.push("INSIDE_OBJECT_AFTER_KEY");break}}break}case"INSIDE_OBJECT_AFTER_KEY":{switch(l){case":":{t.pop(),t.push("INSIDE_OBJECT_BEFORE_VALUE");break}}break}case"INSIDE_OBJECT_BEFORE_VALUE":{n(l,c,"INSIDE_OBJECT_AFTER_VALUE");break}case"INSIDE_OBJECT_AFTER_VALUE":{o(l,c);break}case"INSIDE_STRING":{switch(l){case'"':{t.pop(),r=c;break}case"\\":{t.push("INSIDE_STRING_ESCAPE");break}default:r=c}break}case"INSIDE_ARRAY_START":{switch(l){case"]":{r=c,t.pop();break}default:{r=c,n(l,c,"INSIDE_ARRAY_AFTER_VALUE");break}}break}case"INSIDE_ARRAY_AFTER_VALUE":{switch(l){case",":{t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break}case"]":{r=c,t.pop();break}default:{r=c;break}}break}case"INSIDE_ARRAY_AFTER_COMMA":{n(l,c,"INSIDE_ARRAY_AFTER_VALUE");break}case"INSIDE_STRING_ESCAPE":{t.pop(),r=c;break}case"INSIDE_NUMBER":{switch(l){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":{r=c;break}case"e":case"E":case"-":case".":break;case",":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(l,c),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(l,c);break}case"}":{t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"&&o(l,c);break}case"]":{t.pop(),t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(l,c);break}default:{t.pop();break}}break}case"INSIDE_LITERAL":{const f=e.substring(i,c+1);!"false".startsWith(f)&&!"true".startsWith(f)&&!"null".startsWith(f)?(t.pop(),t[t.length-1]==="INSIDE_OBJECT_AFTER_VALUE"?o(l,c):t[t.length-1]==="INSIDE_ARRAY_AFTER_VALUE"&&a(l,c)):r=c;break}}}let s=e.slice(0,r+1);for(let c=t.length-1;c>=0;c--)switch(t[c]){case"INSIDE_STRING":{s+='"';break}case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":{s+="}";break}case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":{s+="]";break}case"INSIDE_LITERAL":{const u=e.substring(i,e.length);"true".startsWith(u)?s+="true".slice(u.length):"false".startsWith(u)?s+="false".slice(u.length):"null".startsWith(u)&&(s+="null".slice(u.length))}}return s}async function ep(e){if(e===void 0)return{value:void 0,state:"undefined-input"};let t=await m.safeParseJSON({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=await m.safeParseJSON({text:e2(e)}),t.success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"})}function Li(e){return e.type.startsWith("tool-")}function t2(e){return e.type==="dynamic-tool"}function Od(e){return Li(e)||t2(e)}function Rd(e){return e.type.split("-").slice(1).join("-")}function n2({lastMessage:e,messageId:t}){return{message:e?.role==="assistant"?e:{id:t,metadata:void 0,role:"assistant",parts:[]},activeTextParts:{},activeReasoningParts:{},partialToolCalls:{}}}function r2({stream:e,messageMetadataSchema:t,dataPartSchemas:r,runUpdateMessageJob:i,onError:n,onToolCall:o,onData:a}){return e.pipeThrough(new TransformStream({async transform(s,c){await i(async({state:l,write:u})=>{var f,d,h,p;function g(y){const S=l.message.parts.filter(Li).find(k=>k.toolCallId===y);if(S==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return S}function v(y){const S=l.message.parts.filter(k=>k.type==="dynamic-tool").find(k=>k.toolCallId===y);if(S==null)throw new Error("tool-output-error must be preceded by a tool-input-available");return S}function b(y){var w;const S=l.message.parts.find(C=>Li(C)&&C.toolCallId===y.toolCallId),k=y,N=S;S!=null?(S.state=y.state,N.input=k.input,N.output=k.output,N.errorText=k.errorText,N.rawInput=k.rawInput,N.preliminary=k.preliminary,N.providerExecuted=(w=k.providerExecuted)!=null?w:S.providerExecuted,k.providerMetadata!=null&&S.state==="input-available"&&(S.callProviderMetadata=k.providerMetadata)):l.message.parts.push({type:`tool-${y.toolName}`,toolCallId:y.toolCallId,state:y.state,input:k.input,output:k.output,rawInput:k.rawInput,errorText:k.errorText,providerExecuted:k.providerExecuted,preliminary:k.preliminary,...k.providerMetadata!=null?{callProviderMetadata:k.providerMetadata}:{}})}function _(y){var w,S;const k=l.message.parts.find(j=>j.type==="dynamic-tool"&&j.toolCallId===y.toolCallId),N=y,C=k;k!=null?(k.state=y.state,C.toolName=y.toolName,C.input=N.input,C.output=N.output,C.errorText=N.errorText,C.rawInput=(w=N.rawInput)!=null?w:C.rawInput,C.preliminary=N.preliminary,C.providerExecuted=(S=N.providerExecuted)!=null?S:k.providerExecuted,N.providerMetadata!=null&&k.state==="input-available"&&(k.callProviderMetadata=N.providerMetadata)):l.message.parts.push({type:"dynamic-tool",toolName:y.toolName,toolCallId:y.toolCallId,state:y.state,input:N.input,output:N.output,errorText:N.errorText,preliminary:N.preliminary,providerExecuted:N.providerExecuted,...N.providerMetadata!=null?{callProviderMetadata:N.providerMetadata}:{}})}async function x(y){if(y!=null){const w=l.message.metadata!=null?Qg(l.message.metadata,y):y;t!=null&&await m.validateTypes({value:w,schema:t}),l.message.metadata=w}}switch(s.type){case"text-start":{const y={type:"text",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeTextParts[s.id]=y,l.message.parts.push(y),u();break}case"text-delta":{const y=l.activeTextParts[s.id];y.text+=s.delta,y.providerMetadata=(f=s.providerMetadata)!=null?f:y.providerMetadata,u();break}case"text-end":{const y=l.activeTextParts[s.id];y.state="done",y.providerMetadata=(d=s.providerMetadata)!=null?d:y.providerMetadata,delete l.activeTextParts[s.id],u();break}case"reasoning-start":{const y={type:"reasoning",text:"",providerMetadata:s.providerMetadata,state:"streaming"};l.activeReasoningParts[s.id]=y,l.message.parts.push(y),u();break}case"reasoning-delta":{const y=l.activeReasoningParts[s.id];y.text+=s.delta,y.providerMetadata=(h=s.providerMetadata)!=null?h:y.providerMetadata,u();break}case"reasoning-end":{const y=l.activeReasoningParts[s.id];y.providerMetadata=(p=s.providerMetadata)!=null?p:y.providerMetadata,y.state="done",delete l.activeReasoningParts[s.id],u();break}case"file":{l.message.parts.push({type:"file",mediaType:s.mediaType,url:s.url}),u();break}case"source-url":{l.message.parts.push({type:"source-url",sourceId:s.sourceId,url:s.url,title:s.title,providerMetadata:s.providerMetadata}),u();break}case"source-document":{l.message.parts.push({type:"source-document",sourceId:s.sourceId,mediaType:s.mediaType,title:s.title,filename:s.filename,providerMetadata:s.providerMetadata}),u();break}case"tool-input-start":{const y=l.message.parts.filter(Li);l.partialToolCalls[s.toolCallId]={text:"",toolName:s.toolName,index:y.length,dynamic:s.dynamic},s.dynamic?_({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted}):b({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-streaming",input:void 0,providerExecuted:s.providerExecuted}),u();break}case"tool-input-delta":{const y=l.partialToolCalls[s.toolCallId];y.text+=s.inputTextDelta;const{value:w}=await ep(y.text);y.dynamic?_({toolCallId:s.toolCallId,toolName:y.toolName,state:"input-streaming",input:w}):b({toolCallId:s.toolCallId,toolName:y.toolName,state:"input-streaming",input:w}),u();break}case"tool-input-available":{s.dynamic?_({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):b({toolCallId:s.toolCallId,toolName:s.toolName,state:"input-available",input:s.input,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),u(),o&&!s.providerExecuted&&await o({toolCall:s});break}case"tool-input-error":{s.dynamic?_({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}):b({toolCallId:s.toolCallId,toolName:s.toolName,state:"output-error",input:void 0,rawInput:s.input,errorText:s.errorText,providerExecuted:s.providerExecuted,providerMetadata:s.providerMetadata}),u();break}case"tool-output-available":{if(s.dynamic){const y=v(s.toolCallId);_({toolCallId:s.toolCallId,toolName:y.toolName,state:"output-available",input:y.input,output:s.output,preliminary:s.preliminary})}else{const y=g(s.toolCallId);b({toolCallId:s.toolCallId,toolName:Rd(y),state:"output-available",input:y.input,output:s.output,providerExecuted:s.providerExecuted,preliminary:s.preliminary})}u();break}case"tool-output-error":{if(s.dynamic){const y=v(s.toolCallId);_({toolCallId:s.toolCallId,toolName:y.toolName,state:"output-error",input:y.input,errorText:s.errorText,providerExecuted:s.providerExecuted})}else{const y=g(s.toolCallId);b({toolCallId:s.toolCallId,toolName:Rd(y),state:"output-error",input:y.input,rawInput:y.rawInput,errorText:s.errorText,providerExecuted:s.providerExecuted})}u();break}case"start-step":{l.message.parts.push({type:"step-start"});break}case"finish-step":{l.activeTextParts={},l.activeReasoningParts={};break}case"start":{s.messageId!=null&&(l.message.id=s.messageId),await x(s.messageMetadata),(s.messageId!=null||s.messageMetadata!=null)&&u();break}case"finish":{s.finishReason!=null&&(l.finishReason=s.finishReason),await x(s.messageMetadata),s.messageMetadata!=null&&u();break}case"message-metadata":{await x(s.messageMetadata),s.messageMetadata!=null&&u();break}case"error":{n?.(new Error(s.errorText));break}default:if(Qw(s)){r?.[s.type]!=null&&await m.validateTypes({value:s.data,schema:r[s.type]});const y=s;if(y.transient){a?.(y);break}const w=y.id!=null?l.message.parts.find(S=>y.type===S.type&&y.id===S.id):void 0;w!=null?w.data=y.data:l.message.parts.push(y),a?.(y),u()}}c.enqueue(s)})}}))}async function i2({stream:e,onError:t}){const r=e.getReader();try{for(;;){const{done:i}=await r.read();if(i)break}}catch(i){t?.(i)}finally{r.releaseLock()}}m.createIdGenerator({prefix:"aitxt",size:24});m.createIdGenerator({prefix:"aiobj",size:24});var o2=class{constructor(){this.queue=[],this.isProcessing=!1}async processQueue(){if(!this.isProcessing){for(this.isProcessing=!0;this.queue.length>0;)await this.queue[0](),this.queue.shift();this.isProcessing=!1}}async run(e){return new Promise((t,r)=>{this.queue.push(async()=>{try{await e(),t()}catch(i){r(i)}}),this.processQueue()})}};m.createIdGenerator({prefix:"aiobj",size:24});var a2={};Zw(a2,{object:()=>l2,text:()=>s2});var s2=()=>({type:"text",responseFormat:{type:"text"},async parsePartial({text:e}){return{partial:e}},async parseOutput({text:e}){return e}}),l2=({schema:e})=>{const t=m.asSchema(e);return{type:"object",responseFormat:{type:"json",schema:t.jsonSchema},async parsePartial({text:r}){const i=await ep(r);switch(i.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:i.value};default:{const n=i.state;throw new Error(`Unsupported parse state: ${n}`)}}},async parseOutput({text:r},i){const n=await m.safeParseJSON({text:r});if(!n.success)throw new jd({message:"No object generated: could not parse the response.",cause:n.error,text:r,response:i.response,usage:i.usage,finishReason:i.finishReason});const o=await m.safeValidateTypes({value:n.value,schema:t});if(!o.success)throw new jd({message:"No object generated: response did not match schema.",cause:o.error,text:r,response:i.response,usage:i.usage,finishReason:i.finishReason});return o.value}}};async function c2(e){if(e==null)return[];if(!globalThis.FileList||!(e instanceof globalThis.FileList))throw new Error("FileList is not supported in the current environment");return Promise.all(Array.from(e).map(async t=>{const{name:r,type:i}=t,n=await new Promise((o,a)=>{const s=new FileReader;s.onload=c=>{var l;o((l=c.target)==null?void 0:l.result)},s.onerror=c=>a(c),s.readAsDataURL(t)});return{type:"file",mediaType:i,filename:r,url:n}}))}var u2=class{constructor({api:e="/api/chat",credentials:t,headers:r,body:i,fetch:n,prepareSendMessagesRequest:o,prepareReconnectToStreamRequest:a}){this.api=e,this.credentials=t,this.headers=r,this.body=i,this.fetch=n,this.prepareSendMessagesRequest=o,this.prepareReconnectToStreamRequest=a}async sendMessages({abortSignal:e,...t}){var r,i,n,o,a;const s=await m.resolve(this.body),c=await m.resolve(this.headers),l=await m.resolve(this.credentials),u={...m.normalizeHeaders(c),...m.normalizeHeaders(t.headers)},f=await((r=this.prepareSendMessagesRequest)==null?void 0:r.call(this,{api:this.api,id:t.chatId,messages:t.messages,body:{...s,...t.body},headers:u,credentials:l,requestMetadata:t.metadata,trigger:t.trigger,messageId:t.messageId})),d=(i=f?.api)!=null?i:this.api,h=f?.headers!==void 0?m.normalizeHeaders(f.headers):u,p=f?.body!==void 0?f.body:{...s,...t.body,id:t.chatId,messages:t.messages,trigger:t.trigger,messageId:t.messageId},g=(n=f?.credentials)!=null?n:l,b=await((o=this.fetch)!=null?o:globalThis.fetch)(d,{method:"POST",headers:m.withUserAgentSuffix({"Content-Type":"application/json",...h},`ai-sdk/${Pd}`,m.getRuntimeEnvironmentUserAgent()),body:JSON.stringify(p),credentials:g,signal:e});if(!b.ok)throw new Error((a=await b.text())!=null?a:"Failed to fetch the chat response.");if(!b.body)throw new Error("The response body is empty.");return this.processResponseStream(b.body)}async reconnectToStream(e){var t,r,i,n,o;const a=await m.resolve(this.body),s=await m.resolve(this.headers),c=await m.resolve(this.credentials),l={...m.normalizeHeaders(s),...m.normalizeHeaders(e.headers)},u=await((t=this.prepareReconnectToStreamRequest)==null?void 0:t.call(this,{api:this.api,id:e.chatId,body:{...a,...e.body},headers:l,credentials:c,requestMetadata:e.metadata})),f=(r=u?.api)!=null?r:`${this.api}/${e.chatId}/stream`,d=u?.headers!==void 0?m.normalizeHeaders(u.headers):l,h=(i=u?.credentials)!=null?i:c,g=await((n=this.fetch)!=null?n:globalThis.fetch)(f,{method:"GET",headers:m.withUserAgentSuffix(d,`ai-sdk/${Pd}`,m.getRuntimeEnvironmentUserAgent()),credentials:h});if(g.status===204)return null;if(!g.ok)throw new Error((o=await g.text())!=null?o:"Failed to fetch the chat response.");if(!g.body)throw new Error("The response body is empty.");return this.processResponseStream(g.body)}},tp=class extends u2{constructor(e={}){super(e)}processResponseStream(e){return m.parseJsonEventStream({stream:e,schema:Kw}).pipeThrough(new TransformStream({async transform(t,r){if(!t.success)throw t.error;r.enqueue(t.value)}}))}},f2=class{constructor({generateId:e=m.generateId,id:t=e(),transport:r=new tp,messageMetadataSchema:i,dataPartSchemas:n,state:o,onError:a,onToolCall:s,onFinish:c,onData:l,sendAutomaticallyWhen:u}){this.activeResponse=void 0,this.jobExecutor=new o2,this.sendMessage=async(f,d)=>{var h,p,g,v;if(f==null){await this.makeRequest({trigger:"submit-message",messageId:(h=this.lastMessage)==null?void 0:h.id,...d});return}let b;if("text"in f||"files"in f?b={parts:[...Array.isArray(f.files)?f.files:await c2(f.files),..."text"in f&&f.text!=null?[{type:"text",text:f.text}]:[]]}:b=f,f.messageId!=null){const _=this.state.messages.findIndex(x=>x.id===f.messageId);if(_===-1)throw new Error(`message with id ${f.messageId} not found`);if(this.state.messages[_].role!=="user")throw new Error(`message with id ${f.messageId} is not a user message`);this.state.messages=this.state.messages.slice(0,_+1),this.state.replaceMessage(_,{...b,id:f.messageId,role:(p=b.role)!=null?p:"user",metadata:f.metadata})}else this.state.pushMessage({...b,id:(g=b.id)!=null?g:this.generateId(),role:(v=b.role)!=null?v:"user",metadata:f.metadata});await this.makeRequest({trigger:"submit-message",messageId:f.messageId,...d})},this.regenerate=async({messageId:f,...d}={})=>{const h=f==null?this.state.messages.length-1:this.state.messages.findIndex(p=>p.id===f);if(h===-1)throw new Error(`message ${f} not found`);this.state.messages=this.state.messages.slice(0,this.messages[h].role==="assistant"?h:h+1),await this.makeRequest({trigger:"regenerate-message",messageId:f,...d})},this.resumeStream=async(f={})=>{await this.makeRequest({trigger:"resume-stream",...f})},this.clearError=()=>{this.status==="error"&&(this.state.error=void 0,this.setStatus({status:"ready"}))},this.addToolOutput=async({state:f="output-available",tool:d,toolCallId:h,output:p,errorText:g})=>this.jobExecutor.run(async()=>{var v,b;const _=this.state.messages,x=_[_.length-1];this.state.replaceMessage(_.length-1,{...x,parts:x.parts.map(y=>Od(y)&&y.toolCallId===h?{...y,state:f,output:p,errorText:g}:y)}),this.activeResponse&&(this.activeResponse.state.message.parts=this.activeResponse.state.message.parts.map(y=>Od(y)&&y.toolCallId===h?{...y,state:f,output:p,errorText:g}:y)),this.status!=="streaming"&&this.status!=="submitted"&&((v=this.sendAutomaticallyWhen)!=null&&v.call(this,{messages:this.state.messages}))&&this.makeRequest({trigger:"submit-message",messageId:(b=this.lastMessage)==null?void 0:b.id})}),this.addToolResult=this.addToolOutput,this.stop=async()=>{var f;this.status!=="streaming"&&this.status!=="submitted"||(f=this.activeResponse)!=null&&f.abortController&&this.activeResponse.abortController.abort()},this.id=t,this.transport=r,this.generateId=e,this.messageMetadataSchema=i,this.dataPartSchemas=n,this.state=o,this.onError=a,this.onToolCall=s,this.onFinish=c,this.onData=l,this.sendAutomaticallyWhen=u}get status(){return this.state.status}setStatus({status:e,error:t}){this.status!==e&&(this.state.status=e,this.state.error=t)}get error(){return this.state.error}get messages(){return this.state.messages}get lastMessage(){return this.state.messages[this.state.messages.length-1]}set messages(e){this.state.messages=e}async makeRequest({trigger:e,metadata:t,headers:r,body:i,messageId:n}){var o,a,s,c;this.setStatus({status:"submitted",error:void 0});const l=this.lastMessage;let u=!1,f=!1,d=!1;try{const h={state:n2({lastMessage:this.state.snapshot(l),messageId:this.generateId()}),abortController:new AbortController};h.abortController.signal.addEventListener("abort",()=>{u=!0}),this.activeResponse=h;let p;if(e==="resume-stream"){const v=await this.transport.reconnectToStream({chatId:this.id,metadata:t,headers:r,body:i});if(v==null){this.setStatus({status:"ready"});return}p=v}else p=await this.transport.sendMessages({chatId:this.id,messages:this.state.messages,abortSignal:h.abortController.signal,metadata:t,headers:r,body:i,trigger:e,messageId:n});const g=v=>this.jobExecutor.run(()=>v({state:h.state,write:()=>{var b;this.setStatus({status:"streaming"}),h.state.message.id===((b=this.lastMessage)==null?void 0:b.id)?this.state.replaceMessage(this.state.messages.length-1,h.state.message):this.state.pushMessage(h.state.message)}}));await i2({stream:r2({stream:p,onToolCall:this.onToolCall,onData:this.onData,messageMetadataSchema:this.messageMetadataSchema,dataPartSchemas:this.dataPartSchemas,runUpdateMessageJob:g,onError:v=>{throw v}}),onError:v=>{throw v}}),this.setStatus({status:"ready"})}catch(h){if(u||h.name==="AbortError")return u=!0,this.setStatus({status:"ready"}),null;d=!0,h instanceof TypeError&&(h.message.toLowerCase().includes("fetch")||h.message.toLowerCase().includes("network"))&&(f=!0),this.onError&&h instanceof Error&&this.onError(h),this.setStatus({status:"error",error:h})}finally{try{(a=this.onFinish)==null||a.call(this,{message:this.activeResponse.state.message,messages:this.state.messages,isAbort:u,isDisconnect:f,isError:d,finishReason:(o=this.activeResponse)==null?void 0:o.state.finishReason})}catch(h){console.error(h)}this.activeResponse=void 0}(s=this.sendAutomaticallyWhen)!=null&&s.call(this,{messages:this.state.messages})&&!d&&await this.makeRequest({trigger:"submit-message",messageId:(c=this.lastMessage)==null?void 0:c.id,metadata:t,headers:r,body:i})}},d2=e=>new Promise((t,r)=>{const i=new FileReader;i.onload=()=>t(i.result),i.onerror=n=>r(n),i.readAsDataURL(e)}),h2={accept:"image/*, text/plain, text/html, text/markdown, text/csv, text/xml, text/json, text/css",async add({file:e}){return{id:m.generateId(),type:e.type.startsWith("image/")?"image":"file",name:e.name,file:e,contentType:e.type,content:[],status:{type:"requires-action",reason:"composer-send"}}},async send(e){return{...e,status:{type:"complete"},content:[{type:"file",mimeType:e.contentType,filename:e.name,data:await d2(e.file)}]}},async remove(){}},Dd=e=>V.getExternalStoreMessages(e);function m2(e){return e.replace(/[}\]"]+$/,"")}var Il=(e,t)=>!e.parts||e.parts.length===0?[]:e.parts.filter(r=>r.type!=="step-start"&&r.type!=="file").map(r=>{const i=r.type;if(i==="text")return{type:"text",text:r.text};if(i==="reasoning")return{type:"reasoning",text:r.text};if(Li(r)){const n=i.replace("tool-",""),o=r.toolCallId;let a={},s,c=!1;r.state==="input-streaming"||r.state==="input-available"?a=r.input||{}:r.state==="output-available"?(a=r.input||{},s=r.output):r.state==="output-error"&&(a=r.input||{},c=!0,s={error:r.errorText});let l=JSON.stringify(a);r.state==="input-streaming"&&(l=m2(l));const u=t.toolStatuses?.[o];return{type:"tool-call",toolName:n,toolCallId:o,argsText:l,args:a,result:s,isError:c,...u?.type==="interrupt"&&{interrupt:u.payload,status:{type:"requires-action",reason:"interrupt"}},...u?.type==="cancelled"&&{status:{type:"incomplete",reason:"cancelled",error:u.reason}}}}if(i==="dynamic-tool"){const n=r.toolName,o=r.toolCallId;let a={},s,c=!1;r.state==="input-streaming"||r.state==="input-available"?a=r.input||{}:r.state==="output-available"?(a=r.input||{},s=r.output):r.state==="output-error"&&(a=r.input||{},c=!0,s={error:r.errorText});const l=t.toolStatuses?.[o];return{type:"tool-call",toolName:n,toolCallId:o,argsText:JSON.stringify(a),args:a,result:s,isError:c,...l?.type==="interrupt"&&{interrupt:l.payload,status:{type:"requires-action",reason:"interrupt"}},...l?.type==="cancelled"&&{status:{type:"incomplete",reason:"cancelled",error:l.reason}}}}return i==="source-url"?{type:"source",sourceType:"url",id:r.sourceId,url:r.url,title:r.title||""}:i==="source-document"?(console.warn(`Source document part type ${i} is not yet supported in conversion`),null):i.startsWith("data-")?{type:"data",name:i.substring(5),data:r.data}:(console.warn(`Unsupported message part type: ${i}`),null)}).filter(Boolean),Ud=V.unstable_createMessageConverter((e,t)=>{const r=new Date;switch(e.role){case"user":return{role:"user",id:e.id,createdAt:r,content:Il(e,t),attachments:e.parts?.filter(i=>i.type==="file").map((i,n)=>({id:n.toString(),type:i.mediaType.startsWith("image/")?"image":"file",name:i.filename??"file",content:[i.mediaType.startsWith("image/")?{type:"image",image:i.url,filename:i.filename}:{type:"file",filename:i.filename,data:i.url,mimeType:i.mediaType}],contentType:i.mediaType??"unknown/unknown",status:{type:"complete"}}))};case"system":return{role:"system",id:e.id,createdAt:r,content:Il(e,t)};case"assistant":return{role:"assistant",id:e.id,createdAt:r,content:Il(e,t),metadata:{unstable_annotations:e.annotations,unstable_data:Array.isArray(e.data)?e.data:e.data?[e.data]:void 0,custom:{}}};default:return console.warn(`Unsupported message role: ${e.role}`),[]}}),g2={format:"ai-sdk/v5",encode({message:{id:e,parts:t,...r}}){return{...r,parts:t.filter(i=>i.type!=="file")}},decode(e){return{parentId:e.parent_id,message:{id:e.id,...e.content}}},getId(e){return e.id}},{MessageRepository:p2}=V.INTERNAL,v2=(e,t)=>({headId:t.headId,messages:t.messages.map(r=>{const i=e([r.message])[0];return{...r,message:i}})}),b2=(e,t,r,i,n)=>{const o=Q.useRef(!1),a=V.useAssistantApi(),s=Q.useCallback(()=>a.threadListItem.source?a.threadListItem():null,[a]),[c,l]=Q.useState(!1),u=Q.useRef(new Set),f=Q.useRef(()=>n);return Q.useEffect(()=>{f.current=n}),Q.useEffect(()=>{if(!t||o.current)return;const d=async()=>{l(!0);try{const h=await t.withFormat?.(i).load();if(h&&h.messages.length>0){const p=v2(r,h);e.current.thread.import(p);const g=new p2;g.import(p);const v=g.getMessages();f.current(v.map(V.getExternalStoreMessages).flat()),u.current=new Set(p.messages.map(b=>b.message.id))}}catch(h){console.error("Failed to load message history:",h)}finally{l(!1)}};if(!o.current){if(o.current=!0,!s()?.getState().remoteId){l(!1);return}d()}},[a,t,i,r,e,s]),Q.useEffect(()=>e.current.thread.subscribe(async()=>{const{messages:d,isRunning:h}=e.current.thread.getState();if(!h)for(let p=0;p<d.length;p++){const g=d[p];if(g.status===void 0||g.status.type==="complete"||g.status.type==="incomplete"){if(u.current.has(g.id))continue;u.current.add(g.id);const v=p>0?d[p-1].id:null;await t?.withFormat?.(i).append({parentId:v,message:V.getExternalStoreMessages(g)[0]})}}}),[t,i,e]),c},y2=(e,{adapters:t,toCreateMessage:r,cancelPendingToolCallsOnSend:i=!0}={})=>{const n=V.useRuntimeAdapters(),o=e.status==="submitted"||e.status==="streaming",[a,s]=Q.useState({}),c=Ud.useThreadMessages({isRunning:o,messages:e.messages,metadata:Q.useMemo(()=>({toolStatuses:a,...e.error&&{error:e.error.message}}),[a,e.error])}),[l]=Q.useState(()=>({get current(){return h}})),u=V.INTERNAL.useToolInvocations({state:{messages:c,isRunning:o},getTools:()=>l.current.thread.getModelContext().tools,onResult:p=>{p.type==="add-tool-result"&&e.addToolResult({tool:p.toolName,toolCallId:p.toolCallId,output:p.result})},setToolStatuses:s}),f=b2(l,t?.history??n?.history,Ud.toThreadMessages,g2,p=>{e.setMessages(p)}),d=()=>{if(!i)return;const p=Object.entries(a).filter(g=>g[1]?.type==="interrupt").map(([g])=>({toolCallId:g}));p.length!==0&&(s(g=>{const v={...g};return p.forEach(({toolCallId:b})=>{v[b]={type:"cancelled",reason:"User cancelled tool call by sending a new message."}}),v}),p.forEach(({toolCallId:g})=>{e.setMessages(e.messages.map(v=>v.id===g?{...v,content:[{type:"text",text:"User cancelled tool call by sending a new message."}]}:v))}))},h=V.useExternalStoreRuntime({isRunning:o,messages:c,setMessages:p=>e.setMessages(p.map(Dd).filter(Boolean).flat()),onImport:p=>e.setMessages(p.map(Dd).filter(Boolean).flat()),onCancel:async()=>{e.stop(),u.abort()},onNew:async p=>{d();const g=(r??Ed)(p);await e.sendMessage(g,{metadata:p.runConfig})},onEdit:async p=>{d();const g=Nd(e.messages,p.parentId);e.setMessages(g);const v=(r??Ed)(p);await e.sendMessage(v,{metadata:p.runConfig})},onReload:async(p,g)=>{d();const v=Nd(e.messages,p);e.setMessages(v),await e.regenerate({metadata:g.runConfig})},onAddToolResult:({toolCallId:p,result:g,isError:v})=>{v?e.addToolOutput({state:"output-error",tool:p,toolCallId:p,errorText:typeof g=="string"?g:JSON.stringify(g)}):e.addToolOutput({state:"output-available",tool:p,toolCallId:p,output:g})},onResumeToolCall:p=>u.resume(p.toolCallId,p.payload),adapters:{attachments:h2,...n,...t},isLoading:f});return h},Nl,zd;function _2(){if(zd)return Nl;zd=1;function e(t,r){if(typeof t!="function")throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);let i,n=0;return function(...a){clearTimeout(i);const s=Date.now(),c=s-n,l=r-c;l<=0?(n=s,t.apply(this,a)):i=setTimeout(()=>{n=Date.now(),t.apply(this,a)},l)}}return Nl=e,Nl}var x2=_2();const w2=Lw(x2);var jo={exports:{}},El={};var Ld;function $2(){if(Ld)return El;Ld=1;var e=Q;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:t,i=e.useState,n=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(f,d){var h=d(),p=i({inst:{value:h,getSnapshot:d}}),g=p[0].inst,v=p[1];return o(function(){g.value=h,g.getSnapshot=d,c(g)&&v({inst:g})},[f,h,d]),n(function(){return c(g)&&v({inst:g}),f(function(){c(g)&&v({inst:g})})},[f]),a(h),h}function c(f){var d=f.getSnapshot;f=f.value;try{var h=d();return!r(f,h)}catch{return!0}}function l(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l:s;return El.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,El}var Ml={};var Fd;function S2(){return Fd||(Fd=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}function t(h,p){u||n.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=p();if(!f){var v=p();o(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=a({inst:{value:g,getSnapshot:p}});var b=v[0].inst,_=v[1];return c(function(){b.value=g,b.getSnapshot=p,r(b)&&_({inst:b})},[h,g,p]),s(function(){return r(b)&&_({inst:b}),h(function(){r(b)&&_({inst:b})})},[h]),l(g),g}function r(h){var p=h.getSnapshot;h=h.value;try{var g=p();return!o(h,g)}catch{return!0}}function i(h,p){return p()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=Q,o=typeof Object.is=="function"?Object.is:e,a=n.useState,s=n.useEffect,c=n.useLayoutEffect,l=n.useDebugValue,u=!1,f=!1,d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?i:t;Ml.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:d,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ml}var Zd;function k2(){return Zd||(Zd=1,process.env.NODE_ENV==="production"?jo.exports=$2():jo.exports=S2()),jo.exports}var I2=k2(),np=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},be=(e,t,r)=>(np(e,t,"read from private field"),r?r.call(e):t.get(e)),jt=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},vn=(e,t,r,i)=>(np(e,t,"write to private field"),t.set(e,r),r);function N2(e,t){return t!=null?w2(e,t):e}var gt,ua,fa,ki,Ii,Ni,Nr,Nc,Ec,E2=class{constructor(e=[]){jt(this,gt,void 0),jt(this,ua,"ready"),jt(this,fa,void 0),jt(this,ki,new Set),jt(this,Ii,new Set),jt(this,Ni,new Set),this.pushMessage=t=>{vn(this,gt,be(this,gt).concat(t)),be(this,Nr).call(this)},this.popMessage=()=>{vn(this,gt,be(this,gt).slice(0,-1)),be(this,Nr).call(this)},this.replaceMessage=(t,r)=>{vn(this,gt,[...be(this,gt).slice(0,t),this.snapshot(r),...be(this,gt).slice(t+1)]),be(this,Nr).call(this)},this.snapshot=t=>structuredClone(t),this["~registerMessagesCallback"]=(t,r)=>{const i=r?N2(t,r):t;return be(this,ki).add(i),()=>{be(this,ki).delete(i)}},this["~registerStatusCallback"]=t=>(be(this,Ii).add(t),()=>{be(this,Ii).delete(t)}),this["~registerErrorCallback"]=t=>(be(this,Ni).add(t),()=>{be(this,Ni).delete(t)}),jt(this,Nr,()=>{be(this,ki).forEach(t=>t())}),jt(this,Nc,()=>{be(this,Ii).forEach(t=>t())}),jt(this,Ec,()=>{be(this,Ni).forEach(t=>t())}),vn(this,gt,e)}get status(){return be(this,ua)}set status(e){vn(this,ua,e),be(this,Nc).call(this)}get error(){return be(this,fa)}set error(e){vn(this,fa,e),be(this,Ec).call(this)}get messages(){return be(this,gt)}set messages(e){vn(this,gt,[...e]),be(this,Nr).call(this)}};gt=new WeakMap;ua=new WeakMap;fa=new WeakMap;ki=new WeakMap;Ii=new WeakMap;Ni=new WeakMap;Nr=new WeakMap;Nc=new WeakMap;Ec=new WeakMap;var Er,Bd=class extends f2{constructor({messages:t,...r}){const i=new E2(t);super({...r,state:i}),jt(this,Er,void 0),this["~registerMessagesCallback"]=(n,o)=>be(this,Er)["~registerMessagesCallback"](n,o),this["~registerStatusCallback"]=n=>be(this,Er)["~registerStatusCallback"](n),this["~registerErrorCallback"]=n=>be(this,Er)["~registerErrorCallback"](n),vn(this,Er,i)}};Er=new WeakMap;function M2({experimental_throttle:e,resume:t=!1,...r}={}){const i=Q.useRef("chat"in r?r.chat:new Bd(r));("chat"in r&&r.chat!==i.current||"id"in r&&i.current.id!==r.id)&&(i.current="chat"in r?r.chat:new Bd(r));const o=Q.useCallback(u=>i.current["~registerMessagesCallback"](u,e),[e,i.current.id]),a=Q.useSyncExternalStore(o,()=>i.current.messages,()=>i.current.messages),s=Q.useSyncExternalStore(i.current["~registerStatusCallback"],()=>i.current.status,()=>i.current.status),c=Q.useSyncExternalStore(i.current["~registerErrorCallback"],()=>i.current.error,()=>i.current.error),l=Q.useCallback(u=>{typeof u=="function"&&(u=u(i.current.messages)),i.current.messages=u},[i]);return Q.useEffect(()=>{t&&i.current.resumeStream()},[t,i]),{id:i.current.id,messages:a,setMessages:l,sendMessage:i.current.sendMessage,regenerate:i.current.regenerate,clearError:i.current.clearError,stop:i.current.stop,error:c,resumeStream:i.current.resumeStream,status:s,addToolResult:i.current.addToolOutput,addToolOutput:i.current.addToolOutput}}var T2=e=>Object.fromEntries(Object.entries(e).map(([t,r])=>[t,{...r.description?{description:r.description}:void 0,parameters:r.parameters instanceof Ad.ZodType?Ad.toJSONSchema(r.parameters):r.parameters}])),C2=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>!t.disabled&&t.type!=="backend")),Mc=class extends tp{runtime;constructor(e){super({...e,prepareSendMessagesRequest:async t=>{const r=this.runtime?.thread.getModelContext(),i=(await this.runtime?.threads.mainItem.initialize())?.remoteId??t.id,n={...t,body:{callSettings:r?.callSettings,system:r?.system,tools:T2(C2(r?.tools??{})),...t?.body}},o=await e?.prepareSendMessagesRequest?.(n);return{...o,body:o?.body??{...n.body,id:i,messages:t.messages,trigger:t.trigger,messageId:t.messageId,metadata:t.requestMetadata}}}})}setRuntime(e){this.runtime=e}},A2=e=>{const t=Q.useRef(e);return Q.useEffect(()=>{t.current=e}),Q.useMemo(()=>new Proxy(t.current,{get(i,n){const o=t.current[n];return typeof o=="function"?o.bind(t.current):o}}),[])},j2=e=>{const{adapters:t,transport:r,toCreateMessage:i,...n}=e??{},o=A2(r??new Mc),a=V.useAssistantState(({threadListItem:l})=>l.id),s=M2({...n,id:a,transport:o}),c=y2(s,{adapters:t,...i&&{toCreateMessage:i}});return o instanceof Mc&&o.setRuntime(c),c},P2=({cloud:e,...t}={})=>{const r=V.unstable_useCloudThreadListAdapter({cloud:e});return V.unstable_useRemoteThreadListRuntime({runtimeHook:function(){return j2(t)},adapter:r,allowNesting:!0})};const rp=Q.createContext(void 0),O2="/chat/completions",R2="You are a helpful assistant that can answer questions and help with tasks.",D2=["If the user asks for a chart, use D3 to render it.\nReturn only a d3 code block. The code will execute in a sandboxed environment where:\n- `d3` is the D3 library\n- `container` is the DOM element to render into (use `d3.select(container)` NOT `d3.select('body')`)\nThe code should be wrapped in a ```d3\n...\n``` block."],U2=`
|
|
6
|
+
${R2}
|
|
7
|
+
|
|
8
|
+
Utilities:
|
|
9
|
+
${D2.map(e=>`- ${e}`).join(`
|
|
10
|
+
`)}
|
|
11
|
+
`,z2=({children:e,config:t})=>{const[r,i]=Q.useState(t.model?.defaultModel??m.MODELS[0]),[n,o]=Q.useState(!1),a=P2({messages:[{id:"system",role:"system",parts:[{type:"text",text:U2}]}],transport:new Mc({api:t.chatEndpoint??O2,prepareSendMessagesRequest:({id:s,messages:c})=>({body:{messages:c,id:s,config:{mcp:t.mcp,environment:t.environment,projectSlug:t.projectSlug,model:r}}})})});return $.jsx(V.AssistantRuntimeProvider,{runtime:a,children:$.jsx(rp.Provider,{value:{config:t,setModel:i,model:r,isExpanded:n,setIsExpanded:o},children:e})})},wt=()=>{const e=Q.useContext(rp);if(!e)throw new Error("useElements must be used within a ElementsProvider");return e};const L2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),F2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,i)=>i?i.toUpperCase():r.toLowerCase()),Vd=e=>{const t=F2(e);return t.charAt(0).toUpperCase()+t.slice(1)},ip=(...e)=>e.filter((t,r,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===r).join(" ").trim(),Z2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var B2={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 V2=Q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:n="",children:o,iconNode:a,...s},c)=>Q.createElement("svg",{ref:c,...B2,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:ip("lucide",n),...!o&&!Z2(s)&&{"aria-hidden":"true"},...s},[...a.map(([l,u])=>Q.createElement(l,u)),...Array.isArray(o)?o:[o]]));const Ue=(e,t)=>{const r=Q.forwardRef(({className:i,...n},o)=>Q.createElement(V2,{ref:o,iconNode:t,className:ip(`lucide-${L2(Vd(e))}`,`lucide-${e}`,i),...n}));return r.displayName=Vd(e),r};const W2=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],q2=Ue("arrow-down",W2);const G2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Y2=Ue("arrow-up",G2);const H2=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],X2=Ue("bot",H2);const J2=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],K2=Ue("brain",J2);const Q2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$s=Ue("check",Q2);const e$=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],op=Ue("chevron-down",e$);const t$=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],n$=Ue("chevron-left",t$);const r$=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],i$=Ue("chevron-right",r$);const o$=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],ap=Ue("copy",o$);const a$=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],s$=Ue("file-text",a$);const l$=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],c$=Ue("maximize-2",l$);const u$=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],f$=Ue("pencil",u$);const d$=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],h$=Ue("plus",d$);const m$=[["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"}]],g$=Ue("refresh-cw",m$);const p$=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],v$=Ue("settings-2",p$);const b$=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],y$=Ue("square",b$);const _$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sp=Ue("x",_$);function Wd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ru(...e){return t=>{let r=!1;const i=e.map(n=>{const o=Wd(n,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let n=0;n<i.length;n++){const o=i[n];typeof o=="function"?o():Wd(e[n],null)}}}}function st(...e){return E.useCallback(Ru(...e),e)}var x$=Symbol.for("react.lazy"),Na=E[" use ".trim().toString()];function w$(e){return typeof e=="object"&&e!==null&&"then"in e}function lp(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===x$&&"_payload"in e&&w$(e._payload)}function cp(e){const t=S$(e),r=E.forwardRef((i,n)=>{let{children:o,...a}=i;lp(o)&&typeof Na=="function"&&(o=Na(o._payload));const s=E.Children.toArray(o),c=s.find(N$);if(c){const l=c.props.children,u=s.map(f=>f===c?E.Children.count(l)>1?E.Children.only(null):E.isValidElement(l)?l.props.children:null:f);return $.jsx(t,{...a,ref:n,children:E.isValidElement(l)?E.cloneElement(l,void 0,u):null})}return $.jsx(t,{...a,ref:n,children:o})});return r.displayName=`${e}.Slot`,r}var $$=cp("Slot");function S$(e){const t=E.forwardRef((r,i)=>{let{children:n,...o}=r;if(lp(n)&&typeof Na=="function"&&(n=Na(n._payload)),E.isValidElement(n)){const a=M$(n),s=E$(o,n.props);return n.type!==E.Fragment&&(s.ref=i?Ru(i,a):a),E.cloneElement(n,s)}return E.Children.count(n)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var up=Symbol("radix.slottable");function k$(e){const t=({children:r})=>$.jsx($.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=up,t}var I$=k$("Slottable");function N$(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===up}function E$(e,t){const r={...t};for(const i in t){const n=e[i],o=t[i];/^on[A-Z]/.test(i)?n&&o?r[i]=(...s)=>{const c=o(...s);return n(...s),c}:n&&(r[i]=n):i==="style"?r[i]={...n,...o}:i==="className"&&(r[i]=[n,o].filter(Boolean).join(" "))}return{...e,...r}}function M$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function fp(e){var t,r,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=fp(e[t]))&&(i&&(i+=" "),i+=r)}else for(r in e)e[r]&&(i&&(i+=" "),i+=r);return i}function dp(){for(var e,t,r=0,i="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=fp(e))&&(i&&(i+=" "),i+=t);return i}const qd=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Gd=dp,T$=(e,t)=>r=>{var i;if(t?.variants==null)return Gd(e,r?.class,r?.className);const{variants:n,defaultVariants:o}=t,a=Object.keys(n).map(l=>{const u=r?.[l],f=o?.[l];if(u===null)return null;const d=qd(u)||qd(f);return n[l][d]}),s=r&&Object.entries(r).reduce((l,u)=>{let[f,d]=u;return d===void 0||(l[f]=d),l},{}),c=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((l,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[g,v]=p;return Array.isArray(v)?v.includes({...o,...s}[g]):{...o,...s}[g]===v})?[...l,f,d]:l},[]);return Gd(e,a,c,r?.class,r?.className)},C$=(e,t)=>{const r=new Array(e.length+t.length);for(let i=0;i<e.length;i++)r[i]=e[i];for(let i=0;i<t.length;i++)r[e.length+i]=t[i];return r},A$=(e,t)=>({classGroupId:e,validator:t}),hp=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Ea="-",Yd=[],j$="arbitrary..",P$=e=>{const t=R$(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return O$(a);const s=a.split(Ea),c=s[0]===""&&s.length>1?1:0;return mp(s,c,t)},getConflictingClassGroupIds:(a,s)=>{if(s){const c=i[a],l=r[a];return c?l?C$(l,c):c:l||Yd}return r[a]||Yd}}},mp=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const n=e[t],o=r.nextPart.get(n);if(o){const l=mp(e,t+1,o);if(l)return l}const a=r.validators;if(a===null)return;const s=t===0?e.join(Ea):e.slice(t).join(Ea),c=a.length;for(let l=0;l<c;l++){const u=a[l];if(u.validator(s))return u.classGroupId}},O$=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),i=t.slice(0,r);return i?j$+i:void 0})(),R$=e=>{const{theme:t,classGroups:r}=e;return D$(r,t)},D$=(e,t)=>{const r=hp();for(const i in e){const n=e[i];Du(n,r,i,t)}return r},Du=(e,t,r,i)=>{const n=e.length;for(let o=0;o<n;o++){const a=e[o];U$(a,t,r,i)}},U$=(e,t,r,i)=>{if(typeof e=="string"){z$(e,t,r);return}if(typeof e=="function"){L$(e,t,r,i);return}F$(e,t,r,i)},z$=(e,t,r)=>{const i=e===""?t:gp(t,e);i.classGroupId=r},L$=(e,t,r,i)=>{if(Z$(e)){Du(e(i),t,r,i);return}t.validators===null&&(t.validators=[]),t.validators.push(A$(r,e))},F$=(e,t,r,i)=>{const n=Object.entries(e),o=n.length;for(let a=0;a<o;a++){const[s,c]=n[a];Du(c,gp(t,s),r,i)}},gp=(e,t)=>{let r=e;const i=t.split(Ea),n=i.length;for(let o=0;o<n;o++){const a=i[o];let s=r.nextPart.get(a);s||(s=hp(),r.nextPart.set(a,s)),r=s}return r},Z$=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,B$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),i=Object.create(null);const n=(o,a)=>{r[o]=a,t++,t>e&&(t=0,i=r,r=Object.create(null))};return{get(o){let a=r[o];if(a!==void 0)return a;if((a=i[o])!==void 0)return n(o,a),a},set(o,a){o in r?r[o]=a:n(o,a)}}},Tc="!",Hd=":",V$=[],Xd=(e,t,r,i,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:i,isExternal:n}),W$=e=>{const{prefix:t,experimentalParseClassName:r}=e;let i=n=>{const o=[];let a=0,s=0,c=0,l;const u=n.length;for(let g=0;g<u;g++){const v=n[g];if(a===0&&s===0){if(v===Hd){o.push(n.slice(c,g)),c=g+1;continue}if(v==="/"){l=g;continue}}v==="["?a++:v==="]"?a--:v==="("?s++:v===")"&&s--}const f=o.length===0?n:n.slice(c);let d=f,h=!1;f.endsWith(Tc)?(d=f.slice(0,-1),h=!0):f.startsWith(Tc)&&(d=f.slice(1),h=!0);const p=l&&l>c?l-c:void 0;return Xd(o,h,d,p)};if(t){const n=t+Hd,o=i;i=a=>a.startsWith(n)?o(a.slice(n.length)):Xd(V$,!1,a,void 0,!0)}if(r){const n=i;i=o=>r({className:o,parseClassName:n})}return i},q$=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,i)=>{t.set(r,1e6+i)}),r=>{const i=[];let n=[];for(let o=0;o<r.length;o++){const a=r[o],s=a[0]==="[",c=t.has(a);s||c?(n.length>0&&(n.sort(),i.push(...n),n=[]),i.push(a)):n.push(a)}return n.length>0&&(n.sort(),i.push(...n)),i}},G$=e=>({cache:B$(e.cacheSize),parseClassName:W$(e),sortModifiers:q$(e),...P$(e)}),Y$=/\s+/,H$=(e,t)=>{const{parseClassName:r,getClassGroupId:i,getConflictingClassGroupIds:n,sortModifiers:o}=t,a=[],s=e.trim().split(Y$);let c="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}=r(u);if(f){c=u+(c.length>0?" "+c:c);continue}let v=!!g,b=i(v?p.substring(0,g):p);if(!b){if(!v){c=u+(c.length>0?" "+c:c);continue}if(b=i(p),!b){c=u+(c.length>0?" "+c:c);continue}v=!1}const _=d.length===0?"":d.length===1?d[0]:o(d).join(":"),x=h?_+Tc:_,y=x+b;if(a.indexOf(y)>-1)continue;a.push(y);const w=n(b,v);for(let S=0;S<w.length;++S){const k=w[S];a.push(x+k)}c=u+(c.length>0?" "+c:c)}return c},X$=(...e)=>{let t=0,r,i,n="";for(;t<e.length;)(r=e[t++])&&(i=pp(r))&&(n&&(n+=" "),n+=i);return n},pp=e=>{if(typeof e=="string")return e;let t,r="";for(let i=0;i<e.length;i++)e[i]&&(t=pp(e[i]))&&(r&&(r+=" "),r+=t);return r},J$=(e,...t)=>{let r,i,n,o;const a=c=>{const l=t.reduce((u,f)=>f(u),e());return r=G$(l),i=r.cache.get,n=r.cache.set,o=s,s(c)},s=c=>{const l=i(c);if(l)return l;const u=H$(c,r);return n(c,u),u};return o=a,(...c)=>o(X$(...c))},K$=[],Me=e=>{const t=r=>r[e]||K$;return t.isThemeGetter=!0,t},vp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,bp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Q$=/^\d+\/\d+$/,e6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t6=/\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$/,n6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,i6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,hr=e=>Q$.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),pn=e=>!!e&&Number.isInteger(Number(e)),Tl=e=>e.endsWith("%")&&le(e.slice(0,-1)),Xt=e=>e6.test(e),o6=()=>!0,a6=e=>t6.test(e)&&!n6.test(e),yp=()=>!1,s6=e=>r6.test(e),l6=e=>i6.test(e),c6=e=>!W(e)&&!q(e),u6=e=>oi(e,wp,yp),W=e=>vp.test(e),Rn=e=>oi(e,$p,a6),Cl=e=>oi(e,g6,le),Jd=e=>oi(e,_p,yp),f6=e=>oi(e,xp,l6),Po=e=>oi(e,Sp,s6),q=e=>bp.test(e),gi=e=>ai(e,$p),d6=e=>ai(e,p6),Kd=e=>ai(e,_p),h6=e=>ai(e,wp),m6=e=>ai(e,xp),Oo=e=>ai(e,Sp,!0),oi=(e,t,r)=>{const i=vp.exec(e);return i?i[1]?t(i[1]):r(i[2]):!1},ai=(e,t,r=!1)=>{const i=bp.exec(e);return i?i[1]?t(i[1]):r:!1},_p=e=>e==="position"||e==="percentage",xp=e=>e==="image"||e==="url",wp=e=>e==="length"||e==="size"||e==="bg-size",$p=e=>e==="length",g6=e=>e==="number",p6=e=>e==="family-name",Sp=e=>e==="shadow",v6=()=>{const e=Me("color"),t=Me("font"),r=Me("text"),i=Me("font-weight"),n=Me("tracking"),o=Me("leading"),a=Me("breakpoint"),s=Me("container"),c=Me("spacing"),l=Me("radius"),u=Me("shadow"),f=Me("inset-shadow"),d=Me("text-shadow"),h=Me("drop-shadow"),p=Me("blur"),g=Me("perspective"),v=Me("aspect"),b=Me("ease"),_=Me("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...y(),q,W],S=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],N=()=>[q,W,c],C=()=>[hr,"full","auto",...N()],j=()=>[pn,"none","subgrid",q,W],M=()=>["auto",{span:["full",pn,q,W]},pn,q,W],D=()=>[pn,"auto",q,W],O=()=>["auto","min","max","fr",q,W],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],A=()=>["start","end","center","stretch","center-safe","end-safe"],T=()=>["auto",...N()],R=()=>[hr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],P=()=>[e,q,W],U=()=>[...y(),Kd,Jd,{position:[q,W]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",h6,u6,{size:[q,W]}],G=()=>[Tl,gi,Rn],ne=()=>["","none","full",l,q,W],ee=()=>["",le,gi,Rn],oe=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[le,Tl,Kd,Jd],he=()=>["","none",p,q,W],F=()=>["none",le,q,W],K=()=>["none",le,q,W],re=()=>[le,q,W],z=()=>[hr,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xt],breakpoint:[Xt],color:[o6],container:[Xt],"drop-shadow":[Xt],ease:["in","out","in-out"],font:[c6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xt],shadow:[Xt],spacing:["px",le],text:[Xt],"text-shadow":[Xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",hr,W,q,v]}],container:["container"],columns:[{columns:[le,W,q,s]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:w()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:C()}],"inset-x":[{"inset-x":C()}],"inset-y":[{"inset-y":C()}],start:[{start:C()}],end:[{end:C()}],top:[{top:C()}],right:[{right:C()}],bottom:[{bottom:C()}],left:[{left:C()}],visibility:["visible","invisible","collapse"],z:[{z:[pn,"auto",q,W]}],basis:[{basis:[hr,"full","auto",s,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,hr,"auto","initial","none",W]}],grow:[{grow:["",le,q,W]}],shrink:[{shrink:["",le,q,W]}],order:[{order:[pn,"first","last","none",q,W]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...A(),"normal"]}],"justify-self":[{"justify-self":["auto",...A()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...A(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...A(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...A(),"baseline"]}],"place-self":[{"place-self":["auto",...A()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],m:[{m:T()}],mx:[{mx:T()}],my:[{my:T()}],ms:[{ms:T()}],me:[{me:T()}],mt:[{mt:T()}],mr:[{mr:T()}],mb:[{mb:T()}],ml:[{ml:T()}],"space-x":[{"space-x":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],w:[{w:[s,"screen",...R()]}],"min-w":[{"min-w":[s,"screen","none",...R()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",r,gi,Rn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,q,Cl]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Tl,W]}],"font-family":[{font:[d6,W,t]}],"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:[n,q,W]}],"line-clamp":[{"line-clamp":[le,"none",q,Cl]}],leading:[{leading:[o,...N()]}],"list-image":[{"list-image":["none",q,W]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",q,W]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",q,Rn]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[le,"auto",q,W]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",q,W]}],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",q,W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:U()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pn,q,W],radial:["",q,W],conic:[pn,q,W]},m6,f6]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ne()}],"rounded-s":[{"rounded-s":ne()}],"rounded-e":[{"rounded-e":ne()}],"rounded-t":[{"rounded-t":ne()}],"rounded-r":[{"rounded-r":ne()}],"rounded-b":[{"rounded-b":ne()}],"rounded-l":[{"rounded-l":ne()}],"rounded-ss":[{"rounded-ss":ne()}],"rounded-se":[{"rounded-se":ne()}],"rounded-ee":[{"rounded-ee":ne()}],"rounded-es":[{"rounded-es":ne()}],"rounded-tl":[{"rounded-tl":ne()}],"rounded-tr":[{"rounded-tr":ne()}],"rounded-br":[{"rounded-br":ne()}],"rounded-bl":[{"rounded-bl":ne()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,q,W]}],"outline-w":[{outline:["",le,gi,Rn]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",u,Oo,Po]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",f,Oo,Po]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[le,Rn]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",d,Oo,Po]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[le,q,W]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"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":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[q,W]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":y()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:U()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",q,W]}],filter:[{filter:["","none",q,W]}],blur:[{blur:he()}],brightness:[{brightness:[le,q,W]}],contrast:[{contrast:[le,q,W]}],"drop-shadow":[{"drop-shadow":["","none",h,Oo,Po]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",le,q,W]}],"hue-rotate":[{"hue-rotate":[le,q,W]}],invert:[{invert:["",le,q,W]}],saturate:[{saturate:[le,q,W]}],sepia:[{sepia:["",le,q,W]}],"backdrop-filter":[{"backdrop-filter":["","none",q,W]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[le,q,W]}],"backdrop-contrast":[{"backdrop-contrast":[le,q,W]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,q,W]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,q,W]}],"backdrop-invert":[{"backdrop-invert":["",le,q,W]}],"backdrop-opacity":[{"backdrop-opacity":[le,q,W]}],"backdrop-saturate":[{"backdrop-saturate":[le,q,W]}],"backdrop-sepia":[{"backdrop-sepia":["",le,q,W]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",q,W]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",q,W]}],ease:[{ease:["linear","initial",b,q,W]}],delay:[{delay:[le,q,W]}],animate:[{animate:["none",_,q,W]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,q,W]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:F()}],"rotate-x":[{"rotate-x":F()}],"rotate-y":[{"rotate-y":F()}],"rotate-z":[{"rotate-z":F()}],scale:[{scale:K()}],"scale-x":[{"scale-x":K()}],"scale-y":[{"scale-y":K()}],"scale-z":[{"scale-z":K()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[q,W,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:z()}],"translate-x":[{"translate-x":z()}],"translate-y":[{"translate-y":z()}],"translate-z":[{"translate-z":z()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",q,W]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",q,W]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[le,gi,Rn,Cl]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]}},b6=J$(v6);function ae(...e){return b6(dp(e))}const y6=T$("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),ln=E.forwardRef(({className:e,variant:t,size:r,asChild:i=!1,...n},o)=>{const a=i?$$:"button";return $.jsx(a,{"data-slot":"button",className:ae(y6({variant:t,size:r,className:e})),ref:o,...n})});ln.displayName="Button";function we(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function kp(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ss(e){let t,r,i;e.length!==2?(t=we,r=(s,c)=>we(e(s),c),i=(s,c)=>e(s)-c):(t=e===we||e===kp?e:_6,r=e,i=e);function n(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const f=l+u>>>1;r(s[f],c)<0?l=f+1:u=f}while(l<u)}return l}function o(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const f=l+u>>>1;r(s[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function a(s,c,l=0,u=s.length){const f=n(s,c,l,u-1);return f>l&&i(s[f-1],c)>-i(s[f],c)?f-1:f}return{left:n,center:a,right:o}}function _6(){return 0}function Ma(e){return e===null?NaN:+e}function*x6(e,t){if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(i=+i)>=i&&(yield i)}}const Ip=Ss(we),Sn=Ip.right,w6=Ip.left,$6=Ss(Ma).center;function S6(e,t){if(!((t=+t)>=0))throw new RangeError("invalid r");let r=e.length;if(!((r=Math.floor(r))>=0))throw new RangeError("invalid length");if(!r||!t)return e;const i=Uu(t),n=e.slice();return i(e,n,0,r,1),i(n,e,0,r,1),i(e,n,0,r,1),e}const Np=Ep(Uu),k6=Ep(I6);function Ep(e){return function(t,r,i=r){if(!((r=+r)>=0))throw new RangeError("invalid rx");if(!((i=+i)>=0))throw new RangeError("invalid ry");let{data:n,width:o,height:a}=t;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(a!==void 0?a:n.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!r&&!i)return t;const s=r&&e(r),c=i&&e(i),l=n.slice();return s&&c?(mr(s,l,n,o,a),mr(s,n,l,o,a),mr(s,l,n,o,a),gr(c,n,l,o,a),gr(c,l,n,o,a),gr(c,n,l,o,a)):s?(mr(s,n,l,o,a),mr(s,l,n,o,a),mr(s,n,l,o,a)):c&&(gr(c,n,l,o,a),gr(c,l,n,o,a),gr(c,n,l,o,a)),t}}function mr(e,t,r,i,n){for(let o=0,a=i*n;o<a;)e(t,r,o,o+=i,1)}function gr(e,t,r,i,n){for(let o=0,a=i*n;o<i;++o)e(t,r,o,o+a,i)}function I6(e){const t=Uu(e);return(r,i,n,o,a)=>{n<<=2,o<<=2,a<<=2,t(r,i,n+0,o+0,a),t(r,i,n+1,o+1,a),t(r,i,n+2,o+2,a),t(r,i,n+3,o+3,a)}}function Uu(e){const t=Math.floor(e);if(t===e)return N6(e);const r=e-t,i=2*e+1;return(n,o,a,s,c)=>{if(!((s-=c)>=a))return;let l=t*o[a];const u=c*t,f=u+c;for(let d=a,h=a+u;d<h;d+=c)l+=o[Math.min(s,d)];for(let d=a,h=s;d<=h;d+=c)l+=o[Math.min(s,d+u)],n[d]=(l+r*(o[Math.max(a,d-f)]+o[Math.min(s,d+f)]))/i,l-=o[Math.max(a,d-u)]}}function N6(e){const t=2*e+1;return(r,i,n,o,a)=>{if(!((o-=a)>=n))return;let s=e*i[n];const c=a*e;for(let l=n,u=n+c;l<u;l+=a)s+=i[Math.min(o,l)];for(let l=n,u=o;l<=u;l+=a)s+=i[Math.min(o,l+c)],r[l]=s/t,s-=i[Math.max(n,l-c)]}}function ks(e,t){let r=0;if(t===void 0)for(let i of e)i!=null&&(i=+i)>=i&&++r;else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(n=+n)>=n&&++r}return r}function E6(e){return e.length|0}function M6(e){return!(e>0)}function T6(e){return typeof e!="object"||"length"in e?e:Array.from(e)}function C6(e){return t=>e(...t)}function A6(...e){const t=typeof e[e.length-1]=="function"&&C6(e.pop());e=e.map(T6);const r=e.map(E6),i=e.length-1,n=new Array(i+1).fill(0),o=[];if(i<0||r.some(M6))return o;for(;;){o.push(n.map((s,c)=>e[c][s]));let a=i;for(;++n[a]===r[a];){if(a===0)return t?o.map(t):o;n[a--]=0}}}function j6(e,t){var r=0,i=0;return Float64Array.from(e,t===void 0?n=>r+=+n||0:n=>r+=+t(n,i++,e)||0)}function Mp(e,t){let r=0,i,n=0,o=0;if(t===void 0)for(let a of e)a!=null&&(a=+a)>=a&&(i=a-n,n+=i/++r,o+=i*(a-n));else{let a=-1;for(let s of e)(s=t(s,++a,e))!=null&&(s=+s)>=s&&(i=s-n,n+=i/++r,o+=i*(s-n))}if(r>1)return o/(r-1)}function Tp(e,t){const r=Mp(e,t);return r&&Math.sqrt(r)}function Fi(e,t){let r,i;if(t===void 0)for(const n of e)n!=null&&(r===void 0?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)));else{let n=-1;for(let o of e)(o=t(o,++n,e))!=null&&(r===void 0?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}return[r,i]}class Ce{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const r=this._partials;let i=0;for(let n=0;n<this._n&&n<32;n++){const o=r[n],a=t+o,s=Math.abs(t)<Math.abs(o)?t-(a-o):o-(a-t);s&&(r[i++]=s),t=a}return r[i]=t,this._n=i+1,this}valueOf(){const t=this._partials;let r=this._n,i,n,o,a=0;if(r>0){for(a=t[--r];r>0&&(i=a,n=t[--r],a=i+n,o=n-(a-i),!o););r>0&&(o<0&&t[r-1]<0||o>0&&t[r-1]>0)&&(n=o*2,i=a+n,n==i-a&&(a=i))}return a}}function P6(e,t){const r=new Ce;if(t===void 0)for(let i of e)(i=+i)&&r.add(i);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&r.add(n)}return+r}function O6(e,t){const r=new Ce;let i=-1;return Float64Array.from(e,t===void 0?n=>r.add(+n||0):n=>r.add(+t(n,++i,e)||0))}class Yi extends Map{constructor(t,r=jp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[i,n]of t)this.set(i,n)}get(t){return super.get(Cc(this,t))}has(t){return super.has(Cc(this,t))}set(t,r){return super.set(Cp(this,t),r)}delete(t){return super.delete(Ap(this,t))}}class Gn extends Set{constructor(t,r=jp){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const i of t)this.add(i)}has(t){return super.has(Cc(this,t))}add(t){return super.add(Cp(this,t))}delete(t){return super.delete(Ap(this,t))}}function Cc({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):r}function Cp({_intern:e,_key:t},r){const i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function Ap({_intern:e,_key:t},r){const i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function jp(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Lr(e){return e}function Pp(e,...t){return si(e,Lr,Lr,t)}function Op(e,...t){return si(e,Array.from,Lr,t)}function Rp(e,t){for(let r=1,i=t.length;r<i;++r)e=e.flatMap(n=>n.pop().map(([o,a])=>[...n,o,a]));return e}function R6(e,...t){return Rp(Op(e,...t),t)}function D6(e,t,...r){return Rp(Up(e,t,...r),r)}function Dp(e,t,...r){return si(e,Lr,t,r)}function Up(e,t,...r){return si(e,Array.from,t,r)}function U6(e,...t){return si(e,Lr,zp,t)}function z6(e,...t){return si(e,Array.from,zp,t)}function zp(e){if(e.length!==1)throw new Error("duplicate key");return e[0]}function si(e,t,r,i){return(function n(o,a){if(a>=i.length)return r(o);const s=new Yi,c=i[a++];let l=-1;for(const u of o){const f=c(u,++l,o),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,n(f,a));return t(s)})(e,0)}function Lp(e,t){return Array.from(t,r=>e[r])}function Ac(e,...t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");e=Array.from(e);let[r]=t;if(r&&r.length!==2||t.length>1){const i=Uint32Array.from(e,(n,o)=>o);return t.length>1?(t=t.map(n=>e.map(n)),i.sort((n,o)=>{for(const a of t){const s=Fr(a[n],a[o]);if(s)return s}})):(r=e.map(r),i.sort((n,o)=>Fr(r[n],r[o]))),Lp(e,i)}return e.sort(zu(r))}function zu(e=we){if(e===we)return Fr;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const i=e(t,r);return i||i===0?i:(e(r,r)===0)-(e(t,t)===0)}}function Fr(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}function L6(e,t,r){return(t.length!==2?Ac(Dp(e,t,r),(([i,n],[o,a])=>we(n,a)||we(i,o))):Ac(Pp(e,r),(([i,n],[o,a])=>t(n,a)||we(i,o)))).map(([i])=>i)}var F6=Array.prototype,Z6=F6.slice;function Al(e){return()=>e}const B6=Math.sqrt(50),V6=Math.sqrt(10),W6=Math.sqrt(2);function Ta(e,t,r){const i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),o=i/Math.pow(10,n),a=o>=B6?10:o>=V6?5:o>=W6?2:1;let s,c,l;return n<0?(l=Math.pow(10,-n)/a,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,n)*a,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=r&&r<2?Ta(e,t,r*2):[s,c,l]}function Yn(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const i=t<e,[n,o,a]=i?Ta(t,e,r):Ta(e,t,r);if(!(o>=n))return[];const s=o-n+1,c=new Array(s);if(i)if(a<0)for(let l=0;l<s;++l)c[l]=(o-l)/-a;else for(let l=0;l<s;++l)c[l]=(o-l)*a;else if(a<0)for(let l=0;l<s;++l)c[l]=(n+l)/-a;else for(let l=0;l<s;++l)c[l]=(n+l)*a;return c}function Hn(e,t,r){return t=+t,e=+e,r=+r,Ta(e,t,r)[2]}function Ca(e,t,r){t=+t,e=+e,r=+r;const i=t<e,n=i?Hn(t,e,r):Hn(e,t,r);return(i?-1:1)*(n<0?1/-n:n)}function Lu(e,t,r){let i;for(;;){const n=Hn(e,t,r);if(n===i||n===0||!isFinite(n))return[e,t];n>0?(e=Math.floor(e/n)*n,t=Math.ceil(t/n)*n):n<0&&(e=Math.ceil(e*n)/n,t=Math.floor(t*n)/n),i=n}}function Fu(e){return Math.max(1,Math.ceil(Math.log(ks(e))/Math.LN2)+1)}function Qd(){var e=Lr,t=Fi,r=Fu;function i(n){Array.isArray(n)||(n=Array.from(n));var o,a=n.length,s,c,l=new Array(a);for(o=0;o<a;++o)l[o]=e(n[o],o,n);var u=t(l),f=u[0],d=u[1],h=r(l,f,d);if(!Array.isArray(h)){const x=d,y=+h;if(t===Fi&&([f,d]=Lu(f,d,y)),h=Yn(f,d,y),h[0]<=f&&(c=Hn(f,d,y)),h[h.length-1]>=d)if(x>=d&&t===Fi){const w=Hn(f,d,y);isFinite(w)&&(w>0?d=(Math.floor(d/w)+1)*w:w<0&&(d=(Math.ceil(d*-w)+1)/-w))}else h.pop()}for(var p=h.length,g=0,v=p;h[g]<=f;)++g;for(;h[v-1]>d;)--v;(g||v<p)&&(h=h.slice(g,v),p=v-g);var b=new Array(p+1),_;for(o=0;o<=p;++o)_=b[o]=[],_.x0=o>0?h[o-1]:f,_.x1=o<p?h[o]:d;if(isFinite(c)){if(c>0)for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=d&&b[Math.min(p,Math.floor((s-f)/c))].push(n[o]);else if(c<0){for(o=0;o<a;++o)if((s=l[o])!=null&&f<=s&&s<=d){const x=Math.floor((f-s)*c);b[Math.min(p,x+(h[x]<=s))].push(n[o])}}}else for(o=0;o<a;++o)(s=l[o])!=null&&f<=s&&s<=d&&b[Sn(h,s,0,p)].push(n[o]);return b}return i.value=function(n){return arguments.length?(e=typeof n=="function"?n:Al(n),i):e},i.domain=function(n){return arguments.length?(t=typeof n=="function"?n:Al([n[0],n[1]]),i):t},i.thresholds=function(n){return arguments.length?(r=typeof n=="function"?n:Al(Array.isArray(n)?Z6.call(n):n),i):r},i}function Hi(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function Zu(e,t){let r,i=-1,n=-1;if(t===void 0)for(const o of e)++n,o!=null&&(r<o||r===void 0&&o>=o)&&(r=o,i=n);else for(let o of e)(o=t(o,++n,e))!=null&&(r<o||r===void 0&&o>=o)&&(r=o,i=n);return i}function Aa(e,t){let r;if(t===void 0)for(const i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function Bu(e,t){let r,i=-1,n=-1;if(t===void 0)for(const o of e)++n,o!=null&&(r>o||r===void 0&&o>=o)&&(r=o,i=n);else for(let o of e)(o=t(o,++n,e))!=null&&(r>o||r===void 0&&o>=o)&&(r=o,i=n);return i}function Is(e,t,r=0,i=1/0,n){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(e.length-1,i)),!(r<=t&&t<=i))return e;for(n=n===void 0?Fr:zu(n);i>r;){if(i-r>600){const c=i-r+1,l=t-r+1,u=Math.log(c),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),h=Math.max(r,Math.floor(t-l*f/c+d)),p=Math.min(i,Math.floor(t+(c-l)*f/c+d));Is(e,t,h,p,n)}const o=e[t];let a=r,s=i;for(pi(e,r,t),n(e[i],o)>0&&pi(e,r,i);a<s;){for(pi(e,a,s),++a,--s;n(e[a],o)<0;)++a;for(;n(e[s],o)>0;)--s}n(e[r],o)===0?pi(e,r,s):(++s,pi(e,s,i)),s<=t&&(r=s+1),t<=s&&(i=s-1)}return e}function pi(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function Fp(e,t=we){let r,i=!1;if(t.length===1){let n;for(const o of e){const a=t(o);(i?we(a,n)>0:we(a,a)===0)&&(r=o,n=a,i=!0)}}else for(const n of e)(i?t(n,r)>0:t(n,n)===0)&&(r=n,i=!0);return r}function Xi(e,t,r){if(e=Float64Array.from(x6(e,r)),!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return Aa(e);if(t>=1)return Hi(e);var i,n=(i-1)*t,o=Math.floor(n),a=Hi(Is(e,o).subarray(0,o+1)),s=Aa(e.subarray(o+1));return a+(s-a)*(n-o)}}function Zp(e,t,r=Ma){if(!(!(i=e.length)||isNaN(t=+t))){if(t<=0||i<2)return+r(e[0],0,e);if(t>=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,o=Math.floor(n),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(n-o)}}function Bp(e,t,r=Ma){if(!isNaN(t=+t)){if(i=Float64Array.from(e,(s,c)=>Ma(r(e[c],c,e))),t<=0)return Bu(i);if(t>=1)return Zu(i);var i,n=Uint32Array.from(e,(s,c)=>c),o=i.length-1,a=Math.floor(o*t);return Is(n,a,0,o,(s,c)=>Fr(i[s],i[c])),a=Fp(n.subarray(0,a+1),s=>i[s]),a>=0?a:-1}}function q6(e,t,r){const i=ks(e),n=Xi(e,.75)-Xi(e,.25);return i&&n?Math.ceil((r-t)/(2*n*Math.pow(i,-1/3))):1}function G6(e,t,r){const i=ks(e),n=Tp(e);return i&&n?Math.ceil((r-t)*Math.cbrt(i)/(3.49*n)):1}function Y6(e,t){let r=0,i=0;if(t===void 0)for(let n of e)n!=null&&(n=+n)>=n&&(++r,i+=n);else{let n=-1;for(let o of e)(o=t(o,++n,e))!=null&&(o=+o)>=o&&(++r,i+=o)}if(r)return i/r}function H6(e,t){return Xi(e,.5,t)}function X6(e,t){return Bp(e,.5,t)}function*J6(e){for(const t of e)yield*t}function Vu(e){return Array.from(J6(e))}function K6(e,t){const r=new Yi;if(t===void 0)for(let o of e)o!=null&&o>=o&&r.set(o,(r.get(o)||0)+1);else{let o=-1;for(let a of e)(a=t(a,++o,e))!=null&&a>=a&&r.set(a,(r.get(a)||0)+1)}let i,n=0;for(const[o,a]of r)a>n&&(n=a,i=o);return i}function Q6(e,t=e4){const r=[];let i,n=!1;for(const o of e)n&&r.push(t(i,o)),i=o,n=!0;return r}function e4(e,t){return[e,t]}function xn(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(n);++i<n;)o[i]=e+i*r;return o}function t4(e,t=we){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let r=Array.from(e);const i=new Float64Array(r.length);t.length!==2&&(r=r.map(t),t=we);const n=(s,c)=>t(r[s],r[c]);let o,a;return e=Uint32Array.from(r,(s,c)=>c),e.sort(t===we?(s,c)=>Fr(r[s],r[c]):zu(n)),e.forEach((s,c)=>{const l=n(s,o===void 0?s:o);l>=0?((o===void 0||l>0)&&(o=s,a=c),i[s]=a):i[s]=NaN}),i}function n4(e,t=we){let r,i=!1;if(t.length===1){let n;for(const o of e){const a=t(o);(i?we(a,n)<0:we(a,a)===0)&&(r=o,n=a,i=!0)}}else for(const n of e)(i?t(n,r)<0:t(n,n)===0)&&(r=n,i=!0);return r}function Vp(e,t=we){if(t.length===1)return Bu(e,t);let r,i=-1,n=-1;for(const o of e)++n,(i<0?t(o,o)===0:t(o,r)<0)&&(r=o,i=n);return i}function r4(e,t=we){if(t.length===1)return Zu(e,t);let r,i=-1,n=-1;for(const o of e)++n,(i<0?t(o,o)===0:t(o,r)>0)&&(r=o,i=n);return i}function i4(e,t){const r=Vp(e,t);return r<0?void 0:r}const o4=Wp(Math.random);function Wp(e){return function(r,i=0,n=r.length){let o=n-(i=+i);for(;o;){const a=e()*o--|0,s=r[o+i];r[o+i]=r[a+i],r[a+i]=s}return r}}function a4(e,t){let r=0;if(t===void 0)for(let i of e)(i=+i)&&(r+=i);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&(r+=n)}return r}function qp(e){if(!(o=e.length))return[];for(var t=-1,r=Aa(e,s4),i=new Array(r);++t<r;)for(var n=-1,o,a=i[t]=new Array(o);++n<o;)a[n]=e[n][t];return i}function s4(e){return e.length}function l4(){return qp(arguments)}function c4(e,t){if(typeof t!="function")throw new TypeError("test is not a function");let r=-1;for(const i of e)if(!t(i,++r,e))return!1;return!0}function u4(e,t){if(typeof t!="function")throw new TypeError("test is not a function");let r=-1;for(const i of e)if(t(i,++r,e))return!0;return!1}function f4(e,t){if(typeof t!="function")throw new TypeError("test is not a function");const r=[];let i=-1;for(const n of e)t(n,++i,e)&&r.push(n);return r}function d4(e,t){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof t!="function")throw new TypeError("mapper is not a function");return Array.from(e,(r,i)=>t(r,i,e))}function h4(e,t,r){if(typeof t!="function")throw new TypeError("reducer is not a function");const i=e[Symbol.iterator]();let n,o,a=-1;if(arguments.length<3){if({done:n,value:r}=i.next(),n)return;++a}for(;{done:n,value:o}=i.next(),!n;)r=t(r,o,++a,e);return r}function m4(e){if(typeof e[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(e).reverse()}function g4(e,...t){e=new Gn(e);for(const r of t)for(const i of r)e.delete(i);return e}function p4(e,t){const r=t[Symbol.iterator](),i=new Gn;for(const n of e){if(i.has(n))return!1;let o,a;for(;({value:o,done:a}=r.next())&&!a;){if(Object.is(n,o))return!1;i.add(o)}}return!0}function v4(e,...t){e=new Gn(e),t=t.map(b4);e:for(const r of e)for(const i of t)if(!i.has(r)){e.delete(r);continue e}return e}function b4(e){return e instanceof Gn?e:new Gn(e)}function Gp(e,t){const r=e[Symbol.iterator](),i=new Set;for(const n of t){const o=eh(n);if(i.has(o))continue;let a,s;for(;{value:a,done:s}=r.next();){if(s)return!1;const c=eh(a);if(i.add(c),Object.is(o,c))break}}return!0}function eh(e){return e!==null&&typeof e=="object"?e.valueOf():e}function y4(e,t){return Gp(t,e)}function _4(...e){const t=new Gn;for(const r of e)for(const i of r)t.add(i);return t}function x4(e){return e}var da=1,ha=2,jc=3,Ei=4,th=1e-6;function w4(e){return"translate("+e+",0)"}function $4(e){return"translate(0,"+e+")"}function S4(e){return t=>+e(t)}function k4(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function I4(){return!this.__axis}function Ns(e,t){var r=[],i=null,n=null,o=6,a=6,s=3,c=typeof window<"u"&&window.devicePixelRatio>1?0:.5,l=e===da||e===Ei?-1:1,u=e===Ei||e===ha?"x":"y",f=e===da||e===jc?w4:$4;function d(h){var p=i??(t.ticks?t.ticks.apply(t,r):t.domain()),g=n??(t.tickFormat?t.tickFormat.apply(t,r):x4),v=Math.max(o,0)+s,b=t.range(),_=+b[0]+c,x=+b[b.length-1]+c,y=(t.bandwidth?k4:S4)(t.copy(),c),w=h.selection?h.selection():h,S=w.selectAll(".domain").data([null]),k=w.selectAll(".tick").data(p,t).order(),N=k.exit(),C=k.enter().append("g").attr("class","tick"),j=k.select("line"),M=k.select("text");S=S.merge(S.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(C),j=j.merge(C.append("line").attr("stroke","currentColor").attr(u+"2",l*o)),M=M.merge(C.append("text").attr("fill","currentColor").attr(u,l*v).attr("dy",e===da?"0em":e===jc?"0.71em":"0.32em")),h!==w&&(S=S.transition(h),k=k.transition(h),j=j.transition(h),M=M.transition(h),N=N.transition(h).attr("opacity",th).attr("transform",function(D){return isFinite(D=y(D))?f(D+c):this.getAttribute("transform")}),C.attr("opacity",th).attr("transform",function(D){var O=this.parentNode.__axis;return f((O&&isFinite(O=O(D))?O:y(D))+c)})),N.remove(),S.attr("d",e===Ei||e===ha?a?"M"+l*a+","+_+"H"+c+"V"+x+"H"+l*a:"M"+c+","+_+"V"+x:a?"M"+_+","+l*a+"V"+c+"H"+x+"V"+l*a:"M"+_+","+c+"H"+x),k.attr("opacity",1).attr("transform",function(D){return f(y(D)+c)}),j.attr(u+"2",l*o),M.attr(u,l*v).text(g),w.filter(I4).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===ha?"start":e===Ei?"end":"middle"),w.each(function(){this.__axis=y})}return d.scale=function(h){return arguments.length?(t=h,d):t},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(h){return arguments.length?(r=h==null?[]:Array.from(h),d):r.slice()},d.tickValues=function(h){return arguments.length?(i=h==null?null:Array.from(h),d):i&&i.slice()},d.tickFormat=function(h){return arguments.length?(n=h,d):n},d.tickSize=function(h){return arguments.length?(o=a=+h,d):o},d.tickSizeInner=function(h){return arguments.length?(o=+h,d):o},d.tickSizeOuter=function(h){return arguments.length?(a=+h,d):a},d.tickPadding=function(h){return arguments.length?(s=+h,d):s},d.offset=function(h){return arguments.length?(c=+h,d):c},d}function N4(e){return Ns(da,e)}function E4(e){return Ns(ha,e)}function M4(e){return Ns(jc,e)}function T4(e){return Ns(Ei,e)}var C4={value:()=>{}};function sr(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new ma(r)}function ma(e){this._=e}function A4(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}ma.prototype=sr.prototype={constructor:ma,on:function(e,t){var r=this._,i=A4(e+"",r),n,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(e=i[o]).type)&&(n=j4(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(n=(e=i[o]).type)r[n]=nh(r[n],e.name,t);else if(t==null)for(n in r)r[n]=nh(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ma(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,o;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,n=o.length;i<n;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,o=i.length;n<o;++n)i[n].value.apply(t,r)}};function j4(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function nh(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=C4,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Pc="http://www.w3.org/1999/xhtml";const Oc={svg:"http://www.w3.org/2000/svg",xhtml:Pc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function po(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Oc.hasOwnProperty(t)?{space:Oc[t],local:e}:e}function P4(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Pc&&t.documentElement.namespaceURI===Pc?t.createElement(e):t.createElementNS(r,e)}}function O4(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Es(e){var t=po(e);return(t.local?O4:P4)(t)}function R4(){}function Ms(e){return e==null?R4:function(){return this.querySelector(e)}}function D4(e){typeof e!="function"&&(e=Ms(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var o=t[n],a=o.length,s=i[n]=new Array(a),c,l,u=0;u<a;++u)(c=o[u])&&(l=e.call(c,c.__data__,u,o))&&("__data__"in c&&(l.__data__=c.__data__),s[u]=l);return new Qe(i,this._parents)}function Yp(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function U4(){return[]}function Wu(e){return e==null?U4:function(){return this.querySelectorAll(e)}}function z4(e){return function(){return Yp(e.apply(this,arguments))}}function L4(e){typeof e=="function"?e=z4(e):e=Wu(e);for(var t=this._groups,r=t.length,i=[],n=[],o=0;o<r;++o)for(var a=t[o],s=a.length,c,l=0;l<s;++l)(c=a[l])&&(i.push(e.call(c,c.__data__,l,a)),n.push(c));return new Qe(i,n)}function qu(e){return function(){return this.matches(e)}}function Hp(e){return function(t){return t.matches(e)}}var F4=Array.prototype.find;function Z4(e){return function(){return F4.call(this.children,e)}}function B4(){return this.firstElementChild}function V4(e){return this.select(e==null?B4:Z4(typeof e=="function"?e:Hp(e)))}var W4=Array.prototype.filter;function q4(){return Array.from(this.children)}function G4(e){return function(){return W4.call(this.children,e)}}function Y4(e){return this.selectAll(e==null?q4:G4(typeof e=="function"?e:Hp(e)))}function H4(e){typeof e!="function"&&(e=qu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var o=t[n],a=o.length,s=i[n]=[],c,l=0;l<a;++l)(c=o[l])&&e.call(c,c.__data__,l,o)&&s.push(c);return new Qe(i,this._parents)}function Xp(e){return new Array(e.length)}function X4(){return new Qe(this._enter||this._groups.map(Xp),this._parents)}function ja(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ja.prototype={constructor:ja,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function J4(e){return function(){return e}}function K4(e,t,r,i,n,o){for(var a=0,s,c=t.length,l=o.length;a<l;++a)(s=t[a])?(s.__data__=o[a],i[a]=s):r[a]=new ja(e,o[a]);for(;a<c;++a)(s=t[a])&&(n[a]=s)}function Q4(e,t,r,i,n,o,a){var s,c,l=new Map,u=t.length,f=o.length,d=new Array(u),h;for(s=0;s<u;++s)(c=t[s])&&(d[s]=h=a.call(c,c.__data__,s,t)+"",l.has(h)?n[s]=c:l.set(h,c));for(s=0;s<f;++s)h=a.call(e,o[s],s,o)+"",(c=l.get(h))?(i[s]=c,c.__data__=o[s],l.delete(h)):r[s]=new ja(e,o[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(d[s])===c&&(n[s]=c)}function eS(e){return e.__data__}function tS(e,t){if(!arguments.length)return Array.from(this,eS);var r=t?Q4:K4,i=this._parents,n=this._groups;typeof e!="function"&&(e=J4(e));for(var o=n.length,a=new Array(o),s=new Array(o),c=new Array(o),l=0;l<o;++l){var u=i[l],f=n[l],d=f.length,h=nS(e.call(u,u&&u.__data__,l,i)),p=h.length,g=s[l]=new Array(p),v=a[l]=new Array(p),b=c[l]=new Array(d);r(u,f,g,v,b,h,t);for(var _=0,x=0,y,w;_<p;++_)if(y=g[_]){for(_>=x&&(x=_+1);!(w=v[x])&&++x<p;);y._next=w||null}}return a=new Qe(a,i),a._enter=s,a._exit=c,a}function nS(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rS(){return new Qe(this._exit||this._groups.map(Xp),this._parents)}function iS(e,t,r){var i=this.enter(),n=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?o.remove():r(o),i&&n?i.merge(n).order():n}function oS(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,o=i.length,a=Math.min(n,o),s=new Array(n),c=0;c<a;++c)for(var l=r[c],u=i[c],f=l.length,d=s[c]=new Array(f),h,p=0;p<f;++p)(h=l[p]||u[p])&&(d[p]=h);for(;c<n;++c)s[c]=r[c];return new Qe(s,this._parents)}function aS(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,o=i[n],a;--n>=0;)(a=i[n])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function sS(e){e||(e=lS);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var r=this._groups,i=r.length,n=new Array(i),o=0;o<i;++o){for(var a=r[o],s=a.length,c=n[o]=new Array(s),l,u=0;u<s;++u)(l=a[u])&&(c[u]=l);c.sort(t)}return new Qe(n,this._parents).order()}function lS(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function cS(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function uS(){return Array.from(this)}function fS(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,o=i.length;n<o;++n){var a=i[n];if(a)return a}return null}function dS(){let e=0;for(const t of this)++e;return e}function hS(){return!this.node()}function mS(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],o=0,a=n.length,s;o<a;++o)(s=n[o])&&e.call(s,s.__data__,o,n);return this}function gS(e){return function(){this.removeAttribute(e)}}function pS(e){return function(){this.removeAttributeNS(e.space,e.local)}}function vS(e,t){return function(){this.setAttribute(e,t)}}function bS(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yS(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function _S(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function xS(e,t){var r=po(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?pS:gS:typeof t=="function"?r.local?_S:yS:r.local?bS:vS)(r,t))}function Gu(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function wS(e){return function(){this.style.removeProperty(e)}}function $S(e,t,r){return function(){this.style.setProperty(e,t,r)}}function SS(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function kS(e,t,r){return arguments.length>1?this.each((t==null?wS:typeof t=="function"?SS:$S)(e,t,r??"")):Xn(this.node(),e)}function Xn(e,t){return e.style.getPropertyValue(t)||Gu(e).getComputedStyle(e,null).getPropertyValue(t)}function IS(e){return function(){delete this[e]}}function NS(e,t){return function(){this[e]=t}}function ES(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function MS(e,t){return arguments.length>1?this.each((t==null?IS:typeof t=="function"?ES:NS)(e,t)):this.node()[e]}function Jp(e){return e.trim().split(/^|\s+/)}function Yu(e){return e.classList||new Kp(e)}function Kp(e){this._node=e,this._names=Jp(e.getAttribute("class")||"")}Kp.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Qp(e,t){for(var r=Yu(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function ev(e,t){for(var r=Yu(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function TS(e){return function(){Qp(this,e)}}function CS(e){return function(){ev(this,e)}}function AS(e,t){return function(){(t.apply(this,arguments)?Qp:ev)(this,e)}}function jS(e,t){var r=Jp(e+"");if(arguments.length<2){for(var i=Yu(this.node()),n=-1,o=r.length;++n<o;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?AS:t?TS:CS)(r,t))}function PS(){this.textContent=""}function OS(e){return function(){this.textContent=e}}function RS(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function DS(e){return arguments.length?this.each(e==null?PS:(typeof e=="function"?RS:OS)(e)):this.node().textContent}function US(){this.innerHTML=""}function zS(e){return function(){this.innerHTML=e}}function LS(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function FS(e){return arguments.length?this.each(e==null?US:(typeof e=="function"?LS:zS)(e)):this.node().innerHTML}function ZS(){this.nextSibling&&this.parentNode.appendChild(this)}function BS(){return this.each(ZS)}function VS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function WS(){return this.each(VS)}function qS(e){var t=typeof e=="function"?e:Es(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function GS(){return null}function YS(e,t){var r=typeof e=="function"?e:Es(e),i=t==null?GS:typeof t=="function"?t:Ms(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function HS(){var e=this.parentNode;e&&e.removeChild(this)}function XS(){return this.each(HS)}function JS(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function KS(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function QS(e){return this.select(e?KS:JS)}function ek(e){return arguments.length?this.property("__data__",e):this.node().__data__}function tk(e){return function(t){e.call(this,t,this.__data__)}}function nk(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function rk(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,o;r<n;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function ik(e,t,r){return function(){var i=this.__on,n,o=tk(t);if(i){for(var a=0,s=i.length;a<s;++a)if((n=i[a]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=o,n.options=r),n.value=t;return}}this.addEventListener(e.type,o,r),n={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(n):this.__on=[n]}}function ok(e,t,r){var i=nk(e+""),n,o=i.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(n=0,u=s[c];n<o;++n)if((a=i[n]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?ik:rk,n=0;n<o;++n)this.each(s(i[n],t,r));return this}function tv(e,t,r){var i=Gu(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function ak(e,t){return function(){return tv(this,e,t)}}function sk(e,t){return function(){return tv(this,e,t.apply(this,arguments))}}function lk(e,t){return this.each((typeof t=="function"?sk:ak)(e,t))}function*ck(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,o=i.length,a;n<o;++n)(a=i[n])&&(yield a)}var Hu=[null];function Qe(e,t){this._groups=e,this._parents=t}function lr(){return new Qe([[document.documentElement]],Hu)}function uk(){return this}Qe.prototype=lr.prototype={constructor:Qe,select:D4,selectAll:L4,selectChild:V4,selectChildren:Y4,filter:H4,data:tS,enter:X4,exit:rS,join:iS,merge:oS,selection:uk,order:aS,sort:sS,call:cS,nodes:uS,node:fS,size:dS,empty:hS,each:mS,attr:xS,style:kS,property:MS,classed:jS,text:DS,html:FS,raise:BS,lower:WS,append:qS,insert:YS,remove:XS,clone:QS,datum:ek,on:ok,dispatch:lk,[Symbol.iterator]:ck};function je(e){return typeof e=="string"?new Qe([[document.querySelector(e)]],[document.documentElement]):new Qe([[e]],Hu)}function fk(e){return je(Es(e).call(document.documentElement))}var dk=0;function nv(){return new Rc}function Rc(){this._="@"+(++dk).toString(36)}Rc.prototype=nv.prototype={constructor:Rc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function rv(e){let t;for(;t=e.sourceEvent;)e=t;return e}function ct(e,t){if(e=rv(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var n=t.getBoundingClientRect();return[e.clientX-n.left-t.clientLeft,e.clientY-n.top-t.clientTop]}}return[e.pageX,e.pageY]}function hk(e,t){return e.target&&(e=rv(e),t===void 0&&(t=e.currentTarget),e=e.touches||[e]),Array.from(e,r=>ct(r,t))}function Dc(e){return typeof e=="string"?new Qe([document.querySelectorAll(e)],[document.documentElement]):new Qe([Yp(e)],Hu)}const mk={passive:!1},Ji={capture:!0,passive:!1};function jl(e){e.stopImmediatePropagation()}function Ar(e){e.preventDefault(),e.stopImmediatePropagation()}function Ts(e){var t=e.document.documentElement,r=je(e).on("dragstart.drag",Ar,Ji);"onselectstart"in t?r.on("selectstart.drag",Ar,Ji):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Cs(e,t){var r=e.document.documentElement,i=je(e).on("dragstart.drag",null);t&&(i.on("click.drag",Ar,Ji),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Ro=e=>()=>e;function Uc(e,{sourceEvent:t,subject:r,target:i,identifier:n,active:o,x:a,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:n,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:u}})}Uc.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function gk(e){return!e.ctrlKey&&!e.button}function pk(){return this.parentNode}function vk(e,t){return t??{x:e.x,y:e.y}}function bk(){return navigator.maxTouchPoints||"ontouchstart"in this}function yk(){var e=gk,t=pk,r=vk,i=bk,n={},o=sr("start","drag","end"),a=0,s,c,l,u,f=0;function d(y){y.on("mousedown.drag",h).filter(i).on("touchstart.drag",v).on("touchmove.drag",b,mk).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(y,w){if(!(u||!e.call(this,y,w))){var S=x(this,t.call(this,y,w),y,w,"mouse");S&&(je(y.view).on("mousemove.drag",p,Ji).on("mouseup.drag",g,Ji),Ts(y.view),jl(y),l=!1,s=y.clientX,c=y.clientY,S("start",y))}}function p(y){if(Ar(y),!l){var w=y.clientX-s,S=y.clientY-c;l=w*w+S*S>f}n.mouse("drag",y)}function g(y){je(y.view).on("mousemove.drag mouseup.drag",null),Cs(y.view,l),Ar(y),n.mouse("end",y)}function v(y,w){if(e.call(this,y,w)){var S=y.changedTouches,k=t.call(this,y,w),N=S.length,C,j;for(C=0;C<N;++C)(j=x(this,k,y,w,S[C].identifier,S[C]))&&(jl(y),j("start",y,S[C]))}}function b(y){var w=y.changedTouches,S=w.length,k,N;for(k=0;k<S;++k)(N=n[w[k].identifier])&&(Ar(y),N("drag",y,w[k]))}function _(y){var w=y.changedTouches,S=w.length,k,N;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),k=0;k<S;++k)(N=n[w[k].identifier])&&(jl(y),N("end",y,w[k]))}function x(y,w,S,k,N,C){var j=o.copy(),M=ct(C||S,w),D,O,I;if((I=r.call(y,new Uc("beforestart",{sourceEvent:S,target:d,identifier:N,active:a,x:M[0],y:M[1],dx:0,dy:0,dispatch:j}),k))!=null)return D=I.x-M[0]||0,O=I.y-M[1]||0,function A(T,R,P){var U=M,L;switch(T){case"start":n[N]=A,L=a++;break;case"end":delete n[N],--a;case"drag":M=ct(P||R,w),L=a;break}j.call(T,y,new Uc(T,{sourceEvent:R,subject:I,target:d,identifier:N,active:L,x:M[0]+D,y:M[1]+O,dx:M[0]-U[0],dy:M[1]-U[1],dispatch:j}),k)}}return d.filter=function(y){return arguments.length?(e=typeof y=="function"?y:Ro(!!y),d):e},d.container=function(y){return arguments.length?(t=typeof y=="function"?y:Ro(y),d):t},d.subject=function(y){return arguments.length?(r=typeof y=="function"?y:Ro(y),d):r},d.touchable=function(y){return arguments.length?(i=typeof y=="function"?y:Ro(!!y),d):i},d.on=function(){var y=o.on.apply(o,arguments);return y===o?d:y},d.clickDistance=function(y){return arguments.length?(f=(y=+y)*y,d):Math.sqrt(f)},d}function li(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function vo(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Cn(){}var Jn=.7,Zr=1/Jn,jr="\\s*([+-]?\\d+)\\s*",Ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_k=/^#([0-9a-f]{3,8})$/,xk=new RegExp(`^rgb\\(${jr},${jr},${jr}\\)$`),wk=new RegExp(`^rgb\\(${Lt},${Lt},${Lt}\\)$`),$k=new RegExp(`^rgba\\(${jr},${jr},${jr},${Ki}\\)$`),Sk=new RegExp(`^rgba\\(${Lt},${Lt},${Lt},${Ki}\\)$`),kk=new RegExp(`^hsl\\(${Ki},${Lt},${Lt}\\)$`),Ik=new RegExp(`^hsla\\(${Ki},${Lt},${Lt},${Ki}\\)$`),rh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};li(Cn,kn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ih,formatHex:ih,formatHex8:Nk,formatHsl:Ek,formatRgb:oh,toString:oh});function ih(){return this.rgb().formatHex()}function Nk(){return this.rgb().formatHex8()}function Ek(){return iv(this).formatHsl()}function oh(){return this.rgb().formatRgb()}function kn(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=_k.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ah(t):r===3?new Pe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Do(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Do(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=xk.exec(e))?new Pe(t[1],t[2],t[3],1):(t=wk.exec(e))?new Pe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$k.exec(e))?Do(t[1],t[2],t[3],t[4]):(t=Sk.exec(e))?Do(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kk.exec(e))?ch(t[1],t[2]/100,t[3]/100,1):(t=Ik.exec(e))?ch(t[1],t[2]/100,t[3]/100,t[4]):rh.hasOwnProperty(e)?ah(rh[e]):e==="transparent"?new Pe(NaN,NaN,NaN,0):null}function ah(e){return new Pe(e>>16&255,e>>8&255,e&255,1)}function Do(e,t,r,i){return i<=0&&(e=t=r=NaN),new Pe(e,t,r,i)}function Xu(e){return e instanceof Cn||(e=kn(e)),e?(e=e.rgb(),new Pe(e.r,e.g,e.b,e.opacity)):new Pe}function Br(e,t,r,i){return arguments.length===1?Xu(e):new Pe(e,t,r,i??1)}function Pe(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}li(Pe,Br,vo(Cn,{brighter(e){return e=e==null?Zr:Math.pow(Zr,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Jn:Math.pow(Jn,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pe(Vn(this.r),Vn(this.g),Vn(this.b),Pa(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:sh,formatHex:sh,formatHex8:Mk,formatRgb:lh,toString:lh}));function sh(){return`#${Zn(this.r)}${Zn(this.g)}${Zn(this.b)}`}function Mk(){return`#${Zn(this.r)}${Zn(this.g)}${Zn(this.b)}${Zn((isNaN(this.opacity)?1:this.opacity)*255)}`}function lh(){const e=Pa(this.opacity);return`${e===1?"rgb(":"rgba("}${Vn(this.r)}, ${Vn(this.g)}, ${Vn(this.b)}${e===1?")":`, ${e})`}`}function Pa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Zn(e){return e=Vn(e),(e<16?"0":"")+e.toString(16)}function ch(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new St(e,t,r,i)}function iv(e){if(e instanceof St)return new St(e.h,e.s,e.l,e.opacity);if(e instanceof Cn||(e=kn(e)),!e)return new St;if(e instanceof St)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,s=o-n,c=(o+n)/2;return s?(t===o?a=(r-i)/s+(r<i)*6:r===o?a=(i-t)/s+2:a=(t-r)/s+4,s/=c<.5?o+n:2-o-n,a*=60):s=c>0&&c<1?0:a,new St(a,s,c,e.opacity)}function Oa(e,t,r,i){return arguments.length===1?iv(e):new St(e,t,r,i??1)}function St(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}li(St,Oa,vo(Cn,{brighter(e){return e=e==null?Zr:Math.pow(Zr,e),new St(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Jn:Math.pow(Jn,e),new St(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Pe(Pl(e>=240?e-240:e+120,n,i),Pl(e,n,i),Pl(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new St(uh(this.h),Uo(this.s),Uo(this.l),Pa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Pa(this.opacity);return`${e===1?"hsl(":"hsla("}${uh(this.h)}, ${Uo(this.s)*100}%, ${Uo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function uh(e){return e=(e||0)%360,e<0?e+360:e}function Uo(e){return Math.max(0,Math.min(1,e||0))}function Pl(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const ov=Math.PI/180,av=180/Math.PI,Ra=18,sv=.96422,lv=1,cv=.82521,uv=4/29,Pr=6/29,fv=3*Pr*Pr,Tk=Pr*Pr*Pr;function dv(e){if(e instanceof Nt)return new Nt(e.l,e.a,e.b,e.opacity);if(e instanceof Dt)return mv(e);e instanceof Pe||(e=Xu(e));var t=Ul(e.r),r=Ul(e.g),i=Ul(e.b),n=Ol((.2225045*t+.7168786*r+.0606169*i)/lv),o,a;return t===r&&r===i?o=a=n:(o=Ol((.4360747*t+.3850649*r+.1430804*i)/sv),a=Ol((.0139322*t+.0971045*r+.7141733*i)/cv)),new Nt(116*n-16,500*(o-n),200*(n-a),e.opacity)}function Ck(e,t){return new Nt(e,0,0,t??1)}function Da(e,t,r,i){return arguments.length===1?dv(e):new Nt(e,t,r,i??1)}function Nt(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}li(Nt,Da,vo(Cn,{brighter(e){return new Nt(this.l+Ra*(e??1),this.a,this.b,this.opacity)},darker(e){return new Nt(this.l-Ra*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=sv*Rl(t),e=lv*Rl(e),r=cv*Rl(r),new Pe(Dl(3.1338561*t-1.6168667*e-.4906146*r),Dl(-.9787684*t+1.9161415*e+.033454*r),Dl(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function Ol(e){return e>Tk?Math.pow(e,1/3):e/fv+uv}function Rl(e){return e>Pr?e*e*e:fv*(e-uv)}function Dl(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Ul(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function hv(e){if(e instanceof Dt)return new Dt(e.h,e.c,e.l,e.opacity);if(e instanceof Nt||(e=dv(e)),e.a===0&&e.b===0)return new Dt(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*av;return new Dt(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Ak(e,t,r,i){return arguments.length===1?hv(e):new Dt(r,t,e,i??1)}function Ua(e,t,r,i){return arguments.length===1?hv(e):new Dt(e,t,r,i??1)}function Dt(e,t,r,i){this.h=+e,this.c=+t,this.l=+r,this.opacity=+i}function mv(e){if(isNaN(e.h))return new Nt(e.l,0,0,e.opacity);var t=e.h*ov;return new Nt(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}li(Dt,Ua,vo(Cn,{brighter(e){return new Dt(this.h,this.c,this.l+Ra*(e??1),this.opacity)},darker(e){return new Dt(this.h,this.c,this.l-Ra*(e??1),this.opacity)},rgb(){return mv(this).rgb()}}));var gv=-.14861,Ju=1.78277,Ku=-.29227,As=-.90649,Qi=1.97294,fh=Qi*As,dh=Qi*Ju,hh=Ju*Ku-As*gv;function jk(e){if(e instanceof Wn)return new Wn(e.h,e.s,e.l,e.opacity);e instanceof Pe||(e=Xu(e));var t=e.r/255,r=e.g/255,i=e.b/255,n=(hh*i+fh*t-dh*r)/(hh+fh-dh),o=i-n,a=(Qi*(r-n)-Ku*o)/As,s=Math.sqrt(a*a+o*o)/(Qi*n*(1-n)),c=s?Math.atan2(a,o)*av-120:NaN;return new Wn(c<0?c+360:c,s,n,e.opacity)}function Et(e,t,r,i){return arguments.length===1?jk(e):new Wn(e,t,r,i??1)}function Wn(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}li(Wn,Et,vo(Cn,{brighter(e){return e=e==null?Zr:Math.pow(Zr,e),new Wn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Jn:Math.pow(Jn,e),new Wn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*ov,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),i=Math.cos(e),n=Math.sin(e);return new Pe(255*(t+r*(gv*i+Ju*n)),255*(t+r*(Ku*i+As*n)),255*(t+r*(Qi*i)),this.opacity)}}));function pv(e,t,r,i,n){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*i+a*n)/6}function vv(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),n=e[i],o=e[i+1],a=i>0?e[i-1]:2*n-o,s=i<t-1?e[i+2]:2*o-n;return pv((r-i/t)*t,a,n,o,s)}}function bv(e){var t=e.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*t),n=e[(i+t-1)%t],o=e[i%t],a=e[(i+1)%t],s=e[(i+2)%t];return pv((r-i/t)*t,n,o,a,s)}}const js=e=>()=>e;function yv(e,t){return function(r){return e+r*t}}function Pk(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function Ps(e,t){var r=t-e;return r?yv(e,r>180||r<-180?r-360*Math.round(r/360):r):js(isNaN(e)?t:e)}function Ok(e){return(e=+e)==1?Oe:function(t,r){return r-t?Pk(t,r,e):js(isNaN(t)?r:t)}}function Oe(e,t){var r=t-e;return r?yv(e,r):js(isNaN(e)?t:e)}const eo=(function e(t){var r=Ok(t);function i(n,o){var a=r((n=Br(n)).r,(o=Br(o)).r),s=r(n.g,o.g),c=r(n.b,o.b),l=Oe(n.opacity,o.opacity);return function(u){return n.r=a(u),n.g=s(u),n.b=c(u),n.opacity=l(u),n+""}}return i.gamma=e,i})(1);function _v(e){return function(t){var r=t.length,i=new Array(r),n=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=Br(t[a]),i[a]=s.r||0,n[a]=s.g||0,o[a]=s.b||0;return i=e(i),n=e(n),o=e(o),s.opacity=1,function(c){return s.r=i(c),s.g=n(c),s.b=o(c),s+""}}}var xv=_v(vv),Rk=_v(bv);function Qu(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,i=t.slice(),n;return function(o){for(n=0;n<r;++n)i[n]=e[n]*(1-o)+t[n]*o;return i}}function wv(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dk(e,t){return(wv(t)?Qu:$v)(e,t)}function $v(e,t){var r=t?t.length:0,i=e?Math.min(r,e.length):0,n=new Array(i),o=new Array(r),a;for(a=0;a<i;++a)n[a]=An(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<i;++a)o[a]=n[a](s);return o}}function Sv(e,t){var r=new Date;return e=+e,t=+t,function(i){return r.setTime(e*(1-i)+t*i),r}}function pt(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function kv(e,t){var r={},i={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=An(e[n],t[n]):i[n]=t[n];return function(o){for(n in r)i[n]=r[n](o);return i}}var zc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,zl=new RegExp(zc.source,"g");function Uk(e){return function(){return e}}function zk(e){return function(t){return e(t)+""}}function ef(e,t){var r=zc.lastIndex=zl.lastIndex=0,i,n,o,a=-1,s=[],c=[];for(e=e+"",t=t+"";(i=zc.exec(e))&&(n=zl.exec(t));)(o=n.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,c.push({i:a,x:pt(i,n)})),r=zl.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?c[0]?zk(c[0].x):Uk(t):(t=c.length,function(l){for(var u=0,f;u<t;++u)s[(f=c[u]).i]=f.x(l);return s.join("")})}function An(e,t){var r=typeof t,i;return t==null||r==="boolean"?js(t):(r==="number"?pt:r==="string"?(i=kn(t))?(t=i,eo):ef:t instanceof kn?eo:t instanceof Date?Sv:wv(t)?Qu:Array.isArray(t)?$v:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?kv:pt)(e,t)}function Lk(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}function Fk(e,t){var r=Ps(+e,+t);return function(i){var n=r(i);return n-360*Math.floor(n/360)}}function Os(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var mh=180/Math.PI,Lc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Iv(e,t,r,i,n,o){var a,s,c;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(c=e*r+t*i)&&(r-=e*c,i-=t*c),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,c/=s),e*i<t*r&&(e=-e,t=-t,c=-c,a=-a),{translateX:n,translateY:o,rotate:Math.atan2(t,e)*mh,skewX:Math.atan(c)*mh,scaleX:a,scaleY:s}}var zo;function Zk(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Lc:Iv(t.a,t.b,t.c,t.d,t.e,t.f)}function Bk(e){return e==null||(zo||(zo=document.createElementNS("http://www.w3.org/2000/svg","g")),zo.setAttribute("transform",e),!(e=zo.transform.baseVal.consolidate()))?Lc:(e=e.matrix,Iv(e.a,e.b,e.c,e.d,e.e,e.f))}function Nv(e,t,r,i){function n(l){return l.length?l.pop()+" ":""}function o(l,u,f,d,h,p){if(l!==f||u!==d){var g=h.push("translate(",null,t,null,r);p.push({i:g-4,x:pt(l,f)},{i:g-2,x:pt(u,d)})}else(f||d)&&h.push("translate("+f+t+d+r)}function a(l,u,f,d){l!==u?(l-u>180?u+=360:u-l>180&&(l+=360),d.push({i:f.push(n(f)+"rotate(",null,i)-2,x:pt(l,u)})):u&&f.push(n(f)+"rotate("+u+i)}function s(l,u,f,d){l!==u?d.push({i:f.push(n(f)+"skewX(",null,i)-2,x:pt(l,u)}):u&&f.push(n(f)+"skewX("+u+i)}function c(l,u,f,d,h,p){if(l!==f||u!==d){var g=h.push(n(h)+"scale(",null,",",null,")");p.push({i:g-4,x:pt(l,f)},{i:g-2,x:pt(u,d)})}else(f!==1||d!==1)&&h.push(n(h)+"scale("+f+","+d+")")}return function(l,u){var f=[],d=[];return l=e(l),u=e(u),o(l.translateX,l.translateY,u.translateX,u.translateY,f,d),a(l.rotate,u.rotate,f,d),s(l.skewX,u.skewX,f,d),c(l.scaleX,l.scaleY,u.scaleX,u.scaleY,f,d),l=u=null,function(h){for(var p=-1,g=d.length,v;++p<g;)f[(v=d[p]).i]=v.x(h);return f.join("")}}}var Ev=Nv(Zk,"px, ","px)","deg)"),Mv=Nv(Bk,", ",")",")"),Vk=1e-12;function gh(e){return((e=Math.exp(e))+1/e)/2}function Wk(e){return((e=Math.exp(e))-1/e)/2}function qk(e){return((e=Math.exp(2*e))-1)/(e+1)}const Tv=(function e(t,r,i){function n(o,a){var s=o[0],c=o[1],l=o[2],u=a[0],f=a[1],d=a[2],h=u-s,p=f-c,g=h*h+p*p,v,b;if(g<Vk)b=Math.log(d/l)/t,v=function(k){return[s+k*h,c+k*p,l*Math.exp(t*k*b)]};else{var _=Math.sqrt(g),x=(d*d-l*l+i*g)/(2*l*r*_),y=(d*d-l*l-i*g)/(2*d*r*_),w=Math.log(Math.sqrt(x*x+1)-x),S=Math.log(Math.sqrt(y*y+1)-y);b=(S-w)/t,v=function(k){var N=k*b,C=gh(w),j=l/(r*_)*(C*qk(t*N+w)-Wk(w));return[s+j*h,c+j*p,l*C/gh(t*N+w)]}}return v.duration=b*1e3*t/Math.SQRT2,v}return n.rho=function(o){var a=Math.max(.001,+o),s=a*a,c=s*s;return e(a,s,c)},n})(Math.SQRT2,2,4);function Cv(e){return function(t,r){var i=e((t=Oa(t)).h,(r=Oa(r)).h),n=Oe(t.s,r.s),o=Oe(t.l,r.l),a=Oe(t.opacity,r.opacity);return function(s){return t.h=i(s),t.s=n(s),t.l=o(s),t.opacity=a(s),t+""}}}const Gk=Cv(Ps);var Yk=Cv(Oe);function Hk(e,t){var r=Oe((e=Da(e)).l,(t=Da(t)).l),i=Oe(e.a,t.a),n=Oe(e.b,t.b),o=Oe(e.opacity,t.opacity);return function(a){return e.l=r(a),e.a=i(a),e.b=n(a),e.opacity=o(a),e+""}}function Av(e){return function(t,r){var i=e((t=Ua(t)).h,(r=Ua(r)).h),n=Oe(t.c,r.c),o=Oe(t.l,r.l),a=Oe(t.opacity,r.opacity);return function(s){return t.h=i(s),t.c=n(s),t.l=o(s),t.opacity=a(s),t+""}}}const Xk=Av(Ps);var Jk=Av(Oe);function jv(e){return(function t(r){r=+r;function i(n,o){var a=e((n=Et(n)).h,(o=Et(o)).h),s=Oe(n.s,o.s),c=Oe(n.l,o.l),l=Oe(n.opacity,o.opacity);return function(u){return n.h=a(u),n.s=s(u),n.l=c(Math.pow(u,r)),n.opacity=l(u),n+""}}return i.gamma=t,i})(1)}const Kk=jv(Ps);var Rs=jv(Oe);function Pv(e,t){t===void 0&&(t=e,e=An);for(var r=0,i=t.length-1,n=t[0],o=new Array(i<0?0:i);r<i;)o[r]=e(n,n=t[++r]);return function(a){var s=Math.max(0,Math.min(i-1,Math.floor(a*=i)));return o[s](a-s)}}function Qk(e,t){for(var r=new Array(t),i=0;i<t;++i)r[i]=e(i/(t-1));return r}var Vr=0,Mi=0,vi=0,Ov=1e3,za,Ti,La=0,Kn=0,Ds=0,to=typeof performance=="object"&&performance.now?performance:Date,Rv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function bo(){return Kn||(Rv(eI),Kn=to.now()+Ds)}function eI(){Kn=0}function no(){this._call=this._time=this._next=null}no.prototype=Us.prototype={constructor:no,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?bo():+r)+(t==null?0:+t),!this._next&&Ti!==this&&(Ti?Ti._next=this:za=this,Ti=this),this._call=e,this._time=r,Fc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fc())}};function Us(e,t,r){var i=new no;return i.restart(e,t,r),i}function Dv(){bo(),++Vr;for(var e=za,t;e;)(t=Kn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Vr}function ph(){Kn=(La=to.now())+Ds,Vr=Mi=0;try{Dv()}finally{Vr=0,nI(),Kn=0}}function tI(){var e=to.now(),t=e-La;t>Ov&&(Ds-=t,La=e)}function nI(){for(var e,t=za,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:za=r);Ti=e,Fc(i)}function Fc(e){if(!Vr){Mi&&(Mi=clearTimeout(Mi));var t=e-Kn;t>24?(e<1/0&&(Mi=setTimeout(ph,e-to.now()-Ds)),vi&&(vi=clearInterval(vi))):(vi||(La=to.now(),vi=setInterval(tI,Ov)),Vr=1,Rv(ph))}}function Zc(e,t,r){var i=new no;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}function rI(e,t,r){var i=new no,n=t;return t==null?(i.restart(e,t,r),i):(i._restart=i.restart,i.restart=function(o,a,s){a=+a,s=s==null?bo():+s,i._restart(function c(l){l+=n,i._restart(c,n+=a,s),o(l)},a,s)},i.restart(e,t,r),i)}var iI=sr("start","end","cancel","interrupt"),oI=[],Uv=0,Bc=1,Vc=2,ga=3,vh=4,Wc=5,pa=6;function zs(e,t,r,i,n,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;aI(e,r,{name:t,index:i,group:n,on:iI,tween:oI,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Uv})}function tf(e,t){var r=Ct(e,t);if(r.state>Uv)throw new Error("too late; already scheduled");return r}function Gt(e,t){var r=Ct(e,t);if(r.state>ga)throw new Error("too late; already running");return r}function Ct(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function aI(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=Us(o,0,r.time);function o(l){r.state=Bc,r.timer.restart(a,r.delay,r.time),r.delay<=l&&a(l-r.delay)}function a(l){var u,f,d,h;if(r.state!==Bc)return c();for(u in i)if(h=i[u],h.name===r.name){if(h.state===ga)return Zc(a);h.state===vh?(h.state=pa,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[u]):+u<t&&(h.state=pa,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[u])}if(Zc(function(){r.state===ga&&(r.state=vh,r.timer.restart(s,r.delay,r.time),s(l))}),r.state=Vc,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Vc){for(r.state=ga,n=new Array(d=r.tween.length),u=0,f=-1;u<d;++u)(h=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(n[++f]=h);n.length=f+1}}function s(l){for(var u=l<r.duration?r.ease.call(null,l/r.duration):(r.timer.restart(c),r.state=Wc,1),f=-1,d=n.length;++f<d;)n[f].call(e,u);r.state===Wc&&(r.on.call("end",e,e.__data__,r.index,r.group),c())}function c(){r.state=pa,r.timer.stop(),delete i[t];for(var l in i)return;delete e.__transition}}function qn(e,t){var r=e.__transition,i,n,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}n=i.state>Vc&&i.state<Wc,i.state=pa,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function sI(e){return this.each(function(){qn(this,e)})}function lI(e,t){var r,i;return function(){var n=Gt(this,e),o=n.tween;if(o!==r){i=r=o;for(var a=0,s=i.length;a<s;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function cI(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var o=Gt(this,e),a=o.tween;if(a!==i){n=(i=a).slice();for(var s={name:t,value:r},c=0,l=n.length;c<l;++c)if(n[c].name===t){n[c]=s;break}c===l&&n.push(s)}o.tween=n}}function uI(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Ct(this.node(),r).tween,n=0,o=i.length,a;n<o;++n)if((a=i[n]).name===e)return a.value;return null}return this.each((t==null?lI:cI)(r,e,t))}function nf(e,t,r){var i=e._id;return e.each(function(){var n=Gt(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return Ct(n,i).value[t]}}function zv(e,t){var r;return(typeof t=="number"?pt:t instanceof kn?eo:(r=kn(t))?(t=r,eo):ef)(e,t)}function fI(e){return function(){this.removeAttribute(e)}}function dI(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hI(e,t,r){var i,n=r+"",o;return function(){var a=this.getAttribute(e);return a===n?null:a===i?o:o=t(i=a,r)}}function mI(e,t,r){var i,n=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===n?null:a===i?o:o=t(i=a,r)}}function gI(e,t,r){var i,n,o;return function(){var a,s=r(this),c;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),c=s+"",a===c?null:a===i&&c===n?o:(n=c,o=t(i=a,s)))}}function pI(e,t,r){var i,n,o;return function(){var a,s=r(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),c=s+"",a===c?null:a===i&&c===n?o:(n=c,o=t(i=a,s)))}}function vI(e,t){var r=po(e),i=r==="transform"?Mv:zv;return this.attrTween(e,typeof t=="function"?(r.local?pI:gI)(r,i,nf(this,"attr."+e,t)):t==null?(r.local?dI:fI)(r):(r.local?mI:hI)(r,i,t))}function bI(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function yI(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function _I(e,t){var r,i;function n(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&yI(e,o)),r}return n._value=t,n}function xI(e,t){var r,i;function n(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&bI(e,o)),r}return n._value=t,n}function wI(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=po(e);return this.tween(r,(i.local?_I:xI)(i,t))}function $I(e,t){return function(){tf(this,e).delay=+t.apply(this,arguments)}}function SI(e,t){return t=+t,function(){tf(this,e).delay=t}}function kI(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?$I:SI)(t,e)):Ct(this.node(),t).delay}function II(e,t){return function(){Gt(this,e).duration=+t.apply(this,arguments)}}function NI(e,t){return t=+t,function(){Gt(this,e).duration=t}}function EI(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?II:NI)(t,e)):Ct(this.node(),t).duration}function MI(e,t){if(typeof t!="function")throw new Error;return function(){Gt(this,e).ease=t}}function TI(e){var t=this._id;return arguments.length?this.each(MI(t,e)):Ct(this.node(),t).ease}function CI(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Gt(this,e).ease=r}}function AI(e){if(typeof e!="function")throw new Error;return this.each(CI(this._id,e))}function jI(e){typeof e!="function"&&(e=qu(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var o=t[n],a=o.length,s=i[n]=[],c,l=0;l<a;++l)(c=o[l])&&e.call(c,c.__data__,l,o)&&s.push(c);return new Zt(i,this._parents,this._name,this._id)}function PI(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,o=Math.min(i,n),a=new Array(i),s=0;s<o;++s)for(var c=t[s],l=r[s],u=c.length,f=a[s]=new Array(u),d,h=0;h<u;++h)(d=c[h]||l[h])&&(f[h]=d);for(;s<i;++s)a[s]=t[s];return new Zt(a,this._parents,this._name,this._id)}function OI(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function RI(e,t,r){var i,n,o=OI(t)?tf:Gt;return function(){var a=o(this,e),s=a.on;s!==i&&(n=(i=s).copy()).on(t,r),a.on=n}}function DI(e,t){var r=this._id;return arguments.length<2?Ct(this.node(),r).on.on(e):this.each(RI(r,e,t))}function UI(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function zI(){return this.on("end.remove",UI(this._id))}function LI(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Ms(e));for(var i=this._groups,n=i.length,o=new Array(n),a=0;a<n;++a)for(var s=i[a],c=s.length,l=o[a]=new Array(c),u,f,d=0;d<c;++d)(u=s[d])&&(f=e.call(u,u.__data__,d,s))&&("__data__"in u&&(f.__data__=u.__data__),l[d]=f,zs(l[d],t,r,d,l,Ct(u,r)));return new Zt(o,this._parents,t,r)}function FI(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Wu(e));for(var i=this._groups,n=i.length,o=[],a=[],s=0;s<n;++s)for(var c=i[s],l=c.length,u,f=0;f<l;++f)if(u=c[f]){for(var d=e.call(u,u.__data__,f,c),h,p=Ct(u,r),g=0,v=d.length;g<v;++g)(h=d[g])&&zs(h,t,r,g,d,p);o.push(d),a.push(u)}return new Zt(o,a,t,r)}var ZI=lr.prototype.constructor;function BI(){return new ZI(this._groups,this._parents)}function VI(e,t){var r,i,n;return function(){var o=Xn(this,e),a=(this.style.removeProperty(e),Xn(this,e));return o===a?null:o===r&&a===i?n:n=t(r=o,i=a)}}function Lv(e){return function(){this.style.removeProperty(e)}}function WI(e,t,r){var i,n=r+"",o;return function(){var a=Xn(this,e);return a===n?null:a===i?o:o=t(i=a,r)}}function qI(e,t,r){var i,n,o;return function(){var a=Xn(this,e),s=r(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),Xn(this,e))),a===c?null:a===i&&c===n?o:(n=c,o=t(i=a,s))}}function GI(e,t){var r,i,n,o="style."+t,a="end."+o,s;return function(){var c=Gt(this,e),l=c.on,u=c.value[o]==null?s||(s=Lv(t)):void 0;(l!==r||n!==u)&&(i=(r=l).copy()).on(a,n=u),c.on=i}}function YI(e,t,r){var i=(e+="")=="transform"?Ev:zv;return t==null?this.styleTween(e,VI(e,i)).on("end.style."+e,Lv(e)):typeof t=="function"?this.styleTween(e,qI(e,i,nf(this,"style."+e,t))).each(GI(this._id,e)):this.styleTween(e,WI(e,i,t),r).on("end.style."+e,null)}function HI(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function XI(e,t,r){var i,n;function o(){var a=t.apply(this,arguments);return a!==n&&(i=(n=a)&&HI(e,a,r)),i}return o._value=t,o}function JI(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,XI(e,t,r??""))}function KI(e){return function(){this.textContent=e}}function QI(e){return function(){var t=e(this);this.textContent=t??""}}function eN(e){return this.tween("text",typeof e=="function"?QI(nf(this,"text",e)):KI(e==null?"":e+""))}function tN(e){return function(t){this.textContent=e.call(this,t)}}function nN(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&tN(n)),t}return i._value=e,i}function rN(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,nN(e))}function iN(){for(var e=this._name,t=this._id,r=Zv(),i=this._groups,n=i.length,o=0;o<n;++o)for(var a=i[o],s=a.length,c,l=0;l<s;++l)if(c=a[l]){var u=Ct(c,t);zs(c,e,r,l,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Zt(i,this._parents,e,r)}function oN(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(o,a){var s={value:a},c={value:function(){--n===0&&o()}};r.each(function(){var l=Gt(this,i),u=l.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),n===0&&o()})}var aN=0;function Zt(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function Fv(e){return lr().transition(e)}function Zv(){return++aN}var Jt=lr.prototype;Zt.prototype=Fv.prototype={constructor:Zt,select:LI,selectAll:FI,selectChild:Jt.selectChild,selectChildren:Jt.selectChildren,filter:jI,merge:PI,selection:BI,transition:iN,call:Jt.call,nodes:Jt.nodes,node:Jt.node,size:Jt.size,empty:Jt.empty,each:Jt.each,on:DI,attr:vI,attrTween:wI,style:YI,styleTween:JI,text:eN,textTween:rN,remove:zI,tween:uI,delay:kI,duration:EI,ease:TI,easeVarying:AI,end:oN,[Symbol.iterator]:Jt[Symbol.iterator]};const sN=e=>+e;function lN(e){return e*e}function cN(e){return e*(2-e)}function bh(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}function uN(e){return e*e*e}function fN(e){return--e*e*e+1}function qc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var rf=3,dN=(function e(t){t=+t;function r(i){return Math.pow(i,t)}return r.exponent=e,r})(rf),hN=(function e(t){t=+t;function r(i){return 1-Math.pow(1-i,t)}return r.exponent=e,r})(rf),yh=(function e(t){t=+t;function r(i){return((i*=2)<=1?Math.pow(i,t):2-Math.pow(2-i,t))/2}return r.exponent=e,r})(rf),Bv=Math.PI,Vv=Bv/2;function mN(e){return+e==1?1:1-Math.cos(e*Vv)}function gN(e){return Math.sin(e*Vv)}function _h(e){return(1-Math.cos(Bv*e))/2}function In(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}function pN(e){return In(1-+e)}function vN(e){return 1-In(e)}function xh(e){return((e*=2)<=1?In(1-e):2-In(e-1))/2}function bN(e){return 1-Math.sqrt(1-e*e)}function yN(e){return Math.sqrt(1- --e*e)}function wh(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var Gc=4/11,_N=6/11,xN=8/11,wN=3/4,$N=9/11,SN=10/11,kN=15/16,IN=21/22,NN=63/64,Lo=1/Gc/Gc;function EN(e){return 1-ro(1-e)}function ro(e){return(e=+e)<Gc?Lo*e*e:e<xN?Lo*(e-=_N)*e+wN:e<SN?Lo*(e-=$N)*e+kN:Lo*(e-=IN)*e+NN}function MN(e){return((e*=2)<=1?1-ro(1-e):ro(e-1)+1)/2}var of=1.70158,TN=(function e(t){t=+t;function r(i){return(i=+i)*i*(t*(i-1)+i)}return r.overshoot=e,r})(of),CN=(function e(t){t=+t;function r(i){return--i*i*((i+1)*t+i)+1}return r.overshoot=e,r})(of),$h=(function e(t){t=+t;function r(i){return((i*=2)<1?i*i*((t+1)*i-t):(i-=2)*i*((t+1)*i+t)+2)/2}return r.overshoot=e,r})(of),Wr=2*Math.PI,af=1,sf=.3,AN=(function e(t,r){var i=Math.asin(1/(t=Math.max(1,t)))*(r/=Wr);function n(o){return t*In(- --o)*Math.sin((i-o)/r)}return n.amplitude=function(o){return e(o,r*Wr)},n.period=function(o){return e(t,o)},n})(af,sf),Sh=(function e(t,r){var i=Math.asin(1/(t=Math.max(1,t)))*(r/=Wr);function n(o){return 1-t*In(o=+o)*Math.sin((o+i)/r)}return n.amplitude=function(o){return e(o,r*Wr)},n.period=function(o){return e(t,o)},n})(af,sf),jN=(function e(t,r){var i=Math.asin(1/(t=Math.max(1,t)))*(r/=Wr);function n(o){return((o=o*2-1)<0?t*In(-o)*Math.sin((i-o)/r):2-t*In(o)*Math.sin((i+o)/r))/2}return n.amplitude=function(o){return e(o,r*Wr)},n.period=function(o){return e(t,o)},n})(af,sf),PN={time:null,delay:0,duration:250,ease:qc};function ON(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function RN(e){var t,r;e instanceof Zt?(t=e._id,e=e._name):(t=Zv(),(r=PN).time=bo(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,o=0;o<n;++o)for(var a=i[o],s=a.length,c,l=0;l<s;++l)(c=a[l])&&zs(c,e,t,l,a,r||ON(c,t));return new Zt(i,this._parents,e,t)}lr.prototype.interrupt=sI;lr.prototype.transition=RN;var DN=[null];function UN(e,t){var r=e.__transition,i,n;if(r){t=t==null?null:t+"";for(n in r)if((i=r[n]).state>Bc&&i.name===t)return new Zt([[e]],DN,t,+n)}return null}const Ll=e=>()=>e;function zN(e,{sourceEvent:t,target:r,selection:i,mode:n,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:n,enumerable:!0,configurable:!0},_:{value:o}})}function LN(e){e.stopImmediatePropagation()}function Fl(e){e.preventDefault(),e.stopImmediatePropagation()}var kh={name:"drag"},Zl={name:"space"},pr={name:"handle"},vr={name:"center"};const{abs:Ih,max:Le,min:Fe}=Math;function Nh(e){return[+e[0],+e[1]]}function Yc(e){return[Nh(e[0]),Nh(e[1])]}var va={name:"x",handles:["w","e"].map(io),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},ba={name:"y",handles:["n","s"].map(io),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},FN={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(io),input:function(e){return e==null?null:Yc(e)},output:function(e){return e}},Kt={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Eh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Mh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ZN={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},BN={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function io(e){return{type:e}}function VN(e){return!e.ctrlKey&&!e.button}function WN(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function qN(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bl(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function GN(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function YN(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function HN(){return lf(va)}function XN(){return lf(ba)}function JN(){return lf(FN)}function lf(e){var t=WN,r=VN,i=qN,n=!0,o=sr("start","brush","end"),a=6,s;function c(v){var b=v.property("__brush",g).selectAll(".overlay").data([io("overlay")]);b.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Kt.overlay).merge(b).each(function(){var x=Bl(this).extent;je(this).attr("x",x[0][0]).attr("y",x[0][1]).attr("width",x[1][0]-x[0][0]).attr("height",x[1][1]-x[0][1])}),v.selectAll(".selection").data([io("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Kt.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var _=v.selectAll(".handle").data(e.handles,function(x){return x.type});_.exit().remove(),_.enter().append("rect").attr("class",function(x){return"handle handle--"+x.type}).attr("cursor",function(x){return Kt[x.type]}),v.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",h).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(v,b,_){v.tween?v.on("start.brush",function(x){u(this,arguments).beforestart().start(x)}).on("interrupt.brush end.brush",function(x){u(this,arguments).end(x)}).tween("brush",function(){var x=this,y=x.__brush,w=u(x,arguments),S=y.selection,k=e.input(typeof b=="function"?b.apply(this,arguments):b,y.extent),N=An(S,k);function C(j){y.selection=j===1&&k===null?null:N(j),l.call(x),w.brush()}return S!==null&&k!==null?C:C(1)}):v.each(function(){var x=this,y=arguments,w=x.__brush,S=e.input(typeof b=="function"?b.apply(x,y):b,w.extent),k=u(x,y).beforestart();qn(x),w.selection=S===null?null:S,l.call(x),k.start(_).brush(_).end(_)})},c.clear=function(v,b){c.move(v,null,b)};function l(){var v=je(this),b=Bl(this).selection;b?(v.selectAll(".selection").style("display",null).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1]),v.selectAll(".handle").style("display",null).attr("x",function(_){return _.type[_.type.length-1]==="e"?b[1][0]-a/2:b[0][0]-a/2}).attr("y",function(_){return _.type[0]==="s"?b[1][1]-a/2:b[0][1]-a/2}).attr("width",function(_){return _.type==="n"||_.type==="s"?b[1][0]-b[0][0]+a:a}).attr("height",function(_){return _.type==="e"||_.type==="w"?b[1][1]-b[0][1]+a:a})):v.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(v,b,_){var x=v.__brush.emitter;return x&&(!_||!x.clean)?x:new f(v,b,_)}function f(v,b,_){this.that=v,this.args=b,this.state=v.__brush,this.active=0,this.clean=_}f.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(v,b){return this.starting?(this.starting=!1,this.emit("start",v,b)):this.emit("brush",v),this},brush:function(v,b){return this.emit("brush",v,b),this},end:function(v,b){return--this.active===0&&(delete this.state.emitter,this.emit("end",v,b)),this},emit:function(v,b,_){var x=je(this.that).datum();o.call(v,this.that,new zN(v,{sourceEvent:b,target:c,selection:e.output(this.state.selection),mode:_,dispatch:o}),x)}};function d(v){if(s&&!v.touches||!r.apply(this,arguments))return;var b=this,_=v.target.__data__.type,x=(n&&v.metaKey?_="overlay":_)==="selection"?kh:n&&v.altKey?vr:pr,y=e===ba?null:ZN[_],w=e===va?null:BN[_],S=Bl(b),k=S.extent,N=S.selection,C=k[0][0],j,M,D=k[0][1],O,I,A=k[1][0],T,R,P=k[1][1],U,L,Z=0,G=0,ne,ee=y&&w&&n&&v.shiftKey,oe,ve,H=Array.from(v.touches||[v],te=>{const $e=te.identifier;return te=ct(te,b),te.point0=te.slice(),te.identifier=$e,te});qn(b);var he=u(b,arguments,!0).beforestart();if(_==="overlay"){N&&(ne=!0);const te=[H[0],H[1]||H[0]];S.selection=N=[[j=e===ba?C:Fe(te[0][0],te[1][0]),O=e===va?D:Fe(te[0][1],te[1][1])],[T=e===ba?A:Le(te[0][0],te[1][0]),U=e===va?P:Le(te[0][1],te[1][1])]],H.length>1&&me(v)}else j=N[0][0],O=N[0][1],T=N[1][0],U=N[1][1];M=j,I=O,R=T,L=U;var F=je(b).attr("pointer-events","none"),K=F.selectAll(".overlay").attr("cursor",Kt[_]);if(v.touches)he.moved=z,he.ended=de;else{var re=je(v.view).on("mousemove.brush",z,!0).on("mouseup.brush",de,!0);n&&re.on("keydown.brush",We,!0).on("keyup.brush",qe,!0),Ts(v.view)}l.call(b),he.start(v,x.name);function z(te){for(const $e of te.changedTouches||[te])for(const hi of H)hi.identifier===$e.identifier&&(hi.cur=ct($e,b));if(ee&&!oe&&!ve&&H.length===1){const $e=H[0];Ih($e.cur[0]-$e[0])>Ih($e.cur[1]-$e[1])?ve=!0:oe=!0}for(const $e of H)$e.cur&&($e[0]=$e.cur[0],$e[1]=$e.cur[1]);ne=!0,Fl(te),me(te)}function me(te){const $e=H[0],hi=$e.point0;var gn;switch(Z=$e[0]-hi[0],G=$e[1]-hi[1],x){case Zl:case kh:{y&&(Z=Le(C-j,Fe(A-T,Z)),M=j+Z,R=T+Z),w&&(G=Le(D-O,Fe(P-U,G)),I=O+G,L=U+G);break}case pr:{H[1]?(y&&(M=Le(C,Fe(A,H[0][0])),R=Le(C,Fe(A,H[1][0])),y=1),w&&(I=Le(D,Fe(P,H[0][1])),L=Le(D,Fe(P,H[1][1])),w=1)):(y<0?(Z=Le(C-j,Fe(A-j,Z)),M=j+Z,R=T):y>0&&(Z=Le(C-T,Fe(A-T,Z)),M=j,R=T+Z),w<0?(G=Le(D-O,Fe(P-O,G)),I=O+G,L=U):w>0&&(G=Le(D-U,Fe(P-U,G)),I=O,L=U+G));break}case vr:{y&&(M=Le(C,Fe(A,j-Z*y)),R=Le(C,Fe(A,T+Z*y))),w&&(I=Le(D,Fe(P,O-G*w)),L=Le(D,Fe(P,U+G*w)));break}}R<M&&(y*=-1,gn=j,j=T,T=gn,gn=M,M=R,R=gn,_ in Eh&&K.attr("cursor",Kt[_=Eh[_]])),L<I&&(w*=-1,gn=O,O=U,U=gn,gn=I,I=L,L=gn,_ in Mh&&K.attr("cursor",Kt[_=Mh[_]])),S.selection&&(N=S.selection),oe&&(M=N[0][0],R=N[1][0]),ve&&(I=N[0][1],L=N[1][1]),(N[0][0]!==M||N[0][1]!==I||N[1][0]!==R||N[1][1]!==L)&&(S.selection=[[M,I],[R,L]],l.call(b),he.brush(te,x.name))}function de(te){if(LN(te),te.touches){if(te.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Cs(te.view,ne),re.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);F.attr("pointer-events","all"),K.attr("cursor",Kt.overlay),S.selection&&(N=S.selection),GN(N)&&(S.selection=null,l.call(b)),he.end(te,x.name)}function We(te){switch(te.keyCode){case 16:{ee=y&&w;break}case 18:{x===pr&&(y&&(T=R-Z*y,j=M+Z*y),w&&(U=L-G*w,O=I+G*w),x=vr,me(te));break}case 32:{(x===pr||x===vr)&&(y<0?T=R-Z:y>0&&(j=M-Z),w<0?U=L-G:w>0&&(O=I-G),x=Zl,K.attr("cursor",Kt.selection),me(te));break}default:return}Fl(te)}function qe(te){switch(te.keyCode){case 16:{ee&&(oe=ve=ee=!1,me(te));break}case 18:{x===vr&&(y<0?T=R:y>0&&(j=M),w<0?U=L:w>0&&(O=I),x=pr,me(te));break}case 32:{x===Zl&&(te.altKey?(y&&(T=R-Z*y,j=M+Z*y),w&&(U=L-G*w,O=I+G*w),x=vr):(y<0?T=R:y>0&&(j=M),w<0?U=L:w>0&&(O=I),x=pr),K.attr("cursor",Kt[_]),me(te));break}default:return}Fl(te)}}function h(v){u(this,arguments).moved(v)}function p(v){u(this,arguments).ended(v)}function g(){var v=this.__brush||{selection:null};return v.extent=Yc(t.apply(this,arguments)),v.dim=e,v}return c.extent=function(v){return arguments.length?(t=typeof v=="function"?v:Ll(Yc(v)),c):t},c.filter=function(v){return arguments.length?(r=typeof v=="function"?v:Ll(!!v),c):r},c.touchable=function(v){return arguments.length?(i=typeof v=="function"?v:Ll(!!v),c):i},c.handleSize=function(v){return arguments.length?(a=+v,c):a},c.keyModifiers=function(v){return arguments.length?(n=!!v,c):n},c.on=function(){var v=o.on.apply(o,arguments);return v===o?c:v},c}var Th=Math.abs,br=Math.cos,yr=Math.sin,Wv=Math.PI,Fo=Wv/2,Ch=Wv*2,Ah=Math.max,Vl=1e-12;function Wl(e,t){return Array.from({length:t-e},(r,i)=>e+i)}function KN(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function QN(){return cf(!1,!1)}function eE(){return cf(!1,!0)}function tE(){return cf(!0,!1)}function cf(e,t){var r=0,i=null,n=null,o=null;function a(s){var c=s.length,l=new Array(c),u=Wl(0,c),f=new Array(c*c),d=new Array(c),h=0,p;s=Float64Array.from({length:c*c},t?(g,v)=>s[v%c][v/c|0]:(g,v)=>s[v/c|0][v%c]);for(let g=0;g<c;++g){let v=0;for(let b=0;b<c;++b)v+=s[g*c+b]+e*s[b*c+g];h+=l[g]=v}h=Ah(0,Ch-r*c)/h,p=h?r:Ch/c;{let g=0;i&&u.sort((v,b)=>i(l[v],l[b]));for(const v of u){const b=g;if(e){const _=Wl(~c+1,c).filter(x=>x<0?s[~x*c+v]:s[v*c+x]);n&&_.sort((x,y)=>n(x<0?-s[~x*c+v]:s[v*c+x],y<0?-s[~y*c+v]:s[v*c+y]));for(const x of _)if(x<0){const y=f[~x*c+v]||(f[~x*c+v]={source:null,target:null});y.target={index:v,startAngle:g,endAngle:g+=s[~x*c+v]*h,value:s[~x*c+v]}}else{const y=f[v*c+x]||(f[v*c+x]={source:null,target:null});y.source={index:v,startAngle:g,endAngle:g+=s[v*c+x]*h,value:s[v*c+x]}}d[v]={index:v,startAngle:b,endAngle:g,value:l[v]}}else{const _=Wl(0,c).filter(x=>s[v*c+x]||s[x*c+v]);n&&_.sort((x,y)=>n(s[v*c+x],s[v*c+y]));for(const x of _){let y;if(v<x?(y=f[v*c+x]||(f[v*c+x]={source:null,target:null}),y.source={index:v,startAngle:g,endAngle:g+=s[v*c+x]*h,value:s[v*c+x]}):(y=f[x*c+v]||(f[x*c+v]={source:null,target:null}),y.target={index:v,startAngle:g,endAngle:g+=s[v*c+x]*h,value:s[v*c+x]},v===x&&(y.source=y.target)),y.source&&y.target&&y.source.value<y.target.value){const w=y.source;y.source=y.target,y.target=w}}d[v]={index:v,startAngle:b,endAngle:g,value:l[v]}}g+=p}}return f=Object.values(f),f.groups=d,o?f.sort(o):f}return a.padAngle=function(s){return arguments.length?(r=Ah(0,s),a):r},a.sortGroups=function(s){return arguments.length?(i=s,a):i},a.sortSubgroups=function(s){return arguments.length?(n=s,a):n},a.sortChords=function(s){return arguments.length?(s==null?o=null:(o=KN(s))._=s,a):o&&o._},a}const Hc=Math.PI,Xc=2*Hc,zn=1e-6,nE=Xc-zn;function qv(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function rE(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return qv;const r=10**t;return function(i){this._+=i[0];for(let n=1,o=i.length;n<o;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}let yo=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?qv:rE(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,o,a){this._append`C${+t},${+r},${+i},${+n},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,n,o){if(t=+t,r=+r,i=+i,n=+n,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,c=i-t,l=n-r,u=a-t,f=s-r,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>zn)if(!(Math.abs(f*c-l*u)>zn)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let h=i-a,p=n-s,g=c*c+l*l,v=h*h+p*p,b=Math.sqrt(g),_=Math.sqrt(d),x=o*Math.tan((Hc-Math.acos((g+d-v)/(2*b*_)))/2),y=x/_,w=x/b;Math.abs(y-1)>zn&&this._append`L${t+y*u},${r+y*f}`,this._append`A${o},${o},0,0,${+(f*h>u*p)},${this._x1=t+w*c},${this._y1=r+w*l}`}}arc(t,r,i,n,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(n),c=i*Math.sin(n),l=t+s,u=r+c,f=1^a,d=a?n-o:o-n;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>zn||Math.abs(this._y1-u)>zn)&&this._append`L${l},${u}`,i&&(d<0&&(d=d%Xc+Xc),d>nE?this._append`A${i},${i},0,1,${f},${t-s},${r-c}A${i},${i},0,1,${f},${this._x1=l},${this._y1=u}`:d>zn&&this._append`A${i},${i},0,${+(d>=Hc)},${f},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function uf(){return new yo}uf.prototype=yo.prototype;function iE(e=3){return new yo(+e)}var oE=Array.prototype.slice;function Dn(e){return function(){return e}}function aE(e){return e.source}function sE(e){return e.target}function jh(e){return e.radius}function lE(e){return e.startAngle}function cE(e){return e.endAngle}function uE(){return 0}function fE(){return 10}function Gv(e){var t=aE,r=sE,i=jh,n=jh,o=lE,a=cE,s=uE,c=null;function l(){var u,f=t.apply(this,arguments),d=r.apply(this,arguments),h=s.apply(this,arguments)/2,p=oE.call(arguments),g=+i.apply(this,(p[0]=f,p)),v=o.apply(this,p)-Fo,b=a.apply(this,p)-Fo,_=+n.apply(this,(p[0]=d,p)),x=o.apply(this,p)-Fo,y=a.apply(this,p)-Fo;if(c||(c=u=uf()),h>Vl&&(Th(b-v)>h*2+Vl?b>v?(v+=h,b-=h):(v-=h,b+=h):v=b=(v+b)/2,Th(y-x)>h*2+Vl?y>x?(x+=h,y-=h):(x-=h,y+=h):x=y=(x+y)/2),c.moveTo(g*br(v),g*yr(v)),c.arc(0,0,g,v,b),v!==x||b!==y)if(e){var w=+e.apply(this,arguments),S=_-w,k=(x+y)/2;c.quadraticCurveTo(0,0,S*br(x),S*yr(x)),c.lineTo(_*br(k),_*yr(k)),c.lineTo(S*br(y),S*yr(y))}else c.quadraticCurveTo(0,0,_*br(x),_*yr(x)),c.arc(0,0,_,x,y);if(c.quadraticCurveTo(0,0,g*br(v),g*yr(v)),c.closePath(),u)return c=null,u+""||null}return e&&(l.headRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Dn(+u),l):e}),l.radius=function(u){return arguments.length?(i=n=typeof u=="function"?u:Dn(+u),l):i},l.sourceRadius=function(u){return arguments.length?(i=typeof u=="function"?u:Dn(+u),l):i},l.targetRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Dn(+u),l):n},l.startAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Dn(+u),l):o},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Dn(+u),l):a},l.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Dn(+u),l):s},l.source=function(u){return arguments.length?(t=u,l):t},l.target=function(u){return arguments.length?(r=u,l):r},l.context=function(u){return arguments.length?(c=u??null,l):c},l}function dE(){return Gv()}function hE(){return Gv(fE)}var mE=Array.prototype,Yv=mE.slice;function gE(e,t){return e-t}function pE(e){for(var t=0,r=e.length,i=e[r-1][1]*e[0][0]-e[r-1][0]*e[0][1];++t<r;)i+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return i}const yn=e=>()=>e;function vE(e,t){for(var r=-1,i=t.length,n;++r<i;)if(n=bE(e,t[r]))return n;return 0}function bE(e,t){for(var r=t[0],i=t[1],n=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var c=e[o],l=c[0],u=c[1],f=e[s],d=f[0],h=f[1];if(yE(c,f,t))return 0;u>i!=h>i&&r<(d-l)*(i-u)/(h-u)+l&&(n=-n)}return n}function yE(e,t,r){var i;return _E(e,t,r)&&xE(e[i=+(e[0]===t[0])],r[i],t[i])}function _E(e,t,r){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])}function xE(e,t,r){return e<=t&&t<=r||r<=t&&t<=e}function wE(){}var Qt=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function Jc(){var e=1,t=1,r=Fu,i=c;function n(l){var u=r(l);if(Array.isArray(u))u=u.slice().sort(gE);else{const f=Fi(l,$E);for(u=Yn(...Lu(f[0],f[1],u),u);u[u.length-1]>=f[1];)u.pop();for(;u[1]<f[0];)u.shift()}return u.map(f=>o(l,f))}function o(l,u){const f=u==null?NaN:+u;if(isNaN(f))throw new Error(`invalid value: ${u}`);var d=[],h=[];return a(l,f,function(p){i(p,l,f),pE(p)>0?d.push([p]):h.push(p)}),h.forEach(function(p){for(var g=0,v=d.length,b;g<v;++g)if(vE((b=d[g])[0],p)!==-1){b.push(p);return}}),{type:"MultiPolygon",value:u,coordinates:d}}function a(l,u,f){var d=new Array,h=new Array,p,g,v,b,_,x;for(p=g=-1,b=Un(l[0],u),Qt[b<<1].forEach(y);++p<e-1;)v=b,b=Un(l[p+1],u),Qt[v|b<<1].forEach(y);for(Qt[b<<0].forEach(y);++g<t-1;){for(p=-1,b=Un(l[g*e+e],u),_=Un(l[g*e],u),Qt[b<<1|_<<2].forEach(y);++p<e-1;)v=b,b=Un(l[g*e+e+p+1],u),x=_,_=Un(l[g*e+p+1],u),Qt[v|b<<1|_<<2|x<<3].forEach(y);Qt[b|_<<3].forEach(y)}for(p=-1,_=l[g*e]>=u,Qt[_<<2].forEach(y);++p<e-1;)x=_,_=Un(l[g*e+p+1],u),Qt[_<<2|x<<3].forEach(y);Qt[_<<3].forEach(y);function y(w){var S=[w[0][0]+p,w[0][1]+g],k=[w[1][0]+p,w[1][1]+g],N=s(S),C=s(k),j,M;(j=h[N])?(M=d[C])?(delete h[j.end],delete d[M.start],j===M?(j.ring.push(k),f(j.ring)):d[j.start]=h[M.end]={start:j.start,end:M.end,ring:j.ring.concat(M.ring)}):(delete h[j.end],j.ring.push(k),h[j.end=C]=j):(j=d[C])?(M=h[N])?(delete d[j.start],delete h[M.end],j===M?(j.ring.push(k),f(j.ring)):d[M.start]=h[j.end]={start:M.start,end:j.end,ring:M.ring.concat(j.ring)}):(delete d[j.start],j.ring.unshift(S),d[j.start=N]=j):d[N]=h[C]={start:N,end:C,ring:[S,k]}}}function s(l){return l[0]*2+l[1]*(e+1)*4}function c(l,u,f){l.forEach(function(d){var h=d[0],p=d[1],g=h|0,v=p|0,b=ql(u[v*e+g]);h>0&&h<e&&g===h&&(d[0]=Ph(h,ql(u[v*e+g-1]),b,f)),p>0&&p<t&&v===p&&(d[1]=Ph(p,ql(u[(v-1)*e+g]),b,f))})}return n.contour=o,n.size=function(l){if(!arguments.length)return[e,t];var u=Math.floor(l[0]),f=Math.floor(l[1]);if(!(u>=0&&f>=0))throw new Error("invalid size");return e=u,t=f,n},n.thresholds=function(l){return arguments.length?(r=typeof l=="function"?l:Array.isArray(l)?yn(Yv.call(l)):yn(l),n):r},n.smooth=function(l){return arguments.length?(i=l?c:wE,n):i===c},n}function $E(e){return isFinite(e)?e:NaN}function Un(e,t){return e==null?!1:+e>=t}function ql(e){return e==null||isNaN(e=+e)?-1/0:e}function Ph(e,t,r,i){const n=i-t,o=r-t,a=isFinite(n)||isFinite(o)?n/o:Math.sign(n)/Math.sign(o);return isNaN(a)?e:e+a-.5}function SE(e){return e[0]}function kE(e){return e[1]}function IE(){return 1}function NE(){var e=SE,t=kE,r=IE,i=960,n=500,o=20,a=2,s=o*3,c=i+s*2>>a,l=n+s*2>>a,u=yn(20);function f(_){var x=new Float32Array(c*l),y=Math.pow(2,-a),w=-1;for(const O of _){var S=(e(O,++w,_)+s)*y,k=(t(O,w,_)+s)*y,N=+r(O,w,_);if(N&&S>=0&&S<c&&k>=0&&k<l){var C=Math.floor(S),j=Math.floor(k),M=S-C-.5,D=k-j-.5;x[C+j*c]+=(1-M)*(1-D)*N,x[C+1+j*c]+=M*(1-D)*N,x[C+1+(j+1)*c]+=M*D*N,x[C+(j+1)*c]+=(1-M)*D*N}}return Np({data:x,width:c,height:l},o*y),x}function d(_){var x=f(_),y=u(x),w=Math.pow(2,2*a);return Array.isArray(y)||(y=Yn(Number.MIN_VALUE,Hi(x)/w,y)),Jc().size([c,l]).thresholds(y.map(S=>S*w))(x).map((S,k)=>(S.value=+y[k],h(S)))}d.contours=function(_){var x=f(_),y=Jc().size([c,l]),w=Math.pow(2,2*a),S=k=>{k=+k;var N=h(y.contour(x,k*w));return N.value=k,N};return Object.defineProperty(S,"max",{get:()=>Hi(x)/w}),S};function h(_){return _.coordinates.forEach(p),_}function p(_){_.forEach(g)}function g(_){_.forEach(v)}function v(_){_[0]=_[0]*Math.pow(2,a)-s,_[1]=_[1]*Math.pow(2,a)-s}function b(){return s=o*3,c=i+s*2>>a,l=n+s*2>>a,d}return d.x=function(_){return arguments.length?(e=typeof _=="function"?_:yn(+_),d):e},d.y=function(_){return arguments.length?(t=typeof _=="function"?_:yn(+_),d):t},d.weight=function(_){return arguments.length?(r=typeof _=="function"?_:yn(+_),d):r},d.size=function(_){if(!arguments.length)return[i,n];var x=+_[0],y=+_[1];if(!(x>=0&&y>=0))throw new Error("invalid size");return i=x,n=y,b()},d.cellSize=function(_){if(!arguments.length)return 1<<a;if(!((_=+_)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(_)/Math.LN2),b()},d.thresholds=function(_){return arguments.length?(u=typeof _=="function"?_:Array.isArray(_)?yn(Yv.call(_)):yn(_),d):u},d.bandwidth=function(_){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((_=+_)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*_*_+1)-1)/2,b()},d}const sn=11102230246251565e-32,Ze=134217729,EE=(3+8*sn)*sn;function Gl(e,t,r,i,n){let o,a,s,c,l=t[0],u=i[0],f=0,d=0;u>l==u>-l?(o=l,l=t[++f]):(o=u,u=i[++d]);let h=0;if(f<e&&d<r)for(u>l==u>-l?(a=l+o,s=o-(a-l),l=t[++f]):(a=u+o,s=o-(a-u),u=i[++d]),o=a,s!==0&&(n[h++]=s);f<e&&d<r;)u>l==u>-l?(a=o+l,c=a-o,s=o-(a-c)+(l-c),l=t[++f]):(a=o+u,c=a-o,s=o-(a-c)+(u-c),u=i[++d]),o=a,s!==0&&(n[h++]=s);for(;f<e;)a=o+l,c=a-o,s=o-(a-c)+(l-c),l=t[++f],o=a,s!==0&&(n[h++]=s);for(;d<r;)a=o+u,c=a-o,s=o-(a-c)+(u-c),u=i[++d],o=a,s!==0&&(n[h++]=s);return(o!==0||h===0)&&(n[h++]=o),h}function ME(e,t){let r=t[0];for(let i=1;i<e;i++)r+=t[i];return r}function _o(e){return new Float64Array(e)}const TE=(3+16*sn)*sn,CE=(2+12*sn)*sn,AE=(9+64*sn)*sn*sn,_r=_o(4),Oh=_o(8),Rh=_o(12),Dh=_o(16),Ge=_o(4);function jE(e,t,r,i,n,o,a){let s,c,l,u,f,d,h,p,g,v,b,_,x,y,w,S,k,N;const C=e-n,j=r-n,M=t-o,D=i-o;y=C*D,d=Ze*C,h=d-(d-C),p=C-h,d=Ze*D,g=d-(d-D),v=D-g,w=p*v-(y-h*g-p*g-h*v),S=M*j,d=Ze*M,h=d-(d-M),p=M-h,d=Ze*j,g=d-(d-j),v=j-g,k=p*v-(S-h*g-p*g-h*v),b=w-k,f=w-b,_r[0]=w-(b+f)+(f-k),_=y+b,f=_-y,x=y-(_-f)+(b-f),b=x-S,f=x-b,_r[1]=x-(b+f)+(f-S),N=_+b,f=N-_,_r[2]=_-(N-f)+(b-f),_r[3]=N;let O=ME(4,_r),I=CE*a;if(O>=I||-O>=I||(f=e-C,s=e-(C+f)+(f-n),f=r-j,l=r-(j+f)+(f-n),f=t-M,c=t-(M+f)+(f-o),f=i-D,u=i-(D+f)+(f-o),s===0&&c===0&&l===0&&u===0)||(I=AE*a+EE*Math.abs(O),O+=C*u+D*s-(M*l+j*c),O>=I||-O>=I))return O;y=s*D,d=Ze*s,h=d-(d-s),p=s-h,d=Ze*D,g=d-(d-D),v=D-g,w=p*v-(y-h*g-p*g-h*v),S=c*j,d=Ze*c,h=d-(d-c),p=c-h,d=Ze*j,g=d-(d-j),v=j-g,k=p*v-(S-h*g-p*g-h*v),b=w-k,f=w-b,Ge[0]=w-(b+f)+(f-k),_=y+b,f=_-y,x=y-(_-f)+(b-f),b=x-S,f=x-b,Ge[1]=x-(b+f)+(f-S),N=_+b,f=N-_,Ge[2]=_-(N-f)+(b-f),Ge[3]=N;const A=Gl(4,_r,4,Ge,Oh);y=C*u,d=Ze*C,h=d-(d-C),p=C-h,d=Ze*u,g=d-(d-u),v=u-g,w=p*v-(y-h*g-p*g-h*v),S=M*l,d=Ze*M,h=d-(d-M),p=M-h,d=Ze*l,g=d-(d-l),v=l-g,k=p*v-(S-h*g-p*g-h*v),b=w-k,f=w-b,Ge[0]=w-(b+f)+(f-k),_=y+b,f=_-y,x=y-(_-f)+(b-f),b=x-S,f=x-b,Ge[1]=x-(b+f)+(f-S),N=_+b,f=N-_,Ge[2]=_-(N-f)+(b-f),Ge[3]=N;const T=Gl(A,Oh,4,Ge,Rh);y=s*u,d=Ze*s,h=d-(d-s),p=s-h,d=Ze*u,g=d-(d-u),v=u-g,w=p*v-(y-h*g-p*g-h*v),S=c*l,d=Ze*c,h=d-(d-c),p=c-h,d=Ze*l,g=d-(d-l),v=l-g,k=p*v-(S-h*g-p*g-h*v),b=w-k,f=w-b,Ge[0]=w-(b+f)+(f-k),_=y+b,f=_-y,x=y-(_-f)+(b-f),b=x-S,f=x-b,Ge[1]=x-(b+f)+(f-S),N=_+b,f=N-_,Ge[2]=_-(N-f)+(b-f),Ge[3]=N;const R=Gl(T,Rh,4,Ge,Dh);return Dh[R-1]}function Zo(e,t,r,i,n,o){const a=(t-o)*(r-n),s=(e-n)*(i-o),c=a-s,l=Math.abs(a+s);return Math.abs(c)>=TE*l?c:-jE(e,t,r,i,n,o,l)}const Uh=Math.pow(2,-52),Bo=new Uint32Array(512);class Fa{static from(t,r=UE,i=zE){const n=t.length,o=new Float64Array(n*2);for(let a=0;a<n;a++){const s=t[a];o[2*a]=r(s),o[2*a+1]=i(s)}return new Fa(o)}constructor(t){const r=t.length>>1;if(r>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const i=Math.max(2*r-5,0);this._triangles=new Uint32Array(i*3),this._halfedges=new Int32Array(i*3),this._hashSize=Math.ceil(Math.sqrt(r)),this._hullPrev=new Uint32Array(r),this._hullNext=new Uint32Array(r),this._hullTri=new Uint32Array(r),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(r),this._dists=new Float64Array(r),this.update()}update(){const{coords:t,_hullPrev:r,_hullNext:i,_hullTri:n,_hullHash:o}=this,a=t.length>>1;let s=1/0,c=1/0,l=-1/0,u=-1/0;for(let C=0;C<a;C++){const j=t[2*C],M=t[2*C+1];j<s&&(s=j),M<c&&(c=M),j>l&&(l=j),M>u&&(u=M),this._ids[C]=C}const f=(s+l)/2,d=(c+u)/2;let h,p,g;for(let C=0,j=1/0;C<a;C++){const M=Yl(f,d,t[2*C],t[2*C+1]);M<j&&(h=C,j=M)}const v=t[2*h],b=t[2*h+1];for(let C=0,j=1/0;C<a;C++){if(C===h)continue;const M=Yl(v,b,t[2*C],t[2*C+1]);M<j&&M>0&&(p=C,j=M)}let _=t[2*p],x=t[2*p+1],y=1/0;for(let C=0;C<a;C++){if(C===h||C===p)continue;const j=RE(v,b,_,x,t[2*C],t[2*C+1]);j<y&&(g=C,y=j)}let w=t[2*g],S=t[2*g+1];if(y===1/0){for(let M=0;M<a;M++)this._dists[M]=t[2*M]-t[0]||t[2*M+1]-t[1];Tr(this._ids,this._dists,0,a-1);const C=new Uint32Array(a);let j=0;for(let M=0,D=-1/0;M<a;M++){const O=this._ids[M],I=this._dists[O];I>D&&(C[j++]=O,D=I)}this.hull=C.subarray(0,j),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Zo(v,b,_,x,w,S)<0){const C=p,j=_,M=x;p=g,_=w,x=S,g=C,w=j,S=M}const k=DE(v,b,_,x,w,S);this._cx=k.x,this._cy=k.y;for(let C=0;C<a;C++)this._dists[C]=Yl(t[2*C],t[2*C+1],k.x,k.y);Tr(this._ids,this._dists,0,a-1),this._hullStart=h;let N=3;i[h]=r[g]=p,i[p]=r[h]=g,i[g]=r[p]=h,n[h]=0,n[p]=1,n[g]=2,o.fill(-1),o[this._hashKey(v,b)]=h,o[this._hashKey(_,x)]=p,o[this._hashKey(w,S)]=g,this.trianglesLen=0,this._addTriangle(h,p,g,-1,-1,-1);for(let C=0,j,M;C<this._ids.length;C++){const D=this._ids[C],O=t[2*D],I=t[2*D+1];if(C>0&&Math.abs(O-j)<=Uh&&Math.abs(I-M)<=Uh||(j=O,M=I,D===h||D===p||D===g))continue;let A=0;for(let L=0,Z=this._hashKey(O,I);L<this._hashSize&&(A=o[(Z+L)%this._hashSize],!(A!==-1&&A!==i[A]));L++);A=r[A];let T=A,R;for(;R=i[T],Zo(O,I,t[2*T],t[2*T+1],t[2*R],t[2*R+1])>=0;)if(T=R,T===A){T=-1;break}if(T===-1)continue;let P=this._addTriangle(T,D,i[T],-1,-1,n[T]);n[D]=this._legalize(P+2),n[T]=P,N++;let U=i[T];for(;R=i[U],Zo(O,I,t[2*U],t[2*U+1],t[2*R],t[2*R+1])<0;)P=this._addTriangle(U,D,R,n[D],-1,n[U]),n[D]=this._legalize(P+2),i[U]=U,N--,U=R;if(T===A)for(;R=r[T],Zo(O,I,t[2*R],t[2*R+1],t[2*T],t[2*T+1])<0;)P=this._addTriangle(R,D,T,-1,n[T],n[R]),this._legalize(P+2),n[R]=P,i[T]=T,N--,T=R;this._hullStart=r[D]=T,i[T]=r[U]=D,i[D]=U,o[this._hashKey(O,I)]=D,o[this._hashKey(t[2*T],t[2*T+1])]=T}this.hull=new Uint32Array(N);for(let C=0,j=this._hullStart;C<N;C++)this.hull[C]=j,j=i[j];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,r){return Math.floor(PE(t-this._cx,r-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:r,_halfedges:i,coords:n}=this;let o=0,a=0;for(;;){const s=i[t],c=t-t%3;if(a=c+(t+2)%3,s===-1){if(o===0)break;t=Bo[--o];continue}const l=s-s%3,u=c+(t+1)%3,f=l+(s+2)%3,d=r[a],h=r[t],p=r[u],g=r[f];if(OE(n[2*d],n[2*d+1],n[2*h],n[2*h+1],n[2*p],n[2*p+1],n[2*g],n[2*g+1])){r[t]=g,r[s]=d;const b=i[f];if(b===-1){let x=this._hullStart;do{if(this._hullTri[x]===f){this._hullTri[x]=t;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(t,b),this._link(s,i[a]),this._link(a,f);const _=l+(s+1)%3;o<Bo.length&&(Bo[o++]=_)}else{if(o===0)break;t=Bo[--o]}}return a}_link(t,r){this._halfedges[t]=r,r!==-1&&(this._halfedges[r]=t)}_addTriangle(t,r,i,n,o,a){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=r,this._triangles[s+2]=i,this._link(s,n),this._link(s+1,o),this._link(s+2,a),this.trianglesLen+=3,s}}function PE(e,t){const r=e/(Math.abs(e)+Math.abs(t));return(t>0?3-r:1+r)/4}function Yl(e,t,r,i){const n=e-r,o=t-i;return n*n+o*o}function OE(e,t,r,i,n,o,a,s){const c=e-a,l=t-s,u=r-a,f=i-s,d=n-a,h=o-s,p=c*c+l*l,g=u*u+f*f,v=d*d+h*h;return c*(f*v-g*h)-l*(u*v-g*d)+p*(u*h-f*d)<0}function RE(e,t,r,i,n,o){const a=r-e,s=i-t,c=n-e,l=o-t,u=a*a+s*s,f=c*c+l*l,d=.5/(a*l-s*c),h=(l*u-s*f)*d,p=(a*f-c*u)*d;return h*h+p*p}function DE(e,t,r,i,n,o){const a=r-e,s=i-t,c=n-e,l=o-t,u=a*a+s*s,f=c*c+l*l,d=.5/(a*l-s*c),h=e+(l*u-s*f)*d,p=t+(a*f-c*u)*d;return{x:h,y:p}}function Tr(e,t,r,i){if(i-r<=20)for(let n=r+1;n<=i;n++){const o=e[n],a=t[o];let s=n-1;for(;s>=r&&t[e[s]]>a;)e[s+1]=e[s--];e[s+1]=o}else{const n=r+i>>1;let o=r+1,a=i;bi(e,n,o),t[e[r]]>t[e[i]]&&bi(e,r,i),t[e[o]]>t[e[i]]&&bi(e,o,i),t[e[r]]>t[e[o]]&&bi(e,r,o);const s=e[o],c=t[s];for(;;){do o++;while(t[e[o]]<c);do a--;while(t[e[a]]>c);if(a<o)break;bi(e,o,a)}e[r+1]=e[a],e[a]=s,i-o+1>=a-r?(Tr(e,t,o,i),Tr(e,t,r,a-1)):(Tr(e,t,r,a-1),Tr(e,t,o,i))}}function bi(e,t,r){const i=e[t];e[t]=e[r],e[r]=i}function UE(e){return e[0]}function zE(e){return e[1]}const zh=1e-6;class Bn{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,r){this._+=`L${this._x1=+t},${this._y1=+r}`}arc(t,r,i){t=+t,r=+r,i=+i;const n=t+i,o=r;if(i<0)throw new Error("negative radius");this._x1===null?this._+=`M${n},${o}`:(Math.abs(this._x1-n)>zh||Math.abs(this._y1-o)>zh)&&(this._+="L"+n+","+o),i&&(this._+=`A${i},${i},0,1,1,${t-i},${r}A${i},${i},0,1,1,${this._x1=n},${this._y1=o}`)}rect(t,r,i,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${+i}v${+n}h${-i}Z`}value(){return this._||null}}class Kc{constructor(){this._=[]}moveTo(t,r){this._.push([t,r])}closePath(){this._.push(this._[0].slice())}lineTo(t,r){this._.push([t,r])}value(){return this._.length?this._:null}}class Hv{constructor(t,[r,i,n,o]=[0,0,960,500]){if(!((n=+n)>=(r=+r))||!((o=+o)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=n,this.xmin=r,this.ymax=o,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:r,triangles:i},vectors:n}=this;let o,a;const s=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let g=0,v=0,b=i.length,_,x;g<b;g+=3,v+=2){const y=i[g]*2,w=i[g+1]*2,S=i[g+2]*2,k=t[y],N=t[y+1],C=t[w],j=t[w+1],M=t[S],D=t[S+1],O=C-k,I=j-N,A=M-k,T=D-N,R=(O*T-I*A)*2;if(Math.abs(R)<1e-9){if(o===void 0){o=a=0;for(const U of r)o+=t[U*2],a+=t[U*2+1];o/=r.length,a/=r.length}const P=1e9*Math.sign((o-k)*T-(a-N)*A);_=(k+M)/2-P*T,x=(N+D)/2+P*A}else{const P=1/R,U=O*O+I*I,L=A*A+T*T;_=k+(T*U-I*L)*P,x=N+(O*L-A*U)*P}s[v]=_,s[v+1]=x}let c=r[r.length-1],l,u=c*4,f,d=t[2*c],h,p=t[2*c+1];n.fill(0);for(let g=0;g<r.length;++g)c=r[g],l=u,f=d,h=p,u=c*4,d=t[2*c],p=t[2*c+1],n[l+2]=n[u]=h-p,n[l+3]=n[u+1]=d-f}render(t){const r=t==null?t=new Bn:void 0,{delaunay:{halfedges:i,inedges:n,hull:o},circumcenters:a,vectors:s}=this;if(o.length<=1)return null;for(let u=0,f=i.length;u<f;++u){const d=i[u];if(d<u)continue;const h=Math.floor(u/3)*2,p=Math.floor(d/3)*2,g=a[h],v=a[h+1],b=a[p],_=a[p+1];this._renderSegment(g,v,b,_,t)}let c,l=o[o.length-1];for(let u=0;u<o.length;++u){c=l,l=o[u];const f=Math.floor(n[l]/3)*2,d=a[f],h=a[f+1],p=c*4,g=this._project(d,h,s[p+2],s[p+3]);g&&this._renderSegment(d,h,g[0],g[1],t)}return r&&r.value()}renderBounds(t){const r=t==null?t=new Bn:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),r&&r.value()}renderCell(t,r){const i=r==null?r=new Bn:void 0,n=this._clip(t);if(n===null||!n.length)return;r.moveTo(n[0],n[1]);let o=n.length;for(;n[0]===n[o-2]&&n[1]===n[o-1]&&o>1;)o-=2;for(let a=2;a<o;a+=2)(n[a]!==n[a-2]||n[a+1]!==n[a-1])&&r.lineTo(n[a],n[a+1]);return r.closePath(),i&&i.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let r=0,i=t.length/2;r<i;++r){const n=this.cellPolygon(r);n&&(n.index=r,yield n)}}cellPolygon(t){const r=new Kc;return this.renderCell(t,r),r.value()}_renderSegment(t,r,i,n,o){let a;const s=this._regioncode(t,r),c=this._regioncode(i,n);s===0&&c===0?(o.moveTo(t,r),o.lineTo(i,n)):(a=this._clipSegment(t,r,i,n,s,c))&&(o.moveTo(a[0],a[1]),o.lineTo(a[2],a[3]))}contains(t,r,i){return r=+r,r!==r||(i=+i,i!==i)?!1:this.delaunay._step(t,r,i)===t}*neighbors(t){const r=this._clip(t);if(r)for(const i of this.delaunay.neighbors(t)){const n=this._clip(i);if(n){e:for(let o=0,a=r.length;o<a;o+=2)for(let s=0,c=n.length;s<c;s+=2)if(r[o]===n[s]&&r[o+1]===n[s+1]&&r[(o+2)%a]===n[(s+c-2)%c]&&r[(o+3)%a]===n[(s+c-1)%c]){yield i;break e}}}}_cell(t){const{circumcenters:r,delaunay:{inedges:i,halfedges:n,triangles:o}}=this,a=i[t];if(a===-1)return null;const s=[];let c=a;do{const l=Math.floor(c/3);if(s.push(r[l*2],r[l*2+1]),c=c%3===2?c-2:c+1,o[c]!==t)break;c=n[c]}while(c!==a&&c!==-1);return s}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const r=this._cell(t);if(r===null)return null;const{vectors:i}=this,n=t*4;return this._simplify(i[n]||i[n+1]?this._clipInfinite(t,r,i[n],i[n+1],i[n+2],i[n+3]):this._clipFinite(t,r))}_clipFinite(t,r){const i=r.length;let n=null,o,a,s=r[i-2],c=r[i-1],l,u=this._regioncode(s,c),f,d=0;for(let h=0;h<i;h+=2)if(o=s,a=c,s=r[h],c=r[h+1],l=u,u=this._regioncode(s,c),l===0&&u===0)f=d,d=0,n?n.push(s,c):n=[s,c];else{let p,g,v,b,_;if(l===0){if((p=this._clipSegment(o,a,s,c,l,u))===null)continue;[g,v,b,_]=p}else{if((p=this._clipSegment(s,c,o,a,u,l))===null)continue;[b,_,g,v]=p,f=d,d=this._edgecode(g,v),f&&d&&this._edge(t,f,d,n,n.length),n?n.push(g,v):n=[g,v]}f=d,d=this._edgecode(b,_),f&&d&&this._edge(t,f,d,n,n.length),n?n.push(b,_):n=[b,_]}if(n)f=d,d=this._edgecode(n[0],n[1]),f&&d&&this._edge(t,f,d,n,n.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return n}_clipSegment(t,r,i,n,o,a){const s=o<a;for(s&&([t,r,i,n,o,a]=[i,n,t,r,a,o]);;){if(o===0&&a===0)return s?[i,n,t,r]:[t,r,i,n];if(o&a)return null;let c,l,u=o||a;u&8?(c=t+(i-t)*(this.ymax-r)/(n-r),l=this.ymax):u&4?(c=t+(i-t)*(this.ymin-r)/(n-r),l=this.ymin):u&2?(l=r+(n-r)*(this.xmax-t)/(i-t),c=this.xmax):(l=r+(n-r)*(this.xmin-t)/(i-t),c=this.xmin),o?(t=c,r=l,o=this._regioncode(t,r)):(i=c,n=l,a=this._regioncode(i,n))}}_clipInfinite(t,r,i,n,o,a){let s=Array.from(r),c;if((c=this._project(s[0],s[1],i,n))&&s.unshift(c[0],c[1]),(c=this._project(s[s.length-2],s[s.length-1],o,a))&&s.push(c[0],c[1]),s=this._clipFinite(t,s))for(let l=0,u=s.length,f,d=this._edgecode(s[u-2],s[u-1]);l<u;l+=2)f=d,d=this._edgecode(s[l],s[l+1]),f&&d&&(l=this._edge(t,f,d,s,l),u=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,r,i,n,o){for(;r!==i;){let a,s;switch(r){case 5:r=4;continue;case 4:r=6,a=this.xmax,s=this.ymin;break;case 6:r=2;continue;case 2:r=10,a=this.xmax,s=this.ymax;break;case 10:r=8;continue;case 8:r=9,a=this.xmin,s=this.ymax;break;case 9:r=1;continue;case 1:r=5,a=this.xmin,s=this.ymin;break}(n[o]!==a||n[o+1]!==s)&&this.contains(t,a,s)&&(n.splice(o,0,a,s),o+=2)}return o}_project(t,r,i,n){let o=1/0,a,s,c;if(n<0){if(r<=this.ymin)return null;(a=(this.ymin-r)/n)<o&&(c=this.ymin,s=t+(o=a)*i)}else if(n>0){if(r>=this.ymax)return null;(a=(this.ymax-r)/n)<o&&(c=this.ymax,s=t+(o=a)*i)}if(i>0){if(t>=this.xmax)return null;(a=(this.xmax-t)/i)<o&&(s=this.xmax,c=r+(o=a)*n)}else if(i<0){if(t<=this.xmin)return null;(a=(this.xmin-t)/i)<o&&(s=this.xmin,c=r+(o=a)*n)}return[s,c]}_edgecode(t,r){return(t===this.xmin?1:t===this.xmax?2:0)|(r===this.ymin?4:r===this.ymax?8:0)}_regioncode(t,r){return(t<this.xmin?1:t>this.xmax?2:0)|(r<this.ymin?4:r>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let r=0;r<t.length;r+=2){const i=(r+2)%t.length,n=(r+4)%t.length;(t[r]===t[i]&&t[i]===t[n]||t[r+1]===t[i+1]&&t[i+1]===t[n+1])&&(t.splice(i,2),r-=2)}t.length||(t=null)}return t}}const LE=2*Math.PI,xr=Math.pow;function FE(e){return e[0]}function ZE(e){return e[1]}function BE(e){const{triangles:t,coords:r}=e;for(let i=0;i<t.length;i+=3){const n=2*t[i],o=2*t[i+1],a=2*t[i+2];if((r[a]-r[n])*(r[o+1]-r[n+1])-(r[o]-r[n])*(r[a+1]-r[n+1])>1e-10)return!1}return!0}function VE(e,t,r){return[e+Math.sin(e+t)*r,t+Math.cos(e-t)*r]}class ff{static from(t,r=FE,i=ZE,n){return new ff("length"in t?WE(t,r,i,n):Float64Array.from(qE(t,r,i,n)))}constructor(t){this._delaunator=new Fa(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,r=this.points;if(t.hull&&t.hull.length>2&&BE(t)){this.collinear=Int32Array.from({length:r.length/2},(d,h)=>h).sort((d,h)=>r[2*d]-r[2*h]||r[2*d+1]-r[2*h+1]);const c=this.collinear[0],l=this.collinear[this.collinear.length-1],u=[r[2*c],r[2*c+1],r[2*l],r[2*l+1]],f=1e-8*Math.hypot(u[3]-u[1],u[2]-u[0]);for(let d=0,h=r.length/2;d<h;++d){const p=VE(r[2*d],r[2*d+1],f);r[2*d]=p[0],r[2*d+1]=p[1]}this._delaunator=new Fa(r)}else delete this.collinear;const i=this.halfedges=this._delaunator.halfedges,n=this.hull=this._delaunator.hull,o=this.triangles=this._delaunator.triangles,a=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let c=0,l=i.length;c<l;++c){const u=o[c%3===2?c-2:c+1];(i[c]===-1||a[u]===-1)&&(a[u]=c)}for(let c=0,l=n.length;c<l;++c)s[n[c]]=c;n.length<=2&&n.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=n[0],a[n[0]]=1,n.length===2&&(a[n[1]]=0,this.triangles[1]=n[1],this.triangles[2]=n[1]))}voronoi(t){return new Hv(this,t)}*neighbors(t){const{inedges:r,hull:i,_hullIndex:n,halfedges:o,triangles:a,collinear:s}=this;if(s){const f=s.indexOf(t);f>0&&(yield s[f-1]),f<s.length-1&&(yield s[f+1]);return}const c=r[t];if(c===-1)return;let l=c,u=-1;do{if(yield u=a[l],l=l%3===2?l-2:l+1,a[l]!==t)return;if(l=o[l],l===-1){const f=i[(n[t]+1)%i.length];f!==u&&(yield f);return}}while(l!==c)}find(t,r,i=0){if(t=+t,t!==t||(r=+r,r!==r))return-1;const n=i;let o;for(;(o=this._step(i,t,r))>=0&&o!==i&&o!==n;)i=o;return o}_step(t,r,i){const{inedges:n,hull:o,_hullIndex:a,halfedges:s,triangles:c,points:l}=this;if(n[t]===-1||!l.length)return(t+1)%(l.length>>1);let u=t,f=xr(r-l[t*2],2)+xr(i-l[t*2+1],2);const d=n[t];let h=d;do{let p=c[h];const g=xr(r-l[p*2],2)+xr(i-l[p*2+1],2);if(g<f&&(f=g,u=p),h=h%3===2?h-2:h+1,c[h]!==t)break;if(h=s[h],h===-1){if(h=o[(a[t]+1)%o.length],h!==p&&xr(r-l[h*2],2)+xr(i-l[h*2+1],2)<f)return h;break}}while(h!==d);return u}render(t){const r=t==null?t=new Bn:void 0,{points:i,halfedges:n,triangles:o}=this;for(let a=0,s=n.length;a<s;++a){const c=n[a];if(c<a)continue;const l=o[a]*2,u=o[c]*2;t.moveTo(i[l],i[l+1]),t.lineTo(i[u],i[u+1])}return this.renderHull(t),r&&r.value()}renderPoints(t,r){r===void 0&&(!t||typeof t.moveTo!="function")&&(r=t,t=null),r=r==null?2:+r;const i=t==null?t=new Bn:void 0,{points:n}=this;for(let o=0,a=n.length;o<a;o+=2){const s=n[o],c=n[o+1];t.moveTo(s+r,c),t.arc(s,c,r,0,LE)}return i&&i.value()}renderHull(t){const r=t==null?t=new Bn:void 0,{hull:i,points:n}=this,o=i[0]*2,a=i.length;t.moveTo(n[o],n[o+1]);for(let s=1;s<a;++s){const c=2*i[s];t.lineTo(n[c],n[c+1])}return t.closePath(),r&&r.value()}hullPolygon(){const t=new Kc;return this.renderHull(t),t.value()}renderTriangle(t,r){const i=r==null?r=new Bn:void 0,{points:n,triangles:o}=this,a=o[t*=3]*2,s=o[t+1]*2,c=o[t+2]*2;return r.moveTo(n[a],n[a+1]),r.lineTo(n[s],n[s+1]),r.lineTo(n[c],n[c+1]),r.closePath(),i&&i.value()}*trianglePolygons(){const{triangles:t}=this;for(let r=0,i=t.length/3;r<i;++r)yield this.trianglePolygon(r)}trianglePolygon(t){const r=new Kc;return this.renderTriangle(t,r),r.value()}}function WE(e,t,r,i){const n=e.length,o=new Float64Array(n*2);for(let a=0;a<n;++a){const s=e[a];o[a*2]=t.call(i,s,a,e),o[a*2+1]=r.call(i,s,a,e)}return o}function*qE(e,t,r,i){let n=0;for(const o of e)yield t.call(i,o,n,e),yield r.call(i,o,n,e),++n}var Lh={},Hl={},Xl=34,yi=10,Jl=13;function Xv(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function GE(e,t){var r=Xv(e);return function(i,n){return t(r(i),n,e)}}function Fh(e){var t=Object.create(null),r=[];return e.forEach(function(i){for(var n in i)n in t||r.push(t[n]=n)}),r}function it(e,t){var r=e+"",i=r.length;return i<t?new Array(t-i+1).join(0)+r:r}function YE(e){return e<0?"-"+it(-e,6):e>9999?"+"+it(e,6):it(e,4)}function HE(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),i=e.getUTCSeconds(),n=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":YE(e.getUTCFullYear())+"-"+it(e.getUTCMonth()+1,2)+"-"+it(e.getUTCDate(),2)+(n?"T"+it(t,2)+":"+it(r,2)+":"+it(i,2)+"."+it(n,3)+"Z":i?"T"+it(t,2)+":"+it(r,2)+":"+it(i,2)+"Z":r||t?"T"+it(t,2)+":"+it(r,2)+"Z":"")}function Ls(e){var t=new RegExp('["'+e+`
|
|
12
|
+
\r]`),r=e.charCodeAt(0);function i(f,d){var h,p,g=n(f,function(v,b){if(h)return h(v,b-1);p=v,h=d?GE(v,d):Xv(v)});return g.columns=p||[],g}function n(f,d){var h=[],p=f.length,g=0,v=0,b,_=p<=0,x=!1;f.charCodeAt(p-1)===yi&&--p,f.charCodeAt(p-1)===Jl&&--p;function y(){if(_)return Hl;if(x)return x=!1,Lh;var S,k=g,N;if(f.charCodeAt(k)===Xl){for(;g++<p&&f.charCodeAt(g)!==Xl||f.charCodeAt(++g)===Xl;);return(S=g)>=p?_=!0:(N=f.charCodeAt(g++))===yi?x=!0:N===Jl&&(x=!0,f.charCodeAt(g)===yi&&++g),f.slice(k+1,S-1).replace(/""/g,'"')}for(;g<p;){if((N=f.charCodeAt(S=g++))===yi)x=!0;else if(N===Jl)x=!0,f.charCodeAt(g)===yi&&++g;else if(N!==r)continue;return f.slice(k,S)}return _=!0,f.slice(k,p)}for(;(b=y())!==Hl;){for(var w=[];b!==Lh&&b!==Hl;)w.push(b),b=y();d&&(w=d(w,v++))==null||h.push(w)}return h}function o(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(e)})}function a(f,d){return d==null&&(d=Fh(f)),[d.map(u).join(e)].concat(o(f,d)).join(`
|
|
13
|
+
`)}function s(f,d){return d==null&&(d=Fh(f)),o(f,d).join(`
|
|
14
|
+
`)}function c(f){return f.map(l).join(`
|
|
15
|
+
`)}function l(f){return f.map(u).join(e)}function u(f){return f==null?"":f instanceof Date?HE(f):t.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:i,parseRows:n,format:a,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}var cr=Ls(","),Jv=cr.parse,XE=cr.parseRows,JE=cr.format,KE=cr.formatBody,QE=cr.formatRows,e3=cr.formatRow,t3=cr.formatValue,ur=Ls(" "),Kv=ur.parse,n3=ur.parseRows,r3=ur.format,i3=ur.formatBody,o3=ur.formatRows,a3=ur.formatRow,s3=ur.formatValue;function l3(e){for(var t in e){var r=e[t].trim(),i,n;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(i=+r))r=i;else if(n=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))c3&&n[4]&&!n[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;e[t]=r}return e}const c3=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function u3(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function f3(e,t){return fetch(e,t).then(u3)}function d3(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function h3(e,t){return fetch(e,t).then(d3)}function m3(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function Fs(e,t){return fetch(e,t).then(m3)}function Qv(e){return function(t,r,i){return arguments.length===2&&typeof r=="function"&&(i=r,r=void 0),Fs(t,r).then(function(n){return e(n,i)})}}function g3(e,t,r,i){arguments.length===3&&typeof r=="function"&&(i=r,r=void 0);var n=Ls(e);return Fs(t,r).then(function(o){return n.parse(o,i)})}var p3=Qv(Jv),v3=Qv(Kv);function b3(e,t){return new Promise(function(r,i){var n=new Image;for(var o in t)n[o]=t[o];n.onerror=i,n.onload=function(){r(n)},n.src=e})}function y3(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function _3(e,t){return fetch(e,t).then(y3)}function df(e){return(t,r)=>Fs(t,r).then(i=>new DOMParser().parseFromString(i,e))}const x3=df("application/xml");var w3=df("text/html"),$3=df("image/svg+xml");function S3(e,t){var r,i=1;e==null&&(e=0),t==null&&(t=0);function n(){var o,a=r.length,s,c=0,l=0;for(o=0;o<a;++o)s=r[o],c+=s.x,l+=s.y;for(c=(c/a-e)*i,l=(l/a-t)*i,o=0;o<a;++o)s=r[o],s.x-=c,s.y-=l}return n.initialize=function(o){r=o},n.x=function(o){return arguments.length?(e=+o,n):e},n.y=function(o){return arguments.length?(t=+o,n):t},n.strength=function(o){return arguments.length?(i=+o,n):i},n}function k3(e){const t=+this._x.call(null,e),r=+this._y.call(null,e);return e0(this.cover(t,r),t,r,e)}function e0(e,t,r,i){if(isNaN(t)||isNaN(r))return e;var n,o=e._root,a={data:i},s=e._x0,c=e._y0,l=e._x1,u=e._y1,f,d,h,p,g,v,b,_;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(f=(s+l)/2))?s=f:l=f,(v=r>=(d=(c+u)/2))?c=d:u=d,n=o,!(o=o[b=v<<1|g]))return n[b]=a,e;if(h=+e._x.call(null,o.data),p=+e._y.call(null,o.data),t===h&&r===p)return a.next=o,n?n[b]=a:e._root=a,e;do n=n?n[b]=new Array(4):e._root=new Array(4),(g=t>=(f=(s+l)/2))?s=f:l=f,(v=r>=(d=(c+u)/2))?c=d:u=d;while((b=v<<1|g)===(_=(p>=d)<<1|h>=f));return n[_]=o,n[b]=a,e}function I3(e){var t,r,i=e.length,n,o,a=new Array(i),s=new Array(i),c=1/0,l=1/0,u=-1/0,f=-1/0;for(r=0;r<i;++r)isNaN(n=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=n,s[r]=o,n<c&&(c=n),n>u&&(u=n),o<l&&(l=o),o>f&&(f=o));if(c>u||l>f)return this;for(this.cover(c,l).cover(u,f),r=0;r<i;++r)e0(this,a[r],s[r],e[r]);return this}function N3(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,i=this._y0,n=this._x1,o=this._y1;if(isNaN(r))n=(r=Math.floor(e))+1,o=(i=Math.floor(t))+1;else{for(var a=n-r||1,s=this._root,c,l;r>e||e>=n||i>t||t>=o;)switch(l=(t<i)<<1|e<r,c=new Array(4),c[l]=s,s=c,a*=2,l){case 0:n=r+a,o=i+a;break;case 1:r=n-a,o=i+a;break;case 2:n=r+a,i=o-a;break;case 3:r=n-a,i=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=r,this._y0=i,this._x1=n,this._y1=o,this}function E3(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function M3(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Je(e,t,r,i,n){this.node=e,this.x0=t,this.y0=r,this.x1=i,this.y1=n}function T3(e,t,r){var i,n=this._x0,o=this._y0,a,s,c,l,u=this._x1,f=this._y1,d=[],h=this._root,p,g;for(h&&d.push(new Je(h,n,o,u,f)),r==null?r=1/0:(n=e-r,o=t-r,u=e+r,f=t+r,r*=r);p=d.pop();)if(!(!(h=p.node)||(a=p.x0)>u||(s=p.y0)>f||(c=p.x1)<n||(l=p.y1)<o))if(h.length){var v=(a+c)/2,b=(s+l)/2;d.push(new Je(h[3],v,b,c,l),new Je(h[2],a,b,v,l),new Je(h[1],v,s,c,b),new Je(h[0],a,s,v,b)),(g=(t>=b)<<1|e>=v)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-g],d[d.length-1-g]=p)}else{var _=e-+this._x.call(null,h.data),x=t-+this._y.call(null,h.data),y=_*_+x*x;if(y<r){var w=Math.sqrt(r=y);n=e-w,o=t-w,u=e+w,f=t+w,i=h.data}}return i}function C3(e){if(isNaN(u=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,r=this._root,i,n,o,a=this._x0,s=this._y0,c=this._x1,l=this._y1,u,f,d,h,p,g,v,b;if(!r)return this;if(r.length)for(;;){if((p=u>=(d=(a+c)/2))?a=d:c=d,(g=f>=(h=(s+l)/2))?s=h:l=h,t=r,!(r=r[v=g<<1|p]))return this;if(!r.length)break;(t[v+1&3]||t[v+2&3]||t[v+3&3])&&(i=t,b=v)}for(;r.data!==e;)if(n=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,n?(o?n.next=o:delete n.next,this):t?(o?t[v]=o:delete t[v],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(i?i[b]=r:this._root=r),this):(this._root=o,this)}function A3(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function j3(){return this._root}function P3(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function O3(e){var t=[],r,i=this._root,n,o,a,s,c;for(i&&t.push(new Je(i,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(i=r.node,o=r.x0,a=r.y0,s=r.x1,c=r.y1)&&i.length){var l=(o+s)/2,u=(a+c)/2;(n=i[3])&&t.push(new Je(n,l,u,s,c)),(n=i[2])&&t.push(new Je(n,o,u,l,c)),(n=i[1])&&t.push(new Je(n,l,a,s,u)),(n=i[0])&&t.push(new Je(n,o,a,l,u))}return this}function R3(e){var t=[],r=[],i;for(this._root&&t.push(new Je(this._root,this._x0,this._y0,this._x1,this._y1));i=t.pop();){var n=i.node;if(n.length){var o,a=i.x0,s=i.y0,c=i.x1,l=i.y1,u=(a+c)/2,f=(s+l)/2;(o=n[0])&&t.push(new Je(o,a,s,u,f)),(o=n[1])&&t.push(new Je(o,u,s,c,f)),(o=n[2])&&t.push(new Je(o,a,f,u,l)),(o=n[3])&&t.push(new Je(o,u,f,c,l))}r.push(i)}for(;i=r.pop();)e(i.node,i.x0,i.y0,i.x1,i.y1);return this}function D3(e){return e[0]}function U3(e){return arguments.length?(this._x=e,this):this._x}function z3(e){return e[1]}function L3(e){return arguments.length?(this._y=e,this):this._y}function Zs(e,t,r){var i=new hf(t??D3,r??z3,NaN,NaN,NaN,NaN);return e==null?i:i.addAll(e)}function hf(e,t,r,i,n,o){this._x=e,this._y=t,this._x0=r,this._y0=i,this._x1=n,this._y1=o,this._root=void 0}function Zh(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var rt=Zs.prototype=hf.prototype;rt.copy=function(){var e=new hf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,i;if(!t)return e;if(!t.length)return e._root=Zh(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var n=0;n<4;++n)(i=t.source[n])&&(i.length?r.push({source:i,target:t.target[n]=new Array(4)}):t.target[n]=Zh(i));return e};rt.add=k3;rt.addAll=I3;rt.cover=N3;rt.data=E3;rt.extent=M3;rt.find=T3;rt.remove=C3;rt.removeAll=A3;rt.root=j3;rt.size=P3;rt.visit=O3;rt.visitAfter=R3;rt.x=U3;rt.y=L3;function Te(e){return function(){return e}}function wn(e){return(e()-.5)*1e-6}function F3(e){return e.x+e.vx}function Z3(e){return e.y+e.vy}function B3(e){var t,r,i,n=1,o=1;typeof e!="function"&&(e=Te(e==null?1:+e));function a(){for(var l,u=t.length,f,d,h,p,g,v,b=0;b<o;++b)for(f=Zs(t,F3,Z3).visitAfter(s),l=0;l<u;++l)d=t[l],g=r[d.index],v=g*g,h=d.x+d.vx,p=d.y+d.vy,f.visit(_);function _(x,y,w,S,k){var N=x.data,C=x.r,j=g+C;if(N){if(N.index>d.index){var M=h-N.x-N.vx,D=p-N.y-N.vy,O=M*M+D*D;O<j*j&&(M===0&&(M=wn(i),O+=M*M),D===0&&(D=wn(i),O+=D*D),O=(j-(O=Math.sqrt(O)))/O*n,d.vx+=(M*=O)*(j=(C*=C)/(v+C)),d.vy+=(D*=O)*j,N.vx-=M*(j=1-j),N.vy-=D*j)}return}return y>h+j||S<h-j||w>p+j||k<p-j}}function s(l){if(l.data)return l.r=r[l.data.index];for(var u=l.r=0;u<4;++u)l[u]&&l[u].r>l.r&&(l.r=l[u].r)}function c(){if(t){var l,u=t.length,f;for(r=new Array(u),l=0;l<u;++l)f=t[l],r[f.index]=+e(f,l,t)}}return a.initialize=function(l,u){t=l,i=u,c()},a.iterations=function(l){return arguments.length?(o=+l,a):o},a.strength=function(l){return arguments.length?(n=+l,a):n},a.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Te(+l),c(),a):e},a}function V3(e){return e.index}function Bh(e,t){var r=e.get(t);if(!r)throw new Error("node not found: "+t);return r}function W3(e){var t=V3,r=f,i,n=Te(30),o,a,s,c,l,u=1;e==null&&(e=[]);function f(v){return 1/Math.min(s[v.source.index],s[v.target.index])}function d(v){for(var b=0,_=e.length;b<u;++b)for(var x=0,y,w,S,k,N,C,j;x<_;++x)y=e[x],w=y.source,S=y.target,k=S.x+S.vx-w.x-w.vx||wn(l),N=S.y+S.vy-w.y-w.vy||wn(l),C=Math.sqrt(k*k+N*N),C=(C-o[x])/C*v*i[x],k*=C,N*=C,S.vx-=k*(j=c[x]),S.vy-=N*j,w.vx+=k*(j=1-j),w.vy+=N*j}function h(){if(a){var v,b=a.length,_=e.length,x=new Map(a.map((w,S)=>[t(w,S,a),w])),y;for(v=0,s=new Array(b);v<_;++v)y=e[v],y.index=v,typeof y.source!="object"&&(y.source=Bh(x,y.source)),typeof y.target!="object"&&(y.target=Bh(x,y.target)),s[y.source.index]=(s[y.source.index]||0)+1,s[y.target.index]=(s[y.target.index]||0)+1;for(v=0,c=new Array(_);v<_;++v)y=e[v],c[v]=s[y.source.index]/(s[y.source.index]+s[y.target.index]);i=new Array(_),p(),o=new Array(_),g()}}function p(){if(a)for(var v=0,b=e.length;v<b;++v)i[v]=+r(e[v],v,e)}function g(){if(a)for(var v=0,b=e.length;v<b;++v)o[v]=+n(e[v],v,e)}return d.initialize=function(v,b){a=v,l=b,h()},d.links=function(v){return arguments.length?(e=v,h(),d):e},d.id=function(v){return arguments.length?(t=v,d):t},d.iterations=function(v){return arguments.length?(u=+v,d):u},d.strength=function(v){return arguments.length?(r=typeof v=="function"?v:Te(+v),p(),d):r},d.distance=function(v){return arguments.length?(n=typeof v=="function"?v:Te(+v),g(),d):n},d}const q3=1664525,G3=1013904223,Vh=4294967296;function Y3(){let e=1;return()=>(e=(q3*e+G3)%Vh)/Vh}function H3(e){return e.x}function X3(e){return e.y}var J3=10,K3=Math.PI*(3-Math.sqrt(5));function Q3(e){var t,r=1,i=.001,n=1-Math.pow(i,1/300),o=0,a=.6,s=new Map,c=Us(f),l=sr("tick","end"),u=Y3();e==null&&(e=[]);function f(){d(),l.call("tick",t),r<i&&(c.stop(),l.call("end",t))}function d(g){var v,b=e.length,_;g===void 0&&(g=1);for(var x=0;x<g;++x)for(r+=(o-r)*n,s.forEach(function(y){y(r)}),v=0;v<b;++v)_=e[v],_.fx==null?_.x+=_.vx*=a:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=a:(_.y=_.fy,_.vy=0);return t}function h(){for(var g=0,v=e.length,b;g<v;++g){if(b=e[g],b.index=g,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var _=J3*Math.sqrt(.5+g),x=g*K3;b.x=_*Math.cos(x),b.y=_*Math.sin(x)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function p(g){return g.initialize&&g.initialize(e,u),g}return h(),t={tick:d,restart:function(){return c.restart(f),t},stop:function(){return c.stop(),t},nodes:function(g){return arguments.length?(e=g,h(),s.forEach(p),t):e},alpha:function(g){return arguments.length?(r=+g,t):r},alphaMin:function(g){return arguments.length?(i=+g,t):i},alphaDecay:function(g){return arguments.length?(n=+g,t):+n},alphaTarget:function(g){return arguments.length?(o=+g,t):o},velocityDecay:function(g){return arguments.length?(a=1-g,t):1-a},randomSource:function(g){return arguments.length?(u=g,s.forEach(p),t):u},force:function(g,v){return arguments.length>1?(v==null?s.delete(g):s.set(g,p(v)),t):s.get(g)},find:function(g,v,b){var _=0,x=e.length,y,w,S,k,N;for(b==null?b=1/0:b*=b,_=0;_<x;++_)k=e[_],y=g-k.x,w=v-k.y,S=y*y+w*w,S<b&&(N=k,b=S);return N},on:function(g,v){return arguments.length>1?(l.on(g,v),t):l.on(g)}}}function e5(){var e,t,r,i,n=Te(-30),o,a=1,s=1/0,c=.81;function l(h){var p,g=e.length,v=Zs(e,H3,X3).visitAfter(f);for(i=h,p=0;p<g;++p)t=e[p],v.visit(d)}function u(){if(e){var h,p=e.length,g;for(o=new Array(p),h=0;h<p;++h)g=e[h],o[g.index]=+n(g,h,e)}}function f(h){var p=0,g,v,b=0,_,x,y;if(h.length){for(_=x=y=0;y<4;++y)(g=h[y])&&(v=Math.abs(g.value))&&(p+=g.value,b+=v,_+=v*g.x,x+=v*g.y);h.x=_/b,h.y=x/b}else{g=h,g.x=g.data.x,g.y=g.data.y;do p+=o[g.data.index];while(g=g.next)}h.value=p}function d(h,p,g,v){if(!h.value)return!0;var b=h.x-t.x,_=h.y-t.y,x=v-p,y=b*b+_*_;if(x*x/c<y)return y<s&&(b===0&&(b=wn(r),y+=b*b),_===0&&(_=wn(r),y+=_*_),y<a&&(y=Math.sqrt(a*y)),t.vx+=b*h.value*i/y,t.vy+=_*h.value*i/y),!0;if(h.length||y>=s)return;(h.data!==t||h.next)&&(b===0&&(b=wn(r),y+=b*b),_===0&&(_=wn(r),y+=_*_),y<a&&(y=Math.sqrt(a*y)));do h.data!==t&&(x=o[h.data.index]*i/y,t.vx+=b*x,t.vy+=_*x);while(h=h.next)}return l.initialize=function(h,p){e=h,r=p,u()},l.strength=function(h){return arguments.length?(n=typeof h=="function"?h:Te(+h),u(),l):n},l.distanceMin=function(h){return arguments.length?(a=h*h,l):Math.sqrt(a)},l.distanceMax=function(h){return arguments.length?(s=h*h,l):Math.sqrt(s)},l.theta=function(h){return arguments.length?(c=h*h,l):Math.sqrt(c)},l}function t5(e,t,r){var i,n=Te(.1),o,a;typeof e!="function"&&(e=Te(+e)),t==null&&(t=0),r==null&&(r=0);function s(l){for(var u=0,f=i.length;u<f;++u){var d=i[u],h=d.x-t||1e-6,p=d.y-r||1e-6,g=Math.sqrt(h*h+p*p),v=(a[u]-g)*o[u]*l/g;d.vx+=h*v,d.vy+=p*v}}function c(){if(i){var l,u=i.length;for(o=new Array(u),a=new Array(u),l=0;l<u;++l)a[l]=+e(i[l],l,i),o[l]=isNaN(a[l])?0:+n(i[l],l,i)}}return s.initialize=function(l){i=l,c()},s.strength=function(l){return arguments.length?(n=typeof l=="function"?l:Te(+l),c(),s):n},s.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Te(+l),c(),s):e},s.x=function(l){return arguments.length?(t=+l,s):t},s.y=function(l){return arguments.length?(r=+l,s):r},s}function n5(e){var t=Te(.1),r,i,n;typeof e!="function"&&(e=Te(e==null?0:+e));function o(s){for(var c=0,l=r.length,u;c<l;++c)u=r[c],u.vx+=(n[c]-u.x)*i[c]*s}function a(){if(r){var s,c=r.length;for(i=new Array(c),n=new Array(c),s=0;s<c;++s)i[s]=isNaN(n[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Te(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Te(+s),a(),o):e},o}function r5(e){var t=Te(.1),r,i,n;typeof e!="function"&&(e=Te(e==null?0:+e));function o(s){for(var c=0,l=r.length,u;c<l;++c)u=r[c],u.vy+=(n[c]-u.y)*i[c]*s}function a(){if(r){var s,c=r.length;for(i=new Array(c),n=new Array(c),s=0;s<c;++s)i[s]=isNaN(n[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Te(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Te(+s),a(),o):e},o}function i5(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Za(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function qr(e){return e=Za(Math.abs(e)),e?e[1]:NaN}function o5(e,t){return function(r,i){for(var n=r.length,o=[],a=0,s=e[0],c=0;n>0&&s>0&&(c+s+1>i&&(s=Math.max(1,i-c)),o.push(r.substring(n-=s,n+s)),!((c+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function a5(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var s5=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Gr(e){if(!(t=s5.exec(e)))throw new Error("invalid format: "+e);var t;return new Bs({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Gr.prototype=Bs.prototype;function Bs(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Bs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function l5(e){e:for(var t=e.length,r=1,i=-1,n;r<t;++r)switch(e[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+e[r])break e;i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}var t0;function c5(e,t){var r=Za(e,t);if(!r)return e+"";var i=r[0],n=r[1],o=n-(t0=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Za(e,Math.max(0,t+o-1))[0]}function Wh(e,t){var r=Za(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const qh={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:i5,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Wh(e*100,t),r:Wh,s:c5,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Gh(e){return e}var Yh=Array.prototype.map,Hh=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function n0(e){var t=e.grouping===void 0||e.thousands===void 0?Gh:o5(Yh.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Gh:a5(Yh.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Gr(f);var d=f.fill,h=f.align,p=f.sign,g=f.symbol,v=f.zero,b=f.width,_=f.comma,x=f.precision,y=f.trim,w=f.type;w==="n"?(_=!0,w="g"):qh[w]||(x===void 0&&(x=12),y=!0,w="g"),(v||d==="0"&&h==="=")&&(v=!0,d="0",h="=");var S=g==="$"?r:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k=g==="$"?i:/[%p]/.test(w)?a:"",N=qh[w],C=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function j(M){var D=S,O=k,I,A,T;if(w==="c")O=N(M)+O,M="";else{M=+M;var R=M<0||1/M<0;if(M=isNaN(M)?c:N(Math.abs(M),x),y&&(M=l5(M)),R&&+M==0&&p!=="+"&&(R=!1),D=(R?p==="("?p:s:p==="-"||p==="("?"":p)+D,O=(w==="s"?Hh[8+t0/3]:"")+O+(R&&p==="("?")":""),C){for(I=-1,A=M.length;++I<A;)if(T=M.charCodeAt(I),48>T||T>57){O=(T===46?n+M.slice(I+1):M.slice(I))+O,M=M.slice(0,I);break}}}_&&!v&&(M=t(M,1/0));var P=D.length+M.length+O.length,U=P<b?new Array(b-P+1).join(d):"";switch(_&&v&&(M=t(U+M,U.length?b-O.length:1/0),U=""),h){case"<":M=D+M+O+U;break;case"=":M=D+U+M+O;break;case"^":M=U.slice(0,P=U.length>>1)+D+M+O+U.slice(P);break;default:M=U+D+M+O;break}return o(M)}return j.toString=function(){return f+""},j}function u(f,d){var h=l((f=Gr(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(qr(d)/3)))*3,g=Math.pow(10,-p),v=Hh[8+p/3];return function(b){return h(g*b)+v}}return{format:l,formatPrefix:u}}var Vo,Vs,mf;r0({thousands:",",grouping:[3],currency:["$",""]});function r0(e){return Vo=n0(e),Vs=Vo.format,mf=Vo.formatPrefix,Vo}function i0(e){return Math.max(0,-qr(Math.abs(e)))}function o0(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qr(t)/3)))*3-qr(Math.abs(e)))}function a0(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qr(t)-qr(e))+1}var X=1e-6,oo=1e-12,ce=Math.PI,ke=ce/2,Ba=ce/4,et=ce*2,ge=180/ce,J=ce/180,ue=Math.abs,ci=Math.atan,tt=Math.atan2,Y=Math.cos,Wo=Math.ceil,s0=Math.exp,Qc=Math.hypot,Va=Math.log,Kl=Math.pow,B=Math.sin,bt=Math.sign||function(e){return e>0?1:e<0?-1:0},Re=Math.sqrt,gf=Math.tan;function l0(e){return e>1?0:e<-1?ce:Math.acos(e)}function nt(e){return e>1?ke:e<-1?-ke:Math.asin(e)}function Xh(e){return(e=B(e/2))*e}function xe(){}function Wa(e,t){e&&Kh.hasOwnProperty(e.type)&&Kh[e.type](e,t)}var Jh={Feature:function(e,t){Wa(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i<n;)Wa(r[i].geometry,t)}},Kh={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,i=-1,n=r.length;++i<n;)e=r[i],t.point(e[0],e[1],e[2])},LineString:function(e,t){eu(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,i=-1,n=r.length;++i<n;)eu(r[i],t,0)},Polygon:function(e,t){Qh(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,i=-1,n=r.length;++i<n;)Qh(r[i],t)},GeometryCollection:function(e,t){for(var r=e.geometries,i=-1,n=r.length;++i<n;)Wa(r[i],t)}};function eu(e,t,r){var i=-1,n=e.length-r,o;for(t.lineStart();++i<n;)o=e[i],t.point(o[0],o[1],o[2]);t.lineEnd()}function Qh(e,t){var r=-1,i=e.length;for(t.polygonStart();++r<i;)eu(e[r],t,1);t.polygonEnd()}function kt(e,t){e&&Jh.hasOwnProperty(e.type)?Jh[e.type](e,t):Wa(e,t)}var qa=new Ce,Ga=new Ce,c0,u0,tu,nu,ru,Bt={point:xe,lineStart:xe,lineEnd:xe,polygonStart:function(){qa=new Ce,Bt.lineStart=u5,Bt.lineEnd=f5},polygonEnd:function(){var e=+qa;Ga.add(e<0?et+e:e),this.lineStart=this.lineEnd=this.point=xe},sphere:function(){Ga.add(et)}};function u5(){Bt.point=d5}function f5(){f0(c0,u0)}function d5(e,t){Bt.point=f0,c0=e,u0=t,e*=J,t*=J,tu=e,nu=Y(t=t/2+Ba),ru=B(t)}function f0(e,t){e*=J,t*=J,t=t/2+Ba;var r=e-tu,i=r>=0?1:-1,n=i*r,o=Y(t),a=B(t),s=ru*a,c=nu*o+s*Y(n),l=s*i*B(n);qa.add(tt(l,c)),tu=e,nu=o,ru=a}function h5(e){return Ga=new Ce,kt(e,Bt),Ga*2}function Ya(e){return[tt(e[1],e[0]),nt(e[2])]}function Qn(e){var t=e[0],r=e[1],i=Y(r);return[i*Y(t),i*B(t),B(r)]}function qo(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Yr(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Ql(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Go(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Ha(e){var t=Re(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var _e,at,Se,ut,Ln,d0,h0,Or,Zi,_n,cn,tn={point:iu,lineStart:em,lineEnd:tm,polygonStart:function(){tn.point=g0,tn.lineStart=m5,tn.lineEnd=g5,Zi=new Ce,Bt.polygonStart()},polygonEnd:function(){Bt.polygonEnd(),tn.point=iu,tn.lineStart=em,tn.lineEnd=tm,qa<0?(_e=-(Se=180),at=-(ut=90)):Zi>X?ut=90:Zi<-X&&(at=-90),cn[0]=_e,cn[1]=Se},sphere:function(){_e=-(Se=180),at=-(ut=90)}};function iu(e,t){_n.push(cn=[_e=e,Se=e]),t<at&&(at=t),t>ut&&(ut=t)}function m0(e,t){var r=Qn([e*J,t*J]);if(Or){var i=Yr(Or,r),n=[i[1],-i[0],0],o=Yr(n,i);Ha(o),o=Ya(o);var a=e-Ln,s=a>0?1:-1,c=o[0]*ge*s,l,u=ue(a)>180;u^(s*Ln<c&&c<s*e)?(l=o[1]*ge,l>ut&&(ut=l)):(c=(c+360)%360-180,u^(s*Ln<c&&c<s*e)?(l=-o[1]*ge,l<at&&(at=l)):(t<at&&(at=t),t>ut&&(ut=t))),u?e<Ln?lt(_e,e)>lt(_e,Se)&&(Se=e):lt(e,Se)>lt(_e,Se)&&(_e=e):Se>=_e?(e<_e&&(_e=e),e>Se&&(Se=e)):e>Ln?lt(_e,e)>lt(_e,Se)&&(Se=e):lt(e,Se)>lt(_e,Se)&&(_e=e)}else _n.push(cn=[_e=e,Se=e]);t<at&&(at=t),t>ut&&(ut=t),Or=r,Ln=e}function em(){tn.point=m0}function tm(){cn[0]=_e,cn[1]=Se,tn.point=iu,Or=null}function g0(e,t){if(Or){var r=e-Ln;Zi.add(ue(r)>180?r+(r>0?360:-360):r)}else d0=e,h0=t;Bt.point(e,t),m0(e,t)}function m5(){Bt.lineStart()}function g5(){g0(d0,h0),Bt.lineEnd(),ue(Zi)>X&&(_e=-(Se=180)),cn[0]=_e,cn[1]=Se,Or=null}function lt(e,t){return(t-=e)<0?t+360:t}function p5(e,t){return e[0]-t[0]}function nm(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function v5(e){var t,r,i,n,o,a,s;if(ut=Se=-(_e=at=1/0),_n=[],kt(e,tn),r=_n.length){for(_n.sort(p5),t=1,i=_n[0],o=[i];t<r;++t)n=_n[t],nm(i,n[0])||nm(i,n[1])?(lt(i[0],n[1])>lt(i[0],i[1])&&(i[1]=n[1]),lt(n[0],i[1])>lt(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(a=-1/0,r=o.length-1,t=0,i=o[r];t<=r;i=n,++t)n=o[t],(s=lt(i[1],n[0]))>a&&(a=s,_e=n[0],Se=i[1])}return _n=cn=null,_e===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[_e,at],[Se,ut]]}var Ci,Xa,Ja,Ka,Qa,es,ts,ns,ou,au,su,p0,v0,Ye,He,Xe,It={sphere:xe,point:pf,lineStart:rm,lineEnd:im,polygonStart:function(){It.lineStart=_5,It.lineEnd=x5},polygonEnd:function(){It.lineStart=rm,It.lineEnd=im}};function pf(e,t){e*=J,t*=J;var r=Y(t);xo(r*Y(e),r*B(e),B(t))}function xo(e,t,r){++Ci,Ja+=(e-Ja)/Ci,Ka+=(t-Ka)/Ci,Qa+=(r-Qa)/Ci}function rm(){It.point=b5}function b5(e,t){e*=J,t*=J;var r=Y(t);Ye=r*Y(e),He=r*B(e),Xe=B(t),It.point=y5,xo(Ye,He,Xe)}function y5(e,t){e*=J,t*=J;var r=Y(t),i=r*Y(e),n=r*B(e),o=B(t),a=tt(Re((a=He*o-Xe*n)*a+(a=Xe*i-Ye*o)*a+(a=Ye*n-He*i)*a),Ye*i+He*n+Xe*o);Xa+=a,es+=a*(Ye+(Ye=i)),ts+=a*(He+(He=n)),ns+=a*(Xe+(Xe=o)),xo(Ye,He,Xe)}function im(){It.point=pf}function _5(){It.point=w5}function x5(){b0(p0,v0),It.point=pf}function w5(e,t){p0=e,v0=t,e*=J,t*=J,It.point=b0;var r=Y(t);Ye=r*Y(e),He=r*B(e),Xe=B(t),xo(Ye,He,Xe)}function b0(e,t){e*=J,t*=J;var r=Y(t),i=r*Y(e),n=r*B(e),o=B(t),a=He*o-Xe*n,s=Xe*i-Ye*o,c=Ye*n-He*i,l=Qc(a,s,c),u=nt(l),f=l&&-u/l;ou.add(f*a),au.add(f*s),su.add(f*c),Xa+=u,es+=u*(Ye+(Ye=i)),ts+=u*(He+(He=n)),ns+=u*(Xe+(Xe=o)),xo(Ye,He,Xe)}function $5(e){Ci=Xa=Ja=Ka=Qa=es=ts=ns=0,ou=new Ce,au=new Ce,su=new Ce,kt(e,It);var t=+ou,r=+au,i=+su,n=Qc(t,r,i);return n<oo&&(t=es,r=ts,i=ns,Xa<X&&(t=Ja,r=Ka,i=Qa),n=Qc(t,r,i),n<oo)?[NaN,NaN]:[tt(r,t)*ge,nt(i/n)*ge]}function wr(e){return function(){return e}}function lu(e,t){function r(i,n){return i=e(i,n),t(i[0],i[1])}return e.invert&&t.invert&&(r.invert=function(i,n){return i=t.invert(i,n),i&&e.invert(i[0],i[1])}),r}function cu(e,t){return ue(e)>ce&&(e-=Math.round(e/et)*et),[e,t]}cu.invert=cu;function vf(e,t,r){return(e%=et)?t||r?lu(am(e),sm(t,r)):am(e):t||r?sm(t,r):cu}function om(e){return function(t,r){return t+=e,ue(t)>ce&&(t-=Math.round(t/et)*et),[t,r]}}function am(e){var t=om(e);return t.invert=om(-e),t}function sm(e,t){var r=Y(e),i=B(e),n=Y(t),o=B(t);function a(s,c){var l=Y(c),u=Y(s)*l,f=B(s)*l,d=B(c),h=d*r+u*i;return[tt(f*n-h*o,u*r-d*i),nt(h*n+f*o)]}return a.invert=function(s,c){var l=Y(c),u=Y(s)*l,f=B(s)*l,d=B(c),h=d*n-f*o;return[tt(f*n+d*o,u*r+h*i),nt(h*r-u*i)]},a}function y0(e){e=vf(e[0]*J,e[1]*J,e.length>2?e[2]*J:0);function t(r){return r=e(r[0]*J,r[1]*J),r[0]*=ge,r[1]*=ge,r}return t.invert=function(r){return r=e.invert(r[0]*J,r[1]*J),r[0]*=ge,r[1]*=ge,r},t}function _0(e,t,r,i,n,o){if(r){var a=Y(t),s=B(t),c=i*r;n==null?(n=t+i*et,o=t-c/2):(n=lm(a,n),o=lm(a,o),(i>0?n<o:n>o)&&(n+=i*et));for(var l,u=n;i>0?u>o:u<o;u-=c)l=Ya([a,-s*Y(u),-s*B(u)]),e.point(l[0],l[1])}}function lm(e,t){t=Qn(t),t[0]-=e,Ha(t);var r=l0(-t[1]);return((-t[2]<0?-r:r)+et-X)%et}function S5(){var e=wr([0,0]),t=wr(90),r=wr(2),i,n,o={point:a};function a(c,l){i.push(c=n(c,l)),c[0]*=ge,c[1]*=ge}function s(){var c=e.apply(this,arguments),l=t.apply(this,arguments)*J,u=r.apply(this,arguments)*J;return i=[],n=vf(-c[0]*J,-c[1]*J,0).invert,_0(o,l,u,1),c={type:"Polygon",coordinates:[i]},i=n=null,c}return s.center=function(c){return arguments.length?(e=typeof c=="function"?c:wr([+c[0],+c[1]]),s):e},s.radius=function(c){return arguments.length?(t=typeof c=="function"?c:wr(+c),s):t},s.precision=function(c){return arguments.length?(r=typeof c=="function"?c:wr(+c),s):r},s}function x0(){var e=[],t;return{point:function(r,i,n){t.push([r,i,n])},lineStart:function(){e.push(t=[])},lineEnd:xe,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function ya(e,t){return ue(e[0]-t[0])<X&&ue(e[1]-t[1])<X}function Yo(e,t,r,i){this.x=e,this.z=t,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function w0(e,t,r,i,n){var o=[],a=[],s,c;if(e.forEach(function(p){if(!((g=p.length-1)<=0)){var g,v=p[0],b=p[g],_;if(ya(v,b)){if(!v[2]&&!b[2]){for(n.lineStart(),s=0;s<g;++s)n.point((v=p[s])[0],v[1]);n.lineEnd();return}b[0]+=2*X}o.push(_=new Yo(v,p,null,!0)),a.push(_.o=new Yo(v,null,_,!1)),o.push(_=new Yo(b,p,null,!1)),a.push(_.o=new Yo(b,null,_,!0))}}),!!o.length){for(a.sort(t),cm(o),cm(a),s=0,c=a.length;s<c;++s)a[s].e=r=!r;for(var l=o[0],u,f;;){for(var d=l,h=!0;d.v;)if((d=d.n)===l)return;u=d.z,n.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(s=0,c=u.length;s<c;++s)n.point((f=u[s])[0],f[1]);else i(d.x,d.n.x,1,n);d=d.n}else{if(h)for(u=d.p.z,s=u.length-1;s>=0;--s)n.point((f=u[s])[0],f[1]);else i(d.x,d.p.x,-1,n);d=d.p}d=d.o,u=d.z,h=!h}while(!d.v);n.lineEnd()}}}function cm(e){if(t=e.length){for(var t,r=0,i=e[0],n;++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function ec(e){return ue(e[0])<=ce?e[0]:bt(e[0])*((ue(e[0])+ce)%et-ce)}function $0(e,t){var r=ec(t),i=t[1],n=B(i),o=[B(r),-Y(r),0],a=0,s=0,c=new Ce;n===1?i=ke+X:n===-1&&(i=-ke-X);for(var l=0,u=e.length;l<u;++l)if(d=(f=e[l]).length)for(var f,d,h=f[d-1],p=ec(h),g=h[1]/2+Ba,v=B(g),b=Y(g),_=0;_<d;++_,p=y,v=S,b=k,h=x){var x=f[_],y=ec(x),w=x[1]/2+Ba,S=B(w),k=Y(w),N=y-p,C=N>=0?1:-1,j=C*N,M=j>ce,D=v*S;if(c.add(tt(D*C*B(j),b*k+D*Y(j))),a+=M?N+C*et:N,M^p>=r^y>=r){var O=Yr(Qn(h),Qn(x));Ha(O);var I=Yr(o,O);Ha(I);var A=(M^N>=0?-1:1)*nt(I[2]);(i>A||i===A&&(O[0]||O[1]))&&(s+=M^N>=0?1:-1)}}return(a<-X||a<X&&c<-oo)^s&1}function S0(e,t,r,i){return function(n){var o=t(n),a=x0(),s=t(a),c=!1,l,u,f,d={point:h,lineStart:g,lineEnd:v,polygonStart:function(){d.point=b,d.lineStart=_,d.lineEnd=x,u=[],l=[]},polygonEnd:function(){d.point=h,d.lineStart=g,d.lineEnd=v,u=Vu(u);var y=$0(l,i);u.length?(c||(n.polygonStart(),c=!0),w0(u,I5,y,r,n)):y&&(c||(n.polygonStart(),c=!0),n.lineStart(),r(null,null,1,n),n.lineEnd()),c&&(n.polygonEnd(),c=!1),u=l=null},sphere:function(){n.polygonStart(),n.lineStart(),r(null,null,1,n),n.lineEnd(),n.polygonEnd()}};function h(y,w){e(y,w)&&n.point(y,w)}function p(y,w){o.point(y,w)}function g(){d.point=p,o.lineStart()}function v(){d.point=h,o.lineEnd()}function b(y,w){f.push([y,w]),s.point(y,w)}function _(){s.lineStart(),f=[]}function x(){b(f[0][0],f[0][1]),s.lineEnd();var y=s.clean(),w=a.result(),S,k=w.length,N,C,j;if(f.pop(),l.push(f),f=null,!!k){if(y&1){if(C=w[0],(N=C.length-1)>0){for(c||(n.polygonStart(),c=!0),n.lineStart(),S=0;S<N;++S)n.point((j=C[S])[0],j[1]);n.lineEnd()}return}k>1&&y&2&&w.push(w.pop().concat(w.shift())),u.push(w.filter(k5))}}return d}}function k5(e){return e.length>1}function I5(e,t){return((e=e.x)[0]<0?e[1]-ke-X:ke-e[1])-((t=t.x)[0]<0?t[1]-ke-X:ke-t[1])}const uu=S0(function(){return!0},N5,M5,[-ce,-ke]);function N5(e){var t=NaN,r=NaN,i=NaN,n;return{lineStart:function(){e.lineStart(),n=1},point:function(o,a){var s=o>0?ce:-ce,c=ue(o-t);ue(c-ce)<X?(e.point(t,r=(r+a)/2>0?ke:-ke),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),n=0):i!==s&&c>=ce&&(ue(t-i)<X&&(t-=i*X),ue(o-s)<X&&(o-=s*X),r=E5(t,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),n=0),e.point(t=o,r=a),i=s},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-n}}}function E5(e,t,r,i){var n,o,a=B(e-r);return ue(a)>X?ci((B(t)*(o=Y(i))*B(r)-B(i)*(n=Y(t))*B(e))/(n*o*a)):(t+i)/2}function M5(e,t,r,i){var n;if(e==null)n=r*ke,i.point(-ce,n),i.point(0,n),i.point(ce,n),i.point(ce,0),i.point(ce,-n),i.point(0,-n),i.point(-ce,-n),i.point(-ce,0),i.point(-ce,n);else if(ue(e[0]-t[0])>X){var o=e[0]<t[0]?ce:-ce;n=r*o/2,i.point(-o,n),i.point(0,n),i.point(o,n)}else i.point(t[0],t[1])}function k0(e){var t=Y(e),r=2*J,i=t>0,n=ue(t)>X;function o(u,f,d,h){_0(h,e,r,d,u,f)}function a(u,f){return Y(u)*Y(f)>t}function s(u){var f,d,h,p,g;return{lineStart:function(){p=h=!1,g=1},point:function(v,b){var _=[v,b],x,y=a(v,b),w=i?y?0:l(v,b):y?l(v+(v<0?ce:-ce),b):0;if(!f&&(p=h=y)&&u.lineStart(),y!==h&&(x=c(f,_),(!x||ya(f,x)||ya(_,x))&&(_[2]=1)),y!==h)g=0,y?(u.lineStart(),x=c(_,f),u.point(x[0],x[1])):(x=c(f,_),u.point(x[0],x[1],2),u.lineEnd()),f=x;else if(n&&f&&i^y){var S;!(w&d)&&(S=c(_,f,!0))&&(g=0,i?(u.lineStart(),u.point(S[0][0],S[0][1]),u.point(S[1][0],S[1][1]),u.lineEnd()):(u.point(S[1][0],S[1][1]),u.lineEnd(),u.lineStart(),u.point(S[0][0],S[0][1],3)))}y&&(!f||!ya(f,_))&&u.point(_[0],_[1]),f=_,h=y,d=w},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return g|(p&&h)<<1}}}function c(u,f,d){var h=Qn(u),p=Qn(f),g=[1,0,0],v=Yr(h,p),b=qo(v,v),_=v[0],x=b-_*_;if(!x)return!d&&u;var y=t*b/x,w=-t*_/x,S=Yr(g,v),k=Go(g,y),N=Go(v,w);Ql(k,N);var C=S,j=qo(k,C),M=qo(C,C),D=j*j-M*(qo(k,k)-1);if(!(D<0)){var O=Re(D),I=Go(C,(-j-O)/M);if(Ql(I,k),I=Ya(I),!d)return I;var A=u[0],T=f[0],R=u[1],P=f[1],U;T<A&&(U=A,A=T,T=U);var L=T-A,Z=ue(L-ce)<X,G=Z||L<X;if(!Z&&P<R&&(U=R,R=P,P=U),G?Z?R+P>0^I[1]<(ue(I[0]-A)<X?R:P):R<=I[1]&&I[1]<=P:L>ce^(A<=I[0]&&I[0]<=T)){var ne=Go(C,(-j+O)/M);return Ql(ne,k),[I,Ya(ne)]}}}function l(u,f){var d=i?e:ce-e,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return S0(a,s,o,i?[0,-e]:[-ce,e-ce])}function T5(e,t,r,i,n,o){var a=e[0],s=e[1],c=t[0],l=t[1],u=0,f=1,d=c-a,h=l-s,p;if(p=r-a,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>u&&(u=p)}if(p=n-a,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<f&&(f=p)}if(p=i-s,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>u&&(u=p)}if(p=o-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<f&&(f=p)}return u>0&&(e[0]=a+u*d,e[1]=s+u*h),f<1&&(t[0]=a+f*d,t[1]=s+f*h),!0}}}}}var Ai=1e9,Ho=-Ai;function Ws(e,t,r,i){function n(l,u){return e<=l&&l<=r&&t<=u&&u<=i}function o(l,u,f,d){var h=0,p=0;if(l==null||(h=a(l,f))!==(p=a(u,f))||c(l,u)<0^f>0)do d.point(h===0||h===3?e:r,h>1?i:t);while((h=(h+f+4)%4)!==p);else d.point(u[0],u[1])}function a(l,u){return ue(l[0]-e)<X?u>0?0:3:ue(l[0]-r)<X?u>0?2:1:ue(l[1]-t)<X?u>0?1:0:u>0?3:2}function s(l,u){return c(l.x,u.x)}function c(l,u){var f=a(l,1),d=a(u,1);return f!==d?f-d:f===0?u[1]-l[1]:f===1?l[0]-u[0]:f===2?l[1]-u[1]:u[0]-l[0]}return function(l){var u=l,f=x0(),d,h,p,g,v,b,_,x,y,w,S,k={point:N,lineStart:D,lineEnd:O,polygonStart:j,polygonEnd:M};function N(A,T){n(A,T)&&u.point(A,T)}function C(){for(var A=0,T=0,R=h.length;T<R;++T)for(var P=h[T],U=1,L=P.length,Z=P[0],G,ne,ee=Z[0],oe=Z[1];U<L;++U)G=ee,ne=oe,Z=P[U],ee=Z[0],oe=Z[1],ne<=i?oe>i&&(ee-G)*(i-ne)>(oe-ne)*(e-G)&&++A:oe<=i&&(ee-G)*(i-ne)<(oe-ne)*(e-G)&&--A;return A}function j(){u=f,d=[],h=[],S=!0}function M(){var A=C(),T=S&&A,R=(d=Vu(d)).length;(T||R)&&(l.polygonStart(),T&&(l.lineStart(),o(null,null,1,l),l.lineEnd()),R&&w0(d,s,A,o,l),l.polygonEnd()),u=l,d=h=p=null}function D(){k.point=I,h&&h.push(p=[]),w=!0,y=!1,_=x=NaN}function O(){d&&(I(g,v),b&&y&&f.rejoin(),d.push(f.result())),k.point=N,y&&u.lineEnd()}function I(A,T){var R=n(A,T);if(h&&p.push([A,T]),w)g=A,v=T,b=R,w=!1,R&&(u.lineStart(),u.point(A,T));else if(R&&y)u.point(A,T);else{var P=[_=Math.max(Ho,Math.min(Ai,_)),x=Math.max(Ho,Math.min(Ai,x))],U=[A=Math.max(Ho,Math.min(Ai,A)),T=Math.max(Ho,Math.min(Ai,T))];T5(P,U,e,t,r,i)?(y||(u.lineStart(),u.point(P[0],P[1])),u.point(U[0],U[1]),R||u.lineEnd(),S=!1):R&&(u.lineStart(),u.point(A,T),S=!1)}_=A,x=T,y=R}return k}}function C5(){var e=0,t=0,r=960,i=500,n,o,a;return a={stream:function(s){return n&&o===s?n:n=Ws(e,t,r,i)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],r=+s[1][0],i=+s[1][1],n=o=null,a):[[e,t],[r,i]]}}}var fu,du,_a,xa,Hr={sphere:xe,point:xe,lineStart:A5,lineEnd:xe,polygonStart:xe,polygonEnd:xe};function A5(){Hr.point=P5,Hr.lineEnd=j5}function j5(){Hr.point=Hr.lineEnd=xe}function P5(e,t){e*=J,t*=J,du=e,_a=B(t),xa=Y(t),Hr.point=O5}function O5(e,t){e*=J,t*=J;var r=B(t),i=Y(t),n=ue(e-du),o=Y(n),a=B(n),s=i*a,c=xa*r-_a*i*o,l=_a*r+xa*i*o;fu.add(tt(Re(s*s+c*c),l)),du=e,_a=r,xa=i}function I0(e){return fu=new Ce,kt(e,Hr),+fu}var hu=[null,null],R5={type:"LineString",coordinates:hu};function rs(e,t){return hu[0]=e,hu[1]=t,I0(R5)}var um={Feature:function(e,t){return is(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i<n;)if(is(r[i].geometry,t))return!0;return!1}},fm={Sphere:function(){return!0},Point:function(e,t){return dm(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,i=-1,n=r.length;++i<n;)if(dm(r[i],t))return!0;return!1},LineString:function(e,t){return hm(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,i=-1,n=r.length;++i<n;)if(hm(r[i],t))return!0;return!1},Polygon:function(e,t){return mm(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,i=-1,n=r.length;++i<n;)if(mm(r[i],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,i=-1,n=r.length;++i<n;)if(is(r[i],t))return!0;return!1}};function is(e,t){return e&&fm.hasOwnProperty(e.type)?fm[e.type](e,t):!1}function dm(e,t){return rs(e,t)===0}function hm(e,t){for(var r,i,n,o=0,a=e.length;o<a;o++){if(i=rs(e[o],t),i===0||o>0&&(n=rs(e[o],e[o-1]),n>0&&r<=n&&i<=n&&(r+i-n)*(1-Math.pow((r-i)/n,2))<oo*n))return!0;r=i}return!1}function mm(e,t){return!!$0(e.map(D5),N0(t))}function D5(e){return e=e.map(N0),e.pop(),e}function N0(e){return[e[0]*J,e[1]*J]}function U5(e,t){return(e&&um.hasOwnProperty(e.type)?um[e.type]:is)(e,t)}function gm(e,t,r){var i=xn(e,t-X,r).concat(t);return function(n){return i.map(function(o){return[n,o]})}}function pm(e,t,r){var i=xn(e,t-X,r).concat(t);return function(n){return i.map(function(o){return[o,n]})}}function E0(){var e,t,r,i,n,o,a,s,c=10,l=c,u=90,f=360,d,h,p,g,v=2.5;function b(){return{type:"MultiLineString",coordinates:_()}}function _(){return xn(Wo(i/u)*u,r,u).map(p).concat(xn(Wo(s/f)*f,a,f).map(g)).concat(xn(Wo(t/c)*c,e,c).filter(function(x){return ue(x%u)>X}).map(d)).concat(xn(Wo(o/l)*l,n,l).filter(function(x){return ue(x%f)>X}).map(h))}return b.lines=function(){return _().map(function(x){return{type:"LineString",coordinates:x}})},b.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(g(a).slice(1),p(r).reverse().slice(1),g(s).reverse().slice(1))]}},b.extent=function(x){return arguments.length?b.extentMajor(x).extentMinor(x):b.extentMinor()},b.extentMajor=function(x){return arguments.length?(i=+x[0][0],r=+x[1][0],s=+x[0][1],a=+x[1][1],i>r&&(x=i,i=r,r=x),s>a&&(x=s,s=a,a=x),b.precision(v)):[[i,s],[r,a]]},b.extentMinor=function(x){return arguments.length?(t=+x[0][0],e=+x[1][0],o=+x[0][1],n=+x[1][1],t>e&&(x=t,t=e,e=x),o>n&&(x=o,o=n,n=x),b.precision(v)):[[t,o],[e,n]]},b.step=function(x){return arguments.length?b.stepMajor(x).stepMinor(x):b.stepMinor()},b.stepMajor=function(x){return arguments.length?(u=+x[0],f=+x[1],b):[u,f]},b.stepMinor=function(x){return arguments.length?(c=+x[0],l=+x[1],b):[c,l]},b.precision=function(x){return arguments.length?(v=+x,d=gm(o,n,90),h=pm(t,e,v),p=gm(s,a,90),g=pm(i,r,v),b):v},b.extentMajor([[-180,-90+X],[180,90-X]]).extentMinor([[-180,-80-X],[180,80+X]])}function z5(){return E0()()}function L5(e,t){var r=e[0]*J,i=e[1]*J,n=t[0]*J,o=t[1]*J,a=Y(i),s=B(i),c=Y(o),l=B(o),u=a*Y(r),f=a*B(r),d=c*Y(n),h=c*B(n),p=2*nt(Re(Xh(o-i)+a*c*Xh(n-r))),g=B(p),v=p?function(b){var _=B(b*=p)/g,x=B(p-b)/g,y=x*u+_*d,w=x*f+_*h,S=x*s+_*l;return[tt(w,y)*ge,tt(S,Re(y*y+w*w))*ge]}:function(){return[r*ge,i*ge]};return v.distance=p,v}const ao=e=>e;var tc=new Ce,mu=new Ce,M0,T0,gu,pu,nn={point:xe,lineStart:xe,lineEnd:xe,polygonStart:function(){nn.lineStart=F5,nn.lineEnd=B5},polygonEnd:function(){nn.lineStart=nn.lineEnd=nn.point=xe,tc.add(ue(mu)),mu=new Ce},result:function(){var e=tc/2;return tc=new Ce,e}};function F5(){nn.point=Z5}function Z5(e,t){nn.point=C0,M0=gu=e,T0=pu=t}function C0(e,t){mu.add(pu*e-gu*t),gu=e,pu=t}function B5(){C0(M0,T0)}var Xr=1/0,os=Xr,so=-Xr,as=so,ss={point:V5,lineStart:xe,lineEnd:xe,polygonStart:xe,polygonEnd:xe,result:function(){var e=[[Xr,os],[so,as]];return so=as=-(os=Xr=1/0),e}};function V5(e,t){e<Xr&&(Xr=e),e>so&&(so=e),t<os&&(os=t),t>as&&(as=t)}var vu=0,bu=0,ji=0,ls=0,cs=0,Cr=0,yu=0,_u=0,Pi=0,A0,j0,Pt,Ot,vt={point:er,lineStart:vm,lineEnd:bm,polygonStart:function(){vt.lineStart=G5,vt.lineEnd=Y5},polygonEnd:function(){vt.point=er,vt.lineStart=vm,vt.lineEnd=bm},result:function(){var e=Pi?[yu/Pi,_u/Pi]:Cr?[ls/Cr,cs/Cr]:ji?[vu/ji,bu/ji]:[NaN,NaN];return vu=bu=ji=ls=cs=Cr=yu=_u=Pi=0,e}};function er(e,t){vu+=e,bu+=t,++ji}function vm(){vt.point=W5}function W5(e,t){vt.point=q5,er(Pt=e,Ot=t)}function q5(e,t){var r=e-Pt,i=t-Ot,n=Re(r*r+i*i);ls+=n*(Pt+e)/2,cs+=n*(Ot+t)/2,Cr+=n,er(Pt=e,Ot=t)}function bm(){vt.point=er}function G5(){vt.point=H5}function Y5(){P0(A0,j0)}function H5(e,t){vt.point=P0,er(A0=Pt=e,j0=Ot=t)}function P0(e,t){var r=e-Pt,i=t-Ot,n=Re(r*r+i*i);ls+=n*(Pt+e)/2,cs+=n*(Ot+t)/2,Cr+=n,n=Ot*e-Pt*t,yu+=n*(Pt+e),_u+=n*(Ot+t),Pi+=n*3,er(Pt=e,Ot=t)}function O0(e){this._context=e}O0.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,et);break}}},result:xe};var xu=new Ce,nc,R0,D0,Oi,Ri,lo={point:xe,lineStart:function(){lo.point=X5},lineEnd:function(){nc&&U0(R0,D0),lo.point=xe},polygonStart:function(){nc=!0},polygonEnd:function(){nc=null},result:function(){var e=+xu;return xu=new Ce,e}};function X5(e,t){lo.point=U0,R0=Oi=e,D0=Ri=t}function U0(e,t){Oi-=e,Ri-=t,xu.add(Re(Oi*Oi+Ri*Ri)),Oi=e,Ri=t}let ym,us,_m,xm;class wm{constructor(t){this._append=t==null?z0:J5(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(t,r){switch(this._point){case 0:{this._append`M${t},${r}`,this._point=1;break}case 1:{this._append`L${t},${r}`;break}default:{if(this._append`M${t},${r}`,this._radius!==_m||this._append!==us){const i=this._radius,n=this._;this._="",this._append`m0,${i}a${i},${i} 0 1,1 0,${-2*i}a${i},${i} 0 1,1 0,${2*i}z`,_m=i,us=this._append,xm=this._,this._=n}this._+=xm;break}}}result(){const t=this._;return this._="",t.length?t:null}}function z0(e){let t=1;this._+=e[0];for(const r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function J5(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return z0;if(t!==ym){const r=10**t;ym=t,us=function(n){let o=1;this._+=n[0];for(const a=n.length;o<a;++o)this._+=Math.round(arguments[o]*r)/r+n[o]}}return us}function K5(e,t){let r=3,i=4.5,n,o;function a(s){return s&&(typeof i=="function"&&o.pointRadius(+i.apply(this,arguments)),kt(s,n(o))),o.result()}return a.area=function(s){return kt(s,n(nn)),nn.result()},a.measure=function(s){return kt(s,n(lo)),lo.result()},a.bounds=function(s){return kt(s,n(ss)),ss.result()},a.centroid=function(s){return kt(s,n(vt)),vt.result()},a.projection=function(s){return arguments.length?(n=s==null?(e=null,ao):(e=s).stream,a):e},a.context=function(s){return arguments.length?(o=s==null?(t=null,new wm(r)):new O0(t=s),typeof i!="function"&&o.pointRadius(i),a):t},a.pointRadius=function(s){return arguments.length?(i=typeof s=="function"?s:(o.pointRadius(+s),+s),a):i},a.digits=function(s){if(!arguments.length)return r;if(s==null)r=null;else{const c=Math.floor(s);if(!(c>=0))throw new RangeError(`invalid digits: ${s}`);r=c}return t===null&&(o=new wm(r)),a},a.projection(e).digits(r).context(t)}function Q5(e){return{stream:wo(e)}}function wo(e){return function(t){var r=new wu;for(var i in e)r[i]=e[i];return r.stream=t,r}}function wu(){}wu.prototype={constructor:wu,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function bf(e,t,r){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),i!=null&&e.clipExtent(null),kt(r,e.stream(ss)),t(ss.result()),i!=null&&e.clipExtent(i),e}function qs(e,t,r){return bf(e,function(i){var n=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(n/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),s=+t[0][0]+(n-a*(i[1][0]+i[0][0]))/2,c=+t[0][1]+(o-a*(i[1][1]+i[0][1]))/2;e.scale(150*a).translate([s,c])},r)}function yf(e,t,r){return qs(e,[[0,0],t],r)}function _f(e,t,r){return bf(e,function(i){var n=+t,o=n/(i[1][0]-i[0][0]),a=(n-o*(i[1][0]+i[0][0]))/2,s=-o*i[0][1];e.scale(150*o).translate([a,s])},r)}function xf(e,t,r){return bf(e,function(i){var n=+t,o=n/(i[1][1]-i[0][1]),a=-o*i[0][0],s=(n-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([a,s])},r)}var $m=16,eM=Y(30*J);function Sm(e,t){return+t?nM(e,t):tM(e)}function tM(e){return wo({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function nM(e,t){function r(i,n,o,a,s,c,l,u,f,d,h,p,g,v){var b=l-i,_=u-n,x=b*b+_*_;if(x>4*t&&g--){var y=a+d,w=s+h,S=c+p,k=Re(y*y+w*w+S*S),N=nt(S/=k),C=ue(ue(S)-1)<X||ue(o-f)<X?(o+f)/2:tt(w,y),j=e(C,N),M=j[0],D=j[1],O=M-i,I=D-n,A=_*O-b*I;(A*A/x>t||ue((b*O+_*I)/x-.5)>.3||a*d+s*h+c*p<eM)&&(r(i,n,o,a,s,c,M,D,C,y/=k,w/=k,S,g,v),v.point(M,D),r(M,D,C,y,w,S,l,u,f,d,h,p,g,v))}}return function(i){var n,o,a,s,c,l,u,f,d,h,p,g,v={point:b,lineStart:_,lineEnd:y,polygonStart:function(){i.polygonStart(),v.lineStart=w},polygonEnd:function(){i.polygonEnd(),v.lineStart=_}};function b(N,C){N=e(N,C),i.point(N[0],N[1])}function _(){f=NaN,v.point=x,i.lineStart()}function x(N,C){var j=Qn([N,C]),M=e(N,C);r(f,d,u,h,p,g,f=M[0],d=M[1],u=N,h=j[0],p=j[1],g=j[2],$m,i),i.point(f,d)}function y(){v.point=b,i.lineEnd()}function w(){_(),v.point=S,v.lineEnd=k}function S(N,C){x(n=N,C),o=f,a=d,s=h,c=p,l=g,v.point=x}function k(){r(f,d,u,h,p,g,o,a,n,s,c,l,$m,i),v.lineEnd=y,y()}return v}}var rM=wo({point:function(e,t){this.stream.point(e*J,t*J)}});function iM(e){return wo({point:function(t,r){var i=e(t,r);return this.stream.point(i[0],i[1])}})}function oM(e,t,r,i,n){function o(a,s){return a*=i,s*=n,[t+e*a,r-e*s]}return o.invert=function(a,s){return[(a-t)/e*i,(r-s)/e*n]},o}function km(e,t,r,i,n,o){if(!o)return oM(e,t,r,i,n);var a=Y(o),s=B(o),c=a*e,l=s*e,u=a/e,f=s/e,d=(s*r-a*t)/e,h=(s*t+a*r)/e;function p(g,v){return g*=i,v*=n,[c*g-l*v+t,r-l*g-c*v]}return p.invert=function(g,v){return[i*(u*g-f*v+d),n*(h-f*g-u*v)]},p}function Yt(e){return wf(function(){return e})()}function wf(e){var t,r=150,i=480,n=250,o=0,a=0,s=0,c=0,l=0,u,f=0,d=1,h=1,p=null,g=uu,v=null,b,_,x,y=ao,w=.5,S,k,N,C,j;function M(A){return N(A[0]*J,A[1]*J)}function D(A){return A=N.invert(A[0],A[1]),A&&[A[0]*ge,A[1]*ge]}M.stream=function(A){return C&&j===A?C:C=rM(iM(u)(g(S(y(j=A)))))},M.preclip=function(A){return arguments.length?(g=A,p=void 0,I()):g},M.postclip=function(A){return arguments.length?(y=A,v=b=_=x=null,I()):y},M.clipAngle=function(A){return arguments.length?(g=+A?k0(p=A*J):(p=null,uu),I()):p*ge},M.clipExtent=function(A){return arguments.length?(y=A==null?(v=b=_=x=null,ao):Ws(v=+A[0][0],b=+A[0][1],_=+A[1][0],x=+A[1][1]),I()):v==null?null:[[v,b],[_,x]]},M.scale=function(A){return arguments.length?(r=+A,O()):r},M.translate=function(A){return arguments.length?(i=+A[0],n=+A[1],O()):[i,n]},M.center=function(A){return arguments.length?(o=A[0]%360*J,a=A[1]%360*J,O()):[o*ge,a*ge]},M.rotate=function(A){return arguments.length?(s=A[0]%360*J,c=A[1]%360*J,l=A.length>2?A[2]%360*J:0,O()):[s*ge,c*ge,l*ge]},M.angle=function(A){return arguments.length?(f=A%360*J,O()):f*ge},M.reflectX=function(A){return arguments.length?(d=A?-1:1,O()):d<0},M.reflectY=function(A){return arguments.length?(h=A?-1:1,O()):h<0},M.precision=function(A){return arguments.length?(S=Sm(k,w=A*A),I()):Re(w)},M.fitExtent=function(A,T){return qs(M,A,T)},M.fitSize=function(A,T){return yf(M,A,T)},M.fitWidth=function(A,T){return _f(M,A,T)},M.fitHeight=function(A,T){return xf(M,A,T)};function O(){var A=km(r,0,0,d,h,f).apply(null,t(o,a)),T=km(r,i-A[0],n-A[1],d,h,f);return u=vf(s,c,l),k=lu(t,T),N=lu(u,k),S=Sm(k,w),I()}function I(){return C=j=null,M}return function(){return t=e.apply(this,arguments),M.invert=t.invert&&D,O()}}function $f(e){var t=0,r=ce/3,i=wf(e),n=i(t,r);return n.parallels=function(o){return arguments.length?i(t=o[0]*J,r=o[1]*J):[t*ge,r*ge]},n}function aM(e){var t=Y(e);function r(i,n){return[i*t,B(n)/t]}return r.invert=function(i,n){return[i/t,nt(n*t)]},r}function L0(e,t){var r=B(e),i=(r+B(t))/2;if(ue(i)<X)return aM(e);var n=1+r*(2*i-r),o=Re(n)/i;function a(s,c){var l=Re(n-2*i*B(c))/i;return[l*B(s*=i),o-l*Y(s)]}return a.invert=function(s,c){var l=o-c,u=tt(s,ue(l))*bt(l);return l*i<0&&(u-=ce*bt(s)*bt(l)),[u/i,nt((n-(s*s+l*l)*i*i)/(2*i))]},a}function fs(){return $f(L0).scale(155.424).center([0,33.6442])}function F0(){return fs().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function sM(e){var t=e.length;return{point:function(r,i){for(var n=-1;++n<t;)e[n].point(r,i)},sphere:function(){for(var r=-1;++r<t;)e[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)e[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)e[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)e[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)e[r].polygonEnd()}}}function lM(){var e,t,r=F0(),i,n=fs().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=fs().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,c,l={point:function(d,h){c=[d,h]}};function u(d){var h=d[0],p=d[1];return c=null,i.point(h,p),c||(o.point(h,p),c)||(s.point(h,p),c)}u.invert=function(d){var h=r.scale(),p=r.translate(),g=(d[0]-p[0])/h,v=(d[1]-p[1])/h;return(v>=.12&&v<.234&&g>=-.425&&g<-.214?n:v>=.166&&v<.234&&g>=-.214&&g<-.115?a:r).invert(d)},u.stream=function(d){return e&&t===d?e:e=sM([r.stream(t=d),n.stream(d),a.stream(d)])},u.precision=function(d){return arguments.length?(r.precision(d),n.precision(d),a.precision(d),f()):r.precision()},u.scale=function(d){return arguments.length?(r.scale(d),n.scale(d*.35),a.scale(d),u.translate(r.translate())):r.scale()},u.translate=function(d){if(!arguments.length)return r.translate();var h=r.scale(),p=+d[0],g=+d[1];return i=r.translate(d).clipExtent([[p-.455*h,g-.238*h],[p+.455*h,g+.238*h]]).stream(l),o=n.translate([p-.307*h,g+.201*h]).clipExtent([[p-.425*h+X,g+.12*h+X],[p-.214*h-X,g+.234*h-X]]).stream(l),s=a.translate([p-.205*h,g+.212*h]).clipExtent([[p-.214*h+X,g+.166*h+X],[p-.115*h-X,g+.234*h-X]]).stream(l),f()},u.fitExtent=function(d,h){return qs(u,d,h)},u.fitSize=function(d,h){return yf(u,d,h)},u.fitWidth=function(d,h){return _f(u,d,h)},u.fitHeight=function(d,h){return xf(u,d,h)};function f(){return e=t=null,u}return u.scale(1070)}function Z0(e){return function(t,r){var i=Y(t),n=Y(r),o=e(i*n);return o===1/0?[2,0]:[o*n*B(t),o*B(r)]}}function $o(e){return function(t,r){var i=Re(t*t+r*r),n=e(i),o=B(n),a=Y(n);return[tt(t*o,i*a),nt(i&&r*o/i)]}}var Sf=Z0(function(e){return Re(2/(1+e))});Sf.invert=$o(function(e){return 2*nt(e/2)});function cM(){return Yt(Sf).scale(124.75).clipAngle(180-.001)}var kf=Z0(function(e){return(e=l0(e))&&e/B(e)});kf.invert=$o(function(e){return e});function uM(){return Yt(kf).scale(79.4188).clipAngle(180-.001)}function So(e,t){return[e,Va(gf((ke+t)/2))]}So.invert=function(e,t){return[e,2*ci(s0(t))-ke]};function fM(){return B0(So).scale(961/et)}function B0(e){var t=Yt(e),r=t.center,i=t.scale,n=t.translate,o=t.clipExtent,a=null,s,c,l;t.scale=function(f){return arguments.length?(i(f),u()):i()},t.translate=function(f){return arguments.length?(n(f),u()):n()},t.center=function(f){return arguments.length?(r(f),u()):r()},t.clipExtent=function(f){return arguments.length?(f==null?a=s=c=l=null:(a=+f[0][0],s=+f[0][1],c=+f[1][0],l=+f[1][1]),u()):a==null?null:[[a,s],[c,l]]};function u(){var f=ce*i(),d=t(y0(t.rotate()).invert([0,0]));return o(a==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:e===So?[[Math.max(d[0]-f,a),s],[Math.min(d[0]+f,c),l]]:[[a,Math.max(d[1]-f,s)],[c,Math.min(d[1]+f,l)]])}return u()}function Xo(e){return gf((ke+e)/2)}function V0(e,t){var r=Y(e),i=e===t?B(e):Va(r/Y(t))/Va(Xo(t)/Xo(e)),n=r*Kl(Xo(e),i)/i;if(!i)return So;function o(a,s){n>0?s<-ke+X&&(s=-ke+X):s>ke-X&&(s=ke-X);var c=n/Kl(Xo(s),i);return[c*B(i*a),n-c*Y(i*a)]}return o.invert=function(a,s){var c=n-s,l=bt(i)*Re(a*a+c*c),u=tt(a,ue(c))*bt(c);return c*i<0&&(u-=ce*bt(a)*bt(c)),[u/i,2*ci(Kl(n/l,1/i))-ke]},o}function dM(){return $f(V0).scale(109.5).parallels([30,30])}function co(e,t){return[e,t]}co.invert=co;function hM(){return Yt(co).scale(152.63)}function W0(e,t){var r=Y(e),i=e===t?B(e):(r-Y(t))/(t-e),n=r/i+e;if(ue(i)<X)return co;function o(a,s){var c=n-s,l=i*a;return[c*B(l),n-c*Y(l)]}return o.invert=function(a,s){var c=n-s,l=tt(a,ue(c))*bt(c);return c*i<0&&(l-=ce*bt(a)*bt(c)),[l/i,n-bt(i)*Re(a*a+c*c)]},o}function mM(){return $f(W0).scale(131.154).center([0,13.9389])}var Bi=1.340264,Vi=-.081106,Wi=893e-6,qi=.003796,ds=Re(3)/2,gM=12;function If(e,t){var r=nt(ds*B(t)),i=r*r,n=i*i*i;return[e*Y(r)/(ds*(Bi+3*Vi*i+n*(7*Wi+9*qi*i))),r*(Bi+Vi*i+n*(Wi+qi*i))]}If.invert=function(e,t){for(var r=t,i=r*r,n=i*i*i,o=0,a,s,c;o<gM&&(s=r*(Bi+Vi*i+n*(Wi+qi*i))-t,c=Bi+3*Vi*i+n*(7*Wi+9*qi*i),r-=a=s/c,i=r*r,n=i*i*i,!(ue(a)<oo));++o);return[ds*e*(Bi+3*Vi*i+n*(7*Wi+9*qi*i))/Y(r),nt(B(r)/ds)]};function pM(){return Yt(If).scale(177.158)}function Nf(e,t){var r=Y(t),i=Y(e)*r;return[r*B(e)/i,B(t)/i]}Nf.invert=$o(ci);function vM(){return Yt(Nf).scale(144.049).clipAngle(60)}function bM(){var e=1,t=0,r=0,i=1,n=1,o=0,a,s,c=null,l,u,f,d=1,h=1,p=wo({point:function(y,w){var S=x([y,w]);this.stream.point(S[0],S[1])}}),g=ao,v,b;function _(){return d=e*i,h=e*n,v=b=null,x}function x(y){var w=y[0]*d,S=y[1]*h;if(o){var k=S*a-w*s;w=w*a+S*s,S=k}return[w+t,S+r]}return x.invert=function(y){var w=y[0]-t,S=y[1]-r;if(o){var k=S*a+w*s;w=w*a-S*s,S=k}return[w/d,S/h]},x.stream=function(y){return v&&b===y?v:v=p(g(b=y))},x.postclip=function(y){return arguments.length?(g=y,c=l=u=f=null,_()):g},x.clipExtent=function(y){return arguments.length?(g=y==null?(c=l=u=f=null,ao):Ws(c=+y[0][0],l=+y[0][1],u=+y[1][0],f=+y[1][1]),_()):c==null?null:[[c,l],[u,f]]},x.scale=function(y){return arguments.length?(e=+y,_()):e},x.translate=function(y){return arguments.length?(t=+y[0],r=+y[1],_()):[t,r]},x.angle=function(y){return arguments.length?(o=y%360*J,s=B(o),a=Y(o),_()):o*ge},x.reflectX=function(y){return arguments.length?(i=y?-1:1,_()):i<0},x.reflectY=function(y){return arguments.length?(n=y?-1:1,_()):n<0},x.fitExtent=function(y,w){return qs(x,y,w)},x.fitSize=function(y,w){return yf(x,y,w)},x.fitWidth=function(y,w){return _f(x,y,w)},x.fitHeight=function(y,w){return xf(x,y,w)},x}function Ef(e,t){var r=t*t,i=r*r;return[e*(.8707-.131979*r+i*(-.013791+i*(.003971*r-.001529*i))),t*(1.007226+r*(.015085+i*(-.044475+.028874*r-.005916*i)))]}Ef.invert=function(e,t){var r=t,i=25,n;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(ue(n)>X&&--i>0);return[e/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]};function yM(){return Yt(Ef).scale(175.295)}function Mf(e,t){return[Y(t)*B(e),B(t)]}Mf.invert=$o(nt);function _M(){return Yt(Mf).scale(249.5).clipAngle(90+X)}function Tf(e,t){var r=Y(t),i=1+Y(e)*r;return[r*B(e)/i,B(t)/i]}Tf.invert=$o(function(e){return 2*ci(e)});function xM(){return Yt(Tf).scale(250).clipAngle(142)}function Cf(e,t){return[Va(gf((ke+t)/2)),-e]}Cf.invert=function(e,t){return[-t,2*ci(s0(e))-ke]};function wM(){var e=B0(Cf),t=e.center,r=e.rotate;return e.center=function(i){return arguments.length?t([-i[1],i[0]]):(i=t(),[i[1],-i[0]])},e.rotate=function(i){return arguments.length?r([i[0],i[1],i.length>2?i[2]+90:90]):(i=r(),[i[0],i[1],i[2]-90])},r([0,0,90]).scale(159.155)}function $M(e,t){return e.parent===t.parent?1:2}function SM(e){return e.reduce(kM,0)/e.length}function kM(e,t){return e+t.x}function IM(e){return 1+e.reduce(NM,0)}function NM(e,t){return Math.max(e,t.y)}function EM(e){for(var t;t=e.children;)e=t[0];return e}function MM(e){for(var t;t=e.children;)e=t[t.length-1];return e}function TM(){var e=$M,t=1,r=1,i=!1;function n(o){var a,s=0;o.eachAfter(function(d){var h=d.children;h?(d.x=SM(h),d.y=IM(h)):(d.x=a?s+=e(d,a):0,d.y=0,a=d)});var c=EM(o),l=MM(o),u=c.x-e(c,l)/2,f=l.x+e(l,c)/2;return o.eachAfter(i?function(d){d.x=(d.x-o.x)*t,d.y=(o.y-d.y)*r}:function(d){d.x=(d.x-u)/(f-u)*t,d.y=(1-(o.y?d.y/o.y:1))*r})}return n.separation=function(o){return arguments.length?(e=o,n):e},n.size=function(o){return arguments.length?(i=!1,t=+o[0],r=+o[1],n):i?null:[t,r]},n.nodeSize=function(o){return arguments.length?(i=!0,t=+o[0],r=+o[1],n):i?[t,r]:null},n}function CM(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function AM(){return this.eachAfter(CM)}function jM(e,t){let r=-1;for(const i of this)e.call(t,i,++r,this);return this}function PM(e,t){for(var r=this,i=[r],n,o,a=-1;r=i.pop();)if(e.call(t,r,++a,this),n=r.children)for(o=n.length-1;o>=0;--o)i.push(n[o]);return this}function OM(e,t){for(var r=this,i=[r],n=[],o,a,s,c=-1;r=i.pop();)if(n.push(r),o=r.children)for(a=0,s=o.length;a<s;++a)i.push(o[a]);for(;r=n.pop();)e.call(t,r,++c,this);return this}function RM(e,t){let r=-1;for(const i of this)if(e.call(t,i,++r,this))return i}function DM(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})}function UM(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function zM(e){for(var t=this,r=LM(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function LM(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}function FM(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function ZM(){return Array.from(this)}function BM(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function VM(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*WM(){var e=this,t,r=[e],i,n,o;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(n=0,o=i.length;n<o;++n)r.push(i[n]);while(r.length)}function Af(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=YM)):t===void 0&&(t=GM);for(var r=new tr(e),i,n=[r],o,a,s,c;i=n.pop();)if((a=t(i.data))&&(c=(a=Array.from(a)).length))for(i.children=a,s=c-1;s>=0;--s)n.push(o=a[s]=new tr(a[s])),o.parent=i,o.depth=i.depth+1;return r.eachBefore(q0)}function qM(){return Af(this).eachBefore(HM)}function GM(e){return e.children}function YM(e){return Array.isArray(e)?e[1]:null}function HM(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function q0(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function tr(e){this.data=e,this.depth=this.height=0,this.parent=null}tr.prototype=Af.prototype={constructor:tr,count:AM,each:jM,eachAfter:OM,eachBefore:PM,find:RM,sum:DM,sort:UM,path:zM,ancestors:FM,descendants:ZM,leaves:BM,links:VM,copy:qM,[Symbol.iterator]:WM};function wa(e){return e==null?null:G0(e)}function G0(e){if(typeof e!="function")throw new Error;return e}function Fn(){return 0}function Mr(e){return function(){return e}}const XM=1664525,JM=1013904223,Im=4294967296;function jf(){let e=1;return()=>(e=(XM*e+JM)%Im)/Im}function KM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function QM(e,t){let r=e.length,i,n;for(;r;)n=t()*r--|0,i=e[r],e[r]=e[n],e[n]=i;return e}function eT(e){return Y0(e,jf())}function Y0(e,t){for(var r=0,i=(e=QM(Array.from(e),t)).length,n=[],o,a;r<i;)o=e[r],a&&H0(a,o)?++r:(a=nT(n=tT(n,o)),r=0);return a}function tT(e,t){var r,i;if(rc(t,e))return[t];for(r=0;r<e.length;++r)if(Jo(t,e[r])&&rc(Di(e[r],t),e))return[e[r],t];for(r=0;r<e.length-1;++r)for(i=r+1;i<e.length;++i)if(Jo(Di(e[r],e[i]),t)&&Jo(Di(e[r],t),e[i])&&Jo(Di(e[i],t),e[r])&&rc(X0(e[r],e[i],t),e))return[e[r],e[i],t];throw new Error}function Jo(e,t){var r=e.r-t.r,i=t.x-e.x,n=t.y-e.y;return r<0||r*r<i*i+n*n}function H0(e,t){var r=e.r-t.r+Math.max(e.r,t.r,1)*1e-9,i=t.x-e.x,n=t.y-e.y;return r>0&&r*r>i*i+n*n}function rc(e,t){for(var r=0;r<t.length;++r)if(!H0(e,t[r]))return!1;return!0}function nT(e){switch(e.length){case 1:return rT(e[0]);case 2:return Di(e[0],e[1]);case 3:return X0(e[0],e[1],e[2])}}function rT(e){return{x:e.x,y:e.y,r:e.r}}function Di(e,t){var r=e.x,i=e.y,n=e.r,o=t.x,a=t.y,s=t.r,c=o-r,l=a-i,u=s-n,f=Math.sqrt(c*c+l*l);return{x:(r+o+c/f*u)/2,y:(i+a+l/f*u)/2,r:(f+n+s)/2}}function X0(e,t,r){var i=e.x,n=e.y,o=e.r,a=t.x,s=t.y,c=t.r,l=r.x,u=r.y,f=r.r,d=i-a,h=i-l,p=n-s,g=n-u,v=c-o,b=f-o,_=i*i+n*n-o*o,x=_-a*a-s*s+c*c,y=_-l*l-u*u+f*f,w=h*p-d*g,S=(p*y-g*x)/(w*2)-i,k=(g*v-p*b)/w,N=(h*x-d*y)/(w*2)-n,C=(d*b-h*v)/w,j=k*k+C*C-1,M=2*(o+S*k+N*C),D=S*S+N*N-o*o,O=-(Math.abs(j)>1e-6?(M+Math.sqrt(M*M-4*j*D))/(2*j):D/M);return{x:i+S+k*O,y:n+N+C*O,r:O}}function Nm(e,t,r){var i=e.x-t.x,n,o,a=e.y-t.y,s,c,l=i*i+a*a;l?(o=t.r+r.r,o*=o,c=e.r+r.r,c*=c,o>c?(n=(l+c-o)/(2*l),s=Math.sqrt(Math.max(0,c/l-n*n)),r.x=e.x-n*i-s*a,r.y=e.y-n*a+s*i):(n=(l+o-c)/(2*l),s=Math.sqrt(Math.max(0,o/l-n*n)),r.x=t.x+n*i-s*a,r.y=t.y+n*a+s*i)):(r.x=t.x+r.r,r.y=t.y)}function Em(e,t){var r=e.r+t.r-1e-6,i=t.x-e.x,n=t.y-e.y;return r>0&&r*r>i*i+n*n}function Mm(e){var t=e._,r=e.next._,i=t.r+r.r,n=(t.x*r.r+r.x*t.r)/i,o=(t.y*r.r+r.y*t.r)/i;return n*n+o*o}function Ko(e){this._=e,this.next=null,this.previous=null}function J0(e,t){if(!(o=(e=KM(e)).length))return 0;var r,i,n,o,a,s,c,l,u,f,d;if(r=e[0],r.x=0,r.y=0,!(o>1))return r.r;if(i=e[1],r.x=-i.r,i.x=r.r,i.y=0,!(o>2))return r.r+i.r;Nm(i,r,n=e[2]),r=new Ko(r),i=new Ko(i),n=new Ko(n),r.next=n.previous=i,i.next=r.previous=n,n.next=i.previous=r;e:for(c=3;c<o;++c){Nm(r._,i._,n=e[c]),n=new Ko(n),l=i.next,u=r.previous,f=i._.r,d=r._.r;do if(f<=d){if(Em(l._,n._)){i=l,r.next=i,i.previous=r,--c;continue e}f+=l._.r,l=l.next}else{if(Em(u._,n._)){r=u,r.next=i,i.previous=r,--c;continue e}d+=u._.r,u=u.previous}while(l!==u.next);for(n.previous=r,n.next=i,r.next=i.previous=i=n,a=Mm(r);(n=n.next)!==i;)(s=Mm(n))<a&&(r=n,a=s);i=r.next}for(r=[i._],n=i;(n=n.next)!==i;)r.push(n._);for(n=Y0(r,t),c=0;c<o;++c)r=e[c],r.x-=n.x,r.y-=n.y;return n.r}function iT(e){return J0(e,jf()),e}function oT(e){return Math.sqrt(e.value)}function aT(){var e=null,t=1,r=1,i=Fn;function n(o){const a=jf();return o.x=t/2,o.y=r/2,e?o.eachBefore(Tm(e)).eachAfter(ic(i,.5,a)).eachBefore(Cm(1)):o.eachBefore(Tm(oT)).eachAfter(ic(Fn,1,a)).eachAfter(ic(i,o.r/Math.min(t,r),a)).eachBefore(Cm(Math.min(t,r)/(2*o.r))),o}return n.radius=function(o){return arguments.length?(e=wa(o),n):e},n.size=function(o){return arguments.length?(t=+o[0],r=+o[1],n):[t,r]},n.padding=function(o){return arguments.length?(i=typeof o=="function"?o:Mr(+o),n):i},n}function Tm(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function ic(e,t,r){return function(i){if(n=i.children){var n,o,a=n.length,s=e(i)*t||0,c;if(s)for(o=0;o<a;++o)n[o].r+=s;if(c=J0(n,r),s)for(o=0;o<a;++o)n[o].r-=s;i.r=c+s}}}function Cm(e){return function(t){var r=t.parent;t.r*=e,r&&(t.x=r.x+e*t.x,t.y=r.y+e*t.y)}}function K0(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ko(e,t,r,i,n){for(var o=e.children,a,s=-1,c=o.length,l=e.value&&(i-t)/e.value;++s<c;)a=o[s],a.y0=r,a.y1=n,a.x0=t,a.x1=t+=a.value*l}function sT(){var e=1,t=1,r=0,i=!1;function n(a){var s=a.height+1;return a.x0=a.y0=r,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),i&&a.eachBefore(K0),a}function o(a,s){return function(c){c.children&&ko(c,c.x0,a*(c.depth+1)/s,c.x1,a*(c.depth+2)/s);var l=c.x0,u=c.y0,f=c.x1-r,d=c.y1-r;f<l&&(l=f=(l+f)/2),d<u&&(u=d=(u+d)/2),c.x0=l,c.y0=u,c.x1=f,c.y1=d}}return n.round=function(a){return arguments.length?(i=!!a,n):i},n.size=function(a){return arguments.length?(e=+a[0],t=+a[1],n):[e,t]},n.padding=function(a){return arguments.length?(r=+a,n):r},n}var lT={depth:-1},Am={},oc={};function cT(e){return e.id}function uT(e){return e.parentId}function fT(){var e=cT,t=uT,r;function i(n){var o=Array.from(n),a=e,s=t,c,l,u,f,d,h,p,g,v=new Map;if(r!=null){const b=o.map((y,w)=>dT(r(y,w,n))),_=b.map(jm),x=new Set(b).add("");for(const y of _)x.has(y)||(x.add(y),b.push(y),_.push(jm(y)),o.push(oc));a=(y,w)=>b[w],s=(y,w)=>_[w]}for(u=0,c=o.length;u<c;++u)l=o[u],h=o[u]=new tr(l),(p=a(l,u,n))!=null&&(p+="")&&(g=h.id=p,v.set(g,v.has(g)?Am:h)),(p=s(l,u,n))!=null&&(p+="")&&(h.parent=p);for(u=0;u<c;++u)if(h=o[u],p=h.parent){if(d=v.get(p),!d)throw new Error("missing: "+p);if(d===Am)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");if(r!=null){for(;f.data===oc&&f.children.length===1;)f=f.children[0],--c;for(let b=o.length-1;b>=0&&(h=o[b],h.data===oc);--b)h.data=null}if(f.parent=lT,f.eachBefore(function(b){b.depth=b.parent.depth+1,--c}).eachBefore(q0),f.parent=null,c>0)throw new Error("cycle");return f}return i.id=function(n){return arguments.length?(e=wa(n),i):e},i.parentId=function(n){return arguments.length?(t=wa(n),i):t},i.path=function(n){return arguments.length?(r=wa(n),i):r},i}function dT(e){e=`${e}`;let t=e.length;return $u(e,t-1)&&!$u(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function jm(e){let t=e.length;if(t<2)return"";for(;--t>1&&!$u(e,t););return e.slice(0,t)}function $u(e,t){if(e[t]==="/"){let r=0;for(;t>0&&e[--t]==="\\";)++r;if((r&1)===0)return!0}return!1}function hT(e,t){return e.parent===t.parent?1:2}function ac(e){var t=e.children;return t?t[0]:e.t}function sc(e){var t=e.children;return t?t[t.length-1]:e.t}function mT(e,t,r){var i=r/(t.i-e.i);t.c-=i,t.s+=r,e.c+=i,t.z+=r,t.m+=r}function gT(e){for(var t=0,r=0,i=e.children,n=i.length,o;--n>=0;)o=i[n],o.z+=t,o.m+=t,t+=o.s+(r+=o.c)}function pT(e,t,r){return e.a.parent===t.parent?e.a:r}function $a(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}$a.prototype=Object.create(tr.prototype);function vT(e){for(var t=new $a(e,0),r,i=[t],n,o,a,s;r=i.pop();)if(o=r._.children)for(r.children=new Array(s=o.length),a=s-1;a>=0;--a)i.push(n=r.children[a]=new $a(o[a],a)),n.parent=r;return(t.parent=new $a(null,0)).children=[t],t}function bT(){var e=hT,t=1,r=1,i=null;function n(l){var u=vT(l);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),i)l.eachBefore(c);else{var f=l,d=l,h=l;l.eachBefore(function(_){_.x<f.x&&(f=_),_.x>d.x&&(d=_),_.depth>h.depth&&(h=_)});var p=f===d?1:e(f,d)/2,g=p-f.x,v=t/(d.x+p+g),b=r/(h.depth||1);l.eachBefore(function(_){_.x=(_.x+g)*v,_.y=_.depth*b})}return l}function o(l){var u=l.children,f=l.parent.children,d=l.i?f[l.i-1]:null;if(u){gT(l);var h=(u[0].z+u[u.length-1].z)/2;d?(l.z=d.z+e(l._,d._),l.m=l.z-h):l.z=h}else d&&(l.z=d.z+e(l._,d._));l.parent.A=s(l,d,l.parent.A||f[0])}function a(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,u,f){if(u){for(var d=l,h=l,p=u,g=d.parent.children[0],v=d.m,b=h.m,_=p.m,x=g.m,y;p=sc(p),d=ac(d),p&&d;)g=ac(g),h=sc(h),h.a=l,y=p.z+_-d.z-v+e(p._,d._),y>0&&(mT(pT(p,l,f),l,y),v+=y,b+=y),_+=p.m,v+=d.m,x+=g.m,b+=h.m;p&&!sc(h)&&(h.t=p,h.m+=_-b),d&&!ac(g)&&(g.t=d,g.m+=v-x,f=l)}return f}function c(l){l.x*=t,l.y=l.depth*r}return n.separation=function(l){return arguments.length?(e=l,n):e},n.size=function(l){return arguments.length?(i=!1,t=+l[0],r=+l[1],n):i?null:[t,r]},n.nodeSize=function(l){return arguments.length?(i=!0,t=+l[0],r=+l[1],n):i?[t,r]:null},n}function Gs(e,t,r,i,n){for(var o=e.children,a,s=-1,c=o.length,l=e.value&&(n-r)/e.value;++s<c;)a=o[s],a.x0=t,a.x1=i,a.y0=r,a.y1=r+=a.value*l}var Q0=(1+Math.sqrt(5))/2;function eb(e,t,r,i,n,o){for(var a=[],s=t.children,c,l,u=0,f=0,d=s.length,h,p,g=t.value,v,b,_,x,y,w,S;u<d;){h=n-r,p=o-i;do v=s[f++].value;while(!v&&f<d);for(b=_=v,w=Math.max(p/h,h/p)/(g*e),S=v*v*w,y=Math.max(_/S,S/b);f<d;++f){if(v+=l=s[f].value,l<b&&(b=l),l>_&&(_=l),S=v*v*w,x=Math.max(_/S,S/b),x>y){v-=l;break}y=x}a.push(c={value:v,dice:h<p,children:s.slice(u,f)}),c.dice?ko(c,r,i,n,g?i+=p*v/g:o):Gs(c,r,i,g?r+=h*v/g:n,o),g-=v,u=f}return a}const tb=(function e(t){function r(i,n,o,a,s){eb(t,i,n,o,a,s)}return r.ratio=function(i){return e((i=+i)>1?i:1)},r})(Q0);function yT(){var e=tb,t=!1,r=1,i=1,n=[0],o=Fn,a=Fn,s=Fn,c=Fn,l=Fn;function u(d){return d.x0=d.y0=0,d.x1=r,d.y1=i,d.eachBefore(f),n=[0],t&&d.eachBefore(K0),d}function f(d){var h=n[d.depth],p=d.x0+h,g=d.y0+h,v=d.x1-h,b=d.y1-h;v<p&&(p=v=(p+v)/2),b<g&&(g=b=(g+b)/2),d.x0=p,d.y0=g,d.x1=v,d.y1=b,d.children&&(h=n[d.depth+1]=o(d)/2,p+=l(d)-h,g+=a(d)-h,v-=s(d)-h,b-=c(d)-h,v<p&&(p=v=(p+v)/2),b<g&&(g=b=(g+b)/2),e(d,p,g,v,b))}return u.round=function(d){return arguments.length?(t=!!d,u):t},u.size=function(d){return arguments.length?(r=+d[0],i=+d[1],u):[r,i]},u.tile=function(d){return arguments.length?(e=G0(d),u):e},u.padding=function(d){return arguments.length?u.paddingInner(d).paddingOuter(d):u.paddingInner()},u.paddingInner=function(d){return arguments.length?(o=typeof d=="function"?d:Mr(+d),u):o},u.paddingOuter=function(d){return arguments.length?u.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):u.paddingTop()},u.paddingTop=function(d){return arguments.length?(a=typeof d=="function"?d:Mr(+d),u):a},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:Mr(+d),u):s},u.paddingBottom=function(d){return arguments.length?(c=typeof d=="function"?d:Mr(+d),u):c},u.paddingLeft=function(d){return arguments.length?(l=typeof d=="function"?d:Mr(+d),u):l},u}function _T(e,t,r,i,n){var o=e.children,a,s=o.length,c,l=new Array(s+1);for(l[0]=c=a=0;a<s;++a)l[a+1]=c+=o[a].value;u(0,s,e.value,t,r,i,n);function u(f,d,h,p,g,v,b){if(f>=d-1){var _=o[f];_.x0=p,_.y0=g,_.x1=v,_.y1=b;return}for(var x=l[f],y=h/2+x,w=f+1,S=d-1;w<S;){var k=w+S>>>1;l[k]<y?w=k+1:S=k}y-l[w-1]<l[w]-y&&f+1<w&&--w;var N=l[w]-x,C=h-N;if(v-p>b-g){var j=h?(p*C+v*N)/h:v;u(f,w,N,p,g,j,b),u(w,d,C,j,g,v,b)}else{var M=h?(g*C+b*N)/h:b;u(f,w,N,p,g,v,M),u(w,d,C,p,M,v,b)}}}function xT(e,t,r,i,n){(e.depth&1?Gs:ko)(e,t,r,i,n)}const wT=(function e(t){function r(i,n,o,a,s){if((c=i._squarify)&&c.ratio===t)for(var c,l,u,f,d=-1,h,p=c.length,g=i.value;++d<p;){for(l=c[d],u=l.children,f=l.value=0,h=u.length;f<h;++f)l.value+=u[f].value;l.dice?ko(l,n,o,a,g?o+=(s-o)*l.value/g:s):Gs(l,n,o,g?n+=(a-n)*l.value/g:a,s),g-=l.value}else i._squarify=c=eb(t,i,n,o,a,s),c.ratio=t}return r.ratio=function(i){return e((i=+i)>1?i:1)},r})(Q0);function $T(e){for(var t=-1,r=e.length,i,n=e[r-1],o=0;++t<r;)i=n,n=e[t],o+=i[1]*n[0]-i[0]*n[1];return o/2}function ST(e){for(var t=-1,r=e.length,i=0,n=0,o,a=e[r-1],s,c=0;++t<r;)o=a,a=e[t],c+=s=o[0]*a[1]-a[0]*o[1],i+=(o[0]+a[0])*s,n+=(o[1]+a[1])*s;return c*=3,[i/c,n/c]}function kT(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function IT(e,t){return e[0]-t[0]||e[1]-t[1]}function Pm(e){const t=e.length,r=[0,1];let i=2,n;for(n=2;n<t;++n){for(;i>1&&kT(e[r[i-2]],e[r[i-1]],e[n])<=0;)--i;r[i++]=n}return r.slice(0,i)}function NT(e){if((r=e.length)<3)return null;var t,r,i=new Array(r),n=new Array(r);for(t=0;t<r;++t)i[t]=[+e[t][0],+e[t][1],t];for(i.sort(IT),t=0;t<r;++t)n[t]=[i[t][0],-i[t][1]];var o=Pm(i),a=Pm(n),s=a[0]===o[0],c=a[a.length-1]===o[o.length-1],l=[];for(t=o.length-1;t>=0;--t)l.push(e[i[o[t]][2]]);for(t=+s;t<a.length-c;++t)l.push(e[i[a[t]][2]]);return l}function ET(e,t){for(var r=e.length,i=e[r-1],n=t[0],o=t[1],a=i[0],s=i[1],c,l,u=!1,f=0;f<r;++f)i=e[f],c=i[0],l=i[1],l>o!=s>o&&n<(a-c)*(o-l)/(s-l)+c&&(u=!u),a=c,s=l;return u}function MT(e){for(var t=-1,r=e.length,i=e[r-1],n,o,a=i[0],s=i[1],c=0;++t<r;)n=a,o=s,i=e[t],a=i[0],s=i[1],n-=a,o-=s,c+=Math.hypot(n,o);return c}const ze=Math.random,TT=(function e(t){function r(i,n){return i=i==null?0:+i,n=n==null?1:+n,arguments.length===1?(n=i,i=0):n-=i,function(){return t()*n+i}}return r.source=e,r})(ze),CT=(function e(t){function r(i,n){return arguments.length<2&&(n=i,i=0),i=Math.floor(i),n=Math.floor(n)-i,function(){return Math.floor(t()*n+i)}}return r.source=e,r})(ze),Pf=(function e(t){function r(i,n){var o,a;return i=i==null?0:+i,n=n==null?1:+n,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return i+n*s*Math.sqrt(-2*Math.log(a)/a)}}return r.source=e,r})(ze),AT=(function e(t){var r=Pf.source(t);function i(){var n=r.apply(this,arguments);return function(){return Math.exp(n())}}return i.source=e,i})(ze),nb=(function e(t){function r(i){return(i=+i)<=0?()=>0:function(){for(var n=0,o=i;o>1;--o)n+=t();return n+o*t()}}return r.source=e,r})(ze),jT=(function e(t){var r=nb.source(t);function i(n){if((n=+n)==0)return t;var o=r(n);return function(){return o()/n}}return i.source=e,i})(ze),PT=(function e(t){function r(i){return function(){return-Math.log1p(-t())/i}}return r.source=e,r})(ze),OT=(function e(t){function r(i){if((i=+i)<0)throw new RangeError("invalid alpha");return i=1/-i,function(){return Math.pow(1-t(),i)}}return r.source=e,r})(ze),RT=(function e(t){function r(i){if((i=+i)<0||i>1)throw new RangeError("invalid p");return function(){return Math.floor(t()+i)}}return r.source=e,r})(ze),rb=(function e(t){function r(i){if((i=+i)<0||i>1)throw new RangeError("invalid p");return i===0?()=>1/0:i===1?()=>1:(i=Math.log1p(-i),function(){return 1+Math.floor(Math.log1p(-t())/i)})}return r.source=e,r})(ze),Of=(function e(t){var r=Pf.source(t)();function i(n,o){if((n=+n)<0)throw new RangeError("invalid k");if(n===0)return()=>0;if(o=o==null?1:+o,n===1)return()=>-Math.log1p(-t())*o;var a=(n<1?n+1:n)-1/3,s=1/(3*Math.sqrt(a)),c=n<1?()=>Math.pow(t(),1/n):()=>1;return function(){do{do var l=r(),u=1+s*l;while(u<=0);u*=u*u;var f=1-t()}while(f>=1-.0331*l*l*l*l&&Math.log(f)>=.5*l*l+a*(1-u+Math.log(u)));return a*u*c()*o}}return i.source=e,i})(ze),ib=(function e(t){var r=Of.source(t);function i(n,o){var a=r(n),s=r(o);return function(){var c=a();return c===0?0:c/(c+s())}}return i.source=e,i})(ze),ob=(function e(t){var r=rb.source(t),i=ib.source(t);function n(o,a){return o=+o,(a=+a)>=1?()=>o:a<=0?()=>0:function(){for(var s=0,c=o,l=a;c*l>16&&c*(1-l)>16;){var u=Math.floor((c+1)*l),f=i(u,c-u+1)();f<=l?(s+=u,c-=u,l=(l-f)/(1-f)):(c=u-1,l/=f)}for(var d=l<.5,h=d?l:1-l,p=r(h),g=p(),v=0;g<=c;++v)g+=p();return s+(d?v:c-v)}}return n.source=e,n})(ze),DT=(function e(t){function r(i,n,o){var a;return(i=+i)==0?a=s=>-Math.log(s):(i=1/i,a=s=>Math.pow(s,i)),n=n==null?0:+n,o=o==null?1:+o,function(){return n+o*a(-Math.log1p(-t()))}}return r.source=e,r})(ze),UT=(function e(t){function r(i,n){return i=i==null?0:+i,n=n==null?1:+n,function(){return i+n*Math.tan(Math.PI*t())}}return r.source=e,r})(ze),zT=(function e(t){function r(i,n){return i=i==null?0:+i,n=n==null?1:+n,function(){var o=t();return i+n*Math.log(o/(1-o))}}return r.source=e,r})(ze),LT=(function e(t){var r=Of.source(t),i=ob.source(t);function n(o){return function(){for(var a=0,s=o;s>16;){var c=Math.floor(.875*s),l=r(c)();if(l>s)return a+i(c-1,s/l)();a+=c,s-=l}for(var u=-Math.log1p(-t()),f=0;u<=s;++f)u-=Math.log1p(-t());return a+f}}return n.source=e,n})(ze),FT=1664525,ZT=1013904223,Om=1/4294967296;function BT(e=Math.random()){let t=(0<=e&&e<1?e/Om:Math.abs(e))|0;return()=>(t=FT*t+ZT|0,Om*(t>>>0))}function $t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function hn(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Su=Symbol("implicit");function Rf(){var e=new Yi,t=[],r=[],i=Su;function n(o){let a=e.get(o);if(a===void 0){if(i!==Su)return i;e.set(o,a=t.push(o)-1)}return r[a%r.length]}return n.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new Yi;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return n},n.range=function(o){return arguments.length?(r=Array.from(o),n):r.slice()},n.unknown=function(o){return arguments.length?(i=o,n):i},n.copy=function(){return Rf(t,r).unknown(i)},$t.apply(n,arguments),n}function Df(){var e=Rf().unknown(void 0),t=e.domain,r=e.range,i=0,n=1,o,a,s=!1,c=0,l=0,u=.5;delete e.unknown;function f(){var d=t().length,h=n<i,p=h?n:i,g=h?i:n;o=(g-p)/Math.max(1,d-c+l*2),s&&(o=Math.floor(o)),p+=(g-p-o*(d-c))*u,a=o*(1-c),s&&(p=Math.round(p),a=Math.round(a));var v=xn(d).map(function(b){return p+o*b});return r(h?v.reverse():v)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([i,n]=d,i=+i,n=+n,f()):[i,n]},e.rangeRound=function(d){return[i,n]=d,i=+i,n=+n,s=!0,f()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(c=Math.min(1,l=+d),f()):c},e.paddingInner=function(d){return arguments.length?(c=Math.min(1,d),f()):c},e.paddingOuter=function(d){return arguments.length?(l=+d,f()):l},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return Df(t(),[i,n]).round(s).paddingInner(c).paddingOuter(l).align(u)},$t.apply(f(),arguments)}function ab(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ab(t())},e}function VT(){return ab(Df.apply(null,arguments).paddingInner(1))}function WT(e){return function(){return e}}function hs(e){return+e}var Rm=[0,1];function Ke(e){return e}function ku(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:WT(isNaN(t)?NaN:.5)}function qT(e,t){var r;return e>t&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function GT(e,t,r){var i=e[0],n=e[1],o=t[0],a=t[1];return n<i?(i=ku(n,i),o=r(a,o)):(i=ku(i,n),o=r(o,a)),function(s){return o(i(s))}}function YT(e,t,r){var i=Math.min(e.length,t.length)-1,n=new Array(i),o=new Array(i),a=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<i;)n[a]=ku(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(s){var c=Sn(e,s,1,i)-1;return o[c](n[c](s))}}function Io(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Ys(){var e=Rm,t=Rm,r=An,i,n,o,a=Ke,s,c,l;function u(){var d=Math.min(e.length,t.length);return a!==Ke&&(a=qT(e[0],e[d-1])),s=d>2?YT:GT,c=l=null,f}function f(d){return d==null||isNaN(d=+d)?o:(c||(c=s(e.map(i),t,r)))(i(a(d)))}return f.invert=function(d){return a(n((l||(l=s(t,e.map(i),pt)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,hs),u()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),u()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=Os,u()},f.clamp=function(d){return arguments.length?(a=d?!0:Ke,u()):a!==Ke},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(o=d,f):o},function(d,h){return i=d,n=h,u()}}function Uf(){return Ys()(Ke,Ke)}function sb(e,t,r,i){var n=Ca(e,t,r),o;switch(i=Gr(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(o=o0(n,a))&&(i.precision=o),mf(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=a0(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=i0(n))&&(i.precision=o-(i.type==="%")*2);break}}return Vs(i)}function jn(e){var t=e.domain;return e.ticks=function(r){var i=t();return Yn(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var n=t();return sb(n[0],n[n.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),n=0,o=i.length-1,a=i[n],s=i[o],c,l,u=10;for(s<a&&(l=a,a=s,s=l,l=n,n=o,o=l);u-- >0;){if(l=Hn(a,s,r),l===c)return i[n]=a,i[o]=s,t(i);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function lb(){var e=Uf();return e.copy=function(){return Io(e,lb())},$t.apply(e,arguments),jn(e)}function cb(e){var t;function r(i){return i==null||isNaN(i=+i)?t:i}return r.invert=r,r.domain=r.range=function(i){return arguments.length?(e=Array.from(i,hs),r):e.slice()},r.unknown=function(i){return arguments.length?(t=i,r):t},r.copy=function(){return cb(e).unknown(t)},e=arguments.length?Array.from(e,hs):[0,1],jn(r)}function ub(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],o=e[i],a;return o<n&&(a=r,r=i,i=a,a=n,n=o,o=a),e[r]=t.floor(n),e[i]=t.ceil(o),e}function Dm(e){return Math.log(e)}function Um(e){return Math.exp(e)}function HT(e){return-Math.log(-e)}function XT(e){return-Math.exp(-e)}function JT(e){return isFinite(e)?+("1e"+e):e<0?0:e}function KT(e){return e===10?JT:e===Math.E?Math.exp:t=>Math.pow(e,t)}function QT(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function zm(e){return(t,r)=>-e(-t,r)}function zf(e){const t=e(Dm,Um),r=t.domain;let i=10,n,o;function a(){return n=QT(i),o=KT(i),r()[0]<0?(n=zm(n),o=zm(o),e(HT,XT)):e(Dm,Um),t}return t.base=function(s){return arguments.length?(i=+s,a()):i},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=s=>{const c=r();let l=c[0],u=c[c.length-1];const f=u<l;f&&([l,u]=[u,l]);let d=n(l),h=n(u),p,g;const v=s==null?10:+s;let b=[];if(!(i%1)&&h-d<v){if(d=Math.floor(d),h=Math.ceil(h),l>0){for(;d<=h;++d)for(p=1;p<i;++p)if(g=d<0?p/o(-d):p*o(d),!(g<l)){if(g>u)break;b.push(g)}}else for(;d<=h;++d)for(p=i-1;p>=1;--p)if(g=d>0?p/o(-d):p*o(d),!(g<l)){if(g>u)break;b.push(g)}b.length*2<v&&(b=Yn(l,u,v))}else b=Yn(d,h,Math.min(h-d,v)).map(o);return f?b.reverse():b},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=i===10?"s":","),typeof c!="function"&&(!(i%1)&&(c=Gr(c)).precision==null&&(c.trim=!0),c=Vs(c)),s===1/0)return c;const l=Math.max(1,i*s/t.ticks().length);return u=>{let f=u/o(Math.round(n(u)));return f*i<i-.5&&(f*=i),f<=l?c(u):""}},t.nice=()=>r(ub(r(),{floor:s=>o(Math.floor(n(s))),ceil:s=>o(Math.ceil(n(s)))})),t}function fb(){const e=zf(Ys()).domain([1,10]);return e.copy=()=>Io(e,fb()).base(e.base()),$t.apply(e,arguments),e}function Lm(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Fm(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Lf(e){var t=1,r=e(Lm(t),Fm(t));return r.constant=function(i){return arguments.length?e(Lm(t=+i),Fm(t)):t},jn(r)}function db(){var e=Lf(Ys());return e.copy=function(){return Io(e,db()).constant(e.constant())},$t.apply(e,arguments)}function Zm(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function eC(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function tC(e){return e<0?-e*e:e*e}function Ff(e){var t=e(Ke,Ke),r=1;function i(){return r===1?e(Ke,Ke):r===.5?e(eC,tC):e(Zm(r),Zm(1/r))}return t.exponent=function(n){return arguments.length?(r=+n,i()):r},jn(t)}function Zf(){var e=Ff(Ys());return e.copy=function(){return Io(e,Zf()).exponent(e.exponent())},$t.apply(e,arguments),e}function nC(){return Zf.apply(null,arguments).exponent(.5)}function Bm(e){return Math.sign(e)*e*e}function rC(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function hb(){var e=Uf(),t=[0,1],r=!1,i;function n(o){var a=rC(e(o));return isNaN(a)?i:r?Math.round(a):a}return n.invert=function(o){return e.invert(Bm(o))},n.domain=function(o){return arguments.length?(e.domain(o),n):e.domain()},n.range=function(o){return arguments.length?(e.range((t=Array.from(o,hs)).map(Bm)),n):t.slice()},n.rangeRound=function(o){return n.range(o).round(!0)},n.round=function(o){return arguments.length?(r=!!o,n):r},n.clamp=function(o){return arguments.length?(e.clamp(o),n):e.clamp()},n.unknown=function(o){return arguments.length?(i=o,n):i},n.copy=function(){return hb(e.domain(),t).round(r).clamp(e.clamp()).unknown(i)},$t.apply(n,arguments),jn(n)}function mb(){var e=[],t=[],r=[],i;function n(){var a=0,s=Math.max(1,t.length);for(r=new Array(s-1);++a<s;)r[a-1]=Zp(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?i:t[Sn(r,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(we),n()},o.range=function(a){return arguments.length?(t=Array.from(a),n()):t.slice()},o.unknown=function(a){return arguments.length?(i=a,o):i},o.quantiles=function(){return r.slice()},o.copy=function(){return mb().domain(e).range(t).unknown(i)},$t.apply(o,arguments)}function gb(){var e=0,t=1,r=1,i=[.5],n=[0,1],o;function a(c){return c!=null&&c<=c?n[Sn(i,c,0,r)]:o}function s(){var c=-1;for(i=new Array(r);++c<r;)i[c]=((c+1)*t-(c-r)*e)/(r+1);return a}return a.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,s()):[e,t]},a.range=function(c){return arguments.length?(r=(n=Array.from(c)).length-1,s()):n.slice()},a.invertExtent=function(c){var l=n.indexOf(c);return l<0?[NaN,NaN]:l<1?[e,i[0]]:l>=r?[i[r-1],t]:[i[l-1],i[l]]},a.unknown=function(c){return arguments.length&&(o=c),a},a.thresholds=function(){return i.slice()},a.copy=function(){return gb().domain([e,t]).range(n).unknown(o)},$t.apply(jn(a),arguments)}function pb(){var e=[.5],t=[0,1],r,i=1;function n(o){return o!=null&&o<=o?t[Sn(e,o,0,i)]:r}return n.domain=function(o){return arguments.length?(e=Array.from(o),i=Math.min(e.length,t.length-1),n):e.slice()},n.range=function(o){return arguments.length?(t=Array.from(o),i=Math.min(e.length,t.length-1),n):t.slice()},n.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},n.unknown=function(o){return arguments.length?(r=o,n):r},n.copy=function(){return pb().domain(e).range(t).unknown(r)},$t.apply(n,arguments)}const lc=new Date,cc=new Date;function Ee(e,t,r,i){function n(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return n.floor=o=>(e(o=new Date(+o)),o),n.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),n.round=o=>{const a=n(o),s=n.ceil(o);return o-a<s-o?a:s},n.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),n.range=(o,a,s)=>{const c=[];if(o=n.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return c;let l;do c.push(l=new Date(+o)),t(o,s),e(o);while(l<o&&o<a);return c},n.filter=o=>Ee(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),r&&(n.count=(o,a)=>(lc.setTime(+o),cc.setTime(+a),e(lc),e(cc),Math.floor(r(lc,cc))),n.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?n.filter(i?a=>i(a)%o===0:a=>n.count(0,a)%o===0):n)),n}const Jr=Ee(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jr.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ee(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Jr);const Vm=Jr.range,rn=1e3,yt=rn*60,on=yt*60,un=on*24,Bf=un*7,Wm=un*30,uc=un*365,an=Ee(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*rn)},(e,t)=>(t-e)/rn,e=>e.getUTCSeconds()),qm=an.range,Hs=Ee(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rn)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getMinutes()),iC=Hs.range,Xs=Ee(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*yt)},(e,t)=>(t-e)/yt,e=>e.getUTCMinutes()),oC=Xs.range,Js=Ee(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*rn-e.getMinutes()*yt)},(e,t)=>{e.setTime(+e+t*on)},(e,t)=>(t-e)/on,e=>e.getHours()),aC=Js.range,Ks=Ee(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*on)},(e,t)=>(t-e)/on,e=>e.getUTCHours()),sC=Ks.range,ui=Ee(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*yt)/un,e=>e.getDate()-1),lC=ui.range,No=Ee(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/un,e=>e.getUTCDate()-1),cC=No.range,Vf=Ee(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/un,e=>Math.floor(e/un)),uC=Vf.range;function fr(e){return Ee(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*yt)/Bf)}const Kr=fr(0),uo=fr(1),vb=fr(2),bb=fr(3),nr=fr(4),yb=fr(5),_b=fr(6),Gm=Kr.range,fC=uo.range,dC=vb.range,hC=bb.range,mC=nr.range,gC=yb.range,pC=_b.range;function dr(e){return Ee(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Bf)}const Qr=dr(0),fo=dr(1),xb=dr(2),wb=dr(3),rr=dr(4),$b=dr(5),Sb=dr(6),Ym=Qr.range,vC=fo.range,bC=xb.range,yC=wb.range,_C=rr.range,xC=$b.range,wC=Sb.range,Qs=Ee(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),$C=Qs.range,el=Ee(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),SC=el.range,Vt=Ee(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Vt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ee(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});const kC=Vt.range,Wt=Ee(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Wt.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ee(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});const IC=Wt.range;function kb(e,t,r,i,n,o){const a=[[an,1,rn],[an,5,5*rn],[an,15,15*rn],[an,30,30*rn],[o,1,yt],[o,5,5*yt],[o,15,15*yt],[o,30,30*yt],[n,1,on],[n,3,3*on],[n,6,6*on],[n,12,12*on],[i,1,un],[i,2,2*un],[r,1,Bf],[t,1,Wm],[t,3,3*Wm],[e,1,uc]];function s(l,u,f){const d=u<l;d&&([l,u]=[u,l]);const h=f&&typeof f.range=="function"?f:c(l,u,f),p=h?h.range(l,+u+1):[];return d?p.reverse():p}function c(l,u,f){const d=Math.abs(u-l)/f,h=Ss(([,,v])=>v).right(a,d);if(h===a.length)return e.every(Ca(l/uc,u/uc,f));if(h===0)return Jr.every(Math.max(Ca(l,u,f),1));const[p,g]=a[d/a[h-1][2]<a[h][2]/d?h-1:h];return p.every(g)}return[s,c]}const[Ib,Nb]=kb(Wt,el,Qr,Vf,Ks,Xs),[Eb,Mb]=kb(Vt,Qs,Kr,ui,Js,Hs);function fc(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function dc(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function _i(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Tb(e){var t=e.dateTime,r=e.date,i=e.time,n=e.periods,o=e.days,a=e.shortDays,s=e.months,c=e.shortMonths,l=xi(n),u=wi(n),f=xi(o),d=wi(o),h=xi(a),p=wi(a),g=xi(s),v=wi(s),b=xi(c),_=wi(c),x={a:R,A:P,b:U,B:L,c:null,d:eg,e:eg,f:HC,g:o8,G:s8,H:qC,I:GC,j:YC,L:Cb,m:XC,M:JC,p:Z,q:G,Q:rg,s:ig,S:KC,u:QC,U:e8,V:t8,w:n8,W:r8,x:null,X:null,y:i8,Y:a8,Z:l8,"%":ng},y={a:ne,A:ee,b:oe,B:ve,c:null,d:tg,e:tg,f:d8,g:w8,G:S8,H:c8,I:u8,j:f8,L:jb,m:h8,M:m8,p:H,q:he,Q:rg,s:ig,S:g8,u:p8,U:v8,V:b8,w:y8,W:_8,x:null,X:null,y:x8,Y:$8,Z:k8,"%":ng},w={a:j,A:M,b:D,B:O,c:I,d:Km,e:Km,f:ZC,g:Jm,G:Xm,H:Qm,I:Qm,j:UC,L:FC,m:DC,M:zC,p:C,q:RC,Q:VC,s:WC,S:LC,u:CC,U:AC,V:jC,w:TC,W:PC,x:A,X:T,y:Jm,Y:Xm,Z:OC,"%":BC};x.x=S(r,x),x.X=S(i,x),x.c=S(t,x),y.x=S(r,y),y.X=S(i,y),y.c=S(t,y);function S(F,K){return function(re){var z=[],me=-1,de=0,We=F.length,qe,te,$e;for(re instanceof Date||(re=new Date(+re));++me<We;)F.charCodeAt(me)===37&&(z.push(F.slice(de,me)),(te=Hm[qe=F.charAt(++me)])!=null?qe=F.charAt(++me):te=qe==="e"?" ":"0",($e=K[qe])&&(qe=$e(re,te)),z.push(qe),de=me+1);return z.push(F.slice(de,me)),z.join("")}}function k(F,K){return function(re){var z=_i(1900,void 0,1),me=N(z,F,re+="",0),de,We;if(me!=re.length)return null;if("Q"in z)return new Date(z.Q);if("s"in z)return new Date(z.s*1e3+("L"in z?z.L:0));if(K&&!("Z"in z)&&(z.Z=0),"p"in z&&(z.H=z.H%12+z.p*12),z.m===void 0&&(z.m="q"in z?z.q:0),"V"in z){if(z.V<1||z.V>53)return null;"w"in z||(z.w=1),"Z"in z?(de=dc(_i(z.y,0,1)),We=de.getUTCDay(),de=We>4||We===0?fo.ceil(de):fo(de),de=No.offset(de,(z.V-1)*7),z.y=de.getUTCFullYear(),z.m=de.getUTCMonth(),z.d=de.getUTCDate()+(z.w+6)%7):(de=fc(_i(z.y,0,1)),We=de.getDay(),de=We>4||We===0?uo.ceil(de):uo(de),de=ui.offset(de,(z.V-1)*7),z.y=de.getFullYear(),z.m=de.getMonth(),z.d=de.getDate()+(z.w+6)%7)}else("W"in z||"U"in z)&&("w"in z||(z.w="u"in z?z.u%7:"W"in z?1:0),We="Z"in z?dc(_i(z.y,0,1)).getUTCDay():fc(_i(z.y,0,1)).getDay(),z.m=0,z.d="W"in z?(z.w+6)%7+z.W*7-(We+5)%7:z.w+z.U*7-(We+6)%7);return"Z"in z?(z.H+=z.Z/100|0,z.M+=z.Z%100,dc(z)):fc(z)}}function N(F,K,re,z){for(var me=0,de=K.length,We=re.length,qe,te;me<de;){if(z>=We)return-1;if(qe=K.charCodeAt(me++),qe===37){if(qe=K.charAt(me++),te=w[qe in Hm?K.charAt(me++):qe],!te||(z=te(F,re,z))<0)return-1}else if(qe!=re.charCodeAt(z++))return-1}return z}function C(F,K,re){var z=l.exec(K.slice(re));return z?(F.p=u.get(z[0].toLowerCase()),re+z[0].length):-1}function j(F,K,re){var z=h.exec(K.slice(re));return z?(F.w=p.get(z[0].toLowerCase()),re+z[0].length):-1}function M(F,K,re){var z=f.exec(K.slice(re));return z?(F.w=d.get(z[0].toLowerCase()),re+z[0].length):-1}function D(F,K,re){var z=b.exec(K.slice(re));return z?(F.m=_.get(z[0].toLowerCase()),re+z[0].length):-1}function O(F,K,re){var z=g.exec(K.slice(re));return z?(F.m=v.get(z[0].toLowerCase()),re+z[0].length):-1}function I(F,K,re){return N(F,t,K,re)}function A(F,K,re){return N(F,r,K,re)}function T(F,K,re){return N(F,i,K,re)}function R(F){return a[F.getDay()]}function P(F){return o[F.getDay()]}function U(F){return c[F.getMonth()]}function L(F){return s[F.getMonth()]}function Z(F){return n[+(F.getHours()>=12)]}function G(F){return 1+~~(F.getMonth()/3)}function ne(F){return a[F.getUTCDay()]}function ee(F){return o[F.getUTCDay()]}function oe(F){return c[F.getUTCMonth()]}function ve(F){return s[F.getUTCMonth()]}function H(F){return n[+(F.getUTCHours()>=12)]}function he(F){return 1+~~(F.getUTCMonth()/3)}return{format:function(F){var K=S(F+="",x);return K.toString=function(){return F},K},parse:function(F){var K=k(F+="",!1);return K.toString=function(){return F},K},utcFormat:function(F){var K=S(F+="",y);return K.toString=function(){return F},K},utcParse:function(F){var K=k(F+="",!0);return K.toString=function(){return F},K}}}var Hm={"-":"",_:" ",0:"0"},De=/^\s*\d+/,NC=/^%/,EC=/[\\^$*+?|[\]().{}]/g;function fe(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",o=n.length;return i+(o<r?new Array(r-o+1).join(t)+n:n)}function MC(e){return e.replace(EC,"\\$&")}function xi(e){return new RegExp("^(?:"+e.map(MC).join("|")+")","i")}function wi(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function TC(e,t,r){var i=De.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function CC(e,t,r){var i=De.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function AC(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function jC(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function PC(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function Xm(e,t,r){var i=De.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function Jm(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function OC(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function RC(e,t,r){var i=De.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function DC(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function Km(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function UC(e,t,r){var i=De.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function Qm(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function zC(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function LC(e,t,r){var i=De.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function FC(e,t,r){var i=De.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function ZC(e,t,r){var i=De.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function BC(e,t,r){var i=NC.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function VC(e,t,r){var i=De.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function WC(e,t,r){var i=De.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function eg(e,t){return fe(e.getDate(),t,2)}function qC(e,t){return fe(e.getHours(),t,2)}function GC(e,t){return fe(e.getHours()%12||12,t,2)}function YC(e,t){return fe(1+ui.count(Vt(e),e),t,3)}function Cb(e,t){return fe(e.getMilliseconds(),t,3)}function HC(e,t){return Cb(e,t)+"000"}function XC(e,t){return fe(e.getMonth()+1,t,2)}function JC(e,t){return fe(e.getMinutes(),t,2)}function KC(e,t){return fe(e.getSeconds(),t,2)}function QC(e){var t=e.getDay();return t===0?7:t}function e8(e,t){return fe(Kr.count(Vt(e)-1,e),t,2)}function Ab(e){var t=e.getDay();return t>=4||t===0?nr(e):nr.ceil(e)}function t8(e,t){return e=Ab(e),fe(nr.count(Vt(e),e)+(Vt(e).getDay()===4),t,2)}function n8(e){return e.getDay()}function r8(e,t){return fe(uo.count(Vt(e)-1,e),t,2)}function i8(e,t){return fe(e.getFullYear()%100,t,2)}function o8(e,t){return e=Ab(e),fe(e.getFullYear()%100,t,2)}function a8(e,t){return fe(e.getFullYear()%1e4,t,4)}function s8(e,t){var r=e.getDay();return e=r>=4||r===0?nr(e):nr.ceil(e),fe(e.getFullYear()%1e4,t,4)}function l8(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+fe(t/60|0,"0",2)+fe(t%60,"0",2)}function tg(e,t){return fe(e.getUTCDate(),t,2)}function c8(e,t){return fe(e.getUTCHours(),t,2)}function u8(e,t){return fe(e.getUTCHours()%12||12,t,2)}function f8(e,t){return fe(1+No.count(Wt(e),e),t,3)}function jb(e,t){return fe(e.getUTCMilliseconds(),t,3)}function d8(e,t){return jb(e,t)+"000"}function h8(e,t){return fe(e.getUTCMonth()+1,t,2)}function m8(e,t){return fe(e.getUTCMinutes(),t,2)}function g8(e,t){return fe(e.getUTCSeconds(),t,2)}function p8(e){var t=e.getUTCDay();return t===0?7:t}function v8(e,t){return fe(Qr.count(Wt(e)-1,e),t,2)}function Pb(e){var t=e.getUTCDay();return t>=4||t===0?rr(e):rr.ceil(e)}function b8(e,t){return e=Pb(e),fe(rr.count(Wt(e),e)+(Wt(e).getUTCDay()===4),t,2)}function y8(e){return e.getUTCDay()}function _8(e,t){return fe(fo.count(Wt(e)-1,e),t,2)}function x8(e,t){return fe(e.getUTCFullYear()%100,t,2)}function w8(e,t){return e=Pb(e),fe(e.getUTCFullYear()%100,t,2)}function $8(e,t){return fe(e.getUTCFullYear()%1e4,t,4)}function S8(e,t){var r=e.getUTCDay();return e=r>=4||r===0?rr(e):rr.ceil(e),fe(e.getUTCFullYear()%1e4,t,4)}function k8(){return"+0000"}function ng(){return"%"}function rg(e){return+e}function ig(e){return Math.floor(+e/1e3)}var $r,Wf,Ob,tl,qf;Rb({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Rb(e){return $r=Tb(e),Wf=$r.format,Ob=$r.parse,tl=$r.utcFormat,qf=$r.utcParse,$r}var Db="%Y-%m-%dT%H:%M:%S.%LZ";function I8(e){return e.toISOString()}var N8=Date.prototype.toISOString?I8:tl(Db);function E8(e){var t=new Date(e);return isNaN(t)?null:t}var M8=+new Date("2000-01-01T00:00:00.000Z")?E8:qf(Db);function T8(e){return new Date(e)}function C8(e){return e instanceof Date?+e:+new Date(+e)}function Gf(e,t,r,i,n,o,a,s,c,l){var u=Uf(),f=u.invert,d=u.domain,h=l(".%L"),p=l(":%S"),g=l("%I:%M"),v=l("%I %p"),b=l("%a %d"),_=l("%b %d"),x=l("%B"),y=l("%Y");function w(S){return(c(S)<S?h:s(S)<S?p:a(S)<S?g:o(S)<S?v:i(S)<S?n(S)<S?b:_:r(S)<S?x:y)(S)}return u.invert=function(S){return new Date(f(S))},u.domain=function(S){return arguments.length?d(Array.from(S,C8)):d().map(T8)},u.ticks=function(S){var k=d();return e(k[0],k[k.length-1],S??10)},u.tickFormat=function(S,k){return k==null?w:l(k)},u.nice=function(S){var k=d();return(!S||typeof S.range!="function")&&(S=t(k[0],k[k.length-1],S??10)),S?d(ub(k,S)):u},u.copy=function(){return Io(u,Gf(e,t,r,i,n,o,a,s,c,l))},u}function A8(){return $t.apply(Gf(Eb,Mb,Vt,Qs,Kr,ui,Js,Hs,an,Wf).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function j8(){return $t.apply(Gf(Ib,Nb,Wt,el,Qr,No,Ks,Xs,an,tl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function nl(){var e=0,t=1,r,i,n,o,a=Ke,s=!1,c;function l(f){return f==null||isNaN(f=+f)?c:a(n===0?.5:(f=(o(f)-r)*n,s?Math.max(0,Math.min(1,f)):f))}l.domain=function(f){return arguments.length?([e,t]=f,r=o(e=+e),i=o(t=+t),n=r===i?0:1/(i-r),l):[e,t]},l.clamp=function(f){return arguments.length?(s=!!f,l):s},l.interpolator=function(f){return arguments.length?(a=f,l):a};function u(f){return function(d){var h,p;return arguments.length?([h,p]=d,a=f(h,p),l):[a(0),a(1)]}}return l.range=u(An),l.rangeRound=u(Os),l.unknown=function(f){return arguments.length?(c=f,l):c},function(f){return o=f,r=f(e),i=f(t),n=r===i?0:1/(i-r),l}}function Pn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Ub(){var e=jn(nl()(Ke));return e.copy=function(){return Pn(e,Ub())},hn.apply(e,arguments)}function zb(){var e=zf(nl()).domain([1,10]);return e.copy=function(){return Pn(e,zb()).base(e.base())},hn.apply(e,arguments)}function Lb(){var e=Lf(nl());return e.copy=function(){return Pn(e,Lb()).constant(e.constant())},hn.apply(e,arguments)}function Yf(){var e=Ff(nl());return e.copy=function(){return Pn(e,Yf()).exponent(e.exponent())},hn.apply(e,arguments)}function P8(){return Yf.apply(null,arguments).exponent(.5)}function Fb(){var e=[],t=Ke;function r(i){if(i!=null&&!isNaN(i=+i))return t((Sn(e,i,1)-1)/(e.length-1))}return r.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let n of i)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(we),r},r.interpolator=function(i){return arguments.length?(t=i,r):t},r.range=function(){return e.map((i,n)=>t(n/(e.length-1)))},r.quantiles=function(i){return Array.from({length:i+1},(n,o)=>Xi(e,o/i))},r.copy=function(){return Fb(t).domain(e)},hn.apply(r,arguments)}function rl(){var e=0,t=.5,r=1,i=1,n,o,a,s,c,l=Ke,u,f=!1,d;function h(g){return isNaN(g=+g)?d:(g=.5+((g=+u(g))-o)*(i*g<i*o?s:c),l(f?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t,r]=g,n=u(e=+e),o=u(t=+t),a=u(r=+r),s=n===o?0:.5/(o-n),c=o===a?0:.5/(a-o),i=o<n?-1:1,h):[e,t,r]},h.clamp=function(g){return arguments.length?(f=!!g,h):f},h.interpolator=function(g){return arguments.length?(l=g,h):l};function p(g){return function(v){var b,_,x;return arguments.length?([b,_,x]=v,l=Pv(g,[b,_,x]),h):[l(0),l(.5),l(1)]}}return h.range=p(An),h.rangeRound=p(Os),h.unknown=function(g){return arguments.length?(d=g,h):d},function(g){return u=g,n=g(e),o=g(t),a=g(r),s=n===o?0:.5/(o-n),c=o===a?0:.5/(a-o),i=o<n?-1:1,h}}function Zb(){var e=jn(rl()(Ke));return e.copy=function(){return Pn(e,Zb())},hn.apply(e,arguments)}function Bb(){var e=zf(rl()).domain([.1,1,10]);return e.copy=function(){return Pn(e,Bb()).base(e.base())},hn.apply(e,arguments)}function Vb(){var e=Lf(rl());return e.copy=function(){return Pn(e,Vb()).constant(e.constant())},hn.apply(e,arguments)}function Hf(){var e=Ff(rl());return e.copy=function(){return Pn(e,Hf()).exponent(e.exponent())},hn.apply(e,arguments)}function O8(){return Hf.apply(null,arguments).exponent(.5)}function se(e){for(var t=e.length/6|0,r=new Array(t),i=0;i<t;)r[i]="#"+e.slice(i*6,++i*6);return r}const R8=se("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),D8=se("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),U8=se("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),z8=se("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),L8=se("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),F8=se("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Z8=se("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),B8=se("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),V8=se("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),W8=se("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),q8=se("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),pe=e=>xv(e[e.length-1]);var Wb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(se);const G8=pe(Wb);var qb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(se);const Y8=pe(qb);var Gb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(se);const H8=pe(Gb);var Yb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(se);const X8=pe(Yb);var Hb=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(se);const J8=pe(Hb);var Xb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(se);const K8=pe(Xb);var Jb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(se);const Q8=pe(Jb);var Kb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(se);const eA=pe(Kb);var Qb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(se);const tA=pe(Qb);var e1=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(se);const nA=pe(e1);var t1=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(se);const rA=pe(t1);var n1=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(se);const iA=pe(n1);var r1=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(se);const oA=pe(r1);var i1=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(se);const aA=pe(i1);var o1=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(se);const sA=pe(o1);var a1=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(se);const lA=pe(a1);var s1=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(se);const cA=pe(s1);var l1=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(se);const uA=pe(l1);var c1=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(se);const fA=pe(c1);var u1=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(se);const dA=pe(u1);var f1=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(se);const hA=pe(f1);var d1=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(se);const mA=pe(d1);var h1=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(se);const gA=pe(h1);var m1=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(se);const pA=pe(m1);var g1=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(se);const vA=pe(g1);var p1=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(se);const bA=pe(p1);var v1=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(se);const yA=pe(v1);function _A(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const xA=Rs(Et(300,.5,0),Et(-240,.5,1));var wA=Rs(Et(-100,.75,.35),Et(80,1.5,.8)),$A=Rs(Et(260,.75,.35),Et(80,1.5,.8)),Qo=Et();function SA(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Qo.h=360*e-100,Qo.s=1.5-1.5*t,Qo.l=.8-.9*t,Qo+""}var ea=Br(),kA=Math.PI/3,IA=Math.PI*2/3;function NA(e){var t;return e=(.5-e)*Math.PI,ea.r=255*(t=Math.sin(e))*t,ea.g=255*(t=Math.sin(e+kA))*t,ea.b=255*(t=Math.sin(e+IA))*t,ea+""}function EA(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function il(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}const MA=il(se("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var TA=il(se("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),CA=il(se("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),AA=il(se("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ie(e){return function(){return e}}const og=Math.abs,Be=Math.atan2,en=Math.cos,jA=Math.max,Rr=Math.min,ot=Math.sin,ye=Math.sqrt,Ve=1e-12,Nn=Math.PI,ms=Nn/2,$n=2*Nn;function PA(e){return e>1?0:e<-1?Nn:Math.acos(e)}function ag(e){return e>=1?ms:e<=-1?-ms:Math.asin(e)}function Eo(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new yo(t)}function OA(e){return e.innerRadius}function RA(e){return e.outerRadius}function DA(e){return e.startAngle}function UA(e){return e.endAngle}function zA(e){return e&&e.padAngle}function LA(e,t,r,i,n,o,a,s){var c=r-e,l=i-t,u=a-n,f=s-o,d=f*c-u*l;if(!(d*d<Ve))return d=(u*(t-o)-f*(e-n))/d,[e+d*c,t+d*l]}function ta(e,t,r,i,n,o,a){var s=e-r,c=t-i,l=(a?o:-o)/ye(s*s+c*c),u=l*c,f=-l*s,d=e+u,h=t+f,p=r+u,g=i+f,v=(d+p)/2,b=(h+g)/2,_=p-d,x=g-h,y=_*_+x*x,w=n-o,S=d*g-p*h,k=(x<0?-1:1)*ye(jA(0,w*w*y-S*S)),N=(S*x-_*k)/y,C=(-S*_-x*k)/y,j=(S*x+_*k)/y,M=(-S*_+x*k)/y,D=N-v,O=C-b,I=j-v,A=M-b;return D*D+O*O>I*I+A*A&&(N=j,C=M),{cx:N,cy:C,x01:-u,y01:-f,x11:N*(n/w-1),y11:C*(n/w-1)}}function FA(){var e=OA,t=RA,r=ie(0),i=null,n=DA,o=UA,a=zA,s=null,c=Eo(l);function l(){var u,f,d=+e.apply(this,arguments),h=+t.apply(this,arguments),p=n.apply(this,arguments)-ms,g=o.apply(this,arguments)-ms,v=og(g-p),b=g>p;if(s||(s=u=c()),h<d&&(f=h,h=d,d=f),!(h>Ve))s.moveTo(0,0);else if(v>$n-Ve)s.moveTo(h*en(p),h*ot(p)),s.arc(0,0,h,p,g,!b),d>Ve&&(s.moveTo(d*en(g),d*ot(g)),s.arc(0,0,d,g,p,b));else{var _=p,x=g,y=p,w=g,S=v,k=v,N=a.apply(this,arguments)/2,C=N>Ve&&(i?+i.apply(this,arguments):ye(d*d+h*h)),j=Rr(og(h-d)/2,+r.apply(this,arguments)),M=j,D=j,O,I;if(C>Ve){var A=ag(C/d*ot(N)),T=ag(C/h*ot(N));(S-=A*2)>Ve?(A*=b?1:-1,y+=A,w-=A):(S=0,y=w=(p+g)/2),(k-=T*2)>Ve?(T*=b?1:-1,_+=T,x-=T):(k=0,_=x=(p+g)/2)}var R=h*en(_),P=h*ot(_),U=d*en(w),L=d*ot(w);if(j>Ve){var Z=h*en(x),G=h*ot(x),ne=d*en(y),ee=d*ot(y),oe;if(v<Nn)if(oe=LA(R,P,ne,ee,Z,G,U,L)){var ve=R-oe[0],H=P-oe[1],he=Z-oe[0],F=G-oe[1],K=1/ot(PA((ve*he+H*F)/(ye(ve*ve+H*H)*ye(he*he+F*F)))/2),re=ye(oe[0]*oe[0]+oe[1]*oe[1]);M=Rr(j,(d-re)/(K-1)),D=Rr(j,(h-re)/(K+1))}else M=D=0}k>Ve?D>Ve?(O=ta(ne,ee,R,P,h,D,b),I=ta(Z,G,U,L,h,D,b),s.moveTo(O.cx+O.x01,O.cy+O.y01),D<j?s.arc(O.cx,O.cy,D,Be(O.y01,O.x01),Be(I.y01,I.x01),!b):(s.arc(O.cx,O.cy,D,Be(O.y01,O.x01),Be(O.y11,O.x11),!b),s.arc(0,0,h,Be(O.cy+O.y11,O.cx+O.x11),Be(I.cy+I.y11,I.cx+I.x11),!b),s.arc(I.cx,I.cy,D,Be(I.y11,I.x11),Be(I.y01,I.x01),!b))):(s.moveTo(R,P),s.arc(0,0,h,_,x,!b)):s.moveTo(R,P),!(d>Ve)||!(S>Ve)?s.lineTo(U,L):M>Ve?(O=ta(U,L,Z,G,d,-M,b),I=ta(R,P,ne,ee,d,-M,b),s.lineTo(O.cx+O.x01,O.cy+O.y01),M<j?s.arc(O.cx,O.cy,M,Be(O.y01,O.x01),Be(I.y01,I.x01),!b):(s.arc(O.cx,O.cy,M,Be(O.y01,O.x01),Be(O.y11,O.x11),!b),s.arc(0,0,d,Be(O.cy+O.y11,O.cx+O.x11),Be(I.cy+I.y11,I.cx+I.x11),b),s.arc(I.cx,I.cy,M,Be(I.y11,I.x11),Be(I.y01,I.x01),!b))):s.arc(0,0,d,w,y,b)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,f=(+n.apply(this,arguments)+ +o.apply(this,arguments))/2-Nn/2;return[en(f)*u,ot(f)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:ie(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:ie(+u),l):t},l.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:ie(+u),l):r},l.padRadius=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:ie(+u),l):i},l.startAngle=function(u){return arguments.length?(n=typeof u=="function"?u:ie(+u),l):n},l.endAngle=function(u){return arguments.length?(o=typeof u=="function"?u:ie(+u),l):o},l.padAngle=function(u){return arguments.length?(a=typeof u=="function"?u:ie(+u),l):a},l.context=function(u){return arguments.length?(s=u??null,l):s},l}var ZA=Array.prototype.slice;function ol(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b1(e){this._context=e}b1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function al(e){return new b1(e)}function Xf(e){return e[0]}function Jf(e){return e[1]}function Kf(e,t){var r=ie(!0),i=null,n=al,o=null,a=Eo(s);e=typeof e=="function"?e:e===void 0?Xf:ie(e),t=typeof t=="function"?t:t===void 0?Jf:ie(t);function s(c){var l,u=(c=ol(c)).length,f,d=!1,h;for(i==null&&(o=n(h=a())),l=0;l<=u;++l)!(l<u&&r(f=c[l],l,c))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+e(f,l,c),+t(f,l,c));if(h)return o=null,h+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:ie(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:ie(+c),s):t},s.defined=function(c){return arguments.length?(r=typeof c=="function"?c:ie(!!c),s):r},s.curve=function(c){return arguments.length?(n=c,i!=null&&(o=n(i)),s):n},s.context=function(c){return arguments.length?(c==null?i=o=null:o=n(i=c),s):i},s}function y1(e,t,r){var i=null,n=ie(!0),o=null,a=al,s=null,c=Eo(l);e=typeof e=="function"?e:e===void 0?Xf:ie(+e),t=typeof t=="function"?t:ie(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?Jf:ie(+r);function l(f){var d,h,p,g=(f=ol(f)).length,v,b=!1,_,x=new Array(g),y=new Array(g);for(o==null&&(s=a(_=c())),d=0;d<=g;++d){if(!(d<g&&n(v=f[d],d,f))===b)if(b=!b)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(x[p],y[p]);s.lineEnd(),s.areaEnd()}b&&(x[d]=+e(v,d,f),y[d]=+t(v,d,f),s.point(i?+i(v,d,f):x[d],r?+r(v,d,f):y[d]))}if(_)return s=null,_+""||null}function u(){return Kf().defined(n).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),i=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ie(+f),l):e},l.x1=function(f){return arguments.length?(i=f==null?null:typeof f=="function"?f:ie(+f),l):i},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),r=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ie(+f),l):t},l.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ie(+f),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(i).y(t)},l.defined=function(f){return arguments.length?(n=typeof f=="function"?f:ie(!!f),l):n},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}function BA(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function VA(e){return e}function WA(){var e=VA,t=BA,r=null,i=ie(0),n=ie($n),o=ie(0);function a(s){var c,l=(s=ol(s)).length,u,f,d=0,h=new Array(l),p=new Array(l),g=+i.apply(this,arguments),v=Math.min($n,Math.max(-$n,n.apply(this,arguments)-g)),b,_=Math.min(Math.abs(v)/l,o.apply(this,arguments)),x=_*(v<0?-1:1),y;for(c=0;c<l;++c)(y=p[h[c]=c]=+e(s[c],c,s))>0&&(d+=y);for(t!=null?h.sort(function(w,S){return t(p[w],p[S])}):r!=null&&h.sort(function(w,S){return r(s[w],s[S])}),c=0,f=d?(v-l*x)/d:0;c<l;++c,g=b)u=h[c],y=p[u],b=g+(y>0?y*f:0)+x,p[u]={data:s[u],index:c,value:y,startAngle:g,endAngle:b,padAngle:_};return p}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:ie(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,r=null,a):t},a.sort=function(s){return arguments.length?(r=s,t=null,a):r},a.startAngle=function(s){return arguments.length?(i=typeof s=="function"?s:ie(+s),a):i},a.endAngle=function(s){return arguments.length?(n=typeof s=="function"?s:ie(+s),a):n},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:ie(+s),a):o},a}var _1=Qf(al);function x1(e){this._curve=e}x1.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Qf(e){function t(r){return new x1(e(r))}return t._curve=e,t}function Ui(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(Qf(r)):t()._curve},e}function sg(){return Ui(Kf().curve(_1))}function lg(){var e=y1().curve(_1),t=e.curve,r=e.lineX0,i=e.lineX1,n=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Ui(r())},delete e.lineX0,e.lineEndAngle=function(){return Ui(i())},delete e.lineX1,e.lineInnerRadius=function(){return Ui(n())},delete e.lineY0,e.lineOuterRadius=function(){return Ui(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Qf(a)):t()._curve},e}function zi(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}class w1{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}class qA{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,r){if(t=+t,r=+r,this._point===0)this._point=1;else{const i=zi(this._x0,this._y0),n=zi(this._x0,this._y0=(this._y0+r)/2),o=zi(t,this._y0),a=zi(t,r);this._context.moveTo(...i),this._context.bezierCurveTo(...n,...o,...a)}this._x0=t,this._y0=r}}function $1(e){return new w1(e,!0)}function S1(e){return new w1(e,!1)}function GA(e){return new qA(e)}function YA(e){return e.source}function HA(e){return e.target}function sl(e){let t=YA,r=HA,i=Xf,n=Jf,o=null,a=null,s=Eo(c);function c(){let l;const u=ZA.call(arguments),f=t.apply(this,u),d=r.apply(this,u);if(o==null&&(a=e(l=s())),a.lineStart(),u[0]=f,a.point(+i.apply(this,u),+n.apply(this,u)),u[0]=d,a.point(+i.apply(this,u),+n.apply(this,u)),a.lineEnd(),l)return a=null,l+""||null}return c.source=function(l){return arguments.length?(t=l,c):t},c.target=function(l){return arguments.length?(r=l,c):r},c.x=function(l){return arguments.length?(i=typeof l=="function"?l:ie(+l),c):i},c.y=function(l){return arguments.length?(n=typeof l=="function"?l:ie(+l),c):n},c.context=function(l){return arguments.length?(l==null?o=a=null:a=e(o=l),c):o},c}function XA(){return sl($1)}function JA(){return sl(S1)}function KA(){const e=sl(GA);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const QA=ye(3),k1={draw(e,t){const r=ye(t+Rr(t/28,.75))*.59436,i=r/2,n=i*QA;e.moveTo(0,r),e.lineTo(0,-r),e.moveTo(-n,-i),e.lineTo(n,i),e.moveTo(-n,i),e.lineTo(n,-i)}},ll={draw(e,t){const r=ye(t/Nn);e.moveTo(r,0),e.arc(0,0,r,0,$n)}},I1={draw(e,t){const r=ye(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},N1=ye(1/3),ej=N1*2,E1={draw(e,t){const r=ye(t/ej),i=r*N1;e.moveTo(0,-r),e.lineTo(i,0),e.lineTo(0,r),e.lineTo(-i,0),e.closePath()}},M1={draw(e,t){const r=ye(t)*.62625;e.moveTo(0,-r),e.lineTo(r,0),e.lineTo(0,r),e.lineTo(-r,0),e.closePath()}},T1={draw(e,t){const r=ye(t-Rr(t/7,2))*.87559;e.moveTo(-r,0),e.lineTo(r,0),e.moveTo(0,r),e.lineTo(0,-r)}},C1={draw(e,t){const r=ye(t),i=-r/2;e.rect(i,i,r,r)}},A1={draw(e,t){const r=ye(t)*.4431;e.moveTo(r,r),e.lineTo(r,-r),e.lineTo(-r,-r),e.lineTo(-r,r),e.closePath()}},tj=.8908130915292852,j1=ot(Nn/10)/ot(7*Nn/10),nj=ot($n/10)*j1,rj=-en($n/10)*j1,P1={draw(e,t){const r=ye(t*tj),i=nj*r,n=rj*r;e.moveTo(0,-r),e.lineTo(i,n);for(let o=1;o<5;++o){const a=$n*o/5,s=en(a),c=ot(a);e.lineTo(c*r,-s*r),e.lineTo(s*i-c*n,c*i+s*n)}e.closePath()}},hc=ye(3),O1={draw(e,t){const r=-ye(t/(hc*3));e.moveTo(0,r*2),e.lineTo(-hc*r,-r),e.lineTo(hc*r,-r),e.closePath()}},ij=ye(3),R1={draw(e,t){const r=ye(t)*.6824,i=r/2,n=r*ij/2;e.moveTo(0,-r),e.lineTo(n,i),e.lineTo(-n,i),e.closePath()}},ht=-.5,mt=ye(3)/2,Iu=1/ye(12),oj=(Iu/2+1)*3,D1={draw(e,t){const r=ye(t/oj),i=r/2,n=r*Iu,o=i,a=r*Iu+r,s=-o,c=a;e.moveTo(i,n),e.lineTo(o,a),e.lineTo(s,c),e.lineTo(ht*i-mt*n,mt*i+ht*n),e.lineTo(ht*o-mt*a,mt*o+ht*a),e.lineTo(ht*s-mt*c,mt*s+ht*c),e.lineTo(ht*i+mt*n,ht*n-mt*i),e.lineTo(ht*o+mt*a,ht*a-mt*o),e.lineTo(ht*s+mt*c,ht*c-mt*s),e.closePath()}},Nu={draw(e,t){const r=ye(t-Rr(t/6,1.7))*.6189;e.moveTo(-r,-r),e.lineTo(r,r),e.moveTo(-r,r),e.lineTo(r,-r)}},cg=[ll,I1,E1,C1,P1,O1,D1],aj=[ll,T1,Nu,R1,k1,A1,M1];function sj(e,t){let r=null,i=Eo(n);e=typeof e=="function"?e:ie(e||ll),t=typeof t=="function"?t:ie(t===void 0?64:+t);function n(){let o;if(r||(r=o=i()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return n.type=function(o){return arguments.length?(e=typeof o=="function"?o:ie(o),n):e},n.size=function(o){return arguments.length?(t=typeof o=="function"?o:ie(+o),n):t},n.context=function(o){return arguments.length?(r=o??null,n):r},n}function En(){}function gs(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function cl(e){this._context=e}cl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function lj(e){return new cl(e)}function U1(e){this._context=e}U1.prototype={areaStart:En,areaEnd:En,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:gs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function cj(e){return new U1(e)}function z1(e){this._context=e}z1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:gs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uj(e){return new z1(e)}function L1(e,t){this._basis=new cl(e),this._beta=t}L1.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],o=e[r]-i,a=t[r]-n,s=-1,c;++s<=r;)c=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(i+c*o),this._beta*t[s]+(1-this._beta)*(n+c*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const fj=(function e(t){function r(i){return t===1?new cl(i):new L1(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ps(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function ed(e,t){this._context=e,this._k=(1-t)/6}ed.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ps(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ps(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const dj=(function e(t){function r(i){return new ed(i,t)}return r.tension=function(i){return e(+i)},r})(0);function td(e,t){this._context=e,this._k=(1-t)/6}td.prototype={areaStart:En,areaEnd:En,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ps(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hj=(function e(t){function r(i){return new td(i,t)}return r.tension=function(i){return e(+i)},r})(0);function nd(e,t){this._context=e,this._k=(1-t)/6}nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ps(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const mj=(function e(t){function r(i){return new nd(i,t)}return r.tension=function(i){return e(+i)},r})(0);function rd(e,t,r){var i=e._x1,n=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Ve){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>Ve){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*l+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*l+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(i,n,o,a,e._x2,e._y2)}function F1(e,t){this._context=e,this._alpha=t}F1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:rd(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gj=(function e(t){function r(i){return t?new F1(i,t):new ed(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Z1(e,t){this._context=e,this._alpha=t}Z1.prototype={areaStart:En,areaEnd:En,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:rd(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pj=(function e(t){function r(i){return t?new Z1(i,t):new td(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function B1(e,t){this._context=e,this._alpha=t}B1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:rd(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vj=(function e(t){function r(i){return t?new B1(i,t):new nd(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function V1(e){this._context=e}V1.prototype={areaStart:En,areaEnd:En,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bj(e){return new V1(e)}function ug(e){return e<0?-1:1}function fg(e,t,r){var i=e._x1-e._x0,n=t-e._x1,o=(e._y1-e._y0)/(i||n<0&&-0),a=(r-e._y1)/(n||i<0&&-0),s=(o*n+a*i)/(i+n);return(ug(o)+ug(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function dg(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function mc(e,t,r){var i=e._x0,n=e._y0,o=e._x1,a=e._y1,s=(o-i)/3;e._context.bezierCurveTo(i+s,n+s*t,o-s,a-s*r,o,a)}function vs(e){this._context=e}vs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:mc(this,this._t0,dg(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,mc(this,dg(this,r=fg(this,e,t)),r);break;default:mc(this,this._t0,r=fg(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function W1(e){this._context=new q1(e)}(W1.prototype=Object.create(vs.prototype)).point=function(e,t){vs.prototype.point.call(this,t,e)};function q1(e){this._context=e}q1.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,o){this._context.bezierCurveTo(t,e,i,r,o,n)}};function yj(e){return new vs(e)}function _j(e){return new W1(e)}function G1(e){this._context=e}G1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=hg(e),n=hg(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],n[0][o],i[1][o],n[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function hg(e){var t,r=e.length-1,i,n=new Array(r),o=new Array(r),a=new Array(r);for(n[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(n[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)n[t]=(a[t]-n[t+1])/o[t];for(o[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-n[t+1];return[n,o]}function xj(e){return new G1(e)}function ul(e,t){this._context=e,this._t=t}ul.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function wj(e){return new ul(e,.5)}function $j(e){return new ul(e,0)}function Sj(e){return new ul(e,1)}function ei(e,t){if((a=e.length)>1)for(var r=1,i,n,o=e[t[0]],a,s=o.length;r<a;++r)for(n=o,o=e[t[r]],i=0;i<s;++i)o[i][1]+=o[i][0]=isNaN(n[i][1])?n[i][0]:n[i][1]}function ti(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function kj(e,t){return e[t]}function Ij(e){const t=[];return t.key=e,t}function Nj(){var e=ie([]),t=ti,r=ei,i=kj;function n(o){var a=Array.from(e.apply(this,arguments),Ij),s,c=a.length,l=-1,u;for(const f of o)for(s=0,++l;s<c;++s)(a[s][l]=[0,+i(f,a[s].key,l,o)]).data=f;for(s=0,u=ol(t(a));s<c;++s)a[u[s]].index=s;return r(a,u),a}return n.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ie(Array.from(o)),n):e},n.value=function(o){return arguments.length?(i=typeof o=="function"?o:ie(+o),n):i},n.order=function(o){return arguments.length?(t=o==null?ti:typeof o=="function"?o:ie(Array.from(o)),n):t},n.offset=function(o){return arguments.length?(r=o??ei,n):r},n}function Ej(e,t){if((i=e.length)>0){for(var r,i,n=0,o=e[0].length,a;n<o;++n){for(a=r=0;r<i;++r)a+=e[r][n][1]||0;if(a)for(r=0;r<i;++r)e[r][n][1]/=a}ei(e,t)}}function Mj(e,t){if((c=e.length)>0)for(var r,i=0,n,o,a,s,c,l=e[t[0]].length;i<l;++i)for(a=s=0,r=0;r<c;++r)(o=(n=e[t[r]][i])[1]-n[0])>0?(n[0]=a,n[1]=a+=o):o<0?(n[1]=s,n[0]=s+=o):(n[0]=0,n[1]=o)}function Tj(e,t){if((n=e.length)>0){for(var r=0,i=e[t[0]],n,o=i.length;r<o;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;i[r][1]+=i[r][0]=-s/2}ei(e,t)}}function Cj(e,t){if(!(!((a=e.length)>0)||!((o=(n=e[t[0]]).length)>0))){for(var r=0,i=1,n,o,a;i<o;++i){for(var s=0,c=0,l=0;s<a;++s){for(var u=e[t[s]],f=u[i][1]||0,d=u[i-1][1]||0,h=(f-d)/2,p=0;p<s;++p){var g=e[t[p]],v=g[i][1]||0,b=g[i-1][1]||0;h+=v-b}c+=f,l+=h*f}n[i-1][1]+=n[i-1][0]=r,c&&(r-=l/c)}n[i-1][1]+=n[i-1][0]=r,ei(e,t)}}function Y1(e){var t=e.map(Aj);return ti(e).sort(function(r,i){return t[r]-t[i]})}function Aj(e){for(var t=-1,r=0,i=e.length,n,o=-1/0;++t<i;)(n=+e[t][1])>o&&(o=n,r=t);return r}function H1(e){var t=e.map(X1);return ti(e).sort(function(r,i){return t[r]-t[i]})}function X1(e){for(var t=0,r=-1,i=e.length,n;++r<i;)(n=+e[r][1])&&(t+=n);return t}function jj(e){return H1(e).reverse()}function Pj(e){var t=e.length,r,i,n=e.map(X1),o=Y1(e),a=0,s=0,c=[],l=[];for(r=0;r<t;++r)i=o[r],a<s?(a+=n[i],c.push(i)):(s+=n[i],l.push(i));return l.reverse().concat(c)}function Oj(e){return ti(e).reverse()}const na=e=>()=>e;function Rj(e,{sourceEvent:t,target:r,transform:i,dispatch:n}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:n}})}function Ut(e,t,r){this.k=e,this.x=t,this.y=r}Ut.prototype={constructor:Ut,scale:function(e){return e===1?this:new Ut(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ut(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var fl=new Ut(1,0,0);J1.prototype=Ut.prototype;function J1(e){for(;!e.__zoom;)if(!(e=e.parentNode))return fl;return e.__zoom}function gc(e){e.stopImmediatePropagation()}function $i(e){e.preventDefault(),e.stopImmediatePropagation()}function Dj(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Uj(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function mg(){return this.__zoom||fl}function zj(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Lj(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fj(e,t,r){var i=e.invertX(t[0][0])-r[0][0],n=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(n>i?(i+n)/2:Math.min(0,i)||Math.max(0,n),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Zj(){var e=Dj,t=Uj,r=Fj,i=zj,n=Lj,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,c=Tv,l=sr("start","zoom","end"),u,f,d,h=500,p=150,g=0,v=10;function b(I){I.property("__zoom",mg).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",j).filter(n).on("touchstart.zoom",M).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(I,A,T,R){var P=I.selection?I.selection():I;P.property("__zoom",mg),I!==P?w(I,A,T,R):P.interrupt().each(function(){S(this,arguments).event(R).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},b.scaleBy=function(I,A,T,R){b.scaleTo(I,function(){var P=this.__zoom.k,U=typeof A=="function"?A.apply(this,arguments):A;return P*U},T,R)},b.scaleTo=function(I,A,T,R){b.transform(I,function(){var P=t.apply(this,arguments),U=this.__zoom,L=T==null?y(P):typeof T=="function"?T.apply(this,arguments):T,Z=U.invert(L),G=typeof A=="function"?A.apply(this,arguments):A;return r(x(_(U,G),L,Z),P,a)},T,R)},b.translateBy=function(I,A,T,R){b.transform(I,function(){return r(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof T=="function"?T.apply(this,arguments):T),t.apply(this,arguments),a)},null,R)},b.translateTo=function(I,A,T,R,P){b.transform(I,function(){var U=t.apply(this,arguments),L=this.__zoom,Z=R==null?y(U):typeof R=="function"?R.apply(this,arguments):R;return r(fl.translate(Z[0],Z[1]).scale(L.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof T=="function"?-T.apply(this,arguments):-T),U,a)},R,P)};function _(I,A){return A=Math.max(o[0],Math.min(o[1],A)),A===I.k?I:new Ut(A,I.x,I.y)}function x(I,A,T){var R=A[0]-T[0]*I.k,P=A[1]-T[1]*I.k;return R===I.x&&P===I.y?I:new Ut(I.k,R,P)}function y(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function w(I,A,T,R){I.on("start.zoom",function(){S(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(R).end()}).tween("zoom",function(){var P=this,U=arguments,L=S(P,U).event(R),Z=t.apply(P,U),G=T==null?y(Z):typeof T=="function"?T.apply(P,U):T,ne=Math.max(Z[1][0]-Z[0][0],Z[1][1]-Z[0][1]),ee=P.__zoom,oe=typeof A=="function"?A.apply(P,U):A,ve=c(ee.invert(G).concat(ne/ee.k),oe.invert(G).concat(ne/oe.k));return function(H){if(H===1)H=oe;else{var he=ve(H),F=ne/he[2];H=new Ut(F,G[0]-he[0]*F,G[1]-he[1]*F)}L.zoom(null,H)}})}function S(I,A,T){return!T&&I.__zooming||new k(I,A)}function k(I,A){this.that=I,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,A),this.taps=0}k.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,A){return this.mouse&&I!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var A=je(this.that).datum();l.call(I,this.that,new Rj(I,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:l}),A)}};function N(I,...A){if(!e.apply(this,arguments))return;var T=S(this,A).event(I),R=this.__zoom,P=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,i.apply(this,arguments)))),U=ct(I);if(T.wheel)(T.mouse[0][0]!==U[0]||T.mouse[0][1]!==U[1])&&(T.mouse[1]=R.invert(T.mouse[0]=U)),clearTimeout(T.wheel);else{if(R.k===P)return;T.mouse=[U,R.invert(U)],qn(this),T.start()}$i(I),T.wheel=setTimeout(L,p),T.zoom("mouse",r(x(_(R,P),T.mouse[0],T.mouse[1]),T.extent,a));function L(){T.wheel=null,T.end()}}function C(I,...A){if(d||!e.apply(this,arguments))return;var T=I.currentTarget,R=S(this,A,!0).event(I),P=je(I.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",ne,!0),U=ct(I,T),L=I.clientX,Z=I.clientY;Ts(I.view),gc(I),R.mouse=[U,this.__zoom.invert(U)],qn(this),R.start();function G(ee){if($i(ee),!R.moved){var oe=ee.clientX-L,ve=ee.clientY-Z;R.moved=oe*oe+ve*ve>g}R.event(ee).zoom("mouse",r(x(R.that.__zoom,R.mouse[0]=ct(ee,T),R.mouse[1]),R.extent,a))}function ne(ee){P.on("mousemove.zoom mouseup.zoom",null),Cs(ee.view,R.moved),$i(ee),R.event(ee).end()}}function j(I,...A){if(e.apply(this,arguments)){var T=this.__zoom,R=ct(I.changedTouches?I.changedTouches[0]:I,this),P=T.invert(R),U=T.k*(I.shiftKey?.5:2),L=r(x(_(T,U),R,P),t.apply(this,A),a);$i(I),s>0?je(this).transition().duration(s).call(w,L,R,I):je(this).call(b.transform,L,R,I)}}function M(I,...A){if(e.apply(this,arguments)){var T=I.touches,R=T.length,P=S(this,A,I.changedTouches.length===R).event(I),U,L,Z,G;for(gc(I),L=0;L<R;++L)Z=T[L],G=ct(Z,this),G=[G,this.__zoom.invert(G),Z.identifier],P.touch0?!P.touch1&&P.touch0[2]!==G[2]&&(P.touch1=G,P.taps=0):(P.touch0=G,U=!0,P.taps=1+!!u);u&&(u=clearTimeout(u)),U&&(P.taps<2&&(f=G[0],u=setTimeout(function(){u=null},h)),qn(this),P.start())}}function D(I,...A){if(this.__zooming){var T=S(this,A).event(I),R=I.changedTouches,P=R.length,U,L,Z,G;for($i(I),U=0;U<P;++U)L=R[U],Z=ct(L,this),T.touch0&&T.touch0[2]===L.identifier?T.touch0[0]=Z:T.touch1&&T.touch1[2]===L.identifier&&(T.touch1[0]=Z);if(L=T.that.__zoom,T.touch1){var ne=T.touch0[0],ee=T.touch0[1],oe=T.touch1[0],ve=T.touch1[1],H=(H=oe[0]-ne[0])*H+(H=oe[1]-ne[1])*H,he=(he=ve[0]-ee[0])*he+(he=ve[1]-ee[1])*he;L=_(L,Math.sqrt(H/he)),Z=[(ne[0]+oe[0])/2,(ne[1]+oe[1])/2],G=[(ee[0]+ve[0])/2,(ee[1]+ve[1])/2]}else if(T.touch0)Z=T.touch0[0],G=T.touch0[1];else return;T.zoom("touch",r(x(L,Z,G),T.extent,a))}}function O(I,...A){if(this.__zooming){var T=S(this,A).event(I),R=I.changedTouches,P=R.length,U,L;for(gc(I),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),U=0;U<P;++U)L=R[U],T.touch0&&T.touch0[2]===L.identifier?delete T.touch0:T.touch1&&T.touch1[2]===L.identifier&&delete T.touch1;if(T.touch1&&!T.touch0&&(T.touch0=T.touch1,delete T.touch1),T.touch0)T.touch0[1]=this.__zoom.invert(T.touch0[0]);else if(T.end(),T.taps===2&&(L=ct(L,this),Math.hypot(f[0]-L[0],f[1]-L[1])<v)){var Z=je(this).on("dblclick.zoom");Z&&Z.apply(this,arguments)}}}return b.wheelDelta=function(I){return arguments.length?(i=typeof I=="function"?I:na(+I),b):i},b.filter=function(I){return arguments.length?(e=typeof I=="function"?I:na(!!I),b):e},b.touchable=function(I){return arguments.length?(n=typeof I=="function"?I:na(!!I),b):n},b.extent=function(I){return arguments.length?(t=typeof I=="function"?I:na([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),b):t},b.scaleExtent=function(I){return arguments.length?(o[0]=+I[0],o[1]=+I[1],b):[o[0],o[1]]},b.translateExtent=function(I){return arguments.length?(a[0][0]=+I[0][0],a[1][0]=+I[1][0],a[0][1]=+I[0][1],a[1][1]=+I[1][1],b):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},b.constrain=function(I){return arguments.length?(r=I,b):r},b.duration=function(I){return arguments.length?(s=+I,b):s},b.interpolate=function(I){return arguments.length?(c=I,b):c},b.on=function(){var I=l.on.apply(l,arguments);return I===l?b:I},b.clickDistance=function(I){return arguments.length?(g=(I=+I)*I,b):Math.sqrt(g)},b.tapDistance=function(I){return arguments.length?(v=+I,b):v},b}const Bj=Object.freeze(Object.defineProperty({__proto__:null,Adder:Ce,Delaunay:ff,FormatSpecifier:Bs,InternMap:Yi,InternSet:Gn,Node:tr,Path:yo,Voronoi:Hv,ZoomTransform:Ut,active:UN,arc:FA,area:y1,areaRadial:lg,ascending:we,autoType:l3,axisBottom:M4,axisLeft:T4,axisRight:E4,axisTop:N4,bin:Qd,bisect:Sn,bisectCenter:$6,bisectLeft:w6,bisectRight:Sn,bisector:Ss,blob:f3,blur:S6,blur2:Np,blurImage:k6,brush:JN,brushSelection:YN,brushX:HN,brushY:XN,buffer:h3,chord:QN,chordDirected:tE,chordTranspose:eE,cluster:TM,color:kn,contourDensity:NE,contours:Jc,count:ks,create:fk,creator:Es,cross:A6,csv:p3,csvFormat:JE,csvFormatBody:KE,csvFormatRow:e3,csvFormatRows:QE,csvFormatValue:t3,csvParse:Jv,csvParseRows:XE,cubehelix:Et,cumsum:j6,curveBasis:lj,curveBasisClosed:cj,curveBasisOpen:uj,curveBumpX:$1,curveBumpY:S1,curveBundle:fj,curveCardinal:dj,curveCardinalClosed:hj,curveCardinalOpen:mj,curveCatmullRom:gj,curveCatmullRomClosed:pj,curveCatmullRomOpen:vj,curveLinear:al,curveLinearClosed:bj,curveMonotoneX:yj,curveMonotoneY:_j,curveNatural:xj,curveStep:wj,curveStepAfter:Sj,curveStepBefore:$j,descending:kp,deviation:Tp,difference:g4,disjoint:p4,dispatch:sr,drag:yk,dragDisable:Ts,dragEnable:Cs,dsv:g3,dsvFormat:Ls,easeBack:$h,easeBackIn:TN,easeBackInOut:$h,easeBackOut:CN,easeBounce:ro,easeBounceIn:EN,easeBounceInOut:MN,easeBounceOut:ro,easeCircle:wh,easeCircleIn:bN,easeCircleInOut:wh,easeCircleOut:yN,easeCubic:qc,easeCubicIn:uN,easeCubicInOut:qc,easeCubicOut:fN,easeElastic:Sh,easeElasticIn:AN,easeElasticInOut:jN,easeElasticOut:Sh,easeExp:xh,easeExpIn:pN,easeExpInOut:xh,easeExpOut:vN,easeLinear:sN,easePoly:yh,easePolyIn:dN,easePolyInOut:yh,easePolyOut:hN,easeQuad:bh,easeQuadIn:lN,easeQuadInOut:bh,easeQuadOut:cN,easeSin:_h,easeSinIn:mN,easeSinInOut:_h,easeSinOut:gN,every:c4,extent:Fi,fcumsum:O6,filter:f4,flatGroup:R6,flatRollup:D6,forceCenter:S3,forceCollide:B3,forceLink:W3,forceManyBody:e5,forceRadial:t5,forceSimulation:Q3,forceX:n5,forceY:r5,get format(){return Vs},formatDefaultLocale:r0,formatLocale:n0,get formatPrefix(){return mf},formatSpecifier:Gr,fsum:P6,geoAlbers:F0,geoAlbersUsa:lM,geoArea:h5,geoAzimuthalEqualArea:cM,geoAzimuthalEqualAreaRaw:Sf,geoAzimuthalEquidistant:uM,geoAzimuthalEquidistantRaw:kf,geoBounds:v5,geoCentroid:$5,geoCircle:S5,geoClipAntimeridian:uu,geoClipCircle:k0,geoClipExtent:C5,geoClipRectangle:Ws,geoConicConformal:dM,geoConicConformalRaw:V0,geoConicEqualArea:fs,geoConicEqualAreaRaw:L0,geoConicEquidistant:mM,geoConicEquidistantRaw:W0,geoContains:U5,geoDistance:rs,geoEqualEarth:pM,geoEqualEarthRaw:If,geoEquirectangular:hM,geoEquirectangularRaw:co,geoGnomonic:vM,geoGnomonicRaw:Nf,geoGraticule:E0,geoGraticule10:z5,geoIdentity:bM,geoInterpolate:L5,geoLength:I0,geoMercator:fM,geoMercatorRaw:So,geoNaturalEarth1:yM,geoNaturalEarth1Raw:Ef,geoOrthographic:_M,geoOrthographicRaw:Mf,geoPath:K5,geoProjection:Yt,geoProjectionMutator:wf,geoRotation:y0,geoStereographic:xM,geoStereographicRaw:Tf,geoStream:kt,geoTransform:Q5,geoTransverseMercator:wM,geoTransverseMercatorRaw:Cf,gray:Ck,greatest:Fp,greatestIndex:r4,group:Pp,groupSort:L6,groups:Op,hcl:Ua,hierarchy:Af,histogram:Qd,hsl:Oa,html:w3,image:b3,index:U6,indexes:z6,interpolate:An,interpolateArray:Dk,interpolateBasis:vv,interpolateBasisClosed:bv,interpolateBlues:mA,interpolateBrBG:G8,interpolateBuGn:nA,interpolateBuPu:rA,interpolateCividis:_A,interpolateCool:$A,interpolateCubehelix:Kk,interpolateCubehelixDefault:xA,interpolateCubehelixLong:Rs,interpolateDate:Sv,interpolateDiscrete:Lk,interpolateGnBu:iA,interpolateGreens:gA,interpolateGreys:pA,interpolateHcl:Xk,interpolateHclLong:Jk,interpolateHsl:Gk,interpolateHslLong:Yk,interpolateHue:Fk,interpolateInferno:CA,interpolateLab:Hk,interpolateMagma:TA,interpolateNumber:pt,interpolateNumberArray:Qu,interpolateObject:kv,interpolateOrRd:oA,interpolateOranges:yA,interpolatePRGn:Y8,interpolatePiYG:H8,interpolatePlasma:AA,interpolatePuBu:sA,interpolatePuBuGn:aA,interpolatePuOr:X8,interpolatePuRd:lA,interpolatePurples:vA,interpolateRainbow:SA,interpolateRdBu:J8,interpolateRdGy:K8,interpolateRdPu:cA,interpolateRdYlBu:Q8,interpolateRdYlGn:eA,interpolateReds:bA,interpolateRgb:eo,interpolateRgbBasis:xv,interpolateRgbBasisClosed:Rk,interpolateRound:Os,interpolateSinebow:NA,interpolateSpectral:tA,interpolateString:ef,interpolateTransformCss:Ev,interpolateTransformSvg:Mv,interpolateTurbo:EA,interpolateViridis:MA,interpolateWarm:wA,interpolateYlGn:fA,interpolateYlGnBu:uA,interpolateYlOrBr:dA,interpolateYlOrRd:hA,interpolateZoom:Tv,interrupt:qn,intersection:v4,interval:rI,isoFormat:N8,isoParse:M8,json:_3,lab:Da,lch:Ak,least:n4,leastIndex:Vp,line:Kf,lineRadial:sg,link:sl,linkHorizontal:XA,linkRadial:KA,linkVertical:JA,local:nv,map:d4,matcher:qu,max:Hi,maxIndex:Zu,mean:Y6,median:H6,medianIndex:X6,merge:Vu,min:Aa,minIndex:Bu,mode:K6,namespace:po,namespaces:Oc,nice:Lu,now:bo,pack:aT,packEnclose:eT,packSiblings:iT,pairs:Q6,partition:sT,path:uf,pathRound:iE,permute:Lp,pie:WA,piecewise:Pv,pointRadial:zi,pointer:ct,pointers:hk,polygonArea:$T,polygonCentroid:ST,polygonContains:ET,polygonHull:NT,polygonLength:MT,precisionFixed:i0,precisionPrefix:o0,precisionRound:a0,quadtree:Zs,quantile:Xi,quantileIndex:Bp,quantileSorted:Zp,quantize:Qk,quickselect:Is,radialArea:lg,radialLine:sg,randomBates:jT,randomBernoulli:RT,randomBeta:ib,randomBinomial:ob,randomCauchy:UT,randomExponential:PT,randomGamma:Of,randomGeometric:rb,randomInt:CT,randomIrwinHall:nb,randomLcg:BT,randomLogNormal:AT,randomLogistic:zT,randomNormal:Pf,randomPareto:OT,randomPoisson:LT,randomUniform:TT,randomWeibull:DT,range:xn,rank:t4,reduce:h4,reverse:m4,rgb:Br,ribbon:dE,ribbonArrow:hE,rollup:Dp,rollups:Up,scaleBand:Df,scaleDiverging:Zb,scaleDivergingLog:Bb,scaleDivergingPow:Hf,scaleDivergingSqrt:O8,scaleDivergingSymlog:Vb,scaleIdentity:cb,scaleImplicit:Su,scaleLinear:lb,scaleLog:fb,scaleOrdinal:Rf,scalePoint:VT,scalePow:Zf,scaleQuantile:mb,scaleQuantize:gb,scaleRadial:hb,scaleSequential:Ub,scaleSequentialLog:zb,scaleSequentialPow:Yf,scaleSequentialQuantile:Fb,scaleSequentialSqrt:P8,scaleSequentialSymlog:Lb,scaleSqrt:nC,scaleSymlog:db,scaleThreshold:pb,scaleTime:A8,scaleUtc:j8,scan:i4,schemeAccent:D8,schemeBlues:d1,schemeBrBG:Wb,schemeBuGn:e1,schemeBuPu:t1,schemeCategory10:R8,schemeDark2:U8,schemeGnBu:n1,schemeGreens:h1,schemeGreys:m1,schemeObservable10:z8,schemeOrRd:r1,schemeOranges:v1,schemePRGn:qb,schemePaired:L8,schemePastel1:F8,schemePastel2:Z8,schemePiYG:Gb,schemePuBu:o1,schemePuBuGn:i1,schemePuOr:Yb,schemePuRd:a1,schemePurples:g1,schemeRdBu:Hb,schemeRdGy:Xb,schemeRdPu:s1,schemeRdYlBu:Jb,schemeRdYlGn:Kb,schemeReds:p1,schemeSet1:B8,schemeSet2:V8,schemeSet3:W8,schemeSpectral:Qb,schemeTableau10:q8,schemeYlGn:c1,schemeYlGnBu:l1,schemeYlOrBr:u1,schemeYlOrRd:f1,select:je,selectAll:Dc,selection:lr,selector:Ms,selectorAll:Wu,shuffle:o4,shuffler:Wp,some:u4,sort:Ac,stack:Nj,stackOffsetDiverging:Mj,stackOffsetExpand:Ej,stackOffsetNone:ei,stackOffsetSilhouette:Tj,stackOffsetWiggle:Cj,stackOrderAppearance:Y1,stackOrderAscending:H1,stackOrderDescending:jj,stackOrderInsideOut:Pj,stackOrderNone:ti,stackOrderReverse:Oj,stratify:fT,style:Xn,subset:y4,sum:a4,superset:Gp,svg:$3,symbol:sj,symbolAsterisk:k1,symbolCircle:ll,symbolCross:I1,symbolDiamond:E1,symbolDiamond2:M1,symbolPlus:T1,symbolSquare:C1,symbolSquare2:A1,symbolStar:P1,symbolTimes:Nu,symbolTriangle:O1,symbolTriangle2:R1,symbolWye:D1,symbolX:Nu,symbols:cg,symbolsFill:cg,symbolsStroke:aj,text:Fs,thresholdFreedmanDiaconis:q6,thresholdScott:G6,thresholdSturges:Fu,tickFormat:sb,tickIncrement:Hn,tickStep:Ca,ticks:Yn,timeDay:ui,timeDays:lC,get timeFormat(){return Wf},timeFormatDefaultLocale:Rb,timeFormatLocale:Tb,timeFriday:yb,timeFridays:gC,timeHour:Js,timeHours:aC,timeInterval:Ee,timeMillisecond:Jr,timeMilliseconds:Vm,timeMinute:Hs,timeMinutes:iC,timeMonday:uo,timeMondays:fC,timeMonth:Qs,timeMonths:$C,get timeParse(){return Ob},timeSaturday:_b,timeSaturdays:pC,timeSecond:an,timeSeconds:qm,timeSunday:Kr,timeSundays:Gm,timeThursday:nr,timeThursdays:mC,timeTickInterval:Mb,timeTicks:Eb,timeTuesday:vb,timeTuesdays:dC,timeWednesday:bb,timeWednesdays:hC,timeWeek:Kr,timeWeeks:Gm,timeYear:Vt,timeYears:kC,timeout:Zc,timer:Us,timerFlush:Dv,transition:Fv,transpose:qp,tree:bT,treemap:yT,treemapBinary:_T,treemapDice:ko,treemapResquarify:wT,treemapSlice:Gs,treemapSliceDice:xT,treemapSquarify:tb,tsv:v3,tsvFormat:r3,tsvFormatBody:i3,tsvFormatRow:a3,tsvFormatRows:o3,tsvFormatValue:s3,tsvParse:Kv,tsvParseRows:n3,union:_4,unixDay:Vf,unixDays:uC,utcDay:No,utcDays:cC,get utcFormat(){return tl},utcFriday:$b,utcFridays:xC,utcHour:Ks,utcHours:sC,utcMillisecond:Jr,utcMilliseconds:Vm,utcMinute:Xs,utcMinutes:oC,utcMonday:fo,utcMondays:vC,utcMonth:el,utcMonths:SC,get utcParse(){return qf},utcSaturday:Sb,utcSaturdays:wC,utcSecond:an,utcSeconds:qm,utcSunday:Qr,utcSundays:Ym,utcThursday:rr,utcThursdays:_C,utcTickInterval:Nb,utcTicks:Ib,utcTuesday:xb,utcTuesdays:bC,utcWednesday:wb,utcWednesdays:yC,utcWeek:Qr,utcWeeks:Ym,utcYear:Wt,utcYears:IC,variance:Mp,window:Gu,xml:x3,zip:l4,zoom:Zj,zoomIdentity:fl,zoomTransform:J1},Symbol.toStringTag,{value:"Module"})),Vj=e=>({...Bj,select:t=>{if(typeof t=="string"){const r=e.querySelector(t);if(r)return je(r)}return je(t)},selectAll:t=>Dc(typeof t=="string"?e.querySelectorAll(t):t)}),Wj=(e,t,r)=>{new Function("d3","container",`"use strict";
|
|
16
|
+
${e}`)(t,r)},qj=({message:e,className:t})=>$.jsxs("div",{className:ae("mt-4 rounded-lg border border-red-300 bg-red-50 p-4 dark:border-red-800 dark:bg-red-950",t),children:[$.jsx("p",{className:"mb-2 text-sm font-semibold text-red-700 dark:text-red-400",children:"Rendering Error"}),$.jsx("pre",{className:"overflow-x-auto text-xs text-red-600 dark:text-red-300",children:e})]}),Gj="mt-4 overflow-x-auto rounded-lg border bg-white p-4 dark:bg-neutral-900",Yj=({code:e,className:t})=>{const r=Q.useRef(null),[i,n]=Q.useState(null),a=V.useMessage().status?.type==="complete";return Q.useEffect(()=>{if(!a||!r.current||!e)return;const s=setTimeout(()=>{const c=r.current;if(c){c.innerHTML="",n(null);try{const l=Vj(c);Wj(e,l,c)}catch(l){const u=l instanceof Error?l.message:"Unknown error";n(u),console.error("[D3Renderer] error:",l)}}},100);return()=>clearTimeout(s)},[e,a]),$.jsxs($.Fragment,{children:[$.jsx("div",{ref:r,className:ae(Gj,t),children:!a&&$.jsx("div",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:"Generating chart..."})}),i&&$.jsx(qj,{message:i,className:t})]})},Hj=Q.memo(Yj);function Ne(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}function Xj(e,t){const r=E.createContext(t),i=o=>{const{children:a,...s}=o,c=E.useMemo(()=>s,Object.values(s));return $.jsx(r.Provider,{value:c,children:a})};i.displayName=e+"Provider";function n(o){const a=E.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[i,n]}function Mo(e,t=[]){let r=[];function i(o,a){const s=E.createContext(a),c=r.length;r=[...r,a];const l=f=>{const{scope:d,children:h,...p}=f,g=d?.[e]?.[c]||s,v=E.useMemo(()=>p,Object.values(p));return $.jsx(g.Provider,{value:v,children:h})};l.displayName=o+"Provider";function u(f,d){const h=d?.[e]?.[c]||s,p=E.useContext(h);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,u]}const n=()=>{const o=r.map(a=>E.createContext(a));return function(s){const c=s?.[e]||o;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return n.scopeName=e,[i,Jj(n,...t)]}function Jj(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(o){const a=i.reduce((s,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...s,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function id(e){const t=Kj(e),r=E.forwardRef((i,n)=>{const{children:o,...a}=i,s=E.Children.toArray(o),c=s.find(eP);if(c){const l=c.props.children,u=s.map(f=>f===c?E.Children.count(l)>1?E.Children.only(null):E.isValidElement(l)?l.props.children:null:f);return $.jsx(t,{...a,ref:n,children:E.isValidElement(l)?E.cloneElement(l,void 0,u):null})}return $.jsx(t,{...a,ref:n,children:o})});return r.displayName=`${e}.Slot`,r}function Kj(e){const t=E.forwardRef((r,i)=>{const{children:n,...o}=r;if(E.isValidElement(n)){const a=nP(n),s=tP(o,n.props);return n.type!==E.Fragment&&(s.ref=i?Ru(i,a):a),E.cloneElement(n,s)}return E.Children.count(n)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var K1=Symbol("radix.slottable");function Qj(e){const t=({children:r})=>$.jsx($.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=K1,t}function eP(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===K1}function tP(e,t){const r={...t};for(const i in t){const n=e[i],o=t[i];/^on[A-Z]/.test(i)?n&&o?r[i]=(...s)=>{const c=o(...s);return n(...s),c}:n&&(r[i]=n):i==="style"?r[i]={...n,...o}:i==="className"&&(r[i]=[n,o].filter(Boolean).join(" "))}return{...e,...r}}function nP(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var rP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=rP.reduce((e,t)=>{const r=id(`Primitive.${t}`),i=E.forwardRef((n,o)=>{const{asChild:a,...s}=n,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(c,{...s,ref:o})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function iP(e,t){e&&Fg.flushSync(()=>e.dispatchEvent(t))}function ir(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...r)=>t.current?.(...r),[])}function oP(e,t=globalThis?.document){const r=ir(e);E.useEffect(()=>{const i=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",i,{capture:!0}),()=>t.removeEventListener("keydown",i,{capture:!0})},[r,t])}var aP="DismissableLayer",Eu="dismissableLayer.update",sP="dismissableLayer.pointerDownOutside",lP="dismissableLayer.focusOutside",gg,Q1=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),dl=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:n,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...c}=e,l=E.useContext(Q1),[u,f]=E.useState(null),d=u?.ownerDocument??globalThis?.document,[,h]=E.useState({}),p=st(t,k=>f(k)),g=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),_=u?g.indexOf(u):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,y=_>=b,w=fP(k=>{const N=k.target,C=[...l.branches].some(j=>j.contains(N));!y||C||(n?.(k),a?.(k),k.defaultPrevented||s?.())},d),S=dP(k=>{const N=k.target;[...l.branches].some(j=>j.contains(N))||(o?.(k),a?.(k),k.defaultPrevented||s?.())},d);return oP(k=>{_===l.layers.size-1&&(i?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},d),E.useEffect(()=>{if(u)return r&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(gg=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),pg(),()=>{r&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=gg)}},[u,d,r,l]),E.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),pg())},[u,l]),E.useEffect(()=>{const k=()=>h({});return document.addEventListener(Eu,k),()=>document.removeEventListener(Eu,k)},[]),$.jsx(Ae.div,{...c,ref:p,style:{pointerEvents:x?y?"auto":"none":void 0,...e.style},onFocusCapture:Ne(e.onFocusCapture,S.onFocusCapture),onBlurCapture:Ne(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:Ne(e.onPointerDownCapture,w.onPointerDownCapture)})});dl.displayName=aP;var cP="DismissableLayerBranch",uP=E.forwardRef((e,t)=>{const r=E.useContext(Q1),i=E.useRef(null),n=st(t,i);return E.useEffect(()=>{const o=i.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),$.jsx(Ae.div,{...e,ref:n})});uP.displayName=cP;function fP(e,t=globalThis?.document){const r=ir(e),i=E.useRef(!1),n=E.useRef(()=>{});return E.useEffect(()=>{const o=s=>{if(s.target&&!i.current){let c=function(){ey(sP,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=c,t.addEventListener("click",n.current,{once:!0})):c()}else t.removeEventListener("click",n.current);i.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>i.current=!0}}function dP(e,t=globalThis?.document){const r=ir(e),i=E.useRef(!1);return E.useEffect(()=>{const n=o=>{o.target&&!i.current&&ey(lP,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function pg(){const e=new CustomEvent(Eu);document.dispatchEvent(e)}function ey(e,t,r,{discrete:i}){const n=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),i?iP(n,o):n.dispatchEvent(o)}var _t=globalThis?.document?E.useLayoutEffect:()=>{},hP=E[" useId ".trim().toString()]||(()=>{}),mP=0;function Dr(e){const[t,r]=E.useState(hP());return _t(()=>{r(i=>i??String(mP++))},[e]),t?`radix-${t}`:""}const gP=["top","right","bottom","left"],Mn=Math.min,ft=Math.max,bs=Math.round,ra=Math.floor,Ft=e=>({x:e,y:e}),pP={left:"right",right:"left",bottom:"top",top:"bottom"},vP={start:"end",end:"start"};function Mu(e,t,r){return ft(e,Mn(t,r))}function fn(e,t){return typeof e=="function"?e(t):e}function dn(e){return e.split("-")[0]}function fi(e){return e.split("-")[1]}function od(e){return e==="x"?"y":"x"}function ad(e){return e==="y"?"height":"width"}const bP=new Set(["top","bottom"]);function zt(e){return bP.has(dn(e))?"y":"x"}function sd(e){return od(zt(e))}function yP(e,t,r){r===void 0&&(r=!1);const i=fi(e),n=sd(e),o=ad(n);let a=n==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ys(a)),[a,ys(a)]}function _P(e){const t=ys(e);return[Tu(e),t,Tu(t)]}function Tu(e){return e.replace(/start|end/g,t=>vP[t])}const vg=["left","right"],bg=["right","left"],xP=["top","bottom"],wP=["bottom","top"];function $P(e,t,r){switch(e){case"top":case"bottom":return r?t?bg:vg:t?vg:bg;case"left":case"right":return t?xP:wP;default:return[]}}function SP(e,t,r,i){const n=fi(e);let o=$P(dn(e),r==="start",i);return n&&(o=o.map(a=>a+"-"+n),t&&(o=o.concat(o.map(Tu)))),o}function ys(e){return e.replace(/left|right|bottom|top/g,t=>pP[t])}function kP(e){return{top:0,right:0,bottom:0,left:0,...e}}function ty(e){return typeof e!="number"?kP(e):{top:e,right:e,bottom:e,left:e}}function _s(e){const{x:t,y:r,width:i,height:n}=e;return{width:i,height:n,top:r,left:t,right:t+i,bottom:r+n,x:t,y:r}}function yg(e,t,r){let{reference:i,floating:n}=e;const o=zt(t),a=sd(t),s=ad(a),c=dn(t),l=o==="y",u=i.x+i.width/2-n.width/2,f=i.y+i.height/2-n.height/2,d=i[s]/2-n[s]/2;let h;switch(c){case"top":h={x:u,y:i.y-n.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:f};break;case"left":h={x:i.x-n.width,y:f};break;default:h={x:i.x,y:i.y}}switch(fi(t)){case"start":h[a]-=d*(r&&l?-1:1);break;case"end":h[a]+=d*(r&&l?-1:1);break}return h}const IP=async(e,t,r)=>{const{placement:i="bottom",strategy:n="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:f}=yg(l,i,c),d=i,h={},p=0;for(let g=0;g<s.length;g++){const{name:v,fn:b}=s[g],{x:_,y:x,data:y,reset:w}=await b({x:u,y:f,initialPlacement:i,placement:d,strategy:n,middlewareData:h,rects:l,platform:a,elements:{reference:e,floating:t}});u=_??u,f=x??f,h={...h,[v]:{...h[v],...y}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(l=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:n}):w.rects),{x:u,y:f}=yg(l,d,c)),g=-1)}return{x:u,y:f,placement:d,strategy:n,middlewareData:h}};async function ho(e,t){var r;t===void 0&&(t={});const{x:i,y:n,platform:o,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=fn(t,e),p=ty(h),v=s[d?f==="floating"?"reference":"floating":f],b=_s(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(v)))==null||r?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),_=f==="floating"?{x:i,y:n,width:a.floating.width,height:a.floating.height}:a.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),y=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},w=_s(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:_,offsetParent:x,strategy:c}):_);return{top:(b.top-w.top+p.top)/y.y,bottom:(w.bottom-b.bottom+p.bottom)/y.y,left:(b.left-w.left+p.left)/y.x,right:(w.right-b.right+p.right)/y.x}}const NP=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:i,placement:n,rects:o,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=fn(e,t)||{};if(l==null)return{};const f=ty(u),d={x:r,y:i},h=sd(n),p=ad(h),g=await a.getDimensions(l),v=h==="y",b=v?"top":"left",_=v?"bottom":"right",x=v?"clientHeight":"clientWidth",y=o.reference[p]+o.reference[h]-d[h]-o.floating[p],w=d[h]-o.reference[h],S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=S?S[x]:0;(!k||!await(a.isElement==null?void 0:a.isElement(S)))&&(k=s.floating[x]||o.floating[p]);const N=y/2-w/2,C=k/2-g[p]/2-1,j=Mn(f[b],C),M=Mn(f[_],C),D=j,O=k-g[p]-M,I=k/2-g[p]/2+N,A=Mu(D,I,O),T=!c.arrow&&fi(n)!=null&&I!==A&&o.reference[p]/2-(I<D?j:M)-g[p]/2<0,R=T?I<D?I-D:I-O:0;return{[h]:d[h]+R,data:{[h]:A,centerOffset:I-A-R,...T&&{alignmentOffset:R}},reset:T}}}),EP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,i;const{placement:n,middlewareData:o,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...v}=fn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const b=dn(n),_=zt(s),x=dn(s)===s,y=await(c.isRTL==null?void 0:c.isRTL(l.floating)),w=d||(x||!g?[ys(s)]:_P(s)),S=p!=="none";!d&&S&&w.push(...SP(s,g,p,y));const k=[s,...w],N=await ho(t,v),C=[];let j=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&C.push(N[b]),f){const I=yP(n,a,y);C.push(N[I[0]],N[I[1]])}if(j=[...j,{placement:n,overflows:C}],!C.every(I=>I<=0)){var M,D;const I=(((M=o.flip)==null?void 0:M.index)||0)+1,A=k[I];if(A&&(!(f==="alignment"?_!==zt(A):!1)||j.every(P=>zt(P.placement)===_?P.overflows[0]>0:!0)))return{data:{index:I,overflows:j},reset:{placement:A}};let T=(D=j.filter(R=>R.overflows[0]<=0).sort((R,P)=>R.overflows[1]-P.overflows[1])[0])==null?void 0:D.placement;if(!T)switch(h){case"bestFit":{var O;const R=(O=j.filter(P=>{if(S){const U=zt(P.placement);return U===_||U==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(U=>U>0).reduce((U,L)=>U+L,0)]).sort((P,U)=>P[1]-U[1])[0])==null?void 0:O[0];R&&(T=R);break}case"initialPlacement":T=s;break}if(n!==T)return{reset:{placement:T}}}return{}}}};function _g(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xg(e){return gP.some(t=>e[t]>=0)}const MP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:i="referenceHidden",...n}=fn(e,t);switch(i){case"referenceHidden":{const o=await ho(t,{...n,elementContext:"reference"}),a=_g(o,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:xg(a)}}}case"escaped":{const o=await ho(t,{...n,altBoundary:!0}),a=_g(o,r.floating);return{data:{escapedOffsets:a,escaped:xg(a)}}}default:return{}}}}},ny=new Set(["left","top"]);async function TP(e,t){const{placement:r,platform:i,elements:n}=e,o=await(i.isRTL==null?void 0:i.isRTL(n.floating)),a=dn(r),s=fi(r),c=zt(r)==="y",l=ny.has(a)?-1:1,u=o&&c?-1:1,f=fn(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof p=="number"&&(h=s==="end"?p*-1:p),c?{x:h*u,y:d*l}:{x:d*l,y:h*u}}const CP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,i;const{x:n,y:o,placement:a,middlewareData:s}=t,c=await TP(t,e);return a===((r=s.offset)==null?void 0:r.placement)&&(i=s.arrow)!=null&&i.alignmentOffset?{}:{x:n+c.x,y:o+c.y,data:{...c,placement:a}}}}},AP=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:i,placement:n}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:v=>{let{x:b,y:_}=v;return{x:b,y:_}}},...c}=fn(e,t),l={x:r,y:i},u=await ho(t,c),f=zt(dn(n)),d=od(f);let h=l[d],p=l[f];if(o){const v=d==="y"?"top":"left",b=d==="y"?"bottom":"right",_=h+u[v],x=h-u[b];h=Mu(_,h,x)}if(a){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",_=p+u[v],x=p-u[b];p=Mu(_,p,x)}const g=s.fn({...t,[d]:h,[f]:p});return{...g,data:{x:g.x-r,y:g.y-i,enabled:{[d]:o,[f]:a}}}}}},jP=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:i,placement:n,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=fn(e,t),u={x:r,y:i},f=zt(n),d=od(f);let h=u[d],p=u[f];const g=fn(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const x=d==="y"?"height":"width",y=o.reference[d]-o.floating[x]+v.mainAxis,w=o.reference[d]+o.reference[x]-v.mainAxis;h<y?h=y:h>w&&(h=w)}if(l){var b,_;const x=d==="y"?"width":"height",y=ny.has(dn(n)),w=o.reference[f]-o.floating[x]+(y&&((b=a.offset)==null?void 0:b[f])||0)+(y?0:v.crossAxis),S=o.reference[f]+o.reference[x]+(y?0:((_=a.offset)==null?void 0:_[f])||0)-(y?v.crossAxis:0);p<w?p=w:p>S&&(p=S)}return{[d]:h,[f]:p}}}},PP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,i;const{placement:n,rects:o,platform:a,elements:s}=t,{apply:c=()=>{},...l}=fn(e,t),u=await ho(t,l),f=dn(n),d=fi(n),h=zt(n)==="y",{width:p,height:g}=o.floating;let v,b;f==="top"||f==="bottom"?(v=f,b=d===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(b=f,v=d==="end"?"top":"bottom");const _=g-u.top-u.bottom,x=p-u.left-u.right,y=Mn(g-u[v],_),w=Mn(p-u[b],x),S=!t.middlewareData.shift;let k=y,N=w;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=x),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(k=_),S&&!d){const j=ft(u.left,0),M=ft(u.right,0),D=ft(u.top,0),O=ft(u.bottom,0);h?N=p-2*(j!==0||M!==0?j+M:ft(u.left,u.right)):k=g-2*(D!==0||O!==0?D+O:ft(u.top,u.bottom))}await c({...t,availableWidth:N,availableHeight:k});const C=await a.getDimensions(s.floating);return p!==C.width||g!==C.height?{reset:{rects:!0}}:{}}}};function hl(){return typeof window<"u"}function di(e){return ry(e)?(e.nodeName||"").toLowerCase():"#document"}function dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ht(e){var t;return(t=(ry(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ry(e){return hl()?e instanceof Node||e instanceof dt(e).Node:!1}function Mt(e){return hl()?e instanceof Element||e instanceof dt(e).Element:!1}function qt(e){return hl()?e instanceof HTMLElement||e instanceof dt(e).HTMLElement:!1}function wg(e){return!hl()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof dt(e).ShadowRoot}const OP=new Set(["inline","contents"]);function To(e){const{overflow:t,overflowX:r,overflowY:i,display:n}=Tt(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!OP.has(n)}const RP=new Set(["table","td","th"]);function DP(e){return RP.has(di(e))}const UP=[":popover-open",":modal"];function ml(e){return UP.some(t=>{try{return e.matches(t)}catch{return!1}})}const zP=["transform","translate","scale","rotate","perspective"],LP=["transform","translate","scale","rotate","perspective","filter"],FP=["paint","layout","strict","content"];function ld(e){const t=cd(),r=Mt(e)?Tt(e):e;return zP.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||LP.some(i=>(r.willChange||"").includes(i))||FP.some(i=>(r.contain||"").includes(i))}function ZP(e){let t=Tn(e);for(;qt(t)&&!ni(t);){if(ld(t))return t;if(ml(t))return null;t=Tn(t)}return null}function cd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const BP=new Set(["html","body","#document"]);function ni(e){return BP.has(di(e))}function Tt(e){return dt(e).getComputedStyle(e)}function gl(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if(di(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wg(e)&&e.host||Ht(e);return wg(t)?t.host:t}function iy(e){const t=Tn(e);return ni(t)?e.ownerDocument?e.ownerDocument.body:e.body:qt(t)&&To(t)?t:iy(t)}function mo(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=iy(e),o=n===((i=e.ownerDocument)==null?void 0:i.body),a=dt(n);if(o){const s=Cu(a);return t.concat(a,a.visualViewport||[],To(n)?n:[],s&&r?mo(s):[])}return t.concat(n,mo(n,[],r))}function Cu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function oy(e){const t=Tt(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const n=qt(e),o=n?e.offsetWidth:r,a=n?e.offsetHeight:i,s=bs(r)!==o||bs(i)!==a;return s&&(r=o,i=a),{width:r,height:i,$:s}}function ud(e){return Mt(e)?e:e.contextElement}function Ur(e){const t=ud(e);if(!qt(t))return Ft(1);const r=t.getBoundingClientRect(),{width:i,height:n,$:o}=oy(t);let a=(o?bs(r.width):r.width)/i,s=(o?bs(r.height):r.height)/n;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const VP=Ft(0);function ay(e){const t=dt(e);return!cd()||!t.visualViewport?VP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WP(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==dt(e)?!1:t}function or(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=ud(e);let a=Ft(1);t&&(i?Mt(i)&&(a=Ur(i)):a=Ur(e));const s=WP(o,r,i)?ay(o):Ft(0);let c=(n.left+s.x)/a.x,l=(n.top+s.y)/a.y,u=n.width/a.x,f=n.height/a.y;if(o){const d=dt(o),h=i&&Mt(i)?dt(i):i;let p=d,g=Cu(p);for(;g&&i&&h!==p;){const v=Ur(g),b=g.getBoundingClientRect(),_=Tt(g),x=b.left+(g.clientLeft+parseFloat(_.paddingLeft))*v.x,y=b.top+(g.clientTop+parseFloat(_.paddingTop))*v.y;c*=v.x,l*=v.y,u*=v.x,f*=v.y,c+=x,l+=y,p=dt(g),g=Cu(p)}}return _s({width:u,height:f,x:c,y:l})}function pl(e,t){const r=gl(e).scrollLeft;return t?t.left+r:or(Ht(e)).left+r}function sy(e,t){const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-pl(e,r),n=r.top+t.scrollTop;return{x:i,y:n}}function qP(e){let{elements:t,rect:r,offsetParent:i,strategy:n}=e;const o=n==="fixed",a=Ht(i),s=t?ml(t.floating):!1;if(i===a||s&&o)return r;let c={scrollLeft:0,scrollTop:0},l=Ft(1);const u=Ft(0),f=qt(i);if((f||!f&&!o)&&((di(i)!=="body"||To(a))&&(c=gl(i)),qt(i))){const h=or(i);l=Ur(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}const d=a&&!f&&!o?sy(a,c):Ft(0);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+u.x+d.x,y:r.y*l.y-c.scrollTop*l.y+u.y+d.y}}function GP(e){return Array.from(e.getClientRects())}function YP(e){const t=Ht(e),r=gl(e),i=e.ownerDocument.body,n=ft(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=ft(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-r.scrollLeft+pl(e);const s=-r.scrollTop;return Tt(i).direction==="rtl"&&(a+=ft(t.clientWidth,i.clientWidth)-n),{width:n,height:o,x:a,y:s}}const $g=25;function HP(e,t){const r=dt(e),i=Ht(e),n=r.visualViewport;let o=i.clientWidth,a=i.clientHeight,s=0,c=0;if(n){o=n.width,a=n.height;const u=cd();(!u||u&&t==="fixed")&&(s=n.offsetLeft,c=n.offsetTop)}const l=pl(i);if(l<=0){const u=i.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(i.clientWidth-f.clientWidth-h);p<=$g&&(o-=p)}else l<=$g&&(o+=l);return{width:o,height:a,x:s,y:c}}const XP=new Set(["absolute","fixed"]);function JP(e,t){const r=or(e,!0,t==="fixed"),i=r.top+e.clientTop,n=r.left+e.clientLeft,o=qt(e)?Ur(e):Ft(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,c=n*o.x,l=i*o.y;return{width:a,height:s,x:c,y:l}}function Sg(e,t,r){let i;if(t==="viewport")i=HP(e,r);else if(t==="document")i=YP(Ht(e));else if(Mt(t))i=JP(t,r);else{const n=ay(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return _s(i)}function ly(e,t){const r=Tn(e);return r===t||!Mt(r)||ni(r)?!1:Tt(r).position==="fixed"||ly(r,t)}function KP(e,t){const r=t.get(e);if(r)return r;let i=mo(e,[],!1).filter(s=>Mt(s)&&di(s)!=="body"),n=null;const o=Tt(e).position==="fixed";let a=o?Tn(e):e;for(;Mt(a)&&!ni(a);){const s=Tt(a),c=ld(a);!c&&s.position==="fixed"&&(n=null),(o?!c&&!n:!c&&s.position==="static"&&!!n&&XP.has(n.position)||To(a)&&!c&&ly(e,a))?i=i.filter(u=>u!==a):n=s,a=Tn(a)}return t.set(e,i),i}function QP(e){let{element:t,boundary:r,rootBoundary:i,strategy:n}=e;const a=[...r==="clippingAncestors"?ml(t)?[]:KP(t,this._c):[].concat(r),i],s=a[0],c=a.reduce((l,u)=>{const f=Sg(t,u,n);return l.top=ft(f.top,l.top),l.right=Mn(f.right,l.right),l.bottom=Mn(f.bottom,l.bottom),l.left=ft(f.left,l.left),l},Sg(t,s,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function e7(e){const{width:t,height:r}=oy(e);return{width:t,height:r}}function t7(e,t,r){const i=qt(t),n=Ht(t),o=r==="fixed",a=or(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const c=Ft(0);function l(){c.x=pl(n)}if(i||!i&&!o)if((di(t)!=="body"||To(n))&&(s=gl(t)),i){const h=or(t,!0,o,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else n&&l();o&&!i&&n&&l();const u=n&&!i&&!o?sy(n,s):Ft(0),f=a.left+s.scrollLeft-c.x-u.x,d=a.top+s.scrollTop-c.y-u.y;return{x:f,y:d,width:a.width,height:a.height}}function pc(e){return Tt(e).position==="static"}function kg(e,t){if(!qt(e)||Tt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ht(e)===r&&(r=r.ownerDocument.body),r}function cy(e,t){const r=dt(e);if(ml(e))return r;if(!qt(e)){let n=Tn(e);for(;n&&!ni(n);){if(Mt(n)&&!pc(n))return n;n=Tn(n)}return r}let i=kg(e,t);for(;i&&DP(i)&&pc(i);)i=kg(i,t);return i&&ni(i)&&pc(i)&&!ld(i)?r:i||ZP(e)||r}const n7=async function(e){const t=this.getOffsetParent||cy,r=this.getDimensions,i=await r(e.floating);return{reference:t7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function r7(e){return Tt(e).direction==="rtl"}const i7={convertOffsetParentRelativeRectToViewportRelativeRect:qP,getDocumentElement:Ht,getClippingRect:QP,getOffsetParent:cy,getElementRects:n7,getClientRects:GP,getDimensions:e7,getScale:Ur,isElement:Mt,isRTL:r7};function uy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o7(e,t){let r=null,i;const n=Ht(e);function o(){var s;clearTimeout(i),(s=r)==null||s.disconnect(),r=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),o();const l=e.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=l;if(s||t(),!d||!h)return;const p=ra(f),g=ra(n.clientWidth-(u+d)),v=ra(n.clientHeight-(f+h)),b=ra(u),x={rootMargin:-p+"px "+-g+"px "+-v+"px "+-b+"px",threshold:ft(0,Mn(1,c))||1};let y=!0;function w(S){const k=S[0].intersectionRatio;if(k!==c){if(!y)return a();k?a(!1,k):i=setTimeout(()=>{a(!1,1e-7)},1e3)}k===1&&!uy(l,e.getBoundingClientRect())&&a(),y=!1}try{r=new IntersectionObserver(w,{...x,root:n.ownerDocument})}catch{r=new IntersectionObserver(w,x)}r.observe(e)}return a(!0),o}function a7(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:n=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,l=ud(e),u=n||o?[...l?mo(l):[],...mo(t)]:[];u.forEach(b=>{n&&b.addEventListener("scroll",r,{passive:!0}),o&&b.addEventListener("resize",r)});const f=l&&s?o7(l,r):null;let d=-1,h=null;a&&(h=new ResizeObserver(b=>{let[_]=b;_&&_.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),r()}),l&&!c&&h.observe(l),h.observe(t));let p,g=c?or(e):null;c&&v();function v(){const b=or(e);g&&!uy(g,b)&&r(),g=b,p=requestAnimationFrame(v)}return r(),()=>{var b;u.forEach(_=>{n&&_.removeEventListener("scroll",r),o&&_.removeEventListener("resize",r)}),f?.(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const s7=CP,l7=AP,c7=EP,u7=PP,f7=MP,Ig=NP,d7=jP,h7=(e,t,r)=>{const i=new Map,n={platform:i7,...r},o={...n.platform,_c:i};return IP(e,t,{...n,platform:o})};var m7=typeof document<"u",g7=function(){},Sa=m7?Q.useLayoutEffect:g7;function xs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,i,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(i=r;i--!==0;)if(!xs(e[i],t[i]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(t,n[i]))return!1;for(i=r;i--!==0;){const o=n[i];if(!(o==="_owner"&&e.$$typeof)&&!xs(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function fy(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ng(e,t){const r=fy(e);return Math.round(t*r)/r}function vc(e){const t=E.useRef(e);return Sa(()=>{t.current=e}),t}function p7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:n,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=E.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=E.useState(i);xs(d,i)||h(i);const[p,g]=E.useState(null),[v,b]=E.useState(null),_=E.useCallback(P=>{P!==S.current&&(S.current=P,g(P))},[]),x=E.useCallback(P=>{P!==k.current&&(k.current=P,b(P))},[]),y=o||p,w=a||v,S=E.useRef(null),k=E.useRef(null),N=E.useRef(u),C=c!=null,j=vc(c),M=vc(n),D=vc(l),O=E.useCallback(()=>{if(!S.current||!k.current)return;const P={placement:t,strategy:r,middleware:d};M.current&&(P.platform=M.current),h7(S.current,k.current,P).then(U=>{const L={...U,isPositioned:D.current!==!1};I.current&&!xs(N.current,L)&&(N.current=L,Fg.flushSync(()=>{f(L)}))})},[d,t,r,M,D]);Sa(()=>{l===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(P=>({...P,isPositioned:!1})))},[l]);const I=E.useRef(!1);Sa(()=>(I.current=!0,()=>{I.current=!1}),[]),Sa(()=>{if(y&&(S.current=y),w&&(k.current=w),y&&w){if(j.current)return j.current(y,w,O);O()}},[y,w,O,j,C]);const A=E.useMemo(()=>({reference:S,floating:k,setReference:_,setFloating:x}),[_,x]),T=E.useMemo(()=>({reference:y,floating:w}),[y,w]),R=E.useMemo(()=>{const P={position:r,left:0,top:0};if(!T.floating)return P;const U=Ng(T.floating,u.x),L=Ng(T.floating,u.y);return s?{...P,transform:"translate("+U+"px, "+L+"px)",...fy(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:U,top:L}},[r,s,T.floating,u.x,u.y]);return E.useMemo(()=>({...u,update:O,refs:A,elements:T,floatingStyles:R}),[u,O,A,T,R])}const v7=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:n}=typeof e=="function"?e(r):e;return i&&t(i)?i.current!=null?Ig({element:i.current,padding:n}).fn(r):{}:i?Ig({element:i,padding:n}).fn(r):{}}}},b7=(e,t)=>({...s7(e),options:[e,t]}),y7=(e,t)=>({...l7(e),options:[e,t]}),_7=(e,t)=>({...d7(e),options:[e,t]}),x7=(e,t)=>({...c7(e),options:[e,t]}),w7=(e,t)=>({...u7(e),options:[e,t]}),$7=(e,t)=>({...f7(e),options:[e,t]}),S7=(e,t)=>({...v7(e),options:[e,t]});var k7="Arrow",dy=E.forwardRef((e,t)=>{const{children:r,width:i=10,height:n=5,...o}=e;return $.jsx(Ae.svg,{...o,ref:t,width:i,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:$.jsx("polygon",{points:"0,0 30,0 15,10"})})});dy.displayName=k7;var I7=dy;function N7(e){const[t,r]=E.useState(void 0);return _t(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const o=n[0];let a,s;if("borderBoxSize"in o){const c=o.borderBoxSize,l=Array.isArray(c)?c[0]:c;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),t}var fd="Popper",[hy,vl]=Mo(fd),[E7,my]=hy(fd),gy=e=>{const{__scopePopper:t,children:r}=e,[i,n]=E.useState(null);return $.jsx(E7,{scope:t,anchor:i,onAnchorChange:n,children:r})};gy.displayName=fd;var py="PopperAnchor",vy=E.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:i,...n}=e,o=my(py,r),a=E.useRef(null),s=st(t,a),c=E.useRef(null);return E.useEffect(()=>{const l=c.current;c.current=i?.current||a.current,l!==c.current&&o.onAnchorChange(c.current)}),i?null:$.jsx(Ae.div,{...n,ref:s})});vy.displayName=py;var dd="PopperContent",[M7,T7]=hy(dd),by=E.forwardRef((e,t)=>{const{__scopePopper:r,side:i="bottom",sideOffset:n=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:p,...g}=e,v=my(dd,r),[b,_]=E.useState(null),x=st(t,H=>_(H)),[y,w]=E.useState(null),S=N7(y),k=S?.width??0,N=S?.height??0,C=i+(o!=="center"?"-"+o:""),j=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(l)?l:[l],D=M.length>0,O={padding:j,boundary:M.filter(A7),altBoundary:D},{refs:I,floatingStyles:A,placement:T,isPositioned:R,middlewareData:P}=p7({strategy:"fixed",placement:C,whileElementsMounted:(...H)=>a7(...H,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[b7({mainAxis:n+N,alignmentAxis:a}),c&&y7({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?_7():void 0,...O}),c&&x7({...O}),w7({...O,apply:({elements:H,rects:he,availableWidth:F,availableHeight:K})=>{const{width:re,height:z}=he.reference,me=H.floating.style;me.setProperty("--radix-popper-available-width",`${F}px`),me.setProperty("--radix-popper-available-height",`${K}px`),me.setProperty("--radix-popper-anchor-width",`${re}px`),me.setProperty("--radix-popper-anchor-height",`${z}px`)}}),y&&S7({element:y,padding:s}),j7({arrowWidth:k,arrowHeight:N}),d&&$7({strategy:"referenceHidden",...O})]}),[U,L]=xy(T),Z=ir(p);_t(()=>{R&&Z?.()},[R,Z]);const G=P.arrow?.x,ne=P.arrow?.y,ee=P.arrow?.centerOffset!==0,[oe,ve]=E.useState();return _t(()=>{b&&ve(window.getComputedStyle(b).zIndex)},[b]),$.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...A,transform:R?A.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:$.jsx(M7,{scope:r,placedSide:U,onArrowChange:w,arrowX:G,arrowY:ne,shouldHideArrow:ee,children:$.jsx(Ae.div,{"data-side":U,"data-align":L,...g,ref:x,style:{...g.style,animation:R?void 0:"none"}})})})});by.displayName=dd;var yy="PopperArrow",C7={top:"bottom",right:"left",bottom:"top",left:"right"},_y=E.forwardRef(function(t,r){const{__scopePopper:i,...n}=t,o=T7(yy,i),a=C7[o.placedSide];return $.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:$.jsx(I7,{...n,ref:r,style:{...n.style,display:"block"}})})});_y.displayName=yy;function A7(e){return e!==null}var j7=e=>({name:"transformOrigin",options:e,fn(t){const{placement:r,rects:i,middlewareData:n}=t,a=n.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,c=a?0:e.arrowHeight,[l,u]=xy(r),f={start:"0%",center:"50%",end:"100%"}[u],d=(n.arrow?.x??0)+s/2,h=(n.arrow?.y??0)+c/2;let p="",g="";return l==="bottom"?(p=a?f:`${d}px`,g=`${-c}px`):l==="top"?(p=a?f:`${d}px`,g=`${i.floating.height+c}px`):l==="right"?(p=`${-c}px`,g=a?f:`${h}px`):l==="left"&&(p=`${i.floating.width+c}px`,g=a?f:`${h}px`),{data:{x:p,y:g}}}});function xy(e){const[t,r="center"]=e.split("-");return[t,r]}var wy=gy,hd=vy,$y=by,Sy=_y,P7="Portal",bl=E.forwardRef((e,t)=>{const{container:r,...i}=e,[n,o]=E.useState(!1);_t(()=>o(!0),[]);const a=r||n&&globalThis?.document?.body;return a?Lg.createPortal($.jsx(Ae.div,{...i,ref:t}),a):null});bl.displayName=P7;function O7(e,t){return E.useReducer((r,i)=>t[r][i]??r,e)}var mn=e=>{const{present:t,children:r}=e,i=R7(t),n=typeof r=="function"?r({present:i.isPresent}):E.Children.only(r),o=st(i.ref,D7(n));return typeof r=="function"||i.isPresent?E.cloneElement(n,{ref:o}):null};mn.displayName="Presence";function R7(e){const[t,r]=E.useState(),i=E.useRef(null),n=E.useRef(e),o=E.useRef("none"),a=e?"mounted":"unmounted",[s,c]=O7(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const l=ia(i.current);o.current=s==="mounted"?l:"none"},[s]),_t(()=>{const l=i.current,u=n.current;if(u!==e){const d=o.current,h=ia(l);e?c("MOUNT"):h==="none"||l?.display==="none"?c("UNMOUNT"):c(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,c]),_t(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,f=h=>{const g=ia(i.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(c("ANIMATION_END"),!n.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},d=h=>{h.target===t&&(o.current=ia(i.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(l=>{i.current=l?getComputedStyle(l):null,r(l)},[])}}function ia(e){return e?.animationName||"none"}function D7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var U7=E[" useInsertionEffect ".trim().toString()]||_t;function yl({prop:e,defaultProp:t,onChange:r=()=>{},caller:i}){const[n,o,a]=z7({defaultProp:t,onChange:r}),s=e!==void 0,c=s?e:n;{const u=E.useRef(e!==void 0);E.useEffect(()=>{const f=u.current;f!==s&&console.warn(`${i} is changing from ${f?"controlled":"uncontrolled"} to ${s?"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.`),u.current=s},[s,i])}const l=E.useCallback(u=>{if(s){const f=L7(u)?u(e):u;f!==e&&a.current?.(f)}else o(u)},[s,e,o,a]);return[c,l]}function z7({defaultProp:e,onChange:t}){const[r,i]=E.useState(e),n=E.useRef(r),o=E.useRef(t);return U7(()=>{o.current=t},[t]),E.useEffect(()=>{n.current!==r&&(o.current?.(r),n.current=r)},[r,n]),[r,i,o]}function L7(e){return typeof e=="function"}var F7=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"}),Z7="VisuallyHidden",ky=E.forwardRef((e,t)=>$.jsx(Ae.span,{...e,ref:t,style:{...F7,...e.style}}));ky.displayName=Z7;var B7=ky,[_l]=Mo("Tooltip",[vl]),xl=vl(),Iy="TooltipProvider",V7=700,Au="tooltip.open",[W7,md]=_l(Iy),Ny=e=>{const{__scopeTooltip:t,delayDuration:r=V7,skipDelayDuration:i=300,disableHoverableContent:n=!1,children:o}=e,a=E.useRef(!0),s=E.useRef(!1),c=E.useRef(0);return E.useEffect(()=>{const l=c.current;return()=>window.clearTimeout(l)},[]),$.jsx(W7,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:E.useCallback(()=>{window.clearTimeout(c.current),a.current=!1},[]),onClose:E.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.current=!0,i)},[i]),isPointerInTransitRef:s,onPointerInTransitChange:E.useCallback(l=>{s.current=l},[]),disableHoverableContent:n,children:o})};Ny.displayName=Iy;var go="Tooltip",[q7,Co]=_l(go),Ey=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:n,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,c=md(go,e.__scopeTooltip),l=xl(t),[u,f]=E.useState(null),d=Dr(),h=E.useRef(0),p=a??c.disableHoverableContent,g=s??c.delayDuration,v=E.useRef(!1),[b,_]=yl({prop:i,defaultProp:n??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(Au))):c.onClose(),o?.(k)},caller:go}),x=E.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),y=E.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,_(!0)},[_]),w=E.useCallback(()=>{window.clearTimeout(h.current),h.current=0,_(!1)},[_]),S=E.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,_(!0),h.current=0},g)},[g,_]);return E.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),$.jsx(wy,{...l,children:$.jsx(q7,{scope:t,contentId:d,open:b,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:E.useCallback(()=>{c.isOpenDelayedRef.current?S():y()},[c.isOpenDelayedRef,S,y]),onTriggerLeave:E.useCallback(()=>{p?w():(window.clearTimeout(h.current),h.current=0)},[w,p]),onOpen:y,onClose:w,disableHoverableContent:p,children:r})})};Ey.displayName=go;var ju="TooltipTrigger",My=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...i}=e,n=Co(ju,r),o=md(ju,r),a=xl(r),s=E.useRef(null),c=st(t,s,n.onTriggerChange),l=E.useRef(!1),u=E.useRef(!1),f=E.useCallback(()=>l.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),$.jsx(hd,{asChild:!0,...a,children:$.jsx(Ae.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...i,ref:c,onPointerMove:Ne(e.onPointerMove,d=>{d.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:Ne(e.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:Ne(e.onPointerDown,()=>{n.open&&n.onClose(),l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ne(e.onFocus,()=>{l.current||n.onOpen()}),onBlur:Ne(e.onBlur,n.onClose),onClick:Ne(e.onClick,n.onClose)})})});My.displayName=ju;var gd="TooltipPortal",[G7,Y7]=_l(gd,{forceMount:void 0}),Ty=e=>{const{__scopeTooltip:t,forceMount:r,children:i,container:n}=e,o=Co(gd,t);return $.jsx(G7,{scope:t,forceMount:r,children:$.jsx(mn,{present:r||o.open,children:$.jsx(bl,{asChild:!0,container:n,children:i})})})};Ty.displayName=gd;var ri="TooltipContent",Cy=E.forwardRef((e,t)=>{const r=Y7(ri,e.__scopeTooltip),{forceMount:i=r.forceMount,side:n="top",...o}=e,a=Co(ri,e.__scopeTooltip);return $.jsx(mn,{present:i||a.open,children:a.disableHoverableContent?$.jsx(Ay,{side:n,...o,ref:t}):$.jsx(H7,{side:n,...o,ref:t})})}),H7=E.forwardRef((e,t)=>{const r=Co(ri,e.__scopeTooltip),i=md(ri,e.__scopeTooltip),n=E.useRef(null),o=st(t,n),[a,s]=E.useState(null),{trigger:c,onClose:l}=r,u=n.current,{onPointerInTransitChange:f}=i,d=E.useCallback(()=>{s(null),f(!1)},[f]),h=E.useCallback((p,g)=>{const v=p.currentTarget,b={x:p.clientX,y:p.clientY},_=Q7(b,v.getBoundingClientRect()),x=eO(b,_),y=tO(g.getBoundingClientRect()),w=rO([...x,...y]);s(w),f(!0)},[f]);return E.useEffect(()=>()=>d(),[d]),E.useEffect(()=>{if(c&&u){const p=v=>h(v,u),g=v=>h(v,c);return c.addEventListener("pointerleave",p),u.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",p),u.removeEventListener("pointerleave",g)}}},[c,u,h,d]),E.useEffect(()=>{if(a){const p=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},_=c?.contains(v)||u?.contains(v),x=!nO(b,a);_?d():x&&(d(),l())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,u,a,l,d]),$.jsx(Ay,{...e,ref:o})}),[X7,J7]=_l(go,{isInside:!1}),K7=Qj("TooltipContent"),Ay=E.forwardRef((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":n,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,c=Co(ri,r),l=xl(r),{onClose:u}=c;return E.useEffect(()=>(document.addEventListener(Au,u),()=>document.removeEventListener(Au,u)),[u]),E.useEffect(()=>{if(c.trigger){const f=d=>{d.target?.contains(c.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,u]),$.jsx(dl,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:$.jsxs($y,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[$.jsx(K7,{children:i}),$.jsx(X7,{scope:r,isInside:!0,children:$.jsx(B7,{id:c.contentId,role:"tooltip",children:n||i})})]})})});Cy.displayName=ri;var jy="TooltipArrow",Py=E.forwardRef((e,t)=>{const{__scopeTooltip:r,...i}=e,n=xl(r);return J7(jy,r).isInside?null:$.jsx(Sy,{...n,...i,ref:t})});Py.displayName=jy;function Q7(e,t){const r=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,i,n,o)){case o:return"left";case n:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function eO(e,t,r=5){const i=[];switch(t){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return i}function tO(e){const{top:t,right:r,bottom:i,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:i},{x:n,y:i}]}function nO(e,t){const{x:r,y:i}=e;let n=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o],c=t[a],l=s.x,u=s.y,f=c.x,d=c.y;u>i!=d>i&&r<(f-l)*(i-u)/(d-u)+l&&(n=!n)}return n}function rO(e){const t=e.slice();return t.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),iO(t)}function iO(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i<e.length;i++){const n=e[i];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(n.y-a.y)>=(o.y-a.y)*(n.x-a.x))t.pop();else break}t.push(n)}t.pop();const r=[];for(let i=e.length-1;i>=0;i--){const n=e[i];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(n.y-a.y)>=(o.y-a.y)*(n.x-a.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var oO=Ny,aO=Ey,sO=My,lO=Ty,cO=Cy,uO=Py;function fO({delayDuration:e=0,...t}){return $.jsx(oO,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Oy({...e}){return $.jsx(fO,{children:$.jsx(aO,{"data-slot":"tooltip",...e})})}function Ry({...e}){return $.jsx(sO,{"data-slot":"tooltip-trigger",...e})}function Dy({className:e,sideOffset:t=0,children:r,...i}){return $.jsx(lO,{children:$.jsxs(cO,{"data-slot":"tooltip-content",sideOffset:t,className:ae("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...i,children:[r,$.jsx(uO,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]"})]})})}const xt=Q.forwardRef(({children:e,tooltip:t,side:r="bottom",className:i,...n},o)=>$.jsxs(Oy,{children:[$.jsx(Ry,{asChild:!0,children:$.jsxs(ln,{variant:"ghost",size:"icon",...n,className:ae("aui-button-icon size-6 p-1",i),ref:o,children:[$.jsx(I$,{children:e}),$.jsx("span",{className:"aui-sr-only sr-only",children:t})]})}),$.jsx(Dy,{side:r,children:t})]}));xt.displayName="TooltipIconButton";const dO=()=>$.jsx(kc.MarkdownTextPrimitive,{remarkPlugins:[Z_],className:"aui-md",components:gO,componentsByLanguage:{d3:{CodeHeader:()=>null,SyntaxHighlighter:({code:e})=>$.jsx(Hj,{code:e})}}}),Uy=Q.memo(dO),hO=({language:e,code:t})=>{const{isCopied:r,copyToClipboard:i}=mO(),n=()=>{!t||r||i(t)};return $.jsxs("div",{className:"aui-code-header-root bg-muted-foreground/15 text-foreground dark:bg-muted-foreground/20 mt-4 flex items-center justify-between gap-4 rounded-t-lg px-4 py-2 text-sm font-semibold",children:[$.jsx("span",{className:"aui-code-header-language lowercase [&>span]:text-xs",children:e}),$.jsxs(xt,{tooltip:"Copy",onClick:n,children:[!r&&$.jsx(ap,{}),r&&$.jsx($s,{})]})]})},mO=({copiedDuration:e=3e3}={})=>{const[t,r]=Q.useState(!1);return{isCopied:t,copyToClipboard:n=>{n&&navigator.clipboard.writeText(n).then(()=>{r(!0),setTimeout(()=>r(!1),e)})}}},gO=kc.unstable_memoizeMarkdownComponents({h1:({className:e,...t})=>$.jsx("h1",{className:ae("aui-md-h1 mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",e),...t}),h2:({className:e,...t})=>$.jsx("h2",{className:ae("aui-md-h2 mt-8 mb-4 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t}),h3:({className:e,...t})=>$.jsx("h3",{className:ae("aui-md-h3 mt-6 mb-4 scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t}),h4:({className:e,...t})=>$.jsx("h4",{className:ae("aui-md-h4 mt-6 mb-4 scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t}),h5:({className:e,...t})=>$.jsx("h5",{className:ae("aui-md-h5 my-4 text-lg font-semibold first:mt-0 last:mb-0",e),...t}),h6:({className:e,...t})=>$.jsx("h6",{className:ae("aui-md-h6 my-4 font-semibold first:mt-0 last:mb-0",e),...t}),p:({className:e,...t})=>$.jsx("p",{className:ae("aui-md-p mt-5 mb-5 leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>$.jsx("a",{className:ae("aui-md-a text-primary font-medium underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>$.jsx("blockquote",{className:ae("aui-md-blockquote border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>$.jsx("ul",{className:ae("aui-md-ul my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>$.jsx("ol",{className:ae("aui-md-ol my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>$.jsx("hr",{className:ae("aui-md-hr my-5 border-b",e),...t}),table:({className:e,...t})=>$.jsx("table",{className:ae("aui-md-table my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>$.jsx("th",{className:ae("aui-md-th bg-muted px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [[align=center]]:text-center [[align=right]]:text-right",e),...t}),td:({className:e,...t})=>$.jsx("td",{className:ae("aui-md-td border-b border-l px-4 py-2 text-left last:border-r [[align=center]]:text-center [[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>$.jsx("tr",{className:ae("aui-md-tr m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>$.jsx("sup",{className:ae("aui-md-sup [&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>$.jsx("pre",{className:ae("aui-md-pre overflow-x-auto rounded-t-none! rounded-b-lg bg-black p-4 text-white",e),...t}),code:function({className:t,...r}){const i=kc.useIsMarkdownCodeBlock();return $.jsx("code",{className:ae(!i&&"aui-md-inline-code bg-muted rounded border font-semibold",t),...r})},CodeHeader:hO}),pO=m.union([m.object({type:m.literal("text"),text:m.string()}),m.object({type:m.literal("image"),data:m.string()})]),vO=m.object({content:m.array(pO)}).or(m._undefined$1()),bO=({toolName:e,result:t})=>$.jsxs("div",{className:"aui-tool-fallback-root mb-4 flex w-full flex-col gap-3 rounded-lg border py-3",children:[$.jsxs("div",{className:"aui-tool-fallback-header flex items-center gap-2 px-4",children:[$.jsx($s,{className:"aui-tool-fallback-icon size-4 text-green-500"}),$.jsxs("p",{className:"aui-tool-fallback-title grow",children:["Called tool: ",$.jsx("b",{children:e})]})]}),yO(t)]});function yO(e){return vO.parse(e)?.content?.map(r=>{switch(r.type){case"text":return $.jsx("pre",{className:"aui-tool-fallback-result-content bg-accent max-h-[300px] overflow-y-auto p-4 font-mono whitespace-pre-wrap",children:r.text});case"image":{const i=`data:image/png;base64,${r.data}`;return $.jsx("img",{src:i})}default:return $.jsx("pre",{className:"aui-tool-fallback-result-content whitespace-pre-wrap",children:JSON.stringify(r,null,2)})}})}var wl="Collapsible",[_O]=Mo(wl),[xO,pd]=_O(wl),zy=E.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:i,defaultOpen:n,disabled:o,onOpenChange:a,...s}=e,[c,l]=yl({prop:i,defaultProp:n??!1,onChange:a,caller:wl});return $.jsx(xO,{scope:r,disabled:o,contentId:Dr(),open:c,onOpenToggle:E.useCallback(()=>l(u=>!u),[l]),children:$.jsx(Ae.div,{"data-state":bd(c),"data-disabled":o?"":void 0,...s,ref:t})})});zy.displayName=wl;var Ly="CollapsibleTrigger",Fy=E.forwardRef((e,t)=>{const{__scopeCollapsible:r,...i}=e,n=pd(Ly,r);return $.jsx(Ae.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":bd(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...i,ref:t,onClick:Ne(e.onClick,n.onOpenToggle)})});Fy.displayName=Ly;var vd="CollapsibleContent",Zy=E.forwardRef((e,t)=>{const{forceMount:r,...i}=e,n=pd(vd,e.__scopeCollapsible);return $.jsx(mn,{present:r||n.open,children:({present:o})=>$.jsx(wO,{...i,ref:t,present:o})})});Zy.displayName=vd;var wO=E.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:i,children:n,...o}=e,a=pd(vd,r),[s,c]=E.useState(i),l=E.useRef(null),u=st(t,l),f=E.useRef(0),d=f.current,h=E.useRef(0),p=h.current,g=a.open||s,v=E.useRef(g),b=E.useRef(void 0);return E.useEffect(()=>{const _=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(_)},[]),_t(()=>{const _=l.current;if(_){b.current=b.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const x=_.getBoundingClientRect();f.current=x.height,h.current=x.width,v.current||(_.style.transitionDuration=b.current.transitionDuration,_.style.animationName=b.current.animationName),c(i)}},[a.open,i]),$.jsx(Ae.div,{"data-state":bd(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!g,...o,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:g&&n})});function bd(e){return e?"open":"closed"}var $O=zy;function SO({...e}){return $.jsx($O,{"data-slot":"collapsible",...e})}function kO({...e}){return $.jsx(Fy,{"data-slot":"collapsible-trigger",...e})}function IO({...e}){return $.jsx(Zy,{"data-slot":"collapsible-content",...e})}const Eg=200,By=({className:e,children:t})=>{const r=Q.useRef(null),[i,n]=Q.useState(!1),o=V.useScrollLock(r,Eg),a=Q.useCallback(s=>{s||o(),n(s)},[o]);return $.jsx(SO,{ref:r,open:i,onOpenChange:a,className:ae("aui-reasoning-root mb-4 w-full",e),style:{"--animation-duration":`${Eg}ms`},children:t})};By.displayName="ReasoningRoot";const NO=({className:e})=>$.jsx("div",{className:ae("aui-reasoning-fade pointer-events-none absolute inset-x-0 bottom-0 z-10 h-16","bg-[linear-gradient(to_top,var(--color-background),transparent)]","fade-in-0 animate-in","group-data-[state=open]/collapsible-content:animate-out","group-data-[state=open]/collapsible-content:fade-out-0","group-data-[state=open]/collapsible-content:delay-[calc(var(--animation-duration)*0.75)]","group-data-[state=open]/collapsible-content:fill-mode-forwards","duration-(--animation-duration)","group-data-[state=open]/collapsible-content:duration-(--animation-duration)",e)}),EO=({active:e,className:t})=>$.jsxs(kO,{className:ae("aui-reasoning-trigger group/trigger text-muted-foreground hover:text-foreground -mb-2 flex max-w-[75%] items-center gap-2 py-2 text-sm transition-colors",t,e&&"shimmer"),children:[$.jsx(K2,{className:"aui-reasoning-trigger-icon size-4 shrink-0"}),$.jsxs("span",{className:"aui-reasoning-trigger-label-wrapper relative inline-block leading-none",children:[$.jsx("span",{children:"Reasoning"}),e?$.jsx("span",{"aria-hidden":!0,className:"aui-reasoning-trigger-shimmer shimmer pointer-events-none absolute inset-0 motion-reduce:animate-none",children:"Reasoning"}):null]}),$.jsx(op,{className:ae("aui-reasoning-trigger-chevron mt-0.5 size-4 shrink-0","transition-transform duration-(--animation-duration) ease-out","group-data-[state=closed]/trigger:-rotate-90","group-data-[state=open]/trigger:rotate-0")})]}),Vy=({className:e,children:t,"aria-busy":r})=>$.jsxs(IO,{className:ae("aui-reasoning-content text-muted-foreground relative overflow-hidden text-sm outline-none","group/collapsible-content ease-out","data-[state=closed]:animate-collapsible-up","data-[state=open]:animate-collapsible-down","data-[state=closed]:fill-mode-forwards","data-[state=closed]:pointer-events-none","data-[state=open]:duration-(--animation-duration)","data-[state=closed]:duration-(--animation-duration)",e),"aria-busy":r,children:[t,$.jsx(NO,{})]});Vy.displayName="ReasoningContent";const Wy=({className:e,children:t})=>$.jsx("div",{className:ae("aui-reasoning-text relative z-0 space-y-4 pt-4 pl-6 leading-relaxed","transform-gpu transition-[transform,opacity]","group-data-[state=open]/collapsible-content:animate-in","group-data-[state=closed]/collapsible-content:animate-out","group-data-[state=open]/collapsible-content:fade-in-0","group-data-[state=closed]/collapsible-content:fade-out-0","group-data-[state=open]/collapsible-content:slide-in-from-top-4","group-data-[state=closed]/collapsible-content:slide-out-to-top-4","group-data-[state=open]/collapsible-content:duration-(--animation-duration)","group-data-[state=closed]/collapsible-content:duration-(--animation-duration)","[&_p]:-mb-2",e),children:t});Wy.displayName="ReasoningText";const MO=()=>$.jsx(Uy,{}),TO=({children:e,startIndex:t,endIndex:r})=>{const i=V.useAssistantState(({message:n})=>{if(n.status?.type!=="running")return!1;const o=n.parts.length-1;return o<0||n.parts[o]?.type!=="reasoning"?!1:o>=t&&o<=r});return $.jsxs(By,{children:[$.jsx(EO,{active:i}),$.jsx(Vy,{"aria-busy":i,children:$.jsx(Wy,{children:e})})]})},qy=Q.memo(MO);qy.displayName="Reasoning";const Gy=Q.memo(TO);Gy.displayName="ReasoningGroup";var bc="focusScope.autoFocusOnMount",yc="focusScope.autoFocusOnUnmount",Mg={bubbles:!1,cancelable:!0},CO="FocusScope",yd=E.forwardRef((e,t)=>{const{loop:r=!1,trapped:i=!1,onMountAutoFocus:n,onUnmountAutoFocus:o,...a}=e,[s,c]=E.useState(null),l=ir(n),u=ir(o),f=E.useRef(null),d=st(t,g=>c(g)),h=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(i){let g=function(x){if(h.paused||!s)return;const y=x.target;s.contains(y)?f.current=y:bn(f.current,{select:!0})},v=function(x){if(h.paused||!s)return;const y=x.relatedTarget;y!==null&&(s.contains(y)||bn(f.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const w of x)w.removedNodes.length>0&&bn(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const _=new MutationObserver(b);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),_.disconnect()}}},[i,s,h.paused]),E.useEffect(()=>{if(s){Cg.add(h);const g=document.activeElement;if(!s.contains(g)){const b=new CustomEvent(bc,Mg);s.addEventListener(bc,l),s.dispatchEvent(b),b.defaultPrevented||(AO(DO(Yy(s)),{select:!0}),document.activeElement===g&&bn(s))}return()=>{s.removeEventListener(bc,l),setTimeout(()=>{const b=new CustomEvent(yc,Mg);s.addEventListener(yc,u),s.dispatchEvent(b),b.defaultPrevented||bn(g??document.body,{select:!0}),s.removeEventListener(yc,u),Cg.remove(h)},0)}}},[s,l,u,h]);const p=E.useCallback(g=>{if(!r&&!i||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const _=g.currentTarget,[x,y]=jO(_);x&&y?!g.shiftKey&&b===y?(g.preventDefault(),r&&bn(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),r&&bn(y,{select:!0})):b===_&&g.preventDefault()}},[r,i,h.paused]);return $.jsx(Ae.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});yd.displayName=CO;function AO(e,{select:t=!1}={}){const r=document.activeElement;for(const i of e)if(bn(i,{select:t}),document.activeElement!==r)return}function jO(e){const t=Yy(e),r=Tg(t,e),i=Tg(t.reverse(),e);return[r,i]}function Yy(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const n=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||n?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Tg(e,t){for(const r of e)if(!PO(r,{upTo:t}))return r}function PO(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 OO(e){return e instanceof HTMLInputElement&&"select"in e}function bn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&OO(e)&&t&&e.select()}}var Cg=RO();function RO(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Ag(e,t),e.unshift(t)},remove(t){e=Ag(e,t),e[0]?.resume()}}}function Ag(e,t){const r=[...e],i=r.indexOf(t);return i!==-1&&r.splice(i,1),r}function DO(e){return e.filter(t=>t.tagName!=="A")}var _c=0;function Hy(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jg()),document.body.insertAdjacentElement("beforeend",e[1]??jg()),_c++,()=>{_c===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_c--}},[])}function jg(){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 Rt=function(){return Rt=Object.assign||function(t){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Rt.apply(this,arguments)};function Xy(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}function UO(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,o;i<n;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return e.concat(o||Array.prototype.slice.call(t))}var ka="right-scroll-bar-position",Ia="width-before-scroll-bar",zO="with-scroll-bars-hidden",LO="--removed-body-scroll-bar-size";function xc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function FO(e,t){var r=Q.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(i){var n=r.value;n!==i&&(r.value=i,r.callback(i,n))}}}})[0];return r.callback=t,r.facade}var ZO=typeof window<"u"?E.useLayoutEffect:E.useEffect,Pg=new WeakMap;function BO(e,t){var r=FO(null,function(i){return e.forEach(function(n){return xc(n,i)})});return ZO(function(){var i=Pg.get(r);if(i){var n=new Set(i),o=new Set(e),a=r.current;n.forEach(function(s){o.has(s)||xc(s,null)}),o.forEach(function(s){n.has(s)||xc(s,a)})}Pg.set(r,e)},[e]),r}function VO(e){return e}function WO(e,t){t===void 0&&(t=VO);var r=[],i=!1,n={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var a=t(o,i);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(i=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){i=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(o),a=r}var c=function(){var u=a;a=[],u.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return n}function qO(e){e===void 0&&(e={});var t=WO(null);return t.options=Rt({async:!0,ssr:!1},e),t}var Jy=function(e){var t=e.sideCar,r=Xy(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return E.createElement(i,Rt({},r))};Jy.isSideCarExport=!0;function GO(e,t){return e.useMedium(t),Jy}var Ky=qO(),wc=function(){},$l=E.forwardRef(function(e,t){var r=E.useRef(null),i=E.useState({onScrollCapture:wc,onWheelCapture:wc,onTouchMoveCapture:wc}),n=i[0],o=i[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,p=e.noIsolation,g=e.inert,v=e.allowPinchZoom,b=e.as,_=b===void 0?"div":b,x=e.gapMode,y=Xy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,S=BO([r,t]),k=Rt(Rt({},y),n);return E.createElement(E.Fragment,null,u&&E.createElement(w,{sideCar:Ky,removeScrollBar:l,shards:f,noRelative:h,noIsolation:p,inert:g,setCallbacks:o,allowPinchZoom:!!v,lockRef:r,gapMode:x}),a?E.cloneElement(E.Children.only(s),Rt(Rt({},k),{ref:S})):E.createElement(_,Rt({},k,{className:c,ref:S}),s))});$l.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$l.classNames={fullWidth:Ia,zeroRight:ka};var YO=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function HO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=YO();return t&&e.setAttribute("nonce",t),e}function XO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function JO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var KO=function(){var e=0,t=null;return{add:function(r){e==0&&(t=HO())&&(XO(t,r),JO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QO=function(){var e=KO();return function(t,r){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Qy=function(){var e=QO(),t=function(r){var i=r.styles,n=r.dynamic;return e(i,n),null};return t},eR={left:0,top:0,right:0,gap:0},$c=function(e){return parseInt(e||"",10)||0},tR=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[$c(r),$c(i),$c(n)]},nR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return eR;var t=tR(e),r=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-r+t[2]-t[0])}},rR=Qy(),zr="data-scroll-locked",iR=function(e,t,r,i){var n=e.left,o=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
17
|
+
.`.concat(zO,` {
|
|
7
18
|
overflow: hidden `).concat(i,`;
|
|
8
|
-
padding-right: `).concat(
|
|
19
|
+
padding-right: `).concat(s,"px ").concat(i,`;
|
|
9
20
|
}
|
|
10
|
-
body[`).concat(
|
|
21
|
+
body[`).concat(zr,`] {
|
|
11
22
|
overflow: hidden `).concat(i,`;
|
|
12
23
|
overscroll-behavior: contain;
|
|
13
|
-
`).concat([
|
|
14
|
-
padding-left: `.concat(
|
|
15
|
-
padding-top: `).concat(
|
|
16
|
-
padding-right: `).concat(
|
|
24
|
+
`).concat([t&&"position: relative ".concat(i,";"),r==="margin"&&`
|
|
25
|
+
padding-left: `.concat(n,`px;
|
|
26
|
+
padding-top: `).concat(o,`px;
|
|
27
|
+
padding-right: `).concat(a,`px;
|
|
17
28
|
margin-left:0;
|
|
18
29
|
margin-top:0;
|
|
19
|
-
margin-right: `).concat(
|
|
20
|
-
`),
|
|
30
|
+
margin-right: `).concat(s,"px ").concat(i,`;
|
|
31
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
21
32
|
}
|
|
22
33
|
|
|
23
|
-
.`).concat(
|
|
24
|
-
right: `).concat(
|
|
34
|
+
.`).concat(ka,` {
|
|
35
|
+
right: `).concat(s,"px ").concat(i,`;
|
|
25
36
|
}
|
|
26
37
|
|
|
27
|
-
.`).concat(
|
|
28
|
-
margin-right: `).concat(
|
|
38
|
+
.`).concat(Ia,` {
|
|
39
|
+
margin-right: `).concat(s,"px ").concat(i,`;
|
|
29
40
|
}
|
|
30
41
|
|
|
31
|
-
.`).concat(
|
|
42
|
+
.`).concat(ka," .").concat(ka,` {
|
|
32
43
|
right: 0 `).concat(i,`;
|
|
33
44
|
}
|
|
34
45
|
|
|
35
|
-
.`).concat(
|
|
46
|
+
.`).concat(Ia," .").concat(Ia,` {
|
|
36
47
|
margin-right: 0 `).concat(i,`;
|
|
37
48
|
}
|
|
38
49
|
|
|
39
|
-
body[`).concat(
|
|
40
|
-
`).concat(
|
|
50
|
+
body[`).concat(zr,`] {
|
|
51
|
+
`).concat(LO,": ").concat(s,`px;
|
|
41
52
|
}
|
|
42
|
-
`)},
|
|
43
|
-
.block-interactivity-`.concat(
|
|
44
|
-
.allow-interactivity-`).concat(
|
|
45
|
-
`)},
|
|
53
|
+
`)},Og=function(){var e=parseInt(document.body.getAttribute(zr)||"0",10);return isFinite(e)?e:0},oR=function(){E.useEffect(function(){return document.body.setAttribute(zr,(Og()+1).toString()),function(){var e=Og()-1;e<=0?document.body.removeAttribute(zr):document.body.setAttribute(zr,e.toString())}},[])},aR=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,n=i===void 0?"margin":i;oR();var o=E.useMemo(function(){return nR(n)},[n]);return E.createElement(rR,{styles:iR(o,!t,n,r?"":"!important")})},Pu=!1;if(typeof window<"u")try{var oa=Object.defineProperty({},"passive",{get:function(){return Pu=!0,!0}});window.addEventListener("test",oa,oa),window.removeEventListener("test",oa,oa)}catch{Pu=!1}var Sr=Pu?{passive:!1}:!1,sR=function(e){return e.tagName==="TEXTAREA"},e_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!sR(e)&&r[t]==="visible")},lR=function(e){return e_(e,"overflowY")},cR=function(e){return e_(e,"overflowX")},Rg=function(e,t){var r=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var n=t_(e,i);if(n){var o=n_(e,i),a=o[1],s=o[2];if(a>s)return!0}i=i.parentNode}while(i&&i!==r.body);return!1},uR=function(e){var t=e.scrollTop,r=e.scrollHeight,i=e.clientHeight;return[t,r,i]},fR=function(e){var t=e.scrollLeft,r=e.scrollWidth,i=e.clientWidth;return[t,r,i]},t_=function(e,t){return e==="v"?lR(t):cR(t)},n_=function(e,t){return e==="v"?uR(t):fR(t)},dR=function(e,t){return e==="h"&&t==="rtl"?-1:1},hR=function(e,t,r,i,n){var o=dR(e,window.getComputedStyle(t).direction),a=o*i,s=r.target,c=t.contains(s),l=!1,u=a>0,f=0,d=0;do{if(!s)break;var h=n_(e,s),p=h[0],g=h[1],v=h[2],b=g-v-o*p;(p||b)&&t_(e,s)&&(f+=b,d+=p);var _=s.parentNode;s=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&Math.abs(f)<1||!u&&Math.abs(d)<1)&&(l=!0),l},aa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dg=function(e){return[e.deltaX,e.deltaY]},Ug=function(e){return e&&"current"in e?e.current:e},mR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gR=function(e){return`
|
|
54
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
55
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
56
|
+
`)},pR=0,kr=[];function vR(e){var t=E.useRef([]),r=E.useRef([0,0]),i=E.useRef(),n=E.useState(pR++)[0],o=E.useState(Qy)[0],a=E.useRef(e);E.useEffect(function(){a.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var g=UO([e.lockRef.current],(e.shards||[]).map(Ug),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=E.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!a.current.allowPinchZoom;var b=aa(g),_=r.current,x="deltaX"in g?g.deltaX:_[0]-b[0],y="deltaY"in g?g.deltaY:_[1]-b[1],w,S=g.target,k=Math.abs(x)>Math.abs(y)?"h":"v";if("touches"in g&&k==="h"&&S.type==="range")return!1;var N=window.getSelection(),C=N&&N.anchorNode,j=C?C===S||C.contains(S):!1;if(j)return!1;var M=Rg(k,S);if(!M)return!0;if(M?w=k:(w=k==="v"?"h":"v",M=Rg(k,S)),!M)return!1;if(!i.current&&"changedTouches"in g&&(x||y)&&(i.current=w),!w)return!0;var D=i.current||w;return hR(D,v,g,D==="h"?x:y)},[]),c=E.useCallback(function(g){var v=g;if(!(!kr.length||kr[kr.length-1]!==o)){var b="deltaY"in v?Dg(v):aa(v),_=t.current.filter(function(w){return w.name===v.type&&(w.target===v.target||v.target===w.shadowParent)&&mR(w.delta,b)})[0];if(_&&_.should){v.cancelable&&v.preventDefault();return}if(!_){var x=(a.current.shards||[]).map(Ug).filter(Boolean).filter(function(w){return w.contains(v.target)}),y=x.length>0?s(v,x[0]):!a.current.noIsolation;y&&v.cancelable&&v.preventDefault()}}},[]),l=E.useCallback(function(g,v,b,_){var x={name:g,delta:v,target:b,should:_,shadowParent:bR(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(y){return y!==x})},1)},[]),u=E.useCallback(function(g){r.current=aa(g),i.current=void 0},[]),f=E.useCallback(function(g){l(g.type,Dg(g),g.target,s(g,e.lockRef.current))},[]),d=E.useCallback(function(g){l(g.type,aa(g),g.target,s(g,e.lockRef.current))},[]);E.useEffect(function(){return kr.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Sr),document.addEventListener("touchmove",c,Sr),document.addEventListener("touchstart",u,Sr),function(){kr=kr.filter(function(g){return g!==o}),document.removeEventListener("wheel",c,Sr),document.removeEventListener("touchmove",c,Sr),document.removeEventListener("touchstart",u,Sr)}},[]);var h=e.removeScrollBar,p=e.inert;return E.createElement(E.Fragment,null,p?E.createElement(o,{styles:gR(n)}):null,h?E.createElement(aR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function bR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const yR=GO(Ky,vR);var _d=E.forwardRef(function(e,t){return E.createElement($l,Rt({},e,{ref:t,sideCar:yR}))});_d.classNames=$l.classNames;var _R=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ir=new WeakMap,sa=new WeakMap,la={},Sc=0,r_=function(e){return e&&(e.host||r_(e.parentNode))},xR=function(e,t){return t.map(function(r){if(e.contains(r))return r;var i=r_(r);return i&&e.contains(i)?i:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},wR=function(e,t,r,i){var n=xR(t,Array.isArray(e)?e:[e]);la[r]||(la[r]=new WeakMap);var o=la[r],a=[],s=new Set,c=new Set(n),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};n.forEach(l);var u=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))u(d);else try{var h=d.getAttribute(i),p=h!==null&&h!=="false",g=(Ir.get(d)||0)+1,v=(o.get(d)||0)+1;Ir.set(d,g),o.set(d,v),a.push(d),g===1&&p&&sa.set(d,!0),v===1&&d.setAttribute(r,"true"),p||d.setAttribute(i,"true")}catch(b){console.error("aria-hidden: cannot operate on ",d,b)}})};return u(t),s.clear(),Sc++,function(){a.forEach(function(f){var d=Ir.get(f)-1,h=o.get(f)-1;Ir.set(f,d),o.set(f,h),d||(sa.has(f)||f.removeAttribute(i),sa.delete(f)),h||f.removeAttribute(r)}),Sc--,Sc||(Ir=new WeakMap,Ir=new WeakMap,sa=new WeakMap,la={})}},i_=function(e,t,r){r===void 0&&(r="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),n=_R(e);return n?(i.push.apply(i,Array.from(n.querySelectorAll("[aria-live], script"))),wR(i,n,r,"aria-hidden")):function(){return null}},Sl="Dialog",[o_]=Mo(Sl),[$R,At]=o_(Sl),a_=e=>{const{__scopeDialog:t,children:r,open:i,defaultOpen:n,onOpenChange:o,modal:a=!0}=e,s=E.useRef(null),c=E.useRef(null),[l,u]=yl({prop:i,defaultProp:n??!1,onChange:o,caller:Sl});return $.jsx($R,{scope:t,triggerRef:s,contentRef:c,contentId:Dr(),titleId:Dr(),descriptionId:Dr(),open:l,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),modal:a,children:r})};a_.displayName=Sl;var s_="DialogTrigger",l_=E.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,n=At(s_,r),o=st(t,n.triggerRef);return $.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$d(n.open),...i,ref:o,onClick:Ne(e.onClick,n.onOpenToggle)})});l_.displayName=s_;var xd="DialogPortal",[SR,c_]=o_(xd,{forceMount:void 0}),u_=e=>{const{__scopeDialog:t,forceMount:r,children:i,container:n}=e,o=At(xd,t);return $.jsx(SR,{scope:t,forceMount:r,children:E.Children.map(i,a=>$.jsx(mn,{present:r||o.open,children:$.jsx(bl,{asChild:!0,container:n,children:a})}))})};u_.displayName=xd;var ws="DialogOverlay",f_=E.forwardRef((e,t)=>{const r=c_(ws,e.__scopeDialog),{forceMount:i=r.forceMount,...n}=e,o=At(ws,e.__scopeDialog);return o.modal?$.jsx(mn,{present:i||o.open,children:$.jsx(IR,{...n,ref:t})}):null});f_.displayName=ws;var kR=id("DialogOverlay.RemoveScroll"),IR=E.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,n=At(ws,r);return $.jsx(_d,{as:kR,allowPinchZoom:!0,shards:[n.contentRef],children:$.jsx(Ae.div,{"data-state":$d(n.open),...i,ref:t,style:{pointerEvents:"auto",...i.style}})})}),ar="DialogContent",d_=E.forwardRef((e,t)=>{const r=c_(ar,e.__scopeDialog),{forceMount:i=r.forceMount,...n}=e,o=At(ar,e.__scopeDialog);return $.jsx(mn,{present:i||o.open,children:o.modal?$.jsx(NR,{...n,ref:t}):$.jsx(ER,{...n,ref:t})})});d_.displayName=ar;var NR=E.forwardRef((e,t)=>{const r=At(ar,e.__scopeDialog),i=E.useRef(null),n=st(t,r.contentRef,i);return E.useEffect(()=>{const o=i.current;if(o)return i_(o)},[]),$.jsx(h_,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,o=>{o.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ne(e.onFocusOutside,o=>o.preventDefault())})}),ER=E.forwardRef((e,t)=>{const r=At(ar,e.__scopeDialog),i=E.useRef(!1),n=E.useRef(!1);return $.jsx(h_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||r.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,n.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=o.target;r.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&n.current&&o.preventDefault()}})}),h_=E.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:o,...a}=e,s=At(ar,r),c=E.useRef(null),l=st(t,c);return Hy(),$.jsxs($.Fragment,{children:[$.jsx(yd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:n,onUnmountAutoFocus:o,children:$.jsx(dl,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":$d(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),$.jsxs($.Fragment,{children:[$.jsx(TR,{titleId:s.titleId}),$.jsx(AR,{contentRef:c,descriptionId:s.descriptionId})]})]})}),wd="DialogTitle",m_=E.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,n=At(wd,r);return $.jsx(Ae.h2,{id:n.titleId,...i,ref:t})});m_.displayName=wd;var g_="DialogDescription",MR=E.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,n=At(g_,r);return $.jsx(Ae.p,{id:n.descriptionId,...i,ref:t})});MR.displayName=g_;var p_="DialogClose",v_=E.forwardRef((e,t)=>{const{__scopeDialog:r,...i}=e,n=At(p_,r);return $.jsx(Ae.button,{type:"button",...i,ref:t,onClick:Ne(e.onClick,()=>n.onOpenChange(!1))})});v_.displayName=p_;function $d(e){return e?"open":"closed"}var b_="DialogTitleWarning",[K9,y_]=Xj(b_,{contentName:ar,titleName:wd,docsSlug:"dialog"}),TR=({titleId:e})=>{const t=y_(b_),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
46
57
|
|
|
47
|
-
If you want to hide the \`${
|
|
58
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
48
59
|
|
|
49
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${r.docsSlug}`;return g.useEffect(()=>{t&&(document.getElementById(t)||console.error(o))},[o,t]),null},Zg="DialogDescriptionWarning",Fg=({contentRef:t,descriptionId:r})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${sa(Zg).contentName}}.`;return g.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");r&&e&&(document.getElementById(r)||console.warn(i))},[i,t,r]),null},Vg=qo,Wg=Ho,Bg=Yo,Gg=Qo,Jg=ea,qg=ra,Kg=oa;function Hg({...t}){return d.jsx(Vg,{"data-slot":"dialog",...t})}function Xg({...t}){return d.jsx(Wg,{"data-slot":"dialog-trigger",...t})}function Yg({...t}){return d.jsx(Bg,{"data-slot":"dialog-portal",...t})}function Qg({className:t,...r}){return d.jsx(Gg,{"data-slot":"dialog-overlay",className:A("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...r})}function ep({className:t,children:r,showCloseButton:o=!0,...i}){return d.jsxs(Yg,{"data-slot":"dialog-portal",children:[d.jsx(Qg,{}),d.jsxs(Jg,{"data-slot":"dialog-content",className:A("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...i,children:[r,o&&d.jsxs(Kg,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[d.jsx($i,{}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function tp({className:t,...r}){return d.jsx(qg,{"data-slot":"dialog-title",className:A("text-lg leading-none font-semibold",t),...r})}function rp(t,r=[]){let o=[];function i(n,s){const l=g.createContext(s);l.displayName=n+"Context";const u=o.length;o=[...o,s];const c=f=>{const{scope:b,children:p,...h}=f,v=b?.[t]?.[u]||l,y=g.useMemo(()=>h,Object.values(h));return d.jsx(v.Provider,{value:y,children:p})};c.displayName=n+"Provider";function m(f,b){const p=b?.[t]?.[u]||l,h=g.useContext(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${n}\``)}return[c,m]}const e=()=>{const n=o.map(s=>g.createContext(s));return function(l){const u=l?.[t]||n;return g.useMemo(()=>({[`__scope${t}`]:{...l,[t]:u}}),[l,u])}};return e.scopeName=t,[i,np(e,...r)]}function np(...t){const r=t[0];if(t.length===1)return r;const o=()=>{const i=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(n){const s=i.reduce((l,{useScope:u,scopeName:c})=>{const f=u(n)[`__scope${c}`];return{...l,...f}},{});return g.useMemo(()=>({[`__scope${r.scopeName}`]:s}),[s])}};return o.scopeName=r.scopeName,o}var ip=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qr=ip.reduce((t,r)=>{const o=wi(`Primitive.${r}`),i=g.forwardRef((e,n)=>{const{asChild:s,...l}=e,u=s?o:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(u,{...l,ref:n})});return i.displayName=`Primitive.${r}`,{...t,[r]:i}},{});function op(){return gc.useSyncExternalStore(ap,()=>!0,()=>!1)}function ap(){return()=>{}}var en="Avatar",[sp]=rp(en),[lp,la]=sp(en),ca=g.forwardRef((t,r)=>{const{__scopeAvatar:o,...i}=t,[e,n]=g.useState("idle");return d.jsx(lp,{scope:o,imageLoadingStatus:e,onImageLoadingStatusChange:n,children:d.jsx(Qr.span,{...i,ref:r})})});ca.displayName=en;var ua="AvatarImage",da=g.forwardRef((t,r)=>{const{__scopeAvatar:o,src:i,onLoadingStatusChange:e=()=>{},...n}=t,s=la(ua,o),l=cp(i,n),u=Ee(c=>{e(c),s.onImageLoadingStatusChange(c)});return oe(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?d.jsx(Qr.img,{...n,ref:r,src:i}):null});da.displayName=ua;var ma="AvatarFallback",fa=g.forwardRef((t,r)=>{const{__scopeAvatar:o,delayMs:i,...e}=t,n=la(ma,o),[s,l]=g.useState(i===void 0);return g.useEffect(()=>{if(i!==void 0){const u=window.setTimeout(()=>l(!0),i);return()=>window.clearTimeout(u)}},[i]),s&&n.imageLoadingStatus!=="loaded"?d.jsx(Qr.span,{...e,ref:r}):null});fa.displayName=ma;function Qn(t,r){return t?r?(t.src!==r&&(t.src=r),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cp(t,{referrerPolicy:r,crossOrigin:o}){const i=op(),e=g.useRef(null),n=i?(e.current||(e.current=new window.Image),e.current):null,[s,l]=g.useState(()=>Qn(n,t));return oe(()=>{l(Qn(n,t))},[n,t]),oe(()=>{const u=f=>()=>{l(f)};if(!n)return;const c=u("loaded"),m=u("error");return n.addEventListener("load",c),n.addEventListener("error",m),r&&(n.referrerPolicy=r),typeof o=="string"&&(n.crossOrigin=o),()=>{n.removeEventListener("load",c),n.removeEventListener("error",m)}},[n,o,r]),s}var up=ca,dp=da,mp=fa;function fp({className:t,...r}){return d.jsx(up,{"data-slot":"avatar",className:A("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...r})}function gp({className:t,...r}){return d.jsx(dp,{"data-slot":"avatar-image",className:A("aspect-square size-full",t),...r})}function pp({className:t,...r}){return d.jsx(mp,{"data-slot":"avatar-fallback",className:A("bg-muted flex size-full items-center justify-center rounded-full",t),...r})}const vp=t=>{const[r,o]=P.useState(void 0);return P.useEffect(()=>{if(!t){o(void 0);return}const i=URL.createObjectURL(t);return o(i),()=>{URL.revokeObjectURL(i)}},[t]),r},ga=()=>{const{file:t,src:r}=E.useAssistantState(Ca.useShallow(({attachment:o})=>{if(o.type!=="image")return{};if(o.file)return{file:o.file};const i=o.content?.filter(e=>e.type==="image")[0]?.image;return i?{src:i}:{}}));return vp(t)??r},hp=({src:t})=>{const[r,o]=P.useState(!1);return d.jsx("img",{src:t,alt:"Image Preview",className:r?"aui-attachment-preview-image-loaded block h-auto max-h-[80vh] w-auto max-w-full object-contain":"aui-attachment-preview-image-loading hidden",onLoad:()=>o(!0)})},bp=({children:t})=>{const r=ga();return r?d.jsxs(Hg,{children:[d.jsx(Xg,{className:"aui-attachment-preview-trigger hover:bg-accent/50 cursor-pointer transition-colors",asChild:!0,children:t}),d.jsxs(ep,{className:"aui-attachment-preview-dialog-content [&_svg]:text-background [&>button]:bg-foreground/60 [&>button]:hover:[&_svg]:text-destructive p-2 sm:max-w-3xl [&>button]:rounded-full [&>button]:p-1 [&>button]:opacity-100 [&>button]:!ring-0",children:[d.jsx(tp,{className:"aui-sr-only sr-only",children:"Image Attachment Preview"}),d.jsx("div",{className:"aui-attachment-preview bg-background relative mx-auto flex max-h-[80dvh] w-full items-center justify-center overflow-hidden",children:d.jsx(hp,{src:r})})]})]}):t},yp=()=>{const t=E.useAssistantState(({attachment:o})=>o.type==="image"),r=ga();return d.jsxs(fp,{className:"aui-attachment-tile-avatar h-full w-full rounded-none",children:[d.jsx(gp,{src:r,alt:"Attachment preview",className:"aui-attachment-tile-image object-cover"}),d.jsx(pp,{delayMs:t?200:0,children:d.jsx(Gc,{className:"aui-attachment-tile-fallback-icon text-muted-foreground size-8"})})]})},pa=()=>{const r=E.useAssistantApi().attachment.source==="composer",o=E.useAssistantState(({attachment:e})=>e.type==="image"),i=E.useAssistantState(({attachment:e})=>{const n=e.type;switch(n){case"image":return"Image";case"document":return"Document";case"file":return"File";default:{const s=n;throw new Error(`Unknown attachment type: ${s}`)}}});return d.jsxs(wo,{children:[d.jsxs(E.AttachmentPrimitive.Root,{className:A("aui-attachment-root relative",o&&"aui-attachment-root-composer only:[&>#attachment-tile]:size-24"),children:[d.jsx(bp,{children:d.jsx(So,{asChild:!0,children:d.jsx("div",{className:A("aui-attachment-tile bg-muted size-14 cursor-pointer overflow-hidden rounded-[14px] border transition-opacity hover:opacity-75",r&&"aui-attachment-tile-composer border-foreground/20"),role:"button",id:"attachment-tile","aria-label":`${i} attachment`,children:d.jsx(yp,{})})})}),r&&d.jsx(xp,{})]}),d.jsx(Io,{side:"top",children:d.jsx(E.AttachmentPrimitive.Name,{})})]})},xp=()=>d.jsx(E.AttachmentPrimitive.Remove,{asChild:!0,children:d.jsx(ae,{tooltip:"Remove file",className:"aui-attachment-tile-remove text-muted-foreground hover:[&_svg]:text-destructive absolute top-1.5 right-1.5 size-3.5 rounded-full bg-white opacity-100 shadow-sm hover:!bg-white [&_svg]:text-black",side:"top",children:d.jsx($i,{className:"aui-attachment-remove-icon size-3 dark:stroke-[2.5px]"})})}),$p=()=>d.jsx("div",{className:"aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row justify-end gap-2",children:d.jsx(E.MessagePrimitive.Attachments,{components:{Attachment:pa}})}),_p=()=>d.jsx("div",{className:"aui-composer-attachments mb-2 flex w-full flex-row items-center gap-2 overflow-x-auto px-1.5 pt-0.5 pb-1 empty:hidden",children:d.jsx(E.ComposerPrimitive.Attachments,{components:{Attachment:pa}})}),wp=()=>d.jsx(E.ComposerPrimitive.AddAttachment,{asChild:!0,children:d.jsx(ae,{tooltip:"Add Attachment",side:"bottom",variant:"ghost",size:"icon",className:"aui-composer-add-attachment hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-[34px] rounded-full p-1 text-xs font-semibold","aria-label":"Add Attachment",children:d.jsx(Yc,{className:"aui-attachment-add-icon size-5 stroke-[1.5px]"})})});var tr="Popover",[va]=ft(tr,[Jt]),vt=Jt(),[Sp,je]=va(tr),ha=t=>{const{__scopePopover:r,children:o,open:i,defaultOpen:e,onOpenChange:n,modal:s=!1}=t,l=vt(r),u=g.useRef(null),[c,m]=g.useState(!1),[f,b]=Kt({prop:i,defaultProp:e??!1,onChange:n,caller:tr});return d.jsx(co,{...l,children:d.jsx(Sp,{scope:r,contentId:Fe(),triggerRef:u,open:f,onOpenChange:b,onOpenToggle:g.useCallback(()=>b(p=>!p),[b]),hasCustomAnchor:c,onCustomAnchorAdd:g.useCallback(()=>m(!0),[]),onCustomAnchorRemove:g.useCallback(()=>m(!1),[]),modal:s,children:o})})};ha.displayName=tr;var ba="PopoverAnchor",Ip=g.forwardRef((t,r)=>{const{__scopePopover:o,...i}=t,e=je(ba,o),n=vt(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=e;return g.useEffect(()=>(s(),()=>l()),[s,l]),d.jsx(Fr,{...n,...i,ref:r})});Ip.displayName=ba;var ya="PopoverTrigger",xa=g.forwardRef((t,r)=>{const{__scopePopover:o,...i}=t,e=je(ya,o),n=vt(o),s=ee(r,e.triggerRef),l=d.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":e.open,"aria-controls":e.contentId,"data-state":Ia(e.open),...i,ref:s,onClick:J(t.onClick,e.onOpenToggle)});return e.hasCustomAnchor?l:d.jsx(Fr,{asChild:!0,...n,children:l})});xa.displayName=ya;var tn="PopoverPortal",[kp,jp]=va(tn,{forceMount:void 0}),$a=t=>{const{__scopePopover:r,forceMount:o,children:i,container:e}=t,n=je(tn,r);return d.jsx(kp,{scope:r,forceMount:o,children:d.jsx($e,{present:o||n.open,children:d.jsx(qt,{asChild:!0,container:e,children:i})})})};$a.displayName=tn;var Je="PopoverContent",_a=g.forwardRef((t,r)=>{const o=jp(Je,t.__scopePopover),{forceMount:i=o.forceMount,...e}=t,n=je(Je,t.__scopePopover);return d.jsx($e,{present:i||n.open,children:n.modal?d.jsx(Ep,{...e,ref:r}):d.jsx(Op,{...e,ref:r})})});_a.displayName=Je;var Np=Tr("PopoverContent.RemoveScroll"),Ep=g.forwardRef((t,r)=>{const o=je(Je,t.__scopePopover),i=g.useRef(null),e=ee(r,i),n=g.useRef(!1);return g.useEffect(()=>{const s=i.current;if(s)return Go(s)},[]),d.jsx(Kr,{as:Np,allowPinchZoom:!0,children:d.jsx(wa,{...t,ref:e,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(t.onCloseAutoFocus,s=>{s.preventDefault(),n.current||o.triggerRef.current?.focus()}),onPointerDownOutside:J(t.onPointerDownOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;n.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:J(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Op=g.forwardRef((t,r)=>{const o=je(Je,t.__scopePopover),i=g.useRef(!1),e=g.useRef(!1);return d.jsx(wa,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{t.onCloseAutoFocus?.(n),n.defaultPrevented||(i.current||o.triggerRef.current?.focus(),n.preventDefault()),i.current=!1,e.current=!1},onInteractOutside:n=>{t.onInteractOutside?.(n),n.defaultPrevented||(i.current=!0,n.detail.originalEvent.type==="pointerdown"&&(e.current=!0));const s=n.target;o.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&e.current&&n.preventDefault()}})}),wa=g.forwardRef((t,r)=>{const{__scopePopover:o,trapFocus:i,onOpenAutoFocus:e,onCloseAutoFocus:n,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:m,...f}=t,b=je(Je,o),p=vt(o);return Uo(),d.jsx(qr,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:e,onUnmountAutoFocus:n,children:d.jsx(Ft,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:m,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:c,onDismiss:()=>b.onOpenChange(!1),children:d.jsx(uo,{"data-state":Ia(b.open),role:"dialog",id:b.contentId,...p,...f,ref:r,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Sa="PopoverClose",Cp=g.forwardRef((t,r)=>{const{__scopePopover:o,...i}=t,e=je(Sa,o);return d.jsx(H.button,{type:"button",...i,ref:r,onClick:J(t.onClick,()=>e.onOpenChange(!1))})});Cp.displayName=Sa;var Pp="PopoverArrow",Tp=g.forwardRef((t,r)=>{const{__scopePopover:o,...i}=t,e=vt(o);return d.jsx(mo,{...e,...i,ref:r})});Tp.displayName=Pp;function Ia(t){return t?"open":"closed"}var Ap=ha,Dp=xa,Rp=$a,Up=_a;function zp({...t}){return d.jsx(Ap,{"data-slot":"popover",...t})}function Mp({...t}){return d.jsx(Dp,{"data-slot":"popover-trigger",...t})}function Lp({className:t,align:r="center",sideOffset:o=4,...i}){return d.jsx(Rp,{children:d.jsx(Up,{"data-slot":"popover-content",align:r,sideOffset:o,className:A("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...i})})}const ka=()=>{const{config:t}=se();return d.jsx(Nt.LazyMotion,{features:Nt.domAnimation,children:d.jsx(Nt.MotionConfig,{reducedMotion:"user",children:d.jsxs(E.ThreadPrimitive.Root,{className:"aui-root aui-thread-root bg-background @container flex h-full flex-col",children:[t.variant==="widget"&&d.jsx(Zp,{}),d.jsxs(E.ThreadPrimitive.Viewport,{className:"aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll px-4",children:[d.jsx(E.ThreadPrimitive.If,{empty:!0,children:d.jsx(Vp,{})}),d.jsx(E.ThreadPrimitive.Messages,{components:{UserMessage:Yp,EditComposer:ev,AssistantMessage:Kp}}),d.jsx(E.ThreadPrimitive.If,{empty:!1,children:d.jsx("div",{className:"aui-thread-viewport-spacer min-h-8 grow"})}),d.jsx(Bp,{})]})]})})})},Zp=()=>{const{isExpanded:t,setIsExpanded:r,config:o}=se();return o.modal?.expandable?d.jsx("div",{className:"aui-thread-header border-border bg-background sticky top-0 z-10 flex items-center justify-between border-b p-2",children:d.jsx(be,{variant:"ghost",size:"icon",className:"cursor-pointer",onClick:()=>r(!t),"aria-label":"Expand thread",children:d.jsx(qc,{className:"text-muted-foreground size-4 rotate-90"})})}):null},Fp=()=>d.jsx(E.ThreadPrimitive.ScrollToBottom,{asChild:!0,children:d.jsx(ae,{tooltip:"Scroll to bottom",variant:"outline",className:"aui-thread-scroll-to-bottom dark:bg-background dark:hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible",children:d.jsx(Cc,{})})}),Vp=()=>{const{config:t}=se(),{title:r,subtitle:o}=t.welcome??{};return d.jsxs("div",{className:"aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col gap-10",children:[d.jsx("div",{className:"aui-thread-welcome-center flex w-full grow flex-col items-center justify-center",children:d.jsxs("div",{className:"aui-thread-welcome-message flex size-full flex-col justify-start p-8",children:[d.jsx(br.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"aui-thread-welcome-message-motion-1 text-2xl font-semibold",children:r}),d.jsx(br.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{delay:.1},className:"aui-thread-welcome-message-motion-2 text-muted-foreground/65 text-2xl",children:o})]})}),d.jsx(Wp,{})]})},Wp=()=>{const{config:t}=se(),r=t.welcome?.suggestions??[];return d.jsx("div",{className:"aui-thread-welcome-suggestions grid w-full gap-2 pb-10 @md:grid-cols-2",children:r.map((o,i)=>d.jsx(br.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{delay:.05*i},className:"aui-thread-welcome-suggestion-display nth-[n+3]:hidden @md:nth-[n+3]:block",children:d.jsx(E.ThreadPrimitive.Suggestion,{prompt:o.action,send:!0,asChild:!0,children:d.jsxs(be,{variant:"ghost",className:"aui-thread-welcome-suggestion dark:hover:bg-accent/60 h-auto w-full flex-1 flex-wrap items-start justify-start gap-1 rounded-3xl border px-5 py-4 text-left text-sm @md:flex-col","aria-label":o.action,children:[d.jsx("span",{className:"aui-thread-welcome-suggestion-text-1 font-medium",children:o.title}),d.jsx("span",{className:"aui-thread-welcome-suggestion-text-2 text-muted-foreground",children:o.label})]})})},`suggested-action-${o.title}-${i}`))})},Bp=()=>{const{config:t}=se(),r=t.composer??{placeholder:"Send a message...",attachments:!0};return d.jsxs("div",{className:"aui-composer-wrapper bg-background sticky bottom-0 mx-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 overflow-visible rounded-t-3xl pb-4 md:pb-6",children:[d.jsx(Fp,{}),d.jsxs(E.ComposerPrimitive.Root,{className:"aui-composer-root group/input-group border-input bg-background has-[textarea:focus-visible]:border-ring has-[textarea:focus-visible]:ring-ring/50 dark:bg-background relative flex w-full flex-col rounded-3xl border px-1 pt-2 shadow-xs transition-[color,box-shadow] outline-none has-[textarea:focus-visible]:ring-[3px]",children:[r.attachments&&d.jsx(_p,{}),d.jsx(E.ComposerPrimitive.Input,{placeholder:r.placeholder,className:"aui-composer-input placeholder:text-muted-foreground mb-1 max-h-32 min-h-16 w-full resize-none bg-transparent px-3.5 pt-1.5 pb-3 text-base outline-none focus-visible:ring-0",rows:1,autoFocus:!0,"aria-label":"Message input"}),d.jsx(Jp,{})]})]})},Gp=()=>{const{model:t,setModel:r}=se();return d.jsxs(zp,{children:[d.jsx(Mp,{asChild:!0,children:d.jsx(be,{variant:"ghost",size:"icon",className:"aui-composer-model-picker hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-[34px] rounded-full p-1 text-xs font-semibold","aria-label":"Model Settings",children:d.jsx(ru,{className:"aui-attachment-add-icon size-5 stroke-[1.5px]"})})}),d.jsx(Lp,{side:"top",align:"start",className:"max-h-48 overflow-y-auto p-0 shadow-none",children:a.MODELS.map(o=>d.jsxs(be,{onClick:()=>r(o),variant:"ghost",className:"w-full justify-start gap-2 rounded-none px-2",children:[o===t?d.jsx("div",{children:d.jsx(Zt,{className:"size-4 text-emerald-500"})}):d.jsx("div",{className:"size-4",children:" "}),o]}))})]})},Jp=()=>{const{config:t}=se(),r=t.composer??{attachments:!0};return d.jsxs("div",{className:"aui-composer-action-wrapper relative mx-1 mt-2 mb-2 flex items-center justify-between",children:[d.jsxs("div",{className:"aui-composer-action-wrapper-inner flex items-center",children:[r.attachments?d.jsx(wp,{}):d.jsx("div",{className:"aui-composer-add-attachment-placeholder"}),t.model?.showModelPicker&&d.jsx(Gp,{})]}),d.jsx(E.ThreadPrimitive.If,{running:!1,children:d.jsx(E.ComposerPrimitive.Send,{asChild:!0,children:d.jsx(ae,{tooltip:"Send message",side:"bottom",type:"submit",variant:"default",size:"icon",className:"aui-composer-send size-[34px] rounded-full p-1","aria-label":"Send message",children:d.jsx(Tc,{className:"aui-composer-send-icon size-5"})})})}),d.jsx(E.ThreadPrimitive.If,{running:!0,children:d.jsx(E.ComposerPrimitive.Cancel,{asChild:!0,children:d.jsx(be,{type:"button",variant:"default",size:"icon",className:"aui-composer-cancel border-muted-foreground/60 hover:bg-primary/75 dark:border-muted-foreground/90 size-[34px] rounded-full border","aria-label":"Stop generating",children:d.jsx(iu,{className:"aui-composer-cancel-icon size-3.5 fill-white dark:fill-black"})})})})]})},qp=()=>d.jsx(E.MessagePrimitive.Error,{children:d.jsx(E.ErrorPrimitive.Root,{className:"aui-message-error-root border-destructive bg-destructive/10 text-destructive dark:bg-destructive/5 mt-2 rounded-md border p-3 text-sm dark:text-red-200",children:d.jsx(E.ErrorPrimitive.Message,{className:"aui-message-error-message line-clamp-2"})})}),Kp=()=>{const{config:t}=se(),r=t.tools??{};return d.jsx(E.MessagePrimitive.Root,{asChild:!0,children:d.jsxs("div",{className:"aui-assistant-message-root animate-in fade-in slide-in-from-bottom-1 relative mx-auto w-full max-w-(--thread-max-width) py-4 duration-150 ease-out last:mb-24","data-role":"assistant",children:[d.jsxs("div",{className:"aui-assistant-message-content text-foreground mx-2 leading-7 wrap-break-word",children:[d.jsx(E.MessagePrimitive.Parts,{components:{Text:ko,Image:Hp,tools:{by_name:r.components,Fallback:Nf},Reasoning:Ao,ReasoningGroup:Do}}),d.jsx(qp,{})]}),d.jsxs("div",{className:"aui-assistant-message-footer mt-2 ml-2 flex",children:[d.jsx(ja,{}),d.jsx(Xp,{})]})]})})},Hp=t=>d.jsx("img",{src:t.image}),Xp=()=>d.jsxs(E.ActionBarPrimitive.Root,{hideWhenRunning:!0,autohide:"not-last",autohideFloat:"single-branch",className:"aui-assistant-action-bar-root text-muted-foreground data-floating:bg-background col-start-3 row-start-2 -ml-1 flex gap-1 data-floating:absolute data-floating:rounded-md data-floating:border data-floating:p-1 data-floating:shadow-sm",children:[d.jsx(E.ActionBarPrimitive.Copy,{asChild:!0,children:d.jsxs(ae,{tooltip:"Copy",children:[d.jsx(E.MessagePrimitive.If,{copied:!0,children:d.jsx(Zt,{})}),d.jsx(E.MessagePrimitive.If,{copied:!1,children:d.jsx(xi,{})})]})}),d.jsx(E.ActionBarPrimitive.Reload,{asChild:!0,children:d.jsx(ae,{tooltip:"Refresh",children:d.jsx(eu,{})})})]}),Yp=()=>d.jsx(E.MessagePrimitive.Root,{asChild:!0,children:d.jsxs("div",{className:"aui-user-message-root animate-in fade-in slide-in-from-bottom-1 mx-auto grid w-full max-w-(--thread-max-width) auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2 px-2 py-4 duration-150 ease-out first:mt-3 last:mb-5 [&:where(>*)]:col-start-2","data-role":"user",children:[d.jsx($p,{}),d.jsxs("div",{className:"aui-user-message-content-wrapper relative col-start-2 min-w-0",children:[d.jsx("div",{className:"aui-user-message-content bg-muted text-foreground rounded-3xl px-5 py-2.5 wrap-break-word",children:d.jsx(E.MessagePrimitive.Parts,{})}),d.jsx("div",{className:"aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2",children:d.jsx(Qp,{})})]}),d.jsx(ja,{className:"aui-user-branch-picker col-span-full col-start-1 row-start-3 -mr-1 justify-end"})]})}),Qp=()=>d.jsx(E.ActionBarPrimitive.Root,{hideWhenRunning:!0,autohide:"not-last",className:"aui-user-action-bar-root flex flex-col items-end",children:d.jsx(E.ActionBarPrimitive.Edit,{asChild:!0,children:d.jsx(ae,{tooltip:"Edit",className:"aui-user-action-edit p-4",children:d.jsx(Hc,{})})})}),ev=()=>d.jsx("div",{className:"aui-edit-composer-wrapper mx-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 px-2 first:mt-4",children:d.jsxs(E.ComposerPrimitive.Root,{className:"aui-edit-composer-root bg-muted ml-auto flex w-full max-w-7/8 flex-col rounded-xl",children:[d.jsx(E.ComposerPrimitive.Input,{className:"aui-edit-composer-input text-foreground flex min-h-[60px] w-full resize-none bg-transparent p-4 outline-none",autoFocus:!0}),d.jsxs("div",{className:"aui-edit-composer-footer mx-3 mb-3 flex items-center justify-center gap-2 self-end",children:[d.jsx(E.ComposerPrimitive.Cancel,{asChild:!0,children:d.jsx(be,{variant:"ghost",size:"sm","aria-label":"Cancel edit",children:"Cancel"})}),d.jsx(E.ComposerPrimitive.Send,{asChild:!0,children:d.jsx(be,{size:"sm","aria-label":"Update message",children:"Update"})})]})]})}),ja=({className:t,...r})=>d.jsxs(E.BranchPickerPrimitive.Root,{hideWhenSingleBranch:!0,className:A("aui-branch-picker-root text-muted-foreground mr-2 -ml-2 inline-flex items-center text-xs",t),...r,children:[d.jsx(E.BranchPickerPrimitive.Previous,{asChild:!0,children:d.jsx(ae,{tooltip:"Previous",children:d.jsx(Zc,{})})}),d.jsxs("span",{className:"aui-branch-picker-state font-medium",children:[d.jsx(E.BranchPickerPrimitive.Number,{})," / ",d.jsx(E.BranchPickerPrimitive.Count,{})]}),d.jsx(E.BranchPickerPrimitive.Next,{asChild:!0,children:d.jsx(ae,{tooltip:"Next",children:d.jsx(Vc,{})})})]}),tv=()=>{const{config:t,isExpanded:r}=se(),o=t.modal?.dimensions?.default??{width:"600px",height:"600px",maxHeight:"95vh"},i=t.modal?.dimensions?.expanded??{width:"60vw",height:"90vh"};return d.jsxs(E.AssistantModalPrimitive.Root,{defaultOpen:t.modal?.defaultOpen??!1,children:[d.jsx(E.AssistantModalPrimitive.Anchor,{className:A("aui-root aui-modal-anchor fixed size-11",iv(t.modal?.position)),children:d.jsx(E.AssistantModalPrimitive.Trigger,{asChild:!0,children:d.jsx(Na,{})})}),d.jsx(E.AssistantModalPrimitive.Content,{...rv(t.modal?.position),asChild:!0,children:d.jsx(Nt.motion.div,{initial:{width:o.width,height:o.height,maxHeight:o?.maxHeight??void 0},animate:{width:r?i.width:o.width,height:r?i.height:o.height},transition:{duration:.3,ease:"easeInOut"},className:A("aui-root aui-modal-content data-[state=closed]:zoom-out data-[state=open]:fade-in-0 data-[state=open]:zoom-in bg-popover text-popover-foreground data-[state=closed]:animate-out data-[state=open]:animate-in z-50 overflow-clip overscroll-contain rounded-xl border p-0 shadow-lg outline-none [&>.aui-thread-root]:bg-inherit",nv(t.modal?.position)),children:d.jsx(ka,{})})})]})};function rv(t){return{align:t==="bottom-left"||t==="top-left"?"start":"end",sideOffset:16}}function nv(t){switch(t){case"bottom-right":return"slide-in-from-bottom-1/2 slide-in-from-right-1/2";case"bottom-left":return"slide-in-from-bottom-1/2 slide-in-from-left-1/2";case"top-right":return"slide-in-from-top-1/2 slide-in-from-right-1/2";case"top-left":return"slide-in-from-top-1/2 slide-in-from-left-1/2";default:return"slide-in-from-bottom-1/2 slide-in-from-right-1/2"}}function iv(t){if(!t)return"right-4 bottom-4";switch(t){case"bottom-right":return"right-4 bottom-4";case"bottom-left":return"left-4 bottom-4";case"top-right":return"right-4 top-4";case"top-left":return"left-4 top-4"}}const Na=P.forwardRef(({"data-state":t,...r},o)=>{const i=t==="open"?"Close Assistant":"Open Assistant",{config:e}=se(),n=e.modal?.icon?e.modal.icon(t):d.jsx(Dc,{"data-state":t,className:"aui-modal-button-closed-icon absolute size-6 transition-all data-[state=closed]:scale-100 data-[state=closed]:rotate-0 data-[state=open]:scale-0 data-[state=open]:rotate-90"});return d.jsxs(ae,{variant:"default",tooltip:i,side:"left",...r,className:"aui-modal-button size-full rounded-full shadow transition-transform hover:scale-110 active:scale-90",ref:o,children:[n,d.jsx(yi,{"data-state":t,className:"aui-modal-button-open-icon absolute size-6 transition-all data-[state=closed]:scale-0 data-[state=closed]:-rotate-90 data-[state=open]:scale-100 data-[state=open]:rotate-0"}),d.jsx("span",{className:"aui-sr-only sr-only",children:i})]})});Na.displayName="AssistantModalButton";const ov=()=>{const{config:t}=se();return t.variant==="widget"?d.jsx(tv,{}):d.jsx(ka,{})};exports.Chat=ov;exports.GramElementsProvider=Sc;exports.useGramElements=se;
|
|
60
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},CR="DialogDescriptionWarning",AR=({contentRef:e,descriptionId:t})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${y_(CR).contentName}}.`;return E.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},jR=a_,PR=l_,OR=u_,RR=f_,DR=d_,UR=m_,zR=v_;function LR({...e}){return $.jsx(jR,{"data-slot":"dialog",...e})}function FR({...e}){return $.jsx(PR,{"data-slot":"dialog-trigger",...e})}function ZR({...e}){return $.jsx(OR,{"data-slot":"dialog-portal",...e})}function BR({className:e,...t}){return $.jsx(RR,{"data-slot":"dialog-overlay",className:ae("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function VR({className:e,children:t,showCloseButton:r=!0,...i}){return $.jsxs(ZR,{"data-slot":"dialog-portal",children:[$.jsx(BR,{}),$.jsxs(DR,{"data-slot":"dialog-content",className:ae("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...i,children:[t,r&&$.jsxs(zR,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[$.jsx(sp,{}),$.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function WR({className:e,...t}){return $.jsx(UR,{"data-slot":"dialog-title",className:ae("text-lg leading-none font-semibold",e),...t})}function qR(e,t=[]){let r=[];function i(o,a){const s=E.createContext(a);s.displayName=o+"Context";const c=r.length;r=[...r,a];const l=f=>{const{scope:d,children:h,...p}=f,g=d?.[e]?.[c]||s,v=E.useMemo(()=>p,Object.values(p));return $.jsx(g.Provider,{value:v,children:h})};l.displayName=o+"Provider";function u(f,d){const h=d?.[e]?.[c]||s,p=E.useContext(h);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,u]}const n=()=>{const o=r.map(a=>E.createContext(a));return function(s){const c=s?.[e]||o;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return n.scopeName=e,[i,GR(n,...t)]}function GR(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const i=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(o){const a=i.reduce((s,{useScope:c,scopeName:l})=>{const f=c(o)[`__scope${l}`];return{...s,...f}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}var YR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sd=YR.reduce((e,t)=>{const r=cp(`Primitive.${t}`),i=E.forwardRef((n,o)=>{const{asChild:a,...s}=n,c=a?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),$.jsx(c,{...s,ref:o})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function HR(){return I2.useSyncExternalStore(XR,()=>!0,()=>!1)}function XR(){return()=>{}}var kd="Avatar",[JR]=qR(kd),[KR,__]=JR(kd),x_=E.forwardRef((e,t)=>{const{__scopeAvatar:r,...i}=e,[n,o]=E.useState("idle");return $.jsx(KR,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:o,children:$.jsx(Sd.span,{...i,ref:t})})});x_.displayName=kd;var w_="AvatarImage",$_=E.forwardRef((e,t)=>{const{__scopeAvatar:r,src:i,onLoadingStatusChange:n=()=>{},...o}=e,a=__(w_,r),s=QR(i,o),c=ir(l=>{n(l),a.onImageLoadingStatusChange(l)});return _t(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?$.jsx(Sd.img,{...o,ref:t,src:i}):null});$_.displayName=w_;var S_="AvatarFallback",k_=E.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:i,...n}=e,o=__(S_,r),[a,s]=E.useState(i===void 0);return E.useEffect(()=>{if(i!==void 0){const c=window.setTimeout(()=>s(!0),i);return()=>window.clearTimeout(c)}},[i]),a&&o.imageLoadingStatus!=="loaded"?$.jsx(Sd.span,{...n,ref:t}):null});k_.displayName=S_;function zg(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function QR(e,{referrerPolicy:t,crossOrigin:r}){const i=HR(),n=E.useRef(null),o=i?(n.current||(n.current=new window.Image),n.current):null,[a,s]=E.useState(()=>zg(o,e));return _t(()=>{s(zg(o,e))},[o,e]),_t(()=>{const c=f=>()=>{s(f)};if(!o)return;const l=c("loaded"),u=c("error");return o.addEventListener("load",l),o.addEventListener("error",u),t&&(o.referrerPolicy=t),typeof r=="string"&&(o.crossOrigin=r),()=>{o.removeEventListener("load",l),o.removeEventListener("error",u)}},[o,r,t]),a}var e9=x_,t9=$_,n9=k_;function r9({className:e,...t}){return $.jsx(e9,{"data-slot":"avatar",className:ae("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function i9({className:e,...t}){return $.jsx(t9,{"data-slot":"avatar-image",className:ae("aspect-square size-full",e),...t})}function o9({className:e,...t}){return $.jsx(n9,{"data-slot":"avatar-fallback",className:ae("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}const a9=e=>{const[t,r]=Q.useState(void 0);return Q.useEffect(()=>{if(!e){r(void 0);return}const i=URL.createObjectURL(e);return r(i),()=>{URL.revokeObjectURL(i)}},[e]),t},I_=()=>{const{file:e,src:t}=V.useAssistantState(B_.useShallow(({attachment:r})=>{if(r.type!=="image")return{};if(r.file)return{file:r.file};const i=r.content?.filter(n=>n.type==="image")[0]?.image;return i?{src:i}:{}}));return a9(e)??t},s9=({src:e})=>{const[t,r]=Q.useState(!1);return $.jsx("img",{src:e,alt:"Image Preview",className:t?"aui-attachment-preview-image-loaded block h-auto max-h-[80vh] w-auto max-w-full object-contain":"aui-attachment-preview-image-loading hidden",onLoad:()=>r(!0)})},l9=({children:e})=>{const t=I_();return t?$.jsxs(LR,{children:[$.jsx(FR,{className:"aui-attachment-preview-trigger hover:bg-accent/50 cursor-pointer transition-colors",asChild:!0,children:e}),$.jsxs(VR,{className:"aui-attachment-preview-dialog-content [&_svg]:text-background [&>button]:bg-foreground/60 [&>button]:hover:[&_svg]:text-destructive p-2 sm:max-w-3xl [&>button]:rounded-full [&>button]:p-1 [&>button]:opacity-100 [&>button]:!ring-0",children:[$.jsx(WR,{className:"aui-sr-only sr-only",children:"Image Attachment Preview"}),$.jsx("div",{className:"aui-attachment-preview bg-background relative mx-auto flex max-h-[80dvh] w-full items-center justify-center overflow-hidden",children:$.jsx(s9,{src:t})})]})]}):e},c9=()=>{const e=V.useAssistantState(({attachment:r})=>r.type==="image"),t=I_();return $.jsxs(r9,{className:"aui-attachment-tile-avatar h-full w-full rounded-none",children:[$.jsx(i9,{src:t,alt:"Attachment preview",className:"aui-attachment-tile-image object-cover"}),$.jsx(o9,{delayMs:e?200:0,children:$.jsx(s$,{className:"aui-attachment-tile-fallback-icon text-muted-foreground size-8"})})]})},N_=()=>{const t=V.useAssistantApi().attachment.source==="composer",r=V.useAssistantState(({attachment:n})=>n.type==="image"),i=V.useAssistantState(({attachment:n})=>{const o=n.type;switch(o){case"image":return"Image";case"document":return"Document";case"file":return"File";default:{const a=o;throw new Error(`Unknown attachment type: ${a}`)}}});return $.jsxs(Oy,{children:[$.jsxs(V.AttachmentPrimitive.Root,{className:ae("aui-attachment-root relative",r&&"aui-attachment-root-composer only:[&>#attachment-tile]:size-24"),children:[$.jsx(l9,{children:$.jsx(Ry,{asChild:!0,children:$.jsx("div",{className:ae("aui-attachment-tile bg-muted size-14 cursor-pointer overflow-hidden rounded-[14px] border transition-opacity hover:opacity-75",t&&"aui-attachment-tile-composer border-foreground/20"),role:"button",id:"attachment-tile","aria-label":`${i} attachment`,children:$.jsx(c9,{})})})}),t&&$.jsx(u9,{})]}),$.jsx(Dy,{side:"top",children:$.jsx(V.AttachmentPrimitive.Name,{})})]})},u9=()=>$.jsx(V.AttachmentPrimitive.Remove,{asChild:!0,children:$.jsx(xt,{tooltip:"Remove file",className:"aui-attachment-tile-remove text-muted-foreground hover:[&_svg]:text-destructive absolute top-1.5 right-1.5 size-3.5 rounded-full bg-white opacity-100 shadow-sm hover:!bg-white [&_svg]:text-black",side:"top",children:$.jsx(sp,{className:"aui-attachment-remove-icon size-3 dark:stroke-[2.5px]"})})}),f9=()=>$.jsx("div",{className:"aui-user-message-attachments-end col-span-full col-start-1 row-start-1 flex w-full flex-row justify-end gap-2",children:$.jsx(V.MessagePrimitive.Attachments,{components:{Attachment:N_}})}),d9=()=>$.jsx("div",{className:"aui-composer-attachments mb-2 flex w-full flex-row items-center gap-2 overflow-x-auto px-1.5 pt-0.5 pb-1 empty:hidden",children:$.jsx(V.ComposerPrimitive.Attachments,{components:{Attachment:N_}})}),h9=()=>$.jsx(V.ComposerPrimitive.AddAttachment,{asChild:!0,children:$.jsx(xt,{tooltip:"Add Attachment",side:"bottom",variant:"ghost",size:"icon",className:"aui-composer-add-attachment hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-[34px] rounded-full p-1 text-xs font-semibold","aria-label":"Add Attachment",children:$.jsx(h$,{className:"aui-attachment-add-icon size-5 stroke-[1.5px]"})})});var kl="Popover",[E_]=Mo(kl,[vl]),Ao=vl(),[m9,On]=E_(kl),M_=e=>{const{__scopePopover:t,children:r,open:i,defaultOpen:n,onOpenChange:o,modal:a=!1}=e,s=Ao(t),c=E.useRef(null),[l,u]=E.useState(!1),[f,d]=yl({prop:i,defaultProp:n??!1,onChange:o,caller:kl});return $.jsx(wy,{...s,children:$.jsx(m9,{scope:t,contentId:Dr(),triggerRef:c,open:f,onOpenChange:d,onOpenToggle:E.useCallback(()=>d(h=>!h),[d]),hasCustomAnchor:l,onCustomAnchorAdd:E.useCallback(()=>u(!0),[]),onCustomAnchorRemove:E.useCallback(()=>u(!1),[]),modal:a,children:r})})};M_.displayName=kl;var T_="PopoverAnchor",g9=E.forwardRef((e,t)=>{const{__scopePopover:r,...i}=e,n=On(T_,r),o=Ao(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=n;return E.useEffect(()=>(a(),()=>s()),[a,s]),$.jsx(hd,{...o,...i,ref:t})});g9.displayName=T_;var C_="PopoverTrigger",A_=E.forwardRef((e,t)=>{const{__scopePopover:r,...i}=e,n=On(C_,r),o=Ao(r),a=st(t,n.triggerRef),s=$.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":D_(n.open),...i,ref:a,onClick:Ne(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:$.jsx(hd,{asChild:!0,...o,children:s})});A_.displayName=C_;var Id="PopoverPortal",[p9,v9]=E_(Id,{forceMount:void 0}),j_=e=>{const{__scopePopover:t,forceMount:r,children:i,container:n}=e,o=On(Id,t);return $.jsx(p9,{scope:t,forceMount:r,children:$.jsx(mn,{present:r||o.open,children:$.jsx(bl,{asChild:!0,container:n,children:i})})})};j_.displayName=Id;var ii="PopoverContent",P_=E.forwardRef((e,t)=>{const r=v9(ii,e.__scopePopover),{forceMount:i=r.forceMount,...n}=e,o=On(ii,e.__scopePopover);return $.jsx(mn,{present:i||o.open,children:o.modal?$.jsx(y9,{...n,ref:t}):$.jsx(_9,{...n,ref:t})})});P_.displayName=ii;var b9=id("PopoverContent.RemoveScroll"),y9=E.forwardRef((e,t)=>{const r=On(ii,e.__scopePopover),i=E.useRef(null),n=st(t,i),o=E.useRef(!1);return E.useEffect(()=>{const a=i.current;if(a)return i_(a)},[]),$.jsx(_d,{as:b9,allowPinchZoom:!0,children:$.jsx(O_,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ne(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||r.triggerRef.current?.focus()}),onPointerDownOutside:Ne(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,l=s.button===2||c;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ne(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),_9=E.forwardRef((e,t)=>{const r=On(ii,e.__scopePopover),i=E.useRef(!1),n=E.useRef(!1);return $.jsx(O_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(i.current||r.triggerRef.current?.focus(),o.preventDefault()),i.current=!1,n.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(i.current=!0,o.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=o.target;r.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&n.current&&o.preventDefault()}})}),O_=E.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:n,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...f}=e,d=On(ii,r),h=Ao(r);return Hy(),$.jsx(yd,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:n,onUnmountAutoFocus:o,children:$.jsx(dl,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>d.onOpenChange(!1),children:$.jsx($y,{"data-state":D_(d.open),role:"dialog",id:d.contentId,...h,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),R_="PopoverClose",x9=E.forwardRef((e,t)=>{const{__scopePopover:r,...i}=e,n=On(R_,r);return $.jsx(Ae.button,{type:"button",...i,ref:t,onClick:Ne(e.onClick,()=>n.onOpenChange(!1))})});x9.displayName=R_;var w9="PopoverArrow",$9=E.forwardRef((e,t)=>{const{__scopePopover:r,...i}=e,n=Ao(r);return $.jsx(Sy,{...n,...i,ref:t})});$9.displayName=w9;function D_(e){return e?"open":"closed"}var S9=M_,k9=A_,I9=j_,N9=P_;function E9({...e}){return $.jsx(S9,{"data-slot":"popover",...e})}function M9({...e}){return $.jsx(k9,{"data-slot":"popover-trigger",...e})}function T9({className:e,align:t="center",sideOffset:r=4,...i}){return $.jsx(I9,{children:$.jsx(N9,{"data-slot":"popover-content",align:t,sideOffset:r,className:ae("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...i})})}const U_=()=>{const{config:e}=wt();return $.jsx(ca.LazyMotion,{features:ca.domAnimation,children:$.jsx(ca.MotionConfig,{reducedMotion:"user",children:$.jsxs(V.ThreadPrimitive.Root,{className:"aui-root aui-thread-root bg-background @container flex h-full flex-col",children:[e.variant==="widget"&&$.jsx(C9,{}),$.jsxs(V.ThreadPrimitive.Viewport,{className:"aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll px-4",children:[$.jsx(V.ThreadPrimitive.If,{empty:!0,children:$.jsx(j9,{})}),$.jsx(V.ThreadPrimitive.Messages,{components:{UserMessage:Z9,EditComposer:V9,AssistantMessage:z9}}),$.jsx(V.ThreadPrimitive.If,{empty:!1,children:$.jsx("div",{className:"aui-thread-viewport-spacer min-h-8 grow"})}),$.jsx(O9,{})]})]})})})},C9=()=>{const{isExpanded:e,setIsExpanded:t,config:r}=wt();return r.modal?.expandable?$.jsx("div",{className:"aui-thread-header border-border bg-background sticky top-0 z-10 flex items-center justify-between border-b p-2",children:$.jsx(ln,{variant:"ghost",size:"icon",className:"cursor-pointer",onClick:()=>t(!e),"aria-label":"Expand thread",children:$.jsx(c$,{className:"text-muted-foreground size-4 rotate-90"})})}):null},A9=()=>$.jsx(V.ThreadPrimitive.ScrollToBottom,{asChild:!0,children:$.jsx(xt,{tooltip:"Scroll to bottom",variant:"outline",className:"aui-thread-scroll-to-bottom dark:bg-background dark:hover:bg-accent absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible",children:$.jsx(q2,{})})}),j9=()=>{const{config:e}=wt(),{title:t,subtitle:r}=e.welcome??{};return $.jsxs("div",{className:"aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col gap-10",children:[$.jsx("div",{className:"aui-thread-welcome-center flex w-full grow flex-col items-center justify-center",children:$.jsxs("div",{className:"aui-thread-welcome-message flex size-full flex-col justify-start p-8",children:[$.jsx(Ic.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},className:"aui-thread-welcome-message-motion-1 text-2xl font-semibold",children:t}),$.jsx(Ic.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:10},transition:{delay:.1},className:"aui-thread-welcome-message-motion-2 text-muted-foreground/65 text-2xl",children:r})]})}),$.jsx(P9,{})]})},P9=()=>{const{config:e}=wt(),t=e.welcome?.suggestions??[];return $.jsx("div",{className:"aui-thread-welcome-suggestions grid w-full gap-2 pb-10 @md:grid-cols-2",children:t.map((r,i)=>$.jsx(Ic.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:20},transition:{delay:.05*i},className:"aui-thread-welcome-suggestion-display nth-[n+3]:hidden @md:nth-[n+3]:block",children:$.jsx(V.ThreadPrimitive.Suggestion,{prompt:r.action,send:!0,asChild:!0,children:$.jsxs(ln,{variant:"ghost",className:"aui-thread-welcome-suggestion dark:hover:bg-accent/60 h-auto w-full flex-1 flex-wrap items-start justify-start gap-1 rounded-3xl border px-5 py-4 text-left text-sm @md:flex-col","aria-label":r.action,children:[$.jsx("span",{className:"aui-thread-welcome-suggestion-text-1 font-medium",children:r.title}),$.jsx("span",{className:"aui-thread-welcome-suggestion-text-2 text-muted-foreground",children:r.label})]})})},`suggested-action-${r.title}-${i}`))})},O9=()=>{const{config:e}=wt(),t=e.composer??{placeholder:"Send a message...",attachments:!0};return $.jsxs("div",{className:"aui-composer-wrapper bg-background sticky bottom-0 mx-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 overflow-visible rounded-t-3xl pb-4 md:pb-6",children:[$.jsx(A9,{}),$.jsxs(V.ComposerPrimitive.Root,{className:"aui-composer-root group/input-group border-input bg-background has-[textarea:focus-visible]:border-ring has-[textarea:focus-visible]:ring-ring/50 dark:bg-background relative flex w-full flex-col rounded-3xl border px-1 pt-2 shadow-xs transition-[color,box-shadow] outline-none has-[textarea:focus-visible]:ring-[3px]",children:[t.attachments&&$.jsx(d9,{}),$.jsx(V.ComposerPrimitive.Input,{placeholder:t.placeholder,className:"aui-composer-input placeholder:text-muted-foreground mb-1 max-h-32 min-h-16 w-full resize-none bg-transparent px-3.5 pt-1.5 pb-3 text-base outline-none focus-visible:ring-0",rows:1,autoFocus:!0,"aria-label":"Message input"}),$.jsx(D9,{})]})]})},R9=()=>{const{model:e,setModel:t}=wt();return $.jsxs(E9,{children:[$.jsx(M9,{asChild:!0,children:$.jsx(ln,{variant:"ghost",size:"icon",className:"aui-composer-model-picker hover:bg-muted-foreground/15 dark:border-muted-foreground/15 dark:hover:bg-muted-foreground/30 size-[34px] rounded-full p-1 text-xs font-semibold","aria-label":"Model Settings",children:$.jsx(v$,{className:"aui-attachment-add-icon size-5 stroke-[1.5px]"})})}),$.jsx(T9,{side:"top",align:"start",className:"max-h-48 overflow-y-auto p-0 shadow-none",children:m.MODELS.map(r=>$.jsxs(ln,{onClick:()=>t(r),variant:"ghost",className:"w-full justify-start gap-2 rounded-none px-2",children:[r===e?$.jsx("div",{children:$.jsx($s,{className:"size-4 text-emerald-500"})}):$.jsx("div",{className:"size-4",children:" "}),r]}))})]})},D9=()=>{const{config:e}=wt(),t=e.composer??{attachments:!0};return $.jsxs("div",{className:"aui-composer-action-wrapper relative mx-1 mt-2 mb-2 flex items-center justify-between",children:[$.jsxs("div",{className:"aui-composer-action-wrapper-inner flex items-center",children:[t.attachments?$.jsx(h9,{}):$.jsx("div",{className:"aui-composer-add-attachment-placeholder"}),e.model?.showModelPicker&&$.jsx(R9,{})]}),$.jsx(V.ThreadPrimitive.If,{running:!1,children:$.jsx(V.ComposerPrimitive.Send,{asChild:!0,children:$.jsx(xt,{tooltip:"Send message",side:"bottom",type:"submit",variant:"default",size:"icon",className:"aui-composer-send size-[34px] rounded-full p-1","aria-label":"Send message",children:$.jsx(Y2,{className:"aui-composer-send-icon size-5"})})})}),$.jsx(V.ThreadPrimitive.If,{running:!0,children:$.jsx(V.ComposerPrimitive.Cancel,{asChild:!0,children:$.jsx(ln,{type:"button",variant:"default",size:"icon",className:"aui-composer-cancel border-muted-foreground/60 hover:bg-primary/75 dark:border-muted-foreground/90 size-[34px] rounded-full border","aria-label":"Stop generating",children:$.jsx(y$,{className:"aui-composer-cancel-icon size-3.5 fill-white dark:fill-black"})})})})]})},U9=()=>$.jsx(V.MessagePrimitive.Error,{children:$.jsx(V.ErrorPrimitive.Root,{className:"aui-message-error-root border-destructive bg-destructive/10 text-destructive dark:bg-destructive/5 mt-2 rounded-md border p-3 text-sm dark:text-red-200",children:$.jsx(V.ErrorPrimitive.Message,{className:"aui-message-error-message line-clamp-2"})})}),z9=()=>{const{config:e}=wt(),t=e.tools??{};return $.jsx(V.MessagePrimitive.Root,{asChild:!0,children:$.jsxs("div",{className:"aui-assistant-message-root animate-in fade-in slide-in-from-bottom-1 relative mx-auto w-full max-w-(--thread-max-width) py-4 duration-150 ease-out last:mb-24","data-role":"assistant",children:[$.jsxs("div",{className:"aui-assistant-message-content text-foreground mx-2 leading-7 wrap-break-word",children:[$.jsx(V.MessagePrimitive.Parts,{components:{Text:Uy,Image:L9,tools:{by_name:t.components,Fallback:bO},Reasoning:qy,ReasoningGroup:Gy}}),$.jsx(U9,{})]}),$.jsxs("div",{className:"aui-assistant-message-footer mt-2 ml-2 flex",children:[$.jsx(z_,{}),$.jsx(F9,{})]})]})})},L9=e=>$.jsx("img",{src:e.image}),F9=()=>$.jsxs(V.ActionBarPrimitive.Root,{hideWhenRunning:!0,autohide:"not-last",autohideFloat:"single-branch",className:"aui-assistant-action-bar-root text-muted-foreground data-floating:bg-background col-start-3 row-start-2 -ml-1 flex gap-1 data-floating:absolute data-floating:rounded-md data-floating:border data-floating:p-1 data-floating:shadow-sm",children:[$.jsx(V.ActionBarPrimitive.Copy,{asChild:!0,children:$.jsxs(xt,{tooltip:"Copy",children:[$.jsx(V.MessagePrimitive.If,{copied:!0,children:$.jsx($s,{})}),$.jsx(V.MessagePrimitive.If,{copied:!1,children:$.jsx(ap,{})})]})}),$.jsx(V.ActionBarPrimitive.Reload,{asChild:!0,children:$.jsx(xt,{tooltip:"Refresh",children:$.jsx(g$,{})})})]}),Z9=()=>$.jsx(V.MessagePrimitive.Root,{asChild:!0,children:$.jsxs("div",{className:"aui-user-message-root animate-in fade-in slide-in-from-bottom-1 mx-auto grid w-full max-w-(--thread-max-width) auto-rows-auto grid-cols-[minmax(72px,1fr)_auto] gap-y-2 px-2 py-4 duration-150 ease-out first:mt-3 last:mb-5 [&:where(>*)]:col-start-2","data-role":"user",children:[$.jsx(f9,{}),$.jsxs("div",{className:"aui-user-message-content-wrapper relative col-start-2 min-w-0",children:[$.jsx("div",{className:"aui-user-message-content bg-muted text-foreground rounded-3xl px-5 py-2.5 wrap-break-word",children:$.jsx(V.MessagePrimitive.Parts,{})}),$.jsx("div",{className:"aui-user-action-bar-wrapper absolute top-1/2 left-0 -translate-x-full -translate-y-1/2 pr-2",children:$.jsx(B9,{})})]}),$.jsx(z_,{className:"aui-user-branch-picker col-span-full col-start-1 row-start-3 -mr-1 justify-end"})]})}),B9=()=>$.jsx(V.ActionBarPrimitive.Root,{hideWhenRunning:!0,autohide:"not-last",className:"aui-user-action-bar-root flex flex-col items-end",children:$.jsx(V.ActionBarPrimitive.Edit,{asChild:!0,children:$.jsx(xt,{tooltip:"Edit",className:"aui-user-action-edit p-4",children:$.jsx(f$,{})})})}),V9=()=>$.jsx("div",{className:"aui-edit-composer-wrapper mx-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 px-2 first:mt-4",children:$.jsxs(V.ComposerPrimitive.Root,{className:"aui-edit-composer-root bg-muted ml-auto flex w-full max-w-7/8 flex-col rounded-xl",children:[$.jsx(V.ComposerPrimitive.Input,{className:"aui-edit-composer-input text-foreground flex min-h-[60px] w-full resize-none bg-transparent p-4 outline-none",autoFocus:!0}),$.jsxs("div",{className:"aui-edit-composer-footer mx-3 mb-3 flex items-center justify-center gap-2 self-end",children:[$.jsx(V.ComposerPrimitive.Cancel,{asChild:!0,children:$.jsx(ln,{variant:"ghost",size:"sm","aria-label":"Cancel edit",children:"Cancel"})}),$.jsx(V.ComposerPrimitive.Send,{asChild:!0,children:$.jsx(ln,{size:"sm","aria-label":"Update message",children:"Update"})})]})]})}),z_=({className:e,...t})=>$.jsxs(V.BranchPickerPrimitive.Root,{hideWhenSingleBranch:!0,className:ae("aui-branch-picker-root text-muted-foreground mr-2 -ml-2 inline-flex items-center text-xs",e),...t,children:[$.jsx(V.BranchPickerPrimitive.Previous,{asChild:!0,children:$.jsx(xt,{tooltip:"Previous",children:$.jsx(n$,{})})}),$.jsxs("span",{className:"aui-branch-picker-state font-medium",children:[$.jsx(V.BranchPickerPrimitive.Number,{})," / ",$.jsx(V.BranchPickerPrimitive.Count,{})]}),$.jsx(V.BranchPickerPrimitive.Next,{asChild:!0,children:$.jsx(xt,{tooltip:"Next",children:$.jsx(i$,{})})})]}),W9=()=>{const{config:e,isExpanded:t}=wt(),r=e.modal?.dimensions?.default??{width:"600px",height:"600px",maxHeight:"95vh"},i=e.modal?.dimensions?.expanded??{width:"60vw",height:"90vh"};return $.jsxs(V.AssistantModalPrimitive.Root,{defaultOpen:e.modal?.defaultOpen??!1,children:[$.jsx(V.AssistantModalPrimitive.Anchor,{className:ae("aui-root aui-modal-anchor fixed size-11",Y9(e.modal?.position)),children:$.jsx(V.AssistantModalPrimitive.Trigger,{asChild:!0,children:$.jsx(L_,{})})}),$.jsx(V.AssistantModalPrimitive.Content,{...q9(e.modal?.position),asChild:!0,children:$.jsx(ca.motion.div,{initial:{width:r.width,height:r.height,maxHeight:r?.maxHeight??void 0},animate:{width:t?i.width:r.width,height:t?i.height:r.height},transition:{duration:.3,ease:"easeInOut"},className:ae("aui-root aui-modal-content data-[state=closed]:zoom-out data-[state=open]:fade-in-0 data-[state=open]:zoom-in bg-popover text-popover-foreground data-[state=closed]:animate-out data-[state=open]:animate-in z-50 overflow-clip overscroll-contain rounded-xl border p-0 shadow-lg outline-none [&>.aui-thread-root]:bg-inherit",G9(e.modal?.position)),children:$.jsx(U_,{})})})]})};function q9(e){return{align:e==="bottom-left"||e==="top-left"?"start":"end",sideOffset:16}}function G9(e){switch(e){case"bottom-right":return"slide-in-from-bottom-1/2 slide-in-from-right-1/2";case"bottom-left":return"slide-in-from-bottom-1/2 slide-in-from-left-1/2";case"top-right":return"slide-in-from-top-1/2 slide-in-from-right-1/2";case"top-left":return"slide-in-from-top-1/2 slide-in-from-left-1/2";default:return"slide-in-from-bottom-1/2 slide-in-from-right-1/2"}}function Y9(e){if(!e)return"right-4 bottom-4";switch(e){case"bottom-right":return"right-4 bottom-4";case"bottom-left":return"left-4 bottom-4";case"top-right":return"right-4 top-4";case"top-left":return"left-4 top-4"}}const L_=Q.forwardRef(({"data-state":e,...t},r)=>{const i=e==="open"?"Close Assistant":"Open Assistant",{config:n}=wt(),o=n.modal?.icon?n.modal.icon(e):$.jsx(X2,{"data-state":e,className:"aui-modal-button-closed-icon absolute size-6 transition-all data-[state=closed]:scale-100 data-[state=closed]:rotate-0 data-[state=open]:scale-0 data-[state=open]:rotate-90"});return $.jsxs(xt,{variant:"default",tooltip:i,side:"left",...t,className:"aui-modal-button size-full rounded-full shadow transition-transform hover:scale-110 active:scale-90",ref:r,children:[o,$.jsx(op,{"data-state":e,className:"aui-modal-button-open-icon absolute size-6 transition-all data-[state=closed]:scale-0 data-[state=closed]:-rotate-90 data-[state=open]:scale-100 data-[state=open]:rotate-0"}),$.jsx("span",{className:"aui-sr-only sr-only",children:i})]})});L_.displayName="AssistantModalButton";const H9=()=>{const{config:e}=wt();return e.variant==="widget"?$.jsx(W9,{}):$.jsx(U_,{})};exports.Chat=H9;exports.GramElementsProvider=z2;exports.useGramElements=wt;
|