@bagelink/vue 1.15.579 → 1.15.581

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -484,7 +484,7 @@ ${l.preList[n]}
484
484
 
485
485
  `}return n});$.subParser("makeMarkdown.paragraph",(e,l)=>{let a="";if(e.hasChildNodes()){let n=e.childNodes,i=n.length;for(let c=0;c<i;++c)a+=$.subParser("makeMarkdown.node")(n[c],l)}return a=a.trim(),a});$.subParser("makeMarkdown.pre",(e,l)=>{let a=e.getAttribute("prenum");return`<pre>${l.preList[a]}</pre>`});$.subParser("makeMarkdown.strikethrough",(e,l)=>{let a="";if(e.hasChildNodes()){a+="~~";let n=e.childNodes,i=n.length;for(let c=0;c<i;++c)a+=$.subParser("makeMarkdown.node")(n[c],l);a+="~~"}return a});$.subParser("makeMarkdown.strong",(e,l)=>{let a="";if(e.hasChildNodes()){a+="**";let n=e.childNodes,i=n.length;for(let c=0;c<i;++c)a+=$.subParser("makeMarkdown.node")(n[c],l);a+="**"}return a});$.subParser("makeMarkdown.table",(e,l)=>{let a="",n=[[],[]],i=e.querySelectorAll("thead>tr>th"),c=e.querySelectorAll("tbody>tr");for(let s=0;s<i.length;++s){let o=$.subParser("makeMarkdown.tableCell")(i[s],l),m="---";if(i[s].hasAttribute("style"))switch(i[s].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":m=":---";break;case"text-align:right;":m="---:";break;case"text-align:center;":m=":---:";break}n[0][s]=o.trim(),n[1][s]=m}for(let s=0;s<c.length;++s){let o=n.push([])-1,m=c[s].getElementsByTagName("td");for(let u=0;u<i.length;++u){let Z=" ";typeof m[u]<"u"&&(Z=$.subParser("makeMarkdown.tableCell")(m[u],l)),n[o].push(Z)}}let d=3;for(let s=0;s<n.length;++s)for(let o=0;o<n[s].length;++o){let m=n[s][o].length;m>d&&(d=m)}for(let s=0;s<n.length;++s){for(let o=0;o<n[s].length;++o)s===1?n[s][o].slice(-1)===":"?n[s][o]=`${$.helper.padEnd(n[s][o].slice(-1),d-1,"-")}:`:n[s][o]=$.helper.padEnd(n[s][o],d,"-"):n[s][o]=$.helper.padEnd(n[s][o],d);a+=`| ${n[s].join(" | ")} |
