diff --git a/i18n.json b/i18n.json index 2c2371b..bdd50f6 100644 --- a/i18n.json +++ b/i18n.json @@ -148,7 +148,10 @@ "lora_blacklist_list": "Lora 黑名单列表", "lycoris_blacklist_list": "Lycoris 黑名单列表", "embedding_blacklist_list": "Embedding 黑名单列表", - "one_keyword_per_line": "每行一个关键词" + "one_keyword_per_line": "每行一个关键词", + "Keyword_group": "关键词组", + "enhance_translation_use_keyword_group": "使用关键词组增强翻译功能", + "enhance_translation_use_Keyword_group_desc": "

关键词组文件位于 group_tags 目录中。

启用该功能后,优先使用 yaml 文件中的内容进行翻译匹配。如果没有匹配到,再使用翻译接口进行翻译。

你可以前往 https://aiodoc.physton.com/GroupTags.html 查看 group_tags 中文件的具体说明。

" } }, { @@ -298,7 +301,10 @@ "lora_blacklist_list": "Lora 黑名單列表", "lycoris_blacklist_list": "Lycoris 黑名單列表", "embedding_blacklist_list": "Embedding 黑名單列表", - "one_keyword_per_line": "每行一個關鍵詞" + "one_keyword_per_line": "每行一個關鍵詞", + "Keyword_group": "關鍵詞組", + "enhance_translation_use_keyword_group": "使用關鍵詞組增強翻譯功能", + "enhance_translation_use_Keyword_group_desc": "

關鍵詞組文件位於 group_tags 目錄中。

啟用該功能後,優先使用 yaml 文件中的內容進行翻譯匹配。如果沒有匹配到,再使用翻譯接口進行翻譯。

你可以前往 https://aiodoc.physton.com/GroupTags.html 查看 group_tags 中文件的具體說明。

" } }, { @@ -448,7 +454,10 @@ "lora_blacklist_list": "Lora 黑名單清單", "lycoris_blacklist_list": "Lycoris 黑名單清單", "embedding_blacklist_list": "Embedding 黑名單清單", - "one_keyword_per_line": "每行一個關鍵字" + "one_keyword_per_line": "每行一個關鍵字", + "Keyword_group": "關鍵詞組", + "enhance_translation_use_keyword_group": "使用關鍵詞組增強翻譯功能", + "enhance_translation_use_Keyword_group_desc": "

關鍵詞組文件位於 group_tags 目錄中。

啟用該功能後,優先使用 yaml 文件中的內容進行翻譯匹配。如果沒有匹配到,再使用翻譯接口進行翻譯。

你可以前往 https://aiodoc.physton.com/GroupTags.html 查看 group_tags 中文件的具體說明。

" } }, { @@ -598,7 +607,10 @@ "lora_blacklist_list": "Lora Blacklist", "lycoris_blacklist_list": "Lycoris Blacklist", "embedding_blacklist_list": "Embedding Blacklist", - "one_keyword_per_line": "One keyword per line" + "one_keyword_per_line": "One keyword per line", + "Keyword_group": "Keyword Group", + "enhance_translation_use_keyword_group": "Enhance Translation with Keyword Group", + "enhance_translation_use_Keyword_group_desc": "

The keyword group file is located in the group_tags directory.

When this feature is enabled, the contents in the YAML file are prioritized for translation matching. If no match is found, the translation interface is used.

You can visit https://aiodoc.physton.com/GroupTags.html for specific instructions on the files in the group_tags directory.

" } }, { @@ -759,7 +771,10 @@ "lora_blacklist_list": "قائمة Lora السوداء", "lycoris_blacklist_list": "قائمة Lycoris السوداء", "embedding_blacklist_list": "قائمة Embedding السوداء", - "one_keyword_per_line": "كلمة رئيسية واحدة في كل سطر" + "one_keyword_per_line": "كلمة رئيسية واحدة في كل سطر", + "Keyword_group": "مجموعة الكلمات الرئيسية", + "enhance_translation_use_keyword_group": "استخدام مجموعة الكلمات الرئيسية لتعزيز الترجمة", + "enhance_translation_use_Keyword_group_desc": "

ملف مجموعة الكلمات الرئيسية موجود في دليل group_tags.

عند تمكين هذه الميزة، يتم إعطاء الأولوية لمحتويات ملف YAML لمطابقة الترجمة. إذا لم يتم العثور على تطابق، يتم استخدام واجهة الترجمة.

يمكنك زيارة https://aiodoc.physton.com/GroupTags.html للحصول على تعليمات محددة حول الملفات في دليل group_tags.

" } }, { @@ -1008,7 +1023,10 @@ "lora_blacklist_list": "Liste noire Lora", "lycoris_blacklist_list": "Liste noire Lycoris", "embedding_blacklist_list": "Liste noire d'embedding", - "one_keyword_per_line": "Un mot-clé par ligne" + "one_keyword_per_line": "Un mot-clé par ligne", + "Keyword_group": "Groupe de mots-clés", + "enhance_translation_use_keyword_group": "Utiliser le groupe de mots-clés pour améliorer la traduction", + "enhance_translation_use_Keyword_group_desc": "

Le fichier du groupe de mots-clés est situé dans le répertoire group_tags.

Lorsque cette fonctionnalité est activée, les contenus du fichier YAML sont prioritaires pour la correspondance de traduction. Si aucune correspondance n'est trouvée, l'interface de traduction est utilisée.

Vous pouvez consulter https://aiodoc.physton.com/GroupTags.html pour des instructions spécifiques sur les fichiers du répertoire group_tags.

" } }, { @@ -1172,7 +1190,10 @@ "lora_blacklist_list": "Schwarze Liste Lora", "lycoris_blacklist_list": "Schwarze Liste Lycoris", "embedding_blacklist_list": "Schwarze Liste der Einbettung", - "one_keyword_per_line": "Ein Schlüsselwort pro Zeile" + "one_keyword_per_line": "Ein Schlüsselwort pro Zeile", + "Keyword_group": "Schlüsselwortgruppe", + "enhance_translation_use_keyword_group": "Übersetzung mit Schlüsselwortgruppe verbessern", + "enhance_translation_use_Keyword_group_desc": "

Die Schlüsselwortgruppendatei befindet sich im Verzeichnis group_tags.

Wenn diese Funktion aktiviert ist, haben die Inhalte in der YAML-Datei Vorrang für die Übersetzungsübereinstimmung. Wenn keine Übereinstimmung gefunden wird, wird die Übersetzungs-Schnittstelle verwendet.

Sie können https://aiodoc.physton.com/GroupTags.html besuchen, um spezifische Anweisungen zu den Dateien im Verzeichnis group_tags zu erhalten.

" } }, { @@ -1386,7 +1407,10 @@ "lora_blacklist_list": "Elenco nero di Lora", "lycoris_blacklist_list": "Elenco nero di Lycoris", "embedding_blacklist_list": "Elenco nero dell'embedding", - "one_keyword_per_line": "Una parola chiave per riga" + "one_keyword_per_line": "Una parola chiave per riga", + "Keyword_group": "Gruppo di parole chiave", + "enhance_translation_use_keyword_group": "Migliora la traduzione con il gruppo di parole chiave", + "enhance_translation_use_Keyword_group_desc": "

Il file del gruppo di parole chiave si trova nella directory group_tags.

Quando questa funzionalità è abilitata, i contenuti nel file YAML hanno la priorità per la corrispondenza di traduzione. Se non viene trovata alcuna corrispondenza, viene utilizzata l'interfaccia di traduzione.

Puoi visitare https://aiodoc.physton.com/GroupTags.html per istruzioni specifiche sui file nella directory group_tags.

" } }, { @@ -1535,7 +1559,10 @@ "lora_blacklist_list": "Loraのブラックリスト", "lycoris_blacklist_list": "Lycorisのブラックリスト", "embedding_blacklist_list": "Embeddingのブラックリスト", - "one_keyword_per_line": "1行に1つのキーワード" + "one_keyword_per_line": "1行に1つのキーワード", + "Keyword_group": "キーワードグループ", + "enhance_translation_use_keyword_group": "キーワードグループを使用して翻訳を強化する", + "enhance_translation_use_Keyword_group_desc": "

キーワードグループファイルは、group_tagsディレクトリにあります。

この機能を有効にすると、翻訳のマッチングにはYAMLファイルの内容が優先されます。マッチが見つからない場合は、翻訳インターフェースが使用されます。

group_tagsディレクトリのファイルの具体的な説明については、https://aiodoc.physton.com/GroupTags.htmlをご覧ください。

" } }, { @@ -1709,7 +1736,10 @@ "lora_blacklist_list": "Lora 블랙리스트", "lycoris_blacklist_list": "Lycoris 블랙리스트", "embedding_blacklist_list": "Embedding 블랙리스트", - "one_keyword_per_line": "한 줄에 하나의 키워드" + "one_keyword_per_line": "한 줄에 하나의 키워드", + "Keyword_group": "키워드 그룹", + "enhance_translation_use_keyword_group": "키워드 그룹을 사용하여 번역 개선", + "enhance_translation_use_Keyword_group_desc": "

키워드 그룹 파일은 group_tags 디렉터리에 있습니다.

이 기능을 활성화하면 YAML 파일의 내용이 번역 매칭에 우선적으로 사용됩니다. 일치하는 항목이 없는 경우 번역 인터페이스가 사용됩니다.

group_tags 디렉터리의 파일에 대한 구체적인 설명은 https://aiodoc.physton.com/GroupTags.html을 참조하십시오.

" } }, { @@ -1973,7 +2003,10 @@ "lora_blacklist_list": "Lista negra de Lora", "lycoris_blacklist_list": "Lista negra de Lycoris", "embedding_blacklist_list": "Lista negra de Embedding", - "one_keyword_per_line": "Uma palavra-chave por linha" + "one_keyword_per_line": "Uma palavra-chave por linha", + "Keyword_group": "Grupo de palavras-chave", + "enhance_translation_use_keyword_group": "Melhorar a tradução com o grupo de palavras-chave", + "enhance_translation_use_Keyword_group_desc": "

O arquivo do grupo de palavras-chave está localizado no diretório group_tags.

Quando essa funcionalidade está ativada, o conteúdo do arquivo YAML tem prioridade para a correspondência de tradução. Se nenhuma correspondência for encontrada, a interface de tradução é usada.

Você pode visitar https://aiodoc.physton.com/GroupTags.html para obter instruções específicas sobre os arquivos no diretório group_tags.

" } }, { @@ -2137,7 +2170,10 @@ "lora_blacklist_list": "Черный список Lora", "lycoris_blacklist_list": "Черный список Lycoris", "embedding_blacklist_list": "Черный список Embedding", - "one_keyword_per_line": "Одно ключевое слово на строку" + "one_keyword_per_line": "Одно ключевое слово на строку", + "Keyword_group": "Группа ключевых слов", + "enhance_translation_use_keyword_group": "Улучшить перевод с помощью группы ключевых слов", + "enhance_translation_use_Keyword_group_desc": "

Файл группы ключевых слов находится в каталоге group_tags.

При включении этой функции приоритет отдается содержимому файла YAML для соответствия перевода. Если соответствие не найдено, используется интерфейс перевода.

Вы можете посетить https://aiodoc.physton.com/GroupTags.html для получения конкретных инструкций по файлам в каталоге group_tags.

" } }, { @@ -2316,7 +2352,10 @@ "lora_blacklist_list": "Lista negra de Lora", "lycoris_blacklist_list": "Lista negra de Lycoris", "embedding_blacklist_list": "Lista negra de Embedding", - "one_keyword_per_line": "Una palabra clave por línea" + "one_keyword_per_line": "Una palabra clave por línea", + "Keyword_group": "Grupo de palabras clave", + "enhance_translation_use_keyword_group": "Mejorar la traducción con el grupo de palabras clave", + "enhance_translation_use_Keyword_group_desc": "

El archivo del grupo de palabras clave se encuentra en el directorio group_tags.

Cuando esta función está habilitada, se priorizan los contenidos del archivo YAML para la coincidencia de traducción. Si no se encuentra ninguna coincidencia, se utiliza la interfaz de traducción.

Puedes visitar https://aiodoc.physton.com/GroupTags.html para obtener instrucciones específicas sobre los archivos en el directorio group_tags.

" } }, { diff --git a/javascript/main.entry.js b/javascript/main.entry.js index c1f8a20..33b8246 100644 --- a/javascript/main.entry.js +++ b/javascript/main.entry.js @@ -1,60 +1,60 @@ -(function(nr){typeof define=="function"&&define.amd?define(nr):nr()})(function(){"use strict";var zj=Object.defineProperty;var Gj=(nr,bt,Ei)=>bt in nr?zj(nr,bt,{enumerable:!0,configurable:!0,writable:!0,value:Ei}):nr[bt]=Ei;var $b=(nr,bt,Ei)=>(Gj(nr,typeof bt!="symbol"?bt+"":bt,Ei),Ei);function nr(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}function bt(e){if(Qe(e)){const t={};for(let n=0;n{if(n){const r=n.split(Bb);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lt(e){let t="";if(zt(e))t=e;else if(Qe(e))for(let n=0;nhs(n,t))}const ce=e=>zt(e)?e:e==null?"":Qe(e)||Rt(e)&&(e.toString===gp||!pt(e.toString))?JSON.stringify(e,dp,2):String(e),dp=(e,t)=>t&&t.__v_isRef?dp(e,t.value):uo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:co(t)?{[`Set(${t.size})`]:[...t.values()]}:Rt(t)&&!Qe(t)&&!mp(t)?String(t):t,Dt={},lo=[],mr=()=>{},Kb=()=>!1,Vb=/^on[^a-z]/,Ma=e=>Vb.test(e),Uu=e=>e.startsWith("onUpdate:"),kn=Object.assign,Wu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},qb=Object.prototype.hasOwnProperty,_t=(e,t)=>qb.call(e,t),Qe=Array.isArray,uo=e=>ms(e)==="[object Map]",co=e=>ms(e)==="[object Set]",pp=e=>ms(e)==="[object Date]",pt=e=>typeof e=="function",zt=e=>typeof e=="string",gs=e=>typeof e=="symbol",Rt=e=>e!==null&&typeof e=="object",hp=e=>Rt(e)&&pt(e.then)&&pt(e.catch),gp=Object.prototype.toString,ms=e=>gp.call(e),zb=e=>ms(e).slice(8,-1),mp=e=>ms(e)==="[object Object]",Ku=e=>zt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Fa=nr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),$a=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Gb=/-(\w)/g,Ar=$a(e=>e.replace(Gb,(t,n)=>n?n.toUpperCase():"")),Yb=/\B([A-Z])/g,fo=$a(e=>e.replace(Yb,"-$1").toLowerCase()),Ba=$a(e=>e.charAt(0).toUpperCase()+e.slice(1)),Vu=$a(e=>e?`on${Ba(e)}`:""),vs=(e,t)=>!Object.is(e,t),Ha=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ua=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let vp;const Xb=()=>vp||(vp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Kn;class Jb{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Kn,!t&&Kn&&(this.index=(Kn.scopes||(Kn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Kn;try{return Kn=this,t()}finally{Kn=n}}}on(){Kn=this}off(){Kn=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},bp=e=>(e.w&ai)>0,Cp=e=>(e.n&ai)>0,eC=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(h==="length"||h>=c)&&l.push(d)})}else switch(n!==void 0&&l.push(s.get(n)),t){case"add":Qe(e)?Ku(n)&&l.push(s.get("length")):(l.push(s.get(Oi)),uo(e)&&l.push(s.get(Yu)));break;case"delete":Qe(e)||(l.push(s.get(Oi)),uo(e)&&l.push(s.get(Yu)));break;case"set":uo(e)&&l.push(s.get(Oi));break}if(l.length===1)l[0]&&Ju(l[0]);else{const c=[];for(const d of l)d&&c.push(...d);Ju(qu(c))}}function Ju(e,t){const n=Qe(e)?e:[...e];for(const r of n)r.computed&&xp(r);for(const r of n)r.computed||xp(r)}function xp(e,t){(e!==vr||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const nC=nr("__proto__,__v_isRef,__isVue"),kp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(gs)),rC=Zu(),iC=Zu(!1,!0),oC=Zu(!0),Sp=sC();function sC(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=kt(this);for(let o=0,s=this.length;o{e[t]=function(...n){po();const r=kt(this)[t].apply(this,n);return ho(),r}}),e}function aC(e){const t=kt(this);return Pn(t,"has",e),t.hasOwnProperty(e)}function Zu(e=!1,t=!1){return function(r,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&o===(e?t?TC:Np:t?Rp:Dp).get(r))return r;const s=Qe(r);if(!e){if(s&&_t(Sp,i))return Reflect.get(Sp,i,o);if(i==="hasOwnProperty")return aC}const l=Reflect.get(r,i,o);return(gs(i)?kp.has(i):nC(i))||(e||Pn(r,"get",i),t)?l:mn(l)?s&&Ku(i)?l:l.value:Rt(l)?e?tc(l):Dn(l):l}}const lC=Ap(),uC=Ap(!0);function Ap(e=!1){return function(n,r,i,o){let s=n[r];if(mo(s)&&mn(s)&&!mn(i))return!1;if(!e&&(!Ya(i)&&!mo(i)&&(s=kt(s),i=kt(i)),!Qe(n)&&mn(s)&&!mn(i)))return s.value=i,!0;const l=Qe(n)&&Ku(r)?Number(r)e,Wa=e=>Reflect.getPrototypeOf(e);function Ka(e,t,n=!1,r=!1){e=e.__v_raw;const i=kt(e),o=kt(t);n||(t!==o&&Pn(i,"get",t),Pn(i,"get",o));const{has:s}=Wa(i),l=r?Qu:n?rc:bs;if(s.call(i,t))return l(e.get(t));if(s.call(i,o))return l(e.get(o));e!==i&&e.get(t)}function Va(e,t=!1){const n=this.__v_raw,r=kt(n),i=kt(e);return t||(e!==i&&Pn(r,"has",e),Pn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function qa(e,t=!1){return e=e.__v_raw,!t&&Pn(kt(e),"iterate",Oi),Reflect.get(e,"size",e)}function Op(e){e=kt(e);const t=kt(this);return Wa(t).has.call(t,e)||(t.add(e),Ur(t,"add",e,e)),this}function Lp(e,t){t=kt(t);const n=kt(this),{has:r,get:i}=Wa(n);let o=r.call(n,e);o||(e=kt(e),o=r.call(n,e));const s=i.call(n,e);return n.set(e,t),o?vs(t,s)&&Ur(n,"set",e,t):Ur(n,"add",e,t),this}function Ip(e){const t=kt(this),{has:n,get:r}=Wa(t);let i=n.call(t,e);i||(e=kt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&Ur(t,"delete",e,void 0),o}function Pp(){const e=kt(this),t=e.size!==0,n=e.clear();return t&&Ur(e,"clear",void 0,void 0),n}function za(e,t){return function(r,i){const o=this,s=o.__v_raw,l=kt(s),c=t?Qu:e?rc:bs;return!e&&Pn(l,"iterate",Oi),s.forEach((d,h)=>r.call(i,c(d),c(h),o))}}function Ga(e,t,n){return function(...r){const i=this.__v_raw,o=kt(i),s=uo(o),l=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,d=i[e](...r),h=n?Qu:t?rc:bs;return!t&&Pn(o,"iterate",c?Yu:Oi),{next(){const{value:p,done:y}=d.next();return y?{value:p,done:y}:{value:l?[h(p[0]),h(p[1])]:h(p),done:y}},[Symbol.iterator](){return this}}}}function ui(e){return function(...t){return e==="delete"?!1:this}}function gC(){const e={get(o){return Ka(this,o)},get size(){return qa(this)},has:Va,add:Op,set:Lp,delete:Ip,clear:Pp,forEach:za(!1,!1)},t={get(o){return Ka(this,o,!1,!0)},get size(){return qa(this)},has:Va,add:Op,set:Lp,delete:Ip,clear:Pp,forEach:za(!1,!0)},n={get(o){return Ka(this,o,!0)},get size(){return qa(this,!0)},has(o){return Va.call(this,o,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:za(!0,!1)},r={get(o){return Ka(this,o,!0,!0)},get size(){return qa(this,!0)},has(o){return Va.call(this,o,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:za(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=Ga(o,!1,!1),n[o]=Ga(o,!0,!1),t[o]=Ga(o,!1,!0),r[o]=Ga(o,!0,!0)}),[e,n,t,r]}const[mC,vC,yC,bC]=gC();function ec(e,t){const n=t?e?bC:yC:e?vC:mC;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_t(n,i)&&i in r?n:r,i,o)}const CC={get:ec(!1,!1)},_C={get:ec(!1,!0)},wC={get:ec(!0,!1)},Dp=new WeakMap,Rp=new WeakMap,Np=new WeakMap,TC=new WeakMap;function xC(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kC(e){return e.__v_skip||!Object.isExtensible(e)?0:xC(zb(e))}function Dn(e){return mo(e)?e:nc(e,!1,Ep,CC,Dp)}function SC(e){return nc(e,!1,hC,_C,Rp)}function tc(e){return nc(e,!0,pC,wC,Np)}function nc(e,t,n,r,i){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const s=kC(e);if(s===0)return e;const l=new Proxy(e,s===2?r:n);return i.set(e,l),l}function go(e){return mo(e)?go(e.__v_raw):!!(e&&e.__v_isReactive)}function mo(e){return!!(e&&e.__v_isReadonly)}function Ya(e){return!!(e&&e.__v_isShallow)}function Mp(e){return go(e)||mo(e)}function kt(e){const t=e&&e.__v_raw;return t?kt(t):e}function Fp(e){return ja(e,"__v_skip",!0),e}const bs=e=>Rt(e)?Dn(e):e,rc=e=>Rt(e)?tc(e):e;function $p(e){li&&vr&&(e=kt(e),Tp(e.dep||(e.dep=qu())))}function Bp(e,t){e=kt(e);const n=e.dep;n&&Ju(n)}function mn(e){return!!(e&&e.__v_isRef===!0)}function Et(e){return Hp(e,!1)}function AC(e){return Hp(e,!0)}function Hp(e,t){return mn(e)?e:new EC(e,t)}class EC{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:kt(t),this._value=n?t:bs(t)}get value(){return $p(this),this._value}set value(t){const n=this.__v_isShallow||Ya(t)||mo(t);t=n?t:kt(t),vs(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:bs(t),Bp(this))}}function jp(e){return mn(e)?e.value:e}const OC={get:(e,t,n)=>jp(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return mn(i)&&!mn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Up(e){return go(e)?e:new Proxy(e,OC)}var Wp;class LC{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Wp]=!1,this._dirty=!0,this.effect=new Xu(t,()=>{this._dirty||(this._dirty=!0,Bp(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=kt(this);return $p(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Wp="__v_isReadonly";function IC(e,t,n=!1){let r,i;const o=pt(e);return o?(r=e,i=mr):(r=e.get,i=e.set),new LC(r,i,o||!i,n)}function Xj(e,...t){}function ci(e,t,n,r){let i;try{i=r?e(...r):e()}catch(o){Xa(o,t,n)}return i}function yr(e,t,n,r){if(pt(e)){const o=ci(e,t,n,r);return o&&hp(o)&&o.catch(s=>{Xa(s,t,n)}),o}const i=[];for(let o=0;o>>1;_s(vn[r])Er&&vn.splice(t,1)}function NC(e){Qe(e)?vo.push(...e):(!Wr||!Wr.includes(e,e.allowRecurse?Li+1:Li))&&vo.push(e),Vp()}function qp(e,t=Cs?Er+1:0){for(;t_s(n)-_s(r)),Li=0;Lie.id==null?1/0:e.id,MC=(e,t)=>{const n=_s(e)-_s(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Gp(e){ic=!1,Cs=!0,vn.sort(MC);const t=mr;try{for(Er=0;Erzt(C)?C.trim():C)),p&&(i=n.map(Ua))}let l,c=r[l=Vu(t)]||r[l=Vu(Ar(t))];!c&&o&&(c=r[l=Vu(fo(t))]),c&&yr(c,e,6,i);const d=r[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,yr(d,e,6,i)}}function Yp(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let s={},l=!1;if(!pt(e)){const c=d=>{const h=Yp(d,t,!0);h&&(l=!0,kn(s,h))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(Rt(e)&&r.set(e,null),null):(Qe(o)?o.forEach(c=>s[c]=null):kn(s,o),Rt(e)&&r.set(e,s),s)}function Za(e,t){return!e||!Ma(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,fo(t))||_t(e,t))}let dn=null,Qa=null;function el(e){const t=dn;return dn=e,Qa=e&&e.type.__scopeId||null,t}function yo(e){Qa=e}function bo(){Qa=null}function ac(e,t=dn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&wh(-1);const o=el(t);let s;try{s=e(...i)}finally{el(o),r._d&&wh(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function Jj(){}function lc(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[s],slots:l,attrs:c,emit:d,render:h,renderCache:p,data:y,setupState:C,ctx:w,inheritAttrs:k}=e;let O,N;const L=el(e);try{if(n.shapeFlag&4){const D=i||r;O=Or(h.call(D,D,p,o,C,y,w)),N=c}else{const D=t;O=Or(D.length>1?D(o,{attrs:c,slots:l,emit:d}):D(o,null)),N=t.props?c:$C(c)}}catch(D){ks.length=0,Xa(D,e,1),O=xe(fi)}let K=O;if(N&&k!==!1){const D=Object.keys(N),{shapeFlag:Te}=K;D.length&&Te&7&&(s&&D.some(Uu)&&(N=BC(N,s)),K=_o(K,N))}return n.dirs&&(K=_o(K),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&(K.transition=n.transition),O=K,el(L),O}const $C=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ma(n))&&((t||(t={}))[n]=e[n]);return t},BC=(e,t)=>{const n={};for(const r in e)(!Uu(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function HC(e,t,n){const{props:r,children:i,component:o}=e,{props:s,children:l,patchFlag:c}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Xp(r,s,d):!!s;if(c&8){const h=t.dynamicProps;for(let p=0;pe.__isSuspense;function WC(e,t){t&&t.pendingBranch?Qe(e)?t.effects.push(...e):t.effects.push(e):NC(e)}function Jp(e,t){if(Gt){let n=Gt.provides;const r=Gt.parent&&Gt.parent.provides;r===n&&(n=Gt.provides=Object.create(r)),n[e]=t}}function Co(e,t,n=!1){const r=Gt||dn;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&pt(t)?t.call(r.proxy):t}}const tl={};function rr(e,t,n){return Zp(e,t,n)}function Zp(e,t,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:s}=Dt){const l=yp()===(Gt==null?void 0:Gt.scope)?Gt:null;let c,d=!1,h=!1;if(mn(e)?(c=()=>e.value,d=Ya(e)):go(e)?(c=()=>e,r=!0):Qe(e)?(h=!0,d=e.some(K=>go(K)||Ya(K)),c=()=>e.map(K=>{if(mn(K))return K.value;if(go(K))return Ii(K);if(pt(K))return ci(K,l,2)})):pt(e)?t?c=()=>ci(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return p&&p(),yr(e,l,3,[y])}:c=mr,t&&r){const K=c;c=()=>Ii(K())}let p,y=K=>{p=N.onStop=()=>{ci(K,l,4)}},C;if(Es)if(y=mr,t?n&&yr(t,l,3,[c(),h?[]:void 0,y]):c(),i==="sync"){const K=F_();C=K.__watcherHandles||(K.__watcherHandles=[])}else return mr;let w=h?new Array(e.length).fill(tl):tl;const k=()=>{if(N.active)if(t){const K=N.run();(r||d||(h?K.some((D,Te)=>vs(D,w[Te])):vs(K,w)))&&(p&&p(),yr(t,l,3,[K,w===tl?void 0:h&&w[0]===tl?[]:w,y]),w=K)}else N.run()};k.allowRecurse=!!t;let O;i==="sync"?O=k:i==="post"?O=()=>Nn(k,l&&l.suspense):(k.pre=!0,l&&(k.id=l.uid),O=()=>sc(k));const N=new Xu(c,O);t?n?k():w=N.run():i==="post"?Nn(N.run.bind(N),l&&l.suspense):N.run();const L=()=>{N.stop(),l&&l.scope&&Wu(l.scope.effects,N)};return C&&C.push(L),L}function KC(e,t,n){const r=this.proxy,i=zt(e)?e.includes(".")?Qp(r,e):()=>r[e]:e.bind(r,r);let o;pt(t)?o=t:(o=t.handler,n=t);const s=Gt;wo(this);const l=Zp(i,o.bind(r),n);return s?wo(s):Ni(),l}function Qp(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Ii(n,t)});else if(mp(e))for(const n in e)Ii(e[n],t);return e}function Rn(e){return pt(e)?{setup:e,name:e.name}:e}const ws=e=>!!e.type.__asyncLoader,eh=e=>e.type.__isKeepAlive;function VC(e,t){th(e,"a",t)}function qC(e,t){th(e,"da",t)}function th(e,t,n=Gt){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(nl(t,r,n),n){let i=n.parent;for(;i&&i.parent;)eh(i.parent.vnode)&&zC(r,t,n,i),i=i.parent}}function zC(e,t,n,r){const i=nl(t,e,r,!0);nh(()=>{Wu(r[t],i)},n)}function nl(e,t,n=Gt,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;po(),wo(n);const l=yr(t,n,e,s);return Ni(),ho(),l});return r?i.unshift(o):i.push(o),o}}const Kr=e=>(t,n=Gt)=>(!Es||e==="sp")&&nl(e,(...r)=>t(...r),n),GC=Kr("bm"),uc=Kr("m"),YC=Kr("bu"),XC=Kr("u"),JC=Kr("bum"),nh=Kr("um"),ZC=Kr("sp"),QC=Kr("rtg"),e_=Kr("rtc");function t_(e,t=Gt){nl("ec",e,t)}function be(e,t){const n=dn;if(n===null)return e;const r=cl(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;ot(s,l,void 0,o&&o[l]));else{const s=Object.keys(e);i=new Array(s.length);for(let l=0,c=s.length;lxh(t)?!(t.type===fi||t.type===He&&!sh(t.children)):!0)?e:null}const dc=e=>e?Ah(e)?cl(e)||e.proxy:dc(e.parent):null,Ts=kn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>dc(e.parent),$root:e=>dc(e.root),$emit:e=>e.emit,$options:e=>gc(e),$forceUpdate:e=>e.f||(e.f=()=>sc(e.update)),$nextTick:e=>e.n||(e.n=Ja.bind(e.proxy)),$watch:e=>KC.bind(e)}),pc=(e,t)=>e!==Dt&&!e.__isScriptSetup&&_t(e,t),i_={get({_:e},t){const{ctx:n,setupState:r,data:i,props:o,accessCache:s,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const C=s[t];if(C!==void 0)switch(C){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(pc(r,t))return s[t]=1,r[t];if(i!==Dt&&_t(i,t))return s[t]=2,i[t];if((d=e.propsOptions[0])&&_t(d,t))return s[t]=3,o[t];if(n!==Dt&&_t(n,t))return s[t]=4,n[t];hc&&(s[t]=0)}}const h=Ts[t];let p,y;if(h)return t==="$attrs"&&Pn(e,"get",t),h(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==Dt&&_t(n,t))return s[t]=4,n[t];if(y=c.config.globalProperties,_t(y,t))return y[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return pc(i,t)?(i[t]=n,!0):r!==Dt&&_t(r,t)?(r[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},s){let l;return!!n[s]||e!==Dt&&_t(e,s)||pc(t,s)||(l=o[0])&&_t(l,s)||_t(r,s)||_t(Ts,s)||_t(i.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let hc=!0;function o_(e){const t=gc(e),n=e.proxy,r=e.ctx;hc=!1,t.beforeCreate&&ah(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:s,watch:l,provide:c,inject:d,created:h,beforeMount:p,mounted:y,beforeUpdate:C,updated:w,activated:k,deactivated:O,beforeDestroy:N,beforeUnmount:L,destroyed:K,unmounted:D,render:Te,renderTracked:m,renderTriggered:ue,errorCaptured:I,serverPrefetch:S,expose:P,inheritAttrs:j,components:ee,directives:J,filters:ye}=t;if(d&&s_(d,r,null,e.appContext.config.unwrapInjectedRef),s)for(const z in s){const ie=s[z];pt(ie)&&(r[z]=ie.bind(n))}if(i){const z=i.call(n,n);Rt(z)&&(e.data=Dn(z))}if(hc=!0,o)for(const z in o){const ie=o[z],fe=pt(ie)?ie.bind(n,n):pt(ie.get)?ie.get.bind(n,n):mr,nt=!pt(ie)&&pt(ie.set)?ie.set.bind(n):mr,Ve=tn({get:fe,set:nt});Object.defineProperty(r,z,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:ne=>Ve.value=ne})}if(l)for(const z in l)lh(l[z],r,n,z);if(c){const z=pt(c)?c.call(n):c;Reflect.ownKeys(z).forEach(ie=>{Jp(ie,z[ie])})}h&&ah(h,e,"c");function Ne(z,ie){Qe(ie)?ie.forEach(fe=>z(fe.bind(n))):ie&&z(ie.bind(n))}if(Ne(GC,p),Ne(uc,y),Ne(YC,C),Ne(XC,w),Ne(VC,k),Ne(qC,O),Ne(t_,I),Ne(e_,m),Ne(QC,ue),Ne(JC,L),Ne(nh,D),Ne(ZC,S),Qe(P))if(P.length){const z=e.exposed||(e.exposed={});P.forEach(ie=>{Object.defineProperty(z,ie,{get:()=>n[ie],set:fe=>n[ie]=fe})})}else e.exposed||(e.exposed={});Te&&e.render===mr&&(e.render=Te),j!=null&&(e.inheritAttrs=j),ee&&(e.components=ee),J&&(e.directives=J)}function s_(e,t,n=mr,r=!1){Qe(e)&&(e=mc(e));for(const i in e){const o=e[i];let s;Rt(o)?"default"in o?s=Co(o.from||i,o.default,!0):s=Co(o.from||i):s=Co(o),mn(s)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:l=>s.value=l}):t[i]=s}}function ah(e,t,n){yr(Qe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function lh(e,t,n,r){const i=r.includes(".")?Qp(n,r):()=>n[r];if(zt(e)){const o=t[e];pt(o)&&rr(i,o)}else if(pt(e))rr(i,e.bind(n));else if(Rt(e))if(Qe(e))e.forEach(o=>lh(o,t,n,r));else{const o=pt(e.handler)?e.handler.bind(n):t[e.handler];pt(o)&&rr(i,o,e)}}function gc(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,l=o.get(t);let c;return l?c=l:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(d=>il(c,d,s,!0)),il(c,t,s)),Rt(t)&&o.set(t,c),c}function il(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&il(e,o,n,!0),i&&i.forEach(s=>il(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const l=a_[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const a_={data:uh,props:Di,emits:Di,methods:Di,computed:Di,beforeCreate:Sn,created:Sn,beforeMount:Sn,mounted:Sn,beforeUpdate:Sn,updated:Sn,beforeDestroy:Sn,beforeUnmount:Sn,destroyed:Sn,unmounted:Sn,activated:Sn,deactivated:Sn,errorCaptured:Sn,serverPrefetch:Sn,components:Di,directives:Di,watch:u_,provide:uh,inject:l_};function uh(e,t){return t?e?function(){return kn(pt(e)?e.call(this,this):e,pt(t)?t.call(this,this):t)}:t:e}function l_(e,t){return Di(mc(e),mc(t))}function mc(e){if(Qe(e)){const t={};for(let n=0;n0)&&!(s&16)){if(s&8){const h=e.vnode.dynamicProps;for(let p=0;p{c=!0;const[y,C]=fh(p,t,!0);kn(s,y),C&&l.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!o&&!c)return Rt(e)&&r.set(e,lo),lo;if(Qe(o))for(let h=0;h-1,C[1]=k<0||w-1||_t(C,"default"))&&l.push(p)}}}const d=[s,l];return Rt(e)&&r.set(e,d),d}function dh(e){return e[0]!=="$"}function ph(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function hh(e,t){return ph(e)===ph(t)}function gh(e,t){return Qe(t)?t.findIndex(n=>hh(n,e)):pt(t)&&hh(t,e)?0:-1}const mh=e=>e[0]==="_"||e==="$stable",yc=e=>Qe(e)?e.map(Or):[Or(e)],d_=(e,t,n)=>{if(t._n)return t;const r=ac((...i)=>yc(t(...i)),n);return r._c=!1,r},vh=(e,t,n)=>{const r=e._ctx;for(const i in e){if(mh(i))continue;const o=e[i];if(pt(o))t[i]=d_(i,o,r);else if(o!=null){const s=yc(o);t[i]=()=>s}}},yh=(e,t)=>{const n=yc(t);e.slots.default=()=>n},p_=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=kt(t),ja(t,"_",n)):vh(t,e.slots={})}else e.slots={},t&&yh(e,t);ja(e.slots,al,1)},h_=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,s=Dt;if(r.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:(kn(i,t),!n&&l===1&&delete i._):(o=!t.$stable,vh(t,i)),s=t}else t&&(yh(e,t),s={default:1});if(o)for(const l in i)!mh(l)&&!(l in s)&&delete i[l]};function bh(){return{app:null,config:{isNativeTag:Kb,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let g_=0;function m_(e,t){return function(r,i=null){pt(r)||(r=Object.assign({},r)),i!=null&&!Rt(i)&&(i=null);const o=bh(),s=new Set;let l=!1;const c=o.app={_uid:g_++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:$_,get config(){return o.config},set config(d){},use(d,...h){return s.has(d)||(d&&pt(d.install)?(s.add(d),d.install(c,...h)):pt(d)&&(s.add(d),d(c,...h))),c},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),c},component(d,h){return h?(o.components[d]=h,c):o.components[d]},directive(d,h){return h?(o.directives[d]=h,c):o.directives[d]},mount(d,h,p){if(!l){const y=xe(r,i);return y.appContext=o,h&&t?t(y,d):e(y,d,p),l=!0,c._container=d,d.__vue_app__=c,cl(y.component)||y.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(d,h){return o.provides[d]=h,c}};return c}}function bc(e,t,n,r,i=!1){if(Qe(e)){e.forEach((y,C)=>bc(y,t&&(Qe(t)?t[C]:t),n,r,i));return}if(ws(r)&&!i)return;const o=r.shapeFlag&4?cl(r.component)||r.component.proxy:r.el,s=i?null:o,{i:l,r:c}=e,d=t&&t.r,h=l.refs===Dt?l.refs={}:l.refs,p=l.setupState;if(d!=null&&d!==c&&(zt(d)?(h[d]=null,_t(p,d)&&(p[d]=null)):mn(d)&&(d.value=null)),pt(c))ci(c,l,12,[s,h]);else{const y=zt(c),C=mn(c);if(y||C){const w=()=>{if(e.f){const k=y?_t(p,c)?p[c]:h[c]:c.value;i?Qe(k)&&Wu(k,o):Qe(k)?k.includes(o)||k.push(o):y?(h[c]=[o],_t(p,c)&&(p[c]=h[c])):(c.value=[o],e.k&&(h[e.k]=c.value))}else y?(h[c]=s,_t(p,c)&&(p[c]=s)):C&&(c.value=s,e.k&&(h[e.k]=s))};s?(w.id=-1,Nn(w,n)):w()}}}const Nn=WC;function v_(e){return y_(e)}function y_(e,t){const n=Xb();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:s,createText:l,createComment:c,setText:d,setElementText:h,parentNode:p,nextSibling:y,setScopeId:C=mr,insertStaticContent:w}=e,k=(R,$,G,te=null,W=null,X=null,Ce=!1,de=null,me=!!$.dynamicChildren)=>{if(R===$)return;R&&!As(R,$)&&(te=Be(R),ne(R,W,X,!0),R=null),$.patchFlag===-2&&(me=!1,$.dynamicChildren=null);const{type:se,ref:ke,shapeFlag:_e}=$;switch(se){case sl:O(R,$,G,te);break;case fi:N(R,$,G,te);break;case wc:R==null&&L($,G,te,Ce);break;case He:ee(R,$,G,te,W,X,Ce,de,me);break;default:_e&1?Te(R,$,G,te,W,X,Ce,de,me):_e&6?J(R,$,G,te,W,X,Ce,de,me):(_e&64||_e&128)&&se.process(R,$,G,te,W,X,Ce,de,me,Le)}ke!=null&&W&&bc(ke,R&&R.ref,X,$||R,!$)},O=(R,$,G,te)=>{if(R==null)r($.el=l($.children),G,te);else{const W=$.el=R.el;$.children!==R.children&&d(W,$.children)}},N=(R,$,G,te)=>{R==null?r($.el=c($.children||""),G,te):$.el=R.el},L=(R,$,G,te)=>{[R.el,R.anchor]=w(R.children,$,G,te,R.el,R.anchor)},K=({el:R,anchor:$},G,te)=>{let W;for(;R&&R!==$;)W=y(R),r(R,G,te),R=W;r($,G,te)},D=({el:R,anchor:$})=>{let G;for(;R&&R!==$;)G=y(R),i(R),R=G;i($)},Te=(R,$,G,te,W,X,Ce,de,me)=>{Ce=Ce||$.type==="svg",R==null?m($,G,te,W,X,Ce,de,me):S(R,$,W,X,Ce,de,me)},m=(R,$,G,te,W,X,Ce,de)=>{let me,se;const{type:ke,props:_e,shapeFlag:Me,transition:Se,dirs:qe}=R;if(me=R.el=s(R.type,X,_e&&_e.is,_e),Me&8?h(me,R.children):Me&16&&I(R.children,me,null,te,W,X&&ke!=="foreignObject",Ce,de),qe&&Pi(R,null,te,"created"),ue(me,R,R.scopeId,Ce,te),_e){for(const at in _e)at!=="value"&&!Fa(at)&&o(me,at,null,_e[at],X,R.children,te,W,Oe);"value"in _e&&o(me,"value",null,_e.value),(se=_e.onVnodeBeforeMount)&&Lr(se,te,R)}qe&&Pi(R,null,te,"beforeMount");const ft=(!W||W&&!W.pendingBranch)&&Se&&!Se.persisted;ft&&Se.beforeEnter(me),r(me,$,G),((se=_e&&_e.onVnodeMounted)||ft||qe)&&Nn(()=>{se&&Lr(se,te,R),ft&&Se.enter(me),qe&&Pi(R,null,te,"mounted")},W)},ue=(R,$,G,te,W)=>{if(G&&C(R,G),te)for(let X=0;X{for(let se=me;se{const de=$.el=R.el;let{patchFlag:me,dynamicChildren:se,dirs:ke}=$;me|=R.patchFlag&16;const _e=R.props||Dt,Me=$.props||Dt;let Se;G&&Ri(G,!1),(Se=Me.onVnodeBeforeUpdate)&&Lr(Se,G,$,R),ke&&Pi($,R,G,"beforeUpdate"),G&&Ri(G,!0);const qe=W&&$.type!=="foreignObject";if(se?P(R.dynamicChildren,se,de,G,te,qe,X):Ce||ie(R,$,de,null,G,te,qe,X,!1),me>0){if(me&16)j(de,$,_e,Me,G,te,W);else if(me&2&&_e.class!==Me.class&&o(de,"class",null,Me.class,W),me&4&&o(de,"style",_e.style,Me.style,W),me&8){const ft=$.dynamicProps;for(let at=0;at{Se&&Lr(Se,G,$,R),ke&&Pi($,R,G,"updated")},te)},P=(R,$,G,te,W,X,Ce)=>{for(let de=0;de<$.length;de++){const me=R[de],se=$[de],ke=me.el&&(me.type===He||!As(me,se)||me.shapeFlag&70)?p(me.el):G;k(me,se,ke,null,te,W,X,Ce,!0)}},j=(R,$,G,te,W,X,Ce)=>{if(G!==te){if(G!==Dt)for(const de in G)!Fa(de)&&!(de in te)&&o(R,de,G[de],null,Ce,$.children,W,X,Oe);for(const de in te){if(Fa(de))continue;const me=te[de],se=G[de];me!==se&&de!=="value"&&o(R,de,se,me,Ce,$.children,W,X,Oe)}"value"in te&&o(R,"value",G.value,te.value)}},ee=(R,$,G,te,W,X,Ce,de,me)=>{const se=$.el=R?R.el:l(""),ke=$.anchor=R?R.anchor:l("");let{patchFlag:_e,dynamicChildren:Me,slotScopeIds:Se}=$;Se&&(de=de?de.concat(Se):Se),R==null?(r(se,G,te),r(ke,G,te),I($.children,G,ke,W,X,Ce,de,me)):_e>0&&_e&64&&Me&&R.dynamicChildren?(P(R.dynamicChildren,Me,G,W,X,Ce,de),($.key!=null||W&&$===W.subTree)&&Cc(R,$,!0)):ie(R,$,G,ke,W,X,Ce,de,me)},J=(R,$,G,te,W,X,Ce,de,me)=>{$.slotScopeIds=de,R==null?$.shapeFlag&512?W.ctx.activate($,G,te,Ce,me):ye($,G,te,W,X,Ce,me):je(R,$,me)},ye=(R,$,G,te,W,X,Ce)=>{const de=R.component=O_(R,te,W);if(eh(R)&&(de.ctx.renderer=Le),L_(de),de.asyncDep){if(W&&W.registerDep(de,Ne),!R.el){const me=de.subTree=xe(fi);N(null,me,$,G)}return}Ne(de,R,$,G,W,X,Ce)},je=(R,$,G)=>{const te=$.component=R.component;if(HC(R,$,G))if(te.asyncDep&&!te.asyncResolved){z(te,$,G);return}else te.next=$,RC(te.update),te.update();else $.el=R.el,te.vnode=$},Ne=(R,$,G,te,W,X,Ce)=>{const de=()=>{if(R.isMounted){let{next:ke,bu:_e,u:Me,parent:Se,vnode:qe}=R,ft=ke,at;Ri(R,!1),ke?(ke.el=qe.el,z(R,ke,Ce)):ke=qe,_e&&Ha(_e),(at=ke.props&&ke.props.onVnodeBeforeUpdate)&&Lr(at,Se,ke,qe),Ri(R,!0);const Ct=lc(R),Ft=R.subTree;R.subTree=Ct,k(Ft,Ct,p(Ft.el),Be(Ft),R,W,X),ke.el=Ct.el,ft===null&&jC(R,Ct.el),Me&&Nn(Me,W),(at=ke.props&&ke.props.onVnodeUpdated)&&Nn(()=>Lr(at,Se,ke,qe),W)}else{let ke;const{el:_e,props:Me}=$,{bm:Se,m:qe,parent:ft}=R,at=ws($);if(Ri(R,!1),Se&&Ha(Se),!at&&(ke=Me&&Me.onVnodeBeforeMount)&&Lr(ke,ft,$),Ri(R,!0),_e&&mt){const Ct=()=>{R.subTree=lc(R),mt(_e,R.subTree,R,W,null)};at?$.type.__asyncLoader().then(()=>!R.isUnmounted&&Ct()):Ct()}else{const Ct=R.subTree=lc(R);k(null,Ct,G,te,R,W,X),$.el=Ct.el}if(qe&&Nn(qe,W),!at&&(ke=Me&&Me.onVnodeMounted)){const Ct=$;Nn(()=>Lr(ke,ft,Ct),W)}($.shapeFlag&256||ft&&ws(ft.vnode)&&ft.vnode.shapeFlag&256)&&R.a&&Nn(R.a,W),R.isMounted=!0,$=G=te=null}},me=R.effect=new Xu(de,()=>sc(se),R.scope),se=R.update=()=>me.run();se.id=R.uid,Ri(R,!0),se()},z=(R,$,G)=>{$.component=R;const te=R.vnode.props;R.vnode=$,R.next=null,f_(R,$.props,te,G),h_(R,$.children,G),po(),qp(),ho()},ie=(R,$,G,te,W,X,Ce,de,me=!1)=>{const se=R&&R.children,ke=R?R.shapeFlag:0,_e=$.children,{patchFlag:Me,shapeFlag:Se}=$;if(Me>0){if(Me&128){nt(se,_e,G,te,W,X,Ce,de,me);return}else if(Me&256){fe(se,_e,G,te,W,X,Ce,de,me);return}}Se&8?(ke&16&&Oe(se,W,X),_e!==se&&h(G,_e)):ke&16?Se&16?nt(se,_e,G,te,W,X,Ce,de,me):Oe(se,W,X,!0):(ke&8&&h(G,""),Se&16&&I(_e,G,te,W,X,Ce,de,me))},fe=(R,$,G,te,W,X,Ce,de,me)=>{R=R||lo,$=$||lo;const se=R.length,ke=$.length,_e=Math.min(se,ke);let Me;for(Me=0;Me<_e;Me++){const Se=$[Me]=me?di($[Me]):Or($[Me]);k(R[Me],Se,G,null,W,X,Ce,de,me)}se>ke?Oe(R,W,X,!0,!1,_e):I($,G,te,W,X,Ce,de,me,_e)},nt=(R,$,G,te,W,X,Ce,de,me)=>{let se=0;const ke=$.length;let _e=R.length-1,Me=ke-1;for(;se<=_e&&se<=Me;){const Se=R[se],qe=$[se]=me?di($[se]):Or($[se]);if(As(Se,qe))k(Se,qe,G,null,W,X,Ce,de,me);else break;se++}for(;se<=_e&&se<=Me;){const Se=R[_e],qe=$[Me]=me?di($[Me]):Or($[Me]);if(As(Se,qe))k(Se,qe,G,null,W,X,Ce,de,me);else break;_e--,Me--}if(se>_e){if(se<=Me){const Se=Me+1,qe=SeMe)for(;se<=_e;)ne(R[se],W,X,!0),se++;else{const Se=se,qe=se,ft=new Map;for(se=qe;se<=Me;se++){const De=$[se]=me?di($[se]):Or($[se]);De.key!=null&&ft.set(De.key,se)}let at,Ct=0;const Ft=Me-qe+1;let an=!1,Ht=0;const fn=new Array(Ft);for(se=0;se=Ft){ne(De,W,X,!0);continue}let Fe;if(De.key!=null)Fe=ft.get(De.key);else for(at=qe;at<=Me;at++)if(fn[at-qe]===0&&As(De,$[at])){Fe=at;break}Fe===void 0?ne(De,W,X,!0):(fn[Fe-qe]=se+1,Fe>=Ht?Ht=Fe:an=!0,k(De,$[Fe],G,null,W,X,Ce,de,me),Ct++)}const Q=an?b_(fn):lo;for(at=Q.length-1,se=Ft-1;se>=0;se--){const De=qe+se,Fe=$[De],it=De+1{const{el:X,type:Ce,transition:de,children:me,shapeFlag:se}=R;if(se&6){Ve(R.component.subTree,$,G,te);return}if(se&128){R.suspense.move($,G,te);return}if(se&64){Ce.move(R,$,G,Le);return}if(Ce===He){r(X,$,G);for(let _e=0;_ede.enter(X),W);else{const{leave:_e,delayLeave:Me,afterLeave:Se}=de,qe=()=>r(X,$,G),ft=()=>{_e(X,()=>{qe(),Se&&Se()})};Me?Me(X,qe,ft):ft()}else r(X,$,G)},ne=(R,$,G,te=!1,W=!1)=>{const{type:X,props:Ce,ref:de,children:me,dynamicChildren:se,shapeFlag:ke,patchFlag:_e,dirs:Me}=R;if(de!=null&&bc(de,null,G,R,!0),ke&256){$.ctx.deactivate(R);return}const Se=ke&1&&Me,qe=!ws(R);let ft;if(qe&&(ft=Ce&&Ce.onVnodeBeforeUnmount)&&Lr(ft,$,R),ke&6)Ae(R.component,G,te);else{if(ke&128){R.suspense.unmount(G,te);return}Se&&Pi(R,null,$,"beforeUnmount"),ke&64?R.type.remove(R,$,G,W,Le,te):se&&(X!==He||_e>0&&_e&64)?Oe(se,$,G,!1,!0):(X===He&&_e&384||!W&&ke&16)&&Oe(me,$,G),te&&ge(R)}(qe&&(ft=Ce&&Ce.onVnodeUnmounted)||Se)&&Nn(()=>{ft&&Lr(ft,$,R),Se&&Pi(R,null,$,"unmounted")},G)},ge=R=>{const{type:$,el:G,anchor:te,transition:W}=R;if($===He){we(G,te);return}if($===wc){D(R);return}const X=()=>{i(G),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(R.shapeFlag&1&&W&&!W.persisted){const{leave:Ce,delayLeave:de}=W,me=()=>Ce(G,X);de?de(R.el,X,me):me()}else X()},we=(R,$)=>{let G;for(;R!==$;)G=y(R),i(R),R=G;i($)},Ae=(R,$,G)=>{const{bum:te,scope:W,update:X,subTree:Ce,um:de}=R;te&&Ha(te),W.stop(),X&&(X.active=!1,ne(Ce,R,$,G)),de&&Nn(de,$),Nn(()=>{R.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&R.asyncDep&&!R.asyncResolved&&R.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},Oe=(R,$,G,te=!1,W=!1,X=0)=>{for(let Ce=X;CeR.shapeFlag&6?Be(R.component.subTree):R.shapeFlag&128?R.suspense.next():y(R.anchor||R.el),Xe=(R,$,G)=>{R==null?$._vnode&&ne($._vnode,null,null,!0):k($._vnode||null,R,$,null,null,null,G),qp(),zp(),$._vnode=R},Le={p:k,um:ne,m:Ve,r:ge,mt:ye,mc:I,pc:ie,pbc:P,n:Be,o:e};let rt,mt;return t&&([rt,mt]=t(Le)),{render:Xe,hydrate:rt,createApp:m_(Xe,rt)}}function Ri({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Cc(e,t,n=!1){const r=e.children,i=t.children;if(Qe(r)&&Qe(i))for(let o=0;o>1,e[n[l]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}const C_=e=>e.__isTeleport,xs=e=>e&&(e.disabled||e.disabled===""),Ch=e=>typeof SVGElement<"u"&&e instanceof SVGElement,_c=(e,t)=>{const n=e&&e.to;return zt(n)?t?t(n):null:n},__={__isTeleport:!0,process(e,t,n,r,i,o,s,l,c,d){const{mc:h,pc:p,pbc:y,o:{insert:C,querySelector:w,createText:k,createComment:O}}=d,N=xs(t.props);let{shapeFlag:L,children:K,dynamicChildren:D}=t;if(e==null){const Te=t.el=k(""),m=t.anchor=k("");C(Te,n,r),C(m,n,r);const ue=t.target=_c(t.props,w),I=t.targetAnchor=k("");ue&&(C(I,ue),s=s||Ch(ue));const S=(P,j)=>{L&16&&h(K,P,j,i,o,s,l,c)};N?S(n,m):ue&&S(ue,I)}else{t.el=e.el;const Te=t.anchor=e.anchor,m=t.target=e.target,ue=t.targetAnchor=e.targetAnchor,I=xs(e.props),S=I?n:m,P=I?Te:ue;if(s=s||Ch(m),D?(y(e.dynamicChildren,D,S,i,o,s,l),Cc(e,t,!0)):c||p(e,t,S,P,i,o,s,l,!1),N)I||ol(t,n,Te,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const j=t.target=_c(t.props,w);j&&ol(t,j,null,d,0)}else I&&ol(t,m,ue,d,1)}_h(t)},remove(e,t,n,r,{um:i,o:{remove:o}},s){const{shapeFlag:l,children:c,anchor:d,targetAnchor:h,target:p,props:y}=e;if(p&&o(h),(s||!xs(y))&&(o(d),l&16))for(let C=0;C0?br||lo:null,x_(),Ss>0&&br&&br.push(e),e}function H(e,t,n,r,i,o){return Th(T(e,t,n,r,i,o,!0))}function Ze(e,t,n,r,i){return Th(xe(e,t,n,r,i,!0))}function xh(e){return e?e.__v_isVNode===!0:!1}function As(e,t){return e.type===t.type&&e.key===t.key}const al="__vInternal",kh=({key:e})=>e??null,ll=({ref:e,ref_key:t,ref_for:n})=>e!=null?zt(e)||mn(e)||pt(e)?{i:dn,r:e,k:t,f:!!n}:e:null;function T(e,t=null,n=null,r=0,i=null,o=e===He?0:1,s=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&kh(t),ref:t&&ll(t),scopeId:Qa,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:dn};return l?(Tc(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=zt(n)?8:16),Ss>0&&!s&&br&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&br.push(c),c}const xe=k_;function k_(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===rh)&&(e=fi),xh(e)){const l=_o(e,t,!0);return n&&Tc(l,n),Ss>0&&!o&&br&&(l.shapeFlag&6?br[br.indexOf(e)]=l:br.push(l)),l.patchFlag|=-2,l}if(N_(e)&&(e=e.__vccOpts),t){t=S_(t);let{class:l,style:c}=t;l&&!zt(l)&&(t.class=lt(l)),Rt(c)&&(Mp(c)&&!Qe(c)&&(c=kn({},c)),t.style=bt(c))}const s=zt(e)?1:UC(e)?128:C_(e)?64:Rt(e)?4:pt(e)?2:0;return T(e,t,n,r,i,s,o,!0)}function S_(e){return e?Mp(e)||al in e?kn({},e):e:null}function _o(e,t,n=!1){const{props:r,ref:i,patchFlag:o,children:s}=e,l=t?ul(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&kh(l),ref:t&&t.ref?n&&i?Qe(i)?i.concat(ll(t)):[i,ll(t)]:ll(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==He?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_o(e.ssContent),ssFallback:e.ssFallback&&_o(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Xt(e=" ",t=0){return xe(sl,null,e,t)}function Re(e="",t=!1){return t?(E(),Ze(fi,null,e)):xe(fi,null,e)}function Or(e){return e==null||typeof e=="boolean"?xe(fi):Qe(e)?xe(He,null,e.slice()):typeof e=="object"?di(e):xe(sl,null,String(e))}function di(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_o(e)}function Tc(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Qe(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),Tc(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(al in t)?t._ctx=dn:i===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else pt(t)?(t={default:t,_ctx:dn},n=32):(t=String(t),r&64?(n=16,t=[Xt(t)]):n=8);e.children=t,e.shapeFlag|=n}function ul(...e){const t={};for(let n=0;nGt||dn,wo=e=>{Gt=e,e.scope.on()},Ni=()=>{Gt&&Gt.scope.off(),Gt=null};function Ah(e){return e.vnode.shapeFlag&4}let Es=!1;function L_(e,t=!1){Es=t;const{props:n,children:r}=e.vnode,i=Ah(e);c_(e,n,i,t),p_(e,r);const o=i?I_(e,t):void 0;return Es=!1,o}function I_(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Fp(new Proxy(e.ctx,i_));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?D_(e):null;wo(e),po();const o=ci(r,e,0,[e.props,i]);if(ho(),Ni(),hp(o)){if(o.then(Ni,Ni),t)return o.then(s=>{Eh(e,s,t)}).catch(s=>{Xa(s,e,0)});e.asyncDep=o}else Eh(e,o,t)}else Lh(e,t)}function Eh(e,t,n){pt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=Up(t)),Lh(e,n)}let Oh;function Lh(e,t,n){const r=e.type;if(!e.render){if(!t&&Oh&&!r.render){const i=r.template||gc(e).template;if(i){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:c}=r,d=kn(kn({isCustomElement:o,delimiters:l},s),c);r.render=Oh(i,d)}}e.render=r.render||mr}wo(e),po(),o_(e),ho(),Ni()}function P_(e){return new Proxy(e.attrs,{get(t,n){return Pn(e,"get","$attrs"),t[n]}})}function D_(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=P_(e))},slots:e.slots,emit:e.emit,expose:t}}function cl(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Up(Fp(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Ts)return Ts[n](e)},has(t,n){return n in t||n in Ts}}))}function R_(e,t=!0){return pt(e)?e.displayName||e.name:e.name||t&&e.__name}function N_(e){return pt(e)&&"__vccOpts"in e}const tn=(e,t)=>IC(e,t,Es),M_=Symbol(""),F_=()=>Co(M_),$_="3.2.47",B_="http://www.w3.org/2000/svg",Mi=typeof document<"u"?document:null,Ih=Mi&&Mi.createElement("template"),H_={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Mi.createElementNS(B_,e):Mi.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Mi.createTextNode(e),createComment:e=>Mi.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mi.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const s=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Ih.innerHTML=r?`${e}`:e;const l=Ih.content;if(r){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function j_(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function U_(e,t,n){const r=e.style,i=zt(n);if(n&&!i){if(t&&!zt(t))for(const o in t)n[o]==null&&xc(r,o,"");for(const o in n)xc(r,o,n[o])}else{const o=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=o)}}const Ph=/\s*!important$/;function xc(e,t,n){if(Qe(n))n.forEach(r=>xc(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=W_(e,t);Ph.test(n)?e.setProperty(fo(r),n.replace(Ph,""),"important"):e[r]=n}}const Dh=["Webkit","Moz","ms"],kc={};function W_(e,t){const n=kc[t];if(n)return n;let r=Ar(t);if(r!=="filter"&&r in e)return kc[t]=r;r=Ba(r);for(let i=0;iSc||(Y_.then(()=>Sc=0),Sc=Date.now());function J_(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;yr(Z_(r,n.value),t,5,[r])};return n.value=e,n.attached=X_(),n}function Z_(e,t){if(Qe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Mh=/^on[a-z]/,Q_=(e,t,n,r,i=!1,o,s,l,c)=>{t==="class"?j_(e,r,i):t==="style"?U_(e,n,r):Ma(t)?Uu(t)||z_(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):e1(e,t,r,i))?V_(e,t,r,o,s,l,c):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),K_(e,t,r,i))};function e1(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Mh.test(t)&&pt(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Mh.test(t)&&zt(n)?!1:t in e}const To=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Qe(t)?n=>Ha(t,n):t};function t1(e){e.target.composing=!0}function Fh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ir={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=To(i);const o=r||i.props&&i.props.type==="number";pi(e,t?"change":"input",s=>{if(s.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=Ua(l)),e._assign(l)}),n&&pi(e,"change",()=>{e.value=e.value.trim()}),t||(pi(e,"compositionstart",t1),pi(e,"compositionend",Fh),pi(e,"change",Fh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},o){if(e._assign=To(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&Ua(e.value)===t))return;const s=t??"";e.value!==s&&(e.value=s)}},n1={deep:!0,created(e,t,n){e._assign=To(n),pi(e,"change",()=>{const r=e._modelValue,i=Ls(e),o=e.checked,s=e._assign;if(Qe(r)){const l=ju(r,i),c=l!==-1;if(o&&!c)s(r.concat(i));else if(!o&&c){const d=[...r];d.splice(l,1),s(d)}}else if(co(r)){const l=new Set(r);o?l.add(i):l.delete(i),s(l)}else s(Hh(e,o))})},mounted:$h,beforeUpdate(e,t,n){e._assign=To(n),$h(e,t,n)}};function $h(e,{value:t,oldValue:n},r){e._modelValue=t,Qe(t)?e.checked=ju(t,r.props.value)>-1:co(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=hs(t,Hh(e,!0)))}const Os={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=co(t);pi(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?Ua(Ls(s)):Ls(s));e._assign(e.multiple?i?new Set(o):o:o[0])}),e._assign=To(r)},mounted(e,{value:t}){Bh(e,t)},beforeUpdate(e,t,n){e._assign=To(n)},updated(e,{value:t}){Bh(e,t)}};function Bh(e,t){const n=e.multiple;if(!(n&&!Qe(t)&&!co(t))){for(let r=0,i=e.options.length;r-1:o.selected=t.has(s);else if(hs(Ls(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ls(e){return"_value"in e?e._value:e.value}function Hh(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const r1=["ctrl","shift","alt","meta"],i1={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>r1.some(n=>e[`${n}Key`]&&!t.includes(n))},gt=(e,t)=>(n,...r)=>{for(let i=0;i{Is(e,!1)}):Is(e,t))},beforeUnmount(e,{value:t}){Is(e,t)}};function Is(e,t){e.style.display=t?e._vod:"none"}const o1=kn({patchProp:Q_},H_);let jh;function s1(){return jh||(jh=v_(o1))}const a1=(...e)=>{const t=s1().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=l1(r);if(!i)return;const o=t._component;!pt(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const s=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function l1(e){return zt(e)?document.querySelector(e):e}/**! +(function(nr){typeof define=="function"&&define.amd?define(nr):nr()})(function(){"use strict";var Jj=Object.defineProperty;var Zj=(nr,bt,Ai)=>bt in nr?Jj(nr,bt,{enumerable:!0,configurable:!0,writable:!0,value:Ai}):nr[bt]=Ai;var $b=(nr,bt,Ai)=>(Zj(nr,typeof bt!="symbol"?bt+"":bt,Ai),Ai);function nr(e,t){const n=Object.create(null),r=e.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}function bt(e){if(Qe(e)){const t={};for(let n=0;n{if(n){const r=n.split(Bb);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function lt(e){let t="";if(zt(e))t=e;else if(Qe(e))for(let n=0;nps(n,t))}const ce=e=>zt(e)?e:e==null?"":Qe(e)||Rt(e)&&(e.toString===hp||!pt(e.toString))?JSON.stringify(e,fp,2):String(e),fp=(e,t)=>t&&t.__v_isRef?fp(e,t.value):lo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:uo(t)?{[`Set(${t.size})`]:[...t.values()]}:Rt(t)&&!Qe(t)&&!gp(t)?String(t):t,Dt={},ao=[],mr=()=>{},Kb=()=>!1,Vb=/^on[^a-z]/,Na=e=>Vb.test(e),ju=e=>e.startsWith("onUpdate:"),kn=Object.assign,Uu=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},qb=Object.prototype.hasOwnProperty,_t=(e,t)=>qb.call(e,t),Qe=Array.isArray,lo=e=>gs(e)==="[object Map]",uo=e=>gs(e)==="[object Set]",dp=e=>gs(e)==="[object Date]",pt=e=>typeof e=="function",zt=e=>typeof e=="string",hs=e=>typeof e=="symbol",Rt=e=>e!==null&&typeof e=="object",pp=e=>Rt(e)&&pt(e.then)&&pt(e.catch),hp=Object.prototype.toString,gs=e=>hp.call(e),zb=e=>gs(e).slice(8,-1),gp=e=>gs(e)==="[object Object]",Wu=e=>zt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ma=nr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Gb=/-(\w)/g,Ar=Fa(e=>e.replace(Gb,(t,n)=>n?n.toUpperCase():"")),Yb=/\B([A-Z])/g,co=Fa(e=>e.replace(Yb,"-$1").toLowerCase()),$a=Fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ku=Fa(e=>e?`on${$a(e)}`:""),ms=(e,t)=>!Object.is(e,t),Ba=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},ja=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let mp;const Xb=()=>mp||(mp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Kn;class Jb{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Kn,!t&&Kn&&(this.index=(Kn.scopes||(Kn.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=Kn;try{return Kn=this,t()}finally{Kn=n}}}on(){Kn=this}off(){Kn=this.parent}stop(t){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const t=new Set(e);return t.w=0,t.n=0,t},yp=e=>(e.w&ai)>0,bp=e=>(e.n&ai)>0,eC=({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let r=0;r{(h==="length"||h>=c)&&l.push(d)})}else switch(n!==void 0&&l.push(s.get(n)),t){case"add":Qe(e)?Wu(n)&&l.push(s.get("length")):(l.push(s.get(Ei)),lo(e)&&l.push(s.get(Gu)));break;case"delete":Qe(e)||(l.push(s.get(Ei)),lo(e)&&l.push(s.get(Gu)));break;case"set":lo(e)&&l.push(s.get(Ei));break}if(l.length===1)l[0]&&Xu(l[0]);else{const c=[];for(const d of l)d&&c.push(...d);Xu(Vu(c))}}function Xu(e,t){const n=Qe(e)?e:[...e];for(const r of n)r.computed&&Tp(r);for(const r of n)r.computed||Tp(r)}function Tp(e,t){(e!==vr||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const nC=nr("__proto__,__v_isRef,__isVue"),xp=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(hs)),rC=Ju(),iC=Ju(!1,!0),oC=Ju(!0),kp=sC();function sC(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const r=kt(this);for(let o=0,s=this.length;o{e[t]=function(...n){fo();const r=kt(this)[t].apply(this,n);return po(),r}}),e}function aC(e){const t=kt(this);return Pn(t,"has",e),t.hasOwnProperty(e)}function Ju(e=!1,t=!1){return function(r,i,o){if(i==="__v_isReactive")return!e;if(i==="__v_isReadonly")return e;if(i==="__v_isShallow")return t;if(i==="__v_raw"&&o===(e?t?TC:Rp:t?Dp:Pp).get(r))return r;const s=Qe(r);if(!e){if(s&&_t(kp,i))return Reflect.get(kp,i,o);if(i==="hasOwnProperty")return aC}const l=Reflect.get(r,i,o);return(hs(i)?xp.has(i):nC(i))||(e||Pn(r,"get",i),t)?l:mn(l)?s&&Wu(i)?l:l.value:Rt(l)?e?ec(l):Dn(l):l}}const lC=Sp(),uC=Sp(!0);function Sp(e=!1){return function(n,r,i,o){let s=n[r];if(go(s)&&mn(s)&&!mn(i))return!1;if(!e&&(!Ga(i)&&!go(i)&&(s=kt(s),i=kt(i)),!Qe(n)&&mn(s)&&!mn(i)))return s.value=i,!0;const l=Qe(n)&&Wu(r)?Number(r)e,Ua=e=>Reflect.getPrototypeOf(e);function Wa(e,t,n=!1,r=!1){e=e.__v_raw;const i=kt(e),o=kt(t);n||(t!==o&&Pn(i,"get",t),Pn(i,"get",o));const{has:s}=Ua(i),l=r?Zu:n?nc:ys;if(s.call(i,t))return l(e.get(t));if(s.call(i,o))return l(e.get(o));e!==i&&e.get(t)}function Ka(e,t=!1){const n=this.__v_raw,r=kt(n),i=kt(e);return t||(e!==i&&Pn(r,"has",e),Pn(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function Va(e,t=!1){return e=e.__v_raw,!t&&Pn(kt(e),"iterate",Ei),Reflect.get(e,"size",e)}function Ep(e){e=kt(e);const t=kt(this);return Ua(t).has.call(t,e)||(t.add(e),Ur(t,"add",e,e)),this}function Op(e,t){t=kt(t);const n=kt(this),{has:r,get:i}=Ua(n);let o=r.call(n,e);o||(e=kt(e),o=r.call(n,e));const s=i.call(n,e);return n.set(e,t),o?ms(t,s)&&Ur(n,"set",e,t):Ur(n,"add",e,t),this}function Lp(e){const t=kt(this),{has:n,get:r}=Ua(t);let i=n.call(t,e);i||(e=kt(e),i=n.call(t,e)),r&&r.call(t,e);const o=t.delete(e);return i&&Ur(t,"delete",e,void 0),o}function Ip(){const e=kt(this),t=e.size!==0,n=e.clear();return t&&Ur(e,"clear",void 0,void 0),n}function qa(e,t){return function(r,i){const o=this,s=o.__v_raw,l=kt(s),c=t?Zu:e?nc:ys;return!e&&Pn(l,"iterate",Ei),s.forEach((d,h)=>r.call(i,c(d),c(h),o))}}function za(e,t,n){return function(...r){const i=this.__v_raw,o=kt(i),s=lo(o),l=e==="entries"||e===Symbol.iterator&&s,c=e==="keys"&&s,d=i[e](...r),h=n?Zu:t?nc:ys;return!t&&Pn(o,"iterate",c?Gu:Ei),{next(){const{value:p,done:C}=d.next();return C?{value:p,done:C}:{value:l?[h(p[0]),h(p[1])]:h(p),done:C}},[Symbol.iterator](){return this}}}}function ui(e){return function(...t){return e==="delete"?!1:this}}function gC(){const e={get(o){return Wa(this,o)},get size(){return Va(this)},has:Ka,add:Ep,set:Op,delete:Lp,clear:Ip,forEach:qa(!1,!1)},t={get(o){return Wa(this,o,!1,!0)},get size(){return Va(this)},has:Ka,add:Ep,set:Op,delete:Lp,clear:Ip,forEach:qa(!1,!0)},n={get(o){return Wa(this,o,!0)},get size(){return Va(this,!0)},has(o){return Ka.call(this,o,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:qa(!0,!1)},r={get(o){return Wa(this,o,!0,!0)},get size(){return Va(this,!0)},has(o){return Ka.call(this,o,!0)},add:ui("add"),set:ui("set"),delete:ui("delete"),clear:ui("clear"),forEach:qa(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=za(o,!1,!1),n[o]=za(o,!0,!1),t[o]=za(o,!1,!0),r[o]=za(o,!0,!0)}),[e,n,t,r]}const[mC,vC,yC,bC]=gC();function Qu(e,t){const n=t?e?bC:yC:e?vC:mC;return(r,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?r:Reflect.get(_t(n,i)&&i in r?n:r,i,o)}const CC={get:Qu(!1,!1)},_C={get:Qu(!1,!0)},wC={get:Qu(!0,!1)},Pp=new WeakMap,Dp=new WeakMap,Rp=new WeakMap,TC=new WeakMap;function xC(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function kC(e){return e.__v_skip||!Object.isExtensible(e)?0:xC(zb(e))}function Dn(e){return go(e)?e:tc(e,!1,Ap,CC,Pp)}function SC(e){return tc(e,!1,hC,_C,Dp)}function ec(e){return tc(e,!0,pC,wC,Rp)}function tc(e,t,n,r,i){if(!Rt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=i.get(e);if(o)return o;const s=kC(e);if(s===0)return e;const l=new Proxy(e,s===2?r:n);return i.set(e,l),l}function ho(e){return go(e)?ho(e.__v_raw):!!(e&&e.__v_isReactive)}function go(e){return!!(e&&e.__v_isReadonly)}function Ga(e){return!!(e&&e.__v_isShallow)}function Np(e){return ho(e)||go(e)}function kt(e){const t=e&&e.__v_raw;return t?kt(t):e}function Mp(e){return Ha(e,"__v_skip",!0),e}const ys=e=>Rt(e)?Dn(e):e,nc=e=>Rt(e)?ec(e):e;function Fp(e){li&&vr&&(e=kt(e),wp(e.dep||(e.dep=Vu())))}function $p(e,t){e=kt(e);const n=e.dep;n&&Xu(n)}function mn(e){return!!(e&&e.__v_isRef===!0)}function Et(e){return Bp(e,!1)}function AC(e){return Bp(e,!0)}function Bp(e,t){return mn(e)?e:new EC(e,t)}class EC{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:kt(t),this._value=n?t:ys(t)}get value(){return Fp(this),this._value}set value(t){const n=this.__v_isShallow||Ga(t)||go(t);t=n?t:kt(t),ms(t,this._rawValue)&&(this._rawValue=t,this._value=n?t:ys(t),$p(this))}}function Hp(e){return mn(e)?e.value:e}const OC={get:(e,t,n)=>Hp(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const i=e[t];return mn(i)&&!mn(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function jp(e){return ho(e)?e:new Proxy(e,OC)}var Up;class LC{constructor(t,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[Up]=!1,this._dirty=!0,this.effect=new Yu(t,()=>{this._dirty||(this._dirty=!0,$p(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const t=kt(this);return Fp(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}Up="__v_isReadonly";function IC(e,t,n=!1){let r,i;const o=pt(e);return o?(r=e,i=mr):(r=e.get,i=e.set),new LC(r,i,o||!i,n)}function e3(e,...t){}function ci(e,t,n,r){let i;try{i=r?e(...r):e()}catch(o){Ya(o,t,n)}return i}function yr(e,t,n,r){if(pt(e)){const o=ci(e,t,n,r);return o&&pp(o)&&o.catch(s=>{Ya(s,t,n)}),o}const i=[];for(let o=0;o>>1;Cs(vn[r])Er&&vn.splice(t,1)}function NC(e){Qe(e)?mo.push(...e):(!Wr||!Wr.includes(e,e.allowRecurse?Oi+1:Oi))&&mo.push(e),Kp()}function Vp(e,t=bs?Er+1:0){for(;tCs(n)-Cs(r)),Oi=0;Oie.id==null?1/0:e.id,MC=(e,t)=>{const n=Cs(e)-Cs(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function zp(e){rc=!1,bs=!0,vn.sort(MC);const t=mr;try{for(Er=0;Erzt(y)?y.trim():y)),p&&(i=n.map(ja))}let l,c=r[l=Ku(t)]||r[l=Ku(Ar(t))];!c&&o&&(c=r[l=Ku(co(t))]),c&&yr(c,e,6,i);const d=r[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,yr(d,e,6,i)}}function Gp(e,t,n=!1){const r=t.emitsCache,i=r.get(e);if(i!==void 0)return i;const o=e.emits;let s={},l=!1;if(!pt(e)){const c=d=>{const h=Gp(d,t,!0);h&&(l=!0,kn(s,h))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(Rt(e)&&r.set(e,null),null):(Qe(o)?o.forEach(c=>s[c]=null):kn(s,o),Rt(e)&&r.set(e,s),s)}function Ja(e,t){return!e||!Na(t)?!1:(t=t.slice(2).replace(/Once$/,""),_t(e,t[0].toLowerCase()+t.slice(1))||_t(e,co(t))||_t(e,t))}let dn=null,Za=null;function Qa(e){const t=dn;return dn=e,Za=e&&e.type.__scopeId||null,t}function vo(e){Za=e}function yo(){Za=null}function sc(e,t=dn,n){if(!t||e._n)return e;const r=(...i)=>{r._d&&_h(-1);const o=Qa(t);let s;try{s=e(...i)}finally{Qa(o),r._d&&_h(1)}return s};return r._n=!0,r._c=!0,r._d=!0,r}function t3(){}function ac(e){const{type:t,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[s],slots:l,attrs:c,emit:d,render:h,renderCache:p,data:C,setupState:y,ctx:w,inheritAttrs:T}=e;let E,I;const P=Qa(e);try{if(n.shapeFlag&4){const L=i||r;E=Or(h.call(L,L,p,o,y,C,w)),I=c}else{const L=t;E=Or(L.length>1?L(o,{attrs:c,slots:l,emit:d}):L(o,null)),I=t.props?c:$C(c)}}catch(L){xs.length=0,Ya(L,e,1),E=xe(fi)}let j=E;if(I&&T!==!1){const L=Object.keys(I),{shapeFlag:we}=j;L.length&&we&7&&(s&&L.some(ju)&&(I=BC(I,s)),j=Co(j,I))}return n.dirs&&(j=Co(j),j.dirs=j.dirs?j.dirs.concat(n.dirs):n.dirs),n.transition&&(j.transition=n.transition),E=j,Qa(P),E}const $C=e=>{let t;for(const n in e)(n==="class"||n==="style"||Na(n))&&((t||(t={}))[n]=e[n]);return t},BC=(e,t)=>{const n={};for(const r in e)(!ju(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function HC(e,t,n){const{props:r,children:i,component:o}=e,{props:s,children:l,patchFlag:c}=t,d=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Yp(r,s,d):!!s;if(c&8){const h=t.dynamicProps;for(let p=0;pe.__isSuspense;function WC(e,t){t&&t.pendingBranch?Qe(e)?t.effects.push(...e):t.effects.push(e):NC(e)}function Xp(e,t){if(Gt){let n=Gt.provides;const r=Gt.parent&&Gt.parent.provides;r===n&&(n=Gt.provides=Object.create(r)),n[e]=t}}function bo(e,t,n=!1){const r=Gt||dn;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&e in i)return i[e];if(arguments.length>1)return n&&pt(t)?t.call(r.proxy):t}}const el={};function rr(e,t,n){return Jp(e,t,n)}function Jp(e,t,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:s}=Dt){const l=vp()===(Gt==null?void 0:Gt.scope)?Gt:null;let c,d=!1,h=!1;if(mn(e)?(c=()=>e.value,d=Ga(e)):ho(e)?(c=()=>e,r=!0):Qe(e)?(h=!0,d=e.some(j=>ho(j)||Ga(j)),c=()=>e.map(j=>{if(mn(j))return j.value;if(ho(j))return Li(j);if(pt(j))return ci(j,l,2)})):pt(e)?t?c=()=>ci(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return p&&p(),yr(e,l,3,[C])}:c=mr,t&&r){const j=c;c=()=>Li(j())}let p,C=j=>{p=I.onStop=()=>{ci(j,l,4)}},y;if(As)if(C=mr,t?n&&yr(t,l,3,[c(),h?[]:void 0,C]):c(),i==="sync"){const j=F_();y=j.__watcherHandles||(j.__watcherHandles=[])}else return mr;let w=h?new Array(e.length).fill(el):el;const T=()=>{if(I.active)if(t){const j=I.run();(r||d||(h?j.some((L,we)=>ms(L,w[we])):ms(j,w)))&&(p&&p(),yr(t,l,3,[j,w===el?void 0:h&&w[0]===el?[]:w,C]),w=j)}else I.run()};T.allowRecurse=!!t;let E;i==="sync"?E=T:i==="post"?E=()=>Nn(T,l&&l.suspense):(T.pre=!0,l&&(T.id=l.uid),E=()=>oc(T));const I=new Yu(c,E);t?n?T():w=I.run():i==="post"?Nn(I.run.bind(I),l&&l.suspense):I.run();const P=()=>{I.stop(),l&&l.scope&&Uu(l.scope.effects,I)};return y&&y.push(P),P}function KC(e,t,n){const r=this.proxy,i=zt(e)?e.includes(".")?Zp(r,e):()=>r[e]:e.bind(r,r);let o;pt(t)?o=t:(o=t.handler,n=t);const s=Gt;_o(this);const l=Jp(i,o.bind(r),n);return s?_o(s):Ri(),l}function Zp(e,t){const n=t.split(".");return()=>{let r=e;for(let i=0;i{Li(n,t)});else if(gp(e))for(const n in e)Li(e[n],t);return e}function Rn(e){return pt(e)?{setup:e,name:e.name}:e}const _s=e=>!!e.type.__asyncLoader,Qp=e=>e.type.__isKeepAlive;function VC(e,t){eh(e,"a",t)}function qC(e,t){eh(e,"da",t)}function eh(e,t,n=Gt){const r=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(tl(t,r,n),n){let i=n.parent;for(;i&&i.parent;)Qp(i.parent.vnode)&&zC(r,t,n,i),i=i.parent}}function zC(e,t,n,r){const i=tl(t,e,r,!0);th(()=>{Uu(r[t],i)},n)}function tl(e,t,n=Gt,r=!1){if(n){const i=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...s)=>{if(n.isUnmounted)return;fo(),_o(n);const l=yr(t,n,e,s);return Ri(),po(),l});return r?i.unshift(o):i.push(o),o}}const Kr=e=>(t,n=Gt)=>(!As||e==="sp")&&tl(e,(...r)=>t(...r),n),GC=Kr("bm"),lc=Kr("m"),YC=Kr("bu"),XC=Kr("u"),JC=Kr("bum"),th=Kr("um"),ZC=Kr("sp"),QC=Kr("rtg"),e_=Kr("rtc");function t_(e,t=Gt){tl("ec",e,t)}function be(e,t){const n=dn;if(n===null)return e;const r=ul(n)||n.proxy,i=e.dirs||(e.dirs=[]);for(let o=0;ot(s,l,void 0,o&&o[l]));else{const s=Object.keys(e);i=new Array(s.length);for(let l=0,c=s.length;lTh(t)?!(t.type===fi||t.type===He&&!oh(t.children)):!0)?e:null}const fc=e=>e?Sh(e)?ul(e)||e.proxy:fc(e.parent):null,ws=kn(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>fc(e.parent),$root:e=>fc(e.root),$emit:e=>e.emit,$options:e=>hc(e),$forceUpdate:e=>e.f||(e.f=()=>oc(e.update)),$nextTick:e=>e.n||(e.n=Xa.bind(e.proxy)),$watch:e=>KC.bind(e)}),dc=(e,t)=>e!==Dt&&!e.__isScriptSetup&&_t(e,t),i_={get({_:e},t){const{ctx:n,setupState:r,data:i,props:o,accessCache:s,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const y=s[t];if(y!==void 0)switch(y){case 1:return r[t];case 2:return i[t];case 4:return n[t];case 3:return o[t]}else{if(dc(r,t))return s[t]=1,r[t];if(i!==Dt&&_t(i,t))return s[t]=2,i[t];if((d=e.propsOptions[0])&&_t(d,t))return s[t]=3,o[t];if(n!==Dt&&_t(n,t))return s[t]=4,n[t];pc&&(s[t]=0)}}const h=ws[t];let p,C;if(h)return t==="$attrs"&&Pn(e,"get",t),h(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==Dt&&_t(n,t))return s[t]=4,n[t];if(C=c.config.globalProperties,_t(C,t))return C[t]},set({_:e},t,n){const{data:r,setupState:i,ctx:o}=e;return dc(i,t)?(i[t]=n,!0):r!==Dt&&_t(r,t)?(r[t]=n,!0):_t(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:o}},s){let l;return!!n[s]||e!==Dt&&_t(e,s)||dc(t,s)||(l=o[0])&&_t(l,s)||_t(r,s)||_t(ws,s)||_t(i.config.globalProperties,s)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_t(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};let pc=!0;function o_(e){const t=hc(e),n=e.proxy,r=e.ctx;pc=!1,t.beforeCreate&&sh(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:s,watch:l,provide:c,inject:d,created:h,beforeMount:p,mounted:C,beforeUpdate:y,updated:w,activated:T,deactivated:E,beforeDestroy:I,beforeUnmount:P,destroyed:j,unmounted:L,render:we,renderTracked:m,renderTriggered:ue,errorCaptured:D,serverPrefetch:S,expose:R,inheritAttrs:U,components:ee,directives:J,filters:ye}=t;if(d&&s_(d,r,null,e.appContext.config.unwrapInjectedRef),s)for(const z in s){const ie=s[z];pt(ie)&&(r[z]=ie.bind(n))}if(i){const z=i.call(n,n);Rt(z)&&(e.data=Dn(z))}if(pc=!0,o)for(const z in o){const ie=o[z],fe=pt(ie)?ie.bind(n,n):pt(ie.get)?ie.get.bind(n,n):mr,nt=!pt(ie)&&pt(ie.set)?ie.set.bind(n):mr,Ve=tn({get:fe,set:nt});Object.defineProperty(r,z,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:ne=>Ve.value=ne})}if(l)for(const z in l)ah(l[z],r,n,z);if(c){const z=pt(c)?c.call(n):c;Reflect.ownKeys(z).forEach(ie=>{Xp(ie,z[ie])})}h&&sh(h,e,"c");function Ne(z,ie){Qe(ie)?ie.forEach(fe=>z(fe.bind(n))):ie&&z(ie.bind(n))}if(Ne(GC,p),Ne(lc,C),Ne(YC,y),Ne(XC,w),Ne(VC,T),Ne(qC,E),Ne(t_,D),Ne(e_,m),Ne(QC,ue),Ne(JC,P),Ne(th,L),Ne(ZC,S),Qe(R))if(R.length){const z=e.exposed||(e.exposed={});R.forEach(ie=>{Object.defineProperty(z,ie,{get:()=>n[ie],set:fe=>n[ie]=fe})})}else e.exposed||(e.exposed={});we&&e.render===mr&&(e.render=we),U!=null&&(e.inheritAttrs=U),ee&&(e.components=ee),J&&(e.directives=J)}function s_(e,t,n=mr,r=!1){Qe(e)&&(e=gc(e));for(const i in e){const o=e[i];let s;Rt(o)?"default"in o?s=bo(o.from||i,o.default,!0):s=bo(o.from||i):s=bo(o),mn(s)&&r?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>s.value,set:l=>s.value=l}):t[i]=s}}function sh(e,t,n){yr(Qe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function ah(e,t,n,r){const i=r.includes(".")?Zp(n,r):()=>n[r];if(zt(e)){const o=t[e];pt(o)&&rr(i,o)}else if(pt(e))rr(i,e.bind(n));else if(Rt(e))if(Qe(e))e.forEach(o=>ah(o,t,n,r));else{const o=pt(e.handler)?e.handler.bind(n):t[e.handler];pt(o)&&rr(i,o,e)}}function hc(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:s}}=e.appContext,l=o.get(t);let c;return l?c=l:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(d=>rl(c,d,s,!0)),rl(c,t,s)),Rt(t)&&o.set(t,c),c}function rl(e,t,n,r=!1){const{mixins:i,extends:o}=t;o&&rl(e,o,n,!0),i&&i.forEach(s=>rl(e,s,n,!0));for(const s in t)if(!(r&&s==="expose")){const l=a_[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const a_={data:lh,props:Pi,emits:Pi,methods:Pi,computed:Pi,beforeCreate:Sn,created:Sn,beforeMount:Sn,mounted:Sn,beforeUpdate:Sn,updated:Sn,beforeDestroy:Sn,beforeUnmount:Sn,destroyed:Sn,unmounted:Sn,activated:Sn,deactivated:Sn,errorCaptured:Sn,serverPrefetch:Sn,components:Pi,directives:Pi,watch:u_,provide:lh,inject:l_};function lh(e,t){return t?e?function(){return kn(pt(e)?e.call(this,this):e,pt(t)?t.call(this,this):t)}:t:e}function l_(e,t){return Pi(gc(e),gc(t))}function gc(e){if(Qe(e)){const t={};for(let n=0;n0)&&!(s&16)){if(s&8){const h=e.vnode.dynamicProps;for(let p=0;p{c=!0;const[C,y]=ch(p,t,!0);kn(s,C),y&&l.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!o&&!c)return Rt(e)&&r.set(e,ao),ao;if(Qe(o))for(let h=0;h-1,y[1]=T<0||w-1||_t(y,"default"))&&l.push(p)}}}const d=[s,l];return Rt(e)&&r.set(e,d),d}function fh(e){return e[0]!=="$"}function dh(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:e===null?"null":""}function ph(e,t){return dh(e)===dh(t)}function hh(e,t){return Qe(t)?t.findIndex(n=>ph(n,e)):pt(t)&&ph(t,e)?0:-1}const gh=e=>e[0]==="_"||e==="$stable",vc=e=>Qe(e)?e.map(Or):[Or(e)],d_=(e,t,n)=>{if(t._n)return t;const r=sc((...i)=>vc(t(...i)),n);return r._c=!1,r},mh=(e,t,n)=>{const r=e._ctx;for(const i in e){if(gh(i))continue;const o=e[i];if(pt(o))t[i]=d_(i,o,r);else if(o!=null){const s=vc(o);t[i]=()=>s}}},vh=(e,t)=>{const n=vc(t);e.slots.default=()=>n},p_=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=kt(t),Ha(t,"_",n)):mh(t,e.slots={})}else e.slots={},t&&vh(e,t);Ha(e.slots,sl,1)},h_=(e,t,n)=>{const{vnode:r,slots:i}=e;let o=!0,s=Dt;if(r.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:(kn(i,t),!n&&l===1&&delete i._):(o=!t.$stable,mh(t,i)),s=t}else t&&(vh(e,t),s={default:1});if(o)for(const l in i)!gh(l)&&!(l in s)&&delete i[l]};function yh(){return{app:null,config:{isNativeTag:Kb,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let g_=0;function m_(e,t){return function(r,i=null){pt(r)||(r=Object.assign({},r)),i!=null&&!Rt(i)&&(i=null);const o=yh(),s=new Set;let l=!1;const c=o.app={_uid:g_++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:$_,get config(){return o.config},set config(d){},use(d,...h){return s.has(d)||(d&&pt(d.install)?(s.add(d),d.install(c,...h)):pt(d)&&(s.add(d),d(c,...h))),c},mixin(d){return o.mixins.includes(d)||o.mixins.push(d),c},component(d,h){return h?(o.components[d]=h,c):o.components[d]},directive(d,h){return h?(o.directives[d]=h,c):o.directives[d]},mount(d,h,p){if(!l){const C=xe(r,i);return C.appContext=o,h&&t?t(C,d):e(C,d,p),l=!0,c._container=d,d.__vue_app__=c,ul(C.component)||C.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(d,h){return o.provides[d]=h,c}};return c}}function yc(e,t,n,r,i=!1){if(Qe(e)){e.forEach((C,y)=>yc(C,t&&(Qe(t)?t[y]:t),n,r,i));return}if(_s(r)&&!i)return;const o=r.shapeFlag&4?ul(r.component)||r.component.proxy:r.el,s=i?null:o,{i:l,r:c}=e,d=t&&t.r,h=l.refs===Dt?l.refs={}:l.refs,p=l.setupState;if(d!=null&&d!==c&&(zt(d)?(h[d]=null,_t(p,d)&&(p[d]=null)):mn(d)&&(d.value=null)),pt(c))ci(c,l,12,[s,h]);else{const C=zt(c),y=mn(c);if(C||y){const w=()=>{if(e.f){const T=C?_t(p,c)?p[c]:h[c]:c.value;i?Qe(T)&&Uu(T,o):Qe(T)?T.includes(o)||T.push(o):C?(h[c]=[o],_t(p,c)&&(p[c]=h[c])):(c.value=[o],e.k&&(h[e.k]=c.value))}else C?(h[c]=s,_t(p,c)&&(p[c]=s)):y&&(c.value=s,e.k&&(h[e.k]=s))};s?(w.id=-1,Nn(w,n)):w()}}}const Nn=WC;function v_(e){return y_(e)}function y_(e,t){const n=Xb();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:s,createText:l,createComment:c,setText:d,setElementText:h,parentNode:p,nextSibling:C,setScopeId:y=mr,insertStaticContent:w}=e,T=(N,$,G,te=null,K=null,X=null,Ce=!1,de=null,ve=!!$.dynamicChildren)=>{if(N===$)return;N&&!Ss(N,$)&&(te=Be(N),ne(N,K,X,!0),N=null),$.patchFlag===-2&&(ve=!1,$.dynamicChildren=null);const{type:se,ref:ke,shapeFlag:_e}=$;switch(se){case ol:E(N,$,G,te);break;case fi:I(N,$,G,te);break;case _c:N==null&&P($,G,te,Ce);break;case He:ee(N,$,G,te,K,X,Ce,de,ve);break;default:_e&1?we(N,$,G,te,K,X,Ce,de,ve):_e&6?J(N,$,G,te,K,X,Ce,de,ve):(_e&64||_e&128)&&se.process(N,$,G,te,K,X,Ce,de,ve,Le)}ke!=null&&K&&yc(ke,N&&N.ref,X,$||N,!$)},E=(N,$,G,te)=>{if(N==null)r($.el=l($.children),G,te);else{const K=$.el=N.el;$.children!==N.children&&d(K,$.children)}},I=(N,$,G,te)=>{N==null?r($.el=c($.children||""),G,te):$.el=N.el},P=(N,$,G,te)=>{[N.el,N.anchor]=w(N.children,$,G,te,N.el,N.anchor)},j=({el:N,anchor:$},G,te)=>{let K;for(;N&&N!==$;)K=C(N),r(N,G,te),N=K;r($,G,te)},L=({el:N,anchor:$})=>{let G;for(;N&&N!==$;)G=C(N),i(N),N=G;i($)},we=(N,$,G,te,K,X,Ce,de,ve)=>{Ce=Ce||$.type==="svg",N==null?m($,G,te,K,X,Ce,de,ve):S(N,$,K,X,Ce,de,ve)},m=(N,$,G,te,K,X,Ce,de)=>{let ve,se;const{type:ke,props:_e,shapeFlag:Me,transition:Se,dirs:qe}=N;if(ve=N.el=s(N.type,X,_e&&_e.is,_e),Me&8?h(ve,N.children):Me&16&&D(N.children,ve,null,te,K,X&&ke!=="foreignObject",Ce,de),qe&&Ii(N,null,te,"created"),ue(ve,N,N.scopeId,Ce,te),_e){for(const at in _e)at!=="value"&&!Ma(at)&&o(ve,at,null,_e[at],X,N.children,te,K,Oe);"value"in _e&&o(ve,"value",null,_e.value),(se=_e.onVnodeBeforeMount)&&Lr(se,te,N)}qe&&Ii(N,null,te,"beforeMount");const ft=(!K||K&&!K.pendingBranch)&&Se&&!Se.persisted;ft&&Se.beforeEnter(ve),r(ve,$,G),((se=_e&&_e.onVnodeMounted)||ft||qe)&&Nn(()=>{se&&Lr(se,te,N),ft&&Se.enter(ve),qe&&Ii(N,null,te,"mounted")},K)},ue=(N,$,G,te,K)=>{if(G&&y(N,G),te)for(let X=0;X{for(let se=ve;se{const de=$.el=N.el;let{patchFlag:ve,dynamicChildren:se,dirs:ke}=$;ve|=N.patchFlag&16;const _e=N.props||Dt,Me=$.props||Dt;let Se;G&&Di(G,!1),(Se=Me.onVnodeBeforeUpdate)&&Lr(Se,G,$,N),ke&&Ii($,N,G,"beforeUpdate"),G&&Di(G,!0);const qe=K&&$.type!=="foreignObject";if(se?R(N.dynamicChildren,se,de,G,te,qe,X):Ce||ie(N,$,de,null,G,te,qe,X,!1),ve>0){if(ve&16)U(de,$,_e,Me,G,te,K);else if(ve&2&&_e.class!==Me.class&&o(de,"class",null,Me.class,K),ve&4&&o(de,"style",_e.style,Me.style,K),ve&8){const ft=$.dynamicProps;for(let at=0;at{Se&&Lr(Se,G,$,N),ke&&Ii($,N,G,"updated")},te)},R=(N,$,G,te,K,X,Ce)=>{for(let de=0;de<$.length;de++){const ve=N[de],se=$[de],ke=ve.el&&(ve.type===He||!Ss(ve,se)||ve.shapeFlag&70)?p(ve.el):G;T(ve,se,ke,null,te,K,X,Ce,!0)}},U=(N,$,G,te,K,X,Ce)=>{if(G!==te){if(G!==Dt)for(const de in G)!Ma(de)&&!(de in te)&&o(N,de,G[de],null,Ce,$.children,K,X,Oe);for(const de in te){if(Ma(de))continue;const ve=te[de],se=G[de];ve!==se&&de!=="value"&&o(N,de,se,ve,Ce,$.children,K,X,Oe)}"value"in te&&o(N,"value",G.value,te.value)}},ee=(N,$,G,te,K,X,Ce,de,ve)=>{const se=$.el=N?N.el:l(""),ke=$.anchor=N?N.anchor:l("");let{patchFlag:_e,dynamicChildren:Me,slotScopeIds:Se}=$;Se&&(de=de?de.concat(Se):Se),N==null?(r(se,G,te),r(ke,G,te),D($.children,G,ke,K,X,Ce,de,ve)):_e>0&&_e&64&&Me&&N.dynamicChildren?(R(N.dynamicChildren,Me,G,K,X,Ce,de),($.key!=null||K&&$===K.subTree)&&bc(N,$,!0)):ie(N,$,G,ke,K,X,Ce,de,ve)},J=(N,$,G,te,K,X,Ce,de,ve)=>{$.slotScopeIds=de,N==null?$.shapeFlag&512?K.ctx.activate($,G,te,Ce,ve):ye($,G,te,K,X,Ce,ve):je(N,$,ve)},ye=(N,$,G,te,K,X,Ce)=>{const de=N.component=O_(N,te,K);if(Qp(N)&&(de.ctx.renderer=Le),L_(de),de.asyncDep){if(K&&K.registerDep(de,Ne),!N.el){const ve=de.subTree=xe(fi);I(null,ve,$,G)}return}Ne(de,N,$,G,K,X,Ce)},je=(N,$,G)=>{const te=$.component=N.component;if(HC(N,$,G))if(te.asyncDep&&!te.asyncResolved){z(te,$,G);return}else te.next=$,RC(te.update),te.update();else $.el=N.el,te.vnode=$},Ne=(N,$,G,te,K,X,Ce)=>{const de=()=>{if(N.isMounted){let{next:ke,bu:_e,u:Me,parent:Se,vnode:qe}=N,ft=ke,at;Di(N,!1),ke?(ke.el=qe.el,z(N,ke,Ce)):ke=qe,_e&&Ba(_e),(at=ke.props&&ke.props.onVnodeBeforeUpdate)&&Lr(at,Se,ke,qe),Di(N,!0);const Ct=ac(N),Ft=N.subTree;N.subTree=Ct,T(Ft,Ct,p(Ft.el),Be(Ft),N,K,X),ke.el=Ct.el,ft===null&&jC(N,Ct.el),Me&&Nn(Me,K),(at=ke.props&&ke.props.onVnodeUpdated)&&Nn(()=>Lr(at,Se,ke,qe),K)}else{let ke;const{el:_e,props:Me}=$,{bm:Se,m:qe,parent:ft}=N,at=_s($);if(Di(N,!1),Se&&Ba(Se),!at&&(ke=Me&&Me.onVnodeBeforeMount)&&Lr(ke,ft,$),Di(N,!0),_e&&mt){const Ct=()=>{N.subTree=ac(N),mt(_e,N.subTree,N,K,null)};at?$.type.__asyncLoader().then(()=>!N.isUnmounted&&Ct()):Ct()}else{const Ct=N.subTree=ac(N);T(null,Ct,G,te,N,K,X),$.el=Ct.el}if(qe&&Nn(qe,K),!at&&(ke=Me&&Me.onVnodeMounted)){const Ct=$;Nn(()=>Lr(ke,ft,Ct),K)}($.shapeFlag&256||ft&&_s(ft.vnode)&&ft.vnode.shapeFlag&256)&&N.a&&Nn(N.a,K),N.isMounted=!0,$=G=te=null}},ve=N.effect=new Yu(de,()=>oc(se),N.scope),se=N.update=()=>ve.run();se.id=N.uid,Di(N,!0),se()},z=(N,$,G)=>{$.component=N;const te=N.vnode.props;N.vnode=$,N.next=null,f_(N,$.props,te,G),h_(N,$.children,G),fo(),Vp(),po()},ie=(N,$,G,te,K,X,Ce,de,ve=!1)=>{const se=N&&N.children,ke=N?N.shapeFlag:0,_e=$.children,{patchFlag:Me,shapeFlag:Se}=$;if(Me>0){if(Me&128){nt(se,_e,G,te,K,X,Ce,de,ve);return}else if(Me&256){fe(se,_e,G,te,K,X,Ce,de,ve);return}}Se&8?(ke&16&&Oe(se,K,X),_e!==se&&h(G,_e)):ke&16?Se&16?nt(se,_e,G,te,K,X,Ce,de,ve):Oe(se,K,X,!0):(ke&8&&h(G,""),Se&16&&D(_e,G,te,K,X,Ce,de,ve))},fe=(N,$,G,te,K,X,Ce,de,ve)=>{N=N||ao,$=$||ao;const se=N.length,ke=$.length,_e=Math.min(se,ke);let Me;for(Me=0;Me<_e;Me++){const Se=$[Me]=ve?di($[Me]):Or($[Me]);T(N[Me],Se,G,null,K,X,Ce,de,ve)}se>ke?Oe(N,K,X,!0,!1,_e):D($,G,te,K,X,Ce,de,ve,_e)},nt=(N,$,G,te,K,X,Ce,de,ve)=>{let se=0;const ke=$.length;let _e=N.length-1,Me=ke-1;for(;se<=_e&&se<=Me;){const Se=N[se],qe=$[se]=ve?di($[se]):Or($[se]);if(Ss(Se,qe))T(Se,qe,G,null,K,X,Ce,de,ve);else break;se++}for(;se<=_e&&se<=Me;){const Se=N[_e],qe=$[Me]=ve?di($[Me]):Or($[Me]);if(Ss(Se,qe))T(Se,qe,G,null,K,X,Ce,de,ve);else break;_e--,Me--}if(se>_e){if(se<=Me){const Se=Me+1,qe=SeMe)for(;se<=_e;)ne(N[se],K,X,!0),se++;else{const Se=se,qe=se,ft=new Map;for(se=qe;se<=Me;se++){const De=$[se]=ve?di($[se]):Or($[se]);De.key!=null&&ft.set(De.key,se)}let at,Ct=0;const Ft=Me-qe+1;let an=!1,Ht=0;const fn=new Array(Ft);for(se=0;se=Ft){ne(De,K,X,!0);continue}let Fe;if(De.key!=null)Fe=ft.get(De.key);else for(at=qe;at<=Me;at++)if(fn[at-qe]===0&&Ss(De,$[at])){Fe=at;break}Fe===void 0?ne(De,K,X,!0):(fn[Fe-qe]=se+1,Fe>=Ht?Ht=Fe:an=!0,T(De,$[Fe],G,null,K,X,Ce,de,ve),Ct++)}const Q=an?b_(fn):ao;for(at=Q.length-1,se=Ft-1;se>=0;se--){const De=qe+se,Fe=$[De],it=De+1{const{el:X,type:Ce,transition:de,children:ve,shapeFlag:se}=N;if(se&6){Ve(N.component.subTree,$,G,te);return}if(se&128){N.suspense.move($,G,te);return}if(se&64){Ce.move(N,$,G,Le);return}if(Ce===He){r(X,$,G);for(let _e=0;_ede.enter(X),K);else{const{leave:_e,delayLeave:Me,afterLeave:Se}=de,qe=()=>r(X,$,G),ft=()=>{_e(X,()=>{qe(),Se&&Se()})};Me?Me(X,qe,ft):ft()}else r(X,$,G)},ne=(N,$,G,te=!1,K=!1)=>{const{type:X,props:Ce,ref:de,children:ve,dynamicChildren:se,shapeFlag:ke,patchFlag:_e,dirs:Me}=N;if(de!=null&&yc(de,null,G,N,!0),ke&256){$.ctx.deactivate(N);return}const Se=ke&1&&Me,qe=!_s(N);let ft;if(qe&&(ft=Ce&&Ce.onVnodeBeforeUnmount)&&Lr(ft,$,N),ke&6)Ae(N.component,G,te);else{if(ke&128){N.suspense.unmount(G,te);return}Se&&Ii(N,null,$,"beforeUnmount"),ke&64?N.type.remove(N,$,G,K,Le,te):se&&(X!==He||_e>0&&_e&64)?Oe(se,$,G,!1,!0):(X===He&&_e&384||!K&&ke&16)&&Oe(ve,$,G),te&&me(N)}(qe&&(ft=Ce&&Ce.onVnodeUnmounted)||Se)&&Nn(()=>{ft&&Lr(ft,$,N),Se&&Ii(N,null,$,"unmounted")},G)},me=N=>{const{type:$,el:G,anchor:te,transition:K}=N;if($===He){Te(G,te);return}if($===_c){L(N);return}const X=()=>{i(G),K&&!K.persisted&&K.afterLeave&&K.afterLeave()};if(N.shapeFlag&1&&K&&!K.persisted){const{leave:Ce,delayLeave:de}=K,ve=()=>Ce(G,X);de?de(N.el,X,ve):ve()}else X()},Te=(N,$)=>{let G;for(;N!==$;)G=C(N),i(N),N=G;i($)},Ae=(N,$,G)=>{const{bum:te,scope:K,update:X,subTree:Ce,um:de}=N;te&&Ba(te),K.stop(),X&&(X.active=!1,ne(Ce,N,$,G)),de&&Nn(de,$),Nn(()=>{N.isUnmounted=!0},$),$&&$.pendingBranch&&!$.isUnmounted&&N.asyncDep&&!N.asyncResolved&&N.suspenseId===$.pendingId&&($.deps--,$.deps===0&&$.resolve())},Oe=(N,$,G,te=!1,K=!1,X=0)=>{for(let Ce=X;CeN.shapeFlag&6?Be(N.component.subTree):N.shapeFlag&128?N.suspense.next():C(N.anchor||N.el),Xe=(N,$,G)=>{N==null?$._vnode&&ne($._vnode,null,null,!0):T($._vnode||null,N,$,null,null,null,G),Vp(),qp(),$._vnode=N},Le={p:T,um:ne,m:Ve,r:me,mt:ye,mc:D,pc:ie,pbc:R,n:Be,o:e};let rt,mt;return t&&([rt,mt]=t(Le)),{render:Xe,hydrate:rt,createApp:m_(Xe,rt)}}function Di({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function bc(e,t,n=!1){const r=e.children,i=t.children;if(Qe(r)&&Qe(i))for(let o=0;o>1,e[n[l]]0&&(t[r]=n[o-1]),n[o]=r)}}for(o=n.length,s=n[o-1];o-- >0;)n[o]=s,s=t[s];return n}const C_=e=>e.__isTeleport,Ts=e=>e&&(e.disabled||e.disabled===""),bh=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Cc=(e,t)=>{const n=e&&e.to;return zt(n)?t?t(n):null:n},__={__isTeleport:!0,process(e,t,n,r,i,o,s,l,c,d){const{mc:h,pc:p,pbc:C,o:{insert:y,querySelector:w,createText:T,createComment:E}}=d,I=Ts(t.props);let{shapeFlag:P,children:j,dynamicChildren:L}=t;if(e==null){const we=t.el=T(""),m=t.anchor=T("");y(we,n,r),y(m,n,r);const ue=t.target=Cc(t.props,w),D=t.targetAnchor=T("");ue&&(y(D,ue),s=s||bh(ue));const S=(R,U)=>{P&16&&h(j,R,U,i,o,s,l,c)};I?S(n,m):ue&&S(ue,D)}else{t.el=e.el;const we=t.anchor=e.anchor,m=t.target=e.target,ue=t.targetAnchor=e.targetAnchor,D=Ts(e.props),S=D?n:m,R=D?we:ue;if(s=s||bh(m),L?(C(e.dynamicChildren,L,S,i,o,s,l),bc(e,t,!0)):c||p(e,t,S,R,i,o,s,l,!1),I)D||il(t,n,we,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const U=t.target=Cc(t.props,w);U&&il(t,U,null,d,0)}else D&&il(t,m,ue,d,1)}Ch(t)},remove(e,t,n,r,{um:i,o:{remove:o}},s){const{shapeFlag:l,children:c,anchor:d,targetAnchor:h,target:p,props:C}=e;if(p&&o(h),(s||!Ts(C))&&(o(d),l&16))for(let y=0;y0?br||ao:null,x_(),ks>0&&br&&br.push(e),e}function H(e,t,n,r,i,o){return wh(x(e,t,n,r,i,o,!0))}function Ze(e,t,n,r,i){return wh(xe(e,t,n,r,i,!0))}function Th(e){return e?e.__v_isVNode===!0:!1}function Ss(e,t){return e.type===t.type&&e.key===t.key}const sl="__vInternal",xh=({key:e})=>e??null,al=({ref:e,ref_key:t,ref_for:n})=>e!=null?zt(e)||mn(e)||pt(e)?{i:dn,r:e,k:t,f:!!n}:e:null;function x(e,t=null,n=null,r=0,i=null,o=e===He?0:1,s=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&xh(t),ref:t&&al(t),scopeId:Za,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:dn};return l?(wc(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=zt(n)?8:16),ks>0&&!s&&br&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&br.push(c),c}const xe=k_;function k_(e,t=null,n=null,r=0,i=null,o=!1){if((!e||e===nh)&&(e=fi),Th(e)){const l=Co(e,t,!0);return n&&wc(l,n),ks>0&&!o&&br&&(l.shapeFlag&6?br[br.indexOf(e)]=l:br.push(l)),l.patchFlag|=-2,l}if(N_(e)&&(e=e.__vccOpts),t){t=S_(t);let{class:l,style:c}=t;l&&!zt(l)&&(t.class=lt(l)),Rt(c)&&(Np(c)&&!Qe(c)&&(c=kn({},c)),t.style=bt(c))}const s=zt(e)?1:UC(e)?128:C_(e)?64:Rt(e)?4:pt(e)?2:0;return x(e,t,n,r,i,s,o,!0)}function S_(e){return e?Np(e)||sl in e?kn({},e):e:null}function Co(e,t,n=!1){const{props:r,ref:i,patchFlag:o,children:s}=e,l=t?ll(r||{},t):r;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&xh(l),ref:t&&t.ref?n&&i?Qe(i)?i.concat(al(t)):[i,al(t)]:al(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==He?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Co(e.ssContent),ssFallback:e.ssFallback&&Co(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Xt(e=" ",t=0){return xe(ol,null,e,t)}function Re(e="",t=!1){return t?(O(),Ze(fi,null,e)):xe(fi,null,e)}function Or(e){return e==null||typeof e=="boolean"?xe(fi):Qe(e)?xe(He,null,e.slice()):typeof e=="object"?di(e):xe(ol,null,String(e))}function di(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Co(e)}function wc(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Qe(t))n=16;else if(typeof t=="object")if(r&65){const i=t.default;i&&(i._c&&(i._d=!1),wc(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!(sl in t)?t._ctx=dn:i===3&&dn&&(dn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else pt(t)?(t={default:t,_ctx:dn},n=32):(t=String(t),r&64?(n=16,t=[Xt(t)]):n=8);e.children=t,e.shapeFlag|=n}function ll(...e){const t={};for(let n=0;nGt||dn,_o=e=>{Gt=e,e.scope.on()},Ri=()=>{Gt&&Gt.scope.off(),Gt=null};function Sh(e){return e.vnode.shapeFlag&4}let As=!1;function L_(e,t=!1){As=t;const{props:n,children:r}=e.vnode,i=Sh(e);c_(e,n,i,t),p_(e,r);const o=i?I_(e,t):void 0;return As=!1,o}function I_(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Mp(new Proxy(e.ctx,i_));const{setup:r}=n;if(r){const i=e.setupContext=r.length>1?D_(e):null;_o(e),fo();const o=ci(r,e,0,[e.props,i]);if(po(),Ri(),pp(o)){if(o.then(Ri,Ri),t)return o.then(s=>{Ah(e,s,t)}).catch(s=>{Ya(s,e,0)});e.asyncDep=o}else Ah(e,o,t)}else Oh(e,t)}function Ah(e,t,n){pt(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Rt(t)&&(e.setupState=jp(t)),Oh(e,n)}let Eh;function Oh(e,t,n){const r=e.type;if(!e.render){if(!t&&Eh&&!r.render){const i=r.template||hc(e).template;if(i){const{isCustomElement:o,compilerOptions:s}=e.appContext.config,{delimiters:l,compilerOptions:c}=r,d=kn(kn({isCustomElement:o,delimiters:l},s),c);r.render=Eh(i,d)}}e.render=r.render||mr}_o(e),fo(),o_(e),po(),Ri()}function P_(e){return new Proxy(e.attrs,{get(t,n){return Pn(e,"get","$attrs"),t[n]}})}function D_(e){const t=r=>{e.exposed=r||{}};let n;return{get attrs(){return n||(n=P_(e))},slots:e.slots,emit:e.emit,expose:t}}function ul(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(jp(Mp(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ws)return ws[n](e)},has(t,n){return n in t||n in ws}}))}function R_(e,t=!0){return pt(e)?e.displayName||e.name:e.name||t&&e.__name}function N_(e){return pt(e)&&"__vccOpts"in e}const tn=(e,t)=>IC(e,t,As),M_=Symbol(""),F_=()=>bo(M_),$_="3.2.47",B_="http://www.w3.org/2000/svg",Ni=typeof document<"u"?document:null,Lh=Ni&&Ni.createElement("template"),H_={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const i=t?Ni.createElementNS(B_,e):Ni.createElement(e,n?{is:n}:void 0);return e==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:e=>Ni.createTextNode(e),createComment:e=>Ni.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ni.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,o){const s=n?n.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{Lh.innerHTML=r?`${e}`:e;const l=Lh.content;if(r){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function j_(e,t,n){const r=e._vtc;r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function U_(e,t,n){const r=e.style,i=zt(n);if(n&&!i){if(t&&!zt(t))for(const o in t)n[o]==null&&Tc(r,o,"");for(const o in n)Tc(r,o,n[o])}else{const o=r.display;i?t!==n&&(r.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(r.display=o)}}const Ih=/\s*!important$/;function Tc(e,t,n){if(Qe(n))n.forEach(r=>Tc(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const r=W_(e,t);Ih.test(n)?e.setProperty(co(r),n.replace(Ih,""),"important"):e[r]=n}}const Ph=["Webkit","Moz","ms"],xc={};function W_(e,t){const n=xc[t];if(n)return n;let r=Ar(t);if(r!=="filter"&&r in e)return xc[t]=r;r=$a(r);for(let i=0;ikc||(Y_.then(()=>kc=0),kc=Date.now());function J_(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;yr(Z_(r,n.value),t,5,[r])};return n.value=e,n.attached=X_(),n}function Z_(e,t){if(Qe(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(r=>i=>!i._stopped&&r&&r(i))}else return t}const Nh=/^on[a-z]/,Q_=(e,t,n,r,i=!1,o,s,l,c)=>{t==="class"?j_(e,r,i):t==="style"?U_(e,n,r):Na(t)?ju(t)||z_(e,t,n,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):e1(e,t,r,i))?V_(e,t,r,o,s,l,c):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),K_(e,t,r,i))};function e1(e,t,n,r){return r?!!(t==="innerHTML"||t==="textContent"||t in e&&Nh.test(t)&&pt(n)):t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||Nh.test(t)&&zt(n)?!1:t in e}const wo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Qe(t)?n=>Ba(t,n):t};function t1(e){e.target.composing=!0}function Mh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ir={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e._assign=wo(i);const o=r||i.props&&i.props.type==="number";pi(e,t?"change":"input",s=>{if(s.target.composing)return;let l=e.value;n&&(l=l.trim()),o&&(l=ja(l)),e._assign(l)}),n&&pi(e,"change",()=>{e.value=e.value.trim()}),t||(pi(e,"compositionstart",t1),pi(e,"compositionend",Mh),pi(e,"change",Mh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:r,number:i}},o){if(e._assign=wo(o),e.composing||document.activeElement===e&&e.type!=="range"&&(n||r&&e.value.trim()===t||(i||e.type==="number")&&ja(e.value)===t))return;const s=t??"";e.value!==s&&(e.value=s)}},Fh={deep:!0,created(e,t,n){e._assign=wo(n),pi(e,"change",()=>{const r=e._modelValue,i=Os(e),o=e.checked,s=e._assign;if(Qe(r)){const l=Hu(r,i),c=l!==-1;if(o&&!c)s(r.concat(i));else if(!o&&c){const d=[...r];d.splice(l,1),s(d)}}else if(uo(r)){const l=new Set(r);o?l.add(i):l.delete(i),s(l)}else s(Hh(e,o))})},mounted:$h,beforeUpdate(e,t,n){e._assign=wo(n),$h(e,t,n)}};function $h(e,{value:t,oldValue:n},r){e._modelValue=t,Qe(t)?e.checked=Hu(t,r.props.value)>-1:uo(t)?e.checked=t.has(r.props.value):t!==n&&(e.checked=ps(t,Hh(e,!0)))}const Es={deep:!0,created(e,{value:t,modifiers:{number:n}},r){const i=uo(t);pi(e,"change",()=>{const o=Array.prototype.filter.call(e.options,s=>s.selected).map(s=>n?ja(Os(s)):Os(s));e._assign(e.multiple?i?new Set(o):o:o[0])}),e._assign=wo(r)},mounted(e,{value:t}){Bh(e,t)},beforeUpdate(e,t,n){e._assign=wo(n)},updated(e,{value:t}){Bh(e,t)}};function Bh(e,t){const n=e.multiple;if(!(n&&!Qe(t)&&!uo(t))){for(let r=0,i=e.options.length;r-1:o.selected=t.has(s);else if(ps(Os(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Os(e){return"_value"in e?e._value:e.value}function Hh(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const n1=["ctrl","shift","alt","meta"],r1={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>n1.some(n=>e[`${n}Key`]&&!t.includes(n))},gt=(e,t)=>(n,...r)=>{for(let i=0;i{Ls(e,!1)}):Ls(e,t))},beforeUnmount(e,{value:t}){Ls(e,t)}};function Ls(e,t){e.style.display=t?e._vod:"none"}const i1=kn({patchProp:Q_},H_);let jh;function o1(){return jh||(jh=v_(i1))}const s1=(...e)=>{const t=o1().createApp(...e),{mount:n}=t;return t.mount=r=>{const i=a1(r);if(!i)return;const o=t._component;!pt(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const s=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function a1(e){return zt(e)?document.querySelector(e):e}/**! * Sortable 1.15.0 * @author RubaXa * @author owenm * @license MIT - */function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function f1(e,t){if(e==null)return{};var n=c1(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var d1="1.15.0";function qr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var zr=qr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ps=qr(/Edge/i),Wh=qr(/firefox/i),Ds=qr(/safari/i)&&!qr(/chrome/i)&&!qr(/android/i),Kh=qr(/iP(ad|od|hone)/i),Vh=qr(/chrome/i)&&qr(/android/i),qh={capture:!1,passive:!1};function St(e,t,n){e.addEventListener(t,n,!zr&&qh)}function wt(e,t,n){e.removeEventListener(t,n,!zr&&qh)}function dl(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function p1(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Pr(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&dl(e,t):dl(e,t))||r&&e===n)return e;if(e===n)break}while(e=p1(e))}return null}var zh=/\s+/g;function Vn(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(zh," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(zh," ")}}function et(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function xo(e,t){var n="";if(typeof e=="string")n=e;else do{var r=et(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Gh(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=o:s=i<=o,!s)return r;if(r===Dr())break;r=hi(r,!1)}return!1}function ko(e,t,n,r){for(var i=0,o=0,s=e.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=f1(r,_1);Ns.pluginEvent.bind(tt)(t,n,Ir({dragEl:Ee,parentEl:Kt,ghostEl:dt,rootEl:$t,nextEl:Fi,lastDownEl:pl,cloneEl:Ut,cloneHidden:gi,dragStarted:Fs,putSortable:pn,activeSortable:tt.active,originalEvent:i,oldIndex:Ao,oldDraggableIndex:Ms,newIndex:zn,newDraggableIndex:mi,hideGhostForTarget:sg,unhideGhostForTarget:ag,cloneNowHidden:function(){gi=!0},cloneNowShown:function(){gi=!1},dispatchSortableEvent:function(l){An({sortable:n,name:l,originalEvent:i})}},o))};function An(e){C1(Ir({putSortable:pn,cloneEl:Ut,targetEl:Ee,rootEl:$t,oldIndex:Ao,oldDraggableIndex:Ms,newIndex:zn,newDraggableIndex:mi},e))}var Ee,Kt,dt,$t,Fi,pl,Ut,gi,Ao,zn,Ms,mi,hl,pn,Eo=!1,gl=!1,ml=[],$i,Cr,Lc,Ic,eg,tg,Fs,Oo,$s,Bs=!1,vl=!1,yl,yn,Pc=[],Dc=!1,bl=[],Cl=typeof document<"u",_l=Kh,ng=Ps||zr?"cssFloat":"float",w1=Cl&&!Vh&&!Kh&&"draggable"in document.createElement("div"),rg=function(){if(Cl){if(zr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),ig=function(t,n){var r=et(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=ko(t,0,n),s=ko(t,1,n),l=o&&et(o),c=s&&et(s),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+nn(o).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+nn(s).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var p=l.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===p)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=i&&r[ng]==="none"||s&&r[ng]==="none"&&d+h>i)?"vertical":"horizontal"},T1=function(t,n,r){var i=r?t.left:t.top,o=r?t.right:t.bottom,s=r?t.width:t.height,l=r?n.left:n.top,c=r?n.right:n.bottom,d=r?n.width:n.height;return i===l||o===c||i+s/2===l+d/2},x1=function(t,n){var r;return ml.some(function(i){var o=i[qn].options.emptyInsertThreshold;if(!(!o||Ac(i))){var s=nn(i),l=t>=s.left-o&&t<=s.right+o,c=n>=s.top-o&&n<=s.bottom+o;if(l&&c)return r=i}}),r},og=function(t){function n(o,s){return function(l,c,d,h){var p=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(o==null&&(s||p))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return n(o(l,c,d,h),s)(l,c,d,h);var y=(s?l:c).options.group.name;return o===!0||typeof o=="string"&&o===y||o.join&&o.indexOf(y)>-1}}var r={},i=t.group;(!i||fl(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},sg=function(){!rg&&dt&&et(dt,"display","none")},ag=function(){!rg&&dt&&et(dt,"display","")};Cl&&!Vh&&document.addEventListener("click",function(e){if(gl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),gl=!1,!1},!0);var Bi=function(t){if(Ee){t=t.touches?t.touches[0]:t;var n=x1(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[qn]._onDragOver(r)}}},k1=function(t){Ee&&Ee.parentNode[qn]._isOutsideThisEl(t.target)};function tt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Vr({},t),e[qn]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ig(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:tt.supportPointer!==!1&&"PointerEvent"in window&&!Ds,emptyInsertThreshold:5};Ns.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);og(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:w1,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?St(e,"pointerdown",this._onTapStart):(St(e,"mousedown",this._onTapStart),St(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(St(e,"dragover",this),St(e,"dragenter",this)),ml.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Vr(this,v1())}tt.prototype={constructor:tt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Oo=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ee):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,o=i.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,h=i.filter;if(D1(r),!Ee&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||i.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ds&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Pr(c,i.draggable,r,!1),!(c&&c.animated)&&pl!==c)){if(Ao=or(c),Ms=or(c,i.draggable),typeof h=="function"){if(h.call(this,t,c,this)){An({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),Mn("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(p){if(p=Pr(d,p.trim(),r,!1),p)return An({sortable:n,rootEl:p,name:"filter",targetEl:c,fromEl:r,toEl:r}),Mn("filter",n,{evt:t}),!0}),h)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!Pr(d,i.handle,r,!1)||this._prepareDragStart(t,l,c)}}},_prepareDragStart:function(t,n,r){var i=this,o=i.el,s=i.options,l=o.ownerDocument,c;if(r&&!Ee&&r.parentNode===o){var d=nn(r);if($t=o,Ee=r,Kt=Ee.parentNode,Fi=Ee.nextSibling,pl=r,hl=s.group,tt.dragged=Ee,$i={target:Ee,clientX:(n||t).clientX,clientY:(n||t).clientY},eg=$i.clientX-d.left,tg=$i.clientY-d.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ee.style["will-change"]="all",c=function(){if(Mn("delayEnded",i,{evt:t}),tt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Wh&&i.nativeDraggable&&(Ee.draggable=!0),i._triggerDragStart(t,n),An({sortable:i,name:"choose",originalEvent:t}),Vn(Ee,s.chosenClass,!0)},s.ignore.split(",").forEach(function(h){Gh(Ee,h.trim(),Rc)}),St(l,"dragover",Bi),St(l,"mousemove",Bi),St(l,"touchmove",Bi),St(l,"mouseup",i._onDrop),St(l,"touchend",i._onDrop),St(l,"touchcancel",i._onDrop),Wh&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ee.draggable=!0),Mn("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Ps||zr))){if(tt.eventCanceled){this._onDrop();return}St(l,"mouseup",i._disableDelayedDrag),St(l,"touchend",i._disableDelayedDrag),St(l,"touchcancel",i._disableDelayedDrag),St(l,"mousemove",i._delayedDragTouchMoveHandler),St(l,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&St(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ee&&Rc(Ee),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;wt(t,"mouseup",this._disableDelayedDrag),wt(t,"touchend",this._disableDelayedDrag),wt(t,"touchcancel",this._disableDelayedDrag),wt(t,"mousemove",this._delayedDragTouchMoveHandler),wt(t,"touchmove",this._delayedDragTouchMoveHandler),wt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?St(document,"pointermove",this._onTouchMove):n?St(document,"touchmove",this._onTouchMove):St(document,"mousemove",this._onTouchMove):(St(Ee,"dragend",this),St($t,"dragstart",this._onDragStart));try{document.selection?Tl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Eo=!1,$t&&Ee){Mn("dragStarted",this,{evt:n}),this.nativeDraggable&&St(document,"dragover",k1);var r=this.options;!t&&Vn(Ee,r.dragClass,!1),Vn(Ee,r.ghostClass,!0),tt.active=this,t&&this._appendGhost(),An({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Cr){this._lastX=Cr.clientX,this._lastY=Cr.clientY,sg();for(var t=document.elementFromPoint(Cr.clientX,Cr.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Cr.clientX,Cr.clientY),t!==n);)n=t;if(Ee.parentNode[qn]._isOutsideThisEl(t),n)do{if(n[qn]){var r=void 0;if(r=n[qn]._onDragOver({clientX:Cr.clientX,clientY:Cr.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);ag()}},_onTouchMove:function(t){if($i){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,s=dt&&xo(dt,!0),l=dt&&s&&s.a,c=dt&&s&&s.d,d=_l&&yn&&Xh(yn),h=(o.clientX-$i.clientX+i.x)/(l||1)+(d?d[0]-Pc[0]:0)/(l||1),p=(o.clientY-$i.clientY+i.y)/(c||1)+(d?d[1]-Pc[1]:0)/(c||1);if(!tt.active&&!Eo){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(An({rootEl:Kt,name:"add",toEl:Kt,fromEl:$t,originalEvent:t}),An({sortable:this,name:"remove",toEl:Kt,originalEvent:t}),An({rootEl:Kt,name:"sort",toEl:Kt,fromEl:$t,originalEvent:t}),An({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),pn&&pn.save()):zn!==Ao&&zn>=0&&(An({sortable:this,name:"update",toEl:Kt,originalEvent:t}),An({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),tt.active&&((zn==null||zn===-1)&&(zn=Ao,mi=Ms),An({sortable:this,name:"end",toEl:Kt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Mn("nulling",this),$t=Ee=Kt=dt=Fi=Ut=pl=gi=$i=Cr=Fs=zn=mi=Ao=Ms=Oo=$s=pn=hl=tt.dragged=tt.ghost=tt.clone=tt.active=null,bl.forEach(function(t){t.checked=!0}),bl.length=Lc=Ic=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ee&&(this._onDragOver(t),S1(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,o=r.length,s=this.options;ir.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function L1(e,t,n,r,i,o,s,l){var c=r?e.clientY:e.clientX,d=r?n.height:n.width,h=r?n.top:n.left,p=r?n.bottom:n.right,y=!1;if(!s){if(l&&ylh+d*o/2:cp-yl)return-$s}else if(c>h+d*(1-i)/2&&cp-d*o/2)?c>h+d/2?1:-1:0}function I1(e){return or(Ee){if(e==null||e===!1||e===""||e.trim()==="")return[];e=e.replace(/,/g,","),e=e.replace(/。/g,","),e=e.replace(/、/g,","),e=e.replace(/;/g,","),e=e.replace(/./g,","),e=e.replace(/\t/g,` + */function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ir(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function c1(e,t){if(e==null)return{};var n=u1(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var f1="1.15.0";function qr(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var zr=qr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Is=qr(/Edge/i),Wh=qr(/firefox/i),Ps=qr(/safari/i)&&!qr(/chrome/i)&&!qr(/android/i),Kh=qr(/iP(ad|od|hone)/i),Vh=qr(/chrome/i)&&qr(/android/i),qh={capture:!1,passive:!1};function St(e,t,n){e.addEventListener(t,n,!zr&&qh)}function wt(e,t,n){e.removeEventListener(t,n,!zr&&qh)}function fl(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function d1(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Pr(e,t,n,r){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&fl(e,t):fl(e,t))||r&&e===n)return e;if(e===n)break}while(e=d1(e))}return null}var zh=/\s+/g;function Vn(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(zh," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(zh," ")}}function et(e,t,n){var r=e&&e.style;if(r){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in r)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),r[t]=n+(typeof n=="string"?"":"px")}}function To(e,t){var n="";if(typeof e=="string")n=e;else do{var r=et(e,"transform");r&&r!=="none"&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Gh(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i=o:s=i<=o,!s)return r;if(r===Dr())break;r=hi(r,!1)}return!1}function xo(e,t,n,r){for(var i=0,o=0,s=e.children;o2&&arguments[2]!==void 0?arguments[2]:{},i=r.evt,o=c1(r,C1);Rs.pluginEvent.bind(tt)(t,n,Ir({dragEl:Ee,parentEl:Kt,ghostEl:dt,rootEl:$t,nextEl:Mi,lastDownEl:dl,cloneEl:Ut,cloneHidden:gi,dragStarted:Ms,putSortable:pn,activeSortable:tt.active,originalEvent:i,oldIndex:So,oldDraggableIndex:Ns,newIndex:zn,newDraggableIndex:mi,hideGhostForTarget:sg,unhideGhostForTarget:ag,cloneNowHidden:function(){gi=!0},cloneNowShown:function(){gi=!1},dispatchSortableEvent:function(l){An({sortable:n,name:l,originalEvent:i})}},o))};function An(e){b1(Ir({putSortable:pn,cloneEl:Ut,targetEl:Ee,rootEl:$t,oldIndex:So,oldDraggableIndex:Ns,newIndex:zn,newDraggableIndex:mi},e))}var Ee,Kt,dt,$t,Mi,dl,Ut,gi,So,zn,Ns,mi,pl,pn,Ao=!1,hl=!1,gl=[],Fi,Cr,Oc,Lc,eg,tg,Ms,Eo,Fs,$s=!1,ml=!1,vl,yn,Ic=[],Pc=!1,yl=[],bl=typeof document<"u",Cl=Kh,ng=Is||zr?"cssFloat":"float",_1=bl&&!Vh&&!Kh&&"draggable"in document.createElement("div"),rg=function(){if(bl){if(zr)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),ig=function(t,n){var r=et(t),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=xo(t,0,n),s=xo(t,1,n),l=o&&et(o),c=s&&et(s),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+nn(o).width,h=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+nn(s).width;if(r.display==="flex")return r.flexDirection==="column"||r.flexDirection==="column-reverse"?"vertical":"horizontal";if(r.display==="grid")return r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var p=l.float==="left"?"left":"right";return s&&(c.clear==="both"||c.clear===p)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=i&&r[ng]==="none"||s&&r[ng]==="none"&&d+h>i)?"vertical":"horizontal"},w1=function(t,n,r){var i=r?t.left:t.top,o=r?t.right:t.bottom,s=r?t.width:t.height,l=r?n.left:n.top,c=r?n.right:n.bottom,d=r?n.width:n.height;return i===l||o===c||i+s/2===l+d/2},T1=function(t,n){var r;return gl.some(function(i){var o=i[qn].options.emptyInsertThreshold;if(!(!o||Sc(i))){var s=nn(i),l=t>=s.left-o&&t<=s.right+o,c=n>=s.top-o&&n<=s.bottom+o;if(l&&c)return r=i}}),r},og=function(t){function n(o,s){return function(l,c,d,h){var p=l.options.group.name&&c.options.group.name&&l.options.group.name===c.options.group.name;if(o==null&&(s||p))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return n(o(l,c,d,h),s)(l,c,d,h);var C=(s?l:c).options.group.name;return o===!0||typeof o=="string"&&o===C||o.join&&o.indexOf(C)>-1}}var r={},i=t.group;(!i||cl(i)!="object")&&(i={name:i}),r.name=i.name,r.checkPull=n(i.pull,!0),r.checkPut=n(i.put),r.revertClone=i.revertClone,t.group=r},sg=function(){!rg&&dt&&et(dt,"display","none")},ag=function(){!rg&&dt&&et(dt,"display","")};bl&&!Vh&&document.addEventListener("click",function(e){if(hl)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),hl=!1,!1},!0);var $i=function(t){if(Ee){t=t.touches?t.touches[0]:t;var n=T1(t.clientX,t.clientY);if(n){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]=t[i]);r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[qn]._onDragOver(r)}}},x1=function(t){Ee&&Ee.parentNode[qn]._isOutsideThisEl(t.target)};function tt(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=Vr({},t),e[qn]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ig(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,l){s.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:tt.supportPointer!==!1&&"PointerEvent"in window&&!Ps,emptyInsertThreshold:5};Rs.initializePlugins(this,e,n);for(var r in n)!(r in t)&&(t[r]=n[r]);og(t);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=t.forceFallback?!1:_1,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?St(e,"pointerdown",this._onTapStart):(St(e,"mousedown",this._onTapStart),St(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(St(e,"dragover",this),St(e,"dragenter",this)),gl.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Vr(this,m1())}tt.prototype={constructor:tt,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Eo=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,Ee):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,r=this.el,i=this.options,o=i.preventOnFilter,s=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,c=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||c,h=i.filter;if(P1(r),!Ee&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||i.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ps&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=Pr(c,i.draggable,r,!1),!(c&&c.animated)&&dl!==c)){if(So=or(c),Ns=or(c,i.draggable),typeof h=="function"){if(h.call(this,t,c,this)){An({sortable:n,rootEl:d,name:"filter",targetEl:c,toEl:r,fromEl:r}),Mn("filter",n,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(h&&(h=h.split(",").some(function(p){if(p=Pr(d,p.trim(),r,!1),p)return An({sortable:n,rootEl:p,name:"filter",targetEl:c,fromEl:r,toEl:r}),Mn("filter",n,{evt:t}),!0}),h)){o&&t.cancelable&&t.preventDefault();return}i.handle&&!Pr(d,i.handle,r,!1)||this._prepareDragStart(t,l,c)}}},_prepareDragStart:function(t,n,r){var i=this,o=i.el,s=i.options,l=o.ownerDocument,c;if(r&&!Ee&&r.parentNode===o){var d=nn(r);if($t=o,Ee=r,Kt=Ee.parentNode,Mi=Ee.nextSibling,dl=r,pl=s.group,tt.dragged=Ee,Fi={target:Ee,clientX:(n||t).clientX,clientY:(n||t).clientY},eg=Fi.clientX-d.left,tg=Fi.clientY-d.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,Ee.style["will-change"]="all",c=function(){if(Mn("delayEnded",i,{evt:t}),tt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!Wh&&i.nativeDraggable&&(Ee.draggable=!0),i._triggerDragStart(t,n),An({sortable:i,name:"choose",originalEvent:t}),Vn(Ee,s.chosenClass,!0)},s.ignore.split(",").forEach(function(h){Gh(Ee,h.trim(),Dc)}),St(l,"dragover",$i),St(l,"mousemove",$i),St(l,"touchmove",$i),St(l,"mouseup",i._onDrop),St(l,"touchend",i._onDrop),St(l,"touchcancel",i._onDrop),Wh&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ee.draggable=!0),Mn("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Is||zr))){if(tt.eventCanceled){this._onDrop();return}St(l,"mouseup",i._disableDelayedDrag),St(l,"touchend",i._disableDelayedDrag),St(l,"touchcancel",i._disableDelayedDrag),St(l,"mousemove",i._delayedDragTouchMoveHandler),St(l,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&St(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(c,s.delay)}else c()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ee&&Dc(Ee),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;wt(t,"mouseup",this._disableDelayedDrag),wt(t,"touchend",this._disableDelayedDrag),wt(t,"touchcancel",this._disableDelayedDrag),wt(t,"mousemove",this._delayedDragTouchMoveHandler),wt(t,"touchmove",this._delayedDragTouchMoveHandler),wt(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?St(document,"pointermove",this._onTouchMove):n?St(document,"touchmove",this._onTouchMove):St(document,"mousemove",this._onTouchMove):(St(Ee,"dragend",this),St($t,"dragstart",this._onDragStart));try{document.selection?wl(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Ao=!1,$t&&Ee){Mn("dragStarted",this,{evt:n}),this.nativeDraggable&&St(document,"dragover",x1);var r=this.options;!t&&Vn(Ee,r.dragClass,!1),Vn(Ee,r.ghostClass,!0),tt.active=this,t&&this._appendGhost(),An({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Cr){this._lastX=Cr.clientX,this._lastY=Cr.clientY,sg();for(var t=document.elementFromPoint(Cr.clientX,Cr.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Cr.clientX,Cr.clientY),t!==n);)n=t;if(Ee.parentNode[qn]._isOutsideThisEl(t),n)do{if(n[qn]){var r=void 0;if(r=n[qn]._onDragOver({clientX:Cr.clientX,clientY:Cr.clientY,target:t,rootEl:n}),r&&!this.options.dragoverBubble)break}t=n}while(n=n.parentNode);ag()}},_onTouchMove:function(t){if(Fi){var n=this.options,r=n.fallbackTolerance,i=n.fallbackOffset,o=t.touches?t.touches[0]:t,s=dt&&To(dt,!0),l=dt&&s&&s.a,c=dt&&s&&s.d,d=Cl&&yn&&Xh(yn),h=(o.clientX-Fi.clientX+i.x)/(l||1)+(d?d[0]-Ic[0]:0)/(l||1),p=(o.clientY-Fi.clientY+i.y)/(c||1)+(d?d[1]-Ic[1]:0)/(c||1);if(!tt.active&&!Ao){if(r&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))=0&&(An({rootEl:Kt,name:"add",toEl:Kt,fromEl:$t,originalEvent:t}),An({sortable:this,name:"remove",toEl:Kt,originalEvent:t}),An({rootEl:Kt,name:"sort",toEl:Kt,fromEl:$t,originalEvent:t}),An({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),pn&&pn.save()):zn!==So&&zn>=0&&(An({sortable:this,name:"update",toEl:Kt,originalEvent:t}),An({sortable:this,name:"sort",toEl:Kt,originalEvent:t})),tt.active&&((zn==null||zn===-1)&&(zn=So,mi=Ns),An({sortable:this,name:"end",toEl:Kt,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){Mn("nulling",this),$t=Ee=Kt=dt=Mi=Ut=dl=gi=Fi=Cr=Ms=zn=mi=So=Ns=Eo=Fs=pn=pl=tt.dragged=tt.ghost=tt.clone=tt.active=null,yl.forEach(function(t){t.checked=!0}),yl.length=Oc=Lc=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ee&&(this._onDragOver(t),k1(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,r=this.el.children,i=0,o=r.length,s=this.options;ir.right+i||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+i}function O1(e,t,n,r,i,o,s,l){var c=r?e.clientY:e.clientX,d=r?n.height:n.width,h=r?n.top:n.left,p=r?n.bottom:n.right,C=!1;if(!s){if(l&&vlh+d*o/2:cp-vl)return-Fs}else if(c>h+d*(1-i)/2&&cp-d*o/2)?c>h+d/2?1:-1:0}function L1(e){return or(Ee){if(e==null||e===!1||e===""||e.trim()==="")return[];e=e.replace(/,/g,","),e=e.replace(/。/g,","),e=e.replace(/、/g,","),e=e.replace(/;/g,","),e=e.replace(/./g,","),e=e.replace(/\t/g,` `),e=e.replace(/\r/g,` `),e=e.replace(/\n+/g,` -`);const r={"(":")","[":"]","<":">","{":"}"},i=Object.keys(r);let o=e.length,s="",l="",c="",d=0,h=[];for(let p=0;p","{":"}"},i=Object.keys(r);let o=e.length,s="",l="",c="",d=0,h=[];for(let p=0;p=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Pe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(q1,arguments)},brighten:function(){return this._applyModification(z1,arguments)},darken:function(){return this._applyModification(G1,arguments)},desaturate:function(){return this._applyModification(W1,arguments)},saturate:function(){return this._applyModification(K1,arguments)},greyscale:function(){return this._applyModification(V1,arguments)},spin:function(){return this._applyModification(Y1,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(Z1,arguments)},complement:function(){return this._applyCombination(X1,arguments)},monochromatic:function(){return this._applyCombination(Q1,arguments)},splitcomplement:function(){return this._applyCombination(J1,arguments)},triad:function(){return this._applyCombination(hg,[3])},tetrad:function(){return this._applyCombination(hg,[4])}},Pe.fromRatio=function(e,t){if(Al(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=Us(e[r]));e=n}return Pe(e,t)};function $1(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=iw(e)),Al(e)=="object"&&(Gr(e.r)&&Gr(e.g)&&Gr(e.b)?(t=B1(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Gr(e.h)&&Gr(e.s)&&Gr(e.v)?(r=Us(e.s),i=Us(e.v),t=j1(e.h,r,i),s=!0,l="hsv"):Gr(e.h)&&Gr(e.s)&&Gr(e.l)&&(r=Us(e.s),o=Us(e.l),t=H1(e.h,r,o),s=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=gg(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function B1(e,t,n){return{r:Bt(e,255)*255,g:Bt(t,255)*255,b:Bt(n,255)*255}}function cg(e,t,n){e=Bt(e,255),t=Bt(t,255),n=Bt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,s,l=(r+i)/2;if(r==i)o=s=0;else{var c=r-i;switch(s=l>.5?c/(2-r-i):c/(r+i),r){case e:o=(t-n)/c+(t1&&(p-=1),p<1/6?d+(h-d)*6*p:p<1/2?h:p<2/3?d+(h-d)*(2/3-p)*6:d}if(t===0)r=i=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=s(c,l,e+1/3),i=s(c,l,e),o=s(c,l,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function fg(e,t,n){e=Bt(e,255),t=Bt(t,255),n=Bt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,s,l=r,c=r-i;if(s=r===0?0:c/r,r==i)o=0;else{switch(r){case e:o=(t-n)/c+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(Pe(r));return o}function Q1(e,t){t=t||6;for(var n=Pe(e).toHsv(),r=n.h,i=n.s,o=n.v,s=[],l=1/t;t--;)s.push(Pe({h:r,s:i,v:o})),o=(o+l)%1;return s}Pe.mix=function(e,t,n){n=n===0?0:n||50;var r=Pe(e).toRgb(),i=Pe(t).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return Pe(s)},Pe.readability=function(e,t){var n=Pe(e),r=Pe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Pe.isReadable=function(e,t,n){var r=Pe.readability(e,t),i,o;switch(o=!1,i=ow(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},Pe.mostReadable=function(e,t,n){var r=null,i=0,o,s,l,c;n=n||{},s=n.includeFallbackColors,l=n.level,c=n.size;for(var d=0;di&&(i=o,r=Pe(t[d]));return Pe.isReadable(e,r,{level:l,size:c})||!s?r:(n.includeFallbackColors=!1,Pe.mostReadable(e,["#fff","#000"],n))};var Wc=Pe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},ew=Pe.hexNames=tw(Wc);function tw(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function gg(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Bt(e,t){nw(e)&&(e="100%");var n=rw(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function El(e){return Math.min(1,Math.max(0,e))}function Gn(e){return parseInt(e,16)}function nw(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function rw(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _r(e){return e.length==1?"0"+e:""+e}function Us(e){return e<=1&&(e=e*100+"%"),e}function mg(e){return Math.round(parseFloat(e)*255).toString(16)}function vg(e){return Gn(e)/255}var wr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Gr(e){return!!wr.CSS_UNIT.exec(e)}function iw(e){e=e.replace(M1,"").replace(F1,"").toLowerCase();var t=!1;if(Wc[e])e=Wc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=wr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=wr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=wr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=wr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=wr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=wr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=wr.hex8.exec(e))?{r:Gn(n[1]),g:Gn(n[2]),b:Gn(n[3]),a:vg(n[4]),format:t?"name":"hex8"}:(n=wr.hex6.exec(e))?{r:Gn(n[1]),g:Gn(n[2]),b:Gn(n[3]),format:t?"name":"hex"}:(n=wr.hex4.exec(e))?{r:Gn(n[1]+""+n[1]),g:Gn(n[2]+""+n[2]),b:Gn(n[3]+""+n[3]),a:vg(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=wr.hex3.exec(e))?{r:Gn(n[1]+""+n[1]),g:Gn(n[2]+""+n[2]),b:Gn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function ow(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const vi={},ve={loraRegex:/^\$/,lycoRegex:/^\$/,weightNumRegex:/(.*):([0-9\.]+)/,weightNumRegexEN:/(.*):\s*([0-9\.]+)/,weightNumRegexCN:/(.*):\s*([0-9\.]+)/,bracketsEN:[{"(":"(",")":")"},{"[":"[","]":"]"},{"{":"{","}":"}"},{"<":"<",">":">"}],bracketsCN:[{"(":"(",")":")"},{"【":"[","】":"]"},{"《":"<","》":">"},{"「":"{","」":"}"},{"『":"{","』":"}"},{"〈":"<","〉":">"},{"﹝":"(","﹞":")"},{"﹛":"{","﹜":"}"},{"﹙":"(","﹚":")"}],replaceTag(e){return typeof e!="string"||e===""||(e=this.replaceBrackets(e),this.weightNumRegexEN.test(e)&&(e=e.replace(this.weightNumRegexEN,"$1:$2")),this.weightNumRegexCN.test(e)&&(e=e.replace(this.weightNumRegexCN,"$1:$2"))),e},replaceBrackets(e){const t=e.length;if(t===0)return e;let n={};this.bracketsCN.forEach(o=>{for(const s in o)n[s]=o[s]});let r=e[0],i=e[t-1];return typeof n[r]<"u"&&(e=n[r]+e.substring(1)),typeof n[i]<"u"&&(e=e.substring(0,t-1)+n[i]),e},hasBrackets(e){const t=e.length;if(t===0)return!1;let n=[];this.bracketsEN.forEach(o=>{let s=[];for(const l in o)s.push(l);n.push(s)}),this.bracketsCN.forEach(o=>{let s=[];for(const l in o)s.push(l);n.push(s)});let r=e[0],i=e[t-1];for(const o of n)if(o[0]===r&&o[1]===i)return o;return!1},splitTag(e){let t={left:"",value:"",right:""},n=e.match(/^([\(\<\{\[]+)(.*)$/);return!n||(t.left=n[1],e=n[2],n=e.match(/((\:[0-9\.]+)?[\)\>\}\]]+)$/),!n)?(t.value=e,t):(t.right=n[1],e=e.substring(0,e.length-t.right.length),t.value=e,t)},splitTags(e,t=!1,n=!1){return N1(e,t,n)},canTranslate(e){return!(e.trim()===""||e[0]==="<"&&e[e.length-1]===">"||/^[0-9`~!@#$%^&*()_+\-=\[\]{}\\|;:'",.\/<>?]+$/.test(e)||/^[a-zA-Z]$/.test(e))},isEnglish(e){const t=e.length;if(e[0]==="<"&&e[t-1]===">")return!0;for(let n=0;n127)return!1;return!0},canOneTranslate(e){const t=["zh_CN","zh_HK","zh_TW","ar_SA","ja_JP","ko_KR","ru_RU"];return t.push("am_ET","hy_AM","as_IN","bn_BD","ba_RU","bg_BG","prs_AF","dv_MV","el_GR","gu_IN","he_IL","hi_IN","iu_CA","kn_IN","kk_KZ","km_KH","ku_Arab_IQ","ky_KG","lo_LA","mk_MK","ml_IN","mr_IN","mn_Cyrl_MN","mn_Mong_CN","my_MM","ne_NP","or_IN","ps_AF","fa_IR","pa_Guru_IN","sr_Cyrl_RS","ta_IN","tt_Latn_RU","te_IN","th_TH","bo_CN","ti_ET","uk_UA","ur_PK","ug_Arab_CN","vi_VN"),!!t.includes(e)},isEnglishByLangCode(e,t){if(!this.canOneTranslate(t))return-1;const n=e.length;for(let r=0;r127)return 0;return 1},isSameLang(e,t){if(e===t)return!0;let n=e.toLowerCase(),r=t.toLowerCase();return n===r||(e=e.replace("-","_"),t=t.replace("-","_"),e===t)||(e=e.split("_")[0],t=t.split("_")[0],e===t)},getLang(e,t,n){return n[t]&&n[t].lang&&n[t].lang[e]?this.replaceGlobals(n[t].lang[e],t):n.en_US&&n.en_US.lang&&n.en_US.lang[e]?this.replaceGlobals(n.en_US.lang[e],"en_US"):this.replaceGlobals(e,t)},replaceGlobals(e,t){for(let n in Sl){let r=Sl[n];if(n==="docs")switch(t){case"zh_CN":r+="/zh-CN";break;case"zh_HK":case"zh_TW":r+="/zh-TW";break;case"ru_RU":r+="/ru";break}e=e.replace(new RegExp(`{{${n}}}`,"g"),r)}return e},escapeHtml(e){return e.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]||t)},unescapeHtml(e){return e.replace(/&|<|>|'|"/g,t=>({"&":"&","<":"<",">":">","'":"'",""":'"'})[t]||t)},getTagWeightNum(e){const t=e.match(this.weightNumRegex);let n=t?parseFloat(t[2]):0;return n=n>=0?n:0,n},getTagIncWeight(e){return this.countLayers(e,"(",")")},getTagDecWeight(e){return this.countLayers(e,"[","]")},countLayers(e,t="(",n=")"){let r=0;if(e.length<2)return r;for(;;){let i=e[0],o=e[e.length-1];if(i===t&&o===n)r++,e=e.slice(1,e.length-1);else break}return r},setLayers(e,t=0,n="(",r=")",i=""){for(;;){let o=e[0],s=e[e.length-1];if(o===n&&s===r)e=e.slice(1,e.length-1);else break}return t===0?e:n.repeat(t)+e+i+r.repeat(t)},getTranslateApiInfo(e,t){let n=!1;for(const r in t)for(const i in r.children)if(i.key===e){n=i;break}return n},isEqualTags(e,t,n=[]){if(t.length!==e.length)return!1;for(let r=0;r{setTimeout(()=>{hideResults(e)},n)})},formatTime(e,t=!0){let n=new Date(e),r=n.getFullYear(),i=n.getMonth()+1;i<10&&(i="0"+i);let o=n.getDate();o<10&&(o="0"+o);let s=n.getHours();s<10&&(s="0"+s);let l=n.getMinutes();l<10&&(l="0"+l);let c=n.getSeconds();return c<10&&(c="0"+c),t?`${r}/${i}/${o} ${s}:${l}:${c}`:`${i}/${o} ${s}:${l}:${c}`},apiUrl(){let e;return e=window.location.origin+window.location.pathname,e+=e.endsWith("/")?"":"/",e+="physton_prompt/",e},removeCSS(e,t=!0){if(!e)return;let n=null;t?n=this.gradioApp().querySelector("#"+e):n=document.querySelector("#"+e),n&&n.remove()},loadCSS(e,t="",n=!0,r=!1,i=!0){n&&this.removeCSS(t,i);let o=this.apiUrl()+"styles?file="+encodeURIComponent(e);r||(o+="&t="+new Date().getTime());let s=document.createElement("link");s.id=t,s.rel="stylesheet",s.href=o,i?this.gradioApp().appendChild(s):document.body.appendChild(s)},swapElement(e,t){let n=e.parentNode,r=t.parentNode,i=e.nextSibling,o=t.nextSibling;n.insertBefore(t,i),r.insertBefore(e,o)},insertBefore(e,t){t.parentNode.insertBefore(e,t)},insertAfter(e,t){t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e)},gradioContainer:null,gradioApp(){if(this.gradioContainer)return this.gradioContainer;const e=document.getElementsByTagName("gradio-app"),t=e.length==0?null:e[0].shadowRoot;if(t){const n=t.querySelectorAll(".gradio-container");for(let r=0;r=0,o=!n&&i&&(t==="hex"||t==="hex6"||t==="hex3"||t==="hex4"||t==="hex8"||t==="name");return o?t==="name"&&this._a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Pe(this.toString())},_applyModification:function(t,n){var r=t.apply(null,[this].concat([].slice.call(n)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(V1,arguments)},brighten:function(){return this._applyModification(q1,arguments)},darken:function(){return this._applyModification(z1,arguments)},desaturate:function(){return this._applyModification(U1,arguments)},saturate:function(){return this._applyModification(W1,arguments)},greyscale:function(){return this._applyModification(K1,arguments)},spin:function(){return this._applyModification(G1,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(J1,arguments)},complement:function(){return this._applyCombination(Y1,arguments)},monochromatic:function(){return this._applyCombination(Z1,arguments)},splitcomplement:function(){return this._applyCombination(X1,arguments)},triad:function(){return this._applyCombination(hg,[3])},tetrad:function(){return this._applyCombination(hg,[4])}},Pe.fromRatio=function(e,t){if(Sl(e)=="object"){var n={};for(var r in e)e.hasOwnProperty(r)&&(r==="a"?n[r]=e[r]:n[r]=js(e[r]));e=n}return Pe(e,t)};function F1(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=rw(e)),Sl(e)=="object"&&(Gr(e.r)&&Gr(e.g)&&Gr(e.b)?(t=$1(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Gr(e.h)&&Gr(e.s)&&Gr(e.v)?(r=js(e.s),i=js(e.v),t=H1(e.h,r,i),s=!0,l="hsv"):Gr(e.h)&&Gr(e.s)&&Gr(e.l)&&(r=js(e.s),o=js(e.l),t=B1(e.h,r,o),s=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=gg(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}function $1(e,t,n){return{r:Bt(e,255)*255,g:Bt(t,255)*255,b:Bt(n,255)*255}}function cg(e,t,n){e=Bt(e,255),t=Bt(t,255),n=Bt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,s,l=(r+i)/2;if(r==i)o=s=0;else{var c=r-i;switch(s=l>.5?c/(2-r-i):c/(r+i),r){case e:o=(t-n)/c+(t1&&(p-=1),p<1/6?d+(h-d)*6*p:p<1/2?h:p<2/3?d+(h-d)*(2/3-p)*6:d}if(t===0)r=i=o=n;else{var l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=s(c,l,e+1/3),i=s(c,l,e),o=s(c,l,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function fg(e,t,n){e=Bt(e,255),t=Bt(t,255),n=Bt(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o,s,l=r,c=r-i;if(s=r===0?0:c/r,r==i)o=0;else{switch(r){case e:o=(t-n)/c+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(Pe(r));return o}function Z1(e,t){t=t||6;for(var n=Pe(e).toHsv(),r=n.h,i=n.s,o=n.v,s=[],l=1/t;t--;)s.push(Pe({h:r,s:i,v:o})),o=(o+l)%1;return s}Pe.mix=function(e,t,n){n=n===0?0:n||50;var r=Pe(e).toRgb(),i=Pe(t).toRgb(),o=n/100,s={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return Pe(s)},Pe.readability=function(e,t){var n=Pe(e),r=Pe(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Pe.isReadable=function(e,t,n){var r=Pe.readability(e,t),i,o;switch(o=!1,i=iw(n),i.level+i.size){case"AAsmall":case"AAAlarge":o=r>=4.5;break;case"AAlarge":o=r>=3;break;case"AAAsmall":o=r>=7;break}return o},Pe.mostReadable=function(e,t,n){var r=null,i=0,o,s,l,c;n=n||{},s=n.includeFallbackColors,l=n.level,c=n.size;for(var d=0;di&&(i=o,r=Pe(t[d]));return Pe.isReadable(e,r,{level:l,size:c})||!s?r:(n.includeFallbackColors=!1,Pe.mostReadable(e,["#fff","#000"],n))};var Uc=Pe.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},Q1=Pe.hexNames=ew(Uc);function ew(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}function gg(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Bt(e,t){tw(e)&&(e="100%");var n=nw(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Al(e){return Math.min(1,Math.max(0,e))}function Gn(e){return parseInt(e,16)}function tw(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function nw(e){return typeof e=="string"&&e.indexOf("%")!=-1}function _r(e){return e.length==1?"0"+e:""+e}function js(e){return e<=1&&(e=e*100+"%"),e}function mg(e){return Math.round(parseFloat(e)*255).toString(16)}function vg(e){return Gn(e)/255}var wr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",n="(?:"+t+")|(?:"+e+")",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{CSS_UNIT:new RegExp(n),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Gr(e){return!!wr.CSS_UNIT.exec(e)}function rw(e){e=e.replace(N1,"").replace(M1,"").toLowerCase();var t=!1;if(Uc[e])e=Uc[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n;return(n=wr.rgb.exec(e))?{r:n[1],g:n[2],b:n[3]}:(n=wr.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=wr.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=wr.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=wr.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=wr.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=wr.hex8.exec(e))?{r:Gn(n[1]),g:Gn(n[2]),b:Gn(n[3]),a:vg(n[4]),format:t?"name":"hex8"}:(n=wr.hex6.exec(e))?{r:Gn(n[1]),g:Gn(n[2]),b:Gn(n[3]),format:t?"name":"hex"}:(n=wr.hex4.exec(e))?{r:Gn(n[1]+""+n[1]),g:Gn(n[2]+""+n[2]),b:Gn(n[3]+""+n[3]),a:vg(n[4]+""+n[4]),format:t?"name":"hex8"}:(n=wr.hex3.exec(e))?{r:Gn(n[1]+""+n[1]),g:Gn(n[2]+""+n[2]),b:Gn(n[3]+""+n[3]),format:t?"name":"hex"}:!1}function iw(e){var t,n;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),n!=="small"&&n!=="large"&&(n="small"),{level:t,size:n}}const pe={loraRegex:/^\$/,lycoRegex:/^\$/,weightNumRegex:/(.*):([0-9\.]+)/,weightNumRegexEN:/(.*):\s*([0-9\.]+)/,weightNumRegexCN:/(.*):\s*([0-9\.]+)/,bracketsEN:[{"(":"(",")":")"},{"[":"[","]":"]"},{"{":"{","}":"}"},{"<":"<",">":">"}],bracketsCN:[{"(":"(",")":")"},{"【":"[","】":"]"},{"《":"<","》":">"},{"「":"{","」":"}"},{"『":"{","』":"}"},{"〈":"<","〉":">"},{"﹝":"(","﹞":")"},{"﹛":"{","﹜":"}"},{"﹙":"(","﹚":")"}],replaceTag(e){return typeof e!="string"||e===""||(e=this.replaceBrackets(e),this.weightNumRegexEN.test(e)&&(e=e.replace(this.weightNumRegexEN,"$1:$2")),this.weightNumRegexCN.test(e)&&(e=e.replace(this.weightNumRegexCN,"$1:$2"))),e},replaceBrackets(e){const t=e.length;if(t===0)return e;let n={};this.bracketsCN.forEach(o=>{for(const s in o)n[s]=o[s]});let r=e[0],i=e[t-1];return typeof n[r]<"u"&&(e=n[r]+e.substring(1)),typeof n[i]<"u"&&(e=e.substring(0,t-1)+n[i]),e},hasBrackets(e){const t=e.length;if(t===0)return!1;let n=[];this.bracketsEN.forEach(o=>{let s=[];for(const l in o)s.push(l);n.push(s)}),this.bracketsCN.forEach(o=>{let s=[];for(const l in o)s.push(l);n.push(s)});let r=e[0],i=e[t-1];for(const o of n)if(o[0]===r&&o[1]===i)return o;return!1},splitTag(e){let t={left:"",value:"",right:""},n=e.match(/^([\(\<\{\[]+)(.*)$/);return!n||(t.left=n[1],e=n[2],n=e.match(/((\:[0-9\.]+)?[\)\>\}\]]+)$/),!n)?(t.value=e,t):(t.right=n[1],e=e.substring(0,e.length-t.right.length),t.value=e,t)},splitTags(e,t=!1,n=!1){return R1(e,t,n)},canTranslate(e){return!(e.trim()===""||e[0]==="<"&&e[e.length-1]===">"||/^[0-9`~!@#$%^&*()_+\-=\[\]{}\\|;:'",.\/<>?]+$/.test(e)||/^[a-zA-Z]$/.test(e))},isEnglish(e){const t=e.length;if(e[0]==="<"&&e[t-1]===">")return!0;for(let n=0;n127)return!1;return!0},canOneTranslate(e){const t=["zh_CN","zh_HK","zh_TW","ar_SA","ja_JP","ko_KR","ru_RU"];return t.push("am_ET","hy_AM","as_IN","bn_BD","ba_RU","bg_BG","prs_AF","dv_MV","el_GR","gu_IN","he_IL","hi_IN","iu_CA","kn_IN","kk_KZ","km_KH","ku_Arab_IQ","ky_KG","lo_LA","mk_MK","ml_IN","mr_IN","mn_Cyrl_MN","mn_Mong_CN","my_MM","ne_NP","or_IN","ps_AF","fa_IR","pa_Guru_IN","sr_Cyrl_RS","ta_IN","tt_Latn_RU","te_IN","th_TH","bo_CN","ti_ET","uk_UA","ur_PK","ug_Arab_CN","vi_VN"),!!t.includes(e)},isEnglishByLangCode(e,t){if(!this.canOneTranslate(t))return-1;const n=e.length;for(let r=0;r127)return 0;return 1},isSameLang(e,t){if(e===t)return!0;let n=e.toLowerCase(),r=t.toLowerCase();return n===r||(e=e.replace("-","_"),t=t.replace("-","_"),e===t)||(e=e.split("_")[0],t=t.split("_")[0],e===t)},getLang(e,t,n){return n[t]&&n[t].lang&&n[t].lang[e]?this.replaceGlobals(n[t].lang[e],t):n.en_US&&n.en_US.lang&&n.en_US.lang[e]?this.replaceGlobals(n.en_US.lang[e],"en_US"):this.replaceGlobals(e,t)},replaceGlobals(e,t){for(let n in kl){let r=kl[n];if(n==="docs")switch(t){case"zh_CN":r+="/zh-CN";break;case"zh_HK":case"zh_TW":r+="/zh-TW";break;case"ru_RU":r+="/ru";break}e=e.replace(new RegExp(`{{${n}}}`,"g"),r)}return e},escapeHtml(e){return e.replace(/[&<>'"]/g,t=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[t]||t)},unescapeHtml(e){return e.replace(/&|<|>|'|"/g,t=>({"&":"&","<":"<",">":">","'":"'",""":'"'})[t]||t)},getTagWeightNum(e){const t=e.match(this.weightNumRegex);let n=t?parseFloat(t[2]):0;return n=n>=0?n:0,n},getTagIncWeight(e){return this.countLayers(e,"(",")")},getTagDecWeight(e){return this.countLayers(e,"[","]")},countLayers(e,t="(",n=")"){let r=0;if(e.length<2)return r;for(;;){let i=e[0],o=e[e.length-1];if(i===t&&o===n)r++,e=e.slice(1,e.length-1);else break}return r},setLayers(e,t=0,n="(",r=")",i=""){for(;;){let o=e[0],s=e[e.length-1];if(o===n&&s===r)e=e.slice(1,e.length-1);else break}return t===0?e:n.repeat(t)+e+i+r.repeat(t)},getTranslateApiInfo(e,t){let n=!1;for(const r in t)for(const i in r.children)if(i.key===e){n=i;break}return n},isEqualTags(e,t,n=[]){if(t.length!==e.length)return!1;for(let r=0;r{setTimeout(()=>{hideResults(e)},n)})},formatTime(e,t=!0){let n=new Date(e),r=n.getFullYear(),i=n.getMonth()+1;i<10&&(i="0"+i);let o=n.getDate();o<10&&(o="0"+o);let s=n.getHours();s<10&&(s="0"+s);let l=n.getMinutes();l<10&&(l="0"+l);let c=n.getSeconds();return c<10&&(c="0"+c),t?`${r}/${i}/${o} ${s}:${l}:${c}`:`${i}/${o} ${s}:${l}:${c}`},apiUrl(){let e;return e=window.location.origin+window.location.pathname,e+=e.endsWith("/")?"":"/",e+="physton_prompt/",e},removeCSS(e,t=!0){if(!e)return;let n=null;t?n=this.gradioApp().querySelector("#"+e):n=document.querySelector("#"+e),n&&n.remove()},loadCSS(e,t="",n=!0,r=!1,i=!0){n&&this.removeCSS(t,i);let o=this.apiUrl()+"styles?file="+encodeURIComponent(e);r||(o+="&t="+new Date().getTime());let s=document.createElement("link");s.id=t,s.rel="stylesheet",s.href=o,i?this.gradioApp().appendChild(s):document.body.appendChild(s)},swapElement(e,t){let n=e.parentNode,r=t.parentNode,i=e.nextSibling,o=t.nextSibling;n.insertBefore(t,i),r.insertBefore(e,o)},insertBefore(e,t){t.parentNode.insertBefore(e,t)},insertAfter(e,t){t.nextSibling?t.parentNode.insertBefore(e,t.nextSibling):t.parentNode.appendChild(e)},gradioContainer:null,gradioApp(){if(this.gradioContainer)return this.gradioContainer;const e=document.getElementsByTagName("gradio-app"),t=e.length==0?null:e[0].shadowRoot;if(t){const n=t.querySelectorAll(".gradio-container");for(let r=0;r=this._config.preview;if(o)r.postMessage({results:J,workerId:c.WORKER_ID,finished:je});else if(ue(this._config.chunk)&&!P){if(this._config.chunk(J,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);J=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(J.data),this._completeResults.errors=this._completeResults.errors.concat(J.errors),this._completeResults.meta=J.meta),this._completed||!je||!ue(this._config.complete)||J&&J.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),je||J&&J.meta.paused||this._nextChunk(),J}this._halted=!0},this._sendError=function(S){ue(this._config.error)?this._config.error(S):o&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:S,finished:!1})}}function p(I){var S;(I=I||{}).chunkSize||(I.chunkSize=c.RemoteChunkSize),h.call(this,I),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(P){this._input=P,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(S=new XMLHttpRequest,this._config.withCredentials&&(S.withCredentials=this._config.withCredentials),i||(S.onload=m(this._chunkLoaded,this),S.onerror=m(this._chunkError,this)),S.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var P=this._config.downloadRequestHeaders;for(var j in P)S.setRequestHeader(j,P[j])}if(this._config.chunkSize){var ee=this._start+this._config.chunkSize-1;S.setRequestHeader("Range","bytes="+this._start+"-"+ee)}try{S.send(this._config.downloadRequestBody)}catch(J){this._chunkError(J.message)}i&&S.status===0&&this._chunkError()}},this._chunkLoaded=function(){S.readyState===4&&(S.status<200||400<=S.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:S.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(P){var j=P.getResponseHeader("Content-Range");return j===null?-1:parseInt(j.substring(j.lastIndexOf("/")+1))}(S),this.parseChunk(S.responseText)))},this._chunkError=function(P){var j=S.statusText||P;this._sendError(new Error(j))}}function y(I){var S,P;(I=I||{}).chunkSize||(I.chunkSize=c.LocalChunkSize),h.call(this,I);var j=typeof FileReader<"u";this.stream=function(ee){this._input=ee,P=ee.slice||ee.webkitSlice||ee.mozSlice,j?((S=new FileReader).onload=m(this._chunkLoaded,this),S.onerror=m(this._chunkError,this)):S=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(ee.target.result)},this._chunkError=function(){this._sendError(S.error)}}function C(I){var S;h.call(this,I=I||{}),this.stream=function(P){return S=P,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var P,j=this._config.chunkSize;return j?(P=S.substring(0,j),S=S.substring(j)):(P=S,S=""),this._finished=!S,this.parseChunk(P)}}}function w(I){h.call(this,I=I||{});var S=[],P=!0,j=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(ee){this._input=ee,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){j&&S.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),S.length?this.parseChunk(S.shift()):P=!0},this._streamData=m(function(ee){try{S.push(typeof ee=="string"?ee:ee.toString(this._config.encoding)),P&&(P=!1,this._checkIsFinished(),this.parseChunk(S.shift()))}catch(J){this._streamError(J)}},this),this._streamError=m(function(ee){this._streamCleanUp(),this._sendError(ee)},this),this._streamEnd=m(function(){this._streamCleanUp(),j=!0,this._streamData("")},this),this._streamCleanUp=m(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function k(I){var S,P,j,ee=Math.pow(2,53),J=-ee,ye=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,je=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Ne=this,z=0,ie=0,fe=!1,nt=!1,Ve=[],ne={data:[],errors:[],meta:{}};if(ue(I.step)){var ge=I.step;I.step=function(Le){if(ne=Le,Oe())Ae();else{if(Ae(),ne.data.length===0)return;z+=Le.data.length,I.preview&&z>I.preview?P.abort():(ne.data=ne.data[0],ge(ne,Ne))}}}function we(Le){return I.skipEmptyLines==="greedy"?Le.join("").trim()==="":Le.length===1&&Le[0].length===0}function Ae(){return ne&&j&&(Xe("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),j=!1),I.skipEmptyLines&&(ne.data=ne.data.filter(function(Le){return!we(Le)})),Oe()&&function(){if(!ne)return;function Le(mt,R){ue(I.transformHeader)&&(mt=I.transformHeader(mt,R)),Ve.push(mt)}if(Array.isArray(ne.data[0])){for(var rt=0;Oe()&&rt=Ve.length?"__parsed_extra":Ve[$]),I.transform&&(W=I.transform(W,te)),W=Be(te,W),te==="__parsed_extra"?(G[te]=G[te]||[],G[te].push(W)):G[te]=W}return I.header&&($>Ve.length?Xe("FieldMismatch","TooManyFields","Too many fields: expected "+Ve.length+" fields but parsed "+$,ie+R):$=this._config.preview;if(o)r.postMessage({results:J,workerId:c.WORKER_ID,finished:je});else if(ue(this._config.chunk)&&!R){if(this._config.chunk(J,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);J=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(J.data),this._completeResults.errors=this._completeResults.errors.concat(J.errors),this._completeResults.meta=J.meta),this._completed||!je||!ue(this._config.complete)||J&&J.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),je||J&&J.meta.paused||this._nextChunk(),J}this._halted=!0},this._sendError=function(S){ue(this._config.error)?this._config.error(S):o&&this._config.error&&r.postMessage({workerId:c.WORKER_ID,error:S,finished:!1})}}function p(D){var S;(D=D||{}).chunkSize||(D.chunkSize=c.RemoteChunkSize),h.call(this,D),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(R){this._input=R,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(S=new XMLHttpRequest,this._config.withCredentials&&(S.withCredentials=this._config.withCredentials),i||(S.onload=m(this._chunkLoaded,this),S.onerror=m(this._chunkError,this)),S.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var R=this._config.downloadRequestHeaders;for(var U in R)S.setRequestHeader(U,R[U])}if(this._config.chunkSize){var ee=this._start+this._config.chunkSize-1;S.setRequestHeader("Range","bytes="+this._start+"-"+ee)}try{S.send(this._config.downloadRequestBody)}catch(J){this._chunkError(J.message)}i&&S.status===0&&this._chunkError()}},this._chunkLoaded=function(){S.readyState===4&&(S.status<200||400<=S.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:S.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(R){var U=R.getResponseHeader("Content-Range");return U===null?-1:parseInt(U.substring(U.lastIndexOf("/")+1))}(S),this.parseChunk(S.responseText)))},this._chunkError=function(R){var U=S.statusText||R;this._sendError(new Error(U))}}function C(D){var S,R;(D=D||{}).chunkSize||(D.chunkSize=c.LocalChunkSize),h.call(this,D);var U=typeof FileReader<"u";this.stream=function(ee){this._input=ee,R=ee.slice||ee.webkitSlice||ee.mozSlice,U?((S=new FileReader).onload=m(this._chunkLoaded,this),S.onerror=m(this._chunkError,this)):S=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount=this._input.size,this.parseChunk(ee.target.result)},this._chunkError=function(){this._sendError(S.error)}}function y(D){var S;h.call(this,D=D||{}),this.stream=function(R){return S=R,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var R,U=this._config.chunkSize;return U?(R=S.substring(0,U),S=S.substring(U)):(R=S,S=""),this._finished=!S,this.parseChunk(R)}}}function w(D){h.call(this,D=D||{});var S=[],R=!0,U=!1;this.pause=function(){h.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){h.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(ee){this._input=ee,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){U&&S.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),S.length?this.parseChunk(S.shift()):R=!0},this._streamData=m(function(ee){try{S.push(typeof ee=="string"?ee:ee.toString(this._config.encoding)),R&&(R=!1,this._checkIsFinished(),this.parseChunk(S.shift()))}catch(J){this._streamError(J)}},this),this._streamError=m(function(ee){this._streamCleanUp(),this._sendError(ee)},this),this._streamEnd=m(function(){this._streamCleanUp(),U=!0,this._streamData("")},this),this._streamCleanUp=m(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function T(D){var S,R,U,ee=Math.pow(2,53),J=-ee,ye=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,je=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,Ne=this,z=0,ie=0,fe=!1,nt=!1,Ve=[],ne={data:[],errors:[],meta:{}};if(ue(D.step)){var me=D.step;D.step=function(Le){if(ne=Le,Oe())Ae();else{if(Ae(),ne.data.length===0)return;z+=Le.data.length,D.preview&&z>D.preview?R.abort():(ne.data=ne.data[0],me(ne,Ne))}}}function Te(Le){return D.skipEmptyLines==="greedy"?Le.join("").trim()==="":Le.length===1&&Le[0].length===0}function Ae(){return ne&&U&&(Xe("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),U=!1),D.skipEmptyLines&&(ne.data=ne.data.filter(function(Le){return!Te(Le)})),Oe()&&function(){if(!ne)return;function Le(mt,N){ue(D.transformHeader)&&(mt=D.transformHeader(mt,N)),Ve.push(mt)}if(Array.isArray(ne.data[0])){for(var rt=0;Oe()&&rt=Ve.length?"__parsed_extra":Ve[$]),D.transform&&(K=D.transform(K,te)),K=Be(te,K),te==="__parsed_extra"?(G[te]=G[te]||[],G[te].push(K)):G[te]=K}return D.header&&($>Ve.length?Xe("FieldMismatch","TooManyFields","Too many fields: expected "+Ve.length+" fields but parsed "+$,ie+N):$=Ce.length/2?`\r -`:"\r"}(Le,R)),j=!1,I.delimiter)ue(I.delimiter)&&(I.delimiter=I.delimiter(Le),ne.meta.delimiter=I.delimiter);else{var $=function(te,W,X,Ce,de){var me,se,ke,_e;de=de||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var Me=0;Me=ye)return Ht(!0)}else for(Se=z,z++;;){if((Se=fe.indexOf(S,Se+1))===-1)return Ve||Xe.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Be.length,index:z}),Ft();if(Se===ne-1)return Ft(fe.substring(z,Se).replace(Me,S));if(S!==Ne||fe[Se+1]!==Ne){if(S===Ne||Se===0||fe[Se-1]!==Ne){ke!==-1&&ke=ye)return Ht(!0);break}Xe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Be.length,index:z}),Se++}}else Se++}return Ft();function at(Q){Be.push(Q),rt=z}function Ct(Q){var De=0;if(Q!==-1){var Fe=fe.substring(Se+1,Q);Fe&&Fe.trim()===""&&(De=Fe.length)}return De}function Ft(Q){return Ve||(Q===void 0&&(Q=fe.substring(z)),Le.push(Q),z=ne,at(Le),Oe&&fn()),Ht()}function an(Q){z=Q,at(Le),Le=[],_e=fe.indexOf(j,z)}function Ht(Q){return{data:Be,errors:Xe,meta:{delimiter:P,linebreak:j,aborted:ie,truncated:!!Q,cursor:rt+(nt||0)}}}function fn(){J(Ht()),Be=[],Xe=[]}},this.abort=function(){ie=!0},this.getCharIndex=function(){return z}}function L(I){var S=I.data,P=s[S.workerId],j=!1;if(S.error)P.userError(S.error,S.file);else if(S.results&&S.results.data){var ee={abort:function(){j=!0,K(S.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:D,resume:D};if(ue(P.userStep)){for(var J=0;J{}},translateApis:{type:Array,default:()=>[]},translateApi:{type:String,default:""},translateApiConfig:{type:Object},tagCompleteFile:{type:String,default:""},onlyCsvOnAuto:{type:Boolean,default:!1}},data(){return{cancelMultiTranslate:!1,globals:Sl}},computed:{langName(){for(const e in this.languages){const t=this.languages[e];if(t.code===this.languageCode)return t.name}return item.name}},methods:{getLang(e){return ve.getLang(e,this.languageCode,this.languages)},replaceGlobals(e){return ve.replaceGlobals(e,this.languageCode)},getCSV(e=null,t=!1){return window.tagCompleteFileCache=window.tagCompleteFileCache||{},window.tagCompleteFileLoading=window.tagCompleteFileLoading||{},new Promise((n,r)=>{if(e=e||this.tagCompleteFile,!t&&window.tagCompleteFileCache[e]){n(window.tagCompleteFileCache[e]);return}if(window.tagCompleteFileLoading[e]){const s=setInterval(()=>{window.tagCompleteFileLoading[e]||(clearInterval(s),n(window.tagCompleteFileCache[e]))},100);return}window.tagCompleteFileLoading[e]=!0;let i={toEn:new Map,toLocal:new Map},o=(s,l)=>{[s,s.replace(/\_/g," "),s.replace(/\-/g," ")].forEach(d=>i.toLocal.set(d,l)),i.toEn.set(l,s)};if(!e&&typeof translations=="object"&&translations instanceof Map){translations.forEach((s,l)=>{o(l,s)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,n(i);return}if(!e){window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,r(this.getLang("not_found_csv_file"));return}this.gradioAPI.getCSV(e).then(s=>{s=aw.parse(s,{header:!1,skipEmptyLines:!0}),s.data.forEach(l=>{if(l.length<2)return;let c=l[0].trim(),d=l[1].trim();c===""||d===""||o(c,d)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,n(i)}).catch(s=>{window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,s.response&&s.response.status===404?r(this.getLang("not_found_csv_file")):r(s.message)})})},async translateToLocalByCSV(e,t=null,n=!1){let r=await this.getCSV(t,n);return e=e.trim().toLowerCase(),r.toLocal.has(e)?r.toLocal.get(e):""},async translateToEnByCSV(e,t=null,n=!1){let r=await this.getCSV(t,n);return e=e.trim().toLowerCase(),r.toEn.has(e)?r.toEn.get(e):""}}},Hi=Number.isNaN||window.isNaN,lw=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,uw=/\.\d*(?:0|9){10}\d*$/,bg=(e,t=1e11)=>uw.test(String(e))?Math.round(e*t)/t:e,cw=Rn({name:"VueNumberInput",props:{attrs:{type:Object,default:void 0},center:Boolean,controls:Boolean,disabled:Boolean,inputtable:{type:Boolean,default:!0},inline:Boolean,max:{type:Number,default:1/0},min:{type:Number,default:-1/0},name:{type:String,default:void 0},placeholder:{type:String,default:void 0},readonly:Boolean,rounded:Boolean,size:{type:String,default:void 0},step:{type:Number,default:1},modelValue:{type:Number,default:NaN}},emits:["update:modelValue"],data(){return{value:NaN}},computed:{increasable(){return Hi(this.value)||this.valuethis.min}},watch:{modelValue:{immediate:!0,handler(e,t){!(Hi(e)&&typeof t>"u")&&e!==this.value&&this.setValue(e)}}},methods:{isNaN:Hi,change(e){this.setValue(e.target.value)},paste(e){const t=e.clipboardData||window.clipboardData;t&&!lw.test(t.getData("text"))&&e.preventDefault()},decrease(){if(this.decreasable){let{value:e}=this;Hi(e)&&(e=0),this.setValue(bg(e-this.step))}},increase(){if(this.increasable){let{value:e}=this;Hi(e)&&(e=0),this.setValue(bg(e+this.step))}},setValue(e){const t=this.value;let n=typeof e!="number"?parseFloat(e):e;Hi(n)||(this.min<=this.max&&(n=Math.min(this.max,Math.max(this.min,n))),this.rounded&&(n=Math.round(n))),this.value=n,n===t&&(this.$refs.input.value=String(n)),this.$emit("update:modelValue",n,t)}}}),En=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},fw=["disabled"],dw=["name","value","min","max","step","readonly","disabled","placeholder"],pw=["disabled"];function hw(e,t,n,r,i,o){return E(),H("div",{class:lt(["vue-number-input",{"vue-number-input--inline":e.inline,"vue-number-input--center":e.center,"vue-number-input--controls":e.controls,[`vue-number-input--${e.size}`]:e.size}])},[e.controls?(E(),H("button",{key:0,class:"vue-number-input__button vue-number-input__button--minus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.decreasable,onClick:t[0]||(t[0]=gt((...s)=>e.decrease&&e.decrease(...s),["prevent"]))},null,8,fw)):Re("",!0),T("input",ul({ref:"input",class:"vue-number-input__input"},e.attrs,{type:"number",name:e.name,value:isNaN(e.value)?"":e.value,min:e.min,max:e.max,step:e.step,readonly:e.readonly||!e.inputtable,disabled:e.disabled||!e.decreasable&&!e.increasable,placeholder:e.placeholder,autocomplete:"off",onChange:t[1]||(t[1]=(...s)=>e.change&&e.change(...s)),onPaste:t[2]||(t[2]=(...s)=>e.paste&&e.paste(...s))}),null,16,dw),e.controls?(E(),H("button",{key:1,class:"vue-number-input__button vue-number-input__button--plus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.increasable,onClick:t[3]||(t[3]=gt((...s)=>e.increase&&e.increase(...s),["prevent"]))},null,8,pw)):Re("",!0)],2)}const gw=En(cw,[["render",hw]]),mw={data(){return{autocompleteResults:null,showAppendList:!1,appendListStyle:{top:0,left:0},appendListSelected:null,appendListChildSelected:null,appendList:[{type:"wrap",name:"line_break_character",icon:"wrap",children:[]}],favorites:[],autoInputPrompt:"disabled",autoInputPromptKey:""}},computed:{appendListChildItemTags(){return this.appendListSelected===null?[]:this.appendListChildSelected===null?[]:this.appendList[this.appendListSelected].type!=="favorite"&&this.appendList[this.appendListSelected].type!=="history"?[]:this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags}},mounted(){this.initAutoInputPrompt(),[{name:"txt2img",type:"prompt",key:"txt2img",neg:!1},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",neg:!0},{name:"img2img",type:"prompt",key:"img2img",neg:!1},{name:"img2img",type:"negative_prompt",key:"img2img_neg",neg:!0}].forEach(t=>{t.neg===this.neg&&this.appendList.push({type:"favorite",name:["favorite",t.name],icon:"favorite",key:t.key,dataKey:"favorite."+t.key,children:[]})})},methods:{onUnfoldClick(){this.hidePanel&&this.$nextTick(()=>{this.onResize()}),this.$emit("update:hidePanel",!this.hidePanel)},onTranslatesToLocalClick(){if(this.tags.length===0)return;if(this.loading.all_local){this.cancelMultiTranslate=!0,this.loading.all_local=!1;return}this.loading.all_local=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);return this.translates(e,!0,!0).finally(()=>{this.loading.all_local=!1,this.updateTags()})},onTranslatesToEnglishClick(){if(this.tags.length===0)return;if(this.loading.all_en){this.cancelMultiTranslate=!0,this.loading.all_en=!1;return}this.loading.all_en=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);this.translates(e,!1,!0).finally(()=>{this.loading.all_en=!1,this.updateTags()})},onCopyAllTagsClick(){this.copy(this.prompt)},onDeleteAllTagsClick(){confirm(this.getLang("delete_all_keywords_confirm"))&&(this.tags=[],this.updateTags())},appendListItemName(e){let t=[];if(typeof e.name=="object")for(let n of e.name)t.push(this.getLang(n));else t=[this.getLang(e.name)];return t.join(" / ")},onAppendTagFocus(e){if(this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""){this.appendListStyle={top:e.target.offsetTop+e.target.offsetHeight+"px",left:e.target.offsetLeft+"px"},this.appendListSelected=null,this.appendListChildSelected=null,this.showAppendList=!0;let t=[];this.appendList.forEach(n=>{typeof n.dataKey=="string"&&t.push(n.dataKey)}),this.gradioAPI.getDatas(t).then(n=>{this.appendList.forEach(r=>{typeof r.dataKey=="string"&&(r.children=n[r.dataKey]||[],r.children.reverse())})})}this._setTextareaFocus()},onAppendTagBlur(e){setTimeout(()=>{this.showAppendList=!1},300)},selectAppendList(e=!0){this.appendList.length!==0&&(this.appendListSelected===null?this.appendListSelected=0:e?(this.appendListSelected++,this.appendListSelected>=this.appendList.length&&(this.appendListSelected=0)):(this.appendListSelected--,this.appendListSelected<0&&(this.appendListSelected=this.appendList.length-1)),this.appendListChildSelected=null)},selectAppendListChild(e=!0){this.appendList.length!==0&&this.appendListSelected!==null&&this.appendList[this.appendListSelected].children.length!==0&&(this.appendListChildSelected===null?this.appendListChildSelected=0:e?(this.appendListChildSelected++,this.appendListChildSelected>=this.appendList[this.appendListSelected].children.length&&(this.appendListChildSelected=0)):(this.appendListChildSelected--,this.appendListChildSelected<0&&(this.appendListChildSelected=this.appendList[this.appendListSelected].children.length-1)),this.scrollAppendListChild())},scrollAppendListChild(){this.appendListSelected!==null&&(this.appendListChildSelected===0||this.appendListChildSelected===null?this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop=0:this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({behavior:"smooth",block:"center"}))},onAppendTagKeyDown(e,t=null){if(!(e.keyCode===38||e.keyCode===40))if(e.keyCode===13){if(this.getAutocompleteResults()&&this.autocompleteResults.style.display==="block"&&this.getAutocompleteResultsSelected()){let r=this.getAutocompleteResultsSelectedText();setTimeout(()=>{t=this.$refs.promptTagAppend.value,r?t=r:(r=this.getAutocompleteResultsSelectedText(),r&&(t=r)),this.onAppendTagKeyDown(e,t)},300);return}let n=this.$refs.promptTagAppend.value;if(this.$refs.promptTagAppend.value="",this.showAppendList=!0,console.log(n,t),t)n=n.replace(/\s*,\s*$/,"").trim(),ve.hasBrackets(n)&&(n=ve.replaceBrackets(n)),this._appendTag(n,t),this.updateTags();else{ve.hasBrackets(n)?(n=ve.replaceBrackets(n),n=[n]):n=ve.splitTags(n,this.autoBreakBeforeWrap,this.autoBreakAfterWrap);let r=[];n.forEach(i=>{let o=-1;i===` +`:"\r"}(Le,N)),U=!1,D.delimiter)ue(D.delimiter)&&(D.delimiter=D.delimiter(Le),ne.meta.delimiter=D.delimiter);else{var $=function(te,K,X,Ce,de){var ve,se,ke,_e;de=de||[","," ","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var Me=0;Me=ye)return Ht(!0)}else for(Se=z,z++;;){if((Se=fe.indexOf(S,Se+1))===-1)return Ve||Xe.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:Be.length,index:z}),Ft();if(Se===ne-1)return Ft(fe.substring(z,Se).replace(Me,S));if(S!==Ne||fe[Se+1]!==Ne){if(S===Ne||Se===0||fe[Se-1]!==Ne){ke!==-1&&ke=ye)return Ht(!0);break}Xe.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:Be.length,index:z}),Se++}}else Se++}return Ft();function at(Q){Be.push(Q),rt=z}function Ct(Q){var De=0;if(Q!==-1){var Fe=fe.substring(Se+1,Q);Fe&&Fe.trim()===""&&(De=Fe.length)}return De}function Ft(Q){return Ve||(Q===void 0&&(Q=fe.substring(z)),Le.push(Q),z=ne,at(Le),Oe&&fn()),Ht()}function an(Q){z=Q,at(Le),Le=[],_e=fe.indexOf(U,z)}function Ht(Q){return{data:Be,errors:Xe,meta:{delimiter:R,linebreak:U,aborted:ie,truncated:!!Q,cursor:rt+(nt||0)}}}function fn(){J(Ht()),Be=[],Xe=[]}},this.abort=function(){ie=!0},this.getCharIndex=function(){return z}}function P(D){var S=D.data,R=s[S.workerId],U=!1;if(S.error)R.userError(S.error,S.file);else if(S.results&&S.results.data){var ee={abort:function(){U=!0,j(S.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:L,resume:L};if(ue(R.userStep)){for(var J=0;J{}},translateApis:{type:Array,default:()=>[]},translateApi:{type:String,default:""},translateApiConfig:{type:Object},tagCompleteFile:{type:String,default:""},onlyCsvOnAuto:{type:Boolean,default:!1},groupTagsTranslate:{type:Boolean,default:!0},groupTagsTranslateCache:{type:Object,default:()=>({toEn:new Map,toLocal:new Map})}},data(){return{cancelMultiTranslate:!1,globals:kl}},computed:{langName(){for(const e in this.languages){const t=this.languages[e];if(t.code===this.languageCode)return t.name}return item.name}},methods:{getLang(e){return pe.getLang(e,this.languageCode,this.languages)},replaceGlobals(e){return pe.replaceGlobals(e,this.languageCode)},getCSV(e=null,t=!1){return window.tagCompleteFileCache=window.tagCompleteFileCache||{},window.tagCompleteFileLoading=window.tagCompleteFileLoading||{},new Promise((n,r)=>{if(e=e||this.tagCompleteFile,!t&&window.tagCompleteFileCache[e]){n(window.tagCompleteFileCache[e]);return}if(window.tagCompleteFileLoading[e]){const s=setInterval(()=>{window.tagCompleteFileLoading[e]||(clearInterval(s),n(window.tagCompleteFileCache[e]))},100);return}window.tagCompleteFileLoading[e]=!0;let i={toEn:new Map,toLocal:new Map},o=(s,l)=>{[s,s.replace(/\_/g," "),s.replace(/\-/g," ")].forEach(d=>i.toLocal.set(d,l)),i.toEn.set(l,s)};if(!e&&typeof translations=="object"&&translations instanceof Map){translations.forEach((s,l)=>{o(l,s)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,n(i);return}if(!e){window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,r(this.getLang("not_found_csv_file"));return}this.gradioAPI.getCSV(e).then(s=>{s=sw.parse(s,{header:!1,skipEmptyLines:!0}),s.data.forEach(l=>{if(l.length<2)return;let c=l[0].trim(),d=l[1].trim();c===""||d===""||o(c,d)}),window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,n(i)}).catch(s=>{window.tagCompleteFileLoading[e]=!1,window.tagCompleteFileCache[e]=i,s.response&&s.response.status===404?r(this.getLang("not_found_csv_file")):r(s.message)})})},async translateToLocalByCSV(e,t=null,n=!1){let r=await this.getCSV(t,n);return e=e.trim().toLowerCase(),r.toLocal.has(e)?r.toLocal.get(e):""},async translateToEnByCSV(e,t=null,n=!1){let r=await this.getCSV(t,n);return e=e.trim().toLowerCase(),r.toEn.has(e)?r.toEn.get(e):""},async translateToLocalByGroupTags(e){return e=e.trim().toLowerCase(),this.groupTagsTranslateCache.toLocal.has(e)?this.groupTagsTranslateCache.toLocal.get(e).join(" / "):""},async translateToEnByGroupTags(e){return e=e.trim().toLowerCase(),this.groupTagsTranslateCache.toEn.has(e)?this.groupTagsTranslateCache.toEn.get(e):""}}},Bi=Number.isNaN||window.isNaN,aw=/^-?(?:\d+|\d+\.\d+|\.\d+)(?:[eE][-+]?\d+)?$/,lw=/\.\d*(?:0|9){10}\d*$/,bg=(e,t=1e11)=>lw.test(String(e))?Math.round(e*t)/t:e,uw=Rn({name:"VueNumberInput",props:{attrs:{type:Object,default:void 0},center:Boolean,controls:Boolean,disabled:Boolean,inputtable:{type:Boolean,default:!0},inline:Boolean,max:{type:Number,default:1/0},min:{type:Number,default:-1/0},name:{type:String,default:void 0},placeholder:{type:String,default:void 0},readonly:Boolean,rounded:Boolean,size:{type:String,default:void 0},step:{type:Number,default:1},modelValue:{type:Number,default:NaN}},emits:["update:modelValue"],data(){return{value:NaN}},computed:{increasable(){return Bi(this.value)||this.valuethis.min}},watch:{modelValue:{immediate:!0,handler(e,t){!(Bi(e)&&typeof t>"u")&&e!==this.value&&this.setValue(e)}}},methods:{isNaN:Bi,change(e){this.setValue(e.target.value)},paste(e){const t=e.clipboardData||window.clipboardData;t&&!aw.test(t.getData("text"))&&e.preventDefault()},decrease(){if(this.decreasable){let{value:e}=this;Bi(e)&&(e=0),this.setValue(bg(e-this.step))}},increase(){if(this.increasable){let{value:e}=this;Bi(e)&&(e=0),this.setValue(bg(e+this.step))}},setValue(e){const t=this.value;let n=typeof e!="number"?parseFloat(e):e;Bi(n)||(this.min<=this.max&&(n=Math.min(this.max,Math.max(this.min,n))),this.rounded&&(n=Math.round(n))),this.value=n,n===t&&(this.$refs.input.value=String(n)),this.$emit("update:modelValue",n,t)}}}),En=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},cw=["disabled"],fw=["name","value","min","max","step","readonly","disabled","placeholder"],dw=["disabled"];function pw(e,t,n,r,i,o){return O(),H("div",{class:lt(["vue-number-input",{"vue-number-input--inline":e.inline,"vue-number-input--center":e.center,"vue-number-input--controls":e.controls,[`vue-number-input--${e.size}`]:e.size}])},[e.controls?(O(),H("button",{key:0,class:"vue-number-input__button vue-number-input__button--minus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.decreasable,onClick:t[0]||(t[0]=gt((...s)=>e.decrease&&e.decrease(...s),["prevent"]))},null,8,cw)):Re("",!0),x("input",ll({ref:"input",class:"vue-number-input__input"},e.attrs,{type:"number",name:e.name,value:isNaN(e.value)?"":e.value,min:e.min,max:e.max,step:e.step,readonly:e.readonly||!e.inputtable,disabled:e.disabled||!e.decreasable&&!e.increasable,placeholder:e.placeholder,autocomplete:"off",onChange:t[1]||(t[1]=(...s)=>e.change&&e.change(...s)),onPaste:t[2]||(t[2]=(...s)=>e.paste&&e.paste(...s))}),null,16,fw),e.controls?(O(),H("button",{key:1,class:"vue-number-input__button vue-number-input__button--plus",type:"button",tabindex:"-1",disabled:e.disabled||e.readonly||!e.increasable,onClick:t[3]||(t[3]=gt((...s)=>e.increase&&e.increase(...s),["prevent"]))},null,8,dw)):Re("",!0)],2)}const hw=En(uw,[["render",pw]]),gw={data(){return{autocompleteResults:null,showAppendList:!1,appendListStyle:{top:0,left:0},appendListSelected:null,appendListChildSelected:null,appendList:[{type:"wrap",name:"line_break_character",icon:"wrap",children:[]}],favorites:[],autoInputPrompt:"disabled",autoInputPromptKey:""}},computed:{appendListChildItemTags(){return this.appendListSelected===null?[]:this.appendListChildSelected===null?[]:this.appendList[this.appendListSelected].type!=="favorite"&&this.appendList[this.appendListSelected].type!=="history"?[]:this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags}},mounted(){this.initAutoInputPrompt(),[{name:"txt2img",type:"prompt",key:"txt2img",neg:!1},{name:"txt2img",type:"negative_prompt",key:"txt2img_neg",neg:!0},{name:"img2img",type:"prompt",key:"img2img",neg:!1},{name:"img2img",type:"negative_prompt",key:"img2img_neg",neg:!0}].forEach(t=>{t.neg===this.neg&&this.appendList.push({type:"favorite",name:["favorite",t.name],icon:"favorite",key:t.key,dataKey:"favorite."+t.key,children:[]})})},methods:{onUnfoldClick(){this.hidePanel&&this.$nextTick(()=>{this.onResize()}),this.$emit("update:hidePanel",!this.hidePanel)},onTranslatesToLocalClick(){if(this.tags.length===0)return;if(this.loading.all_local){this.cancelMultiTranslate=!0,this.loading.all_local=!1;return}this.loading.all_local=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);return this.translates(e,!0,!0).finally(()=>{this.loading.all_local=!1,this.updateTags()})},onTranslatesToEnglishClick(){if(this.tags.length===0)return;if(this.loading.all_en){this.cancelMultiTranslate=!0,this.loading.all_en=!1;return}this.loading.all_en=!0;let e=[];for(const t in this.tags)this.tags[t].type&&this.tags[t].type!=="text"||e.push(t);this.translates(e,!1,!0).finally(()=>{this.loading.all_en=!1,this.updateTags()})},onCopyAllTagsClick(){this.copy(this.prompt)},onDeleteAllTagsClick(){confirm(this.getLang("delete_all_keywords_confirm"))&&(this.tags=[],this.updateTags())},appendListItemName(e){let t=[];if(typeof e.name=="object")for(let n of e.name)t.push(this.getLang(n));else t=[this.getLang(e.name)];return t.join(" / ")},onAppendTagFocus(e){if(this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""){this.appendListStyle={top:e.target.offsetTop+e.target.offsetHeight+"px",left:e.target.offsetLeft+"px"},this.appendListSelected=null,this.appendListChildSelected=null,this.showAppendList=!0;let t=[];this.appendList.forEach(n=>{typeof n.dataKey=="string"&&t.push(n.dataKey)}),this.gradioAPI.getDatas(t).then(n=>{this.appendList.forEach(r=>{typeof r.dataKey=="string"&&(r.children=n[r.dataKey]||[],r.children.reverse())})})}this._setTextareaFocus()},onAppendTagBlur(e){setTimeout(()=>{this.showAppendList=!1},300)},selectAppendList(e=!0){this.appendList.length!==0&&(this.appendListSelected===null?this.appendListSelected=0:e?(this.appendListSelected++,this.appendListSelected>=this.appendList.length&&(this.appendListSelected=0)):(this.appendListSelected--,this.appendListSelected<0&&(this.appendListSelected=this.appendList.length-1)),this.appendListChildSelected=null)},selectAppendListChild(e=!0){this.appendList.length!==0&&this.appendListSelected!==null&&this.appendList[this.appendListSelected].children.length!==0&&(this.appendListChildSelected===null?this.appendListChildSelected=0:e?(this.appendListChildSelected++,this.appendListChildSelected>=this.appendList[this.appendListSelected].children.length&&(this.appendListChildSelected=0)):(this.appendListChildSelected--,this.appendListChildSelected<0&&(this.appendListChildSelected=this.appendList[this.appendListSelected].children.length-1)),this.scrollAppendListChild())},scrollAppendListChild(){this.appendListSelected!==null&&(this.appendListChildSelected===0||this.appendListChildSelected===null?this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop=0:this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({behavior:"smooth",block:"center"}))},onAppendTagKeyDown(e,t=null){if(!(e.keyCode===38||e.keyCode===40))if(e.keyCode===13){if(this.getAutocompleteResults()&&this.autocompleteResults.style.display==="block"&&this.getAutocompleteResultsSelected()){let r=this.getAutocompleteResultsSelectedText();setTimeout(()=>{t=this.$refs.promptTagAppend.value,r?t=r:(r=this.getAutocompleteResultsSelectedText(),r&&(t=r)),this.onAppendTagKeyDown(e,t)},300);return}let n=this.$refs.promptTagAppend.value;if(this.$refs.promptTagAppend.value="",this.showAppendList=!0,console.log(n,t),t)n=n.replace(/\s*,\s*$/,"").trim(),pe.hasBrackets(n)&&(n=pe.replaceBrackets(n)),this._appendTag(n,t),this.updateTags();else{pe.hasBrackets(n)?(n=pe.replaceBrackets(n),n=[n]):n=pe.splitTags(n,this.autoBreakBeforeWrap,this.autoBreakAfterWrap);let r=[];n.forEach(i=>{let o=-1;i===` `?o=this._appendTag(` `,` `,!1,-1,"wrap"):o=this._appendTag(i),o!==-1&&r.push(o)}),this.updatePrompt(),this.autoTranslateToEnglish||this.autoTranslateToLocal?this.$nextTick(()=>{let i=!(this.tagCompleteFile&&this.onlyCsvOnAuto);this.autoTranslateToEnglish?this.translates(r,!1,i).finally(()=>{this.updateTags()}):this.autoTranslateToLocal&&this.translates(r,!0,i).finally(()=>{this.updateTags()})}):this.updateTags()}}else this.removeAutocompleteResultsSelected()},onAppendTagKeyUp(e){this.$refs.promptTagAppend.value===""||this.$refs.promptTagAppend.value.trim()===""?(this.$refs.promptTagAppend.value="",this.showAppendList=!0,e.keyCode===38||e.keyCode===40?this.appendListChildSelected===null?this.selectAppendList(e.keyCode===40):this.selectAppendListChild(e.keyCode===40):e.keyCode===37||e.keyCode===39?this.appendListSelected!==null&&(e.keyCode===37?(this.appendListChildSelected=null,this.scrollAppendListChild()):this.appendList[this.appendListSelected].children.length===0?this.appendListChildSelected=null:(this.appendListChildSelected=0,this.scrollAppendListChild())):e.keyCode===13&&(this._appendTagByList(),this.scrollAppendListChild(),this.appendListSelected=null,this.appendListChildSelected=null)):this.showAppendList=!1},onAppendGroupClick(e,t,n){if(e!==null){if(this.appendListSelected=e,t===null){if(this.appendList[this.appendListSelected].children.length>0)return}else this.appendListChildSelected=t;this._appendTagByList()}},onAppendListChildMouseLeave(e,t,n){this.appendListSelected=null,this.appendListChildSelected=null},onAppendListChildMouseEnter(e,t,n){this.appendListSelected=e,this.appendListChildSelected=t},_appendTagByList(){if(this.appendListSelected===null)return;const e=this.appendList[this.appendListSelected];let t=null;e.children.length>0&&this.appendListChildSelected!==null&&(t=e.children[this.appendListChildSelected]);let n=[];switch(e.type){case"wrap":n.push({value:` `,localValue:` -`,disabled:!1,type:"wrap"});break;case"lora":break;case"favorite":case"history":t&&t.tags.forEach(r=>{n.push({value:r.value,localValue:r.localValue,disabled:r.disabled,type:r.type||"text"})});break}n.length<=0||(n.forEach(r=>{this._appendTag(r.value,r.localValue,r.disabled,-1,r.type)}),this.updateTags())},getAutocompleteResults(){if(!this.autocompleteResults){const e=this.$refs.promptTagAppend.parentElement.querySelector(".autocompleteResults");e&&(this.autocompleteResults=e,this.autocompleteResults.getAttribute("data-mousemove")!=="true"&&(this.autocompleteResults.setAttribute("data-mousemove","true"),this.autocompleteResults.addEventListener("mousemove",t=>{this.bindAutocompleteResultsClick()})))}return this.autocompleteResults},removeAutocompleteResultsSelected(){const e=this.getAutocompleteResults();return e?(e.querySelectorAll("li").forEach(t=>{t.classList.remove("selected")}),!0):!1},getAutocompleteResultsSelected(){const e=this.getAutocompleteResults();if(!e)return null;const t=e.querySelector("li.selected");return t||null},getAutocompleteResultsSelectedText(e=null){if(!e&&(e=this.getAutocompleteResultsSelected(),!e))return null;const r=e.querySelector(".acListItem").innerText.match(/\[(.+?)\]/);return r?r[1]:null},bindAutocompleteResultsClick(){if(this.getAutocompleteResults(),!this.autocompleteResults)return;this.autocompleteResults.querySelectorAll("li").forEach(t=>{t.getAttribute("physton-on-clicked")!=="true"&&(t.setAttribute("physton-on-clicked","true"),t.addEventListener("click",()=>{this.onAutocompleteResultsClicked(t)}))})},onAutocompleteResultsClicked(e){const t=this.getAutocompleteResultsSelectedText(e);setTimeout(()=>{let n=this.$refs.promptTagAppend.value.replace(/,\s*$/,"");this.$refs.promptTagAppend.value="",n=n.replace(/\s*,\s*$/,"").trim(),ve.hasBrackets(n)&&(n=ve.replaceBrackets(n)),this._appendTag(n,t),this.updateTags()},300)},onSettingBoxMouseEnter(){this.favorites=typeof window.phystonPromptfavorites=="object"?window.phystonPromptfavorites:[]},getCurrentTypeFavorites(){let e=[];return this.favorites.forEach(t=>{if(this.neg){if(t.type!=="negative_prompt")return}else if(t.type!=="prompt")return;e.push(t)}),e},onAutoInputPromptChange(){this.gradioAPI.setData(this.autoInputPromptKey,this.autoInputPrompt).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},initAutoInputPrompt(){this.autoInputPromptKey="autoInputPrompt-"+this.name,this.gradioAPI.getData(this.autoInputPromptKey).then(e=>{if(e!==null)if(this.autoInputPrompt=e,this.autoInputPrompt==="last")this.gradioAPI.getLatestHistory(this.historyKey).then(t=>{this.useHistory(t)});else{const t=()=>{if(typeof window.phystonPromptfavorites=="object"&&window.phystonPromptfavorites.length>0){for(let n of window.phystonPromptfavorites)for(let r of n.list)if(r.id===this.autoInputPrompt){this.useFavorite(r);return}return}setTimeout(t,100)};setTimeout(t,100)}})}}},vw={data(){return{dropStartX:0,dropStartY:0,dropEndX:0,dropEndY:0,dropOffsetX:0,dropOffsetY:0,dropIsSelecting:!1,dropIsStart:!1,dropIsEnd:!1,dropArea:{top:0,left:0,width:0,height:0},dropTags:[],dropTimeId:0}},methods:{_dropOver(){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!1,this.dropTags=[];for(let e=0;ethis.dropArea.left+this.dropArea.width||i>this.dropArea.top+this.dropArea.height)?(e.push(n.getAttribute("data-id")),n.classList.add("drop-selected")):n.classList.remove("drop-selected"),this.dropTags=e}},onDropMouseUp(e){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!0,this.$refs.dropSelectBtns.style.left=this.$refs.dropSelectBox.style.left,this.$refs.dropSelectBtns.style.top=this.$refs.dropSelectBox.style.top},_getDropTags(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.find(r=>r.id===t);n&&e.push(n)}),e},_getDropIndexes(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.findIndex(r=>r.id===t);n!==-1&&e.push(n)}),e},_getDropTagsEle(){let e=[];return this.dropTags.forEach(t=>{let n=this.$refs.promptTagsList.querySelector(`.prompt-tag[data-id="${t}"]`);n&&e.push(n)}),e},onDropCopy(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.copy(t)},onDropFavorite(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.gradioAPI.pushFavorite(this.favoriteKey,e,t,"").then(n=>{n?(this.$toastr.success(this.getLang("success")),this.$emit("refreshFavorites",this.favoriteKey)):this.$toastr.error(this.getLang("failed"))}).catch(n=>{this.$toastr.error(this.getLang("failed"))})},onDropDisable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!0}),this.updateTags()},onDropEnable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!1}),this.updateTags()},onDropDelete(){let e=this._getDropIndexes();this._dropOver(),e.sort((t,n)=>n-t),e.forEach(t=>{this.tags.splice(t,1)}),this.updateTags()}}};var Vc="__autosizeInputGhost",yw={" ":"nbsp","<":"lt",">":"gt"};function bw(e){return"&"+yw[e]+";"}function Cw(e){return e.replace(/\s|<|>/g,bw)}function _w(){var e=document.createElement("div");return e.id=Vc,e.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",document.body.appendChild(e),e}var ww=function(e,t){var n=window.getComputedStyle(e),r="box-sizing:"+n.boxSizing+";border-left:"+n.borderLeftWidth+" solid red;border-right:"+n.borderRightWidth+" solid red;font-family:"+n.fontFamily+";font-feature-settings:"+n.fontFeatureSettings+";font-kerning:"+n.fontKerning+";font-size:"+n.fontSize+";font-stretch:"+n.fontStretch+";font-style:"+n.fontStyle+";font-variant:"+n.fontVariant+";font-variant-caps:"+n.fontVariantCaps+";font-variant-ligatures:"+n.fontVariantLigatures+";font-variant-numeric:"+n.fontVariantNumeric+";font-weight:"+n.fontWeight+";letter-spacing:"+n.letterSpacing+";margin-left:"+n.marginLeft+";margin-right:"+n.marginRight+";padding-left:"+n.paddingLeft+";padding-right:"+n.paddingRight+";text-indent:"+n.textIndent+";text-transform:"+n.textTransform;function i(){var s=e.value||e.getAttribute("placeholder")||"",l=document.getElementById(Vc)||_w();l.style.cssText+=r,l.innerHTML=Cw(s);var c=window.getComputedStyle(l).width;return e.style.width=c,c}e.addEventListener("input",i);var o=i();return t&&t.minWidth&&o!=="0px"&&(e.style.minWidth=o),function(){e.removeEventListener("input",i);var s=document.getElementById(Vc);s&&s.parentNode.removeChild(s)}};const Tw=Ol(ww),xw={data(){return{tagClickTimeId:0}},mounted(){ve.gradioApp().addEventListener("mousemove",()=>{this.$refs.highlightPrompt.hide()})},methods:{_setTag(e){typeof e.type=="string"&&e.type==="wrap"?(e.weightNum=1,e.incWeight=0,e.decWeight=0):(e.weightNum=ve.getTagWeightNum(e.value),e.weightNum=e.weightNum<=0?1:e.weightNum,e.incWeight=ve.getTagIncWeight(e.value),e.decWeight=ve.getTagDecWeight(e.value)),this._setTagClass(e),this.$nextTick(()=>{this._setTagHeight(e)})},_setTagHeight(e){let t=10,n=setInterval(()=>{if(t--,t<=0&&clearInterval(n),!this.$refs["promptTagValue-"+e.id]||!this.$refs["promptTagValue-"+e.id][0])return!1;clearInterval(n);let r=this.$refs["promptTagValue-"+e.id][0],i=r.offsetHeight;r.parentNode.style.height=i+"px",this.$refs["promptTagEdit-"+e.id]&&(this.$refs["promptTagEdit-"+e.id][0].style.height=i+"px"),this.$refs["promptTagDelete-"+e.id]&&(this.$refs["promptTagDelete-"+e.id][0].style.height=i+"px")},50)},_getTagType(e){},_setTagClass(e){if(e.isLora=!1,e.loraExists=!1,e.isLyco=!1,e.lycoExists=!1,e.isEmbedding=!1,!(typeof e.type=="string"&&e.type==="wrap")){const n=e.value.match(ve.loraRegex);if(n){e.isLora=!0;const r=this.loraExists(n[1]);r!==!1&&(e.loraExists=!0,e.loraName=r)}if(!e.isLora){const r=e.value.match(ve.lycoRegex);if(r){e.isLyco=!0;const i=this.lycoExists(r[1]);i!==!1&&(e.lycoExists=!0,e.lycoName=i)}}if(!e.isLora&&!e.isLyco){const r=this.embeddingExists(e.value);if(r!==!1)e.isEmbedding=!0,e.value=r;else{let i=e.value;const o=ve.hasBrackets(i);(o[0]==="("&&o[1]===")"||o[0]==="["&&o[1]==="]")&&(i=ve.setLayers(i,0,o[0],o[1]),i=i.replace(ve.weightNumRegex,"$1"),this.embeddingExists(i)!==!1&&(e.isEmbedding=!0))}}}let t=["prompt-tag-value"];return e.isLora?(t.push("lora-tag"),e.loraExists||t.push("lora-not-exists")):e.isLyco?(t.push("lyco-tag"),e.lycoExists||t.push("lyco-not-exists")):e.isEmbedding?t.push("embedding-tag"):this.neg&&t.push("neg-tag"),e.classes=t,t},_setTagById(e,t=null,n=null){let r=this.tags.find(i=>i.id===e);return r?(t!==null&&(r.value=t),n!==null&&(r.localValue=n),r):!1},_isTagBlacklist(e){if(typeof e.type=="string"&&e.type==="wrap")return!1;if(e.isLora){if(this.blacklist.lora&&this.blacklist.lora.includes(e.loraName))return!0}else if(e.isLyco){if(this.blacklist.lycoris&&this.blacklist.lycoris.includes(e.lycoName))return!0}else if(e.isEmbedding){if(this.blacklist.embedding&&this.blacklist.embedding.includes(e.value))return!0}else if(this.neg){if(this.blacklist.negative_prompt&&this.blacklist.negative_prompt.includes(e.value))return!0}else if(this.blacklist.prompt&&this.blacklist.prompt.includes(e.value))return!0;return!1},_appendTag(e,t="",n=!1,r=-1,i="text"){if(e==="")return-1;const o=Date.now()+(Math.random()*1e6).toFixed(0);let s={id:o,value:e==null||e===!1?"":e,localValue:t==null||t===!1?"":t,disabled:n,type:i};return this._setTag(s),this._isTagBlacklist(s)?-1:(r>=0?this.tags.splice(r,0,s):r=this.tags.push(s),this.$nextTick(()=>{this.$refs["promptTagEdit-"+o]&&Tw(this.$refs["promptTagEdit-"+o][0])}),r-1)},renderTag(e){let t=this.tags.find(r=>r.id===e);if(!t)return"";let n=t.value;if(n==="BREAK"&&(this.autoBreakBeforeWrap||this.autoBreakAfterWrap))n='
---------------------
BREAK
---------------------
';else if(n=ve.escapeHtml(n),t.incWeight>0){n=ve.setLayers(n,0,"(",")"),n='
'+n+"
";let r='
'+"(".repeat(t.incWeight)+"
",i='
'+")".repeat(t.incWeight)+"
";n=r+n+i}else if(t.decWeight>0){n=ve.setLayers(n,0,"[","]"),n='
'+n+"
";let r='
'+"[".repeat(t.decWeight)+"
",i='
'+"]".repeat(t.decWeight)+"
";n=r+n+i}else n='
'+n+"
";return n},isFavorite(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;if(typeof window.phystonPromptfavorites=="object"){for(const n of window.phystonPromptfavorites)if(n.key===this.favoriteKey){for(const r of n.list)if(r.tags.length===1&&r.tags[0].value===t.value)return r.id}}return!1},onTagMouseEnter(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;t.isFavorite=this.isFavorite(t.id)},onTagMouseMove(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.$refs.highlightPrompt.show(t)},onTagClick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.tagClickTimeId&&clearTimeout(this.tagClickTimeId),this.tagClickTimeId=setTimeout(()=>{this.editing={},this.editing[t.id]=!0,this.$forceUpdate(),this.$nextTick(()=>{const n=this.$refs["promptTagEdit-"+t.id][0];n.focus(),n.dispatchEvent(new Event("input"))}),clearTimeout(this.tagClickTimeId)},250)},onTagDblclick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;clearTimeout(this.tagClickTimeId),this.onDisabledTagClick(t.id)},onTagInputBlur(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.editing[t.id]=!1},onTagInputKeyDown(e,t){if(t.keyCode===13){let n=this.tags.find(r=>r.id===e);if(!n)return!1;this.editing[n.id]=!1,n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())}},onTagInputChange(e,t){let n=this.tags.find(r=>r.id===e);if(!n)return!1;n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())},onTagWeightNumChange(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return!1;if(t=typeof t=="number"||typeof a=="string"?t:t.target.value,n.weightNum==t)return;let r=t,i=n.value,o=n.localValue;if(r>0){if(r===1&&!this.autoKeepWeightOne){const s=ve.hasBrackets(i);s[0]==="("&&s[1]===")"&&(i=ve.setLayers(i,0,s[0],s[1]),o!==""&&(o=ve.setLayers(o,0,s[0],s[1]))),i=i.replace(ve.weightNumRegex,"$1"),o!==""&&(o=o.replace(ve.weightNumRegex,"$1"))}else{if(!ve.weightNumRegex.test(i)){let s=ve.hasBrackets(i);s?(i=ve.setLayers(i,1,s[0],s[1],":"+r),o!==""&&(o=ve.setLayers(o,1,s[0],s[1],":"+r))):(i=i+":"+r,o!==""&&(o=o+":"+r))}ve.hasBrackets(i)||(i=ve.setLayers(i,1,"(",")"),o!==""&&(o=ve.setLayers(o,1,"(",")")))}i!==n.value&&(n.value=i,o!==""&&(n.localValue=o),this._setTag(n))}else{const s=ve.hasBrackets(i);s[0]==="<"&&s[1]===">"?r=.1:this.autoKeepWeightZero?(n.value=i.replace(ve.weightNumRegex,"$1:0"),o!==""&&(n.localValue=n.localValue.replace(ve.weightNumRegex,"$1:0"))):(n.value=i.replace(ve.weightNumRegex,"$1"),o!==""&&(n.localValue=n.localValue.replace(ve.weightNumRegex,"$1")))}n.weightNum=r,this.updateTags()},onDeleteTagClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return!1;let n=this.tags.indexOf(t);this.tags.splice(n,1),this.updateTags()},onFavoriteTagClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return!1;let n=this.isFavorite(t.id);n?this.gradioAPI.unFavorite(this.favoriteKey,n).then(r=>{r&&(t.isFavorite=!1,this.$emit("refreshFavorites",this.favoriteKey))}):this.gradioAPI.pushFavorite(this.favoriteKey,[t],t.value,t.localValue===""?t.value:t.localValue).then(r=>{r&&(t.isFavorite=!0,this.$emit("refreshFavorites",this.favoriteKey))})},onDisabledTagClick(e){let t=this.tags.find(n=>n.id===e);t&&(t.disabled=!t.disabled,this.updateTags())},onIncWeightClick(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return;let r=n.value,i=n.localValue;r=ve.setLayers(r,0,"[","]"),i!==""&&(i=ve.setLayers(i,0,"[","]"));let o=n.incWeight;o+=t,o<0&&(o=0),n.incWeight=o,n.decWeight=0,r=ve.setLayers(r,o,"(",")"),i!==""&&(i=ve.setLayers(i,o,"(",")")),n.value=r,i!==""&&(n.localValue=i),this.updateTags()},onDecWeightClick(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return;let r=n.value,i=n.localValue;r=ve.setLayers(r,0,"(",")"),i!==""&&(i=ve.setLayers(i,0,"(",")"));let o=n.decWeight;o+=t,o<0&&(o=0),n.incWeight=0,n.decWeight=o,r=ve.setLayers(r,o,"[","]"),i!==""&&(i=ve.setLayers(i,o,"[","]")),n.value=r,i!==""&&(n.localValue=i),this.updateTags()},onWrapTagClick(e){let t=this.tags.find(o=>o.id===e);if(!t)return;let n=this.tags.indexOf(t),r=this._appendTag(` +`,disabled:!1,type:"wrap"});break;case"lora":break;case"favorite":case"history":t&&t.tags.forEach(r=>{n.push({value:r.value,localValue:r.localValue,disabled:r.disabled,type:r.type||"text"})});break}n.length<=0||(n.forEach(r=>{this._appendTag(r.value,r.localValue,r.disabled,-1,r.type)}),this.updateTags())},getAutocompleteResults(){if(!this.autocompleteResults){const e=this.$refs.promptTagAppend.parentElement.querySelector(".autocompleteResults");e&&(this.autocompleteResults=e,this.autocompleteResults.getAttribute("data-mousemove")!=="true"&&(this.autocompleteResults.setAttribute("data-mousemove","true"),this.autocompleteResults.addEventListener("mousemove",t=>{this.bindAutocompleteResultsClick()})))}return this.autocompleteResults},removeAutocompleteResultsSelected(){const e=this.getAutocompleteResults();return e?(e.querySelectorAll("li").forEach(t=>{t.classList.remove("selected")}),!0):!1},getAutocompleteResultsSelected(){const e=this.getAutocompleteResults();if(!e)return null;const t=e.querySelector("li.selected");return t||null},getAutocompleteResultsSelectedText(e=null){if(!e&&(e=this.getAutocompleteResultsSelected(),!e))return null;const r=e.querySelector(".acListItem").innerText.match(/\[(.+?)\]/);return r?r[1]:null},bindAutocompleteResultsClick(){if(this.getAutocompleteResults(),!this.autocompleteResults)return;this.autocompleteResults.querySelectorAll("li").forEach(t=>{t.getAttribute("physton-on-clicked")!=="true"&&(t.setAttribute("physton-on-clicked","true"),t.addEventListener("click",()=>{this.onAutocompleteResultsClicked(t)}))})},onAutocompleteResultsClicked(e){const t=this.getAutocompleteResultsSelectedText(e);setTimeout(()=>{let n=this.$refs.promptTagAppend.value.replace(/,\s*$/,"");this.$refs.promptTagAppend.value="",n=n.replace(/\s*,\s*$/,"").trim(),pe.hasBrackets(n)&&(n=pe.replaceBrackets(n)),this._appendTag(n,t),this.updateTags()},300)},onSettingBoxMouseEnter(){this.favorites=typeof window.phystonPromptfavorites=="object"?window.phystonPromptfavorites:[]},getCurrentTypeFavorites(){let e=[];return this.favorites.forEach(t=>{if(this.neg){if(t.type!=="negative_prompt")return}else if(t.type!=="prompt")return;e.push(t)}),e},onAutoInputPromptChange(){this.gradioAPI.setData(this.autoInputPromptKey,this.autoInputPrompt).then(()=>{this.$toastr.success(this.getLang("success"))}).catch(()=>{this.$toastr.error(this.getLang("failed"))})},initAutoInputPrompt(){this.autoInputPromptKey="autoInputPrompt-"+this.name,this.gradioAPI.getData(this.autoInputPromptKey).then(e=>{if(e!==null)if(this.autoInputPrompt=e,this.autoInputPrompt==="last")this.gradioAPI.getLatestHistory(this.historyKey).then(t=>{this.useHistory(t)});else{const t=()=>{if(typeof window.phystonPromptfavorites=="object"&&window.phystonPromptfavorites.length>0){for(let n of window.phystonPromptfavorites)for(let r of n.list)if(r.id===this.autoInputPrompt){this.useFavorite(r);return}return}setTimeout(t,100)};setTimeout(t,100)}})}}},mw={data(){return{dropStartX:0,dropStartY:0,dropEndX:0,dropEndY:0,dropOffsetX:0,dropOffsetY:0,dropIsSelecting:!1,dropIsStart:!1,dropIsEnd:!1,dropArea:{top:0,left:0,width:0,height:0},dropTags:[],dropTimeId:0}},methods:{_dropOver(){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!1,this.dropTags=[];for(let e=0;ethis.dropArea.left+this.dropArea.width||i>this.dropArea.top+this.dropArea.height)?(e.push(n.getAttribute("data-id")),n.classList.add("drop-selected")):n.classList.remove("drop-selected"),this.dropTags=e}},onDropMouseUp(e){this.dropIsSelecting=!1,this.dropIsStart=!1,this.dropIsEnd=!0,this.$refs.dropSelectBtns.style.left=this.$refs.dropSelectBox.style.left,this.$refs.dropSelectBtns.style.top=this.$refs.dropSelectBox.style.top},_getDropTags(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.find(r=>r.id===t);n&&e.push(n)}),e},_getDropIndexes(){let e=[];return this.dropTags.forEach(t=>{let n=this.tags.findIndex(r=>r.id===t);n!==-1&&e.push(n)}),e},_getDropTagsEle(){let e=[];return this.dropTags.forEach(t=>{let n=this.$refs.promptTagsList.querySelector(`.prompt-tag[data-id="${t}"]`);n&&e.push(n)}),e},onDropCopy(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.copy(t)},onDropFavorite(){let e=this._getDropTags();this._dropOver();let t=this.genPrompt(e,!0);this.gradioAPI.pushFavorite(this.favoriteKey,e,t,"").then(n=>{n?(this.$toastr.success(this.getLang("success")),this.$emit("refreshFavorites",this.favoriteKey)):this.$toastr.error(this.getLang("failed"))}).catch(n=>{this.$toastr.error(this.getLang("failed"))})},onDropDisable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!0}),this.updateTags()},onDropEnable(){let e=this._getDropTags();this._dropOver(),e.forEach(t=>{t.disabled=!1}),this.updateTags()},onDropDelete(){let e=this._getDropIndexes();this._dropOver(),e.sort((t,n)=>n-t),e.forEach(t=>{this.tags.splice(t,1)}),this.updateTags()}}};var Kc="__autosizeInputGhost",vw={" ":"nbsp","<":"lt",">":"gt"};function yw(e){return"&"+vw[e]+";"}function bw(e){return e.replace(/\s|<|>/g,yw)}function Cw(){var e=document.createElement("div");return e.id=Kc,e.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;",document.body.appendChild(e),e}var _w=function(e,t){var n=window.getComputedStyle(e),r="box-sizing:"+n.boxSizing+";border-left:"+n.borderLeftWidth+" solid red;border-right:"+n.borderRightWidth+" solid red;font-family:"+n.fontFamily+";font-feature-settings:"+n.fontFeatureSettings+";font-kerning:"+n.fontKerning+";font-size:"+n.fontSize+";font-stretch:"+n.fontStretch+";font-style:"+n.fontStyle+";font-variant:"+n.fontVariant+";font-variant-caps:"+n.fontVariantCaps+";font-variant-ligatures:"+n.fontVariantLigatures+";font-variant-numeric:"+n.fontVariantNumeric+";font-weight:"+n.fontWeight+";letter-spacing:"+n.letterSpacing+";margin-left:"+n.marginLeft+";margin-right:"+n.marginRight+";padding-left:"+n.paddingLeft+";padding-right:"+n.paddingRight+";text-indent:"+n.textIndent+";text-transform:"+n.textTransform;function i(){var s=e.value||e.getAttribute("placeholder")||"",l=document.getElementById(Kc)||Cw();l.style.cssText+=r,l.innerHTML=bw(s);var c=window.getComputedStyle(l).width;return e.style.width=c,c}e.addEventListener("input",i);var o=i();return t&&t.minWidth&&o!=="0px"&&(e.style.minWidth=o),function(){e.removeEventListener("input",i);var s=document.getElementById(Kc);s&&s.parentNode.removeChild(s)}};const ww=El(_w),Tw={data(){return{tagClickTimeId:0}},mounted(){pe.gradioApp().addEventListener("mousemove",()=>{this.$refs.highlightPrompt.hide()})},methods:{_setTag(e){typeof e.type=="string"&&e.type==="wrap"?(e.weightNum=1,e.incWeight=0,e.decWeight=0):(e.weightNum=pe.getTagWeightNum(e.value),e.weightNum=e.weightNum<=0?1:e.weightNum,e.incWeight=pe.getTagIncWeight(e.value),e.decWeight=pe.getTagDecWeight(e.value)),this._setTagClass(e),this.$nextTick(()=>{this._setTagHeight(e)})},_setTagHeight(e){let t=10,n=setInterval(()=>{if(t--,t<=0&&clearInterval(n),!this.$refs["promptTagValue-"+e.id]||!this.$refs["promptTagValue-"+e.id][0])return!1;clearInterval(n);let r=this.$refs["promptTagValue-"+e.id][0],i=r.offsetHeight;r.parentNode.style.height=i+"px",this.$refs["promptTagEdit-"+e.id]&&(this.$refs["promptTagEdit-"+e.id][0].style.height=i+"px"),this.$refs["promptTagDelete-"+e.id]&&(this.$refs["promptTagDelete-"+e.id][0].style.height=i+"px")},50)},_getTagType(e){},_setTagClass(e){if(e.isLora=!1,e.loraExists=!1,e.isLyco=!1,e.lycoExists=!1,e.isEmbedding=!1,!(typeof e.type=="string"&&e.type==="wrap")){const n=e.value.match(pe.loraRegex);if(n){e.isLora=!0;const r=this.loraExists(n[1]);r!==!1&&(e.loraExists=!0,e.loraName=r)}if(!e.isLora){const r=e.value.match(pe.lycoRegex);if(r){e.isLyco=!0;const i=this.lycoExists(r[1]);i!==!1&&(e.lycoExists=!0,e.lycoName=i)}}if(!e.isLora&&!e.isLyco){const r=this.embeddingExists(e.value);if(r!==!1)e.isEmbedding=!0,e.value=r;else{let i=e.value;const o=pe.hasBrackets(i);(o[0]==="("&&o[1]===")"||o[0]==="["&&o[1]==="]")&&(i=pe.setLayers(i,0,o[0],o[1]),i=i.replace(pe.weightNumRegex,"$1"),this.embeddingExists(i)!==!1&&(e.isEmbedding=!0))}}}let t=["prompt-tag-value"];return e.isLora?(t.push("lora-tag"),e.loraExists||t.push("lora-not-exists")):e.isLyco?(t.push("lyco-tag"),e.lycoExists||t.push("lyco-not-exists")):e.isEmbedding?t.push("embedding-tag"):this.neg&&t.push("neg-tag"),e.classes=t,t},_setTagById(e,t=null,n=null){let r=this.tags.find(i=>i.id===e);return r?(t!==null&&(r.value=t),n!==null&&(r.localValue=n),r):!1},_isTagBlacklist(e){if(typeof e.type=="string"&&e.type==="wrap")return!1;if(e.isLora){if(this.blacklist.lora&&this.blacklist.lora.includes(e.loraName))return!0}else if(e.isLyco){if(this.blacklist.lycoris&&this.blacklist.lycoris.includes(e.lycoName))return!0}else if(e.isEmbedding){if(this.blacklist.embedding&&this.blacklist.embedding.includes(e.value))return!0}else if(this.neg){if(this.blacklist.negative_prompt&&this.blacklist.negative_prompt.includes(e.value))return!0}else if(this.blacklist.prompt&&this.blacklist.prompt.includes(e.value))return!0;return!1},_appendTag(e,t="",n=!1,r=-1,i="text"){if(e==="")return-1;const o=Date.now()+(Math.random()*1e6).toFixed(0);let s={id:o,value:e==null||e===!1?"":e,localValue:t==null||t===!1?"":t,disabled:n,type:i};return this._setTag(s),this._isTagBlacklist(s)?-1:(r>=0?this.tags.splice(r,0,s):r=this.tags.push(s),this.$nextTick(()=>{this.$refs["promptTagEdit-"+o]&&ww(this.$refs["promptTagEdit-"+o][0])}),r-1)},renderTag(e){let t=this.tags.find(r=>r.id===e);if(!t)return"";let n=t.value;if(n==="BREAK"&&(this.autoBreakBeforeWrap||this.autoBreakAfterWrap))n='
---------------------
BREAK
---------------------
';else if(n=pe.escapeHtml(n),t.incWeight>0){n=pe.setLayers(n,0,"(",")"),n='
'+n+"
";let r='
'+"(".repeat(t.incWeight)+"
",i='
'+")".repeat(t.incWeight)+"
";n=r+n+i}else if(t.decWeight>0){n=pe.setLayers(n,0,"[","]"),n='
'+n+"
";let r='
'+"[".repeat(t.decWeight)+"
",i='
'+"]".repeat(t.decWeight)+"
";n=r+n+i}else n='
'+n+"
";return n},isFavorite(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;if(typeof window.phystonPromptfavorites=="object"){for(const n of window.phystonPromptfavorites)if(n.key===this.favoriteKey){for(const r of n.list)if(r.tags.length===1&&r.tags[0].value===t.value)return r.id}}return!1},onTagMouseEnter(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;t.isFavorite=this.isFavorite(t.id)},onTagMouseMove(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.$refs.highlightPrompt.show(t)},onTagClick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.tagClickTimeId&&clearTimeout(this.tagClickTimeId),this.tagClickTimeId=setTimeout(()=>{this.editing={},this.editing[t.id]=!0,this.$forceUpdate(),this.$nextTick(()=>{const n=this.$refs["promptTagEdit-"+t.id][0];n.focus(),n.dispatchEvent(new Event("input"))}),clearTimeout(this.tagClickTimeId)},250)},onTagDblclick(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;clearTimeout(this.tagClickTimeId),this.onDisabledTagClick(t.id)},onTagInputBlur(e){let t=this.tags.find(n=>n.id===e);if(!t)return!1;this.editing[t.id]=!1},onTagInputKeyDown(e,t){if(t.keyCode===13){let n=this.tags.find(r=>r.id===e);if(!n)return!1;this.editing[n.id]=!1,n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())}},onTagInputChange(e,t){let n=this.tags.find(r=>r.id===e);if(!n)return!1;n.value!==t.target.value&&(n.value=t.target.value,this._setTag(n),this.updateTags())},onTagWeightNumChange(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return!1;if(t=typeof t=="number"||typeof a=="string"?t:t.target.value,n.weightNum==t)return;let r=t,i=n.value,o=n.localValue;if(r>0){if(r===1&&!this.autoKeepWeightOne){const s=pe.hasBrackets(i);s[0]==="("&&s[1]===")"&&(i=pe.setLayers(i,0,s[0],s[1]),o!==""&&(o=pe.setLayers(o,0,s[0],s[1]))),i=i.replace(pe.weightNumRegex,"$1"),o!==""&&(o=o.replace(pe.weightNumRegex,"$1"))}else{if(!pe.weightNumRegex.test(i)){let s=pe.hasBrackets(i);s?(i=pe.setLayers(i,1,s[0],s[1],":"+r),o!==""&&(o=pe.setLayers(o,1,s[0],s[1],":"+r))):(i=i+":"+r,o!==""&&(o=o+":"+r))}pe.hasBrackets(i)||(i=pe.setLayers(i,1,"(",")"),o!==""&&(o=pe.setLayers(o,1,"(",")")))}i!==n.value&&(n.value=i,o!==""&&(n.localValue=o),this._setTag(n))}else{const s=pe.hasBrackets(i);s[0]==="<"&&s[1]===">"?r=.1:this.autoKeepWeightZero?(n.value=i.replace(pe.weightNumRegex,"$1:0"),o!==""&&(n.localValue=n.localValue.replace(pe.weightNumRegex,"$1:0"))):(n.value=i.replace(pe.weightNumRegex,"$1"),o!==""&&(n.localValue=n.localValue.replace(pe.weightNumRegex,"$1")))}n.weightNum=r,this.updateTags()},onDeleteTagClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return!1;let n=this.tags.indexOf(t);this.tags.splice(n,1),this.updateTags()},onFavoriteTagClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return!1;let n=this.isFavorite(t.id);n?this.gradioAPI.unFavorite(this.favoriteKey,n).then(r=>{r&&(t.isFavorite=!1,this.$emit("refreshFavorites",this.favoriteKey))}):this.gradioAPI.pushFavorite(this.favoriteKey,[t],t.value,t.localValue===""?t.value:t.localValue).then(r=>{r&&(t.isFavorite=!0,this.$emit("refreshFavorites",this.favoriteKey))})},onDisabledTagClick(e){let t=this.tags.find(n=>n.id===e);t&&(t.disabled=!t.disabled,this.updateTags())},onIncWeightClick(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return;let r=n.value,i=n.localValue;r=pe.setLayers(r,0,"[","]"),i!==""&&(i=pe.setLayers(i,0,"[","]"));let o=n.incWeight;o+=t,o<0&&(o=0),n.incWeight=o,n.decWeight=0,r=pe.setLayers(r,o,"(",")"),i!==""&&(i=pe.setLayers(i,o,"(",")")),n.value=r,i!==""&&(n.localValue=i),this.updateTags()},onDecWeightClick(e,t){let n=this.tags.find(s=>s.id===e);if(!n)return;let r=n.value,i=n.localValue;r=pe.setLayers(r,0,"(",")"),i!==""&&(i=pe.setLayers(i,0,"(",")"));let o=n.decWeight;o+=t,o<0&&(o=0),n.incWeight=0,n.decWeight=o,r=pe.setLayers(r,o,"[","]"),i!==""&&(i=pe.setLayers(i,o,"[","]")),n.value=r,i!==""&&(n.localValue=i),this.updateTags()},onWrapTagClick(e){let t=this.tags.find(o=>o.id===e);if(!t)return;let n=this.tags.indexOf(t),r=this._appendTag(` `,` -`,!1,-1,"wrap"),i=this.tags[r];this.tags.splice(r,1),this.tags.splice(n+1,0,i),this.updateTags()},onTranslateToLocalClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_local"]||this.translates([n],!0,!0).finally(()=>{this.updateTags()})},onTranslateToEnglishClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_en"]||this.translates([n],!1,!0).finally(()=>{this.updateTags()})}}},kw={data(){return{groupTagsActive:0,subGroupTagsActive:0,groupTagsColorKeyCache:{}}},watch:{groupTags:{handler(){for(let e of this.groupTags)for(let t of e.groups){if(t.type&&t.typ=="wrap")continue;let n=this.getTagsColorKey(e.name,t.name);this.groupTagsColor[n]||(this.groupTagsColor[n]=Et(ve.fitterInputColor(t.color)));for(let r in t.tags)this.groupTagsColorKeyCache[r]=n}},deep:!0,immediate:!0}},methods:{activeGroupTab(e){this.groupTagsActive=e,this.subGroupTagsActive=0;let t=this.$refs.groupTabsHeader.children[e].offsetLeft-this.$refs.groupTabsHeader.offsetWidth/2+this.$refs.groupTabsHeader.children[e].offsetWidth/2;this.$refs.groupTabsHeader.scrollTo({left:t,behavior:"smooth"})},activeSubGroupTab(e){this.subGroupTagsActive=e},onClickHideGroupTags(){this.$emit("update:hideGroupTags",!this.hideGroupTags)},onClickGroupTag(e,t){this._appendTag(t,e,!1,-1,"text"),this.updateTags()},getGroupTagTooltip(e,t){let n="";return e&&e!==t&&(n+=e+"
"),n+=t,n},getGroupTagStyle(e,t){let n={},r=this.getTagsColorKey(e,t),i="";return this.groupTagsColor[r]&&(i=this.groupTagsColor[r],ve.isColorTransparent(i)&&(i="")),i&&(n={background:i}),n},getTagsColorKey(e,t){return e+"||"+t},onTagsColorChange(e){this.$emit("update:groupTagsColor",this.groupTagsColor)},onClickResetTagsColor(e){for(let t of this.groupTags)for(let n of t.groups){if(n.type&&n.typ=="wrap")continue;let r=this.getTagsColorKey(t.name,n.name);e===r&&(this.groupTagsColor[e]=Et(ve.fitterInputColor(n.color)))}this.onTagsColorChange(e)},onClickClearTagsColor(e){this.groupTagsColor[e]=Et("rgba(0,0,0,0)"),this.onTagsColorChange(e)},getTagColorStyle(e){if(e.isLora||e.isLyco||e.isEmbedding)return{};if(!this.groupTagsColorKeyCache[e.value])return{};let t=this.groupTagsColorKeyCache[e.value];if(!this.groupTagsColor[t])return{};let n=this.groupTagsColor[t];return ve.isColorTransparent(n)?{}:{background:n}}}},Sw={name:"IconSvg",props:{name:{type:String,required:!0},svgName:{type:String,default:""}},data(){return{svgCode:""}},watch:{name:{handler:function(e,t){this.getSvg()},immediate:!1}},mounted(){this.getSvg()},methods:{getSvg(){if(!this.name)return;let e=this.svgName||this.name;if(window.loadingSvg=window.loadingSvg||{},window.isLoadSvg=window.isLoadSvg||{},window.isLoadSvg[e]){this.svgCode=localStorage.getItem("iconSVG-"+e);return}if(localStorage.getItem("iconSVG-"+e)&&(this.svgCode=localStorage.getItem("iconSVG-"+e)),window.loadingSvg[e]){const t=setInterval(()=>{window.loadingSvg[e]||(clearInterval(t),this.svgCode=localStorage.getItem("iconSVG-"+e))},10);return}window.loadingSvg[e]=!0,window.iconSvgHash||(window.iconSvgHash=new Date().getTime()),this.gradioAPI.styles("icons/"+e+".svg",window.iconSvgHash).then(t=>{this.svgCode=t,localStorage.setItem("iconSVG-"+e,t),window.isLoadSvg[e]=!0,window.loadingSvg[e]=!1}).catch(t=>{window.loadingSvg[e]=!1})}}},Aw=["innerHTML"];function Ew(e,t,n,r,i,o){return be((E(),H("div",{class:lt(["icon-svg","icon-svg-"+n.name]),"data-name":"name",innerHTML:i.svgCode},null,10,Aw)),[[Ot,i.svgCode]])}const sr=En(Sw,[["render",Ew]]),Ow={name:"HighlightPrompt",props:{textarea:{type:Object,required:!0},hideDefaultInput:{type:Boolean,default:!1}},data(){return{scrollTop:0,showTimeId:0,hideTimeId:0,lastHighLightTag:null}},watch:{},mounted(){},methods:{show(e){this.lastHighLightTag&&this.lastHighLightTag.value===e.value||(this.lastHighLightTag=e,this.showTimeId&&clearTimeout(this.showTimeId),this.showTimeId=setTimeout(()=>{this._show(e),this.showTimeId=0},10))},_show(e){if(this.hideDefaultInput)return this._hide();if(typeof e.type=="string"&&e.type==="wrap")return this._hide();let t=e.value,n=this.textarea.value;if(t===""||t.trim()==="")return this._hide();if(n===""||n.trim()==="")return this._hide();if(t=ve.escapeHtml(t),n=ve.escapeHtml(this.textarea.value),n.indexOf(t)===-1)return this._hide();this.textarea.parentNode.insertBefore(this.$refs.highlightPrompt,this.textarea.nextSibling);const i=window.getComputedStyle(this.textarea);for(const l of i)this.$refs.highlightPrompt.style[l]=i[l];this.$refs.highlightPrompt.style.display="block",this.textarea.style.display="none";let o="",s=n;for(;;){const l=s.indexOf(t);if(l===-1){o+=s;break}const c=l+t.length;o+=s.substring(0,l),o+='',o+=s.substring(l,c),o+="",s=s.substring(c)}this.$refs.highlightPrompt.innerHTML=o,this.$refs.highlightPrompt.scrollTop=this.scrollTop},hide(){this.lastHighLightTag=null,this.showTimeId&&clearTimeout(this.showTimeId),this.hideTimeId&&clearTimeout(this.hideTimeId),this.hideTimeId=setTimeout(()=>{this._hide(),this.hideTimeId=0},10)},_hide(){this.textarea.style.display="block",this.$refs.highlightPrompt.style.display="none",this.scrollTop=this.textarea.scrollTop}}};function Lw(e,t,n,r,i,o){return E(),H("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:t[0]||(t[0]=(...s)=>o.hide&&o.hide(...s))},null,512)}const Iw=En(Ow,[["render",Lw]]);function Pw(e){return yp()?(Qb(e),!0):!1}function Ws(e){return typeof e=="function"?e():jp(e)}const Cg=typeof window<"u",Ks=()=>{},Dw=Rw();function Rw(){var e;return Cg&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function _g(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const wg=e=>e();function Nw(e,t={}){let n,r,i=Ks;const o=l=>{clearTimeout(l),i(),i=Ks};return l=>{const c=Ws(e),d=Ws(t.maxWait);return n&&o(n),c<=0||d!==void 0&&d<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((h,p)=>{i=t.rejectOnCancel?p:h,d&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,h(l())},d)),n=setTimeout(()=>{r&&o(r),r=null,h(l())},c)})}}function Mw(e=wg){const t=Et(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:tc(t),pause:n,resume:r,eventFilter:i}}function ji(e,t=200,n={}){return _g(Nw(t,n),e)}function Lo(e,t=!0){Sh()?uc(e):t?e():Ja(e)}var Tg=Object.getOwnPropertySymbols,Fw=Object.prototype.hasOwnProperty,$w=Object.prototype.propertyIsEnumerable,Bw=(e,t)=>{var n={};for(var r in e)Fw.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tg)for(var r of Tg(e))t.indexOf(r)<0&&$w.call(e,r)&&(n[r]=e[r]);return n};function Hw(e,t,n={}){const r=n,{eventFilter:i=wg}=r,o=Bw(r,["eventFilter"]);return rr(e,_g(i,t),o)}var jw=Object.defineProperty,Uw=Object.defineProperties,Ww=Object.getOwnPropertyDescriptors,Ll=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Sg=(e,t,n)=>t in e?jw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kw=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Sg(e,n,t[n]);if(Ll)for(var n of Ll(t))kg.call(t,n)&&Sg(e,n,t[n]);return e},Vw=(e,t)=>Uw(e,Ww(t)),qw=(e,t)=>{var n={};for(var r in e)xg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ll)for(var r of Ll(e))t.indexOf(r)<0&&kg.call(e,r)&&(n[r]=e[r]);return n};function zw(e,t,n={}){const r=n,{eventFilter:i}=r,o=qw(r,["eventFilter"]),{eventFilter:s,pause:l,resume:c,isActive:d}=Mw(i);return{stop:Hw(e,t,Vw(Kw({},o),{eventFilter:s})),pause:l,resume:c,isActive:d}}function bn(e,t,n){return rr(e,(r,i,o)=>{r&&t(r,i,o)},n)}function Vs(e){var t;const n=Ws(e);return(t=n==null?void 0:n.$el)!=null?t:n}const qs=Cg?window:void 0;function zs(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=qs):[t,n,r,i]=e,!t)return Ks;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(h=>h()),o.length=0},l=(h,p,y,C)=>(h.addEventListener(p,y,C),()=>h.removeEventListener(p,y,C)),c=rr(()=>[Vs(t),Ws(i)],([h,p])=>{s(),h&&o.push(...n.flatMap(y=>r.map(C=>l(h,y,C,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Pw(d),d}let Ag=!1;function Gw(e,t,n={}){const{window:r=qs,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return;Dw&&!Ag&&(Ag=!0,Array.from(r.document.body.children).forEach(y=>y.addEventListener("click",Ks)),r.document.documentElement.addEventListener("click",Ks));let l=!0;const c=y=>i.some(C=>{if(typeof C=="string")return Array.from(r.document.querySelectorAll(C)).some(w=>w===y.target||y.composedPath().includes(w));{const w=Vs(C);return w&&(y.target===w||y.composedPath().includes(w))}}),h=[zs(r,"click",y=>{const C=Vs(e);if(!(!C||C===y.target||y.composedPath().includes(C))){if(y.detail===0&&(l=!c(y)),!l){l=!0;return}t(y)}},{passive:!0,capture:o}),zs(r,"pointerdown",y=>{const C=Vs(e);C&&(l=!y.composedPath().includes(C)&&!c(y))},{passive:!0}),s&&zs(r,"blur",y=>{setTimeout(()=>{var C;const w=Vs(e);((C=r.document.activeElement)==null?void 0:C.tagName)==="IFRAME"&&!(w!=null&&w.contains(r.document.activeElement))&&t(y)},0)})].filter(Boolean);return()=>h.forEach(y=>y())}const Il=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Pl="__vueuse_ssr_handlers__",Yw=Xw();function Xw(){return Pl in Il||(Il[Pl]=Il[Pl]||{}),Il[Pl]}function Jw(e,t){return Yw[e]||t}function Zw(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var Qw=Object.defineProperty,Eg=Object.getOwnPropertySymbols,eT=Object.prototype.hasOwnProperty,tT=Object.prototype.propertyIsEnumerable,Og=(e,t,n)=>t in e?Qw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lg=(e,t)=>{for(var n in t||(t={}))eT.call(t,n)&&Og(e,n,t[n]);if(Eg)for(var n of Eg(t))tT.call(t,n)&&Og(e,n,t[n]);return e};const nT={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Ig="vueuse-storage";function rT(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:d=!1,shallow:h,window:p=qs,eventFilter:y,onError:C=I=>{console.error(I)}}=r,w=(h?AC:Et)(t);if(!n)try{n=Jw("getDefaultStorage",()=>{var I;return(I=qs)==null?void 0:I.localStorage})()}catch(I){C(I)}if(!n)return w;const k=Ws(t),O=Zw(k),N=(i=r.serializer)!=null?i:nT[O],{pause:L,resume:K}=zw(w,()=>D(w.value),{flush:o,deep:s,eventFilter:y});return p&&l&&(zs(p,"storage",ue),zs(p,Ig,m)),ue(),w;function D(I){try{if(I==null)n.removeItem(e);else{const S=N.write(I),P=n.getItem(e);P!==S&&(n.setItem(e,S),p&&p.dispatchEvent(new CustomEvent(Ig,{detail:{key:e,oldValue:P,newValue:S,storageArea:n}})))}}catch(S){C(S)}}function Te(I){const S=I?I.newValue:n.getItem(e);if(S==null)return c&&k!==null&&n.setItem(e,N.write(k)),k;if(!I&&d){const P=N.read(S);return typeof d=="function"?d(P,k):O==="object"&&!Array.isArray(P)?Lg(Lg({},k),P):P}else return typeof S!="string"?S:N.read(S)}function m(I){ue(I.detail)}function ue(I){if(!(I&&I.storageArea!==n)){if(I&&I.key==null){w.value=k;return}if(!(I&&I.key!==e)){L();try{w.value=Te(I)}catch(S){C(S)}finally{I?Ja(K):K()}}}}}function qc(e,t,n={}){const{window:r=qs}=n;return rT(e,t,r==null?void 0:r.localStorage,n)}var Ui=Ui||{};Ui.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var n=e.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+e.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,r=e.visit(t.at),i=e.visit(t.style);return i&&(n+=" "+i),r&&(n+=" at "+r),n},"visit_default-radial":function(t){var n="",r=e.visit(t.at);return r&&(n+=r),n},"visit_extent-keyword":function(t){var n=t.value,r=e.visit(t.at);return r&&(n+=" at "+r),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,n){var r=t,i=e.visit(n.length);return i&&(r+=" "+i),r},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",r=t.length;return t.forEach(function(i,o){n+=e.visit(i),o0&&n("Invalid input not EOF"),z}function i(){return K(o)}function o(){return s("linear-gradient",e.linearGradient,c)||s("repeating-linear-gradient",e.repeatingLinearGradient,c)||s("radial-gradient",e.radialGradient,p)||s("repeating-radial-gradient",e.repeatingRadialGradient,p)}function s(z,ie,fe){return l(ie,function(nt){var Ve=fe();return Ve&&(je(e.comma)||n("Missing comma before color stops")),{type:z,orientation:Ve,colorStops:K(D)}})}function l(z,ie){var fe=je(z);if(fe){je(e.startCall)||n("Missing (");var nt=ie(fe);return je(e.endCall)||n("Missing )"),nt}}function c(){return d()||h()}function d(){return ye("directional",e.sideOrCorner,1)}function h(){return ye("angular",e.angleValue,1)}function p(){var z,ie=y(),fe;return ie&&(z=[],z.push(ie),fe=t,je(e.comma)&&(ie=y(),ie?z.push(ie):t=fe)),z}function y(){var z=C()||w();if(z)z.at=O();else{var ie=k();if(ie){z=ie;var fe=O();fe&&(z.at=fe)}else{var nt=N();nt&&(z={type:"default-radial",at:nt})}}return z}function C(){var z=ye("shape",/^(circle)/i,0);return z&&(z.style=J()||k()),z}function w(){var z=ye("shape",/^(ellipse)/i,0);return z&&(z.style=j()||k()),z}function k(){return ye("extent-keyword",e.extentKeywords,1)}function O(){if(ye("position",/^at/,0)){var z=N();return z||n("Missing positioning value"),z}}function N(){var z=L();if(z.x||z.y)return{type:"position",value:z}}function L(){return{x:j(),y:j()}}function K(z){var ie=z(),fe=[];if(ie)for(fe.push(ie);je(e.comma);)ie=z(),ie?fe.push(ie):n("One extra comma");return fe}function D(){var z=Te();return z||n("Expected color definition"),z.length=j(),z}function Te(){return ue()||S()||I()||m()}function m(){return ye("literal",e.literalColor,0)}function ue(){return ye("hex",e.hexColor,1)}function I(){return l(e.rgbColor,function(){return{type:"rgb",value:K(P)}})}function S(){return l(e.rgbaColor,function(){return{type:"rgba",value:K(P)}})}function P(){return je(e.number)[1]}function j(){return ye("%",e.percentageValue,1)||ee()||J()}function ee(){return ye("position-keyword",e.positionKeywords,1)}function J(){return ye("px",e.pixelValue,1)||ye("em",e.emValue,1)}function ye(z,ie,fe){var nt=je(ie);if(nt)return{type:z,value:nt[fe]}}function je(z){var ie,fe;return fe=/^[\n\r\t\s]+/.exec(t),fe&&Ne(fe[0].length),ie=z.exec(t),ie&&Ne(ie[0].length),ie}function Ne(z){t=t.substr(z)}return function(z){return t=z.toString(),r()}}();var iT=Ui.parse,oT=Ui.stringify,Fn="top",ar="bottom",lr="right",$n="left",zc="auto",Gs=[Fn,ar,lr,$n],Io="start",Ys="end",sT="clippingParents",Pg="viewport",Xs="popper",aT="reference",Dg=Gs.reduce(function(e,t){return e.concat([t+"-"+Io,t+"-"+Ys])},[]),Rg=[].concat(Gs,[zc]).reduce(function(e,t){return e.concat([t,t+"-"+Io,t+"-"+Ys])},[]),lT="beforeRead",uT="read",cT="afterRead",fT="beforeMain",dT="main",pT="afterMain",hT="beforeWrite",gT="write",mT="afterWrite",vT=[lT,uT,cT,fT,dT,pT,hT,gT,mT];function Rr(e){return e?(e.nodeName||"").toLowerCase():null}function Yn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Wi(e){var t=Yn(e).Element;return e instanceof t||e instanceof Element}function ur(e){var t=Yn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Gc(e){if(typeof ShadowRoot>"u")return!1;var t=Yn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function yT(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ur(o)||!Rr(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function bT(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ur(i)||!Rr(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Ng={name:"applyStyles",enabled:!0,phase:"write",fn:yT,effect:bT,requires:["computeStyles"]};function Nr(e){return e.split("-")[0]}var Ki=Math.max,Dl=Math.min,Po=Math.round;function Yc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Mg(){return!/^((?!chrome|android).)*safari/i.test(Yc())}function Do(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ur(e)&&(i=e.offsetWidth>0&&Po(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Po(r.height)/e.offsetHeight||1);var s=Wi(e)?Yn(e):window,l=s.visualViewport,c=!Mg()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,h=(r.top+(c&&l?l.offsetTop:0))/o,p=r.width/i,y=r.height/o;return{width:p,height:y,top:h,right:d+p,bottom:h+y,left:d,x:d,y:h}}function Xc(e){var t=Do(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Gc(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Yr(e){return Yn(e).getComputedStyle(e)}function CT(e){return["table","td","th"].indexOf(Rr(e))>=0}function yi(e){return((Wi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rl(e){return Rr(e)==="html"?e:e.assignedSlot||e.parentNode||(Gc(e)?e.host:null)||yi(e)}function $g(e){return!ur(e)||Yr(e).position==="fixed"?null:e.offsetParent}function _T(e){var t=/firefox/i.test(Yc()),n=/Trident/i.test(Yc());if(n&&ur(e)){var r=Yr(e);if(r.position==="fixed")return null}var i=Rl(e);for(Gc(i)&&(i=i.host);ur(i)&&["html","body"].indexOf(Rr(i))<0;){var o=Yr(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Js(e){for(var t=Yn(e),n=$g(e);n&&CT(n)&&Yr(n).position==="static";)n=$g(n);return n&&(Rr(n)==="html"||Rr(n)==="body"&&Yr(n).position==="static")?t:n||_T(e)||t}function Jc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Zs(e,t,n){return Ki(e,Dl(t,n))}function wT(e,t,n){var r=Zs(e,t,n);return r>n?n:r}function Bg(){return{top:0,right:0,bottom:0,left:0}}function Hg(e){return Object.assign({},Bg(),e)}function jg(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var TT=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Hg(typeof t!="number"?t:jg(t,Gs))};function xT(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=Nr(n.placement),c=Jc(l),d=[$n,lr].indexOf(l)>=0,h=d?"height":"width";if(!(!o||!s)){var p=TT(i.padding,n),y=Xc(o),C=c==="y"?Fn:$n,w=c==="y"?ar:lr,k=n.rects.reference[h]+n.rects.reference[c]-s[c]-n.rects.popper[h],O=s[c]-n.rects.reference[c],N=Js(o),L=N?c==="y"?N.clientHeight||0:N.clientWidth||0:0,K=k/2-O/2,D=p[C],Te=L-y[h]-p[w],m=L/2-y[h]/2+K,ue=Zs(D,m,Te),I=c;n.modifiersData[r]=(t={},t[I]=ue,t.centerOffset=ue-m,t)}}function kT(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Fg(t.elements.popper,i)&&(t.elements.arrow=i))}const ST={name:"arrow",enabled:!0,phase:"main",fn:xT,effect:kT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ro(e){return e.split("-")[1]}var AT={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ET(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Po(n*i)/i||0,y:Po(r*i)/i||0}}function Ug(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,p=e.isFixed,y=s.x,C=y===void 0?0:y,w=s.y,k=w===void 0?0:w,O=typeof h=="function"?h({x:C,y:k}):{x:C,y:k};C=O.x,k=O.y;var N=s.hasOwnProperty("x"),L=s.hasOwnProperty("y"),K=$n,D=Fn,Te=window;if(d){var m=Js(n),ue="clientHeight",I="clientWidth";if(m===Yn(n)&&(m=yi(n),Yr(m).position!=="static"&&l==="absolute"&&(ue="scrollHeight",I="scrollWidth")),m=m,i===Fn||(i===$n||i===lr)&&o===Ys){D=ar;var S=p&&m===Te&&Te.visualViewport?Te.visualViewport.height:m[ue];k-=S-r.height,k*=c?1:-1}if(i===$n||(i===Fn||i===ar)&&o===Ys){K=lr;var P=p&&m===Te&&Te.visualViewport?Te.visualViewport.width:m[I];C-=P-r.width,C*=c?1:-1}}var j=Object.assign({position:l},d&&AT),ee=h===!0?ET({x:C,y:k},Yn(n)):{x:C,y:k};if(C=ee.x,k=ee.y,c){var J;return Object.assign({},j,(J={},J[D]=L?"0":"",J[K]=N?"0":"",J.transform=(Te.devicePixelRatio||1)<=1?"translate("+C+"px, "+k+"px)":"translate3d("+C+"px, "+k+"px, 0)",J))}return Object.assign({},j,(t={},t[D]=L?k+"px":"",t[K]=N?C+"px":"",t.transform="",t))}function OT(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:Nr(t.placement),variation:Ro(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ug(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ug(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const LT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:OT,data:{}};var Nl={passive:!0};function IT(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Yn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Nl)}),l&&c.addEventListener("resize",n.update,Nl),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Nl)}),l&&c.removeEventListener("resize",n.update,Nl)}}const PT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:IT,data:{}};var DT={left:"right",right:"left",bottom:"top",top:"bottom"};function Ml(e){return e.replace(/left|right|bottom|top/g,function(t){return DT[t]})}var RT={start:"end",end:"start"};function Wg(e){return e.replace(/start|end/g,function(t){return RT[t]})}function Zc(e){var t=Yn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Qc(e){return Do(yi(e)).left+Zc(e).scrollLeft}function NT(e,t){var n=Yn(e),r=yi(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=Mg();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+Qc(e),y:c}}function MT(e){var t,n=yi(e),r=Zc(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Ki(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Ki(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Qc(e),c=-r.scrollTop;return Yr(i||n).direction==="rtl"&&(l+=Ki(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function ef(e){var t=Yr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Kg(e){return["html","body","#document"].indexOf(Rr(e))>=0?e.ownerDocument.body:ur(e)&&ef(e)?e:Kg(Rl(e))}function Qs(e,t){var n;t===void 0&&(t=[]);var r=Kg(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yn(r),s=i?[o].concat(o.visualViewport||[],ef(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(Qs(Rl(s)))}function tf(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function FT(e,t){var n=Do(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Vg(e,t,n){return t===Pg?tf(NT(e,n)):Wi(t)?FT(t,n):tf(MT(yi(e)))}function $T(e){var t=Qs(Rl(e)),n=["absolute","fixed"].indexOf(Yr(e).position)>=0,r=n&&ur(e)?Js(e):e;return Wi(r)?t.filter(function(i){return Wi(i)&&Fg(i,r)&&Rr(i)!=="body"}):[]}function BT(e,t,n,r){var i=t==="clippingParents"?$T(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var h=Vg(e,d,r);return c.top=Ki(h.top,c.top),c.right=Dl(h.right,c.right),c.bottom=Dl(h.bottom,c.bottom),c.left=Ki(h.left,c.left),c},Vg(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function qg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Nr(r):null,o=r?Ro(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case Fn:c={x:s,y:t.y-n.height};break;case ar:c={x:s,y:t.y+t.height};break;case lr:c={x:t.x+t.width,y:l};break;case $n:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?Jc(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Io:c[d]=c[d]-(t[h]/2-n[h]/2);break;case Ys:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function ea(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?sT:l,d=n.rootBoundary,h=d===void 0?Pg:d,p=n.elementContext,y=p===void 0?Xs:p,C=n.altBoundary,w=C===void 0?!1:C,k=n.padding,O=k===void 0?0:k,N=Hg(typeof O!="number"?O:jg(O,Gs)),L=y===Xs?aT:Xs,K=e.rects.popper,D=e.elements[w?L:y],Te=BT(Wi(D)?D:D.contextElement||yi(e.elements.popper),c,h,s),m=Do(e.elements.reference),ue=qg({reference:m,element:K,strategy:"absolute",placement:i}),I=tf(Object.assign({},K,ue)),S=y===Xs?I:m,P={top:Te.top-S.top+N.top,bottom:S.bottom-Te.bottom+N.bottom,left:Te.left-S.left+N.left,right:S.right-Te.right+N.right},j=e.modifiersData.offset;if(y===Xs&&j){var ee=j[i];Object.keys(P).forEach(function(J){var ye=[lr,ar].indexOf(J)>=0?1:-1,je=[Fn,ar].indexOf(J)>=0?"y":"x";P[J]+=ee[je]*ye})}return P}function HT(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?Rg:c,h=Ro(r),p=h?l?Dg:Dg.filter(function(w){return Ro(w)===h}):Gs,y=p.filter(function(w){return d.indexOf(w)>=0});y.length===0&&(y=p);var C=y.reduce(function(w,k){return w[k]=ea(e,{placement:k,boundary:i,rootBoundary:o,padding:s})[Nr(k)],w},{});return Object.keys(C).sort(function(w,k){return C[w]-C[k]})}function jT(e){if(Nr(e)===zc)return[];var t=Ml(e);return[Wg(e),t,Wg(t)]}function UT(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,h=n.boundary,p=n.rootBoundary,y=n.altBoundary,C=n.flipVariations,w=C===void 0?!0:C,k=n.allowedAutoPlacements,O=t.options.placement,N=Nr(O),L=N===O,K=c||(L||!w?[Ml(O)]:jT(O)),D=[O].concat(K).reduce(function(we,Ae){return we.concat(Nr(Ae)===zc?HT(t,{placement:Ae,boundary:h,rootBoundary:p,padding:d,flipVariations:w,allowedAutoPlacements:k}):Ae)},[]),Te=t.rects.reference,m=t.rects.popper,ue=new Map,I=!0,S=D[0],P=0;P=0,je=ye?"width":"height",Ne=ea(t,{placement:j,boundary:h,rootBoundary:p,altBoundary:y,padding:d}),z=ye?J?lr:$n:J?ar:Fn;Te[je]>m[je]&&(z=Ml(z));var ie=Ml(z),fe=[];if(o&&fe.push(Ne[ee]<=0),l&&fe.push(Ne[z]<=0,Ne[ie]<=0),fe.every(function(we){return we})){S=j,I=!1;break}ue.set(j,fe)}if(I)for(var nt=w?3:1,Ve=function(Ae){var Oe=D.find(function(Be){var Xe=ue.get(Be);if(Xe)return Xe.slice(0,Ae).every(function(Le){return Le})});if(Oe)return S=Oe,"break"},ne=nt;ne>0;ne--){var ge=Ve(ne);if(ge==="break")break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}}const WT={name:"flip",enabled:!0,phase:"main",fn:UT,requiresIfExists:["offset"],data:{_skip:!1}};function zg(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Gg(e){return[Fn,lr,ar,$n].some(function(t){return e[t]>=0})}function KT(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ea(t,{elementContext:"reference"}),l=ea(t,{altBoundary:!0}),c=zg(s,r),d=zg(l,i,o),h=Gg(c),p=Gg(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const VT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:KT};function qT(e,t,n){var r=Nr(e),i=[$n,Fn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[$n,lr].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function zT(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=Rg.reduce(function(h,p){return h[p]=qT(p,t.rects,o),h},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const GT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zT};function YT(e){var t=e.state,n=e.name;t.modifiersData[n]=qg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const XT={name:"popperOffsets",enabled:!0,phase:"read",fn:YT,data:{}};function JT(e){return e==="x"?"y":"x"}function ZT(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.padding,y=n.tether,C=y===void 0?!0:y,w=n.tetherOffset,k=w===void 0?0:w,O=ea(t,{boundary:c,rootBoundary:d,padding:p,altBoundary:h}),N=Nr(t.placement),L=Ro(t.placement),K=!L,D=Jc(N),Te=JT(D),m=t.modifiersData.popperOffsets,ue=t.rects.reference,I=t.rects.popper,S=typeof k=="function"?k(Object.assign({},t.rects,{placement:t.placement})):k,P=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(m){if(o){var J,ye=D==="y"?Fn:$n,je=D==="y"?ar:lr,Ne=D==="y"?"height":"width",z=m[D],ie=z+O[ye],fe=z-O[je],nt=C?-I[Ne]/2:0,Ve=L===Io?ue[Ne]:I[Ne],ne=L===Io?-I[Ne]:-ue[Ne],ge=t.elements.arrow,we=C&&ge?Xc(ge):{width:0,height:0},Ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Bg(),Oe=Ae[ye],Be=Ae[je],Xe=Zs(0,ue[Ne],we[Ne]),Le=K?ue[Ne]/2-nt-Xe-Oe-P.mainAxis:Ve-Xe-Oe-P.mainAxis,rt=K?-ue[Ne]/2+nt+Xe+Be+P.mainAxis:ne+Xe+Be+P.mainAxis,mt=t.elements.arrow&&Js(t.elements.arrow),R=mt?D==="y"?mt.clientTop||0:mt.clientLeft||0:0,$=(J=j==null?void 0:j[D])!=null?J:0,G=z+Le-$-R,te=z+rt-$,W=Zs(C?Dl(ie,G):ie,z,C?Ki(fe,te):fe);m[D]=W,ee[D]=W-z}if(l){var X,Ce=D==="x"?Fn:$n,de=D==="x"?ar:lr,me=m[Te],se=Te==="y"?"height":"width",ke=me+O[Ce],_e=me-O[de],Me=[Fn,$n].indexOf(N)!==-1,Se=(X=j==null?void 0:j[Te])!=null?X:0,qe=Me?ke:me-ue[se]-I[se]-Se+P.altAxis,ft=Me?me+ue[se]+I[se]-Se-P.altAxis:_e,at=C&&Me?wT(qe,me,ft):Zs(C?qe:ke,me,C?ft:_e);m[Te]=at,ee[Te]=at-me}t.modifiersData[r]=ee}}const QT={name:"preventOverflow",enabled:!0,phase:"main",fn:ZT,requiresIfExists:["offset"]};function ex(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function tx(e){return e===Yn(e)||!ur(e)?Zc(e):ex(e)}function nx(e){var t=e.getBoundingClientRect(),n=Po(t.width)/e.offsetWidth||1,r=Po(t.height)/e.offsetHeight||1;return n!==1||r!==1}function rx(e,t,n){n===void 0&&(n=!1);var r=ur(t),i=ur(t)&&nx(t),o=yi(t),s=Do(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Rr(t)!=="body"||ef(o))&&(l=tx(t)),ur(t)?(c=Do(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Qc(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function ix(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ox(e){var t=ix(e);return vT.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function sx(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ax(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Yg={placement:"bottom",modifiers:[],strategy:"absolute"};function Xg(){for(var e=arguments.length,t=new Array(e),n=0;nr.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_local"]||this.translates([n],!0,!0).finally(()=>{this.updateTags()})},onTranslateToEnglishClick(e){let t=this.tags.find(r=>r.id===e);if(!t)return;let n=this.tags.indexOf(t);this.loading[t.id+"_en"]||this.translates([n],!1,!0).finally(()=>{this.updateTags()})}}},xw={data(){return{groupTagsActive:0,subGroupTagsActive:0}},watch:{},methods:{activeGroupTab(e){this.groupTagsActive=e,this.subGroupTagsActive=0;let t=this.$refs.groupTabsHeader.children[e].offsetLeft-this.$refs.groupTabsHeader.offsetWidth/2+this.$refs.groupTabsHeader.children[e].offsetWidth/2;this.$refs.groupTabsHeader.scrollTo({left:t,behavior:"smooth"})},activeSubGroupTab(e){this.subGroupTagsActive=e},onClickHideGroupTags(){this.$emit("update:hideGroupTags",!this.hideGroupTags)},onClickGroupTag(e,t){this._appendTag(t,e,!1,-1,"text"),this.updateTags()},getGroupTagTooltip(e,t){let n="";return e&&e!==t&&(n+=e+"
"),n+=t,n},getGroupTagStyle(e,t){let n={},r=pe.getTagsColorKey(e,t),i="";return this.groupTagsColor[r]&&(i=this.groupTagsColor[r],pe.isColorTransparent(i)&&(i="")),i&&(n={background:i}),n},getTagsColorKey(e,t){return pe.getTagsColorKey(e,t)},onTagsColorChange(e){this.$emit("update:groupTagsColor",this.groupTagsColor)},onClickResetTagsColor(e){for(let t of this.groupTags)for(let n of t.groups){if(n.type&&n.typ=="wrap")continue;let r=pe.getTagsColorKey(t.name,n.name);e===r&&(this.groupTagsColor[e]=Et(pe.fitterInputColor(n.color)))}this.onTagsColorChange(e)},onClickClearTagsColor(e){this.groupTagsColor[e]=Et("rgba(0,0,0,0)"),this.onTagsColorChange(e)},getTagColorStyle(e){if(e.isLora||e.isLyco||e.isEmbedding)return{};if(!this.groupTagsColorKeyCache[e.value])return{};let t=this.groupTagsColorKeyCache[e.value];if(!this.groupTagsColor[t])return{};let n=this.groupTagsColor[t];return pe.isColorTransparent(n)?{}:{background:n}}}},kw={name:"IconSvg",props:{name:{type:String,required:!0},svgName:{type:String,default:""}},data(){return{svgCode:""}},watch:{name:{handler:function(e,t){this.getSvg()},immediate:!1}},mounted(){this.getSvg()},methods:{getSvg(){if(!this.name)return;let e=this.svgName||this.name;if(window.loadingSvg=window.loadingSvg||{},window.isLoadSvg=window.isLoadSvg||{},window.isLoadSvg[e]){this.svgCode=localStorage.getItem("iconSVG-"+e);return}if(localStorage.getItem("iconSVG-"+e)&&(this.svgCode=localStorage.getItem("iconSVG-"+e)),window.loadingSvg[e]){const t=setInterval(()=>{window.loadingSvg[e]||(clearInterval(t),this.svgCode=localStorage.getItem("iconSVG-"+e))},10);return}window.loadingSvg[e]=!0,window.iconSvgHash||(window.iconSvgHash=new Date().getTime()),this.gradioAPI.styles("icons/"+e+".svg",window.iconSvgHash).then(t=>{this.svgCode=t,localStorage.setItem("iconSVG-"+e,t),window.isLoadSvg[e]=!0,window.loadingSvg[e]=!1}).catch(t=>{window.loadingSvg[e]=!1})}}},Sw=["innerHTML"];function Aw(e,t,n,r,i,o){return be((O(),H("div",{class:lt(["icon-svg","icon-svg-"+n.name]),"data-name":"name",innerHTML:i.svgCode},null,10,Sw)),[[Ot,i.svgCode]])}const sr=En(kw,[["render",Aw]]),Ew={name:"HighlightPrompt",props:{textarea:{type:Object,required:!0},hideDefaultInput:{type:Boolean,default:!1}},data(){return{scrollTop:0,showTimeId:0,hideTimeId:0,lastHighLightTag:null}},watch:{},mounted(){},methods:{show(e){this.lastHighLightTag&&this.lastHighLightTag.value===e.value||(this.lastHighLightTag=e,this.showTimeId&&clearTimeout(this.showTimeId),this.showTimeId=setTimeout(()=>{this._show(e),this.showTimeId=0},10))},_show(e){if(this.hideDefaultInput)return this._hide();if(typeof e.type=="string"&&e.type==="wrap")return this._hide();let t=e.value,n=this.textarea.value;if(t===""||t.trim()==="")return this._hide();if(n===""||n.trim()==="")return this._hide();if(t=pe.escapeHtml(t),n=pe.escapeHtml(this.textarea.value),n.indexOf(t)===-1)return this._hide();this.textarea.parentNode.insertBefore(this.$refs.highlightPrompt,this.textarea.nextSibling);const i=window.getComputedStyle(this.textarea);for(const l of i)this.$refs.highlightPrompt.style[l]=i[l];this.$refs.highlightPrompt.style.display="block",this.textarea.style.display="none";let o="",s=n;for(;;){const l=s.indexOf(t);if(l===-1){o+=s;break}const c=l+t.length;o+=s.substring(0,l),o+='',o+=s.substring(l,c),o+="",s=s.substring(c)}this.$refs.highlightPrompt.innerHTML=o,this.$refs.highlightPrompt.scrollTop=this.scrollTop},hide(){this.lastHighLightTag=null,this.showTimeId&&clearTimeout(this.showTimeId),this.hideTimeId&&clearTimeout(this.hideTimeId),this.hideTimeId=setTimeout(()=>{this._hide(),this.hideTimeId=0},10)},_hide(){this.textarea.style.display="block",this.$refs.highlightPrompt.style.display="none",this.scrollTop=this.textarea.scrollTop}}};function Ow(e,t,n,r,i,o){return O(),H("div",{class:"physton-highlight-prompt",ref:"highlightPrompt",onClick:t[0]||(t[0]=(...s)=>o.hide&&o.hide(...s))},null,512)}const Lw=En(Ew,[["render",Ow]]);function Iw(e){return vp()?(Qb(e),!0):!1}function Us(e){return typeof e=="function"?e():Hp(e)}const Cg=typeof window<"u",Ws=()=>{},Pw=Dw();function Dw(){var e;return Cg&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}function _g(e,t){function n(...r){return new Promise((i,o)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(i).catch(o)})}return n}const wg=e=>e();function Rw(e,t={}){let n,r,i=Ws;const o=l=>{clearTimeout(l),i(),i=Ws};return l=>{const c=Us(e),d=Us(t.maxWait);return n&&o(n),c<=0||d!==void 0&&d<=0?(r&&(o(r),r=null),Promise.resolve(l())):new Promise((h,p)=>{i=t.rejectOnCancel?p:h,d&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,h(l())},d)),n=setTimeout(()=>{r&&o(r),r=null,h(l())},c)})}}function Nw(e=wg){const t=Et(!0);function n(){t.value=!1}function r(){t.value=!0}const i=(...o)=>{t.value&&e(...o)};return{isActive:ec(t),pause:n,resume:r,eventFilter:i}}function Hi(e,t=200,n={}){return _g(Rw(t,n),e)}function Oo(e,t=!0){kh()?lc(e):t?e():Xa(e)}var Tg=Object.getOwnPropertySymbols,Mw=Object.prototype.hasOwnProperty,Fw=Object.prototype.propertyIsEnumerable,$w=(e,t)=>{var n={};for(var r in e)Mw.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Tg)for(var r of Tg(e))t.indexOf(r)<0&&Fw.call(e,r)&&(n[r]=e[r]);return n};function Bw(e,t,n={}){const r=n,{eventFilter:i=wg}=r,o=$w(r,["eventFilter"]);return rr(e,_g(i,t),o)}var Hw=Object.defineProperty,jw=Object.defineProperties,Uw=Object.getOwnPropertyDescriptors,Ol=Object.getOwnPropertySymbols,xg=Object.prototype.hasOwnProperty,kg=Object.prototype.propertyIsEnumerable,Sg=(e,t,n)=>t in e?Hw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ww=(e,t)=>{for(var n in t||(t={}))xg.call(t,n)&&Sg(e,n,t[n]);if(Ol)for(var n of Ol(t))kg.call(t,n)&&Sg(e,n,t[n]);return e},Kw=(e,t)=>jw(e,Uw(t)),Vw=(e,t)=>{var n={};for(var r in e)xg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ol)for(var r of Ol(e))t.indexOf(r)<0&&kg.call(e,r)&&(n[r]=e[r]);return n};function qw(e,t,n={}){const r=n,{eventFilter:i}=r,o=Vw(r,["eventFilter"]),{eventFilter:s,pause:l,resume:c,isActive:d}=Nw(i);return{stop:Bw(e,t,Kw(Ww({},o),{eventFilter:s})),pause:l,resume:c,isActive:d}}function bn(e,t,n){return rr(e,(r,i,o)=>{r&&t(r,i,o)},n)}function Ks(e){var t;const n=Us(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Vs=Cg?window:void 0;function qs(...e){let t,n,r,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,i]=e,t=Vs):[t,n,r,i]=e,!t)return Ws;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],s=()=>{o.forEach(h=>h()),o.length=0},l=(h,p,C,y)=>(h.addEventListener(p,C,y),()=>h.removeEventListener(p,C,y)),c=rr(()=>[Ks(t),Us(i)],([h,p])=>{s(),h&&o.push(...n.flatMap(C=>r.map(y=>l(h,C,y,p))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Iw(d),d}let Ag=!1;function zw(e,t,n={}){const{window:r=Vs,ignore:i=[],capture:o=!0,detectIframe:s=!1}=n;if(!r)return;Pw&&!Ag&&(Ag=!0,Array.from(r.document.body.children).forEach(C=>C.addEventListener("click",Ws)),r.document.documentElement.addEventListener("click",Ws));let l=!0;const c=C=>i.some(y=>{if(typeof y=="string")return Array.from(r.document.querySelectorAll(y)).some(w=>w===C.target||C.composedPath().includes(w));{const w=Ks(y);return w&&(C.target===w||C.composedPath().includes(w))}}),h=[qs(r,"click",C=>{const y=Ks(e);if(!(!y||y===C.target||C.composedPath().includes(y))){if(C.detail===0&&(l=!c(C)),!l){l=!0;return}t(C)}},{passive:!0,capture:o}),qs(r,"pointerdown",C=>{const y=Ks(e);y&&(l=!C.composedPath().includes(y)&&!c(C))},{passive:!0}),s&&qs(r,"blur",C=>{setTimeout(()=>{var y;const w=Ks(e);((y=r.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(w!=null&&w.contains(r.document.activeElement))&&t(C)},0)})].filter(Boolean);return()=>h.forEach(C=>C())}const Ll=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il="__vueuse_ssr_handlers__",Gw=Yw();function Yw(){return Il in Ll||(Ll[Il]=Ll[Il]||{}),Ll[Il]}function Xw(e,t){return Gw[e]||t}function Jw(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}var Zw=Object.defineProperty,Eg=Object.getOwnPropertySymbols,Qw=Object.prototype.hasOwnProperty,eT=Object.prototype.propertyIsEnumerable,Og=(e,t,n)=>t in e?Zw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lg=(e,t)=>{for(var n in t||(t={}))Qw.call(t,n)&&Og(e,n,t[n]);if(Eg)for(var n of Eg(t))eT.call(t,n)&&Og(e,n,t[n]);return e};const tT={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Ig="vueuse-storage";function nT(e,t,n,r={}){var i;const{flush:o="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:d=!1,shallow:h,window:p=Vs,eventFilter:C,onError:y=D=>{console.error(D)}}=r,w=(h?AC:Et)(t);if(!n)try{n=Xw("getDefaultStorage",()=>{var D;return(D=Vs)==null?void 0:D.localStorage})()}catch(D){y(D)}if(!n)return w;const T=Us(t),E=Jw(T),I=(i=r.serializer)!=null?i:tT[E],{pause:P,resume:j}=qw(w,()=>L(w.value),{flush:o,deep:s,eventFilter:C});return p&&l&&(qs(p,"storage",ue),qs(p,Ig,m)),ue(),w;function L(D){try{if(D==null)n.removeItem(e);else{const S=I.write(D),R=n.getItem(e);R!==S&&(n.setItem(e,S),p&&p.dispatchEvent(new CustomEvent(Ig,{detail:{key:e,oldValue:R,newValue:S,storageArea:n}})))}}catch(S){y(S)}}function we(D){const S=D?D.newValue:n.getItem(e);if(S==null)return c&&T!==null&&n.setItem(e,I.write(T)),T;if(!D&&d){const R=I.read(S);return typeof d=="function"?d(R,T):E==="object"&&!Array.isArray(R)?Lg(Lg({},T),R):R}else return typeof S!="string"?S:I.read(S)}function m(D){ue(D.detail)}function ue(D){if(!(D&&D.storageArea!==n)){if(D&&D.key==null){w.value=T;return}if(!(D&&D.key!==e)){P();try{w.value=we(D)}catch(S){y(S)}finally{D?Xa(j):j()}}}}}function Vc(e,t,n={}){const{window:r=Vs}=n;return nT(e,t,r==null?void 0:r.localStorage,n)}var ji=ji||{};ji.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var n=e.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+e.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,r=e.visit(t.at),i=e.visit(t.style);return i&&(n+=" "+i),r&&(n+=" at "+r),n},"visit_default-radial":function(t){var n="",r=e.visit(t.at);return r&&(n+=r),n},"visit_extent-keyword":function(t){var n=t.value,r=e.visit(t.at);return r&&(n+=" at "+r),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,n){var r=t,i=e.visit(n.length);return i&&(r+=" "+i),r},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",r=t.length;return t.forEach(function(i,o){n+=e.visit(i),o0&&n("Invalid input not EOF"),z}function i(){return j(o)}function o(){return s("linear-gradient",e.linearGradient,c)||s("repeating-linear-gradient",e.repeatingLinearGradient,c)||s("radial-gradient",e.radialGradient,p)||s("repeating-radial-gradient",e.repeatingRadialGradient,p)}function s(z,ie,fe){return l(ie,function(nt){var Ve=fe();return Ve&&(je(e.comma)||n("Missing comma before color stops")),{type:z,orientation:Ve,colorStops:j(L)}})}function l(z,ie){var fe=je(z);if(fe){je(e.startCall)||n("Missing (");var nt=ie(fe);return je(e.endCall)||n("Missing )"),nt}}function c(){return d()||h()}function d(){return ye("directional",e.sideOrCorner,1)}function h(){return ye("angular",e.angleValue,1)}function p(){var z,ie=C(),fe;return ie&&(z=[],z.push(ie),fe=t,je(e.comma)&&(ie=C(),ie?z.push(ie):t=fe)),z}function C(){var z=y()||w();if(z)z.at=E();else{var ie=T();if(ie){z=ie;var fe=E();fe&&(z.at=fe)}else{var nt=I();nt&&(z={type:"default-radial",at:nt})}}return z}function y(){var z=ye("shape",/^(circle)/i,0);return z&&(z.style=J()||T()),z}function w(){var z=ye("shape",/^(ellipse)/i,0);return z&&(z.style=U()||T()),z}function T(){return ye("extent-keyword",e.extentKeywords,1)}function E(){if(ye("position",/^at/,0)){var z=I();return z||n("Missing positioning value"),z}}function I(){var z=P();if(z.x||z.y)return{type:"position",value:z}}function P(){return{x:U(),y:U()}}function j(z){var ie=z(),fe=[];if(ie)for(fe.push(ie);je(e.comma);)ie=z(),ie?fe.push(ie):n("One extra comma");return fe}function L(){var z=we();return z||n("Expected color definition"),z.length=U(),z}function we(){return ue()||S()||D()||m()}function m(){return ye("literal",e.literalColor,0)}function ue(){return ye("hex",e.hexColor,1)}function D(){return l(e.rgbColor,function(){return{type:"rgb",value:j(R)}})}function S(){return l(e.rgbaColor,function(){return{type:"rgba",value:j(R)}})}function R(){return je(e.number)[1]}function U(){return ye("%",e.percentageValue,1)||ee()||J()}function ee(){return ye("position-keyword",e.positionKeywords,1)}function J(){return ye("px",e.pixelValue,1)||ye("em",e.emValue,1)}function ye(z,ie,fe){var nt=je(ie);if(nt)return{type:z,value:nt[fe]}}function je(z){var ie,fe;return fe=/^[\n\r\t\s]+/.exec(t),fe&&Ne(fe[0].length),ie=z.exec(t),ie&&Ne(ie[0].length),ie}function Ne(z){t=t.substr(z)}return function(z){return t=z.toString(),r()}}();var rT=ji.parse,iT=ji.stringify,Fn="top",ar="bottom",lr="right",$n="left",qc="auto",zs=[Fn,ar,lr,$n],Lo="start",Gs="end",oT="clippingParents",Pg="viewport",Ys="popper",sT="reference",Dg=zs.reduce(function(e,t){return e.concat([t+"-"+Lo,t+"-"+Gs])},[]),Rg=[].concat(zs,[qc]).reduce(function(e,t){return e.concat([t,t+"-"+Lo,t+"-"+Gs])},[]),aT="beforeRead",lT="read",uT="afterRead",cT="beforeMain",fT="main",dT="afterMain",pT="beforeWrite",hT="write",gT="afterWrite",mT=[aT,lT,uT,cT,fT,dT,pT,hT,gT];function Rr(e){return e?(e.nodeName||"").toLowerCase():null}function Yn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ui(e){var t=Yn(e).Element;return e instanceof t||e instanceof Element}function ur(e){var t=Yn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function zc(e){if(typeof ShadowRoot>"u")return!1;var t=Yn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function vT(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!ur(o)||!Rr(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function yT(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=s.reduce(function(c,d){return c[d]="",c},{});!ur(i)||!Rr(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const Ng={name:"applyStyles",enabled:!0,phase:"write",fn:vT,effect:yT,requires:["computeStyles"]};function Nr(e){return e.split("-")[0]}var Wi=Math.max,Pl=Math.min,Io=Math.round;function Gc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Mg(){return!/^((?!chrome|android).)*safari/i.test(Gc())}function Po(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&ur(e)&&(i=e.offsetWidth>0&&Io(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Io(r.height)/e.offsetHeight||1);var s=Ui(e)?Yn(e):window,l=s.visualViewport,c=!Mg()&&n,d=(r.left+(c&&l?l.offsetLeft:0))/i,h=(r.top+(c&&l?l.offsetTop:0))/o,p=r.width/i,C=r.height/o;return{width:p,height:C,top:h,right:d+p,bottom:h+C,left:d,x:d,y:h}}function Yc(e){var t=Po(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Fg(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zc(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Yr(e){return Yn(e).getComputedStyle(e)}function bT(e){return["table","td","th"].indexOf(Rr(e))>=0}function vi(e){return((Ui(e)?e.ownerDocument:e.document)||window.document).documentElement}function Dl(e){return Rr(e)==="html"?e:e.assignedSlot||e.parentNode||(zc(e)?e.host:null)||vi(e)}function $g(e){return!ur(e)||Yr(e).position==="fixed"?null:e.offsetParent}function CT(e){var t=/firefox/i.test(Gc()),n=/Trident/i.test(Gc());if(n&&ur(e)){var r=Yr(e);if(r.position==="fixed")return null}var i=Dl(e);for(zc(i)&&(i=i.host);ur(i)&&["html","body"].indexOf(Rr(i))<0;){var o=Yr(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Xs(e){for(var t=Yn(e),n=$g(e);n&&bT(n)&&Yr(n).position==="static";)n=$g(n);return n&&(Rr(n)==="html"||Rr(n)==="body"&&Yr(n).position==="static")?t:n||CT(e)||t}function Xc(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Js(e,t,n){return Wi(e,Pl(t,n))}function _T(e,t,n){var r=Js(e,t,n);return r>n?n:r}function Bg(){return{top:0,right:0,bottom:0,left:0}}function Hg(e){return Object.assign({},Bg(),e)}function jg(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var wT=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Hg(typeof t!="number"?t:jg(t,zs))};function TT(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,l=Nr(n.placement),c=Xc(l),d=[$n,lr].indexOf(l)>=0,h=d?"height":"width";if(!(!o||!s)){var p=wT(i.padding,n),C=Yc(o),y=c==="y"?Fn:$n,w=c==="y"?ar:lr,T=n.rects.reference[h]+n.rects.reference[c]-s[c]-n.rects.popper[h],E=s[c]-n.rects.reference[c],I=Xs(o),P=I?c==="y"?I.clientHeight||0:I.clientWidth||0:0,j=T/2-E/2,L=p[y],we=P-C[h]-p[w],m=P/2-C[h]/2+j,ue=Js(L,m,we),D=c;n.modifiersData[r]=(t={},t[D]=ue,t.centerOffset=ue-m,t)}}function xT(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Fg(t.elements.popper,i)&&(t.elements.arrow=i))}const kT={name:"arrow",enabled:!0,phase:"main",fn:TT,effect:xT,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Do(e){return e.split("-")[1]}var ST={top:"auto",right:"auto",bottom:"auto",left:"auto"};function AT(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Io(n*i)/i||0,y:Io(r*i)/i||0}}function Ug(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,h=e.roundOffsets,p=e.isFixed,C=s.x,y=C===void 0?0:C,w=s.y,T=w===void 0?0:w,E=typeof h=="function"?h({x:y,y:T}):{x:y,y:T};y=E.x,T=E.y;var I=s.hasOwnProperty("x"),P=s.hasOwnProperty("y"),j=$n,L=Fn,we=window;if(d){var m=Xs(n),ue="clientHeight",D="clientWidth";if(m===Yn(n)&&(m=vi(n),Yr(m).position!=="static"&&l==="absolute"&&(ue="scrollHeight",D="scrollWidth")),m=m,i===Fn||(i===$n||i===lr)&&o===Gs){L=ar;var S=p&&m===we&&we.visualViewport?we.visualViewport.height:m[ue];T-=S-r.height,T*=c?1:-1}if(i===$n||(i===Fn||i===ar)&&o===Gs){j=lr;var R=p&&m===we&&we.visualViewport?we.visualViewport.width:m[D];y-=R-r.width,y*=c?1:-1}}var U=Object.assign({position:l},d&&ST),ee=h===!0?AT({x:y,y:T},Yn(n)):{x:y,y:T};if(y=ee.x,T=ee.y,c){var J;return Object.assign({},U,(J={},J[L]=P?"0":"",J[j]=I?"0":"",J.transform=(we.devicePixelRatio||1)<=1?"translate("+y+"px, "+T+"px)":"translate3d("+y+"px, "+T+"px, 0)",J))}return Object.assign({},U,(t={},t[L]=P?T+"px":"",t[j]=I?y+"px":"",t.transform="",t))}function ET(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,d={placement:Nr(t.placement),variation:Do(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ug(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ug(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const OT={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ET,data:{}};var Rl={passive:!0};function LT(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,l=s===void 0?!0:s,c=Yn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&d.forEach(function(h){h.addEventListener("scroll",n.update,Rl)}),l&&c.addEventListener("resize",n.update,Rl),function(){o&&d.forEach(function(h){h.removeEventListener("scroll",n.update,Rl)}),l&&c.removeEventListener("resize",n.update,Rl)}}const IT={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:LT,data:{}};var PT={left:"right",right:"left",bottom:"top",top:"bottom"};function Nl(e){return e.replace(/left|right|bottom|top/g,function(t){return PT[t]})}var DT={start:"end",end:"start"};function Wg(e){return e.replace(/start|end/g,function(t){return DT[t]})}function Jc(e){var t=Yn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Zc(e){return Po(vi(e)).left+Jc(e).scrollLeft}function RT(e,t){var n=Yn(e),r=vi(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,l=0,c=0;if(i){o=i.width,s=i.height;var d=Mg();(d||!d&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:l+Zc(e),y:c}}function NT(e){var t,n=vi(e),r=Jc(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Wi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Wi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-r.scrollLeft+Zc(e),c=-r.scrollTop;return Yr(i||n).direction==="rtl"&&(l+=Wi(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function Qc(e){var t=Yr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Kg(e){return["html","body","#document"].indexOf(Rr(e))>=0?e.ownerDocument.body:ur(e)&&Qc(e)?e:Kg(Dl(e))}function Zs(e,t){var n;t===void 0&&(t=[]);var r=Kg(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Yn(r),s=i?[o].concat(o.visualViewport||[],Qc(r)?r:[]):r,l=t.concat(s);return i?l:l.concat(Zs(Dl(s)))}function ef(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function MT(e,t){var n=Po(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Vg(e,t,n){return t===Pg?ef(RT(e,n)):Ui(t)?MT(t,n):ef(NT(vi(e)))}function FT(e){var t=Zs(Dl(e)),n=["absolute","fixed"].indexOf(Yr(e).position)>=0,r=n&&ur(e)?Xs(e):e;return Ui(r)?t.filter(function(i){return Ui(i)&&Fg(i,r)&&Rr(i)!=="body"}):[]}function $T(e,t,n,r){var i=t==="clippingParents"?FT(e):[].concat(t),o=[].concat(i,[n]),s=o[0],l=o.reduce(function(c,d){var h=Vg(e,d,r);return c.top=Wi(h.top,c.top),c.right=Pl(h.right,c.right),c.bottom=Pl(h.bottom,c.bottom),c.left=Wi(h.left,c.left),c},Vg(e,s,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function qg(e){var t=e.reference,n=e.element,r=e.placement,i=r?Nr(r):null,o=r?Do(r):null,s=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(i){case Fn:c={x:s,y:t.y-n.height};break;case ar:c={x:s,y:t.y+t.height};break;case lr:c={x:t.x+t.width,y:l};break;case $n:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var d=i?Xc(i):null;if(d!=null){var h=d==="y"?"height":"width";switch(o){case Lo:c[d]=c[d]-(t[h]/2-n[h]/2);break;case Gs:c[d]=c[d]+(t[h]/2-n[h]/2);break}}return c}function Qs(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?oT:l,d=n.rootBoundary,h=d===void 0?Pg:d,p=n.elementContext,C=p===void 0?Ys:p,y=n.altBoundary,w=y===void 0?!1:y,T=n.padding,E=T===void 0?0:T,I=Hg(typeof E!="number"?E:jg(E,zs)),P=C===Ys?sT:Ys,j=e.rects.popper,L=e.elements[w?P:C],we=$T(Ui(L)?L:L.contextElement||vi(e.elements.popper),c,h,s),m=Po(e.elements.reference),ue=qg({reference:m,element:j,strategy:"absolute",placement:i}),D=ef(Object.assign({},j,ue)),S=C===Ys?D:m,R={top:we.top-S.top+I.top,bottom:S.bottom-we.bottom+I.bottom,left:we.left-S.left+I.left,right:S.right-we.right+I.right},U=e.modifiersData.offset;if(C===Ys&&U){var ee=U[i];Object.keys(R).forEach(function(J){var ye=[lr,ar].indexOf(J)>=0?1:-1,je=[Fn,ar].indexOf(J)>=0?"y":"x";R[J]+=ee[je]*ye})}return R}function BT(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?Rg:c,h=Do(r),p=h?l?Dg:Dg.filter(function(w){return Do(w)===h}):zs,C=p.filter(function(w){return d.indexOf(w)>=0});C.length===0&&(C=p);var y=C.reduce(function(w,T){return w[T]=Qs(e,{placement:T,boundary:i,rootBoundary:o,padding:s})[Nr(T)],w},{});return Object.keys(y).sort(function(w,T){return y[w]-y[T]})}function HT(e){if(Nr(e)===qc)return[];var t=Nl(e);return[Wg(e),t,Wg(t)]}function jT(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!0:s,c=n.fallbackPlacements,d=n.padding,h=n.boundary,p=n.rootBoundary,C=n.altBoundary,y=n.flipVariations,w=y===void 0?!0:y,T=n.allowedAutoPlacements,E=t.options.placement,I=Nr(E),P=I===E,j=c||(P||!w?[Nl(E)]:HT(E)),L=[E].concat(j).reduce(function(Te,Ae){return Te.concat(Nr(Ae)===qc?BT(t,{placement:Ae,boundary:h,rootBoundary:p,padding:d,flipVariations:w,allowedAutoPlacements:T}):Ae)},[]),we=t.rects.reference,m=t.rects.popper,ue=new Map,D=!0,S=L[0],R=0;R=0,je=ye?"width":"height",Ne=Qs(t,{placement:U,boundary:h,rootBoundary:p,altBoundary:C,padding:d}),z=ye?J?lr:$n:J?ar:Fn;we[je]>m[je]&&(z=Nl(z));var ie=Nl(z),fe=[];if(o&&fe.push(Ne[ee]<=0),l&&fe.push(Ne[z]<=0,Ne[ie]<=0),fe.every(function(Te){return Te})){S=U,D=!1;break}ue.set(U,fe)}if(D)for(var nt=w?3:1,Ve=function(Ae){var Oe=L.find(function(Be){var Xe=ue.get(Be);if(Xe)return Xe.slice(0,Ae).every(function(Le){return Le})});if(Oe)return S=Oe,"break"},ne=nt;ne>0;ne--){var me=Ve(ne);if(me==="break")break}t.placement!==S&&(t.modifiersData[r]._skip=!0,t.placement=S,t.reset=!0)}}const UT={name:"flip",enabled:!0,phase:"main",fn:jT,requiresIfExists:["offset"],data:{_skip:!1}};function zg(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Gg(e){return[Fn,lr,ar,$n].some(function(t){return e[t]>=0})}function WT(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Qs(t,{elementContext:"reference"}),l=Qs(t,{altBoundary:!0}),c=zg(s,r),d=zg(l,i,o),h=Gg(c),p=Gg(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:h,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":p})}const KT={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:WT};function VT(e,t,n){var r=Nr(e),i=[$n,Fn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[$n,lr].indexOf(r)>=0?{x:l,y:s}:{x:s,y:l}}function qT(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=Rg.reduce(function(h,p){return h[p]=VT(p,t.rects,o),h},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=s}const zT={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qT};function GT(e){var t=e.state,n=e.name;t.modifiersData[n]=qg({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const YT={name:"popperOffsets",enabled:!0,phase:"read",fn:GT,data:{}};function XT(e){return e==="x"?"y":"x"}function JT(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,l=s===void 0?!1:s,c=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.padding,C=n.tether,y=C===void 0?!0:C,w=n.tetherOffset,T=w===void 0?0:w,E=Qs(t,{boundary:c,rootBoundary:d,padding:p,altBoundary:h}),I=Nr(t.placement),P=Do(t.placement),j=!P,L=Xc(I),we=XT(L),m=t.modifiersData.popperOffsets,ue=t.rects.reference,D=t.rects.popper,S=typeof T=="function"?T(Object.assign({},t.rects,{placement:t.placement})):T,R=typeof S=="number"?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),U=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ee={x:0,y:0};if(m){if(o){var J,ye=L==="y"?Fn:$n,je=L==="y"?ar:lr,Ne=L==="y"?"height":"width",z=m[L],ie=z+E[ye],fe=z-E[je],nt=y?-D[Ne]/2:0,Ve=P===Lo?ue[Ne]:D[Ne],ne=P===Lo?-D[Ne]:-ue[Ne],me=t.elements.arrow,Te=y&&me?Yc(me):{width:0,height:0},Ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Bg(),Oe=Ae[ye],Be=Ae[je],Xe=Js(0,ue[Ne],Te[Ne]),Le=j?ue[Ne]/2-nt-Xe-Oe-R.mainAxis:Ve-Xe-Oe-R.mainAxis,rt=j?-ue[Ne]/2+nt+Xe+Be+R.mainAxis:ne+Xe+Be+R.mainAxis,mt=t.elements.arrow&&Xs(t.elements.arrow),N=mt?L==="y"?mt.clientTop||0:mt.clientLeft||0:0,$=(J=U==null?void 0:U[L])!=null?J:0,G=z+Le-$-N,te=z+rt-$,K=Js(y?Pl(ie,G):ie,z,y?Wi(fe,te):fe);m[L]=K,ee[L]=K-z}if(l){var X,Ce=L==="x"?Fn:$n,de=L==="x"?ar:lr,ve=m[we],se=we==="y"?"height":"width",ke=ve+E[Ce],_e=ve-E[de],Me=[Fn,$n].indexOf(I)!==-1,Se=(X=U==null?void 0:U[we])!=null?X:0,qe=Me?ke:ve-ue[se]-D[se]-Se+R.altAxis,ft=Me?ve+ue[se]+D[se]-Se-R.altAxis:_e,at=y&&Me?_T(qe,ve,ft):Js(y?qe:ke,ve,y?ft:_e);m[we]=at,ee[we]=at-ve}t.modifiersData[r]=ee}}const ZT={name:"preventOverflow",enabled:!0,phase:"main",fn:JT,requiresIfExists:["offset"]};function QT(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ex(e){return e===Yn(e)||!ur(e)?Jc(e):QT(e)}function tx(e){var t=e.getBoundingClientRect(),n=Io(t.width)/e.offsetWidth||1,r=Io(t.height)/e.offsetHeight||1;return n!==1||r!==1}function nx(e,t,n){n===void 0&&(n=!1);var r=ur(t),i=ur(t)&&tx(t),o=vi(t),s=Po(e,i,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Rr(t)!=="body"||Qc(o))&&(l=ex(t)),ur(t)?(c=Po(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Zc(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function rx(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function ix(e){var t=rx(e);return mT.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ox(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function sx(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Yg={placement:"bottom",modifiers:[],strategy:"absolute"};function Xg(){for(var e=arguments.length,t=new Array(e),n=0;n * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. - */function Zg(e){return Object.prototype.toString.call(e)==="[object Object]"}function cx(e){var t,n;return Zg(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(Zg(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function ta(){return ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const fx={silent:!1,logLevel:"warn"},dx=["validator"],em=Object.prototype,tm=em.toString,px=em.hasOwnProperty,nm=/^\s*function (\w+)/;function rm(e){var t;const n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){const r=n.toString().match(nm);return r?r[1]:""}return""}const Vi=cx;let Cn=e=>e;const No=(e,t)=>px.call(e,t),hx=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Mo=Array.isArray||function(e){return tm.call(e)==="[object Array]"},Fo=e=>tm.call(e)==="[object Function]",Fl=e=>Vi(e)&&No(e,"_vueTypes_name"),im=e=>Vi(e)&&(No(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>No(e,t)));function nf(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function qi(e,t,n=!1){let r,i=!0,o="";r=Vi(e)?e:{type:e};const s=Fl(r)?r._vueTypes_name+" - ":"";if(im(r)&&r.type!==null){if(r.type===void 0||r.type===!0||!r.required&&t===void 0)return i;Mo(r.type)?(i=r.type.some(l=>qi(l,t,!0)===!0),o=r.type.map(l=>rm(l)).join(" or ")):(o=rm(r),i=o==="Array"?Mo(t):o==="Object"?Vi(t):o==="String"||o==="Number"||o==="Boolean"||o==="Function"?function(l){if(l==null)return"";const c=l.constructor.toString().match(nm);return c?c[1]:""}(t)===o:t instanceof r.type)}if(!i){const l=`${s}value "${t}" should be of type "${o}"`;return n===!1?(Cn(l),!1):l}if(No(r,"validator")&&Fo(r.validator)){const l=Cn,c=[];if(Cn=d=>{c.push(d)},i=r.validator(t),Cn=l,!i){const d=(c.length>1?"* ":"")+c.join(` -* `);return c.length=0,n===!1?(Cn(d),i):d}}return i}function Xn(e,t){const n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(i){return i===void 0?(No(this,"default")&&delete this.default,this):Fo(i)||qi(this,i,!0)===!0?(this.default=Mo(i)?()=>[...i]:Vi(i)?()=>Object.assign({},i):i,this):(Cn(`${this._vueTypes_name} - invalid default value: "${i}"`),this)}}}),{validator:r}=n;return Fo(r)&&(n.validator=nf(r,n)),n}function Mr(e,t){const n=Xn(e,t);return Object.defineProperty(n,"validate",{value(r){return Fo(this.validator)&&Cn(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info: -${JSON.stringify(this)}`),this.validator=nf(r,this),this}})}function om(e,t,n){const r=function(c){const d={};return Object.getOwnPropertyNames(c).forEach(h=>{d[h]=Object.getOwnPropertyDescriptor(c,h)}),Object.defineProperties({},d)}(t);if(r._vueTypes_name=e,!Vi(n))return r;const{validator:i}=n,o=Qg(n,dx);if(Fo(i)){let{validator:c}=r;c&&(c=(l=(s=c).__original)!==null&&l!==void 0?l:s),r.validator=nf(c?function(d){return c.call(this,d)&&i.call(this,d)}:i,r)}var s,l;return Object.assign(r,o)}function $l(e){return e.replace(/^(?!\s*$)/gm," ")}const gx=()=>Mr("any",{}),mx=()=>Mr("function",{type:Function}),vx=()=>Mr("boolean",{type:Boolean}),yx=()=>Mr("string",{type:String}),bx=()=>Mr("number",{type:Number}),Cx=()=>Mr("array",{type:Array}),_x=()=>Mr("object",{type:Object}),wx=()=>Xn("integer",{type:Number,validator:e=>hx(e)}),Tx=()=>Xn("symbol",{validator:e=>typeof e=="symbol"});function xx(e,t="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return Xn(e.name||"<>",{type:null,validator(n){const r=e(n);return r||Cn(`${this._vueTypes_name} - ${t}`),r}})}function kx(e){if(!Mo(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,n=e.reduce((r,i)=>{if(i!=null){const o=i.constructor;r.indexOf(o)===-1&&r.push(o)}return r},[]);return Xn("oneOf",{type:n.length>0?n:void 0,validator(r){const i=e.indexOf(r)!==-1;return i||Cn(t),i}})}function Sx(e){if(!Mo(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,n=[];for(let i=0;in.indexOf(i)===o);const r=n.length>0?n:null;return Xn("oneOfType",t?{type:r,validator(i){const o=[],s=e.some(l=>{const c=qi(Fl(l)&&l._vueTypes_name==="oneOf"?l.type||null:l,i,!0);return typeof c=="string"&&o.push(c),c===!0});return s||Cn(`oneOfType - provided value does not match any of the ${o.length} passed-in validators: -${$l(o.join(` -`))}`),s}}:{type:r})}function Ax(e){return Xn("arrayOf",{type:Array,validator(t){let n="";const r=t.every(i=>(n=qi(e,i,!0),n===!0));return r||Cn(`arrayOf - value validation error: -${$l(n)}`),r}})}function Ex(e){return Xn("instanceOf",{type:e})}function Ox(e){return Xn("objectOf",{type:Object,validator(t){let n="";const r=Object.keys(t).every(i=>(n=qi(e,t[i],!0),n===!0));return r||Cn(`objectOf - value validation error: -${$l(n)}`),r}})}function Lx(e){const t=Object.keys(e),n=t.filter(i=>{var o;return!((o=e[i])===null||o===void 0||!o.required)}),r=Xn("shape",{type:Object,validator(i){if(!Vi(i))return!1;const o=Object.keys(i);if(n.length>0&&n.some(s=>o.indexOf(s)===-1)){const s=n.filter(l=>o.indexOf(l)===-1);return Cn(s.length===1?`shape - required property "${s[0]}" is not defined.`:`shape - required properties "${s.join('", "')}" are not defined.`),!1}return o.every(s=>{if(t.indexOf(s)===-1)return this._vueTypes_isLoose===!0||(Cn(`shape - shape definition does not include a "${s}" property. Allowed keys: "${t.join('", "')}".`),!1);const l=qi(e[s],i[s],!0);return typeof l=="string"&&Cn(`shape - "${s}" property validation error: - ${$l(l)}`),l===!0})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const Ix=["name","validate","getter"],Px=(()=>{var e;return(e=class{static get any(){return gx()}static get func(){return mx().def(this.defaults.func)}static get bool(){return vx().def(this.defaults.bool)}static get string(){return yx().def(this.defaults.string)}static get number(){return bx().def(this.defaults.number)}static get array(){return Cx().def(this.defaults.array)}static get object(){return _x().def(this.defaults.object)}static get integer(){return wx().def(this.defaults.integer)}static get symbol(){return Tx()}static get nullable(){return{type:null}}static extend(t){if(Mo(t))return t.forEach(c=>this.extend(c)),this;const{name:n,validate:r=!1,getter:i=!1}=t,o=Qg(t,Ix);if(No(this,n))throw new TypeError(`[VueTypes error]: Type "${n}" already defined`);const{type:s}=o;if(Fl(s))return delete o.type,Object.defineProperty(this,n,i?{get:()=>om(n,s,o)}:{value(...c){const d=om(n,s,o);return d.validator&&(d.validator=d.validator.bind(d,...c)),d}});let l;return l=i?{get(){const c=Object.assign({},o);return r?Mr(n,c):Xn(n,c)},enumerable:!0}:{value(...c){const d=Object.assign({},o);let h;return h=r?Mr(n,d):Xn(n,d),d.validator&&(h.validator=d.validator.bind(h,...c)),h},enumerable:!0},Object.defineProperty(this,n,l)}}).defaults={},e.sensibleDefaults=void 0,e.config=fx,e.custom=xx,e.oneOf=kx,e.instanceOf=Ex,e.oneOfType=Sx,e.arrayOf=Ax,e.objectOf=Ox,e.shape=Lx,e.utils={validate:(t,n)=>qi(n,t,!0)===!0,toType:(t,n,r=!1)=>r?Mr(t,n):Xn(t,n)},e})();function Dx(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var t;return(t=class extends Px{static get sensibleDefaults(){return ta({},this.defaults)}static set sensibleDefaults(n){this.defaults=n!==!1?ta({},n!==!0?n:e):{}}}).defaults=ta({},e),t}let st=class extends Dx(){};var sm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rf(e){var t={exports:{}};return e(t,t.exports),t.exports}var Bl=function(e){return e&&e.Math==Math&&e},rn=Bl(typeof globalThis=="object"&&globalThis)||Bl(typeof window=="object"&&window)||Bl(typeof self=="object"&&self)||Bl(typeof sm=="object"&&sm)||function(){return this}()||Function("return this")(),Nt=function(e){try{return!!e()}catch{return!0}},cr=!Nt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),am={}.propertyIsEnumerable,lm=Object.getOwnPropertyDescriptor,Rx={f:lm&&!am.call({1:2},1)?function(e){var t=lm(this,e);return!!t&&t.enumerable}:am},Hl=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Nx={}.toString,Xr=function(e){return Nx.call(e).slice(8,-1)},Mx="".split,jl=Nt(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return Xr(e)=="String"?Mx.call(e,""):Object(e)}:Object,bi=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},$o=function(e){return jl(bi(e))},cn=function(e){return typeof e=="object"?e!==null:typeof e=="function"},of=function(e,t){if(!cn(e))return e;var n,r;if(t&&typeof(n=e.toString)=="function"&&!cn(r=n.call(e))||typeof(n=e.valueOf)=="function"&&!cn(r=n.call(e))||!t&&typeof(n=e.toString)=="function"&&!cn(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Fx={}.hasOwnProperty,Zt=function(e,t){return Fx.call(e,t)},sf=rn.document,$x=cn(sf)&&cn(sf.createElement),um=function(e){return $x?sf.createElement(e):{}},cm=!cr&&!Nt(function(){return Object.defineProperty(um("div"),"a",{get:function(){return 7}}).a!=7}),fm=Object.getOwnPropertyDescriptor,af={f:cr?fm:function(e,t){if(e=$o(e),t=of(t,!0),cm)try{return fm(e,t)}catch{}if(Zt(e,t))return Hl(!Rx.f.call(e,t),e[t])}},On=function(e){if(!cn(e))throw TypeError(String(e)+" is not an object");return e},dm=Object.defineProperty,Jr={f:cr?dm:function(e,t,n){if(On(e),t=of(t,!0),On(n),cm)try{return dm(e,t,n)}catch{}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},fr=cr?function(e,t,n){return Jr.f(e,t,Hl(1,n))}:function(e,t,n){return e[t]=n,e},lf=function(e,t){try{fr(rn,e,t)}catch{rn[e]=t}return t},zi=rn["__core-js_shared__"]||lf("__core-js_shared__",{}),Bx=Function.toString;typeof zi.inspectSource!="function"&&(zi.inspectSource=function(e){return Bx.call(e)});var Ul,na,Wl,pm=zi.inspectSource,hm=rn.WeakMap,Hx=typeof hm=="function"&&/native code/.test(pm(hm)),gm=rf(function(e){(e.exports=function(t,n){return zi[t]||(zi[t]=n!==void 0?n:{})})("versions",[]).push({version:"3.8.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),jx=0,Ux=Math.random(),uf=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++jx+Ux).toString(36)},mm=gm("keys"),cf=function(e){return mm[e]||(mm[e]=uf(e))},Kl={},Wx=rn.WeakMap;if(Hx){var Bo=zi.state||(zi.state=new Wx),Kx=Bo.get,Vx=Bo.has,qx=Bo.set;Ul=function(e,t){return t.facade=e,qx.call(Bo,e,t),t},na=function(e){return Kx.call(Bo,e)||{}},Wl=function(e){return Vx.call(Bo,e)}}else{var ra=cf("state");Kl[ra]=!0,Ul=function(e,t){return t.facade=e,fr(e,ra,t),t},na=function(e){return Zt(e,ra)?e[ra]:{}},Wl=function(e){return Zt(e,ra)}}var Ci={set:Ul,get:na,has:Wl,enforce:function(e){return Wl(e)?na(e):Ul(e,{})},getterFor:function(e){return function(t){var n;if(!cn(t)||(n=na(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},_i=rf(function(e){var t=Ci.get,n=Ci.enforce,r=String(String).split("String");(e.exports=function(i,o,s,l){var c,d=!!l&&!!l.unsafe,h=!!l&&!!l.enumerable,p=!!l&&!!l.noTargetGet;typeof s=="function"&&(typeof o!="string"||Zt(s,"name")||fr(s,"name",o),(c=n(s)).source||(c.source=r.join(typeof o=="string"?o:""))),i!==rn?(d?!p&&i[o]&&(h=!0):delete i[o],h?i[o]=s:fr(i,o,s)):h?i[o]=s:lf(o,s)})(Function.prototype,"toString",function(){return typeof this=="function"&&t(this).source||pm(this)})}),ff=rn,vm=function(e){return typeof e=="function"?e:void 0},Vl=function(e,t){return arguments.length<2?vm(ff[e])||vm(rn[e]):ff[e]&&ff[e][t]||rn[e]&&rn[e][t]},zx=Math.ceil,Gx=Math.floor,Ho=function(e){return isNaN(e=+e)?0:(e>0?Gx:zx)(e)},Yx=Math.min,Jn=function(e){return e>0?Yx(Ho(e),9007199254740991):0},Xx=Math.max,Jx=Math.min,ql=function(e,t){var n=Ho(e);return n<0?Xx(n+t,0):Jx(n,t)},ym=function(e){return function(t,n,r){var i,o=$o(t),s=Jn(o.length),l=ql(r,s);if(e&&n!=n){for(;s>l;)if((i=o[l++])!=i)return!0}else for(;s>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}},bm={includes:ym(!0),indexOf:ym(!1)},Zx=bm.indexOf,Cm=function(e,t){var n,r=$o(e),i=0,o=[];for(n in r)!Zt(Kl,n)&&Zt(r,n)&&o.push(n);for(;t.length>i;)Zt(r,n=t[i++])&&(~Zx(o,n)||o.push(n));return o},zl=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Qx=zl.concat("length","prototype"),ek={f:Object.getOwnPropertyNames||function(e){return Cm(e,Qx)}},tk={f:Object.getOwnPropertySymbols},nk=Vl("Reflect","ownKeys")||function(e){var t=ek.f(On(e)),n=tk.f;return n?t.concat(n(e)):t},rk=function(e,t){for(var n=nk(t),r=Jr.f,i=af.f,o=0;o1?arguments[1]:void 0)}}),function(){function e(){Gi(this,e)}return Yi(e,null,[{key:"isInBrowser",value:function(){return typeof window<"u"}},{key:"isServer",value:function(){return typeof window>"u"}},{key:"getUA",value:function(){return e.isInBrowser()?window.navigator.userAgent.toLowerCase():""}},{key:"isMobile",value:function(){return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion)}},{key:"isOpera",value:function(){return navigator.userAgent.indexOf("Opera")!==-1}},{key:"isIE",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie")>0}},{key:"isIE9",value:function(){var t=e.getUA();return t!==""&&t.indexOf("msie 9.0")>0}},{key:"isEdge",value:function(){var t=e.getUA();return t!==""&&t.indexOf("edge/")>0}},{key:"isChrome",value:function(){var t=e.getUA();return t!==""&&/chrome\/\d+/.test(t)&&!e.isEdge()}},{key:"isPhantomJS",value:function(){var t=e.getUA();return t!==""&&/phantomjs/.test(t)}},{key:"isFirefox",value:function(){var t=e.getUA();return t!==""&&/firefox/.test(t)}}]),e}();var hk=[].join,gk=jl!=Object,mk=pf("join",",");_n({target:"Array",proto:!0,forced:gk||!mk},{join:function(e){return hk.call($o(this),e===void 0?",":e)}});var Uo,Gl,Zr=function(e){return Object(bi(e))},Wo=Array.isArray||function(e){return Xr(e)=="Array"},km=!!Object.getOwnPropertySymbols&&!Nt(function(){return!String(Symbol())}),vk=km&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Yl=gm("wks"),oa=rn.Symbol,yk=vk?oa:oa&&oa.withoutSetter||uf,Vt=function(e){return Zt(Yl,e)||(km&&Zt(oa,e)?Yl[e]=oa[e]:Yl[e]=yk("Symbol."+e)),Yl[e]},bk=Vt("species"),Xl=function(e,t){var n;return Wo(e)&&(typeof(n=e.constructor)!="function"||n!==Array&&!Wo(n.prototype)?cn(n)&&(n=n[bk])===null&&(n=void 0):n=void 0),new(n===void 0?Array:n)(t===0?0:t)},Ko=function(e,t,n){var r=of(t);r in e?Jr.f(e,r,Hl(0,n)):e[r]=n},gf=Vl("navigator","userAgent")||"",Sm=rn.process,Am=Sm&&Sm.versions,Em=Am&&Am.v8;Em?Gl=(Uo=Em.split("."))[0]+Uo[1]:gf&&(!(Uo=gf.match(/Edge\/(\d+)/))||Uo[1]>=74)&&(Uo=gf.match(/Chrome\/(\d+)/))&&(Gl=Uo[1]);var Jl=Gl&&+Gl,Ck=Vt("species"),mf=function(e){return Jl>=51||!Nt(function(){var t=[];return(t.constructor={})[Ck]=function(){return{foo:1}},t[e](Boolean).foo!==1})},_k=mf("splice"),wk=jo("splice",{ACCESSORS:!0,0:0,1:2}),Tk=Math.max,xk=Math.min;_n({target:"Array",proto:!0,forced:!_k||!wk},{splice:function(e,t){var n,r,i,o,s,l,c=Zr(this),d=Jn(c.length),h=ql(e,d),p=arguments.length;if(p===0?n=r=0:p===1?(n=0,r=d-h):(n=p-2,r=xk(Tk(Ho(t),0),d-h)),d+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(i=Xl(c,r),o=0;od-r+n;o--)delete c[o-1]}else if(n>r)for(o=d-r;o>h;o--)l=o+n-1,(s=o+r-1)in c?c[l]=c[s]:delete c[l];for(o=0;o0&&(!o.multiline||o.multiline&&e[o.lastIndex-1]!==` -`)&&(c="(?: "+c+")",h=" "+h,d++),n=new RegExp("^(?:"+c+")",l)),_f&&(n=new RegExp("^"+c+"$(?!\\s)",l)),Cf&&(t=o.lastIndex),r=Zl.call(s?n:o,h),s?r?(r.input=r.input.slice(d),r[0]=r[0].slice(d),r.index=o.lastIndex,o.lastIndex+=r[0].length):o.lastIndex=0:Cf&&r&&(o.lastIndex=o.global?r.index+r[0].length:t),_f&&r&&r.length>1&&Ek.call(r[0],n,function(){for(i=1;i")!=="7"}),$m="a".replace(/./,"$0")==="$0",Bm=Vt("replace"),Hm=!!/./[Bm]&&/./[Bm]("a","$0")==="",Dk=!Nt(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),jm=function(e,t,n,r){var i=Vt(e),o=!Nt(function(){var p={};return p[i]=function(){return 7},""[e](p)!=7}),s=o&&!Nt(function(){var p=!1,y=/a/;return e==="split"&&((y={}).constructor={},y.constructor[Ik]=function(){return y},y.flags="",y[i]=/./[i]),y.exec=function(){return p=!0,null},y[i](""),!p});if(!o||!s||e==="replace"&&(!Pk||!$m||Hm)||e==="split"&&!Dk){var l=/./[i],c=n(i,""[e],function(p,y,C,w,k){return y.exec===sa?o&&!k?{done:!0,value:l.call(y,C,w)}:{done:!0,value:p.call(C,y,w)}:{done:!1}},{REPLACE_KEEPS_$0:$m,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Hm}),d=c[0],h=c[1];_i(String.prototype,e,d),_i(RegExp.prototype,i,t==2?function(p,y){return h.call(p,this,y)}:function(p){return h.call(p,this)})}r&&fr(RegExp.prototype[i],"sham",!0)},Rk=Vt("match"),Um=function(e){var t;return cn(e)&&((t=e[Rk])!==void 0?!!t:Xr(e)=="RegExp")},wf=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e},Nk=Vt("species"),Wm=function(e){return function(t,n){var r,i,o=String(bi(t)),s=Ho(n),l=o.length;return s<0||s>=l?e?"":void 0:(r=o.charCodeAt(s))<55296||r>56319||s+1===l||(i=o.charCodeAt(s+1))<56320||i>57343?e?o.charAt(s):r:e?o.slice(s,s+2):i-56320+(r-55296<<10)+65536}},Km={codeAt:Wm(!1),charAt:Wm(!0)},Mk=Km.charAt,Vm=function(e,t,n){return t+(n?Mk(e,t).length:1)},Tf=function(e,t){var n=e.exec;if(typeof n=="function"){var r=n.call(e,t);if(typeof r!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return r}if(Xr(e)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return sa.call(e,t)},Fk=[].push,$k=Math.min,Vo=!Nt(function(){return!RegExp(4294967295,"y")});jm("split",2,function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var s=String(bi(this)),l=o===void 0?4294967295:o>>>0;if(l===0)return[];if(i===void 0)return[s];if(!Um(i))return t.call(s,i,l);for(var c,d,h,p=[],y=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),C=0,w=new RegExp(i.source,y+"g");(c=sa.call(w,s))&&!((d=w.lastIndex)>C&&(p.push(s.slice(C,c.index)),c.length>1&&c.index=l));)w.lastIndex===c.index&&w.lastIndex++;return C===s.length?!h&&w.test("")||p.push(""):p.push(s.slice(C)),p.length>l?p.slice(0,l):p}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:t.call(this,i,o)}:t,[function(i,o){var s=bi(this),l=i==null?void 0:i[e];return l!==void 0?l.call(i,s,o):r.call(String(s),i,o)},function(i,o){var s=n(r,i,this,o,r!==t);if(s.done)return s.value;var l=On(i),c=String(this),d=function(D,Te){var m,ue=On(D).constructor;return ue===void 0||(m=On(ue)[Nk])==null?Te:wf(m)}(l,RegExp),h=l.unicode,p=(l.ignoreCase?"i":"")+(l.multiline?"m":"")+(l.unicode?"u":"")+(Vo?"y":"g"),y=new d(Vo?l:"^(?:"+l.source+")",p),C=o===void 0?4294967295:o>>>0;if(C===0)return[];if(c.length===0)return Tf(y,c)===null?[c]:[];for(var w=0,k=0,O=[];k1?arguments[1]:void 0,t.length)),r=String(e);return qm?qm.call(t,r,n):t.slice(n,n+r.length)===r}});var qo=function(e){return typeof e=="string"},zo=function(e){return e!==null&&Gm(e)==="object"},Go=function(){function e(){Gi(this,e)}return Yi(e,null,[{key:"isWindow",value:function(t){return t===window}},{key:"addEventListener",value:function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&r&&t.addEventListener(n,r,i)}},{key:"removeEventListener",value:function(t,n,r){var i=arguments.length>3&&arguments[3]!==void 0&&arguments[3];t&&n&&r&&t.removeEventListener(n,r,i)}},{key:"triggerDragEvent",value:function(t,n){var r=!1,i=function(s){var l;(l=n.drag)===null||l===void 0||l.call(n,s)},o=function s(l){var c;e.removeEventListener(document,"mousemove",i),e.removeEventListener(document,"mouseup",s),document.onselectstart=null,document.ondragstart=null,r=!1,(c=n.end)===null||c===void 0||c.call(n,l)};e.addEventListener(t,"mousedown",function(s){var l;r||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},e.addEventListener(document,"mousemove",i),e.addEventListener(document,"mouseup",o),r=!0,(l=n.start)===null||l===void 0||l.call(n,s))})}},{key:"getBoundingClientRect",value:function(t){return t&&zo(t)&&t.nodeType===1?t.getBoundingClientRect():null}},{key:"hasClass",value:function(t,n){return!!(t&&zo(t)&&qo(n)&&t.nodeType===1)&&t.classList.contains(n.trim())}},{key:"addClass",value:function(t,n){if(t&&zo(t)&&qo(n)&&t.nodeType===1&&(n=n.trim(),!e.hasClass(t,n))){var r=t.className;t.className=r?r+" "+n:n}}},{key:"removeClass",value:function(t,n){if(t&&zo(t)&&qo(n)&&t.nodeType===1&&typeof t.className=="string"){n=n.trim();for(var r=t.className.trim().split(" "),i=r.length-1;i>=0;i--)r[i]=r[i].trim(),r[i]&&r[i]!==n||r.splice(i,1);t.className=r.join(" ")}}},{key:"toggleClass",value:function(t,n,r){t&&zo(t)&&qo(n)&&t.nodeType===1&&t.classList.toggle(n,r)}},{key:"replaceClass",value:function(t,n,r){t&&zo(t)&&qo(n)&&qo(r)&&t.nodeType===1&&(n=n.trim(),r=r.trim(),e.removeClass(t,n),e.addClass(t,r))}},{key:"getScrollTop",value:function(t){var n="scrollTop"in t?t.scrollTop:t.pageYOffset;return Math.max(n,0)}},{key:"setScrollTop",value:function(t,n){"scrollTop"in t?t.scrollTop=n:t.scrollTo(t.scrollX,n)}},{key:"getRootScrollTop",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},{key:"setRootScrollTop",value:function(t){e.setScrollTop(window,t),e.setScrollTop(document.body,t)}},{key:"getElementTop",value:function(t,n){if(e.isWindow(t))return 0;var r=n?e.getScrollTop(n):e.getRootScrollTop();return t.getBoundingClientRect().top+r}},{key:"getVisibleHeight",value:function(t){return e.isWindow(t)?t.innerHeight:t.getBoundingClientRect().height}},{key:"isHidden",value:function(t){if(!t)return!1;var n=window.getComputedStyle(t),r=n.display==="none",i=t.offsetParent===null&&n.position!=="fixed";return r||i}},{key:"triggerEvent",value:function(t,n){if("createEvent"in document){var r=document.createEvent("HTMLEvents");r.initEvent(n,!1,!0),t.dispatchEvent(r)}}},{key:"calcAngle",value:function(t,n){var r=t.getBoundingClientRect(),i=r.left+r.width/2,o=r.top+r.height/2,s=Math.abs(i-n.clientX),l=Math.abs(o-n.clientY),c=l/Math.sqrt(Math.pow(s,2)+Math.pow(l,2)),d=Math.acos(c),h=Math.floor(180/(Math.PI/d));return n.clientX>i&&n.clientY>o&&(h=180-h),n.clientX==i&&n.clientY>o&&(h=180),n.clientX>i&&n.clientY==o&&(h=90),n.clientXo&&(h=180+h),n.clientX1?r-1:0),o=1;o]*>)/g,rS=/\$([$&'`]|\d\d?)/g,iS=function(e,t,n,r,i,o){var s=n+e.length,l=r.length,c=rS;return i!==void 0&&(i=Zr(i),c=nS),tS.call(o,c,function(d,h){var p;switch(h.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(s);case"<":p=i[h.slice(1,-1)];break;default:var y=+h;if(y===0)return d;if(y>l){var C=eS(y/10);return C===0?d:C<=l?r[C-1]===void 0?h.charAt(1):r[C-1]+h.charAt(1):d}p=r[y-1]}return p===void 0?"":p})},oS=Math.max,sS=Math.min;jm("replace",2,function(e,t,n,r){var i=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=r.REPLACE_KEEPS_$0,s=i?"$":"$0";return[function(l,c){var d=bi(this),h=l==null?void 0:l[e];return h!==void 0?h.call(l,d,c):t.call(String(d),l,c)},function(l,c){if(!i&&o||typeof c=="string"&&c.indexOf(s)===-1){var d=n(t,l,this,c);if(d.done)return d.value}var h=On(l),p=String(this),y=typeof c=="function";y||(c=String(c));var C=h.global;if(C){var w=h.unicode;h.lastIndex=0}for(var k=[];;){var O=Tf(h,p);if(O===null||(k.push(O),!C))break;String(O[0])===""&&(h.lastIndex=Vm(p,Jn(h.lastIndex),w))}for(var N,L="",K=0,D=0;D=K&&(L+=p.slice(K,m)+j,K=m+Te.length)}return L+p.slice(K)}]}),function(){function e(){Gi(this,e)}return Yi(e,null,[{key:"camelize",value:function(t){return t.replace(/-(\w)/g,function(n,r){return r?r.toUpperCase():""})}},{key:"capitalize",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),e}(),function(){function e(){Gi(this,e)}return Yi(e,null,[{key:"_clone",value:function(){}}]),e}();var Ym=Vt("isConcatSpreadable"),aS=Jl>=51||!Nt(function(){var e=[];return e[Ym]=!1,e.concat()[0]!==e}),lS=mf("concat"),uS=function(e){if(!cn(e))return!1;var t=e[Ym];return t!==void 0?!!t:Wo(e)};_n({target:"Array",proto:!0,forced:!aS||!lS},{concat:function(e){var t,n,r,i,o,s=Zr(this),l=Xl(s,0),c=0;for(t=-1,r=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");Ko(l,c++,o)}return l.length=c,l}});var Ef,aa=function(e,t,n){if(wf(e),t===void 0)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(r){return e.call(t,r)};case 2:return function(r,i){return e.call(t,r,i)};case 3:return function(r,i,o){return e.call(t,r,i,o)}}return function(){return e.apply(t,arguments)}},Xm=[].push,wi=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,s=e==7,l=e==5||o;return function(c,d,h,p){for(var y,C,w=Zr(c),k=jl(w),O=aa(d,h,3),N=Jn(k.length),L=0,K=p||Xl,D=t?K(c,N):n||s?K(c,0):void 0;N>L;L++)if((l||L in k)&&(C=O(y=k[L],L,w),e))if(t)D[L]=C;else if(C)switch(e){case 3:return!0;case 5:return y;case 6:return L;case 2:Xm.call(D,y)}else switch(e){case 4:return!1;case 7:Xm.call(D,y)}return o?-1:r||i?i:D}},Jm={forEach:wi(0),map:wi(1),filter:wi(2),some:wi(3),every:wi(4),find:wi(5),findIndex:wi(6),filterOut:wi(7)},cS=cr?Object.defineProperties:function(e,t){On(e);for(var n,r=Sf(t),i=r.length,o=0;i>o;)Jr.f(e,n=r[o++],t[n]);return e},fS=Vl("document","documentElement"),Zm=cf("IE_PROTO"),Of=function(){},Qm=function(e){return"","import common from \"@/utils/common\";\n\nexport default {\n data() {\n return {\n autocompleteResults: null,\n\n showAppendList: false,\n appendListStyle: {\n top: 0,\n left: 0,\n },\n appendListSelected: null,\n appendListChildSelected: null,\n appendList: [\n {\n \"type\": \"wrap\",\n \"name\": \"line_break_character\",\n \"icon\": \"wrap\",\n \"children\": []\n },\n /*{\n \"type\": \"lora\",\n \"name\": \"Lora\",\n \"children\": []\n },*/\n /*{\n \"type\": \"favorite\",\n \"name\": \"favorite\",\n \"icon\": \"favorite\",\n \"children\": []\n },\n {\n \"type\": \"history\",\n \"name\": \"history\",\n \"icon\": \"history\",\n \"children\": []\n }*/\n ],\n\n favorites: [],\n autoInputPrompt: 'disabled',\n autoInputPromptKey: '',\n }\n },\n computed: {\n appendListChildItemTags() {\n if (this.appendListSelected === null) return []\n if (this.appendListChildSelected === null) return []\n if (this.appendList[this.appendListSelected].type !== 'favorite' && this.appendList[this.appendListSelected].type !== 'history') return []\n return this.appendList[this.appendListSelected].children[this.appendListChildSelected].tags\n }\n },\n mounted() {\n this.initAutoInputPrompt()\n let temp = [\n {\n 'name': 'txt2img',\n 'type': 'prompt',\n 'key': 'txt2img',\n 'neg': false,\n },\n {\n 'name': 'txt2img',\n 'type': 'negative_prompt',\n 'key': 'txt2img_neg',\n 'neg': true,\n },\n {\n 'name': 'img2img',\n 'type': 'prompt',\n 'key': 'img2img',\n 'neg': false,\n },\n {\n 'name': 'img2img',\n 'type': 'negative_prompt',\n 'key': 'img2img_neg',\n 'neg': true,\n },\n ]\n /*for (let i = 0; i < temp.length; i++) {\n if (temp[i].key === this.favoriteKey) {\n // 排到第一位\n let item = temp[i]\n temp.splice(i, 1)\n temp.unshift(item)\n break\n }\n }*/\n temp.forEach(item => {\n if (item.neg !== this.neg) return\n this.appendList.push({\n 'type': \"favorite\",\n 'name': [\"favorite\", item.name/*, item.type*/],\n \"icon\": \"favorite\",\n \"key\": item.key,\n 'dataKey': 'favorite.' + item.key,\n \"children\": [],\n })\n })\n /*temp.forEach(item => {\n this.appendList.push({\n 'type': \"history\",\n 'name': [\"history\", item.name, item.type],\n \"icon\": \"history\",\n \"key\": item.key,\n 'dataKey': 'history.' + item.key,\n \"children\": [],\n })\n })*/\n },\n methods: {\n onUnfoldClick() {\n if (this.hidePanel) {\n this.$nextTick(() => {\n this.onResize()\n })\n }\n this.$emit(\"update:hidePanel\", !this.hidePanel)\n },\n onTranslatesToLocalClick() {\n if (this.tags.length === 0) return // 没有关键词需要翻译\n if (this.loading['all_local']) {\n // 正在翻译中,取消翻译\n this.cancelMultiTranslate = true\n this.loading['all_local'] = false\n return\n }\n this.loading['all_local'] = true\n let tagIndexes = []\n for (const index in this.tags) {\n if (this.tags[index].type && this.tags[index].type !== 'text') continue\n tagIndexes.push(index)\n }\n return this.translates(tagIndexes, true, true).finally(() => {\n this.loading['all_local'] = false\n this.updateTags()\n })\n },\n onTranslatesToEnglishClick() {\n if (this.tags.length === 0) return // 没有关键词需要翻译\n if (this.loading['all_en']) {\n // 正在翻译中,取消翻译\n this.cancelMultiTranslate = true\n this.loading['all_en'] = false\n return\n }\n this.loading['all_en'] = true\n let tagIndexes = []\n for (const index in this.tags) {\n if (this.tags[index].type && this.tags[index].type !== 'text') continue\n tagIndexes.push(index)\n }\n this.translates(tagIndexes, false, true).finally(() => {\n this.loading['all_en'] = false\n this.updateTags()\n })\n },\n onCopyAllTagsClick() {\n this.copy(this.prompt)\n },\n onDeleteAllTagsClick() {\n if (!confirm(this.getLang('delete_all_keywords_confirm'))) return\n this.tags = []\n this.updateTags()\n },\n appendListItemName(item) {\n let names = []\n if (typeof item.name === \"object\") {\n for (let name of item.name) {\n names.push(this.getLang(name))\n }\n } else {\n names = [this.getLang(item.name)]\n }\n return names.join(' / ')\n },\n onAppendTagFocus(e) {\n if (this.$refs.promptTagAppend.value === '' || this.$refs.promptTagAppend.value.trim() === '') {\n this.appendListStyle = {\n top: e.target.offsetTop + e.target.offsetHeight + 'px',\n left: e.target.offsetLeft + 'px',\n }\n this.appendListSelected = null\n this.appendListChildSelected = null\n this.showAppendList = true\n let dataKeys = []\n this.appendList.forEach(item => {\n if (typeof item['dataKey'] === 'string') {\n dataKeys.push(item['dataKey'])\n }\n })\n this.gradioAPI.getDatas(dataKeys).then(res => {\n this.appendList.forEach(item => {\n if (typeof item['dataKey'] !== 'string') return\n item.children = res[item['dataKey']] || []\n // 反转\n item.children.reverse()\n })\n })\n /*this.gradioAPI.getFavorites(this.favoriteKey).then(res => {\n this.appendList.forEach(item => {\n if (item.type !== 'favorite') return\n item.children = res\n })\n })\n this.gradioAPI.getHistories(this.historyKey).then(res => {\n this.appendList.forEach(item => {\n if (item.type !== 'history') return\n item.children = res\n })\n })*/\n }\n this._setTextareaFocus()\n },\n onAppendTagBlur(e) {\n setTimeout(() => {\n this.showAppendList = false\n }, 300)\n },\n selectAppendList(down = true) {\n if (this.appendList.length === 0) return\n if (this.appendListSelected === null) {\n this.appendListSelected = 0\n } else {\n if (down) {\n this.appendListSelected++\n if (this.appendListSelected >= this.appendList.length) {\n this.appendListSelected = 0\n }\n } else {\n this.appendListSelected--\n if (this.appendListSelected < 0) {\n this.appendListSelected = this.appendList.length - 1\n }\n }\n }\n this.appendListChildSelected = null\n },\n selectAppendListChild(down = true) {\n if (this.appendList.length === 0) return\n if (this.appendListSelected === null) return\n if (this.appendList[this.appendListSelected].children.length === 0) return\n if (this.appendListChildSelected === null) {\n this.appendListChildSelected = 0\n } else {\n if (down) {\n this.appendListChildSelected++\n if (this.appendListChildSelected >= this.appendList[this.appendListSelected].children.length) {\n this.appendListChildSelected = 0\n }\n } else {\n this.appendListChildSelected--\n if (this.appendListChildSelected < 0) {\n this.appendListChildSelected = this.appendList[this.appendListSelected].children.length - 1\n }\n }\n }\n this.scrollAppendListChild()\n },\n scrollAppendListChild() {\n if (this.appendListSelected === null) return\n if (this.appendListChildSelected === 0 || this.appendListChildSelected === null) {\n this.$refs.promptAppendListChildren[this.appendListSelected].scrollTop = 0\n } else {\n this.$refs.promptAppendListChild[this.appendListChildSelected].scrollIntoView({\n behavior: 'smooth',\n block: 'center'\n })\n }\n },\n onAppendTagKeyDown(e, localValue = null) {\n if (e.keyCode === 38 || e.keyCode === 40) {\n } else if (e.keyCode === 13) {\n if (this.getAutocompleteResults() && this.autocompleteResults.style.display === 'block' && this.getAutocompleteResultsSelected()) {\n let text = this.getAutocompleteResultsSelectedText()\n setTimeout(() => {\n localValue = this.$refs.promptTagAppend.value\n if (text) {\n localValue = text\n } else {\n text = this.getAutocompleteResultsSelectedText()\n if (text) localValue = text\n }\n this.onAppendTagKeyDown(e, localValue)\n }, 300)\n return\n }\n\n let tags = this.$refs.promptTagAppend.value\n this.$refs.promptTagAppend.value = ''\n this.showAppendList = true\n // [night light:magical forest: 5, 15]\n console.log(tags, localValue)\n if (localValue) {\n // 去除末尾的逗号\n tags = tags.replace(/\\s*,\\s*$/, '').trim()\n if (common.hasBrackets(tags)) {\n tags = common.replaceBrackets(tags)\n }\n this._appendTag(tags, localValue)\n this.updateTags()\n } else {\n if (common.hasBrackets(tags)) {\n // 如果已经被英文括号括起来,那么就不需要再分词了\n tags = common.replaceBrackets(tags)\n tags = [tags]\n } else {\n tags = common.splitTags(tags, this.autoBreakBeforeWrap, this.autoBreakAfterWrap)\n }\n let indexes = []\n tags.forEach(tag => {\n let index = -1\n if (tag === \"\\n\") {\n index = this._appendTag(\"\\n\", \"\\n\", false, -1, 'wrap')\n } else {\n index = this._appendTag(tag)\n }\n if (index !== -1) indexes.push(index)\n })\n this.updatePrompt() // 先更新再翻译\n if (this.autoTranslateToEnglish || this.autoTranslateToLocal) {\n this.$nextTick(() => {\n let useNetwork = !(this.tagCompleteFile && this.onlyCsvOnAuto)\n if (this.autoTranslateToEnglish) {\n // 如果开启了自动翻译到英语,那么就自动翻译\n this.translates(indexes, false, useNetwork).finally(() => {\n this.updateTags()\n })\n } else if (this.autoTranslateToLocal) {\n // 如果开启了自动翻译到本地语言,那么就自动翻译\n this.translates(indexes, true, useNetwork).finally(() => {\n this.updateTags()\n })\n }\n })\n } else {\n this.updateTags()\n }\n }\n } else {\n // 不是上下键,也不是回车\n this.removeAutocompleteResultsSelected()\n }\n },\n onAppendTagKeyUp(e) {\n if (this.$refs.promptTagAppend.value === '' || this.$refs.promptTagAppend.value.trim() === '') {\n this.$refs.promptTagAppend.value = ''\n this.showAppendList = true\n\n if (e.keyCode === 38 || e.keyCode === 40) {\n // 如果是上下键\n if (this.appendListChildSelected === null) {\n this.selectAppendList(e.keyCode === 40)\n } else {\n this.selectAppendListChild(e.keyCode === 40)\n }\n } else if (e.keyCode === 37 || e.keyCode === 39) {\n // 如果是左右键\n if (this.appendListSelected !== null) {\n if (e.keyCode === 37) {\n this.appendListChildSelected = null\n this.scrollAppendListChild()\n } else {\n if (this.appendList[this.appendListSelected].children.length === 0) {\n this.appendListChildSelected = null\n } else {\n this.appendListChildSelected = 0\n this.scrollAppendListChild()\n }\n }\n }\n } else if (e.keyCode === 13) {\n // 如果是回车键\n this._appendTagByList()\n this.scrollAppendListChild()\n this.appendListSelected = null\n this.appendListChildSelected = null\n }\n } else {\n this.showAppendList = false\n }\n },\n onAppendGroupClick(index, childIndex, e) {\n if (index === null) return\n this.appendListSelected = index\n if (childIndex === null) {\n // 如果是点击的是父级\n if (this.appendList[this.appendListSelected].children.length > 0) return\n } else {\n this.appendListChildSelected = childIndex\n }\n this._appendTagByList()\n },\n onAppendListChildMouseLeave(index, childIndex, e) {\n this.appendListSelected = null\n this.appendListChildSelected = null\n },\n onAppendListChildMouseEnter(index, childIndex, e) {\n this.appendListSelected = index\n this.appendListChildSelected = childIndex\n },\n _appendTagByList() {\n if (this.appendListSelected === null) return\n const appendItem = this.appendList[this.appendListSelected]\n let appendChildItem = null\n if (appendItem.children.length > 0) {\n if (this.appendListChildSelected !== null) {\n // 有子项并且选中了子项\n appendChildItem = appendItem.children[this.appendListChildSelected]\n }\n } else {\n // 没有子项\n }\n let appendTags = []\n switch (appendItem.type) {\n case 'wrap':\n appendTags.push({\n value: \"\\n\",\n localValue: \"\\n\",\n disabled: false,\n type: 'wrap'\n })\n break\n case 'lora':\n break\n case 'favorite':\n case 'history':\n if (appendChildItem) {\n appendChildItem.tags.forEach(tag => {\n appendTags.push({\n value: tag.value,\n localValue: tag.localValue,\n disabled: tag.disabled,\n type: tag.type || 'text'\n })\n })\n }\n break\n }\n if (appendTags.length <= 0) return\n appendTags.forEach(tag => {\n this._appendTag(tag.value, tag.localValue, tag.disabled, -1, tag.type)\n })\n this.updateTags()\n },\n getAutocompleteResults() {\n if (!this.autocompleteResults) {\n const autocompleteResults = this.$refs.promptTagAppend.parentElement.querySelector('.autocompleteResults')\n if (autocompleteResults) {\n this.autocompleteResults = autocompleteResults\n // 增加mousemove事件\n if (this.autocompleteResults.getAttribute('data-mousemove') !== 'true') {\n this.autocompleteResults.setAttribute('data-mousemove', 'true')\n this.autocompleteResults.addEventListener('mousemove', (e) => {\n this.bindAutocompleteResultsClick()\n })\n }\n }\n }\n return this.autocompleteResults\n },\n removeAutocompleteResultsSelected() {\n const autocompleteResults = this.getAutocompleteResults()\n if (!autocompleteResults) return false\n autocompleteResults.querySelectorAll('li').forEach(li => {\n li.classList.remove('selected')\n })\n return true\n },\n getAutocompleteResultsSelected() {\n const autocompleteResults = this.getAutocompleteResults()\n if (!autocompleteResults) return null\n const el = autocompleteResults.querySelector('li.selected')\n if (!el) return null\n return el\n },\n getAutocompleteResultsSelectedText(el = null) {\n if (!el) {\n el = this.getAutocompleteResultsSelected()\n if (!el) return null\n }\n const $acListItem = el.querySelector('.acListItem')\n const text = $acListItem.innerText\n const match = text.match(/\\[(.+?)\\]/)\n if (!match) return null\n return match[1]\n },\n bindAutocompleteResultsClick() {\n this.getAutocompleteResults()\n if (!this.autocompleteResults) return\n // 获取列表\n let lis = this.autocompleteResults.querySelectorAll('li')\n // 给每个li绑定点击事件\n lis.forEach(li => {\n // 判断是否已经绑定过\n if (li.getAttribute('physton-on-clicked') === 'true') return\n li.setAttribute('physton-on-clicked', 'true')\n li.addEventListener('click', () => {\n this.onAutocompleteResultsClicked(li)\n })\n })\n },\n onAutocompleteResultsClicked(li) {\n const text = this.getAutocompleteResultsSelectedText(li)\n setTimeout(() => {\n let tags = this.$refs.promptTagAppend.value.replace(/,\\s*$/, '')\n this.$refs.promptTagAppend.value = ''\n // 去除末尾的逗号\n tags = tags.replace(/\\s*,\\s*$/, '').trim()\n if (common.hasBrackets(tags)) {\n tags = common.replaceBrackets(tags)\n }\n this._appendTag(tags, text)\n this.updateTags()\n }, 300)\n },\n onSettingBoxMouseEnter() {\n this.favorites = typeof window.phystonPromptfavorites === 'object' ? window.phystonPromptfavorites : []\n },\n getCurrentTypeFavorites() {\n let favorites = []\n this.favorites.forEach(favorite => {\n if (this.neg) {\n if (favorite.type !== 'negative_prompt') return\n } else {\n if (favorite.type !== 'prompt') return\n }\n favorites.push(favorite)\n })\n return favorites\n },\n onAutoInputPromptChange() {\n this.gradioAPI.setData(this.autoInputPromptKey, this.autoInputPrompt).then(() => {\n this.$toastr.success(this.getLang('success'))\n }).catch(() => {\n this.$toastr.error(this.getLang('failed'))\n })\n },\n initAutoInputPrompt() {\n this.autoInputPromptKey = 'autoInputPrompt-' + this.name\n this.gradioAPI.getData(this.autoInputPromptKey).then(res => {\n if (res === null) return\n this.autoInputPrompt = res\n if (this.autoInputPrompt === 'last') {\n this.gradioAPI.getLatestHistory(this.historyKey).then(res => {\n this.useHistory(res)\n })\n } else {\n const getFavorites = () => {\n if (typeof window.phystonPromptfavorites === 'object' && window.phystonPromptfavorites.length > 0) {\n for (let item of window.phystonPromptfavorites) {\n for (let favorite of item.list) {\n if (favorite.id === this.autoInputPrompt) {\n this.useFavorite(favorite)\n return\n }\n }\n }\n return\n }\n setTimeout(getFavorites, 100)\n }\n setTimeout(getFavorites, 100)\n }\n })\n },\n }\n}","export default {\n data() {\n return {\n // 鼠标框选功能\n dropStartX: 0,\n dropStartY: 0,\n dropEndX: 0,\n dropEndY: 0,\n dropOffsetX: 0,\n dropOffsetY: 0,\n dropIsSelecting: false,\n dropIsStart: false,\n dropIsEnd: false,\n dropArea: {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n },\n dropTags: [],\n dropTimeId: 0,\n }\n },\n methods: {\n _dropOver() {\n this.dropIsSelecting = false\n this.dropIsStart = false\n this.dropIsEnd = false\n this.dropTags = []\n for (let i = 0; i < this.$refs.promptTagsList.children.length; i++) {\n let tag = this.$refs.promptTagsList.children[i]\n if (tag.style.display === 'none') {\n // 删除display:none属性\n tag.style.display = ''\n }\n tag.classList.remove('drop-selected')\n }\n },\n onDropMouseDown(e) {\n if (this.droping) return\n this._dropOver()\n this.dropOffsetX = e.clientX - e.layerX\n this.dropOffsetY = e.clientY - e.layerY\n this.dropStartX = e.clientX - this.dropOffsetX\n this.dropStartY = e.clientY - this.dropOffsetY\n this.dropEndX = e.clientX - this.dropOffsetX\n this.dropEndY = e.clientY - this.dropOffsetY\n this.dropIsStart = true\n },\n onDropMouseMove(e) {\n if (this.dropIsStart) {\n this.dropIsSelecting = true\n this.dropEndX = e.clientX - this.dropOffsetX\n this.dropEndY = e.clientY - this.dropOffsetY\n let left = Math.min(this.dropStartX, this.dropEndX)\n let top = Math.min(this.dropStartY, this.dropEndY)\n let width = Math.abs(this.dropStartX - this.dropEndX)\n let height = Math.abs(this.dropStartY - this.dropEndY)\n // 设置不超过 this.$refs.promptTags 范围\n left = Math.max(left, 0)\n top = Math.max(top, 0)\n width = Math.min(width, this.$refs.promptTags.clientWidth - left)\n height = Math.min(height, this.$refs.promptTags.clientHeight - top)\n\n this.dropArea.top = top\n this.dropArea.left = left\n this.dropArea.width = width\n this.dropArea.height = height\n\n if (this.dropTimeId) clearTimeout(this.dropTimeId)\n this.dropTimeId = setTimeout(this.dropSelectItems, 10)\n }\n },\n dropSelectItems() {\n if (this.dropTimeId) clearTimeout(this.dropTimeId)\n let selectIds = []\n for (let i = 0; i < this.$refs.promptTagsList.children.length; i++) {\n let tag = this.$refs.promptTagsList.children[i]\n if (!tag.classList.contains('prompt-tag')) continue\n let tagLeft = tag.offsetLeft\n let tagTop = tag.offsetTop\n let tagWidth = tag.clientWidth\n let tagHeight = tag.clientHeight\n let tagRight = tagLeft + tagWidth\n let tagBottom = tagTop + tagHeight\n let isSelect = !(tagRight < this.dropArea.left || tagBottom < this.dropArea.top || tagLeft > this.dropArea.left + this.dropArea.width || tagTop > this.dropArea.top + this.dropArea.height)\n if (isSelect) {\n selectIds.push(tag.getAttribute('data-id'))\n tag.classList.add('drop-selected')\n } else {\n tag.classList.remove('drop-selected')\n }\n this.dropTags = selectIds\n }\n },\n onDropMouseUp(e) {\n this.dropIsSelecting = false\n this.dropIsStart = false\n this.dropIsEnd = true\n this.$refs.dropSelectBtns.style.left = this.$refs.dropSelectBox.style.left\n this.$refs.dropSelectBtns.style.top = this.$refs.dropSelectBox.style.top\n },\n _getDropTags() {\n let tags = []\n this.dropTags.forEach(id => {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n tags.push(tag)\n })\n return tags\n },\n _getDropIndexes() {\n let indexes = []\n this.dropTags.forEach(id => {\n let index = this.tags.findIndex(tag => tag.id === id)\n if (index === -1) return\n indexes.push(index)\n })\n return indexes\n },\n _getDropTagsEle() {\n let elements = []\n this.dropTags.forEach(id => {\n let tag = this.$refs.promptTagsList.querySelector(`.prompt-tag[data-id=\"${id}\"]`)\n if (!tag) return\n elements.push(tag)\n })\n return elements\n },\n onDropCopy() {\n let tags = this._getDropTags()\n this._dropOver()\n let prompt = this.genPrompt(tags, true)\n this.copy(prompt)\n },\n onDropFavorite() {\n let tags = this._getDropTags()\n this._dropOver()\n let prompt = this.genPrompt(tags, true)\n this.gradioAPI.pushFavorite(this.favoriteKey, tags, prompt, '').then(res => {\n if (res) {\n this.$toastr.success(this.getLang('success'))\n this.$emit('refreshFavorites', this.favoriteKey)\n } else {\n this.$toastr.error(this.getLang('failed'))\n }\n }).catch(error => {\n this.$toastr.error(this.getLang('failed'))\n })\n },\n onDropDisable() {\n let tags = this._getDropTags()\n this._dropOver()\n tags.forEach(tag => {\n tag.disabled = true\n })\n this.updateTags()\n },\n onDropEnable() {\n let tags = this._getDropTags()\n this._dropOver()\n tags.forEach(tag => {\n tag.disabled = false\n })\n this.updateTags()\n },\n onDropDelete() {\n let indexes = this._getDropIndexes()\n this._dropOver()\n indexes.sort((a, b) => b - a)\n indexes.forEach(index => {\n this.tags.splice(index, 1)\n })\n this.updateTags()\n },\n }\n}","var GHOST_ELEMENT_ID = '__autosizeInputGhost'\n\nvar characterEntities = {\n ' ': 'nbsp',\n '<': 'lt',\n '>': 'gt'\n}\nfunction mapSpecialCharacterToCharacterEntity (specialCharacter) {\n return '&' + characterEntities[specialCharacter] + ';'\n}\nfunction escapeSpecialCharacters (string) {\n return string.replace(/\\s|<|>/g, mapSpecialCharacterToCharacterEntity)\n}\n\n// Create `ghostElement`, with inline styles to hide it and ensure that the text is all\n// on a single line.\nfunction createGhostElement () {\n var ghostElement = document.createElement('div')\n ghostElement.id = GHOST_ELEMENT_ID\n ghostElement.style.cssText =\n 'display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;'\n document.body.appendChild(ghostElement)\n return ghostElement\n}\n\nmodule.exports = function (element, options) {\n var elementStyle = window.getComputedStyle(element)\n // prettier-ignore\n var elementCssText = 'box-sizing:' + elementStyle.boxSizing +\n ';border-left:' + elementStyle.borderLeftWidth + ' solid red' +\n ';border-right:' + elementStyle.borderRightWidth + ' solid red' +\n ';font-family:' + elementStyle.fontFamily +\n ';font-feature-settings:' + elementStyle.fontFeatureSettings +\n ';font-kerning:' + elementStyle.fontKerning +\n ';font-size:' + elementStyle.fontSize +\n ';font-stretch:' + elementStyle.fontStretch +\n ';font-style:' + elementStyle.fontStyle +\n ';font-variant:' + elementStyle.fontVariant +\n ';font-variant-caps:' + elementStyle.fontVariantCaps +\n ';font-variant-ligatures:' + elementStyle.fontVariantLigatures +\n ';font-variant-numeric:' + elementStyle.fontVariantNumeric +\n ';font-weight:' + elementStyle.fontWeight +\n ';letter-spacing:' + elementStyle.letterSpacing +\n ';margin-left:' + elementStyle.marginLeft +\n ';margin-right:' + elementStyle.marginRight +\n ';padding-left:' + elementStyle.paddingLeft +\n ';padding-right:' + elementStyle.paddingRight +\n ';text-indent:' + elementStyle.textIndent +\n ';text-transform:' + elementStyle.textTransform\n\n // Assigns an appropriate width to the given `element` based on its contents.\n function setWidth () {\n var string = element.value || element.getAttribute('placeholder') || ''\n // Check if the `ghostElement` exists. If no, create it.\n var ghostElement =\n document.getElementById(GHOST_ELEMENT_ID) || createGhostElement()\n // Copy all width-affecting styles to the `ghostElement`.\n ghostElement.style.cssText += elementCssText\n ghostElement.innerHTML = escapeSpecialCharacters(string)\n // Copy the width of `ghostElement` to `element`.\n var width = window.getComputedStyle(ghostElement).width\n element.style.width = width\n return width\n }\n\n element.addEventListener('input', setWidth)\n\n var width = setWidth()\n\n // Set `min-width` only if `options.minWidth` was set, and only if the initial\n // width is non-zero.\n if (options && options.minWidth && width !== '0px') {\n element.style.minWidth = width\n }\n\n // Return a function for unbinding the event listener and removing the `ghostElement`.\n return function () {\n element.removeEventListener('input', setWidth)\n var ghostElement = document.getElementById(GHOST_ELEMENT_ID)\n if (ghostElement) {\n ghostElement.parentNode.removeChild(ghostElement)\n }\n }\n}\n","import common from \"@/utils/common\";\nimport autoSizeInput from \"autosize-input\";\n\nexport default {\n data() {\n return {\n tagClickTimeId: 0,\n }\n },\n mounted() {\n common.gradioApp().addEventListener('mousemove', () => {\n this.$refs.highlightPrompt.hide()\n })\n },\n methods: {\n _setTag(tag) {\n if (typeof tag['type'] === 'string' && tag.type === 'wrap') {\n tag.weightNum = 1\n tag.incWeight = 0\n tag.decWeight = 0\n } else {\n tag.weightNum = common.getTagWeightNum(tag.value)\n tag.weightNum = tag.weightNum <= 0 ? 1 : tag.weightNum\n tag.incWeight = common.getTagIncWeight(tag.value)\n tag.decWeight = common.getTagDecWeight(tag.value)\n // const bracket = common.hasBrackets(tag.value)\n }\n this._setTagClass(tag)\n this.$nextTick(() => {\n this._setTagHeight(tag)\n })\n },\n _setTagHeight(tag) {\n let maxNum = 10\n let interval = setInterval(() => {\n // console.log(maxNum, tag)\n maxNum--\n if (maxNum <= 0) clearInterval(interval)\n if (!this.$refs['promptTagValue-' + tag.id]) return false\n if (!this.$refs['promptTagValue-' + tag.id][0]) return false\n clearInterval(interval)\n let $tag = this.$refs['promptTagValue-' + tag.id][0]\n let height = $tag.offsetHeight\n $tag.parentNode.style.height = height + 'px'\n if (this.$refs['promptTagEdit-' + tag.id]) {\n this.$refs['promptTagEdit-' + tag.id][0].style.height = height + 'px'\n }\n if (this.$refs['promptTagDelete-' + tag.id]) {\n this.$refs['promptTagDelete-' + tag.id][0].style.height = height + 'px'\n }\n }, 50)\n },\n _getTagType(tag) {\n\n },\n _setTagClass(tag) {\n tag.isLora = false\n tag.loraExists = false\n tag.isLyco = false\n tag.lycoExists = false\n tag.isEmbedding = false\n\n if (typeof tag['type'] === 'string' && tag.type === 'wrap') {\n } else {\n // 判断是否lora\n const match = tag.value.match(common.loraRegex)\n if (match) {\n tag.isLora = true\n const loraName = this.loraExists(match[1])\n if (loraName !== false) {\n tag.loraExists = true\n tag.loraName = loraName\n }\n }\n\n if (!tag.isLora) {\n // 判断是否lyco\n const match = tag.value.match(common.lycoRegex)\n if (match) {\n tag.isLyco = true\n const lycoName = this.lycoExists(match[1])\n if (lycoName !== false) {\n tag.lycoExists = true\n tag.lycoName = lycoName\n }\n }\n }\n\n if (!tag.isLora && !tag.isLyco) {\n // 判断是否embedding\n const embeddingName = this.embeddingExists(tag.value)\n if (embeddingName !== false) {\n tag.isEmbedding = true\n tag.value = embeddingName\n } else {\n // 判断是否被括号包裹的embedding\n\n let value = tag.value\n const bracket = common.hasBrackets(value)\n if ((bracket[0] === '(' && bracket[1] === ')') || bracket[0] === '[' && bracket[1] === ']') {\n // 移除括号\n value = common.setLayers(value, 0, bracket[0], bracket[1])\n // 移除权重数\n value = value.replace(common.weightNumRegex, '$1')\n const embeddingName = this.embeddingExists(value)\n if (embeddingName !== false) {\n tag.isEmbedding = true\n // tag.value = embeddingName\n }\n }\n }\n }\n }\n\n let classes = ['prompt-tag-value']\n if (tag.isLora) {\n classes.push('lora-tag')\n if (!tag.loraExists) {\n classes.push('lora-not-exists')\n }\n } else if (tag.isLyco) {\n classes.push('lyco-tag')\n if (!tag.lycoExists) {\n classes.push('lyco-not-exists')\n }\n } else if (tag.isEmbedding) {\n classes.push('embedding-tag')\n } else if (this.neg) {\n classes.push('neg-tag')\n }\n\n tag.classes = classes\n return classes\n },\n _setTagById(id, value = null, localValue = null) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (value !== null) tag.value = value\n if (localValue !== null) tag.localValue = localValue\n return tag\n },\n _isTagBlacklist(tag) {\n if (typeof tag['type'] === 'string' && tag.type === 'wrap') return false\n if (tag.isLora) {\n if (this.blacklist.lora && this.blacklist.lora.includes(tag.loraName)) return true\n } else if (tag.isLyco) {\n if (this.blacklist.lycoris && this.blacklist.lycoris.includes(tag.lycoName)) return true\n } else if (tag.isEmbedding) {\n if (this.blacklist.embedding && this.blacklist.embedding.includes(tag.value)) return true\n } else {\n if (this.neg) {\n if (this.blacklist.negative_prompt && this.blacklist.negative_prompt.includes(tag.value)) return true\n } else {\n if (this.blacklist.prompt && this.blacklist.prompt.includes(tag.value)) return true\n }\n }\n return false\n },\n _appendTag(value, localValue = '', disabled = false, index = -1, type = 'text') {\n if (value === '') return -1\n // 唯一数:当前时间戳+随机数\n const id = Date.now() + (Math.random() * 1000000).toFixed(0)\n let tag = {\n id,\n value: value === null || value === undefined || value === false ? '' : value,\n localValue: localValue === null || localValue === undefined || localValue === false ? '' : localValue,\n disabled,\n type\n }\n this._setTag(tag)\n // value = common.setLayers(value, 0, '(', ')')\n // value = common.setLayers(value, 0, '[', ']')\n if (this._isTagBlacklist(tag)) return -1\n if (index >= 0) {\n // 插入到指定位置\n this.tags.splice(index, 0, tag)\n } else {\n index = this.tags.push(tag)\n }\n this.$nextTick(() => {\n if (this.$refs['promptTagEdit-' + id]) autoSizeInput(this.$refs['promptTagEdit-' + id][0])\n })\n return index - 1\n },\n renderTag(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return ''\n let value = tag.value\n if (value === 'BREAK' && (this.autoBreakBeforeWrap || this.autoBreakAfterWrap)) {\n value = '
---------------------
BREAK
---------------------
'\n } else {\n value = common.escapeHtml(value)\n if (tag.incWeight > 0) {\n value = common.setLayers(value, 0, '(', ')')\n value = '
' + value + '
'\n let start = '
' + '('.repeat(tag.incWeight) + '
'\n let end = '
' + ')'.repeat(tag.incWeight) + '
'\n value = start + value + end\n } else if (tag.decWeight > 0) {\n value = common.setLayers(value, 0, '[', ']')\n value = '
' + value + '
'\n let start = '
' + '['.repeat(tag.decWeight) + '
'\n let end = '
' + ']'.repeat(tag.decWeight) + '
'\n value = start + value + end\n } else {\n value = '
' + value + '
'\n }\n }\n return value\n },\n isFavorite(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (typeof window.phystonPromptfavorites === 'object') {\n for (const group of window.phystonPromptfavorites) {\n if (group.key !== this.favoriteKey) continue\n for (const favorite of group.list) {\n if (favorite.tags.length !== 1) continue\n if (favorite.tags[0].value === tag.value) return favorite.id\n }\n }\n }\n return false\n },\n onTagMouseEnter(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n tag.isFavorite = this.isFavorite(tag.id)\n },\n onTagMouseMove(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.$refs.highlightPrompt.show(tag)\n },\n onTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (this.tagClickTimeId) clearTimeout(this.tagClickTimeId)\n this.tagClickTimeId = setTimeout(() => {\n this.editing = {}\n this.editing[tag.id] = true\n this.$forceUpdate()\n this.$nextTick(() => {\n const input = this.$refs['promptTagEdit-' + tag.id][0]\n input.focus()\n input.dispatchEvent(new Event('input'))\n // input.select()\n })\n clearTimeout(this.tagClickTimeId)\n }, 250)\n },\n onTagDblclick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n clearTimeout(this.tagClickTimeId)\n this.onDisabledTagClick(tag.id)\n },\n onTagInputBlur(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.editing[tag.id] = false\n },\n onTagInputKeyDown(id, e) {\n if (e.keyCode === 13) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n this.editing[tag.id] = false\n if (tag.value !== e.target.value) {\n tag.value = e.target.value\n this._setTag(tag)\n this.updateTags()\n }\n }\n },\n onTagInputChange(id, e) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n if (tag.value === e.target.value) return\n tag.value = e.target.value\n this._setTag(tag)\n this.updateTags()\n },\n onTagWeightNumChange(id, e) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n e = typeof e === \"number\" || typeof a === \"string\" ? e : e.target.value\n if (tag.weightNum == e) return\n let weightNum = e\n let value = tag.value\n let localValue = tag.localValue\n if (weightNum > 0) {\n if (weightNum === 1 && !this.autoKeepWeightOne) {\n // 如果权重数是1,那么就去掉权重数\n const bracket = common.hasBrackets(value)\n if (bracket[0] === '(' && bracket[1] === ')') {\n // 移除括号\n value = common.setLayers(value, 0, bracket[0], bracket[1])\n if (localValue !== '') localValue = common.setLayers(localValue, 0, bracket[0], bracket[1])\n } else {\n // 不移除括号\n }\n // 移除权重数\n value = value.replace(common.weightNumRegex, '$1')\n if (localValue !== '') localValue = localValue.replace(common.weightNumRegex, '$1')\n } else {\n // 如果原来没有权重数,那么就加上权重数\n if (!common.weightNumRegex.test(value)) {\n // 如果原来有括号,就要加到括号内\n let bracket = common.hasBrackets(value)\n if (bracket) {\n value = common.setLayers(value, 1, bracket[0], bracket[1], ':' + weightNum)\n if (localValue !== '') localValue = common.setLayers(localValue, 1, bracket[0], bracket[1], ':' + weightNum)\n } else {\n value = value + ':' + weightNum\n if (localValue !== '') localValue = localValue + ':' + weightNum\n }\n }\n // 如果原来没有括号() [] {} <>,那么就加上括号\n if (!common.hasBrackets(value)) {\n value = common.setLayers(value, 1, '(', ')')\n if (localValue !== '') localValue = common.setLayers(localValue, 1, '(', ')')\n }\n }\n if (value !== tag.value) {\n tag.value = value\n if (localValue !== '') tag.localValue = localValue\n this._setTag(tag)\n }\n } else {\n // 如果原来的括号是<>,那么最小权重数只能是0.1\n const bracket = common.hasBrackets(value)\n if (bracket[0] === '<' && bracket[1] === '>') {\n weightNum = 0.1\n } else {\n if (this.autoKeepWeightZero) {\n // 保留权重数\n tag.value = value.replace(common.weightNumRegex, '$1:0')\n if (localValue !== '') tag.localValue = tag.localValue.replace(common.weightNumRegex, '$1:0')\n } else {\n // 移除权重数\n tag.value = value.replace(common.weightNumRegex, '$1')\n if (localValue !== '') tag.localValue = tag.localValue.replace(common.weightNumRegex, '$1')\n }\n }\n }\n tag.weightNum = weightNum\n this.updateTags()\n },\n onDeleteTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n let index = this.tags.indexOf(tag)\n this.tags.splice(index, 1)\n this.updateTags()\n },\n onFavoriteTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return false\n let favoriteId = this.isFavorite(tag.id)\n if (!favoriteId) {\n // 收藏\n this.gradioAPI.pushFavorite(this.favoriteKey, [tag], tag.value, tag.localValue === '' ? tag.value : tag.localValue).then(res => {\n if (res) {\n tag.isFavorite = true\n this.$emit('refreshFavorites', this.favoriteKey)\n }\n })\n } else {\n // 取消收藏\n this.gradioAPI.unFavorite(this.favoriteKey, favoriteId).then(res => {\n if (res) {\n tag.isFavorite = false\n this.$emit('refreshFavorites', this.favoriteKey)\n }\n })\n }\n },\n onDisabledTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n tag.disabled = !tag.disabled\n this.updateTags()\n },\n onIncWeightClick(id, num) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let value = tag.value\n let localValue = tag.localValue\n value = common.setLayers(value, 0, '[', ']')\n if (localValue !== '') localValue = common.setLayers(localValue, 0, '[', ']')\n let incWeight = tag.incWeight\n incWeight += num\n if (incWeight < 0) incWeight = 0\n tag.incWeight = incWeight\n tag.decWeight = 0\n value = common.setLayers(value, incWeight, '(', ')')\n if (localValue !== '') localValue = common.setLayers(localValue, incWeight, '(', ')')\n tag.value = value\n if (localValue !== '') tag.localValue = localValue\n this.updateTags()\n },\n onDecWeightClick(id, num) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let value = tag.value\n let localValue = tag.localValue\n value = common.setLayers(value, 0, '(', ')')\n if (localValue !== '') localValue = common.setLayers(localValue, 0, '(', ')')\n let decWeight = tag.decWeight\n decWeight += num\n if (decWeight < 0) decWeight = 0\n tag.incWeight = 0\n tag.decWeight = decWeight\n value = common.setLayers(value, decWeight, '[', ']')\n if (localValue !== '') localValue = common.setLayers(localValue, decWeight, '[', ']')\n tag.value = value\n if (localValue !== '') tag.localValue = localValue\n this.updateTags()\n },\n onWrapTagClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let index = this.tags.indexOf(tag)\n let wrapIndex = this._appendTag(\"\\n\", \"\\n\", false, -1, 'wrap')\n let wrapTag = this.tags[wrapIndex]\n // 移动到当前标签的下面\n this.tags.splice(wrapIndex, 1);\n // 然后将 'c' 插入到 'e' 后面\n this.tags.splice(index + 1, 0, wrapTag);\n this.updateTags()\n },\n onTranslateToLocalClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let index = this.tags.indexOf(tag)\n if (this.loading[tag.id + '_local']) return\n this.translates([index], true, true).finally(() => {\n this.updateTags()\n })\n },\n onTranslateToEnglishClick(id) {\n let tag = this.tags.find(tag => tag.id === id)\n if (!tag) return\n let index = this.tags.indexOf(tag)\n if (this.loading[tag.id + '_en']) return\n this.translates([index], false, true).finally(() => {\n this.updateTags()\n })\n },\n }\n}","import common from \"@/utils/common\"\nimport {ref} from \"vue\"\n\nexport default {\n data() {\n return {\n groupTagsActive: 0,\n subGroupTagsActive: 0,\n groupTagsColorKeyCache: {},\n }\n },\n watch: {\n groupTags: {\n handler() {\n for (let item of this.groupTags) {\n for (let group of item.groups) {\n if (group.type && group.typ == 'wrap') continue\n let key = this.getTagsColorKey(item.name, group.name)\n if (!this.groupTagsColor[key]) {\n this.groupTagsColor[key] = ref(common.fitterInputColor(group.color))\n }\n for (let en in group.tags) {\n this.groupTagsColorKeyCache[en] = key\n }\n }\n }\n },\n deep: true,\n immediate: true,\n },\n },\n methods: {\n activeGroupTab(index) {\n this.groupTagsActive = index\n this.subGroupTagsActive = 0\n let scrollLeft = this.$refs.groupTabsHeader.children[index].offsetLeft - this.$refs.groupTabsHeader.offsetWidth / 2 + this.$refs.groupTabsHeader.children[index].offsetWidth / 2\n this.$refs.groupTabsHeader.scrollTo({\n left: scrollLeft,\n behavior: 'smooth'\n })\n },\n activeSubGroupTab(index) {\n this.subGroupTagsActive = index\n },\n onClickHideGroupTags() {\n this.$emit('update:hideGroupTags', !this.hideGroupTags)\n },\n onClickGroupTag(local, en) {\n this._appendTag(en, local, false, -1, 'text')\n this.updateTags()\n },\n getGroupTagTooltip(local, en) {\n let html = ''\n if (local && local !== en) {\n html += local + '
'\n }\n html += en\n return html\n },\n getGroupTagStyle(groupName, subGroupName) {\n let style = {}\n let colorKey = this.getTagsColorKey(groupName, subGroupName)\n let color = ''\n if (this.groupTagsColor[colorKey]) {\n color = this.groupTagsColor[colorKey]\n if (common.isColorTransparent(color)) {\n // 如果是纯透明,则设为空\n color = ''\n }\n }\n if (color) {\n style = {background: color}\n }\n return style\n },\n getTagsColorKey(groupName, subGroupName) {\n return groupName + '||' + subGroupName\n },\n onTagsColorChange(key) {\n this.$emit('update:groupTagsColor', this.groupTagsColor)\n },\n onClickResetTagsColor(key) {\n for (let item of this.groupTags) {\n for (let group of item.groups) {\n if (group.type && group.typ == 'wrap') continue\n let key2 = this.getTagsColorKey(item.name, group.name)\n if (key === key2) {\n this.groupTagsColor[key] = ref(common.fitterInputColor(group.color))\n }\n }\n }\n this.onTagsColorChange(key)\n },\n onClickClearTagsColor(key) {\n this.groupTagsColor[key] = ref('rgba(0,0,0,0)')\n this.onTagsColorChange(key)\n },\n getTagColorStyle(tag) {\n if (tag.isLora || tag.isLyco || tag.isEmbedding) return {}\n if (!this.groupTagsColorKeyCache[tag.value]) return {}\n let key = this.groupTagsColorKeyCache[tag.value]\n if (!this.groupTagsColor[key]) return {}\n let color = this.groupTagsColor[key]\n if (common.isColorTransparent(color)) return {}\n return {background: color}\n },\n }\n}\n","\n","\n","import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nvar __defProp$b = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$8(__spreadValues$b({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (param) => {\n return Promise.all(Array.from(fns).map((fn) => fn(param)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nfunction createInjectionState(composable) {\n const key = Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provide(key, state);\n return state;\n };\n const useInjectedState = () => inject(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = __spreadValues$a({}, obj);\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(\n () => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0])))\n );\n}\n\nconst isClient = typeof window !== \"undefined\";\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n if (!condition)\n console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n var _a;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?[0-9]+\\.?[0-9]*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = defaultValue;\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = defaultValue;\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction syncRef(left, right, options = {}) {\n var _a, _b;\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options;\n let watchLeft;\n let watchRight;\n const transformLTR = (_a = transform.ltr) != null ? _a : (v) => v;\n const transformRTL = (_b = transform.rtl) != null ? _b : (v) => v;\n if (direction === \"both\" || direction === \"ltr\") {\n watchLeft = watch(\n left,\n (newValue) => right.value = transformLTR(newValue),\n { flush, deep, immediate }\n );\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchRight = watch(\n right,\n (newValue) => left.value = transformRTL(newValue),\n { flush, deep, immediate }\n );\n }\n return () => {\n watchLeft == null ? void 0 : watchLeft();\n watchRight == null ? void 0 : watchRight();\n };\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = __spreadProps$7(__spreadValues$9({}, objectRef.value), { [key]: v });\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true) {\n if (getCurrentInstance())\n onBeforeMount(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn) {\n if (getCurrentInstance())\n onBeforeUnmount(fn);\n}\n\nfunction tryOnMounted(fn, sync = true) {\n if (getCurrentInstance())\n onMounted(fn);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn) {\n if (getCurrentInstance())\n onUnmounted(fn);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(\n () => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n )\n );\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(\n () => toValue(\n !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))\n )\n );\n}\n\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(\n () => toValue(list).slice(formIndex).some(\n (element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))\n )\n );\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);\n const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/;\nconst REGEX_FORMAT = /\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return __spreadValues$8({\n counter,\n reset\n }, controls);\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return __spreadValues$7({\n ready\n }, controls);\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [\n ...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)\n ];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __objRest$5 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchWithFilter(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$5(_a, [\n \"eventFilter\"\n ]);\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __objRest$4 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchAtMost(source, cb, options) {\n const _a = options, {\n count\n } = _a, watchOptions = __objRest$4(_a, [\n \"count\"\n ]);\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchDebounced(source, cb, options = {}) {\n const _a = options, {\n debounce = 0,\n maxWait = void 0\n } = _a, watchOptions = __objRest$3(_a, [\n \"debounce\",\n \"maxWait\"\n ]);\n return watchWithFilter(\n source,\n cb,\n __spreadProps$6(__spreadValues$6({}, watchOptions), {\n eventFilter: debounceFilter(debounce, { maxWait })\n })\n );\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n __spreadProps$5(__spreadValues$5({}, options), {\n deep: true\n })\n );\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchIgnorable(source, cb, options = {}) {\n const _a = options, {\n eventFilter = bypassFilter\n } = _a, watchOptions = __objRest$2(_a, [\n \"eventFilter\"\n ]);\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n __spreadProps$4(__spreadValues$4({}, watchOptions), { flush: \"sync\" })\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n __spreadProps$3(__spreadValues$3({}, options), {\n immediate: true\n })\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchPausable(source, cb, options = {}) {\n const _a = options, {\n eventFilter: filter\n } = _a, watchOptions = __objRest$1(_a, [\n \"eventFilter\"\n ]);\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n __spreadProps$2(__spreadValues$2({}, watchOptions), {\n eventFilter\n })\n );\n return { stop, pause, resume, isActive };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction watchThrottled(source, cb, options = {}) {\n const _a = options, {\n throttle = 0,\n trailing = true,\n leading = true\n } = _a, watchOptions = __objRest(_a, [\n \"throttle\",\n \"trailing\",\n \"leading\"\n ]);\n return watchWithFilter(\n source,\n cb,\n __spreadProps$1(__spreadValues$1({}, watchOptions), {\n eventFilter: throttleFilter(throttle, trailing, leading)\n })\n );\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return __spreadProps(__spreadValues({}, res), {\n trigger\n });\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n return watch(\n source,\n (v, ov, onInvalidate) => {\n if (v)\n cb(v, ov, onInvalidate);\n },\n options\n );\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, invoke, isClient, isDef, isDefined, isIOS, isObject, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n","import { noop, makeDestructurable, camelize, toValue, isClient, tryOnScopeDispose, isIOS, tryOnMounted, computedWithControl, isObject, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, useTimeoutFn, pausableWatch, toRef, createEventHook, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, createSingletonPromise, toRefs, useIntervalFn, notNullish, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, identity, isDef } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, readonly, nextTick, reactive, markRaw, getCurrentScope, isVue2, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nvar __defProp$q = Object.defineProperty;\nvar __defProps$d = Object.defineProperties;\nvar __getOwnPropDescs$d = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$t = Object.getOwnPropertySymbols;\nvar __hasOwnProp$t = Object.prototype.hasOwnProperty;\nvar __propIsEnum$t = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$q = (obj, key, value) => key in obj ? __defProp$q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$q = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$t.call(b, prop))\n __defNormalProp$q(a, prop, b[prop]);\n if (__getOwnPropSymbols$t)\n for (var prop of __getOwnPropSymbols$t(b)) {\n if (__propIsEnum$t.call(b, prop))\n __defNormalProp$q(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$d = (a, b) => __defProps$d(a, __getOwnPropDescs$d(b));\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, __spreadProps$d(__spreadValues$q({}, keysToCamelKebabCase(attrs)), { $slots: slots }));\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, options2));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n if (el)\n shouldListen = !e.composedPath().includes(el) && !shouldIgnore(e);\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement)))\n handler(event);\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nvar __defProp$p = Object.defineProperty;\nvar __defProps$c = Object.defineProperties;\nvar __getOwnPropDescs$c = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$s = Object.getOwnPropertySymbols;\nvar __hasOwnProp$s = Object.prototype.hasOwnProperty;\nvar __propIsEnum$s = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$p = (obj, key, value) => key in obj ? __defProp$p(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$p = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$s.call(b, prop))\n __defNormalProp$p(a, prop, b[prop]);\n if (__getOwnPropSymbols$s)\n for (var prop of __getOwnPropSymbols$s(b)) {\n if (__propIsEnum$s.call(b, prop))\n __defNormalProp$p(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$c = (a, b) => __defProps$c(a, __getOwnPropDescs$c(b));\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keydown\" }));\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keypress\" }));\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, __spreadProps$c(__spreadValues$p({}, options), { eventName: \"keyup\" }));\n}\n\nconst DEFAULT_DELAY = 500;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n timeout = setTimeout(\n () => handler(ev),\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions);\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], clear, listenerOptions);\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = computedWithControl(\n () => null,\n () => getDeepActiveElement()\n );\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n activeElement.trigger();\n }, true);\n useEventListener(window, \"focus\", activeElement.trigger, true);\n }\n return activeElement;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n if (getCurrentInstance()) {\n onMounted(() => {\n isMounted.value = true;\n });\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n const delta = timestamp - (previousFrameTimestamp || timestamp);\n fn({ delta, timestamp });\n previousFrameTimestamp = timestamp;\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (commitStyles)\n animate.value.commitStyles();\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options = {}) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options;\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nvar __defProp$o = Object.defineProperty;\nvar __defProps$b = Object.defineProperties;\nvar __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$r = Object.getOwnPropertySymbols;\nvar __hasOwnProp$r = Object.prototype.hasOwnProperty;\nvar __propIsEnum$r = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$o = (obj, key, value) => key in obj ? __defProp$o(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$o = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$r.call(b, prop))\n __defNormalProp$o(a, prop, b[prop]);\n if (__getOwnPropSymbols$r)\n for (var prop of __getOwnPropSymbols$r(b)) {\n if (__propIsEnum$r.call(b, prop))\n __defNormalProp$o(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$b = (a, b) => __defProps$b(a, __getOwnPropDescs$b(b));\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return __spreadProps$b(__spreadValues$o({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n });\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery({ navigator = defaultNavigator } = {}) {\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator);\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetify = {\n xs: 600,\n sm: 960,\n md: 1264,\n lg: 1904\n};\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 600,\n sm: 1024,\n md: 1440,\n lg: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = breakpoints[k];\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(`(min-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => greaterOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n return Object.assign(shortcutMethods, {\n greater(k) {\n return useMediaQuery(`(min-width: ${getValue(k, 0.1)})`, options);\n },\n greaterOrEqual,\n smaller(k) {\n return useMediaQuery(`(max-width: ${getValue(k, -0.1)})`, options);\n },\n smallerOrEqual(k) {\n return useMediaQuery(`(max-width: ${getValue(k)})`, options);\n },\n between(a, b) {\n return useMediaQuery(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nvar __defProp$n = Object.defineProperty;\nvar __getOwnPropSymbols$q = Object.getOwnPropertySymbols;\nvar __hasOwnProp$q = Object.prototype.hasOwnProperty;\nvar __propIsEnum$q = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$n = (obj, key, value) => key in obj ? __defProp$n(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$n = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$q.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n if (__getOwnPropSymbols$q)\n for (var prop of __getOwnPropSymbols$q(b)) {\n if (__propIsEnum$q.call(b, prop))\n __defNormalProp$n(a, prop, b[prop]);\n }\n return a;\n};\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation({ window = defaultWindow } = {}) {\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive(__spreadValues$n({\n trigger,\n state: state2,\n length,\n origin\n }, refs));\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value)\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nvar __defProp$m = Object.defineProperty;\nvar __defProps$a = Object.defineProperties;\nvar __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$p = Object.getOwnPropertySymbols;\nvar __hasOwnProp$p = Object.prototype.hasOwnProperty;\nvar __propIsEnum$p = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$m = (obj, key, value) => key in obj ? __defProp$m(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$m = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$p.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n if (__getOwnPropSymbols$p)\n for (var prop of __getOwnPropSymbols$p(b)) {\n if (__propIsEnum$p.call(b, prop))\n __defNormalProp$m(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, __spreadProps$a(__spreadValues$m({}, options), {\n deep,\n immediate\n }));\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\nvar __defProp$l = Object.defineProperty;\nvar __getOwnPropSymbols$o = Object.getOwnPropertySymbols;\nvar __hasOwnProp$o = Object.prototype.hasOwnProperty;\nvar __propIsEnum$o = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$l = (obj, key, value) => key in obj ? __defProp$l(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$l = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$o.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n if (__getOwnPropSymbols$o)\n for (var prop of __getOwnPropSymbols$o(b)) {\n if (__propIsEnum$o.call(b, prop))\n __defNormalProp$l(a, prop, b[prop]);\n }\n return a;\n};\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const data = (shallow ? shallowRef : ref)(defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n }\n update();\n return data;\n function write(v) {\n try {\n if (v == null) {\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n const oldValue = storage.getItem(key);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue: serialized,\n storageArea: storage\n }\n }));\n }\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit !== null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return __spreadValues$l(__spreadValues$l({}, rawInit), value);\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nvar __defProp$k = Object.defineProperty;\nvar __getOwnPropSymbols$n = Object.getOwnPropertySymbols;\nvar __hasOwnProp$n = Object.prototype.hasOwnProperty;\nvar __propIsEnum$n = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$k = (obj, key, value) => key in obj ? __defProp$k(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$k = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$n.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n if (__getOwnPropSymbols$n)\n for (var prop of __getOwnPropSymbols$n(b)) {\n if (__propIsEnum$n.call(b, prop))\n __defNormalProp$k(a, prop, b[prop]);\n }\n return a;\n};\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = __spreadValues$k({\n auto: \"\",\n light: \"light\",\n dark: \"dark\"\n }, options.modes || {});\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(\n () => store.value === \"auto\" ? system.value : store.value\n );\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nvar __getOwnPropSymbols$m = Object.getOwnPropertySymbols;\nvar __hasOwnProp$m = Object.prototype.hasOwnProperty;\nvar __propIsEnum$m = Object.prototype.propertyIsEnumerable;\nvar __objRest$3 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$m)\n for (var prop of __getOwnPropSymbols$m(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useMutationObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, mutationOptions = __objRest$3(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const stopWatch = watch(\n () => unrefElement(target),\n (el) => {\n cleanup();\n if (isSupported.value && window && el) {\n observer = new MutationObserver(callback);\n observer.observe(el, mutationOptions);\n }\n },\n { immediate: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement() {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev\n };\n}\n\nvar __defProp$j = Object.defineProperty;\nvar __defProps$9 = Object.defineProperties;\nvar __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$l = Object.getOwnPropertySymbols;\nvar __hasOwnProp$l = Object.prototype.hasOwnProperty;\nvar __propIsEnum$l = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$j = (obj, key, value) => key in obj ? __defProp$j(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$j = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n if (__getOwnPropSymbols$l)\n for (var prop of __getOwnPropSymbols$l(b)) {\n if (__propIsEnum$l.call(b, prop))\n __defNormalProp$j(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$9 = (a, b) => __defProps$9(a, __getOwnPropDescs$9(b));\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\"\n } = options;\n const mode = useColorMode(__spreadProps$9(__spreadValues$j({}, options), {\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n }));\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (mode.system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nvar __defProp$i = Object.defineProperty;\nvar __defProps$8 = Object.defineProperties;\nvar __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$k = Object.getOwnPropertySymbols;\nvar __hasOwnProp$k = Object.prototype.hasOwnProperty;\nvar __propIsEnum$k = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$i = (obj, key, value) => key in obj ? __defProp$i(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$i = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n if (__getOwnPropSymbols$k)\n for (var prop of __getOwnPropSymbols$k(b)) {\n if (__propIsEnum$k.call(b, prop))\n __defNormalProp$i(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$8 = (a, b) => __defProps$8(a, __getOwnPropDescs$8(b));\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, __spreadProps$8(__spreadValues$i({}, options), { clone: options.clone || deep, setSource }));\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return __spreadProps$8(__spreadValues$i({}, manualHistory), {\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n });\n}\n\nvar __defProp$h = Object.defineProperty;\nvar __defProps$7 = Object.defineProperties;\nvar __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$j = Object.getOwnPropertySymbols;\nvar __hasOwnProp$j = Object.prototype.hasOwnProperty;\nvar __propIsEnum$j = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$h = (obj, key, value) => key in obj ? __defProp$h(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$h = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n if (__getOwnPropSymbols$j)\n for (var prop of __getOwnPropSymbols$j(b)) {\n if (__propIsEnum$j.call(b, prop))\n __defNormalProp$h(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, __spreadProps$7(__spreadValues$h({}, options), { eventFilter: filter }));\n return __spreadValues$h({}, history);\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio({\n window = defaultWindow\n} = {}) {\n const pixelRatio = ref(1);\n if (window) {\n let observe = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe, { once: true });\n }, cleanup = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe);\n };\n let media;\n observe();\n tryOnScopeDispose(cleanup);\n }\n return { pixelRatio };\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility({ document = defaultDocument } = {}) {\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nvar __defProp$g = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$i = Object.getOwnPropertySymbols;\nvar __hasOwnProp$i = Object.prototype.hasOwnProperty;\nvar __propIsEnum$i = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$g = (obj, key, value) => key in obj ? __defProp$g(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$g = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n if (__getOwnPropSymbols$i)\n for (var prop of __getOwnPropSymbols$i(b)) {\n if (__propIsEnum$i.call(b, prop))\n __defNormalProp$g(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n if (!filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const rect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - rect.left,\n y: e.clientY - rect.top\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\")\n x = e.clientX - pressedDelta.value.x;\n if (axis === \"y\" || axis === \"both\")\n y = e.clientY - pressedDelta.value.y;\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (!filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return __spreadProps$6(__spreadValues$g({}, toRefs(position)), {\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n });\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a;\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_a = _options.onEnter) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nvar __getOwnPropSymbols$h = Object.getOwnPropertySymbols;\nvar __hasOwnProp$h = Object.prototype.hasOwnProperty;\nvar __propIsEnum$h = Object.prototype.propertyIsEnumerable;\nvar __objRest$2 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$h.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$h)\n for (var prop of __getOwnPropSymbols$h(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$h.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction useResizeObserver(target, callback, options = {}) {\n const _a = options, { window = defaultWindow } = _a, observerOptions = __objRest$2(_a, [\"window\"]);\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(\n () => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]\n );\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\", deep: true }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nvar __defProp$f = Object.defineProperty;\nvar __getOwnPropSymbols$g = Object.getOwnPropertySymbols;\nvar __hasOwnProp$g = Object.prototype.hasOwnProperty;\nvar __propIsEnum$g = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$f = (obj, key, value) => key in obj ? __defProp$f(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$f = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$g.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n if (__getOwnPropSymbols$g)\n for (var prop of __getOwnPropSymbols$g(b)) {\n if (__propIsEnum$g.call(b, prop))\n __defNormalProp$f(a, prop, b[prop]);\n }\n return a;\n};\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return __spreadValues$f({\n isSupported,\n element\n }, controls);\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const styles = window.getComputedStyle($elem);\n width.value = Number.parseFloat(styles.width);\n height.value = Number.parseFloat(styles.height);\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n return {\n width,\n height\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, { window = defaultWindow, scrollTarget } = {}) {\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n ([{ isIntersecting }]) => {\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const {\n withCredentials = false\n } = options;\n const close = () => {\n if (eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n }\n };\n const es = new EventSource(url, { withCredentials });\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n eventSource,\n event,\n data,\n status,\n error,\n close\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`).forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nvar __defProp$e = Object.defineProperty;\nvar __defProps$5 = Object.defineProperties;\nvar __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$f = Object.getOwnPropertySymbols;\nvar __hasOwnProp$f = Object.prototype.hasOwnProperty;\nvar __propIsEnum$f = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$e = (obj, key, value) => key in obj ? __defProp$e(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$e = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n if (__getOwnPropSymbols$f)\n for (var prop of __getOwnPropSymbols$f(b)) {\n if (__propIsEnum$f.call(b, prop))\n __defNormalProp$e(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$5 = (a, b) => __defProps$5(a, __getOwnPropDescs$5(b));\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\");\n}\nfunction isAbsoluteURL(url) {\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries([...headers.entries()]);\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return __spreadValues$e(__spreadValues$e({}, ctx), await callback(ctx));\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = __spreadValues$e(__spreadValues$e({}, ctx), await callback(ctx));\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, options), args[0]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n });\n } else {\n fetchOptions = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, fetchOptions), args[0]), {\n headers: __spreadValues$e(__spreadValues$e({}, headersToObject(fetchOptions.headers) || {}), headersToObject(args[0].headers) || {})\n });\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = __spreadProps$5(__spreadValues$e(__spreadValues$e({}, options), args[1]), {\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n });\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = { immediate: true, refetch: false, timeout: 0 };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = __spreadValues$e(__spreadValues$e({}, options), args[0]);\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = __spreadValues$e(__spreadValues$e({}, options), args[1]);\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = __spreadProps$5(__spreadValues$e({}, fetchOptions), {\n signal: controller.signal\n });\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n const execute = async (throwOnFailed = false) => {\n var _a2;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: __spreadValues$e(__spreadValues$e({}, defaultFetchOptions), fetchOptions),\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return new Promise((resolve, reject) => {\n var _a3;\n fetch(\n context.url,\n __spreadProps$5(__spreadValues$e(__spreadValues$e({}, defaultFetchOptions), context.options), {\n headers: __spreadValues$e(__spreadValues$e({}, headersToObject(defaultFetchOptions.headers)), headersToObject((_a3 = context.options) == null ? void 0 : _a3.headers))\n })\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch)\n ({ data: responseData } = await options.afterFetch({ data: responseData, response: fetchResponse }));\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return resolve(fetchResponse);\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError)\n ({ error: errorData } = await options.onFetchError({ data: responseData, error: fetchError, response: response.value }));\n error.value = errorData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n return reject(fetchError);\n return resolve(null);\n }).finally(() => {\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished,\n statusCode,\n response,\n error,\n data,\n isFetching,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return __spreadProps$5(__spreadValues$e({}, shell), {\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n });\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nvar __defProp$d = Object.defineProperty;\nvar __getOwnPropSymbols$e = Object.getOwnPropertySymbols;\nvar __hasOwnProp$e = Object.prototype.hasOwnProperty;\nvar __propIsEnum$e = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$d = (obj, key, value) => key in obj ? __defProp$d(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$d = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n if (__getOwnPropSymbols$e)\n for (var prop of __getOwnPropSymbols$e(b)) {\n if (__propIsEnum$e.call(b, prop))\n __defNormalProp$d(a, prop, b[prop]);\n }\n return a;\n};\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input)\n input.value = \"\";\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = __spreadValues$d(__spreadValues$d(__spreadValues$d({}, DEFAULT_OPTIONS), options), localOptions);\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nvar __defProp$c = Object.defineProperty;\nvar __getOwnPropSymbols$d = Object.getOwnPropertySymbols;\nvar __hasOwnProp$d = Object.prototype.hasOwnProperty;\nvar __propIsEnum$d = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$c = (obj, key, value) => key in obj ? __defProp$c(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$c = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n if (__getOwnPropSymbols$d)\n for (var prop of __getOwnPropSymbols$d(b)) {\n if (__propIsEnum$d.call(b, prop))\n __defNormalProp$c(a, prop, b[prop]);\n }\n return a;\n};\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker(__spreadValues$c(__spreadValues$c({}, toValue(options)), _options));\n fileHandle.value = handle;\n await updateFile();\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$c(__spreadValues$c({}, options), _options));\n data.value = void 0;\n await updateFile();\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker(__spreadValues$c(__spreadValues$c({}, options), _options));\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus();\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(\n () => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0\n );\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nvar __defProp$b = Object.defineProperty;\nvar __defProps$4 = Object.defineProperties;\nvar __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$c = Object.getOwnPropertySymbols;\nvar __hasOwnProp$c = Object.prototype.hasOwnProperty;\nvar __propIsEnum$c = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$b = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n if (__getOwnPropSymbols$c)\n for (var prop of __getOwnPropSymbols$c(b)) {\n if (__propIsEnum$c.call(b, prop))\n __defNormalProp$b(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return __spreadProps$4(__spreadValues$b({}, gamepad), {\n id: gamepad.id,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n });\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad) {\n const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);\n if (index > -1)\n gamepads.value[index] = stateFromGamepad(gamepad);\n }\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n if (_gamepads) {\n for (let i = 0; i < _gamepads.length; ++i) {\n const gamepad = _gamepads[i];\n if (gamepad)\n onGamepadConnected(gamepad);\n }\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nvar __defProp$a = Object.defineProperty;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$a = (obj, key, value) => key in obj ? __defProp$a(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$a = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n if (__getOwnPropSymbols$b)\n for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop))\n __defNormalProp$a(a, prop, b[prop]);\n }\n return a;\n};\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n __spreadValues$a({\n resetOnExecute: true\n }, asyncStateOptions)\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n if (!window)\n return;\n const el = target === window ? target.document.documentElement : target === window.document ? target.documentElement : target;\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n if (!window)\n return;\n const eventTarget = e.target === window.document ? e.target.documentElement : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$3 = Object.defineProperties;\nvar __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$a = Object.getOwnPropertySymbols;\nvar __hasOwnProp$a = Object.prototype.hasOwnProperty;\nvar __propIsEnum$a = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$a)\n for (var prop of __getOwnPropSymbols$a(b)) {\n if (__propIsEnum$a.call(b, prop))\n __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100\n } = options;\n const state = reactive(useScroll(\n element,\n __spreadProps$3(__spreadValues$9({}, options), {\n offset: __spreadValues$9({\n [direction]: (_a = options.distance) != null ? _a : 0\n }, options.offset)\n })\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n const el = toValue(element);\n if (el instanceof Window)\n return window.document.documentElement;\n if (el instanceof Document)\n return document.documentElement;\n return el;\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value)\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nvar __defProp$8 = Object.defineProperty;\nvar __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$9 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$9 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$8 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n if (__getOwnPropSymbols$9)\n for (var prop of __getOwnPropSymbols$9(b)) {\n if (__propIsEnum$9.call(b, prop))\n __defNormalProp$8(a, prop, b[prop]);\n }\n return a;\n};\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n options = __spreadValues$8(__spreadValues$8({}, defaultOptions), options);\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = reactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return reactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return reactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst BuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n eventFilter\n } = options;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : BuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + window.pageXOffset;\n elementPositionY.value = top + window.pageYOffset;\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true });\n useEventListener(window, \"mouseup\", onReleased, { passive: true });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true });\n useEventListener(window, \"drop\", onReleased, { passive: true });\n useEventListener(window, \"dragend\", onReleased, { passive: true });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true });\n useEventListener(window, \"touchend\", onReleased, { passive: true });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nvar __defProp$7 = Object.defineProperty;\nvar __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$8 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$8 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$7 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n if (__getOwnPropSymbols$8)\n for (var prop of __getOwnPropSymbols$8(b)) {\n if (__propIsEnum$8.call(b, prop))\n __defNormalProp$7(a, prop, b[prop]);\n }\n return a;\n};\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return __spreadValues$7({\n now\n }, controls);\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page))\n syncRef(page, currentPage);\n if (isRef(pageSize))\n syncRef(pageSize, currentPageSize);\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0))\n return \"deviceOrientation\";\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = -orientation.beta / 90;\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n const value = orientation.gamma / 90;\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nvar __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$7 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$7 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$7)\n for (var prop of __getOwnPropSymbols$7(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nfunction usePerformanceObserver(options, callback) {\n const _a = options, {\n window = defaultWindow,\n immediate = true\n } = _a, performanceOptions = __objRest$1(_a, [\n \"window\",\n \"immediate\"\n ]);\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nvar __defProp$6 = Object.defineProperty;\nvar __defProps$2 = Object.defineProperties;\nvar __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$6 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$6 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$6 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n if (__getOwnPropSymbols$6)\n for (var prop of __getOwnPropSymbols$6(b)) {\n if (__propIsEnum$6.call(b, prop))\n __defNormalProp$6(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return __spreadProps$2(__spreadValues$6({}, toRefs(state)), {\n isInside\n });\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument, pointerLockOptions } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e, options2) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n var _a, _b;\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"initial\");\n })\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (!isSupported.value)\n return Promise.reject(new Error(\"Not supported\"));\n return screenOrientation.lock(type);\n };\n const unlockOrientation = () => {\n if (isSupported.value)\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow;\n watch(toRef(element), (el) => {\n if (el) {\n const ele = el;\n initialOverflow = ele.style.overflow;\n if (isLocked.value)\n ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const ele = toValue(element);\n if (!ele || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n ele,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n ele.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const ele = toValue(element);\n if (!ele || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n ele.style.overflow = initialOverflow;\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else\n unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nvar __defProp$5 = Object.defineProperty;\nvar __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$5 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$5 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$5 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n if (__getOwnPropSymbols$5)\n for (var prop of __getOwnPropSymbols$5(b)) {\n if (__propIsEnum$5.call(b, prop))\n __defNormalProp$5(a, prop, b[prop]);\n }\n return a;\n};\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = __spreadValues$5(__spreadValues$5({}, toValue(shareOptions)), toValue(overrideOptions));\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const transcript = Array.from(event.results).map((result2) => {\n isFinal.value = result2.isFinal;\n return result2[0];\n }).map((result2) => result2.transcript).join(\"\");\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nvar __defProp$4 = Object.defineProperty;\nvar __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$4 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$4 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$4 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n if (__getOwnPropSymbols$4)\n for (var prop of __getOwnPropSymbols$4(b)) {\n if (__propIsEnum$4.call(b, prop))\n __defNormalProp$4(a, prop, b[prop]);\n }\n return a;\n};\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = __spreadValues$4(__spreadValues$4({}, rawInit), value);\n else\n data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a, _b;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style.height = \"1px\";\n textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style.height = height;\n (_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nvar __defProp$3 = Object.defineProperty;\nvar __defProps$1 = Object.defineProperties;\nvar __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$3 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$3 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$3 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n if (__getOwnPropSymbols$3)\n for (var prop of __getOwnPropSymbols$3(b)) {\n if (__propIsEnum$3.call(b, prop))\n __defNormalProp$3(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, __spreadProps$1(__spreadValues$3({}, options), { eventFilter: filter }));\n return __spreadValues$3({}, history);\n}\n\nvar __defProp$2 = Object.defineProperty;\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$2 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n if (__getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(b)) {\n if (__propIsEnum$2.call(b, prop))\n __defNormalProp$2(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const _a = useNow({ interval: updateInterval, controls: true }), { now } = _a, controls = __objRest(_a, [\"now\"]);\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return __spreadValues$2({\n timeAgo\n }, controls);\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return __spreadValues$1({\n timestamp: ts\n }, controls);\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b;\n const {\n document = defaultDocument\n } = options;\n const title = toRef((_a = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _a : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_b = document.head) == null ? void 0 : _b.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n return title;\n}\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, __spreadProps(__spreadValues({}, options), {\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n }));\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n watch(\n () => props[key],\n (v) => proxy.value = cloneFn(v)\n );\n watch(\n proxy,\n (v) => {\n if (v !== props[key] || deep)\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props)\n ret[key] = useVModel(props, key, emit, options);\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, calculateRange) {\n watch([size.width, size.height, list], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(defaultOptions = {}) {\n const {\n window = defaultWindow\n } = defaultOptions;\n const isSupported = useSupported(() => !!window && \"Notification\" in window);\n const notification = ref(null);\n const requestPermission = async () => {\n if (!isSupported.value)\n return;\n if (\"permission\" in Notification && Notification.permission !== \"denied\")\n await Notification.requestPermission();\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value)\n return;\n await requestPermission();\n const options = Object.assign({}, defaultOptions, overrides);\n notification.value = new Notification(options.title || \"\", options);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n tryOnMounted(async () => {\n if (isSupported.value)\n await requestPermission();\n });\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const close = (code = 1e3, reason) => {\n if (!wsRef.value)\n return;\n explicitlyClosed = true;\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n };\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n wsRef.value = void 0;\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n useEventListener(window, \"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps) {\n if (deps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n return `importScripts(${depsString})`;\n}\n\nfunction createWorkerBlobUrl(fn, deps) {\n const blobCode = `${depsParser(deps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus({ window = defaultWindow } = {}) {\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll({ window = defaultWindow } = {}) {\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const x = ref(window.scrollX);\n const y = ref(window.scrollY);\n useEventListener(\n window,\n \"scroll\",\n () => {\n x.value = window.scrollX;\n y.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useCloned, useColorMode, useConfirmDialog, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n","// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = (GradientParser || {});\n\nGradientParser.stringify = (function() {\n\n var visitor = {\n\n 'visit_linear-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_repeating-linear-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_radial-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_repeating-radial-gradient': function(node) {\n return visitor.visit_gradient(node);\n },\n\n 'visit_gradient': function(node) {\n var orientation = visitor.visit(node.orientation);\n if (orientation) {\n orientation += ', ';\n }\n\n return node.type + '(' + orientation + visitor.visit(node.colorStops) + ')';\n },\n\n 'visit_shape': function(node) {\n var result = node.value,\n at = visitor.visit(node.at),\n style = visitor.visit(node.style);\n\n if (style) {\n result += ' ' + style;\n }\n\n if (at) {\n result += ' at ' + at;\n }\n\n return result;\n },\n\n 'visit_default-radial': function(node) {\n var result = '',\n at = visitor.visit(node.at);\n\n if (at) {\n result += at;\n }\n return result;\n },\n\n 'visit_extent-keyword': function(node) {\n var result = node.value,\n at = visitor.visit(node.at);\n\n if (at) {\n result += ' at ' + at;\n }\n\n return result;\n },\n\n 'visit_position-keyword': function(node) {\n return node.value;\n },\n\n 'visit_position': function(node) {\n return visitor.visit(node.value.x) + ' ' + visitor.visit(node.value.y);\n },\n\n 'visit_%': function(node) {\n return node.value + '%';\n },\n\n 'visit_em': function(node) {\n return node.value + 'em';\n },\n\n 'visit_px': function(node) {\n return node.value + 'px';\n },\n\n 'visit_literal': function(node) {\n return visitor.visit_color(node.value, node);\n },\n\n 'visit_hex': function(node) {\n return visitor.visit_color('#' + node.value, node);\n },\n\n 'visit_rgb': function(node) {\n return visitor.visit_color('rgb(' + node.value.join(', ') + ')', node);\n },\n\n 'visit_rgba': function(node) {\n return visitor.visit_color('rgba(' + node.value.join(', ') + ')', node);\n },\n\n 'visit_color': function(resultColor, node) {\n var result = resultColor,\n length = visitor.visit(node.length);\n\n if (length) {\n result += ' ' + length;\n }\n return result;\n },\n\n 'visit_angular': function(node) {\n return node.value + 'deg';\n },\n\n 'visit_directional': function(node) {\n return 'to ' + node.value;\n },\n\n 'visit_array': function(elements) {\n var result = '',\n size = elements.length;\n\n elements.forEach(function(element, i) {\n result += visitor.visit(element);\n if (i < size - 1) {\n result += ', ';\n }\n });\n\n return result;\n },\n\n 'visit': function(element) {\n if (!element) {\n return '';\n }\n var result = '';\n\n if (element instanceof Array) {\n return visitor.visit_array(element, result);\n } else if (element.type) {\n var nodeVisitor = visitor['visit_' + element.type];\n if (nodeVisitor) {\n return nodeVisitor(element);\n } else {\n throw Error('Missing visitor visit_' + element.type);\n }\n } else {\n throw Error('Invalid node.');\n }\n }\n\n };\n\n return function(root) {\n return visitor.visit(root);\n };\n})();\n\n// Copyright (c) 2014 Rafael Caricio. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\nvar GradientParser = (GradientParser || {});\n\nGradientParser.parse = (function() {\n\n var tokens = {\n linearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(linear\\-gradient)/i,\n repeatingLinearGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-linear\\-gradient)/i,\n radialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(radial\\-gradient)/i,\n repeatingRadialGradient: /^(\\-(webkit|o|ms|moz)\\-)?(repeating\\-radial\\-gradient)/i,\n sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,\n extentKeywords: /^(closest\\-side|closest\\-corner|farthest\\-side|farthest\\-corner|contain|cover)/,\n positionKeywords: /^(left|center|right|top|bottom)/i,\n pixelValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))px/,\n percentageValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))\\%/,\n emValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))em/,\n angleValue: /^(-?(([0-9]*\\.[0-9]+)|([0-9]+\\.?)))deg/,\n startCall: /^\\(/,\n endCall: /^\\)/,\n comma: /^,/,\n hexColor: /^\\#([0-9a-fA-F]+)/,\n literalColor: /^([a-zA-Z]+)/,\n rgbColor: /^rgb/i,\n rgbaColor: /^rgba/i,\n number: /^(([0-9]*\\.[0-9]+)|([0-9]+\\.?))/\n };\n\n var input = '';\n\n function error(msg) {\n var err = new Error(input + ': ' + msg);\n err.source = input;\n throw err;\n }\n\n function getAST() {\n var ast = matchListDefinitions();\n\n if (input.length > 0) {\n error('Invalid input not EOF');\n }\n\n return ast;\n }\n\n function matchListDefinitions() {\n return matchListing(matchDefinition);\n }\n\n function matchDefinition() {\n return matchGradient(\n 'linear-gradient',\n tokens.linearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'repeating-linear-gradient',\n tokens.repeatingLinearGradient,\n matchLinearOrientation) ||\n\n matchGradient(\n 'radial-gradient',\n tokens.radialGradient,\n matchListRadialOrientations) ||\n\n matchGradient(\n 'repeating-radial-gradient',\n tokens.repeatingRadialGradient,\n matchListRadialOrientations);\n }\n\n function matchGradient(gradientType, pattern, orientationMatcher) {\n return matchCall(pattern, function(captures) {\n\n var orientation = orientationMatcher();\n if (orientation) {\n if (!scan(tokens.comma)) {\n error('Missing comma before color stops');\n }\n }\n\n return {\n type: gradientType,\n orientation: orientation,\n colorStops: matchListing(matchColorStop)\n };\n });\n }\n\n function matchCall(pattern, callback) {\n var captures = scan(pattern);\n\n if (captures) {\n if (!scan(tokens.startCall)) {\n error('Missing (');\n }\n\n var result = callback(captures);\n\n if (!scan(tokens.endCall)) {\n error('Missing )');\n }\n\n return result;\n }\n }\n\n function matchLinearOrientation() {\n return matchSideOrCorner() ||\n matchAngle();\n }\n\n function matchSideOrCorner() {\n return match('directional', tokens.sideOrCorner, 1);\n }\n\n function matchAngle() {\n return match('angular', tokens.angleValue, 1);\n }\n\n function matchListRadialOrientations() {\n var radialOrientations,\n radialOrientation = matchRadialOrientation(),\n lookaheadCache;\n\n if (radialOrientation) {\n radialOrientations = [];\n radialOrientations.push(radialOrientation);\n\n lookaheadCache = input;\n if (scan(tokens.comma)) {\n radialOrientation = matchRadialOrientation();\n if (radialOrientation) {\n radialOrientations.push(radialOrientation);\n } else {\n input = lookaheadCache;\n }\n }\n }\n\n return radialOrientations;\n }\n\n function matchRadialOrientation() {\n var radialType = matchCircle() ||\n matchEllipse();\n\n if (radialType) {\n radialType.at = matchAtPosition();\n } else {\n var extent = matchExtentKeyword();\n if (extent) {\n radialType = extent;\n var positionAt = matchAtPosition();\n if (positionAt) {\n radialType.at = positionAt;\n }\n } else {\n var defaultPosition = matchPositioning();\n if (defaultPosition) {\n radialType = {\n type: 'default-radial',\n at: defaultPosition\n };\n }\n }\n }\n\n return radialType;\n }\n\n function matchCircle() {\n var circle = match('shape', /^(circle)/i, 0);\n\n if (circle) {\n circle.style = matchLength() || matchExtentKeyword();\n }\n\n return circle;\n }\n\n function matchEllipse() {\n var ellipse = match('shape', /^(ellipse)/i, 0);\n\n if (ellipse) {\n ellipse.style = matchDistance() || matchExtentKeyword();\n }\n\n return ellipse;\n }\n\n function matchExtentKeyword() {\n return match('extent-keyword', tokens.extentKeywords, 1);\n }\n\n function matchAtPosition() {\n if (match('position', /^at/, 0)) {\n var positioning = matchPositioning();\n\n if (!positioning) {\n error('Missing positioning value');\n }\n\n return positioning;\n }\n }\n\n function matchPositioning() {\n var location = matchCoordinates();\n\n if (location.x || location.y) {\n return {\n type: 'position',\n value: location\n };\n }\n }\n\n function matchCoordinates() {\n return {\n x: matchDistance(),\n y: matchDistance()\n };\n }\n\n function matchListing(matcher) {\n var captures = matcher(),\n result = [];\n\n if (captures) {\n result.push(captures);\n while (scan(tokens.comma)) {\n captures = matcher();\n if (captures) {\n result.push(captures);\n } else {\n error('One extra comma');\n }\n }\n }\n\n return result;\n }\n\n function matchColorStop() {\n var color = matchColor();\n\n if (!color) {\n error('Expected color definition');\n }\n\n color.length = matchDistance();\n return color;\n }\n\n function matchColor() {\n return matchHexColor() ||\n matchRGBAColor() ||\n matchRGBColor() ||\n matchLiteralColor();\n }\n\n function matchLiteralColor() {\n return match('literal', tokens.literalColor, 0);\n }\n\n function matchHexColor() {\n return match('hex', tokens.hexColor, 1);\n }\n\n function matchRGBColor() {\n return matchCall(tokens.rgbColor, function() {\n return {\n type: 'rgb',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchRGBAColor() {\n return matchCall(tokens.rgbaColor, function() {\n return {\n type: 'rgba',\n value: matchListing(matchNumber)\n };\n });\n }\n\n function matchNumber() {\n return scan(tokens.number)[1];\n }\n\n function matchDistance() {\n return match('%', tokens.percentageValue, 1) ||\n matchPositionKeyword() ||\n matchLength();\n }\n\n function matchPositionKeyword() {\n return match('position-keyword', tokens.positionKeywords, 1);\n }\n\n function matchLength() {\n return match('px', tokens.pixelValue, 1) ||\n match('em', tokens.emValue, 1);\n }\n\n function match(type, pattern, captureIndex) {\n var captures = scan(pattern);\n if (captures) {\n return {\n type: type,\n value: captures[captureIndex]\n };\n }\n }\n\n function scan(regexp) {\n var captures,\n blankCaptures;\n\n blankCaptures = /^[\\n\\r\\t\\s]+/.exec(input);\n if (blankCaptures) {\n consume(blankCaptures[0].length);\n }\n\n captures = regexp.exec(input);\n if (captures) {\n consume(captures[0].length);\n }\n\n return captures;\n }\n\n function consume(size) {\n input = input.substr(size);\n }\n\n return function(code) {\n input = code.toString();\n return getAST();\n };\n})();\n\nexports.parse = GradientParser.parse;\nexports.stringify = GradientParser.stringify;\n","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","/*!\n * is-plain-object \n *\n * Copyright (c) 2014-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\nfunction isObject(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nfunction isPlainObject(o) {\n var ctor,prot;\n\n if (isObject(o) === false) return false;\n\n // If has modified constructor\n ctor = o.constructor;\n if (ctor === undefined) return true;\n\n // If has modified prototype\n prot = ctor.prototype;\n if (isObject(prot) === false) return false;\n\n // If constructor does not have an Object-specific method\n if (prot.hasOwnProperty('isPrototypeOf') === false) {\n return false;\n }\n\n // Most likely a plain Object\n return true;\n}\n\nexport { isPlainObject };\n","import{isPlainObject as e}from\"is-plain-object\";function t(){return t=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}const n={silent:!1,logLevel:\"warn\"},i=[\"validator\"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\\s*function (\\w+)/;function l(e){var t;const r=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(r){const e=r.toString().match(u);return e?e[1]:\"\"}return\"\"}const c=e,f=e=>e;let d=f;if(\"production\"!==process.env.NODE_ENV){const e=\"undefined\"!=typeof console;d=e?function(e,t=n.logLevel){!1===n.silent&&console[t](`[VueTypes warn]: ${e}`)}:f}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return\"number\"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return\"[object Array]\"===a.call(e)},h=e=>\"[object Function]\"===a.call(e),b=e=>c(e)&&p(e,\"_vueTypes_name\"),g=e=>c(e)&&(p(e,\"type\")||[\"_vueTypes_name\",\"validator\",\"default\",\"required\"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),\"__original\",{value:e})}function m(e,t,r=!1){let n,i=!0,o=\"\";n=c(e)?e:{type:e};const a=b(n)?n._vueTypes_name+\" - \":\"\";if(g(n)&&null!==n.type){if(void 0===n.type||!0===n.type)return i;if(!n.required&&void 0===t)return i;v(n.type)?(i=n.type.some(e=>!0===m(e,t,!0)),o=n.type.map(e=>l(e)).join(\" or \")):(o=l(n),i=\"Array\"===o?v(t):\"Object\"===o?c(t):\"String\"===o||\"Number\"===o||\"Boolean\"===o||\"Function\"===o?function(e){if(null==e)return\"\";const t=e.constructor.toString().match(u);return t?t[1]:\"\"}(t)===o:t instanceof n.type)}if(!i){const e=`${a}value \"${t}\" should be of type \"${o}\"`;return!1===r?(d(e),!1):e}if(p(n,\"validator\")&&h(n.validator)){const e=d,o=[];if(d=e=>{o.push(e)},i=n.validator(t),d=e,!i){const e=(o.length>1?\"* \":\"\")+o.join(\"\\n* \");return o.length=0,!1===r?(d(e),i):e}}return i}function j(e,t){const r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?(p(this,\"default\")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: \"${e}\"`),this)}}}),{validator:n}=r;return h(n)&&(r.validator=O(n,r)),r}function _(e,t){const r=j(e,t);return Object.defineProperty(r,\"validate\",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,n){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(r=>{t[r]=Object.getOwnPropertyDescriptor(e,r)}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(n))return o;const{validator:a}=n,s=r(n,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o)}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\\s*$)/gm,\" \")}const w=()=>_(\"any\",{}),P=()=>_(\"function\",{type:Function}),x=()=>_(\"boolean\",{type:Boolean}),E=()=>_(\"string\",{type:String}),N=()=>_(\"number\",{type:Number}),q=()=>_(\"array\",{type:Array}),A=()=>_(\"object\",{type:Object}),V=()=>j(\"integer\",{type:Number,validator:e=>y(e)}),S=()=>j(\"symbol\",{validator:e=>\"symbol\"==typeof e}),k=()=>({type:null});function D(e,t=\"custom validation failed\"){if(\"function\"!=typeof e)throw new TypeError(\"[VueTypes error]: You must provide a function as argument\");return j(e.name||\"<>\",{type:null,validator(r){const n=e(r);return n||d(`${this._vueTypes_name} - ${t}`),n}})}function L(e){if(!v(e))throw new TypeError(\"[VueTypes error]: You must provide an array as argument.\");const t=`oneOf - value should be one of \"${e.join('\", \"')}\".`,r=e.reduce((e,t)=>{if(null!=t){const r=t.constructor;-1===e.indexOf(r)&&e.push(r)}return e},[]);return j(\"oneOf\",{type:r.length>0?r:void 0,validator(r){const n=-1!==e.indexOf(r);return n||d(t),n}})}function F(e){if(!v(e))throw new TypeError(\"[VueTypes error]: You must provide an array as argument\");let t=!1,r=[];for(let n=0;nr.indexOf(e)===t);const n=r.length>0?r:null;return j(\"oneOfType\",t?{type:n,validator(t){const r=[],n=e.some(e=>{const n=m(b(e)&&\"oneOf\"===e._vueTypes_name?e.type||null:e,t,!0);return\"string\"==typeof n&&r.push(n),!0===n});return n||d(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:\\n${$(r.join(\"\\n\"))}`),n}}:{type:n})}function Y(e){return j(\"arrayOf\",{type:Array,validator(t){let r=\"\";const n=t.every(t=>(r=m(e,t,!0),!0===r));return n||d(`arrayOf - value validation error:\\n${$(r)}`),n}})}function B(e){return j(\"instanceOf\",{type:e})}function I(e){return j(\"objectOf\",{type:Object,validator(t){let r=\"\";const n=Object.keys(t).every(n=>(r=m(e,t[n],!0),!0===r));return n||d(`objectOf - value validation error:\\n${$(r)}`),n}})}function J(e){const t=Object.keys(e),r=t.filter(t=>{var r;return!(null===(r=e[t])||void 0===r||!r.required)}),n=j(\"shape\",{type:Object,validator(n){if(!c(n))return!1;const i=Object.keys(n);if(r.length>0&&r.some(e=>-1===i.indexOf(e))){const e=r.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property \"${e[0]}\" is not defined.`:`shape - required properties \"${e.join('\", \"')}\" are not defined.`),!1}return i.every(r=>{if(-1===t.indexOf(r))return!0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a \"${r}\" property. Allowed keys: \"${t.join('\", \"')}\".`),!1);const i=m(e[r],n[r],!0);return\"string\"==typeof i&&d(`shape - \"${r}\" property validation error:\\n ${$(i)}`),!0===i})}});return Object.defineProperty(n,\"_vueTypes_isLoose\",{writable:!0,value:!1}),Object.defineProperty(n,\"loose\",{get(){return this._vueTypes_isLoose=!0,this}}),n}const M=[\"name\",\"validate\",\"getter\"],R=/*#__PURE__*/(()=>{var e;return(e=class{static get any(){return w()}static get func(){return P().def(this.defaults.func)}static get bool(){return x().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return A().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return S()}static get nullable(){return{type:null}}static extend(e){if(v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:n=!1,getter:i=!1}=e,o=r(e,M);if(p(this,t))throw new TypeError(`[VueTypes error]: Type \"${t}\" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const r=T(t,a,o);return r.validator&&(r.validator=r.validator.bind(r,...e)),r}});let s;return s=i?{get(){const e=Object.assign({},o);return n?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const r=Object.assign({},o);let i;return i=n?_(t,r):j(t,r),r.validator&&(i.validator=r.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=n,e.custom=D,e.oneOf=L,e.instanceOf=B,e.oneOfType=F,e.arrayOf=Y,e.objectOf=I,e.shape=J,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,r=!1)=>r?_(e,t):j(e,t)},e})();function z(e={func:()=>{},bool:!0,string:\"\",number:0,array:()=>[],object:()=>({}),integer:0}){var r;return(r=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(r){this.defaults=!1!==r?t({},!0!==r?r:e):{}}}).defaults=t({},e),r}class C extends(z()){}export{w as any,q as array,Y as arrayOf,x as bool,n as config,z as createTypes,D as custom,C as default,T as fromType,P as func,B as instanceOf,V as integer,k as nullable,N as number,A as object,I as objectOf,L as oneOf,F as oneOfType,J as shape,E as string,S as symbol,j as toType,_ as toValidableType,m as validateType};\n//# sourceMappingURL=vue-types.modern.js.map\n","var t=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var n=function(t){return t&&t.Math==Math&&t},r=n(\"object\"==typeof globalThis&&globalThis)||n(\"object\"==typeof window&&window)||n(\"object\"==typeof self&&self)||n(\"object\"==typeof t&&t)||function(){return this}()||Function(\"return this\")(),o=function(t){try{return!!t()}catch(t){return!0}},i=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,c={f:a&&!u.call({1:2},1)?function(t){var e=a(this,t);return!!e&&e.enumerable}:u},l=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},f={}.toString,s=function(t){return f.call(t).slice(8,-1)},d=\"\".split,v=o((function(){return!Object(\"z\").propertyIsEnumerable(0)}))?function(t){return\"String\"==s(t)?d.call(t,\"\"):Object(t)}:Object,p=function(t){if(null==t)throw TypeError(\"Can't call method on \"+t);return t},g=function(t){return v(p(t))},h=function(t){return\"object\"==typeof t?null!==t:\"function\"==typeof t},y=function(t,e){if(!h(t))return t;var n,r;if(e&&\"function\"==typeof(n=t.toString)&&!h(r=n.call(t)))return r;if(\"function\"==typeof(n=t.valueOf)&&!h(r=n.call(t)))return r;if(!e&&\"function\"==typeof(n=t.toString)&&!h(r=n.call(t)))return r;throw TypeError(\"Can't convert object to primitive value\")},m={}.hasOwnProperty,S=function(t,e){return m.call(t,e)},x=r.document,b=h(x)&&h(x.createElement),E=function(t){return b?x.createElement(t):{}},w=!i&&!o((function(){return 7!=Object.defineProperty(E(\"div\"),\"a\",{get:function(){return 7}}).a})),O=Object.getOwnPropertyDescriptor,T={f:i?O:function(t,e){if(t=g(t),e=y(e,!0),w)try{return O(t,e)}catch(t){}if(S(t,e))return l(!c.f.call(t,e),t[e])}},A=function(t){if(!h(t))throw TypeError(String(t)+\" is not an object\");return t},k=Object.defineProperty,R={f:i?k:function(t,e,n){if(A(t),e=y(e,!0),A(n),w)try{return k(t,e,n)}catch(t){}if(\"get\"in n||\"set\"in n)throw TypeError(\"Accessors not supported\");return\"value\"in n&&(t[e]=n.value),t}},I=i?function(t,e,n){return R.f(t,e,l(1,n))}:function(t,e,n){return t[e]=n,t},j=function(t,e){try{I(r,t,e)}catch(n){r[t]=e}return e},C=r[\"__core-js_shared__\"]||j(\"__core-js_shared__\",{}),L=Function.toString;\"function\"!=typeof C.inspectSource&&(C.inspectSource=function(t){return L.call(t)});var P,M,_,D=C.inspectSource,U=r.WeakMap,N=\"function\"==typeof U&&/native code/.test(D(U)),F=e((function(t){(t.exports=function(t,e){return C[t]||(C[t]=void 0!==e?e:{})})(\"versions\",[]).push({version:\"3.8.3\",mode:\"global\",copyright:\"© 2021 Denis Pushkarev (zloirock.ru)\"})})),W=0,z=Math.random(),$=function(t){return\"Symbol(\"+String(void 0===t?\"\":t)+\")_\"+(++W+z).toString(36)},B=F(\"keys\"),Y=function(t){return B[t]||(B[t]=$(t))},G={},H=r.WeakMap;if(N){var X=C.state||(C.state=new H),V=X.get,K=X.has,q=X.set;P=function(t,e){return e.facade=t,q.call(X,t,e),e},M=function(t){return V.call(X,t)||{}},_=function(t){return K.call(X,t)}}else{var Q=Y(\"state\");G[Q]=!0,P=function(t,e){return e.facade=t,I(t,Q,e),e},M=function(t){return S(t,Q)?t[Q]:{}},_=function(t){return S(t,Q)}}var J={set:P,get:M,has:_,enforce:function(t){return _(t)?M(t):P(t,{})},getterFor:function(t){return function(e){var n;if(!h(e)||(n=M(e)).type!==t)throw TypeError(\"Incompatible receiver, \"+t+\" required\");return n}}},Z=e((function(t){var e=J.get,n=J.enforce,o=String(String).split(\"String\");(t.exports=function(t,e,i,u){var a,c=!!u&&!!u.unsafe,l=!!u&&!!u.enumerable,f=!!u&&!!u.noTargetGet;\"function\"==typeof i&&(\"string\"!=typeof e||S(i,\"name\")||I(i,\"name\",e),(a=n(i)).source||(a.source=o.join(\"string\"==typeof e?e:\"\"))),t!==r?(c?!f&&t[e]&&(l=!0):delete t[e],l?t[e]=i:I(t,e,i)):l?t[e]=i:j(e,i)})(Function.prototype,\"toString\",(function(){return\"function\"==typeof this&&e(this).source||D(this)}))})),tt=r,et=function(t){return\"function\"==typeof t?t:void 0},nt=function(t,e){return arguments.length<2?et(tt[t])||et(r[t]):tt[t]&&tt[t][e]||r[t]&&r[t][e]},rt=Math.ceil,ot=Math.floor,it=function(t){return isNaN(t=+t)?0:(t>0?ot:rt)(t)},ut=Math.min,at=function(t){return t>0?ut(it(t),9007199254740991):0},ct=Math.max,lt=Math.min,ft=function(t,e){var n=it(t);return n<0?ct(n+e,0):lt(n,e)},st=function(t){return function(e,n,r){var o,i=g(e),u=at(i.length),a=ft(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},dt={includes:st(!0),indexOf:st(!1)},vt=dt.indexOf,pt=function(t,e){var n,r=g(t),o=0,i=[];for(n in r)!S(G,n)&&S(r,n)&&i.push(n);for(;e.length>o;)S(r,n=e[o++])&&(~vt(i,n)||i.push(n));return i},gt=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"],ht=gt.concat(\"length\",\"prototype\"),yt={f:Object.getOwnPropertyNames||function(t){return pt(t,ht)}},mt={f:Object.getOwnPropertySymbols},St=nt(\"Reflect\",\"ownKeys\")||function(t){var e=yt.f(A(t)),n=mt.f;return n?e.concat(n(t)):e},xt=function(t,e){for(var n=St(e),r=R.f,o=T.f,i=0;i1?arguments[1]:void 0)}});var Bt=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"isInBrowser\",value:function(){return\"undefined\"!=typeof window}},{key:\"isServer\",value:function(){return\"undefined\"==typeof window}},{key:\"getUA\",value:function(){return t.isInBrowser()?window.navigator.userAgent.toLowerCase():\"\"}},{key:\"isMobile\",value:function(){return/Mobile|mini|Fennec|Android|iP(ad|od|hone)/.test(navigator.appVersion)}},{key:\"isOpera\",value:function(){return-1!==navigator.userAgent.indexOf(\"Opera\")}},{key:\"isIE\",value:function(){var e=t.getUA();return\"\"!==e&&e.indexOf(\"msie\")>0}},{key:\"isIE9\",value:function(){var e=t.getUA();return\"\"!==e&&e.indexOf(\"msie 9.0\")>0}},{key:\"isEdge\",value:function(){var e=t.getUA();return\"\"!==e&&e.indexOf(\"edge/\")>0}},{key:\"isChrome\",value:function(){var e=t.getUA();return\"\"!==e&&/chrome\\/\\d+/.test(e)&&!t.isEdge()}},{key:\"isPhantomJS\",value:function(){var e=t.getUA();return\"\"!==e&&/phantomjs/.test(e)}},{key:\"isFirefox\",value:function(){var e=t.getUA();return\"\"!==e&&/firefox/.test(e)}}]),t}(),Yt=[].join,Gt=v!=Object,Ht=jt(\"join\",\",\");It({target:\"Array\",proto:!0,forced:Gt||!Ht},{join:function(t){return Yt.call(g(this),void 0===t?\",\":t)}});var Xt,Vt,Kt=function(t){return Object(p(t))},qt=Array.isArray||function(t){return\"Array\"==s(t)},Qt=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())})),Jt=Qt&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator,Zt=F(\"wks\"),te=r.Symbol,ee=Jt?te:te&&te.withoutSetter||$,ne=function(t){return S(Zt,t)||(Qt&&S(te,t)?Zt[t]=te[t]:Zt[t]=ee(\"Symbol.\"+t)),Zt[t]},re=ne(\"species\"),oe=function(t,e){var n;return qt(t)&&(\"function\"!=typeof(n=t.constructor)||n!==Array&&!qt(n.prototype)?h(n)&&null===(n=n[re])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)},ie=function(t,e,n){var r=y(e);r in t?R.f(t,r,l(0,n)):t[r]=n},ue=nt(\"navigator\",\"userAgent\")||\"\",ae=r.process,ce=ae&&ae.versions,le=ce&&ce.v8;le?Vt=(Xt=le.split(\".\"))[0]+Xt[1]:ue&&(!(Xt=ue.match(/Edge\\/(\\d+)/))||Xt[1]>=74)&&(Xt=ue.match(/Chrome\\/(\\d+)/))&&(Vt=Xt[1]);var fe=Vt&&+Vt,se=ne(\"species\"),de=function(t){return fe>=51||!o((function(){var e=[];return(e.constructor={})[se]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},ve=de(\"splice\"),pe=Mt(\"splice\",{ACCESSORS:!0,0:0,1:2}),ge=Math.max,he=Math.min;It({target:\"Array\",proto:!0,forced:!ve||!pe},{splice:function(t,e){var n,r,o,i,u,a,c=Kt(this),l=at(c.length),f=ft(t,l),s=arguments.length;if(0===s?n=r=0:1===s?(n=0,r=l-f):(n=s-2,r=he(ge(it(e),0),l-f)),l+n-r>9007199254740991)throw TypeError(\"Maximum allowed length exceeded\");for(o=oe(c,r),i=0;il-r+n;i--)delete c[i-1]}else if(n>r)for(i=l-r;i>f;i--)a=i+n-1,(u=i+r-1)in c?c[a]=c[u]:delete c[a];for(i=0;i0&&(!i.multiline||i.multiline&&\"\\n\"!==t[i.lastIndex-1])&&(c=\"(?: \"+c+\")\",f=\" \"+f,l++),n=new RegExp(\"^(?:\"+c+\")\",a)),Pe&&(n=new RegExp(\"^\"+c+\"$(?!\\\\s)\",a)),Ce&&(e=i.lastIndex),r=Re.call(u?n:i,f),u?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Ce&&r&&(i.lastIndex=i.global?r.index+r[0].length:e),Pe&&r&&r.length>1&&Ie.call(r[0],n,(function(){for(o=1;o\")})),ze=\"$0\"===\"a\".replace(/./,\"$0\"),$e=ne(\"replace\"),Be=!!/./[$e]&&\"\"===/./[$e](\"a\",\"$0\"),Ye=!o((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n=\"ab\".split(t);return 2!==n.length||\"a\"!==n[0]||\"b\"!==n[1]})),Ge=function(t,e,n,r){var i=ne(t),u=!o((function(){var e={};return e[i]=function(){return 7},7!=\"\"[t](e)})),a=u&&!o((function(){var e=!1,n=/a/;return\"split\"===t&&((n={}).constructor={},n.constructor[Fe]=function(){return n},n.flags=\"\",n[i]=/./[i]),n.exec=function(){return e=!0,null},n[i](\"\"),!e}));if(!u||!a||\"replace\"===t&&(!We||!ze||Be)||\"split\"===t&&!Ye){var c=/./[i],l=n(i,\"\"[t],(function(t,e,n,r,o){return e.exec===Me?u&&!o?{done:!0,value:c.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:ze,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Be}),f=l[0],s=l[1];Z(String.prototype,t,f),Z(RegExp.prototype,i,2==e?function(t,e){return s.call(t,this,e)}:function(t){return s.call(t,this)})}r&&I(RegExp.prototype[i],\"sham\",!0)},He=ne(\"match\"),Xe=function(t){var e;return h(t)&&(void 0!==(e=t[He])?!!e:\"RegExp\"==s(t))},Ve=function(t){if(\"function\"!=typeof t)throw TypeError(String(t)+\" is not a function\");return t},Ke=ne(\"species\"),qe=function(t){return function(e,n){var r,o,i=String(p(e)),u=it(n),a=i.length;return u<0||u>=a?t?\"\":void 0:(r=i.charCodeAt(u))<55296||r>56319||u+1===a||(o=i.charCodeAt(u+1))<56320||o>57343?t?i.charAt(u):r:t?i.slice(u,u+2):o-56320+(r-55296<<10)+65536}},Qe={codeAt:qe(!1),charAt:qe(!0)},Je=Qe.charAt,Ze=function(t,e,n){return e+(n?Je(t,e).length:1)},tn=function(t,e){var n=t.exec;if(\"function\"==typeof n){var r=n.call(t,e);if(\"object\"!=typeof r)throw TypeError(\"RegExp exec method returned something other than an Object or null\");return r}if(\"RegExp\"!==s(t))throw TypeError(\"RegExp#exec called on incompatible receiver\");return Me.call(t,e)},en=[].push,nn=Math.min,rn=!o((function(){return!RegExp(4294967295,\"y\")}));Ge(\"split\",2,(function(t,e,n){var r;return r=\"c\"==\"abbc\".split(/(b)*/)[1]||4!=\"test\".split(/(?:)/,-1).length||2!=\"ab\".split(/(?:ab)*/).length||4!=\".\".split(/(.?)(.?)/).length||\".\".split(/()()/).length>1||\"\".split(/.?/).length?function(t,n){var r=String(p(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!Xe(t))return e.call(r,t,o);for(var i,u,a,c=[],l=(t.ignoreCase?\"i\":\"\")+(t.multiline?\"m\":\"\")+(t.unicode?\"u\":\"\")+(t.sticky?\"y\":\"\"),f=0,s=new RegExp(t.source,l+\"g\");(i=Me.call(s,r))&&!((u=s.lastIndex)>f&&(c.push(r.slice(f,i.index)),i.length>1&&i.index=o));)s.lastIndex===i.index&&s.lastIndex++;return f===r.length?!a&&s.test(\"\")||c.push(\"\"):c.push(r.slice(f)),c.length>o?c.slice(0,o):c}:\"0\".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var o=p(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,n):r.call(String(o),e,n)},function(t,o){var i=n(r,t,this,o,r!==e);if(i.done)return i.value;var u=A(t),a=String(this),c=function(t,e){var n,r=A(t).constructor;return void 0===r||null==(n=A(r)[Ke])?e:Ve(n)}(u,RegExp),l=u.unicode,f=(u.ignoreCase?\"i\":\"\")+(u.multiline?\"m\":\"\")+(u.unicode?\"u\":\"\")+(rn?\"y\":\"g\"),s=new c(rn?u:\"^(?:\"+u.source+\")\",f),d=void 0===o?4294967295:o>>>0;if(0===d)return[];if(0===a.length)return null===tn(s,a)?[a]:[];for(var v=0,p=0,g=[];p1?arguments[1]:void 0,e.length)),r=String(t);return wn?wn.call(e,r,n):e.slice(n,n+r.length)===r}});var Rn=function(t){return t instanceof Date},In=function(t){return\"function\"==typeof t},jn=function(t){return\"string\"==typeof t},Cn=function(t){return\"symbol\"===kn(t)},Ln=function(t){return\"boolean\"==typeof t},Pn=function(t){return\"number\"==typeof t},Mn=function(t){return null!==t&&\"object\"===kn(t)},_n=Object.prototype.toString,Dn=function(t){return _n.call(t)},Un=Object.prototype.hasOwnProperty,Nn=function(t,e){return Un.call(t,e)},Fn=Array.isArray,Wn=function(t){return\"[object Map]\"===Dn(t)},zn=function(t){return\"[object Set]\"===Dn(t)},$n=function(t){return Dn(t).slice(8,-1)},Bn=function(t){return $n(t).startsWith(\"HTML\")},Yn=function(t){return Mn(t)&&In(t.then)&&In(t.catch)},Gn=function(t){return null===t},Hn=function(t){return void 0===t},Xn=function(t){return!t&&0!==t&&\"\"!==t||Fn(t)&&!t.length||Mn(t)&&!Object.keys(t).length},Vn=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"isWindow\",value:function(t){return t===window}},{key:\"addEventListener\",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t&&e&&n&&t.addEventListener(e,n,r)}},{key:\"removeEventListener\",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];t&&e&&n&&t.removeEventListener(e,n,r)}},{key:\"triggerDragEvent\",value:function(e,n){var r=!1,o=function(t){var e;null===(e=n.drag)||void 0===e||e.call(n,t)},i=function e(i){var u;t.removeEventListener(document,\"mousemove\",o),t.removeEventListener(document,\"mouseup\",e),document.onselectstart=null,document.ondragstart=null,r=!1,null===(u=n.end)||void 0===u||u.call(n,i)};t.addEventListener(e,\"mousedown\",(function(e){var u;r||(document.onselectstart=function(){return!1},document.ondragstart=function(){return!1},t.addEventListener(document,\"mousemove\",o),t.addEventListener(document,\"mouseup\",i),r=!0,null===(u=n.start)||void 0===u||u.call(n,e))}))}},{key:\"getBoundingClientRect\",value:function(t){return t&&Mn(t)&&1===t.nodeType?t.getBoundingClientRect():null}},{key:\"hasClass\",value:function(t,e){return!!(t&&Mn(t)&&jn(e)&&1===t.nodeType)&&t.classList.contains(e.trim())}},{key:\"addClass\",value:function(e,n){if(e&&Mn(e)&&jn(n)&&1===e.nodeType&&(n=n.trim(),!t.hasClass(e,n))){var r=e.className;e.className=r?r+\" \"+n:n}}},{key:\"removeClass\",value:function(t,e){if(t&&Mn(t)&&jn(e)&&1===t.nodeType&&\"string\"==typeof t.className){e=e.trim();for(var n=t.className.trim().split(\" \"),r=n.length-1;r>=0;r--)n[r]=n[r].trim(),n[r]&&n[r]!==e||n.splice(r,1);t.className=n.join(\" \")}}},{key:\"toggleClass\",value:function(t,e,n){t&&Mn(t)&&jn(e)&&1===t.nodeType&&t.classList.toggle(e,n)}},{key:\"replaceClass\",value:function(e,n,r){e&&Mn(e)&&jn(n)&&jn(r)&&1===e.nodeType&&(n=n.trim(),r=r.trim(),t.removeClass(e,n),t.addClass(e,r))}},{key:\"getScrollTop\",value:function(t){var e=\"scrollTop\"in t?t.scrollTop:t.pageYOffset;return Math.max(e,0)}},{key:\"setScrollTop\",value:function(t,e){\"scrollTop\"in t?t.scrollTop=e:t.scrollTo(t.scrollX,e)}},{key:\"getRootScrollTop\",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}},{key:\"setRootScrollTop\",value:function(e){t.setScrollTop(window,e),t.setScrollTop(document.body,e)}},{key:\"getElementTop\",value:function(e,n){if(t.isWindow(e))return 0;var r=n?t.getScrollTop(n):t.getRootScrollTop();return e.getBoundingClientRect().top+r}},{key:\"getVisibleHeight\",value:function(e){return t.isWindow(e)?e.innerHeight:e.getBoundingClientRect().height}},{key:\"isHidden\",value:function(t){if(!t)return!1;var e=window.getComputedStyle(t),n=\"none\"===e.display,r=null===t.offsetParent&&\"fixed\"!==e.position;return n||r}},{key:\"triggerEvent\",value:function(t,e){if(\"createEvent\"in document){var n=document.createEvent(\"HTMLEvents\");n.initEvent(e,!1,!0),t.dispatchEvent(n)}}},{key:\"calcAngle\",value:function(t,e){var n=t.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2,i=Math.abs(r-e.clientX),u=Math.abs(o-e.clientY),a=u/Math.sqrt(Math.pow(i,2)+Math.pow(u,2)),c=Math.acos(a),l=Math.floor(180/(Math.PI/c));return e.clientX>r&&e.clientY>o&&(l=180-l),e.clientX==r&&e.clientY>o&&(l=180),e.clientX>r&&e.clientY==o&&(l=90),e.clientXo&&(l=180+l),e.clientX1?n-1:0),o=1;o]*>)/g,Jn=/\\$([$&'`]|\\d\\d?)/g,Zn=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=Jn;return void 0!==o&&(o=Kt(o),c=Qn),qn.call(i,c,(function(i,c){var l;switch(c.charAt(0)){case\"$\":return\"$\";case\"&\":return t;case\"`\":return e.slice(0,n);case\"'\":return e.slice(u);case\"<\":l=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var s=Kn(f/10);return 0===s?i:s<=a?void 0===r[s-1]?c.charAt(1):r[s-1]+c.charAt(1):i}l=r[f-1]}return void 0===l?\"\":l}))},tr=Math.max,er=Math.min;Ge(\"replace\",2,(function(t,e,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,u=o?\"$\":\"$0\";return[function(n,r){var o=p(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):e.call(String(o),n,r)},function(t,r){if(!o&&i||\"string\"==typeof r&&-1===r.indexOf(u)){var a=n(e,t,this,r);if(a.done)return a.value}var c=A(t),l=String(this),f=\"function\"==typeof r;f||(r=String(r));var s=c.global;if(s){var d=c.unicode;c.lastIndex=0}for(var v=[];;){var p=tn(c,l);if(null===p)break;if(v.push(p),!s)break;\"\"===String(p[0])&&(c.lastIndex=Ze(l,at(c.lastIndex),d))}for(var g,h=\"\",y=0,m=0;m=y&&(h+=l.slice(y,x)+T,y=x+S.length)}return h+l.slice(y)}]}));var nr=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"camelize\",value:function(t){return t.replace(/-(\\w)/g,(function(t,e){return e?e.toUpperCase():\"\"}))}},{key:\"capitalize\",value:function(t){return t.charAt(0).toUpperCase()+t.slice(1)}}]),t}(),rr=function(){function t(){Wt(this,t)}return $t(t,null,[{key:\"_clone\",value:function(){}}]),t}(),or=ne(\"isConcatSpreadable\"),ir=fe>=51||!o((function(){var t=[];return t[or]=!1,t.concat()[0]!==t})),ur=de(\"concat\"),ar=function(t){if(!h(t))return!1;var e=t[or];return void 0!==e?!!e:qt(t)};It({target:\"Array\",proto:!0,forced:!ir||!ur},{concat:function(t){var e,n,r,o,i,u=Kt(this),a=oe(u,0),c=0;for(e=-1,r=arguments.length;e9007199254740991)throw TypeError(\"Maximum allowed index exceeded\");for(n=0;n=9007199254740991)throw TypeError(\"Maximum allowed index exceeded\");ie(a,c++,i)}return a.length=c,a}});var cr,lr=function(t,e,n){if(Ve(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},fr=[].push,sr=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,l,f,s){for(var d,p,g=Kt(c),h=v(g),y=lr(l,f,3),m=at(h.length),S=0,x=s||oe,b=e?x(c,m):n||u?x(c,0):void 0;m>S;S++)if((a||S in h)&&(p=y(d=h[S],S,g),t))if(e)b[S]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return S;case 2:fr.call(b,d)}else switch(t){case 4:return!1;case 7:fr.call(b,d)}return i?-1:r||o?o:b}},dr={forEach:sr(0),map:sr(1),filter:sr(2),some:sr(3),every:sr(4),find:sr(5),findIndex:sr(6),filterOut:sr(7)},vr=i?Object.defineProperties:function(t,e){A(t);for(var n,r=yn(e),o=r.length,i=0;o>i;)R.f(t,n=r[i++],e[n]);return t},pr=nt(\"document\",\"documentElement\"),gr=Y(\"IE_PROTO\"),hr=function(){},yr=function(t){return\"\n","\n","\n","\n","\n","\n","\n","\n","\n","\n","\n","\n/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n if (Array.isArray(sequence)) return sequence;\n else if (isNothing(sequence)) return [];\n\n return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n var index, length, key, sourceKeys;\n\n if (source) {\n sourceKeys = Object.keys(source);\n\n for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n key = sourceKeys[index];\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\n\nfunction repeat(string, count) {\n var result = '', cycle;\n\n for (cycle = 0; cycle < count; cycle += 1) {\n result += string;\n }\n\n return result;\n}\n\n\nfunction isNegativeZero(number) {\n return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1 = isNothing;\nvar isObject_1 = isObject;\nvar toArray_1 = toArray;\nvar repeat_1 = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1 = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n var where = '', message = exception.reason || '(unknown reason)';\n\n if (!exception.mark) return message;\n\n if (exception.mark.name) {\n where += 'in \"' + exception.mark.name + '\" ';\n }\n\n where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n if (!compact && exception.mark.snippet) {\n where += '\\n\\n' + exception.mark.snippet;\n }\n\n return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n // Super constructor\n Error.call(this);\n\n this.name = 'YAMLException';\n this.reason = reason;\n this.mark = mark;\n this.message = formatError(this, false);\n\n // Include stack trace in error object\n if (Error.captureStackTrace) {\n // Chrome and NodeJS\n Error.captureStackTrace(this, this.constructor);\n } else {\n // FF, IE 10+ and Safari 6+. Fallback for others\n this.stack = (new Error()).stack || '';\n }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n var head = '';\n var tail = '';\n var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n if (position - lineStart > maxHalfLength) {\n head = ' ... ';\n lineStart = position - maxHalfLength + head.length;\n }\n\n if (lineEnd - position > maxHalfLength) {\n tail = ' ...';\n lineEnd = position + maxHalfLength - tail.length;\n }\n\n return {\n str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n pos: position - lineStart + head.length // relative position\n };\n}\n\n\nfunction padStart(string, max) {\n return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n options = Object.create(options || null);\n\n if (!mark.buffer) return null;\n\n if (!options.maxLength) options.maxLength = 79;\n if (typeof options.indent !== 'number') options.indent = 1;\n if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n if (typeof options.linesAfter !== 'number') options.linesAfter = 2;\n\n var re = /\\r?\\n|\\r|\\0/g;\n var lineStarts = [ 0 ];\n var lineEnds = [];\n var match;\n var foundLineNo = -1;\n\n while ((match = re.exec(mark.buffer))) {\n lineEnds.push(match.index);\n lineStarts.push(match.index + match[0].length);\n\n if (mark.position <= match.index && foundLineNo < 0) {\n foundLineNo = lineStarts.length - 2;\n }\n }\n\n if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n var result = '', i, line;\n var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n for (i = 1; i <= options.linesBefore; i++) {\n if (foundLineNo - i < 0) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo - i],\n lineEnds[foundLineNo - i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n maxLineLength\n );\n result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n' + result;\n }\n\n line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n for (i = 1; i <= options.linesAfter; i++) {\n if (foundLineNo + i >= lineEnds.length) break;\n line = getLine(\n mark.buffer,\n lineStarts[foundLineNo + i],\n lineEnds[foundLineNo + i],\n mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n maxLineLength\n );\n result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n ' | ' + line.str + '\\n';\n }\n\n return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n 'kind',\n 'multi',\n 'resolve',\n 'construct',\n 'instanceOf',\n 'predicate',\n 'represent',\n 'representName',\n 'defaultStyle',\n 'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n 'scalar',\n 'sequence',\n 'mapping'\n];\n\nfunction compileStyleAliases(map) {\n var result = {};\n\n if (map !== null) {\n Object.keys(map).forEach(function (style) {\n map[style].forEach(function (alias) {\n result[String(alias)] = style;\n });\n });\n }\n\n return result;\n}\n\nfunction Type$1(tag, options) {\n options = options || {};\n\n Object.keys(options).forEach(function (name) {\n if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n }\n });\n\n // TODO: Add tag format check.\n this.options = options; // keep original options in case user wants to extend this type later\n this.tag = tag;\n this.kind = options['kind'] || null;\n this.resolve = options['resolve'] || function () { return true; };\n this.construct = options['construct'] || function (data) { return data; };\n this.instanceOf = options['instanceOf'] || null;\n this.predicate = options['predicate'] || null;\n this.represent = options['represent'] || null;\n this.representName = options['representName'] || null;\n this.defaultStyle = options['defaultStyle'] || null;\n this.multi = options['multi'] || false;\n this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\n\n if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n var result = [];\n\n schema[name].forEach(function (currentType) {\n var newIndex = result.length;\n\n result.forEach(function (previousType, previousIndex) {\n if (previousType.tag === currentType.tag &&\n previousType.kind === currentType.kind &&\n previousType.multi === currentType.multi) {\n\n newIndex = previousIndex;\n }\n });\n\n result[newIndex] = currentType;\n });\n\n return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n var result = {\n scalar: {},\n sequence: {},\n mapping: {},\n fallback: {},\n multi: {\n scalar: [],\n sequence: [],\n mapping: [],\n fallback: []\n }\n }, index, length;\n\n function collectType(type) {\n if (type.multi) {\n result.multi[type.kind].push(type);\n result.multi['fallback'].push(type);\n } else {\n result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n }\n }\n\n for (index = 0, length = arguments.length; index < length; index += 1) {\n arguments[index].forEach(collectType);\n }\n return result;\n}\n\n\nfunction Schema$1(definition) {\n return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n var implicit = [];\n var explicit = [];\n\n if (definition instanceof type) {\n // Schema.extend(type)\n explicit.push(definition);\n\n } else if (Array.isArray(definition)) {\n // Schema.extend([ type1, type2, ... ])\n explicit = explicit.concat(definition);\n\n } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n if (definition.implicit) implicit = implicit.concat(definition.implicit);\n if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n } else {\n throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n 'or a schema definition ({ implicit: [...], explicit: [...] })');\n }\n\n implicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n\n if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n }\n\n if (type$1.multi) {\n throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n }\n });\n\n explicit.forEach(function (type$1) {\n if (!(type$1 instanceof type)) {\n throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n }\n });\n\n var result = Object.create(Schema$1.prototype);\n\n result.implicit = (this.implicit || []).concat(implicit);\n result.explicit = (this.explicit || []).concat(explicit);\n\n result.compiledImplicit = compileList(result, 'implicit');\n result.compiledExplicit = compileList(result, 'explicit');\n result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n kind: 'scalar',\n construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n kind: 'sequence',\n construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n kind: 'mapping',\n construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n explicit: [\n str,\n seq,\n map\n ]\n});\n\nfunction resolveYamlNull(data) {\n if (data === null) return true;\n\n var max = data.length;\n\n return (max === 1 && data === '~') ||\n (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n return null;\n}\n\nfunction isNull(object) {\n return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n kind: 'scalar',\n resolve: resolveYamlNull,\n construct: constructYamlNull,\n predicate: isNull,\n represent: {\n canonical: function () { return '~'; },\n lowercase: function () { return 'null'; },\n uppercase: function () { return 'NULL'; },\n camelcase: function () { return 'Null'; },\n empty: function () { return ''; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n if (data === null) return false;\n\n var max = data.length;\n\n return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n return data === 'true' ||\n data === 'True' ||\n data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n kind: 'scalar',\n resolve: resolveYamlBoolean,\n construct: constructYamlBoolean,\n predicate: isBoolean,\n represent: {\n lowercase: function (object) { return object ? 'true' : 'false'; },\n uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n camelcase: function (object) { return object ? 'True' : 'False'; }\n },\n defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n if (data === null) return false;\n\n var max = data.length,\n index = 0,\n hasDigits = false,\n ch;\n\n if (!max) return false;\n\n ch = data[index];\n\n // sign\n if (ch === '-' || ch === '+') {\n ch = data[++index];\n }\n\n if (ch === '0') {\n // 0\n if (index + 1 === max) return true;\n ch = data[++index];\n\n // base 2, base 8, base 16\n\n if (ch === 'b') {\n // base 2\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (ch !== '0' && ch !== '1') return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'x') {\n // base 16\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isHexCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n\n\n if (ch === 'o') {\n // base 8\n index++;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isOctCode(data.charCodeAt(index))) return false;\n hasDigits = true;\n }\n return hasDigits && ch !== '_';\n }\n }\n\n // base 10 (except 0)\n\n // value should not start with `_`;\n if (ch === '_') return false;\n\n for (; index < max; index++) {\n ch = data[index];\n if (ch === '_') continue;\n if (!isDecCode(data.charCodeAt(index))) {\n return false;\n }\n hasDigits = true;\n }\n\n // Should have digits and should not end with `_`\n if (!hasDigits || ch === '_') return false;\n\n return true;\n}\n\nfunction constructYamlInteger(data) {\n var value = data, sign = 1, ch;\n\n if (value.indexOf('_') !== -1) {\n value = value.replace(/_/g, '');\n }\n\n ch = value[0];\n\n if (ch === '-' || ch === '+') {\n if (ch === '-') sign = -1;\n value = value.slice(1);\n ch = value[0];\n }\n\n if (value === '0') return 0;\n\n if (ch === '0') {\n if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n }\n\n return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n return (Object.prototype.toString.call(object)) === '[object Number]' &&\n (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n kind: 'scalar',\n resolve: resolveYamlInteger,\n construct: constructYamlInteger,\n predicate: isInteger,\n represent: {\n binary: function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n octal: function (obj) { return obj >= 0 ? '0o' + obj.toString(8) : '-0o' + obj.toString(8).slice(1); },\n decimal: function (obj) { return obj.toString(10); },\n /* eslint-disable max-len */\n hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() : '-0x' + obj.toString(16).toUpperCase().slice(1); }\n },\n defaultStyle: 'decimal',\n styleAliases: {\n binary: [ 2, 'bin' ],\n octal: [ 8, 'oct' ],\n decimal: [ 10, 'dec' ],\n hexadecimal: [ 16, 'hex' ]\n }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n // 2.5e4, 2.5 and integers\n '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n // .2e4, .2\n // special case, seems not from spec\n '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n // .inf\n '|[-+]?\\\\.(?:inf|Inf|INF)' +\n // .nan\n '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n if (data === null) return false;\n\n if (!YAML_FLOAT_PATTERN.test(data) ||\n // Quick hack to not allow integers end with `_`\n // Probably should update regexp & check speed\n data[data.length - 1] === '_') {\n return false;\n }\n\n return true;\n}\n\nfunction constructYamlFloat(data) {\n var value, sign;\n\n value = data.replace(/_/g, '').toLowerCase();\n sign = value[0] === '-' ? -1 : 1;\n\n if ('+-'.indexOf(value[0]) >= 0) {\n value = value.slice(1);\n }\n\n if (value === '.inf') {\n return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n } else if (value === '.nan') {\n return NaN;\n }\n return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n var res;\n\n if (isNaN(object)) {\n switch (style) {\n case 'lowercase': return '.nan';\n case 'uppercase': return '.NAN';\n case 'camelcase': return '.NaN';\n }\n } else if (Number.POSITIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '.inf';\n case 'uppercase': return '.INF';\n case 'camelcase': return '.Inf';\n }\n } else if (Number.NEGATIVE_INFINITY === object) {\n switch (style) {\n case 'lowercase': return '-.inf';\n case 'uppercase': return '-.INF';\n case 'camelcase': return '-.Inf';\n }\n } else if (common.isNegativeZero(object)) {\n return '-0.0';\n }\n\n res = object.toString(10);\n\n // JS stringifier can build scientific format without dots: 5e-100,\n // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n return (Object.prototype.toString.call(object) === '[object Number]') &&\n (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n kind: 'scalar',\n resolve: resolveYamlFloat,\n construct: constructYamlFloat,\n predicate: isFloat,\n represent: representYamlFloat,\n defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n implicit: [\n _null,\n bool,\n int,\n float\n ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9])' + // [2] month\n '-([0-9][0-9])$'); // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n '^([0-9][0-9][0-9][0-9])' + // [1] year\n '-([0-9][0-9]?)' + // [2] month\n '-([0-9][0-9]?)' + // [3] day\n '(?:[Tt]|[ \\\\t]+)' + // ...\n '([0-9][0-9]?)' + // [4] hour\n ':([0-9][0-9])' + // [5] minute\n ':([0-9][0-9])' + // [6] second\n '(?:\\\\.([0-9]*))?' + // [7] fraction\n '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n '(?::([0-9][0-9]))?))?$'); // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n if (data === null) return false;\n if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n return false;\n}\n\nfunction constructYamlTimestamp(data) {\n var match, year, month, day, hour, minute, second, fraction = 0,\n delta = null, tz_hour, tz_minute, date;\n\n match = YAML_DATE_REGEXP.exec(data);\n if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n if (match === null) throw new Error('Date resolve error');\n\n // match: [1] year [2] month [3] day\n\n year = +(match[1]);\n month = +(match[2]) - 1; // JS month starts with 0\n day = +(match[3]);\n\n if (!match[4]) { // no hour\n return new Date(Date.UTC(year, month, day));\n }\n\n // match: [4] hour [5] minute [6] second [7] fraction\n\n hour = +(match[4]);\n minute = +(match[5]);\n second = +(match[6]);\n\n if (match[7]) {\n fraction = match[7].slice(0, 3);\n while (fraction.length < 3) { // milli-seconds\n fraction += '0';\n }\n fraction = +fraction;\n }\n\n // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n if (match[9]) {\n tz_hour = +(match[10]);\n tz_minute = +(match[11] || 0);\n delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n if (match[9] === '-') delta = -delta;\n }\n\n date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n if (delta) date.setTime(date.getTime() - delta);\n\n return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n kind: 'scalar',\n resolve: resolveYamlTimestamp,\n construct: constructYamlTimestamp,\n instanceOf: Date,\n represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n kind: 'scalar',\n resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n if (data === null) return false;\n\n var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n // Convert one by one.\n for (idx = 0; idx < max; idx++) {\n code = map.indexOf(data.charAt(idx));\n\n // Skip CR/LF\n if (code > 64) continue;\n\n // Fail on illegal characters\n if (code < 0) return false;\n\n bitlen += 6;\n }\n\n // If there are any bits left, source was corrupted\n return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n var idx, tailbits,\n input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n max = input.length,\n map = BASE64_MAP,\n bits = 0,\n result = [];\n\n // Collect by 6*4 bits (3 bytes)\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 4 === 0) && idx) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n }\n\n bits = (bits << 6) | map.indexOf(input.charAt(idx));\n }\n\n // Dump tail\n\n tailbits = (max % 4) * 6;\n\n if (tailbits === 0) {\n result.push((bits >> 16) & 0xFF);\n result.push((bits >> 8) & 0xFF);\n result.push(bits & 0xFF);\n } else if (tailbits === 18) {\n result.push((bits >> 10) & 0xFF);\n result.push((bits >> 2) & 0xFF);\n } else if (tailbits === 12) {\n result.push((bits >> 4) & 0xFF);\n }\n\n return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n var result = '', bits = 0, idx, tail,\n max = object.length,\n map = BASE64_MAP;\n\n // Convert every three bytes to 4 ASCII characters.\n\n for (idx = 0; idx < max; idx++) {\n if ((idx % 3 === 0) && idx) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n }\n\n bits = (bits << 8) + object[idx];\n }\n\n // Dump tail\n\n tail = max % 3;\n\n if (tail === 0) {\n result += map[(bits >> 18) & 0x3F];\n result += map[(bits >> 12) & 0x3F];\n result += map[(bits >> 6) & 0x3F];\n result += map[bits & 0x3F];\n } else if (tail === 2) {\n result += map[(bits >> 10) & 0x3F];\n result += map[(bits >> 4) & 0x3F];\n result += map[(bits << 2) & 0x3F];\n result += map[64];\n } else if (tail === 1) {\n result += map[(bits >> 2) & 0x3F];\n result += map[(bits << 4) & 0x3F];\n result += map[64];\n result += map[64];\n }\n\n return result;\n}\n\nfunction isBinary(obj) {\n return Object.prototype.toString.call(obj) === '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n kind: 'scalar',\n resolve: resolveYamlBinary,\n construct: constructYamlBinary,\n predicate: isBinary,\n represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2 = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n if (data === null) return true;\n\n var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n object = data;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n pairHasKey = false;\n\n if (_toString$2.call(pair) !== '[object Object]') return false;\n\n for (pairKey in pair) {\n if (_hasOwnProperty$3.call(pair, pairKey)) {\n if (!pairHasKey) pairHasKey = true;\n else return false;\n }\n }\n\n if (!pairHasKey) return false;\n\n if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n else return false;\n }\n\n return true;\n}\n\nfunction constructYamlOmap(data) {\n return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n kind: 'sequence',\n resolve: resolveYamlOmap,\n construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n if (data === null) return true;\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n if (_toString$1.call(pair) !== '[object Object]') return false;\n\n keys = Object.keys(pair);\n\n if (keys.length !== 1) return false;\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return true;\n}\n\nfunction constructYamlPairs(data) {\n if (data === null) return [];\n\n var index, length, pair, keys, result,\n object = data;\n\n result = new Array(object.length);\n\n for (index = 0, length = object.length; index < length; index += 1) {\n pair = object[index];\n\n keys = Object.keys(pair);\n\n result[index] = [ keys[0], pair[keys[0]] ];\n }\n\n return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n kind: 'sequence',\n resolve: resolveYamlPairs,\n construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n if (data === null) return true;\n\n var key, object = data;\n\n for (key in object) {\n if (_hasOwnProperty$2.call(object, key)) {\n if (object[key] !== null) return false;\n }\n }\n\n return true;\n}\n\nfunction constructYamlSet(data) {\n return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n kind: 'mapping',\n resolve: resolveYamlSet,\n construct: constructYamlSet\n});\n\nvar _default = core.extend({\n implicit: [\n timestamp,\n merge\n ],\n explicit: [\n binary,\n omap,\n pairs,\n set\n ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN = 1;\nvar CONTEXT_FLOW_OUT = 2;\nvar CONTEXT_BLOCK_IN = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP = 3;\n\n\nvar PATTERN_NON_PRINTABLE = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n return (c === 0x09/* Tab */) ||\n (c === 0x20/* Space */) ||\n (c === 0x0A/* LF */) ||\n (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n return c === 0x2C/* , */ ||\n c === 0x5B/* [ */ ||\n c === 0x5D/* ] */ ||\n c === 0x7B/* { */ ||\n c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n var lc;\n\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n /*eslint-disable no-bitwise*/\n lc = c | 0x20;\n\n if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n return lc - 0x61 + 10;\n }\n\n return -1;\n}\n\nfunction escapedHexLen(c) {\n if (c === 0x78/* x */) { return 2; }\n if (c === 0x75/* u */) { return 4; }\n if (c === 0x55/* U */) { return 8; }\n return 0;\n}\n\nfunction fromDecimalCode(c) {\n if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n return c - 0x30;\n }\n\n return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n /* eslint-disable indent */\n return (c === 0x30/* 0 */) ? '\\x00' :\n (c === 0x61/* a */) ? '\\x07' :\n (c === 0x62/* b */) ? '\\x08' :\n (c === 0x74/* t */) ? '\\x09' :\n (c === 0x09/* Tab */) ? '\\x09' :\n (c === 0x6E/* n */) ? '\\x0A' :\n (c === 0x76/* v */) ? '\\x0B' :\n (c === 0x66/* f */) ? '\\x0C' :\n (c === 0x72/* r */) ? '\\x0D' :\n (c === 0x65/* e */) ? '\\x1B' :\n (c === 0x20/* Space */) ? ' ' :\n (c === 0x22/* \" */) ? '\\x22' :\n (c === 0x2F/* / */) ? '/' :\n (c === 0x5C/* \\ */) ? '\\x5C' :\n (c === 0x4E/* N */) ? '\\x85' :\n (c === 0x5F/* _ */) ? '\\xA0' :\n (c === 0x4C/* L */) ? '\\u2028' :\n (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n if (c <= 0xFFFF) {\n return String.fromCharCode(c);\n }\n // Encode UTF-16 surrogate pair\n // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n return String.fromCharCode(\n ((c - 0x010000) >> 10) + 0xD800,\n ((c - 0x010000) & 0x03FF) + 0xDC00\n );\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n this.input = input;\n\n this.filename = options['filename'] || null;\n this.schema = options['schema'] || _default;\n this.onWarning = options['onWarning'] || null;\n // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n // if such documents have no explicit %YAML directive\n this.legacy = options['legacy'] || false;\n\n this.json = options['json'] || false;\n this.listener = options['listener'] || null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.typeMap = this.schema.compiledTypeMap;\n\n this.length = input.length;\n this.position = 0;\n this.line = 0;\n this.lineStart = 0;\n this.lineIndent = 0;\n\n // position of first leading tab in the current line,\n // used to make sure there are no tabs in the indentation\n this.firstTabInLine = -1;\n\n this.documents = [];\n\n /*\n this.version;\n this.checkLineBreaks;\n this.tagMap;\n this.anchorMap;\n this.tag;\n this.anchor;\n this.kind;\n this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n var mark = {\n name: state.filename,\n buffer: state.input.slice(0, -1), // omit trailing \\0\n position: state.position,\n line: state.line,\n column: state.position - state.lineStart\n };\n\n mark.snippet = snippet(mark);\n\n return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n if (state.onWarning) {\n state.onWarning.call(null, generateError(state, message));\n }\n}\n\n\nvar directiveHandlers = {\n\n YAML: function handleYamlDirective(state, name, args) {\n\n var match, major, minor;\n\n if (state.version !== null) {\n throwError(state, 'duplication of %YAML directive');\n }\n\n if (args.length !== 1) {\n throwError(state, 'YAML directive accepts exactly one argument');\n }\n\n match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n if (match === null) {\n throwError(state, 'ill-formed argument of the YAML directive');\n }\n\n major = parseInt(match[1], 10);\n minor = parseInt(match[2], 10);\n\n if (major !== 1) {\n throwError(state, 'unacceptable YAML version of the document');\n }\n\n state.version = args[0];\n state.checkLineBreaks = (minor < 2);\n\n if (minor !== 1 && minor !== 2) {\n throwWarning(state, 'unsupported YAML version of the document');\n }\n },\n\n TAG: function handleTagDirective(state, name, args) {\n\n var handle, prefix;\n\n if (args.length !== 2) {\n throwError(state, 'TAG directive accepts exactly two arguments');\n }\n\n handle = args[0];\n prefix = args[1];\n\n if (!PATTERN_TAG_HANDLE.test(handle)) {\n throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n }\n\n if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n }\n\n if (!PATTERN_TAG_URI.test(prefix)) {\n throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n }\n\n try {\n prefix = decodeURIComponent(prefix);\n } catch (err) {\n throwError(state, 'tag prefix is malformed: ' + prefix);\n }\n\n state.tagMap[handle] = prefix;\n }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n var _position, _length, _character, _result;\n\n if (start < end) {\n _result = state.input.slice(start, end);\n\n if (checkJson) {\n for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n _character = _result.charCodeAt(_position);\n if (!(_character === 0x09 ||\n (0x20 <= _character && _character <= 0x10FFFF))) {\n throwError(state, 'expected valid JSON character');\n }\n }\n } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n throwError(state, 'the stream contains non-printable characters');\n }\n\n state.result += _result;\n }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n var sourceKeys, key, index, quantity;\n\n if (!common.isObject(source)) {\n throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n }\n\n sourceKeys = Object.keys(source);\n\n for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n key = sourceKeys[index];\n\n if (!_hasOwnProperty$1.call(destination, key)) {\n destination[key] = source[key];\n overridableKeys[key] = true;\n }\n }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n startLine, startLineStart, startPos) {\n\n var index, quantity;\n\n // The output is a plain object here, so keys can only be strings.\n // We need to convert keyNode to a string, but doing so can hang the process\n // (deeply nested arrays that explode exponentially using aliases).\n if (Array.isArray(keyNode)) {\n keyNode = Array.prototype.slice.call(keyNode);\n\n for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n if (Array.isArray(keyNode[index])) {\n throwError(state, 'nested arrays are not supported inside keys');\n }\n\n if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n keyNode[index] = '[object Object]';\n }\n }\n }\n\n // Avoid code execution in load() via toString property\n // (still use its own toString for arrays, timestamps,\n // and whatever user schema extensions happen to have @@toStringTag)\n if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n keyNode = '[object Object]';\n }\n\n\n keyNode = String(keyNode);\n\n if (_result === null) {\n _result = {};\n }\n\n if (keyTag === 'tag:yaml.org,2002:merge') {\n if (Array.isArray(valueNode)) {\n for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n mergeMappings(state, _result, valueNode[index], overridableKeys);\n }\n } else {\n mergeMappings(state, _result, valueNode, overridableKeys);\n }\n } else {\n if (!state.json &&\n !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n _hasOwnProperty$1.call(_result, keyNode)) {\n state.line = startLine || state.line;\n state.lineStart = startLineStart || state.lineStart;\n state.position = startPos || state.position;\n throwError(state, 'duplicated mapping key');\n }\n\n // used for this specific key only because Object.defineProperty is slow\n if (keyNode === '__proto__') {\n Object.defineProperty(_result, keyNode, {\n configurable: true,\n enumerable: true,\n writable: true,\n value: valueNode\n });\n } else {\n _result[keyNode] = valueNode;\n }\n delete overridableKeys[keyNode];\n }\n\n return _result;\n}\n\nfunction readLineBreak(state) {\n var ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x0A/* LF */) {\n state.position++;\n } else if (ch === 0x0D/* CR */) {\n state.position++;\n if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n state.position++;\n }\n } else {\n throwError(state, 'a line break is expected');\n }\n\n state.line += 1;\n state.lineStart = state.position;\n state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n var lineBreaks = 0,\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n state.firstTabInLine = state.position;\n }\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (allowComments && ch === 0x23/* # */) {\n do {\n ch = state.input.charCodeAt(++state.position);\n } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n }\n\n if (is_EOL(ch)) {\n readLineBreak(state);\n\n ch = state.input.charCodeAt(state.position);\n lineBreaks++;\n state.lineIndent = 0;\n\n while (ch === 0x20/* Space */) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n } else {\n break;\n }\n }\n\n if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n throwWarning(state, 'deficient indentation');\n }\n\n return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n var _position = state.position,\n ch;\n\n ch = state.input.charCodeAt(_position);\n\n // Condition state.position === state.lineStart is tested\n // in parent on each call, for efficiency. No needs to test here again.\n if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n ch === state.input.charCodeAt(_position + 1) &&\n ch === state.input.charCodeAt(_position + 2)) {\n\n _position += 3;\n\n ch = state.input.charCodeAt(_position);\n\n if (ch === 0 || is_WS_OR_EOL(ch)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction writeFoldedLines(state, count) {\n if (count === 1) {\n state.result += ' ';\n } else if (count > 1) {\n state.result += common.repeat('\\n', count - 1);\n }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n var preceding,\n following,\n captureStart,\n captureEnd,\n hasPendingContent,\n _line,\n _lineStart,\n _lineIndent,\n _kind = state.kind,\n _result = state.result,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (is_WS_OR_EOL(ch) ||\n is_FLOW_INDICATOR(ch) ||\n ch === 0x23/* # */ ||\n ch === 0x26/* & */ ||\n ch === 0x2A/* * */ ||\n ch === 0x21/* ! */ ||\n ch === 0x7C/* | */ ||\n ch === 0x3E/* > */ ||\n ch === 0x27/* ' */ ||\n ch === 0x22/* \" */ ||\n ch === 0x25/* % */ ||\n ch === 0x40/* @ */ ||\n ch === 0x60/* ` */) {\n return false;\n }\n\n if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n return false;\n }\n }\n\n state.kind = 'scalar';\n state.result = '';\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n\n while (ch !== 0) {\n if (ch === 0x3A/* : */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following) ||\n withinFlowCollection && is_FLOW_INDICATOR(following)) {\n break;\n }\n\n } else if (ch === 0x23/* # */) {\n preceding = state.input.charCodeAt(state.position - 1);\n\n if (is_WS_OR_EOL(preceding)) {\n break;\n }\n\n } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n break;\n\n } else if (is_EOL(ch)) {\n _line = state.line;\n _lineStart = state.lineStart;\n _lineIndent = state.lineIndent;\n skipSeparationSpace(state, false, -1);\n\n if (state.lineIndent >= nodeIndent) {\n hasPendingContent = true;\n ch = state.input.charCodeAt(state.position);\n continue;\n } else {\n state.position = captureEnd;\n state.line = _line;\n state.lineStart = _lineStart;\n state.lineIndent = _lineIndent;\n break;\n }\n }\n\n if (hasPendingContent) {\n captureSegment(state, captureStart, captureEnd, false);\n writeFoldedLines(state, state.line - _line);\n captureStart = captureEnd = state.position;\n hasPendingContent = false;\n }\n\n if (!is_WHITE_SPACE(ch)) {\n captureEnd = state.position + 1;\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, captureEnd, false);\n\n if (state.result) {\n return true;\n }\n\n state.kind = _kind;\n state.result = _result;\n return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n var ch,\n captureStart, captureEnd;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x27/* ' */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x27/* ' */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x27/* ' */) {\n captureStart = state.position;\n state.position++;\n captureEnd = state.position;\n } else {\n return true;\n }\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n var captureStart,\n captureEnd,\n hexLength,\n hexResult,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x22/* \" */) {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n state.position++;\n captureStart = captureEnd = state.position;\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n if (ch === 0x22/* \" */) {\n captureSegment(state, captureStart, state.position, true);\n state.position++;\n return true;\n\n } else if (ch === 0x5C/* \\ */) {\n captureSegment(state, captureStart, state.position, true);\n ch = state.input.charCodeAt(++state.position);\n\n if (is_EOL(ch)) {\n skipSeparationSpace(state, false, nodeIndent);\n\n // TODO: rework to inline fn with no type cast?\n } else if (ch < 256 && simpleEscapeCheck[ch]) {\n state.result += simpleEscapeMap[ch];\n state.position++;\n\n } else if ((tmp = escapedHexLen(ch)) > 0) {\n hexLength = tmp;\n hexResult = 0;\n\n for (; hexLength > 0; hexLength--) {\n ch = state.input.charCodeAt(++state.position);\n\n if ((tmp = fromHexCode(ch)) >= 0) {\n hexResult = (hexResult << 4) + tmp;\n\n } else {\n throwError(state, 'expected hexadecimal character');\n }\n }\n\n state.result += charFromCodepoint(hexResult);\n\n state.position++;\n\n } else {\n throwError(state, 'unknown escape sequence');\n }\n\n captureStart = captureEnd = state.position;\n\n } else if (is_EOL(ch)) {\n captureSegment(state, captureStart, captureEnd, true);\n writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n captureStart = captureEnd = state.position;\n\n } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n } else {\n state.position++;\n captureEnd = state.position;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n var readNext = true,\n _line,\n _lineStart,\n _pos,\n _tag = state.tag,\n _result,\n _anchor = state.anchor,\n following,\n terminator,\n isPair,\n isExplicitPair,\n isMapping,\n overridableKeys = Object.create(null),\n keyNode,\n keyTag,\n valueNode,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x5B/* [ */) {\n terminator = 0x5D;/* ] */\n isMapping = false;\n _result = [];\n } else if (ch === 0x7B/* { */) {\n terminator = 0x7D;/* } */\n isMapping = true;\n _result = {};\n } else {\n return false;\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n while (ch !== 0) {\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === terminator) {\n state.position++;\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = isMapping ? 'mapping' : 'sequence';\n state.result = _result;\n return true;\n } else if (!readNext) {\n throwError(state, 'missed comma between flow collection entries');\n } else if (ch === 0x2C/* , */) {\n // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n throwError(state, \"expected the node content, but found ','\");\n }\n\n keyTag = keyNode = valueNode = null;\n isPair = isExplicitPair = false;\n\n if (ch === 0x3F/* ? */) {\n following = state.input.charCodeAt(state.position + 1);\n\n if (is_WS_OR_EOL(following)) {\n isPair = isExplicitPair = true;\n state.position++;\n skipSeparationSpace(state, true, nodeIndent);\n }\n }\n\n _line = state.line; // Save the current line.\n _lineStart = state.lineStart;\n _pos = state.position;\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n keyTag = state.tag;\n keyNode = state.result;\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n isPair = true;\n ch = state.input.charCodeAt(++state.position);\n skipSeparationSpace(state, true, nodeIndent);\n composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n valueNode = state.result;\n }\n\n if (isMapping) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n } else if (isPair) {\n _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n } else {\n _result.push(keyNode);\n }\n\n skipSeparationSpace(state, true, nodeIndent);\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x2C/* , */) {\n readNext = true;\n ch = state.input.charCodeAt(++state.position);\n } else {\n readNext = false;\n }\n }\n\n throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n var captureStart,\n folding,\n chomping = CHOMPING_CLIP,\n didReadContent = false,\n detectedIndent = false,\n textIndent = nodeIndent,\n emptyLines = 0,\n atMoreIndented = false,\n tmp,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch === 0x7C/* | */) {\n folding = false;\n } else if (ch === 0x3E/* > */) {\n folding = true;\n } else {\n return false;\n }\n\n state.kind = 'scalar';\n state.result = '';\n\n while (ch !== 0) {\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n if (CHOMPING_CLIP === chomping) {\n chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n } else {\n throwError(state, 'repeat of a chomping mode identifier');\n }\n\n } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n if (tmp === 0) {\n throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n } else if (!detectedIndent) {\n textIndent = nodeIndent + tmp - 1;\n detectedIndent = true;\n } else {\n throwError(state, 'repeat of an indentation width identifier');\n }\n\n } else {\n break;\n }\n }\n\n if (is_WHITE_SPACE(ch)) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (is_WHITE_SPACE(ch));\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (!is_EOL(ch) && (ch !== 0));\n }\n }\n\n while (ch !== 0) {\n readLineBreak(state);\n state.lineIndent = 0;\n\n ch = state.input.charCodeAt(state.position);\n\n while ((!detectedIndent || state.lineIndent < textIndent) &&\n (ch === 0x20/* Space */)) {\n state.lineIndent++;\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (!detectedIndent && state.lineIndent > textIndent) {\n textIndent = state.lineIndent;\n }\n\n if (is_EOL(ch)) {\n emptyLines++;\n continue;\n }\n\n // End of the scalar.\n if (state.lineIndent < textIndent) {\n\n // Perform the chomping.\n if (chomping === CHOMPING_KEEP) {\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n } else if (chomping === CHOMPING_CLIP) {\n if (didReadContent) { // i.e. only if the scalar is not empty.\n state.result += '\\n';\n }\n }\n\n // Break this `while` cycle and go to the funciton's epilogue.\n break;\n }\n\n // Folded style: use fancy rules to handle line breaks.\n if (folding) {\n\n // Lines starting with white space characters (more-indented lines) are not folded.\n if (is_WHITE_SPACE(ch)) {\n atMoreIndented = true;\n // except for the first content line (cf. Example 8.1)\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n // End of more-indented block.\n } else if (atMoreIndented) {\n atMoreIndented = false;\n state.result += common.repeat('\\n', emptyLines + 1);\n\n // Just one line break - perceive as the same line.\n } else if (emptyLines === 0) {\n if (didReadContent) { // i.e. only if we have already read some scalar content.\n state.result += ' ';\n }\n\n // Several line breaks - perceive as different lines.\n } else {\n state.result += common.repeat('\\n', emptyLines);\n }\n\n // Literal style: just add exact number of line breaks between content lines.\n } else {\n // Keep all line breaks except the header line break.\n state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n }\n\n didReadContent = true;\n detectedIndent = true;\n emptyLines = 0;\n captureStart = state.position;\n\n while (!is_EOL(ch) && (ch !== 0)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n captureSegment(state, captureStart, state.position, false);\n }\n\n return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n var _line,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = [],\n following,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n if (ch !== 0x2D/* - */) {\n break;\n }\n\n following = state.input.charCodeAt(state.position + 1);\n\n if (!is_WS_OR_EOL(following)) {\n break;\n }\n\n detected = true;\n state.position++;\n\n if (skipSeparationSpace(state, true, -1)) {\n if (state.lineIndent <= nodeIndent) {\n _result.push(null);\n ch = state.input.charCodeAt(state.position);\n continue;\n }\n }\n\n _line = state.line;\n composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n _result.push(state.result);\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a sequence entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'sequence';\n state.result = _result;\n return true;\n }\n return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n var following,\n allowCompact,\n _line,\n _keyLine,\n _keyLineStart,\n _keyPos,\n _tag = state.tag,\n _anchor = state.anchor,\n _result = {},\n overridableKeys = Object.create(null),\n keyTag = null,\n keyNode = null,\n valueNode = null,\n atExplicitKey = false,\n detected = false,\n ch;\n\n // there is a leading tab before this token, so it can't be a block sequence/mapping;\n // it can still be flow sequence/mapping or a scalar\n if (state.firstTabInLine !== -1) return false;\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = _result;\n }\n\n ch = state.input.charCodeAt(state.position);\n\n while (ch !== 0) {\n if (!atExplicitKey && state.firstTabInLine !== -1) {\n state.position = state.firstTabInLine;\n throwError(state, 'tab characters must not be used in indentation');\n }\n\n following = state.input.charCodeAt(state.position + 1);\n _line = state.line; // Save the current line.\n\n //\n // Explicit notation case. There are two separate blocks:\n // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n //\n if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n if (ch === 0x3F/* ? */) {\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = true;\n allowCompact = true;\n\n } else if (atExplicitKey) {\n // i.e. 0x3A/* : */ === character after the explicit key.\n atExplicitKey = false;\n allowCompact = true;\n\n } else {\n throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n }\n\n state.position += 1;\n ch = following;\n\n //\n // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n //\n } else {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n\n if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n // Neither implicit nor explicit notation.\n // Reading is done. Go to the epilogue.\n break;\n }\n\n if (state.line === _line) {\n ch = state.input.charCodeAt(state.position);\n\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x3A/* : */) {\n ch = state.input.charCodeAt(++state.position);\n\n if (!is_WS_OR_EOL(ch)) {\n throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n }\n\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n detected = true;\n atExplicitKey = false;\n allowCompact = false;\n keyTag = state.tag;\n keyNode = state.result;\n\n } else if (detected) {\n throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n\n } else if (detected) {\n throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n } else {\n state.tag = _tag;\n state.anchor = _anchor;\n return true; // Keep the result of `composeNode`.\n }\n }\n\n //\n // Common reading code for both explicit and implicit notations.\n //\n if (state.line === _line || state.lineIndent > nodeIndent) {\n if (atExplicitKey) {\n _keyLine = state.line;\n _keyLineStart = state.lineStart;\n _keyPos = state.position;\n }\n\n if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n if (atExplicitKey) {\n keyNode = state.result;\n } else {\n valueNode = state.result;\n }\n }\n\n if (!atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n keyTag = keyNode = valueNode = null;\n }\n\n skipSeparationSpace(state, true, -1);\n ch = state.input.charCodeAt(state.position);\n }\n\n if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n throwError(state, 'bad indentation of a mapping entry');\n } else if (state.lineIndent < nodeIndent) {\n break;\n }\n }\n\n //\n // Epilogue.\n //\n\n // Special case: last mapping's node contains only the key in explicit notation.\n if (atExplicitKey) {\n storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n }\n\n // Expose the resulting mapping.\n if (detected) {\n state.tag = _tag;\n state.anchor = _anchor;\n state.kind = 'mapping';\n state.result = _result;\n }\n\n return detected;\n}\n\nfunction readTagProperty(state) {\n var _position,\n isVerbatim = false,\n isNamed = false,\n tagHandle,\n tagName,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x21/* ! */) return false;\n\n if (state.tag !== null) {\n throwError(state, 'duplication of a tag property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n\n if (ch === 0x3C/* < */) {\n isVerbatim = true;\n ch = state.input.charCodeAt(++state.position);\n\n } else if (ch === 0x21/* ! */) {\n isNamed = true;\n tagHandle = '!!';\n ch = state.input.charCodeAt(++state.position);\n\n } else {\n tagHandle = '!';\n }\n\n _position = state.position;\n\n if (isVerbatim) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && ch !== 0x3E/* > */);\n\n if (state.position < state.length) {\n tagName = state.input.slice(_position, state.position);\n ch = state.input.charCodeAt(++state.position);\n } else {\n throwError(state, 'unexpected end of the stream within a verbatim tag');\n }\n } else {\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n if (ch === 0x21/* ! */) {\n if (!isNamed) {\n tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n throwError(state, 'named tag handle cannot contain such characters');\n }\n\n isNamed = true;\n _position = state.position + 1;\n } else {\n throwError(state, 'tag suffix cannot contain exclamation marks');\n }\n }\n\n ch = state.input.charCodeAt(++state.position);\n }\n\n tagName = state.input.slice(_position, state.position);\n\n if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n throwError(state, 'tag suffix cannot contain flow indicator characters');\n }\n }\n\n if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n throwError(state, 'tag name cannot contain such characters: ' + tagName);\n }\n\n try {\n tagName = decodeURIComponent(tagName);\n } catch (err) {\n throwError(state, 'tag name is malformed: ' + tagName);\n }\n\n if (isVerbatim) {\n state.tag = tagName;\n\n } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n state.tag = state.tagMap[tagHandle] + tagName;\n\n } else if (tagHandle === '!') {\n state.tag = '!' + tagName;\n\n } else if (tagHandle === '!!') {\n state.tag = 'tag:yaml.org,2002:' + tagName;\n\n } else {\n throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n }\n\n return true;\n}\n\nfunction readAnchorProperty(state) {\n var _position,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x26/* & */) return false;\n\n if (state.anchor !== null) {\n throwError(state, 'duplication of an anchor property');\n }\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an anchor node must contain at least one character');\n }\n\n state.anchor = state.input.slice(_position, state.position);\n return true;\n}\n\nfunction readAlias(state) {\n var _position, alias,\n ch;\n\n ch = state.input.charCodeAt(state.position);\n\n if (ch !== 0x2A/* * */) return false;\n\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (state.position === _position) {\n throwError(state, 'name of an alias node must contain at least one character');\n }\n\n alias = state.input.slice(_position, state.position);\n\n if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n throwError(state, 'unidentified alias \"' + alias + '\"');\n }\n\n state.result = state.anchorMap[alias];\n skipSeparationSpace(state, true, -1);\n return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n var allowBlockStyles,\n allowBlockScalars,\n allowBlockCollections,\n indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n }\n }\n\n if (indentStatus === 1) {\n while (readTagProperty(state) || readAnchorProperty(state)) {\n if (skipSeparationSpace(state, true, -1)) {\n atNewLine = true;\n allowBlockCollections = allowBlockStyles;\n\n if (state.lineIndent > parentIndent) {\n indentStatus = 1;\n } else if (state.lineIndent === parentIndent) {\n indentStatus = 0;\n } else if (state.lineIndent < parentIndent) {\n indentStatus = -1;\n }\n } else {\n allowBlockCollections = false;\n }\n }\n }\n\n if (allowBlockCollections) {\n allowBlockCollections = atNewLine || allowCompact;\n }\n\n if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n flowIndent = parentIndent;\n } else {\n flowIndent = parentIndent + 1;\n }\n\n blockIndent = state.position - state.lineStart;\n\n if (indentStatus === 1) {\n if (allowBlockCollections &&\n (readBlockSequence(state, blockIndent) ||\n readBlockMapping(state, blockIndent, flowIndent)) ||\n readFlowCollection(state, flowIndent)) {\n hasContent = true;\n } else {\n if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n readSingleQuotedScalar(state, flowIndent) ||\n readDoubleQuotedScalar(state, flowIndent)) {\n hasContent = true;\n\n } else if (readAlias(state)) {\n hasContent = true;\n\n if (state.tag !== null || state.anchor !== null) {\n throwError(state, 'alias node should not have any properties');\n }\n\n } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n hasContent = true;\n\n if (state.tag === null) {\n state.tag = '?';\n }\n }\n\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n } else if (indentStatus === 0) {\n // Special case: block sequences are allowed to have same indentation level as the parent.\n // http://www.yaml.org/spec/1.2/spec.html#id2799784\n hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n }\n }\n\n if (state.tag === null) {\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n\n } else if (state.tag === '?') {\n // Implicit resolving is not allowed for non-scalar types, and '?'\n // non-specific tag is only automatically assigned to plain scalars.\n //\n // We only need to check kind conformity in case user explicitly assigns '?'\n // tag, for example like this: \"! [0]\"\n //\n if (state.result !== null && state.kind !== 'scalar') {\n throwError(state, 'unacceptable node kind for ! tag; it should be \"scalar\", not \"' + state.kind + '\"');\n }\n\n for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n type = state.implicitTypes[typeIndex];\n\n if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n state.result = type.construct(state.result);\n state.tag = type.tag;\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n break;\n }\n }\n } else if (state.tag !== '!') {\n if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n type = state.typeMap[state.kind || 'fallback'][state.tag];\n } else {\n // looking for multi type\n type = null;\n typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n type = typeList[typeIndex];\n break;\n }\n }\n }\n\n if (!type) {\n throwError(state, 'unknown tag !<' + state.tag + '>');\n }\n\n if (state.result !== null && type.kind !== state.kind) {\n throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n }\n\n if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n } else {\n state.result = type.construct(state.result, state.tag);\n if (state.anchor !== null) {\n state.anchorMap[state.anchor] = state.result;\n }\n }\n }\n\n if (state.listener !== null) {\n state.listener('close', state);\n }\n return state.tag !== null || state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n var documentStart = state.position,\n _position,\n directiveName,\n directiveArgs,\n hasDirectives = false,\n ch;\n\n state.version = null;\n state.checkLineBreaks = state.legacy;\n state.tagMap = Object.create(null);\n state.anchorMap = Object.create(null);\n\n while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n skipSeparationSpace(state, true, -1);\n\n ch = state.input.charCodeAt(state.position);\n\n if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n break;\n }\n\n hasDirectives = true;\n ch = state.input.charCodeAt(++state.position);\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveName = state.input.slice(_position, state.position);\n directiveArgs = [];\n\n if (directiveName.length < 1) {\n throwError(state, 'directive name must not be less than one character in length');\n }\n\n while (ch !== 0) {\n while (is_WHITE_SPACE(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n if (ch === 0x23/* # */) {\n do { ch = state.input.charCodeAt(++state.position); }\n while (ch !== 0 && !is_EOL(ch));\n break;\n }\n\n if (is_EOL(ch)) break;\n\n _position = state.position;\n\n while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n ch = state.input.charCodeAt(++state.position);\n }\n\n directiveArgs.push(state.input.slice(_position, state.position));\n }\n\n if (ch !== 0) readLineBreak(state);\n\n if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n directiveHandlers[directiveName](state, directiveName, directiveArgs);\n } else {\n throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n }\n }\n\n skipSeparationSpace(state, true, -1);\n\n if (state.lineIndent === 0 &&\n state.input.charCodeAt(state.position) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n\n } else if (hasDirectives) {\n throwError(state, 'directives end mark is expected');\n }\n\n composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n skipSeparationSpace(state, true, -1);\n\n if (state.checkLineBreaks &&\n PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n }\n\n state.documents.push(state.result);\n\n if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n state.position += 3;\n skipSeparationSpace(state, true, -1);\n }\n return;\n }\n\n if (state.position < (state.length - 1)) {\n throwError(state, 'end of the stream or a document separator is expected');\n } else {\n return;\n }\n}\n\n\nfunction loadDocuments(input, options) {\n input = String(input);\n options = options || {};\n\n if (input.length !== 0) {\n\n // Add tailing `\\n` if not exists\n if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n input += '\\n';\n }\n\n // Strip BOM\n if (input.charCodeAt(0) === 0xFEFF) {\n input = input.slice(1);\n }\n }\n\n var state = new State$1(input, options);\n\n var nullpos = input.indexOf('\\0');\n\n if (nullpos !== -1) {\n state.position = nullpos;\n throwError(state, 'null byte is not allowed in input');\n }\n\n // Use 0 as string terminator. That significantly simplifies bounds check.\n state.input += '\\0';\n\n while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n state.lineIndent += 1;\n state.position += 1;\n }\n\n while (state.position < (state.length - 1)) {\n readDocument(state);\n }\n\n return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n options = iterator;\n iterator = null;\n }\n\n var documents = loadDocuments(input, options);\n\n if (typeof iterator !== 'function') {\n return documents;\n }\n\n for (var index = 0, length = documents.length; index < length; index += 1) {\n iterator(documents[index]);\n }\n}\n\n\nfunction load$1(input, options) {\n var documents = loadDocuments(input, options);\n\n if (documents.length === 0) {\n /*eslint-disable no-undefined*/\n return undefined;\n } else if (documents.length === 1) {\n return documents[0];\n }\n throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1 = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM = 0xFEFF;\nvar CHAR_TAB = 0x09; /* Tab */\nvar CHAR_LINE_FEED = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN = 0x0D; /* CR */\nvar CHAR_SPACE = 0x20; /* Space */\nvar CHAR_EXCLAMATION = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE = 0x22; /* \" */\nvar CHAR_SHARP = 0x23; /* # */\nvar CHAR_PERCENT = 0x25; /* % */\nvar CHAR_AMPERSAND = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE = 0x27; /* ' */\nvar CHAR_ASTERISK = 0x2A; /* * */\nvar CHAR_COMMA = 0x2C; /* , */\nvar CHAR_MINUS = 0x2D; /* - */\nvar CHAR_COLON = 0x3A; /* : */\nvar CHAR_EQUALS = 0x3D; /* = */\nvar CHAR_GREATER_THAN = 0x3E; /* > */\nvar CHAR_QUESTION = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00] = '\\\\0';\nESCAPE_SEQUENCES[0x07] = '\\\\a';\nESCAPE_SEQUENCES[0x08] = '\\\\b';\nESCAPE_SEQUENCES[0x09] = '\\\\t';\nESCAPE_SEQUENCES[0x0A] = '\\\\n';\nESCAPE_SEQUENCES[0x0B] = '\\\\v';\nESCAPE_SEQUENCES[0x0C] = '\\\\f';\nESCAPE_SEQUENCES[0x0D] = '\\\\r';\nESCAPE_SEQUENCES[0x1B] = '\\\\e';\nESCAPE_SEQUENCES[0x22] = '\\\\\"';\nESCAPE_SEQUENCES[0x5C] = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85] = '\\\\N';\nESCAPE_SEQUENCES[0xA0] = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n 'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n 'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n var result, keys, index, length, tag, style, type;\n\n if (map === null) return {};\n\n result = {};\n keys = Object.keys(map);\n\n for (index = 0, length = keys.length; index < length; index += 1) {\n tag = keys[index];\n style = String(map[tag]);\n\n if (tag.slice(0, 2) === '!!') {\n tag = 'tag:yaml.org,2002:' + tag.slice(2);\n }\n type = schema.compiledTypeMap['fallback'][tag];\n\n if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n style = type.styleAliases[style];\n }\n\n result[tag] = style;\n }\n\n return result;\n}\n\nfunction encodeHex(character) {\n var string, handle, length;\n\n string = character.toString(16).toUpperCase();\n\n if (character <= 0xFF) {\n handle = 'x';\n length = 2;\n } else if (character <= 0xFFFF) {\n handle = 'u';\n length = 4;\n } else if (character <= 0xFFFFFFFF) {\n handle = 'U';\n length = 8;\n } else {\n throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n }\n\n return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n this.schema = options['schema'] || _default;\n this.indent = Math.max(1, (options['indent'] || 2));\n this.noArrayIndent = options['noArrayIndent'] || false;\n this.skipInvalid = options['skipInvalid'] || false;\n this.flowLevel = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n this.styleMap = compileStyleMap(this.schema, options['styles'] || null);\n this.sortKeys = options['sortKeys'] || false;\n this.lineWidth = options['lineWidth'] || 80;\n this.noRefs = options['noRefs'] || false;\n this.noCompatMode = options['noCompatMode'] || false;\n this.condenseFlow = options['condenseFlow'] || false;\n this.quotingType = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n this.forceQuotes = options['forceQuotes'] || false;\n this.replacer = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n this.implicitTypes = this.schema.compiledImplicit;\n this.explicitTypes = this.schema.compiledExplicit;\n\n this.tag = null;\n this.result = '';\n\n this.duplicates = [];\n this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n var ind = common.repeat(' ', spaces),\n position = 0,\n next = -1,\n result = '',\n line,\n length = string.length;\n\n while (position < length) {\n next = string.indexOf('\\n', position);\n if (next === -1) {\n line = string.slice(position);\n position = length;\n } else {\n line = string.slice(position, next + 1);\n position = next + 1;\n }\n\n if (line.length && line !== '\\n') result += ind;\n\n result += line;\n }\n\n return result;\n}\n\nfunction generateNextLine(state, level) {\n return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n var index, length, type;\n\n for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n type = state.implicitTypes[index];\n\n if (type.resolve(str)) {\n return true;\n }\n }\n\n return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n return (0x00020 <= c && c <= 0x00007E)\n || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n || (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n return isPrintable(c)\n && c !== CHAR_BOM\n // - b-char\n && c !== CHAR_CARRIAGE_RETURN\n && c !== CHAR_LINE_FEED;\n}\n\n// [127] ns-plain-safe(c) ::= c = flow-out ⇒ ns-plain-safe-out\n// c = flow-in ⇒ ns-plain-safe-in\n// c = block-key ⇒ ns-plain-safe-out\n// c = flow-key ⇒ ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129] ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130] ns-plain-char(c) ::= ( ns-plain-safe(c) - “:” - “#” )\n// | ( /* An ns-char preceding */ “#” )\n// | ( “:” /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n return (\n // ns-plain-safe\n inblock ? // c = flow-in\n cIsNsCharOrWhitespace\n : cIsNsCharOrWhitespace\n // - c-flow-indicator\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n )\n // ns-plain-char\n && c !== CHAR_SHARP // false on '#'\n && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n // Uses a subset of ns-char - c-indicator\n // where ns-char = nb-char - s-white.\n // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n return isPrintable(c) && c !== CHAR_BOM\n && !isWhitespace(c) // - s-white\n // - (c-indicator ::=\n // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n && c !== CHAR_MINUS\n && c !== CHAR_QUESTION\n && c !== CHAR_COLON\n && c !== CHAR_COMMA\n && c !== CHAR_LEFT_SQUARE_BRACKET\n && c !== CHAR_RIGHT_SQUARE_BRACKET\n && c !== CHAR_LEFT_CURLY_BRACKET\n && c !== CHAR_RIGHT_CURLY_BRACKET\n // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n && c !== CHAR_SHARP\n && c !== CHAR_AMPERSAND\n && c !== CHAR_ASTERISK\n && c !== CHAR_EXCLAMATION\n && c !== CHAR_VERTICAL_LINE\n && c !== CHAR_EQUALS\n && c !== CHAR_GREATER_THAN\n && c !== CHAR_SINGLE_QUOTE\n && c !== CHAR_DOUBLE_QUOTE\n // | “%” | “@” | “`”)\n && c !== CHAR_PERCENT\n && c !== CHAR_COMMERCIAL_AT\n && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n // just not whitespace or colon, it will be checked to be plain character later\n return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n var first = string.charCodeAt(pos), second;\n if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n second = string.charCodeAt(pos + 1);\n if (second >= 0xDC00 && second <= 0xDFFF) {\n // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n }\n }\n return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n var leadingSpaceRe = /^\\n* /;\n return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN = 1,\n STYLE_SINGLE = 2,\n STYLE_LITERAL = 3,\n STYLE_FOLDED = 4,\n STYLE_DOUBLE = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n// STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n// STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n// STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n var i;\n var char = 0;\n var prevChar = null;\n var hasLineBreak = false;\n var hasFoldableLine = false; // only checked if shouldTrackWidth\n var shouldTrackWidth = lineWidth !== -1;\n var previousLineBreak = -1; // count the first line correctly\n var plain = isPlainSafeFirst(codePointAt(string, 0))\n && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n if (singleLineOnly || forceQuotes) {\n // Case: no block styles.\n // Check for disallowed characters to rule out plain and single.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n } else {\n // Case: block styles permitted.\n for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n if (char === CHAR_LINE_FEED) {\n hasLineBreak = true;\n // Check if any line can be folded.\n if (shouldTrackWidth) {\n hasFoldableLine = hasFoldableLine ||\n // Foldable line = too long, and not more-indented.\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' ');\n previousLineBreak = i;\n }\n } else if (!isPrintable(char)) {\n return STYLE_DOUBLE;\n }\n plain = plain && isPlainSafe(char, prevChar, inblock);\n prevChar = char;\n }\n // in case the end is missing a \\n\n hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n (i - previousLineBreak - 1 > lineWidth &&\n string[previousLineBreak + 1] !== ' '));\n }\n // Although every style can represent \\n without escaping, prefer block styles\n // for multiline, since they're more readable and they don't add empty lines.\n // Also prefer folding a super-long line.\n if (!hasLineBreak && !hasFoldableLine) {\n // Strings interpretable as another type have to be quoted;\n // e.g. the string 'true' vs. the boolean true.\n if (plain && !forceQuotes && !testAmbiguousType(string)) {\n return STYLE_PLAIN;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n }\n // Edge case: block indentation indicator can only have one digit.\n if (indentPerLevel > 9 && needIndentIndicator(string)) {\n return STYLE_DOUBLE;\n }\n // At this point we know block styles are valid.\n // Prefer literal style unless we want to fold.\n if (!forceQuotes) {\n return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n }\n return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n// since the dumper adds its own newline. This always works:\n// • No ending newline => unaffected; already using strip \"-\" chomping.\n// • Ending newline => removed then restored.\n// Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n state.dump = (function () {\n if (string.length === 0) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n }\n if (!state.noCompatMode) {\n if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n }\n }\n\n var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n // As indentation gets deeper, let the width decrease monotonically\n // to the lower bound min(state.lineWidth, 40).\n // Note that this implies\n // state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n // state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n // This behaves better than a constant minimum width which disallows narrower options,\n // or an indent threshold which causes the width to suddenly increase.\n var lineWidth = state.lineWidth === -1\n ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n // Without knowing if keys are implicit/explicit, assume implicit for safety.\n var singleLineOnly = iskey\n // No block styles in flow mode.\n || (state.flowLevel > -1 && level >= state.flowLevel);\n function testAmbiguity(string) {\n return testImplicitResolving(state, string);\n }\n\n switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n case STYLE_PLAIN:\n return string;\n case STYLE_SINGLE:\n return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n case STYLE_LITERAL:\n return '|' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(string, indent));\n case STYLE_FOLDED:\n return '>' + blockHeader(string, state.indent)\n + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n case STYLE_DOUBLE:\n return '\"' + escapeString(string) + '\"';\n default:\n throw new exception('impossible error: invalid scalar style');\n }\n }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n var clip = string[string.length - 1] === '\\n';\n var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n var chomp = keep ? '+' : (clip ? '' : '-');\n\n return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n // unless they're before or after a more-indented line, or at the very\n // beginning or end, in which case $k$ maps to $k$.\n // Therefore, parse each chunk as newline(s) followed by a content line.\n var lineRe = /(\\n+)([^\\n]*)/g;\n\n // first line (possibly an empty line)\n var result = (function () {\n var nextLF = string.indexOf('\\n');\n nextLF = nextLF !== -1 ? nextLF : string.length;\n lineRe.lastIndex = nextLF;\n return foldLine(string.slice(0, nextLF), width);\n }());\n // If we haven't reached the first content line yet, don't add an extra \\n.\n var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n var moreIndented;\n\n // rest of the lines\n var match;\n while ((match = lineRe.exec(string))) {\n var prefix = match[1], line = match[2];\n moreIndented = (line[0] === ' ');\n result += prefix\n + (!prevMoreIndented && !moreIndented && line !== ''\n ? '\\n' : '')\n + foldLine(line, width);\n prevMoreIndented = moreIndented;\n }\n\n return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n if (line === '' || line[0] === ' ') return line;\n\n // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n var match;\n // start is an inclusive index. end, curr, and next are exclusive.\n var start = 0, end, curr = 0, next = 0;\n var result = '';\n\n // Invariants: 0 <= start <= length-1.\n // 0 <= curr <= next <= max(0, length-2). curr - start <= width.\n // Inside the loop:\n // A match implies length >= 2, so curr and next are <= length-2.\n while ((match = breakRe.exec(line))) {\n next = match.index;\n // maintain invariant: curr - start <= width\n if (next - start > width) {\n end = (curr > start) ? curr : next; // derive end <= length-2\n result += '\\n' + line.slice(start, end);\n // skip the space that was output as \\n\n start = end + 1; // derive start <= length-1\n }\n curr = next;\n }\n\n // By the invariants, start <= length-1, so there is something left over.\n // It is either the whole string or a part starting from non-whitespace.\n result += '\\n';\n // Insert a break if the remainder is too long and there is a break available.\n if (line.length - start > width && curr > start) {\n result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n } else {\n result += line.slice(start);\n }\n\n return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n var result = '';\n var char = 0;\n var escapeSeq;\n\n for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n char = codePointAt(string, i);\n escapeSeq = ESCAPE_SEQUENCES[char];\n\n if (!escapeSeq && isPrintable(char)) {\n result += string[i];\n if (char >= 0x10000) result += string[i + 1];\n } else {\n result += escapeSeq || encodeHex(char);\n }\n }\n\n return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level, value, false, false) ||\n (typeof value === 'undefined' &&\n writeNode(state, level, null, false, false))) {\n\n if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n index,\n length,\n value;\n\n for (index = 0, length = object.length; index < length; index += 1) {\n value = object[index];\n\n if (state.replacer) {\n value = state.replacer.call(object, String(index), value);\n }\n\n // Write only valid elements, put null instead of invalid elements.\n if (writeNode(state, level + 1, value, true, true, false, true) ||\n (typeof value === 'undefined' &&\n writeNode(state, level + 1, null, true, true, false, true))) {\n\n if (!compact || _result !== '') {\n _result += generateNextLine(state, level);\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n _result += '-';\n } else {\n _result += '- ';\n }\n\n _result += state.dump;\n }\n }\n\n state.tag = _tag;\n state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n pairBuffer;\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n pairBuffer = '';\n if (_result !== '') pairBuffer += ', ';\n\n if (state.condenseFlow) pairBuffer += '\"';\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level, objectKey, false, false)) {\n continue; // Skip this pair because of invalid key;\n }\n\n if (state.dump.length > 1024) pairBuffer += '? ';\n\n pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n if (!writeNode(state, level, objectValue, false, false)) {\n continue; // Skip this pair because of invalid value.\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n var _result = '',\n _tag = state.tag,\n objectKeyList = Object.keys(object),\n index,\n length,\n objectKey,\n objectValue,\n explicitPair,\n pairBuffer;\n\n // Allow sorting keys so that the output file is deterministic\n if (state.sortKeys === true) {\n // Default sorting\n objectKeyList.sort();\n } else if (typeof state.sortKeys === 'function') {\n // Custom sort function\n objectKeyList.sort(state.sortKeys);\n } else if (state.sortKeys) {\n // Something is wrong\n throw new exception('sortKeys must be a boolean or a function');\n }\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n pairBuffer = '';\n\n if (!compact || _result !== '') {\n pairBuffer += generateNextLine(state, level);\n }\n\n objectKey = objectKeyList[index];\n objectValue = object[objectKey];\n\n if (state.replacer) {\n objectValue = state.replacer.call(object, objectKey, objectValue);\n }\n\n if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n continue; // Skip this pair because of invalid key.\n }\n\n explicitPair = (state.tag !== null && state.tag !== '?') ||\n (state.dump && state.dump.length > 1024);\n\n if (explicitPair) {\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += '?';\n } else {\n pairBuffer += '? ';\n }\n }\n\n pairBuffer += state.dump;\n\n if (explicitPair) {\n pairBuffer += generateNextLine(state, level);\n }\n\n if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n continue; // Skip this pair because of invalid value.\n }\n\n if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n pairBuffer += ':';\n } else {\n pairBuffer += ': ';\n }\n\n pairBuffer += state.dump;\n\n // Both key and value are valid.\n _result += pairBuffer;\n }\n\n state.tag = _tag;\n state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n var _result, typeList, index, length, type, style;\n\n typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n for (index = 0, length = typeList.length; index < length; index += 1) {\n type = typeList[index];\n\n if ((type.instanceOf || type.predicate) &&\n (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n (!type.predicate || type.predicate(object))) {\n\n if (explicit) {\n if (type.multi && type.representName) {\n state.tag = type.representName(object);\n } else {\n state.tag = type.tag;\n }\n } else {\n state.tag = '?';\n }\n\n if (type.represent) {\n style = state.styleMap[type.tag] || type.defaultStyle;\n\n if (_toString.call(type.represent) === '[object Function]') {\n _result = type.represent(object, style);\n } else if (_hasOwnProperty.call(type.represent, style)) {\n _result = type.represent[style](object, style);\n } else {\n throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n }\n\n state.dump = _result;\n }\n\n return true;\n }\n }\n\n return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n state.tag = null;\n state.dump = object;\n\n if (!detectType(state, object, false)) {\n detectType(state, object, true);\n }\n\n var type = _toString.call(state.dump);\n var inblock = block;\n var tagStr;\n\n if (block) {\n block = (state.flowLevel < 0 || state.flowLevel > level);\n }\n\n var objectOrArray = type === '[object Object]' || type === '[object Array]',\n duplicateIndex,\n duplicate;\n\n if (objectOrArray) {\n duplicateIndex = state.duplicates.indexOf(object);\n duplicate = duplicateIndex !== -1;\n }\n\n if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n compact = false;\n }\n\n if (duplicate && state.usedDuplicates[duplicateIndex]) {\n state.dump = '*ref_' + duplicateIndex;\n } else {\n if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n state.usedDuplicates[duplicateIndex] = true;\n }\n if (type === '[object Object]') {\n if (block && (Object.keys(state.dump).length !== 0)) {\n writeBlockMapping(state, level, state.dump, compact);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowMapping(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object Array]') {\n if (block && (state.dump.length !== 0)) {\n if (state.noArrayIndent && !isblockseq && level > 0) {\n writeBlockSequence(state, level - 1, state.dump, compact);\n } else {\n writeBlockSequence(state, level, state.dump, compact);\n }\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + state.dump;\n }\n } else {\n writeFlowSequence(state, level, state.dump);\n if (duplicate) {\n state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n }\n }\n } else if (type === '[object String]') {\n if (state.tag !== '?') {\n writeScalar(state, state.dump, level, iskey, inblock);\n }\n } else if (type === '[object Undefined]') {\n return false;\n } else {\n if (state.skipInvalid) return false;\n throw new exception('unacceptable kind of an object to dump ' + type);\n }\n\n if (state.tag !== null && state.tag !== '?') {\n // Need to encode all characters except those allowed by the spec:\n //\n // [35] ns-dec-digit ::= [#x30-#x39] /* 0-9 */\n // [36] ns-hex-digit ::= ns-dec-digit\n // | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n // [37] ns-ascii-letter ::= [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n // [38] ns-word-char ::= ns-dec-digit | ns-ascii-letter | “-”\n // [39] ns-uri-char ::= “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”\n // | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”\n // | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”\n //\n // Also need to encode '!' because it has special meaning (end of tag prefix).\n //\n tagStr = encodeURI(\n state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n ).replace(/!/g, '%21');\n\n if (state.tag[0] === '!') {\n tagStr = '!' + tagStr;\n } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n tagStr = '!!' + tagStr.slice(18);\n } else {\n tagStr = '!<' + tagStr + '>';\n }\n\n state.dump = tagStr + ' ' + state.dump;\n }\n }\n\n return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n var objects = [],\n duplicatesIndexes = [],\n index,\n length;\n\n inspectNode(object, objects, duplicatesIndexes);\n\n for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n state.duplicates.push(objects[duplicatesIndexes[index]]);\n }\n state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n var objectKeyList,\n index,\n length;\n\n if (object !== null && typeof object === 'object') {\n index = objects.indexOf(object);\n if (index !== -1) {\n if (duplicatesIndexes.indexOf(index) === -1) {\n duplicatesIndexes.push(index);\n }\n } else {\n objects.push(object);\n\n if (Array.isArray(object)) {\n for (index = 0, length = object.length; index < length; index += 1) {\n inspectNode(object[index], objects, duplicatesIndexes);\n }\n } else {\n objectKeyList = Object.keys(object);\n\n for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n }\n }\n }\n }\n}\n\nfunction dump$1(input, options) {\n options = options || {};\n\n var state = new State(options);\n\n if (!state.noRefs) getDuplicateReferences(input, state);\n\n var value = input;\n\n if (state.replacer) {\n value = state.replacer.call({ '': value }, '', value);\n }\n\n if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n return function () {\n throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n 'Use yaml.' + to + ' instead, which is now safe by default.');\n };\n}\n\n\nvar Type = type;\nvar Schema = schema;\nvar FAILSAFE_SCHEMA = failsafe;\nvar JSON_SCHEMA = json;\nvar CORE_SCHEMA = core;\nvar DEFAULT_SCHEMA = _default;\nvar load = loader.load;\nvar loadAll = loader.loadAll;\nvar dump = dumper.dump;\nvar YAMLException = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n binary: binary,\n float: float,\n map: map,\n null: _null,\n pairs: pairs,\n set: set,\n timestamp: timestamp,\n bool: bool,\n int: int,\n merge: merge,\n omap: omap,\n seq: seq,\n str: str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad = renamed('safeLoad', 'load');\nvar safeLoadAll = renamed('safeLoadAll', 'loadAll');\nvar safeDump = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport default jsYaml;\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n","\n\n","/*!\n * jQuery JavaScript Library v3.6.4\n * https://jquery.com/\n *\n * Includes Sizzle.js\n * https://sizzlejs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2023-03-08T15:28Z\n */\n( function( global, factory ) {\n\n\t\"use strict\";\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket trac-14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n} )( typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1\n// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode\n// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common\n// enough that all such attempts are guarded in a try block.\n\"use strict\";\n\nvar arr = [];\n\nvar getProto = Object.getPrototypeOf;\n\nvar slice = arr.slice;\n\nvar flat = arr.flat ? function( array ) {\n\treturn arr.flat.call( array );\n} : function( array ) {\n\treturn arr.concat.apply( [], array );\n};\n\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar fnToString = hasOwn.toString;\n\nvar ObjectFunctionString = fnToString.call( Object );\n\nvar support = {};\n\nvar isFunction = function isFunction( obj ) {\n\n\t\t// Support: Chrome <=57, Firefox <=52\n\t\t// In some browsers, typeof returns \"function\" for HTML elements\n\t\t// (i.e., `typeof document.createElement( \"object\" ) === \"function\"`).\n\t\t// We don't want to classify *any* DOM node as a function.\n\t\t// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5\n\t\t// Plus for old WebKit, typeof returns \"function\" for HTML collections\n\t\t// (e.g., `typeof document.getElementsByTagName(\"div\") === \"function\"`). (gh-4756)\n\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\" &&\n\t\t\ttypeof obj.item !== \"function\";\n\t};\n\n\nvar isWindow = function isWindow( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t};\n\n\nvar document = window.document;\n\n\n\n\tvar preservedScriptAttributes = {\n\t\ttype: true,\n\t\tsrc: true,\n\t\tnonce: true,\n\t\tnoModule: true\n\t};\n\n\tfunction DOMEval( code, node, doc ) {\n\t\tdoc = doc || document;\n\n\t\tvar i, val,\n\t\t\tscript = doc.createElement( \"script\" );\n\n\t\tscript.text = code;\n\t\tif ( node ) {\n\t\t\tfor ( i in preservedScriptAttributes ) {\n\n\t\t\t\t// Support: Firefox 64+, Edge 18+\n\t\t\t\t// Some browsers don't support the \"nonce\" property on scripts.\n\t\t\t\t// On the other hand, just using `getAttribute` is not enough as\n\t\t\t\t// the `nonce` attribute is reset to an empty string whenever it\n\t\t\t\t// becomes browsing-context connected.\n\t\t\t\t// See https://github.com/whatwg/html/issues/2369\n\t\t\t\t// See https://html.spec.whatwg.org/#nonce-attributes\n\t\t\t\t// The `node.getAttribute` check was added for the sake of\n\t\t\t\t// `jQuery.globalEval` so that it can fake a nonce-containing node\n\t\t\t\t// via an object.\n\t\t\t\tval = node[ i ] || node.getAttribute && node.getAttribute( i );\n\t\t\t\tif ( val ) {\n\t\t\t\t\tscript.setAttribute( i, val );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdoc.head.appendChild( script ).parentNode.removeChild( script );\n\t}\n\n\nfunction toType( obj ) {\n\tif ( obj == null ) {\n\t\treturn obj + \"\";\n\t}\n\n\t// Support: Android <=2.3 only (functionish RegExp)\n\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\tclass2type[ toString.call( obj ) ] || \"object\" :\n\t\ttypeof obj;\n}\n/* global Symbol */\n// Defining this global in .eslintrc.json would create a danger of using the global\n// unguarded in another place, it seems safer to define global only for this module\n\n\n\nvar\n\tversion = \"3.6.4\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t};\n\njQuery.fn = jQuery.prototype = {\n\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\n\t\t// Return all the elements in a clean array\n\t\tif ( num == null ) {\n\t\t\treturn slice.call( this );\n\t\t}\n\n\t\t// Return just the one element from the set\n\t\treturn num < 0 ? this[ num + this.length ] : this[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\teach: function( callback ) {\n\t\treturn jQuery.each( this, callback );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map( this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t} ) );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teven: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn ( i + 1 ) % 2;\n\t\t} ) );\n\t},\n\n\todd: function() {\n\t\treturn this.pushStack( jQuery.grep( this, function( _elem, i ) {\n\t\t\treturn i % 2;\n\t\t} ) );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor();\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[ 0 ] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !isFunction( target ) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\n\t\t// Only deal with non-null/undefined values\n\t\tif ( ( options = arguments[ i ] ) != null ) {\n\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent Object.prototype pollution\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( name === \"__proto__\" || target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject( copy ) ||\n\t\t\t\t\t( copyIsArray = Array.isArray( copy ) ) ) ) {\n\t\t\t\t\tsrc = target[ name ];\n\n\t\t\t\t\t// Ensure proper type for the source value\n\t\t\t\t\tif ( copyIsArray && !Array.isArray( src ) ) {\n\t\t\t\t\t\tclone = [];\n\t\t\t\t\t} else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) {\n\t\t\t\t\t\tclone = {};\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src;\n\t\t\t\t\t}\n\t\t\t\t\tcopyIsArray = false;\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend( {\n\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisPlainObject: function( obj ) {\n\t\tvar proto, Ctor;\n\n\t\t// Detect obvious negatives\n\t\t// Use toString instead of jQuery.type to catch host objects\n\t\tif ( !obj || toString.call( obj ) !== \"[object Object]\" ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tproto = getProto( obj );\n\n\t\t// Objects with no prototype (e.g., `Object.create( null )`) are plain\n\t\tif ( !proto ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Objects with prototype are plain iff they were constructed by a global Object function\n\t\tCtor = hasOwn.call( proto, \"constructor\" ) && proto.constructor;\n\t\treturn typeof Ctor === \"function\" && fnToString.call( Ctor ) === ObjectFunctionString;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\t// Evaluates a script in a provided context; falls back to the global one\n\t// if not specified.\n\tglobalEval: function( code, options, doc ) {\n\t\tDOMEval( code, { nonce: options && options.nonce }, doc );\n\t},\n\n\teach: function( obj, callback ) {\n\t\tvar length, i = 0;\n\n\t\tif ( isArrayLike( obj ) ) {\n\t\t\tlength = obj.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor ( i in obj ) {\n\t\t\t\tif ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArrayLike( Object( arr ) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\t// Support: Android <=4.0 only, PhantomJS 1 only\n\t// push.apply(_, arraylike) throws on ancient WebKit\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar length, value,\n\t\t\ti = 0,\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArrayLike( elems ) ) {\n\t\t\tlength = elems.length;\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn flat( ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n} );\n\nif ( typeof Symbol === \"function\" ) {\n\tjQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];\n}\n\n// Populate the class2type map\njQuery.each( \"Boolean Number String Function Array Date RegExp Object Error Symbol\".split( \" \" ),\n\tfunction( _i, name ) {\n\t\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n\t} );\n\nfunction isArrayLike( obj ) {\n\n\t// Support: real iOS 8.2 only (not reproducible in simulator)\n\t// `in` check used to prevent JIT error (gh-2145)\n\t// hasOwn isn't used here due to false negatives\n\t// regarding Nodelist length in IE\n\tvar length = !!obj && \"length\" in obj && obj.length,\n\t\ttype = toType( obj );\n\n\tif ( isFunction( obj ) || isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.3.10\n * https://sizzlejs.com/\n *\n * Copyright JS Foundation and other contributors\n * Released under the MIT license\n * https://js.foundation/\n *\n * Date: 2023-02-14\n */\n( function( window ) {\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tnonnativeSelectorCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// Instance methods\n\thasOwn = ( {} ).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpushNative = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\n\t// Use a stripped-down indexOf as it's faster than native\n\t// https://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[ i ] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|\" +\n\t\t\"ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\n\t// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram\n\tidentifier = \"(?:\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace +\n\t\t\"?|\\\\\\\\[^\\\\r\\\\n\\\\f]|[\\\\w-]|[^\\0-\\\\x7f])+\",\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + identifier + \")(?:\" + whitespace +\n\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\n\t\t// \"Attribute values must be CSS identifiers [capture 5]\n\t\t// or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" +\n\t\twhitespace + \"*\\\\]\",\n\n\tpseudos = \":(\" + identifier + \")(?:\\\\((\" +\n\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" +\n\t\twhitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trleadingCombinator = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace +\n\t\t\"*\" ),\n\trdescend = new RegExp( whitespace + \"|>\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + identifier + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + identifier + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + identifier + \"|[*])\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" +\n\t\t\twhitespace + \"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" +\n\t\t\twhitespace + \"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace +\n\t\t\t\"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" + whitespace +\n\t\t\t\"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trhtml = /HTML$/i,\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\n\t// CSS escapes\n\t// http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\[\\\\da-fA-F]{1,6}\" + whitespace + \"?|\\\\\\\\([^\\\\r\\\\n\\\\f])\", \"g\" ),\n\tfunescape = function( escape, nonHex ) {\n\t\tvar high = \"0x\" + escape.slice( 1 ) - 0x10000;\n\n\t\treturn nonHex ?\n\n\t\t\t// Strip the backslash prefix from a non-hex escape sequence\n\t\t\tnonHex :\n\n\t\t\t// Replace a hexadecimal escape sequence with the encoded Unicode code point\n\t\t\t// Support: IE <=11+\n\t\t\t// For values outside the Basic Multilingual Plane (BMP), manually construct a\n\t\t\t// surrogate pair\n\t\t\thigh < 0 ?\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// CSS string/identifier serialization\n\t// https://drafts.csswg.org/cssom/#common-serializing-idioms\n\trcssescape = /([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\0-\\x1f\\x7f-\\uFFFF\\w-]/g,\n\tfcssescape = function( ch, asCodePoint ) {\n\t\tif ( asCodePoint ) {\n\n\t\t\t// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n\t\t\tif ( ch === \"\\0\" ) {\n\t\t\t\treturn \"\\uFFFD\";\n\t\t\t}\n\n\t\t\t// Control characters and (dependent upon position) numbers get escaped as code points\n\t\t\treturn ch.slice( 0, -1 ) + \"\\\\\" +\n\t\t\t\tch.charCodeAt( ch.length - 1 ).toString( 16 ) + \" \";\n\t\t}\n\n\t\t// Other potentially-special ASCII characters get backslash-escaped\n\t\treturn \"\\\\\" + ch;\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t},\n\n\tinDisabledFieldset = addCombinator(\n\t\tfunction( elem ) {\n\t\t\treturn elem.disabled === true && elem.nodeName.toLowerCase() === \"fieldset\";\n\t\t},\n\t\t{ dir: \"parentNode\", next: \"legend\" }\n\t);\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t( arr = slice.call( preferredDoc.childNodes ) ),\n\t\tpreferredDoc.childNodes\n\t);\n\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\t// eslint-disable-next-line no-unused-expressions\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpushNative.apply( target, slice.call( els ) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( ( target[ j++ ] = els[ i++ ] ) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar m, i, elem, nid, match, groups, newSelector,\n\t\tnewContext = context && context.ownerDocument,\n\n\t\t// nodeType defaults to 9, since context defaults to document\n\t\tnodeType = context ? context.nodeType : 9;\n\n\tresults = results || [];\n\n\t// Return early from calls with invalid selector or context\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\t// Try to shortcut find operations (as opposed to filters) in HTML documents\n\tif ( !seed ) {\n\t\tsetDocument( context );\n\t\tcontext = context || document;\n\n\t\tif ( documentIsHTML ) {\n\n\t\t\t// If the selector is sufficiently simple, try using a \"get*By*\" DOM method\n\t\t\t// (excepting DocumentFragment context, where the methods don't exist)\n\t\t\tif ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) {\n\n\t\t\t\t// ID selector\n\t\t\t\tif ( ( m = match[ 1 ] ) ) {\n\n\t\t\t\t\t// Document context\n\t\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\t\tif ( ( elem = context.getElementById( m ) ) ) {\n\n\t\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// Element context\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t// Support: IE, Opera, Webkit\n\t\t\t\t\t\t// TODO: identify versions\n\t\t\t\t\t\t// getElementById can match elements by name instead of ID\n\t\t\t\t\t\tif ( newContext && ( elem = newContext.getElementById( m ) ) &&\n\t\t\t\t\t\t\tcontains( context, elem ) &&\n\t\t\t\t\t\t\telem.id === m ) {\n\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Type selector\n\t\t\t\t} else if ( match[ 2 ] ) {\n\t\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\t\treturn results;\n\n\t\t\t\t// Class selector\n\t\t\t\t} else if ( ( m = match[ 3 ] ) && support.getElementsByClassName &&\n\t\t\t\t\tcontext.getElementsByClassName ) {\n\n\t\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\t\treturn results;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Take advantage of querySelectorAll\n\t\t\tif ( support.qsa &&\n\t\t\t\t!nonnativeSelectorCache[ selector + \" \" ] &&\n\t\t\t\t( !rbuggyQSA || !rbuggyQSA.test( selector ) ) &&\n\n\t\t\t\t// Support: IE 8 only\n\t\t\t\t// Exclude object elements\n\t\t\t\t( nodeType !== 1 || context.nodeName.toLowerCase() !== \"object\" ) ) {\n\n\t\t\t\tnewSelector = selector;\n\t\t\t\tnewContext = context;\n\n\t\t\t\t// qSA considers elements outside a scoping root when evaluating child or\n\t\t\t\t// descendant combinators, which is not what we want.\n\t\t\t\t// In such cases, we work around the behavior by prefixing every selector in the\n\t\t\t\t// list with an ID selector referencing the scope context.\n\t\t\t\t// The technique has to be used as well when a leading combinator is used\n\t\t\t\t// as such selectors are not recognized by querySelectorAll.\n\t\t\t\t// Thanks to Andrew Dupont for this technique.\n\t\t\t\tif ( nodeType === 1 &&\n\t\t\t\t\t( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {\n\n\t\t\t\t\t// Expand context for sibling selectors\n\t\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) ||\n\t\t\t\t\t\tcontext;\n\n\t\t\t\t\t// We can use :scope instead of the ID hack if the browser\n\t\t\t\t\t// supports it & if we're not changing the context.\n\t\t\t\t\tif ( newContext !== context || !support.scope ) {\n\n\t\t\t\t\t\t// Capture the context ID, setting it first if necessary\n\t\t\t\t\t\tif ( ( nid = context.getAttribute( \"id\" ) ) ) {\n\t\t\t\t\t\t\tnid = nid.replace( rcssescape, fcssescape );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcontext.setAttribute( \"id\", ( nid = expando ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prefix every selector in the list\n\t\t\t\t\tgroups = tokenize( selector );\n\t\t\t\t\ti = groups.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tgroups[ i ] = ( nid ? \"#\" + nid : \":scope\" ) + \" \" +\n\t\t\t\t\t\t\ttoSelector( groups[ i ] );\n\t\t\t\t\t}\n\t\t\t\t\tnewSelector = groups.join( \",\" );\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch ( qsaError ) {\n\t\t\t\t\tnonnativeSelectorCache( selector, true );\n\t\t\t\t} finally {\n\t\t\t\t\tif ( nid === expando ) {\n\t\t\t\t\t\tcontext.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {function(string, object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn ( cache[ key + \" \" ] = value );\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created element and returns a boolean result\n */\nfunction assert( fn ) {\n\tvar el = document.createElement( \"fieldset\" );\n\n\ttry {\n\t\treturn !!fn( el );\n\t} catch ( e ) {\n\t\treturn false;\n\t} finally {\n\n\t\t// Remove from its parent by default\n\t\tif ( el.parentNode ) {\n\t\t\tel.parentNode.removeChild( el );\n\t\t}\n\n\t\t// release memory in IE\n\t\tel = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split( \"|\" ),\n\t\ti = arr.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[ i ] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\ta.sourceIndex - b.sourceIndex;\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( ( cur = cur.nextSibling ) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn ( name === \"input\" || name === \"button\" ) && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for :enabled/:disabled\n * @param {Boolean} disabled true for :disabled; false for :enabled\n */\nfunction createDisabledPseudo( disabled ) {\n\n\t// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable\n\treturn function( elem ) {\n\n\t\t// Only certain elements can match :enabled or :disabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled\n\t\t// https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled\n\t\tif ( \"form\" in elem ) {\n\n\t\t\t// Check for inherited disabledness on relevant non-disabled elements:\n\t\t\t// * listed form-associated elements in a disabled fieldset\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#category-listed\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled\n\t\t\t// * option elements in a disabled optgroup\n\t\t\t// https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled\n\t\t\t// All such elements have a \"form\" property.\n\t\t\tif ( elem.parentNode && elem.disabled === false ) {\n\n\t\t\t\t// Option elements defer to a parent optgroup if present\n\t\t\t\tif ( \"label\" in elem ) {\n\t\t\t\t\tif ( \"label\" in elem.parentNode ) {\n\t\t\t\t\t\treturn elem.parentNode.disabled === disabled;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn elem.disabled === disabled;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Support: IE 6 - 11\n\t\t\t\t// Use the isDisabled shortcut property to check for disabled fieldset ancestors\n\t\t\t\treturn elem.isDisabled === disabled ||\n\n\t\t\t\t\t// Where there is no isDisabled, check manually\n\t\t\t\t\t/* jshint -W018 */\n\t\t\t\t\telem.isDisabled !== !disabled &&\n\t\t\t\t\tinDisabledFieldset( elem ) === disabled;\n\t\t\t}\n\n\t\t\treturn elem.disabled === disabled;\n\n\t\t// Try to winnow out elements that can't be disabled before trusting the disabled property.\n\t\t// Some victims get caught in our net (label, legend, menu, track), but it shouldn't\n\t\t// even exist on them, let alone have a boolean value.\n\t\t} else if ( \"label\" in elem ) {\n\t\t\treturn elem.disabled === disabled;\n\t\t}\n\n\t\t// Remaining elements are neither :enabled nor :disabled\n\t\treturn false;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction( function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction( function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ ( j = matchIndexes[ i ] ) ] ) {\n\t\t\t\t\tseed[ j ] = !( matches[ j ] = seed[ j ] );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\t} );\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\tvar namespace = elem && elem.namespaceURI,\n\t\tdocElem = elem && ( elem.ownerDocument || elem ).documentElement;\n\n\t// Support: IE <=8\n\t// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes\n\t// https://bugs.jquery.com/ticket/4833\n\treturn !rhtml.test( namespace || docElem && docElem.nodeName || \"HTML\" );\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, subWindow,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// Return early if doc is invalid or already selected\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Update global variables\n\tdocument = doc;\n\tdocElem = document.documentElement;\n\tdocumentIsHTML = !isXML( document );\n\n\t// Support: IE 9 - 11+, Edge 12 - 18+\n\t// Accessing iframe documents after unload throws \"permission denied\" errors (jQuery #13936)\n\t// Support: IE 11+, Edge 17 - 18+\n\t// IE/Edge sometimes throw a \"Permission denied\" error when strict-comparing\n\t// two documents; shallow comparisons work.\n\t// eslint-disable-next-line eqeqeq\n\tif ( preferredDoc != document &&\n\t\t( subWindow = document.defaultView ) && subWindow.top !== subWindow ) {\n\n\t\t// Support: IE 11, Edge\n\t\tif ( subWindow.addEventListener ) {\n\t\t\tsubWindow.addEventListener( \"unload\", unloadHandler, false );\n\n\t\t// Support: IE 9 - 10 only\n\t\t} else if ( subWindow.attachEvent ) {\n\t\t\tsubWindow.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t// Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only,\n\t// Safari 4 - 5 only, Opera <=11.6 - 12.x only\n\t// IE/Edge & older browsers don't support the :scope pseudo-class.\n\t// Support: Safari 6.0 only\n\t// Safari 6.0 supports :scope but it's an alias of :root there.\n\tsupport.scope = assert( function( el ) {\n\t\tdocElem.appendChild( el ).appendChild( document.createElement( \"div\" ) );\n\t\treturn typeof el.querySelectorAll !== \"undefined\" &&\n\t\t\t!el.querySelectorAll( \":scope fieldset div\" ).length;\n\t} );\n\n\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t// Make sure the the `:has()` argument is parsed unforgivingly.\n\t// We include `*` in the test to detect buggy implementations that are\n\t// _selectively_ forgiving (specifically when the list includes at least\n\t// one valid selector).\n\t// Note that we treat complete lack of support for `:has()` as if it were\n\t// spec-compliant support, which is fine because use of `:has()` in such\n\t// environments will fail in the qSA path and fall back to jQuery traversal\n\t// anyway.\n\tsupport.cssHas = assert( function() {\n\t\ttry {\n\t\t\tdocument.querySelector( \":has(*,:jqfake)\" );\n\t\t\treturn false;\n\t\t} catch ( e ) {\n\t\t\treturn true;\n\t\t}\n\t} );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert( function( el ) {\n\t\tel.className = \"i\";\n\t\treturn !el.getAttribute( \"className\" );\n\t} );\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert( function( el ) {\n\t\tel.appendChild( document.createComment( \"\" ) );\n\t\treturn !el.getElementsByTagName( \"*\" ).length;\n\t} );\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( document.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programmatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert( function( el ) {\n\t\tdocElem.appendChild( el ).id = expando;\n\t\treturn !document.getElementsByName || !document.getElementsByName( expando ).length;\n\t} );\n\n\t// ID filter and find\n\tif ( support.getById ) {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute( \"id\" ) === attrId;\n\t\t\t};\n\t\t};\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar elem = context.getElementById( id );\n\t\t\t\treturn elem ? [ elem ] : [];\n\t\t\t}\n\t\t};\n\t} else {\n\t\tExpr.filter[ \"ID\" ] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" &&\n\t\t\t\t\telem.getAttributeNode( \"id\" );\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\n\t\t// Support: IE 6 - 7 only\n\t\t// getElementById is not reliable as a find shortcut\n\t\tExpr.find[ \"ID\" ] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar node, i, elems,\n\t\t\t\t\telem = context.getElementById( id );\n\n\t\t\t\tif ( elem ) {\n\n\t\t\t\t\t// Verify the id attribute\n\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Fall back on getElementsByName\n\t\t\t\t\telems = context.getElementsByName( id );\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile ( ( elem = elems[ i++ ] ) ) {\n\t\t\t\t\t\tnode = elem.getAttributeNode( \"id\" );\n\t\t\t\t\t\tif ( node && node.value === id ) {\n\t\t\t\t\t\t\treturn [ elem ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn [];\n\t\t\t}\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[ \"TAG\" ] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( ( elem = results[ i++ ] ) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[ \"CLASS\" ] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( typeof context.getElementsByClassName !== \"undefined\" && documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See https://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) {\n\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert( function( el ) {\n\n\t\t\tvar input;\n\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// https://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( el ).innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( el.querySelectorAll( \"[msallowcapture^='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !el.querySelectorAll( \"[selected]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+\n\t\t\tif ( !el.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"~=\" );\n\t\t\t}\n\n\t\t\t// Support: IE 11+, Edge 15 - 18+\n\t\t\t// IE 11/Edge don't find elements on a `[name='']` query in some cases.\n\t\t\t// Adding a temporary attribute to the document before the selection works\n\t\t\t// around the issue.\n\t\t\t// Interestingly, IE 10 & older don't seem to have the issue.\n\t\t\tinput = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"name\", \"\" );\n\t\t\tel.appendChild( input );\n\t\t\tif ( !el.querySelectorAll( \"[name='']\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*name\" + whitespace + \"*=\" +\n\t\t\t\t\twhitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !el.querySelectorAll( \":checked\" ).length ) {\n\t\t\t\trbuggyQSA.push( \":checked\" );\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibling-combinator selector` fails\n\t\t\tif ( !el.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push( \".#.+[+~]\" );\n\t\t\t}\n\n\t\t\t// Support: Firefox <=3.6 - 5 only\n\t\t\t// Old Firefox doesn't throw on a badly-escaped identifier.\n\t\t\tel.querySelectorAll( \"\\\\\\f\" );\n\t\t\trbuggyQSA.push( \"[\\\\r\\\\n\\\\f]\" );\n\t\t} );\n\n\t\tassert( function( el ) {\n\t\t\tel.innerHTML = \"\" +\n\t\t\t\t\"\";\n\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = document.createElement( \"input\" );\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tel.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( el.querySelectorAll( \"[name=d]\" ).length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( el.querySelectorAll( \":enabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// IE's :disabled selector does not pick up the children of disabled fieldsets\n\t\t\tdocElem.appendChild( el ).disabled = true;\n\t\t\tif ( el.querySelectorAll( \":disabled\" ).length !== 2 ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Support: Opera 10 - 11 only\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tel.querySelectorAll( \"*,:x\" );\n\t\t\trbuggyQSA.push( \",.*:\" );\n\t\t} );\n\t}\n\n\tif ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector ) ) ) ) {\n\n\t\tassert( function( el ) {\n\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( el, \"*\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( el, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t} );\n\t}\n\n\tif ( !support.cssHas ) {\n\n\t\t// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+\n\t\t// Our regular `try-catch` mechanism fails to detect natively-unsupported\n\t\t// pseudo-classes inside `:has()` (such as `:has(:contains(\"Foo\"))`)\n\t\t// in browsers that parse the `:has()` argument as a forgiving selector list.\n\t\t// https://drafts.csswg.org/selectors/#relational now requires the argument\n\t\t// to be parsed unforgivingly, but browsers have not yet fully adjusted.\n\t\trbuggyQSA.push( \":has\" );\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( \"|\" ) );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( \"|\" ) );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully self-exclusive\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\n\t\t\t// Support: IE <9 only\n\t\t\t// IE doesn't have `contains` on `document` so we need to check for\n\t\t\t// `documentElement` presence.\n\t\t\t// We need to fall back to `a` when `documentElement` is missing\n\t\t\t// as `ownerDocument` of elements within `