486
486
  `}return a.trim()});$.subParser("makeMarkdown.tableCell",(e,l)=>{let a="";if(!e.hasChildNodes())return"";let n=e.childNodes,i=n.length;for(let c=0;c<i;++c)a+=$.subParser("makeMarkdown.node")(n[c],l,!0);return a.trim()});$.subParser("makeMarkdown.txt",e=>{let l=e.nodeValue;return l=l.replace(/ +/g," "),l=l.replace(/¨NBSP;/g," "),l=$.helper.unescapeHTMLEntities(l),l=l.replace(/([*_~|`])/g,"\\$1"),l=l.replace(/^(\s*)>/g,"\\$1>"),l=l.replace(/^#/gm,"\\#"),l=l.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),l=l.replace(/^( {0,3}\d+)\./gm,"$1\\."),l=l.replace(/^( {0,3})([+-])/gm,"$1\\$2"),l=l.replace(/\](\s*)\(/g,"\\]$1\\("),l=l.replace(/^ {0,3}\[([\S \t]*?)\]:/gm,"\\[$1]:"),l});function Li(e,l){if(!l)return{matches:!0,score:0};const a=e.toLowerCase(),n=l.toLowerCase();if(a.includes(n))return{matches:!0,score:1e3};const i=n.split(/\s+/).filter(Z=>Z.length>0),c=a.split(/\s+/);let d=0;for(const Z of i)c.some(r=>r.includes(Z))&&d++;if(d===i.length)return{matches:!0,score:100+d*10};let s=0,o=0,m=0,u=0;for(let Z=0;Z<a.length&&s<n.length;Z++)a[Z]===n[s]?(s++,o++,u++,m=Math.max(m,o)):o=0;return s===n.length?{matches:!0,score:m*5+u}:{matches:!1,score:0}}function VK(...e){return e.filter(Boolean).join(", ")}function TK(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const l=Math.random()*16|0;return(e==="x"?l:l&3|8).toString(16)})}function IK(e){const l=e;return l.label??l.name??l.title??String(l.id??"")}function xK(e){const l=e;return l.value??l.key??l.id??""}function zK(e){if(Array.isArray(e))return e.map(a=>({...a,label:IK(a),value:xK(a)}));const l=e;return a=>a.map(n=>({...n,label:typeof l.label=="function"?l.label(n):String(n[l.label]??""),value:n[l.value]}))}function gK(e){return Array.isArray(e)?e:"data"in e?e.data:"items"in e?e.items:[]}function wK(e,l,a){const n=a?.timeout??1e4,i=e.length>0;let c=null;async function d(o){const m=i?e(o??""):e();return l(gK(await Promise.race([m,new Promise((u,Z)=>setTimeout(()=>{Z(new Error("Request timeout"))},n))])))}const s=async o=>{try{return i?await d(o):(c||(c=await d()),o?c.filter(m=>{const{label:u}=m;return typeof u!="string"?!0:Li(u,o).matches}).sort((m,u)=>{const Z=m.label??"";return Li(u.label??"",o).score-Li(Z,o).score}):c)}catch{return[]}};return s.clearCache=()=>{c=null},s}function Um(e,l){return l==="titleCase"?e.split("_").map(a=>a[0].toUpperCase()+a.slice(1).toLocaleLowerCase()).join(" "):l==="pascal"?e.split("_").map(a=>a[0].toUpperCase()+a.slice(1).toLocaleLowerCase()).join(""):l==="camel"?e.split("_").map((a,n)=>n===0?a:a[0].toUpperCase()+a.slice(1)).join(""):l==="snake"?[...e].map(a=>a===a.toUpperCase()?`_${a.toLowerCase()}`:a).join(""):e}var Ro=new Map;function RK(e,l=500){clearTimeout(Ro.get(e));const a=setTimeout(()=>{e(),Ro.delete(e)},l);Ro.set(e,a)}function SK(e){return e.toLowerCase().replace(/[^a-z0-9-\s]/g,"").split(/[\s-]+/).join("-")}function An(e){return e===void 0?e:e.split("_").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ")||e}var qr=new Map;function $i(e){if(!e.includes("<")&&!e.includes("&"))return e.trim();const l=qr.get(e);if(l!==void 0)return l;if(typeof DOMParser>"u")return e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim();const a=new DOMParser().parseFromString(e,"text/html");a.body.querySelectorAll("p, div, li, br, h1, h2, h3, h4, h5, h6").forEach(i=>i.after(" "));const n=(a.body.textContent||"").replace(/\u00a0/g," ").replace(/\s+/g," ").trim();return qr.set(e,n),n}function w5(e){return/<\/?[a-z][\s\S]*>/i.test(e)}async function R5(e,l){await navigator.clipboard.writeText(e),l&&l("Copied to clipboard")}function S5(...e){return e=e.flatMap(l=>l.split(/\s/)),e.map(l=>l.charAt(0)).join("")}function v5(e,l={}){if(!e||typeof document>"u")return e;const a=document.createElement("template");a.innerHTML=e;const n=i=>{for(const c of Array.from(i.children)){const d=c.tagName.toLowerCase();if(["script","iframe","object","embed","link","meta","base","form"].includes(d)){c.remove();continue}for(const s of Array.from(c.attributes)){const o=s.name.toLowerCase(),m=s.value.trim().toLowerCase();(o.startsWith("on")||(o==="href"||o==="src"||o==="xlink:href")&&(m.startsWith("javascript:")||m.startsWith("data:"))||l.resetFormatting&&["style","class","width","height","align","bgcolor","color","face","size"].includes(o))&&c.removeAttribute(s.name)}n(c)}};return n(a.content),a.innerHTML}function vK(e,l){e.key==="Escape"&&l()}function f5(e,l,...a){return a.map(n=>typeof n=="function"?n(e,l):n).join(" ")}function Om(e,l,a){if(!e)return{};const n=["class","onClick","$el"],i=Object.entries(e).filter(([d])=>!n.includes(d)).map(([d,s])=>[d,typeof s=="function"?s(l,a):s]),c=Object.fromEntries(i);for(const d of n.slice(1))e[d]&&(c[d]=e[d]);return c}function fK(e,l){return e["v-if"]===void 0?!0:typeof e["v-if"]=="boolean"?e["v-if"]:typeof e["v-if"]=="string"?!0:typeof e["v-if"]=="function"?e["v-if"]?.(l?.[e.id],l):!0}function FK(e,l){if(l)return e?e[l]:void 0}const Em=e=>!Number.isNaN(Date.parse(e));function F5(e,l){const a=Array.from(new Set((e??[]).flatMap(Object.keys))).map(n=>({id:n,label:n==="created_at"?"Created Date":n==="updated_at"?"Last Update":An(n),transform:i=>["created_at","updated_at"].includes(n)?i&&ol(i,"DD.MM.YY HH:mm"):i}));return l?a.filter(n=>l.includes(n.id)||!n.id):a}function o2(e=100){return new Promise(l=>setTimeout(l,e))}var ii=new Map;async function Lc(e,l){const a=l?.id||e;if(await o2(1),ii.has(a)){const i=ii.get(a);if(i)return i}if(l?.id&&document.getElementById(l.id)||document.querySelector(`script[src="${e}"]`))return Promise.resolve();const n=new Promise((i,c)=>{const d=document.createElement("script");d.src=e,l?.id&&(d.id=l.id),d.onload=()=>{i(),ii.delete(a)},d.onerror=s=>{c(new Error(String(s))),ii.delete(a)},document.head.append(d)});return ii.set(a,n),n}async function qi(e,{timeout:l=1e4,interval:a=50}={}){const n=Date.now();for(;window[e]===void 0;){if(Date.now()-n>l)throw new Error(`awaitGlobal: window.${e} not available after ${l}ms`);await o2(a)}return window[e]}function Bm(e){return new Promise((l,a)=>{if(document.querySelector(`link[href="${e}"]`)){l();return}const n=document.createElement("link");n.href=e,n.rel="stylesheet",n.onload=()=>{l()},n.onerror=a,document.head.append(n)})}function m2(e){return e.startsWith("https://")?e:(e=e.replace(/http:\/\//,""),`https://${e}`)}function Wt(e,l="px"){return typeof e=="number"?`${e}${l}`:e}var kK=/^https?:\/\/|^\/\/|^blob:|^data:/,k5="https://files.bagel.design";function jK(e){k5=e.replace(/\/$/,"")}function _l(e){if(!(e==null||e==="")){if(typeof e!="string"){const l=e,a=l.imageURL??l.url??l.path_key??l.pathKey??l.src;return typeof a=="string"?_l(a):void 0}return kK.test(e)||e.startsWith("/")?e:e.startsWith("static/")||e.startsWith("images/")?`/${e}`:`${k5}/${e}`}}function Xi(e,l,a=void 0){if(!l)return e;const n=l.split(/[.[]/);let i=e;for(const c of n){if(!i||typeof i!="object"||!(c in i))return a;i=i[c]}return i??a}var JK=e=>e.replace(/http:\/\//,"//");function j5(e,l){try{return e()}catch(a){l&&l(a)}}function u2(e,l){if(typeof document>"u")return;const a=document.createElement("a");a.target="_blank",a.rel="noopener noreferrer";const n=l!==void 0&&l!=="";if(typeof e=="string"){a.href=JK(e);const i=e.split("/").pop();a.download=n?l:i!==void 0&&i!==""?i:"download"}else{const i=URL.createObjectURL(e);a.href=i,a.download=n?l:"download",setTimeout(()=>j5(()=>{URL.revokeObjectURL(i)}),0)}document.body.appendChild(a),a.click(),document.body.removeChild(a)}function CK(e,l){let a=null;const n=(async i=>{try{if(!a){const c=await e(i);a=(Array.isArray(c)?c:c.data||c.items||[]).map(d=>l?l(d):{label:d.name||d.title||`${d.id}`,value:d.id,...d})}return i&&a?a.map(c=>({item:c,match:Li(c.label,i)})).filter(({match:c})=>c.matches).sort((c,d)=>d.match.score-c.match.score).map(({item:c})=>c):a||[]}catch{return[]}});return n.clearCache=()=>{a=null},n}var DK=e=>Object.keys(e),eb=e=>e?.split(" ").map(l=>l.charAt(0).toUpperCase()+l.slice(1)).join(" ");function lb(e,l){return l?e.map(a=>{const n={};return l.forEach(i=>{const{id:c,transform:d,label:s}=i;if(c){const o=Xi(a,c),m=s||c;n[m]=d?.(o,a)||o||""}}),n}):e}function UK(e){const l=new Set;return e.forEach(a=>{Object.keys(a).forEach(n=>l.add(n))}),Array.from(l).map(a=>({id:a,label:a}))}function OK(){const e=(0,t.ref)(!1);async function l(){return e.value||(await Lc("https://cdn.jsdelivr.net/npm/xlsx/dist/xlsx.full.min.js"),e.value=!0),window.XLSX}async function a(Z,r="data",b){const h=(0,t.toValue)(b)||UK(Z),G=await l(),N=lb(Z,h),p=h.length>0?h.map(L=>{const{id:X,label:V}=L;return{v:V||X,t:"s"}}):[],W=G.utils.json_to_sheet(N);p.length>0&&G.utils.sheet_add_aoa(W,[p.map(L=>L.v)],{origin:"A1"});const Y=G.utils.book_new();G.utils.book_append_sheet(Y,W,"Sheet1"),r=r.endsWith(".xlsx")?r:`${r}.xlsx`,G.writeFile(Y,r)}async function n(Z,r="data",b){const h=b?b.map(W=>W.id).filter(Boolean):[...new Set(Z.flatMap(DK))],G=b?b.map(W=>{const{label:Y,id:L}=W;return Y||eb(L)}):h.map(eb),N=lb(Z,b),p=[G.join(","),...N.map(W=>h.map(Y=>{const L=W[Y]!==void 0?W[Y]:"";return`"${String(L).replace(/"/g,'""')}"`}).join(","))].join(`
487
- `);r=r.endsWith(".csv")?r:`${r}.csv`,u2(new Blob([p],{type:"text/csv;charset=utf-8"}),r)}async function i(Z){const r=await l(),b=await Z.arrayBuffer();return r.read(b)}async function c(Z){return(await i(Z)).SheetNames}async function d(Z,r,b=!0){const h=await l(),G=(await i(Z)).Sheets[r],N=h.utils.sheet_to_json(G,{header:1});if(N.length===0)return{headers:[],data:[]};let p=[],W=0;b?(p=N[0].map(L=>String(L||"").trim()),W=1):p=N[0].map((L,X)=>String.fromCharCode(65+X));const Y=[];for(let L=W;L<N.length;L++){const X=N[L],V={};for(let M=0;M<p.length;M++)M<X.length?V[p[M]]=X[M]:V[p[M]]="";Y.push(V)}return{headers:p,data:Y}}async function s(Z){const r=await l();return new Promise((b,h)=>{const G=new FileReader;G.onload=N=>{try{const p=new Uint8Array(N.target?.result),W=r.read(p,{type:"array"}),Y=W.SheetNames[0],L=W.Sheets[Y];b(r.utils.sheet_to_json(L))}catch(p){h(p)}},G.onerror=()=>{h(new Error("Failed to read file"))},G.readAsArrayBuffer(Z)})}function o(Z){return typeof Z=="number"&&Number.isInteger(Z)&&Z>=2e4&&Z<=5e4}function m(Z){const r=new Date(Date.UTC(1899,11,30));return new Date(r.getTime()+Z*(1440*60*1e3))}function u(Z,r=!1){if(!(Z instanceof Date)||Number.isNaN(Z.getTime()))return"";const b=Z.getFullYear(),h=String(Z.getMonth()+1).padStart(2,"0"),G=String(Z.getDate()).padStart(2,"0");return r?`${b}-${h}-${G}T${String(Z.getHours()).padStart(2,"0")}:${String(Z.getMinutes()).padStart(2,"0")}:${String(Z.getSeconds()).padStart(2,"0")}`:`${b}-${h}-${G}`}return{downloadExcel:a,downloadCSV:n,readExcelFile:s,ensureXLSXLoaded:l,getSheetNames:c,readSheetData:d,getWorkbook:i,isExcelSerialDate:o,excelSerialDateToJSDate:m,formatDate:u}}var tb={"to-t":"to top","to-b":"to bottom","to-l":"to left","to-r":"to right","to-tl":"to top left","to-tr":"to top right","to-bl":"to bottom left","to-br":"to bottom right"};function EK(e){if(e==null||e==="")return;if(typeof e=="string"&&e in tb)return tb[e];const l=Number(e);return Number.isFinite(l)?`${l}deg`:void 0}function BK(e){return typeof e!="string"?[]:e.trim().split(/\s+/).filter(Boolean)}function So(e){const l=e.trim();return l.startsWith("var(")||l.startsWith("#")||/^(rgb|hsl|color-mix|linear-gradient)\(/.test(l)?l:l.startsWith("--")?`var(${l})`:`var(--bgl-${l})`}function Is({gradient:e,gradientDir:l,color:a}){const n=(0,t.computed)(()=>{const c=(0,t.toValue)(e);return c===!0||typeof c=="string"&&c.trim()!==""}),i=(0,t.computed)(()=>[(0,t.toValue)(a),...BK((0,t.toValue)(e))].filter(Boolean));return{isGradient:n,gradientStyle:(0,t.computed)(()=>{if(!n.value)return{};const c={},d=EK((0,t.toValue)(l));d&&(c["--bgl-grad-angle"]=d);const s=i.value;if(s.length<2)return c;c["--bgl-grad-from"]=So(s[0]),c["--bgl-grad-to"]=So(s[s.length-1]);const o=s.slice(1,-1);return o.length&&(c["--bgl-grad-via"]=`${o.map(So).join(", ")}, `),c}),stops:i}}async function KK(e){if("caches"in window)try{const l=await(await window.caches.open("img-cache")).match(e);if(l)return URL.createObjectURL(await l.blob())}catch{}}async function HK(e,l){if("caches"in window)try{await(await window.caches.open("img-cache")).put(e,new Response(l))}catch{}}async function PK(e){await Lc("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const l=await(await qi("heic2any"))({blob:await(await fetch(m2(e))).blob()});return await HK(e,l),URL.createObjectURL(l)}function Z2(e){const l=(0,t.ref)(void 0),a=(0,t.ref)(!1);async function n(){a.value=!1;const i=_l((0,t.toValue)(e));if(i===void 0||i===""){l.value=void 0;return}try{if(i.split(".").pop()?.toLowerCase().split("?")[0]==="heic"){const c=await KK(i);if(c!==void 0&&c!==""){l.value=c;return}l.value=await PK(i)}else l.value=i}catch{a.value=!0,l.value=void 0}}return(0,t.watch)(()=>(0,t.toValue)(e),n,{immediate:!0}),{imageSrc:l,loadingError:a}}var Mn={},ab=!1,Km=typeof window<"u";function QK(){!Km||ab||(ab=!0,window.addEventListener("storage",e=>{e.key!==null&&e.key in Mn&&(Mn[e.key].value=e.newValue!==null?JSON.parse(e.newValue):null)}))}function AK(e,l=null){if(!(e in Mn)){const a=Km?localStorage.getItem(e):null;Mn[e]=(0,t.ref)(a!==null?JSON.parse(a):l),(0,t.watch)(Mn[e],n=>{Km&&localStorage.setItem(e,JSON.stringify(n))})}return Mn[e]}function J5(e){return QK(),new Proxy({},{get(l,a){return AK(a,e?.[a]??null)}})}var C5=1e3,_K=60*C5;function $K(e,l={}){const{interval:a=30*C5,inactivityThreshold:n=5*_K,pauseInBackground:i=!0}=l,{idle:c}=PT(n),d=(0,t.ref)(!0),s=(0,t.ref)(null),o=()=>!i||document.visibilityState==="visible",m=()=>{d.value=!1,s.value!==null&&(clearTimeout(s.value),s.value=null)},u=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null)},Z=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null);const h=async()=>{if(d.value&&o()&&!c.value)try{await e()}catch{}d.value&&(s.value=window.setTimeout(h,a))};h()},r=()=>{d.value&&Z()};function b(){document.visibilityState==="visible"?d.value&&Z():i&&u()}return(0,t.onMounted)(()=>{document.addEventListener("visibilitychange",b),Z()}),(0,t.onUnmounted)(()=>{document.removeEventListener("visibilitychange",b),m()}),{isPolling:d,pausePolling:u,resumePolling:r,startPolling:Z,stopPolling:m}}function qK(){const e=(0,t.ref)(!1);let l;function a(n){e.value=n.matches}return(0,t.onMounted)(()=>{typeof window>"u"||!window.matchMedia||(l=window.matchMedia("(prefers-reduced-motion: reduce)"),e.value=l.matches,l.addEventListener("change",a))}),(0,t.onUnmounted)(()=>{l?.removeEventListener("change",a)}),e}function eH(e,l,a){const n={...e};return a===void 0?delete n[l]:n[l]=a,n}function lH(e){const l=(0,Na.useRoute)(),a=(0,Na.useRouter)(),n={};return new Proxy({},{get(i,c){if(!(c in n)){const d=e?.[c];n[c]=(0,t.computed)({get:()=>l.query[c]??d,set:s=>a.replace({query:eH(l.query,c,s)})})}return n[c]}})}var Zt=(0,t.ref)([{value:"dark",class:"bgl-dark-mode",icon:"cloudy_night",label:"Dark Mode",isDark:!0},{value:"light",class:"bgl-light-mode",icon:"brightness_7",label:"Light Mode",isDark:!1},{value:"system",class:"system",icon:"settings_input_component",label:"System Default"}]),D5="color-mode",ot=(0,t.ref)("system"),Hm=(0,t.ref)(!1),r2=(0,t.ref)(!1),Vn=(0,t.ref)(!1),Xc=typeof window<"u";function U5(){if(!Xc)return null;try{return window.localStorage.getItem(D5)}catch{return null}}function tH(e){if(Xc)try{window.localStorage.setItem(D5,e)}catch{}}function aH(){return r2.value&&Xc&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function nb(e){return Zt.value.find(l=>l.value===e)}function rd(e){if(!Xc)return;const l=document.documentElement;if(Zt.value.forEach(a=>{a.class!=="system"&&l.classList.remove(a.class)}),e==="system"){const a=aH();Hm.value=a;const n=Zt.value.find(d=>d.value==="dark"),i=Zt.value.find(d=>d.value==="light"),c=a?n:i;c&&l.classList.add(c.class)}else{const a=nb(e),n=a&&a.isDark&&!r2.value?nb("light"):a;n&&(l.classList.add(n.class),Hm.value=n.isDark??!1)}}function nH(){const e=Zt.value.filter(l=>l.value!=="system");e.length!==0&&(ot.value=e[(e.findIndex(l=>l.value===ot.value)+1)%e.length].value)}function iH(e={}){const l=Vn.value;if(e.allowDark!==void 0&&(r2.value=e.allowDark),e.manualSelection!==void 0&&(Vn.value=e.manualSelection),O5(),Vn.value&&!l){const a=U5();Zt.value.some(n=>n.value===a)&&(ot.value=a)}Vn.value||(ot.value="system"),rd(ot.value)}function cH(e){if(!Zt.value.some(l=>l.value===e.value)){const l=Zt.value.findIndex(a=>a.value==="system");l>-1?Zt.value.splice(l,0,e):Zt.value.push(e)}}var ib=!1;function O5(){if(!(ib||!Xc)){if(ib=!0,Vn.value){const e=U5();Zt.value.some(l=>l.value===e)&&(ot.value=e)}else ot.value="system";rd(ot.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{ot.value==="system"&&rd("system")}),(0,t.watch)(ot,e=>{Vn.value&&tH(e),rd(e)})}}function dH(){return O5(),{isDark:Hm,theme:(0,t.computed)(()=>ot.value),themeOptions:Zt,toggleTheme:nH,addTheme:cH,setTheme:e=>{ot.value=e}}}function E5(e,l,a,n){DT(e,(i,c)=>{if(l?.()?.setCustomValidity(""),!a||i===c||!i)return;const d=a(i,n?.());typeof d=="string"&&l?.()?.setCustomValidity(d)},{debounce:500})}function B5({schema:e,columns:l,data:a}={}){const n=(0,t.computed)(()=>(0,t.toValue)(e)),i=(0,t.computed)(()=>(0,t.toValue)(l));return n.value?i.value&&i.value.length>0?n.value.filter(c=>i.value?.includes(c.id)):n.value:F5(a,i.value)}const sH={s:"400px",m:"540px",l:"720px",xl:"960px",full:"100%"};var oH={key:0,class:"dialog-grip","aria-hidden":"true"},mH={key:2,class:"flex-grow-1"},uH=(0,t.defineComponent)({__name:"Dialog",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},flat:{type:Boolean,default:!0},thin:{type:Boolean,default:!1},centerTitle:{type:Boolean,default:!1},ellipsisTitle:{type:Boolean,default:!1},closePlacement:{default:"header-end"},grip:{type:Boolean,default:void 0}},emits:["update:open","close"],setup(e,{expose:l,emit:a}){const n=e,i=(0,t.computed)(()=>n.grip??n.position==="bottom"),c=a,d=(0,t.ref)(null),s=(0,t.ref)(!1),o=(0,t.ref)(!0),m=(0,t.computed)(()=>sH[n.width]),u=(0,t.computed)(()=>n.position==="left"?"dialog-left ms-1 me-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="right"?"dialog-right me-1 ms-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="top"?"dialog-top mx-auto mt-1 mb-auto":n.position==="bottom"?"dialog-bottom mx-auto mb-1 mt-auto":"dialog-center mx-auto");(0,t.watch)(()=>n.open,N=>{N?(d.value?.showModal(),s.value=!1,o.value=!1,setTimeout(()=>{o.value=!0},250)):Z()}),(0,t.onMounted)(()=>{n.open&&d.value?.showModal()});function Z(){s.value||(s.value=!0)}function r(){s.value&&(d.value?.close(),s.value=!1,c("close"))}function b(N){N.target===d.value&&n.dismissable&&c("update:open",!1)}function h(N){if(!n.dismissable){N.preventDefault();return}c("update:open",!1)}function G(){o.value=!1,c("update:open",!1)}return l({close:G}),(N,p)=>((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{ref_key:"dialogRef",ref:d,class:(0,t.normalizeClass)([[u.value,{"is-closing":s.value}],"border-none shadow-30 p-0 testMe1 dialog-no-focus-outline"]),style:(0,t.normalizeStyle)({"--dialog-width":m.value}),onClick:b,onCancel:h,onAnimationend:r},[(0,t.createElementVNode)("div",{class:"grid grid-dialog max-height-100-2",tabindex:"-1",autofocus:"",onClick:p[0]||(p[0]=(0,t.withModifiers)(()=>{},["stop"]))},[i.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",oH)):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header||e.dismissable?((0,t.openBlock)(),(0,t.createElementBlock)("header",{key:1,class:(0,t.normalizeClass)(["flex space-between flex-shrink-0 align-items-start gap-05",{"border-bottom":!e.flat,"border-none":!e.title&&!N.$slots.header,"m_ps-1":e.title||N.$slots.header,"p-05 m_p-05":!e.title&&!N.$slots.header,"ps-1-5 pe-1 py-1 ":!e.thin&&(e.title||N.$slots.header),"ps-1 pe-05 py-05":e.thin&&(e.title||N.$slots.header)}])},[e.dismissable&&e.closePlacement==="header-start"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:G})):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("h3",{key:1,class:(0,t.normalizeClass)(["dialog-title m-0 txt20 semi w-100p",{"txt-center balance":e.centerTitle,"word-break-all":!e.centerTitle,"ellipsis-1":e.ellipsisTitle}])},[(0,t.renderSlot)(N.$slots,"header",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)],2)):(0,t.createCommentVNode)("",!0),!e.title&&!N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("div",mH)):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="header-end"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:3,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:G})):(0,t.createCommentVNode)("",!0)],2)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["overflow-y flex-grow-1 m_p-1",{"px-1 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"default",{},void 0,!0)],2),N.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)("footer",{key:2,class:(0,t.normalizeClass)(["flex flex-shrink-0 gap-05 m_px-05 m_py-05 justify-content-end",{"border-top":!e.flat,"px-05 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"footer",{},void 0,!0)],2)):(0,t.createCommentVNode)("",!0)]),e.dismissable&&e.closePlacement==="overlay-start"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,icon:"close","aria-label":"Close",class:"fixed top-1 start-1 z-999 overlay-btn",onClick:G})):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="overlay-end"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,icon:"close","aria-label":"Close",class:"fixed top-1 end-1 z-999 overlay-btn",onClick:G})):(0,t.createCommentVNode)("",!0)],38))}}),Kt=Le(uH,[["__scopeId","data-v-42595465"]]),ZH=(0,t.defineComponent)({__name:"DialogConfirm",props:{open:{type:Boolean},title:{},message:{},width:{default:"s"},position:{default:"center"},dismissable:{type:Boolean,default:!0},confirmText:{},cancelText:{},confirmColor:{default:"primary"}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:i}=al(),c=(0,t.computed)(()=>a.title||i("modalConfirm.title")),d=(0,t.computed)(()=>a.confirmText||i("modalConfirm.confirm")),s=(0,t.computed)(()=>a.cancelText||i("modalConfirm.cancel"));function o(){n("resolve",!0),n("update:open",!1)}function m(){n("resolve",!1),n("update:open",!1)}function u(){n("resolve",!1)}return(Z,r)=>((0,t.openBlock)(),(0,t.createBlock)(Kt,{open:e.open,title:c.value,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":r[0]||(r[0]=b=>Z.$emit("update:open",b)),onClose:u},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(oe,{flat:"",onClick:m},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(s.value),1)]),_:1}),(0,t.createVNode)(oe,{color:e.confirmColor,onClick:o},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(d.value),1)]),_:1},8,["color"])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("p",null,(0,t.toDisplayString)(e.message),1)]),_:1},8,["open","title","width","position","dismissable"]))}}),K5=ZH,Tn=new Map,Pm=new Set,H5=/^[a-z0-9][a-z0-9._-]*:[a-z0-9][a-z0-9._-]*$/i;function rH(e){if(!H5.test(e.type))throw new Error(`Custom form field type "${e.type}" must be a namespaced ID such as "acme:rating"`);if(Tn.has(e.type))throw new Error(`Custom form field type "${e.type}" is already registered`);return Tn.set(e.type,e),Pm.delete(e.type),()=>{Tn.get(e.type)===e&&Tn.delete(e.type)}}function Xt(e){return Tn.get(e)}function bH(){return[...Tn.values()]}function xs(e){return H5.test(e)}function zs(e){!xs(e)||Pm.has(e)||Pm.add(e)}function hH(e,l,a={},n=""){return Xt(e)?.display?.(l,{key:n,config:a})}function b2(e,l){const a={...l};for(const[n,i]of Object.entries(e)){const c=Xt(i._type)?.toSubmission;if(!c)continue;const d=c(a[n],{key:n,config:i._config,formData:l});d===void 0?delete a[n]:a[n]=d}return a}const pH=12,WH=12,GH=1;var P5=/^col-(\d{1,2})\/12$/,Q5=/^start-col-(\d{1,2})$/,A5=/^m_col-(\d{1,2})\/12$/,_5=/^start-row-(\d+)$/,$5=/^(?:grid-)?span-row-(\d+)$/,q5=/^m_start-col-(\d{1,2})$/,eW=/^m_start-row-(\d+)$/,lW=/^m_(?:grid-)?span-row-(\d+)$/,Bd={"col-1/12":1,"col-1/6":2,"col-2/12":2,"col-1/4":3,"col-3/12":3,"col-1/3":4,"col-4/12":4,"col-5/12":5,"col-1/2":6,"col-6/12":6,"col-7/12":7,"col-2/3":8,"col-8/12":8,"col-3/4":9,"col-9/12":9,"col-5/6":10,"col-10/12":10,"col-11/12":11,"col-full":12,"col-12/12":12},Qm=Object.fromEntries(Object.entries(Bd).map(([e,l])=>[`m_${e}`,l]));function za(e){return Math.max(1,Math.min(12,Math.round(e)))}function gs(e){return Math.max(1,Math.round(e))}function tW(e){return`col-${za(e)}/12`}function aW(e){return`start-col-${za(e)}`}function nW(e){return`m_col-${za(e)}/12`}function iW(e){return`span-row-${gs(e)}`}function NH(e){return`start-row-${Math.max(1,Math.round(e))}`}function cW(e){return`m_start-col-${za(e)}`}function dW(e){return`m_start-row-${Math.max(1,Math.round(e))}`}function sW(e){return`m_span-row-${gs(e)}`}function h2(e){if(e)for(const l of e.split(/\s+/)){if(l.startsWith("m_"))continue;const a=l.match(P5);if(a)return za(Number(a[1]));if(l in Bd)return Bd[l]}}function p2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Q5);if(a)return za(Number(a[1]))}}function W2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(A5);if(a)return za(Number(a[1]));if(l in Qm)return Qm[l]}}function G2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(q5);if(a)return za(Number(a[1]))}}function N2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match($5);if(a)return gs(Number(a[1]))}}function Y2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(_5);if(a)return Math.max(1,Number(a[1]))}}function L2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(eW);if(a)return Math.max(1,Number(a[1]))}}function X2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(lW);if(a)return gs(Number(a[1]))}}function y2(e){return e?e.split(/\s+/).filter(Boolean).filter(l=>!P5.test(l)&&!Q5.test(l)&&!A5.test(l)&&!_5.test(l)&&!$5.test(l)&&!q5.test(l)&&!eW.test(l)&&!lW.test(l)&&!(l in Bd)&&!(l in Qm)).join(" "):""}function oW(e,l){const a=y2(e),n=a?[a]:[];return l.colSpan!==void 0&&l.colSpan!==12&&n.push(tW(l.colSpan)),l.colStart!==void 0&&n.push(aW(l.colStart)),l.rowStart!==void 0&&n.push(NH(l.rowStart)),l.rowSpan!==void 0&&l.rowSpan!==1&&n.push(iW(l.rowSpan)),l.mColSpan!==void 0&&l.mColSpan!==12&&n.push(nW(l.mColSpan)),l.mColStart!==void 0&&n.push(cW(l.mColStart)),l.mRowStart!==void 0&&n.push(dW(l.mRowStart)),l.mRowSpan!==void 0&&l.mRowSpan!==1&&n.push(sW(l.mRowSpan)),n.join(" ")}function mW(e){return{colSpan:h2(e),colStart:p2(e),rowStart:Y2(e),rowSpan:N2(e),mColSpan:W2(e),mColStart:G2(e),mRowStart:L2(e),mRowSpan:X2(e)}}var YH=(0,t.defineComponent)({__name:"FormFlow",props:{schema:{},modelValue:{},components:{},errors:{},onSubmit:{type:Function}},emits:["update:modelValue"],setup(e,{expose:l,emit:a}){const n=e,i=a,{$t:c}=al();function d(k,K){const O=K.split(".");let x=k;for(const y of O)x=x?.[y];return x}function s(k,K,O){const x=K.split(".");let y=k;for(let R=0;R<x.length-1;R++){const g=x[R];(y[g]==null||typeof y[g]!="object")&&(y[g]={}),y=y[g]}y[x[x.length-1]]=O}function o(k){if(k==null||typeof k!="object")return k;try{return structuredClone(k)}catch{return JSON.parse(JSON.stringify(k))}}function m(k,K,O,x){const y=Xt(k._type);if(y?.coerce)return y.coerce(K,{key:O,config:k._config,formData:x});if(typeof K!="string")return K;const R=K.trim();switch(k._type){case"checkbox":case"toggle":return R.toLowerCase()==="true"?!0:R.toLowerCase()==="false"?!1:K;case"number":case"range":{if(!R)return K;const g=Number(R);return Number.isNaN(g)?K:g}default:return K}}function u(k){const K={...k??{}};for(const[O,x]of Object.entries(n.schema._fields)){const y=d(K,O);if(y!==void 0){s(K,O,m(x,y,O,K));continue}const R=x._config.default;R!==void 0&&s(K,O,m(x,o(R),O,K))}return K}function Z(k){const K=k._config.schema;if(K&&typeof K.getDefaults=="function"){const x=o(K.getDefaults());if(x&&Object.keys(x).length>0)return x}const O=k._config.default;return Array.isArray(O)&&O.length>0&&O[0]!=null&&typeof O[0]=="object"?o(r(O[0])):{}}function r(k){try{return JSON.parse(JSON.stringify(k))}catch{return{...k}}}const b=(0,t.ref)(u(n.modelValue)),h=(0,t.ref)({}),G=(0,t.ref)(!1),N=(0,t.ref)("idle"),p=(0,t.ref)();let W=!1;(0,t.watch)(()=>n.modelValue,k=>{W||(b.value=u(k))},{deep:!0}),(0,t.watch)(b,k=>{W=!0,i("update:modelValue",o(k)),(0,t.nextTick)(()=>{W=!1})},{deep:!0});function Y(k){return k._hidden?!1:k._condition==null?!0:gu(k._condition,b.value)}function L(k,K){if(K._condition==null)return k;const O=K._condition.trim().split(/\s+/)[0];if(!O)return k;const x=d(b.value,O);return x==null?k:`${k}:${String(x)}`}const X=(0,t.computed)(()=>{const k=[];for(const[K,O]of Object.entries(n.schema._fields))Y(O)&&k.push({key:K,field:O});return k});function V(k){if(!n.schema._class?.split(/\s+/).includes("free-grid"))return;const{rowStart:K,rowSpan:O,mRowStart:x,mRowSpan:y}=mW(k._class);if(!(!K&&!x&&!O&&!y))return{...K?{"--bgl-grid-row-start":String(K)}:{},...x?{"--bgl-mobile-grid-row-start":String(x)}:{},...O?{"--bgl-grid-row-span":String(O)}:{},...y?{"--bgl-mobile-grid-row-span":String(y)}:{}}}function M(k,K,O){s(b.value,k,K),(N.value==="success"||N.value==="error")&&(N.value="idle"),G.value&&w(k,O)}function T(k,K,O){const x=Xt(K._type);return x?.isEmpty?x.isEmpty(k,{key:O,config:K._config,formData:b.value}):k==null||k===""||k===!1&&K._type==="checkbox"||Array.isArray(k)&&k.length===0||K._type==="tel"&&typeof k=="string"&&/^\+\d{1,3}$/.test(k)}function w(k,K){const O=I(k);if(K._config.required===!0&&T(O,K,k))return h.value={...h.value,[k]:K._config.requiredMessage??c("form.required")},!1;if(K._type==="email"&&O&&!Fa.test(O))return h.value={...h.value,[k]:c("form.invalidEmail")},!1;const x=Xt(K._type)?.validate?.(O,{key:k,config:K._config,formData:b.value});if(x!==void 0&&x!==!0)return h.value={...h.value,[k]:x},!1;if(K._validations!=null)for(const y of K._validations){const R=y(O);if(R!==!0)return h.value={...h.value,[k]:R},!1}return h.value=Object.fromEntries(Object.entries(h.value).filter(([y])=>y!==k)),!0}function I(k){return d(b.value,k)}function j(k,K){return K._config.label!=null?K._config.label:k.split(/[._-]/).map(O=>O.charAt(0).toUpperCase()+O.slice(1)).join(" ")}function f(k){if(typeof k!="string"&&(k._type==="select"||k._type==="multiselect")&&k._config.display==="btn")return n.components?.selectBtn??fu;const K=typeof k=="string"?k:k._type;if(K&&n.components?.[K]!=null)return n.components[K];const O=K?Xt(K)?.component:void 0;return O||(K&&xs(K)&&zs(K),{text:Fe,email:Ru,password:vh,number:Nt,tel:qu,url:Fe,date:Da,time:Fe,datetime:Da,textarea:Fe,richtext:wd,json:wu,checkbox:Rl,toggle:Xs,radio:Fh,select:Ol,multiselect:Ol,array:Wn,heading:vm,divider:vm,upload:ki,color:wt,icon:Mh,range:vu}[K]??Fe)}const J=(0,t.computed)(()=>{const k={...h.value,...n.errors||{}},K={};for(const[O,x]of Object.entries(k))K[O]=Te(x)??x;return K});function E(k,K){const O=j(K,k),{helpText:x,...y}=k._config,R=n.schema._class?.split(/\s+/).includes("free-grid")??!1,g={label:O,modelValue:I(K),"onUpdate:modelValue":Q=>{M(K,Q,k)},error:J.value[K],...y,formData:b.value,...x!=null?{helptext:x}:{},name:k._config.name??K};if(k._type==="textarea"&&(g.multiline=!0),k._type==="multiselect"&&(g.multiselect=!0),R&&k._type==="richtext"&&(g.fullHeight=!0),R&&(k._type==="upload"||k._type==="file")&&(g.height=k._config.hideLabel?"100%":"calc(100% - 1.75rem)"),(k._type==="select"||k._type==="multiselect")&&typeof g.options=="function"){const Q=g.options;g.options=P=>Q(P,b.value)}if(k._type==="json"&&(g.language=g.language??"json"),k._type==="array"){delete g.default,delete g.schema,delete g.itemType;const{helpText:Q,...P}=Object.fromEntries(Object.entries(k._config).filter(([me])=>me!=="schema"&&me!=="itemType"&&me!=="default"));Object.assign(g,P),Q!=null&&(g.helptext=Q),delete g.helpText,g.modelValue=I(K),g["onUpdate:modelValue"]=me=>{M(K,me,k)},g.allowAdd=g.allowAdd??!0,g.allowDelete=g.allowDelete??!0}return g}function ee(k,K){return{...k._component?.props??{},...E(k,K)}}function B(k){return typeof k=="string"&&n.components?.[k]!=null?n.components[k]:k}function U(k){return k._component!=null}function _(){let k=!0;const K={};for(const{key:O,field:x}of X.value){const y=I(O);if(x._config.required===!0&&T(y,x,O)){K[O]=x._config.requiredMessage??c("form.required"),k=!1;continue}if(x._type==="email"&&y&&!Fa.test(y)){K[O]=c("form.invalidEmail"),k=!1;continue}const R=Xt(x._type)?.validate?.(y,{key:O,config:x._config,formData:b.value});if(R!==void 0&&R!==!0){K[O]=R,k=!1;continue}if(x._validations!=null)for(const g of x._validations){const Q=g(y);if(Q!==!0){K[O]=Q,k=!1;break}}}return h.value=K,k}async function de(k){k&&k.preventDefault(),G.value=!0;const K=_();if(K){if(n.onSubmit){N.value="submitting";try{await n.onSubmit(b2(n.schema._fields,b.value)),N.value="success"}catch{N.value="error"}}}else{k?.stopPropagation(),p.value?.reportValidity();const O=X.value.find(({key:x})=>h.value[x])?.key;if(O!=null&&p.value){const x=p.value.querySelector(`[name="${O}"]`)||p.value.querySelector(`[id="${O}"]`)||p.value.querySelector(`[data-field="${O}"]`)||p.value.querySelector("input, select, textarea");x&&(x.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{x instanceof HTMLElement&&x.focus()},300))}}return K}return l({validate:_,submit:de,formState:N}),(k,K)=>{const O=(0,t.resolveComponent)("FormFlow",!0);return(0,t.openBlock)(),(0,t.createElementBlock)("form",{ref_key:"formElement",ref:p,class:(0,t.normalizeClass)(["grid-form",e.schema._class]),onSubmit:de},[N.value==="success"?(0,t.renderSlot)(k.$slots,"success",{formData:b.value},void 0,void 0,0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(X.value,({key:x,field:y})=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:L(x,y),class:(0,t.normalizeClass)([y._class,y._config.class]),style:(0,t.normalizeStyle)(V(y))},[(0,t.renderSlot)(k.$slots,`field:${x}`,{value:I(x),field:y,formData:b.value,error:h.value[x],onChange:R=>{M(x,R,y)}},()=>[y._type==="array"&&y._config.schema?._isSchema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:0,ref_for:!0},E(y,x),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[(0,t.createVNode)(O,{"model-value":R.value,schema:y._config.schema,components:e.components,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","schema","components","onUpdate:modelValue"])]),_:2},1040,["create-item"])):y._type==="array"&&typeof y._config.schema=="string"?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:1,ref_for:!0},E(y,x),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.schema)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):y._type==="array"&&y._config.schema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:2,ref_for:!0},E(y,x),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(B(y._config.schema)),{modelValue:R.value,"onUpdate:modelValue":g=>R.value=g},null,8,["modelValue","onUpdate:modelValue"]))]),_:2},1040,["create-item"])):y._type==="array"&&y._config.itemType?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:3,ref_for:!0},E(y,x),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.itemType)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):U(y)?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(B(y._component.component)),(0,t.mergeProps)({key:4,ref_for:!0},ee(y,x)),null,16)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y)),(0,t.mergeProps)({key:5,ref_for:!0},E(y,x)),null,16))])],6))),128)),(0,t.renderSlot)(k.$slots,"errors",{errors:J.value,errorCount:Object.keys(J.value).filter(x=>J.value[x]).length,visibleFields:X.value}),N.value==="error"?(0,t.renderSlot)(k.$slots,"error",{formData:b.value},void 0,void 0,0):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(k.$slots,"submit",{submit:de,validate:_,formData:b.value,errors:J.value,formState:N.value})],64))],34)}}}),ws=YH,LH={key:0,class:"dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"},XH={key:1,class:"mb-1 mt-0"},yH=(0,t.defineComponent)({__name:"DialogForm",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},schema:{},modelValue:{},message:{},onSubmit:{},onDelete:{},submitText:{},cancelText:{},deleteText:{}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:i}=al(),c=(0,t.ref)({...a.modelValue||{}}),d=(0,t.ref)(!1),s=(0,t.ref)(!1),o=(0,t.ref)(null),m=(0,t.ref)(),u=(0,t.computed)(()=>typeof a.onDelete=="function");async function Z(){if(!d.value){if(!m.value?.validate()){o.value=i("dialogForm.validationError");return}o.value=null,d.value=!0;try{a.onSubmit&&await a.onSubmit(c.value),n("resolve",{action:"submit",data:c.value}),n("update:open",!1)}catch(G){o.value=G instanceof Error?G.message:i("dialogForm.errorOccurred")}finally{d.value=!1}}}async function r(){if(!(s.value||!a.onDelete)){o.value=null,s.value=!0;try{await a.onDelete(c.value),n("resolve",{action:"delete",data:c.value}),n("update:open",!1)}catch(G){o.value=G instanceof Error?G.message:i("dialogForm.errorOccurred")}finally{s.value=!1}}}function b(){n("resolve",{action:"cancel",data:c.value}),n("update:open",!1)}function h(){n("resolve",{action:"cancel",data:c.value})}return(G,N)=>((0,t.openBlock)(),(0,t.createBlock)(Kt,{open:e.open,title:e.title,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":N[1]||(N[1]=p=>G.$emit("update:open",p)),onClose:h},{footer:(0,t.withCtx)(()=>[u.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:0,color:"red",flat:"",loading:s.value,disabled:d.value,class:"me-auto",thin:"",onClick:r},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.deleteText||(0,t.unref)(i)("dialogForm.delete")),1)]),_:1},8,["loading","disabled"])):(0,t.createCommentVNode)("",!0),N[2]||(N[2]=(0,t.createElementVNode)("div",{class:"flex-grow-1"},null,-1)),(0,t.createVNode)(oe,{flat:"",disabled:d.value||s.value,onClick:b,thin:""},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.cancelText||(0,t.unref)(i)("dialogForm.cancel")),1)]),_:1},8,["disabled"]),(0,t.createVNode)(oe,{color:"primary",loading:d.value,disabled:s.value,onClick:Z},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.submitText||(0,t.unref)(i)("dialogForm.save")),1)]),_:1},8,["loading","disabled"])]),default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",LH,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)("",!0),e.message?((0,t.openBlock)(),(0,t.createElementBlock)("p",XH,(0,t.toDisplayString)(e.message),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(ws,{ref_key:"formFlowRef",ref:m,modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=p=>c.value=p),schema:e.schema,onSubmit:Z},null,8,["modelValue","schema"])]),_:1},8,["open","title","width","position","dismissable"]))}}),uW=yH;const M2=Symbol("dialog");var Kd=null;function ZW(){let e=null;try{e=(0,t.inject)(M2,null)}catch{e=null}if(!e){if(Kd)return Kd;throw new Error("Dialog API not provided. Make sure DialogPlugin is installed via app.use(DialogPlugin)")}return e}const rW={install:e=>{let l=0;const a=(0,t.reactive)([]),n={form:c=>new Promise(d=>{const s=++l;a.push({id:s,type:"form",options:c,resolve:d,open:!0})}),confirm:c=>new Promise(d=>{const s=++l,o=typeof c=="string"?{message:c}:c;a.push({id:s,type:"confirm",options:o,resolve:d,open:!0})}),open:c=>{const d=++l,s={id:d,type:"open",options:c,resolve:()=>{},open:!0};return a.push(s),{close:()=>{const o=a.findIndex(m=>m.id===d);o!==-1&&(a[o].open=!1,setTimeout(()=>{const m=a.findIndex(u=>u.id===d);m!==-1&&a.splice(m,1)},200))}}}};Kd||(Kd=n),e.provide(M2,n);const i=(0,t.defineComponent)({name:"DialogContainer",setup(){function c(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function d(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function s(o,m){m||(o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200))}return{dialogStack:a,handleFormResolve:c,handleConfirmResolve:d,handleOpenUpdate:s}},render(){return this.dialogStack.map(c=>{if(c.type==="form")return(0,t.h)(uW,{key:c.id,open:c.open,...c.options,"onUpdate:open":d=>{d||this.handleFormResolve(c,{action:"cancel",data:c.options.modelValue||{}})},onResolve:d=>{this.handleFormResolve(c,d)}});if(c.type==="confirm")return(0,t.h)(K5,{key:c.id,open:c.open,...c.options,"onUpdate:open":d=>{d||this.handleConfirmResolve(c,!1)},onResolve:d=>{this.handleConfirmResolve(c,d)}});if(c.type==="open"){const d=c.options;return(0,t.h)(Kt,{key:c.id,open:c.open,title:d.title,width:d.width,position:d.position,dismissable:d.dismissable,class:d.class,"onUpdate:open":s=>{this.handleOpenUpdate(c,s)}},{default:()=>(0,t.h)((typeof d.component=="string",d.component),d.props||{})})}return null})}});if(e.component("DialogContainer",i),typeof document<"u"&&typeof window<"u"){const c=()=>{if(!document.getElementById("bagelink-dialog-root")){const d=document.createElement("div");d.id="bagelink-dialog-root",document.body.appendChild(d);const s=(0,t.createApp)(i);Object.assign(s._context,e._context),s.mount(d)}};document.body&&c(),e.mixin({mounted(){this.$root===this&&c()}})}}};var V2={pint:{pattern:/\d/},int:{pattern:/[\d-]/},pnum:{pattern:/[\d.]/},tel:{pattern:/[\d.\-()\s+]/},money:{pattern:/[\d.\s,]/},number:{pattern:/[\d\-.]/},num:{pattern:/[\d\-.]/},hex:{pattern:/[0-9a-f]/i},email:{pattern:/[\w.\-@]/},alpha:{pattern:/[a-z_]/i},alphanum:{pattern:/\w/},lower:{pattern:/[a-z]/i,transform:e=>e.toLowerCase()},upper:{pattern:/[A-Z]/i,transform:e=>e.toUpperCase()},slug:{pattern:/[a-z0-9-]/i,transform:e=>e.toLowerCase().replace(/\s/g,"-")},snake:{pattern:/[a-z_]/,transform:e=>e.toLowerCase().replace(/\s/g,"_")}},Bc=new WeakMap;function vo(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e;const l=e.querySelector("input, textarea");return l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement?l:null}function cb(e){const l=Object.keys(e.modifiers);return l.length>0?l[l.length-1]:""}function bW(e){return e.pattern!=null?e.pattern:e.modifier!=null&&e.modifier!==""?V2[e.modifier]?.pattern??/./:/./}function db(e,l,a){a.keydownEvent=(n=>{VH(n,l,a)}),a.inputEvent=(n=>{hW(n,l,a)}),a.compositionStartEvent=(()=>{TH(a)}),a.compositionEndEvent=(n=>{IH(n,l,a)}),l.addEventListener("keydown",a.keydownEvent),l.addEventListener("input",a.inputEvent,{capture:!0}),l.addEventListener("compositionstart",a.compositionStartEvent),l.addEventListener("compositionend",a.compositionEndEvent)}function sb(e,l){l.keydownEvent&&e.removeEventListener("keydown",l.keydownEvent),l.inputEvent&&e.removeEventListener("input",l.inputEvent,{capture:!0}),l.compositionStartEvent&&e.removeEventListener("compositionstart",l.compositionStartEvent),l.compositionEndEvent&&e.removeEventListener("compositionend",l.compositionEndEvent),l.keydownEvent=void 0,l.inputEvent=void 0,l.compositionStartEvent=void 0,l.compositionEndEvent=void 0}function MH(e){const l=["Tab","Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"];return e.ctrlKey||e.altKey||e.metaKey?!0:l.includes(e.key)}function VH(e,l,a){if(a.composing===!0||MH(e)||a.modifier!=null&&a.modifier!==""&&typeof V2[a.modifier]?.transform=="function")return;const n=bW(a),i=e.key;n.test(i)||e.preventDefault()}function TH(e){e.composing=!0}function IH(e,l,a){a.composing=!1,hW(e,l,a)}function ob(e,l){const a=bW(l);let n;if(l.modifier!=null&&l.modifier!==""){const c=V2[l.modifier]?.transform;n=c?c(e):e}else n=e;let i="";for(let c=0;c<n.length;c++){const d=n[c];a.test(d)&&(i+=d)}return i}function hW(e,l,a){if(a.reformatting===!0||a.composing===!0)return;const n=l.value,i=l.selectionEnd??n.length,c=n.slice(0,i),d=ob(n,a);if(d===n)return;const s=ob(c,a).length;a.reformatting=!0,l.value=d,l.setSelectionRange(s,s),a.reformatting=!1}var xH={beforeMount(e,l){const a=vo(e);if(a===null)return;const n={modifier:cb(l)};typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),Bc.set(e,n),db(e,a,n)},updated(e,l){const a=vo(e);if(a===null)return;const n=Bc.get(e);n!==void 0&&(sb(a,n),n.modifier=cb(l),typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),db(e,a,n))},unmounted(e){const l=vo(e),a=Bc.get(e);l!==null&&a!==void 0&&sb(l,a),Bc.delete(e)},getSSRProps(){return{}}},pW=xH,zH=()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;function gH(e){const l={y:"up",delay:0,once:!0,threshold:.12};return e?typeof e=="string"?{...l,y:e}:{...l,...e}:l}var fo=new WeakMap,wH={mounted(e,l){const a=gH(l.value);if(zH())return;e.classList.add("bgl-reveal"),a.y!=="none"&&(e.dataset.revealDir=a.y),a.delay&&e.style.setProperty("--bgl-reveal-delay",`${a.delay}ms`);const n=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting?(e.classList.add("bgl-reveal-in"),a.once&&n.unobserve(e)):a.once||e.classList.remove("bgl-reveal-in")},{threshold:a.threshold,rootMargin:"0px 0px -8% 0px"});n.observe(e),fo.set(e,n)},unmounted(e){fo.get(e)?.disconnect(),fo.delete(e)},getSSRProps(){return{}}},WW=wH;function RH(e){let l=e.__rippleContainer;return(!l||!l.isConnected)&&(l=document.createElement("span"),Object.assign(l.style,{position:"absolute",inset:"0",overflow:"hidden",borderRadius:"inherit",pointerEvents:"none"}),e.appendChild(l),e.__rippleContainer=l),l}var SH={mounted(e,l){const a=n=>{const i=e.getBoundingClientRect(),c=Math.max(i.width,i.height),d=document.createElement("span");d.className="ripple",Object.assign(d.style,{width:`${c}px`,height:`${c}px`,left:`${n.clientX-i.left-c/2}px`,top:`${n.clientY-i.top-c/2}px`,position:"absolute",borderRadius:"50%",transform:"scale(0)",background:"rgba(0, 0, 0, 0.3)",pointerEvents:"none",animation:"rippleEffect 0.6s ease-out"}),RH(e).appendChild(d),setTimeout(()=>{d.remove()},600)};e.__rippleClickHandler=a,l.value!==!1&&(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},updated(e,l){const a=e.__rippleClickHandler;l.value===!1?e.removeEventListener("mousedown",a):(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},unmounted(e){const l=e.__rippleClickHandler;l&&(e.removeEventListener("mousedown",l),delete e.__rippleClickHandler)},getSSRProps(){return{}}},GW=SH,Hd=new WeakMap;function mb(e,l){const a=l.value||{},n=l2();let i=a.handle?e.querySelector(a.handle):e;const c=!i;i||(i=e.ownerDocument.createElement("div"),i.className=a.handle.replace(".","")+(a.handleClass?` ${a.handleClass}`:""),i.style.cssText="position:absolute;bottom:0;left:0;right:0;height:6px;background:rgba(0,0,0,0.1);",e.appendChild(i));const d=i,s={cursor:d.style.cursor,userSelect:d.style.userSelect,touchAction:d.style.touchAction},o=["role","tabindex","aria-orientation","aria-label","aria-valuenow","aria-valuemin","aria-valuemax"].map(r=>[r,d.getAttribute(r)]);d.style.cursor="ns-resize",d.style.userSelect="none",d.style.touchAction="none",d.setAttribute("role","separator"),d.setAttribute("tabindex","0"),d.setAttribute("aria-orientation","horizontal"),d.hasAttribute("aria-label")||d.setAttribute("aria-label","Resize height"),d.setAttribute("aria-valuemin",String(a.minHeight??0)),a.maxHeight!==void 0&&d.setAttribute("aria-valuemax",String(a.maxHeight)),d.setAttribute("aria-valuenow",String(e.offsetHeight));function m(r,b,h){const G={clientY:r,deltaY:r-b,initialHeight:h},N=h+G.deltaY,p=a.gridSize&&a.gridSize>0?Math.round(N/a.gridSize)*a.gridSize:N,W=Math.min(a.maxHeight??1/0,Math.max(a.minHeight??0,p));return e.style.height=`${W}px`,d.setAttribute("aria-valuenow",String(W)),a.onResize?.(G),G}function u(r){if(r.button!==0||r.isPrimary===!1)return;n.cancel();const b=r.clientY,h=e.offsetHeight,G=e.style.height,N=d.getAttribute("aria-valuenow");a.onStart?.(r),n.start(r,{cursor:"ns-resize",onMove:p=>m(p.clientY,b,h),onEnd(p){const W=m(p.clientY,b,h);a.onEnd?.(W)},onCancel(){e.style.height=G,N!==null&&d.setAttribute("aria-valuenow",N),a.onCancel?.()}})}function Z(r){if(!["ArrowUp","ArrowDown","Home","End"].includes(r.key)||r.key==="End"&&a.maxHeight===void 0)return;r.preventDefault(),n.cancel();const b=e.offsetHeight,h=(a.gridSize||10)*(r.shiftKey?5:1),G=r.key==="Home"?a.minHeight??0:r.key==="End"?a.maxHeight:b+(r.key==="ArrowUp"?-h:h);a.onStart?.(r);const N=m(G-b,0,b);a.onEnd?.(N)}d.addEventListener("pointerdown",u),d.addEventListener("keydown",Z),Hd.set(e,()=>{n.cancel(),d.removeEventListener("pointerdown",u),d.removeEventListener("keydown",Z),Object.assign(d.style,s);for(const[r,b]of o)b===null?d.removeAttribute(r):d.setAttribute(r,b);c&&d.remove(),Hd.delete(e)})}const vH={mounted:mb,unmounted(e){Hd.get(e)?.()},updated(e,l){l.value!==l.oldValue&&(Hd.get(e)?.(),mb(e,l))},getSSRProps(){return{}}};function Pd(e){return e==="richtext"?3:e==="textarea"||e==="json"||e==="radio"||e==="file"||e==="signature"?2:1}function T2(e){if(e.format)switch(e.format){case"email":return"email";case"tel":return"phone";case"uri":case"url":return"url";case"date":case"date-time":return"date"}if(e.enum)return"select";switch(e.type){case"number":case"integer":return"number";case"boolean":return"checkbox"}return"text"}function NW(e){if(!e?.properties)return[];const l=new Set(e.required??[]),a=[],n=Object.keys(e.properties),i=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(d=>typeof d=="string"&&d in e.properties):[],c=[...new Set([...i,...n])];for(const d of c){const s=e.properties[d],o=s["x-field-type"]??T2(s),m={};s.minLength!==void 0&&(m.minLength=s.minLength),s.maxLength!==void 0&&(m.maxLength=s.maxLength),s.minimum!==void 0&&(m.min=s.minimum),s.maximum!==void 0&&(m.max=s.maximum),s.multipleOf!==void 0&&(m.step=s.multipleOf),s.pattern!==void 0&&(m.pattern=s.pattern),s["x-options"]?m.options=s["x-options"]:s.enum&&(m.options=s.enum.map(r=>({label:String(r),value:String(r)})));const u=s["x-ui"]?.class,Z={id:crypto.randomUUID(),key:d,type:o,label:s.title??d,placeholder:s["x-placeholder"],description:s.description,required:l.has(d)||void 0,colSpan:h2(u)??12,colStart:p2(u),rowStart:Y2(u),rowSpan:N2(u)??Pd(o),mColSpan:W2(u)??12,mColStart:G2(u),mRowStart:L2(u),mRowSpan:X2(u),class:y2(u)||void 0,hideLabel:s["x-hide-label"]??!1,condition:s["x-ui"]?.condition||void 0,hidden:s["x-ui"]?.hidden||o==="hidden"||void 0,richTextVariant:s["x-rich-text-variant"],richTextHeight:s["x-rich-text-height"],richTextExtensions:s["x-rich-text-extensions"],markdownShowFormatting:s["x-markdown-show-formatting"],textareaRows:s["x-textarea-rows"],textareaAutoHeight:s["x-textarea-autoheight"],numberLayout:s["x-number-layout"],numberSpinner:s["x-number-spinner"]??!0,phoneOnlyCountries:Array.isArray(s["x-phone-only-countries"])?s["x-phone-only-countries"].join(", "):s["x-phone-only-countries"],selectMultiselect:s["x-select-multiselect"],selectSearchable:s["x-select-searchable"],fileMultiple:s["x-file-multiple"],fileHeight:s["x-file-height"],fileAccept:s["x-file-accept"],fileTheme:s["x-file-theme"],fileShowIcon:s["x-file-show-icon"]===!1?!1:void 0,fileIcon:s["x-file-icon"],dateEnableTime:s["x-date-enable-time"],dateMin:s["x-date-min"],dateMax:s["x-date-max"],rangeMulti:s["x-range-multi"],radioThin:s["x-radio-thin"],radioHideRadio:s["x-radio-hide-radio"],radioHideLabelWhenImage:s["x-radio-hide-label-when-image"],radioAlign:s["x-ui"]?.radioAlign??s["x-radio-align"],radioInline:s["x-radio-inline"],radioSize:s["x-radio-size"],radioTextAlign:s["x-ui"]?.radioTextAlign??s["x-radio-text-align"]??"center",textIcon:s["x-text-icon"],textIconStart:s["x-text-icon-start"],validation:Object.keys(m).length>0?m:void 0,defaultValue:s.default,content:s["x-field-type"]==="heading"?s.title:void 0};a.push(Z)}return a}function fH(e,l={}){const a={},n=[];for(const c of e){const d={};if(c.type==="heading"||c.type==="divider")d.type="string",d.title=c.content||c.label,d["x-field-type"]=c.type;else{switch(c.type){case"text":case"textarea":case"richtext":case"markdown":case"email":case"phone":case"url":case"date":case"signature":case"color":case"hidden":d.type="string";break;case"file":c.fileMultiple===!0?(d.type="array",d.items={type:"string"}):d.type="string";break;case"number":case"range":d.type="number";break;case"checkbox":case"toggle":d.type="boolean";break;case"json":d.type="object";break;case"select":case"radio":d.type="string",c.validation?.options&&(d.enum=c.validation.options.map(m=>m.value));break}c.type==="email"&&(d.format="email"),c.type==="phone"&&(d.format="tel"),c.type==="url"&&(d.format="uri"),c.type==="date"&&(d.format=c.dateEnableTime?"date-time":"date"),c.type==="color"&&(d.format="color"),d.title=c.label,c.description&&(d.description=c.description),c.defaultValue!==void 0&&(d.default=c.defaultValue),c.type!=="text"&&(d["x-field-type"]=c.type),c.validation?.minLength!==void 0&&(d.minLength=c.validation.minLength),c.validation?.maxLength!==void 0&&(d.maxLength=c.validation.maxLength),c.validation?.min!==void 0&&(d.minimum=c.validation.min),c.validation?.max!==void 0&&(d.maximum=c.validation.max),c.validation?.step!==void 0&&(d.multipleOf=c.validation.step),c.validation?.pattern!==void 0&&(d.pattern=c.validation.pattern),c.required&&(n.push(c.key),c.type==="checkbox"&&(d.const=!0))}c.placeholder&&(d["x-placeholder"]=c.placeholder),c.validation?.options&&(d["x-options"]=c.validation.options);const s=c.rowSpan??Pd(c.type),o=oW(c.class,{colSpan:c.colSpan,colStart:c.colStart,rowStart:c.rowStart,rowSpan:l.freeGrid?s>1?s:void 0:s===Pd(c.type)?void 0:s,mColSpan:c.mColSpan,mColStart:c.mColStart,mRowStart:c.mRowStart,mRowSpan:c.mRowSpan});o&&(d["x-ui"]={...d["x-ui"],class:o}),c.condition&&(d["x-ui"]={...d["x-ui"],condition:c.condition}),c.hidden===!0&&(d["x-ui"]={...d["x-ui"],hidden:!0}),c.hideLabel===!0&&(d["x-hide-label"]=!0),c.richTextVariant&&(d["x-rich-text-variant"]=c.richTextVariant),c.richTextHeight!==void 0&&(d["x-rich-text-height"]=c.richTextHeight),c.richTextExtensions!==void 0&&(d["x-rich-text-extensions"]=c.richTextExtensions),c.markdownShowFormatting===!0&&(d["x-markdown-show-formatting"]=!0),c.textareaRows!==void 0&&(d["x-textarea-rows"]=c.textareaRows),c.textareaAutoHeight===!0&&(d["x-textarea-autoheight"]=!0),c.numberLayout&&c.numberLayout!=="default"&&(d["x-number-layout"]=c.numberLayout),c.numberSpinner===!1&&(d["x-number-spinner"]=!1),c.phoneOnlyCountries&&(d["x-phone-only-countries"]=c.phoneOnlyCountries),c.selectMultiselect===!0&&(d["x-select-multiselect"]=!0),c.selectSearchable===!0&&(d["x-select-searchable"]=!0),c.fileMultiple===!0&&(d["x-file-multiple"]=!0),c.fileHeight!==void 0&&(d["x-file-height"]=c.fileHeight),c.fileAccept&&(d["x-file-accept"]=c.fileAccept),c.fileTheme&&(d["x-file-theme"]=c.fileTheme),c.fileShowIcon===!1&&(d["x-file-show-icon"]=!1),c.fileIcon&&(d["x-file-icon"]=c.fileIcon),c.dateEnableTime===!0&&(d["x-date-enable-time"]=!0),c.dateMin&&(d["x-date-min"]=c.dateMin),c.dateMax&&(d["x-date-max"]=c.dateMax),c.rangeMulti===!0&&(d["x-range-multi"]=!0),c.radioThin===!0&&(d["x-radio-thin"]=!0),c.radioHideRadio===!0&&(d["x-radio-hide-radio"]=!0),c.radioHideLabelWhenImage===!0&&(d["x-radio-hide-label-when-image"]=!0),c.radioAlign&&(d["x-ui"]={...d["x-ui"],radioAlign:c.radioAlign}),c.radioInline===!0&&(d["x-radio-inline"]=!0),c.radioSize&&(d["x-radio-size"]=c.radioSize),c.radioTextAlign&&(d["x-ui"]={...d["x-ui"],radioTextAlign:c.radioTextAlign}),c.textIcon&&(d["x-text-icon"]=c.textIcon),c.textIconStart&&(d["x-text-icon-start"]=c.textIconStart),a[c.key]=d}const i={$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:a};return n.length>0&&(i.required=n),i}function Am(e,l){if(typeof l!="string")return l;const a=l.trim();switch(e.type){case"checkbox":case"toggle":return a.toLowerCase()==="true"?!0:a.toLowerCase()==="false"?!1:l;case"number":case"range":{if(!a)return l;const n=Number(a);return Number.isNaN(n)?l:n}default:return l}}function FH(e,l){const a={};for(const n of e)if(!(n.type==="heading"||n.type==="divider")){if(l&&n.key in l){a[n.key]=Am(n,l[n.key]);continue}if(n.defaultValue!==void 0){a[n.key]=Am(n,n.defaultValue);continue}switch(n.type){case"checkbox":case"toggle":a[n.key]=!1;break;case"number":case"range":a[n.key]=n.validation?.min??0;break;default:a[n.key]=""}}return a}function kH(e,l){const a={};for(const n of e){if(n.type==="heading"||n.type==="divider"||n.type==="hidden"||n.hidden===!0)continue;const i=l[n.key];if(n.required&&(i==null||i==="")){a[n.key]=`${n.label} is required`;continue}if(i==null||i==="")continue;const c=n.validation;if(typeof i=="string"){if(c?.minLength!==void 0&&i.length<c.minLength){a[n.key]=`${n.label} must be at least ${c.minLength} characters`;continue}if(c?.maxLength!==void 0&&i.length>c.maxLength){a[n.key]=`${n.label} must be at most ${c.maxLength} characters`;continue}if(c?.pattern&&!new RegExp(c.pattern).test(i)){a[n.key]=`${n.label} format is invalid`;continue}}if(typeof i=="number"){if(c?.min!==void 0&&i<c.min){a[n.key]=`${n.label} must be at least ${c.min}`;continue}if(c?.max!==void 0&&i>c.max){a[n.key]=`${n.label} must be at most ${c.max}`;continue}}}return a}function jH(e){return{fields:(0,t.computed)(()=>NW(e.value))}}const JH=!0;var Ue=class{_type;_config;_condition;_hidden;_validations;_onUpdate;_class;_slots;_component;constructor(e,l={}){this._type=e,this._config=l}if(e){return this._condition=e,this}hidden(e=!0){return this._hidden=e,this}validate(e){return this._validations||(this._validations=[]),this._validations.push(e),this}onUpdate(e){return this._onUpdate=e,this}class(e){return this._class=this._class?`${this._class} ${e}`:e,this}required(e){return this._config.required=!0,e&&(this._config.requiredMessage=e),this}slot(e,l,a){return this._slots||(this._slots=[]),typeof e!="string"||l!==void 0&&typeof l!="string"?this._slots.push({component:e,props:l}):this._slots.push({name:e,component:l,props:a}),this}};function il(e,l){return typeof e=="string"?{...l,label:e}:e??{}}const cl={text(e,l){return new Ue("text",il(e,l))},email(e,l){return new Ue("email",il(e,l))},password(e,l){return new Ue("password",il(e,l))},number(e,l){return new Ue("number",il(e,l))},tel(e,l){return new Ue("tel",il(e,l))},url(e,l){return new Ue("url",il(e,l))},date(e,l){return new Ue("date",il(e,l))},time(e,l){return new Ue("time",il(e,l))},datetime(e,l){return new Ue("datetime",il(e,l))},textarea(e,l){return new Ue("textarea",il(e,l))},richtext(e,l){return new Ue("richtext",il(e,l))},json(e,l){const a=il(e,l);return a.language||(a.language="json"),new Ue("json",a)},checkbox(e,l){return new Ue("checkbox",il(e,l))},toggle(e,l){return new Ue("toggle",il(e,l))},radio(e,l,a){if(typeof e=="string"){const n=e,i=l;return new Ue("radio",{...a,label:n,options:i})}return new Ue("radio",{...il(l,a),options:e})},select(e,l,a){if(typeof e=="string"){const n=e,i=l;return new Ue("select",{...a,label:n,options:i})}return new Ue("select",{...il(l,a),options:e})},multiselect(e,l,a){if(typeof e=="string"){const n=e,i=l;return new Ue("multiselect",{...a,label:n,options:i,multiple:!0})}return new Ue("multiselect",{...il(l,a),options:e})},color(e,l){return new Ue("color",il(e,l))},icon(e,l){return new Ue("icon",il(e,l))},range(e,l){return new Ue("range",il(e,l))},custom(e,l,a){return Xt(e)||zs(e),new Ue(e,il(l,a))},upload(e,l){return new Ue("upload",il(e,l))},array(e,l,a){if(typeof e=="string"){const i=e,c=l;return new Ue("array",{...a??{},label:i,schema:c})}const n=e;return new Ue("array",{...il(l,a),schema:n})},component(e,l={}){const a=new Ue("component",l);return a._component={component:e,props:l},a},display(e,l={}){const a=new Ue("display",l);return a._component={component:e,props:l},a}};var _m=class YW{_isSchema=!0;_label;_fields;_condition;_class;constructor(l,a){this._fields=l,this._label=a}if(l){return this._condition=l,this}class(l){return this._class=this._class?`${this._class} ${l}`:l,this}defaults(l){for(const[a,n]of Object.entries(l))this._fields[a]&&this._fields[a]._config.default===void 0&&(this._fields[a]._config.default=n);return this}getDefaults(){const l={};for(const[a,n]of Object.entries(this._fields))n._config.default!==void 0&&(l[a]=n._config.default);return l}toJSONSchema(){const l={},a=[];for(const[c,d]of Object.entries(this._fields)){const s=d._config,o=Xt(d._type),m=o?.jsonSchema?.type??YW.getJSONSchemaType(d._type),u={type:m};if(s.label&&(u.title=s.label),s.helpText&&(u.description=s.helpText),s.default!==void 0&&(u.default=s.default),s.options){const b=s.options,h=b.map(G=>ba(G)??G);d._type==="multiselect"?u.items={type:"string",enum:h}:u.enum=h,(d._type==="select"||d._type==="multiselect"||d._type==="radio")&&b.every(G=>G&&typeof G=="object"&&"label"in G&&"value"in G)&&(u["x-options"]=b)}s.min!==void 0&&(u[m==="string"?"minLength":"minimum"]=s.min),s.max!==void 0&&(u[m==="string"?"maxLength":"maximum"]=s.max),d._type==="email"&&(u.format="email"),d._type==="url"&&(u.format="uri"),d._type==="date"&&(u.format="date"),d._type==="time"&&(u.format="time"),d._type==="datetime"&&(u.format="date-time");const Z={};if(d._type!=="text"&&(Z.fieldType=d._type),o){u["x-field-type"]=d._type;const b=o.translatableSettings?.map(h=>h.key);b?.length&&(u["x-translatable-settings"]=b)}s.placeholder&&(Z.placeholder=s.placeholder),s.disabled&&(Z.disabled=s.disabled),s.readonly&&(Z.readonly=s.readonly),s.autoheight&&(Z.autoheight=s.autoheight),s.rows&&(Z.rows=s.rows),s.cols&&(Z.cols=s.cols),(d._type==="select"||d._type==="multiselect")&&s.searchable!==void 0&&(u["x-select-searchable"]=s.searchable),d._class&&(Z.class=d._class),d._condition&&(Z.condition=d._condition),d._hidden&&(Z.hidden=!0),d._type==="array"&&(s.allowAdd!==void 0&&(Z.allowAdd=s.allowAdd),s.allowDelete!==void 0&&(Z.allowDelete=s.allowDelete),s.schema&&typeof s.schema.toJSONSchema=="function"&&(u.items=s.schema.toJSONSchema())),d._component&&(Z.component=typeof d._component.component=="string"?d._component.component:d._component.component.name||"CustomComponent",d._component.props&&(Z.componentProps=d._component.props)),Object.keys(Z).length>0&&(u["x-ui"]=Z);const r=o?.jsonSchema?.serialize?.(s,{key:c,required:s.required===!0});r&&Object.assign(u,r),l[c]=u,s.required===!0&&a.push(c)}const n={type:"object",properties:l};a.length>0&&(n.required=a),this._label&&(n.title=this._label);const i={};return this._condition&&(i.condition=this._condition),this._class&&(i.class=this._class),Object.keys(i).length>0&&(n["x-ui"]=i),n}static getJSONSchemaType(l){return{text:"string",email:"string",password:"string",number:"number",tel:"string",url:"string",date:"string",time:"string",datetime:"string",textarea:"string",richtext:"string",json:"object",checkbox:"boolean",toggle:"boolean",radio:"string",select:"string",multiselect:"array",array:"array"}[l]||"string"}};function CH(e,l){if(typeof e=="string"){if(!l)throw new Error("Fields are required when providing a label");return new _m(l,e)}return new _m(e)}function DH(e){return e}function UH(e){return async(l,a)=>{if(!l.endpoint.startsWith("/")||l.endpoint.startsWith("//"))throw new Error("Form option endpoints must be same-origin paths");const n={};return l.searchParam&&a&&(n[l.searchParam]=a),l.limitParam&&l.limit!=null&&(n[l.limitParam]=l.limit),(await e.get(l.endpoint,{params:n})).data}}function Kc(e,l){return l?l.split(".").reduce((a,n)=>{if(!(a==null||typeof a!="object"))return a[n]},e):e}function ub(e,l){const a=Kc(e,l.itemsPath);return Array.isArray(a)?a.flatMap(n=>{const i=Kc(n,l.valuePath??"id"),c=Kc(n,l.labelPath??"name");if(i==null||c==null)return[];const d=l.subtitlePath?Kc(n,l.subtitlePath):void 0;return[{label:String(c),value:String(i),...d==null?{}:{subtitle:String(d)}}]}):[]}function Qd(e,l){const a={},n=new Set(e.required||[]);if(e.properties){const c=Object.keys(e.properties),d=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(s=>typeof s=="string"&&s in e.properties):[];for(const s of new Set([...d,...c])){const o=e.properties[s];a[s]=BH(s,o,n.has(s),e,l?.loadOptionsSource)}}const i=new _m(a,e.title);return e["x-ui"]?.condition&&i.if(e["x-ui"].condition),e["x-ui"]?.class&&i.class(e["x-ui"].class),i}function OH(e,l){const a=e.match(/^#\/(\$defs|definitions)\/(.+)$/);if(!a)return;const[,n,i]=a,c=n==="$defs"?l.$defs:l.definitions;return i?c?.[i]:void 0}function EH(e,l){const a=e.anyOf||e.oneOf;if(!a||a.length===0)return e;const n=a.filter(d=>d.type!=="null");if(n.length===1){const d=n[0];return{...d,...e,type:e.type??d.type,title:e.title||d.title,description:e.description||d.description,default:e.default!==void 0?e.default:d.default,"x-ui":{...d["x-ui"],...e["x-ui"]}}}const i=["object","array","string","number","integer","boolean"],c=n.sort((d,s)=>i.indexOf(d.type||"string")-i.indexOf(s.type||"string"))[0];return{...c,...e,type:e.type??c.type,title:e.title||c.title,description:e.description||c.description,default:e.default!==void 0?e.default:c.default,"x-ui":{...c["x-ui"],...e["x-ui"]}}}function BH(e,l,a,n,i){let c=l;if(l.$ref){const b=OH(l.$ref,n);b&&(c={...b,type:l.type??b.type,enum:l.enum??b.enum,title:l.title??b.title,description:l.description??b.description,default:l.default!==void 0?l.default:b.default,"x-ui":{...b["x-ui"],...l["x-ui"]}})}(c.anyOf||c.oneOf)&&(c=EH(c,n));const d=c["x-ui"]||{};let s=d.fieldType||c["x-field-type"]||Zb(c);s==="select"&&c["x-select-multiselect"]&&(s="multiselect");const o=c["x-options"],m={},u=Xt(s);c.title&&(m.label=c.title),c.description&&(m.helpText=c.description),c.default!==void 0&&(m.default=c.default),(a||d.required===!0)&&(m.required=!0),d.placeholder&&(m.placeholder=d.placeholder),c["x-placeholder"]&&(m.placeholder=c["x-placeholder"]),KH(m,c),u?.settingsDefaults&&Object.assign(m,u.settingsDefaults);const Z=u?.jsonSchema?.parse?.(c,{key:e,required:a||d.required===!0});if(Z&&Object.assign(m,Z),c["x-options-source"]){if(!i)throw new Error(`Field "${e}" requires an x-options-source loader`);const b=c["x-options-source"];let h;m.options=async G=>{const N=b.searchParam?ub(await i(b,G),b):h??=ub(await i(b,b.searchParam?G:""),b);if(b.searchParam||!G.trim())return N;const p=G.trim().toLocaleLowerCase();return N.filter(W=>[W.label,W.subtitle,W.value].some(Y=>Y?.toLocaleLowerCase().includes(p)))},c["x-select-searchable"]===void 0&&(m.searchable=!0)}d.radioAlign!==void 0&&(m.align=d.radioAlign),d.radioTextAlign!==void 0&&(m.textAlign=d.radioTextAlign),d.disabled&&(m.disabled=d.disabled),d.readonly&&(m.readonly=d.readonly),d.autoheight&&(m.autoheight=d.autoheight),d.rows&&(m.rows=d.rows),d.cols&&(m.cols=d.cols),c.minimum!==void 0&&(m.min=c.minimum),c.maximum!==void 0&&(m.max=c.maximum),c.minLength!==void 0&&(m.min=c.minLength),c.maxLength!==void 0&&(m.max=c.maxLength),c.pattern!==void 0&&(m.pattern=c.pattern);let r;switch(s){case"heading":r=new Ue("heading",m);break;case"divider":r=new Ue("divider",m);break;case"email":r=cl.email(m);break;case"password":r=cl.password(m);break;case"number":r=cl.number(m);break;case"tel":case"phone":r=cl.tel(m);break;case"url":r=cl.url(m);break;case"date":r=cl.date(m);break;case"time":r=cl.time(m);break;case"datetime":r=cl.datetime(m);break;case"textarea":r=cl.textarea(m);break;case"richtext":r=cl.richtext(m);break;case"json":r=cl.json(m);break;case"checkbox":r=cl.checkbox(m);break;case"toggle":r=cl.toggle(m);break;case"radio":r=cl.radio(o??c.enum??[],m);break;case"select":r=cl.select(m.options??o??c.enum??[],m);break;case"multiselect":r=cl.multiselect(m.options??o??c.enum??[],m);break;case"icon":r=cl.icon(m);break;case"file":case"upload":r=cl.upload(m);break;case"array":{const b={...m};d.allowAdd!==void 0&&(b.allowAdd=d.allowAdd),d.allowDelete!==void 0&&(b.allowDelete=d.allowDelete);const h=c.items?.type==="object"?Qd(c.items,{loadOptionsSource:i}):void 0;c.items?.type&&(b.itemType=Zb(c.items)),r=cl.array(c.title||e,h,b);break}case"display":r=cl.display(d.component||"div",d.componentProps||{});break;case"component":r=cl.component(d.component||"div",d.componentProps||{});break;default:u?r=new Ue(s,m):xs(s)?(zs(s),m.missingCustomRegistration=!0,r=new Ue(s,m)):r=cl.text(m);break}if(d.component&&s!=="component"&&s!=="display"&&(r._component={component:d.component,props:d.componentProps||{}}),c.const!==void 0&&r.validate(b=>b===c.const?!0:m.requiredMessage||"form.required"),c.pattern){const b=new RegExp(c.pattern);r.validate(h=>h==null||h===""||b.test(String(h))?!0:"form.pattern")}return d.class&&r.class(d.class),d.condition&&r.if(d.condition),d.hidden&&r.hidden(),r}function KH(e,l){const a=l,n=(d,s)=>{a[s]!==void 0&&(e[d]=a[s])};a["x-radio-inline"]&&(e.inline=!0),a["x-radio-thin"]&&(e.thin=!0),a["x-radio-hide-radio"]&&(e.hideRadio=!0),a["x-radio-hide-label-when-image"]&&(e.hideLabelWhenImage=!0),n("align","x-radio-align"),n("textAlign","x-radio-text-align"),a["x-select-multiselect"]&&(e.multiple=!0),n("searchable","x-select-searchable"),n("rows","x-textarea-rows"),n("autoheight","x-textarea-autoheight"),n("layout","x-number-layout"),a["x-number-spinner"]===!1&&(e.spinner=!1),typeof a["x-phone-only-countries"]=="string"?e.onlyCountries=a["x-phone-only-countries"].split(",").map(d=>d.trim()).filter(Boolean):Array.isArray(a["x-phone-only-countries"])&&(e.onlyCountries=a["x-phone-only-countries"]),n("defaultCountry","x-phone-default-country"),a["x-range-multi"]&&(e.multiRange=!0),a["x-file-multiple"]&&(e.multiple=!0);const i=a["x-file-height"];i!==void 0&&(e.height=typeof i=="number"?`${i}px`:i),n("accept","x-file-accept"),n("theme","x-file-theme"),a["x-file-show-icon"]===!1&&(e.showIcon=!1),n("icon","x-file-icon"),a["x-date-enable-time"]&&(e.enableTime=!0),n("min","x-date-min"),n("max","x-date-max"),n("icon","x-text-icon"),n("iconStart","x-text-icon-start");const c=a["x-rich-text-variant"];c==="basic"?e.basic=!0:c==="simple"&&(e.simple=!0),n("height","x-rich-text-height"),n("extensions","x-rich-text-extensions"),a["x-markdown-show-formatting"]&&(e.showFormatting=!0),a["x-hide-label"]===!0&&(e.hideLabel=!0)}function Zb(e){if(e.format)switch(e.format){case"email":return"email";case"uri":return"url";case"date":return"date";case"time":return"time";case"date-time":return"datetime"}if(e.enum)return"select";switch(e.type){case"boolean":return"checkbox";case"number":case"integer":return"number";case"array":return"array";case"object":return"json";default:return"text"}}var HH={class:"multi-step-form"},PH={class:"step-progress"},QH=["onClick"],AH={class:"step-number"},_H={class:"step-label"},$H={key:0},qH={key:0,class:"step-title"},eP={key:1,class:"validation-errors"},lP={class:"step-navigation"},tP=["disabled"],aP={class:"step-counter"},nP=(0,t.defineComponent)({__name:"MultiStepForm",props:{schema:{},modelValue:{},currentStep:{},components:{},validateOnNext:{type:Boolean,default:!0}},emits:["update:modelValue","update:currentStep","stepChange","complete","validationError"],setup(e,{expose:l,emit:a}){const n=e,i=a,{$t:c}=al(),d=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(d)),o=(0,t.ref)({...n.modelValue||{}}),m=(0,t.ref)(n.currentStep!=null&&n.currentStep!==""?n.currentStep:Object.keys(n.schema)[0]);let u=!1;(0,t.watch)(()=>n.modelValue,f=>{u||(o.value={...f||{}})},{deep:!0}),(0,t.watch)(o,f=>{u=!0,i("update:modelValue",f),setTimeout(()=>{u=!1},0)},{deep:!0}),(0,t.watch)(()=>n.currentStep,f=>{f!=null&&(m.value=f)}),(0,t.watch)(m,f=>{i("update:currentStep",f),i("stepChange",f)});function Z(f,J){const E=J.split(".");let ee=f;for(const B of E)ee=ee?.[B];return ee}function r(f,J){if(!f)return!0;try{const E=vi(f);if(E.length===0)return!0;let ee=!0,B=null;for(let U=0;U<E.length;U++){const _=E[U],de=Z(J,_.field),{op:k,value:K,connector:O}=_;let x=!1;switch(k){case"eq":x=de===K;break;case"ne":x=de!==K;break;case"gt":x=K!=null&&de>K;break;case"ge":x=K!=null&&de>=K;break;case"lt":x=K!=null&&de<K;break;case"le":x=K!=null&&de<=K;break;case"co":x=K!=null&&String(de).includes(String(K));break;case"sw":x=K!=null&&String(de).startsWith(String(K));break;case"ew":x=K!=null&&String(de).endsWith(String(K));break;case"pr":x=de!=null;break;default:x=!1}U===0?(ee=x,B=x):(O==="or"?ee=(B??!1)||x:O==="and"&&(ee=(B??!1)&&x),B=ee)}return ee}catch{return!0}}function b(f){return f._condition==null?!0:r(f._condition,o.value)}const h=(0,t.computed)(()=>Object.entries(n.schema).filter(([,f])=>b(f)).map(([f,J])=>({key:f,schema:J}))),G=(0,t.computed)(()=>h.value.findIndex(f=>f.key===m.value)),N=(0,t.computed)(()=>G.value===0),p=(0,t.computed)(()=>G.value===h.value.length-1),W=(0,t.computed)(()=>h.value[G.value]?.schema),Y=(0,t.ref)({});function L(f){return f._hidden?!1:f._condition==null?!0:r(f._condition,o.value)}function X(f){const J=f.replace(/\[(\d+)\]/g,".$1");return Z(o.value,J)}function V(f){return!!(f==null||typeof f=="string"&&f.trim()===""||Array.isArray(f)&&f.length===0)}function M(){if(!n.validateOnNext||W.value==null)return!0;const f={},J=W.value._fields;for(const[E,ee]of Object.entries(J)){if(ee._type==="display"||!L(ee))continue;const B=X(E),U=ee._config;if(U.required===!0&&V(B)){f[E]=`${typeof U.label=="string"?U.label:E} is required`;continue}if(ee._validations&&!V(B))for(const _ of ee._validations){const de=_(B);if(de!==!0){f[E]=de;break}}}return Y.value=f,Object.keys(f).length>0?(i("validationError",f),!1):!0}function T(f,J){return J._label!=null?J._label:f.split(/[._-]/).map(E=>E.charAt(0).toUpperCase()+E.slice(1)).join(" ")}function w(f){const J=h.value.findIndex(E=>E.key===f);if(J!==-1){if(J<G.value){m.value=f,Y.value={};return}J>G.value&&!M()||(m.value=f)}}function I(){if(M())if(p.value)i("complete");else{const f=G.value+1;m.value=h.value[f].key,Y.value={}}}function j(){if(!N.value){const f=G.value-1;m.value=h.value[f].key,Y.value={}}}return l({validateCurrentStep:M,stepErrors:Y,nextStep:I,prevStep:j,goToStep:w,visibleSteps:h,activeStep:m,currentStepIndex:G,isFirstStep:N,isLastStep:p}),(f,J)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",HH,[(0,t.createElementVNode)("div",PH,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(E,ee)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:E.key,class:(0,t.normalizeClass)(["step-indicator",{active:E.key===m.value,completed:ee<G.value}]),onClick:B=>w(E.key)},[(0,t.createElementVNode)("div",AH,(0,t.toDisplayString)(ee+1),1),(0,t.createElementVNode)("div",_H,(0,t.toDisplayString)(T(E.key,E.schema)),1)],10,QH))),128))]),W.value!=null?((0,t.openBlock)(),(0,t.createElementBlock)("div",$H,[W.value._label?((0,t.openBlock)(),(0,t.createElementBlock)("h2",qH,(0,t.toDisplayString)(W.value._label),1)):(0,t.createCommentVNode)("",!0),Object.keys(Y.value).length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",eP,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(Y.value,(E,ee)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:ee},(0,t.toDisplayString)(E),1))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(f.$slots,`step:${m.value}`,{schema:W.value,formData:o.value,stepKey:m.value,errors:Y.value},()=>[(0,t.createVNode)(ws,{modelValue:o.value,"onUpdate:modelValue":J[0]||(J[0]=E=>o.value=E),schema:W.value,components:e.components,errors:Y.value},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,E=>({name:E,fn:(0,t.withCtx)(ee=>[(0,t.renderSlot)(f.$slots,E,(0,t.normalizeProps)((0,t.guardReactiveProps)(ee)),void 0,!0)])}))]),1032,["modelValue","schema","components","errors"])],!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",lP,[(0,t.createElementVNode)("button",{type:"button",class:"btn-secondary",disabled:N.value,onClick:j},(0,t.toDisplayString)((0,t.unref)(c)("multiStep.previous")),9,tP),(0,t.createElementVNode)("div",aP,(0,t.toDisplayString)((0,t.unref)(c)("multiStep.step",{current:G.value+1,total:h.value.length})),1),(0,t.createElementVNode)("button",{type:"button",class:"btn-primary",onClick:I},(0,t.toDisplayString)(p.value?(0,t.unref)(c)("multiStep.complete"):(0,t.unref)(c)("multiStep.next")),1)])]))}}),iP=Le(nP,[["__scopeId","data-v-7a55f4bb"]]);function cP(){return{steps:[],transitions:[]}}function dP(e){return!!e&&e.steps.length>1}function ua(e,l){if(l!=null)return e.steps.find(a=>a.key===l)}function LW(e,l){return e.transitions.filter(a=>a.from===l)}function sP(e){const l=e.schema?.properties;return l&&typeof l=="object"?Object.entries(l):[]}function XW(e){return e?.autoAdvance===!0}function yW(e){if(!e)return null;const l=sP(e);return l.length===1?l[0][0]:null}function Ad(e){return e.startId&&ua(e,e.startId)?e.startId:e.steps[0]?.key}function ec(e,l,a){for(const n of LW(e,l))if(!n.condition||n.condition.trim()===""||gu(n.condition,a))return n.to;return null}function oP(e,l,a){return ec(e,l,a)===null}function $m(e,l,a){const n=Ad(e);if(!n||!l)return 0;const i=new Set;let c=n,d=0,s=0,o=!1;for(;c&&!i.has(c);)i.add(c),s++,o||(c===l?o=!0:d++),c=ec(e,c,a);return s<=1?o?100:0:Math.round(d/(s-1)*100)}function mP(e){const l={},a=[];for(const i of e.steps){const c=i.schema?.properties;c&&typeof c=="object"&&Object.assign(l,c);const d=i.schema?.required;if(Array.isArray(d))for(const s of d)a.includes(s)||a.push(s)}const n={type:"object",properties:l};return a.length&&(n.required=a),n}var uP={key:0,class:"ffp-stages","aria-label":"Form stages"},ZP={class:"ffp-stage-list p-0 m-0"},rP={class:"ffp-stage-progress"},bP={class:"ffp-stage"},hP=["data-step-key"],pP={key:0,class:"ffp-title"},WP={key:1,class:"ffp-empty"},GP={class:"ffp-nav flex flex-center gap-1"},NP={key:0,class:"ffp-counter flex-center round bg-primary-10 color-primary px-075 txt13 medium tabular-nums"},YP=(0,t.defineComponent)({__name:"FormFlowPlayer",props:{structure:{},modelValue:{},components:{},initialStepKey:{},formName:{default:""},animated:{type:Boolean,default:!0},autoAdvance:{type:Boolean,default:!0},autoAdvanceDelay:{default:200},redirect:{type:Boolean,default:!0},hideTitle:{type:Boolean,default:!1},hideCounter:{type:Boolean,default:!1},showStages:{type:Boolean,default:!1},onComplete:{},beforePrimary:{},loadOptionsSource:{}},emits:["update:modelValue","stepChange","progress","stepEnter","stepComplete","formComplete","redirect","complete"],setup(e,{expose:l,emit:a}){const n=e,i=a,{$t:c}=al(),d=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(d).filter(y=>y!=="nav"&&y!=="primary-label"&&y!=="step"&&y!=="empty")),o=(0,t.ref)("next"),m=(0,t.computed)(()=>n.animated?o.value==="prev"?"ffp-slide-prev":"ffp-slide-next":""),u=(0,t.ref)({...n.modelValue||{}});(0,t.watch)(u,y=>i("update:modelValue",y),{deep:!0}),(0,t.watch)(()=>n.modelValue,y=>{y&&y!==u.value&&(u.value={...y})},{deep:!0});function Z(){const y=n.initialStepKey;return y&&ua(n.structure,y)?y:Ad(n.structure)}const r=(0,t.ref)(Z()),b=(0,t.ref)([]),h=(0,t.ref)(new Set);(0,t.watch)(()=>n.structure,()=>{r.value=Z(),b.value=[],h.value=new Set},{deep:!0}),(0,t.watch)(()=>n.initialStepKey,y=>{!y||y===r.value||!ua(n.structure,y)||(r.value=y,b.value=[],h.value=new Set)}),(0,t.watch)(r,y=>{y&&i("stepChange",y)},{immediate:!0});const G=(0,t.computed)(()=>ua(n.structure,r.value??null));function N(y){const R=ua(n.structure,y),g=$m(n.structure,y,u.value),Q=b.value.length+1,P=g>0?Math.round(Q/g*100):null;return{formName:n.formName,stepKey:y,stepTitle:R?.title??"",stepIndex:Q,totalSteps:P,skipSubmit:R?.skipSubmit??!1,formData:{...u.value}}}(0,t.watch)(r,(y,R)=>{y&&y!==R&&i("stepEnter",N(y))},{immediate:!0});const p=(0,t.computed)(()=>{const y=G.value;return y?Qd(y.schema,{loadOptionsSource:n.loadOptionsSource}):null}),W=(0,t.computed)(()=>Object.assign({},...n.structure.steps.map(y=>Qd(y.schema,{loadOptionsSource:n.loadOptionsSource})._fields))),Y=(0,t.computed)(()=>r.value?ec(n.structure,r.value,u.value):null),L=(0,t.computed)(()=>Y.value===null),X=(0,t.computed)(()=>b.value.length>0),V=(0,t.computed)(()=>$m(n.structure,r.value,u.value));(0,t.watch)(V,y=>i("progress",y),{immediate:!0});const M=(0,t.computed)(()=>{const y=[],R=new Set;let g=Ad(n.structure);for(;g&&!R.has(g);){R.add(g);const Q=ua(n.structure,g);if(!Q)break;y.push(Q),g=ec(n.structure,g,u.value)??void 0}return y}),T=(0,t.computed)(()=>M.value.findIndex(y=>y.key===r.value));(0,t.watch)([M,T],([y,R])=>{R<=0||(b.value.length===0&&(b.value=y.slice(0,R).map(g=>g.key)),h.value=new Set([...h.value,...y.slice(0,R).map(g=>g.key)]))},{immediate:!0});const w=(0,t.ref)(null),I=(0,t.ref)(!1);function j(y){w.value=y}function f(){return w.value?.validate()??!0}async function J(){if(I.value||!f())return;const y=G.value;I.value=!0;let R=!1;try{if(await n.beforePrimary?.({data:{...u.value},currentStep:y,isTerminal:L.value})===!1)return;if(L.value){const Q=b2(W.value,u.value);y?.skipSubmit||await n.onComplete?.(Q),r.value&&i("formComplete",N(r.value));const P=y?.redirectUrl?.trim();P&&(R=!0,i("redirect",P),n.redirect&&typeof window<"u"&&window.location.assign(P)),i("complete",{...u.value});return}const g=Y.value;if(g&&r.value){h.value=new Set([...h.value,r.value]);const Q=ua(n.structure,g);i("stepComplete",{...N(r.value),destinationStepKey:g,destinationStepTitle:Q?.title??""}),o.value="next",b.value.push(r.value),r.value=g}}finally{R||(I.value=!1)}}const E=(0,t.computed)(()=>n.autoAdvance&&XW(G.value)),ee=(0,t.computed)(()=>yW(G.value));let B=null;const U=(0,t.ref)(null);function _(){B&&(clearTimeout(B),B=null)}const de=(0,t.ref)(ee.value?u.value[ee.value]:void 0);(0,t.watch)(r,()=>{_(),U.value=null,de.value=ee.value?u.value[ee.value]:void 0},{flush:"sync"}),(0,t.watch)(()=>ee.value?u.value[ee.value]:void 0,y=>{E.value&&U.value!==r.value&&(!(y!=null&&y!=="")||y===de.value||(_(),B=setTimeout(()=>{E.value&&(U.value=r.value??null,J())},n.autoAdvanceDelay)))});function k(){const y=b.value.pop();y&&(o.value="prev",r.value=y)}function K(y){return y===r.value||h.value.has(y)?!0:y===Y.value}async function O(y){if(y===r.value||!K(y))return;const R=M.value.findIndex(Q=>Q.key===y),g=T.value;if(!(R<0||g<0)){if(y===Y.value){await J();return}o.value=R<g?"prev":"next",b.value=M.value.slice(0,R).map(Q=>Q.key),r.value=y}}const x=(0,t.computed)(()=>b.value.length+1);return l({formData:u,currentKey:r,nextKey:Y,isTerminal:L,progress:V,completedKeys:h,validateStep:f}),(y,R)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["form-flow-player",{"form-flow-player--stages":e.showStages}])},[e.showStages?((0,t.openBlock)(),(0,t.createElementBlock)("nav",uP,[(0,t.createElementVNode)("ol",ZP,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,(g,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:g.key},[(0,t.createVNode)(Lt,{rounded:"",color:"purple",title:g.title,active:r.value===g.key,disabled:!K(g.key),"aria-current":r.value===g.key?"step":void 0,onClick:P=>O(g.key)},{media:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(["ffp-stage-number flex-center round border",r.value===g.key?"bg-primary color-white border-transparent":h.value.has(g.key)?"bg-green color-white border-green":"color-gray"])},[h.value.has(g.key)&&r.value!==g.key?((0,t.openBlock)(),(0,t.createBlock)(Ne,{key:0,icon:"check",size:.9})):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(Q+1),1)],64))],2)]),_:2},1032,["title","active","disabled","aria-current","onClick"])]))),128))]),(0,t.createElementVNode)("div",rP,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(G.value?.title),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(T.value+1)+" / "+(0,t.toDisplayString)(M.value.length),1),(0,t.createVNode)(i5,{class:"w-100p mt-05",value:V.value,size:8},null,8,["value"])])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",bP,[(0,t.createVNode)(t.Transition,{name:m.value,mode:"out-in"},{default:(0,t.withCtx)(()=>[G.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.value,class:"ffp-step","data-step-key":r.value},[!e.hideTitle&&G.value.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",pP,(0,t.toDisplayString)(G.value.title),1)):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(y.$slots,"step",{step:G.value,formData:u.value,stepKey:r.value,schema:p.value,setFormRef:j},()=>[p.value?((0,t.openBlock)(),(0,t.createBlock)(ws,{key:0,ref_key:"formRef",ref:w,modelValue:u.value,"onUpdate:modelValue":R[0]||(R[0]=g=>u.value=g),schema:p.value,components:e.components},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,g=>({name:g,fn:(0,t.withCtx)(Q=>[(0,t.renderSlot)(y.$slots,g,(0,t.normalizeProps)((0,t.guardReactiveProps)(Q)),void 0,!0)])}))]),1032,["modelValue","schema","components"])):(0,t.createCommentVNode)("",!0)],!0)],8,hP)):((0,t.openBlock)(),(0,t.createElementBlock)("div",WP,[(0,t.renderSlot)(y.$slots,"empty",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.empty")??"No steps to display."),1)],!0)]))]),_:3},8,["name"])]),(0,t.renderSlot)(y.$slots,"nav",{canGoBack:X.value,isTerminal:L.value,submitting:I.value,goBack:k,goPrimary:J,stepPosition:x.value,progress:V.value,currentKey:r.value,primaryLabel:G.value?.primaryLabel,autoAdvances:E.value},()=>[(0,t.createElementVNode)("div",GP,[(0,t.createVNode)(oe,{class:"ffp-nav-btn icon-rtl-180",flat:"",icon:"chevron_left",value:(0,t.unref)(c)?.("multiStep.previous")??"Back",disabled:!X.value,onClick:k},null,8,["value","disabled"]),e.hideCounter?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",NP,(0,t.toDisplayString)(x.value),1)),L.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:1,class:"ffp-nav-btn",value:G.value?.primaryLabel||(0,t.unref)(c)?.("multiStep.complete")||"Submit",loading:I.value,onClick:J},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.complete")??"Submit"),1)],!0)]),_:3},8,["value","loading"])):((0,t.openBlock)(),(0,t.createBlock)(oe,{key:2,class:"ffp-nav-btn icon-rtl-180","icon-end":"chevron_right",value:(0,t.unref)(c)?.("multiStep.next")??"Next",disabled:I.value,onClick:J},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!1},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.next")??"Next"),1)],!0)]),_:3},8,["value","disabled"]))])],!0)],2))}}),LP=Le(YP,[["__scopeId","data-v-0b0a3072"]]),XP="5.4.0";function MW(e,l){for(const a in l)Object.hasOwn(l,a)&&(typeof l[a]=="object"&&e[a]?MW(e[a],l[a]):e[a]=l[a])}var Vt={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function lc(e,l){let a=Vt.themes[e]||{},n;do n=a[l],typeof n>"u"?a.$extend?a=Vt.themes[a.$extend]||{}:(a=null,n=Vt[l]):a=null;while(a);return n}function yP(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend&&!a.$resetCss?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l.map(n=>`v-popper--theme-${n}`)}function rb(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l}var Rs=(()=>{if(typeof window>"u")return!1;let e=!1;try{const l=Object.defineProperty({},"passive",{get(){e=!0}});window.addEventListener("test",null,l)}catch{}return e})(),MP=typeof window<"u"&&typeof navigator<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,VW=["auto","top","bottom","left","right"].reduce((e,l)=>e.concat([l,`${l}-start`,`${l}-end`]),[]),bb={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},hb={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function pb(e,l){const a=e.indexOf(l);a!==-1&&e.splice(a,1)}function Fo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var mt=[],Sa=null,Wb={};function Gb(e){let l=Wb[e];return l||(l=Wb[e]=[]),l}var qm=function(){};typeof window<"u"&&(qm=window.Element);function De(e){return function(l){return lc(l.theme,e)}}var ko="__floating-vue__popper",TW=()=>(0,t.defineComponent)({name:"VPopper",provide(){return{[ko]:{parentPopper:this}}},inject:{[ko]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:De("disabled")},positioningDisabled:{type:Boolean,default:De("positioningDisabled")},placement:{type:String,default:De("placement"),validator:e=>VW.includes(e)},delay:{type:[String,Number,Object],default:De("delay")},distance:{type:[Number,String],default:De("distance")},skidding:{type:[Number,String],default:De("skidding")},triggers:{type:Array,default:De("triggers")},showTriggers:{type:[Array,Function],default:De("showTriggers")},hideTriggers:{type:[Array,Function],default:De("hideTriggers")},popperTriggers:{type:Array,default:De("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:De("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:De("popperHideTriggers")},container:{type:[String,Object,qm,Boolean],default:De("container")},boundary:{type:[String,qm],default:De("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:De("strategy")},autoHide:{type:[Boolean,Function],default:De("autoHide")},handleResize:{type:Boolean,default:De("handleResize")},instantMove:{type:Boolean,default:De("instantMove")},eagerMount:{type:Boolean,default:De("eagerMount")},popperClass:{type:[String,Array,Object],default:De("popperClass")},computeTransformOrigin:{type:Boolean,default:De("computeTransformOrigin")},autoMinSize:{type:Boolean,default:De("autoMinSize")},autoSize:{type:[Boolean,String],default:De("autoSize")},autoMaxSize:{type:Boolean,default:De("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:De("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:De("preventOverflow")},overflowPadding:{type:[Number,String],default:De("overflowPadding")},arrowPadding:{type:[Number,String],default:De("arrowPadding")},arrowOverflow:{type:Boolean,default:De("arrowOverflow")},flip:{type:Boolean,default:De("flip")},shift:{type:Boolean,default:De("shift")},shiftCrossAxis:{type:Boolean,default:De("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:De("noAutoFocus")},disposeTimeout:{type:Number,default:De("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){var e;return(e=this.ariaId)!==null&&e!==void 0?e:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ko])===null||e===void 0?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,l;return((e=this.popperTriggers)===null||e===void 0?void 0:e.includes("hover"))||((l=this.popperShowTriggers)===null||l===void 0?void 0:l.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,l)=>(e[l]="$_computePosition",e),{})},created(){this.autoMinSize,this.autoMaxSize},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:l=!1,force:a=!1}={}){var n;if(!(!((n=this.parentPopper)===null||n===void 0)&&n.lockedChild&&this.parentPopper.lockedChild!==this)){if(this.pendingHide=!1,a||!this.disabled){var i;((i=this.parentPopper)===null||i===void 0?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,l),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})}this.$emit("update:shown",!0)}},hide({event:e=null,skipDelay:l=!1}={}){var a;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,this.parentPopper.lockedChildTimer&&clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:l}),this.parentPopper.lockedChild=null)},1e3));return}((a=this.parentPopper)===null||a===void 0?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,l),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e,l;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(e=(l=this.referenceNode)===null||l===void 0?void 0:l.call(this))!==null&&e!==void 0?e:this.$el,this.$_targetNodes=this.targetNodes().filter(a=>a.nodeType===a.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(uh({mainAxis:this.distance,crossAxis:this.skidding}));const l=this.placement.startsWith("auto");if(l){var a;e.middleware.push(Zh({alignment:(a=this.placement.split("-")[1])!==null&&a!==void 0?a:""}))}else e.placement=this.placement;if(this.preventOverflow&&(this.shift&&e.middleware.push(rh({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!l&&this.flip&&e.middleware.push(bh({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Lz({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:c,middlewareData:d})=>{let s;const{centerOffset:o}=d.arrow;return i.startsWith("top")||i.startsWith("bottom")?s=Math.abs(o)>c.reference.width/2:s=Math.abs(o)>c.reference.height/2,{data:{overflow:s}}}}),this.autoMinSize||this.autoSize){const i=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:c,placement:d,middlewareData:s})=>{var o;if(!((o=s.autoSize)===null||o===void 0)&&o.skip)return{};let m,u;return d.startsWith("top")||d.startsWith("bottom")?m=c.reference.width:u=c.reference.height,this.$_innerNode.style[i==="min"?"minWidth":i==="max"?"maxWidth":"width"]=m!=null?`${m}px`:null,this.$_innerNode.style[i==="min"?"minHeight":i==="max"?"maxHeight":"height"]=u!=null?`${u}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(Yz({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:i,availableHeight:c})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=c!=null?`${c}px`:null}})));const n=await hh(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,l=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Sa&&this.instantMove&&Sa.instantMove&&Sa!==this.parentPopper){Sa.$_applyHide(!0),this.$_applyShow(!0);return}l?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,l=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,this.$_scheduleTimer&&clearTimeout(this.$_scheduleTimer),this.isShown&&(Sa=this),l?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const l=this.delay;return parseInt(l&&l[e]||l||0)},async $_applyShow(e=!1){this.$_disposeTimer&&clearTimeout(this.$_disposeTimer),this.$_scheduleTimer&&clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Fo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ri(this.$_referenceNode),...Ri(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const l=this.$_referenceNode.getBoundingClientRect(),a=this.$_popperNode.querySelector(".v-popper__wrapper"),n=a.parentNode.getBoundingClientRect(),i=l.x+l.width/2-(n.left+a.offsetLeft),c=l.y+l.height/2-(n.top+a.offsetTop);this.result.transformOrigin=`${i}px ${c}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let l;for(let a=0;a<mt.length;a++)l=mt[a],l.showGroup!==e&&(l.hide(),l.$emit("close-group"))}mt.push(this),document.body.classList.add("v-popper--some-open");for(const l of rb(this.theme))Gb(l).push(this),document.body.classList.add(`v-popper--some-open--${l}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Fo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(this.$_scheduleTimer&&clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,pb(mt,this),mt.length===0&&document.body.classList.remove("v-popper--some-open");for(const a of rb(this.theme)){const n=Gb(a);pb(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${a}`)}Sa===this&&(Sa=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),this.$_disposeTimer&&clearTimeout(this.$_disposeTimer);const l=this.disposeTimeout;l!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},l)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Fo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error(`No container for popover: ${this.container}`);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=a=>{this.isShown&&!this.$_hideInProgress||(a.usedByTooltip=!0,!this.$_preventShow&&this.show({event:a}))};this.$_registerTriggerListeners(this.$_targetNodes,bb,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],bb,this.popperTriggers,this.popperShowTriggers,e);const l=a=>{a.usedByTooltip||this.hide({event:a})};this.$_registerTriggerListeners(this.$_targetNodes,hb,this.triggers,this.hideTriggers,l),this.$_registerTriggerListeners([this.$_popperNode],hb,this.popperTriggers,this.popperHideTriggers,l)},$_registerEventListeners(e,l,a){this.$_events.push({targetNodes:e,eventType:l,handler:a}),e.forEach(n=>n.addEventListener(l,a,Rs?{passive:!0}:void 0))},$_registerTriggerListeners(e,l,a,n,i){let c=a;n!=null&&(c=typeof n=="function"?n(c):n),c.forEach(d=>{const s=l[d];s&&this.$_registerEventListeners(e,s,i)})},$_removeEventListeners(e){const l=[];this.$_events.forEach(a=>{const{targetNodes:n,eventType:i,handler:c}=a;!e||e===i?n.forEach(d=>d.removeEventListener(i,c)):l.push(a)}),this.$_events=l},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,l=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),l&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,l){for(const a of this.$_targetNodes){const n=a.getAttribute(e);n&&(a.removeAttribute(e),a.setAttribute(l,n))}},$_applyAttrsToTarget(e){for(const l of this.$_targetNodes)for(const a in e){const n=e[a];n==null?l.removeAttribute(a):l.setAttribute(a,n)}},$_updateParentShownChildren(e){let l=this.parentPopper;for(;l;)e?l.shownChildren.add(this.randomId):(l.shownChildren.delete(this.randomId),l.pendingHide&&l.hide()),l=l.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(yi>=e.left&&yi<=e.right&&Mi>=e.top&&Mi<=e.bottom){const l=this.$_popperNode.getBoundingClientRect(),a=yi-da,n=Mi-sa,i=l.left+l.width/2-da+(l.top+l.height/2)-sa+l.width+l.height,c=da+a*i,d=sa+n*i;return Hc(da,sa,c,d,l.left,l.top,l.left,l.bottom)||Hc(da,sa,c,d,l.left,l.top,l.right,l.top)||Hc(da,sa,c,d,l.right,l.top,l.right,l.bottom)||Hc(da,sa,c,d,l.left,l.bottom,l.right,l.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(MP){const e=Rs?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",l=>Nb(l,!0),e),document.addEventListener("touchend",l=>Yb(l,!0),e)}else window.addEventListener("mousedown",e=>Nb(e,!1),!0),window.addEventListener("click",e=>Yb(e,!1),!0);window.addEventListener("resize",TP)}function Nb(e,l){if(Vt.autoHideOnMousedown)IW(e,l);else for(let a=0;a<mt.length;a++){const n=mt[a];try{n.mouseDownContains=n.popperNode().contains(e.target)}catch{}}}function Yb(e,l){Vt.autoHideOnMousedown||IW(e,l)}function IW(e,l){const a={};for(let n=mt.length-1;n>=0;n--){const i=mt[n];try{const c=Array.from(i.shownChildren).some(s=>{const o=mt.find(m=>m.randomId===s);return o&&o.popperNode().contains(e.target)}),d=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target)||c;i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!a[i.randomId]&&Lb(i,d,e)){if(i.$_handleGlobalClose(e,l),!e.closeAllPopover&&e.closePopover&&d){let o=i.parentPopper;for(;o;)a[o.randomId]=!0,o=o.parentPopper;return}let s=i.parentPopper;for(;s&&Lb(s,s.containsGlobalTarget,e);){s.$_handleGlobalClose(e,l);s=s.parentPopper}}})}catch{}}}function Lb(e,l,a){return a.closeAllPopover||a.closePopover&&l||VP(e,a)&&!l}function VP(e,l){if(typeof e.autoHide=="function"){const a=e.autoHide(l);return e.lastAutoHide=a,a}return e.autoHide}function TP(){for(let e=0;e<mt.length;e++)mt[e].$_computePosition()}var da=0,sa=0,yi=0,Mi=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{da=yi,sa=Mi,yi=e.clientX,Mi=e.clientY},Rs?{passive:!0}:void 0);function Hc(e,l,a,n,i,c,d,s){const o=((d-i)*(l-c)-(s-c)*(e-i))/((s-c)*(a-e)-(d-i)*(n-l)),m=((a-e)*(l-c)-(n-l)*(e-i))/((s-c)*(a-e)-(d-i)*(n-l));return o>=0&&o<=1&&m>=0&&m<=1}var IP=(0,t.defineComponent)({extends:TW(),render(){var e,l;return(0,t.h)("div",{ref:"reference",class:["v-popper",{"v-popper--shown":this.slotData.isShown}]},(e=(l=this.$slots).default)===null||e===void 0?void 0:e.call(l,this.slotData))}}),xW=(e="theme")=>({computed:{themeClass(){return yP(this[e])}}}),zW=(0,t.defineComponent)({name:"VPopperContent",mixins:[xW()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],mounted(){this.handleResize&&(this.$_resizeObserver=new ResizeObserver(()=>this.$emit("resize")),this.$_resizeObserver.observe(this.$refs.inner))},beforeUnmount(){var e;(e=this.$_resizeObserver)===null||e===void 0||e.disconnect()},methods:{toPx(e){return e!=null&&!Number.isNaN(e)?`${e}px`:null}},render(){var e,l;const{autoHide:a,classes:n,result:i,shown:c}=this;return(0,t.h)("div",{id:this.popperId,ref:"popover","data-allow-mismatch":"",class:["v-popper__popper",this.themeClass,n.popperClass,{"v-popper__popper--shown":c,"v-popper__popper--hidden":!c,"v-popper__popper--show-from":n.showFrom,"v-popper__popper--show-to":n.showTo,"v-popper__popper--hide-from":n.hideFrom,"v-popper__popper--hide-to":n.hideTo,"v-popper__popper--skip-transition":this.skipTransition,"v-popper__popper--arrow-overflow":i&&i.arrow.overflow,"v-popper__popper--no-positioning":!i}],style:i?{position:i.strategy,transform:`translate3d(${Math.round(i.x)}px,${Math.round(i.y)}px,0)`}:void 0,"aria-hidden":c||a?"false":"true",tabindex:a?0:void 0,"data-popper-placement":i?i.placement:void 0,onKeyup:d=>{d.key==="Escape"&&a&&this.$emit("hide")}},[(0,t.h)("div",{class:"v-popper__backdrop",onClick:()=>a&&this.$emit("hide")}),(0,t.h)("div",{class:"v-popper__wrapper",style:i?{transformOrigin:i.transformOrigin}:void 0},[(0,t.h)("div",{ref:"inner",class:"v-popper__inner"},this.mounted?[(0,t.h)("div",(e=(l=this.$slots).default)===null||e===void 0?void 0:e.call(l))]:void 0),(0,t.h)("div",{ref:"arrow",class:"v-popper__arrow-container",style:i?{left:this.toPx(i.arrow.x),top:this.toPx(i.arrow.y)}:void 0},[(0,t.h)("div",{class:"v-popper__arrow-outer"}),(0,t.h)("div",{class:"v-popper__arrow-inner"})])])])}}),gW={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},eu=function(){};typeof window<"u"&&(eu=window.Element);var xP=(0,t.defineComponent)({name:"VPopperWrapper",mixins:[gW,xW("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,eu,Boolean],default:void 0},boundary:{type:[String,eu],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){var e;return(e=this.theme)!==null&&e!==void 0?e:this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}},render(){return(0,t.h)(IP,{ref:"popper",...this.$props,theme:this.finalTheme,targetNodes:this.getTargetNodes,popperNode:()=>this.$refs.popperContent.$el,class:[this.themeClass],onShow:()=>this.$emit("show"),onHide:()=>this.$emit("hide"),"onUpdate:shown":e=>this.$emit("update:shown",e),onApplyShow:()=>this.$emit("apply-show"),onApplyHide:()=>this.$emit("apply-hide"),onCloseGroup:()=>this.$emit("close-group"),onCloseDirective:()=>this.$emit("close-directive"),onAutoHide:()=>this.$emit("auto-hide"),onResize:()=>this.$emit("resize")},{default:({popperId:e,isShown:l,shouldMountContent:a,skipTransition:n,autoHide:i,show:c,hide:d,handleResize:s,onResize:o,classes:m,result:u})=>{var Z,r;return[(Z=(r=this.$slots).default)===null||Z===void 0?void 0:Z.call(r,{shown:l,show:c,hide:d}),(0,t.h)(zW,{ref:"popperContent",popperId:e,theme:this.finalTheme,shown:l,mounted:a,skipTransition:n,autoHide:i,handleResize:s,classes:m,result:u,onHide:d,onResize:o},{default:()=>{var b,h;return(b=(h=this.$slots).popper)===null||b===void 0?void 0:b.call(h,{shown:l,hide:d})}})]}})}});function I2(e,l){return{...xP,name:e,vPopperTheme:l}}var zP=I2("VDropdown","dropdown"),gP=I2("VMenu","menu"),wP=I2("VTooltip","tooltip"),RP=TW(),SP=(0,t.defineComponent)({name:"VTooltipDirective",mixins:[gW],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>lc(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>lc(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const l=++this.$_fetchId,a=this.content(this);a.then?a.then(n=>this.onResult(l,n)):this.onResult(l,a)}},onResult(e,l){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=l)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}},render(){return(0,t.h)(RP,{ref:"popper",...this.$attrs,theme:this.theme,targetNodes:this.targetNodes,popperNode:()=>this.$refs.popperContent.$el,onApplyShow:this.onShow,onApplyHide:this.onHide},{default:({popperId:e,isShown:l,shouldMountContent:a,skipTransition:n,autoHide:i,hide:c,handleResize:d,onResize:s,classes:o,result:m})=>(0,t.h)(zW,{ref:"popperContent",class:{"v-popper--tooltip-loading":this.loading},popperId:e,theme:this.theme,shown:l,mounted:a,skipTransition:n,autoHide:i,handleResize:d,classes:o,result:m,onHide:c,onResize:s},{default:()=>this.html?(0,t.h)("div",{innerHTML:this.finalContent}):(0,t.h)("div",{textContent:this.finalContent})})})}}),wW="v-popper--has-tooltip";function vP(e,l){let a=e.placement;if(!a&&l)for(const n of VW)l[n]&&(a=n);return a||(a=lc(e.theme||"tooltip","placement")),a}function RW(e,l,a){let n;const i=typeof l;return i==="string"?n={content:l}:l&&i==="object"?n=l:n={content:!1},n.placement=vP(n,a),n.targetNodes=()=>[e],n.referenceNode=()=>e,n}var jo,tc,fP=0;function FP(){if(jo)return;tc=(0,t.ref)([]),jo=(0,t.createApp)({name:"VTooltipDirectiveApp",setup(){return{directives:tc}},render(){return this.directives.map(l=>(0,t.h)(SP,{...l.options,shown:l.shown||l.options.shown,key:l.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),jo.mount(e)}function kP(e,l,a){FP();const n=(0,t.ref)(RW(e,l,a)),i=(0,t.ref)(!1),c={id:fP++,options:n,shown:i};return tc.value.push(c),e.classList&&e.classList.add(wW),e.$_popper={options:n,item:c,show(){i.value=!0},hide(){i.value=!1}}}function SW(e){if(e.$_popper){const l=tc.value.indexOf(e.$_popper.item);l!==-1&&tc.value.splice(l,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(wW)}function Xb(e,{value:l,modifiers:a}){const n=RW(e,l,a);if(!n.content||lc(n.theme||"tooltip","disabled"))SW(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=n):i=kP(e,l,a),typeof l.shown<"u"&&l.shown!==e.$_popperOldShown&&(e.$_popperOldShown=l.shown,l.shown?i.show():i.hide())}}var jP={beforeMount:Xb,updated:Xb,beforeUnmount(e){SW(e)}};function yb(e){e.addEventListener("mousedown",_d),e.addEventListener("click",_d),e.addEventListener("touchstart",vW,Rs?{passive:!0}:!1)}function Mb(e){e.removeEventListener("mousedown",_d),e.removeEventListener("click",_d),e.removeEventListener("touchstart",vW),e.removeEventListener("touchend",fW),e.removeEventListener("touchcancel",FW)}function _d(e){const l=e.currentTarget;e.closePopover=!l.$_vclosepopover_touch,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}function vW(e){if(e.changedTouches.length===1){const l=e.currentTarget;l.$_vclosepopover_touch=!0,l.$_vclosepopover_touchPoint=e.changedTouches[0],l.addEventListener("touchend",fW),l.addEventListener("touchcancel",FW)}}function fW(e){const l=e.currentTarget;if(l.$_vclosepopover_touch=!1,e.changedTouches.length===1){const a=e.changedTouches[0],n=l.$_vclosepopover_touchPoint;e.closePopover=Math.abs(a.screenY-n.screenY)<20&&Math.abs(a.screenX-n.screenX)<20,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}}function FW(e){const l=e.currentTarget;l.$_vclosepopover_touch=!1}var JP={beforeMount(e,{value:l,modifiers:a}){e.$_closePopoverModifiers=a,(typeof l>"u"||l)&&yb(e)},updated(e,{value:l,oldValue:a,modifiers:n}){e.$_closePopoverModifiers=n,l!==a&&(typeof l>"u"||l?yb(e):Mb(e))},beforeUnmount(e){Mb(e)}};function CP(e,l={}){if(!e.$_vTooltipInstalled){e.$_vTooltipInstalled=!0,MW(Vt,l),e.directive("tooltip",jP),e.directive("close-popper",JP);for(const a of[wP,zP,gP])e.component(a.name,a)}}var DP={version:XP,install:CP,options:Vt},UP=["src"],OP=(0,t.defineComponent)({__name:"LightboxImage",props:{src:{}},setup(e){const l=e,{imageSrc:a}=Z2(()=>l.src);return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)("img",{draggable:!1,src:(0,t.unref)(a),alt:"Preview",class:"lightbox-image"},null,8,UP))}}),EP=OP,BP={key:0,class:"center"},KP={key:3},HP={class:"bgl-lightbox-item"},PP={key:2,class:"lightbox-pdf"},QP=["src","title"],AP={key:3,class:"lightbox-file flex-center"},_P={class:"file-info txt-white flex m_block align-items-start gap-025"},$P={class:"txt-start"},qP={class:"mx-0 light"},e8={class:"semi word-break-all"},l8={class:"mx-0"},t8={class:"semi"},a8=(0,t.defineComponent)({__name:"Lightbox",setup(e,{expose:l}){const a=(0,t.ref)(!1),n=(0,t.ref)(null),i=(0,t.ref)([]),c=(0,t.ref)(0),d=(0,t.computed)(()=>i.value[c.value]),s=(0,t.ref)(1),o=(0,t.computed)(()=>s.value===1),m=(0,t.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function u(b,h){a.value=!0,i.value=h||[b],c.value=i.value.findIndex(G=>{const N=b.src!==void 0&&b.src!==null&&b.src!==""&&G.src===b.src,p=b.pathKey!==void 0&&b.pathKey!==null&&b.pathKey!==""&&G.pathKey===b.pathKey;return N||p}),c.value===-1&&(c.value=0),s.value=1}function Z(){a.value=!1}Ms(Z,a);function r(b){c.value=b,s.value=1}return(0,t.watch)(()=>a.value,async b=>{b?(document.body.style.overflow="hidden",await(0,t.nextTick)(),n.value?.open||n.value?.showModal()):(document.body.style.overflow="",n.value?.open&&n.value.close())}),(0,t.watch)(()=>c.value,()=>{s.value=1}),l({open:u,close:Z}),(b,h)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[a.value?((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{key:0,ref_key:"dialogRef",ref:n,class:"bgl-lightbox-overlay",onCancel:(0,t.withModifiers)(Z,["prevent"])},[(0,t.createElementVNode)("div",{class:"flex start w-100 space-between p-025 z-9",onClick:Z},[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"close",onClick:Z}),d.value?.enableZoom&&d.value?.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)("div",BP,[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"remove",disabled:s.value===1,onClick:h[0]||(h[0]=G=>s.value--)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"zoom_in",disabled:s.value===1,onClick:h[1]||(h[1]=G=>s.value=1)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"add",disabled:s.value===3,onClick:h[2]||(h[2]=G=>s.value++)},null,8,["disabled"])])):(0,t.createCommentVNode)("",!0),d.value?.openFile&&d.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,class:"color-white",round:"",thin:"",flat:"",iconEnd:"arrow_outward",value:"$t:lightbox.openFile",href:d.value?.src,target:"_blank"},null,8,["href"])):(0,t.createCommentVNode)("",!0),d.value?.download&&d.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:2,class:"color-white",round:"",thin:"",flat:"",icon:"download",value:"Download File",onClick:h[3]||(h[3]=G=>(0,t.unref)(u2)(d.value?.src))})):(0,t.createCommentVNode)("",!0),!d.value?.openFile&&!d.value?.download?((0,t.openBlock)(),(0,t.createElementBlock)("div",KP)):(0,t.createCommentVNode)("",!0)]),i.value&&i.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(X5),{key:0,index:c.value,"onUpdate:index":h[6]||(h[6]=G=>c.value=G),items:i.value,"initial-slide":c.value,class:(0,t.normalizeClass)(["bgl-lightbox-swiper",{zoomed:s.value>1}]),navigation:i.value.length>1,"grab-cursor":o.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:"slide","advanced-options":m.value,onClick:h[7]||(h[7]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(({item:G})=>[(0,t.createElementVNode)("div",HP,[G.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(y5),{key:0,zoom:s.value,"onUpdate:zoom":h[4]||(h[4]=N=>s.value=N),disabled:!G?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:h[5]||(h[5]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(EP,{src:G?.src},null,8,["src"])]),_:2},1032,["zoom","disabled"])):G?.type==="video"&&G?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Mu),{key:1,src:G?.src,autoplay:"",controls:"",class:"lightbox-video"},null,8,["src"])):G?.type==="pdf"&&G?.src?((0,t.openBlock)(),(0,t.createElementBlock)("div",PP,[(0,t.createElementVNode)("embed",{src:(0,t.unref)(m2)(G?.src),type:"application/pdf",title:G?.name},null,8,QP)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",AP,[(0,t.createElementVNode)("div",_P,[(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 m_none",icon:"draft",size:10,weight:"12"}),(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 none m_block m_-mb-1",icon:"draft",size:4,weight:"2"}),(0,t.createElementVNode)("div",$P,[(0,t.createElementVNode)("p",qP,[h[9]||(h[9]=(0,t.createTextVNode)(" File: ",-1)),(0,t.createElementVNode)("span",e8,(0,t.toDisplayString)(G?.name),1)]),(0,t.createElementVNode)("p",l8,[h[10]||(h[10]=(0,t.createTextVNode)(" Type: ",-1)),(0,t.createElementVNode)("span",t8,(0,t.toDisplayString)(G?.type),1)]),(0,t.createVNode)((0,t.unref)(oe),{href:G?.src,target:"_blank",round:"",thin:"",class:"mt-1",value:"Open file"},null,8,["href"])])])]))])]),"prev-button":(0,t.withCtx)(({prev:G})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_back",color:"black",disabled:c.value===0,class:(0,t.normalizeClass)({"color-black-70":c.value===0}),onClick:G},null,8,["disabled","class","onClick"])]),"next-button":(0,t.withCtx)(({next:G})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_forward",color:"black",disabled:c.value===i.value.length-1,class:(0,t.normalizeClass)({"color-black-70":c.value===i.value.length-1}),onClick:G},null,8,["disabled","class","onClick"])]),_:1},8,["index","items","initial-slide","class","navigation","grab-cursor","advanced-options"])):(0,t.createCommentVNode)("",!0),i.value&&i.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"lightbox-thumbnails",onClick:h[8]||(h[8]=(0,t.withModifiers)(()=>{},["stop"]))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.value,(G,N)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:N},[G.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(gi),{key:0,class:(0,t.normalizeClass)(["thumbnail",{active:c.value===N}]),src:G.src,alt:"",onClick:(0,t.withModifiers)(p=>r(N),["stop"])},null,8,["src","class","onClick"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,class:(0,t.normalizeClass)(["thumbnail thumbnail-icon",{active:c.value===N}]),icon:"description",onClick:(0,t.withModifiers)(p=>r(N),["stop"])},null,8,["class","onClick"]))],64))),128))])):(0,t.createCommentVNode)("",!0)],544)):(0,t.createCommentVNode)("",!0)]),_:1}))}}),n8=a8,Zi={},rn=e=>{},i8={mounted(e,l){Vb(lu(l,e)),rn=a=>{Tb(a,e,l)},e.addEventListener("click",rn)},updated(e,l){Vb(lu(l,e)),e.removeEventListener("click",rn),rn=a=>{Tb(a,e,l)},e.addEventListener("click",rn)},unmounted(e){e.removeEventListener("click",rn)},getSSRProps(){return{}}};function Vb(e){e.group&&(Zi[e.group]||(Zi[e.group]=[]),Zi[e.group].findIndex(l=>l.src===e.src)===-1&&Zi[e.group].push(e))}function Tb(e,l,a){e.stopPropagation();const n=lu(a,l),i=m8();if(!i||!i.open)return;const c=i.open;c(n,n&&n.group?Zi[n.group]:void 0)}function lu(e,l){let{group:a,src:n,type:i,name:c,thumbnail:d,enableZoom:s,openFile:o,download:m,pathKey:u}=e.value||{};return n=_l(n||u)||e.value||l.getAttribute("src")||"",i=i||o8(n),c=c||s8(n)||l.getAttribute("alt")||"",{src:n,type:i,name:c,thumbnail:d,group:a,enableZoom:s,openFile:o,download:m}}var c8=/youtube\.com|youtu\.be/,d8=/vimeo\.com/;function s8(e){return!e||typeof e!="string"?"":(e.split("/").pop()||"").replace(/\.[^/.]+$/,"")}function o8(e){if(typeof e!="string"||!e)return"unknown";if(e.startsWith("blob:")||/^data:image\//i.test(e))return"image";if(/^data:video\//i.test(e))return"video";const l=(e.split(".").pop()||"").toLowerCase(),a=e.split("?")[0].split(".").pop()?.toLowerCase()||"";return Td.test(l)||Td.test(a)?"image":yh.test(l)||c8.test(e)||d8.test(e)?"video":["pdf"].includes(l)?"pdf":l??"unknown"}var Jo;function m8(){if(!(typeof document>"u")){if(!Jo){const e=document.createElement("div");document.body.prepend(e),Jo=(0,t.createApp)(n8).mount(e)}return Jo}}var u8={install(e){e.directive("lightbox",i8)}},Z8=u8,r8={beforeMount(e,l){e.clickOutsideEvent=a=>{e===a.target||e.contains(a.target)||l.value(a)},document.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.removeEventListener("click",e.clickOutsideEvent)}},kW=as.__export({EventBus:()=>fs,POSITION:()=>nc,TYPE:()=>El,createToastInterface:()=>ic,default:()=>eG,globalEventBus:()=>x2,provideToast:()=>eQ,toastInjectionKey:()=>Fs,useToast:()=>qW},1),b8=Object.defineProperty,Ib=Object.getOwnPropertySymbols,h8=Object.prototype.hasOwnProperty,p8=Object.prototype.propertyIsEnumerable,xb=(e,l,a)=>l in e?b8(e,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[l]=a,jW=(e,l)=>{for(var a in l||(l={}))h8.call(l,a)&&xb(e,a,l[a]);if(Ib)for(var a of Ib(l))p8.call(l,a)&&xb(e,a,l[a]);return e},Ss=e=>typeof e=="function",vs=e=>typeof e=="string",JW=e=>vs(e)&&e.trim().length>0,W8=e=>typeof e=="number",Ca=e=>typeof e>"u",ac=e=>typeof e=="object"&&e!==null,G8=e=>Ft(e,"tag")&&JW(e.tag),CW=e=>window.TouchEvent&&e instanceof TouchEvent,DW=e=>Ft(e,"component")&&UW(e.component),N8=e=>Ss(e)||ac(e),UW=e=>!Ca(e)&&(vs(e)||N8(e)||DW(e)),zb=e=>ac(e)&&["height","width","right","left","top","bottom"].every(l=>W8(e[l])),Ft=(e,l)=>(ac(e)||Ss(e))&&l in e,Y8=(e=>()=>e++)(0);function Co(e){return CW(e)?e.targetTouches[0].clientX:e.clientX}function gb(e){return CW(e)?e.targetTouches[0].clientY:e.clientY}var L8=e=>{Ca(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},yc=e=>DW(e)?yc(e.component):G8(e)?(0,t.defineComponent)({render(){return e}}):typeof e=="string"?e:(0,t.toRaw)((0,t.unref)(e)),X8=e=>{if(typeof e=="string")return e;const l=Ft(e,"props")&&ac(e.props)?e.props:{},a=Ft(e,"listeners")&&ac(e.listeners)?e.listeners:{};return{component:yc(e),props:l,listeners:a}},y8=()=>typeof window<"u",fs=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,l){const a=this.getHandlers(e);a.push(l),this.allHandlers[e]=a}off(e,l){const a=this.getHandlers(e);a.splice(a.indexOf(l)>>>0,1)}emit(e,l){this.getHandlers(e).forEach(a=>a(l))}},M8=e=>["on","off","emit"].every(l=>Ft(e,l)&&Ss(e[l])),El;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(El||(El={}));var nc;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(nc||(nc={}));var et;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(et||(et={}));var At="Vue-Toastification",Gt={type:{type:String,default:El.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},wb={type:Gt.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Pc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Gt.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Do={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Rb={transition:{type:[Object,String],default:`${At}__bounce`}},ea={CORE_TOAST:{position:{type:String,default:nc.TOP_RIGHT},draggable:Gt.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Gt.trueBoolean,pauseOnHover:Gt.trueBoolean,closeOnClick:Gt.trueBoolean,timeout:Do.timeout,hideProgressBar:Do.hideProgressBar,toastClassName:Gt.classNames,bodyClassName:Gt.classNames,icon:wb.customIcon,closeButton:Pc.component,closeButtonClassName:Pc.classNames,showCloseButtonOnHover:Pc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new fs}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:Gt.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:Gt.trueBoolean,maxToasts:{type:Number,default:20},transition:Rb.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:Gt.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:Do,ICON:wb,TRANSITION:Rb,CLOSE_BUTTON:Pc},OW=(0,t.defineComponent)({name:"VtProgressBar",props:ea.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${At}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function V8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{style:(0,t.normalizeStyle)(e.style),class:(0,t.normalizeClass)(e.cpClass)},null,6)}OW.render=V8;var T8=OW,EW=(0,t.defineComponent)({name:"VtCloseButton",props:ea.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?yc(this.component):"button"},classes(){const e=[`${At}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),I8=(0,t.createTextVNode)(" × ");function x8(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.buttonComponent),(0,t.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,t.withCtx)(()=>[I8]),_:1},16,["aria-label","class"])}EW.render=x8;var z8=EW,BW={},g8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},w8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)];function R8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",g8,w8)}BW.render=R8;var S8=BW,KW={},v8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},f8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)];function F8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",v8,f8)}KW.render=F8;var Sb=KW,HW={},k8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},j8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function J8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",k8,j8)}HW.render=J8;var C8=HW,PW={},D8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},U8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function O8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",D8,U8)}PW.render=O8;var E8=PW,QW=(0,t.defineComponent)({name:"VtIcon",props:ea.ICON,computed:{customIconChildren(){return Ft(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return vs(this.customIcon)?this.trimValue(this.customIcon):Ft(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Ft(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:UW(this.customIcon)?yc(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[El.DEFAULT]:Sb,[El.INFO]:Sb,[El.SUCCESS]:S8,[El.ERROR]:E8,[El.WARNING]:C8}[this.type]},iconClasses(){const e=[`${At}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,l=""){return JW(e)?e.trim():l}}});function B8(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component),{class:(0,t.normalizeClass)(e.iconClasses)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.customIconChildren),1)]),_:1},8,["class"])}QW.render=B8;var AW=(0,t.defineComponent)({name:"VtToast",components:{ProgressBar:T8,CloseButton:z8,Icon:QW},inheritAttrs:!1,props:Object.assign({},ea.CORE_TOAST,ea.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${At}__toast`,`${At}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${At}__toast--rtl`),e},bodyClasses(){return[`${At}__toast-${vs(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return zb(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Ft,getVueComponentFromObj:yc,closeToast(){this.eventBus.emit(et.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:Co(e),y:gb(e)},this.dragStart=Co(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Co(e),y:gb(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,zb(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),K8=["role"];function H8(e,l){const a=(0,t.resolveComponent)("Icon"),n=(0,t.resolveComponent)("CloseButton"),i=(0,t.resolveComponent)("ProgressBar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(e.classes),style:(0,t.normalizeStyle)(e.draggableStyle),onClick:l[0]||(l[0]=(...c)=>e.clickHandler&&e.clickHandler(...c)),onMouseenter:l[1]||(l[1]=(...c)=>e.hoverPause&&e.hoverPause(...c)),onMouseleave:l[2]||(l[2]=(...c)=>e.hoverPlay&&e.hoverPlay(...c))},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(a,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,t.normalizeClass)(e.bodyClasses)},[typeof e.content=="string"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.content),1)],2112)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,t.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,t.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,K8),e.closeButton?((0,t.openBlock)(),(0,t.createBlock)(n,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,t.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,t.createCommentVNode)("v-if",!0),e.timeout?((0,t.openBlock)(),(0,t.createBlock)(i,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,t.createCommentVNode)("v-if",!0)],38)}AW.render=H8;var P8=AW,_W=(0,t.defineComponent)({name:"VtTransition",props:ea.TRANSITION,emits:["leave"],methods:{hasProp:Ft,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function Q8(e,l){return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}_W.render=Q8;var $W=(0,t.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:P8,VtTransition:_W},props:Object.assign({},ea.CORE_TOAST,ea.CONTAINER,ea.TRANSITION),data(){return{count:0,positions:Object.values(nc),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(et.ADD,this.addToast),e.on(et.CLEAR,this.clearToasts),e.on(et.DISMISS,this.dismissToast),e.on(et.UPDATE,this.updateToast),e.on(et.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Ss(e)&&(e=await e()),L8(this.$el),e.appendChild(this.$el)},setToast(e){Ca(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=X8(e.content);const l=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),a=this.defaults.filterBeforeCreate(l,this.toastArray);a&&this.setToast(a)},dismissToast(e){const l=this.toasts[e];!Ca(l)&&!Ca(l.onClose)&&l.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const l=this.filteredToasts.filter(a=>a.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?l.reverse():l},updateDefaults(e){Ca(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:l,create:a}){this.toasts[e]?(l.timeout&&l.timeout===this.toasts[e].timeout&&l.timeout++,this.setToast(Object.assign({},this.toasts[e],l))):a&&this.addToast(Object.assign({},{id:e},l))},getClasses(e){return[`${At}__container`,e].concat(this.defaults.containerClassName)}}});function A8(e,l){const a=(0,t.resolveComponent)("Toast"),n=(0,t.resolveComponent)("VtTransition");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.positions,i=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:i},[(0,t.createVNode)(n,{transition:e.defaults.transition,class:(0,t.normalizeClass)(e.getClasses(i))},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.getPositionToasts(i),c=>((0,t.openBlock)(),(0,t.createBlock)(a,(0,t.mergeProps)({key:c.id},c),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}$W.render=A8;var _8=$W,vb=(e={},l=!0)=>{const a=e.eventBus=e.eventBus||new fs;l&&(0,t.nextTick)(()=>{const c=(0,t.createApp)(_8,jW({},e)),d=c.mount(document.createElement("div")),s=e.onMounted;if(Ca(s)||s(d,c),e.shareAppContext){const o=e.shareAppContext;o===!0||(c._context.components=o._context.components,c._context.directives=o._context.directives,c._context.mixins=o._context.mixins,c._context.provides=o._context.provides,c.config.globalProperties=o.config.globalProperties)}});const n=(c,d)=>{const s=Object.assign({},{id:Y8(),type:El.DEFAULT},d,{content:c});return a.emit(et.ADD,s),s.id};n.clear=()=>a.emit(et.CLEAR,void 0),n.updateDefaults=c=>{a.emit(et.UPDATE_DEFAULTS,c)},n.dismiss=c=>{a.emit(et.DISMISS,c)};function i(c,{content:d,options:s},o=!1){const m=Object.assign({},s,{content:d});a.emit(et.UPDATE,{id:c,options:m,create:o})}return n.update=i,n.success=(c,d)=>n(c,Object.assign({},d,{type:El.SUCCESS})),n.info=(c,d)=>n(c,Object.assign({},d,{type:El.INFO})),n.error=(c,d)=>n(c,Object.assign({},d,{type:El.ERROR})),n.warning=(c,d)=>n(c,Object.assign({},d,{type:El.WARNING})),n},$8=()=>{const e=()=>{};return new Proxy(e,{get(){return e}})};function ic(e){return y8()?M8(e)?vb({eventBus:e},!1):vb(e,!0):$8()}var Fs=Symbol("VueToastification"),x2=new fs,q8=(e,l)=>{l?.shareAppContext===!0&&(l.shareAppContext=e);const a=ic(jW({eventBus:x2},l));e.provide(Fs,a)},eQ=e=>{const l=ic(e);(0,t.getCurrentInstance)()&&(0,t.provide)(Fs,l)},qW=e=>{if(e)return ic(e);const l=(0,t.getCurrentInstance)()?(0,t.inject)(Fs,void 0):void 0;return l||ic(x2)},eG=q8,lQ={key:0,class:"custom-toast__icon"},tQ={class:"custom-toast__content"},aQ=(0,t.defineComponent)({name:"BglToast",__name:"Toast",props:{message:{},type:{},info:{type:Boolean},success:{type:Boolean},warning:{type:Boolean},error:{type:Boolean},showIcon:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeToast:{}},setup(e){const l=e,a=(0,t.computed)(()=>l.type?l.type:l.error?"error":l.warning?"warning":l.success?"success":"info");return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["custom-toast",`custom-toast--${a.value}`])},[e.showIcon?((0,t.openBlock)(),(0,t.createElementBlock)("div",lQ,[a.value==="success"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:0,icon:"check_circle"})):(0,t.createCommentVNode)("",!0),a.value==="error"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,icon:"dangerous"})):(0,t.createCommentVNode)("",!0),a.value==="warning"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:2,icon:"report"})):(0,t.createCommentVNode)("",!0),a.value==="info"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:3,icon:"info"})):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",tQ,(0,t.toDisplayString)(e.message),1),e.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"custom-toast__close",onClick:i[0]||(i[0]=(...c)=>e.closeToast&&e.closeToast(...c))},[(0,t.createVNode)((0,t.unref)(Ne),{icon:"close"})])):(0,t.createCommentVNode)("",!0)],2))}}),ci=aQ,nQ=eG||kW,{POSITION:iQ}=kW,bn=qW;const lG=Symbol("toast");var $d=null;function cQ(){const e=(0,t.inject)(lG,null);if(!e){if($d)return $d;throw new Error("Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)")}return e}function dQ(){if(typeof document>"u")return;let e=document.getElementById("bgl-toast-container");e||(e=document.createElement("div"),e.setAttribute("popover","manual"),e.setAttribute("id","bgl-toast-container"),document.body.appendChild(e));try{e.hidePopover()}catch{}try{e.showPopover()}catch{}return e}const tG={install:(e,l={})=>{const a=dQ(),n={position:iQ.TOP_RIGHT,timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:!1,icon:!1,rtl:!1,transition:"Vue-Toastification__fade",maxToasts:5,newestOnTop:!0,toastClassName:"custom-toast-wrapper",bodyClassName:"custom-toast-body",...a?{container:a}:{},...l};e.use(nQ,n);function i(){const d=typeof document<"u"?document.getElementById("bgl-toast-container"):null;if(d){try{d.hidePopover()}catch{}try{d.showPopover()}catch{}}}const c={success:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"success"}},s)),error:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"error"}},s)),info:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"info"}},s)),warning:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"warning"}},s)),show:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"info"}},s)),clear:()=>{bn().clear()}};$d||($d=c),e.provide(lG,c)}};var ks=class extends Event{oldState;newState;constructor(e,{oldState:l="",newState:a="",...n}={}){super(e,n),this.oldState=String(l||""),this.newState=String(a||"")}},fb=new WeakMap;function aG(e,l,a){fb.set(e,setTimeout(()=>{fb.has(e)&&e.dispatchEvent(new ks("toggle",{cancelable:!1,oldState:l,newState:a}))},0))}var z2=globalThis.ShadowRoot||function(){},sQ=globalThis.HTMLDialogElement||function(){},bd=new WeakMap,_t=new WeakMap,st=new WeakMap,Cn=new WeakMap;function qd(e){return Cn.get(e)||"hidden"}var es=new WeakMap;function cc(e){return[...e].pop()}function oQ(e){const l=e.popoverTargetElement;if(!(l instanceof HTMLElement))return;const a=qd(l);e.popoverTargetAction==="show"&&a==="showing"||e.popoverTargetAction==="hide"&&a==="hidden"||(a==="showing"?Un(l,!0,!0):Oa(l,!1)&&(es.set(l,e),tu(l)))}function Oa(e,l){return!(e.popover!=="auto"&&e.popover!=="manual"&&e.popover!=="hint"||!e.isConnected||l&&qd(e)!=="showing"||!l&&qd(e)!=="hidden"||e instanceof sQ&&e.hasAttribute("open")||document.fullscreenElement===e)}function Fb(e){if(!e)return 0;const l=_t.get(document)||new Set,a=st.get(document)||new Set;return a.has(e)?[...a].indexOf(e)+l.size+1:l.has(e)?[...l].indexOf(e)+1:0}function mQ(e){const l=nG(e),a=uQ(e);return Fb(l)>Fb(a)?l:a}function dc(e){let l;const a=st.get(e)||new Set,n=_t.get(e)||new Set,i=a.size>0?a:n.size>0?n:null;return i?(l=cc(i),l.isConnected?l:(i.delete(l),dc(e))):null}function kb(e){for(const l of e||[])if(!l.isConnected)e.delete(l);else return l;return null}function Dn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.parentNode?Dn(e.parentNode):e}function nG(e){for(;e;){if(e instanceof HTMLElement&&e.popover==="auto"&&Cn.get(e)==="showing")return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||Dn(e),e instanceof z2&&(e=e.host),e instanceof Document)return}}function uQ(e){for(;e;){const l=e.popoverTargetElement;if(l instanceof HTMLElement)return l;if(e=e.parentElement||Dn(e),e instanceof z2&&(e=e.host),e instanceof Document)return}}function jb(e,l){const a=new Map;let n=0;for(const d of l||[])a.set(d,n),n+=1;a.set(e,n),n+=1;let i=null;function c(d){if(!d)return;let s=!1,o=null,m=null;for(;!s;){if(o=nG(d)||null,o===null||!a.has(o))return;(e.popover==="hint"||o.popover==="auto")&&(s=!0),s||(d=o.parentElement)}m=a.get(o),(i===null||a.get(i)<m)&&(i=o)}return c(e.parentElement||Dn(e)),i}function ZQ(e){return e.hidden||e instanceof z2||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e instanceof HTMLAnchorElement&&e.href===""?!1:typeof e.tabIndex=="number"&&e.tabIndex!==-1}function rQ(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let l=e;l.shadowRoot&&(l=l.shadowRoot);let a=l.querySelector("[autofocus]");if(a)return a;{const c=l.querySelectorAll("slot");for(const d of c){const s=d.assignedElements({flatten:!0});for(const o of s){if(o.hasAttribute("autofocus"))return o;if(a=o.querySelector("[autofocus]"),a)return a}}}const n=e.ownerDocument.createTreeWalker(l,NodeFilter.SHOW_ELEMENT);let i=n.currentNode;for(;i;){if(ZQ(i))return i;i=n.nextNode()}}function bQ(e){var l;(l=rQ(e))==null||l.focus()}var ls=new WeakMap;function tu(e){if(!Oa(e,!1))return;const l=e.ownerDocument;if(!e.dispatchEvent(new ks("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!Oa(e,!1))return;let a=!1;const n=e.popover;let i=null;const c=jb(e,_t.get(l)||new Set),d=jb(e,st.get(l)||new Set);if(n==="auto"&&(au(st.get(l)||new Set,a,!0),Ea(c||l,a,!0),i="auto"),n==="hint"&&(d?(Ea(d,a,!0),i="hint"):(au(st.get(l)||new Set,a,!0),c?(Ea(c,a,!0),i="auto"):i="hint")),n==="auto"||n==="hint"){if(n!==e.popover||!Oa(e,!1))return;dc(l)||(a=!0),i==="auto"?(_t.has(l)||_t.set(l,new Set),_t.get(l).add(e)):i==="hint"&&(st.has(l)||st.set(l,new Set),st.get(l).add(e))}ls.delete(e);const s=l.activeElement;e.classList.add(":popover-open"),Cn.set(e,"showing"),bd.has(l)||bd.set(l,new Set),bd.get(l).add(e),iG(es.get(e),!0),bQ(e),a&&s&&e.popover==="auto"&&ls.set(e,s),aG(e,"closed","open")}function Un(e,l=!1,a=!1){var n,i;if(!Oa(e,!0))return;const c=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(Ea(e,l,a),!Oa(e,!0)))return;const d=_t.get(c)||new Set,s=d.has(e)&&cc(d)===e;if(iG(es.get(e),!1),es.delete(e),a&&(e.dispatchEvent(new ks("beforetoggle",{oldState:"open",newState:"closed"})),s&&cc(d)!==e&&Ea(e,l,a),!Oa(e,!0)))return;(n=bd.get(c))==null||n.delete(e),d.delete(e),(i=st.get(c))==null||i.delete(e),e.classList.remove(":popover-open"),Cn.set(e,"hidden"),a&&aG(e,"open","closed");const o=ls.get(e);o&&(ls.delete(e),l&&o.focus())}function hQ(e,l=!1,a=!1){let n=dc(e);for(;n;)Un(n,l,a),n=dc(e)}function au(e,l=!1,a=!1){let n=kb(e);for(;n;)Un(n,l,a),n=kb(e)}function Jb(e,l,a,n){let i=!1,c=!1;for(;i||!c;){c=!0;let d=null,s=!1;for(const o of l)if(o===e)s=!0;else if(s){d=o;break}if(!d)return;for(;qd(d)==="showing"&&l.size;)Un(cc(l),a,n);l.has(e)&&cc(l)!==e&&(i=!0),i&&(n=!1)}}function Ea(e,l,a){var n,i;const c=e.ownerDocument||e;if(e instanceof Document)return hQ(c,l,a);if((n=st.get(c))!=null&&n.has(e)){Jb(e,st.get(c),l,a);return}au(st.get(c)||new Set,l,a),(i=_t.get(c))!=null&&i.has(e)&&Jb(e,_t.get(c),l,a)}var Uo=new WeakMap;function Cb(e){if(!e.isTrusted)return;const l=e.composedPath()[0];if(!l)return;const a=l.ownerDocument;if(!dc(a))return;const n=mQ(l);if(n&&e.type==="pointerdown")Uo.set(a,n);else if(e.type==="pointerup"){const i=Uo.get(a)===n;Uo.delete(a),i&&Ea(n||a,!1,!0)}}var Oo=new WeakMap;function iG(e,l=!1){if(!e)return;Oo.has(e)||Oo.set(e,e.getAttribute("aria-expanded"));const a=e.popoverTargetElement;if(a instanceof HTMLElement&&a.popover==="auto")e.setAttribute("aria-expanded",String(l));else{const n=Oo.get(e);n?e.setAttribute("aria-expanded",n):e.removeAttribute("aria-expanded")}}var Db=globalThis.ShadowRoot||function(){};function pQ(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function va(e,l,a){const n=e[l];Object.defineProperty(e,l,{value(i){return n.call(this,a(i))}})}var WQ=/(^|[^\\]):popover-open\b/g;function GQ(){return typeof globalThis.CSSLayerBlockRule=="function"}function NQ(){const e=GQ();return`
487
+ `);r=r.endsWith(".csv")?r:`${r}.csv`,u2(new Blob([p],{type:"text/csv;charset=utf-8"}),r)}async function i(Z){const r=await l(),b=await Z.arrayBuffer();return r.read(b)}async function c(Z){return(await i(Z)).SheetNames}async function d(Z,r,b=!0){const h=await l(),G=(await i(Z)).Sheets[r],N=h.utils.sheet_to_json(G,{header:1});if(N.length===0)return{headers:[],data:[]};let p=[],W=0;b?(p=N[0].map(L=>String(L||"").trim()),W=1):p=N[0].map((L,X)=>String.fromCharCode(65+X));const Y=[];for(let L=W;L<N.length;L++){const X=N[L],V={};for(let M=0;M<p.length;M++)M<X.length?V[p[M]]=X[M]:V[p[M]]="";Y.push(V)}return{headers:p,data:Y}}async function s(Z){const r=await l();return new Promise((b,h)=>{const G=new FileReader;G.onload=N=>{try{const p=new Uint8Array(N.target?.result),W=r.read(p,{type:"array"}),Y=W.SheetNames[0],L=W.Sheets[Y];b(r.utils.sheet_to_json(L))}catch(p){h(p)}},G.onerror=()=>{h(new Error("Failed to read file"))},G.readAsArrayBuffer(Z)})}function o(Z){return typeof Z=="number"&&Number.isInteger(Z)&&Z>=2e4&&Z<=5e4}function m(Z){const r=new Date(Date.UTC(1899,11,30));return new Date(r.getTime()+Z*(1440*60*1e3))}function u(Z,r=!1){if(!(Z instanceof Date)||Number.isNaN(Z.getTime()))return"";const b=Z.getFullYear(),h=String(Z.getMonth()+1).padStart(2,"0"),G=String(Z.getDate()).padStart(2,"0");return r?`${b}-${h}-${G}T${String(Z.getHours()).padStart(2,"0")}:${String(Z.getMinutes()).padStart(2,"0")}:${String(Z.getSeconds()).padStart(2,"0")}`:`${b}-${h}-${G}`}return{downloadExcel:a,downloadCSV:n,readExcelFile:s,ensureXLSXLoaded:l,getSheetNames:c,readSheetData:d,getWorkbook:i,isExcelSerialDate:o,excelSerialDateToJSDate:m,formatDate:u}}var tb={"to-t":"to top","to-b":"to bottom","to-l":"to left","to-r":"to right","to-tl":"to top left","to-tr":"to top right","to-bl":"to bottom left","to-br":"to bottom right"};function EK(e){if(e==null||e==="")return;if(typeof e=="string"&&e in tb)return tb[e];const l=Number(e);return Number.isFinite(l)?`${l}deg`:void 0}function BK(e){return typeof e!="string"?[]:e.trim().split(/\s+/).filter(Boolean)}function So(e){const l=e.trim();return l.startsWith("var(")||l.startsWith("#")||/^(rgb|hsl|color-mix|linear-gradient)\(/.test(l)?l:l.startsWith("--")?`var(${l})`:`var(--bgl-${l})`}function Is({gradient:e,gradientDir:l,color:a}){const n=(0,t.computed)(()=>{const c=(0,t.toValue)(e);return c===!0||typeof c=="string"&&c.trim()!==""}),i=(0,t.computed)(()=>[(0,t.toValue)(a),...BK((0,t.toValue)(e))].filter(Boolean));return{isGradient:n,gradientStyle:(0,t.computed)(()=>{if(!n.value)return{};const c={},d=EK((0,t.toValue)(l));d&&(c["--bgl-grad-angle"]=d);const s=i.value;if(s.length<2)return c;c["--bgl-grad-from"]=So(s[0]),c["--bgl-grad-to"]=So(s[s.length-1]);const o=s.slice(1,-1);return o.length&&(c["--bgl-grad-via"]=`${o.map(So).join(", ")}, `),c}),stops:i}}async function KK(e){if("caches"in window)try{const l=await(await window.caches.open("img-cache")).match(e);if(l)return URL.createObjectURL(await l.blob())}catch{}}async function HK(e,l){if("caches"in window)try{await(await window.caches.open("img-cache")).put(e,new Response(l))}catch{}}async function PK(e){await Lc("https://cdnjs.cloudflare.com/ajax/libs/heic2any/0.0.1/index.min.js");const l=await(await qi("heic2any"))({blob:await(await fetch(m2(e))).blob()});return await HK(e,l),URL.createObjectURL(l)}function Z2(e){const l=(0,t.ref)(void 0),a=(0,t.ref)(!1);async function n(){a.value=!1;const i=_l((0,t.toValue)(e));if(i===void 0||i===""){l.value=void 0;return}try{if(i.split(".").pop()?.toLowerCase().split("?")[0]==="heic"){const c=await KK(i);if(c!==void 0&&c!==""){l.value=c;return}l.value=await PK(i)}else l.value=i}catch{a.value=!0,l.value=void 0}}return(0,t.watch)(()=>(0,t.toValue)(e),n,{immediate:!0}),{imageSrc:l,loadingError:a}}var Mn={},ab=!1,Km=typeof window<"u";function QK(){!Km||ab||(ab=!0,window.addEventListener("storage",e=>{e.key!==null&&e.key in Mn&&(Mn[e.key].value=e.newValue!==null?JSON.parse(e.newValue):null)}))}function AK(e,l=null){if(!(e in Mn)){const a=Km?localStorage.getItem(e):null;Mn[e]=(0,t.ref)(a!==null?JSON.parse(a):l),(0,t.watch)(Mn[e],n=>{Km&&localStorage.setItem(e,JSON.stringify(n))})}return Mn[e]}function J5(e){return QK(),new Proxy({},{get(l,a){return AK(a,e?.[a]??null)}})}var C5=1e3,_K=60*C5;function $K(e,l={}){const{interval:a=30*C5,inactivityThreshold:n=5*_K,pauseInBackground:i=!0}=l,{idle:c}=PT(n),d=(0,t.ref)(!0),s=(0,t.ref)(null),o=()=>!i||document.visibilityState==="visible",m=()=>{d.value=!1,s.value!==null&&(clearTimeout(s.value),s.value=null)},u=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null)},Z=()=>{s.value!==null&&(clearTimeout(s.value),s.value=null);const h=async()=>{if(d.value&&o()&&!c.value)try{await e()}catch{}d.value&&(s.value=window.setTimeout(h,a))};h()},r=()=>{d.value&&Z()};function b(){document.visibilityState==="visible"?d.value&&Z():i&&u()}return(0,t.onMounted)(()=>{document.addEventListener("visibilitychange",b),Z()}),(0,t.onUnmounted)(()=>{document.removeEventListener("visibilitychange",b),m()}),{isPolling:d,pausePolling:u,resumePolling:r,startPolling:Z,stopPolling:m}}function qK(){const e=(0,t.ref)(!1);let l;function a(n){e.value=n.matches}return(0,t.onMounted)(()=>{typeof window>"u"||!window.matchMedia||(l=window.matchMedia("(prefers-reduced-motion: reduce)"),e.value=l.matches,l.addEventListener("change",a))}),(0,t.onUnmounted)(()=>{l?.removeEventListener("change",a)}),e}function eH(e,l,a){const n={...e};return a===void 0?delete n[l]:n[l]=a,n}function lH(e){const l=(0,Na.useRoute)(),a=(0,Na.useRouter)(),n={};return new Proxy({},{get(i,c){if(!(c in n)){const d=e?.[c];n[c]=(0,t.computed)({get:()=>l.query[c]??d,set:s=>a.replace({query:eH(l.query,c,s)})})}return n[c]}})}var Zt=(0,t.ref)([{value:"dark",class:"bgl-dark-mode",icon:"cloudy_night",label:"Dark Mode",isDark:!0},{value:"light",class:"bgl-light-mode",icon:"brightness_7",label:"Light Mode",isDark:!1},{value:"system",class:"system",icon:"settings_input_component",label:"System Default"}]),D5="color-mode",ot=(0,t.ref)("system"),Hm=(0,t.ref)(!1),r2=(0,t.ref)(!1),Vn=(0,t.ref)(!1),Xc=typeof window<"u";function U5(){if(!Xc)return null;try{return window.localStorage.getItem(D5)}catch{return null}}function tH(e){if(Xc)try{window.localStorage.setItem(D5,e)}catch{}}function aH(){return r2.value&&Xc&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}function nb(e){return Zt.value.find(l=>l.value===e)}function rd(e){if(!Xc)return;const l=document.documentElement;if(Zt.value.forEach(a=>{a.class!=="system"&&l.classList.remove(a.class)}),e==="system"){const a=aH();Hm.value=a;const n=Zt.value.find(d=>d.value==="dark"),i=Zt.value.find(d=>d.value==="light"),c=a?n:i;c&&l.classList.add(c.class)}else{const a=nb(e),n=a&&a.isDark&&!r2.value?nb("light"):a;n&&(l.classList.add(n.class),Hm.value=n.isDark??!1)}}function nH(){const e=Zt.value.filter(l=>l.value!=="system");e.length!==0&&(ot.value=e[(e.findIndex(l=>l.value===ot.value)+1)%e.length].value)}function iH(e={}){const l=Vn.value;if(e.allowDark!==void 0&&(r2.value=e.allowDark),e.manualSelection!==void 0&&(Vn.value=e.manualSelection),O5(),Vn.value&&!l){const a=U5();Zt.value.some(n=>n.value===a)&&(ot.value=a)}Vn.value||(ot.value="system"),rd(ot.value)}function cH(e){if(!Zt.value.some(l=>l.value===e.value)){const l=Zt.value.findIndex(a=>a.value==="system");l>-1?Zt.value.splice(l,0,e):Zt.value.push(e)}}var ib=!1;function O5(){if(!(ib||!Xc)){if(ib=!0,Vn.value){const e=U5();Zt.value.some(l=>l.value===e)&&(ot.value=e)}else ot.value="system";rd(ot.value),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{ot.value==="system"&&rd("system")}),(0,t.watch)(ot,e=>{Vn.value&&tH(e),rd(e)})}}function dH(){return O5(),{isDark:Hm,theme:(0,t.computed)(()=>ot.value),themeOptions:Zt,toggleTheme:nH,addTheme:cH,setTheme:e=>{ot.value=e}}}function E5(e,l,a,n){DT(e,(i,c)=>{if(l?.()?.setCustomValidity(""),!a||i===c||!i)return;const d=a(i,n?.());typeof d=="string"&&l?.()?.setCustomValidity(d)},{debounce:500})}function B5({schema:e,columns:l,data:a}={}){const n=(0,t.computed)(()=>(0,t.toValue)(e)),i=(0,t.computed)(()=>(0,t.toValue)(l));return n.value?i.value&&i.value.length>0?n.value.filter(c=>i.value?.includes(c.id)):n.value:F5(a,i.value)}const sH={s:"400px",m:"540px",l:"720px",xl:"960px",full:"100%"};var oH={key:0,class:"dialog-grip","aria-hidden":"true"},mH={key:2,class:"flex-grow-1"},uH=(0,t.defineComponent)({__name:"Dialog",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},flat:{type:Boolean,default:!0},thin:{type:Boolean,default:!1},centerTitle:{type:Boolean,default:!1},ellipsisTitle:{type:Boolean,default:!1},closePlacement:{default:"header-end"},grip:{type:Boolean,default:void 0}},emits:["update:open","close"],setup(e,{expose:l,emit:a}){const n=e,i=(0,t.computed)(()=>n.grip??n.position==="bottom"),c=a,d=(0,t.ref)(null),s=(0,t.ref)(!1),o=(0,t.ref)(!0),m=(0,t.computed)(()=>sH[n.width]),u=(0,t.computed)(()=>n.position==="left"?"dialog-left ms-1 me-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="right"?"dialog-right me-1 ms-auto mt-1 mb-1 height-100-2 m_m-0 m_h-100vh m_max-h-100vh m_radius-0":n.position==="top"?"dialog-top mx-auto mt-1 mb-auto":n.position==="bottom"?"dialog-bottom mx-auto mb-1 mt-auto":"dialog-center mx-auto");(0,t.watch)(()=>n.open,N=>{N?(d.value?.showModal(),s.value=!1,o.value=!1,setTimeout(()=>{o.value=!0},250)):Z()}),(0,t.onMounted)(()=>{n.open&&d.value?.showModal()});function Z(){s.value||(s.value=!0)}function r(){s.value&&(d.value?.close(),s.value=!1,c("close"))}function b(N){N.target===d.value&&n.dismissable&&c("update:open",!1)}function h(N){if(!n.dismissable){N.preventDefault();return}c("update:open",!1)}function G(){o.value=!1,c("update:open",!1)}return l({close:G}),(N,p)=>((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{ref_key:"dialogRef",ref:d,class:(0,t.normalizeClass)([[u.value,{"is-closing":s.value}],"border-none shadow-30 p-0 testMe1 dialog-no-focus-outline"]),style:(0,t.normalizeStyle)({"--dialog-width":m.value}),onClick:b,onCancel:h,onAnimationend:r},[(0,t.createElementVNode)("div",{class:"grid grid-dialog max-height-100-2",tabindex:"-1",autofocus:"",onClick:p[0]||(p[0]=(0,t.withModifiers)(()=>{},["stop"]))},[i.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",oH)):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header||e.dismissable?((0,t.openBlock)(),(0,t.createElementBlock)("header",{key:1,class:(0,t.normalizeClass)(["flex space-between flex-shrink-0 align-items-start gap-05",{"border-bottom":!e.flat,"border-none":!e.title&&!N.$slots.header,"m_ps-1":e.title||N.$slots.header,"p-05 m_p-05":!e.title&&!N.$slots.header,"ps-1-5 pe-1 py-1 ":!e.thin&&(e.title||N.$slots.header),"ps-1 pe-05 py-05":e.thin&&(e.title||N.$slots.header)}])},[e.dismissable&&e.closePlacement==="header-start"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:G})):(0,t.createCommentVNode)("",!0),e.title||N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("h3",{key:1,class:(0,t.normalizeClass)(["dialog-title m-0 txt20 semi w-100p",{"txt-center balance":e.centerTitle,"word-break-all":!e.centerTitle,"ellipsis-1":e.ellipsisTitle}])},[(0,t.renderSlot)(N.$slots,"header",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.title),1)],!0)],2)):(0,t.createCommentVNode)("",!0),!e.title&&!N.$slots.header?((0,t.openBlock)(),(0,t.createElementBlock)("div",mH)):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="header-end"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:3,flat:"",icon:"close","aria-label":"Close",class:"dialog-close relative z-2",thin:"",onClick:G})):(0,t.createCommentVNode)("",!0)],2)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["overflow-y flex-grow-1 m_p-1",{"px-1 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"default",{},void 0,!0)],2),N.$slots.footer?((0,t.openBlock)(),(0,t.createElementBlock)("footer",{key:2,class:(0,t.normalizeClass)(["flex flex-shrink-0 gap-05 m_px-05 m_py-05 justify-content-end",{"border-top":!e.flat,"px-05 py-05":e.thin,"px-1-5 py-1":!e.thin}])},[(0,t.renderSlot)(N.$slots,"footer",{},void 0,!0)],2)):(0,t.createCommentVNode)("",!0)]),e.dismissable&&e.closePlacement==="overlay-start"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:0,icon:"close","aria-label":"Close",class:"fixed top-1 start-1 z-999 overlay-btn",onClick:G})):(0,t.createCommentVNode)("",!0),e.dismissable&&e.closePlacement==="overlay-end"&&o.value?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,icon:"close","aria-label":"Close",class:"fixed top-1 end-1 z-999 overlay-btn",onClick:G})):(0,t.createCommentVNode)("",!0)],38))}}),Kt=Le(uH,[["__scopeId","data-v-42595465"]]),ZH=(0,t.defineComponent)({__name:"DialogConfirm",props:{open:{type:Boolean},title:{},message:{},width:{default:"s"},position:{default:"center"},dismissable:{type:Boolean,default:!0},confirmText:{},cancelText:{},confirmColor:{default:"primary"}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:i}=al(),c=(0,t.computed)(()=>a.title||i("modalConfirm.title")),d=(0,t.computed)(()=>a.confirmText||i("modalConfirm.confirm")),s=(0,t.computed)(()=>a.cancelText||i("modalConfirm.cancel"));function o(){n("resolve",!0),n("update:open",!1)}function m(){n("resolve",!1),n("update:open",!1)}function u(){n("resolve",!1)}return(Z,r)=>((0,t.openBlock)(),(0,t.createBlock)(Kt,{open:e.open,title:c.value,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":r[0]||(r[0]=b=>Z.$emit("update:open",b)),onClose:u},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(oe,{flat:"",onClick:m},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(s.value),1)]),_:1}),(0,t.createVNode)(oe,{color:e.confirmColor,onClick:o},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(d.value),1)]),_:1},8,["color"])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("p",null,(0,t.toDisplayString)(e.message),1)]),_:1},8,["open","title","width","position","dismissable"]))}}),K5=ZH,Tn=new Map,Pm=new Set,H5=/^[a-z0-9][a-z0-9._-]*:[a-z0-9][a-z0-9._-]*$/i;function rH(e){if(!H5.test(e.type))throw new Error(`Custom form field type "${e.type}" must be a namespaced ID such as "acme:rating"`);if(Tn.has(e.type))throw new Error(`Custom form field type "${e.type}" is already registered`);return Tn.set(e.type,e),Pm.delete(e.type),()=>{Tn.get(e.type)===e&&Tn.delete(e.type)}}function Xt(e){return Tn.get(e)}function bH(){return[...Tn.values()]}function xs(e){return H5.test(e)}function zs(e){!xs(e)||Pm.has(e)||Pm.add(e)}function hH(e,l,a={},n=""){return Xt(e)?.display?.(l,{key:n,config:a})}function b2(e,l){const a={...l};for(const[n,i]of Object.entries(e)){const c=Xt(i._type)?.toSubmission;if(!c)continue;const d=c(a[n],{key:n,config:i._config,formData:l});d===void 0?delete a[n]:a[n]=d}return a}const pH=12,WH=12,GH=1;var P5=/^col-(\d{1,2})\/12$/,Q5=/^start-col-(\d{1,2})$/,A5=/^m_col-(\d{1,2})\/12$/,_5=/^start-row-(\d+)$/,$5=/^(?:grid-)?span-row-(\d+)$/,q5=/^m_start-col-(\d{1,2})$/,eW=/^m_start-row-(\d+)$/,lW=/^m_(?:grid-)?span-row-(\d+)$/,Bd={"col-1/12":1,"col-1/6":2,"col-2/12":2,"col-1/4":3,"col-3/12":3,"col-1/3":4,"col-4/12":4,"col-5/12":5,"col-1/2":6,"col-6/12":6,"col-7/12":7,"col-2/3":8,"col-8/12":8,"col-3/4":9,"col-9/12":9,"col-5/6":10,"col-10/12":10,"col-11/12":11,"col-full":12,"col-12/12":12},Qm=Object.fromEntries(Object.entries(Bd).map(([e,l])=>[`m_${e}`,l]));function za(e){return Math.max(1,Math.min(12,Math.round(e)))}function gs(e){return Math.max(1,Math.round(e))}function tW(e){return`col-${za(e)}/12`}function aW(e){return`start-col-${za(e)}`}function nW(e){return`m_col-${za(e)}/12`}function iW(e){return`span-row-${gs(e)}`}function NH(e){return`start-row-${Math.max(1,Math.round(e))}`}function cW(e){return`m_start-col-${za(e)}`}function dW(e){return`m_start-row-${Math.max(1,Math.round(e))}`}function sW(e){return`m_span-row-${gs(e)}`}function h2(e){if(e)for(const l of e.split(/\s+/)){if(l.startsWith("m_"))continue;const a=l.match(P5);if(a)return za(Number(a[1]));if(l in Bd)return Bd[l]}}function p2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(Q5);if(a)return za(Number(a[1]))}}function W2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(A5);if(a)return za(Number(a[1]));if(l in Qm)return Qm[l]}}function G2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(q5);if(a)return za(Number(a[1]))}}function N2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match($5);if(a)return gs(Number(a[1]))}}function Y2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(_5);if(a)return Math.max(1,Number(a[1]))}}function L2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(eW);if(a)return Math.max(1,Number(a[1]))}}function X2(e){if(e)for(const l of e.split(/\s+/)){const a=l.match(lW);if(a)return gs(Number(a[1]))}}function y2(e){return e?e.split(/\s+/).filter(Boolean).filter(l=>!P5.test(l)&&!Q5.test(l)&&!A5.test(l)&&!_5.test(l)&&!$5.test(l)&&!q5.test(l)&&!eW.test(l)&&!lW.test(l)&&!(l in Bd)&&!(l in Qm)).join(" "):""}function oW(e,l){const a=y2(e),n=a?[a]:[];return l.colSpan!==void 0&&l.colSpan!==12&&n.push(tW(l.colSpan)),l.colStart!==void 0&&n.push(aW(l.colStart)),l.rowStart!==void 0&&n.push(NH(l.rowStart)),l.rowSpan!==void 0&&l.rowSpan!==1&&n.push(iW(l.rowSpan)),l.mColSpan!==void 0&&l.mColSpan!==12&&n.push(nW(l.mColSpan)),l.mColStart!==void 0&&n.push(cW(l.mColStart)),l.mRowStart!==void 0&&n.push(dW(l.mRowStart)),l.mRowSpan!==void 0&&l.mRowSpan!==1&&n.push(sW(l.mRowSpan)),n.join(" ")}function mW(e){return{colSpan:h2(e),colStart:p2(e),rowStart:Y2(e),rowSpan:N2(e),mColSpan:W2(e),mColStart:G2(e),mRowStart:L2(e),mRowSpan:X2(e)}}var YH=(0,t.defineComponent)({__name:"FormFlow",props:{schema:{},modelValue:{},components:{},errors:{},onSubmit:{type:Function}},emits:["update:modelValue","change"],setup(e,{expose:l,emit:a}){const n=e,i=a,{$t:c}=al();function d(k,K){const O=K.split(".");let x=k;for(const y of O)x=x?.[y];return x}function s(k,K,O){const x=K.split(".");let y=k;for(let R=0;R<x.length-1;R++){const g=x[R];(y[g]==null||typeof y[g]!="object")&&(y[g]={}),y=y[g]}y[x[x.length-1]]=O}function o(k){if(k==null||typeof k!="object")return k;try{return structuredClone(k)}catch{return JSON.parse(JSON.stringify(k))}}function m(k,K,O,x){const y=Xt(k._type);if(y?.coerce)return y.coerce(K,{key:O,config:k._config,formData:x});if(typeof K!="string")return K;const R=K.trim();switch(k._type){case"checkbox":case"toggle":return R.toLowerCase()==="true"?!0:R.toLowerCase()==="false"?!1:K;case"number":case"range":{if(!R)return K;const g=Number(R);return Number.isNaN(g)?K:g}default:return K}}function u(k){const K={...k??{}};for(const[O,x]of Object.entries(n.schema._fields)){const y=d(K,O);if(y!==void 0){s(K,O,m(x,y,O,K));continue}const R=x._config.default;R!==void 0&&s(K,O,m(x,o(R),O,K))}return K}function Z(k){const K=k._config.schema;if(K&&typeof K.getDefaults=="function"){const x=o(K.getDefaults());if(x&&Object.keys(x).length>0)return x}const O=k._config.default;return Array.isArray(O)&&O.length>0&&O[0]!=null&&typeof O[0]=="object"?o(r(O[0])):{}}function r(k){try{return JSON.parse(JSON.stringify(k))}catch{return{...k}}}const b=(0,t.ref)(u(n.modelValue)),h=(0,t.ref)({}),G=(0,t.ref)(!1),N=(0,t.ref)("idle"),p=(0,t.ref)();let W=!1;(0,t.watch)(()=>n.modelValue,k=>{W||(b.value=u(k))},{deep:!0}),(0,t.watch)(b,k=>{W=!0,i("update:modelValue",o(k)),(0,t.nextTick)(()=>{W=!1})},{deep:!0});function Y(k){return k._hidden?!1:k._condition==null?!0:gu(k._condition,b.value)}function L(k,K){if(K._condition==null)return k;const O=K._condition.trim().split(/\s+/)[0];if(!O)return k;const x=d(b.value,O);return x==null?k:`${k}:${String(x)}`}const X=(0,t.computed)(()=>{const k=[];for(const[K,O]of Object.entries(n.schema._fields))Y(O)&&k.push({key:K,field:O});return k});function V(k){if(!n.schema._class?.split(/\s+/).includes("free-grid"))return;const{rowStart:K,rowSpan:O,mRowStart:x,mRowSpan:y}=mW(k._class);if(!(!K&&!x&&!O&&!y))return{...K?{"--bgl-grid-row-start":String(K)}:{},...x?{"--bgl-mobile-grid-row-start":String(x)}:{},...O?{"--bgl-grid-row-span":String(O)}:{},...y?{"--bgl-mobile-grid-row-span":String(y)}:{}}}function M(k,K,O){const x=o(b.value);s(b.value,k,K),i("change",o(b.value),x),(N.value==="success"||N.value==="error")&&(N.value="idle"),G.value&&w(k,O)}function T(k,K,O){const x=Xt(K._type);return x?.isEmpty?x.isEmpty(k,{key:O,config:K._config,formData:b.value}):k==null||k===""||k===!1&&K._type==="checkbox"||Array.isArray(k)&&k.length===0||K._type==="tel"&&typeof k=="string"&&/^\+\d{1,3}$/.test(k)}function w(k,K){const O=I(k);if(K._config.required===!0&&T(O,K,k))return h.value={...h.value,[k]:K._config.requiredMessage??c("form.required")},!1;if(K._type==="email"&&O&&!Fa.test(O))return h.value={...h.value,[k]:c("form.invalidEmail")},!1;const x=Xt(K._type)?.validate?.(O,{key:k,config:K._config,formData:b.value});if(x!==void 0&&x!==!0)return h.value={...h.value,[k]:x},!1;if(K._validations!=null)for(const y of K._validations){const R=y(O);if(R!==!0)return h.value={...h.value,[k]:R},!1}return h.value=Object.fromEntries(Object.entries(h.value).filter(([y])=>y!==k)),!0}function I(k){return d(b.value,k)}function j(k,K){return K._config.label!=null?K._config.label:k.split(/[._-]/).map(O=>O.charAt(0).toUpperCase()+O.slice(1)).join(" ")}function f(k){if(typeof k!="string"&&(k._type==="select"||k._type==="multiselect")&&k._config.display==="btn")return n.components?.selectBtn??fu;const K=typeof k=="string"?k:k._type;if(K&&n.components?.[K]!=null)return n.components[K];const O=K?Xt(K)?.component:void 0;return O||(K&&xs(K)&&zs(K),{text:Fe,email:Ru,password:vh,number:Nt,tel:qu,url:Fe,date:Da,time:Fe,datetime:Da,textarea:Fe,richtext:wd,json:wu,checkbox:Rl,toggle:Xs,radio:Fh,select:Ol,multiselect:Ol,array:Wn,heading:vm,divider:vm,upload:ki,color:wt,icon:Mh,range:vu}[K]??Fe)}const J=(0,t.computed)(()=>{const k={...h.value,...n.errors||{}},K={};for(const[O,x]of Object.entries(k))K[O]=Te(x)??x;return K});function E(k,K){const O=j(K,k),{helpText:x,...y}=k._config,R=n.schema._class?.split(/\s+/).includes("free-grid")??!1,g={label:O,modelValue:I(K),"onUpdate:modelValue":Q=>{M(K,Q,k)},error:J.value[K],...y,formData:b.value,...x!=null?{helptext:x}:{},name:k._config.name??K};if(k._type==="textarea"&&(g.multiline=!0),k._type==="multiselect"&&(g.multiselect=!0),R&&k._type==="richtext"&&(g.fullHeight=!0),R&&(k._type==="upload"||k._type==="file")&&(g.height=k._config.hideLabel?"100%":"calc(100% - 1.75rem)"),(k._type==="select"||k._type==="multiselect")&&typeof g.options=="function"){const Q=g.options;g.options=P=>Q(P,b.value)}if(k._type==="json"&&(g.language=g.language??"json"),k._type==="array"){delete g.default,delete g.schema,delete g.itemType;const{helpText:Q,...P}=Object.fromEntries(Object.entries(k._config).filter(([me])=>me!=="schema"&&me!=="itemType"&&me!=="default"));Object.assign(g,P),Q!=null&&(g.helptext=Q),delete g.helpText,g.modelValue=I(K),g["onUpdate:modelValue"]=me=>{M(K,me,k)},g.allowAdd=g.allowAdd??!0,g.allowDelete=g.allowDelete??!0}return g}function ee(k,K){return{...k._component?.props??{},...E(k,K)}}function B(k){return typeof k=="string"&&n.components?.[k]!=null?n.components[k]:k}function U(k){return k._component!=null}function _(){let k=!0;const K={};for(const{key:O,field:x}of X.value){const y=I(O);if(x._config.required===!0&&T(y,x,O)){K[O]=x._config.requiredMessage??c("form.required"),k=!1;continue}if(x._type==="email"&&y&&!Fa.test(y)){K[O]=c("form.invalidEmail"),k=!1;continue}const R=Xt(x._type)?.validate?.(y,{key:O,config:x._config,formData:b.value});if(R!==void 0&&R!==!0){K[O]=R,k=!1;continue}if(x._validations!=null)for(const g of x._validations){const Q=g(y);if(Q!==!0){K[O]=Q,k=!1;break}}}return h.value=K,k}async function de(k){k&&k.preventDefault(),G.value=!0;const K=_();if(K){if(n.onSubmit){N.value="submitting";try{await n.onSubmit(b2(n.schema._fields,b.value)),N.value="success"}catch{N.value="error"}}}else{k?.stopPropagation(),p.value?.reportValidity();const O=X.value.find(({key:x})=>h.value[x])?.key;if(O!=null&&p.value){const x=p.value.querySelector(`[name="${O}"]`)||p.value.querySelector(`[id="${O}"]`)||p.value.querySelector(`[data-field="${O}"]`)||p.value.querySelector("input, select, textarea");x&&(x.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{x instanceof HTMLElement&&x.focus()},300))}}return K}return l({validate:_,submit:de,formState:N}),(k,K)=>{const O=(0,t.resolveComponent)("FormFlow",!0);return(0,t.openBlock)(),(0,t.createElementBlock)("form",{ref_key:"formElement",ref:p,class:(0,t.normalizeClass)(["grid-form",e.schema._class]),onSubmit:de},[N.value==="success"?(0,t.renderSlot)(k.$slots,"success",{formData:b.value},void 0,void 0,0):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(X.value,({key:x,field:y})=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:L(x,y),class:(0,t.normalizeClass)([y._class,y._config.class]),style:(0,t.normalizeStyle)(V(y))},[(0,t.renderSlot)(k.$slots,`field:${x}`,{value:I(x),field:y,formData:b.value,error:h.value[x],onChange:R=>{M(x,R,y)}},()=>[y._type==="array"&&y._config.schema?._isSchema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:0,ref_for:!0},E(y,x),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[(0,t.createVNode)(O,{"model-value":R.value,schema:y._config.schema,components:e.components,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","schema","components","onUpdate:modelValue"])]),_:2},1040,["create-item"])):y._type==="array"&&typeof y._config.schema=="string"?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:1,ref_for:!0},E(y,x),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.schema)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):y._type==="array"&&y._config.schema?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:2,ref_for:!0},E(y,x),{"create-item":()=>Z(y)}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(B(y._config.schema)),{modelValue:R.value,"onUpdate:modelValue":g=>R.value=g},null,8,["modelValue","onUpdate:modelValue"]))]),_:2},1040,["create-item"])):y._type==="array"&&y._config.itemType?((0,t.openBlock)(),(0,t.createBlock)(Wn,(0,t.mergeProps)({key:3,ref_for:!0},E(y,x),{"create-item":()=>""}),{default:(0,t.withCtx)(({item:R})=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y._config.itemType)),{"model-value":R.value,"onUpdate:modelValue":g=>{R.value=g}},null,8,["model-value","onUpdate:modelValue"]))]),_:2},1040)):U(y)?((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(B(y._component.component)),(0,t.mergeProps)({key:4,ref_for:!0},ee(y,x)),null,16)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(f(y)),(0,t.mergeProps)({key:5,ref_for:!0},E(y,x)),null,16))])],6))),128)),(0,t.renderSlot)(k.$slots,"errors",{errors:J.value,errorCount:Object.keys(J.value).filter(x=>J.value[x]).length,visibleFields:X.value}),N.value==="error"?(0,t.renderSlot)(k.$slots,"error",{formData:b.value},void 0,void 0,0):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(k.$slots,"submit",{submit:de,validate:_,formData:b.value,errors:J.value,formState:N.value})],64))],34)}}}),ws=YH,LH={key:0,class:"dialog-form-error bg-red-30 color-red radius-1 mb-1 txt14 px-1 py-075"},XH={key:1,class:"mb-1 mt-0"},yH=(0,t.defineComponent)({__name:"DialogForm",props:{open:{type:Boolean},title:{},width:{default:"m"},position:{default:"center"},dismissable:{type:Boolean,default:!0},schema:{},modelValue:{},message:{},onSubmit:{},onDelete:{},submitText:{},cancelText:{},deleteText:{}},emits:["update:open","resolve"],setup(e,{emit:l}){const a=e,n=l,{$t:i}=al(),c=(0,t.ref)({...a.modelValue||{}}),d=(0,t.ref)(!1),s=(0,t.ref)(!1),o=(0,t.ref)(null),m=(0,t.ref)(),u=(0,t.computed)(()=>typeof a.onDelete=="function");async function Z(){if(!d.value){if(!m.value?.validate()){o.value=i("dialogForm.validationError");return}o.value=null,d.value=!0;try{a.onSubmit&&await a.onSubmit(c.value),n("resolve",{action:"submit",data:c.value}),n("update:open",!1)}catch(G){o.value=G instanceof Error?G.message:i("dialogForm.errorOccurred")}finally{d.value=!1}}}async function r(){if(!(s.value||!a.onDelete)){o.value=null,s.value=!0;try{await a.onDelete(c.value),n("resolve",{action:"delete",data:c.value}),n("update:open",!1)}catch(G){o.value=G instanceof Error?G.message:i("dialogForm.errorOccurred")}finally{s.value=!1}}}function b(){n("resolve",{action:"cancel",data:c.value}),n("update:open",!1)}function h(){n("resolve",{action:"cancel",data:c.value})}return(G,N)=>((0,t.openBlock)(),(0,t.createBlock)(Kt,{open:e.open,title:e.title,width:e.width,position:e.position,dismissable:e.dismissable,"onUpdate:open":N[1]||(N[1]=p=>G.$emit("update:open",p)),onClose:h},{footer:(0,t.withCtx)(()=>[u.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:0,color:"red",flat:"",loading:s.value,disabled:d.value,class:"me-auto",thin:"",onClick:r},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.deleteText||(0,t.unref)(i)("dialogForm.delete")),1)]),_:1},8,["loading","disabled"])):(0,t.createCommentVNode)("",!0),N[2]||(N[2]=(0,t.createElementVNode)("div",{class:"flex-grow-1"},null,-1)),(0,t.createVNode)(oe,{flat:"",disabled:d.value||s.value,onClick:b,thin:""},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.cancelText||(0,t.unref)(i)("dialogForm.cancel")),1)]),_:1},8,["disabled"]),(0,t.createVNode)(oe,{color:"primary",loading:d.value,disabled:s.value,onClick:Z},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.submitText||(0,t.unref)(i)("dialogForm.save")),1)]),_:1},8,["loading","disabled"])]),default:(0,t.withCtx)(()=>[o.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",LH,(0,t.toDisplayString)(o.value),1)):(0,t.createCommentVNode)("",!0),e.message?((0,t.openBlock)(),(0,t.createElementBlock)("p",XH,(0,t.toDisplayString)(e.message),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(ws,{ref_key:"formFlowRef",ref:m,modelValue:c.value,"onUpdate:modelValue":N[0]||(N[0]=p=>c.value=p),schema:e.schema,onSubmit:Z},null,8,["modelValue","schema"])]),_:1},8,["open","title","width","position","dismissable"]))}}),uW=yH;const M2=Symbol("dialog");var Kd=null;function ZW(){let e=null;try{e=(0,t.inject)(M2,null)}catch{e=null}if(!e){if(Kd)return Kd;throw new Error("Dialog API not provided. Make sure DialogPlugin is installed via app.use(DialogPlugin)")}return e}const rW={install:e=>{let l=0;const a=(0,t.reactive)([]),n={form:c=>new Promise(d=>{const s=++l;a.push({id:s,type:"form",options:c,resolve:d,open:!0})}),confirm:c=>new Promise(d=>{const s=++l,o=typeof c=="string"?{message:c}:c;a.push({id:s,type:"confirm",options:o,resolve:d,open:!0})}),open:c=>{const d=++l,s={id:d,type:"open",options:c,resolve:()=>{},open:!0};return a.push(s),{close:()=>{const o=a.findIndex(m=>m.id===d);o!==-1&&(a[o].open=!1,setTimeout(()=>{const m=a.findIndex(u=>u.id===d);m!==-1&&a.splice(m,1)},200))}}}};Kd||(Kd=n),e.provide(M2,n);const i=(0,t.defineComponent)({name:"DialogContainer",setup(){function c(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function d(o,m){o.resolve(m),o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200)}function s(o,m){m||(o.open=!1,setTimeout(()=>{const u=a.findIndex(Z=>Z.id===o.id);u!==-1&&a.splice(u,1)},200))}return{dialogStack:a,handleFormResolve:c,handleConfirmResolve:d,handleOpenUpdate:s}},render(){return this.dialogStack.map(c=>{if(c.type==="form")return(0,t.h)(uW,{key:c.id,open:c.open,...c.options,"onUpdate:open":d=>{d||this.handleFormResolve(c,{action:"cancel",data:c.options.modelValue||{}})},onResolve:d=>{this.handleFormResolve(c,d)}});if(c.type==="confirm")return(0,t.h)(K5,{key:c.id,open:c.open,...c.options,"onUpdate:open":d=>{d||this.handleConfirmResolve(c,!1)},onResolve:d=>{this.handleConfirmResolve(c,d)}});if(c.type==="open"){const d=c.options;return(0,t.h)(Kt,{key:c.id,open:c.open,title:d.title,width:d.width,position:d.position,dismissable:d.dismissable,class:d.class,"onUpdate:open":s=>{this.handleOpenUpdate(c,s)}},{default:()=>(0,t.h)((typeof d.component=="string",d.component),d.props||{})})}return null})}});if(e.component("DialogContainer",i),typeof document<"u"&&typeof window<"u"){const c=()=>{if(!document.getElementById("bagelink-dialog-root")){const d=document.createElement("div");d.id="bagelink-dialog-root",document.body.appendChild(d);const s=(0,t.createApp)(i);Object.assign(s._context,e._context),s.mount(d)}};document.body&&c(),e.mixin({mounted(){this.$root===this&&c()}})}}};var V2={pint:{pattern:/\d/},int:{pattern:/[\d-]/},pnum:{pattern:/[\d.]/},tel:{pattern:/[\d.\-()\s+]/},money:{pattern:/[\d.\s,]/},number:{pattern:/[\d\-.]/},num:{pattern:/[\d\-.]/},hex:{pattern:/[0-9a-f]/i},email:{pattern:/[\w.\-@]/},alpha:{pattern:/[a-z_]/i},alphanum:{pattern:/\w/},lower:{pattern:/[a-z]/i,transform:e=>e.toLowerCase()},upper:{pattern:/[A-Z]/i,transform:e=>e.toUpperCase()},slug:{pattern:/[a-z0-9-]/i,transform:e=>e.toLowerCase().replace(/\s/g,"-")},snake:{pattern:/[a-z_]/,transform:e=>e.toLowerCase().replace(/\s/g,"_")}},Bc=new WeakMap;function vo(e){if(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)return e;const l=e.querySelector("input, textarea");return l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement?l:null}function cb(e){const l=Object.keys(e.modifiers);return l.length>0?l[l.length-1]:""}function bW(e){return e.pattern!=null?e.pattern:e.modifier!=null&&e.modifier!==""?V2[e.modifier]?.pattern??/./:/./}function db(e,l,a){a.keydownEvent=(n=>{VH(n,l,a)}),a.inputEvent=(n=>{hW(n,l,a)}),a.compositionStartEvent=(()=>{TH(a)}),a.compositionEndEvent=(n=>{IH(n,l,a)}),l.addEventListener("keydown",a.keydownEvent),l.addEventListener("input",a.inputEvent,{capture:!0}),l.addEventListener("compositionstart",a.compositionStartEvent),l.addEventListener("compositionend",a.compositionEndEvent)}function sb(e,l){l.keydownEvent&&e.removeEventListener("keydown",l.keydownEvent),l.inputEvent&&e.removeEventListener("input",l.inputEvent,{capture:!0}),l.compositionStartEvent&&e.removeEventListener("compositionstart",l.compositionStartEvent),l.compositionEndEvent&&e.removeEventListener("compositionend",l.compositionEndEvent),l.keydownEvent=void 0,l.inputEvent=void 0,l.compositionStartEvent=void 0,l.compositionEndEvent=void 0}function MH(e){const l=["Tab","Backspace","Delete","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Enter"];return e.ctrlKey||e.altKey||e.metaKey?!0:l.includes(e.key)}function VH(e,l,a){if(a.composing===!0||MH(e)||a.modifier!=null&&a.modifier!==""&&typeof V2[a.modifier]?.transform=="function")return;const n=bW(a),i=e.key;n.test(i)||e.preventDefault()}function TH(e){e.composing=!0}function IH(e,l,a){a.composing=!1,hW(e,l,a)}function ob(e,l){const a=bW(l);let n;if(l.modifier!=null&&l.modifier!==""){const c=V2[l.modifier]?.transform;n=c?c(e):e}else n=e;let i="";for(let c=0;c<n.length;c++){const d=n[c];a.test(d)&&(i+=d)}return i}function hW(e,l,a){if(a.reformatting===!0||a.composing===!0)return;const n=l.value,i=l.selectionEnd??n.length,c=n.slice(0,i),d=ob(n,a);if(d===n)return;const s=ob(c,a).length;a.reformatting=!0,l.value=d,l.setSelectionRange(s,s),a.reformatting=!1}var xH={beforeMount(e,l){const a=vo(e);if(a===null)return;const n={modifier:cb(l)};typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),Bc.set(e,n),db(e,a,n)},updated(e,l){const a=vo(e);if(a===null)return;const n=Bc.get(e);n!==void 0&&(sb(a,n),n.modifier=cb(l),typeof l.value=="object"&&l.value!==null&&(n.pattern=l.value.pattern??/./,n.validateOnly=l.value.validateOnly===!0),db(e,a,n))},unmounted(e){const l=vo(e),a=Bc.get(e);l!==null&&a!==void 0&&sb(l,a),Bc.delete(e)},getSSRProps(){return{}}},pW=xH,zH=()=>typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;function gH(e){const l={y:"up",delay:0,once:!0,threshold:.12};return e?typeof e=="string"?{...l,y:e}:{...l,...e}:l}var fo=new WeakMap,wH={mounted(e,l){const a=gH(l.value);if(zH())return;e.classList.add("bgl-reveal"),a.y!=="none"&&(e.dataset.revealDir=a.y),a.delay&&e.style.setProperty("--bgl-reveal-delay",`${a.delay}ms`);const n=new IntersectionObserver(i=>{for(const c of i)c.isIntersecting?(e.classList.add("bgl-reveal-in"),a.once&&n.unobserve(e)):a.once||e.classList.remove("bgl-reveal-in")},{threshold:a.threshold,rootMargin:"0px 0px -8% 0px"});n.observe(e),fo.set(e,n)},unmounted(e){fo.get(e)?.disconnect(),fo.delete(e)},getSSRProps(){return{}}},WW=wH;function RH(e){let l=e.__rippleContainer;return(!l||!l.isConnected)&&(l=document.createElement("span"),Object.assign(l.style,{position:"absolute",inset:"0",overflow:"hidden",borderRadius:"inherit",pointerEvents:"none"}),e.appendChild(l),e.__rippleContainer=l),l}var SH={mounted(e,l){const a=n=>{const i=e.getBoundingClientRect(),c=Math.max(i.width,i.height),d=document.createElement("span");d.className="ripple",Object.assign(d.style,{width:`${c}px`,height:`${c}px`,left:`${n.clientX-i.left-c/2}px`,top:`${n.clientY-i.top-c/2}px`,position:"absolute",borderRadius:"50%",transform:"scale(0)",background:"rgba(0, 0, 0, 0.3)",pointerEvents:"none",animation:"rippleEffect 0.6s ease-out"}),RH(e).appendChild(d),setTimeout(()=>{d.remove()},600)};e.__rippleClickHandler=a,l.value!==!1&&(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},updated(e,l){const a=e.__rippleClickHandler;l.value===!1?e.removeEventListener("mousedown",a):(getComputedStyle(e).position==="static"&&(e.style.position="relative"),e.addEventListener("mousedown",a))},unmounted(e){const l=e.__rippleClickHandler;l&&(e.removeEventListener("mousedown",l),delete e.__rippleClickHandler)},getSSRProps(){return{}}},GW=SH,Hd=new WeakMap;function mb(e,l){const a=l.value||{},n=l2();let i=a.handle?e.querySelector(a.handle):e;const c=!i;i||(i=e.ownerDocument.createElement("div"),i.className=a.handle.replace(".","")+(a.handleClass?` ${a.handleClass}`:""),i.style.cssText="position:absolute;bottom:0;left:0;right:0;height:6px;background:rgba(0,0,0,0.1);",e.appendChild(i));const d=i,s={cursor:d.style.cursor,userSelect:d.style.userSelect,touchAction:d.style.touchAction},o=["role","tabindex","aria-orientation","aria-label","aria-valuenow","aria-valuemin","aria-valuemax"].map(r=>[r,d.getAttribute(r)]);d.style.cursor="ns-resize",d.style.userSelect="none",d.style.touchAction="none",d.setAttribute("role","separator"),d.setAttribute("tabindex","0"),d.setAttribute("aria-orientation","horizontal"),d.hasAttribute("aria-label")||d.setAttribute("aria-label","Resize height"),d.setAttribute("aria-valuemin",String(a.minHeight??0)),a.maxHeight!==void 0&&d.setAttribute("aria-valuemax",String(a.maxHeight)),d.setAttribute("aria-valuenow",String(e.offsetHeight));function m(r,b,h){const G={clientY:r,deltaY:r-b,initialHeight:h},N=h+G.deltaY,p=a.gridSize&&a.gridSize>0?Math.round(N/a.gridSize)*a.gridSize:N,W=Math.min(a.maxHeight??1/0,Math.max(a.minHeight??0,p));return e.style.height=`${W}px`,d.setAttribute("aria-valuenow",String(W)),a.onResize?.(G),G}function u(r){if(r.button!==0||r.isPrimary===!1)return;n.cancel();const b=r.clientY,h=e.offsetHeight,G=e.style.height,N=d.getAttribute("aria-valuenow");a.onStart?.(r),n.start(r,{cursor:"ns-resize",onMove:p=>m(p.clientY,b,h),onEnd(p){const W=m(p.clientY,b,h);a.onEnd?.(W)},onCancel(){e.style.height=G,N!==null&&d.setAttribute("aria-valuenow",N),a.onCancel?.()}})}function Z(r){if(!["ArrowUp","ArrowDown","Home","End"].includes(r.key)||r.key==="End"&&a.maxHeight===void 0)return;r.preventDefault(),n.cancel();const b=e.offsetHeight,h=(a.gridSize||10)*(r.shiftKey?5:1),G=r.key==="Home"?a.minHeight??0:r.key==="End"?a.maxHeight:b+(r.key==="ArrowUp"?-h:h);a.onStart?.(r);const N=m(G-b,0,b);a.onEnd?.(N)}d.addEventListener("pointerdown",u),d.addEventListener("keydown",Z),Hd.set(e,()=>{n.cancel(),d.removeEventListener("pointerdown",u),d.removeEventListener("keydown",Z),Object.assign(d.style,s);for(const[r,b]of o)b===null?d.removeAttribute(r):d.setAttribute(r,b);c&&d.remove(),Hd.delete(e)})}const vH={mounted:mb,unmounted(e){Hd.get(e)?.()},updated(e,l){l.value!==l.oldValue&&(Hd.get(e)?.(),mb(e,l))},getSSRProps(){return{}}};function Pd(e){return e==="richtext"?3:e==="textarea"||e==="json"||e==="radio"||e==="file"||e==="signature"?2:1}function T2(e){if(e.format)switch(e.format){case"email":return"email";case"tel":return"phone";case"uri":case"url":return"url";case"date":case"date-time":return"date"}if(e.enum)return"select";switch(e.type){case"number":case"integer":return"number";case"boolean":return"checkbox"}return"text"}function NW(e){if(!e?.properties)return[];const l=new Set(e.required??[]),a=[],n=Object.keys(e.properties),i=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(d=>typeof d=="string"&&d in e.properties):[],c=[...new Set([...i,...n])];for(const d of c){const s=e.properties[d],o=s["x-field-type"]??T2(s),m={};s.minLength!==void 0&&(m.minLength=s.minLength),s.maxLength!==void 0&&(m.maxLength=s.maxLength),s.minimum!==void 0&&(m.min=s.minimum),s.maximum!==void 0&&(m.max=s.maximum),s.multipleOf!==void 0&&(m.step=s.multipleOf),s.pattern!==void 0&&(m.pattern=s.pattern),s["x-options"]?m.options=s["x-options"]:s.enum&&(m.options=s.enum.map(r=>({label:String(r),value:String(r)})));const u=s["x-ui"]?.class,Z={id:crypto.randomUUID(),key:d,type:o,label:s.title??d,placeholder:s["x-placeholder"],description:s.description,required:l.has(d)||void 0,colSpan:h2(u)??12,colStart:p2(u),rowStart:Y2(u),rowSpan:N2(u)??Pd(o),mColSpan:W2(u)??12,mColStart:G2(u),mRowStart:L2(u),mRowSpan:X2(u),class:y2(u)||void 0,hideLabel:s["x-hide-label"]??!1,condition:s["x-ui"]?.condition||void 0,hidden:s["x-ui"]?.hidden||o==="hidden"||void 0,richTextVariant:s["x-rich-text-variant"],richTextHeight:s["x-rich-text-height"],richTextExtensions:s["x-rich-text-extensions"],markdownShowFormatting:s["x-markdown-show-formatting"],textareaRows:s["x-textarea-rows"],textareaAutoHeight:s["x-textarea-autoheight"],numberLayout:s["x-number-layout"],numberSpinner:s["x-number-spinner"]??!0,phoneOnlyCountries:Array.isArray(s["x-phone-only-countries"])?s["x-phone-only-countries"].join(", "):s["x-phone-only-countries"],selectMultiselect:s["x-select-multiselect"],selectSearchable:s["x-select-searchable"],fileMultiple:s["x-file-multiple"],fileHeight:s["x-file-height"],fileAccept:s["x-file-accept"],fileTheme:s["x-file-theme"],fileShowIcon:s["x-file-show-icon"]===!1?!1:void 0,fileIcon:s["x-file-icon"],dateEnableTime:s["x-date-enable-time"],dateMin:s["x-date-min"],dateMax:s["x-date-max"],rangeMulti:s["x-range-multi"],radioThin:s["x-radio-thin"],radioHideRadio:s["x-radio-hide-radio"],radioHideLabelWhenImage:s["x-radio-hide-label-when-image"],radioAlign:s["x-ui"]?.radioAlign??s["x-radio-align"],radioInline:s["x-radio-inline"],radioSize:s["x-radio-size"],radioTextAlign:s["x-ui"]?.radioTextAlign??s["x-radio-text-align"]??"center",textIcon:s["x-text-icon"],textIconStart:s["x-text-icon-start"],validation:Object.keys(m).length>0?m:void 0,defaultValue:s.default,content:s["x-field-type"]==="heading"?s.title:void 0};a.push(Z)}return a}function fH(e,l={}){const a={},n=[];for(const c of e){const d={};if(c.type==="heading"||c.type==="divider")d.type="string",d.title=c.content||c.label,d["x-field-type"]=c.type;else{switch(c.type){case"text":case"textarea":case"richtext":case"markdown":case"email":case"phone":case"url":case"date":case"signature":case"color":case"hidden":d.type="string";break;case"file":c.fileMultiple===!0?(d.type="array",d.items={type:"string"}):d.type="string";break;case"number":case"range":d.type="number";break;case"checkbox":case"toggle":d.type="boolean";break;case"json":d.type="object";break;case"select":case"radio":d.type="string",c.validation?.options&&(d.enum=c.validation.options.map(m=>m.value));break}c.type==="email"&&(d.format="email"),c.type==="phone"&&(d.format="tel"),c.type==="url"&&(d.format="uri"),c.type==="date"&&(d.format=c.dateEnableTime?"date-time":"date"),c.type==="color"&&(d.format="color"),d.title=c.label,c.description&&(d.description=c.description),c.defaultValue!==void 0&&(d.default=c.defaultValue),c.type!=="text"&&(d["x-field-type"]=c.type),c.validation?.minLength!==void 0&&(d.minLength=c.validation.minLength),c.validation?.maxLength!==void 0&&(d.maxLength=c.validation.maxLength),c.validation?.min!==void 0&&(d.minimum=c.validation.min),c.validation?.max!==void 0&&(d.maximum=c.validation.max),c.validation?.step!==void 0&&(d.multipleOf=c.validation.step),c.validation?.pattern!==void 0&&(d.pattern=c.validation.pattern),c.required&&(n.push(c.key),c.type==="checkbox"&&(d.const=!0))}c.placeholder&&(d["x-placeholder"]=c.placeholder),c.validation?.options&&(d["x-options"]=c.validation.options);const s=c.rowSpan??Pd(c.type),o=oW(c.class,{colSpan:c.colSpan,colStart:c.colStart,rowStart:c.rowStart,rowSpan:l.freeGrid?s>1?s:void 0:s===Pd(c.type)?void 0:s,mColSpan:c.mColSpan,mColStart:c.mColStart,mRowStart:c.mRowStart,mRowSpan:c.mRowSpan});o&&(d["x-ui"]={...d["x-ui"],class:o}),c.condition&&(d["x-ui"]={...d["x-ui"],condition:c.condition}),c.hidden===!0&&(d["x-ui"]={...d["x-ui"],hidden:!0}),c.hideLabel===!0&&(d["x-hide-label"]=!0),c.richTextVariant&&(d["x-rich-text-variant"]=c.richTextVariant),c.richTextHeight!==void 0&&(d["x-rich-text-height"]=c.richTextHeight),c.richTextExtensions!==void 0&&(d["x-rich-text-extensions"]=c.richTextExtensions),c.markdownShowFormatting===!0&&(d["x-markdown-show-formatting"]=!0),c.textareaRows!==void 0&&(d["x-textarea-rows"]=c.textareaRows),c.textareaAutoHeight===!0&&(d["x-textarea-autoheight"]=!0),c.numberLayout&&c.numberLayout!=="default"&&(d["x-number-layout"]=c.numberLayout),c.numberSpinner===!1&&(d["x-number-spinner"]=!1),c.phoneOnlyCountries&&(d["x-phone-only-countries"]=c.phoneOnlyCountries),c.selectMultiselect===!0&&(d["x-select-multiselect"]=!0),c.selectSearchable===!0&&(d["x-select-searchable"]=!0),c.fileMultiple===!0&&(d["x-file-multiple"]=!0),c.fileHeight!==void 0&&(d["x-file-height"]=c.fileHeight),c.fileAccept&&(d["x-file-accept"]=c.fileAccept),c.fileTheme&&(d["x-file-theme"]=c.fileTheme),c.fileShowIcon===!1&&(d["x-file-show-icon"]=!1),c.fileIcon&&(d["x-file-icon"]=c.fileIcon),c.dateEnableTime===!0&&(d["x-date-enable-time"]=!0),c.dateMin&&(d["x-date-min"]=c.dateMin),c.dateMax&&(d["x-date-max"]=c.dateMax),c.rangeMulti===!0&&(d["x-range-multi"]=!0),c.radioThin===!0&&(d["x-radio-thin"]=!0),c.radioHideRadio===!0&&(d["x-radio-hide-radio"]=!0),c.radioHideLabelWhenImage===!0&&(d["x-radio-hide-label-when-image"]=!0),c.radioAlign&&(d["x-ui"]={...d["x-ui"],radioAlign:c.radioAlign}),c.radioInline===!0&&(d["x-radio-inline"]=!0),c.radioSize&&(d["x-radio-size"]=c.radioSize),c.radioTextAlign&&(d["x-ui"]={...d["x-ui"],radioTextAlign:c.radioTextAlign}),c.textIcon&&(d["x-text-icon"]=c.textIcon),c.textIconStart&&(d["x-text-icon-start"]=c.textIconStart),a[c.key]=d}const i={$schema:"https://json-schema.org/draft/2020-12/schema",type:"object",properties:a};return n.length>0&&(i.required=n),i}function Am(e,l){if(typeof l!="string")return l;const a=l.trim();switch(e.type){case"checkbox":case"toggle":return a.toLowerCase()==="true"?!0:a.toLowerCase()==="false"?!1:l;case"number":case"range":{if(!a)return l;const n=Number(a);return Number.isNaN(n)?l:n}default:return l}}function FH(e,l){const a={};for(const n of e)if(!(n.type==="heading"||n.type==="divider")){if(l&&n.key in l){a[n.key]=Am(n,l[n.key]);continue}if(n.defaultValue!==void 0){a[n.key]=Am(n,n.defaultValue);continue}switch(n.type){case"checkbox":case"toggle":a[n.key]=!1;break;case"number":case"range":a[n.key]=n.validation?.min??0;break;default:a[n.key]=""}}return a}function kH(e,l){const a={};for(const n of e){if(n.type==="heading"||n.type==="divider"||n.type==="hidden"||n.hidden===!0)continue;const i=l[n.key];if(n.required&&(i==null||i==="")){a[n.key]=`${n.label} is required`;continue}if(i==null||i==="")continue;const c=n.validation;if(typeof i=="string"){if(c?.minLength!==void 0&&i.length<c.minLength){a[n.key]=`${n.label} must be at least ${c.minLength} characters`;continue}if(c?.maxLength!==void 0&&i.length>c.maxLength){a[n.key]=`${n.label} must be at most ${c.maxLength} characters`;continue}if(c?.pattern&&!new RegExp(c.pattern).test(i)){a[n.key]=`${n.label} format is invalid`;continue}}if(typeof i=="number"){if(c?.min!==void 0&&i<c.min){a[n.key]=`${n.label} must be at least ${c.min}`;continue}if(c?.max!==void 0&&i>c.max){a[n.key]=`${n.label} must be at most ${c.max}`;continue}}}return a}function jH(e){return{fields:(0,t.computed)(()=>NW(e.value))}}const JH=!0;var Ue=class{_type;_config;_condition;_hidden;_validations;_onUpdate;_class;_slots;_component;constructor(e,l={}){this._type=e,this._config=l}if(e){return this._condition=e,this}hidden(e=!0){return this._hidden=e,this}validate(e){return this._validations||(this._validations=[]),this._validations.push(e),this}onUpdate(e){return this._onUpdate=e,this}class(e){return this._class=this._class?`${this._class} ${e}`:e,this}required(e){return this._config.required=!0,e&&(this._config.requiredMessage=e),this}slot(e,l,a){return this._slots||(this._slots=[]),typeof e!="string"||l!==void 0&&typeof l!="string"?this._slots.push({component:e,props:l}):this._slots.push({name:e,component:l,props:a}),this}};function il(e,l){return typeof e=="string"?{...l,label:e}:e??{}}const cl={text(e,l){return new Ue("text",il(e,l))},email(e,l){return new Ue("email",il(e,l))},password(e,l){return new Ue("password",il(e,l))},number(e,l){return new Ue("number",il(e,l))},tel(e,l){return new Ue("tel",il(e,l))},url(e,l){return new Ue("url",il(e,l))},date(e,l){return new Ue("date",il(e,l))},time(e,l){return new Ue("time",il(e,l))},datetime(e,l){return new Ue("datetime",il(e,l))},textarea(e,l){return new Ue("textarea",il(e,l))},richtext(e,l){return new Ue("richtext",il(e,l))},json(e,l){const a=il(e,l);return a.language||(a.language="json"),new Ue("json",a)},checkbox(e,l){return new Ue("checkbox",il(e,l))},toggle(e,l){return new Ue("toggle",il(e,l))},radio(e,l,a){if(typeof e=="string"){const n=e,i=l;return new Ue("radio",{...a,label:n,options:i})}return new Ue("radio",{...il(l,a),options:e})},select(e,l,a){if(typeof e=="string"){const n=e,i=l;return new Ue("select",{...a,label:n,options:i})}return new Ue("select",{...il(l,a),options:e})},multiselect(e,l,a){if(typeof e=="string"){const n=e,i=l;return new Ue("multiselect",{...a,label:n,options:i,multiple:!0})}return new Ue("multiselect",{...il(l,a),options:e})},color(e,l){return new Ue("color",il(e,l))},icon(e,l){return new Ue("icon",il(e,l))},range(e,l){return new Ue("range",il(e,l))},custom(e,l,a){return Xt(e)||zs(e),new Ue(e,il(l,a))},upload(e,l){return new Ue("upload",il(e,l))},array(e,l,a){if(typeof e=="string"){const i=e,c=l;return new Ue("array",{...a??{},label:i,schema:c})}const n=e;return new Ue("array",{...il(l,a),schema:n})},component(e,l={}){const a=new Ue("component",l);return a._component={component:e,props:l},a},display(e,l={}){const a=new Ue("display",l);return a._component={component:e,props:l},a}};var _m=class YW{_isSchema=!0;_label;_fields;_condition;_class;constructor(l,a){this._fields=l,this._label=a}if(l){return this._condition=l,this}class(l){return this._class=this._class?`${this._class} ${l}`:l,this}defaults(l){for(const[a,n]of Object.entries(l))this._fields[a]&&this._fields[a]._config.default===void 0&&(this._fields[a]._config.default=n);return this}getDefaults(){const l={};for(const[a,n]of Object.entries(this._fields))n._config.default!==void 0&&(l[a]=n._config.default);return l}toJSONSchema(){const l={},a=[];for(const[c,d]of Object.entries(this._fields)){const s=d._config,o=Xt(d._type),m=o?.jsonSchema?.type??YW.getJSONSchemaType(d._type),u={type:m};if(s.label&&(u.title=s.label),s.helpText&&(u.description=s.helpText),s.default!==void 0&&(u.default=s.default),s.options){const b=s.options,h=b.map(G=>ba(G)??G);d._type==="multiselect"?u.items={type:"string",enum:h}:u.enum=h,(d._type==="select"||d._type==="multiselect"||d._type==="radio")&&b.every(G=>G&&typeof G=="object"&&"label"in G&&"value"in G)&&(u["x-options"]=b)}s.min!==void 0&&(u[m==="string"?"minLength":"minimum"]=s.min),s.max!==void 0&&(u[m==="string"?"maxLength":"maximum"]=s.max),d._type==="email"&&(u.format="email"),d._type==="url"&&(u.format="uri"),d._type==="date"&&(u.format="date"),d._type==="time"&&(u.format="time"),d._type==="datetime"&&(u.format="date-time");const Z={};if(d._type!=="text"&&(Z.fieldType=d._type),o){u["x-field-type"]=d._type;const b=o.translatableSettings?.map(h=>h.key);b?.length&&(u["x-translatable-settings"]=b)}s.placeholder&&(Z.placeholder=s.placeholder),s.disabled&&(Z.disabled=s.disabled),s.readonly&&(Z.readonly=s.readonly),s.autoheight&&(Z.autoheight=s.autoheight),s.rows&&(Z.rows=s.rows),s.cols&&(Z.cols=s.cols),(d._type==="select"||d._type==="multiselect")&&s.searchable!==void 0&&(u["x-select-searchable"]=s.searchable),d._class&&(Z.class=d._class),d._condition&&(Z.condition=d._condition),d._hidden&&(Z.hidden=!0),d._type==="array"&&(s.allowAdd!==void 0&&(Z.allowAdd=s.allowAdd),s.allowDelete!==void 0&&(Z.allowDelete=s.allowDelete),s.schema&&typeof s.schema.toJSONSchema=="function"&&(u.items=s.schema.toJSONSchema())),d._component&&(Z.component=typeof d._component.component=="string"?d._component.component:d._component.component.name||"CustomComponent",d._component.props&&(Z.componentProps=d._component.props)),Object.keys(Z).length>0&&(u["x-ui"]=Z);const r=o?.jsonSchema?.serialize?.(s,{key:c,required:s.required===!0});r&&Object.assign(u,r),l[c]=u,s.required===!0&&a.push(c)}const n={type:"object",properties:l};a.length>0&&(n.required=a),this._label&&(n.title=this._label);const i={};return this._condition&&(i.condition=this._condition),this._class&&(i.class=this._class),Object.keys(i).length>0&&(n["x-ui"]=i),n}static getJSONSchemaType(l){return{text:"string",email:"string",password:"string",number:"number",tel:"string",url:"string",date:"string",time:"string",datetime:"string",textarea:"string",richtext:"string",json:"object",checkbox:"boolean",toggle:"boolean",radio:"string",select:"string",multiselect:"array",array:"array"}[l]||"string"}};function CH(e,l){if(typeof e=="string"){if(!l)throw new Error("Fields are required when providing a label");return new _m(l,e)}return new _m(e)}function DH(e){return e}function UH(e){return async(l,a)=>{if(!l.endpoint.startsWith("/")||l.endpoint.startsWith("//"))throw new Error("Form option endpoints must be same-origin paths");const n={};return l.searchParam&&a&&(n[l.searchParam]=a),l.limitParam&&l.limit!=null&&(n[l.limitParam]=l.limit),(await e.get(l.endpoint,{params:n})).data}}function Kc(e,l){return l?l.split(".").reduce((a,n)=>{if(!(a==null||typeof a!="object"))return a[n]},e):e}function ub(e,l){const a=Kc(e,l.itemsPath);return Array.isArray(a)?a.flatMap(n=>{const i=Kc(n,l.valuePath??"id"),c=Kc(n,l.labelPath??"name");if(i==null||c==null)return[];const d=l.subtitlePath?Kc(n,l.subtitlePath):void 0;return[{label:String(c),value:String(i),...d==null?{}:{subtitle:String(d)}}]}):[]}function Qd(e,l){const a={},n=new Set(e.required||[]);if(e.properties){const c=Object.keys(e.properties),d=Array.isArray(e["x-property-order"])?e["x-property-order"].filter(s=>typeof s=="string"&&s in e.properties):[];for(const s of new Set([...d,...c])){const o=e.properties[s];a[s]=BH(s,o,n.has(s),e,l?.loadOptionsSource)}}const i=new _m(a,e.title);return e["x-ui"]?.condition&&i.if(e["x-ui"].condition),e["x-ui"]?.class&&i.class(e["x-ui"].class),i}function OH(e,l){const a=e.match(/^#\/(\$defs|definitions)\/(.+)$/);if(!a)return;const[,n,i]=a,c=n==="$defs"?l.$defs:l.definitions;return i?c?.[i]:void 0}function EH(e,l){const a=e.anyOf||e.oneOf;if(!a||a.length===0)return e;const n=a.filter(d=>d.type!=="null");if(n.length===1){const d=n[0];return{...d,...e,type:e.type??d.type,title:e.title||d.title,description:e.description||d.description,default:e.default!==void 0?e.default:d.default,"x-ui":{...d["x-ui"],...e["x-ui"]}}}const i=["object","array","string","number","integer","boolean"],c=n.sort((d,s)=>i.indexOf(d.type||"string")-i.indexOf(s.type||"string"))[0];return{...c,...e,type:e.type??c.type,title:e.title||c.title,description:e.description||c.description,default:e.default!==void 0?e.default:c.default,"x-ui":{...c["x-ui"],...e["x-ui"]}}}function BH(e,l,a,n,i){let c=l;if(l.$ref){const b=OH(l.$ref,n);b&&(c={...b,type:l.type??b.type,enum:l.enum??b.enum,title:l.title??b.title,description:l.description??b.description,default:l.default!==void 0?l.default:b.default,"x-ui":{...b["x-ui"],...l["x-ui"]}})}(c.anyOf||c.oneOf)&&(c=EH(c,n));const d=c["x-ui"]||{};let s=d.fieldType||c["x-field-type"]||Zb(c);s==="select"&&c["x-select-multiselect"]&&(s="multiselect");const o=c["x-options"],m={},u=Xt(s);c.title&&(m.label=c.title),c.description&&(m.helpText=c.description),c.default!==void 0&&(m.default=c.default),(a||d.required===!0)&&(m.required=!0),d.placeholder&&(m.placeholder=d.placeholder),c["x-placeholder"]&&(m.placeholder=c["x-placeholder"]),KH(m,c),u?.settingsDefaults&&Object.assign(m,u.settingsDefaults);const Z=u?.jsonSchema?.parse?.(c,{key:e,required:a||d.required===!0});if(Z&&Object.assign(m,Z),c["x-options-source"]){if(!i)throw new Error(`Field "${e}" requires an x-options-source loader`);const b=c["x-options-source"];let h;m.options=async G=>{const N=b.searchParam?ub(await i(b,G),b):h??=ub(await i(b,b.searchParam?G:""),b);if(b.searchParam||!G.trim())return N;const p=G.trim().toLocaleLowerCase();return N.filter(W=>[W.label,W.subtitle,W.value].some(Y=>Y?.toLocaleLowerCase().includes(p)))},c["x-select-searchable"]===void 0&&(m.searchable=!0)}d.radioAlign!==void 0&&(m.align=d.radioAlign),d.radioTextAlign!==void 0&&(m.textAlign=d.radioTextAlign),d.disabled&&(m.disabled=d.disabled),d.readonly&&(m.readonly=d.readonly),d.autoheight&&(m.autoheight=d.autoheight),d.rows&&(m.rows=d.rows),d.cols&&(m.cols=d.cols),c.minimum!==void 0&&(m.min=c.minimum),c.maximum!==void 0&&(m.max=c.maximum),c.minLength!==void 0&&(m.min=c.minLength),c.maxLength!==void 0&&(m.max=c.maxLength),c.pattern!==void 0&&(m.pattern=c.pattern);let r;switch(s){case"heading":r=new Ue("heading",m);break;case"divider":r=new Ue("divider",m);break;case"email":r=cl.email(m);break;case"password":r=cl.password(m);break;case"number":r=cl.number(m);break;case"tel":case"phone":r=cl.tel(m);break;case"url":r=cl.url(m);break;case"date":r=cl.date(m);break;case"time":r=cl.time(m);break;case"datetime":r=cl.datetime(m);break;case"textarea":r=cl.textarea(m);break;case"richtext":r=cl.richtext(m);break;case"json":r=cl.json(m);break;case"checkbox":r=cl.checkbox(m);break;case"toggle":r=cl.toggle(m);break;case"radio":r=cl.radio(o??c.enum??[],m);break;case"select":r=cl.select(m.options??o??c.enum??[],m);break;case"multiselect":r=cl.multiselect(m.options??o??c.enum??[],m);break;case"icon":r=cl.icon(m);break;case"file":case"upload":r=cl.upload(m);break;case"array":{const b={...m};d.allowAdd!==void 0&&(b.allowAdd=d.allowAdd),d.allowDelete!==void 0&&(b.allowDelete=d.allowDelete);const h=c.items?.type==="object"?Qd(c.items,{loadOptionsSource:i}):void 0;c.items?.type&&(b.itemType=Zb(c.items)),r=cl.array(c.title||e,h,b);break}case"display":r=cl.display(d.component||"div",d.componentProps||{});break;case"component":r=cl.component(d.component||"div",d.componentProps||{});break;default:u?r=new Ue(s,m):xs(s)?(zs(s),m.missingCustomRegistration=!0,r=new Ue(s,m)):r=cl.text(m);break}if(d.component&&s!=="component"&&s!=="display"&&(r._component={component:d.component,props:d.componentProps||{}}),c.const!==void 0&&r.validate(b=>b===c.const?!0:m.requiredMessage||"form.required"),c.pattern){const b=new RegExp(c.pattern);r.validate(h=>h==null||h===""||b.test(String(h))?!0:"form.pattern")}return d.class&&r.class(d.class),d.condition&&r.if(d.condition),d.hidden&&r.hidden(),r}function KH(e,l){const a=l,n=(d,s)=>{a[s]!==void 0&&(e[d]=a[s])};a["x-radio-inline"]&&(e.inline=!0),a["x-radio-thin"]&&(e.thin=!0),a["x-radio-hide-radio"]&&(e.hideRadio=!0),a["x-radio-hide-label-when-image"]&&(e.hideLabelWhenImage=!0),n("align","x-radio-align"),n("textAlign","x-radio-text-align"),a["x-select-multiselect"]&&(e.multiple=!0),n("searchable","x-select-searchable"),n("rows","x-textarea-rows"),n("autoheight","x-textarea-autoheight"),n("layout","x-number-layout"),a["x-number-spinner"]===!1&&(e.spinner=!1),typeof a["x-phone-only-countries"]=="string"?e.onlyCountries=a["x-phone-only-countries"].split(",").map(d=>d.trim()).filter(Boolean):Array.isArray(a["x-phone-only-countries"])&&(e.onlyCountries=a["x-phone-only-countries"]),n("defaultCountry","x-phone-default-country"),a["x-range-multi"]&&(e.multiRange=!0),a["x-file-multiple"]&&(e.multiple=!0);const i=a["x-file-height"];i!==void 0&&(e.height=typeof i=="number"?`${i}px`:i),n("accept","x-file-accept"),n("theme","x-file-theme"),a["x-file-show-icon"]===!1&&(e.showIcon=!1),n("icon","x-file-icon"),a["x-date-enable-time"]&&(e.enableTime=!0),n("min","x-date-min"),n("max","x-date-max"),n("icon","x-text-icon"),n("iconStart","x-text-icon-start");const c=a["x-rich-text-variant"];c==="basic"?e.basic=!0:c==="simple"&&(e.simple=!0),n("height","x-rich-text-height"),n("extensions","x-rich-text-extensions"),a["x-markdown-show-formatting"]&&(e.showFormatting=!0),a["x-hide-label"]===!0&&(e.hideLabel=!0)}function Zb(e){if(e.format)switch(e.format){case"email":return"email";case"uri":return"url";case"date":return"date";case"time":return"time";case"date-time":return"datetime"}if(e.enum)return"select";switch(e.type){case"boolean":return"checkbox";case"number":case"integer":return"number";case"array":return"array";case"object":return"json";default:return"text"}}var HH={class:"multi-step-form"},PH={class:"step-progress"},QH=["onClick"],AH={class:"step-number"},_H={class:"step-label"},$H={key:0},qH={key:0,class:"step-title"},eP={key:1,class:"validation-errors"},lP={class:"step-navigation"},tP=["disabled"],aP={class:"step-counter"},nP=(0,t.defineComponent)({__name:"MultiStepForm",props:{schema:{},modelValue:{},currentStep:{},components:{},validateOnNext:{type:Boolean,default:!0}},emits:["update:modelValue","update:currentStep","stepChange","complete","validationError"],setup(e,{expose:l,emit:a}){const n=e,i=a,{$t:c}=al(),d=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(d)),o=(0,t.ref)({...n.modelValue||{}}),m=(0,t.ref)(n.currentStep!=null&&n.currentStep!==""?n.currentStep:Object.keys(n.schema)[0]);let u=!1;(0,t.watch)(()=>n.modelValue,f=>{u||(o.value={...f||{}})},{deep:!0}),(0,t.watch)(o,f=>{u=!0,i("update:modelValue",f),setTimeout(()=>{u=!1},0)},{deep:!0}),(0,t.watch)(()=>n.currentStep,f=>{f!=null&&(m.value=f)}),(0,t.watch)(m,f=>{i("update:currentStep",f),i("stepChange",f)});function Z(f,J){const E=J.split(".");let ee=f;for(const B of E)ee=ee?.[B];return ee}function r(f,J){if(!f)return!0;try{const E=vi(f);if(E.length===0)return!0;let ee=!0,B=null;for(let U=0;U<E.length;U++){const _=E[U],de=Z(J,_.field),{op:k,value:K,connector:O}=_;let x=!1;switch(k){case"eq":x=de===K;break;case"ne":x=de!==K;break;case"gt":x=K!=null&&de>K;break;case"ge":x=K!=null&&de>=K;break;case"lt":x=K!=null&&de<K;break;case"le":x=K!=null&&de<=K;break;case"co":x=K!=null&&String(de).includes(String(K));break;case"sw":x=K!=null&&String(de).startsWith(String(K));break;case"ew":x=K!=null&&String(de).endsWith(String(K));break;case"pr":x=de!=null;break;default:x=!1}U===0?(ee=x,B=x):(O==="or"?ee=(B??!1)||x:O==="and"&&(ee=(B??!1)&&x),B=ee)}return ee}catch{return!0}}function b(f){return f._condition==null?!0:r(f._condition,o.value)}const h=(0,t.computed)(()=>Object.entries(n.schema).filter(([,f])=>b(f)).map(([f,J])=>({key:f,schema:J}))),G=(0,t.computed)(()=>h.value.findIndex(f=>f.key===m.value)),N=(0,t.computed)(()=>G.value===0),p=(0,t.computed)(()=>G.value===h.value.length-1),W=(0,t.computed)(()=>h.value[G.value]?.schema),Y=(0,t.ref)({});function L(f){return f._hidden?!1:f._condition==null?!0:r(f._condition,o.value)}function X(f){const J=f.replace(/\[(\d+)\]/g,".$1");return Z(o.value,J)}function V(f){return!!(f==null||typeof f=="string"&&f.trim()===""||Array.isArray(f)&&f.length===0)}function M(){if(!n.validateOnNext||W.value==null)return!0;const f={},J=W.value._fields;for(const[E,ee]of Object.entries(J)){if(ee._type==="display"||!L(ee))continue;const B=X(E),U=ee._config;if(U.required===!0&&V(B)){f[E]=`${typeof U.label=="string"?U.label:E} is required`;continue}if(ee._validations&&!V(B))for(const _ of ee._validations){const de=_(B);if(de!==!0){f[E]=de;break}}}return Y.value=f,Object.keys(f).length>0?(i("validationError",f),!1):!0}function T(f,J){return J._label!=null?J._label:f.split(/[._-]/).map(E=>E.charAt(0).toUpperCase()+E.slice(1)).join(" ")}function w(f){const J=h.value.findIndex(E=>E.key===f);if(J!==-1){if(J<G.value){m.value=f,Y.value={};return}J>G.value&&!M()||(m.value=f)}}function I(){if(M())if(p.value)i("complete");else{const f=G.value+1;m.value=h.value[f].key,Y.value={}}}function j(){if(!N.value){const f=G.value-1;m.value=h.value[f].key,Y.value={}}}return l({validateCurrentStep:M,stepErrors:Y,nextStep:I,prevStep:j,goToStep:w,visibleSteps:h,activeStep:m,currentStepIndex:G,isFirstStep:N,isLastStep:p}),(f,J)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",HH,[(0,t.createElementVNode)("div",PH,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(h.value,(E,ee)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:E.key,class:(0,t.normalizeClass)(["step-indicator",{active:E.key===m.value,completed:ee<G.value}]),onClick:B=>w(E.key)},[(0,t.createElementVNode)("div",AH,(0,t.toDisplayString)(ee+1),1),(0,t.createElementVNode)("div",_H,(0,t.toDisplayString)(T(E.key,E.schema)),1)],10,QH))),128))]),W.value!=null?((0,t.openBlock)(),(0,t.createElementBlock)("div",$H,[W.value._label?((0,t.openBlock)(),(0,t.createElementBlock)("h2",qH,(0,t.toDisplayString)(W.value._label),1)):(0,t.createCommentVNode)("",!0),Object.keys(Y.value).length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",eP,[(0,t.createElementVNode)("ul",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(Y.value,(E,ee)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:ee},(0,t.toDisplayString)(E),1))),128))])])):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(f.$slots,`step:${m.value}`,{schema:W.value,formData:o.value,stepKey:m.value,errors:Y.value},()=>[(0,t.createVNode)(ws,{modelValue:o.value,"onUpdate:modelValue":J[0]||(J[0]=E=>o.value=E),schema:W.value,components:e.components,errors:Y.value},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,E=>({name:E,fn:(0,t.withCtx)(ee=>[(0,t.renderSlot)(f.$slots,E,(0,t.normalizeProps)((0,t.guardReactiveProps)(ee)),void 0,!0)])}))]),1032,["modelValue","schema","components","errors"])],!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",lP,[(0,t.createElementVNode)("button",{type:"button",class:"btn-secondary",disabled:N.value,onClick:j},(0,t.toDisplayString)((0,t.unref)(c)("multiStep.previous")),9,tP),(0,t.createElementVNode)("div",aP,(0,t.toDisplayString)((0,t.unref)(c)("multiStep.step",{current:G.value+1,total:h.value.length})),1),(0,t.createElementVNode)("button",{type:"button",class:"btn-primary",onClick:I},(0,t.toDisplayString)(p.value?(0,t.unref)(c)("multiStep.complete"):(0,t.unref)(c)("multiStep.next")),1)])]))}}),iP=Le(nP,[["__scopeId","data-v-7a55f4bb"]]);function cP(){return{steps:[],transitions:[]}}function dP(e){return!!e&&e.steps.length>1}function ua(e,l){if(l!=null)return e.steps.find(a=>a.key===l)}function LW(e,l){return e.transitions.filter(a=>a.from===l)}function sP(e){const l=e.schema?.properties;return l&&typeof l=="object"?Object.entries(l):[]}function XW(e){return e?.autoAdvance===!0}function yW(e){if(!e)return null;const l=sP(e);return l.length===1?l[0][0]:null}function Ad(e){return e.startId&&ua(e,e.startId)?e.startId:e.steps[0]?.key}function ec(e,l,a){for(const n of LW(e,l))if(!n.condition||n.condition.trim()===""||gu(n.condition,a))return n.to;return null}function oP(e,l,a){return ec(e,l,a)===null}function $m(e,l,a){const n=Ad(e);if(!n||!l)return 0;const i=new Set;let c=n,d=0,s=0,o=!1;for(;c&&!i.has(c);)i.add(c),s++,o||(c===l?o=!0:d++),c=ec(e,c,a);return s<=1?o?100:0:Math.round(d/(s-1)*100)}function mP(e){const l={},a=[];for(const i of e.steps){const c=i.schema?.properties;c&&typeof c=="object"&&Object.assign(l,c);const d=i.schema?.required;if(Array.isArray(d))for(const s of d)a.includes(s)||a.push(s)}const n={type:"object",properties:l};return a.length&&(n.required=a),n}var uP={key:0,class:"ffp-stages","aria-label":"Form stages"},ZP={class:"ffp-stage-list p-0 m-0"},rP={class:"ffp-stage-progress"},bP={class:"ffp-stage"},hP=["data-step-key"],pP={key:0,class:"ffp-title"},WP={key:1,class:"ffp-empty"},GP={class:"ffp-nav flex flex-center gap-1"},NP={key:0,class:"ffp-counter flex-center round bg-primary-10 color-primary px-075 txt13 medium tabular-nums"},YP=(0,t.defineComponent)({__name:"FormFlowPlayer",props:{structure:{},modelValue:{},components:{},initialStepKey:{},formName:{default:""},animated:{type:Boolean,default:!0},autoAdvance:{type:Boolean,default:!0},autoAdvanceDelay:{default:200},redirect:{type:Boolean,default:!0},hideTitle:{type:Boolean,default:!1},hideCounter:{type:Boolean,default:!1},showStages:{type:Boolean,default:!1},onComplete:{},beforePrimary:{},loadOptionsSource:{}},emits:["update:modelValue","stepChange","progress","stepEnter","stepComplete","formComplete","redirect","complete"],setup(e,{expose:l,emit:a}){const n=e,i=a,{$t:c}=al(),d=(0,t.useSlots)(),s=(0,t.computed)(()=>Object.keys(d).filter(y=>y!=="nav"&&y!=="primary-label"&&y!=="step"&&y!=="empty")),o=(0,t.ref)("next"),m=(0,t.computed)(()=>n.animated?o.value==="prev"?"ffp-slide-prev":"ffp-slide-next":""),u=(0,t.ref)({...n.modelValue||{}});(0,t.watch)(u,y=>i("update:modelValue",y),{deep:!0}),(0,t.watch)(()=>n.modelValue,y=>{y&&y!==u.value&&(u.value={...y})},{deep:!0});function Z(){const y=n.initialStepKey;return y&&ua(n.structure,y)?y:Ad(n.structure)}const r=(0,t.ref)(Z()),b=(0,t.ref)([]),h=(0,t.ref)(new Set);(0,t.watch)(()=>n.structure,()=>{r.value=Z(),b.value=[],h.value=new Set},{deep:!0}),(0,t.watch)(()=>n.initialStepKey,y=>{!y||y===r.value||!ua(n.structure,y)||(r.value=y,b.value=[],h.value=new Set)}),(0,t.watch)(r,y=>{y&&i("stepChange",y)},{immediate:!0});const G=(0,t.computed)(()=>ua(n.structure,r.value??null));function N(y){const R=ua(n.structure,y),g=$m(n.structure,y,u.value),Q=b.value.length+1,P=g>0?Math.round(Q/g*100):null;return{formName:n.formName,stepKey:y,stepTitle:R?.title??"",stepIndex:Q,totalSteps:P,skipSubmit:R?.skipSubmit??!1,formData:{...u.value}}}(0,t.watch)(r,(y,R)=>{y&&y!==R&&i("stepEnter",N(y))},{immediate:!0});const p=(0,t.computed)(()=>{const y=G.value;return y?Qd(y.schema,{loadOptionsSource:n.loadOptionsSource}):null}),W=(0,t.computed)(()=>Object.assign({},...n.structure.steps.map(y=>Qd(y.schema,{loadOptionsSource:n.loadOptionsSource})._fields))),Y=(0,t.computed)(()=>r.value?ec(n.structure,r.value,u.value):null),L=(0,t.computed)(()=>Y.value===null),X=(0,t.computed)(()=>b.value.length>0),V=(0,t.computed)(()=>$m(n.structure,r.value,u.value));(0,t.watch)(V,y=>i("progress",y),{immediate:!0});const M=(0,t.computed)(()=>{const y=[],R=new Set;let g=Ad(n.structure);for(;g&&!R.has(g);){R.add(g);const Q=ua(n.structure,g);if(!Q)break;y.push(Q),g=ec(n.structure,g,u.value)??void 0}return y}),T=(0,t.computed)(()=>M.value.findIndex(y=>y.key===r.value));(0,t.watch)([M,T],([y,R])=>{R<=0||(b.value.length===0&&(b.value=y.slice(0,R).map(g=>g.key)),h.value=new Set([...h.value,...y.slice(0,R).map(g=>g.key)]))},{immediate:!0});const w=(0,t.ref)(null),I=(0,t.ref)(!1);function j(y){w.value=y}function f(){return w.value?.validate()??!0}async function J(){if(I.value||!f())return;const y=G.value;I.value=!0;let R=!1;try{if(await n.beforePrimary?.({data:{...u.value},currentStep:y,isTerminal:L.value})===!1)return;if(L.value){const Q=b2(W.value,u.value);y?.skipSubmit||await n.onComplete?.(Q),r.value&&i("formComplete",N(r.value));const P=y?.redirectUrl?.trim();P&&(R=!0,i("redirect",P),n.redirect&&typeof window<"u"&&window.location.assign(P)),i("complete",{...u.value});return}const g=Y.value;if(g&&r.value){h.value=new Set([...h.value,r.value]);const Q=ua(n.structure,g);i("stepComplete",{...N(r.value),destinationStepKey:g,destinationStepTitle:Q?.title??""}),o.value="next",b.value.push(r.value),r.value=g}}finally{R||(I.value=!1)}}const E=(0,t.computed)(()=>n.autoAdvance&&XW(G.value)),ee=(0,t.computed)(()=>yW(G.value));let B=null;const U=(0,t.ref)(null);function _(){B&&(clearTimeout(B),B=null)}const de=(0,t.ref)(ee.value?u.value[ee.value]:void 0);(0,t.watch)(r,()=>{_(),U.value=null,de.value=ee.value?u.value[ee.value]:void 0},{flush:"sync"}),(0,t.watch)(()=>ee.value?u.value[ee.value]:void 0,y=>{E.value&&U.value!==r.value&&(!(y!=null&&y!=="")||y===de.value||(_(),B=setTimeout(()=>{E.value&&(U.value=r.value??null,J())},n.autoAdvanceDelay)))});function k(){const y=b.value.pop();y&&(o.value="prev",r.value=y)}function K(y){return y===r.value||h.value.has(y)?!0:y===Y.value}async function O(y){if(y===r.value||!K(y))return;const R=M.value.findIndex(Q=>Q.key===y),g=T.value;if(!(R<0||g<0)){if(y===Y.value){await J();return}o.value=R<g?"prev":"next",b.value=M.value.slice(0,R).map(Q=>Q.key),r.value=y}}const x=(0,t.computed)(()=>b.value.length+1);return l({formData:u,currentKey:r,nextKey:Y,isTerminal:L,progress:V,completedKeys:h,validateStep:f}),(y,R)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["form-flow-player",{"form-flow-player--stages":e.showStages}])},[e.showStages?((0,t.openBlock)(),(0,t.createElementBlock)("nav",uP,[(0,t.createElementVNode)("ol",ZP,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(M.value,(g,Q)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:g.key},[(0,t.createVNode)(Lt,{rounded:"",color:"purple",title:g.title,active:r.value===g.key,disabled:!K(g.key),"aria-current":r.value===g.key?"step":void 0,onClick:P=>O(g.key)},{media:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(["ffp-stage-number flex-center round border",r.value===g.key?"bg-primary color-white border-transparent":h.value.has(g.key)?"bg-green color-white border-green":"color-gray"])},[h.value.has(g.key)&&r.value!==g.key?((0,t.openBlock)(),(0,t.createBlock)(Ne,{key:0,icon:"check",size:.9})):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[(0,t.createTextVNode)((0,t.toDisplayString)(Q+1),1)],64))],2)]),_:2},1032,["title","active","disabled","aria-current","onClick"])]))),128))]),(0,t.createElementVNode)("div",rP,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(G.value?.title),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(T.value+1)+" / "+(0,t.toDisplayString)(M.value.length),1),(0,t.createVNode)(i5,{class:"w-100p mt-05",value:V.value,size:8},null,8,["value"])])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",bP,[(0,t.createVNode)(t.Transition,{name:m.value,mode:"out-in"},{default:(0,t.withCtx)(()=>[G.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:r.value,class:"ffp-step","data-step-key":r.value},[!e.hideTitle&&G.value.title?((0,t.openBlock)(),(0,t.createElementBlock)("h2",pP,(0,t.toDisplayString)(G.value.title),1)):(0,t.createCommentVNode)("",!0),(0,t.renderSlot)(y.$slots,"step",{step:G.value,formData:u.value,stepKey:r.value,schema:p.value,setFormRef:j},()=>[p.value?((0,t.openBlock)(),(0,t.createBlock)(ws,{key:0,ref_key:"formRef",ref:w,modelValue:u.value,"onUpdate:modelValue":R[0]||(R[0]=g=>u.value=g),schema:p.value,components:e.components},(0,t.createSlots)({_:2},[(0,t.renderList)(s.value,g=>({name:g,fn:(0,t.withCtx)(Q=>[(0,t.renderSlot)(y.$slots,g,(0,t.normalizeProps)((0,t.guardReactiveProps)(Q)),void 0,!0)])}))]),1032,["modelValue","schema","components"])):(0,t.createCommentVNode)("",!0)],!0)],8,hP)):((0,t.openBlock)(),(0,t.createElementBlock)("div",WP,[(0,t.renderSlot)(y.$slots,"empty",{},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.empty")??"No steps to display."),1)],!0)]))]),_:3},8,["name"])]),(0,t.renderSlot)(y.$slots,"nav",{canGoBack:X.value,isTerminal:L.value,submitting:I.value,goBack:k,goPrimary:J,stepPosition:x.value,progress:V.value,currentKey:r.value,primaryLabel:G.value?.primaryLabel,autoAdvances:E.value},()=>[(0,t.createElementVNode)("div",GP,[(0,t.createVNode)(oe,{class:"ffp-nav-btn icon-rtl-180",flat:"",icon:"chevron_left",value:(0,t.unref)(c)?.("multiStep.previous")??"Back",disabled:!X.value,onClick:k},null,8,["value","disabled"]),e.hideCounter?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",NP,(0,t.toDisplayString)(x.value),1)),L.value?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:1,class:"ffp-nav-btn",value:G.value?.primaryLabel||(0,t.unref)(c)?.("multiStep.complete")||"Submit",loading:I.value,onClick:J},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.complete")??"Submit"),1)],!0)]),_:3},8,["value","loading"])):((0,t.openBlock)(),(0,t.createBlock)(oe,{key:2,class:"ffp-nav-btn icon-rtl-180","icon-end":"chevron_right",value:(0,t.unref)(c)?.("multiStep.next")??"Next",disabled:I.value,onClick:J},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(y.$slots,"primary-label",{isTerminal:!1},()=>[(0,t.createTextVNode)((0,t.toDisplayString)((0,t.unref)(c)?.("multiStep.next")??"Next"),1)],!0)]),_:3},8,["value","disabled"]))])],!0)],2))}}),LP=Le(YP,[["__scopeId","data-v-0b0a3072"]]),XP="5.4.0";function MW(e,l){for(const a in l)Object.hasOwn(l,a)&&(typeof l[a]=="object"&&e[a]?MW(e[a],l[a]):e[a]=l[a])}var Vt={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function lc(e,l){let a=Vt.themes[e]||{},n;do n=a[l],typeof n>"u"?a.$extend?a=Vt.themes[a.$extend]||{}:(a=null,n=Vt[l]):a=null;while(a);return n}function yP(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend&&!a.$resetCss?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l.map(n=>`v-popper--theme-${n}`)}function rb(e){const l=[e];let a=Vt.themes[e]||{};do a.$extend?(l.push(a.$extend),a=Vt.themes[a.$extend]||{}):a=null;while(a);return l}var Rs=(()=>{if(typeof window>"u")return!1;let e=!1;try{const l=Object.defineProperty({},"passive",{get(){e=!0}});window.addEventListener("test",null,l)}catch{}return e})(),MP=typeof window<"u"&&typeof navigator<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,VW=["auto","top","bottom","left","right"].reduce((e,l)=>e.concat([l,`${l}-start`,`${l}-end`]),[]),bb={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},hb={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function pb(e,l){const a=e.indexOf(l);a!==-1&&e.splice(a,1)}function Fo(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var mt=[],Sa=null,Wb={};function Gb(e){let l=Wb[e];return l||(l=Wb[e]=[]),l}var qm=function(){};typeof window<"u"&&(qm=window.Element);function De(e){return function(l){return lc(l.theme,e)}}var ko="__floating-vue__popper",TW=()=>(0,t.defineComponent)({name:"VPopper",provide(){return{[ko]:{parentPopper:this}}},inject:{[ko]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:De("disabled")},positioningDisabled:{type:Boolean,default:De("positioningDisabled")},placement:{type:String,default:De("placement"),validator:e=>VW.includes(e)},delay:{type:[String,Number,Object],default:De("delay")},distance:{type:[Number,String],default:De("distance")},skidding:{type:[Number,String],default:De("skidding")},triggers:{type:Array,default:De("triggers")},showTriggers:{type:[Array,Function],default:De("showTriggers")},hideTriggers:{type:[Array,Function],default:De("hideTriggers")},popperTriggers:{type:Array,default:De("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:De("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:De("popperHideTriggers")},container:{type:[String,Object,qm,Boolean],default:De("container")},boundary:{type:[String,qm],default:De("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:De("strategy")},autoHide:{type:[Boolean,Function],default:De("autoHide")},handleResize:{type:Boolean,default:De("handleResize")},instantMove:{type:Boolean,default:De("instantMove")},eagerMount:{type:Boolean,default:De("eagerMount")},popperClass:{type:[String,Array,Object],default:De("popperClass")},computeTransformOrigin:{type:Boolean,default:De("computeTransformOrigin")},autoMinSize:{type:Boolean,default:De("autoMinSize")},autoSize:{type:[Boolean,String],default:De("autoSize")},autoMaxSize:{type:Boolean,default:De("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:De("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:De("preventOverflow")},overflowPadding:{type:[Number,String],default:De("overflowPadding")},arrowPadding:{type:[Number,String],default:De("arrowPadding")},arrowOverflow:{type:Boolean,default:De("arrowOverflow")},flip:{type:Boolean,default:De("flip")},shift:{type:Boolean,default:De("shift")},shiftCrossAxis:{type:Boolean,default:De("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:De("noAutoFocus")},disposeTimeout:{type:Number,default:De("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){var e;return(e=this.ariaId)!==null&&e!==void 0?e:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[ko])===null||e===void 0?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,l;return((e=this.popperTriggers)===null||e===void 0?void 0:e.includes("hover"))||((l=this.popperShowTriggers)===null||l===void 0?void 0:l.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,l)=>(e[l]="$_computePosition",e),{})},created(){this.autoMinSize,this.autoMaxSize},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:l=!1,force:a=!1}={}){var n;if(!(!((n=this.parentPopper)===null||n===void 0)&&n.lockedChild&&this.parentPopper.lockedChild!==this)){if(this.pendingHide=!1,a||!this.disabled){var i;((i=this.parentPopper)===null||i===void 0?void 0:i.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,l),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})}this.$emit("update:shown",!0)}},hide({event:e=null,skipDelay:l=!1}={}){var a;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,this.parentPopper.lockedChildTimer&&clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:l}),this.parentPopper.lockedChild=null)},1e3));return}((a=this.parentPopper)===null||a===void 0?void 0:a.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,l),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e,l;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=(e=(l=this.referenceNode)===null||l===void 0?void 0:l.call(this))!==null&&e!==void 0?e:this.$el,this.$_targetNodes=this.targetNodes().filter(a=>a.nodeType===a.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(uh({mainAxis:this.distance,crossAxis:this.skidding}));const l=this.placement.startsWith("auto");if(l){var a;e.middleware.push(Zh({alignment:(a=this.placement.split("-")[1])!==null&&a!==void 0?a:""}))}else e.placement=this.placement;if(this.preventOverflow&&(this.shift&&e.middleware.push(rh({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!l&&this.flip&&e.middleware.push(bh({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Lz({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:i,rects:c,middlewareData:d})=>{let s;const{centerOffset:o}=d.arrow;return i.startsWith("top")||i.startsWith("bottom")?s=Math.abs(o)>c.reference.width/2:s=Math.abs(o)>c.reference.height/2,{data:{overflow:s}}}}),this.autoMinSize||this.autoSize){const i=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:c,placement:d,middlewareData:s})=>{var o;if(!((o=s.autoSize)===null||o===void 0)&&o.skip)return{};let m,u;return d.startsWith("top")||d.startsWith("bottom")?m=c.reference.width:u=c.reference.height,this.$_innerNode.style[i==="min"?"minWidth":i==="max"?"maxWidth":"width"]=m!=null?`${m}px`:null,this.$_innerNode.style[i==="min"?"minHeight":i==="max"?"maxHeight":"height"]=u!=null?`${u}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(Yz({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:i,availableHeight:c})=>{this.$_innerNode.style.maxWidth=i!=null?`${i}px`:null,this.$_innerNode.style.maxHeight=c!=null?`${c}px`:null}})));const n=await hh(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,l=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),Sa&&this.instantMove&&Sa.instantMove&&Sa!==this.parentPopper){Sa.$_applyHide(!0),this.$_applyShow(!0);return}l?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,l=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,this.$_scheduleTimer&&clearTimeout(this.$_scheduleTimer),this.isShown&&(Sa=this),l?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const l=this.delay;return parseInt(l&&l[e]||l||0)},async $_applyShow(e=!1){this.$_disposeTimer&&clearTimeout(this.$_disposeTimer),this.$_scheduleTimer&&clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Fo(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Ri(this.$_referenceNode),...Ri(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const l=this.$_referenceNode.getBoundingClientRect(),a=this.$_popperNode.querySelector(".v-popper__wrapper"),n=a.parentNode.getBoundingClientRect(),i=l.x+l.width/2-(n.left+a.offsetLeft),c=l.y+l.height/2-(n.top+a.offsetTop);this.result.transformOrigin=`${i}px ${c}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let l;for(let a=0;a<mt.length;a++)l=mt[a],l.showGroup!==e&&(l.hide(),l.$emit("close-group"))}mt.push(this),document.body.classList.add("v-popper--some-open");for(const l of rb(this.theme))Gb(l).push(this),document.body.classList.add(`v-popper--some-open--${l}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await Fo(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(this.$_scheduleTimer&&clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,pb(mt,this),mt.length===0&&document.body.classList.remove("v-popper--some-open");for(const a of rb(this.theme)){const n=Gb(a);pb(n,this),n.length===0&&document.body.classList.remove(`v-popper--some-open--${a}`)}Sa===this&&(Sa=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),this.$_disposeTimer&&clearTimeout(this.$_disposeTimer);const l=this.disposeTimeout;l!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},l)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Fo(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error(`No container for popover: ${this.container}`);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=a=>{this.isShown&&!this.$_hideInProgress||(a.usedByTooltip=!0,!this.$_preventShow&&this.show({event:a}))};this.$_registerTriggerListeners(this.$_targetNodes,bb,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],bb,this.popperTriggers,this.popperShowTriggers,e);const l=a=>{a.usedByTooltip||this.hide({event:a})};this.$_registerTriggerListeners(this.$_targetNodes,hb,this.triggers,this.hideTriggers,l),this.$_registerTriggerListeners([this.$_popperNode],hb,this.popperTriggers,this.popperHideTriggers,l)},$_registerEventListeners(e,l,a){this.$_events.push({targetNodes:e,eventType:l,handler:a}),e.forEach(n=>n.addEventListener(l,a,Rs?{passive:!0}:void 0))},$_registerTriggerListeners(e,l,a,n,i){let c=a;n!=null&&(c=typeof n=="function"?n(c):n),c.forEach(d=>{const s=l[d];s&&this.$_registerEventListeners(e,s,i)})},$_removeEventListeners(e){const l=[];this.$_events.forEach(a=>{const{targetNodes:n,eventType:i,handler:c}=a;!e||e===i?n.forEach(d=>d.removeEventListener(i,c)):l.push(a)}),this.$_events=l},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,l=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),l&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,l){for(const a of this.$_targetNodes){const n=a.getAttribute(e);n&&(a.removeAttribute(e),a.setAttribute(l,n))}},$_applyAttrsToTarget(e){for(const l of this.$_targetNodes)for(const a in e){const n=e[a];n==null?l.removeAttribute(a):l.setAttribute(a,n)}},$_updateParentShownChildren(e){let l=this.parentPopper;for(;l;)e?l.shownChildren.add(this.randomId):(l.shownChildren.delete(this.randomId),l.pendingHide&&l.hide()),l=l.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(yi>=e.left&&yi<=e.right&&Mi>=e.top&&Mi<=e.bottom){const l=this.$_popperNode.getBoundingClientRect(),a=yi-da,n=Mi-sa,i=l.left+l.width/2-da+(l.top+l.height/2)-sa+l.width+l.height,c=da+a*i,d=sa+n*i;return Hc(da,sa,c,d,l.left,l.top,l.left,l.bottom)||Hc(da,sa,c,d,l.left,l.top,l.right,l.top)||Hc(da,sa,c,d,l.right,l.top,l.right,l.bottom)||Hc(da,sa,c,d,l.left,l.bottom,l.right,l.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(MP){const e=Rs?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",l=>Nb(l,!0),e),document.addEventListener("touchend",l=>Yb(l,!0),e)}else window.addEventListener("mousedown",e=>Nb(e,!1),!0),window.addEventListener("click",e=>Yb(e,!1),!0);window.addEventListener("resize",TP)}function Nb(e,l){if(Vt.autoHideOnMousedown)IW(e,l);else for(let a=0;a<mt.length;a++){const n=mt[a];try{n.mouseDownContains=n.popperNode().contains(e.target)}catch{}}}function Yb(e,l){Vt.autoHideOnMousedown||IW(e,l)}function IW(e,l){const a={};for(let n=mt.length-1;n>=0;n--){const i=mt[n];try{const c=Array.from(i.shownChildren).some(s=>{const o=mt.find(m=>m.randomId===s);return o&&o.popperNode().contains(e.target)}),d=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target)||c;i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!a[i.randomId]&&Lb(i,d,e)){if(i.$_handleGlobalClose(e,l),!e.closeAllPopover&&e.closePopover&&d){let o=i.parentPopper;for(;o;)a[o.randomId]=!0,o=o.parentPopper;return}let s=i.parentPopper;for(;s&&Lb(s,s.containsGlobalTarget,e);){s.$_handleGlobalClose(e,l);s=s.parentPopper}}})}catch{}}}function Lb(e,l,a){return a.closeAllPopover||a.closePopover&&l||VP(e,a)&&!l}function VP(e,l){if(typeof e.autoHide=="function"){const a=e.autoHide(l);return e.lastAutoHide=a,a}return e.autoHide}function TP(){for(let e=0;e<mt.length;e++)mt[e].$_computePosition()}var da=0,sa=0,yi=0,Mi=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{da=yi,sa=Mi,yi=e.clientX,Mi=e.clientY},Rs?{passive:!0}:void 0);function Hc(e,l,a,n,i,c,d,s){const o=((d-i)*(l-c)-(s-c)*(e-i))/((s-c)*(a-e)-(d-i)*(n-l)),m=((a-e)*(l-c)-(n-l)*(e-i))/((s-c)*(a-e)-(d-i)*(n-l));return o>=0&&o<=1&&m>=0&&m<=1}var IP=(0,t.defineComponent)({extends:TW(),render(){var e,l;return(0,t.h)("div",{ref:"reference",class:["v-popper",{"v-popper--shown":this.slotData.isShown}]},(e=(l=this.$slots).default)===null||e===void 0?void 0:e.call(l,this.slotData))}}),xW=(e="theme")=>({computed:{themeClass(){return yP(this[e])}}}),zW=(0,t.defineComponent)({name:"VPopperContent",mixins:[xW()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],mounted(){this.handleResize&&(this.$_resizeObserver=new ResizeObserver(()=>this.$emit("resize")),this.$_resizeObserver.observe(this.$refs.inner))},beforeUnmount(){var e;(e=this.$_resizeObserver)===null||e===void 0||e.disconnect()},methods:{toPx(e){return e!=null&&!Number.isNaN(e)?`${e}px`:null}},render(){var e,l;const{autoHide:a,classes:n,result:i,shown:c}=this;return(0,t.h)("div",{id:this.popperId,ref:"popover","data-allow-mismatch":"",class:["v-popper__popper",this.themeClass,n.popperClass,{"v-popper__popper--shown":c,"v-popper__popper--hidden":!c,"v-popper__popper--show-from":n.showFrom,"v-popper__popper--show-to":n.showTo,"v-popper__popper--hide-from":n.hideFrom,"v-popper__popper--hide-to":n.hideTo,"v-popper__popper--skip-transition":this.skipTransition,"v-popper__popper--arrow-overflow":i&&i.arrow.overflow,"v-popper__popper--no-positioning":!i}],style:i?{position:i.strategy,transform:`translate3d(${Math.round(i.x)}px,${Math.round(i.y)}px,0)`}:void 0,"aria-hidden":c||a?"false":"true",tabindex:a?0:void 0,"data-popper-placement":i?i.placement:void 0,onKeyup:d=>{d.key==="Escape"&&a&&this.$emit("hide")}},[(0,t.h)("div",{class:"v-popper__backdrop",onClick:()=>a&&this.$emit("hide")}),(0,t.h)("div",{class:"v-popper__wrapper",style:i?{transformOrigin:i.transformOrigin}:void 0},[(0,t.h)("div",{ref:"inner",class:"v-popper__inner"},this.mounted?[(0,t.h)("div",(e=(l=this.$slots).default)===null||e===void 0?void 0:e.call(l))]:void 0),(0,t.h)("div",{ref:"arrow",class:"v-popper__arrow-container",style:i?{left:this.toPx(i.arrow.x),top:this.toPx(i.arrow.y)}:void 0},[(0,t.h)("div",{class:"v-popper__arrow-outer"}),(0,t.h)("div",{class:"v-popper__arrow-inner"})])])])}}),gW={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},eu=function(){};typeof window<"u"&&(eu=window.Element);var xP=(0,t.defineComponent)({name:"VPopperWrapper",mixins:[gW,xW("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,eu,Boolean],default:void 0},boundary:{type:[String,eu],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){var e;return(e=this.theme)!==null&&e!==void 0?e:this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}},render(){return(0,t.h)(IP,{ref:"popper",...this.$props,theme:this.finalTheme,targetNodes:this.getTargetNodes,popperNode:()=>this.$refs.popperContent.$el,class:[this.themeClass],onShow:()=>this.$emit("show"),onHide:()=>this.$emit("hide"),"onUpdate:shown":e=>this.$emit("update:shown",e),onApplyShow:()=>this.$emit("apply-show"),onApplyHide:()=>this.$emit("apply-hide"),onCloseGroup:()=>this.$emit("close-group"),onCloseDirective:()=>this.$emit("close-directive"),onAutoHide:()=>this.$emit("auto-hide"),onResize:()=>this.$emit("resize")},{default:({popperId:e,isShown:l,shouldMountContent:a,skipTransition:n,autoHide:i,show:c,hide:d,handleResize:s,onResize:o,classes:m,result:u})=>{var Z,r;return[(Z=(r=this.$slots).default)===null||Z===void 0?void 0:Z.call(r,{shown:l,show:c,hide:d}),(0,t.h)(zW,{ref:"popperContent",popperId:e,theme:this.finalTheme,shown:l,mounted:a,skipTransition:n,autoHide:i,handleResize:s,classes:m,result:u,onHide:d,onResize:o},{default:()=>{var b,h;return(b=(h=this.$slots).popper)===null||b===void 0?void 0:b.call(h,{shown:l,hide:d})}})]}})}});function I2(e,l){return{...xP,name:e,vPopperTheme:l}}var zP=I2("VDropdown","dropdown"),gP=I2("VMenu","menu"),wP=I2("VTooltip","tooltip"),RP=TW(),SP=(0,t.defineComponent)({name:"VTooltipDirective",mixins:[gW],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>lc(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>lc(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const l=++this.$_fetchId,a=this.content(this);a.then?a.then(n=>this.onResult(l,n)):this.onResult(l,a)}},onResult(e,l){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=l)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}},render(){return(0,t.h)(RP,{ref:"popper",...this.$attrs,theme:this.theme,targetNodes:this.targetNodes,popperNode:()=>this.$refs.popperContent.$el,onApplyShow:this.onShow,onApplyHide:this.onHide},{default:({popperId:e,isShown:l,shouldMountContent:a,skipTransition:n,autoHide:i,hide:c,handleResize:d,onResize:s,classes:o,result:m})=>(0,t.h)(zW,{ref:"popperContent",class:{"v-popper--tooltip-loading":this.loading},popperId:e,theme:this.theme,shown:l,mounted:a,skipTransition:n,autoHide:i,handleResize:d,classes:o,result:m,onHide:c,onResize:s},{default:()=>this.html?(0,t.h)("div",{innerHTML:this.finalContent}):(0,t.h)("div",{textContent:this.finalContent})})})}}),wW="v-popper--has-tooltip";function vP(e,l){let a=e.placement;if(!a&&l)for(const n of VW)l[n]&&(a=n);return a||(a=lc(e.theme||"tooltip","placement")),a}function RW(e,l,a){let n;const i=typeof l;return i==="string"?n={content:l}:l&&i==="object"?n=l:n={content:!1},n.placement=vP(n,a),n.targetNodes=()=>[e],n.referenceNode=()=>e,n}var jo,tc,fP=0;function FP(){if(jo)return;tc=(0,t.ref)([]),jo=(0,t.createApp)({name:"VTooltipDirectiveApp",setup(){return{directives:tc}},render(){return this.directives.map(l=>(0,t.h)(SP,{...l.options,shown:l.shown||l.options.shown,key:l.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),jo.mount(e)}function kP(e,l,a){FP();const n=(0,t.ref)(RW(e,l,a)),i=(0,t.ref)(!1),c={id:fP++,options:n,shown:i};return tc.value.push(c),e.classList&&e.classList.add(wW),e.$_popper={options:n,item:c,show(){i.value=!0},hide(){i.value=!1}}}function SW(e){if(e.$_popper){const l=tc.value.indexOf(e.$_popper.item);l!==-1&&tc.value.splice(l,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(wW)}function Xb(e,{value:l,modifiers:a}){const n=RW(e,l,a);if(!n.content||lc(n.theme||"tooltip","disabled"))SW(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=n):i=kP(e,l,a),typeof l.shown<"u"&&l.shown!==e.$_popperOldShown&&(e.$_popperOldShown=l.shown,l.shown?i.show():i.hide())}}var jP={beforeMount:Xb,updated:Xb,beforeUnmount(e){SW(e)}};function yb(e){e.addEventListener("mousedown",_d),e.addEventListener("click",_d),e.addEventListener("touchstart",vW,Rs?{passive:!0}:!1)}function Mb(e){e.removeEventListener("mousedown",_d),e.removeEventListener("click",_d),e.removeEventListener("touchstart",vW),e.removeEventListener("touchend",fW),e.removeEventListener("touchcancel",FW)}function _d(e){const l=e.currentTarget;e.closePopover=!l.$_vclosepopover_touch,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}function vW(e){if(e.changedTouches.length===1){const l=e.currentTarget;l.$_vclosepopover_touch=!0,l.$_vclosepopover_touchPoint=e.changedTouches[0],l.addEventListener("touchend",fW),l.addEventListener("touchcancel",FW)}}function fW(e){const l=e.currentTarget;if(l.$_vclosepopover_touch=!1,e.changedTouches.length===1){const a=e.changedTouches[0],n=l.$_vclosepopover_touchPoint;e.closePopover=Math.abs(a.screenY-n.screenY)<20&&Math.abs(a.screenX-n.screenX)<20,e.closeAllPopover=l.$_closePopoverModifiers&&!!l.$_closePopoverModifiers.all}}function FW(e){const l=e.currentTarget;l.$_vclosepopover_touch=!1}var JP={beforeMount(e,{value:l,modifiers:a}){e.$_closePopoverModifiers=a,(typeof l>"u"||l)&&yb(e)},updated(e,{value:l,oldValue:a,modifiers:n}){e.$_closePopoverModifiers=n,l!==a&&(typeof l>"u"||l?yb(e):Mb(e))},beforeUnmount(e){Mb(e)}};function CP(e,l={}){if(!e.$_vTooltipInstalled){e.$_vTooltipInstalled=!0,MW(Vt,l),e.directive("tooltip",jP),e.directive("close-popper",JP);for(const a of[wP,zP,gP])e.component(a.name,a)}}var DP={version:XP,install:CP,options:Vt},UP=["src"],OP=(0,t.defineComponent)({__name:"LightboxImage",props:{src:{}},setup(e){const l=e,{imageSrc:a}=Z2(()=>l.src);return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)("img",{draggable:!1,src:(0,t.unref)(a),alt:"Preview",class:"lightbox-image"},null,8,UP))}}),EP=OP,BP={key:0,class:"center"},KP={key:3},HP={class:"bgl-lightbox-item"},PP={key:2,class:"lightbox-pdf"},QP=["src","title"],AP={key:3,class:"lightbox-file flex-center"},_P={class:"file-info txt-white flex m_block align-items-start gap-025"},$P={class:"txt-start"},qP={class:"mx-0 light"},e8={class:"semi word-break-all"},l8={class:"mx-0"},t8={class:"semi"},a8=(0,t.defineComponent)({__name:"Lightbox",setup(e,{expose:l}){const a=(0,t.ref)(!1),n=(0,t.ref)(null),i=(0,t.ref)([]),c=(0,t.ref)(0),d=(0,t.computed)(()=>i.value[c.value]),s=(0,t.ref)(1),o=(0,t.computed)(()=>s.value===1),m=(0,t.computed)(()=>({allowTouchMove:s.value===1,touchRatio:s.value===1?1:0,simulateTouch:s.value===1}));function u(b,h){a.value=!0,i.value=h||[b],c.value=i.value.findIndex(G=>{const N=b.src!==void 0&&b.src!==null&&b.src!==""&&G.src===b.src,p=b.pathKey!==void 0&&b.pathKey!==null&&b.pathKey!==""&&G.pathKey===b.pathKey;return N||p}),c.value===-1&&(c.value=0),s.value=1}function Z(){a.value=!1}Ms(Z,a);function r(b){c.value=b,s.value=1}return(0,t.watch)(()=>a.value,async b=>{b?(document.body.style.overflow="hidden",await(0,t.nextTick)(),n.value?.open||n.value?.showModal()):(document.body.style.overflow="",n.value?.open&&n.value.close())}),(0,t.watch)(()=>c.value,()=>{s.value=1}),l({open:u,close:Z}),(b,h)=>((0,t.openBlock)(),(0,t.createBlock)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[a.value?((0,t.openBlock)(),(0,t.createElementBlock)("dialog",{key:0,ref_key:"dialogRef",ref:n,class:"bgl-lightbox-overlay",onCancel:(0,t.withModifiers)(Z,["prevent"])},[(0,t.createElementVNode)("div",{class:"flex start w-100 space-between p-025 z-9",onClick:Z},[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"close",onClick:Z}),d.value?.enableZoom&&d.value?.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)("div",BP,[(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"remove",disabled:s.value===1,onClick:h[0]||(h[0]=G=>s.value--)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"zoom_in",disabled:s.value===1,onClick:h[1]||(h[1]=G=>s.value=1)},null,8,["disabled"]),(0,t.createVNode)((0,t.unref)(oe),{flat:"",class:"color-white",icon:"add",disabled:s.value===3,onClick:h[2]||(h[2]=G=>s.value++)},null,8,["disabled"])])):(0,t.createCommentVNode)("",!0),d.value?.openFile&&d.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:1,class:"color-white",round:"",thin:"",flat:"",iconEnd:"arrow_outward",value:"$t:lightbox.openFile",href:d.value?.src,target:"_blank"},null,8,["href"])):(0,t.createCommentVNode)("",!0),d.value?.download&&d.value?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(oe),{key:2,class:"color-white",round:"",thin:"",flat:"",icon:"download",value:"Download File",onClick:h[3]||(h[3]=G=>(0,t.unref)(u2)(d.value?.src))})):(0,t.createCommentVNode)("",!0),!d.value?.openFile&&!d.value?.download?((0,t.openBlock)(),(0,t.createElementBlock)("div",KP)):(0,t.createCommentVNode)("",!0)]),i.value&&i.value.length>0?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(X5),{key:0,index:c.value,"onUpdate:index":h[6]||(h[6]=G=>c.value=G),items:i.value,"initial-slide":c.value,class:(0,t.normalizeClass)(["bgl-lightbox-swiper",{zoomed:s.value>1}]),navigation:i.value.length>1,"grab-cursor":o.value,keyboard:!0,loop:!1,speed:400,"slides-per-view":1,"space-between":0,effect:"slide","advanced-options":m.value,onClick:h[7]||(h[7]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(({item:G})=>[(0,t.createElementVNode)("div",HP,[G.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(y5),{key:0,zoom:s.value,"onUpdate:zoom":h[4]||(h[4]=N=>s.value=N),disabled:!G?.enableZoom,"mouse-wheel-to-zoom":!1,"double-click-to-zoom":!0,"max-scale":5,"min-scale":1,"aspect-ratio":0,"limit-translation":!0,onClick:h[5]||(h[5]=(0,t.withModifiers)(()=>{},["stop"]))},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(EP,{src:G?.src},null,8,["src"])]),_:2},1032,["zoom","disabled"])):G?.type==="video"&&G?.src?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Mu),{key:1,src:G?.src,autoplay:"",controls:"",class:"lightbox-video"},null,8,["src"])):G?.type==="pdf"&&G?.src?((0,t.openBlock)(),(0,t.createElementBlock)("div",PP,[(0,t.createElementVNode)("embed",{src:(0,t.unref)(m2)(G?.src),type:"application/pdf",title:G?.name},null,8,QP)])):((0,t.openBlock)(),(0,t.createElementBlock)("div",AP,[(0,t.createElementVNode)("div",_P,[(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 m_none",icon:"draft",size:10,weight:"12"}),(0,t.createVNode)((0,t.unref)(Ne),{class:"m-0 none m_block m_-mb-1",icon:"draft",size:4,weight:"2"}),(0,t.createElementVNode)("div",$P,[(0,t.createElementVNode)("p",qP,[h[9]||(h[9]=(0,t.createTextVNode)(" File: ",-1)),(0,t.createElementVNode)("span",e8,(0,t.toDisplayString)(G?.name),1)]),(0,t.createElementVNode)("p",l8,[h[10]||(h[10]=(0,t.createTextVNode)(" Type: ",-1)),(0,t.createElementVNode)("span",t8,(0,t.toDisplayString)(G?.type),1)]),(0,t.createVNode)((0,t.unref)(oe),{href:G?.src,target:"_blank",round:"",thin:"",class:"mt-1",value:"Open file"},null,8,["href"])])])]))])]),"prev-button":(0,t.withCtx)(({prev:G})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_back",color:"black",disabled:c.value===0,class:(0,t.normalizeClass)({"color-black-70":c.value===0}),onClick:G},null,8,["disabled","class","onClick"])]),"next-button":(0,t.withCtx)(({next:G})=>[(0,t.createVNode)((0,t.unref)(oe),{icon:"arrow_forward",color:"black",disabled:c.value===i.value.length-1,class:(0,t.normalizeClass)({"color-black-70":c.value===i.value.length-1}),onClick:G},null,8,["disabled","class","onClick"])]),_:1},8,["index","items","initial-slide","class","navigation","grab-cursor","advanced-options"])):(0,t.createCommentVNode)("",!0),i.value&&i.value.length>1?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"lightbox-thumbnails",onClick:h[8]||(h[8]=(0,t.withModifiers)(()=>{},["stop"]))},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(i.value,(G,N)=>((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:N},[G.type==="image"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(gi),{key:0,class:(0,t.normalizeClass)(["thumbnail",{active:c.value===N}]),src:G.src,alt:"",onClick:(0,t.withModifiers)(p=>r(N),["stop"])},null,8,["src","class","onClick"])):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,class:(0,t.normalizeClass)(["thumbnail thumbnail-icon",{active:c.value===N}]),icon:"description",onClick:(0,t.withModifiers)(p=>r(N),["stop"])},null,8,["class","onClick"]))],64))),128))])):(0,t.createCommentVNode)("",!0)],544)):(0,t.createCommentVNode)("",!0)]),_:1}))}}),n8=a8,Zi={},rn=e=>{},i8={mounted(e,l){Vb(lu(l,e)),rn=a=>{Tb(a,e,l)},e.addEventListener("click",rn)},updated(e,l){Vb(lu(l,e)),e.removeEventListener("click",rn),rn=a=>{Tb(a,e,l)},e.addEventListener("click",rn)},unmounted(e){e.removeEventListener("click",rn)},getSSRProps(){return{}}};function Vb(e){e.group&&(Zi[e.group]||(Zi[e.group]=[]),Zi[e.group].findIndex(l=>l.src===e.src)===-1&&Zi[e.group].push(e))}function Tb(e,l,a){e.stopPropagation();const n=lu(a,l),i=m8();if(!i||!i.open)return;const c=i.open;c(n,n&&n.group?Zi[n.group]:void 0)}function lu(e,l){let{group:a,src:n,type:i,name:c,thumbnail:d,enableZoom:s,openFile:o,download:m,pathKey:u}=e.value||{};return n=_l(n||u)||e.value||l.getAttribute("src")||"",i=i||o8(n),c=c||s8(n)||l.getAttribute("alt")||"",{src:n,type:i,name:c,thumbnail:d,group:a,enableZoom:s,openFile:o,download:m}}var c8=/youtube\.com|youtu\.be/,d8=/vimeo\.com/;function s8(e){return!e||typeof e!="string"?"":(e.split("/").pop()||"").replace(/\.[^/.]+$/,"")}function o8(e){if(typeof e!="string"||!e)return"unknown";if(e.startsWith("blob:")||/^data:image\//i.test(e))return"image";if(/^data:video\//i.test(e))return"video";const l=(e.split(".").pop()||"").toLowerCase(),a=e.split("?")[0].split(".").pop()?.toLowerCase()||"";return Td.test(l)||Td.test(a)?"image":yh.test(l)||c8.test(e)||d8.test(e)?"video":["pdf"].includes(l)?"pdf":l??"unknown"}var Jo;function m8(){if(!(typeof document>"u")){if(!Jo){const e=document.createElement("div");document.body.prepend(e),Jo=(0,t.createApp)(n8).mount(e)}return Jo}}var u8={install(e){e.directive("lightbox",i8)}},Z8=u8,r8={beforeMount(e,l){e.clickOutsideEvent=a=>{e===a.target||e.contains(a.target)||l.value(a)},document.addEventListener("click",e.clickOutsideEvent)},unmounted(e){document.removeEventListener("click",e.clickOutsideEvent)}},kW=as.__export({EventBus:()=>fs,POSITION:()=>nc,TYPE:()=>El,createToastInterface:()=>ic,default:()=>eG,globalEventBus:()=>x2,provideToast:()=>eQ,toastInjectionKey:()=>Fs,useToast:()=>qW},1),b8=Object.defineProperty,Ib=Object.getOwnPropertySymbols,h8=Object.prototype.hasOwnProperty,p8=Object.prototype.propertyIsEnumerable,xb=(e,l,a)=>l in e?b8(e,l,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[l]=a,jW=(e,l)=>{for(var a in l||(l={}))h8.call(l,a)&&xb(e,a,l[a]);if(Ib)for(var a of Ib(l))p8.call(l,a)&&xb(e,a,l[a]);return e},Ss=e=>typeof e=="function",vs=e=>typeof e=="string",JW=e=>vs(e)&&e.trim().length>0,W8=e=>typeof e=="number",Ca=e=>typeof e>"u",ac=e=>typeof e=="object"&&e!==null,G8=e=>Ft(e,"tag")&&JW(e.tag),CW=e=>window.TouchEvent&&e instanceof TouchEvent,DW=e=>Ft(e,"component")&&UW(e.component),N8=e=>Ss(e)||ac(e),UW=e=>!Ca(e)&&(vs(e)||N8(e)||DW(e)),zb=e=>ac(e)&&["height","width","right","left","top","bottom"].every(l=>W8(e[l])),Ft=(e,l)=>(ac(e)||Ss(e))&&l in e,Y8=(e=>()=>e++)(0);function Co(e){return CW(e)?e.targetTouches[0].clientX:e.clientX}function gb(e){return CW(e)?e.targetTouches[0].clientY:e.clientY}var L8=e=>{Ca(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},yc=e=>DW(e)?yc(e.component):G8(e)?(0,t.defineComponent)({render(){return e}}):typeof e=="string"?e:(0,t.toRaw)((0,t.unref)(e)),X8=e=>{if(typeof e=="string")return e;const l=Ft(e,"props")&&ac(e.props)?e.props:{},a=Ft(e,"listeners")&&ac(e.listeners)?e.listeners:{};return{component:yc(e),props:l,listeners:a}},y8=()=>typeof window<"u",fs=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,l){const a=this.getHandlers(e);a.push(l),this.allHandlers[e]=a}off(e,l){const a=this.getHandlers(e);a.splice(a.indexOf(l)>>>0,1)}emit(e,l){this.getHandlers(e).forEach(a=>a(l))}},M8=e=>["on","off","emit"].every(l=>Ft(e,l)&&Ss(e[l])),El;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(El||(El={}));var nc;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(nc||(nc={}));var et;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(et||(et={}));var At="Vue-Toastification",Gt={type:{type:String,default:El.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},wb={type:Gt.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Pc={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Gt.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},Do={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Rb={transition:{type:[Object,String],default:`${At}__bounce`}},ea={CORE_TOAST:{position:{type:String,default:nc.TOP_RIGHT},draggable:Gt.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Gt.trueBoolean,pauseOnHover:Gt.trueBoolean,closeOnClick:Gt.trueBoolean,timeout:Do.timeout,hideProgressBar:Do.hideProgressBar,toastClassName:Gt.classNames,bodyClassName:Gt.classNames,icon:wb.customIcon,closeButton:Pc.component,closeButtonClassName:Pc.classNames,showCloseButtonOnHover:Pc.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new fs}},TOAST:{id:{type:[String,Number],required:!0,default:0},type:Gt.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},CONTAINER:{container:{type:[Object,Function],default:()=>document.body},newestOnTop:Gt.trueBoolean,maxToasts:{type:Number,default:20},transition:Rb.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:Gt.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},PROGRESS_BAR:Do,ICON:wb,TRANSITION:Rb,CLOSE_BUTTON:Pc},OW=(0,t.defineComponent)({name:"VtProgressBar",props:ea.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${At}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function V8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{style:(0,t.normalizeStyle)(e.style),class:(0,t.normalizeClass)(e.cpClass)},null,6)}OW.render=V8;var T8=OW,EW=(0,t.defineComponent)({name:"VtCloseButton",props:ea.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?yc(this.component):"button"},classes(){const e=[`${At}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),I8=(0,t.createTextVNode)(" × ");function x8(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.buttonComponent),(0,t.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,t.withCtx)(()=>[I8]),_:1},16,["aria-label","class"])}EW.render=x8;var z8=EW,BW={},g8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},w8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)];function R8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",g8,w8)}BW.render=R8;var S8=BW,KW={},v8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},f8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)];function F8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",v8,f8)}KW.render=F8;var Sb=KW,HW={},k8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},j8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function J8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",k8,j8)}HW.render=J8;var C8=HW,PW={},D8={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},U8=[(0,t.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)];function O8(e,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",D8,U8)}PW.render=O8;var E8=PW,QW=(0,t.defineComponent)({name:"VtIcon",props:ea.ICON,computed:{customIconChildren(){return Ft(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return vs(this.customIcon)?this.trimValue(this.customIcon):Ft(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return Ft(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:UW(this.customIcon)?yc(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[El.DEFAULT]:Sb,[El.INFO]:Sb,[El.SUCCESS]:S8,[El.ERROR]:E8,[El.WARNING]:C8}[this.type]},iconClasses(){const e=[`${At}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,l=""){return JW(e)?e.trim():l}}});function B8(e,l){return(0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.component),{class:(0,t.normalizeClass)(e.iconClasses)},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(e.customIconChildren),1)]),_:1},8,["class"])}QW.render=B8;var AW=(0,t.defineComponent)({name:"VtToast",components:{ProgressBar:T8,CloseButton:z8,Icon:QW},inheritAttrs:!1,props:Object.assign({},ea.CORE_TOAST,ea.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${At}__toast`,`${At}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${At}__toast--rtl`),e},bodyClasses(){return[`${At}__toast-${vs(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return zb(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:Ft,getVueComponentFromObj:yc,closeToast(){this.eventBus.emit(et.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:Co(e),y:gb(e)},this.dragStart=Co(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Co(e),y:gb(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,zb(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),K8=["role"];function H8(e,l){const a=(0,t.resolveComponent)("Icon"),n=(0,t.resolveComponent)("CloseButton"),i=(0,t.resolveComponent)("ProgressBar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(e.classes),style:(0,t.normalizeStyle)(e.draggableStyle),onClick:l[0]||(l[0]=(...c)=>e.clickHandler&&e.clickHandler(...c)),onMouseenter:l[1]||(l[1]=(...c)=>e.hoverPause&&e.hoverPause(...c)),onMouseleave:l[2]||(l[2]=(...c)=>e.hoverPlay&&e.hoverPlay(...c))},[e.icon?((0,t.openBlock)(),(0,t.createBlock)(a,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,t.createCommentVNode)("v-if",!0),(0,t.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,t.normalizeClass)(e.bodyClasses)},[typeof e.content=="string"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createTextVNode)((0,t.toDisplayString)(e.content),1)],2112)):((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,t.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,t.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,K8),e.closeButton?((0,t.openBlock)(),(0,t.createBlock)(n,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,t.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,t.createCommentVNode)("v-if",!0),e.timeout?((0,t.openBlock)(),(0,t.createBlock)(i,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,t.createCommentVNode)("v-if",!0)],38)}AW.render=H8;var P8=AW,_W=(0,t.defineComponent)({name:"VtTransition",props:ea.TRANSITION,emits:["leave"],methods:{hasProp:Ft,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function Q8(e,l){return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}_W.render=Q8;var $W=(0,t.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:P8,VtTransition:_W},props:Object.assign({},ea.CORE_TOAST,ea.CONTAINER,ea.TRANSITION),data(){return{count:0,positions:Object.values(nc),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(et.ADD,this.addToast),e.on(et.CLEAR,this.clearToasts),e.on(et.DISMISS,this.dismissToast),e.on(et.UPDATE,this.updateToast),e.on(et.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Ss(e)&&(e=await e()),L8(this.$el),e.appendChild(this.$el)},setToast(e){Ca(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=X8(e.content);const l=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),a=this.defaults.filterBeforeCreate(l,this.toastArray);a&&this.setToast(a)},dismissToast(e){const l=this.toasts[e];!Ca(l)&&!Ca(l.onClose)&&l.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const l=this.filteredToasts.filter(a=>a.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?l.reverse():l},updateDefaults(e){Ca(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:l,create:a}){this.toasts[e]?(l.timeout&&l.timeout===this.toasts[e].timeout&&l.timeout++,this.setToast(Object.assign({},this.toasts[e],l))):a&&this.addToast(Object.assign({},{id:e},l))},getClasses(e){return[`${At}__container`,e].concat(this.defaults.containerClassName)}}});function A8(e,l){const a=(0,t.resolveComponent)("Toast"),n=(0,t.resolveComponent)("VtTransition");return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.positions,i=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:i},[(0,t.createVNode)(n,{transition:e.defaults.transition,class:(0,t.normalizeClass)(e.getClasses(i))},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.getPositionToasts(i),c=>((0,t.openBlock)(),(0,t.createBlock)(a,(0,t.mergeProps)({key:c.id},c),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}$W.render=A8;var _8=$W,vb=(e={},l=!0)=>{const a=e.eventBus=e.eventBus||new fs;l&&(0,t.nextTick)(()=>{const c=(0,t.createApp)(_8,jW({},e)),d=c.mount(document.createElement("div")),s=e.onMounted;if(Ca(s)||s(d,c),e.shareAppContext){const o=e.shareAppContext;o===!0||(c._context.components=o._context.components,c._context.directives=o._context.directives,c._context.mixins=o._context.mixins,c._context.provides=o._context.provides,c.config.globalProperties=o.config.globalProperties)}});const n=(c,d)=>{const s=Object.assign({},{id:Y8(),type:El.DEFAULT},d,{content:c});return a.emit(et.ADD,s),s.id};n.clear=()=>a.emit(et.CLEAR,void 0),n.updateDefaults=c=>{a.emit(et.UPDATE_DEFAULTS,c)},n.dismiss=c=>{a.emit(et.DISMISS,c)};function i(c,{content:d,options:s},o=!1){const m=Object.assign({},s,{content:d});a.emit(et.UPDATE,{id:c,options:m,create:o})}return n.update=i,n.success=(c,d)=>n(c,Object.assign({},d,{type:El.SUCCESS})),n.info=(c,d)=>n(c,Object.assign({},d,{type:El.INFO})),n.error=(c,d)=>n(c,Object.assign({},d,{type:El.ERROR})),n.warning=(c,d)=>n(c,Object.assign({},d,{type:El.WARNING})),n},$8=()=>{const e=()=>{};return new Proxy(e,{get(){return e}})};function ic(e){return y8()?M8(e)?vb({eventBus:e},!1):vb(e,!0):$8()}var Fs=Symbol("VueToastification"),x2=new fs,q8=(e,l)=>{l?.shareAppContext===!0&&(l.shareAppContext=e);const a=ic(jW({eventBus:x2},l));e.provide(Fs,a)},eQ=e=>{const l=ic(e);(0,t.getCurrentInstance)()&&(0,t.provide)(Fs,l)},qW=e=>{if(e)return ic(e);const l=(0,t.getCurrentInstance)()?(0,t.inject)(Fs,void 0):void 0;return l||ic(x2)},eG=q8,lQ={key:0,class:"custom-toast__icon"},tQ={class:"custom-toast__content"},aQ=(0,t.defineComponent)({name:"BglToast",__name:"Toast",props:{message:{},type:{},info:{type:Boolean},success:{type:Boolean},warning:{type:Boolean},error:{type:Boolean},showIcon:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},closeToast:{}},setup(e){const l=e,a=(0,t.computed)(()=>l.type?l.type:l.error?"error":l.warning?"warning":l.success?"success":"info");return(n,i)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["custom-toast",`custom-toast--${a.value}`])},[e.showIcon?((0,t.openBlock)(),(0,t.createElementBlock)("div",lQ,[a.value==="success"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:0,icon:"check_circle"})):(0,t.createCommentVNode)("",!0),a.value==="error"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:1,icon:"dangerous"})):(0,t.createCommentVNode)("",!0),a.value==="warning"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:2,icon:"report"})):(0,t.createCommentVNode)("",!0),a.value==="info"?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Ne),{key:3,icon:"info"})):(0,t.createCommentVNode)("",!0)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",tQ,(0,t.toDisplayString)(e.message),1),e.showCloseButton?((0,t.openBlock)(),(0,t.createElementBlock)("button",{key:1,class:"custom-toast__close",onClick:i[0]||(i[0]=(...c)=>e.closeToast&&e.closeToast(...c))},[(0,t.createVNode)((0,t.unref)(Ne),{icon:"close"})])):(0,t.createCommentVNode)("",!0)],2))}}),ci=aQ,nQ=eG||kW,{POSITION:iQ}=kW,bn=qW;const lG=Symbol("toast");var $d=null;function cQ(){const e=(0,t.inject)(lG,null);if(!e){if($d)return $d;throw new Error("Toast API not provided. Make sure ToastPlugin is installed via app.use(ToastPlugin)")}return e}function dQ(){if(typeof document>"u")return;let e=document.getElementById("bgl-toast-container");e||(e=document.createElement("div"),e.setAttribute("popover","manual"),e.setAttribute("id","bgl-toast-container"),document.body.appendChild(e));try{e.hidePopover()}catch{}try{e.showPopover()}catch{}return e}const tG={install:(e,l={})=>{const a=dQ(),n={position:iQ.TOP_RIGHT,timeout:5e3,closeOnClick:!0,pauseOnFocusLoss:!0,pauseOnHover:!0,draggable:!0,draggablePercent:.6,showCloseButtonOnHover:!1,hideProgressBar:!0,closeButton:!1,icon:!1,rtl:!1,transition:"Vue-Toastification__fade",maxToasts:5,newestOnTop:!0,toastClassName:"custom-toast-wrapper",bodyClassName:"custom-toast-body",...a?{container:a}:{},...l};e.use(nQ,n);function i(){const d=typeof document<"u"?document.getElementById("bgl-toast-container"):null;if(d){try{d.hidePopover()}catch{}try{d.showPopover()}catch{}}}const c={success:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"success"}},s)),error:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"error"}},s)),info:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"info"}},s)),warning:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"warning"}},s)),show:(d,s)=>(i(),bn()({component:ci,props:{message:d,type:"info"}},s)),clear:()=>{bn().clear()}};$d||($d=c),e.provide(lG,c)}};var ks=class extends Event{oldState;newState;constructor(e,{oldState:l="",newState:a="",...n}={}){super(e,n),this.oldState=String(l||""),this.newState=String(a||"")}},fb=new WeakMap;function aG(e,l,a){fb.set(e,setTimeout(()=>{fb.has(e)&&e.dispatchEvent(new ks("toggle",{cancelable:!1,oldState:l,newState:a}))},0))}var z2=globalThis.ShadowRoot||function(){},sQ=globalThis.HTMLDialogElement||function(){},bd=new WeakMap,_t=new WeakMap,st=new WeakMap,Cn=new WeakMap;function qd(e){return Cn.get(e)||"hidden"}var es=new WeakMap;function cc(e){return[...e].pop()}function oQ(e){const l=e.popoverTargetElement;if(!(l instanceof HTMLElement))return;const a=qd(l);e.popoverTargetAction==="show"&&a==="showing"||e.popoverTargetAction==="hide"&&a==="hidden"||(a==="showing"?Un(l,!0,!0):Oa(l,!1)&&(es.set(l,e),tu(l)))}function Oa(e,l){return!(e.popover!=="auto"&&e.popover!=="manual"&&e.popover!=="hint"||!e.isConnected||l&&qd(e)!=="showing"||!l&&qd(e)!=="hidden"||e instanceof sQ&&e.hasAttribute("open")||document.fullscreenElement===e)}function Fb(e){if(!e)return 0;const l=_t.get(document)||new Set,a=st.get(document)||new Set;return a.has(e)?[...a].indexOf(e)+l.size+1:l.has(e)?[...l].indexOf(e)+1:0}function mQ(e){const l=nG(e),a=uQ(e);return Fb(l)>Fb(a)?l:a}function dc(e){let l;const a=st.get(e)||new Set,n=_t.get(e)||new Set,i=a.size>0?a:n.size>0?n:null;return i?(l=cc(i),l.isConnected?l:(i.delete(l),dc(e))):null}function kb(e){for(const l of e||[])if(!l.isConnected)e.delete(l);else return l;return null}function Dn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.parentNode?Dn(e.parentNode):e}function nG(e){for(;e;){if(e instanceof HTMLElement&&e.popover==="auto"&&Cn.get(e)==="showing")return e;if(e=e instanceof Element&&e.assignedSlot||e.parentElement||Dn(e),e instanceof z2&&(e=e.host),e instanceof Document)return}}function uQ(e){for(;e;){const l=e.popoverTargetElement;if(l instanceof HTMLElement)return l;if(e=e.parentElement||Dn(e),e instanceof z2&&(e=e.host),e instanceof Document)return}}function jb(e,l){const a=new Map;let n=0;for(const d of l||[])a.set(d,n),n+=1;a.set(e,n),n+=1;let i=null;function c(d){if(!d)return;let s=!1,o=null,m=null;for(;!s;){if(o=nG(d)||null,o===null||!a.has(o))return;(e.popover==="hint"||o.popover==="auto")&&(s=!0),s||(d=o.parentElement)}m=a.get(o),(i===null||a.get(i)<m)&&(i=o)}return c(e.parentElement||Dn(e)),i}function ZQ(e){return e.hidden||e instanceof z2||(e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement||e instanceof HTMLOptGroupElement||e instanceof HTMLOptionElement||e instanceof HTMLFieldSetElement)&&e.disabled||e instanceof HTMLInputElement&&e.type==="hidden"||e instanceof HTMLAnchorElement&&e.href===""?!1:typeof e.tabIndex=="number"&&e.tabIndex!==-1}function rQ(e){if(e.shadowRoot&&e.shadowRoot.delegatesFocus!==!0)return null;let l=e;l.shadowRoot&&(l=l.shadowRoot);let a=l.querySelector("[autofocus]");if(a)return a;{const c=l.querySelectorAll("slot");for(const d of c){const s=d.assignedElements({flatten:!0});for(const o of s){if(o.hasAttribute("autofocus"))return o;if(a=o.querySelector("[autofocus]"),a)return a}}}const n=e.ownerDocument.createTreeWalker(l,NodeFilter.SHOW_ELEMENT);let i=n.currentNode;for(;i;){if(ZQ(i))return i;i=n.nextNode()}}function bQ(e){var l;(l=rQ(e))==null||l.focus()}var ls=new WeakMap;function tu(e){if(!Oa(e,!1))return;const l=e.ownerDocument;if(!e.dispatchEvent(new ks("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"}))||!Oa(e,!1))return;let a=!1;const n=e.popover;let i=null;const c=jb(e,_t.get(l)||new Set),d=jb(e,st.get(l)||new Set);if(n==="auto"&&(au(st.get(l)||new Set,a,!0),Ea(c||l,a,!0),i="auto"),n==="hint"&&(d?(Ea(d,a,!0),i="hint"):(au(st.get(l)||new Set,a,!0),c?(Ea(c,a,!0),i="auto"):i="hint")),n==="auto"||n==="hint"){if(n!==e.popover||!Oa(e,!1))return;dc(l)||(a=!0),i==="auto"?(_t.has(l)||_t.set(l,new Set),_t.get(l).add(e)):i==="hint"&&(st.has(l)||st.set(l,new Set),st.get(l).add(e))}ls.delete(e);const s=l.activeElement;e.classList.add(":popover-open"),Cn.set(e,"showing"),bd.has(l)||bd.set(l,new Set),bd.get(l).add(e),iG(es.get(e),!0),bQ(e),a&&s&&e.popover==="auto"&&ls.set(e,s),aG(e,"closed","open")}function Un(e,l=!1,a=!1){var n,i;if(!Oa(e,!0))return;const c=e.ownerDocument;if(["auto","hint"].includes(e.popover)&&(Ea(e,l,a),!Oa(e,!0)))return;const d=_t.get(c)||new Set,s=d.has(e)&&cc(d)===e;if(iG(es.get(e),!1),es.delete(e),a&&(e.dispatchEvent(new ks("beforetoggle",{oldState:"open",newState:"closed"})),s&&cc(d)!==e&&Ea(e,l,a),!Oa(e,!0)))return;(n=bd.get(c))==null||n.delete(e),d.delete(e),(i=st.get(c))==null||i.delete(e),e.classList.remove(":popover-open"),Cn.set(e,"hidden"),a&&aG(e,"open","closed");const o=ls.get(e);o&&(ls.delete(e),l&&o.focus())}function hQ(e,l=!1,a=!1){let n=dc(e);for(;n;)Un(n,l,a),n=dc(e)}function au(e,l=!1,a=!1){let n=kb(e);for(;n;)Un(n,l,a),n=kb(e)}function Jb(e,l,a,n){let i=!1,c=!1;for(;i||!c;){c=!0;let d=null,s=!1;for(const o of l)if(o===e)s=!0;else if(s){d=o;break}if(!d)return;for(;qd(d)==="showing"&&l.size;)Un(cc(l),a,n);l.has(e)&&cc(l)!==e&&(i=!0),i&&(n=!1)}}function Ea(e,l,a){var n,i;const c=e.ownerDocument||e;if(e instanceof Document)return hQ(c,l,a);if((n=st.get(c))!=null&&n.has(e)){Jb(e,st.get(c),l,a);return}au(st.get(c)||new Set,l,a),(i=_t.get(c))!=null&&i.has(e)&&Jb(e,_t.get(c),l,a)}var Uo=new WeakMap;function Cb(e){if(!e.isTrusted)return;const l=e.composedPath()[0];if(!l)return;const a=l.ownerDocument;if(!dc(a))return;const n=mQ(l);if(n&&e.type==="pointerdown")Uo.set(a,n);else if(e.type==="pointerup"){const i=Uo.get(a)===n;Uo.delete(a),i&&Ea(n||a,!1,!0)}}var Oo=new WeakMap;function iG(e,l=!1){if(!e)return;Oo.has(e)||Oo.set(e,e.getAttribute("aria-expanded"));const a=e.popoverTargetElement;if(a instanceof HTMLElement&&a.popover==="auto")e.setAttribute("aria-expanded",String(l));else{const n=Oo.get(e);n?e.setAttribute("aria-expanded",n):e.removeAttribute("aria-expanded")}}var Db=globalThis.ShadowRoot||function(){};function pQ(){return typeof HTMLElement<"u"&&typeof HTMLElement.prototype=="object"&&"popover"in HTMLElement.prototype}function va(e,l,a){const n=e[l];Object.defineProperty(e,l,{value(i){return n.call(this,a(i))}})}var WQ=/(^|[^\\]):popover-open\b/g;function GQ(){return typeof globalThis.CSSLayerBlockRule=="function"}function NQ(){const e=GQ();return`
488
488
  ${e?"@layer popover-polyfill {":""}
489
489
  :where([popover]) {
490
490
  position: fixed;