@gemafajarramadhan/dynamic-ui 1.2.73 → 1.2.75
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/dynamic-ui.css +1 -1
- package/dist/dynamic-ui.es.js +4024 -3998
- package/dist/dynamic-ui.umd.js +20 -20
- package/package.json +1 -1
package/dist/dynamic-ui.umd.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
(function(de,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lucide-vue-next"),require("reka-ui"),require("@vueuse/core"),require("vue-i18n"),require("@vuepic/vue-datepicker"),require("@uppy/core"),require("@uppy/dashboard"),require("@uppy/image-editor"),require("vue-router"),require("vue3-lottie")):typeof define=="function"&&define.amd?define(["exports","vue","lucide-vue-next","reka-ui","@vueuse/core","vue-i18n","@vuepic/vue-datepicker","@uppy/core","@uppy/dashboard","@uppy/image-editor","vue-router","vue3-lottie"],t):(de=typeof globalThis<"u"?globalThis:de||self,t(de.DynamicUI={},de.Vue,de.LucideIcons,de.rekaUi,de.core,de.VueI18n,de.VueDatePicker,de.Uppy,de.UppyDashboard,de.UppyImageEditor,de.VueRouter,de.Vue3Lottie))})(this,(function(de,t,ne,_e,Xe,Et,Pu,Ou,zi,Lu,Eo,Ru){"use strict";var PN=Object.defineProperty;var ON=(de,t,ne)=>t in de?PN(de,t,{enumerable:!0,configurable:!0,writable:!0,value:ne}):de[t]=ne;var be=(de,t,ne)=>ON(de,typeof t!="symbol"?t+"":t,ne);var Sa;function Iu(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const Rt=Iu(ne);let Vt={};function $i(e){Vt={...Vt,...e}}function Fu(){return Vt}function zu(){return Vt.apiBaseUrl?Vt.apiBaseUrl:typeof window<"u"&&window.__MICRO_API_BASE_URL__?window.__MICRO_API_BASE_URL__:""}function $u(){const e={"Content-Type":"application/json",Accept:"application/json"};let o=null;if(Vt.getAuthToken?o=Vt.getAuthToken():typeof window<"u"&&window.__MICRO_AUTH_TOKEN__?o=window.__MICRO_AUTH_TOKEN__:typeof localStorage<"u"&&(o=localStorage.getItem("token")||sessionStorage.getItem("token")),o&&(e.Authorization=`Bearer ${o}`),Vt.getHeaders){const n=Vt.getHeaders();return{...e,...n}}return e}function ju(){Vt.onUnauthorized&&Vt.onUnauthorized()}async function Uu(e,o,n,r){const a=Fu();if(a.apiClient)return a.apiClient(e,o||"GET",n);if(!e||!e.trim())throw new Error("[DynamicUI][useApi] URL tidak boleh kosong. Pastikan prop `endpoint.apiUrl` sudah diisi dengan benar.");const s=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],i=(o||"").trim().toUpperCase(),l=s.includes(i)?i:"GET";s.includes(i)||console.warn(`[DynamicUI][useApi] HTTP method '${o}' tidak valid, fallback ke 'GET'.`);const c=zu(),d=e.startsWith("http")?e:`${c}${e}`,f={method:l,headers:{...$u(),...r||{}}};n&&!["GET","DELETE"].includes(l)&&(n instanceof FormData?(f.body=n,f.headers&&f.headers["Content-Type"]&&delete f.headers["Content-Type"],f.headers&&f.headers["content-type"]&&delete f.headers["content-type"]):f.body=JSON.stringify(n));let u=d;if(n&&l==="GET"){const p=new URLSearchParams;Object.entries(n).forEach(([b,g])=>{g!=null&&p.append(b,String(g))});const y=p.toString();y&&(u=`${d}${d.includes("?")?"&":"?"}${y}`)}const h=await fetch(u,f);if(h.status===401&&ju(),!h.ok){const p=await h.text();throw new Error(`HTTP ${h.status}: ${p}`)}return(h.headers.get("content-type")||"").includes("application/json")?h.json():{status:!0,data:await h.text()}}function Je(){const e=(o,n,r,a)=>{let s=o,i=n,l=r,c=a;return a&&typeof a=="object"?(a._url&&(s=a._url,i=a._method||i||"POST",a._data&&(l={...l||{},...a._data})),a.headers&&(c=a.headers)):o&&n&&(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].includes(n.toUpperCase())||(s=`${o.endsWith("/")?o.slice(0,-1):o}/${n}`,i="POST")),Uu(s,i,l,c)};return{apiUrl:e,DCodeApi:e}}const Go=Math.min,gt=Math.max,rr=Math.round,ar=Math.floor,It=e=>({x:e,y:e}),Wu={left:"right",right:"left",bottom:"top",top:"bottom"};function ji(e,o,n){return gt(e,Go(o,n))}function wn(e,o){return typeof e=="function"?e(o):e}function fo(e){return e.split("-")[0]}function Cn(e){return e.split("-")[1]}function Ui(e){return e==="x"?"y":"x"}function Wi(e){return e==="y"?"height":"width"}function Gt(e){const o=e[0];return o==="t"||o==="b"?"y":"x"}function Hi(e){return Ui(Gt(e))}function Hu(e,o,n){n===void 0&&(n=!1);const r=Cn(e),a=Hi(e),s=Wi(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=sr(i)),[i,sr(i)]}function qu(e){const o=sr(e);return[Ma(e),o,Ma(o)]}function Ma(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qi=["left","right"],Gi=["right","left"],Gu=["top","bottom"],Ku=["bottom","top"];function Xu(e,o,n){switch(e){case"top":case"bottom":return n?o?Gi:qi:o?qi:Gi;case"left":case"right":return o?Gu:Ku;default:return[]}}function Yu(e,o,n,r){const a=Cn(e);let s=Xu(fo(e),n==="start",r);return a&&(s=s.map(i=>i+"-"+a),o&&(s=s.concat(s.map(Ma)))),s}function sr(e){const o=fo(e);return Wu[o]+e.slice(o.length)}function Ju(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qu(e){return typeof e!="number"?Ju(e):{top:e,right:e,bottom:e,left:e}}function ir(e){const{x:o,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:o,right:o+r,bottom:n+a,x:o,y:n}}function Ki(e,o,n){let{reference:r,floating:a}=e;const s=Gt(o),i=Hi(o),l=Wi(i),c=fo(o),d=s==="y",f=r.x+r.width/2-a.width/2,u=r.y+r.height/2-a.height/2,h=r[l]/2-a[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-a.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-a.width,y:u};break;default:m={x:r.x,y:r.y}}switch(Cn(o)){case"start":m[i]-=h*(n&&d?-1:1);break;case"end":m[i]+=h*(n&&d?-1:1);break}return m}async function Zu(e,o){var n;o===void 0&&(o={});const{x:r,y:a,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=wn(o,e),p=Qu(m),b=l[h?u==="floating"?"reference":"floating":u],g=ir(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),_=u==="floating"?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),B=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},A=ir(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:E,strategy:c}):_);return{top:(g.top-A.top+p.top)/B.y,bottom:(A.bottom-g.bottom+p.bottom)/B.y,left:(g.left-A.left+p.left)/B.x,right:(A.right-g.right+p.right)/B.x}}const eh=50,th=async(e,o,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:Zu},c=await(i.isRTL==null?void 0:i.isRTL(o));let d=await i.getElementRects({reference:e,floating:o,strategy:a}),{x:f,y:u}=Ki(d,r,c),h=r,m=0;const p={};for(let y=0;y<s.length;y++){const b=s[y];if(!b)continue;const{name:g,fn:_}=b,{x:E,y:B,data:A,reset:C}=await _({x:f,y:u,initialPlacement:r,placement:h,strategy:a,middlewareData:p,rects:d,platform:l,elements:{reference:e,floating:o}});f=E??f,u=B??u,p[g]={...p[g],...A},C&&m<eh&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:e,floating:o,strategy:a}):C.rects),{x:f,y:u}=Ki(d,h,c)),y=-1)}return{x:f,y:u,placement:h,strategy:a,middlewareData:p}},oh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var n,r;const{placement:a,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:d}=o,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...b}=wn(e,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=fo(a),_=Gt(l),E=fo(l)===l,B=await(c.isRTL==null?void 0:c.isRTL(d.floating)),A=h||(E||!y?[sr(l)]:qu(l)),C=p!=="none";!h&&C&&A.push(...Yu(l,y,p,B));const x=[l,...A],w=await c.detectOverflow(o,b),D=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&D.push(w[g]),u){const V=Hu(a,i,B);D.push(w[V[0]],w[V[1]])}if(k=[...k,{placement:a,overflows:D}],!D.every(V=>V<=0)){var v,S;const V=(((v=s.flip)==null?void 0:v.index)||0)+1,L=x[V];if(L&&(!(u==="alignment"?_!==Gt(L):!1)||k.every(R=>Gt(R.placement)===_?R.overflows[0]>0:!0)))return{data:{index:V,overflows:k},reset:{placement:L}};let O=(S=k.filter(P=>P.overflows[0]<=0).sort((P,R)=>P.overflows[1]-R.overflows[1])[0])==null?void 0:S.placement;if(!O)switch(m){case"bestFit":{var N;const P=(N=k.filter(R=>{if(C){const j=Gt(R.placement);return j===_||j==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(j=>j>0).reduce((j,T)=>j+T,0)]).sort((R,j)=>R[1]-j[1])[0])==null?void 0:N[0];P&&(O=P);break}case"initialPlacement":O=l;break}if(a!==O)return{reset:{placement:O}}}return{}}}},nh=new Set(["left","top"]);async function rh(e,o){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=fo(n),l=Cn(n),c=Gt(n)==="y",d=nh.has(i)?-1:1,f=s&&c?-1:1,u=wn(o,e);let{mainAxis:h,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof p=="number"&&(m=l==="end"?p*-1:p),c?{x:m*f,y:h*d}:{x:h*d,y:m*f}}const ah=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var n,r;const{x:a,y:s,placement:i,middlewareData:l}=o,c=await rh(o,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:s+c.y,data:{...c,placement:i}}}}},sh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:n,y:r,placement:a,platform:s}=o,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:g=>{let{x:_,y:E}=g;return{x:_,y:E}}},...d}=wn(e,o),f={x:n,y:r},u=await s.detectOverflow(o,d),h=Gt(fo(a)),m=Ui(h);let p=f[m],y=f[h];if(i){const g=m==="y"?"top":"left",_=m==="y"?"bottom":"right",E=p+u[g],B=p-u[_];p=ji(E,p,B)}if(l){const g=h==="y"?"top":"left",_=h==="y"?"bottom":"right",E=y+u[g],B=y-u[_];y=ji(E,y,B)}const b=c.fn({...o,[m]:p,[h]:y});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:i,[h]:l}}}}}},ih=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(o){var n,r;const{placement:a,rects:s,platform:i,elements:l}=o,{apply:c=()=>{},...d}=wn(e,o),f=await i.detectOverflow(o,d),u=fo(a),h=Cn(a),m=Gt(a)==="y",{width:p,height:y}=s.floating;let b,g;u==="top"||u==="bottom"?(b=u,g=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,b=h==="end"?"top":"bottom");const _=y-f.top-f.bottom,E=p-f.left-f.right,B=Go(y-f[b],_),A=Go(p-f[g],E),C=!o.middlewareData.shift;let x=B,w=A;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(w=E),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(x=_),C&&!h){const k=gt(f.left,0),v=gt(f.right,0),S=gt(f.top,0),N=gt(f.bottom,0);m?w=p-2*(k!==0||v!==0?k+v:gt(f.left,f.right)):x=y-2*(S!==0||N!==0?S+N:gt(f.top,f.bottom))}await c({...o,availableWidth:w,availableHeight:x});const D=await i.getDimensions(l.floating);return p!==D.width||y!==D.height?{reset:{rects:!0}}:{}}}};function lr(){return typeof window<"u"}function Bo(e){return Ta(e)?(e.nodeName||"").toLowerCase():"#document"}function bt(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function Ft(e){var o;return(o=(Ta(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function Ta(e){return lr()?e instanceof Node||e instanceof bt(e).Node:!1}function Mt(e){return lr()?e instanceof Element||e instanceof bt(e).Element:!1}function Kt(e){return lr()?e instanceof HTMLElement||e instanceof bt(e).HTMLElement:!1}function Xi(e){return!lr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bt(e).ShadowRoot}function _n(e){const{overflow:o,overflowX:n,overflowY:r,display:a}=Tt(e);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&a!=="inline"&&a!=="contents"}function lh(e){return/^(table|td|th)$/.test(Bo(e))}function cr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ch=/transform|translate|scale|rotate|perspective|filter/,dh=/paint|layout|strict|content/,So=e=>!!e&&e!=="none";let Pa;function Oa(e){const o=Mt(e)?Tt(e):e;return So(o.transform)||So(o.translate)||So(o.scale)||So(o.rotate)||So(o.perspective)||!La()&&(So(o.backdropFilter)||So(o.filter))||ch.test(o.willChange||"")||dh.test(o.contain||"")}function fh(e){let o=uo(e);for(;Kt(o)&&!Ko(o);){if(Oa(o))return o;if(cr(o))return null;o=uo(o)}return null}function La(){return Pa==null&&(Pa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pa}function Ko(e){return/^(html|body|#document)$/.test(Bo(e))}function Tt(e){return bt(e).getComputedStyle(e)}function dr(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uo(e){if(Bo(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Xi(e)&&e.host||Ft(e);return Xi(o)?o.host:o}function Yi(e){const o=uo(e);return Ko(o)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(o)&&_n(o)?o:Yi(o)}function En(e,o,n){var r;o===void 0&&(o=[]),n===void 0&&(n=!0);const a=Yi(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),i=bt(a);if(s){const l=Ra(i);return o.concat(i,i.visualViewport||[],_n(a)?a:[],l&&n?En(l):[])}else return o.concat(a,En(a,[],n))}function Ra(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ji(e){const o=Tt(e);let n=parseFloat(o.width)||0,r=parseFloat(o.height)||0;const a=Kt(e),s=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=rr(n)!==s||rr(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Ia(e){return Mt(e)?e:e.contextElement}function Xo(e){const o=Ia(e);if(!Kt(o))return It(1);const n=o.getBoundingClientRect(),{width:r,height:a,$:s}=Ji(o);let i=(s?rr(n.width):n.width)/r,l=(s?rr(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const uh=It(0);function Qi(e){const o=bt(e);return!La()||!o.visualViewport?uh:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function hh(e,o,n){return o===void 0&&(o=!1),!n||o&&n!==bt(e)?!1:o}function Ao(e,o,n,r){o===void 0&&(o=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=Ia(e);let i=It(1);o&&(r?Mt(r)&&(i=Xo(r)):i=Xo(e));const l=hh(s,n,r)?Qi(s):It(0);let c=(a.left+l.x)/i.x,d=(a.top+l.y)/i.y,f=a.width/i.x,u=a.height/i.y;if(s){const h=bt(s),m=r&&Mt(r)?bt(r):r;let p=h,y=Ra(p);for(;y&&r&&m!==p;){const b=Xo(y),g=y.getBoundingClientRect(),_=Tt(y),E=g.left+(y.clientLeft+parseFloat(_.paddingLeft))*b.x,B=g.top+(y.clientTop+parseFloat(_.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,u*=b.y,c+=E,d+=B,p=bt(y),y=Ra(p)}}return ir({width:f,height:u,x:c,y:d})}function fr(e,o){const n=dr(e).scrollLeft;return o?o.left+n:Ao(Ft(e)).left+n}function Zi(e,o){const n=e.getBoundingClientRect(),r=n.left+o.scrollLeft-fr(e,n),a=n.top+o.scrollTop;return{x:r,y:a}}function mh(e){let{elements:o,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",i=Ft(r),l=o?cr(o.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},d=It(1);const f=It(0),u=Kt(r);if((u||!u&&!s)&&((Bo(r)!=="body"||_n(i))&&(c=dr(r)),u)){const m=Ao(r);d=Xo(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=i&&!u&&!s?Zi(i,c):It(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function ph(e){return Array.from(e.getClientRects())}function gh(e){const o=Ft(e),n=dr(e),r=e.ownerDocument.body,a=gt(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),s=gt(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fr(e);const l=-n.scrollTop;return Tt(r).direction==="rtl"&&(i+=gt(o.clientWidth,r.clientWidth)-a),{width:a,height:s,x:i,y:l}}const el=25;function bh(e,o){const n=bt(e),r=Ft(e),a=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){s=a.width,i=a.height;const f=La();(!f||f&&o==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const d=fr(r);if(d<=0){const f=r.ownerDocument,u=f.body,h=getComputedStyle(u),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-u.clientWidth-m);p<=el&&(s-=p)}else d<=el&&(s+=d);return{width:s,height:i,x:l,y:c}}function yh(e,o){const n=Ao(e,!0,o==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=Kt(e)?Xo(e):It(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=a*s.x,d=r*s.y;return{width:i,height:l,x:c,y:d}}function tl(e,o,n){let r;if(o==="viewport")r=bh(e,n);else if(o==="document")r=gh(Ft(e));else if(Mt(o))r=yh(o,n);else{const a=Qi(e);r={x:o.x-a.x,y:o.y-a.y,width:o.width,height:o.height}}return ir(r)}function ol(e,o){const n=uo(e);return n===o||!Mt(n)||Ko(n)?!1:Tt(n).position==="fixed"||ol(n,o)}function xh(e,o){const n=o.get(e);if(n)return n;let r=En(e,[],!1).filter(l=>Mt(l)&&Bo(l)!=="body"),a=null;const s=Tt(e).position==="fixed";let i=s?uo(e):e;for(;Mt(i)&&!Ko(i);){const l=Tt(i),c=Oa(i);!c&&l.position==="fixed"&&(a=null),(s?!c&&!a:!c&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||_n(i)&&!c&&ol(e,i))?r=r.filter(f=>f!==i):a=l,i=uo(i)}return o.set(e,r),r}function kh(e){let{element:o,boundary:n,rootBoundary:r,strategy:a}=e;const i=[...n==="clippingAncestors"?cr(o)?[]:xh(o,this._c):[].concat(n),r],l=tl(o,i[0],a);let c=l.top,d=l.right,f=l.bottom,u=l.left;for(let h=1;h<i.length;h++){const m=tl(o,i[h],a);c=gt(m.top,c),d=Go(m.right,d),f=Go(m.bottom,f),u=gt(m.left,u)}return{width:d-u,height:f-c,x:u,y:c}}function wh(e){const{width:o,height:n}=Ji(e);return{width:o,height:n}}function Ch(e,o,n){const r=Kt(o),a=Ft(o),s=n==="fixed",i=Ao(e,!0,s,o);let l={scrollLeft:0,scrollTop:0};const c=It(0);function d(){c.x=fr(a)}if(r||!r&&!s)if((Bo(o)!=="body"||_n(a))&&(l=dr(o)),r){const m=Ao(o,!0,s,o);c.x=m.x+o.clientLeft,c.y=m.y+o.clientTop}else a&&d();s&&!r&&a&&d();const f=a&&!r&&!s?Zi(a,l):It(0),u=i.left+l.scrollLeft-c.x-f.x,h=i.top+l.scrollTop-c.y-f.y;return{x:u,y:h,width:i.width,height:i.height}}function Fa(e){return Tt(e).position==="static"}function nl(e,o){if(!Kt(e)||Tt(e).position==="fixed")return null;if(o)return o(e);let n=e.offsetParent;return Ft(e)===n&&(n=n.ownerDocument.body),n}function rl(e,o){const n=bt(e);if(cr(e))return n;if(!Kt(e)){let a=uo(e);for(;a&&!Ko(a);){if(Mt(a)&&!Fa(a))return a;a=uo(a)}return n}let r=nl(e,o);for(;r&&lh(r)&&Fa(r);)r=nl(r,o);return r&&Ko(r)&&Fa(r)&&!Oa(r)?n:r||fh(e)||n}const _h=async function(e){const o=this.getOffsetParent||rl,n=this.getDimensions,r=await n(e.floating);return{reference:Ch(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Eh(e){return Tt(e).direction==="rtl"}const Bh={convertOffsetParentRelativeRectToViewportRelativeRect:mh,getDocumentElement:Ft,getClippingRect:kh,getOffsetParent:rl,getElementRects:_h,getClientRects:ph,getDimensions:wh,getScale:Xo,isElement:Mt,isRTL:Eh};function al(e,o){return e.x===o.x&&e.y===o.y&&e.width===o.width&&e.height===o.height}function Sh(e,o){let n=null,r;const a=Ft(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:f,top:u,width:h,height:m}=d;if(l||o(),!h||!m)return;const p=ar(u),y=ar(a.clientWidth-(f+h)),b=ar(a.clientHeight-(u+m)),g=ar(f),E={rootMargin:-p+"px "+-y+"px "+-b+"px "+-g+"px",threshold:gt(0,Go(1,c))||1};let B=!0;function A(C){const x=C[0].intersectionRatio;if(x!==c){if(!B)return i();x?i(!1,x):r=setTimeout(()=>{i(!1,1e-7)},1e3)}x===1&&!al(d,e.getBoundingClientRect())&&i(),B=!1}try{n=new IntersectionObserver(A,{...E,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,E)}n.observe(e)}return i(!0),s}function za(e,o,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Ia(e),f=a||s?[...d?En(d):[],...o?En(o):[]]:[];f.forEach(g=>{a&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=d&&l?Sh(d,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(g=>{let[_]=g;_&&_.target===d&&m&&o&&(m.unobserve(o),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(o)})),n()}),d&&!c&&m.observe(d),o&&m.observe(o));let p,y=c?Ao(e):null;c&&b();function b(){const g=Ao(e);y&&!al(y,g)&&n(),y=g,p=requestAnimationFrame(b)}return n(),()=>{var g;f.forEach(_=>{a&&_.removeEventListener("scroll",n),s&&_.removeEventListener("resize",n)}),u==null||u(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const $a=ah,ja=sh,Ua=oh,Wa=ih,Ah=(e,o,n)=>{const r=new Map,a={platform:Bh,...n},s={...a.platform,_c:r};return th(e,o,{...a,platform:s})};function vh(e){return e!=null&&typeof e=="object"&&"$el"in e}function sl(e){if(vh(e)){const o=e.$el;return Ta(o)&&Bo(o)==="#comment"?null:o}return e}function Bn(e){return typeof e=="function"?e():t.unref(e)}function il(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ll(e,o){const n=il(e);return Math.round(o*n)/n}function Ha(e,o,n){n===void 0&&(n={});const r=n.whileElementsMounted,a=t.computed(()=>{var x;return(x=Bn(n.open))!=null?x:!0}),s=t.computed(()=>Bn(n.middleware)),i=t.computed(()=>{var x;return(x=Bn(n.placement))!=null?x:"bottom"}),l=t.computed(()=>{var x;return(x=Bn(n.strategy))!=null?x:"absolute"}),c=t.computed(()=>{var x;return(x=Bn(n.transform))!=null?x:!0}),d=t.computed(()=>sl(e.value)),f=t.computed(()=>sl(o.value)),u=t.ref(0),h=t.ref(0),m=t.ref(l.value),p=t.ref(i.value),y=t.shallowRef({}),b=t.ref(!1),g=t.computed(()=>{const x={position:m.value,left:"0",top:"0"};if(!f.value)return x;const w=ll(f.value,u.value),D=ll(f.value,h.value);return c.value?{...x,transform:"translate("+w+"px, "+D+"px)",...il(f.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:w+"px",top:D+"px"}});let _;function E(){if(d.value==null||f.value==null)return;const x=a.value;Ah(d.value,f.value,{middleware:s.value,placement:i.value,strategy:l.value}).then(w=>{u.value=w.x,h.value=w.y,m.value=w.strategy,p.value=w.placement,y.value=w.middlewareData,b.value=x!==!1})}function B(){typeof _=="function"&&(_(),_=void 0)}function A(){if(B(),r===void 0){E();return}if(d.value!=null&&f.value!=null){_=r(d.value,f.value,E);return}}function C(){a.value||(b.value=!1)}return t.watch([s,i,l,a],E,{flush:"sync"}),t.watch([d,f],A,{flush:"sync"}),t.watch(a,C,{flush:"sync"}),t.getCurrentScope()&&t.onScopeDispose(B),{x:t.shallowReadonly(u),y:t.shallowReadonly(h),strategy:t.shallowReadonly(m),placement:t.shallowReadonly(p),middlewareData:t.shallowReadonly(y),isPositioned:t.shallowReadonly(b),floatingStyles:g,update:E}}const Dh=["aria-busy"],Nh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Vh=["for"],Mh={key:0,class:"ml-1 text-destructive"},Th={class:"relative"},Ph={key:0,class:"flex items-center text-gray-500 gap-2"},Oh=["id","placeholder","disabled","readonly","value"],Lh={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},Rh=["disabled"],Ih={class:"overflow-y-auto overflow-x-hidden",style:{"max-height":"350px"}},Fh=["onMouseenter","onClick"],zh={key:0},$h={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},jh={key:0},Uh={key:1},Wh={key:2},Hh={key:1,class:"mt-1 text-xs text-red-600"},ur=t.defineComponent({name:"DCodeAutoComplete",inheritAttrs:!1,__name:"DCodeAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{default:()=>({})},fetchItems:{},icon:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.computed(()=>a.label??void 0),i=q=>{const ie=a[q];return ie===""||ie===!0||ie==="true"||ie===1||ie==="1"},l=t.ref(!1),c=t.computed(()=>n.itemTitle||a["item-title"]||a.itemTitle||"name"),d=t.computed(()=>n.itemValue||a["item-value"]||a.itemValue||"id"),f=t.computed(()=>n.disabled),u=t.computed(()=>i("required")),h=t.computed(()=>n.readonly||i("readonly")),m=t.computed(()=>n.returnObject||i("return-object")||i("returnObject")),p=t.computed(()=>u.value||i("aria-required")),y=t.computed(()=>n.error||n.errorMessage||a["error-message"]),b=t.computed(()=>a.placeholder??""),g=t.computed(()=>{const q=a.minChars??a["min-chars"];if(q==null||q==="")return 0;const ie=typeof q=="number"?q:Number.parseInt(String(q),10);return Number.isFinite(ie)&&ie>0?ie:0}),_=t.computed(()=>{const q=a.rules;return Array.isArray(q)?q:[]}),E=t.computed(()=>{const q=a.id||a.label;return q?`app-autocomplete-${q}-${Math.random().toString(36).slice(2,7)}`:void 0}),B=t.ref(n.modelValue),A=t.ref([]),C=t.ref(!1),x=t.ref(!1),w=t.computed(()=>a.items),D=t.computed(()=>{const q=V.value;return q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems?A.value:w.value??[]}),k=t.computed(()=>!!a.loading),v=t.computed(()=>k.value||C.value),S=t.computed(()=>{const{label:q,items:ie,loading:he,rules:te,"item-title":le,"item-value":G,itemTitle:ee,itemValue:re,minChars:Ce,"min-chars":Ge,clearable:wt,required:rt,"aria-required":or,disabled:qo,readonly:nt,visible:mu,"return-object":Ni,returnObject:pu,class:Vi,"fetch-items":gu,fetchItems:Aa,error:Mi,errorMessage:bu,"error-message":yu,...Ti}=a||{};return Ti}),N=()=>{if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions},V=t.computed(()=>{const q=n.endpoint||{};return{apiModule:n.apiModule||q.apiModule,apiAction:n.apiAction||q.apiAction,apiUrl:q.apiUrl,apiMethod:q.apiMethod||"GET"}}),L=t.ref(null),O=t.ref(null),P=t.ref(null),{floatingStyles:R}=Ha(O,P,{placement:"bottom-start",whileElementsMounted:za,middleware:[$a(4),Ua(),ja(),Wa({apply({rects:q,elements:ie,availableHeight:he}){Object.assign(ie.floating.style,{width:`${q.reference.width}px`,maxHeight:`${he}px`})}})]}),j=t.ref(!1),T=t.ref(""),F=t.ref(-1),X=t.ref(null),H=t.computed(()=>!g.value||(T.value||"").trim().length>=g.value?"":`Ketik minimal ${g.value} karakter`),W=q=>{if(q==null)return"";if(typeof q=="string"||typeof q=="number")return String(q);const ie=c.value;return typeof ie=="function"?ie(q):(q==null?void 0:q[ie])??(q==null?void 0:q.name)??(q==null?void 0:q.nama)??(q==null?void 0:q.label)??(q==null?void 0:q.title)??"-"},Z=q=>{if(q==null)return null;if(typeof q=="string"||typeof q=="number")return q;const ie=d.value;return typeof ie=="function"?ie(q):(q==null?void 0:q[ie])??(q==null?void 0:q.id)??(q==null?void 0:q.value)??(q==null?void 0:q.code)??null},oe=t.computed(()=>{const q=B.value;if(q==null||q==="")return"";if(Array.isArray(q))return q.length?q.map(te=>{if(m.value&&typeof te=="object"||typeof te=="object")return W(te);const le=D.value.find(G=>Z(G)==te);return le?W(le):String(te)}).join(", "):"";if(typeof q=="object")return W(q);const ie=D.value.find(he=>Z(he)==q);return ie?W(ie):String(q)}),ye=t.computed(()=>{const q=D.value||[],ie=(T.value||"").trim().toLowerCase(),he=(oe.value||"").toLowerCase(),te=!ie||ie===he;let le=q;if(te||(le=q.filter(G=>W(G).toLowerCase().includes(ie))),le.length>0){const G=ee=>{const re=Z(ee);return Array.isArray(B.value)?B.value.some(Ce=>Ce==re):B.value==re};le=[...le].sort((ee,re)=>{const Ce=G(ee),Ge=G(re);return Ce&&!Ge?-1:!Ce&&Ge?1:0})}return le}),Ne=q=>Array.isArray(q)?q.length===0:q==null||q==="",we=q=>{if(X.value=null,u.value&&Ne(q)&&!_.value.length)return X.value="This field is required",!1;for(const ie of _.value){const he=ie(q);if(he===!1)return X.value="Invalid value",!1;if(typeof he=="string")return X.value=he,!1}return!0},Q=async()=>{if(f.value||h.value)return;j.value=!0,F.value=ye.value.length?0:-1,T.value=oe.value||"";const q=V.value,ie=q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems;n.autoFetchOnOpen&&ie&&!x.value&&(await We(),F.value=ye.value.length?0:-1)},$=()=>{j.value=!1,F.value=-1,T.value=oe.value||""},Y=q=>{const ie=m.value?q:Z(q);let he=ie;Array.isArray(B.value)&&(he=[ie]),B.value=he,r("update:modelValue",he),X.value=null,we(he),T.value=W(q),$()},ae=()=>{A.value=[],x.value=!1,B.value=Array.isArray(B.value)?[]:null,r("update:modelValue",B.value),T.value="",X.value=null},xe=()=>{l.value=!0,ae(),$(),setTimeout(()=>{l.value=!1},0)},Oe=q=>{if(f.value||h.value)return;const ie=q.target.value;T.value=ie,X.value&&(X.value=null),j.value||(j.value=!0),F.value=ye.value.length?0:-1;const he=V.value.apiModule&&V.value.apiAction||V.value.apiUrl||n.fetchItems;n.autoFetchOnOpen&&he&&!v.value&&!x.value&&We()},Ee=q=>{var he;if(f.value||h.value)return;const ie={ArrowDown:()=>{if(q.preventDefault(),!j.value){Q();return}ye.value.length&&(F.value=Math.min(F.value+1,ye.value.length-1))},ArrowUp:()=>{!j.value||!ye.value.length||(q.preventDefault(),F.value=Math.max(F.value-1,0))},Enter:()=>{if(!j.value)return;q.preventDefault();const te=ye.value[F.value];te&&Y(te)},Escape:()=>{q.preventDefault(),$()},Tab:()=>{$()}};(he=ie[q.key])==null||he.call(ie)},We=async()=>{const q=V.value;if(q.apiModule&&q.apiAction||q.apiUrl||n.fetchItems){C.value=!0;try{let he;if(n.fetchItems){const te=N()||{},le={page:1,perPage:100,search:(T.value||"").trim(),...te,...n.apiParams},G=await n.fetchItems(le),ee=(G==null?void 0:G.data)??G;he=(ee==null?void 0:ee.data)??ee}else{const le=Je().DCodeApi;if(typeof le!="function"){console.error("[DCodeAutoComplete] useApi() must expose DCodeApi()");return}const ee={page:1,perPage:100,...N()||{},...n.apiParams};let re;q.apiUrl?re=await le("","",ee,{_url:q.apiUrl,_method:q.apiMethod||"POST"}):re=await le(q.apiModule,q.apiAction,ee);const Ce=(re==null?void 0:re.data)??re;he=(Ce==null?void 0:Ce.data)??Ce}A.value=Array.isArray(he)?he:[],x.value=!0}catch(he){console.error("[DCodeAutoComplete][fetchOptions] ERROR:",he),X.value=`[DCodeAutoComplete][fetchOptions] ERROR: Error: ${(he==null?void 0:he.message)||(he==null?void 0:he.toString())||"Failed to load options"}`,A.value=[],x.value=!0}finally{C.value=!1}}},Fe=q=>{const ie=Z(q);return m.value?B.value?Array.isArray(B.value)?B.value.some(he=>Z(he)==ie):Z(B.value)==ie:!1:Array.isArray(B.value)?B.value.some(he=>he==ie):B.value==ie};t.watch(()=>[N(),V.value,n.apiParams],([q,ie,he],[te,le,G])=>{const ee=V.value;if(!(ee.apiModule&&ee.apiAction||ee.apiUrl||n.fetchItems)){ae();return}const Ce=JSON.stringify(q??null)===JSON.stringify(te??null),Ge=JSON.stringify(he??null)===JSON.stringify(G??null);Ce&&Ge||(ae(),Ge||We())},{deep:!0}),t.watch(()=>n.modelValue,(q,ie)=>{B.value=q,!l.value&&(q==null||q==="")&&ie!=null&&n.apiModule&&n.apiAction&&(A.value=[],x.value=!1),T.value=oe.value||""},{immediate:!0});const se=V.value;(se.apiModule&&se.apiAction||se.apiUrl||n.fetchItems)&&(n.autoFetchOnMount||!Ne(n.modelValue))&&We();const Re=q=>{const ie=L.value,he=P.value,te=q.target;ie&&ie.contains(te)||he&&he.contains(te)||j.value&&$()},ve=t.computed(()=>{const q=n.modelValue;return q==null?!1:typeof q=="string"?q.trim().length>0:Array.isArray(q)?q.length>0:typeof q=="object"?Object.keys(q).length>0:!0}),ct=t.computed(()=>!!n.clearable&&ve.value&&!n.disabled);return t.onMounted(()=>{document.addEventListener("mousedown",Re)}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Re)}),(q,ie)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:L,class:t.normalizeClass(["w-full",[t.unref(a).class,f.value?"cursor-not-allowed":""]]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",Nh)):t.createCommentVNode("",!0),ie[6]||(ie[6]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:E.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),p.value?(t.openBlock(),t.createElementBlock("span",Mh,"*")):t.createCommentVNode("",!0)],8,Vh)):t.createCommentVNode("",!0),t.createElementVNode("div",Th,[t.createElementVNode("div",{ref_key:"reference",ref:O,class:t.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[f.value||h.value?"opacity-60 cursor-not-allowed":"",X.value||y.value?"border-red-500 focus-within:ring-red-500":""]])},[n.icon||q.$slots["prepend-inner"]?(t.openBlock(),t.createElementBlock("div",Ph,[t.renderSlot(q.$slots,"prepend-inner",{},()=>[n.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps(S.value,{id:E.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",f.value||h.value?"cursor-not-allowed":"cursor-text"],placeholder:b.value,disabled:f.value,readonly:h.value,value:j.value?T.value:oe.value||T.value,onFocus:ie[0]||(ie[0]=()=>{j.value||Q()}),onClick:ie[1]||(ie[1]=()=>{j.value||Q()}),onInput:Oe,onKeydown:Ee,onBlur:ie[2]||(ie[2]=()=>we(B.value))}),null,16,Oh),v.value?(t.openBlock(),t.createElementBlock("svg",Lh,[...ie[7]||(ie[7]=[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):ct.value?(t.openBlock(),t.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:ie[3]||(ie[3]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(xe,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(t.openBlock(),t.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:f.value||h.value,onClick:ie[4]||(ie[4]=he=>j.value?$():Q()),"aria-label":"Toggle"},[t.createVNode(t.unref(ne.ChevronDown),{class:t.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":j.value}])},null,8,["class"])],8,Rh))],2),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[j.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floating",ref:P,style:t.normalizeStyle(t.unref(R)),class:"z-[50] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[t.createElementVNode("div",Ih,[ye.value.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(ye.value,(he,te)=>(t.openBlock(),t.createElementBlock("button",{key:Z(he)??te,type:"button",class:t.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",te===F.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:le=>F.value=te,onMousedown:ie[5]||(ie[5]=t.withModifiers(()=>{},["prevent"])),onClick:le=>Y(he)},[t.createTextVNode(t.toDisplayString(W(he))+" ",1),Fe(he)?(t.openBlock(),t.createElementBlock("span",zh," ✓ ")):t.createCommentVNode("",!0)],42,Fh))),128)):t.renderSlot(q.$slots,"no-data",{key:1},()=>[t.createElementVNode("div",$h,[v.value?(t.openBlock(),t.createElementBlock("span",jh,"Loading data…")):H.value?(t.openBlock(),t.createElementBlock("span",Uh,t.toDisplayString(H.value),1)):(t.openBlock(),t.createElementBlock("span",Wh,"No data available"))])])])],4)):t.createCommentVNode("",!0)]))]),X.value||y.value?(t.openBlock(),t.createElementBlock("p",Hh,t.toDisplayString(X.value||y.value),1)):t.createCommentVNode("",!0)],64))],10,Dh)),[[t.vShow,e.visible]])}}),qh=["aria-busy"],Gh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Kh=["for"],Xh={key:0,class:"ml-1 text-destructive"},Yh={class:"relative"},Jh={key:0,class:"flex items-center text-gray-500 gap-2"},Qh=["id","placeholder","disabled","value"],Zh={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},em=["disabled"],tm={key:0,class:"p-3 space-y-2"},om=["onMouseenter","onClick"],nm={class:"flex items-center space-x-3"},rm={class:"flex-1"},am={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},sm={key:0,class:"text-xs text-gray-500 dark:text-gray-400"},im={key:0},lm={key:2,class:"p-3 text-center"},cm={class:"inline-flex items-center space-x-2"},dm={class:"text-sm text-gray-500"},fm={key:3,class:"p-3 text-center"},um={class:"text-xs text-gray-400"},hm={key:4,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},mm={key:1,class:"mt-1 text-xs text-red-600"},pm={key:2,class:"mt-1 text-xs text-gray-500"},cl=t.defineComponent({name:"DCodeInfiniteAutoComplete",inheritAttrs:!1,__name:"DCodeInfiniteAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},refreshOnOpen:{type:Boolean,default:!1},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},itemSubtitle:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{},fetchItems:{},icon:{},label:{},placeholder:{default:"Select an option"},required:{type:Boolean,default:!1},inputType:{default:"text"},helperText:{default:""},noResultsText:{default:"No results found"},loadingText:{default:"Loading more..."},endOfResultsText:{default:"End of results"},pageSize:{default:10},threshold:{default:100},debounceMs:{default:300}},emits:["update:modelValue","focus","blur","select","search","load-more","end-of-results","error"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.ref(),i=t.ref(),l=t.ref(),c=t.ref(),d=t.ref(),f=t.computed(()=>{const F=n.label||n.placeholder;return F?`app-infinite-autocomplete-${F}-${Math.random().toString(36).slice(2,7)}`:void 0}),u=t.ref(""),h=t.ref([]),m=t.ref(!1),p=t.ref(!1),y=t.ref(-1),b=t.ref(1),g=t.ref(!0),_=t.ref(0),E=t.ref(),{floatingStyles:B}=Ha(c,d,{placement:"bottom-start",whileElementsMounted:za,middleware:[$a(4),Ua(),ja(),Wa({apply({rects:F,elements:X}){Object.assign(X.floating.style,{width:`${F.reference.width}px`})}})]});t.computed(()=>({"opacity-50 pointer-events-none":n.disabled,relative:!0}));const A=t.computed(()=>u.value?h.value.filter(F=>D(F).toLowerCase().includes(u.value.toLowerCase())):h.value),C=t.computed(()=>{if(p.value&&u.value)return u.value;if(n.modelValue){if(n.returnObject)return D(n.modelValue);{const F=h.value.find(X=>k(X)===n.modelValue);return F?D(F):String(n.modelValue)}}return""}),x=()=>{p.value=!0},w=()=>{p.value=!1},D=F=>typeof n.itemTitle=="function"?n.itemTitle(F):F[n.itemTitle]||"",k=F=>typeof n.itemValue=="function"?n.itemValue(F):F[n.itemValue]||F,v=F=>n.itemSubtitle?typeof n.itemSubtitle=="function"?n.itemSubtitle(F):F[n.itemSubtitle]||"":"",S=F=>n.modelValue?n.returnObject?k(F)===k(n.modelValue):k(F)===n.modelValue:!1,N=F=>{var H;const X=n.returnObject?F:k(F);r("update:modelValue",X),r("select",F),p.value=!1,u.value="",(H=s.value)==null||H.blur()},V=()=>{var F;r("update:modelValue",null),u.value="",(F=s.value)==null||F.focus()},L=F=>{p.value=!0,r("focus",F),n.autoFetchOnOpen&&!m.value&&(n.refreshOnOpen||h.value.length===0)&&T(!0)},O=F=>{setTimeout(()=>{p.value=!1,r("blur",F)},200)},P=F=>{const X=F.target;u.value=X.value,E.value&&clearTimeout(E.value),E.value=setTimeout(()=>{r("search",u.value),b.value=1,g.value=!0,T(!0)},n.debounceMs)},R=F=>{if(p.value)switch(F.key){case"ArrowDown":F.preventDefault(),y.value=Math.min(y.value+1,A.value.length-1);break;case"ArrowUp":F.preventDefault(),y.value=Math.max(y.value-1,0);break;case"Enter":F.preventDefault(),y.value>=0&&A.value[y.value]&&N(A.value[y.value]);break;case"Escape":p.value=!1;break}},j=F=>{if(!g.value||m.value)return;const X=F.target,{scrollTop:H,scrollHeight:W,clientHeight:Z}=X;H+Z>=W-n.threshold&&T()},T=async(F=!1)=>{var X,H;if(!m.value){m.value=!0;try{let W=[];if(n.fetchItems)W=await n.fetchItems();else{const Z=Je(),oe=((X=n.endpoint)==null?void 0:X.apiModule)||n.apiModule,ye=((H=n.endpoint)==null?void 0:H.apiAction)||n.apiAction;if(!oe||!ye)throw new Error("API module and action are required");const Ne={page:F?1:b.value,pageSize:n.pageSize,search:u.value,...n.apiParams},we=await Z.apiUrl(`/${oe}/${ye}`,"GET",Ne);W=we.data||we.items||we||[],_.value=we.total||we.totalItems||W.length}F?(h.value=W,b.value=1):(h.value.push(...W),b.value++),g.value=W.length>=n.pageSize,g.value||r("end-of-results"),r("load-more",{items:W,page:b.value,hasMore:g.value,total:_.value})}catch(W){console.error("Error fetching items:",W),r("error",W)}finally{m.value=!1}}};return t.onMounted(()=>{n.autoFetchOnMount&&T()}),t.onUnmounted(()=>{E.value&&clearTimeout(E.value)}),t.watch(()=>n.modelValue,F=>{F||(u.value="")}),(F,X)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:l,class:t.normalizeClass(["w-full",t.unref(a).class]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",Gh)):t.createCommentVNode("",!0),X[3]||(X[3]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:f.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Xh,"*")):t.createCommentVNode("",!0)],8,Kh)):t.createCommentVNode("",!0),t.createElementVNode("div",Yh,[t.createElementVNode("div",{ref_key:"reference",ref:c,class:t.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[e.disabled?"opacity-60 cursor-not-allowed":"",e.error?"border-red-500 focus-within:ring-red-500":""]])},[n.icon?(t.openBlock(),t.createElementBlock("div",Jh,[n.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({ref_key:"inputRef",ref:s},F.$attrs,{id:f.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",e.disabled?"cursor-not-allowed":"cursor-text"],placeholder:e.placeholder,disabled:e.disabled,value:C.value,onFocus:L,onBlur:O,onInput:P,onKeydown:R}),null,16,Qh),m.value?(t.openBlock(),t.createElementBlock("svg",Zh,[...X[4]||(X[4]=[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):e.clearable&&e.modelValue?(t.openBlock(),t.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:X[0]||(X[0]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(V,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(t.openBlock(),t.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:e.disabled,onClick:X[1]||(X[1]=H=>p.value?w():x()),"aria-label":"Toggle"},[t.createVNode(t.unref(ne.ChevronDown),{class:t.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":p.value}])},null,8,["class"])],8,em))],2),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[p.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floating",ref:d,style:t.normalizeStyle(t.unref(B)),class:"z-[9999] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[t.createElementVNode("div",{ref_key:"scrollContainer",ref:i,class:"max-h-64 overflow-auto",onScroll:j},[m.value&&h.value.length===0?(t.openBlock(),t.createElementBlock("div",tm,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(5,H=>t.createElementVNode("div",{key:H,class:"flex items-center space-x-3"},[...X[5]||(X[5]=[t.createElementVNode("div",{class:"skeleton h-4 w-4 bg-gray-200 rounded"},null,-1),t.createElementVNode("div",{class:"skeleton h-4 flex-1 bg-gray-200 rounded"},null,-1)])])),64))])):A.value.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(A.value,(H,W)=>(t.openBlock(),t.createElementBlock("button",{key:k(H)??W,type:"button",class:t.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",W===y.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:Z=>y.value=W,onMousedown:X[2]||(X[2]=t.withModifiers(()=>{},["prevent"])),onClick:Z=>N(H)},[t.renderSlot(F.$slots,"item",{item:H,index:W},()=>[t.createElementVNode("div",nm,[t.createElementVNode("div",rm,[t.createElementVNode("div",am,t.toDisplayString(D(H)),1),e.itemSubtitle?(t.openBlock(),t.createElementBlock("div",sm,t.toDisplayString(v(H)),1)):t.createCommentVNode("",!0)])])]),S(H)?(t.openBlock(),t.createElementBlock("span",im," ✓ ")):t.createCommentVNode("",!0)],42,om))),128)):t.createCommentVNode("",!0),m.value&&h.value.length>0?(t.openBlock(),t.createElementBlock("div",lm,[t.createElementVNode("div",cm,[X[6]||(X[6]=t.createElementVNode("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"},null,-1)),t.createElementVNode("span",dm,t.toDisplayString(e.loadingText),1)])])):t.createCommentVNode("",!0),!g.value&&h.value.length>0?(t.openBlock(),t.createElementBlock("div",fm,[t.createElementVNode("div",um,t.toDisplayString(e.endOfResultsText),1)])):!m.value&&h.value.length===0?(t.openBlock(),t.createElementBlock("div",hm,t.toDisplayString(e.noResultsText),1)):t.createCommentVNode("",!0)],544)],4)):t.createCommentVNode("",!0)]))]),e.error?(t.openBlock(),t.createElementBlock("p",mm,t.toDisplayString(e.errorMessage||e.error),1)):e.helperText?(t.openBlock(),t.createElementBlock("p",pm,t.toDisplayString(e.helperText),1)):t.createCommentVNode("",!0)],64))],10,qh)),[[t.vShow,e.visible]])}});function dl(e){var o,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(o=0;o<a;o++)e[o]&&(n=dl(e[o]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fl(){for(var e,o,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(o=dl(e))&&(r&&(r+=" "),r+=o);return r}const gm=(e,o)=>{const n=new Array(e.length+o.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<o.length;r++)n[e.length+r]=o[r];return n},bm=(e,o)=>({classGroupId:e,validator:o}),ul=(e=new Map,o=null,n)=>({nextPart:e,validators:o,classGroupId:n}),hr="-",hl=[],ym="arbitrary..",xm=e=>{const o=wm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return km(i);const l=i.split(hr),c=l[0]===""&&l.length>1?1:0;return ml(l,c,o)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?gm(d,c):c:d||hl}return n[i]||hl}}},ml=(e,o,n)=>{if(e.length-o===0)return n.classGroupId;const a=e[o],s=n.nextPart.get(a);if(s){const d=ml(e,o+1,s);if(d)return d}const i=n.validators;if(i===null)return;const l=o===0?e.join(hr):e.slice(o).join(hr),c=i.length;for(let d=0;d<c;d++){const f=i[d];if(f.validator(l))return f.classGroupId}},km=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=e.slice(1,-1),n=o.indexOf(":"),r=o.slice(0,n);return r?ym+r:void 0})(),wm=e=>{const{theme:o,classGroups:n}=e;return Cm(n,o)},Cm=(e,o)=>{const n=ul();for(const r in e){const a=e[r];qa(a,n,r,o)}return n},qa=(e,o,n,r)=>{const a=e.length;for(let s=0;s<a;s++){const i=e[s];_m(i,o,n,r)}},_m=(e,o,n,r)=>{if(typeof e=="string"){Em(e,o,n);return}if(typeof e=="function"){Bm(e,o,n,r);return}Sm(e,o,n,r)},Em=(e,o,n)=>{const r=e===""?o:pl(o,e);r.classGroupId=n},Bm=(e,o,n,r)=>{if(Am(e)){qa(e(r),o,n,r);return}o.validators===null&&(o.validators=[]),o.validators.push(bm(n,e))},Sm=(e,o,n,r)=>{const a=Object.entries(e),s=a.length;for(let i=0;i<s;i++){const[l,c]=a[i];qa(c,pl(o,l),n,r)}},pl=(e,o)=>{let n=e;const r=o.split(hr),a=r.length;for(let s=0;s<a;s++){const i=r[s];let l=n.nextPart.get(i);l||(l=ul(),n.nextPart.set(i,l)),n=l}return n},Am=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,vm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,n=Object.create(null),r=Object.create(null);const a=(s,i)=>{n[s]=i,o++,o>e&&(o=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return a(s,i),i},set(s,i){s in n?n[s]=i:a(s,i)}}},Ga="!",gl=":",Dm=[],bl=(e,o,n,r,a)=>({modifiers:e,hasImportantModifier:o,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Nm=e=>{const{prefix:o,experimentalParseClassName:n}=e;let r=a=>{const s=[];let i=0,l=0,c=0,d;const f=a.length;for(let y=0;y<f;y++){const b=a[y];if(i===0&&l===0){if(b===gl){s.push(a.slice(c,y)),c=y+1;continue}if(b==="/"){d=y;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const u=s.length===0?a:a.slice(c);let h=u,m=!1;u.endsWith(Ga)?(h=u.slice(0,-1),m=!0):u.startsWith(Ga)&&(h=u.slice(1),m=!0);const p=d&&d>c?d-c:void 0;return bl(s,m,h,p)};if(o){const a=o+gl,s=r;r=i=>i.startsWith(a)?s(i.slice(a.length)):bl(Dm,!1,i,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},Vm=e=>{const o=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{o.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const i=n[s],l=i[0]==="[",c=o.has(i);l||c?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(i)):a.push(i)}return a.length>0&&(a.sort(),r.push(...a)),r}},Mm=e=>({cache:vm(e.cacheSize),parseClassName:Nm(e),sortModifiers:Vm(e),...xm(e)}),Tm=/\s+/,Pm=(e,o)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s}=o,i=[],l=e.trim().split(Tm);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:u,modifiers:h,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(u){c=f+(c.length>0?" "+c:c);continue}let b=!!y,g=r(b?p.substring(0,y):p);if(!g){if(!b){c=f+(c.length>0?" "+c:c);continue}if(g=r(p),!g){c=f+(c.length>0?" "+c:c);continue}b=!1}const _=h.length===0?"":h.length===1?h[0]:s(h).join(":"),E=m?_+Ga:_,B=E+g;if(i.indexOf(B)>-1)continue;i.push(B);const A=a(g,b);for(let C=0;C<A.length;++C){const x=A[C];i.push(E+x)}c=f+(c.length>0?" "+c:c)}return c},Om=(...e)=>{let o=0,n,r,a="";for(;o<e.length;)(n=e[o++])&&(r=yl(n))&&(a&&(a+=" "),a+=r);return a},yl=e=>{if(typeof e=="string")return e;let o,n="";for(let r=0;r<e.length;r++)e[r]&&(o=yl(e[r]))&&(n&&(n+=" "),n+=o);return n},Lm=(e,...o)=>{let n,r,a,s;const i=c=>{const d=o.reduce((f,u)=>u(f),e());return n=Mm(d),r=n.cache.get,a=n.cache.set,s=l,l(c)},l=c=>{const d=r(c);if(d)return d;const f=Pm(c,n);return a(c,f),f};return s=i,(...c)=>s(Om(...c))},Rm=[],et=e=>{const o=n=>n[e]||Rm;return o.isThemeGetter=!0,o},xl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Im=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$m=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Um=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>Im.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),mo=e=>!!e&&Number.isInteger(Number(e)),Ka=e=>e.endsWith("%")&&De(e.slice(0,-1)),Xt=e=>Fm.test(e),wl=()=>!0,Wm=e=>zm.test(e)&&!$m.test(e),Xa=()=>!1,Hm=e=>jm.test(e),qm=e=>Um.test(e),Gm=e=>!ue(e)&&!pe(e),Km=e=>po(e,Al,Xa),ue=e=>xl.test(e),vo=e=>po(e,vl,Wm),Cl=e=>po(e,op,De),Xm=e=>po(e,Nl,wl),Ym=e=>po(e,Dl,Xa),_l=e=>po(e,Bl,Xa),Jm=e=>po(e,Sl,qm),mr=e=>po(e,Vl,Hm),pe=e=>kl.test(e),Sn=e=>Do(e,vl),Qm=e=>Do(e,Dl),El=e=>Do(e,Bl),Zm=e=>Do(e,Al),ep=e=>Do(e,Sl),pr=e=>Do(e,Vl,!0),tp=e=>Do(e,Nl,!0),po=(e,o,n)=>{const r=xl.exec(e);return r?r[1]?o(r[1]):n(r[2]):!1},Do=(e,o,n=!1)=>{const r=kl.exec(e);return r?r[1]?o(r[1]):n:!1},Bl=e=>e==="position"||e==="percentage",Sl=e=>e==="image"||e==="url",Al=e=>e==="length"||e==="size"||e==="bg-size",vl=e=>e==="length",op=e=>e==="number",Dl=e=>e==="family-name",Nl=e=>e==="number"||e==="weight",Vl=e=>e==="shadow",np=Lm(()=>{const e=et("color"),o=et("font"),n=et("text"),r=et("font-weight"),a=et("tracking"),s=et("leading"),i=et("breakpoint"),l=et("container"),c=et("spacing"),d=et("radius"),f=et("shadow"),u=et("inset-shadow"),h=et("text-shadow"),m=et("drop-shadow"),p=et("blur"),y=et("perspective"),b=et("aspect"),g=et("ease"),_=et("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...B(),pe,ue],C=()=>["auto","hidden","clip","visible","scroll"],x=()=>["auto","contain","none"],w=()=>[pe,ue,c],D=()=>[ho,"full","auto",...w()],k=()=>[mo,"none","subgrid",pe,ue],v=()=>["auto",{span:["full",mo,pe,ue]},mo,pe,ue],S=()=>[mo,"auto",pe,ue],N=()=>["auto","min","max","fr",pe,ue],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...w()],P=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],R=()=>[ho,"screen","full","dvw","lvw","svw","min","max","fit",...w()],j=()=>[ho,"screen","full","lh","dvh","lvh","svh","min","max","fit",...w()],T=()=>[e,pe,ue],F=()=>[...B(),El,_l,{position:[pe,ue]}],X=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",Zm,Km,{size:[pe,ue]}],W=()=>[Ka,Sn,vo],Z=()=>["","none","full",d,pe,ue],oe=()=>["",De,Sn,vo],ye=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[De,Ka,El,_l],Q=()=>["","none",p,pe,ue],$=()=>["none",De,pe,ue],Y=()=>["none",De,pe,ue],ae=()=>[De,pe,ue],xe=()=>[ho,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xt],breakpoint:[Xt],color:[wl],container:[Xt],"drop-shadow":[Xt],ease:["in","out","in-out"],font:[Gm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xt],shadow:[Xt],spacing:["px",De],text:[Xt],"text-shadow":[Xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,ue,pe,b]}],container:["container"],columns:[{columns:[De,ue,pe,l]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[mo,"auto",pe,ue]}],basis:[{basis:[ho,"full","auto",l,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,ho,"auto","initial","none",ue]}],grow:[{grow:["",De,pe,ue]}],shrink:[{shrink:["",De,pe,ue]}],order:[{order:[mo,"first","last","none",pe,ue]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:v()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:v()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...R()]}],"min-inline-size":[{"min-inline":["auto",...R()]}],"max-inline-size":[{"max-inline":["none",...R()]}],"block-size":[{block:["auto",...j()]}],"min-block-size":[{"min-block":["auto",...j()]}],"max-block-size":[{"max-block":["none",...j()]}],w:[{w:[l,"screen",...P()]}],"min-w":[{"min-w":[l,"screen","none",...P()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Sn,vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,tp,Xm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ka,ue]}],"font-family":[{font:[Qm,Ym,o]}],"font-features":[{"font-features":[ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,pe,ue]}],"line-clamp":[{"line-clamp":[De,"none",pe,Cl]}],leading:[{leading:[s,...w()]}],"list-image":[{"list-image":["none",pe,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ye(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",pe,vo]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[De,"auto",pe,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:X()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mo,pe,ue],radial:["",pe,ue],conic:[mo,pe,ue]},ep,Jm]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ye(),"hidden","none"]}],"divide-style":[{divide:[...ye(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...ye(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,pe,ue]}],"outline-w":[{outline:["",De,Sn,vo]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,pr,mr]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",u,pr,mr]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[De,vo]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,pr,mr]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[De,pe,ue]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[pe,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:X()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,ue]}],filter:[{filter:["","none",pe,ue]}],blur:[{blur:Q()}],brightness:[{brightness:[De,pe,ue]}],contrast:[{contrast:[De,pe,ue]}],"drop-shadow":[{"drop-shadow":["","none",m,pr,mr]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",De,pe,ue]}],"hue-rotate":[{"hue-rotate":[De,pe,ue]}],invert:[{invert:["",De,pe,ue]}],saturate:[{saturate:[De,pe,ue]}],sepia:[{sepia:["",De,pe,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,ue]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[De,pe,ue]}],"backdrop-contrast":[{"backdrop-contrast":[De,pe,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,pe,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,pe,ue]}],"backdrop-invert":[{"backdrop-invert":["",De,pe,ue]}],"backdrop-opacity":[{"backdrop-opacity":[De,pe,ue]}],"backdrop-saturate":[{"backdrop-saturate":[De,pe,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",De,pe,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",pe,ue]}],ease:[{ease:["linear","initial",g,pe,ue]}],delay:[{delay:[De,pe,ue]}],animate:[{animate:["none",_,pe,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,pe,ue]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:$()}],"rotate-x":[{"rotate-x":$()}],"rotate-y":[{"rotate-y":$()}],"rotate-z":[{"rotate-z":$()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[pe,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xe()}],"translate-x":[{"translate-x":xe()}],"translate-y":[{"translate-y":xe()}],"translate-z":[{"translate-z":xe()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,ue]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[De,Sn,vo,Cl]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Te(...e){return np(fl(e))}function Ml(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ya={},Ja={},gr={exports:{}},Tl;function rp(){if(Tl)return gr.exports;Tl=1;var e=String,o=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return gr.exports=o(),gr.exports.createColors=o,gr.exports}var Pl;function ap(){return Pl||(Pl=1,(function(e){var o={};Object.defineProperty(e,"__esModule",{value:!0});function n(d,f){for(var u in f)Object.defineProperty(d,u,{enumerable:!0,get:f[u]})}n(e,{dim:function(){return l},default:function(){return c}});const r=a(rp());function a(d){return d&&d.__esModule?d:{default:d}}let s=new Set;function i(d,f,u){typeof process<"u"&&o.JEST_WORKER_ID||u&&s.has(u)||(u&&s.add(u),console.warn(""),f.forEach(h=>console.warn(d,"-",h)))}function l(d){return r.default.dim(d)}const c={info(d,f){i(r.default.bold(r.default.cyan("info")),...Array.isArray(d)?[d]:[f,d])},warn(d,f){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(d)?[d]:[f,d])},risk(d,f){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(d)?[d]:[f,d])}}})(Ja)),Ja}var Ol;function sp(){return Ol||(Ol=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const o=n(ap());function n(s){return s&&s.__esModule?s:{default:s}}function r({version:s,from:i,to:l}){o.default.warn(`${i}-color-renamed`,[`As of Tailwind CSS ${s}, \`${i}\` has been renamed to \`${l}\`.`,"Update your configuration file to silence this warning."])}const a={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(Ya)),Ya}var Qa,Ll;function ip(){if(Ll)return Qa;Ll=1;let e=sp();return Qa=(e.__esModule?e:{default:e}).default,Qa}var lp=ip();const cp=Ml(lp);/*!
|
|
1
|
+
(function(de,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lucide-vue-next"),require("reka-ui"),require("@vueuse/core"),require("vue-i18n"),require("@vuepic/vue-datepicker"),require("@uppy/core"),require("@uppy/dashboard"),require("@uppy/image-editor"),require("vue-router"),require("vue3-lottie")):typeof define=="function"&&define.amd?define(["exports","vue","lucide-vue-next","reka-ui","@vueuse/core","vue-i18n","@vuepic/vue-datepicker","@uppy/core","@uppy/dashboard","@uppy/image-editor","vue-router","vue3-lottie"],t):(de=typeof globalThis<"u"?globalThis:de||self,t(de.DynamicUI={},de.Vue,de.LucideIcons,de.rekaUi,de.core,de.VueI18n,de.VueDatePicker,de.Uppy,de.UppyDashboard,de.UppyImageEditor,de.VueRouter,de.Vue3Lottie))})(this,(function(de,t,ne,Ee,Xe,_t,Pu,Ou,zi,Ru,_o,Lu){"use strict";var PN=Object.defineProperty;var ON=(de,t,ne)=>t in de?PN(de,t,{enumerable:!0,configurable:!0,writable:!0,value:ne}):de[t]=ne;var be=(de,t,ne)=>ON(de,typeof t!="symbol"?t+"":t,ne);var Sa;function Iu(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return o.default=e,Object.freeze(o)}const Lt=Iu(ne);let Vt={};function $i(e){Vt={...Vt,...e}}function Fu(){return Vt}function zu(){return Vt.apiBaseUrl?Vt.apiBaseUrl:typeof window<"u"&&window.__MICRO_API_BASE_URL__?window.__MICRO_API_BASE_URL__:""}function $u(){const e={"Content-Type":"application/json",Accept:"application/json"};let o=null;if(Vt.getAuthToken?o=Vt.getAuthToken():typeof window<"u"&&window.__MICRO_AUTH_TOKEN__?o=window.__MICRO_AUTH_TOKEN__:typeof localStorage<"u"&&(o=localStorage.getItem("token")||sessionStorage.getItem("token")),o&&(e.Authorization=`Bearer ${o}`),Vt.getHeaders){const n=Vt.getHeaders();return{...e,...n}}return e}function ju(){Vt.onUnauthorized&&Vt.onUnauthorized()}async function Uu(e,o,n,r){const a=Fu();if(a.apiClient)return a.apiClient(e,o||"GET",n);if(!e||!e.trim())throw new Error("[DynamicUI][useApi] URL tidak boleh kosong. Pastikan prop `endpoint.apiUrl` sudah diisi dengan benar.");const s=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],i=(o||"").trim().toUpperCase(),l=s.includes(i)?i:"GET";s.includes(i)||console.warn(`[DynamicUI][useApi] HTTP method '${o}' tidak valid, fallback ke 'GET'.`);const c=zu(),d=e.startsWith("http")?e:`${c}${e}`,f={method:l,headers:{...$u(),...r||{}}};n&&!["GET","DELETE"].includes(l)&&(n instanceof FormData?(f.body=n,f.headers&&f.headers["Content-Type"]&&delete f.headers["Content-Type"],f.headers&&f.headers["content-type"]&&delete f.headers["content-type"]):f.body=JSON.stringify(n));let u=d;if(n&&l==="GET"){const p=new URLSearchParams;Object.entries(n).forEach(([b,g])=>{g!=null&&p.append(b,String(g))});const y=p.toString();y&&(u=`${d}${d.includes("?")?"&":"?"}${y}`)}const h=await fetch(u,f);if(h.status===401&&ju(),!h.ok){const p=await h.text();throw new Error(`HTTP ${h.status}: ${p}`)}return(h.headers.get("content-type")||"").includes("application/json")?h.json():{status:!0,data:await h.text()}}function Je(){const e=(o,n,r,a)=>{let s=o,i=n,l=r,c=a;return a&&typeof a=="object"?(a._url&&(s=a._url,i=a._method||i||"POST",a._data&&(l={...l||{},...a._data})),a.headers&&(c=a.headers)):o&&n&&(["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"].includes(n.toUpperCase())||(s=`${o.endsWith("/")?o.slice(0,-1):o}/${n}`,i="POST")),Uu(s,i,l,c)};return{apiUrl:e,DCodeApi:e}}const Go=Math.min,gt=Math.max,rr=Math.round,ar=Math.floor,It=e=>({x:e,y:e}),Wu={left:"right",right:"left",bottom:"top",top:"bottom"};function ji(e,o,n){return gt(e,Go(o,n))}function wn(e,o){return typeof e=="function"?e(o):e}function fo(e){return e.split("-")[0]}function Cn(e){return e.split("-")[1]}function Ui(e){return e==="x"?"y":"x"}function Wi(e){return e==="y"?"height":"width"}function Gt(e){const o=e[0];return o==="t"||o==="b"?"y":"x"}function Hi(e){return Ui(Gt(e))}function Hu(e,o,n){n===void 0&&(n=!1);const r=Cn(e),a=Hi(e),s=Wi(a);let i=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return o.reference[s]>o.floating[s]&&(i=sr(i)),[i,sr(i)]}function qu(e){const o=sr(e);return[Ma(e),o,Ma(o)]}function Ma(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const qi=["left","right"],Gi=["right","left"],Gu=["top","bottom"],Ku=["bottom","top"];function Xu(e,o,n){switch(e){case"top":case"bottom":return n?o?Gi:qi:o?qi:Gi;case"left":case"right":return o?Gu:Ku;default:return[]}}function Yu(e,o,n,r){const a=Cn(e);let s=Xu(fo(e),n==="start",r);return a&&(s=s.map(i=>i+"-"+a),o&&(s=s.concat(s.map(Ma)))),s}function sr(e){const o=fo(e);return Wu[o]+e.slice(o.length)}function Ju(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qu(e){return typeof e!="number"?Ju(e):{top:e,right:e,bottom:e,left:e}}function ir(e){const{x:o,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:o,right:o+r,bottom:n+a,x:o,y:n}}function Ki(e,o,n){let{reference:r,floating:a}=e;const s=Gt(o),i=Hi(o),l=Wi(i),c=fo(o),d=s==="y",f=r.x+r.width/2-a.width/2,u=r.y+r.height/2-a.height/2,h=r[l]/2-a[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-a.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-a.width,y:u};break;default:m={x:r.x,y:r.y}}switch(Cn(o)){case"start":m[i]-=h*(n&&d?-1:1);break;case"end":m[i]+=h*(n&&d?-1:1);break}return m}async function Zu(e,o){var n;o===void 0&&(o={});const{x:r,y:a,platform:s,rects:i,elements:l,strategy:c}=e,{boundary:d="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:m=0}=wn(o,e),p=Qu(m),b=l[h?u==="floating"?"reference":"floating":u],g=ir(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(b)))==null||n?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:d,rootBoundary:f,strategy:c})),E=u==="floating"?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,_=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),B=await(s.isElement==null?void 0:s.isElement(_))?await(s.getScale==null?void 0:s.getScale(_))||{x:1,y:1}:{x:1,y:1},A=ir(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:_,strategy:c}):E);return{top:(g.top-A.top+p.top)/B.y,bottom:(A.bottom-g.bottom+p.bottom)/B.y,left:(g.left-A.left+p.left)/B.x,right:(A.right-g.right+p.right)/B.x}}const eh=50,th=async(e,o,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:s=[],platform:i}=n,l=i.detectOverflow?i:{...i,detectOverflow:Zu},c=await(i.isRTL==null?void 0:i.isRTL(o));let d=await i.getElementRects({reference:e,floating:o,strategy:a}),{x:f,y:u}=Ki(d,r,c),h=r,m=0;const p={};for(let y=0;y<s.length;y++){const b=s[y];if(!b)continue;const{name:g,fn:E}=b,{x:_,y:B,data:A,reset:C}=await E({x:f,y:u,initialPlacement:r,placement:h,strategy:a,middlewareData:p,rects:d,platform:l,elements:{reference:e,floating:o}});f=_??f,u=B??u,p[g]={...p[g],...A},C&&m<eh&&(m++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(d=C.rects===!0?await i.getElementRects({reference:e,floating:o,strategy:a}):C.rects),{x:f,y:u}=Ki(d,h,c)),y=-1)}return{x:f,y:u,placement:h,strategy:a,middlewareData:p}},oh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(o){var n,r;const{placement:a,middlewareData:s,rects:i,initialPlacement:l,platform:c,elements:d}=o,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...b}=wn(e,o);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=fo(a),E=Gt(l),_=fo(l)===l,B=await(c.isRTL==null?void 0:c.isRTL(d.floating)),A=h||(_||!y?[sr(l)]:qu(l)),C=p!=="none";!h&&C&&A.push(...Yu(l,y,p,B));const x=[l,...A],k=await c.detectOverflow(o,b),N=[];let w=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&N.push(k[g]),u){const V=Hu(a,i,B);N.push(k[V[0]],k[V[1]])}if(w=[...w,{placement:a,overflows:N}],!N.every(V=>V<=0)){var v,S;const V=(((v=s.flip)==null?void 0:v.index)||0)+1,R=x[V];if(R&&(!(u==="alignment"?E!==Gt(R):!1)||w.every(L=>Gt(L.placement)===E?L.overflows[0]>0:!0)))return{data:{index:V,overflows:w},reset:{placement:R}};let O=(S=w.filter(P=>P.overflows[0]<=0).sort((P,L)=>P.overflows[1]-L.overflows[1])[0])==null?void 0:S.placement;if(!O)switch(m){case"bestFit":{var D;const P=(D=w.filter(L=>{if(C){const $=Gt(L.placement);return $===E||$==="y"}return!0}).map(L=>[L.placement,L.overflows.filter($=>$>0).reduce(($,T)=>$+T,0)]).sort((L,$)=>L[1]-$[1])[0])==null?void 0:D[0];P&&(O=P);break}case"initialPlacement":O=l;break}if(a!==O)return{reset:{placement:O}}}return{}}}},nh=new Set(["left","top"]);async function rh(e,o){const{placement:n,platform:r,elements:a}=e,s=await(r.isRTL==null?void 0:r.isRTL(a.floating)),i=fo(n),l=Cn(n),c=Gt(n)==="y",d=nh.has(i)?-1:1,f=s&&c?-1:1,u=wn(o,e);let{mainAxis:h,crossAxis:m,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return l&&typeof p=="number"&&(m=l==="end"?p*-1:p),c?{x:m*f,y:h*d}:{x:h*d,y:m*f}}const ah=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(o){var n,r;const{x:a,y:s,placement:i,middlewareData:l}=o,c=await rh(o,e);return i===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:s+c.y,data:{...c,placement:i}}}}},sh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(o){const{x:n,y:r,placement:a,platform:s}=o,{mainAxis:i=!0,crossAxis:l=!1,limiter:c={fn:g=>{let{x:E,y:_}=g;return{x:E,y:_}}},...d}=wn(e,o),f={x:n,y:r},u=await s.detectOverflow(o,d),h=Gt(fo(a)),m=Ui(h);let p=f[m],y=f[h];if(i){const g=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=p+u[g],B=p-u[E];p=ji(_,p,B)}if(l){const g=h==="y"?"top":"left",E=h==="y"?"bottom":"right",_=y+u[g],B=y-u[E];y=ji(_,y,B)}const b=c.fn({...o,[m]:p,[h]:y});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:i,[h]:l}}}}}},ih=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(o){var n,r;const{placement:a,rects:s,platform:i,elements:l}=o,{apply:c=()=>{},...d}=wn(e,o),f=await i.detectOverflow(o,d),u=fo(a),h=Cn(a),m=Gt(a)==="y",{width:p,height:y}=s.floating;let b,g;u==="top"||u==="bottom"?(b=u,g=h===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(g=u,b=h==="end"?"top":"bottom");const E=y-f.top-f.bottom,_=p-f.left-f.right,B=Go(y-f[b],E),A=Go(p-f[g],_),C=!o.middlewareData.shift;let x=B,k=A;if((n=o.middlewareData.shift)!=null&&n.enabled.x&&(k=_),(r=o.middlewareData.shift)!=null&&r.enabled.y&&(x=E),C&&!h){const w=gt(f.left,0),v=gt(f.right,0),S=gt(f.top,0),D=gt(f.bottom,0);m?k=p-2*(w!==0||v!==0?w+v:gt(f.left,f.right)):x=y-2*(S!==0||D!==0?S+D:gt(f.top,f.bottom))}await c({...o,availableWidth:k,availableHeight:x});const N=await i.getDimensions(l.floating);return p!==N.width||y!==N.height?{reset:{rects:!0}}:{}}}};function lr(){return typeof window<"u"}function Bo(e){return Ta(e)?(e.nodeName||"").toLowerCase():"#document"}function bt(e){var o;return(e==null||(o=e.ownerDocument)==null?void 0:o.defaultView)||window}function Ft(e){var o;return(o=(Ta(e)?e.ownerDocument:e.document)||window.document)==null?void 0:o.documentElement}function Ta(e){return lr()?e instanceof Node||e instanceof bt(e).Node:!1}function Mt(e){return lr()?e instanceof Element||e instanceof bt(e).Element:!1}function Kt(e){return lr()?e instanceof HTMLElement||e instanceof bt(e).HTMLElement:!1}function Xi(e){return!lr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof bt(e).ShadowRoot}function En(e){const{overflow:o,overflowX:n,overflowY:r,display:a}=Tt(e);return/auto|scroll|overlay|hidden|clip/.test(o+r+n)&&a!=="inline"&&a!=="contents"}function lh(e){return/^(table|td|th)$/.test(Bo(e))}function cr(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const ch=/transform|translate|scale|rotate|perspective|filter/,dh=/paint|layout|strict|content/,So=e=>!!e&&e!=="none";let Pa;function Oa(e){const o=Mt(e)?Tt(e):e;return So(o.transform)||So(o.translate)||So(o.scale)||So(o.rotate)||So(o.perspective)||!Ra()&&(So(o.backdropFilter)||So(o.filter))||ch.test(o.willChange||"")||dh.test(o.contain||"")}function fh(e){let o=uo(e);for(;Kt(o)&&!Ko(o);){if(Oa(o))return o;if(cr(o))return null;o=uo(o)}return null}function Ra(){return Pa==null&&(Pa=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pa}function Ko(e){return/^(html|body|#document)$/.test(Bo(e))}function Tt(e){return bt(e).getComputedStyle(e)}function dr(e){return Mt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uo(e){if(Bo(e)==="html")return e;const o=e.assignedSlot||e.parentNode||Xi(e)&&e.host||Ft(e);return Xi(o)?o.host:o}function Yi(e){const o=uo(e);return Ko(o)?e.ownerDocument?e.ownerDocument.body:e.body:Kt(o)&&En(o)?o:Yi(o)}function _n(e,o,n){var r;o===void 0&&(o=[]),n===void 0&&(n=!0);const a=Yi(e),s=a===((r=e.ownerDocument)==null?void 0:r.body),i=bt(a);if(s){const l=La(i);return o.concat(i,i.visualViewport||[],En(a)?a:[],l&&n?_n(l):[])}else return o.concat(a,_n(a,[],n))}function La(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ji(e){const o=Tt(e);let n=parseFloat(o.width)||0,r=parseFloat(o.height)||0;const a=Kt(e),s=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=rr(n)!==s||rr(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Ia(e){return Mt(e)?e:e.contextElement}function Xo(e){const o=Ia(e);if(!Kt(o))return It(1);const n=o.getBoundingClientRect(),{width:r,height:a,$:s}=Ji(o);let i=(s?rr(n.width):n.width)/r,l=(s?rr(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const uh=It(0);function Qi(e){const o=bt(e);return!Ra()||!o.visualViewport?uh:{x:o.visualViewport.offsetLeft,y:o.visualViewport.offsetTop}}function hh(e,o,n){return o===void 0&&(o=!1),!n||o&&n!==bt(e)?!1:o}function Ao(e,o,n,r){o===void 0&&(o=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),s=Ia(e);let i=It(1);o&&(r?Mt(r)&&(i=Xo(r)):i=Xo(e));const l=hh(s,n,r)?Qi(s):It(0);let c=(a.left+l.x)/i.x,d=(a.top+l.y)/i.y,f=a.width/i.x,u=a.height/i.y;if(s){const h=bt(s),m=r&&Mt(r)?bt(r):r;let p=h,y=La(p);for(;y&&r&&m!==p;){const b=Xo(y),g=y.getBoundingClientRect(),E=Tt(y),_=g.left+(y.clientLeft+parseFloat(E.paddingLeft))*b.x,B=g.top+(y.clientTop+parseFloat(E.paddingTop))*b.y;c*=b.x,d*=b.y,f*=b.x,u*=b.y,c+=_,d+=B,p=bt(y),y=La(p)}}return ir({width:f,height:u,x:c,y:d})}function fr(e,o){const n=dr(e).scrollLeft;return o?o.left+n:Ao(Ft(e)).left+n}function Zi(e,o){const n=e.getBoundingClientRect(),r=n.left+o.scrollLeft-fr(e,n),a=n.top+o.scrollTop;return{x:r,y:a}}function mh(e){let{elements:o,rect:n,offsetParent:r,strategy:a}=e;const s=a==="fixed",i=Ft(r),l=o?cr(o.floating):!1;if(r===i||l&&s)return n;let c={scrollLeft:0,scrollTop:0},d=It(1);const f=It(0),u=Kt(r);if((u||!u&&!s)&&((Bo(r)!=="body"||En(i))&&(c=dr(r)),u)){const m=Ao(r);d=Xo(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const h=i&&!u&&!s?Zi(i,c):It(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-c.scrollLeft*d.x+f.x+h.x,y:n.y*d.y-c.scrollTop*d.y+f.y+h.y}}function ph(e){return Array.from(e.getClientRects())}function gh(e){const o=Ft(e),n=dr(e),r=e.ownerDocument.body,a=gt(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),s=gt(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+fr(e);const l=-n.scrollTop;return Tt(r).direction==="rtl"&&(i+=gt(o.clientWidth,r.clientWidth)-a),{width:a,height:s,x:i,y:l}}const el=25;function bh(e,o){const n=bt(e),r=Ft(e),a=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){s=a.width,i=a.height;const f=Ra();(!f||f&&o==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const d=fr(r);if(d<=0){const f=r.ownerDocument,u=f.body,h=getComputedStyle(u),m=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(r.clientWidth-u.clientWidth-m);p<=el&&(s-=p)}else d<=el&&(s+=d);return{width:s,height:i,x:l,y:c}}function yh(e,o){const n=Ao(e,!0,o==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,s=Kt(e)?Xo(e):It(1),i=e.clientWidth*s.x,l=e.clientHeight*s.y,c=a*s.x,d=r*s.y;return{width:i,height:l,x:c,y:d}}function tl(e,o,n){let r;if(o==="viewport")r=bh(e,n);else if(o==="document")r=gh(Ft(e));else if(Mt(o))r=yh(o,n);else{const a=Qi(e);r={x:o.x-a.x,y:o.y-a.y,width:o.width,height:o.height}}return ir(r)}function ol(e,o){const n=uo(e);return n===o||!Mt(n)||Ko(n)?!1:Tt(n).position==="fixed"||ol(n,o)}function xh(e,o){const n=o.get(e);if(n)return n;let r=_n(e,[],!1).filter(l=>Mt(l)&&Bo(l)!=="body"),a=null;const s=Tt(e).position==="fixed";let i=s?uo(e):e;for(;Mt(i)&&!Ko(i);){const l=Tt(i),c=Oa(i);!c&&l.position==="fixed"&&(a=null),(s?!c&&!a:!c&&l.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||En(i)&&!c&&ol(e,i))?r=r.filter(f=>f!==i):a=l,i=uo(i)}return o.set(e,r),r}function kh(e){let{element:o,boundary:n,rootBoundary:r,strategy:a}=e;const i=[...n==="clippingAncestors"?cr(o)?[]:xh(o,this._c):[].concat(n),r],l=tl(o,i[0],a);let c=l.top,d=l.right,f=l.bottom,u=l.left;for(let h=1;h<i.length;h++){const m=tl(o,i[h],a);c=gt(m.top,c),d=Go(m.right,d),f=Go(m.bottom,f),u=gt(m.left,u)}return{width:d-u,height:f-c,x:u,y:c}}function wh(e){const{width:o,height:n}=Ji(e);return{width:o,height:n}}function Ch(e,o,n){const r=Kt(o),a=Ft(o),s=n==="fixed",i=Ao(e,!0,s,o);let l={scrollLeft:0,scrollTop:0};const c=It(0);function d(){c.x=fr(a)}if(r||!r&&!s)if((Bo(o)!=="body"||En(a))&&(l=dr(o)),r){const m=Ao(o,!0,s,o);c.x=m.x+o.clientLeft,c.y=m.y+o.clientTop}else a&&d();s&&!r&&a&&d();const f=a&&!r&&!s?Zi(a,l):It(0),u=i.left+l.scrollLeft-c.x-f.x,h=i.top+l.scrollTop-c.y-f.y;return{x:u,y:h,width:i.width,height:i.height}}function Fa(e){return Tt(e).position==="static"}function nl(e,o){if(!Kt(e)||Tt(e).position==="fixed")return null;if(o)return o(e);let n=e.offsetParent;return Ft(e)===n&&(n=n.ownerDocument.body),n}function rl(e,o){const n=bt(e);if(cr(e))return n;if(!Kt(e)){let a=uo(e);for(;a&&!Ko(a);){if(Mt(a)&&!Fa(a))return a;a=uo(a)}return n}let r=nl(e,o);for(;r&&lh(r)&&Fa(r);)r=nl(r,o);return r&&Ko(r)&&Fa(r)&&!Oa(r)?n:r||fh(e)||n}const Eh=async function(e){const o=this.getOffsetParent||rl,n=this.getDimensions,r=await n(e.floating);return{reference:Ch(e.reference,await o(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _h(e){return Tt(e).direction==="rtl"}const Bh={convertOffsetParentRelativeRectToViewportRelativeRect:mh,getDocumentElement:Ft,getClippingRect:kh,getOffsetParent:rl,getElementRects:Eh,getClientRects:ph,getDimensions:wh,getScale:Xo,isElement:Mt,isRTL:_h};function al(e,o){return e.x===o.x&&e.y===o.y&&e.width===o.width&&e.height===o.height}function Sh(e,o){let n=null,r;const a=Ft(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const d=e.getBoundingClientRect(),{left:f,top:u,width:h,height:m}=d;if(l||o(),!h||!m)return;const p=ar(u),y=ar(a.clientWidth-(f+h)),b=ar(a.clientHeight-(u+m)),g=ar(f),_={rootMargin:-p+"px "+-y+"px "+-b+"px "+-g+"px",threshold:gt(0,Go(1,c))||1};let B=!0;function A(C){const x=C[0].intersectionRatio;if(x!==c){if(!B)return i();x?i(!1,x):r=setTimeout(()=>{i(!1,1e-7)},1e3)}x===1&&!al(d,e.getBoundingClientRect())&&i(),B=!1}try{n=new IntersectionObserver(A,{..._,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return i(!0),s}function za(e,o,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,d=Ia(e),f=a||s?[...d?_n(d):[],...o?_n(o):[]]:[];f.forEach(g=>{a&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=d&&l?Sh(d,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(g=>{let[E]=g;E&&E.target===d&&m&&o&&(m.unobserve(o),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var _;(_=m)==null||_.observe(o)})),n()}),d&&!c&&m.observe(d),o&&m.observe(o));let p,y=c?Ao(e):null;c&&b();function b(){const g=Ao(e);y&&!al(y,g)&&n(),y=g,p=requestAnimationFrame(b)}return n(),()=>{var g;f.forEach(E=>{a&&E.removeEventListener("scroll",n),s&&E.removeEventListener("resize",n)}),u==null||u(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const $a=ah,ja=sh,Ua=oh,Wa=ih,Ah=(e,o,n)=>{const r=new Map,a={platform:Bh,...n},s={...a.platform,_c:r};return th(e,o,{...a,platform:s})};function vh(e){return e!=null&&typeof e=="object"&&"$el"in e}function sl(e){if(vh(e)){const o=e.$el;return Ta(o)&&Bo(o)==="#comment"?null:o}return e}function Bn(e){return typeof e=="function"?e():t.unref(e)}function il(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ll(e,o){const n=il(e);return Math.round(o*n)/n}function Ha(e,o,n){n===void 0&&(n={});const r=n.whileElementsMounted,a=t.computed(()=>{var x;return(x=Bn(n.open))!=null?x:!0}),s=t.computed(()=>Bn(n.middleware)),i=t.computed(()=>{var x;return(x=Bn(n.placement))!=null?x:"bottom"}),l=t.computed(()=>{var x;return(x=Bn(n.strategy))!=null?x:"absolute"}),c=t.computed(()=>{var x;return(x=Bn(n.transform))!=null?x:!0}),d=t.computed(()=>sl(e.value)),f=t.computed(()=>sl(o.value)),u=t.ref(0),h=t.ref(0),m=t.ref(l.value),p=t.ref(i.value),y=t.shallowRef({}),b=t.ref(!1),g=t.computed(()=>{const x={position:m.value,left:"0",top:"0"};if(!f.value)return x;const k=ll(f.value,u.value),N=ll(f.value,h.value);return c.value?{...x,transform:"translate("+k+"px, "+N+"px)",...il(f.value)>=1.5&&{willChange:"transform"}}:{position:m.value,left:k+"px",top:N+"px"}});let E;function _(){if(d.value==null||f.value==null)return;const x=a.value;Ah(d.value,f.value,{middleware:s.value,placement:i.value,strategy:l.value}).then(k=>{u.value=k.x,h.value=k.y,m.value=k.strategy,p.value=k.placement,y.value=k.middlewareData,b.value=x!==!1})}function B(){typeof E=="function"&&(E(),E=void 0)}function A(){if(B(),r===void 0){_();return}if(d.value!=null&&f.value!=null){E=r(d.value,f.value,_);return}}function C(){a.value||(b.value=!1)}return t.watch([s,i,l,a],_,{flush:"sync"}),t.watch([d,f],A,{flush:"sync"}),t.watch(a,C,{flush:"sync"}),t.getCurrentScope()&&t.onScopeDispose(B),{x:t.shallowReadonly(u),y:t.shallowReadonly(h),strategy:t.shallowReadonly(m),placement:t.shallowReadonly(p),middlewareData:t.shallowReadonly(y),isPositioned:t.shallowReadonly(b),floatingStyles:g,update:_}}const Dh=["aria-busy"],Nh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Vh=["for"],Mh={key:0,class:"ml-1 text-destructive"},Th={class:"relative"},Ph={key:0,class:"flex items-center text-gray-500 gap-2"},Oh=["id","placeholder","disabled","readonly","value"],Rh={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},Lh=["disabled"],Ih={class:"overflow-y-auto overflow-x-hidden",style:{"max-height":"350px"}},Fh=["onMouseenter","onClick"],zh={key:0},$h={class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},jh={key:0},Uh={key:1},Wh={key:2},Hh={key:1,class:"mt-1 text-xs text-red-600"},ur=t.defineComponent({name:"DCodeAutoComplete",inheritAttrs:!1,__name:"DCodeAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{default:()=>({})},fetchItems:{},icon:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.computed(()=>a.label??void 0),i=G=>{const ie=a[G];return ie===""||ie===!0||ie==="true"||ie===1||ie==="1"},l=t.ref(!1),c=t.computed(()=>n.itemTitle||a["item-title"]||a.itemTitle||"name"),d=t.computed(()=>n.itemValue||a["item-value"]||a.itemValue||"id"),f=t.computed(()=>n.disabled),u=t.computed(()=>i("required")),h=t.computed(()=>n.readonly||i("readonly")),m=t.computed(()=>n.returnObject||i("return-object")||i("returnObject")),p=t.computed(()=>u.value||i("aria-required")),y=t.computed(()=>n.error||n.errorMessage||a["error-message"]),b=t.computed(()=>a.placeholder??""),g=t.computed(()=>{const G=a.minChars??a["min-chars"];if(G==null||G==="")return 0;const ie=typeof G=="number"?G:Number.parseInt(String(G),10);return Number.isFinite(ie)&&ie>0?ie:0}),E=t.computed(()=>{const G=a.rules;return Array.isArray(G)?G:[]}),_=t.computed(()=>{const G=a.id||a.label;return G?`app-autocomplete-${G}-${Math.random().toString(36).slice(2,7)}`:void 0}),B=t.ref(n.modelValue),A=t.ref([]),C=t.ref(!1),x=t.ref(!1),k=t.computed(()=>a.items),N=t.computed(()=>{const G=V.value;return G.apiModule&&G.apiAction||G.apiUrl||n.fetchItems?A.value:k.value??[]}),w=t.computed(()=>!!a.loading),v=t.computed(()=>w.value||C.value),S=t.computed(()=>{const{label:G,items:ie,loading:he,rules:oe,"item-title":le,"item-value":K,itemTitle:ee,itemValue:re,minChars:Ce,"min-chars":Ge,clearable:wt,required:rt,"aria-required":or,disabled:qo,readonly:nt,visible:mu,"return-object":Ni,returnObject:pu,class:Vi,"fetch-items":gu,fetchItems:Aa,error:Mi,errorMessage:bu,"error-message":yu,...Ti}=a||{};return Ti}),D=()=>{if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions},V=t.computed(()=>{const G=n.endpoint||{};return{apiModule:n.apiModule||G.apiModule,apiAction:n.apiAction||G.apiAction,apiUrl:G.apiUrl,apiMethod:G.apiMethod||"GET"}}),R=t.ref(null),O=t.ref(null),P=t.ref(null),{floatingStyles:L}=Ha(O,P,{placement:"bottom-start",whileElementsMounted:za,middleware:[$a(4),Ua(),ja(),Wa({apply({rects:G,elements:ie,availableHeight:he}){Object.assign(ie.floating.style,{width:`${G.reference.width}px`,maxHeight:`${he}px`})}})]}),$=t.ref(!1),T=t.ref(""),I=t.ref(-1),H=t.ref(null),q=t.computed(()=>!g.value||(T.value||"").trim().length>=g.value?"":`Ketik minimal ${g.value} karakter`),W=G=>{if(G==null)return"";if(typeof G=="string"||typeof G=="number")return String(G);const ie=c.value;return typeof ie=="function"?ie(G):(G==null?void 0:G[ie])??(G==null?void 0:G.name)??(G==null?void 0:G.nama)??(G==null?void 0:G.label)??(G==null?void 0:G.title)??"-"},Z=G=>{if(G==null)return null;if(typeof G=="string"||typeof G=="number")return G;const ie=d.value;return typeof ie=="function"?ie(G):(G==null?void 0:G[ie])??(G==null?void 0:G.id)??(G==null?void 0:G.value)??(G==null?void 0:G.code)??null},te=t.computed(()=>{const G=B.value;if(G==null||G==="")return"";if(Array.isArray(G))return G.length?G.map(oe=>{if(m.value&&typeof oe=="object"||typeof oe=="object")return W(oe);const le=N.value.find(K=>Z(K)==oe);return le?W(le):String(oe)}).join(", "):"";if(typeof G=="object")return W(G);const ie=N.value.find(he=>Z(he)==G);return ie?W(ie):String(G)}),xe=t.computed(()=>{const G=N.value||[],ie=(T.value||"").trim().toLowerCase(),he=(te.value||"").toLowerCase(),oe=!ie||ie===he;let le=G;if(oe||(le=G.filter(K=>W(K).toLowerCase().includes(ie))),le.length>0){const K=ee=>{const re=Z(ee);return Array.isArray(B.value)?B.value.some(Ce=>Ce==re):B.value==re};le=[...le].sort((ee,re)=>{const Ce=K(ee),Ge=K(re);return Ce&&!Ge?-1:!Ce&&Ge?1:0})}return le}),Se=G=>Array.isArray(G)?G.length===0:G==null||G==="",ye=G=>{if(H.value=null,u.value&&Se(G)&&!E.value.length)return H.value="This field is required",!1;for(const ie of E.value){const he=ie(G);if(he===!1)return H.value="Invalid value",!1;if(typeof he=="string")return H.value=he,!1}return!0},Q=async()=>{if(f.value||h.value)return;$.value=!0,I.value=xe.value.length?0:-1,T.value=te.value||"";const G=V.value,ie=G.apiModule&&G.apiAction||G.apiUrl||n.fetchItems;n.autoFetchOnOpen&&ie&&!x.value&&(await We(),I.value=xe.value.length?0:-1)},j=()=>{$.value=!1,I.value=-1,T.value=te.value||""},Y=G=>{const ie=m.value?G:Z(G);let he=ie;Array.isArray(B.value)&&(he=[ie]),B.value=he,r("update:modelValue",he),H.value=null,ye(he),T.value=W(G),j()},ae=()=>{A.value=[],x.value=!1,B.value=Array.isArray(B.value)?[]:null,r("update:modelValue",B.value),T.value="",H.value=null},ke=()=>{l.value=!0,ae(),j(),setTimeout(()=>{l.value=!1},0)},Oe=G=>{if(f.value||h.value)return;const ie=G.target.value;T.value=ie,H.value&&(H.value=null),$.value||($.value=!0),I.value=xe.value.length?0:-1;const he=V.value.apiModule&&V.value.apiAction||V.value.apiUrl||n.fetchItems;n.autoFetchOnOpen&&he&&!v.value&&!x.value&&We()},_e=G=>{var he;if(f.value||h.value)return;const ie={ArrowDown:()=>{if(G.preventDefault(),!$.value){Q();return}xe.value.length&&(I.value=Math.min(I.value+1,xe.value.length-1))},ArrowUp:()=>{!$.value||!xe.value.length||(G.preventDefault(),I.value=Math.max(I.value-1,0))},Enter:()=>{if(!$.value)return;G.preventDefault();const oe=xe.value[I.value];oe&&Y(oe)},Escape:()=>{G.preventDefault(),j()},Tab:()=>{j()}};(he=ie[G.key])==null||he.call(ie)},We=async()=>{const G=V.value;if(G.apiModule&&G.apiAction||G.apiUrl||n.fetchItems){C.value=!0;try{let he;if(n.fetchItems){const oe=D()||{},le={page:1,perPage:100,search:(T.value||"").trim(),...oe,...n.apiParams},K=await n.fetchItems(le),ee=(K==null?void 0:K.data)??K;he=(ee==null?void 0:ee.data)??ee}else{const le=Je().DCodeApi;if(typeof le!="function"){console.error("[DCodeAutoComplete] useApi() must expose DCodeApi()");return}const ee={page:1,perPage:100,...D()||{},...n.apiParams};let re;G.apiUrl?re=await le("","",ee,{_url:G.apiUrl,_method:G.apiMethod||"POST"}):re=await le(G.apiModule,G.apiAction,ee);const Ce=(re==null?void 0:re.data)??re;he=(Ce==null?void 0:Ce.data)??Ce}A.value=Array.isArray(he)?he:[],x.value=!0}catch(he){console.error("[DCodeAutoComplete][fetchOptions] ERROR:",he),H.value=`[DCodeAutoComplete][fetchOptions] ERROR: Error: ${(he==null?void 0:he.message)||(he==null?void 0:he.toString())||"Failed to load options"}`,A.value=[],x.value=!0}finally{C.value=!1}}},Fe=G=>{const ie=Z(G);return m.value?B.value?Array.isArray(B.value)?B.value.some(he=>Z(he)==ie):Z(B.value)==ie:!1:Array.isArray(B.value)?B.value.some(he=>he==ie):B.value==ie};t.watch(()=>[D(),V.value,n.apiParams],([G,ie,he],[oe,le,K])=>{const ee=V.value;if(!(ee.apiModule&&ee.apiAction||ee.apiUrl||n.fetchItems)){ae();return}const Ce=JSON.stringify(G??null)===JSON.stringify(oe??null),Ge=JSON.stringify(he??null)===JSON.stringify(K??null);Ce&&Ge||(ae(),Ge||We())},{deep:!0}),t.watch(()=>n.modelValue,(G,ie)=>{B.value=G,!l.value&&(G==null||G==="")&&ie!=null&&n.apiModule&&n.apiAction&&(A.value=[],x.value=!1),T.value=te.value||""},{immediate:!0});const se=V.value;(se.apiModule&&se.apiAction||se.apiUrl||n.fetchItems)&&(n.autoFetchOnMount||!Se(n.modelValue))&&We();const Le=G=>{const ie=R.value,he=P.value,oe=G.target;ie&&ie.contains(oe)||he&&he.contains(oe)||$.value&&j()},De=t.computed(()=>{const G=n.modelValue;return G==null?!1:typeof G=="string"?G.trim().length>0:Array.isArray(G)?G.length>0:typeof G=="object"?Object.keys(G).length>0:!0}),ct=t.computed(()=>!!n.clearable&&De.value&&!n.disabled);return t.onMounted(()=>{document.addEventListener("mousedown",Le)}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",Le)}),(G,ie)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:R,class:t.normalizeClass(["w-full",[t.unref(a).class,f.value?"cursor-not-allowed":""]]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",Nh)):t.createCommentVNode("",!0),ie[6]||(ie[6]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:_.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),p.value?(t.openBlock(),t.createElementBlock("span",Mh,"*")):t.createCommentVNode("",!0)],8,Vh)):t.createCommentVNode("",!0),t.createElementVNode("div",Th,[t.createElementVNode("div",{ref_key:"reference",ref:O,class:t.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[f.value||h.value?"opacity-60 cursor-not-allowed":"",H.value||y.value?"border-red-500 focus-within:ring-red-500":""]])},[n.icon||G.$slots["prepend-inner"]?(t.openBlock(),t.createElementBlock("div",Ph,[t.renderSlot(G.$slots,"prepend-inner",{},()=>[n.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps(S.value,{id:_.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",f.value||h.value?"cursor-not-allowed":"cursor-text"],placeholder:b.value,disabled:f.value,readonly:h.value,value:$.value?T.value:te.value||T.value,onFocus:ie[0]||(ie[0]=()=>{$.value||Q()}),onClick:ie[1]||(ie[1]=()=>{$.value||Q()}),onInput:Oe,onKeydown:_e,onBlur:ie[2]||(ie[2]=()=>ye(B.value))}),null,16,Oh),v.value?(t.openBlock(),t.createElementBlock("svg",Rh,[...ie[7]||(ie[7]=[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):ct.value?(t.openBlock(),t.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:ie[3]||(ie[3]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(ke,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(t.openBlock(),t.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:f.value||h.value,onClick:ie[4]||(ie[4]=he=>$.value?j():Q()),"aria-label":"Toggle"},[t.createVNode(t.unref(ne.ChevronDown),{class:t.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":$.value}])},null,8,["class"])],8,Lh))],2),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[$.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floating",ref:P,style:t.normalizeStyle(t.unref(L)),class:"z-[50] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[t.createElementVNode("div",Ih,[xe.value.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(xe.value,(he,oe)=>(t.openBlock(),t.createElementBlock("button",{key:Z(he)??oe,type:"button",class:t.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",oe===I.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:le=>I.value=oe,onMousedown:ie[5]||(ie[5]=t.withModifiers(()=>{},["prevent"])),onClick:le=>Y(he)},[t.createTextVNode(t.toDisplayString(W(he))+" ",1),Fe(he)?(t.openBlock(),t.createElementBlock("span",zh," ✓ ")):t.createCommentVNode("",!0)],42,Fh))),128)):t.renderSlot(G.$slots,"no-data",{key:1},()=>[t.createElementVNode("div",$h,[v.value?(t.openBlock(),t.createElementBlock("span",jh,"Loading data…")):q.value?(t.openBlock(),t.createElementBlock("span",Uh,t.toDisplayString(q.value),1)):(t.openBlock(),t.createElementBlock("span",Wh,"No data available"))])])])],4)):t.createCommentVNode("",!0)]))]),H.value||y.value?(t.openBlock(),t.createElementBlock("p",Hh,t.toDisplayString(H.value||y.value),1)):t.createCommentVNode("",!0)],64))],10,Dh)),[[t.vShow,e.visible]])}}),qh=["aria-busy"],Gh={key:0,class:"mb-1 h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Kh=["for"],Xh={key:0,class:"ml-1 text-destructive"},Yh={class:"relative"},Jh={key:0,class:"flex items-center text-gray-500 gap-2"},Qh=["id","placeholder","disabled","value"],Zh={key:1,class:"h-6 w-6 animate-spin text-gray-500",viewBox:"0 0 24 24",fill:"none"},em=["disabled"],tm={key:0,class:"p-3 space-y-2"},om=["onMouseenter","onClick"],nm={class:"flex items-center space-x-3"},rm={class:"flex-1"},am={class:"text-sm font-medium text-gray-900 dark:text-gray-100"},sm={key:0,class:"text-xs text-gray-500 dark:text-gray-400"},im={key:0},lm={key:2,class:"p-3 text-center"},cm={class:"inline-flex items-center space-x-2"},dm={class:"text-sm text-gray-500"},fm={key:3,class:"p-3 text-center"},um={class:"text-xs text-gray-400"},hm={key:4,class:"px-3 py-2 text-sm text-gray-500 dark:text-gray-400"},mm={key:1,class:"mt-1 text-xs text-red-600"},pm={key:2,class:"mt-1 text-xs text-gray-500"},cl=t.defineComponent({name:"DCodeInfiniteAutoComplete",inheritAttrs:!1,__name:"DCodeInfiniteAutoComplete",props:{modelValue:{},apiModule:{},apiAction:{},apiOptions:{},autoFetchOnOpen:{type:Boolean,default:!0},refreshOnOpen:{type:Boolean,default:!1},autoFetchOnMount:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},skeleton:{type:Boolean,default:!1},error:{default:null},errorMessage:{default:null},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},itemSubtitle:{},returnObject:{type:Boolean,default:!1},endpoint:{},apiParams:{},fetchItems:{},icon:{},label:{},placeholder:{default:"Select an option"},required:{type:Boolean,default:!1},inputType:{default:"text"},helperText:{default:""},noResultsText:{default:"No results found"},loadingText:{default:"Loading more..."},endOfResultsText:{default:"End of results"},pageSize:{default:10},threshold:{default:100},debounceMs:{default:300}},emits:["update:modelValue","focus","blur","select","search","load-more","end-of-results","error"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.ref(),i=t.ref(),l=t.ref(),c=t.ref(),d=t.ref(),f=t.computed(()=>{const I=n.label||n.placeholder;return I?`app-infinite-autocomplete-${I}-${Math.random().toString(36).slice(2,7)}`:void 0}),u=t.ref(""),h=t.ref([]),m=t.ref(!1),p=t.ref(!1),y=t.ref(-1),b=t.ref(1),g=t.ref(!0),E=t.ref(0),_=t.ref(),{floatingStyles:B}=Ha(c,d,{placement:"bottom-start",whileElementsMounted:za,middleware:[$a(4),Ua(),ja(),Wa({apply({rects:I,elements:H}){Object.assign(H.floating.style,{width:`${I.reference.width}px`})}})]});t.computed(()=>({"opacity-50 pointer-events-none":n.disabled,relative:!0}));const A=t.computed(()=>u.value?h.value.filter(I=>N(I).toLowerCase().includes(u.value.toLowerCase())):h.value),C=t.computed(()=>{if(p.value&&u.value)return u.value;if(n.modelValue){if(n.returnObject)return N(n.modelValue);{const I=h.value.find(H=>w(H)===n.modelValue);return I?N(I):String(n.modelValue)}}return""}),x=()=>{p.value=!0},k=()=>{p.value=!1},N=I=>typeof n.itemTitle=="function"?n.itemTitle(I):I[n.itemTitle]||"",w=I=>typeof n.itemValue=="function"?n.itemValue(I):I[n.itemValue]||I,v=I=>n.itemSubtitle?typeof n.itemSubtitle=="function"?n.itemSubtitle(I):I[n.itemSubtitle]||"":"",S=I=>n.modelValue?n.returnObject?w(I)===w(n.modelValue):w(I)===n.modelValue:!1,D=I=>{var q;const H=n.returnObject?I:w(I);r("update:modelValue",H),r("select",I),p.value=!1,u.value="",(q=s.value)==null||q.blur()},V=()=>{var I;r("update:modelValue",null),u.value="",(I=s.value)==null||I.focus()},R=I=>{p.value=!0,r("focus",I),n.autoFetchOnOpen&&!m.value&&(n.refreshOnOpen||h.value.length===0)&&T(!0)},O=I=>{setTimeout(()=>{p.value=!1,r("blur",I)},200)},P=I=>{const H=I.target;u.value=H.value,_.value&&clearTimeout(_.value),_.value=setTimeout(()=>{r("search",u.value),b.value=1,g.value=!0,T(!0)},n.debounceMs)},L=I=>{if(p.value)switch(I.key){case"ArrowDown":I.preventDefault(),y.value=Math.min(y.value+1,A.value.length-1);break;case"ArrowUp":I.preventDefault(),y.value=Math.max(y.value-1,0);break;case"Enter":I.preventDefault(),y.value>=0&&A.value[y.value]&&D(A.value[y.value]);break;case"Escape":p.value=!1;break}},$=I=>{if(!g.value||m.value)return;const H=I.target,{scrollTop:q,scrollHeight:W,clientHeight:Z}=H;q+Z>=W-n.threshold&&T()},T=async(I=!1)=>{var H,q;if(!m.value){m.value=!0;try{let W=[];if(n.fetchItems)W=await n.fetchItems();else{const Z=Je(),te=((H=n.endpoint)==null?void 0:H.apiModule)||n.apiModule,xe=((q=n.endpoint)==null?void 0:q.apiAction)||n.apiAction;if(!te||!xe)throw new Error("API module and action are required");const Se={page:I?1:b.value,pageSize:n.pageSize,search:u.value,...n.apiParams},ye=await Z.apiUrl(`/${te}/${xe}`,"GET",Se);W=ye.data||ye.items||ye||[],E.value=ye.total||ye.totalItems||W.length}I?(h.value=W,b.value=1):(h.value.push(...W),b.value++),g.value=W.length>=n.pageSize,g.value||r("end-of-results"),r("load-more",{items:W,page:b.value,hasMore:g.value,total:E.value})}catch(W){console.error("Error fetching items:",W),r("error",W)}finally{m.value=!1}}};return t.onMounted(()=>{n.autoFetchOnMount&&T()}),t.onUnmounted(()=>{_.value&&clearTimeout(_.value)}),t.watch(()=>n.modelValue,I=>{I||(u.value="")}),(I,H)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:l,class:t.normalizeClass(["w-full",t.unref(a).class]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",Gh)):t.createCommentVNode("",!0),H[3]||(H[3]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:f.value,class:"mb-1 block text-sm font-medium text-gray-900 dark:text-gray-100"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Xh,"*")):t.createCommentVNode("",!0)],8,Kh)):t.createCommentVNode("",!0),t.createElementVNode("div",Yh,[t.createElementVNode("div",{ref_key:"reference",ref:c,class:t.normalizeClass(["flex items-center gap-2 rounded-lg border px-3 py-2 bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 h-10 focus-within:ring-1 focus-within:ring-gray-700 dark:focus-within:ring-gray-300",[e.disabled?"opacity-60 cursor-not-allowed":"",e.error?"border-red-500 focus-within:ring-red-500":""]])},[n.icon?(t.openBlock(),t.createElementBlock("div",Jh,[n.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.icon),{key:0,class:"h-4 w-4"})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({ref_key:"inputRef",ref:s},I.$attrs,{id:f.value,type:"text",class:["w-full bg-transparent outline-none text-sm text-gray-900 dark:text-gray-100 placeholder:text-gray-400",e.disabled?"cursor-not-allowed":"cursor-text"],placeholder:e.placeholder,disabled:e.disabled,value:C.value,onFocus:R,onBlur:O,onInput:P,onKeydown:L}),null,16,Qh),m.value?(t.openBlock(),t.createElementBlock("svg",Zh,[...H[4]||(H[4]=[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v4a4 4 0 00-4 4H4z"},null,-1)])])):e.clearable&&e.modelValue?(t.openBlock(),t.createElementBlock("button",{key:2,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onMousedown:H[0]||(H[0]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(V,["stop"]),"aria-label":"Clear"}," ✕ ",32)):(t.openBlock(),t.createElementBlock("button",{key:3,type:"button",class:"shrink-0 rounded-md px-1 text-gray-500 hover:text-gray-700 dark:hover:text-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",disabled:e.disabled,onClick:H[1]||(H[1]=q=>p.value?k():x()),"aria-label":"Toggle"},[t.createVNode(t.unref(ne.ChevronDown),{class:t.normalizeClass(["h-4 w-4 transition-transform duration-200 ease-in-out",{"rotate-180":p.value}])},null,8,["class"])],8,em))],2),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[p.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floating",ref:d,style:t.normalizeStyle(t.unref(B)),class:"z-[9999] overflow-hidden rounded-lg border bg-white shadow-lg border-gray-200 dark:border-neutral-700/50 dark:bg-neutral-800"},[t.createElementVNode("div",{ref_key:"scrollContainer",ref:i,class:"max-h-64 overflow-auto",onScroll:$},[m.value&&h.value.length===0?(t.openBlock(),t.createElementBlock("div",tm,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(5,q=>t.createElementVNode("div",{key:q,class:"flex items-center space-x-3"},[...H[5]||(H[5]=[t.createElementVNode("div",{class:"skeleton h-4 w-4 bg-gray-200 rounded"},null,-1),t.createElementVNode("div",{class:"skeleton h-4 flex-1 bg-gray-200 rounded"},null,-1)])])),64))])):A.value.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(A.value,(q,W)=>(t.openBlock(),t.createElementBlock("button",{key:w(q)??W,type:"button",class:t.normalizeClass(["w-full flex justify-between text-left px-3 py-2 text-sm hover:bg-neutral-100 dark:hover:bg-neutral-800",W===y.value?"bg-neutral-100 dark:bg-neutral-800":""]),onMouseenter:Z=>y.value=W,onMousedown:H[2]||(H[2]=t.withModifiers(()=>{},["prevent"])),onClick:Z=>D(q)},[t.renderSlot(I.$slots,"item",{item:q,index:W},()=>[t.createElementVNode("div",nm,[t.createElementVNode("div",rm,[t.createElementVNode("div",am,t.toDisplayString(N(q)),1),e.itemSubtitle?(t.openBlock(),t.createElementBlock("div",sm,t.toDisplayString(v(q)),1)):t.createCommentVNode("",!0)])])]),S(q)?(t.openBlock(),t.createElementBlock("span",im," ✓ ")):t.createCommentVNode("",!0)],42,om))),128)):t.createCommentVNode("",!0),m.value&&h.value.length>0?(t.openBlock(),t.createElementBlock("div",lm,[t.createElementVNode("div",cm,[H[6]||(H[6]=t.createElementVNode("div",{class:"animate-spin rounded-full h-4 w-4 border-b-2 border-blue-600"},null,-1)),t.createElementVNode("span",dm,t.toDisplayString(e.loadingText),1)])])):t.createCommentVNode("",!0),!g.value&&h.value.length>0?(t.openBlock(),t.createElementBlock("div",fm,[t.createElementVNode("div",um,t.toDisplayString(e.endOfResultsText),1)])):!m.value&&h.value.length===0?(t.openBlock(),t.createElementBlock("div",hm,t.toDisplayString(e.noResultsText),1)):t.createCommentVNode("",!0)],544)],4)):t.createCommentVNode("",!0)]))]),e.error?(t.openBlock(),t.createElementBlock("p",mm,t.toDisplayString(e.errorMessage||e.error),1)):e.helperText?(t.openBlock(),t.createElementBlock("p",pm,t.toDisplayString(e.helperText),1)):t.createCommentVNode("",!0)],64))],10,qh)),[[t.vShow,e.visible]])}});function dl(e){var o,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(o=0;o<a;o++)e[o]&&(n=dl(e[o]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fl(){for(var e,o,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(o=dl(e))&&(r&&(r+=" "),r+=o);return r}const gm=(e,o)=>{const n=new Array(e.length+o.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<o.length;r++)n[e.length+r]=o[r];return n},bm=(e,o)=>({classGroupId:e,validator:o}),ul=(e=new Map,o=null,n)=>({nextPart:e,validators:o,classGroupId:n}),hr="-",hl=[],ym="arbitrary..",xm=e=>{const o=wm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return km(i);const l=i.split(hr),c=l[0]===""&&l.length>1?1:0;return ml(l,c,o)},getConflictingClassGroupIds:(i,l)=>{if(l){const c=r[i],d=n[i];return c?d?gm(d,c):c:d||hl}return n[i]||hl}}},ml=(e,o,n)=>{if(e.length-o===0)return n.classGroupId;const a=e[o],s=n.nextPart.get(a);if(s){const d=ml(e,o+1,s);if(d)return d}const i=n.validators;if(i===null)return;const l=o===0?e.join(hr):e.slice(o).join(hr),c=i.length;for(let d=0;d<c;d++){const f=i[d];if(f.validator(l))return f.classGroupId}},km=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const o=e.slice(1,-1),n=o.indexOf(":"),r=o.slice(0,n);return r?ym+r:void 0})(),wm=e=>{const{theme:o,classGroups:n}=e;return Cm(n,o)},Cm=(e,o)=>{const n=ul();for(const r in e){const a=e[r];qa(a,n,r,o)}return n},qa=(e,o,n,r)=>{const a=e.length;for(let s=0;s<a;s++){const i=e[s];Em(i,o,n,r)}},Em=(e,o,n,r)=>{if(typeof e=="string"){_m(e,o,n);return}if(typeof e=="function"){Bm(e,o,n,r);return}Sm(e,o,n,r)},_m=(e,o,n)=>{const r=e===""?o:pl(o,e);r.classGroupId=n},Bm=(e,o,n,r)=>{if(Am(e)){qa(e(r),o,n,r);return}o.validators===null&&(o.validators=[]),o.validators.push(bm(n,e))},Sm=(e,o,n,r)=>{const a=Object.entries(e),s=a.length;for(let i=0;i<s;i++){const[l,c]=a[i];qa(c,pl(o,l),n,r)}},pl=(e,o)=>{let n=e;const r=o.split(hr),a=r.length;for(let s=0;s<a;s++){const i=r[s];let l=n.nextPart.get(i);l||(l=ul(),n.nextPart.set(i,l)),n=l}return n},Am=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,vm=e=>{if(e<1)return{get:()=>{},set:()=>{}};let o=0,n=Object.create(null),r=Object.create(null);const a=(s,i)=>{n[s]=i,o++,o>e&&(o=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return a(s,i),i},set(s,i){s in n?n[s]=i:a(s,i)}}},Ga="!",gl=":",Dm=[],bl=(e,o,n,r,a)=>({modifiers:e,hasImportantModifier:o,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),Nm=e=>{const{prefix:o,experimentalParseClassName:n}=e;let r=a=>{const s=[];let i=0,l=0,c=0,d;const f=a.length;for(let y=0;y<f;y++){const b=a[y];if(i===0&&l===0){if(b===gl){s.push(a.slice(c,y)),c=y+1;continue}if(b==="/"){d=y;continue}}b==="["?i++:b==="]"?i--:b==="("?l++:b===")"&&l--}const u=s.length===0?a:a.slice(c);let h=u,m=!1;u.endsWith(Ga)?(h=u.slice(0,-1),m=!0):u.startsWith(Ga)&&(h=u.slice(1),m=!0);const p=d&&d>c?d-c:void 0;return bl(s,m,h,p)};if(o){const a=o+gl,s=r;r=i=>i.startsWith(a)?s(i.slice(a.length)):bl(Dm,!1,i,void 0,!0)}if(n){const a=r;r=s=>n({className:s,parseClassName:a})}return r},Vm=e=>{const o=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{o.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let s=0;s<n.length;s++){const i=n[s],l=i[0]==="[",c=o.has(i);l||c?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(i)):a.push(i)}return a.length>0&&(a.sort(),r.push(...a)),r}},Mm=e=>({cache:vm(e.cacheSize),parseClassName:Nm(e),sortModifiers:Vm(e),...xm(e)}),Tm=/\s+/,Pm=(e,o)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:s}=o,i=[],l=e.trim().split(Tm);let c="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{isExternal:u,modifiers:h,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:y}=n(f);if(u){c=f+(c.length>0?" "+c:c);continue}let b=!!y,g=r(b?p.substring(0,y):p);if(!g){if(!b){c=f+(c.length>0?" "+c:c);continue}if(g=r(p),!g){c=f+(c.length>0?" "+c:c);continue}b=!1}const E=h.length===0?"":h.length===1?h[0]:s(h).join(":"),_=m?E+Ga:E,B=_+g;if(i.indexOf(B)>-1)continue;i.push(B);const A=a(g,b);for(let C=0;C<A.length;++C){const x=A[C];i.push(_+x)}c=f+(c.length>0?" "+c:c)}return c},Om=(...e)=>{let o=0,n,r,a="";for(;o<e.length;)(n=e[o++])&&(r=yl(n))&&(a&&(a+=" "),a+=r);return a},yl=e=>{if(typeof e=="string")return e;let o,n="";for(let r=0;r<e.length;r++)e[r]&&(o=yl(e[r]))&&(n&&(n+=" "),n+=o);return n},Rm=(e,...o)=>{let n,r,a,s;const i=c=>{const d=o.reduce((f,u)=>u(f),e());return n=Mm(d),r=n.cache.get,a=n.cache.set,s=l,l(c)},l=c=>{const d=r(c);if(d)return d;const f=Pm(c,n);return a(c,f),f};return s=i,(...c)=>s(Om(...c))},Lm=[],et=e=>{const o=n=>n[e]||Lm;return o.isThemeGetter=!0,o},xl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kl=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Im=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$m=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,jm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Um=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ho=e=>Im.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),mo=e=>!!e&&Number.isInteger(Number(e)),Ka=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Xt=e=>Fm.test(e),wl=()=>!0,Wm=e=>zm.test(e)&&!$m.test(e),Xa=()=>!1,Hm=e=>jm.test(e),qm=e=>Um.test(e),Gm=e=>!ue(e)&&!pe(e),Km=e=>po(e,Al,Xa),ue=e=>xl.test(e),vo=e=>po(e,vl,Wm),Cl=e=>po(e,op,Ne),Xm=e=>po(e,Nl,wl),Ym=e=>po(e,Dl,Xa),El=e=>po(e,Bl,Xa),Jm=e=>po(e,Sl,qm),mr=e=>po(e,Vl,Hm),pe=e=>kl.test(e),Sn=e=>Do(e,vl),Qm=e=>Do(e,Dl),_l=e=>Do(e,Bl),Zm=e=>Do(e,Al),ep=e=>Do(e,Sl),pr=e=>Do(e,Vl,!0),tp=e=>Do(e,Nl,!0),po=(e,o,n)=>{const r=xl.exec(e);return r?r[1]?o(r[1]):n(r[2]):!1},Do=(e,o,n=!1)=>{const r=kl.exec(e);return r?r[1]?o(r[1]):n:!1},Bl=e=>e==="position"||e==="percentage",Sl=e=>e==="image"||e==="url",Al=e=>e==="length"||e==="size"||e==="bg-size",vl=e=>e==="length",op=e=>e==="number",Dl=e=>e==="family-name",Nl=e=>e==="number"||e==="weight",Vl=e=>e==="shadow",np=Rm(()=>{const e=et("color"),o=et("font"),n=et("text"),r=et("font-weight"),a=et("tracking"),s=et("leading"),i=et("breakpoint"),l=et("container"),c=et("spacing"),d=et("radius"),f=et("shadow"),u=et("inset-shadow"),h=et("text-shadow"),m=et("drop-shadow"),p=et("blur"),y=et("perspective"),b=et("aspect"),g=et("ease"),E=et("animate"),_=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...B(),pe,ue],C=()=>["auto","hidden","clip","visible","scroll"],x=()=>["auto","contain","none"],k=()=>[pe,ue,c],N=()=>[ho,"full","auto",...k()],w=()=>[mo,"none","subgrid",pe,ue],v=()=>["auto",{span:["full",mo,pe,ue]},mo,pe,ue],S=()=>[mo,"auto",pe,ue],D=()=>["auto","min","max","fr",pe,ue],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],O=()=>["auto",...k()],P=()=>[ho,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],L=()=>[ho,"screen","full","dvw","lvw","svw","min","max","fit",...k()],$=()=>[ho,"screen","full","lh","dvh","lvh","svh","min","max","fit",...k()],T=()=>[e,pe,ue],I=()=>[...B(),_l,El,{position:[pe,ue]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",Zm,Km,{size:[pe,ue]}],W=()=>[Ka,Sn,vo],Z=()=>["","none","full",d,pe,ue],te=()=>["",Ne,Sn,vo],xe=()=>["solid","dashed","dotted","double"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[Ne,Ka,_l,El],Q=()=>["","none",p,pe,ue],j=()=>["none",Ne,pe,ue],Y=()=>["none",Ne,pe,ue],ae=()=>[Ne,pe,ue],ke=()=>[ho,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xt],breakpoint:[Xt],color:[wl],container:[Xt],"drop-shadow":[Xt],ease:["in","out","in-out"],font:[Gm],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xt],shadow:[Xt],spacing:["px",Ne],text:[Xt],"text-shadow":[Xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ho,ue,pe,b]}],container:["container"],columns:[{columns:[Ne,ue,pe,l]}],"break-after":[{"break-after":_()}],"break-before":[{"break-before":_()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:x()}],"overscroll-x":[{"overscroll-x":x()}],"overscroll-y":[{"overscroll-y":x()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{"inset-s":N(),start:N()}],end:[{"inset-e":N(),end:N()}],"inset-bs":[{"inset-bs":N()}],"inset-be":[{"inset-be":N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[mo,"auto",pe,ue]}],basis:[{basis:[ho,"full","auto",l,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,ho,"auto","initial","none",ue]}],grow:[{grow:["",Ne,pe,ue]}],shrink:[{shrink:["",Ne,pe,ue]}],order:[{order:[mo,"first","last","none",pe,ue]}],"grid-cols":[{"grid-cols":w()}],"col-start-end":[{col:v()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":w()}],"row-start-end":[{row:v()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pbs:[{pbs:k()}],pbe:[{pbe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:O()}],mx:[{mx:O()}],my:[{my:O()}],ms:[{ms:O()}],me:[{me:O()}],mbs:[{mbs:O()}],mbe:[{mbe:O()}],mt:[{mt:O()}],mr:[{mr:O()}],mb:[{mb:O()}],ml:[{ml:O()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...$()]}],"min-block-size":[{"min-block":["auto",...$()]}],"max-block-size":[{"max-block":["none",...$()]}],w:[{w:[l,"screen",...P()]}],"min-w":[{"min-w":[l,"screen","none",...P()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[i]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,Sn,vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,tp,Xm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ka,ue]}],"font-family":[{font:[Qm,Ym,o]}],"font-features":[{"font-features":[ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,pe,ue]}],"line-clamp":[{"line-clamp":[Ne,"none",pe,Cl]}],leading:[{leading:[s,...k()]}],"list-image":[{"list-image":["none",pe,ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...xe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",pe,vo]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[Ne,"auto",pe,ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mo,pe,ue],radial:["",pe,ue],conic:[mo,pe,ue]},ep,Jm]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:te()}],"border-w-x":[{"border-x":te()}],"border-w-y":[{"border-y":te()}],"border-w-s":[{"border-s":te()}],"border-w-e":[{"border-e":te()}],"border-w-bs":[{"border-bs":te()}],"border-w-be":[{"border-be":te()}],"border-w-t":[{"border-t":te()}],"border-w-r":[{"border-r":te()}],"border-w-b":[{"border-b":te()}],"border-w-l":[{"border-l":te()}],"divide-x":[{"divide-x":te()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":te()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...xe(),"hidden","none"]}],"divide-style":[{divide:[...xe(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...xe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,pe,ue]}],"outline-w":[{outline:["",Ne,Sn,vo]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",f,pr,mr]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",u,pr,mr]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[Ne,vo]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":te()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,pr,mr]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[Ne,pe,ue]}],"mix-blend":[{"mix-blend":[...Se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[pe,ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":B()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,ue]}],filter:[{filter:["","none",pe,ue]}],blur:[{blur:Q()}],brightness:[{brightness:[Ne,pe,ue]}],contrast:[{contrast:[Ne,pe,ue]}],"drop-shadow":[{"drop-shadow":["","none",m,pr,mr]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",Ne,pe,ue]}],"hue-rotate":[{"hue-rotate":[Ne,pe,ue]}],invert:[{invert:["",Ne,pe,ue]}],saturate:[{saturate:[Ne,pe,ue]}],sepia:[{sepia:["",Ne,pe,ue]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,ue]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,pe,ue]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,pe,ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,pe,ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,pe,ue]}],"backdrop-invert":[{"backdrop-invert":["",Ne,pe,ue]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,pe,ue]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,pe,ue]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,pe,ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",pe,ue]}],ease:[{ease:["linear","initial",g,pe,ue]}],delay:[{delay:[Ne,pe,ue]}],animate:[{animate:["none",E,pe,ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,pe,ue]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:j()}],"rotate-x":[{"rotate-x":j()}],"rotate-y":[{"rotate-y":j()}],"rotate-z":[{"rotate-z":j()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[pe,ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mbs":[{"scroll-mbs":k()}],"scroll-mbe":[{"scroll-mbe":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pbs":[{"scroll-pbs":k()}],"scroll-pbe":[{"scroll-pbe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",pe,ue]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[Ne,Sn,vo,Cl]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Te(...e){return np(fl(e))}function Ml(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ya={},Ja={},gr={exports:{}},Tl;function rp(){if(Tl)return gr.exports;Tl=1;var e=String,o=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e,blackBright:e,redBright:e,greenBright:e,yellowBright:e,blueBright:e,magentaBright:e,cyanBright:e,whiteBright:e,bgBlackBright:e,bgRedBright:e,bgGreenBright:e,bgYellowBright:e,bgBlueBright:e,bgMagentaBright:e,bgCyanBright:e,bgWhiteBright:e}};return gr.exports=o(),gr.exports.createColors=o,gr.exports}var Pl;function ap(){return Pl||(Pl=1,(function(e){var o={};Object.defineProperty(e,"__esModule",{value:!0});function n(d,f){for(var u in f)Object.defineProperty(d,u,{enumerable:!0,get:f[u]})}n(e,{dim:function(){return l},default:function(){return c}});const r=a(rp());function a(d){return d&&d.__esModule?d:{default:d}}let s=new Set;function i(d,f,u){typeof process<"u"&&o.JEST_WORKER_ID||u&&s.has(u)||(u&&s.add(u),console.warn(""),f.forEach(h=>console.warn(d,"-",h)))}function l(d){return r.default.dim(d)}const c={info(d,f){i(r.default.bold(r.default.cyan("info")),...Array.isArray(d)?[d]:[f,d])},warn(d,f){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(d)?[d]:[f,d])},risk(d,f){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(d)?[d]:[f,d])}}})(Ja)),Ja}var Ol;function sp(){return Ol||(Ol=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return a}});const o=n(ap());function n(s){return s&&s.__esModule?s:{default:s}}function r({version:s,from:i,to:l}){o.default.warn(`${i}-color-renamed`,[`As of Tailwind CSS ${s}, \`${i}\` has been renamed to \`${l}\`.`,"Update your configuration file to silence this warning."])}const a={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return r({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return r({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return r({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return r({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return r({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}})(Ya)),Ya}var Qa,Rl;function ip(){if(Rl)return Qa;Rl=1;let e=sp();return Qa=(e.__esModule?e:{default:e}).default,Qa}var lp=ip();const cp=Ml(lp);/*!
|
|
2
2
|
* currency.js - v2.0.4
|
|
3
3
|
* http://scurker.github.io/currency.js
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2021 Jason Wilson
|
|
6
6
|
* Released under MIT license
|
|
7
|
-
*/var dp={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:mp,fromCents:!1},Rl=function(o){return Math.round(o)},Za=function(o){return Math.pow(10,o)},fp=function(o,n){return Rl(o/n)*n},up=/(\d)(?=(\d{3})+\b)/g,hp=/(\d)(?=(\d\d)+\d\b)/g;function Me(e,o){var n=this;if(!(n instanceof Me))return new Me(e,o);var r=Object.assign({},dp,o),a=Za(r.precision),s=br(e,r);n.intValue=s,n.value=s/a,r.increment=r.increment||1/a,r.useVedic?r.groups=hp:r.groups=up,this.s=r,this.p=a}function br(e,o){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=0,a=o.decimal,s=o.errorOnInvalid,i=o.precision,l=o.fromCents,c=Za(i),d=typeof e=="number",f=e instanceof Me;if(f&&l)return e.intValue;if(d||f)r=f?e.value:e;else if(typeof e=="string"){var u=new RegExp("[^-\\d"+a+"]","g"),h=new RegExp("\\"+a,"g");r=e.replace(/\((.*)\)/,"-$1").replace(u,"").replace(h,"."),r=r||0}else{if(s)throw Error("Invalid Input");r=0}return l||(r*=c,r=r.toFixed(4)),n?Rl(r):r}function mp(e,o){var n=o.pattern,r=o.negativePattern,a=o.symbol,s=o.separator,i=o.decimal,l=o.groups,c=(""+e).replace(/^-/,"").split("."),d=c[0],f=c[1];return(e.value>=0?n:r).replace("!",a).replace("#",d.replace(l,"$1"+s)+(f?i+f:""))}Me.prototype={add:function(o){var n=this.intValue,r=this.s,a=this.p;return Me((n+=br(o,r))/(r.fromCents?1:a),r)},subtract:function(o){var n=this.intValue,r=this.s,a=this.p;return Me((n-=br(o,r))/(r.fromCents?1:a),r)},multiply:function(o){var n=this.intValue,r=this.s;return Me((n*=o)/(r.fromCents?1:Za(r.precision)),r)},divide:function(o){var n=this.intValue,r=this.s;return Me(n/=br(o,r,!1),r)},distribute:function(o){for(var n=this.intValue,r=this.p,a=this.s,s=[],i=Math[n>=0?"floor":"ceil"](n/o),l=Math.abs(n-i*o),c=a.fromCents?1:r;o!==0;o--){var d=Me(i/c,a);l-- >0&&(d=d[n>=0?"add":"subtract"](1/c)),s.push(d)}return s},dollars:function(){return~~this.value},cents:function(){var o=this.intValue,n=this.p;return~~(o%n)},format:function(o){var n=this.s;return typeof o=="function"?o(this,n):n.format(this,Object.assign({},n,o))},toString:function(){var o=this.intValue,n=this.p,r=this.s;return fp(o/n,r.increment).toFixed(r.precision)},toJSON:function(){return this.value}};const pp=(e,o="IDR")=>{const n=Number(e);if(isNaN(n))return"-";switch(o.toUpperCase()){case"USD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"EUR":return Me(n,{symbol:"€",separator:".",decimal:",",precision:2}).format();case"IDR":return Me(n,{symbol:"Rp",separator:".",decimal:",",precision:0}).format();case"JPY":return Me(n,{symbol:"¥",separator:",",decimal:".",precision:0}).format();case"GBP":return Me(n,{symbol:"£",separator:",",decimal:".",precision:2}).format();case"CNY":return Me(n,{symbol:"¥",separator:",",decimal:".",precision:2}).format();case"KRW":return Me(n,{symbol:"₩",separator:",",decimal:".",precision:0}).format();case"SGD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"AUD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CAD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CHF":return Me(n,{symbol:"Fr",separator:",",decimal:".",precision:2}).format();case"NZD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"SEK":return Me(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"NOK":return Me(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"DKK":return Me(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"BRL":return Me(n,{symbol:"R$",separator:",",decimal:".",precision:2}).format();case"INR":return Me(n,{symbol:"₹",separator:",",decimal:".",precision:2}).format();case"TRY":return Me(n,{symbol:"₺",separator:",",decimal:".",precision:2}).format();case"ZAR":return Me(n,{symbol:"R",separator:",",decimal:".",precision:2}).format();case"RUB":return Me(n,{symbol:"₽",separator:",",decimal:".",precision:2}).format();case"PLN":return Me(n,{symbol:"zł",separator:",",decimal:".",precision:2}).format();case"HUF":return Me(n,{symbol:"Ft",separator:",",decimal:".",precision:2}).format();case"CZK":return Me(n,{symbol:"Kč",separator:",",decimal:".",precision:2}).format();case"THB":return Me(n,{symbol:"฿",separator:",",decimal:".",precision:2}).format();case"MYR":return Me(n,{symbol:"RM",separator:",",decimal:".",precision:2}).format();case"PHP":return Me(n,{symbol:"₱",separator:",",decimal:".",precision:2}).format();case"VND":return Me(n,{symbol:"₫",separator:",",decimal:".",precision:2}).format();default:return Me(n).format()}},gp=(e,o="short",n="id-ID")=>{const r=typeof e=="string"?new Date(e):e,a=c=>String(c).padStart(2,"0"),s=c=>`${a(c.getHours())}:${a(c.getMinutes())}:${a(c.getSeconds())}`,l={id:"id-ID",en:"en-GB"}[n]||n;return o==="time"?s(r):o==="datetime"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r):o==="long"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(r):new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric"}).format(r)},bp=e=>new Promise((o,n)=>{const r=document.createElement("textarea");r.value=e,r.style.top="0",r.style.left="0",r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?o():n(new Error("Copy command was unsuccessful"))}catch(a){n(a)}finally{document.body.removeChild(r)}}),yp=async e=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e):bp(e),No=(e,o)=>{if(!e)return null;if(o[e])return o[e];const n=e.split(/[-_]/).map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join("");return o[n]||null},Il=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fl=fl,yr=(e,o)=>n=>{var r;if((o==null?void 0:o.variants)==null)return Fl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:s}=o,i=Object.keys(a).map(d=>{const f=n==null?void 0:n[d],u=s==null?void 0:s[d];if(f===null)return null;const h=Il(f)||Il(u);return a[d][h]}),l=n&&Object.entries(n).reduce((d,f)=>{let[u,h]=f;return h===void 0||(d[u]=h),d},{}),c=o==null||(r=o.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:h,...m}=f;return Object.entries(m).every(p=>{let[y,b]=p;return Array.isArray(b)?b.includes({...s,...l}[y]):{...s,...l}[y]===b})?[...d,u,h]:d},[]);return Fl(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Pt=t.defineComponent({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(_e.Primitive),{as:e.as,"as-child":e.asChild,class:t.normalizeClass(t.unref(Te)(t.unref(Yo)({variant:e.variant,size:e.size}),o.class))},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),Yo=yr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8","icon-sm":"size-7","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),zl=t.defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:o}){const n=e,r=o,a=_e.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(_e.TooltipRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),$l=t.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(_e.TooltipPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(_e.TooltipContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Te)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),jl=t.defineComponent({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(_e.TooltipProvider),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),Ul=t.defineComponent({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(_e.TooltipTrigger),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),xp={class:"relative z-10"},kp="font-medium transition-all duration-300 ease-in-out hover:-translate-y-0.5 hover:scale-[1.02] active:translate-y-0 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-60 disabled:cursor-not-allowed disabled:shadow-none disabled:translate-y-0 disabled:scale-100 relative overflow-hidden before:absolute before:inset-0 before:bg-white/20 before:translate-y-full before:transition-transform before:duration-300 hover:before:translate-y-0",wp=t.defineComponent({name:"DCodeButton",inheritAttrs:!1,__name:"DCodeButton",props:{icon:{},text:{default:""},variant:{default:"default"},size:{default:"default"},tooltip:{default:""},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"lg"},borderStyle:{default:"solid"},disabled:{type:Boolean,default:!1},type:{default:"button"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},setup(e){const o=t.useAttrs(),n=e,r=t.computed(()=>No(n.icon,Rt)),a=t.computed(()=>!!n.tooltip),s=t.computed(()=>n.visible??!0),i=t.computed(()=>{const H=String(n.variant||"default").toLowerCase();return H==="tonal"?"secondary":H==="elevated"?"default":H}),l=t.computed(()=>String(n.bgColor||"").toLowerCase()),c=t.computed(()=>String(n.type||"button").toLowerCase()),d=t.computed(()=>{const{class:H,...W}=o;return W}),f=t.computed(()=>Te(o.class)),u=t.computed(()=>((f.value??"").match(/\b(?:w|h|min-w|min-h|max-w|max-h)-[^\s]+\b/g)??[]).join(" ")),h=t.computed(()=>n.size==="sm"?"h-9":n.size==="lg"?"h-11":n.size==="icon"?"h-10 w-10":"h-10"),m=t.computed(()=>n.size==="icon"?"":!n.text&&n.icon?"w-10":"w-28"),p=t.computed(()=>n.rounded?n.rounded.startsWith("rounded")?n.rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"}[n.rounded]||`rounded-${n.rounded}`:""),y=t.computed(()=>!n.borderStyle||n.borderStyle==="none"?"border-0":n.borderStyle==="solid"?"border-2":{dashed:"border-[3px] border-dashed",dotted:"border-[3px] border-dotted",double:"border-[6px] border-double"}[n.borderStyle]||"border-2"),b=t.computed(()=>Te("inline-flex items-center justify-center bg-gray-200 dark:bg-gray-700 animate-pulse",p.value,h.value,m.value,u.value)),g=t.computed(()=>{const W=(f.value??"").match(/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),_=t.computed(()=>{const W=(f.value??"").match(/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),E=t.computed(()=>!!g.value),B=t.computed(()=>/\bborder-/.test(f.value??"")),A=t.computed(()=>/\bhover:/.test(f.value??"")),C=t.computed(()=>{const H=f.value??"";return i.value!=="outline"?H:H.replaceAll(/\bbg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\bhover:bg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\s+/gu," ").trim()}),x=t.ref(null),w=H=>{const W=H.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/u);return W?{r:Number(W[1]),g:Number(W[2]),b:Number(W[3]),a:W[4]?Number(W[4]):1}:null},D=(H,W)=>{const Z=w(H);if(!Z)return H;const oe=ye=>Math.max(0,Math.min(255,Math.round(ye)));return`rgba(${oe(Z.r*(1-W))}, ${oe(Z.g*(1-W))}, ${oe(Z.b*(1-W))}, ${Z.a})`},k=H=>{if(globalThis.window===void 0)return null;const W=document.createElement("div");W.className=H,W.style.position="absolute",W.style.visibility="hidden",W.style.pointerEvents="none",W.style.width="1px",W.style.height="1px",document.body.appendChild(W);const Z=globalThis.getComputedStyle(W).backgroundColor;return W.remove(),!Z||Z==="transparent"||Z==="rgba(0, 0, 0, 0)"?null:Z},v=[50,100,200,300,400,500,600,700,800,900,950],S=H=>{const W=v.indexOf(H);return W===-1?H:v[Math.min(v.length-1,W+2)]},N=(H,W)=>{const Z=cp[H];if(!Z)return null;if(typeof Z=="string")return Z;if(!W)return null;const oe=Z[W];return typeof oe=="string"?oe:null},V=(H,W=!1)=>{if(!H)return null;const Z=W?/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u:/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u,oe=H.match(Z);return oe?{colorName:oe[1],shade:oe[2]?Number.parseInt(oe[2],10):null}:null},L=()=>{const H=g.value;if(!H){x.value=null;return}const W=V(H),Z=W==null?void 0:W.colorName,oe=(W==null?void 0:W.shade)??null,ye=(Z?N(Z,oe):null)??k(H);if(!ye){x.value=null;return}let Ne;const we=V(_.value,!0),Q=we?N(we.colorName,we.shade??null):null;if(Q)Ne=Q;else if(Z&&oe){const $=S(oe);Ne=N(Z,$)??D(ye,.2)}else Ne=D(ye,.2);x.value={"--btn-color":ye,"--btn-color-hover":Ne}};t.onMounted(()=>{L()}),t.watch([g,_],async()=>{await t.nextTick(),L()});const O=t.computed(()=>{const H=/\bdark:bg-/.test(f.value??"");return!E.value||i.value==="outline"||H?"":x.value?"dcode-btn--fill dcode-btn--fill-hover":A.value?"":"hover:brightness-90"}),P=t.computed(()=>{if(!E.value||i.value!=="outline")return"";const H=["dcode-btn--outline","dcode-btn--outline-hover"];return B.value||H.push("border"),!x.value&&!A.value&&H.push("hover:brightness-90"),H.join(" ")}),R=t.computed(()=>x.value??void 0),j={primary:{bg:"bg-blue-600 dark:bg-blue-500",border:"border-blue-700 dark:border-blue-400",text:"text-white",hoverBg:"hover:bg-blue-700 dark:hover:bg-blue-600",hoverBorder:"hover:border-blue-800 dark:hover:border-blue-500",hoverText:"hover:text-white"},success:{bg:"bg-green-600 dark:bg-green-500",border:"border-green-700 dark:border-green-400",text:"text-white",hoverBg:"hover:bg-green-700 dark:hover:bg-green-600",hoverBorder:"hover:border-green-800 dark:hover:border-green-500",hoverText:"hover:text-white"},warning:{bg:"bg-yellow-500 dark:bg-yellow-400",border:"border-yellow-600 dark:border-yellow-300",text:"text-white",hoverBg:"hover:bg-yellow-600 dark:hover:bg-yellow-500",hoverBorder:"hover:border-yellow-700 dark:hover:border-yellow-400",hoverText:"hover:text-white"},danger:{bg:"bg-red-600 dark:bg-red-500",border:"border-red-700 dark:border-red-400",text:"text-white",hoverBg:"hover:bg-red-700 dark:hover:bg-red-600",hoverBorder:"hover:border-red-800 dark:hover:border-red-500",hoverText:"hover:text-white"},info:{bg:"bg-cyan-600 dark:bg-cyan-500",border:"border-cyan-700 dark:border-cyan-400",text:"text-white",hoverBg:"hover:bg-cyan-700 dark:hover:bg-cyan-600",hoverBorder:"hover:border-cyan-800 dark:hover:border-cyan-500",hoverText:"hover:text-white"},secondary:{bg:"bg-gray-600 dark:bg-gray-500",border:"border-gray-700 dark:border-gray-400",text:"text-white",hoverBg:"hover:bg-gray-700 dark:hover:bg-gray-600",hoverBorder:"hover:border-gray-800 dark:hover:border-gray-500",hoverText:"hover:text-white"},purple:{bg:"bg-purple-600 dark:bg-purple-500",border:"border-purple-700 dark:border-purple-400",text:"text-white",hoverBg:"hover:bg-purple-700 dark:hover:bg-purple-600",hoverBorder:"hover:border-purple-800 dark:hover:border-purple-500",hoverText:"hover:text-white"},pink:{bg:"bg-pink-600 dark:bg-pink-500",border:"border-pink-700 dark:border-pink-400",text:"text-white",hoverBg:"hover:bg-pink-700 dark:hover:bg-pink-600",hoverBorder:"hover:border-pink-800 dark:hover:border-pink-500",hoverText:"hover:text-white"},dark:{bg:"bg-gray-900 dark:bg-gray-800",border:"border-black dark:border-gray-700",text:"text-white",hoverBg:"hover:bg-black dark:hover:bg-gray-950",hoverBorder:"hover:border-black dark:hover:border-gray-600",hoverText:"hover:text-white"},light:{bg:"bg-gray-100 dark:bg-gray-800",border:"border-gray-300 dark:border-gray-600",text:"text-gray-900 dark:text-gray-100",hoverBg:"hover:bg-gray-200 dark:hover:bg-gray-700",hoverBorder:"hover:border-gray-400 dark:hover:border-gray-500",hoverText:"hover:text-gray-900 dark:hover:text-gray-100"}},T={"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",hover:"hover:from-emerald-600 hover:to-teal-600"}},F=t.computed(()=>{const H=[],W=l.value,Z=String(n.borderColor||"").toLowerCase(),oe=W?j[W]:null,ye=W?T[W]:null,Ne=Z?j[Z]:null;return W&&(oe?Ne&&Z!==W?(H.push(oe.bg,Ne.hoverBg),n.textColor||H.push(oe.text,Ne.hoverText)):(H.push(oe.bg,oe.hoverBg),n.textColor||H.push(oe.text,oe.hoverText)):ye?(H.push(ye.bg,ye.hover),n.textColor||H.push(ye.text)):W==="transparent"?Ne?(H.push("bg-transparent",Ne.hoverBg),n.textColor||H.push("text-inherit",Ne.hoverText)):H.push("bg-transparent hover:bg-black/5 dark:hover:bg-white/5"):H.push(W)),Z?Ne?H.push(Ne.border,Ne.hoverBorder):H.push(Z):oe&&i.value!=="ghost"&&i.value!=="link"&&H.push(oe.border,oe.hoverBorder),n.textColor&&H.push(n.textColor),H.join(" ")}),X=t.computed(()=>Te(kp,p.value,y.value,C.value,O.value,P.value,F.value));return(H,W)=>s.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.skeleton?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.value),"aria-hidden":"true"},null,2)):(t.openBlock(),t.createBlock(t.unref(jl),{key:1,"delay-duration":0},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createBlock(t.unref(zl),{key:0},{default:t.withCtx(()=>[t.createVNode(t.unref(Ul),{"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(Pt),t.mergeProps({variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:X.value,style:R.value},d.value),{default:t.withCtx(()=>[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):t.createCommentVNode("",!0),n.text?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(r.value?"ml-1":"")},t.toDisplayString(n.text),3)):t.createCommentVNode("",!0)]),_:1},16,["variant","size","disabled","type","class","style"])]),_:1}),t.createVNode(t.unref($l),{side:"top","side-offset":8,class:"animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0"},{default:t.withCtx(()=>[t.createElementVNode("span",xp,t.toDisplayString(n.tooltip),1)]),_:1})]),_:1})):(t.openBlock(),t.createBlock(t.unref(Pt),t.mergeProps({key:1,variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:X.value,style:R.value},d.value),{default:t.withCtx(()=>[t.renderSlot(H.$slots,"default",{},()=>[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):t.createCommentVNode("",!0),n.text?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(r.value?"ml-1":"")},t.toDisplayString(n.text),3)):t.createCommentVNode("",!0)],!0)]),_:3},16,["variant","size","disabled","type","class","style"]))]),_:3}))],64)):t.createCommentVNode("",!0)}}),ft=(e,o)=>{const n=e.__vccOpts||e;for(const[r,a]of o)n[r]=a;return n},He=ft(wp,[["__scopeId","data-v-c123cb99"]]),Cp={class:"flex flex-col gap-1"},_p={key:0,class:"text-sm font-semibold text-neutral-900 dark:text-neutral-100 leading-tight"},Ep={key:1,class:"text-xs text-neutral-500 dark:text-neutral-400"},Bp={key:0,class:"flex items-center gap-2"},Sp={name:"DCodeCard"},Jo=t.defineComponent({...Sp,props:{level:{default:1},title:{},subtitle:{},shadow:{type:Boolean,default:!1},border:{type:Boolean,default:!0},padding:{default:"p-6"}},setup(e){const o=e,n=t.computed(()=>{switch(o.level){case 2:return"bg-neutral-50 dark:bg-neutral-800";case 3:return"bg-neutral-100 dark:bg-neutral-700";case 1:default:return"bg-white dark:bg-neutral-900"}});return(r,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transition-shadow duration-300 dcode-card",[n.value,{"shadow-md":e.shadow},{"border-transparent":!e.border},{"border border-neutral-200 dark:border-neutral-800":e.border&&e.level===1},{"border border-neutral-300 dark:border-neutral-700":e.border&&e.level!==1},"overflow-hidden"]])},[e.title||r.$slots.header||r.$slots.actions?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["flex items-center justify-between backdrop-blur-sm transition-colors duration-300",[e.title||r.$slots.header||r.$slots.actions?"px-4 py-3":"",e.title||r.$slots.header?"bg-neutral-200/50 dark:bg-neutral-950/40 border-b border-neutral-200 dark:border-neutral-800/50":"bg-transparent border-b-transparent"]])},[t.createElementVNode("div",Cp,[t.renderSlot(r.$slots,"header",{},()=>[e.title?(t.openBlock(),t.createElementBlock("h3",_p,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.subtitle?(t.openBlock(),t.createElementBlock("p",Ep,t.toDisplayString(e.subtitle),1)):t.createCommentVNode("",!0)])]),r.$slots.actions?(t.openBlock(),t.createElementBlock("div",Bp,[t.renderSlot(r.$slots,"actions")])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["relative z-10",e.padding])},[t.renderSlot(r.$slots,"default")],2),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["mt-6 pt-6 border-t border-neutral-200/60 dark:border-neutral-700/50",e.padding])},[t.renderSlot(r.$slots,"footer")],2)):t.createCommentVNode("",!0)],2))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();function Yt(){}Yt.prototype={diff:function(e,o){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.callback;typeof r=="function"&&(a=r,r={}),this.options=r;var s=this;function i(E){return a?(setTimeout(function(){a(void 0,E)},0),!0):E}e=this.castInput(e),o=this.castInput(o),e=this.removeEmpty(this.tokenize(e)),o=this.removeEmpty(this.tokenize(o));var l=o.length,c=e.length,d=1,f=l+c;r.maxEditLength&&(f=Math.min(f,r.maxEditLength));var u=(n=r.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+u,m=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(m[0],o,e,0);if(m[0].oldPos+1>=c&&p+1>=l)return i([{value:this.join(o),count:o.length}]);var y=-1/0,b=1/0;function g(){for(var E=Math.max(y,-d);E<=Math.min(b,d);E+=2){var B=void 0,A=m[E-1],C=m[E+1];A&&(m[E-1]=void 0);var x=!1;if(C){var w=C.oldPos-E;x=C&&0<=w&&w<l}var D=A&&A.oldPos+1<c;if(!x&&!D){m[E]=void 0;continue}if(!D||x&&A.oldPos+1<C.oldPos?B=s.addToPath(C,!0,void 0,0):B=s.addToPath(A,void 0,!0,1),p=s.extractCommon(B,o,e,E),B.oldPos+1>=c&&p+1>=l)return i(Ap(s,B.lastComponent,o,e,s.useLongestToken));m[E]=B,B.oldPos+1>=c&&(b=Math.min(b,E-1)),p+1>=l&&(y=Math.max(y,E+1))}d++}if(a)(function E(){setTimeout(function(){if(d>f||Date.now()>h)return a();g()||E()},0)})();else for(;d<=f&&Date.now()<=h;){var _=g();if(_)return _}},addToPath:function(e,o,n,r){var a=e.lastComponent;return a&&a.added===o&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:o,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:o,removed:n,previousComponent:a}}},extractCommon:function(e,o,n,r){for(var a=o.length,s=n.length,i=e.oldPos,l=i-r,c=0;l+1<a&&i+1<s&&this.equals(o[l+1],n[i+1]);)l++,i++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=i,l},equals:function(e,o){return this.options.comparator?this.options.comparator(e,o):e===o||this.options.ignoreCase&&e.toLowerCase()===o.toLowerCase()},removeEmpty:function(e){for(var o=[],n=0;n<e.length;n++)e[n]&&o.push(e[n]);return o},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function Ap(e,o,n,r,a){for(var s=[],i;o;)s.push(o),i=o.previousComponent,delete o.previousComponent,o=i;s.reverse();for(var l=0,c=s.length,d=0,f=0;l<c;l++){var u=s[l];if(u.removed){if(u.value=e.join(r.slice(f,f+u.count)),f+=u.count,l&&s[l-1].added){var h=s[l-1];s[l-1]=s[l],s[l]=h}}else{if(!u.added&&a){var m=n.slice(d,d+u.count);m=m.map(function(y,b){var g=r[f+b];return g.length>y.length?g:y}),u.value=e.join(m)}else u.value=e.join(n.slice(d,d+u.count));d+=u.count,u.added||(f+=u.count)}}var p=s[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(s[c-2].value+=p.value,s.pop()),s}var vp=new Yt;function Dp(e,o,n){return vp.diff(e,o,n)}function Np(e,o){if(typeof e=="function")o.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}var Wl=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Hl=/\S/,es=new Yt;es.equals=function(e,o){return this.options.ignoreCase&&(e=e.toLowerCase(),o=o.toLowerCase()),e===o||this.options.ignoreWhitespace&&!Hl.test(e)&&!Hl.test(o)},es.tokenize=function(e){for(var o=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<o.length-1;n++)!o[n+1]&&o[n+2]&&Wl.test(o[n])&&Wl.test(o[n+2])&&(o[n]+=o[n+2],o.splice(n+1,2),n--);return o};function Vp(e,o,n){return n=Np(n,{ignoreWhitespace:!0}),es.diff(e,o,n)}var ql=new Yt;ql.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
8
|
-
`));var o=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var a=n[r];r%2&&!this.options.newlineIsToken?o[o.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),o.push(a))}return o};var Mp=new Yt;Mp.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Tp=new Yt;Tp.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function xr(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xr=function(o){return typeof o}:xr=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},xr(e)}var Pp=Object.prototype.toString,An=new Yt;An.useLongestToken=!0,An.tokenize=ql.tokenize,An.castInput=function(e){var o=this.options,n=o.undefinedReplacement,r=o.stringifyReplacer,a=r===void 0?function(s,i){return typeof i>"u"?n:i}:r;return typeof e=="string"?e:JSON.stringify(ts(e,null,null,a),a," ")},An.equals=function(e,o){return Yt.prototype.equals.call(An,e.replace(/,([\r\n])/g,"$1"),o.replace(/,([\r\n])/g,"$1"))};function ts(e,o,n,r,a){o=o||[],n=n||[],r&&(e=r(a,e));var s;for(s=0;s<o.length;s+=1)if(o[s]===e)return n[s];var i;if(Pp.call(e)==="[object Array]"){for(o.push(e),i=new Array(e.length),n.push(i),s=0;s<e.length;s+=1)i[s]=ts(e[s],o,n,r,a);return o.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),xr(e)==="object"&&e!==null){o.push(e),i={},n.push(i);var l=[],c;for(c in e)e.hasOwnProperty(c)&&l.push(c);for(l.sort(),s=0;s<l.length;s+=1)c=l[s],i[c]=ts(e[c],o,n,r,c);o.pop(),n.pop()}else i=e;return i}var os=new Yt;os.tokenize=function(e){return e.slice()},os.join=os.removeEmpty=function(e){return e};function Op(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gl={exports:{}};(function(e){var o=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,a=0;o.Diff=function(s,i){return[s,i]},o.prototype.diff_main=function(s,i,l,c){typeof c>"u"&&(this.Diff_Timeout<=0?c=Number.MAX_VALUE:c=new Date().getTime()+this.Diff_Timeout*1e3);var d=c;if(s==null||i==null)throw new Error("Null input. (diff_main)");if(s==i)return s?[new o.Diff(a,s)]:[];typeof l>"u"&&(l=!0);var f=l,u=this.diff_commonPrefix(s,i),h=s.substring(0,u);s=s.substring(u),i=i.substring(u),u=this.diff_commonSuffix(s,i);var m=s.substring(s.length-u);s=s.substring(0,s.length-u),i=i.substring(0,i.length-u);var p=this.diff_compute_(s,i,f,d);return h&&p.unshift(new o.Diff(a,h)),m&&p.push(new o.Diff(a,m)),this.diff_cleanupMerge(p),p},o.prototype.diff_compute_=function(s,i,l,c){var d;if(!s)return[new o.Diff(r,i)];if(!i)return[new o.Diff(n,s)];var f=s.length>i.length?s:i,u=s.length>i.length?i:s,h=f.indexOf(u);if(h!=-1)return d=[new o.Diff(r,f.substring(0,h)),new o.Diff(a,u),new o.Diff(r,f.substring(h+u.length))],s.length>i.length&&(d[0][0]=d[2][0]=n),d;if(u.length==1)return[new o.Diff(n,s),new o.Diff(r,i)];var m=this.diff_halfMatch_(s,i);if(m){var p=m[0],y=m[1],b=m[2],g=m[3],
|
|
9
|
-
`,y),b==-1&&(b=m.length-1);var _=m.substring(y,b+1);(c.hasOwnProperty?c.hasOwnProperty(_):c[_]!==void 0)?p+=String.fromCharCode(c[_]):(g==f&&(_=m.substring(y),b=m.length),p+=String.fromCharCode(g),c[_]=g,l[g++]=_),y=b+1}return p}var f=4e4,u=d(s);f=65535;var h=d(i);return{chars1:u,chars2:h,lineArray:l}},o.prototype.diff_charsToLines_=function(s,i){for(var l=0;l<s.length;l++){for(var c=s[l][1],d=[],f=0;f<c.length;f++)d[f]=i[c.charCodeAt(f)];s[l][1]=d.join("")}},o.prototype.diff_commonPrefix=function(s,i){if(!s||!i||s.charAt(0)!=i.charAt(0))return 0;for(var l=0,c=Math.min(s.length,i.length),d=c,f=0;l<d;)s.substring(f,d)==i.substring(f,d)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},o.prototype.diff_commonSuffix=function(s,i){if(!s||!i||s.charAt(s.length-1)!=i.charAt(i.length-1))return 0;for(var l=0,c=Math.min(s.length,i.length),d=c,f=0;l<d;)s.substring(s.length-d,s.length-f)==i.substring(i.length-d,i.length-f)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},o.prototype.diff_commonOverlap_=function(s,i){var l=s.length,c=i.length;if(l==0||c==0)return 0;l>c?s=s.substring(l-c):l<c&&(i=i.substring(0,l));var d=Math.min(l,c);if(s==i)return d;for(var f=0,u=1;;){var h=s.substring(d-u),m=i.indexOf(h);if(m==-1)return f;u+=m,(m==0||s.substring(d-u)==i.substring(0,u))&&(f=u,u++)}},o.prototype.diff_halfMatch_=function(s,i){if(this.Diff_Timeout<=0)return null;var l=s.length>i.length?s:i,c=s.length>i.length?i:s;if(l.length<4||c.length*2<l.length)return null;var d=this;function f(E,B,A){for(var C=E.substring(A,A+Math.floor(E.length/4)),x=-1,w="",D,k,v,S;(x=B.indexOf(C,x+1))!=-1;){var N=d.diff_commonPrefix(E.substring(A),B.substring(x)),V=d.diff_commonSuffix(E.substring(0,A),B.substring(0,x));w.length<V+N&&(w=B.substring(x-V,x)+B.substring(x,x+N),D=E.substring(0,A-V),k=E.substring(A+N),v=B.substring(0,x-V),S=B.substring(x+N))}return w.length*2>=E.length?[D,k,v,S,w]:null}var u=f(l,c,Math.ceil(l.length/4)),h=f(l,c,Math.ceil(l.length/2)),m;if(!u&&!h)return null;h?u?m=u[4].length>h[4].length?u:h:m=h:m=u;var p,y,b,g;s.length>i.length?(p=m[0],y=m[1],b=m[2],g=m[3]):(b=m[0],g=m[1],p=m[2],y=m[3]);var _=m[4];return[p,y,b,g,_]},o.prototype.diff_cleanupSemantic=function(s){for(var i=!1,l=[],c=0,d=null,f=0,u=0,h=0,m=0,p=0;f<s.length;)s[f][0]==a?(l[c++]=f,u=m,h=p,m=0,p=0,d=s[f][1]):(s[f][0]==r?m+=s[f][1].length:p+=s[f][1].length,d&&d.length<=Math.max(u,h)&&d.length<=Math.max(m,p)&&(s.splice(l[c-1],0,new o.Diff(n,d)),s[l[c-1]+1][0]=r,c--,c--,f=c>0?l[c-1]:-1,u=0,h=0,m=0,p=0,d=null,i=!0)),f++;for(i&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),f=1;f<s.length;){if(s[f-1][0]==n&&s[f][0]==r){var y=s[f-1][1],b=s[f][1],g=this.diff_commonOverlap_(y,b),_=this.diff_commonOverlap_(b,y);g>=_?(g>=y.length/2||g>=b.length/2)&&(s.splice(f,0,new o.Diff(a,b.substring(0,g))),s[f-1][1]=y.substring(0,y.length-g),s[f+1][1]=b.substring(g),f++):(_>=y.length/2||_>=b.length/2)&&(s.splice(f,0,new o.Diff(a,y.substring(0,_))),s[f-1][0]=r,s[f-1][1]=b.substring(0,b.length-_),s[f+1][0]=n,s[f+1][1]=y.substring(_),f++),f++}f++}},o.prototype.diff_cleanupSemanticLossless=function(s){function i(_,E){if(!_||!E)return 6;var B=_.charAt(_.length-1),A=E.charAt(0),C=B.match(o.nonAlphaNumericRegex_),x=A.match(o.nonAlphaNumericRegex_),w=C&&B.match(o.whitespaceRegex_),D=x&&A.match(o.whitespaceRegex_),k=w&&B.match(o.linebreakRegex_),v=D&&A.match(o.linebreakRegex_),S=k&&_.match(o.blanklineEndRegex_),N=v&&E.match(o.blanklineStartRegex_);return S||N?5:k||v?4:C&&!w&&D?3:w||D?2:C||x?1:0}for(var l=1;l<s.length-1;){if(s[l-1][0]==a&&s[l+1][0]==a){var c=s[l-1][1],d=s[l][1],f=s[l+1][1],u=this.diff_commonSuffix(c,d);if(u){var h=d.substring(d.length-u);c=c.substring(0,c.length-u),d=h+d.substring(0,d.length-u),f=h+f}for(var m=c,p=d,y=f,b=i(c,d)+i(d,f);d.charAt(0)===f.charAt(0);){c+=d.charAt(0),d=d.substring(1)+f.charAt(0),f=f.substring(1);var g=i(c,d)+i(d,f);g>=b&&(b=g,m=c,p=d,y=f)}s[l-1][1]!=m&&(m?s[l-1][1]=m:(s.splice(l-1,1),l--),s[l][1]=p,y?s[l+1][1]=y:(s.splice(l+1,1),l--))}l++}},o.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,o.whitespaceRegex_=/\s/,o.linebreakRegex_=/[\r\n]/,o.blanklineEndRegex_=/\n\r?\n$/,o.blanklineStartRegex_=/^\r?\n\r?\n/,o.prototype.diff_cleanupEfficiency=function(s){for(var i=!1,l=[],c=0,d=null,f=0,u=!1,h=!1,m=!1,p=!1;f<s.length;)s[f][0]==a?(s[f][1].length<this.Diff_EditCost&&(m||p)?(l[c++]=f,u=m,h=p,d=s[f][1]):(c=0,d=null),m=p=!1):(s[f][0]==n?p=!0:m=!0,d&&(u&&h&&m&&p||d.length<this.Diff_EditCost/2&&u+h+m+p==3)&&(s.splice(l[c-1],0,new o.Diff(n,d)),s[l[c-1]+1][0]=r,c--,d=null,u&&h?(m=p=!0,c=0):(c--,f=c>0?l[c-1]:-1,m=p=!1),i=!0)),f++;i&&this.diff_cleanupMerge(s)},o.prototype.diff_cleanupMerge=function(s){s.push(new o.Diff(a,""));for(var i=0,l=0,c=0,d="",f="",u;i<s.length;)switch(s[i][0]){case r:c++,f+=s[i][1],i++;break;case n:l++,d+=s[i][1],i++;break;case a:l+c>1?(l!==0&&c!==0&&(u=this.diff_commonPrefix(f,d),u!==0&&(i-l-c>0&&s[i-l-c-1][0]==a?s[i-l-c-1][1]+=f.substring(0,u):(s.splice(0,0,new o.Diff(a,f.substring(0,u))),i++),f=f.substring(u),d=d.substring(u)),u=this.diff_commonSuffix(f,d),u!==0&&(s[i][1]=f.substring(f.length-u)+s[i][1],f=f.substring(0,f.length-u),d=d.substring(0,d.length-u))),i-=l+c,s.splice(i,l+c),d.length&&(s.splice(i,0,new o.Diff(n,d)),i++),f.length&&(s.splice(i,0,new o.Diff(r,f)),i++),i++):i!==0&&s[i-1][0]==a?(s[i-1][1]+=s[i][1],s.splice(i,1)):i++,c=0,l=0,d="",f="";break}s[s.length-1][1]===""&&s.pop();var h=!1;for(i=1;i<s.length-1;)s[i-1][0]==a&&s[i+1][0]==a&&(s[i][1].substring(s[i][1].length-s[i-1][1].length)==s[i-1][1]?(s[i][1]=s[i-1][1]+s[i][1].substring(0,s[i][1].length-s[i-1][1].length),s[i+1][1]=s[i-1][1]+s[i+1][1],s.splice(i-1,1),h=!0):s[i][1].substring(0,s[i+1][1].length)==s[i+1][1]&&(s[i-1][1]+=s[i+1][1],s[i][1]=s[i][1].substring(s[i+1][1].length)+s[i+1][1],s.splice(i+1,1),h=!0)),i++;h&&this.diff_cleanupMerge(s)},o.prototype.diff_xIndex=function(s,i){var l=0,c=0,d=0,f=0,u;for(u=0;u<s.length&&(s[u][0]!==r&&(l+=s[u][1].length),s[u][0]!==n&&(c+=s[u][1].length),!(l>i));u++)d=l,f=c;return s.length!=u&&s[u][0]===n?f:f+(i-d)},o.prototype.diff_prettyHtml=function(s){for(var i=[],l=/&/g,c=/</g,d=/>/g,f=/\n/g,u=0;u<s.length;u++){var h=s[u][0],m=s[u][1],p=m.replace(l,"&").replace(c,"<").replace(d,">").replace(f,"¶<br>");switch(h){case r:i[u]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:i[u]='<del style="background:#ffe6e6;">'+p+"</del>";break;case a:i[u]="<span>"+p+"</span>";break}}return i.join("")},o.prototype.diff_text1=function(s){for(var i=[],l=0;l<s.length;l++)s[l][0]!==r&&(i[l]=s[l][1]);return i.join("")},o.prototype.diff_text2=function(s){for(var i=[],l=0;l<s.length;l++)s[l][0]!==n&&(i[l]=s[l][1]);return i.join("")},o.prototype.diff_levenshtein=function(s){for(var i=0,l=0,c=0,d=0;d<s.length;d++){var f=s[d][0],u=s[d][1];switch(f){case r:l+=u.length;break;case n:c+=u.length;break;case a:i+=Math.max(l,c),l=0,c=0;break}}return i+=Math.max(l,c),i},o.prototype.diff_toDelta=function(s){for(var i=[],l=0;l<s.length;l++)switch(s[l][0]){case r:i[l]="+"+encodeURI(s[l][1]);break;case n:i[l]="-"+s[l][1].length;break;case a:i[l]="="+s[l][1].length;break}return i.join(" ").replace(/%20/g," ")},o.prototype.diff_fromDelta=function(s,i){for(var l=[],c=0,d=0,f=i.split(/\t/g),u=0;u<f.length;u++){var h=f[u].substring(1);switch(f[u].charAt(0)){case"+":try{l[c++]=new o.Diff(r,decodeURI(h))}catch{throw new Error("Illegal escape in diff_fromDelta: "+h)}break;case"-":case"=":var m=parseInt(h,10);if(isNaN(m)||m<0)throw new Error("Invalid number in diff_fromDelta: "+h);var p=s.substring(d,d+=m);f[u].charAt(0)=="="?l[c++]=new o.Diff(a,p):l[c++]=new o.Diff(n,p);break;default:if(f[u])throw new Error("Invalid diff operation in diff_fromDelta: "+f[u])}}if(d!=s.length)throw new Error("Delta length ("+d+") does not equal source text length ("+s.length+").");return l},o.prototype.match_main=function(s,i,l){if(s==null||i==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,s.length)),s==i?0:s.length?s.substring(l,l+i.length)==i?l:this.match_bitap_(s,i,l):-1},o.prototype.match_bitap_=function(s,i,l){if(i.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var c=this.match_alphabet_(i),d=this;function f(D,k){var v=D/i.length,S=Math.abs(l-k);return d.Match_Distance?v+S/d.Match_Distance:S?1:v}var u=this.Match_Threshold,h=s.indexOf(i,l);h!=-1&&(u=Math.min(f(0,h),u),h=s.lastIndexOf(i,l+i.length),h!=-1&&(u=Math.min(f(0,h),u)));var m=1<<i.length-1;h=-1;for(var p,y,b=i.length+s.length,g,_=0;_<i.length;_++){for(p=0,y=b;p<y;)f(_,l+y)<=u?p=y:b=y,y=Math.floor((b-p)/2+p);b=y;var E=Math.max(1,l-y+1),B=Math.min(l+y,s.length)+i.length,A=Array(B+2);A[B+1]=(1<<_)-1;for(var C=B;C>=E;C--){var x=c[s.charAt(C-1)];if(_===0?A[C]=(A[C+1]<<1|1)&x:A[C]=(A[C+1]<<1|1)&x|((g[C+1]|g[C])<<1|1)|g[C+1],A[C]&m){var w=f(_,C-1);if(w<=u)if(u=w,h=C-1,h>l)E=Math.max(1,2*l-h);else break}}if(f(_+1,l)>u)break;g=A}return h},o.prototype.match_alphabet_=function(s){for(var i={},l=0;l<s.length;l++)i[s.charAt(l)]=0;for(var l=0;l<s.length;l++)i[s.charAt(l)]|=1<<s.length-l-1;return i},o.prototype.patch_addContext_=function(s,i){if(i.length!=0){if(s.start2===null)throw Error("patch not initialized");for(var l=i.substring(s.start2,s.start2+s.length1),c=0;i.indexOf(l)!=i.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)c+=this.Patch_Margin,l=i.substring(s.start2-c,s.start2+s.length1+c);c+=this.Patch_Margin;var d=i.substring(s.start2-c,s.start2);d&&s.diffs.unshift(new o.Diff(a,d));var f=i.substring(s.start2+s.length1,s.start2+s.length1+c);f&&s.diffs.push(new o.Diff(a,f)),s.start1-=d.length,s.start2-=d.length,s.length1+=d.length+f.length,s.length2+=d.length+f.length}},o.prototype.patch_make=function(s,i,l){var c,d;if(typeof s=="string"&&typeof i=="string"&&typeof l>"u")c=s,d=this.diff_main(c,i,!0),d.length>2&&(this.diff_cleanupSemantic(d),this.diff_cleanupEfficiency(d));else if(s&&typeof s=="object"&&typeof i>"u"&&typeof l>"u")d=s,c=this.diff_text1(d);else if(typeof s=="string"&&i&&typeof i=="object"&&typeof l>"u")c=s,d=i;else if(typeof s=="string"&&typeof i=="string"&&l&&typeof l=="object")c=s,d=l;else throw new Error("Unknown call format to patch_make.");if(d.length===0)return[];for(var f=[],u=new o.patch_obj,h=0,m=0,p=0,y=c,b=c,g=0;g<d.length;g++){var _=d[g][0],E=d[g][1];switch(!h&&_!==a&&(u.start1=m,u.start2=p),_){case r:u.diffs[h++]=d[g],u.length2+=E.length,b=b.substring(0,p)+E+b.substring(p);break;case n:u.length1+=E.length,u.diffs[h++]=d[g],b=b.substring(0,p)+b.substring(p+E.length);break;case a:E.length<=2*this.Patch_Margin&&h&&d.length!=g+1?(u.diffs[h++]=d[g],u.length1+=E.length,u.length2+=E.length):E.length>=2*this.Patch_Margin&&h&&(this.patch_addContext_(u,y),f.push(u),u=new o.patch_obj,h=0,y=b,m=p);break}_!==r&&(m+=E.length),_!==n&&(p+=E.length)}return h&&(this.patch_addContext_(u,y),f.push(u)),f},o.prototype.patch_deepCopy=function(s){for(var i=[],l=0;l<s.length;l++){var c=s[l],d=new o.patch_obj;d.diffs=[];for(var f=0;f<c.diffs.length;f++)d.diffs[f]=new o.Diff(c.diffs[f][0],c.diffs[f][1]);d.start1=c.start1,d.start2=c.start2,d.length1=c.length1,d.length2=c.length2,i[l]=d}return i},o.prototype.patch_apply=function(s,i){if(s.length==0)return[i,[]];s=this.patch_deepCopy(s);var l=this.patch_addPadding(s);i=l+i+l,this.patch_splitMax(s);for(var c=0,d=[],f=0;f<s.length;f++){var u=s[f].start2+c,h=this.diff_text1(s[f].diffs),m,p=-1;if(h.length>this.Match_MaxBits?(m=this.match_main(i,h.substring(0,this.Match_MaxBits),u),m!=-1&&(p=this.match_main(i,h.substring(h.length-this.Match_MaxBits),u+h.length-this.Match_MaxBits),(p==-1||m>=p)&&(m=-1))):m=this.match_main(i,h,u),m==-1)d[f]=!1,c-=s[f].length2-s[f].length1;else{d[f]=!0,c=m-u;var y;if(p==-1?y=i.substring(m,m+h.length):y=i.substring(m,p+this.Match_MaxBits),h==y)i=i.substring(0,m)+this.diff_text2(s[f].diffs)+i.substring(m+h.length);else{var b=this.diff_main(h,y,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(b)/h.length>this.Patch_DeleteThreshold)d[f]=!1;else{this.diff_cleanupSemanticLossless(b);for(var g=0,_,E=0;E<s[f].diffs.length;E++){var B=s[f].diffs[E];B[0]!==a&&(_=this.diff_xIndex(b,g)),B[0]===r?i=i.substring(0,m+_)+B[1]+i.substring(m+_):B[0]===n&&(i=i.substring(0,m+_)+i.substring(m+this.diff_xIndex(b,g+B[1].length))),B[0]!==n&&(g+=B[1].length)}}}}}return i=i.substring(l.length,i.length-l.length),[i,d]},o.prototype.patch_addPadding=function(s){for(var i=this.Patch_Margin,l="",c=1;c<=i;c++)l+=String.fromCharCode(c);for(var c=0;c<s.length;c++)s[c].start1+=i,s[c].start2+=i;var d=s[0],f=d.diffs;if(f.length==0||f[0][0]!=a)f.unshift(new o.Diff(a,l)),d.start1-=i,d.start2-=i,d.length1+=i,d.length2+=i;else if(i>f[0][1].length){var u=i-f[0][1].length;f[0][1]=l.substring(f[0][1].length)+f[0][1],d.start1-=u,d.start2-=u,d.length1+=u,d.length2+=u}if(d=s[s.length-1],f=d.diffs,f.length==0||f[f.length-1][0]!=a)f.push(new o.Diff(a,l)),d.length1+=i,d.length2+=i;else if(i>f[f.length-1][1].length){var u=i-f[f.length-1][1].length;f[f.length-1][1]+=l.substring(0,u),d.length1+=u,d.length2+=u}return l},o.prototype.patch_splitMax=function(s){for(var i=this.Match_MaxBits,l=0;l<s.length;l++)if(!(s[l].length1<=i)){var c=s[l];s.splice(l--,1);for(var d=c.start1,f=c.start2,u="";c.diffs.length!==0;){var h=new o.patch_obj,m=!0;for(h.start1=d-u.length,h.start2=f-u.length,u!==""&&(h.length1=h.length2=u.length,h.diffs.push(new o.Diff(a,u)));c.diffs.length!==0&&h.length1<i-this.Patch_Margin;){var p=c.diffs[0][0],y=c.diffs[0][1];p===r?(h.length2+=y.length,f+=y.length,h.diffs.push(c.diffs.shift()),m=!1):p===n&&h.diffs.length==1&&h.diffs[0][0]==a&&y.length>2*i?(h.length1+=y.length,d+=y.length,m=!1,h.diffs.push(new o.Diff(p,y)),c.diffs.shift()):(y=y.substring(0,i-h.length1-this.Patch_Margin),h.length1+=y.length,d+=y.length,p===a?(h.length2+=y.length,f+=y.length):m=!1,h.diffs.push(new o.Diff(p,y)),y==c.diffs[0][1]?c.diffs.shift():c.diffs[0][1]=c.diffs[0][1].substring(y.length))}u=this.diff_text2(h.diffs),u=u.substring(u.length-this.Patch_Margin);var b=this.diff_text1(c.diffs).substring(0,this.Patch_Margin);b!==""&&(h.length1+=b.length,h.length2+=b.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===a?h.diffs[h.diffs.length-1][1]+=b:h.diffs.push(new o.Diff(a,b))),m||s.splice(++l,0,h)}}},o.prototype.patch_toText=function(s){for(var i=[],l=0;l<s.length;l++)i[l]=s[l];return i.join("")},o.prototype.patch_fromText=function(s){var i=[];if(!s)return i;for(var l=s.split(`
|
|
7
|
+
*/var dp={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:mp,fromCents:!1},Ll=function(o){return Math.round(o)},Za=function(o){return Math.pow(10,o)},fp=function(o,n){return Ll(o/n)*n},up=/(\d)(?=(\d{3})+\b)/g,hp=/(\d)(?=(\d\d)+\d\b)/g;function Me(e,o){var n=this;if(!(n instanceof Me))return new Me(e,o);var r=Object.assign({},dp,o),a=Za(r.precision),s=br(e,r);n.intValue=s,n.value=s/a,r.increment=r.increment||1/a,r.useVedic?r.groups=hp:r.groups=up,this.s=r,this.p=a}function br(e,o){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=0,a=o.decimal,s=o.errorOnInvalid,i=o.precision,l=o.fromCents,c=Za(i),d=typeof e=="number",f=e instanceof Me;if(f&&l)return e.intValue;if(d||f)r=f?e.value:e;else if(typeof e=="string"){var u=new RegExp("[^-\\d"+a+"]","g"),h=new RegExp("\\"+a,"g");r=e.replace(/\((.*)\)/,"-$1").replace(u,"").replace(h,"."),r=r||0}else{if(s)throw Error("Invalid Input");r=0}return l||(r*=c,r=r.toFixed(4)),n?Ll(r):r}function mp(e,o){var n=o.pattern,r=o.negativePattern,a=o.symbol,s=o.separator,i=o.decimal,l=o.groups,c=(""+e).replace(/^-/,"").split("."),d=c[0],f=c[1];return(e.value>=0?n:r).replace("!",a).replace("#",d.replace(l,"$1"+s)+(f?i+f:""))}Me.prototype={add:function(o){var n=this.intValue,r=this.s,a=this.p;return Me((n+=br(o,r))/(r.fromCents?1:a),r)},subtract:function(o){var n=this.intValue,r=this.s,a=this.p;return Me((n-=br(o,r))/(r.fromCents?1:a),r)},multiply:function(o){var n=this.intValue,r=this.s;return Me((n*=o)/(r.fromCents?1:Za(r.precision)),r)},divide:function(o){var n=this.intValue,r=this.s;return Me(n/=br(o,r,!1),r)},distribute:function(o){for(var n=this.intValue,r=this.p,a=this.s,s=[],i=Math[n>=0?"floor":"ceil"](n/o),l=Math.abs(n-i*o),c=a.fromCents?1:r;o!==0;o--){var d=Me(i/c,a);l-- >0&&(d=d[n>=0?"add":"subtract"](1/c)),s.push(d)}return s},dollars:function(){return~~this.value},cents:function(){var o=this.intValue,n=this.p;return~~(o%n)},format:function(o){var n=this.s;return typeof o=="function"?o(this,n):n.format(this,Object.assign({},n,o))},toString:function(){var o=this.intValue,n=this.p,r=this.s;return fp(o/n,r.increment).toFixed(r.precision)},toJSON:function(){return this.value}};const pp=(e,o="IDR")=>{const n=Number(e);if(isNaN(n))return"-";switch(o.toUpperCase()){case"USD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"EUR":return Me(n,{symbol:"€",separator:".",decimal:",",precision:2}).format();case"IDR":return Me(n,{symbol:"Rp",separator:".",decimal:",",precision:0}).format();case"JPY":return Me(n,{symbol:"¥",separator:",",decimal:".",precision:0}).format();case"GBP":return Me(n,{symbol:"£",separator:",",decimal:".",precision:2}).format();case"CNY":return Me(n,{symbol:"¥",separator:",",decimal:".",precision:2}).format();case"KRW":return Me(n,{symbol:"₩",separator:",",decimal:".",precision:0}).format();case"SGD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"AUD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CAD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"CHF":return Me(n,{symbol:"Fr",separator:",",decimal:".",precision:2}).format();case"NZD":return Me(n,{symbol:"$",separator:",",decimal:".",precision:2}).format();case"SEK":return Me(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"NOK":return Me(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"DKK":return Me(n,{symbol:"kr",separator:",",decimal:".",precision:2}).format();case"BRL":return Me(n,{symbol:"R$",separator:",",decimal:".",precision:2}).format();case"INR":return Me(n,{symbol:"₹",separator:",",decimal:".",precision:2}).format();case"TRY":return Me(n,{symbol:"₺",separator:",",decimal:".",precision:2}).format();case"ZAR":return Me(n,{symbol:"R",separator:",",decimal:".",precision:2}).format();case"RUB":return Me(n,{symbol:"₽",separator:",",decimal:".",precision:2}).format();case"PLN":return Me(n,{symbol:"zł",separator:",",decimal:".",precision:2}).format();case"HUF":return Me(n,{symbol:"Ft",separator:",",decimal:".",precision:2}).format();case"CZK":return Me(n,{symbol:"Kč",separator:",",decimal:".",precision:2}).format();case"THB":return Me(n,{symbol:"฿",separator:",",decimal:".",precision:2}).format();case"MYR":return Me(n,{symbol:"RM",separator:",",decimal:".",precision:2}).format();case"PHP":return Me(n,{symbol:"₱",separator:",",decimal:".",precision:2}).format();case"VND":return Me(n,{symbol:"₫",separator:",",decimal:".",precision:2}).format();default:return Me(n).format()}},gp=(e,o="short",n="id-ID")=>{const r=typeof e=="string"?new Date(e):e,a=c=>String(c).padStart(2,"0"),s=c=>`${a(c.getHours())}:${a(c.getMinutes())}:${a(c.getSeconds())}`,l={id:"id-ID",en:"en-GB"}[n]||n;return o==="time"?s(r):o==="datetime"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r):o==="long"?new Intl.DateTimeFormat(l,{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(r):new Intl.DateTimeFormat(l,{day:"2-digit",month:"short",year:"numeric"}).format(r)},bp=e=>new Promise((o,n)=>{const r=document.createElement("textarea");r.value=e,r.style.top="0",r.style.left="0",r.style.position="fixed",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?o():n(new Error("Copy command was unsuccessful"))}catch(a){n(a)}finally{document.body.removeChild(r)}}),yp=async e=>navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e):bp(e),No=(e,o)=>{if(!e)return null;if(o[e])return o[e];const n=e.split(/[-_]/).map(r=>r.charAt(0).toUpperCase()+r.slice(1).toLowerCase()).join("");return o[n]||null},Il=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Fl=fl,yr=(e,o)=>n=>{var r;if((o==null?void 0:o.variants)==null)return Fl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:s}=o,i=Object.keys(a).map(d=>{const f=n==null?void 0:n[d],u=s==null?void 0:s[d];if(f===null)return null;const h=Il(f)||Il(u);return a[d][h]}),l=n&&Object.entries(n).reduce((d,f)=>{let[u,h]=f;return h===void 0||(d[u]=h),d},{}),c=o==null||(r=o.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:u,className:h,...m}=f;return Object.entries(m).every(p=>{let[y,b]=p;return Array.isArray(b)?b.includes({...s,...l}[y]):{...s,...l}[y]===b})?[...d,u,h]:d},[]);return Fl(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Pt=t.defineComponent({__name:"Button",props:{variant:{},size:{},class:{type:[Boolean,null,String,Object,Array]},asChild:{type:Boolean},as:{default:"button"}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ee.Primitive),{as:e.as,"as-child":e.asChild,class:t.normalizeClass(t.unref(Te)(t.unref(Yo)({variant:e.variant,size:e.size}),o.class))},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),Yo=yr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-8 w-8","icon-sm":"size-7","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),zl=t.defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:o}){const n=e,r=o,a=Ee.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(Ee.TooltipRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),$l=t.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=Ee.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(Ee.TooltipPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.TooltipContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Te)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),jl=t.defineComponent({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean},content:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ee.TooltipProvider),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),Ul=t.defineComponent({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ee.TooltipTrigger),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),xp={class:"relative z-10"},kp="font-medium transition-all duration-300 ease-in-out hover:-translate-y-0.5 hover:scale-[1.02] active:translate-y-0 active:scale-[0.98] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-60 disabled:cursor-not-allowed disabled:shadow-none disabled:translate-y-0 disabled:scale-100 relative overflow-hidden before:absolute before:inset-0 before:bg-white/20 before:translate-y-full before:transition-transform before:duration-300 hover:before:translate-y-0",wp=t.defineComponent({name:"DCodeButton",inheritAttrs:!1,__name:"DCodeButton",props:{icon:{},text:{default:""},variant:{default:"default"},size:{default:"default"},tooltip:{default:""},bgColor:{default:""},textColor:{default:""},borderColor:{default:""},rounded:{default:"lg"},borderStyle:{default:"solid"},disabled:{type:Boolean,default:!1},type:{default:"button"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},setup(e){const o=t.useAttrs(),n=e,r=t.computed(()=>No(n.icon,Lt)),a=t.computed(()=>!!n.tooltip),s=t.computed(()=>n.visible??!0),i=t.computed(()=>{const q=String(n.variant||"default").toLowerCase();return q==="tonal"?"secondary":q==="elevated"?"default":q}),l=t.computed(()=>String(n.bgColor||"").toLowerCase()),c=t.computed(()=>String(n.type||"button").toLowerCase()),d=t.computed(()=>{const{class:q,...W}=o;return W}),f=t.computed(()=>Te(o.class)),u=t.computed(()=>((f.value??"").match(/\b(?:w|h|min-w|min-h|max-w|max-h)-[^\s]+\b/g)??[]).join(" ")),h=t.computed(()=>n.size==="sm"?"h-9":n.size==="lg"?"h-11":n.size==="icon"?"h-10 w-10":"h-10"),m=t.computed(()=>n.size==="icon"?"":!n.text&&n.icon?"w-10":"w-28"),p=t.computed(()=>n.rounded?n.rounded.startsWith("rounded")?n.rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"}[n.rounded]||`rounded-${n.rounded}`:""),y=t.computed(()=>!n.borderStyle||n.borderStyle==="none"?"border-0":n.borderStyle==="solid"?"border-2":{dashed:"border-[3px] border-dashed",dotted:"border-[3px] border-dotted",double:"border-[6px] border-double"}[n.borderStyle]||"border-2"),b=t.computed(()=>Te("inline-flex items-center justify-center bg-gray-200 dark:bg-gray-700 animate-pulse",p.value,h.value,m.value,u.value)),g=t.computed(()=>{const W=(f.value??"").match(/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),E=t.computed(()=>{const W=(f.value??"").match(/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u);return W?W[0]:null}),_=t.computed(()=>!!g.value),B=t.computed(()=>/\bborder-/.test(f.value??"")),A=t.computed(()=>/\bhover:/.test(f.value??"")),C=t.computed(()=>{const q=f.value??"";return i.value!=="outline"?q:q.replaceAll(/\bbg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\bhover:bg-(?!gradient)[^\s]+\b/gu,"").replaceAll(/\s+/gu," ").trim()}),x=t.ref(null),k=q=>{const W=q.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([0-9.]+))?\)/u);return W?{r:Number(W[1]),g:Number(W[2]),b:Number(W[3]),a:W[4]?Number(W[4]):1}:null},N=(q,W)=>{const Z=k(q);if(!Z)return q;const te=xe=>Math.max(0,Math.min(255,Math.round(xe)));return`rgba(${te(Z.r*(1-W))}, ${te(Z.g*(1-W))}, ${te(Z.b*(1-W))}, ${Z.a})`},w=q=>{if(globalThis.window===void 0)return null;const W=document.createElement("div");W.className=q,W.style.position="absolute",W.style.visibility="hidden",W.style.pointerEvents="none",W.style.width="1px",W.style.height="1px",document.body.appendChild(W);const Z=globalThis.getComputedStyle(W).backgroundColor;return W.remove(),!Z||Z==="transparent"||Z==="rgba(0, 0, 0, 0)"?null:Z},v=[50,100,200,300,400,500,600,700,800,900,950],S=q=>{const W=v.indexOf(q);return W===-1?q:v[Math.min(v.length-1,W+2)]},D=(q,W)=>{const Z=cp[q];if(!Z)return null;if(typeof Z=="string")return Z;if(!W)return null;const te=Z[W];return typeof te=="string"?te:null},V=(q,W=!1)=>{if(!q)return null;const Z=W?/\bhover:bg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u:/\bbg-(?!gradient)([a-z-]+)(?:-(\d{2,3}))?\b/u,te=q.match(Z);return te?{colorName:te[1],shade:te[2]?Number.parseInt(te[2],10):null}:null},R=()=>{const q=g.value;if(!q){x.value=null;return}const W=V(q),Z=W==null?void 0:W.colorName,te=(W==null?void 0:W.shade)??null,xe=(Z?D(Z,te):null)??w(q);if(!xe){x.value=null;return}let Se;const ye=V(E.value,!0),Q=ye?D(ye.colorName,ye.shade??null):null;if(Q)Se=Q;else if(Z&&te){const j=S(te);Se=D(Z,j)??N(xe,.2)}else Se=N(xe,.2);x.value={"--btn-color":xe,"--btn-color-hover":Se}};t.onMounted(()=>{R()}),t.watch([g,E],async()=>{await t.nextTick(),R()});const O=t.computed(()=>{const q=/\bdark:bg-/.test(f.value??"");return!_.value||i.value==="outline"||q?"":x.value?"dcode-btn--fill dcode-btn--fill-hover":A.value?"":"hover:brightness-90"}),P=t.computed(()=>{if(!_.value||i.value!=="outline")return"";const q=["dcode-btn--outline","dcode-btn--outline-hover"];return B.value||q.push("border"),!x.value&&!A.value&&q.push("hover:brightness-90"),q.join(" ")}),L=t.computed(()=>x.value??void 0),$={primary:{bg:"bg-blue-600 dark:bg-blue-500",border:"border-blue-700 dark:border-blue-400",text:"text-white",hoverBg:"hover:bg-blue-700 dark:hover:bg-blue-600",hoverBorder:"hover:border-blue-800 dark:hover:border-blue-500",hoverText:"hover:text-white"},success:{bg:"bg-green-600 dark:bg-green-500",border:"border-green-700 dark:border-green-400",text:"text-white",hoverBg:"hover:bg-green-700 dark:hover:bg-green-600",hoverBorder:"hover:border-green-800 dark:hover:border-green-500",hoverText:"hover:text-white"},warning:{bg:"bg-yellow-500 dark:bg-yellow-400",border:"border-yellow-600 dark:border-yellow-300",text:"text-white",hoverBg:"hover:bg-yellow-600 dark:hover:bg-yellow-500",hoverBorder:"hover:border-yellow-700 dark:hover:border-yellow-400",hoverText:"hover:text-white"},danger:{bg:"bg-red-600 dark:bg-red-500",border:"border-red-700 dark:border-red-400",text:"text-white",hoverBg:"hover:bg-red-700 dark:hover:bg-red-600",hoverBorder:"hover:border-red-800 dark:hover:border-red-500",hoverText:"hover:text-white"},info:{bg:"bg-cyan-600 dark:bg-cyan-500",border:"border-cyan-700 dark:border-cyan-400",text:"text-white",hoverBg:"hover:bg-cyan-700 dark:hover:bg-cyan-600",hoverBorder:"hover:border-cyan-800 dark:hover:border-cyan-500",hoverText:"hover:text-white"},secondary:{bg:"bg-gray-600 dark:bg-gray-500",border:"border-gray-700 dark:border-gray-400",text:"text-white",hoverBg:"hover:bg-gray-700 dark:hover:bg-gray-600",hoverBorder:"hover:border-gray-800 dark:hover:border-gray-500",hoverText:"hover:text-white"},purple:{bg:"bg-purple-600 dark:bg-purple-500",border:"border-purple-700 dark:border-purple-400",text:"text-white",hoverBg:"hover:bg-purple-700 dark:hover:bg-purple-600",hoverBorder:"hover:border-purple-800 dark:hover:border-purple-500",hoverText:"hover:text-white"},pink:{bg:"bg-pink-600 dark:bg-pink-500",border:"border-pink-700 dark:border-pink-400",text:"text-white",hoverBg:"hover:bg-pink-700 dark:hover:bg-pink-600",hoverBorder:"hover:border-pink-800 dark:hover:border-pink-500",hoverText:"hover:text-white"},dark:{bg:"bg-gray-900 dark:bg-gray-800",border:"border-black dark:border-gray-700",text:"text-white",hoverBg:"hover:bg-black dark:hover:bg-gray-950",hoverBorder:"hover:border-black dark:hover:border-gray-600",hoverText:"hover:text-white"},light:{bg:"bg-gray-100 dark:bg-gray-800",border:"border-gray-300 dark:border-gray-600",text:"text-gray-900 dark:text-gray-100",hoverBg:"hover:bg-gray-200 dark:hover:bg-gray-700",hoverBorder:"hover:border-gray-400 dark:hover:border-gray-500",hoverText:"hover:text-gray-900 dark:hover:text-gray-100"}},T={"gradient-blue":{bg:"bg-gradient-to-r from-blue-500 to-cyan-500",text:"text-white",hover:"hover:from-blue-600 hover:to-cyan-600"},"gradient-purple":{bg:"bg-gradient-to-r from-purple-500 to-pink-500",text:"text-white",hover:"hover:from-purple-600 hover:to-pink-600"},"gradient-sunset":{bg:"bg-gradient-to-r from-orange-500 to-red-500",text:"text-white",hover:"hover:from-orange-600 hover:to-red-600"},"gradient-emerald":{bg:"bg-gradient-to-r from-emerald-500 to-teal-500",text:"text-white",hover:"hover:from-emerald-600 hover:to-teal-600"}},I=t.computed(()=>{const q=[],W=l.value,Z=String(n.borderColor||"").toLowerCase(),te=W?$[W]:null,xe=W?T[W]:null,Se=Z?$[Z]:null;return W&&(te?Se&&Z!==W?(q.push(te.bg,Se.hoverBg),n.textColor||q.push(te.text,Se.hoverText)):(q.push(te.bg,te.hoverBg),n.textColor||q.push(te.text,te.hoverText)):xe?(q.push(xe.bg,xe.hover),n.textColor||q.push(xe.text)):W==="transparent"?Se?(q.push("bg-transparent",Se.hoverBg),n.textColor||q.push("text-inherit",Se.hoverText)):q.push("bg-transparent hover:bg-black/5 dark:hover:bg-white/5"):q.push(W)),Z?Se?q.push(Se.border,Se.hoverBorder):q.push(Z):te&&i.value!=="ghost"&&i.value!=="link"&&q.push(te.border,te.hoverBorder),n.textColor&&q.push(n.textColor),q.join(" ")}),H=t.computed(()=>Te(kp,p.value,y.value,C.value,O.value,P.value,I.value));return(q,W)=>s.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.skeleton?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(b.value),"aria-hidden":"true"},null,2)):(t.openBlock(),t.createBlock(t.unref(jl),{key:1,"delay-duration":0},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createBlock(t.unref(zl),{key:0},{default:t.withCtx(()=>[t.createVNode(t.unref(Ul),{"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(Pt),t.mergeProps({variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:H.value,style:L.value},d.value),{default:t.withCtx(()=>[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):t.createCommentVNode("",!0),n.text?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(r.value?"ml-1":"")},t.toDisplayString(n.text),3)):t.createCommentVNode("",!0)]),_:1},16,["variant","size","disabled","type","class","style"])]),_:1}),t.createVNode(t.unref($l),{side:"top","side-offset":8,class:"animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 bg-gray-900 dark:bg-gray-100 text-white dark:text-gray-900 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0"},{default:t.withCtx(()=>[t.createElementVNode("span",xp,t.toDisplayString(n.tooltip),1)]),_:1})]),_:1})):(t.openBlock(),t.createBlock(t.unref(Pt),t.mergeProps({key:1,variant:i.value,size:n.size,disabled:n.disabled,type:c.value,class:H.value,style:L.value},d.value),{default:t.withCtx(()=>[t.renderSlot(q.$slots,"default",{},()=>[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:"h-[18px] w-[18px]"})):t.createCommentVNode("",!0),n.text?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(r.value?"ml-1":"")},t.toDisplayString(n.text),3)):t.createCommentVNode("",!0)],!0)]),_:3},16,["variant","size","disabled","type","class","style"]))]),_:3}))],64)):t.createCommentVNode("",!0)}}),ft=(e,o)=>{const n=e.__vccOpts||e;for(const[r,a]of o)n[r]=a;return n},He=ft(wp,[["__scopeId","data-v-c123cb99"]]),Cp={class:"flex flex-col gap-1"},Ep={key:0,class:"text-sm font-semibold text-neutral-900 dark:text-neutral-100 leading-tight"},_p={key:1,class:"text-xs text-neutral-500 dark:text-neutral-400"},Bp={key:0,class:"flex items-center gap-2"},Sp={name:"DCodeCard"},Jo=t.defineComponent({...Sp,props:{level:{default:1},title:{},subtitle:{},shadow:{type:Boolean,default:!1},border:{type:Boolean,default:!0},padding:{default:"p-6"}},setup(e){const o=e,n=t.computed(()=>{switch(o.level){case 2:return"bg-neutral-50 dark:bg-neutral-800";case 3:return"bg-neutral-100 dark:bg-neutral-700";case 1:default:return"bg-white dark:bg-neutral-900"}});return(r,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["transition-shadow duration-300 dcode-card",[n.value,{"shadow-md":e.shadow},{"border-transparent":!e.border},{"border border-neutral-200 dark:border-neutral-800":e.border&&e.level===1},{"border border-neutral-300 dark:border-neutral-700":e.border&&e.level!==1},"overflow-hidden"]])},[e.title||r.$slots.header||r.$slots.actions?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["flex items-center justify-between backdrop-blur-sm transition-colors duration-300",[e.title||r.$slots.header||r.$slots.actions?"px-4 py-3":"",e.title||r.$slots.header?"bg-neutral-200/50 dark:bg-neutral-950/40 border-b border-neutral-200 dark:border-neutral-800/50":"bg-transparent border-b-transparent"]])},[t.createElementVNode("div",Cp,[t.renderSlot(r.$slots,"header",{},()=>[e.title?(t.openBlock(),t.createElementBlock("h3",Ep,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.subtitle?(t.openBlock(),t.createElementBlock("p",_p,t.toDisplayString(e.subtitle),1)):t.createCommentVNode("",!0)])]),r.$slots.actions?(t.openBlock(),t.createElementBlock("div",Bp,[t.renderSlot(r.$slots,"actions")])):t.createCommentVNode("",!0)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["relative z-10",e.padding])},[t.renderSlot(r.$slots,"default")],2),r.$slots.footer?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["mt-6 pt-6 border-t border-neutral-200/60 dark:border-neutral-700/50",e.padding])},[t.renderSlot(r.$slots,"footer")],2)):t.createCommentVNode("",!0)],2))}});(function(){try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".code-diff-view[theme=light]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(255,255,255,0);--color-page-header-bg: #f6f8fa;--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #1F2328;--color-diff-blob-addition-fg: #1F2328;--color-diff-blob-addition-num-bg: #ccffd8;--color-diff-blob-addition-line-bg: #e6ffec;--color-diff-blob-addition-word-bg: #abf2bc;--color-diff-blob-deletion-num-text: #1F2328;--color-diff-blob-deletion-fg: #1F2328;--color-diff-blob-deletion-num-bg: #ffd7d5;--color-diff-blob-deletion-line-bg: #ffebe9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #656d76;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(31,35,40,.15);--color-diffstat-addition-border: rgba(31,35,40,.15);--color-diffstat-addition-bg: #1f883d;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #1F2328;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #656d76;--color-codemirror-cursor: #1F2328;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #1F2328;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #1f883d;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(31,35,40,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(125,78,0,.15);--color-checks-gate-text: #d0d7de;--color-checks-gate-waiting-text: #d4a72c;--color-checks-step-header-open-bg: #32383f;--color-checks-step-error-text: #ff8182;--color-checks-step-warning-text: #d4a72c;--color-checks-logline-text: #8c959f;--color-checks-logline-num-text: rgba(140,149,159,.75);--color-checks-logline-debug-text: #c297ff;--color-checks-logline-error-text: #d0d7de;--color-checks-logline-error-num-text: #ff8182;--color-checks-logline-error-bg: rgba(164,14,38,.15);--color-checks-logline-warning-text: #d0d7de;--color-checks-logline-warning-num-text: #d4a72c;--color-checks-logline-warning-bg: rgba(125,78,0,.15);--color-checks-logline-command-text: #54aeff;--color-checks-logline-section-text: #4ac26b;--color-checks-ansi-black: #24292f;--color-checks-ansi-black-bright: #32383f;--color-checks-ansi-white: #d0d7de;--color-checks-ansi-white-bright: #d0d7de;--color-checks-ansi-gray: #8c959f;--color-checks-ansi-red: #ff8182;--color-checks-ansi-red-bright: #ffaba8;--color-checks-ansi-green: #4ac26b;--color-checks-ansi-green-bright: #6fdd8b;--color-checks-ansi-yellow: #d4a72c;--color-checks-ansi-yellow-bright: #eac54f;--color-checks-ansi-blue: #54aeff;--color-checks-ansi-blue-bright: #80ccff;--color-checks-ansi-magenta: #c297ff;--color-checks-ansi-magenta-bright: #d8b9ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #24292f;--color-project-sidebar-bg: #ffffff;--color-project-gradient-in: #ffffff;--color-project-gradient-out: rgba(255,255,255,0);--color-mktg-btn-bg: #1b1f23;--color-mktg-btn-shadow-outline: rgb(0 0 0 / 15%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(0 0 0 / 15%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 3px 2px rgba(0, 0, 0, .07), 0 7px 5px rgba(0, 0, 0, .04), 0 12px 10px rgba(0, 0, 0, .03), 0 22px 18px rgba(0, 0, 0, .03), 0 42px 33px rgba(0, 0, 0, .02), 0 100px 80px rgba(0, 0, 0, .02);--color-mktg-btn-shadow-hover-muted: rgb(0 0 0 / 70%) 0 0 0 2px inset;--color-control-border-color-emphasis: #858F99;--color-avatar-bg: #ffffff;--color-avatar-border: rgba(31,35,40,.15);--color-avatar-stack-fade: #afb8c1;--color-avatar-stack-fade-more: #d0d7de;--color-avatar-child-shadow: 0 0 0 2px rgba(255,255,255,.8);--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: rgba(0,0,0,0);--color-select-menu-tap-highlight: rgba(175,184,193,.5);--color-select-menu-tap-focus-bg: #b6e3ff;--color-overlay-shadow: 0 1px 3px rgba(31,35,40,.12), 0 8px 24px rgba(66,74,83,.12);--color-overlay-backdrop: rgba(140,149,159,.2);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #24292f;--color-header-divider: #57606a;--color-header-logo: #ffffff;--color-header-search-bg: #24292f;--color-header-search-border: #57606a;--color-sidenav-selected-bg: #ffffff;--color-menu-bg-active: rgba(0,0,0,0);--color-input-disabled-bg: rgba(175,184,193,.2);--color-timeline-badge-bg: #eaeef2;--color-ansi-black: #24292f;--color-ansi-black-bright: #57606a;--color-ansi-white: #6e7781;--color-ansi-white-bright: #8c959f;--color-ansi-gray: #6e7781;--color-ansi-red: #cf222e;--color-ansi-red-bright: #a40e26;--color-ansi-green: #116329;--color-ansi-green-bright: #1a7f37;--color-ansi-yellow: #4d2d00;--color-ansi-yellow-bright: #633c01;--color-ansi-blue: #0969da;--color-ansi-blue-bright: #218bff;--color-ansi-magenta: #8250df;--color-ansi-magenta-bright: #a475f9;--color-ansi-cyan: #1b7c83;--color-ansi-cyan-bright: #3192aa;--color-btn-text: #24292f;--color-btn-bg: #f6f8fa;--color-btn-border: rgba(31,35,40,.15);--color-btn-shadow: 0 1px 0 rgba(31,35,40,.04);--color-btn-inset-shadow: inset 0 1px 0 rgba(255,255,255,.25);--color-btn-hover-bg: #f3f4f6;--color-btn-hover-border: rgba(31,35,40,.15);--color-btn-active-bg: hsla(220,14%,93%,1);--color-btn-active-border: rgba(31,35,40,.15);--color-btn-selected-bg: hsla(220,14%,94%,1);--color-btn-counter-bg: rgba(31,35,40,.08);--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #1f883d;--color-btn-primary-border: rgba(31,35,40,.15);--color-btn-primary-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-primary-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-primary-hover-bg: #1a7f37;--color-btn-primary-hover-border: rgba(31,35,40,.15);--color-btn-primary-selected-bg: hsla(137,66%,28%,1);--color-btn-primary-selected-shadow: inset 0 1px 0 rgba(0,45,17,.2);--color-btn-primary-disabled-text: rgba(255,255,255,.8);--color-btn-primary-disabled-bg: #94d3a2;--color-btn-primary-disabled-border: rgba(31,35,40,.15);--color-btn-primary-icon: rgba(255,255,255,.8);--color-btn-primary-counter-bg: rgba(0,45,17,.2);--color-btn-outline-text: #0969da;--color-btn-outline-hover-text: #ffffff;--color-btn-outline-hover-bg: #0969da;--color-btn-outline-hover-border: rgba(31,35,40,.15);--color-btn-outline-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(255,255,255,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: hsla(212,92%,42%,1);--color-btn-outline-selected-border: rgba(31,35,40,.15);--color-btn-outline-selected-shadow: inset 0 1px 0 rgba(0,33,85,.2);--color-btn-outline-disabled-text: rgba(9,105,218,.5);--color-btn-outline-disabled-bg: #f6f8fa;--color-btn-outline-disabled-counter-bg: rgba(9,105,218,.05);--color-btn-outline-counter-bg: #0969da1a;--color-btn-outline-counter-fg: #0550ae;--color-btn-outline-hover-counter-fg: #ffffff;--color-btn-outline-disabled-counter-fg: rgba(9,105,218,.5);--color-btn-danger-text: #cf222e;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #a40e26;--color-btn-danger-hover-border: rgba(31,35,40,.15);--color-btn-danger-hover-shadow: 0 1px 0 rgba(31,35,40,.1);--color-btn-danger-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: hsla(356,72%,44%,1);--color-btn-danger-selected-border: rgba(31,35,40,.15);--color-btn-danger-selected-shadow: inset 0 1px 0 rgba(76,0,20,.2);--color-btn-danger-disabled-text: rgba(207,34,46,.5);--color-btn-danger-disabled-bg: #f6f8fa;--color-btn-danger-disabled-counter-bg: rgba(207,34,46,.05);--color-btn-danger-counter-bg: rgba(207,34,46,.1);--color-btn-danger-icon: #cf222e;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-counter-fg: #a40e26;--color-btn-danger-hover-counter-fg: #ffffff;--color-btn-danger-disabled-counter-fg: rgba(207,34,46,.5);--color-underlinenav-icon: #6e7781;--color-underlinenav-border-hover: rgba(175,184,193,.2);--color-action-list-item-inline-divider: rgba(208,215,222,.48);--color-action-list-item-default-hover-bg: rgba(208,215,222,.32);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(208,215,222,.48);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(208,215,222,.24);--color-action-list-item-danger-hover-bg: rgba(255,235,233,.64);--color-action-list-item-danger-active-bg: #ffebe9;--color-action-list-item-danger-hover-text: #d1242f;--color-switch-track-bg: #eaeef2;--color-switch-track-hover-bg: hsla(210,24%,90%,1);--color-switch-track-active-bg: hsla(210,24%,88%,1);--color-switch-track-disabled-bg: #8c959f;--color-switch-track-fg: #656d76;--color-switch-track-disabled-fg: #ffffff;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: #0969da;--color-switch-track-checked-hover-bg: #0860CA;--color-switch-track-checked-active-bg: #0757BA;--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #ffffff;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #ffffff;--color-switch-knob-disabled-bg: #f6f8fa;--color-switch-knob-border: #858F99;--color-switch-knob-checked-bg: #ffffff;--color-switch-knob-checked-disabled-bg: #f6f8fa;--color-switch-knob-checked-border: #0969da;--color-segmented-control-bg: #eaeef2;--color-segmented-control-button-bg: #ffffff;--color-segmented-control-button-hover-bg: rgba(175,184,193,.2);--color-segmented-control-button-active-bg: rgba(175,184,193,.4);--color-segmented-control-button-selected-border: #8c959f;--color-tree-view-item-chevron-hover-bg: rgba(208,215,222,.32);--color-tree-view-item-directory-fill: #54aeff;--color-fg-default: #1F2328;--color-fg-muted: #656d76;--color-fg-subtle: #6e7781;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #ffffff;--color-canvas-overlay: #ffffff;--color-canvas-inset: #f6f8fa;--color-canvas-subtle: #f6f8fa;--color-border-default: #d0d7de;--color-border-muted: hsla(210,18%,87%,1);--color-border-subtle: rgba(31,35,40,.15);--color-shadow-small: 0 1px 0 rgba(31,35,40,.04);--color-shadow-medium: 0 3px 6px rgba(140,149,159,.15);--color-shadow-large: 0 8px 24px rgba(140,149,159,.2);--color-shadow-extra-large: 0 12px 28px rgba(140,149,159,.3);--color-neutral-emphasis-plus: #24292f;--color-neutral-emphasis: #6e7781;--color-neutral-muted: rgba(175,184,193,.2);--color-neutral-subtle: rgba(234,238,242,.5);--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-accent-muted: rgba(84,174,255,.4);--color-accent-subtle: #ddf4ff;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d;--color-success-muted: rgba(74,194,107,.4);--color-success-subtle: #dafbe1;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-attention-muted: rgba(212,167,44,.4);--color-attention-subtle: #fff8c5;--color-severe-fg: #bc4c00;--color-severe-emphasis: #bc4c00;--color-severe-muted: rgba(251,143,68,.4);--color-severe-subtle: #fff1e5;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-danger-muted: rgba(255,129,130,.4);--color-danger-subtle: #ffebe9;--color-open-fg: #1a7f37;--color-open-emphasis: #1f883d;--color-open-muted: rgba(74,194,107,.4);--color-open-subtle: #dafbe1;--color-closed-fg: #d1242f;--color-closed-emphasis: #cf222e;--color-closed-muted: rgba(255,129,130,.4);--color-closed-subtle: #ffebe9;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-done-muted: rgba(194,151,255,.4);--color-done-subtle: #fbefff;--color-sponsors-fg: #bf3989;--color-sponsors-emphasis: #bf3989;--color-sponsors-muted: rgba(255,128,200,.4);--color-sponsors-subtle: #ffeff7;--color-primer-fg-disabled: #8c959f;--color-primer-canvas-backdrop: rgba(31,35,40,.5);--color-primer-canvas-sticky: rgba(255,255,255,.95);--color-primer-border-active: #fd8c73;--color-primer-border-contrast: rgba(31,35,40,.1);--color-primer-shadow-highlight: inset 0 1px 0 rgba(255,255,255,.25);--color-primer-shadow-inset: inset 0 1px 0 rgba(208,215,222,.2);--color-scale-black: #1F2328;--color-scale-white: #ffffff;--color-scale-gray-0: #f6f8fa;--color-scale-gray-1: #eaeef2;--color-scale-gray-2: #d0d7de;--color-scale-gray-3: #afb8c1;--color-scale-gray-4: #8c959f;--color-scale-gray-5: #6e7781;--color-scale-gray-6: #57606a;--color-scale-gray-7: #424a53;--color-scale-gray-8: #32383f;--color-scale-gray-9: #24292f;--color-scale-blue-0: #ddf4ff;--color-scale-blue-1: #b6e3ff;--color-scale-blue-2: #80ccff;--color-scale-blue-3: #54aeff;--color-scale-blue-4: #218bff;--color-scale-blue-5: #0969da;--color-scale-blue-6: #0550ae;--color-scale-blue-7: #033d8b;--color-scale-blue-8: #0a3069;--color-scale-blue-9: #002155;--color-scale-green-0: #dafbe1;--color-scale-green-1: #aceebb;--color-scale-green-2: #6fdd8b;--color-scale-green-3: #4ac26b;--color-scale-green-4: #2da44e;--color-scale-green-5: #1a7f37;--color-scale-green-6: #116329;--color-scale-green-7: #044f1e;--color-scale-green-8: #003d16;--color-scale-green-9: #002d11;--color-scale-yellow-0: #fff8c5;--color-scale-yellow-1: #fae17d;--color-scale-yellow-2: #eac54f;--color-scale-yellow-3: #d4a72c;--color-scale-yellow-4: #bf8700;--color-scale-yellow-5: #9a6700;--color-scale-yellow-6: #7d4e00;--color-scale-yellow-7: #633c01;--color-scale-yellow-8: #4d2d00;--color-scale-yellow-9: #3b2300;--color-scale-orange-0: #fff1e5;--color-scale-orange-1: #ffd8b5;--color-scale-orange-2: #ffb77c;--color-scale-orange-3: #fb8f44;--color-scale-orange-4: #e16f24;--color-scale-orange-5: #bc4c00;--color-scale-orange-6: #953800;--color-scale-orange-7: #762c00;--color-scale-orange-8: #5c2200;--color-scale-orange-9: #471700;--color-scale-red-0: #ffebe9;--color-scale-red-1: #ffcecb;--color-scale-red-2: #ffaba8;--color-scale-red-3: #ff8182;--color-scale-red-4: #fa4549;--color-scale-red-5: #cf222e;--color-scale-red-6: #a40e26;--color-scale-red-7: #82071e;--color-scale-red-8: #660018;--color-scale-red-9: #4c0014;--color-scale-purple-0: #fbefff;--color-scale-purple-1: #ecd8ff;--color-scale-purple-2: #d8b9ff;--color-scale-purple-3: #c297ff;--color-scale-purple-4: #a475f9;--color-scale-purple-5: #8250df;--color-scale-purple-6: #6639ba;--color-scale-purple-7: #512a97;--color-scale-purple-8: #3e1f79;--color-scale-purple-9: #2e1461;--color-scale-pink-0: #ffeff7;--color-scale-pink-1: #ffd3eb;--color-scale-pink-2: #ffadda;--color-scale-pink-3: #ff80c8;--color-scale-pink-4: #e85aad;--color-scale-pink-5: #bf3989;--color-scale-pink-6: #99286e;--color-scale-pink-7: #772057;--color-scale-pink-8: #611347;--color-scale-pink-9: #4d0336;--color-scale-coral-0: #fff0eb;--color-scale-coral-1: #ffd6cc;--color-scale-coral-2: #ffb4a1;--color-scale-coral-3: #fd8c73;--color-scale-coral-4: #ec6547;--color-scale-coral-5: #c4432b;--color-scale-coral-6: #9e2f1c;--color-scale-coral-7: #801f0f;--color-scale-coral-8: #691105;--color-scale-coral-9: #510901}.code-diff-view[theme=light] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=light] code.hljs{padding:3px 5px}.code-diff-view[theme=light] .hljs{color:#24292e;background:#fff}.code-diff-view[theme=light] .hljs-doctag,.code-diff-view[theme=light] .hljs-keyword,.code-diff-view[theme=light] .hljs-meta .hljs-keyword,.code-diff-view[theme=light] .hljs-template-tag,.code-diff-view[theme=light] .hljs-template-variable,.code-diff-view[theme=light] .hljs-type,.code-diff-view[theme=light] .hljs-variable.language_{color:#d73a49}.code-diff-view[theme=light] .hljs-title,.code-diff-view[theme=light] .hljs-title.class_,.code-diff-view[theme=light] .hljs-title.class_.inherited__,.code-diff-view[theme=light] .hljs-title.function_{color:#6f42c1}.code-diff-view[theme=light] .hljs-attr,.code-diff-view[theme=light] .hljs-attribute,.code-diff-view[theme=light] .hljs-literal,.code-diff-view[theme=light] .hljs-meta,.code-diff-view[theme=light] .hljs-number,.code-diff-view[theme=light] .hljs-operator,.code-diff-view[theme=light] .hljs-variable,.code-diff-view[theme=light] .hljs-selector-attr,.code-diff-view[theme=light] .hljs-selector-class,.code-diff-view[theme=light] .hljs-selector-id{color:#005cc5}.code-diff-view[theme=light] .hljs-regexp,.code-diff-view[theme=light] .hljs-string,.code-diff-view[theme=light] .hljs-meta .hljs-string{color:#032f62}.code-diff-view[theme=light] .hljs-built_in,.code-diff-view[theme=light] .hljs-symbol{color:#e36209}.code-diff-view[theme=light] .hljs-comment,.code-diff-view[theme=light] .hljs-code,.code-diff-view[theme=light] .hljs-formula{color:#6a737d}.code-diff-view[theme=light] .hljs-name,.code-diff-view[theme=light] .hljs-quote,.code-diff-view[theme=light] .hljs-selector-tag,.code-diff-view[theme=light] .hljs-selector-pseudo{color:#22863a}.code-diff-view[theme=light] .hljs-subst{color:#24292e}.code-diff-view[theme=light] .hljs-section{color:#005cc5;font-weight:700}.code-diff-view[theme=light] .hljs-bullet{color:#735c0f}.code-diff-view[theme=light] .hljs-emphasis{color:#24292e;font-style:italic}.code-diff-view[theme=light] .hljs-strong{color:#24292e;font-weight:700}.code-diff-view[theme=light] .hljs-addition{color:#22863a;background-color:#f0fff4}.code-diff-view[theme=light] .hljs-deletion{color:#b31d28;background-color:#ffeef0}.code-diff-view[theme=dark]{color:var(--fgColor-default, var(--color-fg-default));background-color:var(--bgColor-default, var(--color-canvas-default));--color-canvas-default-transparent: rgba(13,17,23,0);--color-page-header-bg: #0d1117;--color-marketing-icon-primary: #79c0ff;--color-marketing-icon-secondary: #1f6feb;--color-diff-blob-addition-num-text: #e6edf3;--color-diff-blob-addition-fg: #e6edf3;--color-diff-blob-addition-num-bg: rgba(63,185,80,.3);--color-diff-blob-addition-line-bg: rgba(46,160,67,.15);--color-diff-blob-addition-word-bg: rgba(46,160,67,.4);--color-diff-blob-deletion-num-text: #e6edf3;--color-diff-blob-deletion-fg: #e6edf3;--color-diff-blob-deletion-num-bg: rgba(248,81,73,.3);--color-diff-blob-deletion-line-bg: rgba(248,81,73,.1);--color-diff-blob-deletion-word-bg: rgba(248,81,73,.4);--color-diff-blob-hunk-num-bg: rgba(56,139,253,.4);--color-diff-blob-expander-icon: #7d8590;--color-diff-blob-selected-line-highlight-mix-blend-mode: screen;--color-diffstat-deletion-border: rgba(240,246,252,.1);--color-diffstat-addition-border: rgba(240,246,252,.1);--color-diffstat-addition-bg: #3fb950;--color-search-keyword-hl: rgba(210,153,34,.4);--color-prettylights-syntax-comment: #8b949e;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #c9d1d9;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-variable: #ffa657;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;--color-prettylights-syntax-invalid-illegal-bg: #8e1519;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-italic: #c9d1d9;--color-prettylights-syntax-markup-bold: #c9d1d9;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-ignored-text: #c9d1d9;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-brackethighlighter-angle: #8b949e;--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-codemirror-text: #e6edf3;--color-codemirror-bg: #0d1117;--color-codemirror-gutters-bg: #0d1117;--color-codemirror-guttermarker-text: #0d1117;--color-codemirror-guttermarker-subtle-text: #6e7681;--color-codemirror-linenumber-text: #7d8590;--color-codemirror-cursor: #e6edf3;--color-codemirror-selection-bg: rgba(56,139,253,.4);--color-codemirror-activeline-bg: rgba(110,118,129,.1);--color-codemirror-matchingbracket-text: #e6edf3;--color-codemirror-lines-bg: #0d1117;--color-codemirror-syntax-comment: #8b949e;--color-codemirror-syntax-constant: #79c0ff;--color-codemirror-syntax-entity: #d2a8ff;--color-codemirror-syntax-keyword: #ff7b72;--color-codemirror-syntax-storage: #ff7b72;--color-codemirror-syntax-string: #a5d6ff;--color-codemirror-syntax-support: #79c0ff;--color-codemirror-syntax-variable: #ffa657;--color-checks-bg: #010409;--color-checks-run-border-width: 1px;--color-checks-container-border-width: 1px;--color-checks-text-primary: #e6edf3;--color-checks-text-secondary: #7d8590;--color-checks-text-link: #2f81f7;--color-checks-btn-icon: #7d8590;--color-checks-btn-hover-icon: #e6edf3;--color-checks-btn-hover-bg: rgba(110,118,129,.1);--color-checks-input-text: #7d8590;--color-checks-input-placeholder-text: #6e7681;--color-checks-input-focus-text: #e6edf3;--color-checks-input-bg: #161b22;--color-checks-donut-error: #f85149;--color-checks-donut-pending: #d29922;--color-checks-donut-success: #2ea043;--color-checks-donut-neutral: #8b949e;--color-checks-dropdown-text: #e6edf3;--color-checks-dropdown-bg: #161b22;--color-checks-dropdown-border: #30363d;--color-checks-dropdown-shadow: rgba(1,4,9,.3);--color-checks-dropdown-hover-text: #e6edf3;--color-checks-dropdown-hover-bg: rgba(110,118,129,.1);--color-checks-dropdown-btn-hover-text: #e6edf3;--color-checks-dropdown-btn-hover-bg: rgba(110,118,129,.1);--color-checks-scrollbar-thumb-bg: rgba(110,118,129,.4);--color-checks-header-label-text: #7d8590;--color-checks-header-label-open-text: #e6edf3;--color-checks-header-border: #21262d;--color-checks-header-icon: #7d8590;--color-checks-line-text: #7d8590;--color-checks-line-num-text: #6e7681;--color-checks-line-timestamp-text: #6e7681;--color-checks-line-hover-bg: rgba(110,118,129,.1);--color-checks-line-selected-bg: rgba(56,139,253,.1);--color-checks-line-selected-num-text: #2f81f7;--color-checks-line-dt-fm-text: #ffffff;--color-checks-line-dt-fm-bg: #9e6a03;--color-checks-gate-bg: rgba(187,128,9,.15);--color-checks-gate-text: #7d8590;--color-checks-gate-waiting-text: #d29922;--color-checks-step-header-open-bg: #161b22;--color-checks-step-error-text: #f85149;--color-checks-step-warning-text: #d29922;--color-checks-logline-text: #7d8590;--color-checks-logline-num-text: #6e7681;--color-checks-logline-debug-text: #a371f7;--color-checks-logline-error-text: #7d8590;--color-checks-logline-error-num-text: #6e7681;--color-checks-logline-error-bg: rgba(248,81,73,.1);--color-checks-logline-warning-text: #7d8590;--color-checks-logline-warning-num-text: #d29922;--color-checks-logline-warning-bg: rgba(187,128,9,.15);--color-checks-logline-command-text: #2f81f7;--color-checks-logline-section-text: #3fb950;--color-checks-ansi-black: #0d1117;--color-checks-ansi-black-bright: #161b22;--color-checks-ansi-white: #b1bac4;--color-checks-ansi-white-bright: #b1bac4;--color-checks-ansi-gray: #6e7681;--color-checks-ansi-red: #ff7b72;--color-checks-ansi-red-bright: #ffa198;--color-checks-ansi-green: #3fb950;--color-checks-ansi-green-bright: #56d364;--color-checks-ansi-yellow: #d29922;--color-checks-ansi-yellow-bright: #e3b341;--color-checks-ansi-blue: #58a6ff;--color-checks-ansi-blue-bright: #79c0ff;--color-checks-ansi-magenta: #bc8cff;--color-checks-ansi-magenta-bright: #d2a8ff;--color-checks-ansi-cyan: #76e3ea;--color-checks-ansi-cyan-bright: #b3f0ff;--color-project-header-bg: #0d1117;--color-project-sidebar-bg: #161b22;--color-project-gradient-in: #161b22;--color-project-gradient-out: rgba(22,27,34,0);--color-mktg-btn-bg: #f6f8fa;--color-mktg-btn-shadow-outline: rgb(255 255 255 / 25%) 0 0 0 1px inset;--color-mktg-btn-shadow-focus: rgb(255 255 255 / 25%) 0 0 0 4px;--color-mktg-btn-shadow-hover: 0 4px 7px rgba(0, 0, 0, .15), 0 100px 80px rgba(255, 255, 255, .02), 0 42px 33px rgba(255, 255, 255, .024), 0 22px 18px rgba(255, 255, 255, .028), 0 12px 10px rgba(255, 255, 255, .034), 0 7px 5px rgba(255, 255, 255, .04), 0 3px 2px rgba(255, 255, 255, .07);--color-mktg-btn-shadow-hover-muted: rgb(255 255 255) 0 0 0 2px inset;--color-control-border-color-emphasis: #606771;--color-avatar-bg: rgba(255,255,255,.1);--color-avatar-border: rgba(240,246,252,.1);--color-avatar-stack-fade: #30363d;--color-avatar-stack-fade-more: #21262d;--color-avatar-child-shadow: 0 0 0 2px #0d1117;--color-topic-tag-border: rgba(0,0,0,0);--color-counter-border: rgba(0,0,0,0);--color-select-menu-backdrop-border: #484f58;--color-select-menu-tap-highlight: rgba(48,54,61,.5);--color-select-menu-tap-focus-bg: #0c2d6b;--color-overlay-shadow: 0 0 0 1px #30363d, 0 16px 32px rgba(1,4,9,.85);--color-overlay-backdrop: rgba(22,27,34,.4);--color-header-text: rgba(255,255,255,.7);--color-header-bg: #161b22;--color-header-divider: #8b949e;--color-header-logo: #f0f6fc;--color-header-search-bg: #0d1117;--color-header-search-border: #30363d;--color-sidenav-selected-bg: #21262d;--color-menu-bg-active: #161b22;--color-input-disabled-bg: rgba(110,118,129,0);--color-timeline-badge-bg: #21262d;--color-ansi-black: #484f58;--color-ansi-black-bright: #6e7681;--color-ansi-white: #b1bac4;--color-ansi-white-bright: #ffffff;--color-ansi-gray: #6e7681;--color-ansi-red: #ff7b72;--color-ansi-red-bright: #ffa198;--color-ansi-green: #3fb950;--color-ansi-green-bright: #56d364;--color-ansi-yellow: #d29922;--color-ansi-yellow-bright: #e3b341;--color-ansi-blue: #58a6ff;--color-ansi-blue-bright: #79c0ff;--color-ansi-magenta: #bc8cff;--color-ansi-magenta-bright: #d2a8ff;--color-ansi-cyan: #39c5cf;--color-ansi-cyan-bright: #56d4dd;--color-btn-text: #c9d1d9;--color-btn-bg: #21262d;--color-btn-border: rgba(240,246,252,.1);--color-btn-shadow: 0 0 transparent;--color-btn-inset-shadow: 0 0 transparent;--color-btn-hover-bg: #30363d;--color-btn-hover-border: #8b949e;--color-btn-active-bg: hsla(212,12%,18%,1);--color-btn-active-border: #6e7681;--color-btn-selected-bg: #161b22;--color-btn-counter-bg: #30363d;--color-btn-primary-text: #ffffff;--color-btn-primary-bg: #238636;--color-btn-primary-border: rgba(240,246,252,.1);--color-btn-primary-shadow: 0 0 transparent;--color-btn-primary-inset-shadow: 0 0 transparent;--color-btn-primary-hover-bg: #2ea043;--color-btn-primary-hover-border: rgba(240,246,252,.1);--color-btn-primary-selected-bg: #238636;--color-btn-primary-selected-shadow: 0 0 transparent;--color-btn-primary-disabled-text: rgba(255,255,255,.5);--color-btn-primary-disabled-bg: rgba(35,134,54,.6);--color-btn-primary-disabled-border: rgba(240,246,252,.1);--color-btn-primary-icon: #ffffff;--color-btn-primary-counter-bg: rgba(4,38,15,.2);--color-btn-outline-text: #388bfd;--color-btn-outline-hover-text: #58a6ff;--color-btn-outline-hover-bg: #30363d;--color-btn-outline-hover-border: rgba(240,246,252,.1);--color-btn-outline-hover-shadow: 0 1px 0 rgba(1,4,9,.1);--color-btn-outline-hover-inset-shadow: inset 0 1px 0 rgba(255,255,255,.03);--color-btn-outline-hover-counter-bg: rgba(5,29,77,.2);--color-btn-outline-selected-text: #ffffff;--color-btn-outline-selected-bg: #0d419d;--color-btn-outline-selected-border: rgba(240,246,252,.1);--color-btn-outline-selected-shadow: 0 0 transparent;--color-btn-outline-disabled-text: rgba(88,166,255,.5);--color-btn-outline-disabled-bg: #0d1117;--color-btn-outline-disabled-counter-bg: rgba(31,111,235,.05);--color-btn-outline-counter-bg: rgba(5,29,77,.2);--color-btn-outline-hover-counter-fg: #58a6ff;--color-btn-outline-disabled-counter-fg: rgba(47,129,247,.5);--color-btn-outline-counter-fg: #388bfd;--color-btn-danger-text: #f85149;--color-btn-danger-hover-text: #ffffff;--color-btn-danger-hover-bg: #da3633;--color-btn-danger-hover-border: #f85149;--color-btn-danger-hover-shadow: 0 0 transparent;--color-btn-danger-hover-inset-shadow: 0 0 transparent;--color-btn-danger-hover-icon: #ffffff;--color-btn-danger-hover-counter-bg: rgba(255,255,255,.2);--color-btn-danger-selected-text: #ffffff;--color-btn-danger-selected-bg: #b62324;--color-btn-danger-selected-border: #ff7b72;--color-btn-danger-selected-shadow: 0 0 transparent;--color-btn-danger-disabled-text: rgba(248,81,73,.5);--color-btn-danger-disabled-bg: #0d1117;--color-btn-danger-disabled-counter-bg: rgba(218,54,51,.05);--color-btn-danger-counter-bg: rgba(73,2,2,.2);--color-btn-danger-icon: #f85149;--color-btn-danger-counter-fg: #f85149;--color-btn-danger-disabled-counter-fg: rgba(248,81,73,.5);--color-btn-danger-hover-counter-fg: #ffffff;--color-underlinenav-icon: #6e7681;--color-underlinenav-border-hover: rgba(110,118,129,.4);--color-action-list-item-inline-divider: rgba(48,54,61,.48);--color-action-list-item-default-hover-bg: rgba(177,186,196,.12);--color-action-list-item-default-hover-border: rgba(0,0,0,0);--color-action-list-item-default-active-bg: rgba(177,186,196,.2);--color-action-list-item-default-active-border: rgba(0,0,0,0);--color-action-list-item-default-selected-bg: rgba(177,186,196,.08);--color-action-list-item-danger-hover-bg: rgba(248,81,73,.16);--color-action-list-item-danger-active-bg: rgba(248,81,73,.24);--color-action-list-item-danger-hover-text: #ff7b72;--color-switch-track-bg: rgba(110,118,129,.1);--color-switch-track-hover-bg: hsla(215,8%,72%,.1);--color-switch-track-active-bg: rgba(110,118,129,.4);--color-switch-track-disabled-bg: #21262d;--color-switch-track-fg: #7d8590;--color-switch-track-disabled-fg: #010409;--color-switch-track-border: rgba(0,0,0,0);--color-switch-track-checked-bg: rgba(31,111,235,.35);--color-switch-track-checked-hover-bg: rgba(31,111,235,.5);--color-switch-track-checked-active-bg: rgba(31,111,235,.65);--color-switch-track-checked-fg: #ffffff;--color-switch-track-checked-disabled-fg: #010409;--color-switch-track-checked-border: rgba(0,0,0,0);--color-switch-knob-bg: #0d1117;--color-switch-knob-border: #606771;--color-switch-knob-disabled-bg: #161b22;--color-switch-knob-checked-bg: #0d1117;--color-switch-knob-checked-disabled-bg: #161b22;--color-switch-knob-checked-border: rgba(31,111,235,.35);--color-segmented-control-bg: rgba(110,118,129,.1);--color-segmented-control-button-bg: #0d1117;--color-segmented-control-button-hover-bg: #30363d;--color-segmented-control-button-active-bg: #21262d;--color-segmented-control-button-selected-border: #6e7681;--color-tree-view-item-chevron-hover-bg: rgba(177,186,196,.12);--color-tree-view-item-directory-fill: #7d8590;--color-fg-default: #e6edf3;--color-fg-muted: #7d8590;--color-fg-subtle: #6e7681;--color-fg-on-emphasis: #ffffff;--color-canvas-default: #0d1117;--color-canvas-overlay: #161b22;--color-canvas-inset: #010409;--color-canvas-subtle: #161b22;--color-border-default: #30363d;--color-border-muted: #21262d;--color-border-subtle: rgba(240,246,252,.1);--color-shadow-small: 0 0 transparent;--color-shadow-medium: 0 3px 6px #010409;--color-shadow-large: 0 8px 24px #010409;--color-shadow-extra-large: 0 12px 48px #010409;--color-neutral-emphasis-plus: #6e7681;--color-neutral-emphasis: #6e7681;--color-neutral-muted: rgba(110,118,129,.4);--color-neutral-subtle: rgba(110,118,129,.1);--color-accent-fg: #2f81f7;--color-accent-emphasis: #1f6feb;--color-accent-muted: rgba(56,139,253,.4);--color-accent-subtle: rgba(56,139,253,.1);--color-success-fg: #3fb950;--color-success-emphasis: #238636;--color-success-muted: rgba(46,160,67,.4);--color-success-subtle: rgba(46,160,67,.15);--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-attention-muted: rgba(187,128,9,.4);--color-attention-subtle: rgba(187,128,9,.15);--color-severe-fg: #db6d28;--color-severe-emphasis: #bd561d;--color-severe-muted: rgba(219,109,40,.4);--color-severe-subtle: rgba(219,109,40,.1);--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-danger-muted: rgba(248,81,73,.4);--color-danger-subtle: rgba(248,81,73,.1);--color-open-fg: #3fb950;--color-open-emphasis: #238636;--color-open-muted: rgba(46,160,67,.4);--color-open-subtle: rgba(46,160,67,.15);--color-closed-fg: #f85149;--color-closed-emphasis: #da3633;--color-closed-muted: rgba(248,81,73,.4);--color-closed-subtle: rgba(248,81,73,.15);--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-done-muted: rgba(163,113,247,.4);--color-done-subtle: rgba(163,113,247,.1);--color-sponsors-fg: #db61a2;--color-sponsors-emphasis: #bf4b8a;--color-sponsors-muted: rgba(219,97,162,.4);--color-sponsors-subtle: rgba(219,97,162,.1);--color-primer-fg-disabled: #484f58;--color-primer-canvas-backdrop: rgba(1,4,9,.8);--color-primer-canvas-sticky: rgba(13,17,23,.95);--color-primer-border-active: #f78166;--color-primer-border-contrast: rgba(255,255,255,.2);--color-primer-shadow-highlight: 0 0 transparent;--color-primer-shadow-inset: 0 0 transparent;--color-scale-black: #010409;--color-scale-white: #ffffff;--color-scale-gray-0: #f0f6fc;--color-scale-gray-1: #c9d1d9;--color-scale-gray-2: #b1bac4;--color-scale-gray-3: #8b949e;--color-scale-gray-4: #6e7681;--color-scale-gray-5: #484f58;--color-scale-gray-6: #30363d;--color-scale-gray-7: #21262d;--color-scale-gray-8: #161b22;--color-scale-gray-9: #0d1117;--color-scale-blue-0: #cae8ff;--color-scale-blue-1: #a5d6ff;--color-scale-blue-2: #79c0ff;--color-scale-blue-3: #58a6ff;--color-scale-blue-4: #388bfd;--color-scale-blue-5: #1f6feb;--color-scale-blue-6: #1158c7;--color-scale-blue-7: #0d419d;--color-scale-blue-8: #0c2d6b;--color-scale-blue-9: #051d4d;--color-scale-green-0: #aff5b4;--color-scale-green-1: #7ee787;--color-scale-green-2: #56d364;--color-scale-green-3: #3fb950;--color-scale-green-4: #2ea043;--color-scale-green-5: #238636;--color-scale-green-6: #196c2e;--color-scale-green-7: #0f5323;--color-scale-green-8: #033a16;--color-scale-green-9: #04260f;--color-scale-yellow-0: #f8e3a1;--color-scale-yellow-1: #f2cc60;--color-scale-yellow-2: #e3b341;--color-scale-yellow-3: #d29922;--color-scale-yellow-4: #bb8009;--color-scale-yellow-5: #9e6a03;--color-scale-yellow-6: #845306;--color-scale-yellow-7: #693e00;--color-scale-yellow-8: #4b2900;--color-scale-yellow-9: #341a00;--color-scale-orange-0: #ffdfb6;--color-scale-orange-1: #ffc680;--color-scale-orange-2: #ffa657;--color-scale-orange-3: #f0883e;--color-scale-orange-4: #db6d28;--color-scale-orange-5: #bd561d;--color-scale-orange-6: #9b4215;--color-scale-orange-7: #762d0a;--color-scale-orange-8: #5a1e02;--color-scale-orange-9: #3d1300;--color-scale-red-0: #ffdcd7;--color-scale-red-1: #ffc1ba;--color-scale-red-2: #ffa198;--color-scale-red-3: #ff7b72;--color-scale-red-4: #f85149;--color-scale-red-5: #da3633;--color-scale-red-6: #b62324;--color-scale-red-7: #8e1519;--color-scale-red-8: #67060c;--color-scale-red-9: #490202;--color-scale-purple-0: #eddeff;--color-scale-purple-1: #e2c5ff;--color-scale-purple-2: #d2a8ff;--color-scale-purple-3: #bc8cff;--color-scale-purple-4: #a371f7;--color-scale-purple-5: #8957e5;--color-scale-purple-6: #6e40c9;--color-scale-purple-7: #553098;--color-scale-purple-8: #3c1e70;--color-scale-purple-9: #271052;--color-scale-pink-0: #ffdaec;--color-scale-pink-1: #ffbedd;--color-scale-pink-2: #ff9bce;--color-scale-pink-3: #f778ba;--color-scale-pink-4: #db61a2;--color-scale-pink-5: #bf4b8a;--color-scale-pink-6: #9e3670;--color-scale-pink-7: #7d2457;--color-scale-pink-8: #5e103e;--color-scale-pink-9: #42062a;--color-scale-coral-0: #ffddd2;--color-scale-coral-1: #ffc2b2;--color-scale-coral-2: #ffa28b;--color-scale-coral-3: #f78166;--color-scale-coral-4: #ea6045;--color-scale-coral-5: #cf462d;--color-scale-coral-6: #ac3220;--color-scale-coral-7: #872012;--color-scale-coral-8: #640d04;--color-scale-coral-9: #460701}.code-diff-view[theme=dark] pre code.hljs{display:block;overflow-x:auto;padding:1em}.code-diff-view[theme=dark] code.hljs{padding:3px 5px}.code-diff-view[theme=dark] .hljs{color:#c9d1d9;background:#0d1117}.code-diff-view[theme=dark] .hljs-doctag,.code-diff-view[theme=dark] .hljs-keyword,.code-diff-view[theme=dark] .hljs-meta .hljs-keyword,.code-diff-view[theme=dark] .hljs-template-tag,.code-diff-view[theme=dark] .hljs-template-variable,.code-diff-view[theme=dark] .hljs-type,.code-diff-view[theme=dark] .hljs-variable.language_{color:#ff7b72}.code-diff-view[theme=dark] .hljs-title,.code-diff-view[theme=dark] .hljs-title.class_,.code-diff-view[theme=dark] .hljs-title.class_.inherited__,.code-diff-view[theme=dark] .hljs-title.function_{color:#d2a8ff}.code-diff-view[theme=dark] .hljs-attr,.code-diff-view[theme=dark] .hljs-attribute,.code-diff-view[theme=dark] .hljs-literal,.code-diff-view[theme=dark] .hljs-meta,.code-diff-view[theme=dark] .hljs-number,.code-diff-view[theme=dark] .hljs-operator,.code-diff-view[theme=dark] .hljs-variable,.code-diff-view[theme=dark] .hljs-selector-attr,.code-diff-view[theme=dark] .hljs-selector-class,.code-diff-view[theme=dark] .hljs-selector-id{color:#79c0ff}.code-diff-view[theme=dark] .hljs-regexp,.code-diff-view[theme=dark] .hljs-string,.code-diff-view[theme=dark] .hljs-meta .hljs-string{color:#a5d6ff}.code-diff-view[theme=dark] .hljs-built_in,.code-diff-view[theme=dark] .hljs-symbol{color:#ffa657}.code-diff-view[theme=dark] .hljs-comment,.code-diff-view[theme=dark] .hljs-code,.code-diff-view[theme=dark] .hljs-formula{color:#8b949e}.code-diff-view[theme=dark] .hljs-name,.code-diff-view[theme=dark] .hljs-quote,.code-diff-view[theme=dark] .hljs-selector-tag,.code-diff-view[theme=dark] .hljs-selector-pseudo{color:#7ee787}.code-diff-view[theme=dark] .hljs-subst{color:#c9d1d9}.code-diff-view[theme=dark] .hljs-section{color:#1f6feb;font-weight:700}.code-diff-view[theme=dark] .hljs-bullet{color:#f2cc60}.code-diff-view[theme=dark] .hljs-emphasis{color:#c9d1d9;font-style:italic}.code-diff-view[theme=dark] .hljs-strong{color:#c9d1d9;font-weight:700}.code-diff-view[theme=dark] .hljs-addition{color:#aff5b4;background-color:#033a16}.code-diff-view[theme=dark] .hljs-deletion{color:#ffdcd7;background-color:#67060c}.code-diff-view{position:relative;margin-top:16px;margin-bottom:16px;border:1px solid var(--color-border-default, #ddd);border-radius:6px;overflow-y:auto}.code-diff-view *{position:static;box-sizing:border-box}.code-diff-view .file-header{position:sticky;top:0;z-index:1;background-color:var(--color-canvas-subtle);border-bottom:1px solid var(--color-border-default);padding:8px 16px;font-size:12px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.code-diff-view .file-header .file-info{display:flex;justify-content:space-between;align-items:center;margin-left:8px;height:24px}.code-diff-view .file-header .file-info .info-left{color:var(--color-fg-default)}.code-diff-view .file-header .file-info .info-right{display:flex;justify-content:space-between;align-items:center;width:50%}.code-diff-view .file-header .file-info .diff-stat{display:inline-flex;align-items:center;gap:8px}.code-diff-view .file-header .file-info .diff-stat .diff-stat-added{color:var(--color-diffstat-addition-bg)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-deleted{color:var(--color-danger-emphasis)}.code-diff-view .file-header .file-info .diff-stat .diff-stat-ignored{color:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar{margin-left:auto;margin-right:1rem}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button{background-color:transparent;color:var(--color-fg-subtle);border:none}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button svg{fill:var(--color-fg-subtle)}.code-diff-view .file-header .file-info .diff-commandbar .command-item-button:hover{background-color:var(--color-btn-outline-hover-border)}.code-diff-view table{border-spacing:0}.code-diff-view .diff-table{width:100%}.code-diff-view .diff-table .blob-num{position:relative;width:1%;min-width:50px;padding-right:10px;padding-left:10px;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;line-height:20px;color:var(--color-fg-subtle);text-align:right;white-space:nowrap;vertical-align:top;cursor:pointer;-webkit-user-select:none;user-select:none}.code-diff-view .diff-table .blob-num-deletion{color:var(--color-diff-blob-deletion-num-text);background-color:var(--color-diff-blob-deletion-num-bg);border-color:var(--color-danger-emphasis)}.code-diff-view .diff-table .blob-num-addition{color:var(--color-diff-blob-addition-num-text);background-color:var(--color-diff-blob-addition-num-bg);border-color:var(--color-success-emphasis)}.code-diff-view .diff-table .blob-code{position:relative;padding-right:10px;padding-left:10px;line-height:20px;vertical-align:top}.code-diff-view .diff-table .blob-code .blob-code-inner{display:table-cell;overflow:visible;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:12px;color:var(--color-fg-default);word-wrap:anywhere;white-space:pre-wrap}.code-diff-view .diff-table .blob-code-deletion{background-color:var(--color-diff-blob-deletion-line-bg);outline:1px dashed transparent}.code-diff-view .diff-table .blob-code-deletion .x{color:var(--color-diff-blob-deletion-fg);background-color:var(--color-diff-blob-deletion-word-bg)}.code-diff-view .diff-table .blob-code-addition{background-color:var(--color-diff-blob-addition-line-bg);outline:1px dotted transparent}.code-diff-view .diff-table .blob-code-addition .x{color:var(--color-diff-blob-addition-fg);background-color:var(--color-diff-blob-addition-word-bg)}.code-diff-view .diff-table .current-diff{border:1px solid var(--color-border-muted)}.code-diff-view .diff-table .blob-code-context,.code-diff-view .diff-table .blob-code-addition,.code-diff-view .diff-table .blob-code-deletion{padding-left:22px!important}.code-diff-view .diff-table .blob-code-marker:before{position:absolute;top:1px;left:8px;padding-right:8px;content:attr(data-code-marker)}.code-diff-view .diff-table .blob-num-hunk{background-color:var(--color-diff-blob-hunk-num-bg)}.code-diff-view .diff-table .blob-code-hunk{background-color:var(--color-accent-subtle)}.code-diff-view .file-diff-split{table-layout:fixed}.code-diff-view .file-diff-split .blob-code+.blob-num{border-left:1px solid var(--color-border-muted)}.code-diff-view .file-diff-split .no-select{user-select:none}.code-diff-view .empty-cell{cursor:default;background-color:var(--color-neutral-subtle);border-right-color:var(--color-border-muted)}.code-diff-view[data-v-0c5adc58] td:nth-child(1){display:none}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();function Yt(){}Yt.prototype={diff:function(e,o){var n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=r.callback;typeof r=="function"&&(a=r,r={}),this.options=r;var s=this;function i(_){return a?(setTimeout(function(){a(void 0,_)},0),!0):_}e=this.castInput(e),o=this.castInput(o),e=this.removeEmpty(this.tokenize(e)),o=this.removeEmpty(this.tokenize(o));var l=o.length,c=e.length,d=1,f=l+c;r.maxEditLength&&(f=Math.min(f,r.maxEditLength));var u=(n=r.timeout)!==null&&n!==void 0?n:1/0,h=Date.now()+u,m=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(m[0],o,e,0);if(m[0].oldPos+1>=c&&p+1>=l)return i([{value:this.join(o),count:o.length}]);var y=-1/0,b=1/0;function g(){for(var _=Math.max(y,-d);_<=Math.min(b,d);_+=2){var B=void 0,A=m[_-1],C=m[_+1];A&&(m[_-1]=void 0);var x=!1;if(C){var k=C.oldPos-_;x=C&&0<=k&&k<l}var N=A&&A.oldPos+1<c;if(!x&&!N){m[_]=void 0;continue}if(!N||x&&A.oldPos+1<C.oldPos?B=s.addToPath(C,!0,void 0,0):B=s.addToPath(A,void 0,!0,1),p=s.extractCommon(B,o,e,_),B.oldPos+1>=c&&p+1>=l)return i(Ap(s,B.lastComponent,o,e,s.useLongestToken));m[_]=B,B.oldPos+1>=c&&(b=Math.min(b,_-1)),p+1>=l&&(y=Math.max(y,_+1))}d++}if(a)(function _(){setTimeout(function(){if(d>f||Date.now()>h)return a();g()||_()},0)})();else for(;d<=f&&Date.now()<=h;){var E=g();if(E)return E}},addToPath:function(e,o,n,r){var a=e.lastComponent;return a&&a.added===o&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:o,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:o,removed:n,previousComponent:a}}},extractCommon:function(e,o,n,r){for(var a=o.length,s=n.length,i=e.oldPos,l=i-r,c=0;l+1<a&&i+1<s&&this.equals(o[l+1],n[i+1]);)l++,i++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=i,l},equals:function(e,o){return this.options.comparator?this.options.comparator(e,o):e===o||this.options.ignoreCase&&e.toLowerCase()===o.toLowerCase()},removeEmpty:function(e){for(var o=[],n=0;n<e.length;n++)e[n]&&o.push(e[n]);return o},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function Ap(e,o,n,r,a){for(var s=[],i;o;)s.push(o),i=o.previousComponent,delete o.previousComponent,o=i;s.reverse();for(var l=0,c=s.length,d=0,f=0;l<c;l++){var u=s[l];if(u.removed){if(u.value=e.join(r.slice(f,f+u.count)),f+=u.count,l&&s[l-1].added){var h=s[l-1];s[l-1]=s[l],s[l]=h}}else{if(!u.added&&a){var m=n.slice(d,d+u.count);m=m.map(function(y,b){var g=r[f+b];return g.length>y.length?g:y}),u.value=e.join(m)}else u.value=e.join(n.slice(d,d+u.count));d+=u.count,u.added||(f+=u.count)}}var p=s[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(s[c-2].value+=p.value,s.pop()),s}var vp=new Yt;function Dp(e,o,n){return vp.diff(e,o,n)}function Np(e,o){if(typeof e=="function")o.callback=e;else if(e)for(var n in e)e.hasOwnProperty(n)&&(o[n]=e[n]);return o}var Wl=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Hl=/\S/,es=new Yt;es.equals=function(e,o){return this.options.ignoreCase&&(e=e.toLowerCase(),o=o.toLowerCase()),e===o||this.options.ignoreWhitespace&&!Hl.test(e)&&!Hl.test(o)},es.tokenize=function(e){for(var o=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<o.length-1;n++)!o[n+1]&&o[n+2]&&Wl.test(o[n])&&Wl.test(o[n+2])&&(o[n]+=o[n+2],o.splice(n+1,2),n--);return o};function Vp(e,o,n){return n=Np(n,{ignoreWhitespace:!0}),es.diff(e,o,n)}var ql=new Yt;ql.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
8
|
+
`));var o=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var a=n[r];r%2&&!this.options.newlineIsToken?o[o.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),o.push(a))}return o};var Mp=new Yt;Mp.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Tp=new Yt;Tp.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function xr(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xr=function(o){return typeof o}:xr=function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},xr(e)}var Pp=Object.prototype.toString,An=new Yt;An.useLongestToken=!0,An.tokenize=ql.tokenize,An.castInput=function(e){var o=this.options,n=o.undefinedReplacement,r=o.stringifyReplacer,a=r===void 0?function(s,i){return typeof i>"u"?n:i}:r;return typeof e=="string"?e:JSON.stringify(ts(e,null,null,a),a," ")},An.equals=function(e,o){return Yt.prototype.equals.call(An,e.replace(/,([\r\n])/g,"$1"),o.replace(/,([\r\n])/g,"$1"))};function ts(e,o,n,r,a){o=o||[],n=n||[],r&&(e=r(a,e));var s;for(s=0;s<o.length;s+=1)if(o[s]===e)return n[s];var i;if(Pp.call(e)==="[object Array]"){for(o.push(e),i=new Array(e.length),n.push(i),s=0;s<e.length;s+=1)i[s]=ts(e[s],o,n,r,a);return o.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),xr(e)==="object"&&e!==null){o.push(e),i={},n.push(i);var l=[],c;for(c in e)e.hasOwnProperty(c)&&l.push(c);for(l.sort(),s=0;s<l.length;s+=1)c=l[s],i[c]=ts(e[c],o,n,r,c);o.pop(),n.pop()}else i=e;return i}var os=new Yt;os.tokenize=function(e){return e.slice()},os.join=os.removeEmpty=function(e){return e};function Op(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gl={exports:{}};(function(e){var o=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,a=0;o.Diff=function(s,i){return[s,i]},o.prototype.diff_main=function(s,i,l,c){typeof c>"u"&&(this.Diff_Timeout<=0?c=Number.MAX_VALUE:c=new Date().getTime()+this.Diff_Timeout*1e3);var d=c;if(s==null||i==null)throw new Error("Null input. (diff_main)");if(s==i)return s?[new o.Diff(a,s)]:[];typeof l>"u"&&(l=!0);var f=l,u=this.diff_commonPrefix(s,i),h=s.substring(0,u);s=s.substring(u),i=i.substring(u),u=this.diff_commonSuffix(s,i);var m=s.substring(s.length-u);s=s.substring(0,s.length-u),i=i.substring(0,i.length-u);var p=this.diff_compute_(s,i,f,d);return h&&p.unshift(new o.Diff(a,h)),m&&p.push(new o.Diff(a,m)),this.diff_cleanupMerge(p),p},o.prototype.diff_compute_=function(s,i,l,c){var d;if(!s)return[new o.Diff(r,i)];if(!i)return[new o.Diff(n,s)];var f=s.length>i.length?s:i,u=s.length>i.length?i:s,h=f.indexOf(u);if(h!=-1)return d=[new o.Diff(r,f.substring(0,h)),new o.Diff(a,u),new o.Diff(r,f.substring(h+u.length))],s.length>i.length&&(d[0][0]=d[2][0]=n),d;if(u.length==1)return[new o.Diff(n,s),new o.Diff(r,i)];var m=this.diff_halfMatch_(s,i);if(m){var p=m[0],y=m[1],b=m[2],g=m[3],E=m[4],_=this.diff_main(p,b,l,c),B=this.diff_main(y,g,l,c);return _.concat([new o.Diff(a,E)],B)}return l&&s.length>100&&i.length>100?this.diff_lineMode_(s,i,c):this.diff_bisect_(s,i,c)},o.prototype.diff_lineMode_=function(s,i,l){var c=this.diff_linesToChars_(s,i);s=c.chars1,i=c.chars2;var d=c.lineArray,f=this.diff_main(s,i,!1,l);this.diff_charsToLines_(f,d),this.diff_cleanupSemantic(f),f.push(new o.Diff(a,""));for(var u=0,h=0,m=0,p="",y="";u<f.length;){switch(f[u][0]){case r:m++,y+=f[u][1];break;case n:h++,p+=f[u][1];break;case a:if(h>=1&&m>=1){f.splice(u-h-m,h+m),u=u-h-m;for(var b=this.diff_main(p,y,!1,l),g=b.length-1;g>=0;g--)f.splice(u,0,b[g]);u=u+b.length}m=0,h=0,p="",y="";break}u++}return f.pop(),f},o.prototype.diff_bisect_=function(s,i,l){for(var c=s.length,d=i.length,f=Math.ceil((c+d)/2),u=f,h=2*f,m=new Array(h),p=new Array(h),y=0;y<h;y++)m[y]=-1,p[y]=-1;m[u+1]=0,p[u+1]=0;for(var b=c-d,g=b%2!=0,E=0,_=0,B=0,A=0,C=0;C<f&&!(new Date().getTime()>l);C++){for(var x=-C+E;x<=C-_;x+=2){var k=u+x,N;x==-C||x!=C&&m[k-1]<m[k+1]?N=m[k+1]:N=m[k-1]+1;for(var w=N-x;N<c&&w<d&&s.charAt(N)==i.charAt(w);)N++,w++;if(m[k]=N,N>c)_+=2;else if(w>d)E+=2;else if(g){var v=u+b-x;if(v>=0&&v<h&&p[v]!=-1){var S=c-p[v];if(N>=S)return this.diff_bisectSplit_(s,i,N,w,l)}}}for(var D=-C+B;D<=C-A;D+=2){var v=u+D,S;D==-C||D!=C&&p[v-1]<p[v+1]?S=p[v+1]:S=p[v-1]+1;for(var V=S-D;S<c&&V<d&&s.charAt(c-S-1)==i.charAt(d-V-1);)S++,V++;if(p[v]=S,S>c)A+=2;else if(V>d)B+=2;else if(!g){var k=u+b-D;if(k>=0&&k<h&&m[k]!=-1){var N=m[k],w=u+N-k;if(S=c-S,N>=S)return this.diff_bisectSplit_(s,i,N,w,l)}}}}return[new o.Diff(n,s),new o.Diff(r,i)]},o.prototype.diff_bisectSplit_=function(s,i,l,c,d){var f=s.substring(0,l),u=i.substring(0,c),h=s.substring(l),m=i.substring(c),p=this.diff_main(f,u,!1,d),y=this.diff_main(h,m,!1,d);return p.concat(y)},o.prototype.diff_linesToChars_=function(s,i){var l=[],c={};l[0]="";function d(m){for(var p="",y=0,b=-1,g=l.length;b<m.length-1;){b=m.indexOf(`
|
|
9
|
+
`,y),b==-1&&(b=m.length-1);var E=m.substring(y,b+1);(c.hasOwnProperty?c.hasOwnProperty(E):c[E]!==void 0)?p+=String.fromCharCode(c[E]):(g==f&&(E=m.substring(y),b=m.length),p+=String.fromCharCode(g),c[E]=g,l[g++]=E),y=b+1}return p}var f=4e4,u=d(s);f=65535;var h=d(i);return{chars1:u,chars2:h,lineArray:l}},o.prototype.diff_charsToLines_=function(s,i){for(var l=0;l<s.length;l++){for(var c=s[l][1],d=[],f=0;f<c.length;f++)d[f]=i[c.charCodeAt(f)];s[l][1]=d.join("")}},o.prototype.diff_commonPrefix=function(s,i){if(!s||!i||s.charAt(0)!=i.charAt(0))return 0;for(var l=0,c=Math.min(s.length,i.length),d=c,f=0;l<d;)s.substring(f,d)==i.substring(f,d)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},o.prototype.diff_commonSuffix=function(s,i){if(!s||!i||s.charAt(s.length-1)!=i.charAt(i.length-1))return 0;for(var l=0,c=Math.min(s.length,i.length),d=c,f=0;l<d;)s.substring(s.length-d,s.length-f)==i.substring(i.length-d,i.length-f)?(l=d,f=l):c=d,d=Math.floor((c-l)/2+l);return d},o.prototype.diff_commonOverlap_=function(s,i){var l=s.length,c=i.length;if(l==0||c==0)return 0;l>c?s=s.substring(l-c):l<c&&(i=i.substring(0,l));var d=Math.min(l,c);if(s==i)return d;for(var f=0,u=1;;){var h=s.substring(d-u),m=i.indexOf(h);if(m==-1)return f;u+=m,(m==0||s.substring(d-u)==i.substring(0,u))&&(f=u,u++)}},o.prototype.diff_halfMatch_=function(s,i){if(this.Diff_Timeout<=0)return null;var l=s.length>i.length?s:i,c=s.length>i.length?i:s;if(l.length<4||c.length*2<l.length)return null;var d=this;function f(_,B,A){for(var C=_.substring(A,A+Math.floor(_.length/4)),x=-1,k="",N,w,v,S;(x=B.indexOf(C,x+1))!=-1;){var D=d.diff_commonPrefix(_.substring(A),B.substring(x)),V=d.diff_commonSuffix(_.substring(0,A),B.substring(0,x));k.length<V+D&&(k=B.substring(x-V,x)+B.substring(x,x+D),N=_.substring(0,A-V),w=_.substring(A+D),v=B.substring(0,x-V),S=B.substring(x+D))}return k.length*2>=_.length?[N,w,v,S,k]:null}var u=f(l,c,Math.ceil(l.length/4)),h=f(l,c,Math.ceil(l.length/2)),m;if(!u&&!h)return null;h?u?m=u[4].length>h[4].length?u:h:m=h:m=u;var p,y,b,g;s.length>i.length?(p=m[0],y=m[1],b=m[2],g=m[3]):(b=m[0],g=m[1],p=m[2],y=m[3]);var E=m[4];return[p,y,b,g,E]},o.prototype.diff_cleanupSemantic=function(s){for(var i=!1,l=[],c=0,d=null,f=0,u=0,h=0,m=0,p=0;f<s.length;)s[f][0]==a?(l[c++]=f,u=m,h=p,m=0,p=0,d=s[f][1]):(s[f][0]==r?m+=s[f][1].length:p+=s[f][1].length,d&&d.length<=Math.max(u,h)&&d.length<=Math.max(m,p)&&(s.splice(l[c-1],0,new o.Diff(n,d)),s[l[c-1]+1][0]=r,c--,c--,f=c>0?l[c-1]:-1,u=0,h=0,m=0,p=0,d=null,i=!0)),f++;for(i&&this.diff_cleanupMerge(s),this.diff_cleanupSemanticLossless(s),f=1;f<s.length;){if(s[f-1][0]==n&&s[f][0]==r){var y=s[f-1][1],b=s[f][1],g=this.diff_commonOverlap_(y,b),E=this.diff_commonOverlap_(b,y);g>=E?(g>=y.length/2||g>=b.length/2)&&(s.splice(f,0,new o.Diff(a,b.substring(0,g))),s[f-1][1]=y.substring(0,y.length-g),s[f+1][1]=b.substring(g),f++):(E>=y.length/2||E>=b.length/2)&&(s.splice(f,0,new o.Diff(a,y.substring(0,E))),s[f-1][0]=r,s[f-1][1]=b.substring(0,b.length-E),s[f+1][0]=n,s[f+1][1]=y.substring(E),f++),f++}f++}},o.prototype.diff_cleanupSemanticLossless=function(s){function i(E,_){if(!E||!_)return 6;var B=E.charAt(E.length-1),A=_.charAt(0),C=B.match(o.nonAlphaNumericRegex_),x=A.match(o.nonAlphaNumericRegex_),k=C&&B.match(o.whitespaceRegex_),N=x&&A.match(o.whitespaceRegex_),w=k&&B.match(o.linebreakRegex_),v=N&&A.match(o.linebreakRegex_),S=w&&E.match(o.blanklineEndRegex_),D=v&&_.match(o.blanklineStartRegex_);return S||D?5:w||v?4:C&&!k&&N?3:k||N?2:C||x?1:0}for(var l=1;l<s.length-1;){if(s[l-1][0]==a&&s[l+1][0]==a){var c=s[l-1][1],d=s[l][1],f=s[l+1][1],u=this.diff_commonSuffix(c,d);if(u){var h=d.substring(d.length-u);c=c.substring(0,c.length-u),d=h+d.substring(0,d.length-u),f=h+f}for(var m=c,p=d,y=f,b=i(c,d)+i(d,f);d.charAt(0)===f.charAt(0);){c+=d.charAt(0),d=d.substring(1)+f.charAt(0),f=f.substring(1);var g=i(c,d)+i(d,f);g>=b&&(b=g,m=c,p=d,y=f)}s[l-1][1]!=m&&(m?s[l-1][1]=m:(s.splice(l-1,1),l--),s[l][1]=p,y?s[l+1][1]=y:(s.splice(l+1,1),l--))}l++}},o.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,o.whitespaceRegex_=/\s/,o.linebreakRegex_=/[\r\n]/,o.blanklineEndRegex_=/\n\r?\n$/,o.blanklineStartRegex_=/^\r?\n\r?\n/,o.prototype.diff_cleanupEfficiency=function(s){for(var i=!1,l=[],c=0,d=null,f=0,u=!1,h=!1,m=!1,p=!1;f<s.length;)s[f][0]==a?(s[f][1].length<this.Diff_EditCost&&(m||p)?(l[c++]=f,u=m,h=p,d=s[f][1]):(c=0,d=null),m=p=!1):(s[f][0]==n?p=!0:m=!0,d&&(u&&h&&m&&p||d.length<this.Diff_EditCost/2&&u+h+m+p==3)&&(s.splice(l[c-1],0,new o.Diff(n,d)),s[l[c-1]+1][0]=r,c--,d=null,u&&h?(m=p=!0,c=0):(c--,f=c>0?l[c-1]:-1,m=p=!1),i=!0)),f++;i&&this.diff_cleanupMerge(s)},o.prototype.diff_cleanupMerge=function(s){s.push(new o.Diff(a,""));for(var i=0,l=0,c=0,d="",f="",u;i<s.length;)switch(s[i][0]){case r:c++,f+=s[i][1],i++;break;case n:l++,d+=s[i][1],i++;break;case a:l+c>1?(l!==0&&c!==0&&(u=this.diff_commonPrefix(f,d),u!==0&&(i-l-c>0&&s[i-l-c-1][0]==a?s[i-l-c-1][1]+=f.substring(0,u):(s.splice(0,0,new o.Diff(a,f.substring(0,u))),i++),f=f.substring(u),d=d.substring(u)),u=this.diff_commonSuffix(f,d),u!==0&&(s[i][1]=f.substring(f.length-u)+s[i][1],f=f.substring(0,f.length-u),d=d.substring(0,d.length-u))),i-=l+c,s.splice(i,l+c),d.length&&(s.splice(i,0,new o.Diff(n,d)),i++),f.length&&(s.splice(i,0,new o.Diff(r,f)),i++),i++):i!==0&&s[i-1][0]==a?(s[i-1][1]+=s[i][1],s.splice(i,1)):i++,c=0,l=0,d="",f="";break}s[s.length-1][1]===""&&s.pop();var h=!1;for(i=1;i<s.length-1;)s[i-1][0]==a&&s[i+1][0]==a&&(s[i][1].substring(s[i][1].length-s[i-1][1].length)==s[i-1][1]?(s[i][1]=s[i-1][1]+s[i][1].substring(0,s[i][1].length-s[i-1][1].length),s[i+1][1]=s[i-1][1]+s[i+1][1],s.splice(i-1,1),h=!0):s[i][1].substring(0,s[i+1][1].length)==s[i+1][1]&&(s[i-1][1]+=s[i+1][1],s[i][1]=s[i][1].substring(s[i+1][1].length)+s[i+1][1],s.splice(i+1,1),h=!0)),i++;h&&this.diff_cleanupMerge(s)},o.prototype.diff_xIndex=function(s,i){var l=0,c=0,d=0,f=0,u;for(u=0;u<s.length&&(s[u][0]!==r&&(l+=s[u][1].length),s[u][0]!==n&&(c+=s[u][1].length),!(l>i));u++)d=l,f=c;return s.length!=u&&s[u][0]===n?f:f+(i-d)},o.prototype.diff_prettyHtml=function(s){for(var i=[],l=/&/g,c=/</g,d=/>/g,f=/\n/g,u=0;u<s.length;u++){var h=s[u][0],m=s[u][1],p=m.replace(l,"&").replace(c,"<").replace(d,">").replace(f,"¶<br>");switch(h){case r:i[u]='<ins style="background:#e6ffe6;">'+p+"</ins>";break;case n:i[u]='<del style="background:#ffe6e6;">'+p+"</del>";break;case a:i[u]="<span>"+p+"</span>";break}}return i.join("")},o.prototype.diff_text1=function(s){for(var i=[],l=0;l<s.length;l++)s[l][0]!==r&&(i[l]=s[l][1]);return i.join("")},o.prototype.diff_text2=function(s){for(var i=[],l=0;l<s.length;l++)s[l][0]!==n&&(i[l]=s[l][1]);return i.join("")},o.prototype.diff_levenshtein=function(s){for(var i=0,l=0,c=0,d=0;d<s.length;d++){var f=s[d][0],u=s[d][1];switch(f){case r:l+=u.length;break;case n:c+=u.length;break;case a:i+=Math.max(l,c),l=0,c=0;break}}return i+=Math.max(l,c),i},o.prototype.diff_toDelta=function(s){for(var i=[],l=0;l<s.length;l++)switch(s[l][0]){case r:i[l]="+"+encodeURI(s[l][1]);break;case n:i[l]="-"+s[l][1].length;break;case a:i[l]="="+s[l][1].length;break}return i.join(" ").replace(/%20/g," ")},o.prototype.diff_fromDelta=function(s,i){for(var l=[],c=0,d=0,f=i.split(/\t/g),u=0;u<f.length;u++){var h=f[u].substring(1);switch(f[u].charAt(0)){case"+":try{l[c++]=new o.Diff(r,decodeURI(h))}catch{throw new Error("Illegal escape in diff_fromDelta: "+h)}break;case"-":case"=":var m=parseInt(h,10);if(isNaN(m)||m<0)throw new Error("Invalid number in diff_fromDelta: "+h);var p=s.substring(d,d+=m);f[u].charAt(0)=="="?l[c++]=new o.Diff(a,p):l[c++]=new o.Diff(n,p);break;default:if(f[u])throw new Error("Invalid diff operation in diff_fromDelta: "+f[u])}}if(d!=s.length)throw new Error("Delta length ("+d+") does not equal source text length ("+s.length+").");return l},o.prototype.match_main=function(s,i,l){if(s==null||i==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,s.length)),s==i?0:s.length?s.substring(l,l+i.length)==i?l:this.match_bitap_(s,i,l):-1},o.prototype.match_bitap_=function(s,i,l){if(i.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var c=this.match_alphabet_(i),d=this;function f(N,w){var v=N/i.length,S=Math.abs(l-w);return d.Match_Distance?v+S/d.Match_Distance:S?1:v}var u=this.Match_Threshold,h=s.indexOf(i,l);h!=-1&&(u=Math.min(f(0,h),u),h=s.lastIndexOf(i,l+i.length),h!=-1&&(u=Math.min(f(0,h),u)));var m=1<<i.length-1;h=-1;for(var p,y,b=i.length+s.length,g,E=0;E<i.length;E++){for(p=0,y=b;p<y;)f(E,l+y)<=u?p=y:b=y,y=Math.floor((b-p)/2+p);b=y;var _=Math.max(1,l-y+1),B=Math.min(l+y,s.length)+i.length,A=Array(B+2);A[B+1]=(1<<E)-1;for(var C=B;C>=_;C--){var x=c[s.charAt(C-1)];if(E===0?A[C]=(A[C+1]<<1|1)&x:A[C]=(A[C+1]<<1|1)&x|((g[C+1]|g[C])<<1|1)|g[C+1],A[C]&m){var k=f(E,C-1);if(k<=u)if(u=k,h=C-1,h>l)_=Math.max(1,2*l-h);else break}}if(f(E+1,l)>u)break;g=A}return h},o.prototype.match_alphabet_=function(s){for(var i={},l=0;l<s.length;l++)i[s.charAt(l)]=0;for(var l=0;l<s.length;l++)i[s.charAt(l)]|=1<<s.length-l-1;return i},o.prototype.patch_addContext_=function(s,i){if(i.length!=0){if(s.start2===null)throw Error("patch not initialized");for(var l=i.substring(s.start2,s.start2+s.length1),c=0;i.indexOf(l)!=i.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)c+=this.Patch_Margin,l=i.substring(s.start2-c,s.start2+s.length1+c);c+=this.Patch_Margin;var d=i.substring(s.start2-c,s.start2);d&&s.diffs.unshift(new o.Diff(a,d));var f=i.substring(s.start2+s.length1,s.start2+s.length1+c);f&&s.diffs.push(new o.Diff(a,f)),s.start1-=d.length,s.start2-=d.length,s.length1+=d.length+f.length,s.length2+=d.length+f.length}},o.prototype.patch_make=function(s,i,l){var c,d;if(typeof s=="string"&&typeof i=="string"&&typeof l>"u")c=s,d=this.diff_main(c,i,!0),d.length>2&&(this.diff_cleanupSemantic(d),this.diff_cleanupEfficiency(d));else if(s&&typeof s=="object"&&typeof i>"u"&&typeof l>"u")d=s,c=this.diff_text1(d);else if(typeof s=="string"&&i&&typeof i=="object"&&typeof l>"u")c=s,d=i;else if(typeof s=="string"&&typeof i=="string"&&l&&typeof l=="object")c=s,d=l;else throw new Error("Unknown call format to patch_make.");if(d.length===0)return[];for(var f=[],u=new o.patch_obj,h=0,m=0,p=0,y=c,b=c,g=0;g<d.length;g++){var E=d[g][0],_=d[g][1];switch(!h&&E!==a&&(u.start1=m,u.start2=p),E){case r:u.diffs[h++]=d[g],u.length2+=_.length,b=b.substring(0,p)+_+b.substring(p);break;case n:u.length1+=_.length,u.diffs[h++]=d[g],b=b.substring(0,p)+b.substring(p+_.length);break;case a:_.length<=2*this.Patch_Margin&&h&&d.length!=g+1?(u.diffs[h++]=d[g],u.length1+=_.length,u.length2+=_.length):_.length>=2*this.Patch_Margin&&h&&(this.patch_addContext_(u,y),f.push(u),u=new o.patch_obj,h=0,y=b,m=p);break}E!==r&&(m+=_.length),E!==n&&(p+=_.length)}return h&&(this.patch_addContext_(u,y),f.push(u)),f},o.prototype.patch_deepCopy=function(s){for(var i=[],l=0;l<s.length;l++){var c=s[l],d=new o.patch_obj;d.diffs=[];for(var f=0;f<c.diffs.length;f++)d.diffs[f]=new o.Diff(c.diffs[f][0],c.diffs[f][1]);d.start1=c.start1,d.start2=c.start2,d.length1=c.length1,d.length2=c.length2,i[l]=d}return i},o.prototype.patch_apply=function(s,i){if(s.length==0)return[i,[]];s=this.patch_deepCopy(s);var l=this.patch_addPadding(s);i=l+i+l,this.patch_splitMax(s);for(var c=0,d=[],f=0;f<s.length;f++){var u=s[f].start2+c,h=this.diff_text1(s[f].diffs),m,p=-1;if(h.length>this.Match_MaxBits?(m=this.match_main(i,h.substring(0,this.Match_MaxBits),u),m!=-1&&(p=this.match_main(i,h.substring(h.length-this.Match_MaxBits),u+h.length-this.Match_MaxBits),(p==-1||m>=p)&&(m=-1))):m=this.match_main(i,h,u),m==-1)d[f]=!1,c-=s[f].length2-s[f].length1;else{d[f]=!0,c=m-u;var y;if(p==-1?y=i.substring(m,m+h.length):y=i.substring(m,p+this.Match_MaxBits),h==y)i=i.substring(0,m)+this.diff_text2(s[f].diffs)+i.substring(m+h.length);else{var b=this.diff_main(h,y,!1);if(h.length>this.Match_MaxBits&&this.diff_levenshtein(b)/h.length>this.Patch_DeleteThreshold)d[f]=!1;else{this.diff_cleanupSemanticLossless(b);for(var g=0,E,_=0;_<s[f].diffs.length;_++){var B=s[f].diffs[_];B[0]!==a&&(E=this.diff_xIndex(b,g)),B[0]===r?i=i.substring(0,m+E)+B[1]+i.substring(m+E):B[0]===n&&(i=i.substring(0,m+E)+i.substring(m+this.diff_xIndex(b,g+B[1].length))),B[0]!==n&&(g+=B[1].length)}}}}}return i=i.substring(l.length,i.length-l.length),[i,d]},o.prototype.patch_addPadding=function(s){for(var i=this.Patch_Margin,l="",c=1;c<=i;c++)l+=String.fromCharCode(c);for(var c=0;c<s.length;c++)s[c].start1+=i,s[c].start2+=i;var d=s[0],f=d.diffs;if(f.length==0||f[0][0]!=a)f.unshift(new o.Diff(a,l)),d.start1-=i,d.start2-=i,d.length1+=i,d.length2+=i;else if(i>f[0][1].length){var u=i-f[0][1].length;f[0][1]=l.substring(f[0][1].length)+f[0][1],d.start1-=u,d.start2-=u,d.length1+=u,d.length2+=u}if(d=s[s.length-1],f=d.diffs,f.length==0||f[f.length-1][0]!=a)f.push(new o.Diff(a,l)),d.length1+=i,d.length2+=i;else if(i>f[f.length-1][1].length){var u=i-f[f.length-1][1].length;f[f.length-1][1]+=l.substring(0,u),d.length1+=u,d.length2+=u}return l},o.prototype.patch_splitMax=function(s){for(var i=this.Match_MaxBits,l=0;l<s.length;l++)if(!(s[l].length1<=i)){var c=s[l];s.splice(l--,1);for(var d=c.start1,f=c.start2,u="";c.diffs.length!==0;){var h=new o.patch_obj,m=!0;for(h.start1=d-u.length,h.start2=f-u.length,u!==""&&(h.length1=h.length2=u.length,h.diffs.push(new o.Diff(a,u)));c.diffs.length!==0&&h.length1<i-this.Patch_Margin;){var p=c.diffs[0][0],y=c.diffs[0][1];p===r?(h.length2+=y.length,f+=y.length,h.diffs.push(c.diffs.shift()),m=!1):p===n&&h.diffs.length==1&&h.diffs[0][0]==a&&y.length>2*i?(h.length1+=y.length,d+=y.length,m=!1,h.diffs.push(new o.Diff(p,y)),c.diffs.shift()):(y=y.substring(0,i-h.length1-this.Patch_Margin),h.length1+=y.length,d+=y.length,p===a?(h.length2+=y.length,f+=y.length):m=!1,h.diffs.push(new o.Diff(p,y)),y==c.diffs[0][1]?c.diffs.shift():c.diffs[0][1]=c.diffs[0][1].substring(y.length))}u=this.diff_text2(h.diffs),u=u.substring(u.length-this.Patch_Margin);var b=this.diff_text1(c.diffs).substring(0,this.Patch_Margin);b!==""&&(h.length1+=b.length,h.length2+=b.length,h.diffs.length!==0&&h.diffs[h.diffs.length-1][0]===a?h.diffs[h.diffs.length-1][1]+=b:h.diffs.push(new o.Diff(a,b))),m||s.splice(++l,0,h)}}},o.prototype.patch_toText=function(s){for(var i=[],l=0;l<s.length;l++)i[l]=s[l];return i.join("")},o.prototype.patch_fromText=function(s){var i=[];if(!s)return i;for(var l=s.split(`
|
|
10
10
|
`),c=0,d=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<l.length;){var f=l[c].match(d);if(!f)throw new Error("Invalid patch string: "+l[c]);var u=new o.patch_obj;for(i.push(u),u.start1=parseInt(f[1],10),f[2]===""?(u.start1--,u.length1=1):f[2]=="0"?u.length1=0:(u.start1--,u.length1=parseInt(f[2],10)),u.start2=parseInt(f[3],10),f[4]===""?(u.start2--,u.length2=1):f[4]=="0"?u.length2=0:(u.start2--,u.length2=parseInt(f[4],10)),c++;c<l.length;){var h=l[c].charAt(0);try{var m=decodeURI(l[c].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+m)}if(h=="-")u.diffs.push(new o.Diff(n,m));else if(h=="+")u.diffs.push(new o.Diff(r,m));else if(h==" ")u.diffs.push(new o.Diff(a,m));else{if(h=="@")break;if(h!=="")throw new Error('Invalid patch mode "'+h+'" in: '+m)}c++}}return i},o.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},o.patch_obj.prototype.toString=function(){var s,i;this.length1===0?s=this.start1+",0":this.length1==1?s=this.start1+1:s=this.start1+1+","+this.length1,this.length2===0?i=this.start2+",0":this.length2==1?i=this.start2+1:i=this.start2+1+","+this.length2;for(var l=["@@ -"+s+" +"+i+` @@
|
|
11
11
|
`],c,d=0;d<this.diffs.length;d++){switch(this.diffs[d][0]){case r:c="+";break;case n:c="-";break;case a:c=" ";break}l[d+1]=c+encodeURI(this.diffs[d][1])+`
|
|
12
|
-
`}return l.join("").replace(/%20/g," ")},e.exports=o,e.exports.diff_match_patch=o,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=r,e.exports.DIFF_EQUAL=a})(Gl);var ns=Gl.exports;function Kl(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(o=>{const n=e[o],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Kl(n)}),e}class Xl{constructor(o){o.data===void 0&&(o.data={}),this.data=o.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Yl(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function go(e,...o){const n=Object.create(null);for(const r in e)n[r]=e[r];return o.forEach(function(r){for(const a in r)n[a]=r[a]}),n}const Lp="</span>",Jl=e=>!!e.scope,Rp=(e,{prefix:o})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${o}${n.shift()}`,...n.map((r,a)=>`${r}${"_".repeat(a+1)}`)].join(" ")}return`${o}${e}`};let Ip=class{constructor(o,n){this.buffer="",this.classPrefix=n.classPrefix,o.walk(this)}addText(o){this.buffer+=Yl(o)}openNode(o){if(!Jl(o))return;const n=Rp(o.scope,{prefix:this.classPrefix});this.span(n)}closeNode(o){Jl(o)&&(this.buffer+=Lp)}value(){return this.buffer}span(o){this.buffer+=`<span class="${o}">`}};const Ql=(e={})=>{const o={children:[]};return Object.assign(o,e),o};let Fp=class Tu{constructor(){this.rootNode=Ql(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(o){this.top.children.push(o)}openNode(o){const n=Ql({scope:o});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(o){return this.constructor._walk(o,this.rootNode)}static _walk(o,n){return typeof n=="string"?o.addText(n):n.children&&(o.openNode(n),n.children.forEach(r=>this._walk(o,r)),o.closeNode(n)),o}static _collapse(o){typeof o!="string"&&o.children&&(o.children.every(n=>typeof n=="string")?o.children=[o.children.join("")]:o.children.forEach(n=>{Tu._collapse(n)}))}},zp=class extends Fp{constructor(o){super(),this.options=o}addText(o){o!==""&&this.add(o)}startScope(o){this.openNode(o)}endScope(){this.closeNode()}__addSublanguage(o,n){const r=o.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Ip(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function vn(e){return e?typeof e=="string"?e:e.source:null}function Zl(e){return Vo("(?=",e,")")}function $p(e){return Vo("(?:",e,")*")}function jp(e){return Vo("(?:",e,")?")}function Vo(...e){return e.map(o=>vn(o)).join("")}function Up(e){const o=e[e.length-1];return typeof o=="object"&&o.constructor===Object?(e.splice(e.length-1,1),o):{}}function rs(...e){return"("+(Up(e).capture?"":"?:")+e.map(o=>vn(o)).join("|")+")"}function ec(e){return new RegExp(e.toString()+"|").exec("").length-1}function Wp(e,o){const n=e&&e.exec(o);return n&&n.index===0}const Hp=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function as(e,{joinWith:o}){let n=0;return e.map(r=>{n+=1;const a=n;let s=vn(r),i="";for(;s.length>0;){const l=Hp.exec(s);if(!l){i+=s;break}i+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?i+="\\"+String(Number(l[1])+a):(i+=l[0],l[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(o)}const qp=/\b\B/,tc="[a-zA-Z]\\w*",ss="[a-zA-Z_]\\w*",oc="\\b\\d+(\\.\\d+)?",nc="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",rc="\\b(0b[01]+)",Gp="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Kp=(e={})=>{const o=/^#![ ]*\//;return e.binary&&(e.begin=Vo(o,/.*\b/,e.binary,/\b.*/)),go({scope:"meta",begin:o,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Dn={begin:"\\\\[\\s\\S]",relevance:0},Xp={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Dn]},Yp={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Dn]},Jp={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},kr=function(e,o,n={}){const r=go({scope:"comment",begin:e,end:o,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=rs("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Vo(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Qp=kr("//","$"),Zp=kr("/\\*","\\*/"),eg=kr("#","$"),tg={scope:"number",begin:oc,relevance:0},og={scope:"number",begin:nc,relevance:0},ng={scope:"number",begin:rc,relevance:0},rg={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Dn,{begin:/\[/,end:/\]/,relevance:0,contains:[Dn]}]},ag={scope:"title",begin:tc,relevance:0},sg={scope:"title",begin:ss,relevance:0},ig={begin:"\\.\\s*"+ss,relevance:0};var wr=Object.freeze({__proto__:null,APOS_STRING_MODE:Xp,BACKSLASH_ESCAPE:Dn,BINARY_NUMBER_MODE:ng,BINARY_NUMBER_RE:rc,COMMENT:kr,C_BLOCK_COMMENT_MODE:Zp,C_LINE_COMMENT_MODE:Qp,C_NUMBER_MODE:og,C_NUMBER_RE:nc,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(o,n)=>{n.data._beginMatch=o[1]},"on:end":(o,n)=>{n.data._beginMatch!==o[1]&&n.ignoreMatch()}})},HASH_COMMENT_MODE:eg,IDENT_RE:tc,MATCH_NOTHING_RE:qp,METHOD_GUARD:ig,NUMBER_MODE:tg,NUMBER_RE:oc,PHRASAL_WORDS_MODE:Jp,QUOTE_STRING_MODE:Yp,REGEXP_MODE:rg,RE_STARTERS_RE:Gp,SHEBANG:Kp,TITLE_MODE:ag,UNDERSCORE_IDENT_RE:ss,UNDERSCORE_TITLE_MODE:sg});function lg(e,o){e.input[e.index-1]==="."&&o.ignoreMatch()}function cg(e,o){e.className!==void 0&&(e.scope=e.className,delete e.className)}function dg(e,o){o&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=lg,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function fg(e,o){Array.isArray(e.illegal)&&(e.illegal=rs(...e.illegal))}function ug(e,o){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function hg(e,o){e.relevance===void 0&&(e.relevance=1)}const mg=(e,o)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Vo(n.beforeMatch,Zl(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},pg=["of","and","for","in","not","or","if","then","parent","list","value"],gg="keyword";function ac(e,o,n=gg){const r=Object.create(null);return typeof e=="string"?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach(function(s){Object.assign(r,ac(e[s],o,s))}),r;function a(s,i){o&&(i=i.map(l=>l.toLowerCase())),i.forEach(function(l){const c=l.split("|");r[c[0]]=[s,bg(c[0],c[1])]})}}function bg(e,o){return o?Number(o):yg(e)?0:1}function yg(e){return pg.includes(e.toLowerCase())}const sc={},Mo=e=>{console.error(e)},ic=(e,...o)=>{console.log(`WARN: ${e}`,...o)},Qo=(e,o)=>{sc[`${e}/${o}`]||(console.log(`Deprecated as of ${e}. ${o}`),sc[`${e}/${o}`]=!0)},Cr=new Error;function lc(e,o,{key:n}){let r=0;const a=e[n],s={},i={};for(let l=1;l<=o.length;l++)i[l+r]=a[l],s[l+r]=!0,r+=ec(o[l-1]);e[n]=i,e[n]._emit=s,e[n]._multi=!0}function xg(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Mo("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Cr;if(typeof e.beginScope!="object"||e.beginScope===null)throw Mo("beginScope must be object"),Cr;lc(e,e.begin,{key:"beginScope"}),e.begin=as(e.begin,{joinWith:""})}}function kg(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Mo("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Cr;if(typeof e.endScope!="object"||e.endScope===null)throw Mo("endScope must be object"),Cr;lc(e,e.end,{key:"endScope"}),e.end=as(e.end,{joinWith:""})}}function wg(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Cg(e){wg(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),xg(e),kg(e)}function _g(e){function o(i,l){return new RegExp(vn(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=ec(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=o(as(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const d=c.findIndex((u,h)=>h>0&&u!==void 0),f=this.matchIndexes[d];return c.splice(0,d),Object.assign(c,f)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([d,f])=>c.addRule(d,f)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let d=c.exec(l);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){const f=this.getMatcher(0);f.lastIndex=this.lastIndex+1,d=f.exec(l)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function a(i){const l=new r;return i.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&l.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&l.addRule(i.illegal,{type:"illegal"}),l}function s(i,l){const c=i;if(i.isCompiled)return c;[cg,ug,Cg,mg].forEach(f=>f(i,l)),e.compilerExtensions.forEach(f=>f(i,l)),i.__beforeBegin=null,[dg,fg,hg].forEach(f=>f(i,l)),i.isCompiled=!0;let d=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),d=i.keywords.$pattern,delete i.keywords.$pattern),d=d||/\w+/,i.keywords&&(i.keywords=ac(i.keywords,e.case_insensitive)),c.keywordPatternRe=o(d,!0),l&&(i.begin||(i.begin=/\B|\b/),c.beginRe=o(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=o(c.end)),c.terminatorEnd=vn(c.end)||"",i.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+l.terminatorEnd)),i.illegal&&(c.illegalRe=o(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(f){return Eg(f==="self"?i:f)})),i.contains.forEach(function(f){s(f,c)}),i.starts&&s(i.starts,l),c.matcher=a(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=go(e.classNameAliases||{}),s(e)}function cc(e){return e?e.endsWithParent||cc(e.starts):!1}function Eg(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(o){return go(e,{variants:null},o)})),e.cachedVariants?e.cachedVariants:cc(e)?go(e,{starts:e.starts?go(e.starts):null}):Object.isFrozen(e)?go(e):e}var Bg="11.10.0";class Sg extends Error{constructor(o,n){super(o),this.name="HTMLInjectionError",this.html=n}}const is=Yl,dc=go,fc=Symbol("nomatch"),Ag=7,uc=function(e){const o=Object.create(null),n=Object.create(null),r=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:zp};function c(P){return l.noHighlightRe.test(P)}function d(P){let R=P.className+" ";R+=P.parentNode?P.parentNode.className:"";const j=l.languageDetectRe.exec(R);if(j){const T=D(j[1]);return T||(ic(s.replace("{}",j[1])),ic("Falling back to no-highlight mode for this block.",P)),T?j[1]:"no-highlight"}return R.split(/\s+/).find(T=>c(T)||D(T))}function f(P,R,j){let T="",F="";typeof R=="object"?(T=P,j=R.ignoreIllegals,F=R.language):(Qo("10.7.0","highlight(lang, code, ...args) has been deprecated."),Qo("10.7.0",`Please use highlight(code, options) instead.
|
|
13
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),F=P,T=R),j===void 0&&(j=!0);const X={code:T,language:F};L("before:highlight",X);const H=X.result?X.result:u(X.language,X.code,j);return H.code=X.code,L("after:highlight",H),H}function u(P,R,j,T){const F=Object.create(null);function X(te,le){return te.keywords[le]}function H(){if(!se.keywords){Re.addText(ve);return}let te=0;se.keywordPatternRe.lastIndex=0;let le=se.keywordPatternRe.exec(ve),G="";for(;le;){G+=ve.substring(te,le.index);const ee=Ee.case_insensitive?le[0].toLowerCase():le[0],re=X(se,ee);if(re){const[Ce,Ge]=re;if(Re.addText(G),G="",F[ee]=(F[ee]||0)+1,F[ee]<=Ag&&(ct+=Ge),Ce.startsWith("_"))G+=le[0];else{const wt=Ee.classNameAliases[Ce]||Ce;oe(le[0],wt)}}else G+=le[0];te=se.keywordPatternRe.lastIndex,le=se.keywordPatternRe.exec(ve)}G+=ve.substring(te),Re.addText(G)}function W(){if(ve==="")return;let te=null;if(typeof se.subLanguage=="string"){if(!o[se.subLanguage]){Re.addText(ve);return}te=u(se.subLanguage,ve,!0,Le[se.subLanguage]),Le[se.subLanguage]=te._top}else te=m(ve,se.subLanguage.length?se.subLanguage:null);se.relevance>0&&(ct+=te.relevance),Re.__addSublanguage(te._emitter,te.language)}function Z(){se.subLanguage!=null?W():H(),ve=""}function oe(te,le){te!==""&&(Re.startScope(le),Re.addText(te),Re.endScope())}function ye(te,le){let G=1;const ee=le.length-1;for(;G<=ee;){if(!te._emit[G]){G++;continue}const re=Ee.classNameAliases[te[G]]||te[G],Ce=le[G];re?oe(Ce,re):(ve=Ce,H(),ve=""),G++}}function Ne(te,le){return te.scope&&typeof te.scope=="string"&&Re.openNode(Ee.classNameAliases[te.scope]||te.scope),te.beginScope&&(te.beginScope._wrap?(oe(ve,Ee.classNameAliases[te.beginScope._wrap]||te.beginScope._wrap),ve=""):te.beginScope._multi&&(ye(te.beginScope,le),ve="")),se=Object.create(te,{parent:{value:se}}),se}function we(te,le,G){let ee=Wp(te.endRe,G);if(ee){if(te["on:end"]){const re=new Xl(te);te["on:end"](le,re),re.isMatchIgnored&&(ee=!1)}if(ee){for(;te.endsParent&&te.parent;)te=te.parent;return te}}if(te.endsWithParent)return we(te.parent,le,G)}function Q(te){return se.matcher.regexIndex===0?(ve+=te[0],1):(he=!0,0)}function $(te){const le=te[0],G=te.rule,ee=new Xl(G),re=[G.__beforeBegin,G["on:begin"]];for(const Ce of re)if(Ce&&(Ce(te,ee),ee.isMatchIgnored))return Q(le);return G.skip?ve+=le:(G.excludeBegin&&(ve+=le),Z(),!G.returnBegin&&!G.excludeBegin&&(ve=le)),Ne(G,te),G.returnBegin?0:le.length}function Y(te){const le=te[0],G=R.substring(te.index),ee=we(se,te,G);if(!ee)return fc;const re=se;se.endScope&&se.endScope._wrap?(Z(),oe(le,se.endScope._wrap)):se.endScope&&se.endScope._multi?(Z(),ye(se.endScope,te)):re.skip?ve+=le:(re.returnEnd||re.excludeEnd||(ve+=le),Z(),re.excludeEnd&&(ve=le));do se.scope&&Re.closeNode(),!se.skip&&!se.subLanguage&&(ct+=se.relevance),se=se.parent;while(se!==ee.parent);return ee.starts&&Ne(ee.starts,te),re.returnEnd?0:le.length}function ae(){const te=[];for(let le=se;le!==Ee;le=le.parent)le.scope&&te.unshift(le.scope);te.forEach(le=>Re.openNode(le))}let xe={};function Oe(te,le){const G=le&&le[0];if(ve+=te,G==null)return Z(),0;if(xe.type==="begin"&&le.type==="end"&&xe.index===le.index&&G===""){if(ve+=R.slice(le.index,le.index+1),!a){const ee=new Error(`0 width match regex (${P})`);throw ee.languageName=P,ee.badRule=xe.rule,ee}return 1}if(xe=le,le.type==="begin")return $(le);if(le.type==="illegal"&&!j){const ee=new Error('Illegal lexeme "'+G+'" for mode "'+(se.scope||"<unnamed>")+'"');throw ee.mode=se,ee}else if(le.type==="end"){const ee=Y(le);if(ee!==fc)return ee}if(le.type==="illegal"&&G==="")return 1;if(ie>1e5&&ie>le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ve+=G,G.length}const Ee=D(P);if(!Ee)throw Mo(s.replace("{}",P)),new Error('Unknown language: "'+P+'"');const We=_g(Ee);let Fe="",se=T||We;const Le={},Re=new l.__emitter(l);ae();let ve="",ct=0,q=0,ie=0,he=!1;try{if(Ee.__emitTokens)Ee.__emitTokens(R,Re);else{for(se.matcher.considerAll();;){ie++,he?he=!1:se.matcher.considerAll(),se.matcher.lastIndex=q;const te=se.matcher.exec(R);if(!te)break;const le=R.substring(q,te.index),G=Oe(le,te);q=te.index+G}Oe(R.substring(q))}return Re.finalize(),Fe=Re.toHTML(),{language:P,value:Fe,relevance:ct,illegal:!1,_emitter:Re,_top:se}}catch(te){if(te.message&&te.message.includes("Illegal"))return{language:P,value:is(R),illegal:!0,relevance:0,_illegalBy:{message:te.message,index:q,context:R.slice(q-100,q+100),mode:te.mode,resultSoFar:Fe},_emitter:Re};if(a)return{language:P,value:is(R),illegal:!1,relevance:0,errorRaised:te,_emitter:Re,_top:se};throw te}}function h(P){const R={value:is(P),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return R._emitter.addText(P),R}function m(P,R){R=R||l.languages||Object.keys(o);const j=h(P),T=R.filter(D).filter(v).map(Z=>u(Z,P,!1));T.unshift(j);const F=T.sort((Z,oe)=>{if(Z.relevance!==oe.relevance)return oe.relevance-Z.relevance;if(Z.language&&oe.language){if(D(Z.language).supersetOf===oe.language)return 1;if(D(oe.language).supersetOf===Z.language)return-1}return 0}),[X,H]=F,W=X;return W.secondBest=H,W}function p(P,R,j){const T=R&&n[R]||j;P.classList.add("hljs"),P.classList.add(`language-${T}`)}function y(P){let R=null;const j=d(P);if(c(j))return;if(L("before:highlightElement",{el:P,language:j}),P.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",P);return}if(P.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(P)),l.throwUnescapedHTML))throw new Sg("One of your code blocks includes unescaped HTML.",P.innerHTML);R=P;const T=R.textContent,F=j?f(T,{language:j,ignoreIllegals:!0}):m(T);P.innerHTML=F.value,P.dataset.highlighted="yes",p(P,j,F.language),P.result={language:F.language,re:F.relevance,relevance:F.relevance},F.secondBest&&(P.secondBest={language:F.secondBest.language,relevance:F.secondBest.relevance}),L("after:highlightElement",{el:P,result:F,text:T})}function b(P){l=dc(l,P)}const g=()=>{B(),Qo("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function _(){B(),Qo("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let E=!1;function B(){if(document.readyState==="loading"){E=!0;return}document.querySelectorAll(l.cssSelector).forEach(y)}function A(){E&&B()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function C(P,R){let j=null;try{j=R(e)}catch(T){if(Mo("Language definition for '{}' could not be registered.".replace("{}",P)),a)Mo(T);else throw T;j=i}j.name||(j.name=P),o[P]=j,j.rawDefinition=R.bind(null,e),j.aliases&&k(j.aliases,{languageName:P})}function x(P){delete o[P];for(const R of Object.keys(n))n[R]===P&&delete n[R]}function w(){return Object.keys(o)}function D(P){return P=(P||"").toLowerCase(),o[P]||o[n[P]]}function k(P,{languageName:R}){typeof P=="string"&&(P=[P]),P.forEach(j=>{n[j.toLowerCase()]=R})}function v(P){const R=D(P);return R&&!R.disableAutodetect}function S(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=R=>{P["before:highlightBlock"](Object.assign({block:R.el},R))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=R=>{P["after:highlightBlock"](Object.assign({block:R.el},R))})}function N(P){S(P),r.push(P)}function V(P){const R=r.indexOf(P);R!==-1&&r.splice(R,1)}function L(P,R){const j=P;r.forEach(function(T){T[j]&&T[j](R)})}function O(P){return Qo("10.7.0","highlightBlock will be removed entirely in v12.0"),Qo("10.7.0","Please use highlightElement now."),y(P)}Object.assign(e,{highlight:f,highlightAuto:m,highlightAll:B,highlightElement:y,highlightBlock:O,configure:b,initHighlighting:g,initHighlightingOnLoad:_,registerLanguage:C,unregisterLanguage:x,listLanguages:w,getLanguage:D,registerAliases:k,autoDetection:v,inherit:dc,addPlugin:N,removePlugin:V}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=Bg,e.regex={concat:Vo,lookahead:Zl,either:rs,optional:jp,anyNumberOfTimes:$p};for(const P in wr)typeof wr[P]=="object"&&Kl(wr[P]);return Object.assign(e,wr),e},Zo=uc({});Zo.newInstance=()=>uc({});var vg=Zo;Zo.HighlightJS=Zo,Zo.default=Zo;const Ot=Op(vg);function Dg(e){const o=e.regex,n=o.concat(/[\p{L}_]/u,o.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,l,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,i,c,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:o.concat(/</,o.lookahead(o.concat(n,o.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:d}]},{className:"tag",begin:o.concat(/<\//,o.lookahead(o.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const hc="[A-Za-z$_][0-9A-Za-z$_]*",Ng=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Vg=["true","false","null","undefined","NaN","Infinity"],mc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],pc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],gc=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Mg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Tg=[].concat(gc,mc,pc);function Pg(e){const o=e.regex,n=(P,{after:R})=>{const j="</"+P[0].slice(1);return P.input.indexOf(j,R)!==-1},r=hc,a={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,R)=>{const j=P[0].length+P.index,T=P.input[j];if(T==="<"||T===","){R.ignoreMatch();return}T===">"&&(n(P,{after:j})||R.ignoreMatch());let F;const X=P.input.substring(j);if(F=X.match(/^\s*=/)){R.ignoreMatch();return}if((F=X.match(/^\s+extends\s+/))&&F.index===0){R.ignoreMatch();return}}},l={$pattern:hc,keyword:Ng,literal:Vg,built_in:Tg,"variable.language":Mg},c="[0-9](_?[0-9])*",d=`\\.(${c})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${f})((${d})|\\.)?|(${d}))[eE][+-]?(${c})\\b`},{begin:`\\b(${f})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},_=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,p,y,b,{match:/\$\d+/},u];h.contains=_.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(_)});const E=[].concat(g,h.contains),B=E.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(E)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,o.concat(r,"(",o.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:o.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...mc,...pc]}},w={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},k={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function v(P){return o.concat("(?!",P.join("|"),")")}const S={match:o.concat(/\b/,v([...gc,"super","import"].map(P=>`${P}\\s*\\(`)),r,o.lookahead(/\s*\(/)),className:"title.function",relevance:0},N={begin:o.concat(/\./,o.lookahead(o.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},V={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},L="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,o.lookahead(L)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),w,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,p,y,b,g,{match:/\$\d+/},u,x,{className:"attr",begin:r+o.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:L,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:s},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},N,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},S,k,C,V,{match:/\$[(.]/}]}}function Og(e){const o={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[o,n,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Lg(e){const o="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/\w[\w :()\./-]*:(?=[ \t]|$)/},{begin:/"\w[\w :()\./-]*":(?=[ \t]|$)/},{begin:/'\w[\w :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},c={end:",",endsWithParent:!0,excludeEnd:!0,keywords:o,relevance:0},d={begin:/\{/,end:/\}/,contains:[c],illegal:"\\n",relevance:0},f={begin:"\\[",end:"\\]",contains:[c],illegal:"\\n",relevance:0},u=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:o,keywords:{literal:o}},l,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},d,f,s],h=[...u];return h.pop(),h.push(i),c.contains=h,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:u}}function Rg(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Ig(e){const o=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},s={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},l={begin:/\{\{/,relevance:0},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,l,i]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",f=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,u=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${f}))[eE][+-]?(${d})[jJ]?(?=${u})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${d})[jJ](?=${u})`}]},m={className:"comment",begin:o.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",s,h,c,e.HASH_COMMENT_MODE]}]};return i.contains=[c,h,s],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[s,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},c,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,c]}]}}var en="[0-9](_*[0-9])*",_r=`\\.(${en})`,Er="[0-9a-fA-F](_*[0-9a-fA-F])*",bc={className:"number",variants:[{begin:`(\\b(${en})((${_r})|\\.)?|(${_r}))[eE][+-]?(${en})[fFdD]?\\b`},{begin:`\\b(${en})((${_r})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${_r})[fFdD]?\\b`},{begin:`\\b(${en})[fFdD]\\b`},{begin:`\\b0[xX]((${Er})\\.?|(${Er})?\\.(${Er}))[pP][+-]?(${en})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Er})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function yc(e,o,n){return n===-1?"":e.replace(o,r=>yc(e,o,n-1))}function Fg(e){const o=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+yc("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},s={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},i={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[o.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,bc,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},bc,s]}}function zg(e){const o=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:o.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(l);const c={match:/\\"/},d={className:"string",begin:/'/,end:/'/},f={match:/\\'/},u={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],m=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},y=["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},_=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],E=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],A=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:y,literal:b,built_in:[..._,...E,"set","shopt",...B,...A]},contains:[m,e.SHEBANG(),p,u,s,i,g,l,c,d,f,n]}}function $g(e){const o=e.regex,n=e.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},a={begin:/"/,end:/"/,contains:[{begin:/""/}]},s=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],u=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],m=f,p=[...d,...c].filter(E=>!f.includes(E)),y={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},b={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={begin:o.concat(/\b/,o.either(...m),/\s*\(/),relevance:0,keywords:{built_in:m}};function _(E,{exceptions:B,when:A}={}){const C=A;return B=B||[],E.map(x=>x.match(/\|\d+$/)||B.includes(x)?x:C(x)?`${x}|0`:x)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(p,{when:E=>E.length<3}),literal:s,type:l,built_in:u},contains:[{begin:o.either(...h),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:p.concat(h),literal:s,type:l}},{className:"type",begin:o.either(...i)},g,y,r,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}Ot.registerLanguage("xml",Dg),Ot.registerLanguage("javascript",Pg),Ot.registerLanguage("json",Og),Ot.registerLanguage("yaml",Lg),Ot.registerLanguage("plaintext",Rg),Ot.registerLanguage("python",Ig),Ot.registerLanguage("java",Fg),Ot.registerLanguage("bash",zg),Ot.registerLanguage("sql",$g);var fe=(e=>(e.EQUAL="equal",e.DELETE="removed",e.ADD="added",e.EMPTY="empty",e))(fe||{});const Jt="<code-diff-modified>",Qt="</code-diff-modified>",jg=Jt.replace("<","<").replace(">",">"),Ug=Qt.replace("<","<").replace(">",">");function tn(e){return e===void 0?fe.EQUAL:e.added?fe.ADD:e.removed?fe.DELETE:fe.EQUAL}function Br(e,o,n="word"){return typeof e>"u"?o:typeof o>"u"?e:(n==="char"?Dp:Vp)(e,o).filter(r=>tn(r)!==fe.DELETE).map(r=>tn(r)===fe.ADD?`${Jt}${r.value}${Qt}`:r.value).join("")}function xc(e,o){const n=new ns.diff_match_patch,r=n.diff_linesToChars_(e,o),a=r.chars1,s=r.chars2,i=r.lineArray,l=n.diff_main(a,s,!1);return n.diff_charsToLines_(l,i),l.map(c=>{const[d,f]=c;return{count:f.replace(/\n$/,"").split(`
|
|
12
|
+
`}return l.join("").replace(/%20/g," ")},e.exports=o,e.exports.diff_match_patch=o,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=r,e.exports.DIFF_EQUAL=a})(Gl);var ns=Gl.exports;function Kl(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(o=>{const n=e[o],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&Kl(n)}),e}class Xl{constructor(o){o.data===void 0&&(o.data={}),this.data=o.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function Yl(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function go(e,...o){const n=Object.create(null);for(const r in e)n[r]=e[r];return o.forEach(function(r){for(const a in r)n[a]=r[a]}),n}const Rp="</span>",Jl=e=>!!e.scope,Lp=(e,{prefix:o})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${o}${n.shift()}`,...n.map((r,a)=>`${r}${"_".repeat(a+1)}`)].join(" ")}return`${o}${e}`};let Ip=class{constructor(o,n){this.buffer="",this.classPrefix=n.classPrefix,o.walk(this)}addText(o){this.buffer+=Yl(o)}openNode(o){if(!Jl(o))return;const n=Lp(o.scope,{prefix:this.classPrefix});this.span(n)}closeNode(o){Jl(o)&&(this.buffer+=Rp)}value(){return this.buffer}span(o){this.buffer+=`<span class="${o}">`}};const Ql=(e={})=>{const o={children:[]};return Object.assign(o,e),o};let Fp=class Tu{constructor(){this.rootNode=Ql(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(o){this.top.children.push(o)}openNode(o){const n=Ql({scope:o});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(o){return this.constructor._walk(o,this.rootNode)}static _walk(o,n){return typeof n=="string"?o.addText(n):n.children&&(o.openNode(n),n.children.forEach(r=>this._walk(o,r)),o.closeNode(n)),o}static _collapse(o){typeof o!="string"&&o.children&&(o.children.every(n=>typeof n=="string")?o.children=[o.children.join("")]:o.children.forEach(n=>{Tu._collapse(n)}))}},zp=class extends Fp{constructor(o){super(),this.options=o}addText(o){o!==""&&this.add(o)}startScope(o){this.openNode(o)}endScope(){this.closeNode()}__addSublanguage(o,n){const r=o.root;n&&(r.scope=`language:${n}`),this.add(r)}toHTML(){return new Ip(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function vn(e){return e?typeof e=="string"?e:e.source:null}function Zl(e){return Vo("(?=",e,")")}function $p(e){return Vo("(?:",e,")*")}function jp(e){return Vo("(?:",e,")?")}function Vo(...e){return e.map(o=>vn(o)).join("")}function Up(e){const o=e[e.length-1];return typeof o=="object"&&o.constructor===Object?(e.splice(e.length-1,1),o):{}}function rs(...e){return"("+(Up(e).capture?"":"?:")+e.map(o=>vn(o)).join("|")+")"}function ec(e){return new RegExp(e.toString()+"|").exec("").length-1}function Wp(e,o){const n=e&&e.exec(o);return n&&n.index===0}const Hp=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function as(e,{joinWith:o}){let n=0;return e.map(r=>{n+=1;const a=n;let s=vn(r),i="";for(;s.length>0;){const l=Hp.exec(s);if(!l){i+=s;break}i+=s.substring(0,l.index),s=s.substring(l.index+l[0].length),l[0][0]==="\\"&&l[1]?i+="\\"+String(Number(l[1])+a):(i+=l[0],l[0]==="("&&n++)}return i}).map(r=>`(${r})`).join(o)}const qp=/\b\B/,tc="[a-zA-Z]\\w*",ss="[a-zA-Z_]\\w*",oc="\\b\\d+(\\.\\d+)?",nc="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",rc="\\b(0b[01]+)",Gp="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Kp=(e={})=>{const o=/^#![ ]*\//;return e.binary&&(e.begin=Vo(o,/.*\b/,e.binary,/\b.*/)),go({scope:"meta",begin:o,end:/$/,relevance:0,"on:begin":(n,r)=>{n.index!==0&&r.ignoreMatch()}},e)},Dn={begin:"\\\\[\\s\\S]",relevance:0},Xp={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Dn]},Yp={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Dn]},Jp={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},kr=function(e,o,n={}){const r=go({scope:"comment",begin:e,end:o,contains:[]},n);r.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const a=rs("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:Vo(/[ ]+/,"(",a,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),r},Qp=kr("//","$"),Zp=kr("/\\*","\\*/"),eg=kr("#","$"),tg={scope:"number",begin:oc,relevance:0},og={scope:"number",begin:nc,relevance:0},ng={scope:"number",begin:rc,relevance:0},rg={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Dn,{begin:/\[/,end:/\]/,relevance:0,contains:[Dn]}]},ag={scope:"title",begin:tc,relevance:0},sg={scope:"title",begin:ss,relevance:0},ig={begin:"\\.\\s*"+ss,relevance:0};var wr=Object.freeze({__proto__:null,APOS_STRING_MODE:Xp,BACKSLASH_ESCAPE:Dn,BINARY_NUMBER_MODE:ng,BINARY_NUMBER_RE:rc,COMMENT:kr,C_BLOCK_COMMENT_MODE:Zp,C_LINE_COMMENT_MODE:Qp,C_NUMBER_MODE:og,C_NUMBER_RE:nc,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(o,n)=>{n.data._beginMatch=o[1]},"on:end":(o,n)=>{n.data._beginMatch!==o[1]&&n.ignoreMatch()}})},HASH_COMMENT_MODE:eg,IDENT_RE:tc,MATCH_NOTHING_RE:qp,METHOD_GUARD:ig,NUMBER_MODE:tg,NUMBER_RE:oc,PHRASAL_WORDS_MODE:Jp,QUOTE_STRING_MODE:Yp,REGEXP_MODE:rg,RE_STARTERS_RE:Gp,SHEBANG:Kp,TITLE_MODE:ag,UNDERSCORE_IDENT_RE:ss,UNDERSCORE_TITLE_MODE:sg});function lg(e,o){e.input[e.index-1]==="."&&o.ignoreMatch()}function cg(e,o){e.className!==void 0&&(e.scope=e.className,delete e.className)}function dg(e,o){o&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=lg,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function fg(e,o){Array.isArray(e.illegal)&&(e.illegal=rs(...e.illegal))}function ug(e,o){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function hg(e,o){e.relevance===void 0&&(e.relevance=1)}const mg=(e,o)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(r=>{delete e[r]}),e.keywords=n.keywords,e.begin=Vo(n.beforeMatch,Zl(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},pg=["of","and","for","in","not","or","if","then","parent","list","value"],gg="keyword";function ac(e,o,n=gg){const r=Object.create(null);return typeof e=="string"?a(n,e.split(" ")):Array.isArray(e)?a(n,e):Object.keys(e).forEach(function(s){Object.assign(r,ac(e[s],o,s))}),r;function a(s,i){o&&(i=i.map(l=>l.toLowerCase())),i.forEach(function(l){const c=l.split("|");r[c[0]]=[s,bg(c[0],c[1])]})}}function bg(e,o){return o?Number(o):yg(e)?0:1}function yg(e){return pg.includes(e.toLowerCase())}const sc={},Mo=e=>{console.error(e)},ic=(e,...o)=>{console.log(`WARN: ${e}`,...o)},Qo=(e,o)=>{sc[`${e}/${o}`]||(console.log(`Deprecated as of ${e}. ${o}`),sc[`${e}/${o}`]=!0)},Cr=new Error;function lc(e,o,{key:n}){let r=0;const a=e[n],s={},i={};for(let l=1;l<=o.length;l++)i[l+r]=a[l],s[l+r]=!0,r+=ec(o[l-1]);e[n]=i,e[n]._emit=s,e[n]._multi=!0}function xg(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Mo("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Cr;if(typeof e.beginScope!="object"||e.beginScope===null)throw Mo("beginScope must be object"),Cr;lc(e,e.begin,{key:"beginScope"}),e.begin=as(e.begin,{joinWith:""})}}function kg(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Mo("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Cr;if(typeof e.endScope!="object"||e.endScope===null)throw Mo("endScope must be object"),Cr;lc(e,e.end,{key:"endScope"}),e.end=as(e.end,{joinWith:""})}}function wg(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Cg(e){wg(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),xg(e),kg(e)}function Eg(e){function o(i,l){return new RegExp(vn(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,l]),this.matchAt+=ec(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(c=>c[1]);this.matcherRe=o(as(l,{joinWith:"|"}),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const c=this.matcherRe.exec(l);if(!c)return null;const d=c.findIndex((u,h)=>h>0&&u!==void 0),f=this.matchIndexes[d];return c.splice(0,d),Object.assign(c,f)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const c=new n;return this.rules.slice(l).forEach(([d,f])=>c.addRule(d,f)),c.compile(),this.multiRegexes[l]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,c){this.rules.push([l,c]),c.type==="begin"&&this.count++}exec(l){const c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let d=c.exec(l);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){const f=this.getMatcher(0);f.lastIndex=this.lastIndex+1,d=f.exec(l)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function a(i){const l=new r;return i.contains.forEach(c=>l.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&l.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&l.addRule(i.illegal,{type:"illegal"}),l}function s(i,l){const c=i;if(i.isCompiled)return c;[cg,ug,Cg,mg].forEach(f=>f(i,l)),e.compilerExtensions.forEach(f=>f(i,l)),i.__beforeBegin=null,[dg,fg,hg].forEach(f=>f(i,l)),i.isCompiled=!0;let d=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),d=i.keywords.$pattern,delete i.keywords.$pattern),d=d||/\w+/,i.keywords&&(i.keywords=ac(i.keywords,e.case_insensitive)),c.keywordPatternRe=o(d,!0),l&&(i.begin||(i.begin=/\B|\b/),c.beginRe=o(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=o(c.end)),c.terminatorEnd=vn(c.end)||"",i.endsWithParent&&l.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+l.terminatorEnd)),i.illegal&&(c.illegalRe=o(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(f){return _g(f==="self"?i:f)})),i.contains.forEach(function(f){s(f,c)}),i.starts&&s(i.starts,l),c.matcher=a(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=go(e.classNameAliases||{}),s(e)}function cc(e){return e?e.endsWithParent||cc(e.starts):!1}function _g(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(o){return go(e,{variants:null},o)})),e.cachedVariants?e.cachedVariants:cc(e)?go(e,{starts:e.starts?go(e.starts):null}):Object.isFrozen(e)?go(e):e}var Bg="11.10.0";class Sg extends Error{constructor(o,n){super(o),this.name="HTMLInjectionError",this.html=n}}const is=Yl,dc=go,fc=Symbol("nomatch"),Ag=7,uc=function(e){const o=Object.create(null),n=Object.create(null),r=[];let a=!0;const s="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]};let l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:zp};function c(P){return l.noHighlightRe.test(P)}function d(P){let L=P.className+" ";L+=P.parentNode?P.parentNode.className:"";const $=l.languageDetectRe.exec(L);if($){const T=N($[1]);return T||(ic(s.replace("{}",$[1])),ic("Falling back to no-highlight mode for this block.",P)),T?$[1]:"no-highlight"}return L.split(/\s+/).find(T=>c(T)||N(T))}function f(P,L,$){let T="",I="";typeof L=="object"?(T=P,$=L.ignoreIllegals,I=L.language):(Qo("10.7.0","highlight(lang, code, ...args) has been deprecated."),Qo("10.7.0",`Please use highlight(code, options) instead.
|
|
13
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),I=P,T=L),$===void 0&&($=!0);const H={code:T,language:I};R("before:highlight",H);const q=H.result?H.result:u(H.language,H.code,$);return q.code=H.code,R("after:highlight",q),q}function u(P,L,$,T){const I=Object.create(null);function H(oe,le){return oe.keywords[le]}function q(){if(!se.keywords){Le.addText(De);return}let oe=0;se.keywordPatternRe.lastIndex=0;let le=se.keywordPatternRe.exec(De),K="";for(;le;){K+=De.substring(oe,le.index);const ee=_e.case_insensitive?le[0].toLowerCase():le[0],re=H(se,ee);if(re){const[Ce,Ge]=re;if(Le.addText(K),K="",I[ee]=(I[ee]||0)+1,I[ee]<=Ag&&(ct+=Ge),Ce.startsWith("_"))K+=le[0];else{const wt=_e.classNameAliases[Ce]||Ce;te(le[0],wt)}}else K+=le[0];oe=se.keywordPatternRe.lastIndex,le=se.keywordPatternRe.exec(De)}K+=De.substring(oe),Le.addText(K)}function W(){if(De==="")return;let oe=null;if(typeof se.subLanguage=="string"){if(!o[se.subLanguage]){Le.addText(De);return}oe=u(se.subLanguage,De,!0,Re[se.subLanguage]),Re[se.subLanguage]=oe._top}else oe=m(De,se.subLanguage.length?se.subLanguage:null);se.relevance>0&&(ct+=oe.relevance),Le.__addSublanguage(oe._emitter,oe.language)}function Z(){se.subLanguage!=null?W():q(),De=""}function te(oe,le){oe!==""&&(Le.startScope(le),Le.addText(oe),Le.endScope())}function xe(oe,le){let K=1;const ee=le.length-1;for(;K<=ee;){if(!oe._emit[K]){K++;continue}const re=_e.classNameAliases[oe[K]]||oe[K],Ce=le[K];re?te(Ce,re):(De=Ce,q(),De=""),K++}}function Se(oe,le){return oe.scope&&typeof oe.scope=="string"&&Le.openNode(_e.classNameAliases[oe.scope]||oe.scope),oe.beginScope&&(oe.beginScope._wrap?(te(De,_e.classNameAliases[oe.beginScope._wrap]||oe.beginScope._wrap),De=""):oe.beginScope._multi&&(xe(oe.beginScope,le),De="")),se=Object.create(oe,{parent:{value:se}}),se}function ye(oe,le,K){let ee=Wp(oe.endRe,K);if(ee){if(oe["on:end"]){const re=new Xl(oe);oe["on:end"](le,re),re.isMatchIgnored&&(ee=!1)}if(ee){for(;oe.endsParent&&oe.parent;)oe=oe.parent;return oe}}if(oe.endsWithParent)return ye(oe.parent,le,K)}function Q(oe){return se.matcher.regexIndex===0?(De+=oe[0],1):(he=!0,0)}function j(oe){const le=oe[0],K=oe.rule,ee=new Xl(K),re=[K.__beforeBegin,K["on:begin"]];for(const Ce of re)if(Ce&&(Ce(oe,ee),ee.isMatchIgnored))return Q(le);return K.skip?De+=le:(K.excludeBegin&&(De+=le),Z(),!K.returnBegin&&!K.excludeBegin&&(De=le)),Se(K,oe),K.returnBegin?0:le.length}function Y(oe){const le=oe[0],K=L.substring(oe.index),ee=ye(se,oe,K);if(!ee)return fc;const re=se;se.endScope&&se.endScope._wrap?(Z(),te(le,se.endScope._wrap)):se.endScope&&se.endScope._multi?(Z(),xe(se.endScope,oe)):re.skip?De+=le:(re.returnEnd||re.excludeEnd||(De+=le),Z(),re.excludeEnd&&(De=le));do se.scope&&Le.closeNode(),!se.skip&&!se.subLanguage&&(ct+=se.relevance),se=se.parent;while(se!==ee.parent);return ee.starts&&Se(ee.starts,oe),re.returnEnd?0:le.length}function ae(){const oe=[];for(let le=se;le!==_e;le=le.parent)le.scope&&oe.unshift(le.scope);oe.forEach(le=>Le.openNode(le))}let ke={};function Oe(oe,le){const K=le&&le[0];if(De+=oe,K==null)return Z(),0;if(ke.type==="begin"&&le.type==="end"&&ke.index===le.index&&K===""){if(De+=L.slice(le.index,le.index+1),!a){const ee=new Error(`0 width match regex (${P})`);throw ee.languageName=P,ee.badRule=ke.rule,ee}return 1}if(ke=le,le.type==="begin")return j(le);if(le.type==="illegal"&&!$){const ee=new Error('Illegal lexeme "'+K+'" for mode "'+(se.scope||"<unnamed>")+'"');throw ee.mode=se,ee}else if(le.type==="end"){const ee=Y(le);if(ee!==fc)return ee}if(le.type==="illegal"&&K==="")return 1;if(ie>1e5&&ie>le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return De+=K,K.length}const _e=N(P);if(!_e)throw Mo(s.replace("{}",P)),new Error('Unknown language: "'+P+'"');const We=Eg(_e);let Fe="",se=T||We;const Re={},Le=new l.__emitter(l);ae();let De="",ct=0,G=0,ie=0,he=!1;try{if(_e.__emitTokens)_e.__emitTokens(L,Le);else{for(se.matcher.considerAll();;){ie++,he?he=!1:se.matcher.considerAll(),se.matcher.lastIndex=G;const oe=se.matcher.exec(L);if(!oe)break;const le=L.substring(G,oe.index),K=Oe(le,oe);G=oe.index+K}Oe(L.substring(G))}return Le.finalize(),Fe=Le.toHTML(),{language:P,value:Fe,relevance:ct,illegal:!1,_emitter:Le,_top:se}}catch(oe){if(oe.message&&oe.message.includes("Illegal"))return{language:P,value:is(L),illegal:!0,relevance:0,_illegalBy:{message:oe.message,index:G,context:L.slice(G-100,G+100),mode:oe.mode,resultSoFar:Fe},_emitter:Le};if(a)return{language:P,value:is(L),illegal:!1,relevance:0,errorRaised:oe,_emitter:Le,_top:se};throw oe}}function h(P){const L={value:is(P),illegal:!1,relevance:0,_top:i,_emitter:new l.__emitter(l)};return L._emitter.addText(P),L}function m(P,L){L=L||l.languages||Object.keys(o);const $=h(P),T=L.filter(N).filter(v).map(Z=>u(Z,P,!1));T.unshift($);const I=T.sort((Z,te)=>{if(Z.relevance!==te.relevance)return te.relevance-Z.relevance;if(Z.language&&te.language){if(N(Z.language).supersetOf===te.language)return 1;if(N(te.language).supersetOf===Z.language)return-1}return 0}),[H,q]=I,W=H;return W.secondBest=q,W}function p(P,L,$){const T=L&&n[L]||$;P.classList.add("hljs"),P.classList.add(`language-${T}`)}function y(P){let L=null;const $=d(P);if(c($))return;if(R("before:highlightElement",{el:P,language:$}),P.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",P);return}if(P.children.length>0&&(l.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(P)),l.throwUnescapedHTML))throw new Sg("One of your code blocks includes unescaped HTML.",P.innerHTML);L=P;const T=L.textContent,I=$?f(T,{language:$,ignoreIllegals:!0}):m(T);P.innerHTML=I.value,P.dataset.highlighted="yes",p(P,$,I.language),P.result={language:I.language,re:I.relevance,relevance:I.relevance},I.secondBest&&(P.secondBest={language:I.secondBest.language,relevance:I.secondBest.relevance}),R("after:highlightElement",{el:P,result:I,text:T})}function b(P){l=dc(l,P)}const g=()=>{B(),Qo("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function E(){B(),Qo("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let _=!1;function B(){if(document.readyState==="loading"){_=!0;return}document.querySelectorAll(l.cssSelector).forEach(y)}function A(){_&&B()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function C(P,L){let $=null;try{$=L(e)}catch(T){if(Mo("Language definition for '{}' could not be registered.".replace("{}",P)),a)Mo(T);else throw T;$=i}$.name||($.name=P),o[P]=$,$.rawDefinition=L.bind(null,e),$.aliases&&w($.aliases,{languageName:P})}function x(P){delete o[P];for(const L of Object.keys(n))n[L]===P&&delete n[L]}function k(){return Object.keys(o)}function N(P){return P=(P||"").toLowerCase(),o[P]||o[n[P]]}function w(P,{languageName:L}){typeof P=="string"&&(P=[P]),P.forEach($=>{n[$.toLowerCase()]=L})}function v(P){const L=N(P);return L&&!L.disableAutodetect}function S(P){P["before:highlightBlock"]&&!P["before:highlightElement"]&&(P["before:highlightElement"]=L=>{P["before:highlightBlock"](Object.assign({block:L.el},L))}),P["after:highlightBlock"]&&!P["after:highlightElement"]&&(P["after:highlightElement"]=L=>{P["after:highlightBlock"](Object.assign({block:L.el},L))})}function D(P){S(P),r.push(P)}function V(P){const L=r.indexOf(P);L!==-1&&r.splice(L,1)}function R(P,L){const $=P;r.forEach(function(T){T[$]&&T[$](L)})}function O(P){return Qo("10.7.0","highlightBlock will be removed entirely in v12.0"),Qo("10.7.0","Please use highlightElement now."),y(P)}Object.assign(e,{highlight:f,highlightAuto:m,highlightAll:B,highlightElement:y,highlightBlock:O,configure:b,initHighlighting:g,initHighlightingOnLoad:E,registerLanguage:C,unregisterLanguage:x,listLanguages:k,getLanguage:N,registerAliases:w,autoDetection:v,inherit:dc,addPlugin:D,removePlugin:V}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=Bg,e.regex={concat:Vo,lookahead:Zl,either:rs,optional:jp,anyNumberOfTimes:$p};for(const P in wr)typeof wr[P]=="object"&&Kl(wr[P]);return Object.assign(e,wr),e},Zo=uc({});Zo.newInstance=()=>uc({});var vg=Zo;Zo.HighlightJS=Zo,Zo.default=Zo;const Ot=Op(vg);function Dg(e){const o=e.regex,n=o.concat(/[\p{L}_]/u,o.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,a={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},i=e.inherit(s,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{className:"string"}),c=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[a]},{begin:/'/,end:/'/,contains:[a]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,c,l,i,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,i,c,l]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},a,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[c]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:o.concat(/</,o.lookahead(o.concat(n,o.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:d}]},{className:"tag",begin:o.concat(/<\//,o.lookahead(o.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}const hc="[A-Za-z$_][0-9A-Za-z$_]*",Ng=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],Vg=["true","false","null","undefined","NaN","Infinity"],mc=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],pc=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],gc=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Mg=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Tg=[].concat(gc,mc,pc);function Pg(e){const o=e.regex,n=(P,{after:L})=>{const $="</"+P[0].slice(1);return P.input.indexOf($,L)!==-1},r=hc,a={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,i={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(P,L)=>{const $=P[0].length+P.index,T=P.input[$];if(T==="<"||T===","){L.ignoreMatch();return}T===">"&&(n(P,{after:$})||L.ignoreMatch());let I;const H=P.input.substring($);if(I=H.match(/^\s*=/)){L.ignoreMatch();return}if((I=H.match(/^\s+extends\s+/))&&I.index===0){L.ignoreMatch();return}}},l={$pattern:hc,keyword:Ng,literal:Vg,built_in:Tg,"variable.language":Mg},c="[0-9](_?[0-9])*",d=`\\.(${c})`,f="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",u={className:"number",variants:[{begin:`(\\b(${f})((${d})|\\.)?|(${d}))[eE][+-]?(${c})\\b`},{begin:`\\b(${f})\\b((${d})\\b|\\.)?|(${d})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},h={className:"subst",begin:"\\$\\{",end:"\\}",keywords:l,contains:[]},m={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"css"}},y={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,h],subLanguage:"graphql"}},b={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,h]},g={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},E=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,p,y,b,{match:/\$\d+/},u];h.contains=E.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(E)});const _=[].concat(g,h.contains),B=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:l,contains:["self"].concat(_)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,o.concat(r,"(",o.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},x={relevance:0,match:o.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...mc,...pc]}},k={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},N={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},w={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function v(P){return o.concat("(?!",P.join("|"),")")}const S={match:o.concat(/\b/,v([...gc,"super","import"].map(P=>`${P}\\s*\\(`)),r,o.lookahead(/\s*\(/)),className:"title.function",relevance:0},D={begin:o.concat(/\./,o.lookahead(o.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},V={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},R="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",O={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,o.lookahead(R)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:x},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),k,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,m,p,y,b,g,{match:/\$\d+/},u,x,{className:"attr",begin:r+o.lookahead(":"),relevance:0},O,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[g,e.REGEXP_MODE,{className:"function",begin:R,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:B}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:a.begin,end:a.end},{match:s},{begin:i.begin,"on:begin":i.isTrulyOpeningTag,end:i.end}],subLanguage:"xml",contains:[{begin:i.begin,end:i.end,skip:!0,contains:["self"]}]}]},N,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},D,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},S,w,C,V,{match:/\$[(.]/}]}}function Og(e){const o={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],a={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[o,n,e.QUOTE_STRING_MODE,a,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}function Rg(e){const o="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/\w[\w :()\./-]*:(?=[ \t]|$)/},{begin:/"\w[\w :()\./-]*":(?=[ \t]|$)/},{begin:/'\w[\w :()\./-]*':(?=[ \t]|$)/}]},a={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,a]},i=e.inherit(s,{variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={className:"number",begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b"},c={end:",",endsWithParent:!0,excludeEnd:!0,keywords:o,relevance:0},d={begin:/\{/,end:/\}/,contains:[c],illegal:"\\n",relevance:0},f={begin:"\\[",end:"\\]",contains:[c],illegal:"\\n",relevance:0},u=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:o,keywords:{literal:o}},l,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},d,f,s],h=[...u];return h.pop(),h.push(i),c.contains=h,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:u}}function Lg(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Ig(e){const o=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},s={className:"meta",begin:/^(>>>|\.\.\.) /},i={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},l={begin:/\{\{/,relevance:0},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,l,i]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,l,i]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,i]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",f=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,u=`\\b|${r.join("|")}`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${f}))[eE][+-]?(${d})[jJ]?(?=${u})`},{begin:`(${f})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${u})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${u})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${u})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${u})`},{begin:`\\b(${d})[jJ](?=${u})`}]},m={className:"comment",begin:o.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},p={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",s,h,c,e.HASH_COMMENT_MODE]}]};return i.contains=[c,h,s],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[s,h,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},c,m,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[p]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,p,c]}]}}var en="[0-9](_*[0-9])*",Er=`\\.(${en})`,_r="[0-9a-fA-F](_*[0-9a-fA-F])*",bc={className:"number",variants:[{begin:`(\\b(${en})((${Er})|\\.)?|(${Er}))[eE][+-]?(${en})[fFdD]?\\b`},{begin:`\\b(${en})((${Er})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Er})[fFdD]?\\b`},{begin:`\\b(${en})[fFdD]\\b`},{begin:`\\b0[xX]((${_r})\\.?|(${_r})?\\.(${_r}))[pP][+-]?(${en})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${_r})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function yc(e,o,n){return n===-1?"":e.replace(o,r=>yc(e,o,n-1))}function Fg(e){const o=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+yc("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),a={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},s={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},i={className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:a,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[o.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[i,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:a,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:a,relevance:0,contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,bc,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},bc,s]}}function zg(e){const o=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:o.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const a={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},s=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),i={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},l={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,a]};a.contains.push(l);const c={match:/\\"/},d={className:"string",begin:/'/,end:/'/},f={match:/\\'/},u={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},h=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],m=e.SHEBANG({binary:`(${h.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},y=["if","then","else","elif","fi","for","while","until","in","do","done","case","esac","function","select"],b=["true","false"],g={match:/(\/[a-z._-]+)+/},E=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],_=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],B=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],A=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:y,literal:b,built_in:[...E,..._,"set","shopt",...B,...A]},contains:[m,e.SHEBANG(),p,u,s,i,g,l,c,d,f,n]}}function $g(e){const o=e.regex,n=e.COMMENT("--","$"),r={className:"string",variants:[{begin:/'/,end:/'/,contains:[{begin:/''/}]}]},a={begin:/"/,end:/"/,contains:[{begin:/""/}]},s=["true","false","unknown"],i=["double precision","large object","with timezone","without timezone"],l=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],c=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],f=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],u=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],h=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],m=f,p=[...d,...c].filter(_=>!f.includes(_)),y={className:"variable",begin:/@[a-z0-9][a-z0-9_]*/},b={className:"operator",begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},g={begin:o.concat(/\b/,o.either(...m),/\s*\(/),relevance:0,keywords:{built_in:m}};function E(_,{exceptions:B,when:A}={}){const C=A;return B=B||[],_.map(x=>x.match(/\|\d+$/)||B.includes(x)?x:C(x)?`${x}|0`:x)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:E(p,{when:_=>_.length<3}),literal:s,type:l,built_in:u},contains:[{begin:o.either(...h),relevance:0,keywords:{$pattern:/[\w\.]+/,keyword:p.concat(h),literal:s,type:l}},{className:"type",begin:o.either(...i)},g,y,r,a,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,b]}}Ot.registerLanguage("xml",Dg),Ot.registerLanguage("javascript",Pg),Ot.registerLanguage("json",Og),Ot.registerLanguage("yaml",Rg),Ot.registerLanguage("plaintext",Lg),Ot.registerLanguage("python",Ig),Ot.registerLanguage("java",Fg),Ot.registerLanguage("bash",zg),Ot.registerLanguage("sql",$g);var fe=(e=>(e.EQUAL="equal",e.DELETE="removed",e.ADD="added",e.EMPTY="empty",e))(fe||{});const Jt="<code-diff-modified>",Qt="</code-diff-modified>",jg=Jt.replace("<","<").replace(">",">"),Ug=Qt.replace("<","<").replace(">",">");function tn(e){return e===void 0?fe.EQUAL:e.added?fe.ADD:e.removed?fe.DELETE:fe.EQUAL}function Br(e,o,n="word"){return typeof e>"u"?o:typeof o>"u"?e:(n==="char"?Dp:Vp)(e,o).filter(r=>tn(r)!==fe.DELETE).map(r=>tn(r)===fe.ADD?`${Jt}${r.value}${Qt}`:r.value).join("")}function xc(e,o){const n=new ns.diff_match_patch,r=n.diff_linesToChars_(e,o),a=r.chars1,s=r.chars2,i=r.lineArray,l=n.diff_main(a,s,!1);return n.diff_charsToLines_(l,i),l.map(c=>{const[d,f]=c;return{count:f.replace(/\n$/,"").split(`
|
|
14
14
|
`).length,value:f,removed:d===ns.DIFF_DELETE,added:d===ns.DIFF_INSERT}})}function Bt(e,o){if(!o.match(new RegExp(`(${Jt}|${Qt})`,"g")))return Ot.highlight(o,{language:e}).value;let n=o;const r=o.replace(new RegExp(`(${Jt}|${Qt})`,"g"),""),a=document.createElement("div");a.innerHTML=Ot.highlight(r,{language:e}).value;let s=!1;const i=l=>{l.childNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE&&i(c),c.nodeType===Node.TEXT_NODE){if(!c.textContent)return;let d=c.textContent,f="";for(s&&(f=f+Jt);d.length;){if(n.startsWith(Jt)){n=n.slice(Jt.length),f=f+Jt,s=!0;continue}if(n.startsWith(Qt)){n=n.slice(Qt.length),f=f+Qt,s=!1;continue}const u=n.match(new RegExp(`(${Jt}|${Qt})`)),h=u&&u.index?u.index:n.length,m=Math.min(h,d.length);f=f+n.substring(0,m),n=n.slice(m),d=d.slice(m)}s&&(f=f+Qt),c.textContent=f}})};return i(a),a.innerHTML.replace(new RegExp(jg,"g"),'<span class="x">').replace(new RegExp(Ug,"g"),"</span>")}function kc(e,o){const n=(c,d)=>(c.match(new RegExp(d,"g"))||[]).length,r=c=>c.filter(d=>o==null?void 0:o.test(d)).length;let a=0,s=0,i=0,l=0;for(const c of e){if(c.added){const d=r(c.value.trim().split(`
|
|
15
15
|
`));a+=n(c.value.trim(),`
|
|
16
16
|
`)+1-d,i+=d;continue}if(c.removed){const d=r(c.value.trim().split(`
|
|
17
17
|
`));s+=n(c.value.trim(),`
|
|
18
|
-
`)+1-d,l+=d;continue}}return{additionsNum:a,deletionsNum:s,ignoreAdditionsNum:i,ignoreDeletionsNum:l}}function Wg(e,o,n="plaintext",r="word",a=!1,s=10,i){const l=()=>({type:fe.EMPTY}),c=(_,
|
|
19
|
-
`);if(B===void 0){for(const
|
|
20
|
-
`);if(A===fe.DELETE){if(C===fe.EQUAL)for(const
|
|
21
|
-
`);if(
|
|
22
|
-
`);if(
|
|
18
|
+
`)+1-d,l+=d;continue}}return{additionsNum:a,deletionsNum:s,ignoreAdditionsNum:i,ignoreDeletionsNum:l}}function Wg(e,o,n="plaintext",r="word",a=!1,s=10,i){const l=()=>({type:fe.EMPTY}),c=(E,_,B)=>({type:E,num:_,code:B}),d=xc(e,o),f=i?new RegExp(i):void 0;let u=0,h=0,m=!1;const p=[],y={changes:p,collector:[],stat:kc(d,f)};for(let E=0;E<d.length;E++){if(m){m=!1;continue}const[_,B]=[d[E],d[E+1]],[A,C]=[tn(_),tn(B)],x=_.value.replace(/\n$/,"").split(`
|
|
19
|
+
`);if(B===void 0){for(const N of x){let w=l(),v=l();const S=Bt(n,N);A===fe.EQUAL&&(u++,h++,w=c(fe.EQUAL,u,S),v=c(fe.EQUAL,h,S)),A===fe.DELETE&&(u++,w=c(fe.DELETE,u,S),v=l()),A===fe.ADD&&(h++,w=l(),v=c(fe.ADD,h,S)),p.push({left:w,right:v})}break}if(A===fe.EQUAL)for(const N of x){u++,h++;const w=Bt(n,N);p.push({left:c(fe.EQUAL,u,w),right:c(fe.EQUAL,h,w)})}const k=B.value.replace(/\n$/,"").split(`
|
|
20
|
+
`);if(A===fe.DELETE){if(C===fe.EQUAL)for(const N of x)u++,p.push({left:c(fe.DELETE,u,Bt(n,N)),right:l()});if(C===fe.ADD){m=!0;const N=Math.max(_.count,B.count);for(let w=0;w<N;w++){w<_.count&&u++,w<B.count&&h++;const[v,S]=[x[w],k[w]],D=a||x.length===k.length,V=D?Br(S,v,r):v,R=D?Br(v,S,r):S,O=f!=null&&f.test(v)?fe.EQUAL:fe.DELETE,P=f!=null&&f.test(S)?fe.EQUAL:fe.ADD,L=w<_.count?c(O,u,Bt(n,V)):l(),$=w<B.count?c(P,h,Bt(n,R)):l();p.push({left:L,right:$})}}}if(A===fe.ADD)for(const N of x)h++,p.push({left:l(),right:c(fe.ADD,h,Bt(n,N))})}if(e===o){for(let E=0;E<p.length;E++)p[E].fold=!1;return y}for(let E=0;E<p.length;E++){const _=p[E];if(_.left.type===fe.DELETE||_.right.type===fe.ADD){const[B,A]=[Math.max(E-s,0),Math.min(E+s+1,p.length)];for(let C=B;C<A;C++)p[C].fold=!1}_.fold===void 0&&(_.fold=!0)}const b=[];let g=[];for(let E=0;E<p.length;E++){const _=p[E];if(_.fold===!1){g.length&&(g[0].hideIndex=y.collector.length,y.collector.push({lines:g,fold:!0}),g=[]),b.push(_);continue}_.hide=!0,g.push(_),b.push(_)}return g.length&&(g[0].hideIndex=y.collector.length,y.collector.push({lines:g,fold:!0}),g=[]),y.changes=b,y}function Hg(e,o,n="plaintext",r="word",a=!1,s=10,i){const l=xc(e,o),c=i?new RegExp(i):void 0;let d=0,f=0,u=!1;const h=[],m={changes:h,collector:[],stat:kc(l,c)};for(let b=0;b<l.length;b++){if(u){u=!1;continue}const[g,E]=[l[b],l[b+1]],[_,B]=[tn(g),tn(E)],A=g.value.replace(/\n$/,"").split(`
|
|
21
|
+
`);if(E===void 0){for(const x of A){_===fe.EQUAL&&(d++,f++),_===fe.DELETE&&d++,_===fe.ADD&&f++;const k=Bt(n,x);h.push({type:_,code:k,addNum:_===fe.DELETE?void 0:f,delNum:_===fe.ADD?void 0:d})}break}if(_===fe.EQUAL)for(const x of A){d++,f++;const k=Bt(n,x);h.push({type:fe.EQUAL,code:k,delNum:d,addNum:f})}const C=E.value.replace(/\n$/,"").split(`
|
|
22
|
+
`);if(_===fe.DELETE)if(B===fe.ADD&&(A.length===C.length||a)){for(let x=0;x<A.length;x++){const k=A[x],N=C[x];d++;const w=Bt(n,Br(N,k,r));h.push({type:c!=null&&c.test(k)?fe.EQUAL:fe.DELETE,code:w,delNum:d})}for(let x=0;x<C.length;x++){const k=A[x],N=C[x];f++;const w=Bt(n,Br(k,N,r));h.push({type:c!=null&&c.test(N)?fe.EQUAL:fe.ADD,code:w,addNum:f})}u=!0}else for(const x of A){d++;const k=Bt(n,x);h.push({type:fe.DELETE,code:k,delNum:d})}if(_===fe.ADD)for(const x of A){f++;const k=Bt(n,x);h.push({type:fe.ADD,code:k,addNum:f})}}for(let b=0;b<h.length;b++){const g=h[b];if(g.type===fe.DELETE||g.type===fe.ADD){const[E,_]=[Math.max(b-s,0),Math.min(b+s+1,h.length)];for(let B=E;B<_;B++)h[B].fold=!1}g.fold===void 0&&(g.fold=!0)}if(e===o){for(let b=0;b<h.length;b++)h[b].fold=!1;return m}const p=[];let y=[];for(let b=0;b<h.length;b++){const g=h[b];if(g.fold===!1){y.length&&(y[0].hideIndex=m.collector.length,m.collector.push({lines:y,fold:!0}),y=[]),p.push(g);continue}g.type==="equal"&&(g.hide=!0,y.push(g)),p.push(g)}return y.length&&(y[0].hideIndex=m.collector.length,m.collector.push({lines:y,fold:!0}),y=[]),m.changes=p,m}const qg={key:0},Gg=t.createElementVNode("td",{class:"blob-code blob-code-hunk",align:"left"}," ⋯ ",-1),Kg={key:1},Xg=["data-code-marker","innerHTML"],Yg=t.defineComponent({__name:"UnifiedLine",props:{line:{}},emits:["expand"],setup(e,{emit:o}){const n=o;function r(a){return a===fe.DELETE?"-":a===fe.ADD?"+":""}return(a,s)=>a.line.hideIndex!==void 0&&a.line.hide?(t.openBlock(),t.createElementBlock("tr",qg,[t.createElementVNode("td",{class:"blob-num blob-num-hunk text-center",colspan:"2",onClick:s[0]||(s[0]=i=>n("expand",a.line))}," > "),Gg])):a.line.hide?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Kg,[t.createElementVNode("td",{class:t.normalizeClass(["blob-num",{"blob-num-deletion":a.line.type===t.unref(fe).DELETE,"blob-num-addition":a.line.type===t.unref(fe).ADD,"blob-num-context":a.line.type===t.unref(fe).EQUAL,"blob-num-hunk":a.line.hide!==void 0}])},t.toDisplayString(a.line.delNum),3),t.createElementVNode("td",{class:t.normalizeClass(["blob-num",{"blob-num-deletion":a.line.type===t.unref(fe).DELETE,"blob-num-addition":a.line.type===t.unref(fe).ADD,"blob-num-context":a.line.type===t.unref(fe).EQUAL,"blob-num-hunk":a.line.hide!==void 0}])},t.toDisplayString(a.line.addNum),3),t.createElementVNode("td",{class:t.normalizeClass(["blob-code",{"blob-code-deletion":a.line.type===t.unref(fe).DELETE,"blob-code-addition":a.line.type===t.unref(fe).ADD,"blob-code-context":a.line.type===t.unref(fe).EQUAL,"blob-code-hunk":a.line.hide!==void 0}])},[t.createElementVNode("span",{class:"blob-code-inner blob-code-marker","data-code-marker":r(a.line.type),innerHTML:a.line.code},null,8,Xg)],2)]))}}),Jg={class:"diff-table"},Qg=t.defineComponent({__name:"UnifiedViewer",props:{diffChange:{}},setup(e){const o=e;function n({hideIndex:r}){r!==void 0&&o.diffChange.collector[r].lines.forEach(a=>{a.hide=!1,a.fold=!1})}return(r,a)=>{var s;return t.openBlock(),t.createElementBlock("table",Jg,[t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((s=r.diffChange)==null?void 0:s.changes,(i,l)=>(t.openBlock(),t.createBlock(Yg,{key:l,line:i,onExpand:n},null,8,["line"]))),128))])])}}}),Zg={key:0},eb=t.createElementVNode("td",{class:"blob-code blob-code-inner blob-code-hunk",colspan:"3",align:"left"}," ⋯ ",-1),tb={key:1},ob=t.createElementVNode("td",{class:"blob-num blob-num-empty empty-cell"},null,-1),nb=t.createElementVNode("td",{class:"blob-code blob-code-empty empty-cell"},null,-1),rb=["onMousedown"],ab=["data-code-marker","innerHTML"],sb=t.defineComponent({__name:"SplitLine",props:{splitLine:{}},emits:["expand"],setup(e,{emit:o}){const n=o;function r(s){return s===fe.DELETE?"-":s===fe.ADD?"+":""}function a(s){const i=document.querySelectorAll(".file-diff-split .split-side-left"),l=document.querySelectorAll(".file-diff-split .split-side-right");for(const c of l)c.classList.toggle("no-select",s==="left");for(const c of i)c.classList.toggle("no-select",s==="right")}return(s,i)=>s.splitLine.hideIndex!==void 0&&s.splitLine.hide?(t.openBlock(),t.createElementBlock("tr",Zg,[t.createElementVNode("td",{class:"blob-num blob-num-hunk",colspan:"1",onClick:i[0]||(i[0]=l=>n("expand",s.splitLine))}," > "),eb])):s.splitLine.hide?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",tb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList([s.splitLine.left,s.splitLine.right],(l,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[l.type===t.unref(fe).EMPTY?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[ob,nb],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("td",{class:t.normalizeClass(["blob-num",{"blob-num-deletion":l.type===t.unref(fe).DELETE,"blob-num-addition":l.type===t.unref(fe).ADD,"blob-num-context":l.type===t.unref(fe).EQUAL,"blob-num-hunk":s.splitLine.hide!==void 0}])},t.toDisplayString(l.num),3),t.createElementVNode("td",{class:t.normalizeClass(["blob-code",{"blob-code-deletion":l.type===t.unref(fe).DELETE,"blob-code-addition":l.type===t.unref(fe).ADD,"blob-code-context":l.type===t.unref(fe).EQUAL,"blob-code-hunk":s.splitLine.hide!==void 0,"split-side-left":c===0,"split-side-right":c===1}]),onMousedown:d=>a(c===0?"left":"right")},[t.createElementVNode("span",{class:"blob-code-inner blob-code-marker","data-code-marker":r(l.type),innerHTML:l.code},null,8,ab)],42,rb)],64))],64))),256))]))}}),ib={class:"file-diff-split diff-table"},lb=t.createElementVNode("colgroup",null,[t.createElementVNode("col",{width:"44"}),t.createElementVNode("col"),t.createElementVNode("col",{width:"44"}),t.createElementVNode("col")],-1),cb=t.defineComponent({__name:"SplitViewer",props:{diffChange:{}},setup(e){const o=e;function n({hideIndex:r}){r!==void 0&&o.diffChange.collector[r].lines.forEach(a=>{a.hide=!1,a.fold=!1})}return(r,a)=>{var s;return t.openBlock(),t.createElementBlock("table",ib,[lb,t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((s=r.diffChange)==null?void 0:s.changes,(i,l)=>(t.openBlock(),t.createBlock(sb,{key:l,"split-line":i,onExpand:n},null,8,["split-line"]))),128))])])}}}),wc=(e,o)=>{const n=e.__vccOpts||e;for(const[r,a]of o)n[r]=a;return n},db={name:"DownArrowIcon"},fb={width:"1rem",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},ub=t.createElementVNode("path",{d:"M383.6,322.7L278.6,423c-5.8,6-13.7,9-22.4,9c-8.7,0-16.5-3-22.4-9L128.4,322.7c-12.5-11.9-12.5-31.3,0-43.2 c12.5-11.9,32.7-11.9,45.2,0l50.4,48.2v-217c0-16.9,14.3-30.6,32-30.6c17.7,0,32,13.7,32,30.6v217l50.4-48.2 c12.5-11.9,32.7-11.9,45.2,0C396.1,291.4,396.1,310.7,383.6,322.7z"},null,-1),hb=[ub];function mb(e,o,n,r,a,s){return t.openBlock(),t.createElementBlock("svg",fb,hb)}const Cc=wc(db,[["render",mb]]),pb={name:"UpArrowIcon"},gb={width:"1rem",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},bb=t.createElementVNode("path",{d:"M128.4,189.3L233.4,89c5.8-6,13.7-9,22.4-9c8.7,0,16.5,3,22.4,9l105.4,100.3c12.5,11.9,12.5,31.3,0,43.2 c-12.5,11.9-32.7,11.9-45.2,0L288,184.4v217c0,16.9-14.3,30.6-32,30.6c-17.7,0-32-13.7-32-30.6v-217l-50.4,48.2 c-12.5,11.9-32.7,11.9-45.2,0C115.9,220.6,115.9,201.3,128.4,189.3z"},null,-1),yb=[bb];function xb(e,o,n,r,a,s){return t.openBlock(),t.createElementBlock("svg",gb,yb)}const Ec=wc(pb,[["render",xb]]),kb=["theme"],wb={key:0,class:"file-header"},Cb={key:0,class:"file-info"},Eb={class:"info-left"},_b={class:"info-left"},Bb={class:"diff-commandbar"},Sb={key:0,class:"diff-stat"},Ab={class:"diff-stat-added"},vb={class:"diff-stat-deleted"},Db={key:1,class:"file-info"},Nb={class:"info-left"},Vb={class:"info-right"},Mb={style:{"margin-left":"20px"}},Tb={class:"diff-commandbar"},Pb={key:0,class:"diff-stat"},Ob={class:"diff-stat-added"},Rb={class:"diff-stat-deleted"},Lb=t.defineComponent({__name:"CodeDiff",props:{newString:{},oldString:{},language:{default:"plaintext"},context:{default:10},diffStyle:{default:"word"},forceInlineComparison:{type:Boolean,default:!1},outputFormat:{default:"line-by-line"},trim:{type:Boolean,default:!1},noDiffLineFeed:{type:Boolean,default:!1},maxHeight:{default:void 0},filename:{default:void 0},newFilename:{default:void 0},hideHeader:{type:Boolean,default:!1},hideStat:{type:Boolean,default:!1},theme:{default:"light"},ignoreMatchingLines:{default:void 0}},emits:["diff"],setup(e,{emit:o}){const n=e,r=o,a=t.computed(()=>n.outputFormat==="line-by-line"),s=t.computed(()=>{let p=n.oldString||"";return p=n.trim?p.trim():p,p=n.noDiffLineFeed?p.replace(/(\r\n)/g,`
|
|
23
23
|
`):p,p}),i=t.computed(()=>{let p=n.newString||"";return p=n.trim?p.trim():p,p=n.noDiffLineFeed?p.replace(/(\r\n)/g,`
|
|
24
|
-
`):p,p}),l=t.computed(()=>a.value?Hg(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines):Wg(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines)),c=t.ref(l.value),d=t.computed(()=>c.value.stat.additionsNum===0&&c.value.stat.deletionsNum===0),f=t.ref(-1);function u(){const p=document.querySelectorAll(".blob-code-addition");f.value<p.length-1&&(f.value++,m(p))}function h(){const p=document.querySelectorAll(".blob-code-addition");f.value>0&&(f.value--,m(p))}function m(p){p.forEach(b=>b.classList.remove("current-diff"));const y=p[f.value];y&&(y.classList.add("current-diff"),y.scrollIntoView({behavior:"smooth",block:"center"}))}return t.watch(()=>n,()=>{c.value=l.value,r("diff",{stat:{isChanged:!d.value,addNum:c.value.stat.additionsNum,delNum:c.value.stat.deletionsNum}})},{deep:!0,immediate:!0}),(p,y)=>(t.openBlock(),t.createElementBlock("div",{class:"code-diff-view",theme:p.theme,style:t.normalizeStyle({maxHeight:p.maxHeight})},[p.hideHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wb,[t.unref(a)?(t.openBlock(),t.createElementBlock("div",Cb,[t.createElementVNode("span",null,[t.createElementVNode("div",_b,t.toDisplayString(p.filename),1),t.createElementVNode("div",Eb,t.toDisplayString(p.newFilename),1)]),t.createElementVNode("span",Bb,[t.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[t.createVNode(Cc)]),t.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[t.createVNode(_c)])]),p.hideStat?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Sb,[t.renderSlot(p.$slots,"stat",{stat:t.unref(c).stat},()=>[t.createElementVNode("span",Ab,"+"+t.toDisplayString(t.unref(c).stat.additionsNum)+" additions",1),t.createElementVNode("span",vb,"-"+t.toDisplayString(t.unref(c).stat.deletionsNum)+" deletions",1)])]))])):(t.openBlock(),t.createElementBlock("div",Db,[t.createElementVNode("span",Nb,t.toDisplayString(p.filename),1),t.createElementVNode("span",Vb,[t.createElementVNode("span",Mb,t.toDisplayString(p.newFilename),1),t.createElementVNode("span",Tb,[t.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[t.createVNode(Cc)]),t.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[t.createVNode(_c)])]),p.hideStat?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Pb,[t.renderSlot(p.$slots,"stat",{stat:t.unref(c).stat},()=>[t.createElementVNode("span",Ob,"+"+t.toDisplayString(t.unref(c).stat.additionsNum)+" additions",1),t.createElementVNode("span",Lb,"-"+t.toDisplayString(t.unref(c).stat.deletionsNum)+" deletions",1)])]))])]))])),t.unref(a)?(t.openBlock(),t.createBlock(Qg,{key:1,"diff-change":t.unref(c)},null,8,["diff-change"])):(t.openBlock(),t.createBlock(cb,{key:2,"diff-change":t.unref(c)},null,8,["diff-change"]))],12,kb))}}),Lt=t.ref("auto");t.ref(!1),t.ref(!1);const ls=t.computed(()=>Lt.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:Lt.value==="dark"),Ec=t.computed(()=>Lt.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":Lt.value),Ib=e=>{Lt.value=e,Sr(),zb()},Sr=()=>{const e=document.documentElement,o=ls.value;e.classList.remove("light","dark"),e.classList.add(o?"dark":"light"),e.setAttribute("data-theme",o?"dark":"light"),Fb(o)},Fb=e=>{let o=document.querySelector('meta[name="theme-color"]');o||(o=document.createElement("meta"),o.name="theme-color",document.head.appendChild(o)),o.setAttribute("content",e?"#1f2937":"#ffffff")},zb=()=>{localStorage.setItem("ui-theme",Lt.value)},$b=()=>{const e=localStorage.getItem("ui-theme");e&&["light","dark","auto"].includes(e)&&(Lt.value=e),Sr()},jb=()=>{$b();const e=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>{Lt.value==="auto"&&Sr()};return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}};t.watch(Lt,Sr);const Ub=()=>({theme:Lt.value,isDark:ls.value,currentTheme:Ec.value,setTheme:Ib,initTheme:jb,themeRef:Lt,isDarkRef:ls,currentThemeRef:Ec}),Wb={class:"flex gap-2"},Hb={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-red-50 dark:bg-red-900/10 text-red-600 dark:text-red-400 border border-red-100 dark:border-red-800/50"},qb={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-emerald-50 dark:bg-emerald-900/10 text-emerald-600 dark:text-emerald-400 border border-emerald-100 dark:border-emerald-800/50"},Gb={class:"vue-code-diff-wrapper"},cs=t.defineComponent({__name:"DCodeBeforeAfter",props:{dataBefore:{type:[Object,Array,String,Number,Boolean,null],required:!0},dataAfter:{type:[Object,Array,String,Number,Boolean,null],required:!0}},setup(e){const{t:o}=Et.useI18n(),{isDarkRef:n}=Ub(),r=e,a=t.computed(()=>n.value?"dark":"light"),s=d=>{if(d===null||typeof d!="object")return d;if(Array.isArray(d))return d.map(s);const f=Object.keys(d).sort(),u={};return f.forEach(h=>{u[h]=s(d[h])}),u},i=d=>{try{if(d==null)return"";let f=d;if(typeof d=="string")try{const h=d.trim();(h.startsWith("{")||h.startsWith("["))&&(f=JSON.parse(h))}catch{}const u=s(f);return JSON.stringify(u,null,2)}catch{return String(d)}},l=t.computed(()=>i(r.dataBefore)),c=t.computed(()=>i(r.dataAfter));return(d,f)=>(t.openBlock(),t.createBlock(Jo,{title:t.unref(o)("beforeAfter.dataComparison")||"Data Comparison",padding:"p-0",class:"overflow-hidden"},{actions:t.withCtx(()=>[t.createElementVNode("div",Wb,[t.createElementVNode("span",Hb,t.toDisplayString(t.unref(o)("beforeAfter.original")||"Original"),1),t.createElementVNode("span",qb,t.toDisplayString(t.unref(o)("beforeAfter.modified")||"Modified"),1)])]),default:t.withCtx(()=>[t.createElementVNode("div",Gb,[t.createVNode(t.unref(Rb),{"old-string":l.value,"new-string":c.value,"output-format":"side-by-side",language:"json",context:10,"max-height":600,theme:a.value,"hide-header":!0,"hide-stat":!0},null,8,["old-string","new-string","theme"])])]),_:1},8,["title"]))}}),Kb=["aria-busy"],Xb={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Yb={key:1,class:"flex justify-end"},Jb=["for"],Qb={key:0,class:"ml-1 text-destructive"},Zb={class:"relative w-full group"},e0={key:0,class:"absolute inset-y-0 left-4 flex items-center text-muted-foreground"},t0={key:1},o0=["id","value","placeholder"],n0={key:1,class:"absolute inset-y-0 right-4 flex items-center"},r0={key:2,class:"absolute inset-y-0 right-4 flex items-center"},a0={key:3,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},s0={key:1,class:"text-xs text-destructive"},on=t.defineComponent({name:"DCodeTextField",inheritAttrs:!1,__name:"DCodeTextField",props:{modelValue:{},prependInner:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},placeholder:{default:""},icon:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxLength:{},minLength:{},maxValue:{},minValue:{}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=t.computed(()=>{var $;return(($=l.valueType)==null?void 0:$.toLowerCase())==="password"||n.type==="password"}),a=t.ref(!1),s=()=>{a.value=!a.value},i=o,l=e,c=t.computed(()=>n.label);t.computed(()=>l.visible??!0);const d=Math.random().toString(36).slice(2,7),f=t.computed(()=>`app-text-field-${n.id||c.value||"field"}-${d}`),u=t.computed(()=>{const $=n.required,Y=n["aria-required"];return $===""||$===!0||$==="true"||(Y==="true"||Y===!0)}),h=t.computed(()=>{const{label:$,class:Y,id:ae,required:xe,"aria-required":Oe,...Ee}=n;return Ee}),m=t.computed(()=>{var Y,ae;const $={...h.value};return((Y=l.valueType)==null?void 0:Y.toLowerCase())==="number"&&($.type="text",$.inputmode="numeric",$.pattern="[0-9]*"),((ae=l.valueType)==null?void 0:ae.toLowerCase())==="email"&&($.type="email",$.inputmode="email"),r.value&&($.type=a.value?"text":"password"),l.disabled&&($.disabled=!0),l.readonly&&($.readonly=!0),l.maxLength&&($.maxlength=l.maxLength),l.minLength&&($.minlength=l.minLength),l.maxValue&&($.max=l.maxValue),l.minValue&&($.min=l.minValue),$}),p=t.computed(()=>{const $=l.modelValue;return $==null||String($).length===0}),y=t.computed(()=>l.clearable?l.hideClearWhenEmpty?!p.value:!0:!1),b=t.computed(()=>{switch(l.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),g=t.ref(String(l.modelValue??""));t.watch(()=>l.modelValue,$=>{const Y=String($??"");Y!==g.value&&(g.value=Y)});const _=t.ref(!1),E=t.ref(!1),B=$=>$.split(/(\s+)/).map(Y=>{if(Y.trim()==="")return Y;const ae=Y.toLowerCase();return ae.charAt(0).toUpperCase()+ae.slice(1)}).join(""),A=$=>{const Y=$.toLowerCase(),ae=Y.search(new RegExp("\\p{L}","u"));return ae<0?Y:Y.slice(0,ae)+Y.charAt(ae).toUpperCase()+Y.slice(ae+1)},C=$=>{switch(l.textCase){case"uppercase":return $.toUpperCase();case"lowercase":return $.toLowerCase();case"titlecase":return B($);case"sentencecase":return A($);case"none":default:return $}},x=$=>{if(!$)return null;const Y=Array.isArray($)?$.join(""):$;return Y?new Set(Y):null},w=t.computed(()=>x(l.allowChars)),D=($,Y)=>($.lastIndex=0,$.test(Y)),k=$=>{var Fe;const Y=(Fe=l.valueType)==null?void 0:Fe.toLowerCase();if(Y==="free"||Y==="email"||Y==="password")return!0;const ae=$===" ",xe=/\d/.test($),Oe=new RegExp("\\p{L}","u").test($),Ee=new RegExp("\\p{N}","u").test($),We=/[\/\-_.,]/.test($);return Y==="number"?xe:Y==="letter"?Oe||We||l.allowSpaces&&ae:Y==="letternumber"?Oe||Ee||We||l.allowSpaces&&ae:!0},v=$=>{let Y="";for(const ae of $){const xe=!!w.value&&w.value.has(ae);l.pattern&&!xe&&!D(l.pattern,ae)||!xe&&!k(ae)||(Y+=ae)}return Y},S=t.computed(()=>{const $=l.maxLength??n.maxlength??n.maxLength;let Y=Number.NaN;return typeof $=="number"?Y=$:typeof $=="string"&&(Y=Number.parseInt($,10)),Number.isFinite(Y)&&Y>0?Y:-1}),N=t.computed(()=>g.value.length),V=t.computed(()=>l.showCharCount?S.value>0:!1),L=$=>S.value>0?$.slice(0,S.value):$,O=$=>{const Y=v($),ae=l.applyTextCaseToValue?C(Y):Y;return L(ae)};let P=null;const R=$=>{var Y;if($==="")return null;if(((Y=l.valueType)==null?void 0:Y.toLowerCase())==="number"&&l.returnNumber){const ae=Number($);return Number.isFinite(ae)?ae:null}return $},j=$=>{g.value=$,i("update:modelValue",R($))},T=($,Y)=>{const ae=L(Y);E.value=!0,$.value=ae,j(ae),queueMicrotask(()=>E.value=!1)},F=($,Y)=>{const ae=$.selectionStart??$.value.length,xe=$.selectionEnd??$.value.length;if(S.value>0){const Oe=$.value.length-(xe-ae),Ee=S.value-Oe;if(Ee<=0)return;Y=Y.slice(0,Ee)}$.setRangeText(Y,ae,xe,"end"),T($,O($.value))},X=$=>{var xe;if(!P||_.value||E.value||!((xe=$.inputType)!=null&&xe.startsWith("insert")))return;const Y=$.data;if(Y==null)return;const ae=O(Y);ae!==Y&&($.preventDefault(),ae.length>0&&F(P,ae))},H=$=>{var xe;if(!P||_.value||E.value)return;const Y=((xe=$.clipboardData)==null?void 0:xe.getData("text"))??"",ae=O(Y);ae!==Y&&($.preventDefault(),ae.length>0&&F(P,ae))},W=$=>{if(!P||_.value||E.value)return;const Y=$.target,ae=Y.value??"",xe=O(ae);xe===ae?j(xe):T(Y,xe)},Z=()=>_.value=!0,oe=()=>{if(_.value=!1,!P)return;const $=P.value??"",Y=O($);Y===$?j(Y):T(P,Y)};t.onMounted(()=>{if(P=document.getElementById(f.value),!P)return;P.addEventListener("beforeinput",X),P.addEventListener("paste",H),P.addEventListener("input",W),P.addEventListener("compositionstart",Z),P.addEventListener("compositionend",oe);const $=P.value??"",Y=O($);Y===$?j(Y):T(P,Y)}),t.onBeforeUnmount(()=>{P&&(P.removeEventListener("beforeinput",X),P.removeEventListener("paste",H),P.removeEventListener("input",W),P.removeEventListener("compositionstart",Z),P.removeEventListener("compositionend",oe),P=null)});const ye=()=>{g.value="",P&&(P.value=""),i("update:modelValue",null),i("clear")},Ne=t.computed(()=>V.value&&N.value>0),we=t.computed(()=>`${N.value} / ${S.value}`),Q=t.computed(()=>!!l.error);return($,Y)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,l.disabled?"cursor-not-allowed":""]]),"aria-busy":l.skeleton},[l.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[c.value?(t.openBlock(),t.createElementBlock("div",Xb)):t.createCommentVNode("",!0),Y[1]||(Y[1]=t.createElementVNode("div",{class:"relative w-full"},[t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),V.value?(t.openBlock(),t.createElementBlock("div",Yb,[...Y[0]||(Y[0]=[t.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[c.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:f.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(c.value)+" ",1),u.value?(t.openBlock(),t.createElementBlock("span",Qb,"*")):t.createCommentVNode("",!0)],8,Jb)):t.createCommentVNode("",!0),t.createElementVNode("div",Zb,[l.icon||l.prependInner||$.$slots["prepend-inner"]?(t.openBlock(),t.createElementBlock("div",e0,[t.renderSlot($.$slots,"prepend-inner",{},()=>[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:"h-4 w-4"})):l.prependInner?(t.openBlock(),t.createElementBlock("span",t0,t.toDisplayString(l.prependInner),1)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({id:f.value,value:g.value},m.value,{placeholder:l.placeholder,style:`text-transform: ${b.value}; padding-left: ${l.icon||l.prependInner||$.$slots["prepend-inner"]?"2.5rem":"0.75rem"} !important; padding-right: ${y.value||r.value?"2.5rem":"0.75rem"} !important;`,class:["w-full h-10 flex items-center gap-2 rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600","text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",Q.value?"border-destructive focus:ring-destructive focus-visible:ring-destructive focus-visible:ring-[0.5px]":""]}),null,16,o0),r.value?(t.openBlock(),t.createElementBlock("div",n0,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground",tabindex:"-1",onClick:s},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value?t.unref(ne.Eye):t.unref(ne.EyeOff)),{class:"w-4 h-4"}))])])):t.createCommentVNode("",!0),y.value&&!r.value?(t.openBlock(),t.createElementBlock("div",r0,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-lg leading-none","aria-label":"Clear input",onClick:ye}," ✕ ")])):t.createCommentVNode("",!0),Ne.value&&!Q.value?(t.openBlock(),t.createElementBlock("p",a0,t.toDisplayString(we.value),1)):t.createCommentVNode("",!0)]),Q.value?(t.openBlock(),t.createElementBlock("p",s0,t.toDisplayString(l.error),1)):t.createCommentVNode("",!0)],64))],10,Kb)),[[t.vShow,e.visible]])}}),i0={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},l0={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},c0={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},d0={class:"flex items-center justify-between"},f0={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},u0={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm"},h0={class:"p-6 flex-1"},m0={class:"flex flex-col gap-4"},p0={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},g0={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},b0={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},y0={class:"flex items-center justify-between"},x0={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},k0={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-primary-600 dark:text-primary-400 border border-primary-100 dark:border-primary-900/30 shadow-sm"},w0={class:"p-6 flex-1"},C0={class:"flex flex-col gap-4"},_0={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},ds=t.defineComponent({name:"DCodeListLabels",__name:"DCodeListLabels",props:{dataBefore:{},dataAfter:{}},setup(e){const{t:o}=Et.useI18n(),n=e,r=c=>{if(!c)return{};if(typeof c=="string")try{if(c.trim().startsWith("{")||c.trim().startsWith("["))return JSON.parse(c)}catch(d){return console.error("Failed to parse data string:",d),{raw:c}}return typeof c=="object"&&c!==null?c:{value:c}},a=t.computed(()=>r(n.dataBefore)),s=t.computed(()=>r(n.dataAfter)),i=c=>c.replaceAll(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim(),l=c=>c==null?"-":typeof c=="boolean"?o(c?"common.yes":"common.no"):typeof c=="object"?JSON.stringify(c):String(c);return(c,d)=>(t.openBlock(),t.createElementBlock("div",i0,[t.createElementVNode("div",l0,[t.createElementVNode("div",c0,[t.createElementVNode("div",d0,[t.createElementVNode("h3",f0,[d[0]||(d[0]=t.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(o)("beforeAfter.dataBefore")),1)]),t.createElementVNode("span",u0,t.toDisplayString(t.unref(o)("beforeAfter.original")),1)])]),t.createElementVNode("div",h0,[t.createElementVNode("div",m0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(f,u)=>(t.openBlock(),t.createBlock(on,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(a.value).length===0?(t.openBlock(),t.createElementBlock("div",p0)):t.createCommentVNode("",!0)])])]),t.createElementVNode("div",g0,[t.createElementVNode("div",b0,[t.createElementVNode("div",y0,[t.createElementVNode("h3",x0,[d[1]||(d[1]=t.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(o)("beforeAfter.dataAfter")),1)]),t.createElementVNode("span",k0,t.toDisplayString(t.unref(o)("beforeAfter.modified")),1)])]),t.createElementVNode("div",w0,[t.createElementVNode("div",C0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(f,u)=>(t.openBlock(),t.createBlock(on,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(s.value).length===0?(t.openBlock(),t.createElementBlock("div",_0,t.toDisplayString(t.unref(o)("beforeAfter.noModifiedData")),1)):t.createCommentVNode("",!0)])])])]))}});/*!
|
|
24
|
+
`):p,p}),l=t.computed(()=>a.value?Hg(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines):Wg(s.value,i.value,n.language,n.diffStyle,n.forceInlineComparison,n.context,n.ignoreMatchingLines)),c=t.ref(l.value),d=t.computed(()=>c.value.stat.additionsNum===0&&c.value.stat.deletionsNum===0),f=t.ref(-1);function u(){const p=document.querySelectorAll(".blob-code-addition");f.value<p.length-1&&(f.value++,m(p))}function h(){const p=document.querySelectorAll(".blob-code-addition");f.value>0&&(f.value--,m(p))}function m(p){p.forEach(b=>b.classList.remove("current-diff"));const y=p[f.value];y&&(y.classList.add("current-diff"),y.scrollIntoView({behavior:"smooth",block:"center"}))}return t.watch(()=>n,()=>{c.value=l.value,r("diff",{stat:{isChanged:!d.value,addNum:c.value.stat.additionsNum,delNum:c.value.stat.deletionsNum}})},{deep:!0,immediate:!0}),(p,y)=>(t.openBlock(),t.createElementBlock("div",{class:"code-diff-view",theme:p.theme,style:t.normalizeStyle({maxHeight:p.maxHeight})},[p.hideHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wb,[t.unref(a)?(t.openBlock(),t.createElementBlock("div",Cb,[t.createElementVNode("span",null,[t.createElementVNode("div",Eb,t.toDisplayString(p.filename),1),t.createElementVNode("div",_b,t.toDisplayString(p.newFilename),1)]),t.createElementVNode("span",Bb,[t.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[t.createVNode(Cc)]),t.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[t.createVNode(Ec)])]),p.hideStat?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Sb,[t.renderSlot(p.$slots,"stat",{stat:t.unref(c).stat},()=>[t.createElementVNode("span",Ab,"+"+t.toDisplayString(t.unref(c).stat.additionsNum)+" additions",1),t.createElementVNode("span",vb,"-"+t.toDisplayString(t.unref(c).stat.deletionsNum)+" deletions",1)])]))])):(t.openBlock(),t.createElementBlock("div",Db,[t.createElementVNode("span",Nb,t.toDisplayString(p.filename),1),t.createElementVNode("span",Vb,[t.createElementVNode("span",Mb,t.toDisplayString(p.newFilename),1),t.createElementVNode("span",Tb,[t.createElementVNode("button",{class:"command-item-button",title:"Next Change",onClick:u},[t.createVNode(Cc)]),t.createElementVNode("button",{class:"command-item-button",title:"Previous Change",onClick:h},[t.createVNode(Ec)])]),p.hideStat?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Pb,[t.renderSlot(p.$slots,"stat",{stat:t.unref(c).stat},()=>[t.createElementVNode("span",Ob,"+"+t.toDisplayString(t.unref(c).stat.additionsNum)+" additions",1),t.createElementVNode("span",Rb,"-"+t.toDisplayString(t.unref(c).stat.deletionsNum)+" deletions",1)])]))])]))])),t.unref(a)?(t.openBlock(),t.createBlock(Qg,{key:1,"diff-change":t.unref(c)},null,8,["diff-change"])):(t.openBlock(),t.createBlock(cb,{key:2,"diff-change":t.unref(c)},null,8,["diff-change"]))],12,kb))}}),Rt=t.ref("auto");t.ref(!1),t.ref(!1);const ls=t.computed(()=>Rt.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches:Rt.value==="dark"),_c=t.computed(()=>Rt.value==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":Rt.value),Ib=e=>{Rt.value=e,Sr(),zb()},Sr=()=>{const e=document.documentElement,o=ls.value;e.classList.remove("light","dark"),e.classList.add(o?"dark":"light"),e.setAttribute("data-theme",o?"dark":"light"),Fb(o)},Fb=e=>{let o=document.querySelector('meta[name="theme-color"]');o||(o=document.createElement("meta"),o.name="theme-color",document.head.appendChild(o)),o.setAttribute("content",e?"#1f2937":"#ffffff")},zb=()=>{localStorage.setItem("ui-theme",Rt.value)},$b=()=>{const e=localStorage.getItem("ui-theme");e&&["light","dark","auto"].includes(e)&&(Rt.value=e),Sr()},jb=()=>{$b();const e=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>{Rt.value==="auto"&&Sr()};return e.addEventListener("change",o),()=>{e.removeEventListener("change",o)}};t.watch(Rt,Sr);const Ub=()=>({theme:Rt.value,isDark:ls.value,currentTheme:_c.value,setTheme:Ib,initTheme:jb,themeRef:Rt,isDarkRef:ls,currentThemeRef:_c}),Wb={class:"flex gap-2"},Hb={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-red-50 dark:bg-red-900/10 text-red-600 dark:text-red-400 border border-red-100 dark:border-red-800/50"},qb={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-emerald-50 dark:bg-emerald-900/10 text-emerald-600 dark:text-emerald-400 border border-emerald-100 dark:border-emerald-800/50"},Gb={class:"vue-code-diff-wrapper"},cs=t.defineComponent({__name:"DCodeBeforeAfter",props:{dataBefore:{type:[Object,Array,String,Number,Boolean,null],required:!0},dataAfter:{type:[Object,Array,String,Number,Boolean,null],required:!0}},setup(e){const{t:o}=_t.useI18n(),{isDarkRef:n}=Ub(),r=e,a=t.computed(()=>n.value?"dark":"light"),s=d=>{if(d===null||typeof d!="object")return d;if(Array.isArray(d))return d.map(s);const f=Object.keys(d).sort(),u={};return f.forEach(h=>{u[h]=s(d[h])}),u},i=d=>{try{if(d==null)return"";let f=d;if(typeof d=="string")try{const h=d.trim();(h.startsWith("{")||h.startsWith("["))&&(f=JSON.parse(h))}catch{}const u=s(f);return JSON.stringify(u,null,2)}catch{return String(d)}},l=t.computed(()=>i(r.dataBefore)),c=t.computed(()=>i(r.dataAfter));return(d,f)=>(t.openBlock(),t.createBlock(Jo,{title:t.unref(o)("beforeAfter.dataComparison")||"Data Comparison",padding:"p-0",class:"overflow-hidden"},{actions:t.withCtx(()=>[t.createElementVNode("div",Wb,[t.createElementVNode("span",Hb,t.toDisplayString(t.unref(o)("beforeAfter.original")||"Original"),1),t.createElementVNode("span",qb,t.toDisplayString(t.unref(o)("beforeAfter.modified")||"Modified"),1)])]),default:t.withCtx(()=>[t.createElementVNode("div",Gb,[t.createVNode(t.unref(Lb),{"old-string":l.value,"new-string":c.value,"output-format":"side-by-side",language:"json",context:10,"max-height":600,theme:a.value,"hide-header":!0,"hide-stat":!0},null,8,["old-string","new-string","theme"])])]),_:1},8,["title"]))}}),Kb=["aria-busy"],Xb={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Yb={key:1,class:"flex justify-end"},Jb=["for"],Qb={key:0,class:"ml-1 text-destructive"},Zb={class:"relative w-full group"},e0={key:0,class:"absolute inset-y-0 left-4 flex items-center text-muted-foreground"},t0={key:1},o0=["id","value","placeholder"],n0={key:1,class:"absolute inset-y-0 right-4 flex items-center"},r0={key:2,class:"absolute inset-y-0 right-4 flex items-center"},a0={key:3,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},s0={key:1,class:"text-xs text-destructive"},on=t.defineComponent({name:"DCodeTextField",inheritAttrs:!1,__name:"DCodeTextField",props:{modelValue:{},prependInner:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},placeholder:{default:""},icon:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},maxLength:{},minLength:{},maxValue:{},minValue:{}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=t.computed(()=>{var j;return((j=l.valueType)==null?void 0:j.toLowerCase())==="password"||n.type==="password"}),a=t.ref(!1),s=()=>{a.value=!a.value},i=o,l=e,c=t.computed(()=>n.label);t.computed(()=>l.visible??!0);const d=Math.random().toString(36).slice(2,7),f=t.computed(()=>`app-text-field-${n.id||c.value||"field"}-${d}`),u=t.computed(()=>{const j=n.required,Y=n["aria-required"];return j===""||j===!0||j==="true"||(Y==="true"||Y===!0)}),h=t.computed(()=>{const{label:j,class:Y,id:ae,required:ke,"aria-required":Oe,..._e}=n;return _e}),m=t.computed(()=>{var Y,ae;const j={...h.value};return((Y=l.valueType)==null?void 0:Y.toLowerCase())==="number"&&(j.type="text",j.inputmode="numeric",j.pattern="[0-9]*"),((ae=l.valueType)==null?void 0:ae.toLowerCase())==="email"&&(j.type="email",j.inputmode="email"),r.value&&(j.type=a.value?"text":"password"),l.disabled&&(j.disabled=!0),l.readonly&&(j.readonly=!0),l.maxLength&&(j.maxlength=l.maxLength),l.minLength&&(j.minlength=l.minLength),l.maxValue&&(j.max=l.maxValue),l.minValue&&(j.min=l.minValue),j}),p=t.computed(()=>{const j=l.modelValue;return j==null||String(j).length===0}),y=t.computed(()=>l.clearable?l.hideClearWhenEmpty?!p.value:!0:!1),b=t.computed(()=>{switch(l.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),g=t.ref(String(l.modelValue??""));t.watch(()=>l.modelValue,j=>{const Y=String(j??"");Y!==g.value&&(g.value=Y)});const E=t.ref(!1),_=t.ref(!1),B=j=>j.split(/(\s+)/).map(Y=>{if(Y.trim()==="")return Y;const ae=Y.toLowerCase();return ae.charAt(0).toUpperCase()+ae.slice(1)}).join(""),A=j=>{const Y=j.toLowerCase(),ae=Y.search(new RegExp("\\p{L}","u"));return ae<0?Y:Y.slice(0,ae)+Y.charAt(ae).toUpperCase()+Y.slice(ae+1)},C=j=>{switch(l.textCase){case"uppercase":return j.toUpperCase();case"lowercase":return j.toLowerCase();case"titlecase":return B(j);case"sentencecase":return A(j);case"none":default:return j}},x=j=>{if(!j)return null;const Y=Array.isArray(j)?j.join(""):j;return Y?new Set(Y):null},k=t.computed(()=>x(l.allowChars)),N=(j,Y)=>(j.lastIndex=0,j.test(Y)),w=j=>{var Fe;const Y=(Fe=l.valueType)==null?void 0:Fe.toLowerCase();if(Y==="free"||Y==="email"||Y==="password")return!0;const ae=j===" ",ke=/\d/.test(j),Oe=new RegExp("\\p{L}","u").test(j),_e=new RegExp("\\p{N}","u").test(j),We=/[\/\-_.,]/.test(j);return Y==="number"?ke:Y==="letter"?Oe||We||l.allowSpaces&&ae:Y==="letternumber"?Oe||_e||We||l.allowSpaces&&ae:!0},v=j=>{let Y="";for(const ae of j){const ke=!!k.value&&k.value.has(ae);l.pattern&&!ke&&!N(l.pattern,ae)||!ke&&!w(ae)||(Y+=ae)}return Y},S=t.computed(()=>{const j=l.maxLength??n.maxlength??n.maxLength;let Y=Number.NaN;return typeof j=="number"?Y=j:typeof j=="string"&&(Y=Number.parseInt(j,10)),Number.isFinite(Y)&&Y>0?Y:-1}),D=t.computed(()=>g.value.length),V=t.computed(()=>l.showCharCount?S.value>0:!1),R=j=>S.value>0?j.slice(0,S.value):j,O=j=>{const Y=v(j),ae=l.applyTextCaseToValue?C(Y):Y;return R(ae)};let P=null;const L=j=>{var Y;if(j==="")return null;if(((Y=l.valueType)==null?void 0:Y.toLowerCase())==="number"&&l.returnNumber){const ae=Number(j);return Number.isFinite(ae)?ae:null}return j},$=j=>{g.value=j,i("update:modelValue",L(j))},T=(j,Y)=>{const ae=R(Y);_.value=!0,j.value=ae,$(ae),queueMicrotask(()=>_.value=!1)},I=(j,Y)=>{const ae=j.selectionStart??j.value.length,ke=j.selectionEnd??j.value.length;if(S.value>0){const Oe=j.value.length-(ke-ae),_e=S.value-Oe;if(_e<=0)return;Y=Y.slice(0,_e)}j.setRangeText(Y,ae,ke,"end"),T(j,O(j.value))},H=j=>{var ke;if(!P||E.value||_.value||!((ke=j.inputType)!=null&&ke.startsWith("insert")))return;const Y=j.data;if(Y==null)return;const ae=O(Y);ae!==Y&&(j.preventDefault(),ae.length>0&&I(P,ae))},q=j=>{var ke;if(!P||E.value||_.value)return;const Y=((ke=j.clipboardData)==null?void 0:ke.getData("text"))??"",ae=O(Y);ae!==Y&&(j.preventDefault(),ae.length>0&&I(P,ae))},W=j=>{if(!P||E.value||_.value)return;const Y=j.target,ae=Y.value??"",ke=O(ae);ke===ae?$(ke):T(Y,ke)},Z=()=>E.value=!0,te=()=>{if(E.value=!1,!P)return;const j=P.value??"",Y=O(j);Y===j?$(Y):T(P,Y)};t.onMounted(()=>{if(P=document.getElementById(f.value),!P)return;P.addEventListener("beforeinput",H),P.addEventListener("paste",q),P.addEventListener("input",W),P.addEventListener("compositionstart",Z),P.addEventListener("compositionend",te);const j=P.value??"",Y=O(j);Y===j?$(Y):T(P,Y)}),t.onBeforeUnmount(()=>{P&&(P.removeEventListener("beforeinput",H),P.removeEventListener("paste",q),P.removeEventListener("input",W),P.removeEventListener("compositionstart",Z),P.removeEventListener("compositionend",te),P=null)});const xe=()=>{g.value="",P&&(P.value=""),i("update:modelValue",null),i("clear")},Se=t.computed(()=>V.value&&D.value>0),ye=t.computed(()=>`${D.value} / ${S.value}`),Q=t.computed(()=>!!l.error);return(j,Y)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,l.disabled?"cursor-not-allowed":""]]),"aria-busy":l.skeleton},[l.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[c.value?(t.openBlock(),t.createElementBlock("div",Xb)):t.createCommentVNode("",!0),Y[1]||(Y[1]=t.createElementVNode("div",{class:"relative w-full"},[t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),V.value?(t.openBlock(),t.createElementBlock("div",Yb,[...Y[0]||(Y[0]=[t.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[c.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:f.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(c.value)+" ",1),u.value?(t.openBlock(),t.createElementBlock("span",Qb,"*")):t.createCommentVNode("",!0)],8,Jb)):t.createCommentVNode("",!0),t.createElementVNode("div",Zb,[l.icon||l.prependInner||j.$slots["prepend-inner"]?(t.openBlock(),t.createElementBlock("div",e0,[t.renderSlot(j.$slots,"prepend-inner",{},()=>[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:"h-4 w-4"})):l.prependInner?(t.openBlock(),t.createElementBlock("span",t0,t.toDisplayString(l.prependInner),1)):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0),t.createElementVNode("input",t.mergeProps({id:f.value,value:g.value},m.value,{placeholder:l.placeholder,style:`text-transform: ${b.value}; padding-left: ${l.icon||l.prependInner||j.$slots["prepend-inner"]?"2.5rem":"0.75rem"} !important; padding-right: ${y.value||r.value?"2.5rem":"0.75rem"} !important;`,class:["w-full h-10 flex items-center gap-2 rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600","text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",Q.value?"border-destructive focus:ring-destructive focus-visible:ring-destructive focus-visible:ring-[0.5px]":""]}),null,16,o0),r.value?(t.openBlock(),t.createElementBlock("div",n0,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground",tabindex:"-1",onClick:s},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value?t.unref(ne.Eye):t.unref(ne.EyeOff)),{class:"w-4 h-4"}))])])):t.createCommentVNode("",!0),y.value&&!r.value?(t.openBlock(),t.createElementBlock("div",r0,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-lg leading-none","aria-label":"Clear input",onClick:xe}," ✕ ")])):t.createCommentVNode("",!0),Se.value&&!Q.value?(t.openBlock(),t.createElementBlock("p",a0,t.toDisplayString(ye.value),1)):t.createCommentVNode("",!0)]),Q.value?(t.openBlock(),t.createElementBlock("p",s0,t.toDisplayString(l.error),1)):t.createCommentVNode("",!0)],64))],10,Kb)),[[t.vShow,e.visible]])}}),i0={class:"grid grid-cols-1 md:grid-cols-2 gap-6"},l0={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},c0={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},d0={class:"flex items-center justify-between"},f0={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},u0={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-neutral-600 dark:text-neutral-400 border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm"},h0={class:"p-6 flex-1"},m0={class:"flex flex-col gap-4"},p0={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},g0={class:"dcode-card h-full flex flex-col border border-neutral-200/60 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 rounded-xl overflow-hidden"},b0={class:"p-4 border-b border-neutral-200/60 dark:border-neutral-700/30 bg-neutral-50 dark:bg-neutral-900/10"},y0={class:"flex items-center justify-between"},x0={class:"font-display font-semibold text-neutral-900 dark:text-neutral-100 flex items-center gap-2"},k0={class:"text-[10px] font-medium px-2 py-0.5 rounded-full bg-white dark:bg-neutral-800 text-primary-600 dark:text-primary-400 border border-primary-100 dark:border-primary-900/30 shadow-sm"},w0={class:"p-6 flex-1"},C0={class:"flex flex-col gap-4"},E0={key:0,class:"text-center py-8 text-neutral-400 dark:text-neutral-500 italic text-sm"},ds=t.defineComponent({name:"DCodeListLabels",__name:"DCodeListLabels",props:{dataBefore:{},dataAfter:{}},setup(e){const{t:o}=_t.useI18n(),n=e,r=c=>{if(!c)return{};if(typeof c=="string")try{if(c.trim().startsWith("{")||c.trim().startsWith("["))return JSON.parse(c)}catch(d){return console.error("Failed to parse data string:",d),{raw:c}}return typeof c=="object"&&c!==null?c:{value:c}},a=t.computed(()=>r(n.dataBefore)),s=t.computed(()=>r(n.dataAfter)),i=c=>c.replaceAll(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase()).trim(),l=c=>c==null?"-":typeof c=="boolean"?o(c?"common.yes":"common.no"):typeof c=="object"?JSON.stringify(c):String(c);return(c,d)=>(t.openBlock(),t.createElementBlock("div",i0,[t.createElementVNode("div",l0,[t.createElementVNode("div",c0,[t.createElementVNode("div",d0,[t.createElementVNode("h3",f0,[d[0]||(d[0]=t.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-danger-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(o)("beforeAfter.dataBefore")),1)]),t.createElementVNode("span",u0,t.toDisplayString(t.unref(o)("beforeAfter.original")),1)])]),t.createElementVNode("div",h0,[t.createElementVNode("div",m0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(f,u)=>(t.openBlock(),t.createBlock(on,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(a.value).length===0?(t.openBlock(),t.createElementBlock("div",p0)):t.createCommentVNode("",!0)])])]),t.createElementVNode("div",g0,[t.createElementVNode("div",b0,[t.createElementVNode("div",y0,[t.createElementVNode("h3",x0,[d[1]||(d[1]=t.createElementVNode("span",{class:"w-2 h-2 rounded-full bg-success-500 shadow-[0_0_8px_rgba(34,197,94,0.5)]"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(o)("beforeAfter.dataAfter")),1)]),t.createElementVNode("span",k0,t.toDisplayString(t.unref(o)("beforeAfter.modified")),1)])]),t.createElementVNode("div",w0,[t.createElementVNode("div",C0,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(f,u)=>(t.openBlock(),t.createBlock(on,{key:u,"model-value":l(f),label:i(String(u)),disabled:"",variant:"underlined",class:"w-full"},null,8,["model-value","label"]))),128)),Object.keys(s.value).length===0?(t.openBlock(),t.createElementBlock("div",E0,t.toDisplayString(t.unref(o)("beforeAfter.noModifiedData")),1)):t.createCommentVNode("",!0)])])])]))}});/*!
|
|
25
25
|
* @kurkle/color v0.3.4
|
|
26
26
|
* https://github.com/kurkle/color#readme
|
|
27
27
|
* (c) 2024 Jukka Kurkela
|
|
28
28
|
* Released under the MIT License
|
|
29
|
-
*/function Nn(e){return e+.5|0}const bo=(e,o,n)=>Math.max(Math.min(e,n),o);function Vn(e){return bo(Nn(e*2.55),0,255)}function yo(e){return bo(Nn(e*255),0,255)}function Zt(e){return bo(Nn(e/2.55)/100,0,1)}function Bc(e){return bo(Nn(e*100),0,100)}const St={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},fs=[..."0123456789ABCDEF"],
|
|
29
|
+
*/function Nn(e){return e+.5|0}const bo=(e,o,n)=>Math.max(Math.min(e,n),o);function Vn(e){return bo(Nn(e*2.55),0,255)}function yo(e){return bo(Nn(e*255),0,255)}function Zt(e){return bo(Nn(e/2.55)/100,0,1)}function Bc(e){return bo(Nn(e*100),0,100)}const St={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},fs=[..."0123456789ABCDEF"],_0=e=>fs[e&15],B0=e=>fs[(e&240)>>4]+fs[e&15],Ar=e=>(e&240)>>4===(e&15),S0=e=>Ar(e.r)&&Ar(e.g)&&Ar(e.b)&&Ar(e.a);function A0(e){var o=e.length,n;return e[0]==="#"&&(o===4||o===5?n={r:255&St[e[1]]*17,g:255&St[e[2]]*17,b:255&St[e[3]]*17,a:o===5?St[e[4]]*17:255}:(o===7||o===9)&&(n={r:St[e[1]]<<4|St[e[2]],g:St[e[3]]<<4|St[e[4]],b:St[e[5]]<<4|St[e[6]],a:o===9?St[e[7]]<<4|St[e[8]]:255})),n}const v0=(e,o)=>e<255?o(e):"";function D0(e){var o=S0(e)?_0:B0;return e?"#"+o(e.r)+o(e.g)+o(e.b)+v0(e.a,o):void 0}const N0=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Sc(e,o,n){const r=o*Math.min(n,1-n),a=(s,i=(s+e/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[a(0),a(8),a(4)]}function V0(e,o,n){const r=(a,s=(a+e/60)%6)=>n-n*o*Math.max(Math.min(s,4-s,1),0);return[r(5),r(3),r(1)]}function M0(e,o,n){const r=Sc(e,1,.5);let a;for(o+n>1&&(a=1/(o+n),o*=a,n*=a),a=0;a<3;a++)r[a]*=1-o-n,r[a]+=o;return r}function T0(e,o,n,r,a){return e===a?(o-n)/r+(o<n?6:0):o===a?(n-e)/r+2:(e-o)/r+4}function us(e){const n=e.r/255,r=e.g/255,a=e.b/255,s=Math.max(n,r,a),i=Math.min(n,r,a),l=(s+i)/2;let c,d,f;return s!==i&&(f=s-i,d=l>.5?f/(2-s-i):f/(s+i),c=T0(n,r,a,f,s),c=c*60+.5),[c|0,d||0,l]}function hs(e,o,n,r){return(Array.isArray(o)?e(o[0],o[1],o[2]):e(o,n,r)).map(yo)}function ms(e,o,n){return hs(Sc,e,o,n)}function P0(e,o,n){return hs(M0,e,o,n)}function O0(e,o,n){return hs(V0,e,o,n)}function Ac(e){return(e%360+360)%360}function R0(e){const o=N0.exec(e);let n=255,r;if(!o)return;o[5]!==r&&(n=o[6]?Vn(+o[5]):yo(+o[5]));const a=Ac(+o[2]),s=+o[3]/100,i=+o[4]/100;return o[1]==="hwb"?r=P0(a,s,i):o[1]==="hsv"?r=O0(a,s,i):r=ms(a,s,i),{r:r[0],g:r[1],b:r[2],a:n}}function L0(e,o){var n=us(e);n[0]=Ac(n[0]+o),n=ms(n),e.r=n[0],e.g=n[1],e.b=n[2]}function I0(e){if(!e)return;const o=us(e),n=o[0],r=Bc(o[1]),a=Bc(o[2]);return e.a<255?`hsla(${n}, ${r}%, ${a}%, ${Zt(e.a)})`:`hsl(${n}, ${r}%, ${a}%)`}const vc={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Dc={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function F0(){const e={},o=Object.keys(Dc),n=Object.keys(vc);let r,a,s,i,l;for(r=0;r<o.length;r++){for(i=l=o[r],a=0;a<n.length;a++)s=n[a],l=l.replace(s,vc[s]);s=parseInt(Dc[i],16),e[l]=[s>>16&255,s>>8&255,s&255]}return e}let vr;function z0(e){vr||(vr=F0(),vr.transparent=[0,0,0,0]);const o=vr[e.toLowerCase()];return o&&{r:o[0],g:o[1],b:o[2],a:o.length===4?o[3]:255}}const $0=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function j0(e){const o=$0.exec(e);let n=255,r,a,s;if(o){if(o[7]!==r){const i=+o[7];n=o[8]?Vn(i):bo(i*255,0,255)}return r=+o[1],a=+o[3],s=+o[5],r=255&(o[2]?Vn(r):bo(r,0,255)),a=255&(o[4]?Vn(a):bo(a,0,255)),s=255&(o[6]?Vn(s):bo(s,0,255)),{r,g:a,b:s,a:n}}}function U0(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Zt(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const ps=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,nn=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function W0(e,o,n){const r=nn(Zt(e.r)),a=nn(Zt(e.g)),s=nn(Zt(e.b));return{r:yo(ps(r+n*(nn(Zt(o.r))-r))),g:yo(ps(a+n*(nn(Zt(o.g))-a))),b:yo(ps(s+n*(nn(Zt(o.b))-s))),a:e.a+n*(o.a-e.a)}}function Dr(e,o,n){if(e){let r=us(e);r[o]=Math.max(0,Math.min(r[o]+r[o]*n,o===0?360:1)),r=ms(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Nc(e,o){return e&&Object.assign(o||{},e)}function Vc(e){var o={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(o={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(o.a=yo(e[3]))):(o=Nc(e,{r:0,g:0,b:0,a:1}),o.a=yo(o.a)),o}function H0(e){return e.charAt(0)==="r"?j0(e):R0(e)}class Mn{constructor(o){if(o instanceof Mn)return o;const n=typeof o;let r;n==="object"?r=Vc(o):n==="string"&&(r=A0(o)||z0(o)||H0(o)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var o=Nc(this._rgb);return o&&(o.a=Zt(o.a)),o}set rgb(o){this._rgb=Vc(o)}rgbString(){return this._valid?U0(this._rgb):void 0}hexString(){return this._valid?D0(this._rgb):void 0}hslString(){return this._valid?I0(this._rgb):void 0}mix(o,n){if(o){const r=this.rgb,a=o.rgb;let s;const i=n===s?.5:n,l=2*i-1,c=r.a-a.a,d=((l*c===-1?l:(l+c)/(1+l*c))+1)/2;s=1-d,r.r=255&d*r.r+s*a.r+.5,r.g=255&d*r.g+s*a.g+.5,r.b=255&d*r.b+s*a.b+.5,r.a=i*r.a+(1-i)*a.a,this.rgb=r}return this}interpolate(o,n){return o&&(this._rgb=W0(this._rgb,o._rgb,n)),this}clone(){return new Mn(this.rgb)}alpha(o){return this._rgb.a=yo(o),this}clearer(o){const n=this._rgb;return n.a*=1-o,this}greyscale(){const o=this._rgb,n=Nn(o.r*.3+o.g*.59+o.b*.11);return o.r=o.g=o.b=n,this}opaquer(o){const n=this._rgb;return n.a*=1+o,this}negate(){const o=this._rgb;return o.r=255-o.r,o.g=255-o.g,o.b=255-o.b,this}lighten(o){return Dr(this._rgb,2,o),this}darken(o){return Dr(this._rgb,2,-o),this}saturate(o){return Dr(this._rgb,1,o),this}desaturate(o){return Dr(this._rgb,1,-o),this}rotate(o){return L0(this._rgb,o),this}}/*!
|
|
30
30
|
* Chart.js v4.5.1
|
|
31
31
|
* https://www.chartjs.org
|
|
32
32
|
* (c) 2025 Chart.js Contributors
|
|
33
33
|
* Released under the MIT License
|
|
34
|
-
*/function eo(){}const q0=(()=>{let e=0;return()=>e++})();function $e(e){return e==null}function Ze(e){if(Array.isArray&&Array.isArray(e))return!0;const o=Object.prototype.toString.call(e);return o.slice(0,7)==="[object"&&o.slice(-6)==="Array]"}function Pe(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function at(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function zt(e,o){return at(e)?e:o}function Ae(e,o){return typeof e>"u"?o:e}const G0=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/o,Mc=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*o:+e;function qe(e,o,n){if(e&&typeof e.call=="function")return e.apply(n,o)}function je(e,o,n,r){let a,s,i;if(Ze(e))for(s=e.length,a=0;a<s;a++)o.call(n,e[a],a);else if(Pe(e))for(i=Object.keys(e),s=i.length,a=0;a<s;a++)o.call(n,e[i[a]],i[a])}function Nr(e,o){let n,r,a,s;if(!e||!o||e.length!==o.length)return!1;for(n=0,r=e.length;n<r;++n)if(a=e[n],s=o[n],a.datasetIndex!==s.datasetIndex||a.index!==s.index)return!1;return!0}function Vr(e){if(Ze(e))return e.map(Vr);if(Pe(e)){const o=Object.create(null),n=Object.keys(e),r=n.length;let a=0;for(;a<r;++a)o[n[a]]=Vr(e[n[a]]);return o}return e}function Tc(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function K0(e,o,n,r){if(!Tc(e))return;const a=o[e],s=n[e];Pe(a)&&Pe(s)?Tn(a,s,r):o[e]=Vr(s)}function Tn(e,o,n){const r=Ze(o)?o:[o],a=r.length;if(!Pe(e))return e;n=n||{};const s=n.merger||K0;let i;for(let l=0;l<a;++l){if(i=r[l],!Pe(i))continue;const c=Object.keys(i);for(let d=0,f=c.length;d<f;++d)s(c[d],e,i,n)}return e}function Pn(e,o){return Tn(e,o,{merger:X0})}function X0(e,o,n){if(!Tc(e))return;const r=o[e],a=n[e];Pe(r)&&Pe(a)?Pn(r,a):Object.prototype.hasOwnProperty.call(o,e)||(o[e]=Vr(a))}const Pc={"":e=>e,x:e=>e.x,y:e=>e.y};function Y0(e){const o=e.split("."),n=[];let r="";for(const a of o)r+=a,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function J0(e){const o=Y0(e);return n=>{for(const r of o){if(r==="")break;n=n&&n[r]}return n}}function To(e,o){return(Pc[o]||(Pc[o]=J0(o)))(e)}function gs(e){return e.charAt(0).toUpperCase()+e.slice(1)}const On=e=>typeof e<"u",xo=e=>typeof e=="function",Oc=(e,o)=>{if(e.size!==o.size)return!1;for(const n of e)if(!o.has(n))return!1;return!0};function Q0(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ue=Math.PI,Ke=2*Ue,Z0=Ke+Ue,Mr=Number.POSITIVE_INFINITY,ey=Ue/180,tt=Ue/2,Po=Ue/4,Lc=Ue*2/3,Rc=Math.log10,$t=Math.sign;function Ln(e,o,n){return Math.abs(e-o)<n}function Ic(e){const o=Math.round(e);e=Ln(e,o,e/1e3)?o:e;const n=Math.pow(10,Math.floor(Rc(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ty(e){const o=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(o.push(r),o.push(e/r));return n===(n|0)&&o.push(n),o.sort((a,s)=>a-s).pop(),o}function oy(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Rn(e){return!oy(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function ny(e,o){const n=Math.round(e);return n-o<=e&&n+o>=e}function ry(e,o,n){let r,a,s;for(r=0,a=e.length;r<a;r++)s=e[r][n],isNaN(s)||(o.min=Math.min(o.min,s),o.max=Math.max(o.max,s))}function to(e){return e*(Ue/180)}function ay(e){return e*(180/Ue)}function Fc(e){if(!at(e))return;let o=1,n=0;for(;Math.round(e*o)/o!==e;)o*=10,n++;return n}function zc(e,o){const n=o.x-e.x,r=o.y-e.y,a=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*Ue&&(s+=Ke),{angle:s,distance:a}}function bs(e,o){return Math.sqrt(Math.pow(o.x-e.x,2)+Math.pow(o.y-e.y,2))}function sy(e,o){return(e-o+Z0)%Ke-Ue}function yt(e){return(e%Ke+Ke)%Ke}function In(e,o,n,r){const a=yt(e),s=yt(o),i=yt(n),l=yt(s-a),c=yt(i-a),d=yt(a-s),f=yt(a-i);return a===s||a===i||r&&s===i||l>c&&d<f}function st(e,o,n){return Math.max(o,Math.min(n,e))}function iy(e){return st(e,-32768,32767)}function oo(e,o,n,r=1e-6){return e>=Math.min(o,n)-r&&e<=Math.max(o,n)+r}function ys(e,o,n){n=n||(i=>e[i]<o);let r=e.length-1,a=0,s;for(;r-a>1;)s=a+r>>1,n(s)?a=s:r=s;return{lo:a,hi:r}}const Oo=(e,o,n,r)=>ys(e,n,r?a=>{const s=e[a][o];return s<n||s===n&&e[a+1][o]===n}:a=>e[a][o]<n),ly=(e,o,n)=>ys(e,n,r=>e[r][o]>=n);function cy(e,o,n){let r=0,a=e.length;for(;r<a&&e[r]<o;)r++;for(;a>r&&e[a-1]>n;)a--;return r>0||a<e.length?e.slice(r,a):e}const $c=["push","pop","shift","splice","unshift"];function dy(e,o){if(e._chartjs){e._chartjs.listeners.push(o);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),$c.forEach(n=>{const r="_onData"+gs(n),a=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const i=a.apply(this,s);return e._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...s)}),i}})})}function jc(e,o){const n=e._chartjs;if(!n)return;const r=n.listeners,a=r.indexOf(o);a!==-1&&r.splice(a,1),!(r.length>0)&&($c.forEach(s=>{delete e[s]}),delete e._chartjs)}function Uc(e){const o=new Set(e);return o.size===e.length?e:Array.from(o)}const Wc=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Hc(e,o){let n=[],r=!1;return function(...a){n=a,r||(r=!0,Wc.call(window,()=>{r=!1,e.apply(o,n)}))}}function fy(e,o){let n;return function(...r){return o?(clearTimeout(n),n=setTimeout(e,o,r)):e.apply(this,r),o}}const xs=e=>e==="start"?"left":e==="end"?"right":"center",it=(e,o,n)=>e==="start"?o:e==="end"?n:(o+n)/2,uy=(e,o,n,r)=>e===(r?"left":"right")?n:e==="center"?(o+n)/2:o;function hy(e,o,n){const r=o.length;let a=0,s=r;if(e._sorted){const{iScale:i,vScale:l,_parsed:c}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,f=i.axis,{min:u,max:h,minDefined:m,maxDefined:p}=i.getUserBounds();if(m){if(a=Math.min(Oo(c,f,u).lo,n?r:Oo(o,f,i.getPixelForValue(u)).lo),d){const y=c.slice(0,a+1).reverse().findIndex(b=>!$e(b[l.axis]));a-=Math.max(0,y)}a=st(a,0,r-1)}if(p){let y=Math.max(Oo(c,i.axis,h,!0).hi+1,n?0:Oo(o,f,i.getPixelForValue(h),!0).hi+1);if(d){const b=c.slice(y-1).findIndex(g=>!$e(g[l.axis]));y+=Math.max(0,b)}s=st(y,a,r)-a}else s=r-a}return{start:a,count:s}}function my(e){const{xScale:o,yScale:n,_scaleRanges:r}=e,a={xmin:o.min,xmax:o.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=a,!0;const s=r.xmin!==o.min||r.xmax!==o.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,a),s}const Tr=e=>e===0||e===1,qc=(e,o,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-o)*Ke/n)),Gc=(e,o,n)=>Math.pow(2,-10*e)*Math.sin((e-o)*Ke/n)+1,Fn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*tt)+1,easeOutSine:e=>Math.sin(e*tt),easeInOutSine:e=>-.5*(Math.cos(Ue*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Tr(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Tr(e)?e:qc(e,.075,.3),easeOutElastic:e=>Tr(e)?e:Gc(e,.075,.3),easeInOutElastic(e){return Tr(e)?e:e<.5?.5*qc(e*2,.1125,.45):.5+.5*Gc(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let o=1.70158;return(e/=.5)<1?.5*(e*e*(((o*=1.525)+1)*e-o)):.5*((e-=2)*e*(((o*=1.525)+1)*e+o)+2)},easeInBounce:e=>1-Fn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Fn.easeInBounce(e*2)*.5:Fn.easeOutBounce(e*2-1)*.5+.5};function ks(e){if(e&&typeof e=="object"){const o=e.toString();return o==="[object CanvasPattern]"||o==="[object CanvasGradient]"}return!1}function Kc(e){return ks(e)?e:new Mn(e)}function ws(e){return ks(e)?e:new Mn(e).saturate(.5).darken(.1).hexString()}const py=["x","y","borderWidth","radius","tension"],gy=["color","borderColor","backgroundColor"];function by(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:o=>o!=="onProgress"&&o!=="onComplete"&&o!=="fn"}),e.set("animations",{colors:{type:"color",properties:gy},numbers:{type:"number",properties:py}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:o=>o|0}}}})}function yy(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Xc=new Map;function xy(e,o){o=o||{};const n=e+JSON.stringify(o);let r=Xc.get(n);return r||(r=new Intl.NumberFormat(e,o),Xc.set(n,r)),r}function Cs(e,o,n){return xy(o,n).format(e)}const ky={values(e){return Ze(e)?e:""+e},numeric(e,o,n){if(e===0)return"0";const r=this.chart.options.locale;let a,s=e;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(a="scientific"),s=wy(e,n)}const i=Rc(Math.abs(s)),l=isNaN(i)?1:Math.max(Math.min(-1*Math.floor(i),20),0),c={notation:a,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),Cs(e,r,c)}};function wy(e,o){let n=o.length>3?o[2].value-o[1].value:o[1].value-o[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Yc={formatters:ky};function Cy(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(o,n)=>n.lineWidth,tickColor:(o,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:o=>!o.startsWith("before")&&!o.startsWith("after")&&o!=="callback"&&o!=="parser",_indexable:o=>o!=="borderDash"&&o!=="tickBorderDash"&&o!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:o=>o!=="backdropPadding"&&o!=="callback",_indexable:o=>o!=="backdropPadding"})}const Lo=Object.create(null),_s=Object.create(null);function zn(e,o){if(!o)return e;const n=o.split(".");for(let r=0,a=n.length;r<a;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function Es(e,o,n){return typeof o=="string"?Tn(zn(e,o),n):Tn(zn(e,""),o)}class _y{constructor(o,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,a)=>ws(a.backgroundColor),this.hoverBorderColor=(r,a)=>ws(a.borderColor),this.hoverColor=(r,a)=>ws(a.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(o),this.apply(n)}set(o,n){return Es(this,o,n)}get(o){return zn(this,o)}describe(o,n){return Es(_s,o,n)}override(o,n){return Es(Lo,o,n)}route(o,n,r,a){const s=zn(this,o),i=zn(this,r),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],d=i[a];return Pe(c)?Object.assign({},d,c):Ae(c,d)},set(c){this[l]=c}}})}apply(o){o.forEach(n=>n(this))}}var Qe=new _y({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[by,yy,Cy]);function Ey(e){return!e||$e(e.size)||$e(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Jc(e,o,n,r,a){let s=o[a];return s||(s=o[a]=e.measureText(a).width,n.push(a)),s>r&&(r=s),r}function Ro(e,o,n){const r=e.currentDevicePixelRatio,a=n!==0?Math.max(n/2,.5):0;return Math.round((o-a)*r)/r+a}function Qc(e,o){!o&&!e||(o=o||e.getContext("2d"),o.save(),o.resetTransform(),o.clearRect(0,0,e.width,e.height),o.restore())}function Bs(e,o,n,r){Zc(e,o,n,r,null)}function Zc(e,o,n,r,a){let s,i,l,c,d,f,u,h;const m=o.pointStyle,p=o.rotation,y=o.radius;let b=(p||0)*ey;if(m&&typeof m=="object"&&(s=m.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(b),e.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),e.restore();return}if(!(isNaN(y)||y<=0)){switch(e.beginPath(),m){default:a?e.ellipse(n,r,a/2,y,0,0,Ke):e.arc(n,r,y,0,Ke),e.closePath();break;case"triangle":f=a?a/2:y,e.moveTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Lc,e.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Lc,e.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),e.closePath();break;case"rectRounded":d=y*.516,c=y-d,i=Math.cos(b+Po)*c,u=Math.cos(b+Po)*(a?a/2-d:c),l=Math.sin(b+Po)*c,h=Math.sin(b+Po)*(a?a/2-d:c),e.arc(n-u,r-l,d,b-Ue,b-tt),e.arc(n+h,r-i,d,b-tt,b),e.arc(n+u,r+l,d,b,b+tt),e.arc(n-h,r+i,d,b+tt,b+Ue),e.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*y,f=a?a/2:c,e.rect(n-f,r-c,2*f,2*c);break}b+=Po;case"rectRot":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+h,r-i),e.lineTo(n+u,r+l),e.lineTo(n-h,r+i),e.closePath();break;case"crossRot":b+=Po;case"cross":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i);break;case"star":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i),b+=Po,u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i);break;case"line":i=a?a/2:Math.cos(b)*y,l=Math.sin(b)*y,e.moveTo(n-i,r-l),e.lineTo(n+i,r+l);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(b)*(a?a/2:y),r+Math.sin(b)*y);break;case!1:e.closePath();break}e.fill(),o.borderWidth>0&&e.stroke()}}function $n(e,o,n){return n=n||.5,!o||e&&e.x>o.left-n&&e.x<o.right+n&&e.y>o.top-n&&e.y<o.bottom+n}function Pr(e,o){e.save(),e.beginPath(),e.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),e.clip()}function Or(e){e.restore()}function By(e,o,n,r,a){if(!o)return e.lineTo(n.x,n.y);if(a==="middle"){const s=(o.x+n.x)/2;e.lineTo(s,o.y),e.lineTo(s,n.y)}else a==="after"!=!!r?e.lineTo(o.x,n.y):e.lineTo(n.x,o.y);e.lineTo(n.x,n.y)}function Sy(e,o,n,r){if(!o)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?o.cp1x:o.cp2x,r?o.cp1y:o.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Ay(e,o){o.translation&&e.translate(o.translation[0],o.translation[1]),$e(o.rotation)||e.rotate(o.rotation),o.color&&(e.fillStyle=o.color),o.textAlign&&(e.textAlign=o.textAlign),o.textBaseline&&(e.textBaseline=o.textBaseline)}function vy(e,o,n,r,a){if(a.strikethrough||a.underline){const s=e.measureText(r),i=o-s.actualBoundingBoxLeft,l=o+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,d=n+s.actualBoundingBoxDescent,f=a.strikethrough?(c+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=a.decorationWidth||2,e.moveTo(i,f),e.lineTo(l,f),e.stroke()}}function Dy(e,o){const n=e.fillStyle;e.fillStyle=o.color,e.fillRect(o.left,o.top,o.width,o.height),e.fillStyle=n}function jn(e,o,n,r,a,s={}){const i=Ze(o)?o:[o],l=s.strokeWidth>0&&s.strokeColor!=="";let c,d;for(e.save(),e.font=a.string,Ay(e,s),c=0;c<i.length;++c)d=i[c],s.backdrop&&Dy(e,s.backdrop),l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),$e(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(d,n,r,s.maxWidth)),e.fillText(d,n,r,s.maxWidth),vy(e,n,r,d,s),r+=Number(a.lineHeight);e.restore()}function Lr(e,o){const{x:n,y:r,w:a,h:s,radius:i}=o;e.arc(n+i.topLeft,r+i.topLeft,i.topLeft,1.5*Ue,Ue,!0),e.lineTo(n,r+s-i.bottomLeft),e.arc(n+i.bottomLeft,r+s-i.bottomLeft,i.bottomLeft,Ue,tt,!0),e.lineTo(n+a-i.bottomRight,r+s),e.arc(n+a-i.bottomRight,r+s-i.bottomRight,i.bottomRight,tt,0,!0),e.lineTo(n+a,r+i.topRight),e.arc(n+a-i.topRight,r+i.topRight,i.topRight,0,-tt,!0),e.lineTo(n+i.topLeft,r)}const Ny=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Vy=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function My(e,o){const n=(""+e).match(Ny);if(!n||n[1]==="normal")return o*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return o*e}const Ty=e=>+e||0;function Ss(e,o){const n={},r=Pe(o),a=r?Object.keys(o):o,s=Pe(e)?r?i=>Ae(e[i],e[o[i]]):i=>e[i]:()=>e;for(const i of a)n[i]=Ty(s(i));return n}function ed(e){return Ss(e,{top:"y",right:"x",bottom:"y",left:"x"})}function rn(e){return Ss(e,["topLeft","topRight","bottomLeft","bottomRight"])}function At(e){const o=ed(e);return o.width=o.left+o.right,o.height=o.top+o.bottom,o}function lt(e,o){e=e||{},o=o||Qe.font;let n=Ae(e.size,o.size);typeof n=="string"&&(n=parseInt(n,10));let r=Ae(e.style,o.style);r&&!(""+r).match(Vy)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const a={family:Ae(e.family,o.family),lineHeight:My(Ae(e.lineHeight,o.lineHeight),n),size:n,style:r,weight:Ae(e.weight,o.weight),string:""};return a.string=Ey(a),a}function Rr(e,o,n,r){let a,s,i;for(a=0,s=e.length;a<s;++a)if(i=e[a],i!==void 0&&i!==void 0)return i}function Py(e,o,n){const{min:r,max:a}=e,s=Mc(o,(a-r)/2),i=(l,c)=>n&&l===0?0:l+c;return{min:i(r,-Math.abs(s)),max:i(a,s)}}function Io(e,o){return Object.assign(Object.create(e),o)}function As(e,o=[""],n,r,a=()=>e[0]){const s=n||e;typeof r>"u"&&(r=ad("_fallback",e));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:a,override:l=>As([l,...e],o,s,r)};return new Proxy(i,{deleteProperty(l,c){return delete l[c],delete l._keys,delete e[0][c],!0},get(l,c){return od(l,c,()=>jy(c,o,e,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(l,c){return sd(l).includes(c)},ownKeys(l){return sd(l)},set(l,c,d){const f=l._storage||(l._storage=a());return l[c]=f[c]=d,delete l._keys,!0}})}function an(e,o,n,r){const a={_cacheable:!1,_proxy:e,_context:o,_subProxy:n,_stack:new Set,_descriptors:td(e,r),setContext:s=>an(e,s,n,r),override:s=>an(e.override(s),o,n,r)};return new Proxy(a,{deleteProperty(s,i){return delete s[i],delete e[i],!0},get(s,i,l){return od(s,i,()=>Ly(s,i,l))},getOwnPropertyDescriptor(s,i){return s._descriptors.allKeys?Reflect.has(e,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,i)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,i){return Reflect.has(e,i)},ownKeys(){return Reflect.ownKeys(e)},set(s,i,l){return e[i]=l,delete s[i],!0}})}function td(e,o={scriptable:!0,indexable:!0}){const{_scriptable:n=o.scriptable,_indexable:r=o.indexable,_allKeys:a=o.allKeys}=e;return{allKeys:a,scriptable:n,indexable:r,isScriptable:xo(n)?n:()=>n,isIndexable:xo(r)?r:()=>r}}const Oy=(e,o)=>e?e+gs(o):o,vs=(e,o)=>Pe(o)&&e!=="adapters"&&(Object.getPrototypeOf(o)===null||o.constructor===Object);function od(e,o,n){if(Object.prototype.hasOwnProperty.call(e,o)||o==="constructor")return e[o];const r=n();return e[o]=r,r}function Ly(e,o,n){const{_proxy:r,_context:a,_subProxy:s,_descriptors:i}=e;let l=r[o];return xo(l)&&i.isScriptable(o)&&(l=Ry(o,l,e,n)),Ze(l)&&l.length&&(l=Iy(o,l,e,i.isIndexable)),vs(o,l)&&(l=an(l,a,s&&s[o],i)),l}function Ry(e,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_stack:l}=n;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let c=o(s,i||r);return l.delete(e),vs(e,c)&&(c=Ds(a._scopes,a,e,c)),c}function Iy(e,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_descriptors:l}=n;if(typeof s.index<"u"&&r(e))return o[s.index%o.length];if(Pe(o[0])){const c=o,d=a._scopes.filter(f=>f!==c);o=[];for(const f of c){const u=Ds(d,a,e,f);o.push(an(u,s,i&&i[e],l))}}return o}function nd(e,o,n){return xo(e)?e(o,n):e}const Fy=(e,o)=>e===!0?o:typeof e=="string"?To(o,e):void 0;function zy(e,o,n,r,a){for(const s of o){const i=Fy(n,s);if(i){e.add(i);const l=nd(i._fallback,n,a);if(typeof l<"u"&&l!==n&&l!==r)return l}else if(i===!1&&typeof r<"u"&&n!==r)return null}return!1}function Ds(e,o,n,r){const a=o._rootScopes,s=nd(o._fallback,n,r),i=[...e,...a],l=new Set;l.add(r);let c=rd(l,i,n,s||n,r);return c===null||typeof s<"u"&&s!==n&&(c=rd(l,i,s,c,r),c===null)?!1:As(Array.from(l),[""],a,s,()=>$y(o,n,r))}function rd(e,o,n,r,a){for(;n;)n=zy(e,o,n,r,a);return n}function $y(e,o,n){const r=e._getTarget();o in r||(r[o]={});const a=r[o];return Ze(a)&&Pe(n)?n:a||{}}function jy(e,o,n,r){let a;for(const s of o)if(a=ad(Oy(s,e),n),typeof a<"u")return vs(e,a)?Ds(n,r,e,a):a}function ad(e,o){for(const n of o){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function sd(e){let o=e._keys;return o||(o=e._keys=Uy(e._scopes)),o}function Uy(e){const o=new Set;for(const n of e)for(const r of Object.keys(n).filter(a=>!a.startsWith("_")))o.add(r);return Array.from(o)}const Wy=Number.EPSILON||1e-14,sn=(e,o)=>o<e.length&&!e[o].skip&&e[o],id=e=>e==="x"?"y":"x";function Hy(e,o,n,r){const a=e.skip?o:e,s=o,i=n.skip?o:n,l=bs(s,a),c=bs(i,s);let d=l/(l+c),f=c/(l+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;const u=r*d,h=r*f;return{previous:{x:s.x-u*(i.x-a.x),y:s.y-u*(i.y-a.y)},next:{x:s.x+h*(i.x-a.x),y:s.y+h*(i.y-a.y)}}}function qy(e,o,n){const r=e.length;let a,s,i,l,c,d=sn(e,0);for(let f=0;f<r-1;++f)if(c=d,d=sn(e,f+1),!(!c||!d)){if(Ln(o[f],0,Wy)){n[f]=n[f+1]=0;continue}a=n[f]/o[f],s=n[f+1]/o[f],l=Math.pow(a,2)+Math.pow(s,2),!(l<=9)&&(i=3/Math.sqrt(l),n[f]=a*i*o[f],n[f+1]=s*i*o[f])}}function Gy(e,o,n="x"){const r=id(n),a=e.length;let s,i,l,c=sn(e,0);for(let d=0;d<a;++d){if(i=l,l=c,c=sn(e,d+1),!l)continue;const f=l[n],u=l[r];i&&(s=(f-i[n])/3,l[`cp1${n}`]=f-s,l[`cp1${r}`]=u-s*o[d]),c&&(s=(c[n]-f)/3,l[`cp2${n}`]=f+s,l[`cp2${r}`]=u+s*o[d])}}function Ky(e,o="x"){const n=id(o),r=e.length,a=Array(r).fill(0),s=Array(r);let i,l,c,d=sn(e,0);for(i=0;i<r;++i)if(l=c,c=d,d=sn(e,i+1),!!c){if(d){const f=d[o]-c[o];a[i]=f!==0?(d[n]-c[n])/f:0}s[i]=l?d?$t(a[i-1])!==$t(a[i])?0:(a[i-1]+a[i])/2:a[i-1]:a[i]}qy(e,a,s),Gy(e,s,o)}function Ir(e,o,n){return Math.max(Math.min(e,n),o)}function Xy(e,o){let n,r,a,s,i,l=$n(e[0],o);for(n=0,r=e.length;n<r;++n)i=s,s=l,l=n<r-1&&$n(e[n+1],o),s&&(a=e[n],i&&(a.cp1x=Ir(a.cp1x,o.left,o.right),a.cp1y=Ir(a.cp1y,o.top,o.bottom)),l&&(a.cp2x=Ir(a.cp2x,o.left,o.right),a.cp2y=Ir(a.cp2y,o.top,o.bottom)))}function Yy(e,o,n,r,a){let s,i,l,c;if(o.spanGaps&&(e=e.filter(d=>!d.skip)),o.cubicInterpolationMode==="monotone")Ky(e,a);else{let d=r?e[e.length-1]:e[0];for(s=0,i=e.length;s<i;++s)l=e[s],c=Hy(d,l,e[Math.min(s+1,i-(r?0:1))%i],o.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}o.capBezierPoints&&Xy(e,n)}function Ns(){return typeof window<"u"&&typeof document<"u"}function Vs(e){let o=e.parentNode;return o&&o.toString()==="[object ShadowRoot]"&&(o=o.host),o}function Fr(e,o,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*o.parentNode[n])):r=e,r}const zr=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Jy(e,o){return zr(e).getPropertyValue(o)}const Qy=["top","right","bottom","left"];function Fo(e,o,n){const r={};n=n?"-"+n:"";for(let a=0;a<4;a++){const s=Qy[a];r[s]=parseFloat(e[o+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Zy=(e,o,n)=>(e>0||o>0)&&(!n||!n.shadowRoot);function ex(e,o){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:a,offsetY:s}=r;let i=!1,l,c;if(Zy(a,s,e.target))l=a,c=s;else{const d=o.getBoundingClientRect();l=r.clientX-d.left,c=r.clientY-d.top,i=!0}return{x:l,y:c,box:i}}function zo(e,o){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=o,a=zr(n),s=a.boxSizing==="border-box",i=Fo(a,"padding"),l=Fo(a,"border","width"),{x:c,y:d,box:f}=ex(e,n),u=i.left+(f&&l.left),h=i.top+(f&&l.top);let{width:m,height:p}=o;return s&&(m-=i.width+l.width,p-=i.height+l.height),{x:Math.round((c-u)/m*n.width/r),y:Math.round((d-h)/p*n.height/r)}}function tx(e,o,n){let r,a;if(o===void 0||n===void 0){const s=e&&Vs(e);if(!s)o=e.clientWidth,n=e.clientHeight;else{const i=s.getBoundingClientRect(),l=zr(s),c=Fo(l,"border","width"),d=Fo(l,"padding");o=i.width-d.width-c.width,n=i.height-d.height-c.height,r=Fr(l.maxWidth,s,"clientWidth"),a=Fr(l.maxHeight,s,"clientHeight")}}return{width:o,height:n,maxWidth:r||Mr,maxHeight:a||Mr}}const ko=e=>Math.round(e*10)/10;function ox(e,o,n,r){const a=zr(e),s=Fo(a,"margin"),i=Fr(a.maxWidth,e,"clientWidth")||Mr,l=Fr(a.maxHeight,e,"clientHeight")||Mr,c=tx(e,o,n);let{width:d,height:f}=c;if(a.boxSizing==="content-box"){const h=Fo(a,"border","width"),m=Fo(a,"padding");d-=m.width+h.width,f-=m.height+h.height}return d=Math.max(0,d-s.width),f=Math.max(0,r?d/r:f-s.height),d=ko(Math.min(d,i,c.maxWidth)),f=ko(Math.min(f,l,c.maxHeight)),d&&!f&&(f=ko(d/2)),(o!==void 0||n!==void 0)&&r&&c.height&&f>c.height&&(f=c.height,d=ko(Math.floor(f*r))),{width:d,height:f}}function ld(e,o,n){const r=o||1,a=ko(e.height*r),s=ko(e.width*r);e.height=ko(e.height),e.width=ko(e.width);const i=e.canvas;return i.style&&(n||!i.style.height&&!i.style.width)&&(i.style.height=`${e.height}px`,i.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||i.height!==a||i.width!==s?(e.currentDevicePixelRatio=r,i.height=a,i.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const nx=(function(){let e=!1;try{const o={get passive(){return e=!0,!1}};Ns()&&(window.addEventListener("test",null,o),window.removeEventListener("test",null,o))}catch{}return e})();function cd(e,o){const n=Jy(e,o),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function $o(e,o,n,r){return{x:e.x+n*(o.x-e.x),y:e.y+n*(o.y-e.y)}}function rx(e,o,n,r){return{x:e.x+n*(o.x-e.x),y:r==="middle"?n<.5?e.y:o.y:r==="after"?n<1?e.y:o.y:n>0?o.y:e.y}}function ax(e,o,n,r){const a={x:e.cp2x,y:e.cp2y},s={x:o.cp1x,y:o.cp1y},i=$o(e,a,n),l=$o(a,s,n),c=$o(s,o,n),d=$o(i,l,n),f=$o(l,c,n);return $o(d,f,n)}const sx=function(e,o){return{x(n){return e+e+o-n},setWidth(n){o=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},ix=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,o){return e+o},leftForLtr(e,o){return e}}};function ln(e,o,n){return e?sx(o,n):ix()}function dd(e,o){let n,r;(o==="ltr"||o==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",o,"important"),e.prevTextDirection=r)}function fd(e,o){o!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",o[0],o[1]))}function ud(e){return e==="angle"?{between:In,compare:sy,normalize:yt}:{between:oo,compare:(o,n)=>o-n,normalize:o=>o}}function hd({start:e,end:o,count:n,loop:r,style:a}){return{start:e%n,end:o%n,loop:r&&(o-e+1)%n===0,style:a}}function lx(e,o,n){const{property:r,start:a,end:s}=n,{between:i,normalize:l}=ud(r),c=o.length;let{start:d,end:f,loop:u}=e,h,m;if(u){for(d+=c,f+=c,h=0,m=c;h<m&&i(l(o[d%c][r]),a,s);++h)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:u,style:e.style}}function md(e,o,n){if(!n)return[e];const{property:r,start:a,end:s}=n,i=o.length,{compare:l,between:c,normalize:d}=ud(r),{start:f,end:u,loop:h,style:m}=lx(e,o,n),p=[];let y=!1,b=null,g,_,E;const B=()=>c(a,E,g)&&l(a,E)!==0,A=()=>l(s,g)===0||c(s,E,g),C=()=>y||B(),x=()=>!y||A();for(let w=f,D=f;w<=u;++w)_=o[w%i],!_.skip&&(g=d(_[r]),g!==E&&(y=c(g,a,s),b===null&&C()&&(b=l(g,a)===0?w:D),b!==null&&x()&&(p.push(hd({start:b,end:w,loop:h,count:i,style:m})),b=null),D=w,E=g));return b!==null&&p.push(hd({start:b,end:u,loop:h,count:i,style:m})),p}function pd(e,o){const n=[],r=e.segments;for(let a=0;a<r.length;a++){const s=md(r[a],e.points,o);s.length&&n.push(...s)}return n}function cx(e,o,n,r){let a=0,s=o-1;if(n&&!r)for(;a<o&&!e[a].skip;)a++;for(;a<o&&e[a].skip;)a++;for(a%=o,n&&(s+=a);s>a&&e[s%o].skip;)s--;return s%=o,{start:a,end:s}}function dx(e,o,n,r){const a=e.length,s=[];let i=o,l=e[o],c;for(c=o+1;c<=n;++c){const d=e[c%a];d.skip||d.stop?l.skip||(r=!1,s.push({start:o%a,end:(c-1)%a,loop:r}),o=i=d.stop?c:null):(i=c,l.skip&&(o=c)),l=d}return i!==null&&s.push({start:o%a,end:i%a,loop:r}),s}function fx(e,o){const n=e.points,r=e.options.spanGaps,a=n.length;if(!a)return[];const s=!!e._loop,{start:i,end:l}=cx(n,a,s,r);if(r===!0)return gd(e,[{start:i,end:l,loop:s}],n,o);const c=l<i?l+a:l,d=!!e._fullLoop&&i===0&&l===a-1;return gd(e,dx(n,i,c,d),n,o)}function gd(e,o,n,r){return!r||!r.setContext||!n?o:ux(e,o,n,r)}function ux(e,o,n,r){const a=e._chart.getContext(),s=bd(e.options),{_datasetIndex:i,options:{spanGaps:l}}=e,c=n.length,d=[];let f=s,u=o[0].start,h=u;function m(p,y,b,g){const _=l?-1:1;if(p!==y){for(p+=c;n[p%c].skip;)p-=_;for(;n[y%c].skip;)y+=_;p%c!==y%c&&(d.push({start:p%c,end:y%c,loop:b,style:g}),f=g,u=y%c)}}for(const p of o){u=l?u:p.start;let y=n[u%c],b;for(h=u+1;h<=p.end;h++){const g=n[h%c];b=bd(r.setContext(Io(a,{type:"segment",p0:y,p1:g,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:i}))),hx(b,f)&&m(u,h-1,p.loop,f),y=g,f=b}u<h-1&&m(u,h-1,p.loop,f)}return d}function bd(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function hx(e,o){if(!o)return!1;const n=[],r=function(a,s){return ks(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(o,r)}function $r(e,o,n){return e.options.clip?e[n]:o[n]}function mx(e,o){const{xScale:n,yScale:r}=e;return n&&r?{left:$r(n,o,"left"),right:$r(n,o,"right"),top:$r(r,o,"top"),bottom:$r(r,o,"bottom")}:o}function yd(e,o){const n=o._clip;if(n.disabled)return!1;const r=mx(o,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
34
|
+
*/function eo(){}const q0=(()=>{let e=0;return()=>e++})();function $e(e){return e==null}function Ze(e){if(Array.isArray&&Array.isArray(e))return!0;const o=Object.prototype.toString.call(e);return o.slice(0,7)==="[object"&&o.slice(-6)==="Array]"}function Pe(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function at(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function zt(e,o){return at(e)?e:o}function ve(e,o){return typeof e>"u"?o:e}const G0=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/o,Mc=(e,o)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*o:+e;function qe(e,o,n){if(e&&typeof e.call=="function")return e.apply(n,o)}function je(e,o,n,r){let a,s,i;if(Ze(e))for(s=e.length,a=0;a<s;a++)o.call(n,e[a],a);else if(Pe(e))for(i=Object.keys(e),s=i.length,a=0;a<s;a++)o.call(n,e[i[a]],i[a])}function Nr(e,o){let n,r,a,s;if(!e||!o||e.length!==o.length)return!1;for(n=0,r=e.length;n<r;++n)if(a=e[n],s=o[n],a.datasetIndex!==s.datasetIndex||a.index!==s.index)return!1;return!0}function Vr(e){if(Ze(e))return e.map(Vr);if(Pe(e)){const o=Object.create(null),n=Object.keys(e),r=n.length;let a=0;for(;a<r;++a)o[n[a]]=Vr(e[n[a]]);return o}return e}function Tc(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function K0(e,o,n,r){if(!Tc(e))return;const a=o[e],s=n[e];Pe(a)&&Pe(s)?Tn(a,s,r):o[e]=Vr(s)}function Tn(e,o,n){const r=Ze(o)?o:[o],a=r.length;if(!Pe(e))return e;n=n||{};const s=n.merger||K0;let i;for(let l=0;l<a;++l){if(i=r[l],!Pe(i))continue;const c=Object.keys(i);for(let d=0,f=c.length;d<f;++d)s(c[d],e,i,n)}return e}function Pn(e,o){return Tn(e,o,{merger:X0})}function X0(e,o,n){if(!Tc(e))return;const r=o[e],a=n[e];Pe(r)&&Pe(a)?Pn(r,a):Object.prototype.hasOwnProperty.call(o,e)||(o[e]=Vr(a))}const Pc={"":e=>e,x:e=>e.x,y:e=>e.y};function Y0(e){const o=e.split("."),n=[];let r="";for(const a of o)r+=a,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function J0(e){const o=Y0(e);return n=>{for(const r of o){if(r==="")break;n=n&&n[r]}return n}}function To(e,o){return(Pc[o]||(Pc[o]=J0(o)))(e)}function gs(e){return e.charAt(0).toUpperCase()+e.slice(1)}const On=e=>typeof e<"u",xo=e=>typeof e=="function",Oc=(e,o)=>{if(e.size!==o.size)return!1;for(const n of e)if(!o.has(n))return!1;return!0};function Q0(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Ue=Math.PI,Ke=2*Ue,Z0=Ke+Ue,Mr=Number.POSITIVE_INFINITY,ey=Ue/180,tt=Ue/2,Po=Ue/4,Rc=Ue*2/3,Lc=Math.log10,$t=Math.sign;function Rn(e,o,n){return Math.abs(e-o)<n}function Ic(e){const o=Math.round(e);e=Rn(e,o,e/1e3)?o:e;const n=Math.pow(10,Math.floor(Lc(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function ty(e){const o=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(o.push(r),o.push(e/r));return n===(n|0)&&o.push(n),o.sort((a,s)=>a-s).pop(),o}function oy(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Ln(e){return!oy(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function ny(e,o){const n=Math.round(e);return n-o<=e&&n+o>=e}function ry(e,o,n){let r,a,s;for(r=0,a=e.length;r<a;r++)s=e[r][n],isNaN(s)||(o.min=Math.min(o.min,s),o.max=Math.max(o.max,s))}function to(e){return e*(Ue/180)}function ay(e){return e*(180/Ue)}function Fc(e){if(!at(e))return;let o=1,n=0;for(;Math.round(e*o)/o!==e;)o*=10,n++;return n}function zc(e,o){const n=o.x-e.x,r=o.y-e.y,a=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*Ue&&(s+=Ke),{angle:s,distance:a}}function bs(e,o){return Math.sqrt(Math.pow(o.x-e.x,2)+Math.pow(o.y-e.y,2))}function sy(e,o){return(e-o+Z0)%Ke-Ue}function yt(e){return(e%Ke+Ke)%Ke}function In(e,o,n,r){const a=yt(e),s=yt(o),i=yt(n),l=yt(s-a),c=yt(i-a),d=yt(a-s),f=yt(a-i);return a===s||a===i||r&&s===i||l>c&&d<f}function st(e,o,n){return Math.max(o,Math.min(n,e))}function iy(e){return st(e,-32768,32767)}function oo(e,o,n,r=1e-6){return e>=Math.min(o,n)-r&&e<=Math.max(o,n)+r}function ys(e,o,n){n=n||(i=>e[i]<o);let r=e.length-1,a=0,s;for(;r-a>1;)s=a+r>>1,n(s)?a=s:r=s;return{lo:a,hi:r}}const Oo=(e,o,n,r)=>ys(e,n,r?a=>{const s=e[a][o];return s<n||s===n&&e[a+1][o]===n}:a=>e[a][o]<n),ly=(e,o,n)=>ys(e,n,r=>e[r][o]>=n);function cy(e,o,n){let r=0,a=e.length;for(;r<a&&e[r]<o;)r++;for(;a>r&&e[a-1]>n;)a--;return r>0||a<e.length?e.slice(r,a):e}const $c=["push","pop","shift","splice","unshift"];function dy(e,o){if(e._chartjs){e._chartjs.listeners.push(o);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[o]}}),$c.forEach(n=>{const r="_onData"+gs(n),a=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...s){const i=a.apply(this,s);return e._chartjs.listeners.forEach(l=>{typeof l[r]=="function"&&l[r](...s)}),i}})})}function jc(e,o){const n=e._chartjs;if(!n)return;const r=n.listeners,a=r.indexOf(o);a!==-1&&r.splice(a,1),!(r.length>0)&&($c.forEach(s=>{delete e[s]}),delete e._chartjs)}function Uc(e){const o=new Set(e);return o.size===e.length?e:Array.from(o)}const Wc=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function Hc(e,o){let n=[],r=!1;return function(...a){n=a,r||(r=!0,Wc.call(window,()=>{r=!1,e.apply(o,n)}))}}function fy(e,o){let n;return function(...r){return o?(clearTimeout(n),n=setTimeout(e,o,r)):e.apply(this,r),o}}const xs=e=>e==="start"?"left":e==="end"?"right":"center",it=(e,o,n)=>e==="start"?o:e==="end"?n:(o+n)/2,uy=(e,o,n,r)=>e===(r?"left":"right")?n:e==="center"?(o+n)/2:o;function hy(e,o,n){const r=o.length;let a=0,s=r;if(e._sorted){const{iScale:i,vScale:l,_parsed:c}=e,d=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,f=i.axis,{min:u,max:h,minDefined:m,maxDefined:p}=i.getUserBounds();if(m){if(a=Math.min(Oo(c,f,u).lo,n?r:Oo(o,f,i.getPixelForValue(u)).lo),d){const y=c.slice(0,a+1).reverse().findIndex(b=>!$e(b[l.axis]));a-=Math.max(0,y)}a=st(a,0,r-1)}if(p){let y=Math.max(Oo(c,i.axis,h,!0).hi+1,n?0:Oo(o,f,i.getPixelForValue(h),!0).hi+1);if(d){const b=c.slice(y-1).findIndex(g=>!$e(g[l.axis]));y+=Math.max(0,b)}s=st(y,a,r)-a}else s=r-a}return{start:a,count:s}}function my(e){const{xScale:o,yScale:n,_scaleRanges:r}=e,a={xmin:o.min,xmax:o.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=a,!0;const s=r.xmin!==o.min||r.xmax!==o.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,a),s}const Tr=e=>e===0||e===1,qc=(e,o,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-o)*Ke/n)),Gc=(e,o,n)=>Math.pow(2,-10*e)*Math.sin((e-o)*Ke/n)+1,Fn={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*tt)+1,easeOutSine:e=>Math.sin(e*tt),easeInOutSine:e=>-.5*(Math.cos(Ue*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>Tr(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>Tr(e)?e:qc(e,.075,.3),easeOutElastic:e=>Tr(e)?e:Gc(e,.075,.3),easeInOutElastic(e){return Tr(e)?e:e<.5?.5*qc(e*2,.1125,.45):.5+.5*Gc(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let o=1.70158;return(e/=.5)<1?.5*(e*e*(((o*=1.525)+1)*e-o)):.5*((e-=2)*e*(((o*=1.525)+1)*e+o)+2)},easeInBounce:e=>1-Fn.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?Fn.easeInBounce(e*2)*.5:Fn.easeOutBounce(e*2-1)*.5+.5};function ks(e){if(e&&typeof e=="object"){const o=e.toString();return o==="[object CanvasPattern]"||o==="[object CanvasGradient]"}return!1}function Kc(e){return ks(e)?e:new Mn(e)}function ws(e){return ks(e)?e:new Mn(e).saturate(.5).darken(.1).hexString()}const py=["x","y","borderWidth","radius","tension"],gy=["color","borderColor","backgroundColor"];function by(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:o=>o!=="onProgress"&&o!=="onComplete"&&o!=="fn"}),e.set("animations",{colors:{type:"color",properties:gy},numbers:{type:"number",properties:py}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:o=>o|0}}}})}function yy(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Xc=new Map;function xy(e,o){o=o||{};const n=e+JSON.stringify(o);let r=Xc.get(n);return r||(r=new Intl.NumberFormat(e,o),Xc.set(n,r)),r}function Cs(e,o,n){return xy(o,n).format(e)}const ky={values(e){return Ze(e)?e:""+e},numeric(e,o,n){if(e===0)return"0";const r=this.chart.options.locale;let a,s=e;if(n.length>1){const d=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(d<1e-4||d>1e15)&&(a="scientific"),s=wy(e,n)}const i=Lc(Math.abs(s)),l=isNaN(i)?1:Math.max(Math.min(-1*Math.floor(i),20),0),c={notation:a,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),Cs(e,r,c)}};function wy(e,o){let n=o.length>3?o[2].value-o[1].value:o[1].value-o[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var Yc={formatters:ky};function Cy(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(o,n)=>n.lineWidth,tickColor:(o,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Yc.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:o=>!o.startsWith("before")&&!o.startsWith("after")&&o!=="callback"&&o!=="parser",_indexable:o=>o!=="borderDash"&&o!=="tickBorderDash"&&o!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:o=>o!=="backdropPadding"&&o!=="callback",_indexable:o=>o!=="backdropPadding"})}const Ro=Object.create(null),Es=Object.create(null);function zn(e,o){if(!o)return e;const n=o.split(".");for(let r=0,a=n.length;r<a;++r){const s=n[r];e=e[s]||(e[s]=Object.create(null))}return e}function _s(e,o,n){return typeof o=="string"?Tn(zn(e,o),n):Tn(zn(e,""),o)}class Ey{constructor(o,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,a)=>ws(a.backgroundColor),this.hoverBorderColor=(r,a)=>ws(a.borderColor),this.hoverColor=(r,a)=>ws(a.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(o),this.apply(n)}set(o,n){return _s(this,o,n)}get(o){return zn(this,o)}describe(o,n){return _s(Es,o,n)}override(o,n){return _s(Ro,o,n)}route(o,n,r,a){const s=zn(this,o),i=zn(this,r),l="_"+n;Object.defineProperties(s,{[l]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const c=this[l],d=i[a];return Pe(c)?Object.assign({},d,c):ve(c,d)},set(c){this[l]=c}}})}apply(o){o.forEach(n=>n(this))}}var Qe=new Ey({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[by,yy,Cy]);function _y(e){return!e||$e(e.size)||$e(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function Jc(e,o,n,r,a){let s=o[a];return s||(s=o[a]=e.measureText(a).width,n.push(a)),s>r&&(r=s),r}function Lo(e,o,n){const r=e.currentDevicePixelRatio,a=n!==0?Math.max(n/2,.5):0;return Math.round((o-a)*r)/r+a}function Qc(e,o){!o&&!e||(o=o||e.getContext("2d"),o.save(),o.resetTransform(),o.clearRect(0,0,e.width,e.height),o.restore())}function Bs(e,o,n,r){Zc(e,o,n,r,null)}function Zc(e,o,n,r,a){let s,i,l,c,d,f,u,h;const m=o.pointStyle,p=o.rotation,y=o.radius;let b=(p||0)*ey;if(m&&typeof m=="object"&&(s=m.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(b),e.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),e.restore();return}if(!(isNaN(y)||y<=0)){switch(e.beginPath(),m){default:a?e.ellipse(n,r,a/2,y,0,0,Ke):e.arc(n,r,y,0,Ke),e.closePath();break;case"triangle":f=a?a/2:y,e.moveTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Rc,e.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),b+=Rc,e.lineTo(n+Math.sin(b)*f,r-Math.cos(b)*y),e.closePath();break;case"rectRounded":d=y*.516,c=y-d,i=Math.cos(b+Po)*c,u=Math.cos(b+Po)*(a?a/2-d:c),l=Math.sin(b+Po)*c,h=Math.sin(b+Po)*(a?a/2-d:c),e.arc(n-u,r-l,d,b-Ue,b-tt),e.arc(n+h,r-i,d,b-tt,b),e.arc(n+u,r+l,d,b,b+tt),e.arc(n-h,r+i,d,b+tt,b+Ue),e.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*y,f=a?a/2:c,e.rect(n-f,r-c,2*f,2*c);break}b+=Po;case"rectRot":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+h,r-i),e.lineTo(n+u,r+l),e.lineTo(n-h,r+i),e.closePath();break;case"crossRot":b+=Po;case"cross":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i);break;case"star":u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i),b+=Po,u=Math.cos(b)*(a?a/2:y),i=Math.cos(b)*y,l=Math.sin(b)*y,h=Math.sin(b)*(a?a/2:y),e.moveTo(n-u,r-l),e.lineTo(n+u,r+l),e.moveTo(n+h,r-i),e.lineTo(n-h,r+i);break;case"line":i=a?a/2:Math.cos(b)*y,l=Math.sin(b)*y,e.moveTo(n-i,r-l),e.lineTo(n+i,r+l);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(b)*(a?a/2:y),r+Math.sin(b)*y);break;case!1:e.closePath();break}e.fill(),o.borderWidth>0&&e.stroke()}}function $n(e,o,n){return n=n||.5,!o||e&&e.x>o.left-n&&e.x<o.right+n&&e.y>o.top-n&&e.y<o.bottom+n}function Pr(e,o){e.save(),e.beginPath(),e.rect(o.left,o.top,o.right-o.left,o.bottom-o.top),e.clip()}function Or(e){e.restore()}function By(e,o,n,r,a){if(!o)return e.lineTo(n.x,n.y);if(a==="middle"){const s=(o.x+n.x)/2;e.lineTo(s,o.y),e.lineTo(s,n.y)}else a==="after"!=!!r?e.lineTo(o.x,n.y):e.lineTo(n.x,o.y);e.lineTo(n.x,n.y)}function Sy(e,o,n,r){if(!o)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?o.cp1x:o.cp2x,r?o.cp1y:o.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Ay(e,o){o.translation&&e.translate(o.translation[0],o.translation[1]),$e(o.rotation)||e.rotate(o.rotation),o.color&&(e.fillStyle=o.color),o.textAlign&&(e.textAlign=o.textAlign),o.textBaseline&&(e.textBaseline=o.textBaseline)}function vy(e,o,n,r,a){if(a.strikethrough||a.underline){const s=e.measureText(r),i=o-s.actualBoundingBoxLeft,l=o+s.actualBoundingBoxRight,c=n-s.actualBoundingBoxAscent,d=n+s.actualBoundingBoxDescent,f=a.strikethrough?(c+d)/2:d;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=a.decorationWidth||2,e.moveTo(i,f),e.lineTo(l,f),e.stroke()}}function Dy(e,o){const n=e.fillStyle;e.fillStyle=o.color,e.fillRect(o.left,o.top,o.width,o.height),e.fillStyle=n}function jn(e,o,n,r,a,s={}){const i=Ze(o)?o:[o],l=s.strokeWidth>0&&s.strokeColor!=="";let c,d;for(e.save(),e.font=a.string,Ay(e,s),c=0;c<i.length;++c)d=i[c],s.backdrop&&Dy(e,s.backdrop),l&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),$e(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(d,n,r,s.maxWidth)),e.fillText(d,n,r,s.maxWidth),vy(e,n,r,d,s),r+=Number(a.lineHeight);e.restore()}function Rr(e,o){const{x:n,y:r,w:a,h:s,radius:i}=o;e.arc(n+i.topLeft,r+i.topLeft,i.topLeft,1.5*Ue,Ue,!0),e.lineTo(n,r+s-i.bottomLeft),e.arc(n+i.bottomLeft,r+s-i.bottomLeft,i.bottomLeft,Ue,tt,!0),e.lineTo(n+a-i.bottomRight,r+s),e.arc(n+a-i.bottomRight,r+s-i.bottomRight,i.bottomRight,tt,0,!0),e.lineTo(n+a,r+i.topRight),e.arc(n+a-i.topRight,r+i.topRight,i.topRight,0,-tt,!0),e.lineTo(n+i.topLeft,r)}const Ny=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Vy=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function My(e,o){const n=(""+e).match(Ny);if(!n||n[1]==="normal")return o*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return o*e}const Ty=e=>+e||0;function Ss(e,o){const n={},r=Pe(o),a=r?Object.keys(o):o,s=Pe(e)?r?i=>ve(e[i],e[o[i]]):i=>e[i]:()=>e;for(const i of a)n[i]=Ty(s(i));return n}function ed(e){return Ss(e,{top:"y",right:"x",bottom:"y",left:"x"})}function rn(e){return Ss(e,["topLeft","topRight","bottomLeft","bottomRight"])}function At(e){const o=ed(e);return o.width=o.left+o.right,o.height=o.top+o.bottom,o}function lt(e,o){e=e||{},o=o||Qe.font;let n=ve(e.size,o.size);typeof n=="string"&&(n=parseInt(n,10));let r=ve(e.style,o.style);r&&!(""+r).match(Vy)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const a={family:ve(e.family,o.family),lineHeight:My(ve(e.lineHeight,o.lineHeight),n),size:n,style:r,weight:ve(e.weight,o.weight),string:""};return a.string=_y(a),a}function Lr(e,o,n,r){let a,s,i;for(a=0,s=e.length;a<s;++a)if(i=e[a],i!==void 0&&i!==void 0)return i}function Py(e,o,n){const{min:r,max:a}=e,s=Mc(o,(a-r)/2),i=(l,c)=>n&&l===0?0:l+c;return{min:i(r,-Math.abs(s)),max:i(a,s)}}function Io(e,o){return Object.assign(Object.create(e),o)}function As(e,o=[""],n,r,a=()=>e[0]){const s=n||e;typeof r>"u"&&(r=ad("_fallback",e));const i={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:s,_fallback:r,_getTarget:a,override:l=>As([l,...e],o,s,r)};return new Proxy(i,{deleteProperty(l,c){return delete l[c],delete l._keys,delete e[0][c],!0},get(l,c){return od(l,c,()=>jy(c,o,e,l))},getOwnPropertyDescriptor(l,c){return Reflect.getOwnPropertyDescriptor(l._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(l,c){return sd(l).includes(c)},ownKeys(l){return sd(l)},set(l,c,d){const f=l._storage||(l._storage=a());return l[c]=f[c]=d,delete l._keys,!0}})}function an(e,o,n,r){const a={_cacheable:!1,_proxy:e,_context:o,_subProxy:n,_stack:new Set,_descriptors:td(e,r),setContext:s=>an(e,s,n,r),override:s=>an(e.override(s),o,n,r)};return new Proxy(a,{deleteProperty(s,i){return delete s[i],delete e[i],!0},get(s,i,l){return od(s,i,()=>Ry(s,i,l))},getOwnPropertyDescriptor(s,i){return s._descriptors.allKeys?Reflect.has(e,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,i)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(s,i){return Reflect.has(e,i)},ownKeys(){return Reflect.ownKeys(e)},set(s,i,l){return e[i]=l,delete s[i],!0}})}function td(e,o={scriptable:!0,indexable:!0}){const{_scriptable:n=o.scriptable,_indexable:r=o.indexable,_allKeys:a=o.allKeys}=e;return{allKeys:a,scriptable:n,indexable:r,isScriptable:xo(n)?n:()=>n,isIndexable:xo(r)?r:()=>r}}const Oy=(e,o)=>e?e+gs(o):o,vs=(e,o)=>Pe(o)&&e!=="adapters"&&(Object.getPrototypeOf(o)===null||o.constructor===Object);function od(e,o,n){if(Object.prototype.hasOwnProperty.call(e,o)||o==="constructor")return e[o];const r=n();return e[o]=r,r}function Ry(e,o,n){const{_proxy:r,_context:a,_subProxy:s,_descriptors:i}=e;let l=r[o];return xo(l)&&i.isScriptable(o)&&(l=Ly(o,l,e,n)),Ze(l)&&l.length&&(l=Iy(o,l,e,i.isIndexable)),vs(o,l)&&(l=an(l,a,s&&s[o],i)),l}function Ly(e,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_stack:l}=n;if(l.has(e))throw new Error("Recursion detected: "+Array.from(l).join("->")+"->"+e);l.add(e);let c=o(s,i||r);return l.delete(e),vs(e,c)&&(c=Ds(a._scopes,a,e,c)),c}function Iy(e,o,n,r){const{_proxy:a,_context:s,_subProxy:i,_descriptors:l}=n;if(typeof s.index<"u"&&r(e))return o[s.index%o.length];if(Pe(o[0])){const c=o,d=a._scopes.filter(f=>f!==c);o=[];for(const f of c){const u=Ds(d,a,e,f);o.push(an(u,s,i&&i[e],l))}}return o}function nd(e,o,n){return xo(e)?e(o,n):e}const Fy=(e,o)=>e===!0?o:typeof e=="string"?To(o,e):void 0;function zy(e,o,n,r,a){for(const s of o){const i=Fy(n,s);if(i){e.add(i);const l=nd(i._fallback,n,a);if(typeof l<"u"&&l!==n&&l!==r)return l}else if(i===!1&&typeof r<"u"&&n!==r)return null}return!1}function Ds(e,o,n,r){const a=o._rootScopes,s=nd(o._fallback,n,r),i=[...e,...a],l=new Set;l.add(r);let c=rd(l,i,n,s||n,r);return c===null||typeof s<"u"&&s!==n&&(c=rd(l,i,s,c,r),c===null)?!1:As(Array.from(l),[""],a,s,()=>$y(o,n,r))}function rd(e,o,n,r,a){for(;n;)n=zy(e,o,n,r,a);return n}function $y(e,o,n){const r=e._getTarget();o in r||(r[o]={});const a=r[o];return Ze(a)&&Pe(n)?n:a||{}}function jy(e,o,n,r){let a;for(const s of o)if(a=ad(Oy(s,e),n),typeof a<"u")return vs(e,a)?Ds(n,r,e,a):a}function ad(e,o){for(const n of o){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function sd(e){let o=e._keys;return o||(o=e._keys=Uy(e._scopes)),o}function Uy(e){const o=new Set;for(const n of e)for(const r of Object.keys(n).filter(a=>!a.startsWith("_")))o.add(r);return Array.from(o)}const Wy=Number.EPSILON||1e-14,sn=(e,o)=>o<e.length&&!e[o].skip&&e[o],id=e=>e==="x"?"y":"x";function Hy(e,o,n,r){const a=e.skip?o:e,s=o,i=n.skip?o:n,l=bs(s,a),c=bs(i,s);let d=l/(l+c),f=c/(l+c);d=isNaN(d)?0:d,f=isNaN(f)?0:f;const u=r*d,h=r*f;return{previous:{x:s.x-u*(i.x-a.x),y:s.y-u*(i.y-a.y)},next:{x:s.x+h*(i.x-a.x),y:s.y+h*(i.y-a.y)}}}function qy(e,o,n){const r=e.length;let a,s,i,l,c,d=sn(e,0);for(let f=0;f<r-1;++f)if(c=d,d=sn(e,f+1),!(!c||!d)){if(Rn(o[f],0,Wy)){n[f]=n[f+1]=0;continue}a=n[f]/o[f],s=n[f+1]/o[f],l=Math.pow(a,2)+Math.pow(s,2),!(l<=9)&&(i=3/Math.sqrt(l),n[f]=a*i*o[f],n[f+1]=s*i*o[f])}}function Gy(e,o,n="x"){const r=id(n),a=e.length;let s,i,l,c=sn(e,0);for(let d=0;d<a;++d){if(i=l,l=c,c=sn(e,d+1),!l)continue;const f=l[n],u=l[r];i&&(s=(f-i[n])/3,l[`cp1${n}`]=f-s,l[`cp1${r}`]=u-s*o[d]),c&&(s=(c[n]-f)/3,l[`cp2${n}`]=f+s,l[`cp2${r}`]=u+s*o[d])}}function Ky(e,o="x"){const n=id(o),r=e.length,a=Array(r).fill(0),s=Array(r);let i,l,c,d=sn(e,0);for(i=0;i<r;++i)if(l=c,c=d,d=sn(e,i+1),!!c){if(d){const f=d[o]-c[o];a[i]=f!==0?(d[n]-c[n])/f:0}s[i]=l?d?$t(a[i-1])!==$t(a[i])?0:(a[i-1]+a[i])/2:a[i-1]:a[i]}qy(e,a,s),Gy(e,s,o)}function Ir(e,o,n){return Math.max(Math.min(e,n),o)}function Xy(e,o){let n,r,a,s,i,l=$n(e[0],o);for(n=0,r=e.length;n<r;++n)i=s,s=l,l=n<r-1&&$n(e[n+1],o),s&&(a=e[n],i&&(a.cp1x=Ir(a.cp1x,o.left,o.right),a.cp1y=Ir(a.cp1y,o.top,o.bottom)),l&&(a.cp2x=Ir(a.cp2x,o.left,o.right),a.cp2y=Ir(a.cp2y,o.top,o.bottom)))}function Yy(e,o,n,r,a){let s,i,l,c;if(o.spanGaps&&(e=e.filter(d=>!d.skip)),o.cubicInterpolationMode==="monotone")Ky(e,a);else{let d=r?e[e.length-1]:e[0];for(s=0,i=e.length;s<i;++s)l=e[s],c=Hy(d,l,e[Math.min(s+1,i-(r?0:1))%i],o.tension),l.cp1x=c.previous.x,l.cp1y=c.previous.y,l.cp2x=c.next.x,l.cp2y=c.next.y,d=l}o.capBezierPoints&&Xy(e,n)}function Ns(){return typeof window<"u"&&typeof document<"u"}function Vs(e){let o=e.parentNode;return o&&o.toString()==="[object ShadowRoot]"&&(o=o.host),o}function Fr(e,o,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*o.parentNode[n])):r=e,r}const zr=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Jy(e,o){return zr(e).getPropertyValue(o)}const Qy=["top","right","bottom","left"];function Fo(e,o,n){const r={};n=n?"-"+n:"";for(let a=0;a<4;a++){const s=Qy[a];r[s]=parseFloat(e[o+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Zy=(e,o,n)=>(e>0||o>0)&&(!n||!n.shadowRoot);function ex(e,o){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:a,offsetY:s}=r;let i=!1,l,c;if(Zy(a,s,e.target))l=a,c=s;else{const d=o.getBoundingClientRect();l=r.clientX-d.left,c=r.clientY-d.top,i=!0}return{x:l,y:c,box:i}}function zo(e,o){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=o,a=zr(n),s=a.boxSizing==="border-box",i=Fo(a,"padding"),l=Fo(a,"border","width"),{x:c,y:d,box:f}=ex(e,n),u=i.left+(f&&l.left),h=i.top+(f&&l.top);let{width:m,height:p}=o;return s&&(m-=i.width+l.width,p-=i.height+l.height),{x:Math.round((c-u)/m*n.width/r),y:Math.round((d-h)/p*n.height/r)}}function tx(e,o,n){let r,a;if(o===void 0||n===void 0){const s=e&&Vs(e);if(!s)o=e.clientWidth,n=e.clientHeight;else{const i=s.getBoundingClientRect(),l=zr(s),c=Fo(l,"border","width"),d=Fo(l,"padding");o=i.width-d.width-c.width,n=i.height-d.height-c.height,r=Fr(l.maxWidth,s,"clientWidth"),a=Fr(l.maxHeight,s,"clientHeight")}}return{width:o,height:n,maxWidth:r||Mr,maxHeight:a||Mr}}const ko=e=>Math.round(e*10)/10;function ox(e,o,n,r){const a=zr(e),s=Fo(a,"margin"),i=Fr(a.maxWidth,e,"clientWidth")||Mr,l=Fr(a.maxHeight,e,"clientHeight")||Mr,c=tx(e,o,n);let{width:d,height:f}=c;if(a.boxSizing==="content-box"){const h=Fo(a,"border","width"),m=Fo(a,"padding");d-=m.width+h.width,f-=m.height+h.height}return d=Math.max(0,d-s.width),f=Math.max(0,r?d/r:f-s.height),d=ko(Math.min(d,i,c.maxWidth)),f=ko(Math.min(f,l,c.maxHeight)),d&&!f&&(f=ko(d/2)),(o!==void 0||n!==void 0)&&r&&c.height&&f>c.height&&(f=c.height,d=ko(Math.floor(f*r))),{width:d,height:f}}function ld(e,o,n){const r=o||1,a=ko(e.height*r),s=ko(e.width*r);e.height=ko(e.height),e.width=ko(e.width);const i=e.canvas;return i.style&&(n||!i.style.height&&!i.style.width)&&(i.style.height=`${e.height}px`,i.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||i.height!==a||i.width!==s?(e.currentDevicePixelRatio=r,i.height=a,i.width=s,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const nx=(function(){let e=!1;try{const o={get passive(){return e=!0,!1}};Ns()&&(window.addEventListener("test",null,o),window.removeEventListener("test",null,o))}catch{}return e})();function cd(e,o){const n=Jy(e,o),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function $o(e,o,n,r){return{x:e.x+n*(o.x-e.x),y:e.y+n*(o.y-e.y)}}function rx(e,o,n,r){return{x:e.x+n*(o.x-e.x),y:r==="middle"?n<.5?e.y:o.y:r==="after"?n<1?e.y:o.y:n>0?o.y:e.y}}function ax(e,o,n,r){const a={x:e.cp2x,y:e.cp2y},s={x:o.cp1x,y:o.cp1y},i=$o(e,a,n),l=$o(a,s,n),c=$o(s,o,n),d=$o(i,l,n),f=$o(l,c,n);return $o(d,f,n)}const sx=function(e,o){return{x(n){return e+e+o-n},setWidth(n){o=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},ix=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,o){return e+o},leftForLtr(e,o){return e}}};function ln(e,o,n){return e?sx(o,n):ix()}function dd(e,o){let n,r;(o==="ltr"||o==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",o,"important"),e.prevTextDirection=r)}function fd(e,o){o!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",o[0],o[1]))}function ud(e){return e==="angle"?{between:In,compare:sy,normalize:yt}:{between:oo,compare:(o,n)=>o-n,normalize:o=>o}}function hd({start:e,end:o,count:n,loop:r,style:a}){return{start:e%n,end:o%n,loop:r&&(o-e+1)%n===0,style:a}}function lx(e,o,n){const{property:r,start:a,end:s}=n,{between:i,normalize:l}=ud(r),c=o.length;let{start:d,end:f,loop:u}=e,h,m;if(u){for(d+=c,f+=c,h=0,m=c;h<m&&i(l(o[d%c][r]),a,s);++h)d--,f--;d%=c,f%=c}return f<d&&(f+=c),{start:d,end:f,loop:u,style:e.style}}function md(e,o,n){if(!n)return[e];const{property:r,start:a,end:s}=n,i=o.length,{compare:l,between:c,normalize:d}=ud(r),{start:f,end:u,loop:h,style:m}=lx(e,o,n),p=[];let y=!1,b=null,g,E,_;const B=()=>c(a,_,g)&&l(a,_)!==0,A=()=>l(s,g)===0||c(s,_,g),C=()=>y||B(),x=()=>!y||A();for(let k=f,N=f;k<=u;++k)E=o[k%i],!E.skip&&(g=d(E[r]),g!==_&&(y=c(g,a,s),b===null&&C()&&(b=l(g,a)===0?k:N),b!==null&&x()&&(p.push(hd({start:b,end:k,loop:h,count:i,style:m})),b=null),N=k,_=g));return b!==null&&p.push(hd({start:b,end:u,loop:h,count:i,style:m})),p}function pd(e,o){const n=[],r=e.segments;for(let a=0;a<r.length;a++){const s=md(r[a],e.points,o);s.length&&n.push(...s)}return n}function cx(e,o,n,r){let a=0,s=o-1;if(n&&!r)for(;a<o&&!e[a].skip;)a++;for(;a<o&&e[a].skip;)a++;for(a%=o,n&&(s+=a);s>a&&e[s%o].skip;)s--;return s%=o,{start:a,end:s}}function dx(e,o,n,r){const a=e.length,s=[];let i=o,l=e[o],c;for(c=o+1;c<=n;++c){const d=e[c%a];d.skip||d.stop?l.skip||(r=!1,s.push({start:o%a,end:(c-1)%a,loop:r}),o=i=d.stop?c:null):(i=c,l.skip&&(o=c)),l=d}return i!==null&&s.push({start:o%a,end:i%a,loop:r}),s}function fx(e,o){const n=e.points,r=e.options.spanGaps,a=n.length;if(!a)return[];const s=!!e._loop,{start:i,end:l}=cx(n,a,s,r);if(r===!0)return gd(e,[{start:i,end:l,loop:s}],n,o);const c=l<i?l+a:l,d=!!e._fullLoop&&i===0&&l===a-1;return gd(e,dx(n,i,c,d),n,o)}function gd(e,o,n,r){return!r||!r.setContext||!n?o:ux(e,o,n,r)}function ux(e,o,n,r){const a=e._chart.getContext(),s=bd(e.options),{_datasetIndex:i,options:{spanGaps:l}}=e,c=n.length,d=[];let f=s,u=o[0].start,h=u;function m(p,y,b,g){const E=l?-1:1;if(p!==y){for(p+=c;n[p%c].skip;)p-=E;for(;n[y%c].skip;)y+=E;p%c!==y%c&&(d.push({start:p%c,end:y%c,loop:b,style:g}),f=g,u=y%c)}}for(const p of o){u=l?u:p.start;let y=n[u%c],b;for(h=u+1;h<=p.end;h++){const g=n[h%c];b=bd(r.setContext(Io(a,{type:"segment",p0:y,p1:g,p0DataIndex:(h-1)%c,p1DataIndex:h%c,datasetIndex:i}))),hx(b,f)&&m(u,h-1,p.loop,f),y=g,f=b}u<h-1&&m(u,h-1,p.loop,f)}return d}function bd(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function hx(e,o){if(!o)return!1;const n=[],r=function(a,s){return ks(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(e,r)!==JSON.stringify(o,r)}function $r(e,o,n){return e.options.clip?e[n]:o[n]}function mx(e,o){const{xScale:n,yScale:r}=e;return n&&r?{left:$r(n,o,"left"),right:$r(n,o,"right"),top:$r(r,o,"top"),bottom:$r(r,o,"bottom")}:o}function yd(e,o){const n=o._clip;if(n.disabled)return!1;const r=mx(o,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
35
35
|
* Chart.js v4.5.1
|
|
36
36
|
* https://www.chartjs.org
|
|
37
37
|
* (c) 2025 Chart.js Contributors
|
|
38
38
|
* Released under the MIT License
|
|
39
|
-
*/class px{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(o,n,r,a){const s=n.listeners[a],i=n.duration;s.forEach(l=>l({chart:o,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=Wc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(o=Date.now()){let n=0;this._charts.forEach((r,a)=>{if(!r.running||!r.items.length)return;const s=r.items;let i=s.length-1,l=!1,c;for(;i>=0;--i)c=s[i],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(o),l=!0):(s[i]=s[s.length-1],s.pop());l&&(a.draw(),this._notify(a,r,o,"progress")),s.length||(r.running=!1,this._notify(a,r,o,"complete"),r.initial=!1),n+=s.length}),this._lastDate=o,n===0&&(this._running=!1)}_getAnims(o){const n=this._charts;let r=n.get(o);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(o,r)),r}listen(o,n,r){this._getAnims(o).listeners[n].push(r)}add(o,n){!n||!n.length||this._getAnims(o).items.push(...n)}has(o){return this._getAnims(o).items.length>0}start(o){const n=this._charts.get(o);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,a)=>Math.max(r,a._duration),0),this._refresh())}running(o){if(!this._running)return!1;const n=this._charts.get(o);return!(!n||!n.running||!n.items.length)}stop(o){const n=this._charts.get(o);if(!n||!n.items.length)return;const r=n.items;let a=r.length-1;for(;a>=0;--a)r[a].cancel();n.items=[],this._notify(o,n,Date.now(),"complete")}remove(o){return this._charts.delete(o)}}var no=new px;const xd="transparent",gx={boolean(e,o,n){return n>.5?o:e},color(e,o,n){const r=Kc(e||xd),a=r.valid&&Kc(o||xd);return a&&a.valid?a.mix(r,n).hexString():o},number(e,o,n){return e+(o-e)*n}};class bx{constructor(o,n,r,a){const s=n[r];a=Rr([o.to,a,s,o.from]);const i=Rr([o.from,s,a]);this._active=!0,this._fn=o.fn||gx[o.type||typeof i],this._easing=Fn[o.easing]||Fn.linear,this._start=Math.floor(Date.now()+(o.delay||0)),this._duration=this._total=Math.floor(o.duration),this._loop=!!o.loop,this._target=n,this._prop=r,this._from=i,this._to=a,this._promises=void 0}active(){return this._active}update(o,n,r){if(this._active){this._notify(!1);const a=this._target[this._prop],s=r-this._start,i=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(i,o.duration)),this._total+=s,this._loop=!!o.loop,this._to=Rr([o.to,n,a,o.from]),this._from=Rr([o.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(o){const n=o-this._start,r=this._duration,a=this._prop,s=this._from,i=this._loop,l=this._to;let c;if(this._active=s!==l&&(i||n<r),!this._active){this._target[a]=l,this._notify(!0);return}if(n<0){this._target[a]=s;return}c=n/r%2,c=i&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[a]=this._fn(s,l,c)}wait(){const o=this._promises||(this._promises=[]);return new Promise((n,r)=>{o.push({res:n,rej:r})})}_notify(o){const n=o?"res":"rej",r=this._promises||[];for(let a=0;a<r.length;a++)r[a][n]()}}class kd{constructor(o,n){this._chart=o,this._properties=new Map,this.configure(n)}configure(o){if(!Pe(o))return;const n=Object.keys(Qe.animation),r=this._properties;Object.getOwnPropertyNames(o).forEach(a=>{const s=o[a];if(!Pe(s))return;const i={};for(const l of n)i[l]=s[l];(Ze(s.properties)&&s.properties||[a]).forEach(l=>{(l===a||!r.has(l))&&r.set(l,i)})})}_animateOptions(o,n){const r=n.options,a=xx(o,r);if(!a)return[];const s=this._createAnimations(a,r);return r.$shared&&yx(o.options.$animations,r).then(()=>{o.options=r},()=>{}),s}_createAnimations(o,n){const r=this._properties,a=[],s=o.$animations||(o.$animations={}),i=Object.keys(n),l=Date.now();let c;for(c=i.length-1;c>=0;--c){const d=i[c];if(d.charAt(0)==="$")continue;if(d==="options"){a.push(...this._animateOptions(o,n));continue}const f=n[d];let u=s[d];const h=r.get(d);if(u)if(h&&u.active()){u.update(h,f,l);continue}else u.cancel();if(!h||!h.duration){o[d]=f;continue}s[d]=u=new bx(h,o,d,f),a.push(u)}return a}update(o,n){if(this._properties.size===0){Object.assign(o,n);return}const r=this._createAnimations(o,n);if(r.length)return no.add(this._chart,r),!0}}function yx(e,o){const n=[],r=Object.keys(o);for(let a=0;a<r.length;a++){const s=e[r[a]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function xx(e,o){if(!o)return;let n=e.options;if(!n){e.options=o;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function wd(e,o){const n=e&&e.options||{},r=n.reverse,a=n.min===void 0?o:0,s=n.max===void 0?o:0;return{start:r?s:a,end:r?a:s}}function kx(e,o,n){if(n===!1)return!1;const r=wd(e,n),a=wd(o,n);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}function wx(e){let o,n,r,a;return Pe(e)?(o=e.top,n=e.right,r=e.bottom,a=e.left):o=n=r=a=e,{top:o,right:n,bottom:r,left:a,disabled:e===!1}}function Cd(e,o){const n=[],r=e._getSortedDatasetMetas(o);let a,s;for(a=0,s=r.length;a<s;++a)n.push(r[a].index);return n}function _d(e,o,n,r={}){const a=e.keys,s=r.mode==="single";let i,l,c,d;if(o===null)return;let f=!1;for(i=0,l=a.length;i<l;++i){if(c=+a[i],c===n){if(f=!0,r.all)continue;break}d=e.values[c],at(d)&&(s||o===0||$t(o)===$t(d))&&(o+=d)}return!f&&!r.all?0:o}function Cx(e,o){const{iScale:n,vScale:r}=o,a=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",i=Object.keys(e),l=new Array(i.length);let c,d,f;for(c=0,d=i.length;c<d;++c)f=i[c],l[c]={[a]:f,[s]:e[f]};return l}function Ms(e,o){const n=e&&e.options.stacked;return n||n===void 0&&o.stack!==void 0}function _x(e,o,n){return`${e.id}.${o.id}.${n.stack||n.type}`}function Ex(e){const{min:o,max:n,minDefined:r,maxDefined:a}=e.getUserBounds();return{min:r?o:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function Bx(e,o,n){const r=e[o]||(e[o]={});return r[n]||(r[n]={})}function Ed(e,o,n,r){for(const a of o.getMatchingVisibleMetas(r).reverse()){const s=e[a.index];if(n&&s>0||!n&&s<0)return a.index}return null}function Bd(e,o){const{chart:n,_cachedMeta:r}=e,a=n._stacks||(n._stacks={}),{iScale:s,vScale:i,index:l}=r,c=s.axis,d=i.axis,f=_x(s,i,r),u=o.length;let h;for(let m=0;m<u;++m){const p=o[m],{[c]:y,[d]:b}=p,g=p._stacks||(p._stacks={});h=g[d]=Bx(a,f,y),h[l]=b,h._top=Ed(h,i,!0,r.type),h._bottom=Ed(h,i,!1,r.type);const _=h._visualValues||(h._visualValues={});_[l]=b}}function Ts(e,o){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===o).shift()}function Sx(e,o){return Io(e,{active:!1,dataset:void 0,datasetIndex:o,index:o,mode:"default",type:"dataset"})}function Ax(e,o,n){return Io(e,{active:!1,dataIndex:o,parsed:void 0,raw:void 0,element:n,index:o,mode:"default",type:"data"})}function Un(e,o){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){o=o||e._parsed;for(const a of o){const s=a._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Ps=e=>e==="reset"||e==="none",Sd=(e,o)=>o?e:Object.assign({},e),vx=(e,o,n)=>e&&!o.hidden&&o._stacked&&{keys:Cd(n,!0),values:null};class jo{constructor(o,n){this.chart=o,this._ctx=o.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const o=this._cachedMeta;this.configure(),this.linkScales(),o._stacked=Ms(o.vScale,o),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(o){this.index!==o&&Un(this._cachedMeta),this.index=o}linkScales(){const o=this.chart,n=this._cachedMeta,r=this.getDataset(),a=(u,h,m,p)=>u==="x"?h:u==="r"?p:m,s=n.xAxisID=Ae(r.xAxisID,Ts(o,"x")),i=n.yAxisID=Ae(r.yAxisID,Ts(o,"y")),l=n.rAxisID=Ae(r.rAxisID,Ts(o,"r")),c=n.indexAxis,d=n.iAxisID=a(c,s,i,l),f=n.vAxisID=a(c,i,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(i),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(o){return this.chart.scales[o]}_getOtherScale(o){const n=this._cachedMeta;return o===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const o=this._cachedMeta;this._data&&jc(this._data,this),o._stacked&&Un(o)}_dataCheck(){const o=this.getDataset(),n=o.data||(o.data=[]),r=this._data;if(Pe(n)){const a=this._cachedMeta;this._data=Cx(n,a)}else if(r!==n){if(r){jc(r,this);const a=this._cachedMeta;Un(a),a._parsed=[]}n&&Object.isExtensible(n)&&dy(n,this),this._syncList=[],this._data=n}}addElements(){const o=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(o.dataset=new this.datasetElementType)}buildOrUpdateElements(o){const n=this._cachedMeta,r=this.getDataset();let a=!1;this._dataCheck();const s=n._stacked;n._stacked=Ms(n.vScale,n),n.stack!==r.stack&&(a=!0,Un(n),n.stack=r.stack),this._resyncElements(o),(a||s!==n._stacked)&&(Bd(this,n._parsed),n._stacked=Ms(n.vScale,n))}configure(){const o=this.chart.config,n=o.datasetScopeKeys(this._type),r=o.getOptionScopes(this.getDataset(),n,!0);this.options=o.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(o,n){const{_cachedMeta:r,_data:a}=this,{iScale:s,_stacked:i}=r,l=s.axis;let c=o===0&&n===a.length?!0:r._sorted,d=o>0&&r._parsed[o-1],f,u,h;if(this._parsing===!1)r._parsed=a,r._sorted=!0,h=a;else{Ze(a[o])?h=this.parseArrayData(r,a,o,n):Pe(a[o])?h=this.parseObjectData(r,a,o,n):h=this.parsePrimitiveData(r,a,o,n);const m=()=>u[l]===null||d&&u[l]<d[l];for(f=0;f<n;++f)r._parsed[f+o]=u=h[f],c&&(m()&&(c=!1),d=u);r._sorted=c}i&&Bd(this,h)}parsePrimitiveData(o,n,r,a){const{iScale:s,vScale:i}=o,l=s.axis,c=i.axis,d=s.getLabels(),f=s===i,u=new Array(a);let h,m,p;for(h=0,m=a;h<m;++h)p=h+r,u[h]={[l]:f||s.parse(d[p],p),[c]:i.parse(n[p],p)};return u}parseArrayData(o,n,r,a){const{xScale:s,yScale:i}=o,l=new Array(a);let c,d,f,u;for(c=0,d=a;c<d;++c)f=c+r,u=n[f],l[c]={x:s.parse(u[0],f),y:i.parse(u[1],f)};return l}parseObjectData(o,n,r,a){const{xScale:s,yScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(a);let f,u,h,m;for(f=0,u=a;f<u;++f)h=f+r,m=n[h],d[f]={x:s.parse(To(m,l),h),y:i.parse(To(m,c),h)};return d}getParsed(o){return this._cachedMeta._parsed[o]}getDataElement(o){return this._cachedMeta.data[o]}applyStack(o,n,r){const a=this.chart,s=this._cachedMeta,i=n[o.axis],l={keys:Cd(a,!0),values:n._stacks[o.axis]._visualValues};return _d(l,i,s.index,{mode:r})}updateRangeFromParsed(o,n,r,a){const s=r[n.axis];let i=s===null?NaN:s;const l=a&&r._stacks[n.axis];a&&l&&(a.values=l,i=_d(a,s,this._cachedMeta.index)),o.min=Math.min(o.min,i),o.max=Math.max(o.max,i)}getMinMax(o,n){const r=this._cachedMeta,a=r._parsed,s=r._sorted&&o===r.iScale,i=a.length,l=this._getOtherScale(o),c=vx(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:u}=Ex(l);let h,m;function p(){m=a[h];const y=m[l.axis];return!at(m[o.axis])||f>y||u<y}for(h=0;h<i&&!(!p()&&(this.updateRangeFromParsed(d,o,m,c),s));++h);if(s){for(h=i-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(d,o,m,c);break}}return d}getAllParsedValues(o){const n=this._cachedMeta._parsed,r=[];let a,s,i;for(a=0,s=n.length;a<s;++a)i=n[a][o.axis],at(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(o){const n=this._cachedMeta,r=n.iScale,a=n.vScale,s=this.getParsed(o);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:a?""+a.getLabelForValue(s[a.axis]):""}}_update(o){const n=this._cachedMeta;this.update(o||"default"),n._clip=wx(Ae(this.options.clip,kx(n.xScale,n.yScale,this.getMaxOverflow())))}update(o){}draw(){const o=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],s=n.chartArea,i=[],l=this._drawStart||0,c=this._drawCount||a.length-l,d=this.options.drawActiveElementsOnTop;let f;for(r.dataset&&r.dataset.draw(o,s,l,c),f=l;f<l+c;++f){const u=a[f];u.hidden||(u.active&&d?i.push(u):u.draw(o,s))}for(f=0;f<i.length;++f)i[f].draw(o,s)}getStyle(o,n){const r=n?"active":"default";return o===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(o||0,r)}getContext(o,n,r){const a=this.getDataset();let s;if(o>=0&&o<this._cachedMeta.data.length){const i=this._cachedMeta.data[o];s=i.$context||(i.$context=Ax(this.getContext(),o,i)),s.parsed=this.getParsed(o),s.raw=a.data[o],s.index=s.dataIndex=o}else s=this.$context||(this.$context=Sx(this.chart.getContext(),this.index)),s.dataset=a,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(o){return this._resolveElementOptions(this.datasetElementType.id,o)}resolveDataElementOptions(o,n){return this._resolveElementOptions(this.dataElementType.id,n,o)}_resolveElementOptions(o,n="default",r){const a=n==="active",s=this._cachedDataOpts,i=o+"-"+n,l=s[i],c=this.enableOptionSharing&&On(r);if(l)return Sd(l,c);const d=this.chart.config,f=d.datasetElementScopeKeys(this._type,o),u=a?[`${o}Hover`,"hover",o,""]:[o,""],h=d.getOptionScopes(this.getDataset(),f),m=Object.keys(Qe.elements[o]),p=()=>this.getContext(r,a,n),y=d.resolveNamedOptions(h,m,p,u);return y.$shared&&(y.$shared=c,s[i]=Object.freeze(Sd(y,c))),y}_resolveAnimations(o,n,r){const a=this.chart,s=this._cachedDataOpts,i=`animation-${n}`,l=s[i];if(l)return l;let c;if(a.options.animation!==!1){const f=this.chart.config,u=f.datasetAnimationScopeKeys(this._type,n),h=f.getOptionScopes(this.getDataset(),u);c=f.createResolver(h,this.getContext(o,r,n))}const d=new kd(a,c&&c.animations);return c&&c._cacheable&&(s[i]=Object.freeze(d)),d}getSharedOptions(o){if(o.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},o))}includeOptions(o,n){return!n||Ps(o)||this.chart._animationsDisabled}_getSharedOptions(o,n){const r=this.resolveDataElementOptions(o,n),a=this._sharedOptions,s=this.getSharedOptions(r),i=this.includeOptions(n,s)||s!==a;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:i}}updateElement(o,n,r,a){Ps(a)?Object.assign(o,r):this._resolveAnimations(n,a).update(o,r)}updateSharedOptions(o,n,r){o&&!Ps(n)&&this._resolveAnimations(void 0,n).update(o,r)}_setStyle(o,n,r,a){o.active=a;const s=this.getStyle(n,a);this._resolveAnimations(n,r,a).update(o,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(o,n,r){this._setStyle(o,r,"active",!1)}setHoverStyle(o,n,r){this._setStyle(o,r,"active",!0)}_removeDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!1)}_setDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!0)}_resyncElements(o){const n=this._data,r=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const a=r.length,s=n.length,i=Math.min(s,a);i&&this.parse(0,i),s>a?this._insertElements(a,s-a,o):s<a&&this._removeElements(s,a-s)}_insertElements(o,n,r=!0){const a=this._cachedMeta,s=a.data,i=o+n;let l;const c=d=>{for(d.length+=n,l=d.length-1;l>=i;l--)d[l]=d[l-n]};for(c(s),l=o;l<i;++l)s[l]=new this.dataElementType;this._parsing&&c(a._parsed),this.parse(o,n),r&&this.updateElements(s,o,n,"reset")}updateElements(o,n,r,a){}_removeElements(o,n){const r=this._cachedMeta;if(this._parsing){const a=r._parsed.splice(o,n);r._stacked&&Un(r,a)}r.data.splice(o,n)}_sync(o){if(this._parsing)this._syncList.push(o);else{const[n,r,a]=o;this[n](r,a)}this.chart._dataChanges.push([this.index,...o])}_onDataPush(){const o=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-o,o])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(o,n){n&&this._sync(["_removeElements",o,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",o,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}be(jo,"defaults",{}),be(jo,"datasetElementType",null),be(jo,"dataElementType",null);function Dx(e,o){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(o);let r=[];for(let a=0,s=n.length;a<s;a++)r=r.concat(n[a].controller.getAllParsedValues(e));e._cache.$bar=Uc(r.sort((a,s)=>a-s))}return e._cache.$bar}function Nx(e){const o=e.iScale,n=Dx(o,e.type);let r=o._length,a,s,i,l;const c=()=>{i===32767||i===-32768||(On(l)&&(r=Math.min(r,Math.abs(i-l)||r)),l=i)};for(a=0,s=n.length;a<s;++a)i=o.getPixelForValue(n[a]),c();for(l=void 0,a=0,s=o.ticks.length;a<s;++a)i=o.getPixelForTick(a),c();return r}function Vx(e,o,n,r){const a=n.barThickness;let s,i;return $e(a)?(s=o.min*n.categoryPercentage,i=n.barPercentage):(s=a*r,i=1),{chunk:s/r,ratio:i,start:o.pixels[e]-s/2}}function Mx(e,o,n,r){const a=o.pixels,s=a[e];let i=e>0?a[e-1]:null,l=e<a.length-1?a[e+1]:null;const c=n.categoryPercentage;i===null&&(i=s-(l===null?o.end-o.start:l-s)),l===null&&(l=s+s-i);const d=s-(s-Math.min(i,l))/2*c;return{chunk:Math.abs(l-i)/2*c/r,ratio:n.barPercentage,start:d}}function Tx(e,o,n,r){const a=n.parse(e[0],r),s=n.parse(e[1],r),i=Math.min(a,s),l=Math.max(a,s);let c=i,d=l;Math.abs(i)>Math.abs(l)&&(c=l,d=i),o[n.axis]=d,o._custom={barStart:c,barEnd:d,start:a,end:s,min:i,max:l}}function Ad(e,o,n,r){return Ze(e)?Tx(e,o,n,r):o[n.axis]=n.parse(e,r),o}function vd(e,o,n,r){const a=e.iScale,s=e.vScale,i=a.getLabels(),l=a===s,c=[];let d,f,u,h;for(d=n,f=n+r;d<f;++d)h=o[d],u={},u[a.axis]=l||a.parse(i[d],d),c.push(Ad(h,u,s,d));return c}function Os(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Px(e,o,n){return e!==0?$t(e):(o.isHorizontal()?1:-1)*(o.min>=n?1:-1)}function Ox(e){let o,n,r,a,s;return e.horizontal?(o=e.base>e.x,n="left",r="right"):(o=e.base<e.y,n="bottom",r="top"),o?(a="end",s="start"):(a="start",s="end"),{start:n,end:r,reverse:o,top:a,bottom:s}}function Lx(e,o,n,r){let a=o.borderSkipped;const s={};if(!a){e.borderSkipped=s;return}if(a===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:l,reverse:c,top:d,bottom:f}=Ox(e);a==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?a=d:(n._bottom||0)===r?a=f:(s[Dd(f,i,l,c)]=!0,a=d)),s[Dd(a,i,l,c)]=!0,e.borderSkipped=s}function Dd(e,o,n,r){return r?(e=Rx(e,o,n),e=Nd(e,n,o)):e=Nd(e,o,n),e}function Rx(e,o,n){return e===o?n:e===n?o:e}function Nd(e,o,n){return e==="start"?o:e==="end"?n:e}function Ix(e,{inflateAmount:o},n){e.inflateAmount=o==="auto"?n===1?.33:0:o}class jr extends jo{parsePrimitiveData(o,n,r,a){return vd(o,n,r,a)}parseArrayData(o,n,r,a){return vd(o,n,r,a)}parseObjectData(o,n,r,a){const{iScale:s,vScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=s.axis==="x"?l:c,f=i.axis==="x"?l:c,u=[];let h,m,p,y;for(h=r,m=r+a;h<m;++h)y=n[h],p={},p[s.axis]=s.parse(To(y,d),h),u.push(Ad(To(y,f),p,i,h));return u}updateRangeFromParsed(o,n,r,a){super.updateRangeFromParsed(o,n,r,a);const s=r._custom;s&&n===this._cachedMeta.vScale&&(o.min=Math.min(o.min,s.min),o.max=Math.max(o.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(o){const n=this._cachedMeta,{iScale:r,vScale:a}=n,s=this.getParsed(o),i=s._custom,l=Os(i)?"["+i.start+", "+i.end+"]":""+a.getLabelForValue(s[a.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const o=this._cachedMeta;o.stack=this.getDataset().stack}update(o){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,o)}updateElements(o,n,r,a){const s=a==="reset",{index:i,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),f=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(n,a);for(let m=n;m<n+r;m++){const p=this.getParsed(m),y=s||$e(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,f),g=(p._stacks||{})[l.axis],_={horizontal:d,base:y.base,enableBorderRadius:!g||Os(p._custom)||i===g._top||i===g._bottom,x:d?y.head:b.center,y:d?b.center:y.head,height:d?b.size:Math.abs(y.size),width:d?Math.abs(y.size):b.size};h&&(_.options=u||this.resolveDataElementOptions(m,o[m].active?"active":a));const E=_.options||o[m].options;Lx(_,E,g,i),Ix(_,E,f.ratio),this.updateElement(o[m],m,_,a)}}_getStacks(o,n){const{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=r.options.stacked,i=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[r.axis],d=f=>{const u=f._parsed.find(m=>m[r.axis]===c),h=u&&u[f.vScale.axis];if($e(h)||isNaN(h))return!0};for(const f of a)if(!(n!==void 0&&d(f))&&((s===!1||i.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&i.push(f.stack),f.index===o))break;return i.length||i.push(void 0),i}_getStackCount(o){return this._getStacks(void 0,o).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const o=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(o).filter(r=>o[r].axis===n).shift()}_getAxis(){const o={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)o[Ae(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(o)}_getStackIndex(o,n,r){const a=this._getStacks(o,r),s=n!==void 0?a.indexOf(n):-1;return s===-1?a.length-1:s}_getRuler(){const o=this.options,n=this._cachedMeta,r=n.iScale,a=[];let s,i;for(s=0,i=n.data.length;s<i;++s)a.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const l=o.barThickness;return{min:l||Nx(n),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:o.grouped,ratio:l?1:o.categoryPercentage*o.barPercentage}}_calculateBarValuePixels(o){const{_cachedMeta:{vScale:n,_stacked:r,index:a},options:{base:s,minBarLength:i}}=this,l=s||0,c=this.getParsed(o),d=c._custom,f=Os(d);let u=c[n.axis],h=0,m=r?this.applyStack(n,c,r):u,p,y;m!==u&&(h=m-u,m=u),f&&(u=d.barStart,m=d.barEnd-d.barStart,u!==0&&$t(u)!==$t(d.barEnd)&&(h=0),h+=u);const b=!$e(s)&&!f?s:h;let g=n.getPixelForValue(b);if(this.chart.getDataVisibility(o)?p=n.getPixelForValue(h+m):p=g,y=p-g,Math.abs(y)<i){y=Px(y,n,l)*i,u===l&&(g-=y/2);const _=n.getPixelForDecimal(0),E=n.getPixelForDecimal(1),B=Math.min(_,E),A=Math.max(_,E);g=Math.max(Math.min(g,A),B),p=g+y,r&&!f&&(c._stacks[n.axis]._visualValues[a]=n.getValueForPixel(p)-n.getValueForPixel(g))}if(g===n.getPixelForValue(l)){const _=$t(y)*n.getLineWidthForValue(l)/2;g+=_,y-=_}return{size:y,base:g,head:p,center:p+y/2}}_calculateBarIndexPixels(o,n){const r=n.scale,a=this.options,s=a.skipNull,i=Ae(a.maxBarThickness,1/0);let l,c;const d=this._getAxisCount();if(n.grouped){const f=s?this._getStackCount(o):n.stackCount,u=a.barThickness==="flex"?Mx(o,n,a,f*d):Vx(o,n,a,f*d),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(Ae(h,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,s?o:void 0)+m;l=u.start+u.chunk*p+u.chunk/2,c=Math.min(i,u.chunk*u.ratio)}else l=r.getPixelForValue(this.getParsed(o)[r.axis],o),c=Math.min(i,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const o=this._cachedMeta,n=o.vScale,r=o.data,a=r.length;let s=0;for(;s<a;++s)this.getParsed(s)[n.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}be(jr,"id","bar"),be(jr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),be(jr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function Fx(e,o,n){let r=1,a=1,s=0,i=0;if(o<Ke){const l=e,c=l+o,d=Math.cos(l),f=Math.sin(l),u=Math.cos(c),h=Math.sin(c),m=(E,B,A)=>In(E,l,c,!0)?1:Math.max(B,B*n,A,A*n),p=(E,B,A)=>In(E,l,c,!0)?-1:Math.min(B,B*n,A,A*n),y=m(0,d,u),b=m(tt,f,h),g=p(Ue,d,u),_=p(Ue+tt,f,h);r=(y-g)/2,a=(b-_)/2,s=-(y+g)/2,i=-(b+_)/2}return{ratioX:r,ratioY:a,offsetX:s,offsetY:i}}class cn extends jo{constructor(o,n){super(o,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(o,n){const r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let s=c=>+r[c];if(Pe(r[o])){const{key:c="value"}=this._parsing;s=d=>+To(r[d],c)}let i,l;for(i=o,l=o+n;i<l;++i)a._parsed[i]=s(i)}}_getRotation(){return to(this.options.rotation-90)}_getCircumference(){return to(this.options.circumference)}_getRotationExtents(){let o=Ke,n=-Ke;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const a=this.chart.getDatasetMeta(r).controller,s=a._getRotation(),i=a._getCircumference();o=Math.min(o,s),n=Math.max(n,s+i)}return{rotation:o,circumference:n-o}}update(o){const n=this.chart,{chartArea:r}=n,a=this._cachedMeta,s=a.data,i=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-i)/2,0),c=Math.min(G0(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:f,rotation:u}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:p,offsetY:y}=Fx(u,f,c),b=(r.width-i)/h,g=(r.height-i)/m,_=Math.max(Math.min(b,g)/2,0),E=Mc(this.options.radius,_),B=Math.max(E*c,0),A=(E-B)/this._getVisibleDatasetWeightTotal();this.offsetX=p*E,this.offsetY=y*E,a.total=this.calculateTotal(),this.outerRadius=E-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*d,0),this.updateElements(s,0,s.length,o)}_circumference(o,n){const r=this.options,a=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(o)||a._parsed[o]===null||a.data[o].hidden?0:this.calculateCircumference(a._parsed[o]*s/Ke)}updateElements(o,n,r,a){const s=a==="reset",i=this.chart,l=i.chartArea,d=i.options.animation,f=(l.left+l.right)/2,u=(l.top+l.bottom)/2,h=s&&d.animateScale,m=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:y,includeOptions:b}=this._getSharedOptions(n,a);let g=this._getRotation(),_;for(_=0;_<n;++_)g+=this._circumference(_,s);for(_=n;_<n+r;++_){const E=this._circumference(_,s),B=o[_],A={x:f+this.offsetX,y:u+this.offsetY,startAngle:g,endAngle:g+E,circumference:E,outerRadius:p,innerRadius:m};b&&(A.options=y||this.resolveDataElementOptions(_,B.active?"active":a)),g+=E,this.updateElement(B,_,A,a)}}calculateTotal(){const o=this._cachedMeta,n=o.data;let r=0,a;for(a=0;a<n.length;a++){const s=o._parsed[a];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(o){const n=this._cachedMeta.total;return n>0&&!isNaN(o)?Ke*(Math.abs(o)/n):0}getLabelAndValue(o){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],s=Cs(n._parsed[o],r.options.locale);return{label:a[o]||"",value:s}}getMaxBorderWidth(o){let n=0;const r=this.chart;let a,s,i,l,c;if(!o){for(a=0,s=r.data.datasets.length;a<s;++a)if(r.isDatasetVisible(a)){i=r.getDatasetMeta(a),o=i.data,l=i.controller;break}}if(!o)return 0;for(a=0,s=o.length;a<s;++a)c=l.resolveDataElementOptions(a),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(o){let n=0;for(let r=0,a=o.length;r<a;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(o){let n=0;for(let r=0;r<o;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(o){return Math.max(Ae(this.chart.data.datasets[o].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}be(cn,"id","doughnut"),be(cn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),be(cn,"descriptors",{_scriptable:o=>o!=="spacing",_indexable:o=>o!=="spacing"&&!o.startsWith("borderDash")&&!o.startsWith("hoverBorderDash")}),be(cn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(o){const n=o.data,{labels:{pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=o.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((c,d)=>{const u=o.getDatasetMeta(0).controller.getStyle(d);return{text:c,fillStyle:u.backgroundColor,fontColor:s,hidden:!o.getDataVisibility(d),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:a,pointStyle:r,borderRadius:i&&(l||u.borderRadius),index:d}}):[]}},onClick(o,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Ur extends jo{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(o){const n=this._cachedMeta,{dataset:r,data:a=[],_dataset:s}=n,i=this.chart._animationsDisabled;let{start:l,count:c}=hy(n,a,i);this._drawStart=l,this._drawCount=c,my(n)&&(l=0,c=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=a;const d=this.resolveDatasetElementOptions(o);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:d},o),this.updateElements(a,l,c,o)}updateElements(o,n,r,a){const s=a==="reset",{iScale:i,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:u}=this._getSharedOptions(n,a),h=i.axis,m=l.axis,{spanGaps:p,segment:y}=this.options,b=Rn(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||s||a==="none",_=n+r,E=o.length;let B=n>0&&this.getParsed(n-1);for(let A=0;A<E;++A){const C=o[A],x=g?C:{};if(A<n||A>=_){x.skip=!0;continue}const w=this.getParsed(A),D=$e(w[m]),k=x[h]=i.getPixelForValue(w[h],A),v=x[m]=s||D?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,w,c):w[m],A);x.skip=isNaN(k)||isNaN(v)||D,x.stop=A>0&&Math.abs(w[h]-B[h])>b,y&&(x.parsed=w,x.raw=d.data[A]),u&&(x.options=f||this.resolveDataElementOptions(A,C.active?"active":a)),g||this.updateElement(C,A,x,a),B=w}}getMaxOverflow(){const o=this._cachedMeta,n=o.dataset,r=n.options&&n.options.borderWidth||0,a=o.data||[];if(!a.length)return r;const s=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,s,i)/2}draw(){const o=this._cachedMeta;o.dataset.updateControlPoints(this.chart.chartArea,o.iScale.axis),super.draw()}}be(Ur,"id","line"),be(Ur,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),be(Ur,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Ls extends cn{}be(Ls,"id","pie"),be(Ls,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function Uo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Rs{constructor(o){be(this,"options");this.options=o||{}}static override(o){Object.assign(Rs.prototype,o)}init(){}formats(){return Uo()}parse(){return Uo()}format(){return Uo()}add(){return Uo()}diff(){return Uo()}startOf(){return Uo()}endOf(){return Uo()}}var zx={_date:Rs};function $x(e,o,n,r){const{controller:a,data:s,_sorted:i}=e,l=a._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&o===l.axis&&o!=="r"&&i&&s.length){const d=l._reversePixels?ly:Oo;if(r){if(a._sharedOptions){const f=s[0],u=typeof f.getRange=="function"&&f.getRange(o);if(u){const h=d(s,o,n-u),m=d(s,o,n+u);return{lo:h.lo,hi:m.hi}}}}else{const f=d(s,o,n);if(c){const{vScale:u}=a._cachedMeta,{_parsed:h}=e,m=h.slice(0,f.lo+1).reverse().findIndex(y=>!$e(y[u.axis]));f.lo-=Math.max(0,m);const p=h.slice(f.hi).findIndex(y=>!$e(y[u.axis]));f.hi+=Math.max(0,p)}return f}}return{lo:0,hi:s.length-1}}function Wr(e,o,n,r,a){const s=e.getSortedVisibleDatasetMetas(),i=n[o];for(let l=0,c=s.length;l<c;++l){const{index:d,data:f}=s[l],{lo:u,hi:h}=$x(s[l],o,i,a);for(let m=u;m<=h;++m){const p=f[m];p.skip||r(p,d,m)}}}function jx(e){const o=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,a){const s=o?Math.abs(r.x-a.x):0,i=n?Math.abs(r.y-a.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(i,2))}}function Is(e,o,n,r,a){const s=[];return!a&&!e.isPointInArea(o)||Wr(e,n,o,function(l,c,d){!a&&!$n(l,e.chartArea,0)||l.inRange(o.x,o.y,r)&&s.push({element:l,datasetIndex:c,index:d})},!0),s}function Ux(e,o,n,r){let a=[];function s(i,l,c){const{startAngle:d,endAngle:f}=i.getProps(["startAngle","endAngle"],r),{angle:u}=zc(i,{x:o.x,y:o.y});In(u,d,f)&&a.push({element:i,datasetIndex:l,index:c})}return Wr(e,n,o,s),a}function Wx(e,o,n,r,a,s){let i=[];const l=jx(n);let c=Number.POSITIVE_INFINITY;function d(f,u,h){const m=f.inRange(o.x,o.y,a);if(r&&!m)return;const p=f.getCenterPoint(a);if(!(!!s||e.isPointInArea(p))&&!m)return;const b=l(o,p);b<c?(i=[{element:f,datasetIndex:u,index:h}],c=b):b===c&&i.push({element:f,datasetIndex:u,index:h})}return Wr(e,n,o,d),i}function Fs(e,o,n,r,a,s){return!s&&!e.isPointInArea(o)?[]:n==="r"&&!r?Ux(e,o,n,a):Wx(e,o,n,r,a,s)}function Vd(e,o,n,r,a){const s=[],i=n==="x"?"inXRange":"inYRange";let l=!1;return Wr(e,n,o,(c,d,f)=>{c[i]&&c[i](o[n],a)&&(s.push({element:c,datasetIndex:d,index:f}),l=l||c.inRange(o.x,o.y,a))}),r&&!l?[]:s}var Hx={modes:{index(e,o,n,r){const a=zo(o,e),s=n.axis||"x",i=n.includeInvisible||!1,l=n.intersect?Is(e,a,s,r,i):Fs(e,a,s,!1,r,i),c=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const f=l[0].index,u=d.data[f];u&&!u.skip&&c.push({element:u,datasetIndex:d.index,index:f})}),c):[]},dataset(e,o,n,r){const a=zo(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;let l=n.intersect?Is(e,a,s,r,i):Fs(e,a,s,!1,r,i);if(l.length>0){const c=l[0].datasetIndex,d=e.getDatasetMeta(c).data;l=[];for(let f=0;f<d.length;++f)l.push({element:d[f],datasetIndex:c,index:f})}return l},point(e,o,n,r){const a=zo(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;return Is(e,a,s,r,i)},nearest(e,o,n,r){const a=zo(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;return Fs(e,a,s,n.intersect,r,i)},x(e,o,n,r){const a=zo(o,e);return Vd(e,a,"x",n.intersect,r)},y(e,o,n,r){const a=zo(o,e);return Vd(e,a,"y",n.intersect,r)}}};const Md=["left","top","right","bottom"];function Wn(e,o){return e.filter(n=>n.pos===o)}function Td(e,o){return e.filter(n=>Md.indexOf(n.pos)===-1&&n.box.axis===o)}function Hn(e,o){return e.sort((n,r)=>{const a=o?r:n,s=o?n:r;return a.weight===s.weight?a.index-s.index:a.weight-s.weight})}function qx(e){const o=[];let n,r,a,s,i,l;for(n=0,r=(e||[]).length;n<r;++n)a=e[n],{position:s,options:{stack:i,stackWeight:l=1}}=a,o.push({index:n,box:a,pos:s,horizontal:a.isHorizontal(),weight:a.weight,stack:i&&s+i,stackWeight:l});return o}function Gx(e){const o={};for(const n of e){const{stack:r,pos:a,stackWeight:s}=n;if(!r||!Md.includes(a))continue;const i=o[r]||(o[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=s}return o}function Kx(e,o){const n=Gx(e),{vBoxMaxWidth:r,hBoxMaxHeight:a}=o;let s,i,l;for(s=0,i=e.length;s<i;++s){l=e[s];const{fullSize:c}=l.box,d=n[l.stack],f=d&&l.stackWeight/d.weight;l.horizontal?(l.width=f?f*r:c&&o.availableWidth,l.height=a):(l.width=r,l.height=f?f*a:c&&o.availableHeight)}return n}function Xx(e){const o=qx(e),n=Hn(o.filter(d=>d.box.fullSize),!0),r=Hn(Wn(o,"left"),!0),a=Hn(Wn(o,"right")),s=Hn(Wn(o,"top"),!0),i=Hn(Wn(o,"bottom")),l=Td(o,"x"),c=Td(o,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:a.concat(c).concat(i).concat(l),chartArea:Wn(o,"chartArea"),vertical:r.concat(a).concat(c),horizontal:s.concat(i).concat(l)}}function Pd(e,o,n,r){return Math.max(e[n],o[n])+Math.max(e[r],o[r])}function Od(e,o){e.top=Math.max(e.top,o.top),e.left=Math.max(e.left,o.left),e.bottom=Math.max(e.bottom,o.bottom),e.right=Math.max(e.right,o.right)}function Yx(e,o,n,r){const{pos:a,box:s}=n,i=e.maxPadding;if(!Pe(a)){n.size&&(e[a]-=n.size);const u=r[n.stack]||{size:0,count:1};u.size=Math.max(u.size,n.horizontal?s.height:s.width),n.size=u.size/u.count,e[a]+=n.size}s.getPadding&&Od(i,s.getPadding());const l=Math.max(0,o.outerWidth-Pd(i,e,"left","right")),c=Math.max(0,o.outerHeight-Pd(i,e,"top","bottom")),d=l!==e.w,f=c!==e.h;return e.w=l,e.h=c,n.horizontal?{same:d,other:f}:{same:f,other:d}}function Jx(e){const o=e.maxPadding;function n(r){const a=Math.max(o[r]-e[r],0);return e[r]+=a,a}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Qx(e,o){const n=o.maxPadding;function r(a){const s={left:0,top:0,right:0,bottom:0};return a.forEach(i=>{s[i]=Math.max(o[i],n[i])}),s}return r(e?["left","right"]:["top","bottom"])}function qn(e,o,n,r){const a=[];let s,i,l,c,d,f;for(s=0,i=e.length,d=0;s<i;++s){l=e[s],c=l.box,c.update(l.width||o.w,l.height||o.h,Qx(l.horizontal,o));const{same:u,other:h}=Yx(o,n,l,r);d|=u&&a.length,f=f||h,c.fullSize||a.push(l)}return d&&qn(a,o,n,r)||f}function Hr(e,o,n,r,a){e.top=n,e.left=o,e.right=o+r,e.bottom=n+a,e.width=r,e.height=a}function Ld(e,o,n,r){const a=n.padding;let{x:s,y:i}=o;for(const l of e){const c=l.box,d=r[l.stack]||{placed:0,weight:1},f=l.stackWeight/d.weight||1;if(l.horizontal){const u=o.w*f,h=d.size||c.height;On(d.start)&&(i=d.start),c.fullSize?Hr(c,a.left,i,n.outerWidth-a.right-a.left,h):Hr(c,o.left+d.placed,i,u,h),d.start=i,d.placed+=u,i=c.bottom}else{const u=o.h*f,h=d.size||c.width;On(d.start)&&(s=d.start),c.fullSize?Hr(c,s,a.top,h,n.outerHeight-a.bottom-a.top):Hr(c,s,o.top+d.placed,h,u),d.start=s,d.placed+=u,s=c.right}}o.x=s,o.y=i}var vt={addBox(e,o){e.boxes||(e.boxes=[]),o.fullSize=o.fullSize||!1,o.position=o.position||"top",o.weight=o.weight||0,o._layers=o._layers||function(){return[{z:0,draw(n){o.draw(n)}}]},e.boxes.push(o)},removeBox(e,o){const n=e.boxes?e.boxes.indexOf(o):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,o,n){o.fullSize=n.fullSize,o.position=n.position,o.weight=n.weight},update(e,o,n,r){if(!e)return;const a=At(e.options.layout.padding),s=Math.max(o-a.width,0),i=Math.max(n-a.height,0),l=Xx(e.boxes),c=l.vertical,d=l.horizontal;je(e.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=c.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,u=Object.freeze({outerWidth:o,outerHeight:n,padding:a,availableWidth:s,availableHeight:i,vBoxMaxWidth:s/2/f,hBoxMaxHeight:i/2}),h=Object.assign({},a);Od(h,At(r));const m=Object.assign({maxPadding:h,w:s,h:i,x:a.left,y:a.top},a),p=Kx(c.concat(d),u);qn(l.fullSize,m,u,p),qn(c,m,u,p),qn(d,m,u,p)&&qn(c,m,u,p),Jx(m),Ld(l.leftAndTop,m,u,p),m.x+=m.w,m.y+=m.h,Ld(l.rightAndBottom,m,u,p),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},je(l.chartArea,y=>{const b=y.box;Object.assign(b,e.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Rd{acquireContext(o,n){}releaseContext(o){return!1}addEventListener(o,n,r){}removeEventListener(o,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(o,n,r,a){return n=Math.max(0,n||o.width),r=r||o.height,{width:n,height:Math.max(0,a?Math.floor(n/a):r)}}isAttached(o){return!0}updateConfig(o){}}class Zx extends Rd{acquireContext(o){return o&&o.getContext&&o.getContext("2d")||null}updateConfig(o){o.options.animation=!1}}const qr="$chartjs",ek={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Id=e=>e===null||e==="";function tk(e,o){const n=e.style,r=e.getAttribute("height"),a=e.getAttribute("width");if(e[qr]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Id(a)){const s=cd(e,"width");s!==void 0&&(e.width=s)}if(Id(r))if(e.style.height==="")e.height=e.width/(o||2);else{const s=cd(e,"height");s!==void 0&&(e.height=s)}return e}const Fd=nx?{passive:!0}:!1;function ok(e,o,n){e&&e.addEventListener(o,n,Fd)}function nk(e,o,n){e&&e.canvas&&e.canvas.removeEventListener(o,n,Fd)}function rk(e,o){const n=ek[e.type]||e.type,{x:r,y:a}=zo(e,o);return{type:n,chart:o,native:e,x:r!==void 0?r:null,y:a!==void 0?a:null}}function Gr(e,o){for(const n of e)if(n===o||n.contains(o))return!0}function ak(e,o,n){const r=e.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||Gr(l.addedNodes,r),i=i&&!Gr(l.removedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function sk(e,o,n){const r=e.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||Gr(l.removedNodes,r),i=i&&!Gr(l.addedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const Gn=new Map;let zd=0;function $d(){const e=window.devicePixelRatio;e!==zd&&(zd=e,Gn.forEach((o,n)=>{n.currentDevicePixelRatio!==e&&o()}))}function ik(e,o){Gn.size||window.addEventListener("resize",$d),Gn.set(e,o)}function lk(e){Gn.delete(e),Gn.size||window.removeEventListener("resize",$d)}function ck(e,o,n){const r=e.canvas,a=r&&Vs(r);if(!a)return;const s=Hc((l,c)=>{const d=a.clientWidth;n(l,c),d<a.clientWidth&&n()},window),i=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||s(d,f)});return i.observe(a),ik(e,s),i}function zs(e,o,n){n&&n.disconnect(),o==="resize"&&lk(e)}function dk(e,o,n){const r=e.canvas,a=Hc(s=>{e.ctx!==null&&n(rk(s,e))},e);return ok(r,o,a),a}class fk extends Rd{acquireContext(o,n){const r=o&&o.getContext&&o.getContext("2d");return r&&r.canvas===o?(tk(o,n),r):null}releaseContext(o){const n=o.canvas;if(!n[qr])return!1;const r=n[qr].initial;["height","width"].forEach(s=>{const i=r[s];$e(i)?n.removeAttribute(s):n.setAttribute(s,i)});const a=r.style||{};return Object.keys(a).forEach(s=>{n.style[s]=a[s]}),n.width=n.width,delete n[qr],!0}addEventListener(o,n,r){this.removeEventListener(o,n);const a=o.$proxies||(o.$proxies={}),i={attach:ak,detach:sk,resize:ck}[n]||dk;a[n]=i(o,n,r)}removeEventListener(o,n){const r=o.$proxies||(o.$proxies={}),a=r[n];if(!a)return;({attach:zs,detach:zs,resize:zs}[n]||nk)(o,n,a),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(o,n,r,a){return ox(o,n,r,a)}isAttached(o){const n=o&&Vs(o);return!!(n&&n.isConnected)}}function uk(e){return!Ns()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Zx:fk}let ro=(Sa=class{constructor(){be(this,"x");be(this,"y");be(this,"active",!1);be(this,"options");be(this,"$animations")}tooltipPosition(o){const{x:n,y:r}=this.getProps(["x","y"],o);return{x:n,y:r}}hasValue(){return Rn(this.x)&&Rn(this.y)}getProps(o,n){const r=this.$animations;if(!n||!r)return this;const a={};return o.forEach(s=>{a[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),a}},be(Sa,"defaults",{}),be(Sa,"defaultRoutes"),Sa);function hk(e,o){const n=e.options.ticks,r=mk(e),a=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?gk(o):[],i=s.length,l=s[0],c=s[i-1],d=[];if(i>a)return bk(o,d,s,i/a),d;const f=pk(s,o,a);if(i>0){let u,h;const m=i>1?Math.round((c-l)/(i-1)):null;for(Kr(o,d,f,$e(m)?0:l-m,l),u=0,h=i-1;u<h;u++)Kr(o,d,f,s[u],s[u+1]);return Kr(o,d,f,c,$e(m)?o.length:c+m),d}return Kr(o,d,f),d}function mk(e){const o=e.options.offset,n=e._tickSize(),r=e._length/n+(o?0:1),a=e._maxLength/n;return Math.floor(Math.min(r,a))}function pk(e,o,n){const r=yk(e),a=o.length/n;if(!r)return Math.max(a,1);const s=ty(r);for(let i=0,l=s.length-1;i<l;i++){const c=s[i];if(c>a)return c}return Math.max(a,1)}function gk(e){const o=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&o.push(n);return o}function bk(e,o,n,r){let a=0,s=n[0],i;for(r=Math.ceil(r),i=0;i<e.length;i++)i===s&&(o.push(e[i]),a++,s=n[a*r])}function Kr(e,o,n,r,a){const s=Ae(r,0),i=Math.min(Ae(a,e.length),e.length);let l=0,c,d,f;for(n=Math.ceil(n),a&&(c=a-r,n=c/Math.floor(c/n)),f=s;f<0;)l++,f=Math.round(s+l*n);for(d=Math.max(s,0);d<i;d++)d===f&&(o.push(e[d]),l++,f=Math.round(s+l*n))}function yk(e){const o=e.length;let n,r;if(o<2)return!1;for(r=e[0],n=1;n<o;++n)if(e[n]-e[n-1]!==r)return!1;return r}const xk=e=>e==="left"?"right":e==="right"?"left":e,jd=(e,o,n)=>o==="top"||o==="left"?e[o]+n:e[o]-n,Ud=(e,o)=>Math.min(o||e,e);function Wd(e,o){const n=[],r=e.length/o,a=e.length;let s=0;for(;s<a;s+=r)n.push(e[Math.floor(s)]);return n}function kk(e,o,n){const r=e.ticks.length,a=Math.min(o,r-1),s=e._startPixel,i=e._endPixel,l=1e-6;let c=e.getPixelForTick(a),d;if(!(n&&(r===1?d=Math.max(c-s,i-c):o===0?d=(e.getPixelForTick(1)-c)/2:d=(c-e.getPixelForTick(a-1))/2,c+=a<o?d:-d,c<s-l||c>i+l)))return c}function wk(e,o){je(e,n=>{const r=n.gc,a=r.length/2;let s;if(a>o){for(s=0;s<a;++s)delete n.data[r[s]];r.splice(0,a)}})}function Kn(e){return e.drawTicks?e.tickLength:0}function Hd(e,o){if(!e.display)return 0;const n=lt(e.font,o),r=At(e.padding);return(Ze(e.text)?e.text.length:1)*n.lineHeight+r.height}function Ck(e,o){return Io(e,{scale:o,type:"scale"})}function _k(e,o,n){return Io(e,{tick:n,index:o,type:"tick"})}function Ek(e,o,n){let r=xs(e);return(n&&o!=="right"||!n&&o==="right")&&(r=xk(r)),r}function Bk(e,o,n,r){const{top:a,left:s,bottom:i,right:l,chart:c}=e,{chartArea:d,scales:f}=c;let u=0,h,m,p;const y=i-a,b=l-s;if(e.isHorizontal()){if(m=it(r,s,l),Pe(n)){const g=Object.keys(n)[0],_=n[g];p=f[g].getPixelForValue(_)+y-o}else n==="center"?p=(d.bottom+d.top)/2+y-o:p=jd(e,n,o);h=l-s}else{if(Pe(n)){const g=Object.keys(n)[0],_=n[g];m=f[g].getPixelForValue(_)-b+o}else n==="center"?m=(d.left+d.right)/2-b+o:m=jd(e,n,o);p=it(r,i,a),u=n==="left"?-tt:tt}return{titleX:m,titleY:p,maxWidth:h,rotation:u}}class dn extends ro{constructor(o){super(),this.id=o.id,this.type=o.type,this.options=void 0,this.ctx=o.ctx,this.chart=o.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(o){this.options=o.setContext(this.getContext()),this.axis=o.axis,this._userMin=this.parse(o.min),this._userMax=this.parse(o.max),this._suggestedMin=this.parse(o.suggestedMin),this._suggestedMax=this.parse(o.suggestedMax)}parse(o,n){return o}getUserBounds(){let{_userMin:o,_userMax:n,_suggestedMin:r,_suggestedMax:a}=this;return o=zt(o,Number.POSITIVE_INFINITY),n=zt(n,Number.NEGATIVE_INFINITY),r=zt(r,Number.POSITIVE_INFINITY),a=zt(a,Number.NEGATIVE_INFINITY),{min:zt(o,r),max:zt(n,a),minDefined:at(o),maxDefined:at(n)}}getMinMax(o){let{min:n,max:r,minDefined:a,maxDefined:s}=this.getUserBounds(),i;if(a&&s)return{min:n,max:r};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)i=l[c].controller.getMinMax(this,o),a||(n=Math.min(n,i.min)),s||(r=Math.max(r,i.max));return n=s&&n>r?r:n,r=a&&n>r?n:r,{min:zt(n,zt(r,n)),max:zt(r,zt(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const o=this.chart.data;return this.options.labels||(this.isHorizontal()?o.xLabels:o.yLabels)||o.labels||[]}getLabelItems(o=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(o))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){qe(this.options.beforeUpdate,[this])}update(o,n,r){const{beginAtZero:a,grace:s,ticks:i}=this.options,l=i.sampleSize;this.beforeUpdate(),this.maxWidth=o,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Py(this,s,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?Wd(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=hk(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let o=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,o=!o),this._startPixel=n,this._endPixel=r,this._reversePixels=o,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){qe(this.options.afterUpdate,[this])}beforeSetDimensions(){qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){qe(this.options.afterSetDimensions,[this])}_callHooks(o){this.chart.notifyPlugins(o,this.getContext()),qe(this.options[o],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(o){const n=this.options.ticks;let r,a,s;for(r=0,a=o.length;r<a;r++)s=o[r],s.label=qe(n.callback,[s.value,r,o],this)}afterTickToLabelConversion(){qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const o=this.options,n=o.ticks,r=Ud(this.ticks.length,o.ticks.maxTicksLimit),a=n.minRotation||0,s=n.maxRotation;let i=a,l,c,d;if(!this._isVisible()||!n.display||a>=s||r<=1||!this.isHorizontal()){this.labelRotation=a;return}const f=this._getLabelSizes(),u=f.widest.width,h=f.highest.height,m=st(this.chart.width-u,0,this.maxWidth);l=o.offset?this.maxWidth/r:m/(r-1),u+6>l&&(l=m/(r-(o.offset?.5:1)),c=this.maxHeight-Kn(o.grid)-n.padding-Hd(o.title,this.chart.options.font),d=Math.sqrt(u*u+h*h),i=ay(Math.min(Math.asin(st((f.highest.height+6)/l,-1,1)),Math.asin(st(c/d,-1,1))-Math.asin(st(h/d,-1,1)))),i=Math.max(a,Math.min(s,i))),this.labelRotation=i}afterCalculateLabelRotation(){qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){qe(this.options.beforeFit,[this])}fit(){const o={width:0,height:0},{chart:n,options:{ticks:r,title:a,grid:s}}=this,i=this._isVisible(),l=this.isHorizontal();if(i){const c=Hd(a,n.options.font);if(l?(o.width=this.maxWidth,o.height=Kn(s)+c):(o.height=this.maxHeight,o.width=Kn(s)+c),r.display&&this.ticks.length){const{first:d,last:f,widest:u,highest:h}=this._getLabelSizes(),m=r.padding*2,p=to(this.labelRotation),y=Math.cos(p),b=Math.sin(p);if(l){const g=r.mirror?0:b*u.width+y*h.height;o.height=Math.min(this.maxHeight,o.height+g+m)}else{const g=r.mirror?0:y*u.width+b*h.height;o.width=Math.min(this.maxWidth,o.width+g+m)}this._calculatePadding(d,f,b,y)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=o.height):(this.width=o.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(o,n,r,a){const{ticks:{align:s,padding:i},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;c?d?(h=a*o.width,m=r*n.height):(h=r*o.height,m=a*n.width):s==="start"?m=n.width:s==="end"?h=o.width:s!=="inner"&&(h=o.width/2,m=n.width/2),this.paddingLeft=Math.max((h-f+i)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-u+i)*this.width/(this.width-u),0)}else{let f=n.height/2,u=o.height/2;s==="start"?(f=0,u=o.height):s==="end"&&(f=n.height,u=0),this.paddingTop=f+i,this.paddingBottom=u+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){qe(this.options.afterFit,[this])}isHorizontal(){const{axis:o,position:n}=this.options;return n==="top"||n==="bottom"||o==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(o){this.beforeTickToLabelConversion(),this.generateTickLabels(o);let n,r;for(n=0,r=o.length;n<r;n++)$e(o[n].label)&&(o.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let o=this._labelSizes;if(!o){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Wd(r,n)),this._labelSizes=o=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return o}_computeLabelSizes(o,n,r){const{ctx:a,_longestTextCache:s}=this,i=[],l=[],c=Math.floor(n/Ud(n,r));let d=0,f=0,u,h,m,p,y,b,g,_,E,B,A;for(u=0;u<n;u+=c){if(p=o[u].label,y=this._resolveTickFontOptions(u),a.font=b=y.string,g=s[b]=s[b]||{data:{},gc:[]},_=y.lineHeight,E=B=0,!$e(p)&&!Ze(p))E=Jc(a,g.data,g.gc,E,p),B=_;else if(Ze(p))for(h=0,m=p.length;h<m;++h)A=p[h],!$e(A)&&!Ze(A)&&(E=Jc(a,g.data,g.gc,E,A),B+=_);i.push(E),l.push(B),d=Math.max(E,d),f=Math.max(B,f)}wk(s,n);const C=i.indexOf(d),x=l.indexOf(f),w=D=>({width:i[D]||0,height:l[D]||0});return{first:w(0),last:w(n-1),widest:w(C),highest:w(x),widths:i,heights:l}}getLabelForValue(o){return o}getPixelForValue(o,n){return NaN}getValueForPixel(o){}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getPixelForDecimal(o){this._reversePixels&&(o=1-o);const n=this._startPixel+o*this._length;return iy(this._alignToPixels?Ro(this.chart,n,0):n)}getDecimalForPixel(o){const n=(o-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:o,max:n}=this;return o<0&&n<0?n:o>0&&n>0?o:0}getContext(o){const n=this.ticks||[];if(o>=0&&o<n.length){const r=n[o];return r.$context||(r.$context=_k(this.getContext(),o,r))}return this.$context||(this.$context=Ck(this.chart.getContext(),this))}_tickSize(){const o=this.options.ticks,n=to(this.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),s=this._getLabelSizes(),i=o.autoSkipPadding||0,l=s?s.widest.width+i:0,c=s?s.highest.height+i:0;return this.isHorizontal()?c*r>l*a?l/r:c/a:c*a<l*r?c/r:l/a}_isVisible(){const o=this.options.display;return o!=="auto"?!!o:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(o){const n=this.axis,r=this.chart,a=this.options,{grid:s,position:i,border:l}=a,c=s.offset,d=this.isHorizontal(),u=this.ticks.length+(c?1:0),h=Kn(s),m=[],p=l.setContext(this.getContext()),y=p.display?p.width:0,b=y/2,g=function(O){return Ro(r,O,y)};let _,E,B,A,C,x,w,D,k,v,S,N;if(i==="top")_=g(this.bottom),x=this.bottom-h,D=_-b,v=g(o.top)+b,N=o.bottom;else if(i==="bottom")_=g(this.top),v=o.top,N=g(o.bottom)-b,x=_+b,D=this.top+h;else if(i==="left")_=g(this.right),C=this.right-h,w=_-b,k=g(o.left)+b,S=o.right;else if(i==="right")_=g(this.left),k=o.left,S=g(o.right)-b,C=_+b,w=this.left+h;else if(n==="x"){if(i==="center")_=g((o.top+o.bottom)/2+.5);else if(Pe(i)){const O=Object.keys(i)[0],P=i[O];_=g(this.chart.scales[O].getPixelForValue(P))}v=o.top,N=o.bottom,x=_+b,D=x+h}else if(n==="y"){if(i==="center")_=g((o.left+o.right)/2);else if(Pe(i)){const O=Object.keys(i)[0],P=i[O];_=g(this.chart.scales[O].getPixelForValue(P))}C=_-b,w=C-h,k=o.left,S=o.right}const V=Ae(a.ticks.maxTicksLimit,u),L=Math.max(1,Math.ceil(u/V));for(E=0;E<u;E+=L){const O=this.getContext(E),P=s.setContext(O),R=l.setContext(O),j=P.lineWidth,T=P.color,F=R.dash||[],X=R.dashOffset,H=P.tickWidth,W=P.tickColor,Z=P.tickBorderDash||[],oe=P.tickBorderDashOffset;B=kk(this,E,c),B!==void 0&&(A=Ro(r,B,j),d?C=w=k=S=A:x=D=v=N=A,m.push({tx1:C,ty1:x,tx2:w,ty2:D,x1:k,y1:v,x2:S,y2:N,width:j,color:T,borderDash:F,borderDashOffset:X,tickWidth:H,tickColor:W,tickBorderDash:Z,tickBorderDashOffset:oe}))}return this._ticksLength=u,this._borderValue=_,m}_computeLabelItems(o){const n=this.axis,r=this.options,{position:a,ticks:s}=r,i=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:f,mirror:u}=s,h=Kn(r.grid),m=h+f,p=u?-f:m,y=-to(this.labelRotation),b=[];let g,_,E,B,A,C,x,w,D,k,v,S,N="middle";if(a==="top")C=this.bottom-p,x=this._getXAxisLabelAlignment();else if(a==="bottom")C=this.top+p,x=this._getXAxisLabelAlignment();else if(a==="left"){const L=this._getYAxisLabelAlignment(h);x=L.textAlign,A=L.x}else if(a==="right"){const L=this._getYAxisLabelAlignment(h);x=L.textAlign,A=L.x}else if(n==="x"){if(a==="center")C=(o.top+o.bottom)/2+m;else if(Pe(a)){const L=Object.keys(a)[0],O=a[L];C=this.chart.scales[L].getPixelForValue(O)+m}x=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")A=(o.left+o.right)/2-m;else if(Pe(a)){const L=Object.keys(a)[0],O=a[L];A=this.chart.scales[L].getPixelForValue(O)}x=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(c==="start"?N="top":c==="end"&&(N="bottom"));const V=this._getLabelSizes();for(g=0,_=l.length;g<_;++g){E=l[g],B=E.label;const L=s.setContext(this.getContext(g));w=this.getPixelForTick(g)+s.labelOffset,D=this._resolveTickFontOptions(g),k=D.lineHeight,v=Ze(B)?B.length:1;const O=v/2,P=L.color,R=L.textStrokeColor,j=L.textStrokeWidth;let T=x;i?(A=w,x==="inner"&&(g===_-1?T=this.options.reverse?"left":"right":g===0?T=this.options.reverse?"right":"left":T="center"),a==="top"?d==="near"||y!==0?S=-v*k+k/2:d==="center"?S=-V.highest.height/2-O*k+k:S=-V.highest.height+k/2:d==="near"||y!==0?S=k/2:d==="center"?S=V.highest.height/2-O*k:S=V.highest.height-v*k,u&&(S*=-1),y!==0&&!L.showLabelBackdrop&&(A+=k/2*Math.sin(y))):(C=w,S=(1-v)*k/2);let F;if(L.showLabelBackdrop){const X=At(L.backdropPadding),H=V.heights[g],W=V.widths[g];let Z=S-X.top,oe=0-X.left;switch(N){case"middle":Z-=H/2;break;case"bottom":Z-=H;break}switch(x){case"center":oe-=W/2;break;case"right":oe-=W;break;case"inner":g===_-1?oe-=W:g>0&&(oe-=W/2);break}F={left:oe,top:Z,width:W+X.width,height:H+X.height,color:L.backdropColor}}b.push({label:B,font:D,textOffset:S,options:{rotation:y,color:P,strokeColor:R,strokeWidth:j,textAlign:T,textBaseline:N,translation:[A,C],backdrop:F}})}return b}_getXAxisLabelAlignment(){const{position:o,ticks:n}=this.options;if(-to(this.labelRotation))return o==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(o){const{position:n,ticks:{crossAlign:r,mirror:a,padding:s}}=this.options,i=this._getLabelSizes(),l=o+s,c=i.widest.width;let d,f;return n==="left"?a?(f=this.right+s,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-l,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f=this.left)):n==="right"?a?(f=this.left+s,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+l,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const o=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:o.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:o.width}}drawBackground(){const{ctx:o,options:{backgroundColor:n},left:r,top:a,width:s,height:i}=this;n&&(o.save(),o.fillStyle=n,o.fillRect(r,a,s,i),o.restore())}getLineWidthForValue(o){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(s=>s.value===o);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(o){const n=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(o));let s,i;const l=(c,d,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(s=0,i=a.length;s<i;++s){const c=a[s];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:o,ctx:n,options:{border:r,grid:a}}=this,s=r.setContext(this.getContext()),i=r.display?s.width:0;if(!i)return;const l=a.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,f,u,h;this.isHorizontal()?(d=Ro(o,this.left,i)-i/2,f=Ro(o,this.right,l)+l/2,u=h=c):(u=Ro(o,this.top,i)-i/2,h=Ro(o,this.bottom,l)+l/2,d=f=c),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(d,u),n.lineTo(f,h),n.stroke(),n.restore()}drawLabels(o){if(!this.options.ticks.display)return;const r=this.ctx,a=this._computeLabelArea();a&&Pr(r,a);const s=this.getLabelItems(o);for(const i of s){const l=i.options,c=i.font,d=i.label,f=i.textOffset;jn(r,d,0,f,c,l)}a&&Or(r)}drawTitle(){const{ctx:o,options:{position:n,title:r,reverse:a}}=this;if(!r.display)return;const s=lt(r.font),i=At(r.padding),l=r.align;let c=s.lineHeight/2;n==="bottom"||n==="center"||Pe(n)?(c+=i.bottom,Ze(r.text)&&(c+=s.lineHeight*(r.text.length-1))):c+=i.top;const{titleX:d,titleY:f,maxWidth:u,rotation:h}=Bk(this,c,n,l);jn(o,r.text,0,0,s,{color:r.color,maxWidth:u,rotation:h,textAlign:Ek(l,n,a),textBaseline:"middle",translation:[d,f]})}draw(o){this._isVisible()&&(this.drawBackground(),this.drawGrid(o),this.drawBorder(),this.drawTitle(),this.drawLabels(o))}_layers(){const o=this.options,n=o.ticks&&o.ticks.z||0,r=Ae(o.grid&&o.grid.z,-1),a=Ae(o.border&&o.border.z,0);return!this._isVisible()||this.draw!==dn.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(o){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];let s,i;for(s=0,i=n.length;s<i;++s){const l=n[s];l[r]===this.id&&(!o||l.type===o)&&a.push(l)}return a}_resolveTickFontOptions(o){const n=this.options.ticks.setContext(this.getContext(o));return lt(n.font)}_maxDigits(){const o=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/o}}class Xr{constructor(o,n,r){this.type=o,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(o){return Object.prototype.isPrototypeOf.call(this.type.prototype,o.prototype)}register(o){const n=Object.getPrototypeOf(o);let r;vk(n)&&(r=this.register(n));const a=this.items,s=o.id,i=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+o);return s in a||(a[s]=o,Sk(o,i,r),this.override&&Qe.override(o.id,o.overrides)),i}get(o){return this.items[o]}unregister(o){const n=this.items,r=o.id,a=this.scope;r in n&&delete n[r],a&&r in Qe[a]&&(delete Qe[a][r],this.override&&delete Lo[r])}}function Sk(e,o,n){const r=Tn(Object.create(null),[n?Qe.get(n):{},Qe.get(o),e.defaults]);Qe.set(o,r),e.defaultRoutes&&Ak(o,e.defaultRoutes),e.descriptors&&Qe.describe(o,e.descriptors)}function Ak(e,o){Object.keys(o).forEach(n=>{const r=n.split("."),a=r.pop(),s=[e].concat(r).join("."),i=o[n].split("."),l=i.pop(),c=i.join(".");Qe.route(s,a,c,l)})}function vk(e){return"id"in e&&"defaults"in e}class Dk{constructor(){this.controllers=new Xr(jo,"datasets",!0),this.elements=new Xr(ro,"elements"),this.plugins=new Xr(Object,"plugins"),this.scales=new Xr(dn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...o){this._each("register",o)}remove(...o){this._each("unregister",o)}addControllers(...o){this._each("register",o,this.controllers)}addElements(...o){this._each("register",o,this.elements)}addPlugins(...o){this._each("register",o,this.plugins)}addScales(...o){this._each("register",o,this.scales)}getController(o){return this._get(o,this.controllers,"controller")}getElement(o){return this._get(o,this.elements,"element")}getPlugin(o){return this._get(o,this.plugins,"plugin")}getScale(o){return this._get(o,this.scales,"scale")}removeControllers(...o){this._each("unregister",o,this.controllers)}removeElements(...o){this._each("unregister",o,this.elements)}removePlugins(...o){this._each("unregister",o,this.plugins)}removeScales(...o){this._each("unregister",o,this.scales)}_each(o,n,r){[...n].forEach(a=>{const s=r||this._getRegistryForType(a);r||s.isForType(a)||s===this.plugins&&a.id?this._exec(o,s,a):je(a,i=>{const l=r||this._getRegistryForType(i);this._exec(o,l,i)})})}_exec(o,n,r){const a=gs(o);qe(r["before"+a],[],r),n[o](r),qe(r["after"+a],[],r)}_getRegistryForType(o){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(o))return r}return this.plugins}_get(o,n,r){const a=n.get(o);if(a===void 0)throw new Error('"'+o+'" is not a registered '+r+".");return a}}var jt=new Dk;class Nk{constructor(){this._init=void 0}notify(o,n,r,a){if(n==="beforeInit"&&(this._init=this._createDescriptors(o,!0),this._notify(this._init,o,"install")),this._init===void 0)return;const s=a?this._descriptors(o).filter(a):this._descriptors(o),i=this._notify(s,o,n,r);return n==="afterDestroy"&&(this._notify(s,o,"stop"),this._notify(this._init,o,"uninstall"),this._init=void 0),i}_notify(o,n,r,a){a=a||{};for(const s of o){const i=s.plugin,l=i[r],c=[n,a,s.options];if(qe(l,c,i)===!1&&a.cancelable)return!1}return!0}invalidate(){$e(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(o){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(o);return this._notifyStateChanges(o),n}_createDescriptors(o,n){const r=o&&o.config,a=Ae(r.options&&r.options.plugins,{}),s=Vk(r);return a===!1&&!n?[]:Tk(o,s,a,n)}_notifyStateChanges(o){const n=this._oldCache||[],r=this._cache,a=(s,i)=>s.filter(l=>!i.some(c=>l.plugin.id===c.plugin.id));this._notify(a(n,r),o,"stop"),this._notify(a(r,n),o,"start")}}function Vk(e){const o={},n=[],r=Object.keys(jt.plugins.items);for(let s=0;s<r.length;s++)n.push(jt.getPlugin(r[s]));const a=e.plugins||[];for(let s=0;s<a.length;s++){const i=a[s];n.indexOf(i)===-1&&(n.push(i),o[i.id]=!0)}return{plugins:n,localIds:o}}function Mk(e,o){return!o&&e===!1?null:e===!0?{}:e}function Tk(e,{plugins:o,localIds:n},r,a){const s=[],i=e.getContext();for(const l of o){const c=l.id,d=Mk(r[c],a);d!==null&&s.push({plugin:l,options:Pk(e.config,{plugin:l,local:n[c]},d,i)})}return s}function Pk(e,{plugin:o,local:n},r,a){const s=e.pluginScopeKeys(o),i=e.getOptionScopes(r,s);return n&&o.defaults&&i.push(o.defaults),e.createResolver(i,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $s(e,o){const n=Qe.datasets[e]||{};return((o.datasets||{})[e]||{}).indexAxis||o.indexAxis||n.indexAxis||"x"}function Ok(e,o){let n=e;return e==="_index_"?n=o:e==="_value_"&&(n=o==="x"?"y":"x"),n}function Lk(e,o){return e===o?"_index_":"_value_"}function qd(e){if(e==="x"||e==="y"||e==="r")return e}function Rk(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function js(e,...o){if(qd(e))return e;for(const n of o){const r=n.axis||Rk(n.position)||e.length>1&&qd(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Gd(e,o,n){if(n[o+"AxisID"]===e)return{axis:o}}function Ik(e,o){if(o.data&&o.data.datasets){const n=o.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Gd(e,"x",n[0])||Gd(e,"y",n[0])}return{}}function Fk(e,o){const n=Lo[e.type]||{scales:{}},r=o.scales||{},a=$s(e.type,o),s=Object.create(null);return Object.keys(r).forEach(i=>{const l=r[i];if(!Pe(l))return console.error(`Invalid scale configuration for scale: ${i}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const c=js(i,l,Ik(i,e),Qe.scales[l.type]),d=Lk(c,a),f=n.scales||{};s[i]=Pn(Object.create(null),[{axis:c},l,f[c],f[d]])}),e.data.datasets.forEach(i=>{const l=i.type||e.type,c=i.indexAxis||$s(l,o),f=(Lo[l]||{}).scales||{};Object.keys(f).forEach(u=>{const h=Ok(u,c),m=i[h+"AxisID"]||h;s[m]=s[m]||Object.create(null),Pn(s[m],[{axis:h},r[m],f[u]])})}),Object.keys(s).forEach(i=>{const l=s[i];Pn(l,[Qe.scales[l.type],Qe.scale])}),s}function Kd(e){const o=e.options||(e.options={});o.plugins=Ae(o.plugins,{}),o.scales=Fk(e,o)}function Xd(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function zk(e){return e=e||{},e.data=Xd(e.data),Kd(e),e}const Yd=new Map,Jd=new Set;function Yr(e,o){let n=Yd.get(e);return n||(n=o(),Yd.set(e,n),Jd.add(n)),n}const Xn=(e,o,n)=>{const r=To(o,n);r!==void 0&&e.add(r)};class $k{constructor(o){this._config=zk(o),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(o){this._config.type=o}get data(){return this._config.data}set data(o){this._config.data=Xd(o)}get options(){return this._config.options}set options(o){this._config.options=o}get plugins(){return this._config.plugins}update(){const o=this._config;this.clearCache(),Kd(o)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(o){return Yr(o,()=>[[`datasets.${o}`,""]])}datasetAnimationScopeKeys(o,n){return Yr(`${o}.transition.${n}`,()=>[[`datasets.${o}.transitions.${n}`,`transitions.${n}`],[`datasets.${o}`,""]])}datasetElementScopeKeys(o,n){return Yr(`${o}-${n}`,()=>[[`datasets.${o}.elements.${n}`,`datasets.${o}`,`elements.${n}`,""]])}pluginScopeKeys(o){const n=o.id,r=this.type;return Yr(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...o.additionalOptionScopes||[]]])}_cachedScopes(o,n){const r=this._scopeCache;let a=r.get(o);return(!a||n)&&(a=new Map,r.set(o,a)),a}getOptionScopes(o,n,r){const{options:a,type:s}=this,i=this._cachedScopes(o,r),l=i.get(n);if(l)return l;const c=new Set;n.forEach(f=>{o&&(c.add(o),f.forEach(u=>Xn(c,o,u))),f.forEach(u=>Xn(c,a,u)),f.forEach(u=>Xn(c,Lo[s]||{},u)),f.forEach(u=>Xn(c,Qe,u)),f.forEach(u=>Xn(c,_s,u))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),Jd.has(n)&&i.set(n,d),d}chartOptionScopes(){const{options:o,type:n}=this;return[o,Lo[n]||{},Qe.datasets[n]||{},{type:n},Qe,_s]}resolveNamedOptions(o,n,r,a=[""]){const s={$shared:!0},{resolver:i,subPrefixes:l}=Qd(this._resolverCache,o,a);let c=i;if(Uk(i,n)){s.$shared=!1,r=xo(r)?r():r;const d=this.createResolver(o,r,l);c=an(i,r,d)}for(const d of n)s[d]=c[d];return s}createResolver(o,n,r=[""],a){const{resolver:s}=Qd(this._resolverCache,o,r);return Pe(n)?an(s,n,void 0,a):s}}function Qd(e,o,n){let r=e.get(o);r||(r=new Map,e.set(o,r));const a=n.join();let s=r.get(a);return s||(s={resolver:As(o,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(a,s)),s}const jk=e=>Pe(e)&&Object.getOwnPropertyNames(e).some(o=>xo(e[o]));function Uk(e,o){const{isScriptable:n,isIndexable:r}=td(e);for(const a of o){const s=n(a),i=r(a),l=(i||s)&&e[a];if(s&&(xo(l)||jk(l))||i&&Ze(l))return!0}return!1}var Wk="4.5.1";const Hk=["top","bottom","left","right","chartArea"];function Zd(e,o){return e==="top"||e==="bottom"||Hk.indexOf(e)===-1&&o==="x"}function ef(e,o){return function(n,r){return n[e]===r[e]?n[o]-r[o]:n[e]-r[e]}}function tf(e){const o=e.chart,n=o.options.animation;o.notifyPlugins("afterRender"),qe(n&&n.onComplete,[e],o)}function qk(e){const o=e.chart,n=o.options.animation;qe(n&&n.onProgress,[e],o)}function of(e){return Ns()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Jr={},nf=e=>{const o=of(e);return Object.values(Jr).filter(n=>n.canvas===o).pop()};function Gk(e,o,n){const r=Object.keys(e);for(const a of r){const s=+a;if(s>=o){const i=e[a];delete e[a],(n>0||s>o)&&(e[s+n]=i)}}}function Kk(e,o,n,r){return!n||e.type==="mouseout"?null:r?o:e}class ao{static register(...o){jt.add(...o),rf()}static unregister(...o){jt.remove(...o),rf()}constructor(o,n){const r=this.config=new $k(n),a=of(o),s=nf(a);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||uk(a)),this.platform.updateConfig(r);const l=this.platform.acquireContext(a,i.aspectRatio),c=l&&l.canvas,d=c&&c.height,f=c&&c.width;if(this.id=q0(),this.ctx=l,this.canvas=c,this.width=f,this.height=d,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Nk,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fy(u=>this.update(u),i.resizeDelay||0),this._dataChanges=[],Jr[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}no.listen(this,"complete",tf),no.listen(this,"progress",qk),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:o,maintainAspectRatio:n},width:r,height:a,_aspectRatio:s}=this;return $e(o)?n&&s?s:a?r/a:null:o}get data(){return this.config.data}set data(o){this.config.data=o}get options(){return this._options}set options(o){this.config.options=o}get registry(){return jt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ld(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Qc(this.canvas,this.ctx),this}stop(){return no.stop(this),this}resize(o,n){no.running(this)?this._resizeBeforeDraw={width:o,height:n}:this._resize(o,n)}_resize(o,n){const r=this.options,a=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(a,o,n,s),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,ld(this,l,!0)&&(this.notifyPlugins("resize",{size:i}),qe(r.onResize,[this,i],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};je(n,(r,a)=>{r.id=a})}buildOrUpdateScales(){const o=this.options,n=o.scales,r=this.scales,a=Object.keys(r).reduce((i,l)=>(i[l]=!1,i),{});let s=[];n&&(s=s.concat(Object.keys(n).map(i=>{const l=n[i],c=js(i,l),d=c==="r",f=c==="x";return{options:l,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),je(s,i=>{const l=i.options,c=l.id,d=js(c,l),f=Ae(l.type,i.dtype);(l.position===void 0||Zd(l.position,d)!==Zd(i.dposition))&&(l.position=i.dposition),a[c]=!0;let u=null;if(c in r&&r[c].type===f)u=r[c];else{const h=jt.getScale(f);u=new h({id:c,type:f,ctx:this.ctx,chart:this}),r[u.id]=u}u.init(l,o)}),je(a,(i,l)=>{i||delete r[l]}),je(r,i=>{vt.configure(this,i,i.options),vt.addBox(this,i)})}_updateMetasets(){const o=this._metasets,n=this.data.datasets.length,r=o.length;if(o.sort((a,s)=>a.index-s.index),r>n){for(let a=n;a<r;++a)this._destroyDatasetMeta(a);o.splice(n,r-n)}this._sortedMetasets=o.slice(0).sort(ef("order","index"))}_removeUnreferencedMetasets(){const{_metasets:o,data:{datasets:n}}=this;o.length>n.length&&delete this._stacks,o.forEach((r,a)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const o=[],n=this.data.datasets;let r,a;for(this._removeUnreferencedMetasets(),r=0,a=n.length;r<a;r++){const s=n[r];let i=this.getDatasetMeta(r);const l=s.type||this.config.type;if(i.type&&i.type!==l&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=l,i.indexAxis=s.indexAxis||$s(l,this.options),i.order=s.order||0,i.index=r,i.label=""+s.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const c=jt.getController(l),{datasetElementType:d,dataElementType:f}=Qe.datasets[l];Object.assign(c,{dataElementType:jt.getElement(f),datasetElementType:d&&jt.getElement(d)}),i.controller=new c(this,r),o.push(i.controller)}}return this._updateMetasets(),o}_resetElements(){je(this.data.datasets,(o,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(o){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:o,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let d=0,f=this.data.datasets.length;d<f;d++){const{controller:u}=this.getDatasetMeta(d),h=!a&&s.indexOf(u)===-1;u.buildOrUpdateElements(h),i=Math.max(+u.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),a||je(s,d=>{d.reset()}),this._updateDatasets(o),this.notifyPlugins("afterUpdate",{mode:o}),this._layers.sort(ef("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){je(this.scales,o=>{vt.removeBox(this,o)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const o=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(o.events);(!Oc(n,r)||!!this._responsiveListeners!==o.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:o}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:a,count:s}of n){const i=r==="_removeElements"?-s:s;Gk(o,a,i)}}_getUniformDataChanges(){const o=this._dataChanges;if(!o||!o.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(o.filter(i=>i[0]===s).map((i,l)=>l+","+i.splice(1).join(","))),a=r(0);for(let s=1;s<n;s++)if(!Oc(a,r(s)))return;return Array.from(a).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(o){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;vt.update(this,this.width,this.height,o);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],je(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,s)=>{a._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(o){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:o,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,xo(o)?o({datasetIndex:n}):o);this.notifyPlugins("afterDatasetsUpdate",{mode:o})}}_updateDataset(o,n){const r=this.getDatasetMeta(o),a={meta:r,index:o,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(no.has(this)?this.attached&&!no.running(this)&&no.start(this):(this.draw(),tf({chart:this})))}draw(){let o;if(this._resizeBeforeDraw){const{width:r,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(o=0;o<n.length&&n[o].z<=0;++o)n[o].draw(this.chartArea);for(this._drawDatasets();o<n.length;++o)n[o].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(o){const n=this._sortedMetasets,r=[];let a,s;for(a=0,s=n.length;a<s;++a){const i=n[a];(!o||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const o=this.getSortedVisibleDatasetMetas();for(let n=o.length-1;n>=0;--n)this._drawDataset(o[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(o){const n=this.ctx,r={meta:o,index:o.index,cancelable:!0},a=yd(this,o);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&Pr(n,a),o.controller.draw(),a&&Or(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(o){return $n(o,this.chartArea,this._minPadding)}getElementsAtEventForMode(o,n,r,a){const s=Hx.modes[n];return typeof s=="function"?s(this,o,r,a):[]}getDatasetMeta(o){const n=this.data.datasets[o],r=this._metasets;let a=r.filter(s=>s&&s._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:o,_dataset:n,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=Io(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(o){const n=this.data.datasets[o];if(!n)return!1;const r=this.getDatasetMeta(o);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(o,n){const r=this.getDatasetMeta(o);r.hidden=!n}toggleDataVisibility(o){this._hiddenIndices[o]=!this._hiddenIndices[o]}getDataVisibility(o){return!this._hiddenIndices[o]}_updateVisibility(o,n,r){const a=r?"show":"hide",s=this.getDatasetMeta(o),i=s.controller._resolveAnimations(void 0,a);On(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(o,r),i.update(s,{visible:r}),this.update(l=>l.datasetIndex===o?a:void 0))}hide(o,n){this._updateVisibility(o,n,!1)}show(o,n){this._updateVisibility(o,n,!0)}_destroyDatasetMeta(o){const n=this._metasets[o];n&&n.controller&&n.controller._destroy(),delete this._metasets[o]}_stop(){let o,n;for(this.stop(),no.remove(this),o=0,n=this.data.datasets.length;o<n;++o)this._destroyDatasetMeta(o)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:o,ctx:n}=this;this._stop(),this.config.clearCache(),o&&(this.unbindEvents(),Qc(o,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Jr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...o){return this.canvas.toDataURL(...o)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const o=this._listeners,n=this.platform,r=(s,i)=>{n.addEventListener(this,s,i),o[s]=i},a=(s,i,l)=>{s.offsetX=i,s.offsetY=l,this._eventHandler(s)};je(this.options.events,s=>r(s,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const o=this._responsiveListeners,n=this.platform,r=(c,d)=>{n.addEventListener(this,c,d),o[c]=d},a=(c,d)=>{o[c]&&(n.removeEventListener(this,c,d),delete o[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)};let i;const l=()=>{a("attach",l),this.attached=!0,this.resize(),r("resize",s),r("detach",i)};i=()=>{this.attached=!1,a("resize",s),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():i()}unbindEvents(){je(this._listeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._listeners={},je(this._responsiveListeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._responsiveListeners=void 0}updateHoverStyle(o,n,r){const a=r?"set":"remove";let s,i,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(o[0].datasetIndex),s.controller["_"+a+"DatasetHoverStyle"]()),l=0,c=o.length;l<c;++l){i=o[l];const d=i&&this.getDatasetMeta(i.datasetIndex).controller;d&&d[a+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(o){const n=this._active||[],r=o.map(({datasetIndex:s,index:i})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[i],index:i}});!Nr(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(o,n,r){return this._plugins.notify(this,o,n,r)}isPluginEnabled(o){return this._plugins._cache.filter(n=>n.plugin.id===o).length===1}_updateHoverStyles(o,n,r){const a=this.options.hover,s=(c,d)=>c.filter(f=>!d.some(u=>f.datasetIndex===u.datasetIndex&&f.index===u.index)),i=s(n,o),l=r?o:s(o,n);i.length&&this.updateHoverStyle(i,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(o,n){const r={event:o,replay:n,cancelable:!0,inChartArea:this.isPointInArea(o)},a=i=>(i.options.events||this.options.events).includes(o.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;const s=this._handleEvent(o,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(s||r.changed)&&this.render(),this}_handleEvent(o,n,r){const{_active:a=[],options:s}=this,i=n,l=this._getActiveElements(o,a,r,i),c=Q0(o),d=Kk(o,this._lastEvent,r,c);r&&(this._lastEvent=null,qe(s.onHover,[o,l,this],this),c&&qe(s.onClick,[o,l,this],this));const f=!Nr(l,a);return(f||n)&&(this._active=l,this._updateHoverStyles(l,a,n)),this._lastEvent=d,f}_getActiveElements(o,n,r,a){if(o.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(o,s.mode,s,a)}}be(ao,"defaults",Qe),be(ao,"instances",Jr),be(ao,"overrides",Lo),be(ao,"registry",jt),be(ao,"version",Wk),be(ao,"getChart",nf);function rf(){return je(ao.instances,e=>e._plugins.invalidate())}function Xk(e,o,n){const{startAngle:r,x:a,y:s,outerRadius:i,innerRadius:l,options:c}=o,{borderWidth:d,borderJoinStyle:f}=c,u=Math.min(d/i,yt(r-n));if(e.beginPath(),e.arc(a,s,i-d/2,r+u/2,n-u/2),l>0){const h=Math.min(d/l,yt(r-n));e.arc(a,s,l+d/2,n-h/2,r+h/2,!0)}else{const h=Math.min(d/2,i*yt(r-n));if(f==="round")e.arc(a,s,h,n-Ue/2,r+Ue/2,!0);else if(f==="bevel"){const m=2*h*h,p=-m*Math.cos(n+Ue/2)+a,y=-m*Math.sin(n+Ue/2)+s,b=m*Math.cos(r+Ue/2)+a,g=m*Math.sin(r+Ue/2)+s;e.lineTo(p,y),e.lineTo(b,g)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Yk(e,o,n){const{startAngle:r,pixelMargin:a,x:s,y:i,outerRadius:l,innerRadius:c}=o;let d=a/l;e.beginPath(),e.arc(s,i,l,r-d,n+d),c>a?(d=a/c,e.arc(s,i,c,n+d,r-d,!0)):e.arc(s,i,a,n+tt,r-tt),e.closePath(),e.clip()}function Jk(e){return Ss(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Qk(e,o,n,r){const a=Jk(e.options.borderRadius),s=(n-o)/2,i=Math.min(s,r*o/2),l=c=>{const d=(n-Math.min(s,c))*r/2;return st(c,0,Math.min(s,d))};return{outerStart:l(a.outerStart),outerEnd:l(a.outerEnd),innerStart:st(a.innerStart,0,i),innerEnd:st(a.innerEnd,0,i)}}function fn(e,o,n,r){return{x:n+e*Math.cos(o),y:r+e*Math.sin(o)}}function Qr(e,o,n,r,a,s){const{x:i,y:l,startAngle:c,pixelMargin:d,innerRadius:f}=o,u=Math.max(o.outerRadius+r+n-d,0),h=f>0?f+r+n+d:0;let m=0;const p=a-c;if(r){const L=f>0?f-r:0,O=u>0?u-r:0,P=(L+O)/2,R=P!==0?p*P/(P+r):p;m=(p-R)/2}const y=Math.max(.001,p*u-n/Ue)/u,b=(p-y)/2,g=c+b+m,_=a-b-m,{outerStart:E,outerEnd:B,innerStart:A,innerEnd:C}=Qk(o,h,u,_-g),x=u-E,w=u-B,D=g+E/x,k=_-B/w,v=h+A,S=h+C,N=g+A/v,V=_-C/S;if(e.beginPath(),s){const L=(D+k)/2;if(e.arc(i,l,u,D,L),e.arc(i,l,u,L,k),B>0){const j=fn(w,k,i,l);e.arc(j.x,j.y,B,k,_+tt)}const O=fn(S,_,i,l);if(e.lineTo(O.x,O.y),C>0){const j=fn(S,V,i,l);e.arc(j.x,j.y,C,_+tt,V+Math.PI)}const P=(_-C/h+(g+A/h))/2;if(e.arc(i,l,h,_-C/h,P,!0),e.arc(i,l,h,P,g+A/h,!0),A>0){const j=fn(v,N,i,l);e.arc(j.x,j.y,A,N+Math.PI,g-tt)}const R=fn(x,g,i,l);if(e.lineTo(R.x,R.y),E>0){const j=fn(x,D,i,l);e.arc(j.x,j.y,E,g-tt,D)}}else{e.moveTo(i,l);const L=Math.cos(D)*u+i,O=Math.sin(D)*u+l;e.lineTo(L,O);const P=Math.cos(k)*u+i,R=Math.sin(k)*u+l;e.lineTo(P,R)}e.closePath()}function Zk(e,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l}=o;let c=o.endAngle;if(s){Qr(e,o,n,r,c,a);for(let d=0;d<s;++d)e.fill();isNaN(l)||(c=i+(l%Ke||Ke))}return Qr(e,o,n,r,c,a),e.fill(),c}function e1(e,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l,options:c}=o,{borderWidth:d,borderJoinStyle:f,borderDash:u,borderDashOffset:h,borderRadius:m}=c,p=c.borderAlign==="inner";if(!d)return;e.setLineDash(u||[]),e.lineDashOffset=h,p?(e.lineWidth=d*2,e.lineJoin=f||"round"):(e.lineWidth=d,e.lineJoin=f||"bevel");let y=o.endAngle;if(s){Qr(e,o,n,r,y,a);for(let b=0;b<s;++b)e.stroke();isNaN(l)||(y=i+(l%Ke||Ke))}p&&Yk(e,o,y),c.selfJoin&&y-i>=Ue&&m===0&&f!=="miter"&&Xk(e,o,y),s||(Qr(e,o,n,r,y,a),e.stroke())}class Yn extends ro{constructor(n){super();be(this,"circumference");be(this,"endAngle");be(this,"fullCircles");be(this,"innerRadius");be(this,"outerRadius");be(this,"pixelMargin");be(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.getProps(["x","y"],a),{angle:i,distance:l}=zc(s,{x:n,y:r}),{startAngle:c,endAngle:d,innerRadius:f,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),m=(this.options.spacing+this.options.borderWidth)/2,p=Ae(h,d-c),y=In(i,c,d)&&c!==d,b=p>=Ke||y,g=oo(l,f+m,u+m);return b&&g}getCenterPoint(n){const{x:r,y:a,startAngle:s,endAngle:i,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:d,spacing:f}=this.options,u=(s+i)/2,h=(l+c+f+d)/2;return{x:r+Math.cos(u)*h,y:a+Math.sin(u)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:a}=this,s=(r.offset||0)/4,i=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=a>Ke?Math.floor(a/Ke):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*s,Math.sin(c)*s);const d=1-Math.sin(Math.min(Ue,a||0)),f=s*d;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,Zk(n,this,f,i,l),e1(n,this,f,i,l),n.restore()}}be(Yn,"id","arc"),be(Yn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),be(Yn,"defaultRoutes",{backgroundColor:"backgroundColor"}),be(Yn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function af(e,o,n=o){e.lineCap=Ae(n.borderCapStyle,o.borderCapStyle),e.setLineDash(Ae(n.borderDash,o.borderDash)),e.lineDashOffset=Ae(n.borderDashOffset,o.borderDashOffset),e.lineJoin=Ae(n.borderJoinStyle,o.borderJoinStyle),e.lineWidth=Ae(n.borderWidth,o.borderWidth),e.strokeStyle=Ae(n.borderColor,o.borderColor)}function t1(e,o,n){e.lineTo(n.x,n.y)}function o1(e){return e.stepped?By:e.tension||e.cubicInterpolationMode==="monotone"?Sy:t1}function sf(e,o,n={}){const r=e.length,{start:a=0,end:s=r-1}=n,{start:i,end:l}=o,c=Math.max(a,i),d=Math.min(s,l),f=a<i&&s<i||a>l&&s>l;return{count:r,start:c,loop:o.loop,ilen:d<c&&!f?r+d-c:d-c}}function n1(e,o,n,r){const{points:a,options:s}=o,{count:i,start:l,loop:c,ilen:d}=sf(a,n,r),f=o1(s);let{move:u=!0,reverse:h}=r||{},m,p,y;for(m=0;m<=d;++m)p=a[(l+(h?d-m:m))%i],!p.skip&&(u?(e.moveTo(p.x,p.y),u=!1):f(e,y,p,h,s.stepped),y=p);return c&&(p=a[(l+(h?d:0))%i],f(e,y,p,h,s.stepped)),!!c}function r1(e,o,n,r){const a=o.points,{count:s,start:i,ilen:l}=sf(a,n,r),{move:c=!0,reverse:d}=r||{};let f=0,u=0,h,m,p,y,b,g;const _=B=>(i+(d?l-B:B))%s,E=()=>{y!==b&&(e.lineTo(f,b),e.lineTo(f,y),e.lineTo(f,g))};for(c&&(m=a[_(0)],e.moveTo(m.x,m.y)),h=0;h<=l;++h){if(m=a[_(h)],m.skip)continue;const B=m.x,A=m.y,C=B|0;C===p?(A<y?y=A:A>b&&(b=A),f=(u*f+B)/++u):(E(),e.lineTo(B,A),p=C,u=0,y=b=A),g=A}E()}function Us(e){const o=e.options,n=o.borderDash&&o.borderDash.length;return!e._decimated&&!e._loop&&!o.tension&&o.cubicInterpolationMode!=="monotone"&&!o.stepped&&!n?r1:n1}function a1(e){return e.stepped?rx:e.tension||e.cubicInterpolationMode==="monotone"?ax:$o}function s1(e,o,n,r){let a=o._path;a||(a=o._path=new Path2D,o.path(a,n,r)&&a.closePath()),af(e,o.options),e.stroke(a)}function i1(e,o,n,r){const{segments:a,options:s}=o,i=Us(o);for(const l of a)af(e,s,l.style),e.beginPath(),i(e,o,l,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const l1=typeof Path2D=="function";function c1(e,o,n,r){l1&&!o.options.segment?s1(e,o,n,r):i1(e,o,n,r)}class wo extends ro{constructor(o){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,o&&Object.assign(this,o)}updateControlPoints(o,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const a=r.spanGaps?this._loop:this._fullLoop;Yy(this._points,r,o,a,n),this._pointsUpdated=!0}}set points(o){this._points=o,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=fx(this,this.options.segment))}first(){const o=this.segments,n=this.points;return o.length&&n[o[0].start]}last(){const o=this.segments,n=this.points,r=o.length;return r&&n[o[r-1].end]}interpolate(o,n){const r=this.options,a=o[n],s=this.points,i=pd(this,{property:n,start:a,end:a});if(!i.length)return;const l=[],c=a1(r);let d,f;for(d=0,f=i.length;d<f;++d){const{start:u,end:h}=i[d],m=s[u],p=s[h];if(m===p){l.push(m);continue}const y=Math.abs((a-m[n])/(p[n]-m[n])),b=c(m,p,y,r.stepped);b[n]=o[n],l.push(b)}return l.length===1?l[0]:l}pathSegment(o,n,r){return Us(this)(o,this,n,r)}path(o,n,r){const a=this.segments,s=Us(this);let i=this._loop;n=n||0,r=r||this.points.length-n;for(const l of a)i&=s(o,this,l,{start:n,end:n+r-1});return!!i}draw(o,n,r,a){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(o.save(),c1(o,this,r,a),o.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}be(wo,"id","line"),be(wo,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),be(wo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),be(wo,"descriptors",{_scriptable:!0,_indexable:o=>o!=="borderDash"&&o!=="fill"});function lf(e,o,n,r){const a=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(o-s)<a.radius+a.hitRadius}class Zr extends ro{constructor(n){super();be(this,"parsed");be(this,"skip");be(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.options,{x:i,y:l}=this.getProps(["x","y"],a);return Math.pow(n-i,2)+Math.pow(r-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return lf(this,n,"x",r)}inYRange(n,r){return lf(this,n,"y",r)}getCenterPoint(n){const{x:r,y:a}=this.getProps(["x","y"],n);return{x:r,y:a}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const a=r&&n.borderWidth||0;return(r+a)*2}draw(n,r){const a=this.options;this.skip||a.radius<.1||!$n(this,r,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,Bs(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}be(Zr,"id","point"),be(Zr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),be(Zr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function cf(e,o){const{x:n,y:r,base:a,width:s,height:i}=e.getProps(["x","y","base","width","height"],o);let l,c,d,f,u;return e.horizontal?(u=i/2,l=Math.min(n,a),c=Math.max(n,a),d=r-u,f=r+u):(u=s/2,l=n-u,c=n+u,d=Math.min(r,a),f=Math.max(r,a)),{left:l,top:d,right:c,bottom:f}}function Co(e,o,n,r){return e?0:st(o,n,r)}function d1(e,o,n){const r=e.options.borderWidth,a=e.borderSkipped,s=ed(r);return{t:Co(a.top,s.top,0,n),r:Co(a.right,s.right,0,o),b:Co(a.bottom,s.bottom,0,n),l:Co(a.left,s.left,0,o)}}function f1(e,o,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),a=e.options.borderRadius,s=rn(a),i=Math.min(o,n),l=e.borderSkipped,c=r||Pe(a);return{topLeft:Co(!c||l.top||l.left,s.topLeft,0,i),topRight:Co(!c||l.top||l.right,s.topRight,0,i),bottomLeft:Co(!c||l.bottom||l.left,s.bottomLeft,0,i),bottomRight:Co(!c||l.bottom||l.right,s.bottomRight,0,i)}}function u1(e){const o=cf(e),n=o.right-o.left,r=o.bottom-o.top,a=d1(e,n/2,r/2),s=f1(e,n/2,r/2);return{outer:{x:o.left,y:o.top,w:n,h:r,radius:s},inner:{x:o.left+a.l,y:o.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,s.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(a.b,a.r))}}}}function Ws(e,o,n,r){const a=o===null,s=n===null,l=e&&!(a&&s)&&cf(e,r);return l&&(a||oo(o,l.left,l.right))&&(s||oo(n,l.top,l.bottom))}function h1(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function m1(e,o){e.rect(o.x,o.y,o.w,o.h)}function Hs(e,o,n={}){const r=e.x!==n.x?-o:0,a=e.y!==n.y?-o:0,s=(e.x+e.w!==n.x+n.w?o:0)-r,i=(e.y+e.h!==n.y+n.h?o:0)-a;return{x:e.x+r,y:e.y+a,w:e.w+s,h:e.h+i,radius:e.radius}}class ea extends ro{constructor(o){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,o&&Object.assign(this,o)}draw(o){const{inflateAmount:n,options:{borderColor:r,backgroundColor:a}}=this,{inner:s,outer:i}=u1(this),l=h1(i.radius)?Lr:m1;o.save(),(i.w!==s.w||i.h!==s.h)&&(o.beginPath(),l(o,Hs(i,n,s)),o.clip(),l(o,Hs(s,-n,i)),o.fillStyle=r,o.fill("evenodd")),o.beginPath(),l(o,Hs(s,n)),o.fillStyle=a,o.fill(),o.restore()}inRange(o,n,r){return Ws(this,o,n,r)}inXRange(o,n){return Ws(this,o,null,n)}inYRange(o,n){return Ws(this,null,o,n)}getCenterPoint(o){const{x:n,y:r,base:a,horizontal:s}=this.getProps(["x","y","base","horizontal"],o);return{x:s?(n+a)/2:n,y:s?r:(r+a)/2}}getRange(o){return o==="x"?this.width/2:this.height/2}}be(ea,"id","bar"),be(ea,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),be(ea,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function p1(e,o,n){const r=e.segments,a=e.points,s=o.points,i=[];for(const l of r){let{start:c,end:d}=l;d=ta(c,d,a);const f=qs(n,a[c],a[d],l.loop);if(!o.segments){i.push({source:l,target:f,start:a[c],end:a[d]});continue}const u=pd(o,f);for(const h of u){const m=qs(n,s[h.start],s[h.end],h.loop),p=md(l,a,m);for(const y of p)i.push({source:y,target:h,start:{[n]:df(f,m,"start",Math.max)},end:{[n]:df(f,m,"end",Math.min)}})}}return i}function qs(e,o,n,r){if(r)return;let a=o[e],s=n[e];return e==="angle"&&(a=yt(a),s=yt(s)),{property:e,start:a,end:s}}function g1(e,o){const{x:n=null,y:r=null}=e||{},a=o.points,s=[];return o.segments.forEach(({start:i,end:l})=>{l=ta(i,l,a);const c=a[i],d=a[l];r!==null?(s.push({x:c.x,y:r}),s.push({x:d.x,y:r})):n!==null&&(s.push({x:n,y:c.y}),s.push({x:n,y:d.y}))}),s}function ta(e,o,n){for(;o>e;o--){const r=n[o];if(!isNaN(r.x)&&!isNaN(r.y))break}return o}function df(e,o,n,r){return e&&o?r(e[n],o[n]):e?e[n]:o?o[n]:0}function ff(e,o){let n=[],r=!1;return Ze(e)?(r=!0,n=e):n=g1(e,o),n.length?new wo({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function uf(e){return e&&e.fill!==!1}function b1(e,o,n){let a=e[o].fill;const s=[o];let i;if(!n)return a;for(;a!==!1&&s.indexOf(a)===-1;){if(!at(a))return a;if(i=e[a],!i)return!1;if(i.visible)return a;s.push(a),a=i.fill}return!1}function y1(e,o,n){const r=C1(e);if(Pe(r))return isNaN(r.value)?!1:r;let a=parseFloat(r);return at(a)&&Math.floor(a)===a?x1(r[0],o,a,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function x1(e,o,n,r){return(e==="-"||e==="+")&&(n=o+n),n===o||n<0||n>=r?!1:n}function k1(e,o){let n=null;return e==="start"?n=o.bottom:e==="end"?n=o.top:Pe(e)?n=o.getPixelForValue(e.value):o.getBasePixel&&(n=o.getBasePixel()),n}function w1(e,o,n){let r;return e==="start"?r=n:e==="end"?r=o.options.reverse?o.min:o.max:Pe(e)?r=e.value:r=o.getBaseValue(),r}function C1(e){const o=e.options,n=o.fill;let r=Ae(n&&n.target,n);return r===void 0&&(r=!!o.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function _1(e){const{scale:o,index:n,line:r}=e,a=[],s=r.segments,i=r.points,l=E1(o,n);l.push(ff({x:null,y:o.bottom},r));for(let c=0;c<s.length;c++){const d=s[c];for(let f=d.start;f<=d.end;f++)B1(a,i[f],l)}return new wo({points:a,options:{}})}function E1(e,o){const n=[],r=e.getMatchingVisibleMetas("line");for(let a=0;a<r.length;a++){const s=r[a];if(s.index===o)break;s.hidden||n.unshift(s.dataset)}return n}function B1(e,o,n){const r=[];for(let a=0;a<n.length;a++){const s=n[a],{first:i,last:l,point:c}=S1(s,o,"x");if(!(!c||i&&l)){if(i)r.unshift(c);else if(e.push(c),!l)break}}e.push(...r)}function S1(e,o,n){const r=e.interpolate(o,n);if(!r)return{};const a=r[n],s=e.segments,i=e.points;let l=!1,c=!1;for(let d=0;d<s.length;d++){const f=s[d],u=i[f.start][n],h=i[f.end][n];if(oo(a,u,h)){l=a===u,c=a===h;break}}return{first:l,last:c,point:r}}class hf{constructor(o){this.x=o.x,this.y=o.y,this.radius=o.radius}pathSegment(o,n,r){const{x:a,y:s,radius:i}=this;return n=n||{start:0,end:Ke},o.arc(a,s,i,n.end,n.start,!0),!r.bounds}interpolate(o){const{x:n,y:r,radius:a}=this,s=o.angle;return{x:n+Math.cos(s)*a,y:r+Math.sin(s)*a,angle:s}}}function A1(e){const{chart:o,fill:n,line:r}=e;if(at(n))return v1(o,n);if(n==="stack")return _1(e);if(n==="shape")return!0;const a=D1(e);return a instanceof hf?a:ff(a,r)}function v1(e,o){const n=e.getDatasetMeta(o);return n&&e.isDatasetVisible(o)?n.dataset:null}function D1(e){return(e.scale||{}).getPointPositionForValue?V1(e):N1(e)}function N1(e){const{scale:o={},fill:n}=e,r=k1(n,o);if(at(r)){const a=o.isHorizontal();return{x:a?r:null,y:a?null:r}}return null}function V1(e){const{scale:o,fill:n}=e,r=o.options,a=o.getLabels().length,s=r.reverse?o.max:o.min,i=w1(n,o,s),l=[];if(r.grid.circular){const c=o.getPointPositionForValue(0,s);return new hf({x:c.x,y:c.y,radius:o.getDistanceFromCenterForValue(i)})}for(let c=0;c<a;++c)l.push(o.getPointPositionForValue(c,i));return l}function Gs(e,o,n){const r=A1(o),{chart:a,index:s,line:i,scale:l,axis:c}=o,d=i.options,f=d.fill,u=d.backgroundColor,{above:h=u,below:m=u}=f||{},p=a.getDatasetMeta(s),y=yd(a,p);r&&i.points.length&&(Pr(e,n),M1(e,{line:i,target:r,above:h,below:m,area:n,scale:l,axis:c,clip:y}),Or(e))}function M1(e,o){const{line:n,target:r,above:a,below:s,area:i,scale:l,clip:c}=o,d=n._loop?"angle":o.axis;e.save();let f=s;s!==a&&(d==="x"?(mf(e,r,i.top),Ks(e,{line:n,target:r,color:a,scale:l,property:d,clip:c}),e.restore(),e.save(),mf(e,r,i.bottom)):d==="y"&&(pf(e,r,i.left),Ks(e,{line:n,target:r,color:s,scale:l,property:d,clip:c}),e.restore(),e.save(),pf(e,r,i.right),f=a)),Ks(e,{line:n,target:r,color:f,scale:l,property:d,clip:c}),e.restore()}function mf(e,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;e.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[ta(c,d,a)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(f.x,n),e.lineTo(f.x,f.y)),i=!!o.pathSegment(e,l,{move:i}),i?e.closePath():e.lineTo(u.x,n)}e.lineTo(o.first().x,n),e.closePath(),e.clip()}function pf(e,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;e.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[ta(c,d,a)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(n,f.y),e.lineTo(f.x,f.y)),i=!!o.pathSegment(e,l,{move:i}),i?e.closePath():e.lineTo(n,u.y)}e.lineTo(n,o.first().y),e.closePath(),e.clip()}function Ks(e,o){const{line:n,target:r,property:a,color:s,scale:i,clip:l}=o,c=p1(n,r,a);for(const{source:d,target:f,start:u,end:h}of c){const{style:{backgroundColor:m=s}={}}=d,p=r!==!0;e.save(),e.fillStyle=m,T1(e,i,l,p&&qs(a,u,h)),e.beginPath();const y=!!n.pathSegment(e,d);let b;if(p){y?e.closePath():gf(e,r,h,a);const g=!!r.pathSegment(e,f,{move:y,reverse:!0});b=y&&g,b||gf(e,r,u,a)}e.closePath(),e.fill(b?"evenodd":"nonzero"),e.restore()}}function T1(e,o,n,r){const a=o.chart.chartArea,{property:s,start:i,end:l}=r||{};if(s==="x"||s==="y"){let c,d,f,u;s==="x"?(c=i,d=a.top,f=l,u=a.bottom):(c=a.left,d=i,f=a.right,u=l),e.beginPath(),n&&(c=Math.max(c,n.left),f=Math.min(f,n.right),d=Math.max(d,n.top),u=Math.min(u,n.bottom)),e.rect(c,d,f-c,u-d),e.clip()}}function gf(e,o,n,r){const a=o.interpolate(n,r);a&&e.lineTo(a.x,a.y)}var P1={id:"filler",afterDatasetsUpdate(e,o,n){const r=(e.data.datasets||[]).length,a=[];let s,i,l,c;for(i=0;i<r;++i)s=e.getDatasetMeta(i),l=s.dataset,c=null,l&&l.options&&l instanceof wo&&(c={visible:e.isDatasetVisible(i),index:i,fill:y1(l,i,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=c,a.push(c);for(i=0;i<r;++i)c=a[i],!(!c||c.fill===!1)&&(c.fill=b1(a,i,n.propagate))},beforeDraw(e,o,n){const r=n.drawTime==="beforeDraw",a=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let i=a.length-1;i>=0;--i){const l=a[i].$filler;l&&(l.line.updateControlPoints(s,l.axis),r&&l.fill&&Gs(e.ctx,l,s))}},beforeDatasetsDraw(e,o,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let a=r.length-1;a>=0;--a){const s=r[a].$filler;uf(s)&&Gs(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,o,n){const r=o.meta.$filler;!uf(r)||n.drawTime!=="beforeDatasetDraw"||Gs(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const bf=(e,o)=>{let{boxHeight:n=o,boxWidth:r=o}=e;return e.usePointStyle&&(n=Math.min(n,o),r=e.pointStyleWidth||Math.min(r,o)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(o,n)}},O1=(e,o)=>e!==null&&o!==null&&e.datasetIndex===o.datasetIndex&&e.index===o.index;class yf extends ro{constructor(o){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n,r){this.maxWidth=o,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const o=this.options.labels||{};let n=qe(o.generateLabels,[this.chart],this)||[];o.filter&&(n=n.filter(r=>o.filter(r,this.chart.data))),o.sort&&(n=n.sort((r,a)=>o.sort(r,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:o,ctx:n}=this;if(!o.display){this.width=this.height=0;return}const r=o.labels,a=lt(r.font),s=a.size,i=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=bf(r,s);let d,f;n.font=a.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(i,s,l,c)+10):(f=this.maxHeight,d=this._fitCols(i,a,l,c)+10),this.width=Math.min(d,o.maxWidth||this.maxWidth),this.height=Math.min(f,o.maxHeight||this.maxHeight)}_fitRows(o,n,r,a){const{ctx:s,maxWidth:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=a+l;let u=o;s.textAlign="left",s.textBaseline="middle";let h=-1,m=-f;return this.legendItems.forEach((p,y)=>{const b=r+n/2+s.measureText(p.text).width;(y===0||d[d.length-1]+b+2*l>i)&&(u+=f,d[d.length-(y>0?0:1)]=0,m+=f,h++),c[y]={left:0,top:m,row:h,width:b,height:a},d[d.length-1]+=b+l}),u}_fitCols(o,n,r,a){const{ctx:s,maxHeight:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=i-o;let u=l,h=0,m=0,p=0,y=0;return this.legendItems.forEach((b,g)=>{const{itemWidth:_,itemHeight:E}=L1(r,n,s,b,a);g>0&&m+E+2*l>f&&(u+=h+l,d.push({width:h,height:m}),p+=h+l,y++,h=m=0),c[g]={left:p,top:m,col:y,width:_,height:E},h=Math.max(h,_),m+=E+l}),u+=h,d.push({width:h,height:m}),u}adjustHitBoxes(){if(!this.options.display)return;const o=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:a},rtl:s}}=this,i=ln(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=it(r,this.left+a,this.right-this.lineWidths[l]);for(const d of n)l!==d.row&&(l=d.row,c=it(r,this.left+a,this.right-this.lineWidths[l])),d.top+=this.top+o+a,d.left=i.leftForLtr(i.x(c),d.width),c+=d.width+a}else{let l=0,c=it(r,this.top+o+a,this.bottom-this.columnSizes[l].height);for(const d of n)d.col!==l&&(l=d.col,c=it(r,this.top+o+a,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+a,d.left=i.leftForLtr(i.x(d.left),d.width),c+=d.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const o=this.ctx;Pr(o,this),this._draw(),Or(o)}}_draw(){const{options:o,columnSizes:n,lineWidths:r,ctx:a}=this,{align:s,labels:i}=o,l=Qe.color,c=ln(o.rtl,this.left,this.width),d=lt(i.font),{padding:f}=i,u=d.size,h=u/2;let m;this.drawTitle(),a.textAlign=c.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:p,boxHeight:y,itemHeight:b}=bf(i,u),g=function(C,x,w){if(isNaN(p)||p<=0||isNaN(y)||y<0)return;a.save();const D=Ae(w.lineWidth,1);if(a.fillStyle=Ae(w.fillStyle,l),a.lineCap=Ae(w.lineCap,"butt"),a.lineDashOffset=Ae(w.lineDashOffset,0),a.lineJoin=Ae(w.lineJoin,"miter"),a.lineWidth=D,a.strokeStyle=Ae(w.strokeStyle,l),a.setLineDash(Ae(w.lineDash,[])),i.usePointStyle){const k={radius:y*Math.SQRT2/2,pointStyle:w.pointStyle,rotation:w.rotation,borderWidth:D},v=c.xPlus(C,p/2),S=x+h;Zc(a,k,v,S,i.pointStyleWidth&&p)}else{const k=x+Math.max((u-y)/2,0),v=c.leftForLtr(C,p),S=rn(w.borderRadius);a.beginPath(),Object.values(S).some(N=>N!==0)?Lr(a,{x:v,y:k,w:p,h:y,radius:S}):a.rect(v,k,p,y),a.fill(),D!==0&&a.stroke()}a.restore()},_=function(C,x,w){jn(a,w.text,C,x+b/2,d,{strikethrough:w.hidden,textAlign:c.textAlign(w.textAlign)})},E=this.isHorizontal(),B=this._computeTitleHeight();E?m={x:it(s,this.left+f,this.right-r[0]),y:this.top+f+B,line:0}:m={x:this.left+f,y:it(s,this.top+B+f,this.bottom-n[0].height),line:0},dd(this.ctx,o.textDirection);const A=b+f;this.legendItems.forEach((C,x)=>{a.strokeStyle=C.fontColor,a.fillStyle=C.fontColor;const w=a.measureText(C.text).width,D=c.textAlign(C.textAlign||(C.textAlign=i.textAlign)),k=p+h+w;let v=m.x,S=m.y;c.setWidth(this.width),E?x>0&&v+k+f>this.right&&(S=m.y+=A,m.line++,v=m.x=it(s,this.left+f,this.right-r[m.line])):x>0&&S+A>this.bottom&&(v=m.x=v+n[m.line].width+f,m.line++,S=m.y=it(s,this.top+B+f,this.bottom-n[m.line].height));const N=c.x(v);if(g(N,S,C),v=uy(D,v+p+h,E?v+k:this.right,o.rtl),_(c.x(v),S,C),E)m.x+=k+f;else if(typeof C.text!="string"){const V=d.lineHeight;m.y+=xf(C,V)+f}else m.y+=A}),fd(this.ctx,o.textDirection)}drawTitle(){const o=this.options,n=o.title,r=lt(n.font),a=At(n.padding);if(!n.display)return;const s=ln(o.rtl,this.left,this.width),i=this.ctx,l=n.position,c=r.size/2,d=a.top+c;let f,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),f=this.top+d,u=it(o.align,u,this.right-h);else{const p=this.columnSizes.reduce((y,b)=>Math.max(y,b.height),0);f=d+it(o.align,this.top,this.bottom-p-o.labels.padding-this._computeTitleHeight())}const m=it(l,u,u+h);i.textAlign=s.textAlign(xs(l)),i.textBaseline="middle",i.strokeStyle=n.color,i.fillStyle=n.color,i.font=r.string,jn(i,n.text,m,f,r)}_computeTitleHeight(){const o=this.options.title,n=lt(o.font),r=At(o.padding);return o.display?n.lineHeight+r.height:0}_getLegendItemAt(o,n){let r,a,s;if(oo(o,this.left,this.right)&&oo(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(a=s[r],oo(o,a.left,a.left+a.width)&&oo(n,a.top,a.top+a.height))return this.legendItems[r]}return null}handleEvent(o){const n=this.options;if(!F1(o.type,n))return;const r=this._getLegendItemAt(o.x,o.y);if(o.type==="mousemove"||o.type==="mouseout"){const a=this._hoveredItem,s=O1(a,r);a&&!s&&qe(n.onLeave,[o,a,this],this),this._hoveredItem=r,r&&!s&&qe(n.onHover,[o,r,this],this)}else r&&qe(n.onClick,[o,r,this],this)}}function L1(e,o,n,r,a){const s=R1(r,e,o,n),i=I1(a,r,o.lineHeight);return{itemWidth:s,itemHeight:i}}function R1(e,o,n,r){let a=e.text;return a&&typeof a!="string"&&(a=a.reduce((s,i)=>s.length>i.length?s:i)),o+n.size/2+r.measureText(a).width}function I1(e,o,n){let r=e;return typeof o.text!="string"&&(r=xf(o,n)),r}function xf(e,o){const n=e.text?e.text.length:0;return o*n}function F1(e,o){return!!((e==="mousemove"||e==="mouseout")&&(o.onHover||o.onLeave)||o.onClick&&(e==="click"||e==="mouseup"))}var z1={id:"legend",_element:yf,start(e,o,n){const r=e.legend=new yf({ctx:e.ctx,options:n,chart:e});vt.configure(e,r,n),vt.addBox(e,r)},stop(e){vt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,o,n){const r=e.legend;vt.configure(e,r,n),r.options=n},afterUpdate(e){const o=e.legend;o.buildLabels(),o.adjustHitBoxes()},afterEvent(e,o){o.replay||e.legend.handleEvent(o.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,o,n){const r=o.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),o.hidden=!0):(a.show(r),o.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const o=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),f=At(d.borderWidth);return{text:o[c.index].label,fillStyle:d.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:a||d.textAlign,borderRadius:i&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class kf extends ro{constructor(o){super(),this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=o,this.height=this.bottom=n;const a=Ze(r.text)?r.text.length:1;this._padding=At(r.padding);const s=a*lt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const o=this.options.position;return o==="top"||o==="bottom"}_drawArgs(o){const{top:n,left:r,bottom:a,right:s,options:i}=this,l=i.align;let c=0,d,f,u;return this.isHorizontal()?(f=it(l,r,s),u=n+o,d=s-r):(i.position==="left"?(f=r+o,u=it(l,a,n),c=Ue*-.5):(f=s-o,u=it(l,n,a),c=Ue*.5),d=a-n),{titleX:f,titleY:u,maxWidth:d,rotation:c}}draw(){const o=this.ctx,n=this.options;if(!n.display)return;const r=lt(n.font),s=r.lineHeight/2+this._padding.top,{titleX:i,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(s);jn(o,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:d,textAlign:xs(n.align),textBaseline:"middle",translation:[i,l]})}}function $1(e,o){const n=new kf({ctx:e.ctx,options:o,chart:e});vt.configure(e,n,o),vt.addBox(e,n),e.titleBlock=n}var j1={id:"title",_element:kf,start(e,o,n){$1(e,n)},stop(e){const o=e.titleBlock;vt.removeBox(e,o),delete e.titleBlock},beforeUpdate(e,o,n){const r=e.titleBlock;vt.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Jn={average(e){if(!e.length)return!1;let o,n,r=new Set,a=0,s=0;for(o=0,n=e.length;o<n;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.tooltipPosition();r.add(c.x),a+=c.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((l,c)=>l+c)/r.size,y:a/s}},nearest(e,o){if(!e.length)return!1;let n=o.x,r=o.y,a=Number.POSITIVE_INFINITY,s,i,l;for(s=0,i=e.length;s<i;++s){const c=e[s].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),f=bs(o,d);f<a&&(a=f,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,r=c.y}return{x:n,y:r}}};function Ut(e,o){return o&&(Ze(o)?Array.prototype.push.apply(e,o):e.push(o)),e}function so(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
39
|
+
*/class px{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(o,n,r,a){const s=n.listeners[a],i=n.duration;s.forEach(l=>l({chart:o,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=Wc.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(o=Date.now()){let n=0;this._charts.forEach((r,a)=>{if(!r.running||!r.items.length)return;const s=r.items;let i=s.length-1,l=!1,c;for(;i>=0;--i)c=s[i],c._active?(c._total>r.duration&&(r.duration=c._total),c.tick(o),l=!0):(s[i]=s[s.length-1],s.pop());l&&(a.draw(),this._notify(a,r,o,"progress")),s.length||(r.running=!1,this._notify(a,r,o,"complete"),r.initial=!1),n+=s.length}),this._lastDate=o,n===0&&(this._running=!1)}_getAnims(o){const n=this._charts;let r=n.get(o);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(o,r)),r}listen(o,n,r){this._getAnims(o).listeners[n].push(r)}add(o,n){!n||!n.length||this._getAnims(o).items.push(...n)}has(o){return this._getAnims(o).items.length>0}start(o){const n=this._charts.get(o);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,a)=>Math.max(r,a._duration),0),this._refresh())}running(o){if(!this._running)return!1;const n=this._charts.get(o);return!(!n||!n.running||!n.items.length)}stop(o){const n=this._charts.get(o);if(!n||!n.items.length)return;const r=n.items;let a=r.length-1;for(;a>=0;--a)r[a].cancel();n.items=[],this._notify(o,n,Date.now(),"complete")}remove(o){return this._charts.delete(o)}}var no=new px;const xd="transparent",gx={boolean(e,o,n){return n>.5?o:e},color(e,o,n){const r=Kc(e||xd),a=r.valid&&Kc(o||xd);return a&&a.valid?a.mix(r,n).hexString():o},number(e,o,n){return e+(o-e)*n}};class bx{constructor(o,n,r,a){const s=n[r];a=Lr([o.to,a,s,o.from]);const i=Lr([o.from,s,a]);this._active=!0,this._fn=o.fn||gx[o.type||typeof i],this._easing=Fn[o.easing]||Fn.linear,this._start=Math.floor(Date.now()+(o.delay||0)),this._duration=this._total=Math.floor(o.duration),this._loop=!!o.loop,this._target=n,this._prop=r,this._from=i,this._to=a,this._promises=void 0}active(){return this._active}update(o,n,r){if(this._active){this._notify(!1);const a=this._target[this._prop],s=r-this._start,i=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(i,o.duration)),this._total+=s,this._loop=!!o.loop,this._to=Lr([o.to,n,a,o.from]),this._from=Lr([o.from,a,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(o){const n=o-this._start,r=this._duration,a=this._prop,s=this._from,i=this._loop,l=this._to;let c;if(this._active=s!==l&&(i||n<r),!this._active){this._target[a]=l,this._notify(!0);return}if(n<0){this._target[a]=s;return}c=n/r%2,c=i&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[a]=this._fn(s,l,c)}wait(){const o=this._promises||(this._promises=[]);return new Promise((n,r)=>{o.push({res:n,rej:r})})}_notify(o){const n=o?"res":"rej",r=this._promises||[];for(let a=0;a<r.length;a++)r[a][n]()}}class kd{constructor(o,n){this._chart=o,this._properties=new Map,this.configure(n)}configure(o){if(!Pe(o))return;const n=Object.keys(Qe.animation),r=this._properties;Object.getOwnPropertyNames(o).forEach(a=>{const s=o[a];if(!Pe(s))return;const i={};for(const l of n)i[l]=s[l];(Ze(s.properties)&&s.properties||[a]).forEach(l=>{(l===a||!r.has(l))&&r.set(l,i)})})}_animateOptions(o,n){const r=n.options,a=xx(o,r);if(!a)return[];const s=this._createAnimations(a,r);return r.$shared&&yx(o.options.$animations,r).then(()=>{o.options=r},()=>{}),s}_createAnimations(o,n){const r=this._properties,a=[],s=o.$animations||(o.$animations={}),i=Object.keys(n),l=Date.now();let c;for(c=i.length-1;c>=0;--c){const d=i[c];if(d.charAt(0)==="$")continue;if(d==="options"){a.push(...this._animateOptions(o,n));continue}const f=n[d];let u=s[d];const h=r.get(d);if(u)if(h&&u.active()){u.update(h,f,l);continue}else u.cancel();if(!h||!h.duration){o[d]=f;continue}s[d]=u=new bx(h,o,d,f),a.push(u)}return a}update(o,n){if(this._properties.size===0){Object.assign(o,n);return}const r=this._createAnimations(o,n);if(r.length)return no.add(this._chart,r),!0}}function yx(e,o){const n=[],r=Object.keys(o);for(let a=0;a<r.length;a++){const s=e[r[a]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function xx(e,o){if(!o)return;let n=e.options;if(!n){e.options=o;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function wd(e,o){const n=e&&e.options||{},r=n.reverse,a=n.min===void 0?o:0,s=n.max===void 0?o:0;return{start:r?s:a,end:r?a:s}}function kx(e,o,n){if(n===!1)return!1;const r=wd(e,n),a=wd(o,n);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}function wx(e){let o,n,r,a;return Pe(e)?(o=e.top,n=e.right,r=e.bottom,a=e.left):o=n=r=a=e,{top:o,right:n,bottom:r,left:a,disabled:e===!1}}function Cd(e,o){const n=[],r=e._getSortedDatasetMetas(o);let a,s;for(a=0,s=r.length;a<s;++a)n.push(r[a].index);return n}function Ed(e,o,n,r={}){const a=e.keys,s=r.mode==="single";let i,l,c,d;if(o===null)return;let f=!1;for(i=0,l=a.length;i<l;++i){if(c=+a[i],c===n){if(f=!0,r.all)continue;break}d=e.values[c],at(d)&&(s||o===0||$t(o)===$t(d))&&(o+=d)}return!f&&!r.all?0:o}function Cx(e,o){const{iScale:n,vScale:r}=o,a=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",i=Object.keys(e),l=new Array(i.length);let c,d,f;for(c=0,d=i.length;c<d;++c)f=i[c],l[c]={[a]:f,[s]:e[f]};return l}function Ms(e,o){const n=e&&e.options.stacked;return n||n===void 0&&o.stack!==void 0}function Ex(e,o,n){return`${e.id}.${o.id}.${n.stack||n.type}`}function _x(e){const{min:o,max:n,minDefined:r,maxDefined:a}=e.getUserBounds();return{min:r?o:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}function Bx(e,o,n){const r=e[o]||(e[o]={});return r[n]||(r[n]={})}function _d(e,o,n,r){for(const a of o.getMatchingVisibleMetas(r).reverse()){const s=e[a.index];if(n&&s>0||!n&&s<0)return a.index}return null}function Bd(e,o){const{chart:n,_cachedMeta:r}=e,a=n._stacks||(n._stacks={}),{iScale:s,vScale:i,index:l}=r,c=s.axis,d=i.axis,f=Ex(s,i,r),u=o.length;let h;for(let m=0;m<u;++m){const p=o[m],{[c]:y,[d]:b}=p,g=p._stacks||(p._stacks={});h=g[d]=Bx(a,f,y),h[l]=b,h._top=_d(h,i,!0,r.type),h._bottom=_d(h,i,!1,r.type);const E=h._visualValues||(h._visualValues={});E[l]=b}}function Ts(e,o){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===o).shift()}function Sx(e,o){return Io(e,{active:!1,dataset:void 0,datasetIndex:o,index:o,mode:"default",type:"dataset"})}function Ax(e,o,n){return Io(e,{active:!1,dataIndex:o,parsed:void 0,raw:void 0,element:n,index:o,mode:"default",type:"data"})}function Un(e,o){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){o=o||e._parsed;for(const a of o){const s=a._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Ps=e=>e==="reset"||e==="none",Sd=(e,o)=>o?e:Object.assign({},e),vx=(e,o,n)=>e&&!o.hidden&&o._stacked&&{keys:Cd(n,!0),values:null};class jo{constructor(o,n){this.chart=o,this._ctx=o.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const o=this._cachedMeta;this.configure(),this.linkScales(),o._stacked=Ms(o.vScale,o),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(o){this.index!==o&&Un(this._cachedMeta),this.index=o}linkScales(){const o=this.chart,n=this._cachedMeta,r=this.getDataset(),a=(u,h,m,p)=>u==="x"?h:u==="r"?p:m,s=n.xAxisID=ve(r.xAxisID,Ts(o,"x")),i=n.yAxisID=ve(r.yAxisID,Ts(o,"y")),l=n.rAxisID=ve(r.rAxisID,Ts(o,"r")),c=n.indexAxis,d=n.iAxisID=a(c,s,i,l),f=n.vAxisID=a(c,i,s,l);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(i),n.rScale=this.getScaleForId(l),n.iScale=this.getScaleForId(d),n.vScale=this.getScaleForId(f)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(o){return this.chart.scales[o]}_getOtherScale(o){const n=this._cachedMeta;return o===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const o=this._cachedMeta;this._data&&jc(this._data,this),o._stacked&&Un(o)}_dataCheck(){const o=this.getDataset(),n=o.data||(o.data=[]),r=this._data;if(Pe(n)){const a=this._cachedMeta;this._data=Cx(n,a)}else if(r!==n){if(r){jc(r,this);const a=this._cachedMeta;Un(a),a._parsed=[]}n&&Object.isExtensible(n)&&dy(n,this),this._syncList=[],this._data=n}}addElements(){const o=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(o.dataset=new this.datasetElementType)}buildOrUpdateElements(o){const n=this._cachedMeta,r=this.getDataset();let a=!1;this._dataCheck();const s=n._stacked;n._stacked=Ms(n.vScale,n),n.stack!==r.stack&&(a=!0,Un(n),n.stack=r.stack),this._resyncElements(o),(a||s!==n._stacked)&&(Bd(this,n._parsed),n._stacked=Ms(n.vScale,n))}configure(){const o=this.chart.config,n=o.datasetScopeKeys(this._type),r=o.getOptionScopes(this.getDataset(),n,!0);this.options=o.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(o,n){const{_cachedMeta:r,_data:a}=this,{iScale:s,_stacked:i}=r,l=s.axis;let c=o===0&&n===a.length?!0:r._sorted,d=o>0&&r._parsed[o-1],f,u,h;if(this._parsing===!1)r._parsed=a,r._sorted=!0,h=a;else{Ze(a[o])?h=this.parseArrayData(r,a,o,n):Pe(a[o])?h=this.parseObjectData(r,a,o,n):h=this.parsePrimitiveData(r,a,o,n);const m=()=>u[l]===null||d&&u[l]<d[l];for(f=0;f<n;++f)r._parsed[f+o]=u=h[f],c&&(m()&&(c=!1),d=u);r._sorted=c}i&&Bd(this,h)}parsePrimitiveData(o,n,r,a){const{iScale:s,vScale:i}=o,l=s.axis,c=i.axis,d=s.getLabels(),f=s===i,u=new Array(a);let h,m,p;for(h=0,m=a;h<m;++h)p=h+r,u[h]={[l]:f||s.parse(d[p],p),[c]:i.parse(n[p],p)};return u}parseArrayData(o,n,r,a){const{xScale:s,yScale:i}=o,l=new Array(a);let c,d,f,u;for(c=0,d=a;c<d;++c)f=c+r,u=n[f],l[c]={x:s.parse(u[0],f),y:i.parse(u[1],f)};return l}parseObjectData(o,n,r,a){const{xScale:s,yScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=new Array(a);let f,u,h,m;for(f=0,u=a;f<u;++f)h=f+r,m=n[h],d[f]={x:s.parse(To(m,l),h),y:i.parse(To(m,c),h)};return d}getParsed(o){return this._cachedMeta._parsed[o]}getDataElement(o){return this._cachedMeta.data[o]}applyStack(o,n,r){const a=this.chart,s=this._cachedMeta,i=n[o.axis],l={keys:Cd(a,!0),values:n._stacks[o.axis]._visualValues};return Ed(l,i,s.index,{mode:r})}updateRangeFromParsed(o,n,r,a){const s=r[n.axis];let i=s===null?NaN:s;const l=a&&r._stacks[n.axis];a&&l&&(a.values=l,i=Ed(a,s,this._cachedMeta.index)),o.min=Math.min(o.min,i),o.max=Math.max(o.max,i)}getMinMax(o,n){const r=this._cachedMeta,a=r._parsed,s=r._sorted&&o===r.iScale,i=a.length,l=this._getOtherScale(o),c=vx(n,r,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:f,max:u}=_x(l);let h,m;function p(){m=a[h];const y=m[l.axis];return!at(m[o.axis])||f>y||u<y}for(h=0;h<i&&!(!p()&&(this.updateRangeFromParsed(d,o,m,c),s));++h);if(s){for(h=i-1;h>=0;--h)if(!p()){this.updateRangeFromParsed(d,o,m,c);break}}return d}getAllParsedValues(o){const n=this._cachedMeta._parsed,r=[];let a,s,i;for(a=0,s=n.length;a<s;++a)i=n[a][o.axis],at(i)&&r.push(i);return r}getMaxOverflow(){return!1}getLabelAndValue(o){const n=this._cachedMeta,r=n.iScale,a=n.vScale,s=this.getParsed(o);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:a?""+a.getLabelForValue(s[a.axis]):""}}_update(o){const n=this._cachedMeta;this.update(o||"default"),n._clip=wx(ve(this.options.clip,kx(n.xScale,n.yScale,this.getMaxOverflow())))}update(o){}draw(){const o=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],s=n.chartArea,i=[],l=this._drawStart||0,c=this._drawCount||a.length-l,d=this.options.drawActiveElementsOnTop;let f;for(r.dataset&&r.dataset.draw(o,s,l,c),f=l;f<l+c;++f){const u=a[f];u.hidden||(u.active&&d?i.push(u):u.draw(o,s))}for(f=0;f<i.length;++f)i[f].draw(o,s)}getStyle(o,n){const r=n?"active":"default";return o===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(o||0,r)}getContext(o,n,r){const a=this.getDataset();let s;if(o>=0&&o<this._cachedMeta.data.length){const i=this._cachedMeta.data[o];s=i.$context||(i.$context=Ax(this.getContext(),o,i)),s.parsed=this.getParsed(o),s.raw=a.data[o],s.index=s.dataIndex=o}else s=this.$context||(this.$context=Sx(this.chart.getContext(),this.index)),s.dataset=a,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(o){return this._resolveElementOptions(this.datasetElementType.id,o)}resolveDataElementOptions(o,n){return this._resolveElementOptions(this.dataElementType.id,n,o)}_resolveElementOptions(o,n="default",r){const a=n==="active",s=this._cachedDataOpts,i=o+"-"+n,l=s[i],c=this.enableOptionSharing&&On(r);if(l)return Sd(l,c);const d=this.chart.config,f=d.datasetElementScopeKeys(this._type,o),u=a?[`${o}Hover`,"hover",o,""]:[o,""],h=d.getOptionScopes(this.getDataset(),f),m=Object.keys(Qe.elements[o]),p=()=>this.getContext(r,a,n),y=d.resolveNamedOptions(h,m,p,u);return y.$shared&&(y.$shared=c,s[i]=Object.freeze(Sd(y,c))),y}_resolveAnimations(o,n,r){const a=this.chart,s=this._cachedDataOpts,i=`animation-${n}`,l=s[i];if(l)return l;let c;if(a.options.animation!==!1){const f=this.chart.config,u=f.datasetAnimationScopeKeys(this._type,n),h=f.getOptionScopes(this.getDataset(),u);c=f.createResolver(h,this.getContext(o,r,n))}const d=new kd(a,c&&c.animations);return c&&c._cacheable&&(s[i]=Object.freeze(d)),d}getSharedOptions(o){if(o.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},o))}includeOptions(o,n){return!n||Ps(o)||this.chart._animationsDisabled}_getSharedOptions(o,n){const r=this.resolveDataElementOptions(o,n),a=this._sharedOptions,s=this.getSharedOptions(r),i=this.includeOptions(n,s)||s!==a;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:i}}updateElement(o,n,r,a){Ps(a)?Object.assign(o,r):this._resolveAnimations(n,a).update(o,r)}updateSharedOptions(o,n,r){o&&!Ps(n)&&this._resolveAnimations(void 0,n).update(o,r)}_setStyle(o,n,r,a){o.active=a;const s=this.getStyle(n,a);this._resolveAnimations(n,r,a).update(o,{options:!a&&this.getSharedOptions(s)||s})}removeHoverStyle(o,n,r){this._setStyle(o,r,"active",!1)}setHoverStyle(o,n,r){this._setStyle(o,r,"active",!0)}_removeDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!1)}_setDatasetHoverStyle(){const o=this._cachedMeta.dataset;o&&this._setStyle(o,void 0,"active",!0)}_resyncElements(o){const n=this._data,r=this._cachedMeta.data;for(const[l,c,d]of this._syncList)this[l](c,d);this._syncList=[];const a=r.length,s=n.length,i=Math.min(s,a);i&&this.parse(0,i),s>a?this._insertElements(a,s-a,o):s<a&&this._removeElements(s,a-s)}_insertElements(o,n,r=!0){const a=this._cachedMeta,s=a.data,i=o+n;let l;const c=d=>{for(d.length+=n,l=d.length-1;l>=i;l--)d[l]=d[l-n]};for(c(s),l=o;l<i;++l)s[l]=new this.dataElementType;this._parsing&&c(a._parsed),this.parse(o,n),r&&this.updateElements(s,o,n,"reset")}updateElements(o,n,r,a){}_removeElements(o,n){const r=this._cachedMeta;if(this._parsing){const a=r._parsed.splice(o,n);r._stacked&&Un(r,a)}r.data.splice(o,n)}_sync(o){if(this._parsing)this._syncList.push(o);else{const[n,r,a]=o;this[n](r,a)}this.chart._dataChanges.push([this.index,...o])}_onDataPush(){const o=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-o,o])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(o,n){n&&this._sync(["_removeElements",o,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",o,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}be(jo,"defaults",{}),be(jo,"datasetElementType",null),be(jo,"dataElementType",null);function Dx(e,o){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(o);let r=[];for(let a=0,s=n.length;a<s;a++)r=r.concat(n[a].controller.getAllParsedValues(e));e._cache.$bar=Uc(r.sort((a,s)=>a-s))}return e._cache.$bar}function Nx(e){const o=e.iScale,n=Dx(o,e.type);let r=o._length,a,s,i,l;const c=()=>{i===32767||i===-32768||(On(l)&&(r=Math.min(r,Math.abs(i-l)||r)),l=i)};for(a=0,s=n.length;a<s;++a)i=o.getPixelForValue(n[a]),c();for(l=void 0,a=0,s=o.ticks.length;a<s;++a)i=o.getPixelForTick(a),c();return r}function Vx(e,o,n,r){const a=n.barThickness;let s,i;return $e(a)?(s=o.min*n.categoryPercentage,i=n.barPercentage):(s=a*r,i=1),{chunk:s/r,ratio:i,start:o.pixels[e]-s/2}}function Mx(e,o,n,r){const a=o.pixels,s=a[e];let i=e>0?a[e-1]:null,l=e<a.length-1?a[e+1]:null;const c=n.categoryPercentage;i===null&&(i=s-(l===null?o.end-o.start:l-s)),l===null&&(l=s+s-i);const d=s-(s-Math.min(i,l))/2*c;return{chunk:Math.abs(l-i)/2*c/r,ratio:n.barPercentage,start:d}}function Tx(e,o,n,r){const a=n.parse(e[0],r),s=n.parse(e[1],r),i=Math.min(a,s),l=Math.max(a,s);let c=i,d=l;Math.abs(i)>Math.abs(l)&&(c=l,d=i),o[n.axis]=d,o._custom={barStart:c,barEnd:d,start:a,end:s,min:i,max:l}}function Ad(e,o,n,r){return Ze(e)?Tx(e,o,n,r):o[n.axis]=n.parse(e,r),o}function vd(e,o,n,r){const a=e.iScale,s=e.vScale,i=a.getLabels(),l=a===s,c=[];let d,f,u,h;for(d=n,f=n+r;d<f;++d)h=o[d],u={},u[a.axis]=l||a.parse(i[d],d),c.push(Ad(h,u,s,d));return c}function Os(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function Px(e,o,n){return e!==0?$t(e):(o.isHorizontal()?1:-1)*(o.min>=n?1:-1)}function Ox(e){let o,n,r,a,s;return e.horizontal?(o=e.base>e.x,n="left",r="right"):(o=e.base<e.y,n="bottom",r="top"),o?(a="end",s="start"):(a="start",s="end"),{start:n,end:r,reverse:o,top:a,bottom:s}}function Rx(e,o,n,r){let a=o.borderSkipped;const s={};if(!a){e.borderSkipped=s;return}if(a===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:i,end:l,reverse:c,top:d,bottom:f}=Ox(e);a==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?a=d:(n._bottom||0)===r?a=f:(s[Dd(f,i,l,c)]=!0,a=d)),s[Dd(a,i,l,c)]=!0,e.borderSkipped=s}function Dd(e,o,n,r){return r?(e=Lx(e,o,n),e=Nd(e,n,o)):e=Nd(e,o,n),e}function Lx(e,o,n){return e===o?n:e===n?o:e}function Nd(e,o,n){return e==="start"?o:e==="end"?n:e}function Ix(e,{inflateAmount:o},n){e.inflateAmount=o==="auto"?n===1?.33:0:o}class jr extends jo{parsePrimitiveData(o,n,r,a){return vd(o,n,r,a)}parseArrayData(o,n,r,a){return vd(o,n,r,a)}parseObjectData(o,n,r,a){const{iScale:s,vScale:i}=o,{xAxisKey:l="x",yAxisKey:c="y"}=this._parsing,d=s.axis==="x"?l:c,f=i.axis==="x"?l:c,u=[];let h,m,p,y;for(h=r,m=r+a;h<m;++h)y=n[h],p={},p[s.axis]=s.parse(To(y,d),h),u.push(Ad(To(y,f),p,i,h));return u}updateRangeFromParsed(o,n,r,a){super.updateRangeFromParsed(o,n,r,a);const s=r._custom;s&&n===this._cachedMeta.vScale&&(o.min=Math.min(o.min,s.min),o.max=Math.max(o.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(o){const n=this._cachedMeta,{iScale:r,vScale:a}=n,s=this.getParsed(o),i=s._custom,l=Os(i)?"["+i.start+", "+i.end+"]":""+a.getLabelForValue(s[a.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:l}}initialize(){this.enableOptionSharing=!0,super.initialize();const o=this._cachedMeta;o.stack=this.getDataset().stack}update(o){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,o)}updateElements(o,n,r,a){const s=a==="reset",{index:i,_cachedMeta:{vScale:l}}=this,c=l.getBasePixel(),d=l.isHorizontal(),f=this._getRuler(),{sharedOptions:u,includeOptions:h}=this._getSharedOptions(n,a);for(let m=n;m<n+r;m++){const p=this.getParsed(m),y=s||$e(p[l.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),b=this._calculateBarIndexPixels(m,f),g=(p._stacks||{})[l.axis],E={horizontal:d,base:y.base,enableBorderRadius:!g||Os(p._custom)||i===g._top||i===g._bottom,x:d?y.head:b.center,y:d?b.center:y.head,height:d?b.size:Math.abs(y.size),width:d?Math.abs(y.size):b.size};h&&(E.options=u||this.resolveDataElementOptions(m,o[m].active?"active":a));const _=E.options||o[m].options;Rx(E,_,g,i),Ix(E,_,f.ratio),this.updateElement(o[m],m,E,a)}}_getStacks(o,n){const{iScale:r}=this._cachedMeta,a=r.getMatchingVisibleMetas(this._type).filter(f=>f.controller.options.grouped),s=r.options.stacked,i=[],l=this._cachedMeta.controller.getParsed(n),c=l&&l[r.axis],d=f=>{const u=f._parsed.find(m=>m[r.axis]===c),h=u&&u[f.vScale.axis];if($e(h)||isNaN(h))return!0};for(const f of a)if(!(n!==void 0&&d(f))&&((s===!1||i.indexOf(f.stack)===-1||s===void 0&&f.stack===void 0)&&i.push(f.stack),f.index===o))break;return i.length||i.push(void 0),i}_getStackCount(o){return this._getStacks(void 0,o).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const o=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(o).filter(r=>o[r].axis===n).shift()}_getAxis(){const o={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)o[ve(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(o)}_getStackIndex(o,n,r){const a=this._getStacks(o,r),s=n!==void 0?a.indexOf(n):-1;return s===-1?a.length-1:s}_getRuler(){const o=this.options,n=this._cachedMeta,r=n.iScale,a=[];let s,i;for(s=0,i=n.data.length;s<i;++s)a.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const l=o.barThickness;return{min:l||Nx(n),pixels:a,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:o.grouped,ratio:l?1:o.categoryPercentage*o.barPercentage}}_calculateBarValuePixels(o){const{_cachedMeta:{vScale:n,_stacked:r,index:a},options:{base:s,minBarLength:i}}=this,l=s||0,c=this.getParsed(o),d=c._custom,f=Os(d);let u=c[n.axis],h=0,m=r?this.applyStack(n,c,r):u,p,y;m!==u&&(h=m-u,m=u),f&&(u=d.barStart,m=d.barEnd-d.barStart,u!==0&&$t(u)!==$t(d.barEnd)&&(h=0),h+=u);const b=!$e(s)&&!f?s:h;let g=n.getPixelForValue(b);if(this.chart.getDataVisibility(o)?p=n.getPixelForValue(h+m):p=g,y=p-g,Math.abs(y)<i){y=Px(y,n,l)*i,u===l&&(g-=y/2);const E=n.getPixelForDecimal(0),_=n.getPixelForDecimal(1),B=Math.min(E,_),A=Math.max(E,_);g=Math.max(Math.min(g,A),B),p=g+y,r&&!f&&(c._stacks[n.axis]._visualValues[a]=n.getValueForPixel(p)-n.getValueForPixel(g))}if(g===n.getPixelForValue(l)){const E=$t(y)*n.getLineWidthForValue(l)/2;g+=E,y-=E}return{size:y,base:g,head:p,center:p+y/2}}_calculateBarIndexPixels(o,n){const r=n.scale,a=this.options,s=a.skipNull,i=ve(a.maxBarThickness,1/0);let l,c;const d=this._getAxisCount();if(n.grouped){const f=s?this._getStackCount(o):n.stackCount,u=a.barThickness==="flex"?Mx(o,n,a,f*d):Vx(o,n,a,f*d),h=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,m=this._getAxis().indexOf(ve(h,this.getFirstScaleIdForIndexAxis())),p=this._getStackIndex(this.index,this._cachedMeta.stack,s?o:void 0)+m;l=u.start+u.chunk*p+u.chunk/2,c=Math.min(i,u.chunk*u.ratio)}else l=r.getPixelForValue(this.getParsed(o)[r.axis],o),c=Math.min(i,n.min*n.ratio);return{base:l-c/2,head:l+c/2,center:l,size:c}}draw(){const o=this._cachedMeta,n=o.vScale,r=o.data,a=r.length;let s=0;for(;s<a;++s)this.getParsed(s)[n.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}be(jr,"id","bar"),be(jr,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),be(jr,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function Fx(e,o,n){let r=1,a=1,s=0,i=0;if(o<Ke){const l=e,c=l+o,d=Math.cos(l),f=Math.sin(l),u=Math.cos(c),h=Math.sin(c),m=(_,B,A)=>In(_,l,c,!0)?1:Math.max(B,B*n,A,A*n),p=(_,B,A)=>In(_,l,c,!0)?-1:Math.min(B,B*n,A,A*n),y=m(0,d,u),b=m(tt,f,h),g=p(Ue,d,u),E=p(Ue+tt,f,h);r=(y-g)/2,a=(b-E)/2,s=-(y+g)/2,i=-(b+E)/2}return{ratioX:r,ratioY:a,offsetX:s,offsetY:i}}class cn extends jo{constructor(o,n){super(o,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(o,n){const r=this.getDataset().data,a=this._cachedMeta;if(this._parsing===!1)a._parsed=r;else{let s=c=>+r[c];if(Pe(r[o])){const{key:c="value"}=this._parsing;s=d=>+To(r[d],c)}let i,l;for(i=o,l=o+n;i<l;++i)a._parsed[i]=s(i)}}_getRotation(){return to(this.options.rotation-90)}_getCircumference(){return to(this.options.circumference)}_getRotationExtents(){let o=Ke,n=-Ke;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const a=this.chart.getDatasetMeta(r).controller,s=a._getRotation(),i=a._getCircumference();o=Math.min(o,s),n=Math.max(n,s+i)}return{rotation:o,circumference:n-o}}update(o){const n=this.chart,{chartArea:r}=n,a=this._cachedMeta,s=a.data,i=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,l=Math.max((Math.min(r.width,r.height)-i)/2,0),c=Math.min(G0(this.options.cutout,l),1),d=this._getRingWeight(this.index),{circumference:f,rotation:u}=this._getRotationExtents(),{ratioX:h,ratioY:m,offsetX:p,offsetY:y}=Fx(u,f,c),b=(r.width-i)/h,g=(r.height-i)/m,E=Math.max(Math.min(b,g)/2,0),_=Mc(this.options.radius,E),B=Math.max(_*c,0),A=(_-B)/this._getVisibleDatasetWeightTotal();this.offsetX=p*_,this.offsetY=y*_,a.total=this.calculateTotal(),this.outerRadius=_-A*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-A*d,0),this.updateElements(s,0,s.length,o)}_circumference(o,n){const r=this.options,a=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(o)||a._parsed[o]===null||a.data[o].hidden?0:this.calculateCircumference(a._parsed[o]*s/Ke)}updateElements(o,n,r,a){const s=a==="reset",i=this.chart,l=i.chartArea,d=i.options.animation,f=(l.left+l.right)/2,u=(l.top+l.bottom)/2,h=s&&d.animateScale,m=h?0:this.innerRadius,p=h?0:this.outerRadius,{sharedOptions:y,includeOptions:b}=this._getSharedOptions(n,a);let g=this._getRotation(),E;for(E=0;E<n;++E)g+=this._circumference(E,s);for(E=n;E<n+r;++E){const _=this._circumference(E,s),B=o[E],A={x:f+this.offsetX,y:u+this.offsetY,startAngle:g,endAngle:g+_,circumference:_,outerRadius:p,innerRadius:m};b&&(A.options=y||this.resolveDataElementOptions(E,B.active?"active":a)),g+=_,this.updateElement(B,E,A,a)}}calculateTotal(){const o=this._cachedMeta,n=o.data;let r=0,a;for(a=0;a<n.length;a++){const s=o._parsed[a];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(a)&&!n[a].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(o){const n=this._cachedMeta.total;return n>0&&!isNaN(o)?Ke*(Math.abs(o)/n):0}getLabelAndValue(o){const n=this._cachedMeta,r=this.chart,a=r.data.labels||[],s=Cs(n._parsed[o],r.options.locale);return{label:a[o]||"",value:s}}getMaxBorderWidth(o){let n=0;const r=this.chart;let a,s,i,l,c;if(!o){for(a=0,s=r.data.datasets.length;a<s;++a)if(r.isDatasetVisible(a)){i=r.getDatasetMeta(a),o=i.data,l=i.controller;break}}if(!o)return 0;for(a=0,s=o.length;a<s;++a)c=l.resolveDataElementOptions(a),c.borderAlign!=="inner"&&(n=Math.max(n,c.borderWidth||0,c.hoverBorderWidth||0));return n}getMaxOffset(o){let n=0;for(let r=0,a=o.length;r<a;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(o){let n=0;for(let r=0;r<o;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(o){return Math.max(ve(this.chart.data.datasets[o].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}be(cn,"id","doughnut"),be(cn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),be(cn,"descriptors",{_scriptable:o=>o!=="spacing",_indexable:o=>o!=="spacing"&&!o.startsWith("borderDash")&&!o.startsWith("hoverBorderDash")}),be(cn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(o){const n=o.data,{labels:{pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=o.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((c,d)=>{const u=o.getDatasetMeta(0).controller.getStyle(d);return{text:c,fillStyle:u.backgroundColor,fontColor:s,hidden:!o.getDataVisibility(d),lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:u.borderWidth,strokeStyle:u.borderColor,textAlign:a,pointStyle:r,borderRadius:i&&(l||u.borderRadius),index:d}}):[]}},onClick(o,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class Ur extends jo{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(o){const n=this._cachedMeta,{dataset:r,data:a=[],_dataset:s}=n,i=this.chart._animationsDisabled;let{start:l,count:c}=hy(n,a,i);this._drawStart=l,this._drawCount=c,my(n)&&(l=0,c=a.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=a;const d=this.resolveDatasetElementOptions(o);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(r,void 0,{animated:!i,options:d},o),this.updateElements(a,l,c,o)}updateElements(o,n,r,a){const s=a==="reset",{iScale:i,vScale:l,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:f,includeOptions:u}=this._getSharedOptions(n,a),h=i.axis,m=l.axis,{spanGaps:p,segment:y}=this.options,b=Ln(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||s||a==="none",E=n+r,_=o.length;let B=n>0&&this.getParsed(n-1);for(let A=0;A<_;++A){const C=o[A],x=g?C:{};if(A<n||A>=E){x.skip=!0;continue}const k=this.getParsed(A),N=$e(k[m]),w=x[h]=i.getPixelForValue(k[h],A),v=x[m]=s||N?l.getBasePixel():l.getPixelForValue(c?this.applyStack(l,k,c):k[m],A);x.skip=isNaN(w)||isNaN(v)||N,x.stop=A>0&&Math.abs(k[h]-B[h])>b,y&&(x.parsed=k,x.raw=d.data[A]),u&&(x.options=f||this.resolveDataElementOptions(A,C.active?"active":a)),g||this.updateElement(C,A,x,a),B=k}}getMaxOverflow(){const o=this._cachedMeta,n=o.dataset,r=n.options&&n.options.borderWidth||0,a=o.data||[];if(!a.length)return r;const s=a[0].size(this.resolveDataElementOptions(0)),i=a[a.length-1].size(this.resolveDataElementOptions(a.length-1));return Math.max(r,s,i)/2}draw(){const o=this._cachedMeta;o.dataset.updateControlPoints(this.chart.chartArea,o.iScale.axis),super.draw()}}be(Ur,"id","line"),be(Ur,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),be(Ur,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class Rs extends cn{}be(Rs,"id","pie"),be(Rs,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});function Uo(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ls{constructor(o){be(this,"options");this.options=o||{}}static override(o){Object.assign(Ls.prototype,o)}init(){}formats(){return Uo()}parse(){return Uo()}format(){return Uo()}add(){return Uo()}diff(){return Uo()}startOf(){return Uo()}endOf(){return Uo()}}var zx={_date:Ls};function $x(e,o,n,r){const{controller:a,data:s,_sorted:i}=e,l=a._cachedMeta.iScale,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(l&&o===l.axis&&o!=="r"&&i&&s.length){const d=l._reversePixels?ly:Oo;if(r){if(a._sharedOptions){const f=s[0],u=typeof f.getRange=="function"&&f.getRange(o);if(u){const h=d(s,o,n-u),m=d(s,o,n+u);return{lo:h.lo,hi:m.hi}}}}else{const f=d(s,o,n);if(c){const{vScale:u}=a._cachedMeta,{_parsed:h}=e,m=h.slice(0,f.lo+1).reverse().findIndex(y=>!$e(y[u.axis]));f.lo-=Math.max(0,m);const p=h.slice(f.hi).findIndex(y=>!$e(y[u.axis]));f.hi+=Math.max(0,p)}return f}}return{lo:0,hi:s.length-1}}function Wr(e,o,n,r,a){const s=e.getSortedVisibleDatasetMetas(),i=n[o];for(let l=0,c=s.length;l<c;++l){const{index:d,data:f}=s[l],{lo:u,hi:h}=$x(s[l],o,i,a);for(let m=u;m<=h;++m){const p=f[m];p.skip||r(p,d,m)}}}function jx(e){const o=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,a){const s=o?Math.abs(r.x-a.x):0,i=n?Math.abs(r.y-a.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(i,2))}}function Is(e,o,n,r,a){const s=[];return!a&&!e.isPointInArea(o)||Wr(e,n,o,function(l,c,d){!a&&!$n(l,e.chartArea,0)||l.inRange(o.x,o.y,r)&&s.push({element:l,datasetIndex:c,index:d})},!0),s}function Ux(e,o,n,r){let a=[];function s(i,l,c){const{startAngle:d,endAngle:f}=i.getProps(["startAngle","endAngle"],r),{angle:u}=zc(i,{x:o.x,y:o.y});In(u,d,f)&&a.push({element:i,datasetIndex:l,index:c})}return Wr(e,n,o,s),a}function Wx(e,o,n,r,a,s){let i=[];const l=jx(n);let c=Number.POSITIVE_INFINITY;function d(f,u,h){const m=f.inRange(o.x,o.y,a);if(r&&!m)return;const p=f.getCenterPoint(a);if(!(!!s||e.isPointInArea(p))&&!m)return;const b=l(o,p);b<c?(i=[{element:f,datasetIndex:u,index:h}],c=b):b===c&&i.push({element:f,datasetIndex:u,index:h})}return Wr(e,n,o,d),i}function Fs(e,o,n,r,a,s){return!s&&!e.isPointInArea(o)?[]:n==="r"&&!r?Ux(e,o,n,a):Wx(e,o,n,r,a,s)}function Vd(e,o,n,r,a){const s=[],i=n==="x"?"inXRange":"inYRange";let l=!1;return Wr(e,n,o,(c,d,f)=>{c[i]&&c[i](o[n],a)&&(s.push({element:c,datasetIndex:d,index:f}),l=l||c.inRange(o.x,o.y,a))}),r&&!l?[]:s}var Hx={modes:{index(e,o,n,r){const a=zo(o,e),s=n.axis||"x",i=n.includeInvisible||!1,l=n.intersect?Is(e,a,s,r,i):Fs(e,a,s,!1,r,i),c=[];return l.length?(e.getSortedVisibleDatasetMetas().forEach(d=>{const f=l[0].index,u=d.data[f];u&&!u.skip&&c.push({element:u,datasetIndex:d.index,index:f})}),c):[]},dataset(e,o,n,r){const a=zo(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;let l=n.intersect?Is(e,a,s,r,i):Fs(e,a,s,!1,r,i);if(l.length>0){const c=l[0].datasetIndex,d=e.getDatasetMeta(c).data;l=[];for(let f=0;f<d.length;++f)l.push({element:d[f],datasetIndex:c,index:f})}return l},point(e,o,n,r){const a=zo(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;return Is(e,a,s,r,i)},nearest(e,o,n,r){const a=zo(o,e),s=n.axis||"xy",i=n.includeInvisible||!1;return Fs(e,a,s,n.intersect,r,i)},x(e,o,n,r){const a=zo(o,e);return Vd(e,a,"x",n.intersect,r)},y(e,o,n,r){const a=zo(o,e);return Vd(e,a,"y",n.intersect,r)}}};const Md=["left","top","right","bottom"];function Wn(e,o){return e.filter(n=>n.pos===o)}function Td(e,o){return e.filter(n=>Md.indexOf(n.pos)===-1&&n.box.axis===o)}function Hn(e,o){return e.sort((n,r)=>{const a=o?r:n,s=o?n:r;return a.weight===s.weight?a.index-s.index:a.weight-s.weight})}function qx(e){const o=[];let n,r,a,s,i,l;for(n=0,r=(e||[]).length;n<r;++n)a=e[n],{position:s,options:{stack:i,stackWeight:l=1}}=a,o.push({index:n,box:a,pos:s,horizontal:a.isHorizontal(),weight:a.weight,stack:i&&s+i,stackWeight:l});return o}function Gx(e){const o={};for(const n of e){const{stack:r,pos:a,stackWeight:s}=n;if(!r||!Md.includes(a))continue;const i=o[r]||(o[r]={count:0,placed:0,weight:0,size:0});i.count++,i.weight+=s}return o}function Kx(e,o){const n=Gx(e),{vBoxMaxWidth:r,hBoxMaxHeight:a}=o;let s,i,l;for(s=0,i=e.length;s<i;++s){l=e[s];const{fullSize:c}=l.box,d=n[l.stack],f=d&&l.stackWeight/d.weight;l.horizontal?(l.width=f?f*r:c&&o.availableWidth,l.height=a):(l.width=r,l.height=f?f*a:c&&o.availableHeight)}return n}function Xx(e){const o=qx(e),n=Hn(o.filter(d=>d.box.fullSize),!0),r=Hn(Wn(o,"left"),!0),a=Hn(Wn(o,"right")),s=Hn(Wn(o,"top"),!0),i=Hn(Wn(o,"bottom")),l=Td(o,"x"),c=Td(o,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:a.concat(c).concat(i).concat(l),chartArea:Wn(o,"chartArea"),vertical:r.concat(a).concat(c),horizontal:s.concat(i).concat(l)}}function Pd(e,o,n,r){return Math.max(e[n],o[n])+Math.max(e[r],o[r])}function Od(e,o){e.top=Math.max(e.top,o.top),e.left=Math.max(e.left,o.left),e.bottom=Math.max(e.bottom,o.bottom),e.right=Math.max(e.right,o.right)}function Yx(e,o,n,r){const{pos:a,box:s}=n,i=e.maxPadding;if(!Pe(a)){n.size&&(e[a]-=n.size);const u=r[n.stack]||{size:0,count:1};u.size=Math.max(u.size,n.horizontal?s.height:s.width),n.size=u.size/u.count,e[a]+=n.size}s.getPadding&&Od(i,s.getPadding());const l=Math.max(0,o.outerWidth-Pd(i,e,"left","right")),c=Math.max(0,o.outerHeight-Pd(i,e,"top","bottom")),d=l!==e.w,f=c!==e.h;return e.w=l,e.h=c,n.horizontal?{same:d,other:f}:{same:f,other:d}}function Jx(e){const o=e.maxPadding;function n(r){const a=Math.max(o[r]-e[r],0);return e[r]+=a,a}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Qx(e,o){const n=o.maxPadding;function r(a){const s={left:0,top:0,right:0,bottom:0};return a.forEach(i=>{s[i]=Math.max(o[i],n[i])}),s}return r(e?["left","right"]:["top","bottom"])}function qn(e,o,n,r){const a=[];let s,i,l,c,d,f;for(s=0,i=e.length,d=0;s<i;++s){l=e[s],c=l.box,c.update(l.width||o.w,l.height||o.h,Qx(l.horizontal,o));const{same:u,other:h}=Yx(o,n,l,r);d|=u&&a.length,f=f||h,c.fullSize||a.push(l)}return d&&qn(a,o,n,r)||f}function Hr(e,o,n,r,a){e.top=n,e.left=o,e.right=o+r,e.bottom=n+a,e.width=r,e.height=a}function Rd(e,o,n,r){const a=n.padding;let{x:s,y:i}=o;for(const l of e){const c=l.box,d=r[l.stack]||{placed:0,weight:1},f=l.stackWeight/d.weight||1;if(l.horizontal){const u=o.w*f,h=d.size||c.height;On(d.start)&&(i=d.start),c.fullSize?Hr(c,a.left,i,n.outerWidth-a.right-a.left,h):Hr(c,o.left+d.placed,i,u,h),d.start=i,d.placed+=u,i=c.bottom}else{const u=o.h*f,h=d.size||c.width;On(d.start)&&(s=d.start),c.fullSize?Hr(c,s,a.top,h,n.outerHeight-a.bottom-a.top):Hr(c,s,o.top+d.placed,h,u),d.start=s,d.placed+=u,s=c.right}}o.x=s,o.y=i}var vt={addBox(e,o){e.boxes||(e.boxes=[]),o.fullSize=o.fullSize||!1,o.position=o.position||"top",o.weight=o.weight||0,o._layers=o._layers||function(){return[{z:0,draw(n){o.draw(n)}}]},e.boxes.push(o)},removeBox(e,o){const n=e.boxes?e.boxes.indexOf(o):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,o,n){o.fullSize=n.fullSize,o.position=n.position,o.weight=n.weight},update(e,o,n,r){if(!e)return;const a=At(e.options.layout.padding),s=Math.max(o-a.width,0),i=Math.max(n-a.height,0),l=Xx(e.boxes),c=l.vertical,d=l.horizontal;je(e.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const f=c.reduce((y,b)=>b.box.options&&b.box.options.display===!1?y:y+1,0)||1,u=Object.freeze({outerWidth:o,outerHeight:n,padding:a,availableWidth:s,availableHeight:i,vBoxMaxWidth:s/2/f,hBoxMaxHeight:i/2}),h=Object.assign({},a);Od(h,At(r));const m=Object.assign({maxPadding:h,w:s,h:i,x:a.left,y:a.top},a),p=Kx(c.concat(d),u);qn(l.fullSize,m,u,p),qn(c,m,u,p),qn(d,m,u,p)&&qn(c,m,u,p),Jx(m),Rd(l.leftAndTop,m,u,p),m.x+=m.w,m.y+=m.h,Rd(l.rightAndBottom,m,u,p),e.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},je(l.chartArea,y=>{const b=y.box;Object.assign(b,e.chartArea),b.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Ld{acquireContext(o,n){}releaseContext(o){return!1}addEventListener(o,n,r){}removeEventListener(o,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(o,n,r,a){return n=Math.max(0,n||o.width),r=r||o.height,{width:n,height:Math.max(0,a?Math.floor(n/a):r)}}isAttached(o){return!0}updateConfig(o){}}class Zx extends Ld{acquireContext(o){return o&&o.getContext&&o.getContext("2d")||null}updateConfig(o){o.options.animation=!1}}const qr="$chartjs",ek={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Id=e=>e===null||e==="";function tk(e,o){const n=e.style,r=e.getAttribute("height"),a=e.getAttribute("width");if(e[qr]={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Id(a)){const s=cd(e,"width");s!==void 0&&(e.width=s)}if(Id(r))if(e.style.height==="")e.height=e.width/(o||2);else{const s=cd(e,"height");s!==void 0&&(e.height=s)}return e}const Fd=nx?{passive:!0}:!1;function ok(e,o,n){e&&e.addEventListener(o,n,Fd)}function nk(e,o,n){e&&e.canvas&&e.canvas.removeEventListener(o,n,Fd)}function rk(e,o){const n=ek[e.type]||e.type,{x:r,y:a}=zo(e,o);return{type:n,chart:o,native:e,x:r!==void 0?r:null,y:a!==void 0?a:null}}function Gr(e,o){for(const n of e)if(n===o||n.contains(o))return!0}function ak(e,o,n){const r=e.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||Gr(l.addedNodes,r),i=i&&!Gr(l.removedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}function sk(e,o,n){const r=e.canvas,a=new MutationObserver(s=>{let i=!1;for(const l of s)i=i||Gr(l.removedNodes,r),i=i&&!Gr(l.addedNodes,r);i&&n()});return a.observe(document,{childList:!0,subtree:!0}),a}const Gn=new Map;let zd=0;function $d(){const e=window.devicePixelRatio;e!==zd&&(zd=e,Gn.forEach((o,n)=>{n.currentDevicePixelRatio!==e&&o()}))}function ik(e,o){Gn.size||window.addEventListener("resize",$d),Gn.set(e,o)}function lk(e){Gn.delete(e),Gn.size||window.removeEventListener("resize",$d)}function ck(e,o,n){const r=e.canvas,a=r&&Vs(r);if(!a)return;const s=Hc((l,c)=>{const d=a.clientWidth;n(l,c),d<a.clientWidth&&n()},window),i=new ResizeObserver(l=>{const c=l[0],d=c.contentRect.width,f=c.contentRect.height;d===0&&f===0||s(d,f)});return i.observe(a),ik(e,s),i}function zs(e,o,n){n&&n.disconnect(),o==="resize"&&lk(e)}function dk(e,o,n){const r=e.canvas,a=Hc(s=>{e.ctx!==null&&n(rk(s,e))},e);return ok(r,o,a),a}class fk extends Ld{acquireContext(o,n){const r=o&&o.getContext&&o.getContext("2d");return r&&r.canvas===o?(tk(o,n),r):null}releaseContext(o){const n=o.canvas;if(!n[qr])return!1;const r=n[qr].initial;["height","width"].forEach(s=>{const i=r[s];$e(i)?n.removeAttribute(s):n.setAttribute(s,i)});const a=r.style||{};return Object.keys(a).forEach(s=>{n.style[s]=a[s]}),n.width=n.width,delete n[qr],!0}addEventListener(o,n,r){this.removeEventListener(o,n);const a=o.$proxies||(o.$proxies={}),i={attach:ak,detach:sk,resize:ck}[n]||dk;a[n]=i(o,n,r)}removeEventListener(o,n){const r=o.$proxies||(o.$proxies={}),a=r[n];if(!a)return;({attach:zs,detach:zs,resize:zs}[n]||nk)(o,n,a),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(o,n,r,a){return ox(o,n,r,a)}isAttached(o){const n=o&&Vs(o);return!!(n&&n.isConnected)}}function uk(e){return!Ns()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Zx:fk}let ro=(Sa=class{constructor(){be(this,"x");be(this,"y");be(this,"active",!1);be(this,"options");be(this,"$animations")}tooltipPosition(o){const{x:n,y:r}=this.getProps(["x","y"],o);return{x:n,y:r}}hasValue(){return Ln(this.x)&&Ln(this.y)}getProps(o,n){const r=this.$animations;if(!n||!r)return this;const a={};return o.forEach(s=>{a[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),a}},be(Sa,"defaults",{}),be(Sa,"defaultRoutes"),Sa);function hk(e,o){const n=e.options.ticks,r=mk(e),a=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?gk(o):[],i=s.length,l=s[0],c=s[i-1],d=[];if(i>a)return bk(o,d,s,i/a),d;const f=pk(s,o,a);if(i>0){let u,h;const m=i>1?Math.round((c-l)/(i-1)):null;for(Kr(o,d,f,$e(m)?0:l-m,l),u=0,h=i-1;u<h;u++)Kr(o,d,f,s[u],s[u+1]);return Kr(o,d,f,c,$e(m)?o.length:c+m),d}return Kr(o,d,f),d}function mk(e){const o=e.options.offset,n=e._tickSize(),r=e._length/n+(o?0:1),a=e._maxLength/n;return Math.floor(Math.min(r,a))}function pk(e,o,n){const r=yk(e),a=o.length/n;if(!r)return Math.max(a,1);const s=ty(r);for(let i=0,l=s.length-1;i<l;i++){const c=s[i];if(c>a)return c}return Math.max(a,1)}function gk(e){const o=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&o.push(n);return o}function bk(e,o,n,r){let a=0,s=n[0],i;for(r=Math.ceil(r),i=0;i<e.length;i++)i===s&&(o.push(e[i]),a++,s=n[a*r])}function Kr(e,o,n,r,a){const s=ve(r,0),i=Math.min(ve(a,e.length),e.length);let l=0,c,d,f;for(n=Math.ceil(n),a&&(c=a-r,n=c/Math.floor(c/n)),f=s;f<0;)l++,f=Math.round(s+l*n);for(d=Math.max(s,0);d<i;d++)d===f&&(o.push(e[d]),l++,f=Math.round(s+l*n))}function yk(e){const o=e.length;let n,r;if(o<2)return!1;for(r=e[0],n=1;n<o;++n)if(e[n]-e[n-1]!==r)return!1;return r}const xk=e=>e==="left"?"right":e==="right"?"left":e,jd=(e,o,n)=>o==="top"||o==="left"?e[o]+n:e[o]-n,Ud=(e,o)=>Math.min(o||e,e);function Wd(e,o){const n=[],r=e.length/o,a=e.length;let s=0;for(;s<a;s+=r)n.push(e[Math.floor(s)]);return n}function kk(e,o,n){const r=e.ticks.length,a=Math.min(o,r-1),s=e._startPixel,i=e._endPixel,l=1e-6;let c=e.getPixelForTick(a),d;if(!(n&&(r===1?d=Math.max(c-s,i-c):o===0?d=(e.getPixelForTick(1)-c)/2:d=(c-e.getPixelForTick(a-1))/2,c+=a<o?d:-d,c<s-l||c>i+l)))return c}function wk(e,o){je(e,n=>{const r=n.gc,a=r.length/2;let s;if(a>o){for(s=0;s<a;++s)delete n.data[r[s]];r.splice(0,a)}})}function Kn(e){return e.drawTicks?e.tickLength:0}function Hd(e,o){if(!e.display)return 0;const n=lt(e.font,o),r=At(e.padding);return(Ze(e.text)?e.text.length:1)*n.lineHeight+r.height}function Ck(e,o){return Io(e,{scale:o,type:"scale"})}function Ek(e,o,n){return Io(e,{tick:n,index:o,type:"tick"})}function _k(e,o,n){let r=xs(e);return(n&&o!=="right"||!n&&o==="right")&&(r=xk(r)),r}function Bk(e,o,n,r){const{top:a,left:s,bottom:i,right:l,chart:c}=e,{chartArea:d,scales:f}=c;let u=0,h,m,p;const y=i-a,b=l-s;if(e.isHorizontal()){if(m=it(r,s,l),Pe(n)){const g=Object.keys(n)[0],E=n[g];p=f[g].getPixelForValue(E)+y-o}else n==="center"?p=(d.bottom+d.top)/2+y-o:p=jd(e,n,o);h=l-s}else{if(Pe(n)){const g=Object.keys(n)[0],E=n[g];m=f[g].getPixelForValue(E)-b+o}else n==="center"?m=(d.left+d.right)/2-b+o:m=jd(e,n,o);p=it(r,i,a),u=n==="left"?-tt:tt}return{titleX:m,titleY:p,maxWidth:h,rotation:u}}class dn extends ro{constructor(o){super(),this.id=o.id,this.type=o.type,this.options=void 0,this.ctx=o.ctx,this.chart=o.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(o){this.options=o.setContext(this.getContext()),this.axis=o.axis,this._userMin=this.parse(o.min),this._userMax=this.parse(o.max),this._suggestedMin=this.parse(o.suggestedMin),this._suggestedMax=this.parse(o.suggestedMax)}parse(o,n){return o}getUserBounds(){let{_userMin:o,_userMax:n,_suggestedMin:r,_suggestedMax:a}=this;return o=zt(o,Number.POSITIVE_INFINITY),n=zt(n,Number.NEGATIVE_INFINITY),r=zt(r,Number.POSITIVE_INFINITY),a=zt(a,Number.NEGATIVE_INFINITY),{min:zt(o,r),max:zt(n,a),minDefined:at(o),maxDefined:at(n)}}getMinMax(o){let{min:n,max:r,minDefined:a,maxDefined:s}=this.getUserBounds(),i;if(a&&s)return{min:n,max:r};const l=this.getMatchingVisibleMetas();for(let c=0,d=l.length;c<d;++c)i=l[c].controller.getMinMax(this,o),a||(n=Math.min(n,i.min)),s||(r=Math.max(r,i.max));return n=s&&n>r?r:n,r=a&&n>r?n:r,{min:zt(n,zt(r,n)),max:zt(r,zt(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const o=this.chart.data;return this.options.labels||(this.isHorizontal()?o.xLabels:o.yLabels)||o.labels||[]}getLabelItems(o=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(o))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){qe(this.options.beforeUpdate,[this])}update(o,n,r){const{beginAtZero:a,grace:s,ticks:i}=this.options,l=i.sampleSize;this.beforeUpdate(),this.maxWidth=o,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=Py(this,s,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=l<this.ticks.length;this._convertTicksToLabels(c?Wd(this.ticks,l):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),i.display&&(i.autoSkip||i.source==="auto")&&(this.ticks=hk(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let o=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,o=!o),this._startPixel=n,this._endPixel=r,this._reversePixels=o,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){qe(this.options.afterUpdate,[this])}beforeSetDimensions(){qe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){qe(this.options.afterSetDimensions,[this])}_callHooks(o){this.chart.notifyPlugins(o,this.getContext()),qe(this.options[o],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){qe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(o){const n=this.options.ticks;let r,a,s;for(r=0,a=o.length;r<a;r++)s=o[r],s.label=qe(n.callback,[s.value,r,o],this)}afterTickToLabelConversion(){qe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){qe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const o=this.options,n=o.ticks,r=Ud(this.ticks.length,o.ticks.maxTicksLimit),a=n.minRotation||0,s=n.maxRotation;let i=a,l,c,d;if(!this._isVisible()||!n.display||a>=s||r<=1||!this.isHorizontal()){this.labelRotation=a;return}const f=this._getLabelSizes(),u=f.widest.width,h=f.highest.height,m=st(this.chart.width-u,0,this.maxWidth);l=o.offset?this.maxWidth/r:m/(r-1),u+6>l&&(l=m/(r-(o.offset?.5:1)),c=this.maxHeight-Kn(o.grid)-n.padding-Hd(o.title,this.chart.options.font),d=Math.sqrt(u*u+h*h),i=ay(Math.min(Math.asin(st((f.highest.height+6)/l,-1,1)),Math.asin(st(c/d,-1,1))-Math.asin(st(h/d,-1,1)))),i=Math.max(a,Math.min(s,i))),this.labelRotation=i}afterCalculateLabelRotation(){qe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){qe(this.options.beforeFit,[this])}fit(){const o={width:0,height:0},{chart:n,options:{ticks:r,title:a,grid:s}}=this,i=this._isVisible(),l=this.isHorizontal();if(i){const c=Hd(a,n.options.font);if(l?(o.width=this.maxWidth,o.height=Kn(s)+c):(o.height=this.maxHeight,o.width=Kn(s)+c),r.display&&this.ticks.length){const{first:d,last:f,widest:u,highest:h}=this._getLabelSizes(),m=r.padding*2,p=to(this.labelRotation),y=Math.cos(p),b=Math.sin(p);if(l){const g=r.mirror?0:b*u.width+y*h.height;o.height=Math.min(this.maxHeight,o.height+g+m)}else{const g=r.mirror?0:y*u.width+b*h.height;o.width=Math.min(this.maxWidth,o.width+g+m)}this._calculatePadding(d,f,b,y)}}this._handleMargins(),l?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=o.height):(this.width=o.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(o,n,r,a){const{ticks:{align:s,padding:i},position:l}=this.options,c=this.labelRotation!==0,d=l!=="top"&&this.axis==="x";if(this.isHorizontal()){const f=this.getPixelForTick(0)-this.left,u=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,m=0;c?d?(h=a*o.width,m=r*n.height):(h=r*o.height,m=a*n.width):s==="start"?m=n.width:s==="end"?h=o.width:s!=="inner"&&(h=o.width/2,m=n.width/2),this.paddingLeft=Math.max((h-f+i)*this.width/(this.width-f),0),this.paddingRight=Math.max((m-u+i)*this.width/(this.width-u),0)}else{let f=n.height/2,u=o.height/2;s==="start"?(f=0,u=o.height):s==="end"&&(f=n.height,u=0),this.paddingTop=f+i,this.paddingBottom=u+i}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){qe(this.options.afterFit,[this])}isHorizontal(){const{axis:o,position:n}=this.options;return n==="top"||n==="bottom"||o==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(o){this.beforeTickToLabelConversion(),this.generateTickLabels(o);let n,r;for(n=0,r=o.length;n<r;n++)$e(o[n].label)&&(o.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let o=this._labelSizes;if(!o){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=Wd(r,n)),this._labelSizes=o=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return o}_computeLabelSizes(o,n,r){const{ctx:a,_longestTextCache:s}=this,i=[],l=[],c=Math.floor(n/Ud(n,r));let d=0,f=0,u,h,m,p,y,b,g,E,_,B,A;for(u=0;u<n;u+=c){if(p=o[u].label,y=this._resolveTickFontOptions(u),a.font=b=y.string,g=s[b]=s[b]||{data:{},gc:[]},E=y.lineHeight,_=B=0,!$e(p)&&!Ze(p))_=Jc(a,g.data,g.gc,_,p),B=E;else if(Ze(p))for(h=0,m=p.length;h<m;++h)A=p[h],!$e(A)&&!Ze(A)&&(_=Jc(a,g.data,g.gc,_,A),B+=E);i.push(_),l.push(B),d=Math.max(_,d),f=Math.max(B,f)}wk(s,n);const C=i.indexOf(d),x=l.indexOf(f),k=N=>({width:i[N]||0,height:l[N]||0});return{first:k(0),last:k(n-1),widest:k(C),highest:k(x),widths:i,heights:l}}getLabelForValue(o){return o}getPixelForValue(o,n){return NaN}getValueForPixel(o){}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getPixelForDecimal(o){this._reversePixels&&(o=1-o);const n=this._startPixel+o*this._length;return iy(this._alignToPixels?Lo(this.chart,n,0):n)}getDecimalForPixel(o){const n=(o-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:o,max:n}=this;return o<0&&n<0?n:o>0&&n>0?o:0}getContext(o){const n=this.ticks||[];if(o>=0&&o<n.length){const r=n[o];return r.$context||(r.$context=Ek(this.getContext(),o,r))}return this.$context||(this.$context=Ck(this.chart.getContext(),this))}_tickSize(){const o=this.options.ticks,n=to(this.labelRotation),r=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),s=this._getLabelSizes(),i=o.autoSkipPadding||0,l=s?s.widest.width+i:0,c=s?s.highest.height+i:0;return this.isHorizontal()?c*r>l*a?l/r:c/a:c*a<l*r?c/r:l/a}_isVisible(){const o=this.options.display;return o!=="auto"?!!o:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(o){const n=this.axis,r=this.chart,a=this.options,{grid:s,position:i,border:l}=a,c=s.offset,d=this.isHorizontal(),u=this.ticks.length+(c?1:0),h=Kn(s),m=[],p=l.setContext(this.getContext()),y=p.display?p.width:0,b=y/2,g=function(O){return Lo(r,O,y)};let E,_,B,A,C,x,k,N,w,v,S,D;if(i==="top")E=g(this.bottom),x=this.bottom-h,N=E-b,v=g(o.top)+b,D=o.bottom;else if(i==="bottom")E=g(this.top),v=o.top,D=g(o.bottom)-b,x=E+b,N=this.top+h;else if(i==="left")E=g(this.right),C=this.right-h,k=E-b,w=g(o.left)+b,S=o.right;else if(i==="right")E=g(this.left),w=o.left,S=g(o.right)-b,C=E+b,k=this.left+h;else if(n==="x"){if(i==="center")E=g((o.top+o.bottom)/2+.5);else if(Pe(i)){const O=Object.keys(i)[0],P=i[O];E=g(this.chart.scales[O].getPixelForValue(P))}v=o.top,D=o.bottom,x=E+b,N=x+h}else if(n==="y"){if(i==="center")E=g((o.left+o.right)/2);else if(Pe(i)){const O=Object.keys(i)[0],P=i[O];E=g(this.chart.scales[O].getPixelForValue(P))}C=E-b,k=C-h,w=o.left,S=o.right}const V=ve(a.ticks.maxTicksLimit,u),R=Math.max(1,Math.ceil(u/V));for(_=0;_<u;_+=R){const O=this.getContext(_),P=s.setContext(O),L=l.setContext(O),$=P.lineWidth,T=P.color,I=L.dash||[],H=L.dashOffset,q=P.tickWidth,W=P.tickColor,Z=P.tickBorderDash||[],te=P.tickBorderDashOffset;B=kk(this,_,c),B!==void 0&&(A=Lo(r,B,$),d?C=k=w=S=A:x=N=v=D=A,m.push({tx1:C,ty1:x,tx2:k,ty2:N,x1:w,y1:v,x2:S,y2:D,width:$,color:T,borderDash:I,borderDashOffset:H,tickWidth:q,tickColor:W,tickBorderDash:Z,tickBorderDashOffset:te}))}return this._ticksLength=u,this._borderValue=E,m}_computeLabelItems(o){const n=this.axis,r=this.options,{position:a,ticks:s}=r,i=this.isHorizontal(),l=this.ticks,{align:c,crossAlign:d,padding:f,mirror:u}=s,h=Kn(r.grid),m=h+f,p=u?-f:m,y=-to(this.labelRotation),b=[];let g,E,_,B,A,C,x,k,N,w,v,S,D="middle";if(a==="top")C=this.bottom-p,x=this._getXAxisLabelAlignment();else if(a==="bottom")C=this.top+p,x=this._getXAxisLabelAlignment();else if(a==="left"){const R=this._getYAxisLabelAlignment(h);x=R.textAlign,A=R.x}else if(a==="right"){const R=this._getYAxisLabelAlignment(h);x=R.textAlign,A=R.x}else if(n==="x"){if(a==="center")C=(o.top+o.bottom)/2+m;else if(Pe(a)){const R=Object.keys(a)[0],O=a[R];C=this.chart.scales[R].getPixelForValue(O)+m}x=this._getXAxisLabelAlignment()}else if(n==="y"){if(a==="center")A=(o.left+o.right)/2-m;else if(Pe(a)){const R=Object.keys(a)[0],O=a[R];A=this.chart.scales[R].getPixelForValue(O)}x=this._getYAxisLabelAlignment(h).textAlign}n==="y"&&(c==="start"?D="top":c==="end"&&(D="bottom"));const V=this._getLabelSizes();for(g=0,E=l.length;g<E;++g){_=l[g],B=_.label;const R=s.setContext(this.getContext(g));k=this.getPixelForTick(g)+s.labelOffset,N=this._resolveTickFontOptions(g),w=N.lineHeight,v=Ze(B)?B.length:1;const O=v/2,P=R.color,L=R.textStrokeColor,$=R.textStrokeWidth;let T=x;i?(A=k,x==="inner"&&(g===E-1?T=this.options.reverse?"left":"right":g===0?T=this.options.reverse?"right":"left":T="center"),a==="top"?d==="near"||y!==0?S=-v*w+w/2:d==="center"?S=-V.highest.height/2-O*w+w:S=-V.highest.height+w/2:d==="near"||y!==0?S=w/2:d==="center"?S=V.highest.height/2-O*w:S=V.highest.height-v*w,u&&(S*=-1),y!==0&&!R.showLabelBackdrop&&(A+=w/2*Math.sin(y))):(C=k,S=(1-v)*w/2);let I;if(R.showLabelBackdrop){const H=At(R.backdropPadding),q=V.heights[g],W=V.widths[g];let Z=S-H.top,te=0-H.left;switch(D){case"middle":Z-=q/2;break;case"bottom":Z-=q;break}switch(x){case"center":te-=W/2;break;case"right":te-=W;break;case"inner":g===E-1?te-=W:g>0&&(te-=W/2);break}I={left:te,top:Z,width:W+H.width,height:q+H.height,color:R.backdropColor}}b.push({label:B,font:N,textOffset:S,options:{rotation:y,color:P,strokeColor:L,strokeWidth:$,textAlign:T,textBaseline:D,translation:[A,C],backdrop:I}})}return b}_getXAxisLabelAlignment(){const{position:o,ticks:n}=this.options;if(-to(this.labelRotation))return o==="top"?"left":"right";let a="center";return n.align==="start"?a="left":n.align==="end"?a="right":n.align==="inner"&&(a="inner"),a}_getYAxisLabelAlignment(o){const{position:n,ticks:{crossAlign:r,mirror:a,padding:s}}=this.options,i=this._getLabelSizes(),l=o+s,c=i.widest.width;let d,f;return n==="left"?a?(f=this.right+s,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f+=c)):(f=this.right-l,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f=this.left)):n==="right"?a?(f=this.left+s,r==="near"?d="right":r==="center"?(d="center",f-=c/2):(d="left",f-=c)):(f=this.left+l,r==="near"?d="left":r==="center"?(d="center",f+=c/2):(d="right",f=this.right)):d="right",{textAlign:d,x:f}}_computeLabelArea(){if(this.options.ticks.mirror)return;const o=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:o.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:o.width}}drawBackground(){const{ctx:o,options:{backgroundColor:n},left:r,top:a,width:s,height:i}=this;n&&(o.save(),o.fillStyle=n,o.fillRect(r,a,s,i),o.restore())}getLineWidthForValue(o){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const a=this.ticks.findIndex(s=>s.value===o);return a>=0?n.setContext(this.getContext(a)).lineWidth:0}drawGrid(o){const n=this.options.grid,r=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(o));let s,i;const l=(c,d,f)=>{!f.width||!f.color||(r.save(),r.lineWidth=f.width,r.strokeStyle=f.color,r.setLineDash(f.borderDash||[]),r.lineDashOffset=f.borderDashOffset,r.beginPath(),r.moveTo(c.x,c.y),r.lineTo(d.x,d.y),r.stroke(),r.restore())};if(n.display)for(s=0,i=a.length;s<i;++s){const c=a[s];n.drawOnChartArea&&l({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),n.drawTicks&&l({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:o,ctx:n,options:{border:r,grid:a}}=this,s=r.setContext(this.getContext()),i=r.display?s.width:0;if(!i)return;const l=a.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,f,u,h;this.isHorizontal()?(d=Lo(o,this.left,i)-i/2,f=Lo(o,this.right,l)+l/2,u=h=c):(u=Lo(o,this.top,i)-i/2,h=Lo(o,this.bottom,l)+l/2,d=f=c),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(d,u),n.lineTo(f,h),n.stroke(),n.restore()}drawLabels(o){if(!this.options.ticks.display)return;const r=this.ctx,a=this._computeLabelArea();a&&Pr(r,a);const s=this.getLabelItems(o);for(const i of s){const l=i.options,c=i.font,d=i.label,f=i.textOffset;jn(r,d,0,f,c,l)}a&&Or(r)}drawTitle(){const{ctx:o,options:{position:n,title:r,reverse:a}}=this;if(!r.display)return;const s=lt(r.font),i=At(r.padding),l=r.align;let c=s.lineHeight/2;n==="bottom"||n==="center"||Pe(n)?(c+=i.bottom,Ze(r.text)&&(c+=s.lineHeight*(r.text.length-1))):c+=i.top;const{titleX:d,titleY:f,maxWidth:u,rotation:h}=Bk(this,c,n,l);jn(o,r.text,0,0,s,{color:r.color,maxWidth:u,rotation:h,textAlign:_k(l,n,a),textBaseline:"middle",translation:[d,f]})}draw(o){this._isVisible()&&(this.drawBackground(),this.drawGrid(o),this.drawBorder(),this.drawTitle(),this.drawLabels(o))}_layers(){const o=this.options,n=o.ticks&&o.ticks.z||0,r=ve(o.grid&&o.grid.z,-1),a=ve(o.border&&o.border.z,0);return!this._isVisible()||this.draw!==dn.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:a,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(o){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];let s,i;for(s=0,i=n.length;s<i;++s){const l=n[s];l[r]===this.id&&(!o||l.type===o)&&a.push(l)}return a}_resolveTickFontOptions(o){const n=this.options.ticks.setContext(this.getContext(o));return lt(n.font)}_maxDigits(){const o=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/o}}class Xr{constructor(o,n,r){this.type=o,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(o){return Object.prototype.isPrototypeOf.call(this.type.prototype,o.prototype)}register(o){const n=Object.getPrototypeOf(o);let r;vk(n)&&(r=this.register(n));const a=this.items,s=o.id,i=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+o);return s in a||(a[s]=o,Sk(o,i,r),this.override&&Qe.override(o.id,o.overrides)),i}get(o){return this.items[o]}unregister(o){const n=this.items,r=o.id,a=this.scope;r in n&&delete n[r],a&&r in Qe[a]&&(delete Qe[a][r],this.override&&delete Ro[r])}}function Sk(e,o,n){const r=Tn(Object.create(null),[n?Qe.get(n):{},Qe.get(o),e.defaults]);Qe.set(o,r),e.defaultRoutes&&Ak(o,e.defaultRoutes),e.descriptors&&Qe.describe(o,e.descriptors)}function Ak(e,o){Object.keys(o).forEach(n=>{const r=n.split("."),a=r.pop(),s=[e].concat(r).join("."),i=o[n].split("."),l=i.pop(),c=i.join(".");Qe.route(s,a,c,l)})}function vk(e){return"id"in e&&"defaults"in e}class Dk{constructor(){this.controllers=new Xr(jo,"datasets",!0),this.elements=new Xr(ro,"elements"),this.plugins=new Xr(Object,"plugins"),this.scales=new Xr(dn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...o){this._each("register",o)}remove(...o){this._each("unregister",o)}addControllers(...o){this._each("register",o,this.controllers)}addElements(...o){this._each("register",o,this.elements)}addPlugins(...o){this._each("register",o,this.plugins)}addScales(...o){this._each("register",o,this.scales)}getController(o){return this._get(o,this.controllers,"controller")}getElement(o){return this._get(o,this.elements,"element")}getPlugin(o){return this._get(o,this.plugins,"plugin")}getScale(o){return this._get(o,this.scales,"scale")}removeControllers(...o){this._each("unregister",o,this.controllers)}removeElements(...o){this._each("unregister",o,this.elements)}removePlugins(...o){this._each("unregister",o,this.plugins)}removeScales(...o){this._each("unregister",o,this.scales)}_each(o,n,r){[...n].forEach(a=>{const s=r||this._getRegistryForType(a);r||s.isForType(a)||s===this.plugins&&a.id?this._exec(o,s,a):je(a,i=>{const l=r||this._getRegistryForType(i);this._exec(o,l,i)})})}_exec(o,n,r){const a=gs(o);qe(r["before"+a],[],r),n[o](r),qe(r["after"+a],[],r)}_getRegistryForType(o){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(o))return r}return this.plugins}_get(o,n,r){const a=n.get(o);if(a===void 0)throw new Error('"'+o+'" is not a registered '+r+".");return a}}var jt=new Dk;class Nk{constructor(){this._init=void 0}notify(o,n,r,a){if(n==="beforeInit"&&(this._init=this._createDescriptors(o,!0),this._notify(this._init,o,"install")),this._init===void 0)return;const s=a?this._descriptors(o).filter(a):this._descriptors(o),i=this._notify(s,o,n,r);return n==="afterDestroy"&&(this._notify(s,o,"stop"),this._notify(this._init,o,"uninstall"),this._init=void 0),i}_notify(o,n,r,a){a=a||{};for(const s of o){const i=s.plugin,l=i[r],c=[n,a,s.options];if(qe(l,c,i)===!1&&a.cancelable)return!1}return!0}invalidate(){$e(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(o){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(o);return this._notifyStateChanges(o),n}_createDescriptors(o,n){const r=o&&o.config,a=ve(r.options&&r.options.plugins,{}),s=Vk(r);return a===!1&&!n?[]:Tk(o,s,a,n)}_notifyStateChanges(o){const n=this._oldCache||[],r=this._cache,a=(s,i)=>s.filter(l=>!i.some(c=>l.plugin.id===c.plugin.id));this._notify(a(n,r),o,"stop"),this._notify(a(r,n),o,"start")}}function Vk(e){const o={},n=[],r=Object.keys(jt.plugins.items);for(let s=0;s<r.length;s++)n.push(jt.getPlugin(r[s]));const a=e.plugins||[];for(let s=0;s<a.length;s++){const i=a[s];n.indexOf(i)===-1&&(n.push(i),o[i.id]=!0)}return{plugins:n,localIds:o}}function Mk(e,o){return!o&&e===!1?null:e===!0?{}:e}function Tk(e,{plugins:o,localIds:n},r,a){const s=[],i=e.getContext();for(const l of o){const c=l.id,d=Mk(r[c],a);d!==null&&s.push({plugin:l,options:Pk(e.config,{plugin:l,local:n[c]},d,i)})}return s}function Pk(e,{plugin:o,local:n},r,a){const s=e.pluginScopeKeys(o),i=e.getOptionScopes(r,s);return n&&o.defaults&&i.push(o.defaults),e.createResolver(i,a,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function $s(e,o){const n=Qe.datasets[e]||{};return((o.datasets||{})[e]||{}).indexAxis||o.indexAxis||n.indexAxis||"x"}function Ok(e,o){let n=e;return e==="_index_"?n=o:e==="_value_"&&(n=o==="x"?"y":"x"),n}function Rk(e,o){return e===o?"_index_":"_value_"}function qd(e){if(e==="x"||e==="y"||e==="r")return e}function Lk(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function js(e,...o){if(qd(e))return e;for(const n of o){const r=n.axis||Lk(n.position)||e.length>1&&qd(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Gd(e,o,n){if(n[o+"AxisID"]===e)return{axis:o}}function Ik(e,o){if(o.data&&o.data.datasets){const n=o.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return Gd(e,"x",n[0])||Gd(e,"y",n[0])}return{}}function Fk(e,o){const n=Ro[e.type]||{scales:{}},r=o.scales||{},a=$s(e.type,o),s=Object.create(null);return Object.keys(r).forEach(i=>{const l=r[i];if(!Pe(l))return console.error(`Invalid scale configuration for scale: ${i}`);if(l._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${i}`);const c=js(i,l,Ik(i,e),Qe.scales[l.type]),d=Rk(c,a),f=n.scales||{};s[i]=Pn(Object.create(null),[{axis:c},l,f[c],f[d]])}),e.data.datasets.forEach(i=>{const l=i.type||e.type,c=i.indexAxis||$s(l,o),f=(Ro[l]||{}).scales||{};Object.keys(f).forEach(u=>{const h=Ok(u,c),m=i[h+"AxisID"]||h;s[m]=s[m]||Object.create(null),Pn(s[m],[{axis:h},r[m],f[u]])})}),Object.keys(s).forEach(i=>{const l=s[i];Pn(l,[Qe.scales[l.type],Qe.scale])}),s}function Kd(e){const o=e.options||(e.options={});o.plugins=ve(o.plugins,{}),o.scales=Fk(e,o)}function Xd(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function zk(e){return e=e||{},e.data=Xd(e.data),Kd(e),e}const Yd=new Map,Jd=new Set;function Yr(e,o){let n=Yd.get(e);return n||(n=o(),Yd.set(e,n),Jd.add(n)),n}const Xn=(e,o,n)=>{const r=To(o,n);r!==void 0&&e.add(r)};class $k{constructor(o){this._config=zk(o),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(o){this._config.type=o}get data(){return this._config.data}set data(o){this._config.data=Xd(o)}get options(){return this._config.options}set options(o){this._config.options=o}get plugins(){return this._config.plugins}update(){const o=this._config;this.clearCache(),Kd(o)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(o){return Yr(o,()=>[[`datasets.${o}`,""]])}datasetAnimationScopeKeys(o,n){return Yr(`${o}.transition.${n}`,()=>[[`datasets.${o}.transitions.${n}`,`transitions.${n}`],[`datasets.${o}`,""]])}datasetElementScopeKeys(o,n){return Yr(`${o}-${n}`,()=>[[`datasets.${o}.elements.${n}`,`datasets.${o}`,`elements.${n}`,""]])}pluginScopeKeys(o){const n=o.id,r=this.type;return Yr(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...o.additionalOptionScopes||[]]])}_cachedScopes(o,n){const r=this._scopeCache;let a=r.get(o);return(!a||n)&&(a=new Map,r.set(o,a)),a}getOptionScopes(o,n,r){const{options:a,type:s}=this,i=this._cachedScopes(o,r),l=i.get(n);if(l)return l;const c=new Set;n.forEach(f=>{o&&(c.add(o),f.forEach(u=>Xn(c,o,u))),f.forEach(u=>Xn(c,a,u)),f.forEach(u=>Xn(c,Ro[s]||{},u)),f.forEach(u=>Xn(c,Qe,u)),f.forEach(u=>Xn(c,Es,u))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),Jd.has(n)&&i.set(n,d),d}chartOptionScopes(){const{options:o,type:n}=this;return[o,Ro[n]||{},Qe.datasets[n]||{},{type:n},Qe,Es]}resolveNamedOptions(o,n,r,a=[""]){const s={$shared:!0},{resolver:i,subPrefixes:l}=Qd(this._resolverCache,o,a);let c=i;if(Uk(i,n)){s.$shared=!1,r=xo(r)?r():r;const d=this.createResolver(o,r,l);c=an(i,r,d)}for(const d of n)s[d]=c[d];return s}createResolver(o,n,r=[""],a){const{resolver:s}=Qd(this._resolverCache,o,r);return Pe(n)?an(s,n,void 0,a):s}}function Qd(e,o,n){let r=e.get(o);r||(r=new Map,e.set(o,r));const a=n.join();let s=r.get(a);return s||(s={resolver:As(o,n),subPrefixes:n.filter(l=>!l.toLowerCase().includes("hover"))},r.set(a,s)),s}const jk=e=>Pe(e)&&Object.getOwnPropertyNames(e).some(o=>xo(e[o]));function Uk(e,o){const{isScriptable:n,isIndexable:r}=td(e);for(const a of o){const s=n(a),i=r(a),l=(i||s)&&e[a];if(s&&(xo(l)||jk(l))||i&&Ze(l))return!0}return!1}var Wk="4.5.1";const Hk=["top","bottom","left","right","chartArea"];function Zd(e,o){return e==="top"||e==="bottom"||Hk.indexOf(e)===-1&&o==="x"}function ef(e,o){return function(n,r){return n[e]===r[e]?n[o]-r[o]:n[e]-r[e]}}function tf(e){const o=e.chart,n=o.options.animation;o.notifyPlugins("afterRender"),qe(n&&n.onComplete,[e],o)}function qk(e){const o=e.chart,n=o.options.animation;qe(n&&n.onProgress,[e],o)}function of(e){return Ns()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Jr={},nf=e=>{const o=of(e);return Object.values(Jr).filter(n=>n.canvas===o).pop()};function Gk(e,o,n){const r=Object.keys(e);for(const a of r){const s=+a;if(s>=o){const i=e[a];delete e[a],(n>0||s>o)&&(e[s+n]=i)}}}function Kk(e,o,n,r){return!n||e.type==="mouseout"?null:r?o:e}class ao{static register(...o){jt.add(...o),rf()}static unregister(...o){jt.remove(...o),rf()}constructor(o,n){const r=this.config=new $k(n),a=of(o),s=nf(a);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const i=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||uk(a)),this.platform.updateConfig(r);const l=this.platform.acquireContext(a,i.aspectRatio),c=l&&l.canvas,d=c&&c.height,f=c&&c.width;if(this.id=q0(),this.ctx=l,this.canvas=c,this.width=f,this.height=d,this._options=i,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Nk,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=fy(u=>this.update(u),i.resizeDelay||0),this._dataChanges=[],Jr[this.id]=this,!l||!c){console.error("Failed to create chart: can't acquire context from the given item");return}no.listen(this,"complete",tf),no.listen(this,"progress",qk),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:o,maintainAspectRatio:n},width:r,height:a,_aspectRatio:s}=this;return $e(o)?n&&s?s:a?r/a:null:o}get data(){return this.config.data}set data(o){this.config.data=o}get options(){return this._options}set options(o){this.config.options=o}get registry(){return jt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():ld(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Qc(this.canvas,this.ctx),this}stop(){return no.stop(this),this}resize(o,n){no.running(this)?this._resizeBeforeDraw={width:o,height:n}:this._resize(o,n)}_resize(o,n){const r=this.options,a=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(a,o,n,s),l=r.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,ld(this,l,!0)&&(this.notifyPlugins("resize",{size:i}),qe(r.onResize,[this,i],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};je(n,(r,a)=>{r.id=a})}buildOrUpdateScales(){const o=this.options,n=o.scales,r=this.scales,a=Object.keys(r).reduce((i,l)=>(i[l]=!1,i),{});let s=[];n&&(s=s.concat(Object.keys(n).map(i=>{const l=n[i],c=js(i,l),d=c==="r",f=c==="x";return{options:l,dposition:d?"chartArea":f?"bottom":"left",dtype:d?"radialLinear":f?"category":"linear"}}))),je(s,i=>{const l=i.options,c=l.id,d=js(c,l),f=ve(l.type,i.dtype);(l.position===void 0||Zd(l.position,d)!==Zd(i.dposition))&&(l.position=i.dposition),a[c]=!0;let u=null;if(c in r&&r[c].type===f)u=r[c];else{const h=jt.getScale(f);u=new h({id:c,type:f,ctx:this.ctx,chart:this}),r[u.id]=u}u.init(l,o)}),je(a,(i,l)=>{i||delete r[l]}),je(r,i=>{vt.configure(this,i,i.options),vt.addBox(this,i)})}_updateMetasets(){const o=this._metasets,n=this.data.datasets.length,r=o.length;if(o.sort((a,s)=>a.index-s.index),r>n){for(let a=n;a<r;++a)this._destroyDatasetMeta(a);o.splice(n,r-n)}this._sortedMetasets=o.slice(0).sort(ef("order","index"))}_removeUnreferencedMetasets(){const{_metasets:o,data:{datasets:n}}=this;o.length>n.length&&delete this._stacks,o.forEach((r,a)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(a)})}buildOrUpdateControllers(){const o=[],n=this.data.datasets;let r,a;for(this._removeUnreferencedMetasets(),r=0,a=n.length;r<a;r++){const s=n[r];let i=this.getDatasetMeta(r);const l=s.type||this.config.type;if(i.type&&i.type!==l&&(this._destroyDatasetMeta(r),i=this.getDatasetMeta(r)),i.type=l,i.indexAxis=s.indexAxis||$s(l,this.options),i.order=s.order||0,i.index=r,i.label=""+s.label,i.visible=this.isDatasetVisible(r),i.controller)i.controller.updateIndex(r),i.controller.linkScales();else{const c=jt.getController(l),{datasetElementType:d,dataElementType:f}=Qe.datasets[l];Object.assign(c,{dataElementType:jt.getElement(f),datasetElementType:d&&jt.getElement(d)}),i.controller=new c(this,r),o.push(i.controller)}}return this._updateMetasets(),o}_resetElements(){je(this.data.datasets,(o,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(o){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),a=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:o,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let i=0;for(let d=0,f=this.data.datasets.length;d<f;d++){const{controller:u}=this.getDatasetMeta(d),h=!a&&s.indexOf(u)===-1;u.buildOrUpdateElements(h),i=Math.max(+u.getMaxOverflow(),i)}i=this._minPadding=r.layout.autoPadding?i:0,this._updateLayout(i),a||je(s,d=>{d.reset()}),this._updateDatasets(o),this.notifyPlugins("afterUpdate",{mode:o}),this._layers.sort(ef("z","_idx"));const{_active:l,_lastEvent:c}=this;c?this._eventHandler(c,!0):l.length&&this._updateHoverStyles(l,l,!0),this.render()}_updateScales(){je(this.scales,o=>{vt.removeBox(this,o)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const o=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(o.events);(!Oc(n,r)||!!this._responsiveListeners!==o.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:o}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:a,count:s}of n){const i=r==="_removeElements"?-s:s;Gk(o,a,i)}}_getUniformDataChanges(){const o=this._dataChanges;if(!o||!o.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(o.filter(i=>i[0]===s).map((i,l)=>l+","+i.splice(1).join(","))),a=r(0);for(let s=1;s<n;s++)if(!Oc(a,r(s)))return;return Array.from(a).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(o){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;vt.update(this,this.width,this.height,o);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],je(this.boxes,a=>{r&&a.position==="chartArea"||(a.configure&&a.configure(),this._layers.push(...a._layers()))},this),this._layers.forEach((a,s)=>{a._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(o){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:o,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,xo(o)?o({datasetIndex:n}):o);this.notifyPlugins("afterDatasetsUpdate",{mode:o})}}_updateDataset(o,n){const r=this.getDatasetMeta(o),a={meta:r,index:o,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",a)!==!1&&(r.controller._update(n),a.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",a))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(no.has(this)?this.attached&&!no.running(this)&&no.start(this):(this.draw(),tf({chart:this})))}draw(){let o;if(this._resizeBeforeDraw){const{width:r,height:a}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,a)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(o=0;o<n.length&&n[o].z<=0;++o)n[o].draw(this.chartArea);for(this._drawDatasets();o<n.length;++o)n[o].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(o){const n=this._sortedMetasets,r=[];let a,s;for(a=0,s=n.length;a<s;++a){const i=n[a];(!o||i.visible)&&r.push(i)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const o=this.getSortedVisibleDatasetMetas();for(let n=o.length-1;n>=0;--n)this._drawDataset(o[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(o){const n=this.ctx,r={meta:o,index:o.index,cancelable:!0},a=yd(this,o);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(a&&Pr(n,a),o.controller.draw(),a&&Or(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(o){return $n(o,this.chartArea,this._minPadding)}getElementsAtEventForMode(o,n,r,a){const s=Hx.modes[n];return typeof s=="function"?s(this,o,r,a):[]}getDatasetMeta(o){const n=this.data.datasets[o],r=this._metasets;let a=r.filter(s=>s&&s._dataset===n).pop();return a||(a={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:o,_dataset:n,_parsed:[],_sorted:!1},r.push(a)),a}getContext(){return this.$context||(this.$context=Io(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(o){const n=this.data.datasets[o];if(!n)return!1;const r=this.getDatasetMeta(o);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(o,n){const r=this.getDatasetMeta(o);r.hidden=!n}toggleDataVisibility(o){this._hiddenIndices[o]=!this._hiddenIndices[o]}getDataVisibility(o){return!this._hiddenIndices[o]}_updateVisibility(o,n,r){const a=r?"show":"hide",s=this.getDatasetMeta(o),i=s.controller._resolveAnimations(void 0,a);On(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(o,r),i.update(s,{visible:r}),this.update(l=>l.datasetIndex===o?a:void 0))}hide(o,n){this._updateVisibility(o,n,!1)}show(o,n){this._updateVisibility(o,n,!0)}_destroyDatasetMeta(o){const n=this._metasets[o];n&&n.controller&&n.controller._destroy(),delete this._metasets[o]}_stop(){let o,n;for(this.stop(),no.remove(this),o=0,n=this.data.datasets.length;o<n;++o)this._destroyDatasetMeta(o)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:o,ctx:n}=this;this._stop(),this.config.clearCache(),o&&(this.unbindEvents(),Qc(o,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Jr[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...o){return this.canvas.toDataURL(...o)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const o=this._listeners,n=this.platform,r=(s,i)=>{n.addEventListener(this,s,i),o[s]=i},a=(s,i,l)=>{s.offsetX=i,s.offsetY=l,this._eventHandler(s)};je(this.options.events,s=>r(s,a))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const o=this._responsiveListeners,n=this.platform,r=(c,d)=>{n.addEventListener(this,c,d),o[c]=d},a=(c,d)=>{o[c]&&(n.removeEventListener(this,c,d),delete o[c])},s=(c,d)=>{this.canvas&&this.resize(c,d)};let i;const l=()=>{a("attach",l),this.attached=!0,this.resize(),r("resize",s),r("detach",i)};i=()=>{this.attached=!1,a("resize",s),this._stop(),this._resize(0,0),r("attach",l)},n.isAttached(this.canvas)?l():i()}unbindEvents(){je(this._listeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._listeners={},je(this._responsiveListeners,(o,n)=>{this.platform.removeEventListener(this,n,o)}),this._responsiveListeners=void 0}updateHoverStyle(o,n,r){const a=r?"set":"remove";let s,i,l,c;for(n==="dataset"&&(s=this.getDatasetMeta(o[0].datasetIndex),s.controller["_"+a+"DatasetHoverStyle"]()),l=0,c=o.length;l<c;++l){i=o[l];const d=i&&this.getDatasetMeta(i.datasetIndex).controller;d&&d[a+"HoverStyle"](i.element,i.datasetIndex,i.index)}}getActiveElements(){return this._active||[]}setActiveElements(o){const n=this._active||[],r=o.map(({datasetIndex:s,index:i})=>{const l=this.getDatasetMeta(s);if(!l)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:l.data[i],index:i}});!Nr(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(o,n,r){return this._plugins.notify(this,o,n,r)}isPluginEnabled(o){return this._plugins._cache.filter(n=>n.plugin.id===o).length===1}_updateHoverStyles(o,n,r){const a=this.options.hover,s=(c,d)=>c.filter(f=>!d.some(u=>f.datasetIndex===u.datasetIndex&&f.index===u.index)),i=s(n,o),l=r?o:s(o,n);i.length&&this.updateHoverStyle(i,a.mode,!1),l.length&&a.mode&&this.updateHoverStyle(l,a.mode,!0)}_eventHandler(o,n){const r={event:o,replay:n,cancelable:!0,inChartArea:this.isPointInArea(o)},a=i=>(i.options.events||this.options.events).includes(o.native.type);if(this.notifyPlugins("beforeEvent",r,a)===!1)return;const s=this._handleEvent(o,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(s||r.changed)&&this.render(),this}_handleEvent(o,n,r){const{_active:a=[],options:s}=this,i=n,l=this._getActiveElements(o,a,r,i),c=Q0(o),d=Kk(o,this._lastEvent,r,c);r&&(this._lastEvent=null,qe(s.onHover,[o,l,this],this),c&&qe(s.onClick,[o,l,this],this));const f=!Nr(l,a);return(f||n)&&(this._active=l,this._updateHoverStyles(l,a,n)),this._lastEvent=d,f}_getActiveElements(o,n,r,a){if(o.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(o,s.mode,s,a)}}be(ao,"defaults",Qe),be(ao,"instances",Jr),be(ao,"overrides",Ro),be(ao,"registry",jt),be(ao,"version",Wk),be(ao,"getChart",nf);function rf(){return je(ao.instances,e=>e._plugins.invalidate())}function Xk(e,o,n){const{startAngle:r,x:a,y:s,outerRadius:i,innerRadius:l,options:c}=o,{borderWidth:d,borderJoinStyle:f}=c,u=Math.min(d/i,yt(r-n));if(e.beginPath(),e.arc(a,s,i-d/2,r+u/2,n-u/2),l>0){const h=Math.min(d/l,yt(r-n));e.arc(a,s,l+d/2,n-h/2,r+h/2,!0)}else{const h=Math.min(d/2,i*yt(r-n));if(f==="round")e.arc(a,s,h,n-Ue/2,r+Ue/2,!0);else if(f==="bevel"){const m=2*h*h,p=-m*Math.cos(n+Ue/2)+a,y=-m*Math.sin(n+Ue/2)+s,b=m*Math.cos(r+Ue/2)+a,g=m*Math.sin(r+Ue/2)+s;e.lineTo(p,y),e.lineTo(b,g)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Yk(e,o,n){const{startAngle:r,pixelMargin:a,x:s,y:i,outerRadius:l,innerRadius:c}=o;let d=a/l;e.beginPath(),e.arc(s,i,l,r-d,n+d),c>a?(d=a/c,e.arc(s,i,c,n+d,r-d,!0)):e.arc(s,i,a,n+tt,r-tt),e.closePath(),e.clip()}function Jk(e){return Ss(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Qk(e,o,n,r){const a=Jk(e.options.borderRadius),s=(n-o)/2,i=Math.min(s,r*o/2),l=c=>{const d=(n-Math.min(s,c))*r/2;return st(c,0,Math.min(s,d))};return{outerStart:l(a.outerStart),outerEnd:l(a.outerEnd),innerStart:st(a.innerStart,0,i),innerEnd:st(a.innerEnd,0,i)}}function fn(e,o,n,r){return{x:n+e*Math.cos(o),y:r+e*Math.sin(o)}}function Qr(e,o,n,r,a,s){const{x:i,y:l,startAngle:c,pixelMargin:d,innerRadius:f}=o,u=Math.max(o.outerRadius+r+n-d,0),h=f>0?f+r+n+d:0;let m=0;const p=a-c;if(r){const R=f>0?f-r:0,O=u>0?u-r:0,P=(R+O)/2,L=P!==0?p*P/(P+r):p;m=(p-L)/2}const y=Math.max(.001,p*u-n/Ue)/u,b=(p-y)/2,g=c+b+m,E=a-b-m,{outerStart:_,outerEnd:B,innerStart:A,innerEnd:C}=Qk(o,h,u,E-g),x=u-_,k=u-B,N=g+_/x,w=E-B/k,v=h+A,S=h+C,D=g+A/v,V=E-C/S;if(e.beginPath(),s){const R=(N+w)/2;if(e.arc(i,l,u,N,R),e.arc(i,l,u,R,w),B>0){const $=fn(k,w,i,l);e.arc($.x,$.y,B,w,E+tt)}const O=fn(S,E,i,l);if(e.lineTo(O.x,O.y),C>0){const $=fn(S,V,i,l);e.arc($.x,$.y,C,E+tt,V+Math.PI)}const P=(E-C/h+(g+A/h))/2;if(e.arc(i,l,h,E-C/h,P,!0),e.arc(i,l,h,P,g+A/h,!0),A>0){const $=fn(v,D,i,l);e.arc($.x,$.y,A,D+Math.PI,g-tt)}const L=fn(x,g,i,l);if(e.lineTo(L.x,L.y),_>0){const $=fn(x,N,i,l);e.arc($.x,$.y,_,g-tt,N)}}else{e.moveTo(i,l);const R=Math.cos(N)*u+i,O=Math.sin(N)*u+l;e.lineTo(R,O);const P=Math.cos(w)*u+i,L=Math.sin(w)*u+l;e.lineTo(P,L)}e.closePath()}function Zk(e,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l}=o;let c=o.endAngle;if(s){Qr(e,o,n,r,c,a);for(let d=0;d<s;++d)e.fill();isNaN(l)||(c=i+(l%Ke||Ke))}return Qr(e,o,n,r,c,a),e.fill(),c}function e1(e,o,n,r,a){const{fullCircles:s,startAngle:i,circumference:l,options:c}=o,{borderWidth:d,borderJoinStyle:f,borderDash:u,borderDashOffset:h,borderRadius:m}=c,p=c.borderAlign==="inner";if(!d)return;e.setLineDash(u||[]),e.lineDashOffset=h,p?(e.lineWidth=d*2,e.lineJoin=f||"round"):(e.lineWidth=d,e.lineJoin=f||"bevel");let y=o.endAngle;if(s){Qr(e,o,n,r,y,a);for(let b=0;b<s;++b)e.stroke();isNaN(l)||(y=i+(l%Ke||Ke))}p&&Yk(e,o,y),c.selfJoin&&y-i>=Ue&&m===0&&f!=="miter"&&Xk(e,o,y),s||(Qr(e,o,n,r,y,a),e.stroke())}class Yn extends ro{constructor(n){super();be(this,"circumference");be(this,"endAngle");be(this,"fullCircles");be(this,"innerRadius");be(this,"outerRadius");be(this,"pixelMargin");be(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.getProps(["x","y"],a),{angle:i,distance:l}=zc(s,{x:n,y:r}),{startAngle:c,endAngle:d,innerRadius:f,outerRadius:u,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],a),m=(this.options.spacing+this.options.borderWidth)/2,p=ve(h,d-c),y=In(i,c,d)&&c!==d,b=p>=Ke||y,g=oo(l,f+m,u+m);return b&&g}getCenterPoint(n){const{x:r,y:a,startAngle:s,endAngle:i,innerRadius:l,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:d,spacing:f}=this.options,u=(s+i)/2,h=(l+c+f+d)/2;return{x:r+Math.cos(u)*h,y:a+Math.sin(u)*h}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:a}=this,s=(r.offset||0)/4,i=(r.spacing||0)/2,l=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=a>Ke?Math.floor(a/Ke):0,a===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const c=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(c)*s,Math.sin(c)*s);const d=1-Math.sin(Math.min(Ue,a||0)),f=s*d;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,Zk(n,this,f,i,l),e1(n,this,f,i,l),n.restore()}}be(Yn,"id","arc"),be(Yn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),be(Yn,"defaultRoutes",{backgroundColor:"backgroundColor"}),be(Yn,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function af(e,o,n=o){e.lineCap=ve(n.borderCapStyle,o.borderCapStyle),e.setLineDash(ve(n.borderDash,o.borderDash)),e.lineDashOffset=ve(n.borderDashOffset,o.borderDashOffset),e.lineJoin=ve(n.borderJoinStyle,o.borderJoinStyle),e.lineWidth=ve(n.borderWidth,o.borderWidth),e.strokeStyle=ve(n.borderColor,o.borderColor)}function t1(e,o,n){e.lineTo(n.x,n.y)}function o1(e){return e.stepped?By:e.tension||e.cubicInterpolationMode==="monotone"?Sy:t1}function sf(e,o,n={}){const r=e.length,{start:a=0,end:s=r-1}=n,{start:i,end:l}=o,c=Math.max(a,i),d=Math.min(s,l),f=a<i&&s<i||a>l&&s>l;return{count:r,start:c,loop:o.loop,ilen:d<c&&!f?r+d-c:d-c}}function n1(e,o,n,r){const{points:a,options:s}=o,{count:i,start:l,loop:c,ilen:d}=sf(a,n,r),f=o1(s);let{move:u=!0,reverse:h}=r||{},m,p,y;for(m=0;m<=d;++m)p=a[(l+(h?d-m:m))%i],!p.skip&&(u?(e.moveTo(p.x,p.y),u=!1):f(e,y,p,h,s.stepped),y=p);return c&&(p=a[(l+(h?d:0))%i],f(e,y,p,h,s.stepped)),!!c}function r1(e,o,n,r){const a=o.points,{count:s,start:i,ilen:l}=sf(a,n,r),{move:c=!0,reverse:d}=r||{};let f=0,u=0,h,m,p,y,b,g;const E=B=>(i+(d?l-B:B))%s,_=()=>{y!==b&&(e.lineTo(f,b),e.lineTo(f,y),e.lineTo(f,g))};for(c&&(m=a[E(0)],e.moveTo(m.x,m.y)),h=0;h<=l;++h){if(m=a[E(h)],m.skip)continue;const B=m.x,A=m.y,C=B|0;C===p?(A<y?y=A:A>b&&(b=A),f=(u*f+B)/++u):(_(),e.lineTo(B,A),p=C,u=0,y=b=A),g=A}_()}function Us(e){const o=e.options,n=o.borderDash&&o.borderDash.length;return!e._decimated&&!e._loop&&!o.tension&&o.cubicInterpolationMode!=="monotone"&&!o.stepped&&!n?r1:n1}function a1(e){return e.stepped?rx:e.tension||e.cubicInterpolationMode==="monotone"?ax:$o}function s1(e,o,n,r){let a=o._path;a||(a=o._path=new Path2D,o.path(a,n,r)&&a.closePath()),af(e,o.options),e.stroke(a)}function i1(e,o,n,r){const{segments:a,options:s}=o,i=Us(o);for(const l of a)af(e,s,l.style),e.beginPath(),i(e,o,l,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const l1=typeof Path2D=="function";function c1(e,o,n,r){l1&&!o.options.segment?s1(e,o,n,r):i1(e,o,n,r)}class wo extends ro{constructor(o){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,o&&Object.assign(this,o)}updateControlPoints(o,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const a=r.spanGaps?this._loop:this._fullLoop;Yy(this._points,r,o,a,n),this._pointsUpdated=!0}}set points(o){this._points=o,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=fx(this,this.options.segment))}first(){const o=this.segments,n=this.points;return o.length&&n[o[0].start]}last(){const o=this.segments,n=this.points,r=o.length;return r&&n[o[r-1].end]}interpolate(o,n){const r=this.options,a=o[n],s=this.points,i=pd(this,{property:n,start:a,end:a});if(!i.length)return;const l=[],c=a1(r);let d,f;for(d=0,f=i.length;d<f;++d){const{start:u,end:h}=i[d],m=s[u],p=s[h];if(m===p){l.push(m);continue}const y=Math.abs((a-m[n])/(p[n]-m[n])),b=c(m,p,y,r.stepped);b[n]=o[n],l.push(b)}return l.length===1?l[0]:l}pathSegment(o,n,r){return Us(this)(o,this,n,r)}path(o,n,r){const a=this.segments,s=Us(this);let i=this._loop;n=n||0,r=r||this.points.length-n;for(const l of a)i&=s(o,this,l,{start:n,end:n+r-1});return!!i}draw(o,n,r,a){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(o.save(),c1(o,this,r,a),o.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}be(wo,"id","line"),be(wo,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),be(wo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),be(wo,"descriptors",{_scriptable:!0,_indexable:o=>o!=="borderDash"&&o!=="fill"});function lf(e,o,n,r){const a=e.options,{[n]:s}=e.getProps([n],r);return Math.abs(o-s)<a.radius+a.hitRadius}class Zr extends ro{constructor(n){super();be(this,"parsed");be(this,"skip");be(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,a){const s=this.options,{x:i,y:l}=this.getProps(["x","y"],a);return Math.pow(n-i,2)+Math.pow(r-l,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return lf(this,n,"x",r)}inYRange(n,r){return lf(this,n,"y",r)}getCenterPoint(n){const{x:r,y:a}=this.getProps(["x","y"],n);return{x:r,y:a}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const a=r&&n.borderWidth||0;return(r+a)*2}draw(n,r){const a=this.options;this.skip||a.radius<.1||!$n(this,r,this.size(a)/2)||(n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.fillStyle=a.backgroundColor,Bs(n,a,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}be(Zr,"id","point"),be(Zr,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),be(Zr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function cf(e,o){const{x:n,y:r,base:a,width:s,height:i}=e.getProps(["x","y","base","width","height"],o);let l,c,d,f,u;return e.horizontal?(u=i/2,l=Math.min(n,a),c=Math.max(n,a),d=r-u,f=r+u):(u=s/2,l=n-u,c=n+u,d=Math.min(r,a),f=Math.max(r,a)),{left:l,top:d,right:c,bottom:f}}function Co(e,o,n,r){return e?0:st(o,n,r)}function d1(e,o,n){const r=e.options.borderWidth,a=e.borderSkipped,s=ed(r);return{t:Co(a.top,s.top,0,n),r:Co(a.right,s.right,0,o),b:Co(a.bottom,s.bottom,0,n),l:Co(a.left,s.left,0,o)}}function f1(e,o,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),a=e.options.borderRadius,s=rn(a),i=Math.min(o,n),l=e.borderSkipped,c=r||Pe(a);return{topLeft:Co(!c||l.top||l.left,s.topLeft,0,i),topRight:Co(!c||l.top||l.right,s.topRight,0,i),bottomLeft:Co(!c||l.bottom||l.left,s.bottomLeft,0,i),bottomRight:Co(!c||l.bottom||l.right,s.bottomRight,0,i)}}function u1(e){const o=cf(e),n=o.right-o.left,r=o.bottom-o.top,a=d1(e,n/2,r/2),s=f1(e,n/2,r/2);return{outer:{x:o.left,y:o.top,w:n,h:r,radius:s},inner:{x:o.left+a.l,y:o.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(a.t,a.l)),topRight:Math.max(0,s.topRight-Math.max(a.t,a.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(a.b,a.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(a.b,a.r))}}}}function Ws(e,o,n,r){const a=o===null,s=n===null,l=e&&!(a&&s)&&cf(e,r);return l&&(a||oo(o,l.left,l.right))&&(s||oo(n,l.top,l.bottom))}function h1(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function m1(e,o){e.rect(o.x,o.y,o.w,o.h)}function Hs(e,o,n={}){const r=e.x!==n.x?-o:0,a=e.y!==n.y?-o:0,s=(e.x+e.w!==n.x+n.w?o:0)-r,i=(e.y+e.h!==n.y+n.h?o:0)-a;return{x:e.x+r,y:e.y+a,w:e.w+s,h:e.h+i,radius:e.radius}}class ea extends ro{constructor(o){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,o&&Object.assign(this,o)}draw(o){const{inflateAmount:n,options:{borderColor:r,backgroundColor:a}}=this,{inner:s,outer:i}=u1(this),l=h1(i.radius)?Rr:m1;o.save(),(i.w!==s.w||i.h!==s.h)&&(o.beginPath(),l(o,Hs(i,n,s)),o.clip(),l(o,Hs(s,-n,i)),o.fillStyle=r,o.fill("evenodd")),o.beginPath(),l(o,Hs(s,n)),o.fillStyle=a,o.fill(),o.restore()}inRange(o,n,r){return Ws(this,o,n,r)}inXRange(o,n){return Ws(this,o,null,n)}inYRange(o,n){return Ws(this,null,o,n)}getCenterPoint(o){const{x:n,y:r,base:a,horizontal:s}=this.getProps(["x","y","base","horizontal"],o);return{x:s?(n+a)/2:n,y:s?r:(r+a)/2}}getRange(o){return o==="x"?this.width/2:this.height/2}}be(ea,"id","bar"),be(ea,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),be(ea,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function p1(e,o,n){const r=e.segments,a=e.points,s=o.points,i=[];for(const l of r){let{start:c,end:d}=l;d=ta(c,d,a);const f=qs(n,a[c],a[d],l.loop);if(!o.segments){i.push({source:l,target:f,start:a[c],end:a[d]});continue}const u=pd(o,f);for(const h of u){const m=qs(n,s[h.start],s[h.end],h.loop),p=md(l,a,m);for(const y of p)i.push({source:y,target:h,start:{[n]:df(f,m,"start",Math.max)},end:{[n]:df(f,m,"end",Math.min)}})}}return i}function qs(e,o,n,r){if(r)return;let a=o[e],s=n[e];return e==="angle"&&(a=yt(a),s=yt(s)),{property:e,start:a,end:s}}function g1(e,o){const{x:n=null,y:r=null}=e||{},a=o.points,s=[];return o.segments.forEach(({start:i,end:l})=>{l=ta(i,l,a);const c=a[i],d=a[l];r!==null?(s.push({x:c.x,y:r}),s.push({x:d.x,y:r})):n!==null&&(s.push({x:n,y:c.y}),s.push({x:n,y:d.y}))}),s}function ta(e,o,n){for(;o>e;o--){const r=n[o];if(!isNaN(r.x)&&!isNaN(r.y))break}return o}function df(e,o,n,r){return e&&o?r(e[n],o[n]):e?e[n]:o?o[n]:0}function ff(e,o){let n=[],r=!1;return Ze(e)?(r=!0,n=e):n=g1(e,o),n.length?new wo({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function uf(e){return e&&e.fill!==!1}function b1(e,o,n){let a=e[o].fill;const s=[o];let i;if(!n)return a;for(;a!==!1&&s.indexOf(a)===-1;){if(!at(a))return a;if(i=e[a],!i)return!1;if(i.visible)return a;s.push(a),a=i.fill}return!1}function y1(e,o,n){const r=C1(e);if(Pe(r))return isNaN(r.value)?!1:r;let a=parseFloat(r);return at(a)&&Math.floor(a)===a?x1(r[0],o,a,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function x1(e,o,n,r){return(e==="-"||e==="+")&&(n=o+n),n===o||n<0||n>=r?!1:n}function k1(e,o){let n=null;return e==="start"?n=o.bottom:e==="end"?n=o.top:Pe(e)?n=o.getPixelForValue(e.value):o.getBasePixel&&(n=o.getBasePixel()),n}function w1(e,o,n){let r;return e==="start"?r=n:e==="end"?r=o.options.reverse?o.min:o.max:Pe(e)?r=e.value:r=o.getBaseValue(),r}function C1(e){const o=e.options,n=o.fill;let r=ve(n&&n.target,n);return r===void 0&&(r=!!o.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function E1(e){const{scale:o,index:n,line:r}=e,a=[],s=r.segments,i=r.points,l=_1(o,n);l.push(ff({x:null,y:o.bottom},r));for(let c=0;c<s.length;c++){const d=s[c];for(let f=d.start;f<=d.end;f++)B1(a,i[f],l)}return new wo({points:a,options:{}})}function _1(e,o){const n=[],r=e.getMatchingVisibleMetas("line");for(let a=0;a<r.length;a++){const s=r[a];if(s.index===o)break;s.hidden||n.unshift(s.dataset)}return n}function B1(e,o,n){const r=[];for(let a=0;a<n.length;a++){const s=n[a],{first:i,last:l,point:c}=S1(s,o,"x");if(!(!c||i&&l)){if(i)r.unshift(c);else if(e.push(c),!l)break}}e.push(...r)}function S1(e,o,n){const r=e.interpolate(o,n);if(!r)return{};const a=r[n],s=e.segments,i=e.points;let l=!1,c=!1;for(let d=0;d<s.length;d++){const f=s[d],u=i[f.start][n],h=i[f.end][n];if(oo(a,u,h)){l=a===u,c=a===h;break}}return{first:l,last:c,point:r}}class hf{constructor(o){this.x=o.x,this.y=o.y,this.radius=o.radius}pathSegment(o,n,r){const{x:a,y:s,radius:i}=this;return n=n||{start:0,end:Ke},o.arc(a,s,i,n.end,n.start,!0),!r.bounds}interpolate(o){const{x:n,y:r,radius:a}=this,s=o.angle;return{x:n+Math.cos(s)*a,y:r+Math.sin(s)*a,angle:s}}}function A1(e){const{chart:o,fill:n,line:r}=e;if(at(n))return v1(o,n);if(n==="stack")return E1(e);if(n==="shape")return!0;const a=D1(e);return a instanceof hf?a:ff(a,r)}function v1(e,o){const n=e.getDatasetMeta(o);return n&&e.isDatasetVisible(o)?n.dataset:null}function D1(e){return(e.scale||{}).getPointPositionForValue?V1(e):N1(e)}function N1(e){const{scale:o={},fill:n}=e,r=k1(n,o);if(at(r)){const a=o.isHorizontal();return{x:a?r:null,y:a?null:r}}return null}function V1(e){const{scale:o,fill:n}=e,r=o.options,a=o.getLabels().length,s=r.reverse?o.max:o.min,i=w1(n,o,s),l=[];if(r.grid.circular){const c=o.getPointPositionForValue(0,s);return new hf({x:c.x,y:c.y,radius:o.getDistanceFromCenterForValue(i)})}for(let c=0;c<a;++c)l.push(o.getPointPositionForValue(c,i));return l}function Gs(e,o,n){const r=A1(o),{chart:a,index:s,line:i,scale:l,axis:c}=o,d=i.options,f=d.fill,u=d.backgroundColor,{above:h=u,below:m=u}=f||{},p=a.getDatasetMeta(s),y=yd(a,p);r&&i.points.length&&(Pr(e,n),M1(e,{line:i,target:r,above:h,below:m,area:n,scale:l,axis:c,clip:y}),Or(e))}function M1(e,o){const{line:n,target:r,above:a,below:s,area:i,scale:l,clip:c}=o,d=n._loop?"angle":o.axis;e.save();let f=s;s!==a&&(d==="x"?(mf(e,r,i.top),Ks(e,{line:n,target:r,color:a,scale:l,property:d,clip:c}),e.restore(),e.save(),mf(e,r,i.bottom)):d==="y"&&(pf(e,r,i.left),Ks(e,{line:n,target:r,color:s,scale:l,property:d,clip:c}),e.restore(),e.save(),pf(e,r,i.right),f=a)),Ks(e,{line:n,target:r,color:f,scale:l,property:d,clip:c}),e.restore()}function mf(e,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;e.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[ta(c,d,a)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(f.x,n),e.lineTo(f.x,f.y)),i=!!o.pathSegment(e,l,{move:i}),i?e.closePath():e.lineTo(u.x,n)}e.lineTo(o.first().x,n),e.closePath(),e.clip()}function pf(e,o,n){const{segments:r,points:a}=o;let s=!0,i=!1;e.beginPath();for(const l of r){const{start:c,end:d}=l,f=a[c],u=a[ta(c,d,a)];s?(e.moveTo(f.x,f.y),s=!1):(e.lineTo(n,f.y),e.lineTo(f.x,f.y)),i=!!o.pathSegment(e,l,{move:i}),i?e.closePath():e.lineTo(n,u.y)}e.lineTo(n,o.first().y),e.closePath(),e.clip()}function Ks(e,o){const{line:n,target:r,property:a,color:s,scale:i,clip:l}=o,c=p1(n,r,a);for(const{source:d,target:f,start:u,end:h}of c){const{style:{backgroundColor:m=s}={}}=d,p=r!==!0;e.save(),e.fillStyle=m,T1(e,i,l,p&&qs(a,u,h)),e.beginPath();const y=!!n.pathSegment(e,d);let b;if(p){y?e.closePath():gf(e,r,h,a);const g=!!r.pathSegment(e,f,{move:y,reverse:!0});b=y&&g,b||gf(e,r,u,a)}e.closePath(),e.fill(b?"evenodd":"nonzero"),e.restore()}}function T1(e,o,n,r){const a=o.chart.chartArea,{property:s,start:i,end:l}=r||{};if(s==="x"||s==="y"){let c,d,f,u;s==="x"?(c=i,d=a.top,f=l,u=a.bottom):(c=a.left,d=i,f=a.right,u=l),e.beginPath(),n&&(c=Math.max(c,n.left),f=Math.min(f,n.right),d=Math.max(d,n.top),u=Math.min(u,n.bottom)),e.rect(c,d,f-c,u-d),e.clip()}}function gf(e,o,n,r){const a=o.interpolate(n,r);a&&e.lineTo(a.x,a.y)}var P1={id:"filler",afterDatasetsUpdate(e,o,n){const r=(e.data.datasets||[]).length,a=[];let s,i,l,c;for(i=0;i<r;++i)s=e.getDatasetMeta(i),l=s.dataset,c=null,l&&l.options&&l instanceof wo&&(c={visible:e.isDatasetVisible(i),index:i,fill:y1(l,i,r),chart:e,axis:s.controller.options.indexAxis,scale:s.vScale,line:l}),s.$filler=c,a.push(c);for(i=0;i<r;++i)c=a[i],!(!c||c.fill===!1)&&(c.fill=b1(a,i,n.propagate))},beforeDraw(e,o,n){const r=n.drawTime==="beforeDraw",a=e.getSortedVisibleDatasetMetas(),s=e.chartArea;for(let i=a.length-1;i>=0;--i){const l=a[i].$filler;l&&(l.line.updateControlPoints(s,l.axis),r&&l.fill&&Gs(e.ctx,l,s))}},beforeDatasetsDraw(e,o,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=e.getSortedVisibleDatasetMetas();for(let a=r.length-1;a>=0;--a){const s=r[a].$filler;uf(s)&&Gs(e.ctx,s,e.chartArea)}},beforeDatasetDraw(e,o,n){const r=o.meta.$filler;!uf(r)||n.drawTime!=="beforeDatasetDraw"||Gs(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const bf=(e,o)=>{let{boxHeight:n=o,boxWidth:r=o}=e;return e.usePointStyle&&(n=Math.min(n,o),r=e.pointStyleWidth||Math.min(r,o)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(o,n)}},O1=(e,o)=>e!==null&&o!==null&&e.datasetIndex===o.datasetIndex&&e.index===o.index;class yf extends ro{constructor(o){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n,r){this.maxWidth=o,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const o=this.options.labels||{};let n=qe(o.generateLabels,[this.chart],this)||[];o.filter&&(n=n.filter(r=>o.filter(r,this.chart.data))),o.sort&&(n=n.sort((r,a)=>o.sort(r,a,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:o,ctx:n}=this;if(!o.display){this.width=this.height=0;return}const r=o.labels,a=lt(r.font),s=a.size,i=this._computeTitleHeight(),{boxWidth:l,itemHeight:c}=bf(r,s);let d,f;n.font=a.string,this.isHorizontal()?(d=this.maxWidth,f=this._fitRows(i,s,l,c)+10):(f=this.maxHeight,d=this._fitCols(i,a,l,c)+10),this.width=Math.min(d,o.maxWidth||this.maxWidth),this.height=Math.min(f,o.maxHeight||this.maxHeight)}_fitRows(o,n,r,a){const{ctx:s,maxWidth:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],f=a+l;let u=o;s.textAlign="left",s.textBaseline="middle";let h=-1,m=-f;return this.legendItems.forEach((p,y)=>{const b=r+n/2+s.measureText(p.text).width;(y===0||d[d.length-1]+b+2*l>i)&&(u+=f,d[d.length-(y>0?0:1)]=0,m+=f,h++),c[y]={left:0,top:m,row:h,width:b,height:a},d[d.length-1]+=b+l}),u}_fitCols(o,n,r,a){const{ctx:s,maxHeight:i,options:{labels:{padding:l}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],f=i-o;let u=l,h=0,m=0,p=0,y=0;return this.legendItems.forEach((b,g)=>{const{itemWidth:E,itemHeight:_}=R1(r,n,s,b,a);g>0&&m+_+2*l>f&&(u+=h+l,d.push({width:h,height:m}),p+=h+l,y++,h=m=0),c[g]={left:p,top:m,col:y,width:E,height:_},h=Math.max(h,E),m+=_+l}),u+=h,d.push({width:h,height:m}),u}adjustHitBoxes(){if(!this.options.display)return;const o=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:a},rtl:s}}=this,i=ln(s,this.left,this.width);if(this.isHorizontal()){let l=0,c=it(r,this.left+a,this.right-this.lineWidths[l]);for(const d of n)l!==d.row&&(l=d.row,c=it(r,this.left+a,this.right-this.lineWidths[l])),d.top+=this.top+o+a,d.left=i.leftForLtr(i.x(c),d.width),c+=d.width+a}else{let l=0,c=it(r,this.top+o+a,this.bottom-this.columnSizes[l].height);for(const d of n)d.col!==l&&(l=d.col,c=it(r,this.top+o+a,this.bottom-this.columnSizes[l].height)),d.top=c,d.left+=this.left+a,d.left=i.leftForLtr(i.x(d.left),d.width),c+=d.height+a}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const o=this.ctx;Pr(o,this),this._draw(),Or(o)}}_draw(){const{options:o,columnSizes:n,lineWidths:r,ctx:a}=this,{align:s,labels:i}=o,l=Qe.color,c=ln(o.rtl,this.left,this.width),d=lt(i.font),{padding:f}=i,u=d.size,h=u/2;let m;this.drawTitle(),a.textAlign=c.textAlign("left"),a.textBaseline="middle",a.lineWidth=.5,a.font=d.string;const{boxWidth:p,boxHeight:y,itemHeight:b}=bf(i,u),g=function(C,x,k){if(isNaN(p)||p<=0||isNaN(y)||y<0)return;a.save();const N=ve(k.lineWidth,1);if(a.fillStyle=ve(k.fillStyle,l),a.lineCap=ve(k.lineCap,"butt"),a.lineDashOffset=ve(k.lineDashOffset,0),a.lineJoin=ve(k.lineJoin,"miter"),a.lineWidth=N,a.strokeStyle=ve(k.strokeStyle,l),a.setLineDash(ve(k.lineDash,[])),i.usePointStyle){const w={radius:y*Math.SQRT2/2,pointStyle:k.pointStyle,rotation:k.rotation,borderWidth:N},v=c.xPlus(C,p/2),S=x+h;Zc(a,w,v,S,i.pointStyleWidth&&p)}else{const w=x+Math.max((u-y)/2,0),v=c.leftForLtr(C,p),S=rn(k.borderRadius);a.beginPath(),Object.values(S).some(D=>D!==0)?Rr(a,{x:v,y:w,w:p,h:y,radius:S}):a.rect(v,w,p,y),a.fill(),N!==0&&a.stroke()}a.restore()},E=function(C,x,k){jn(a,k.text,C,x+b/2,d,{strikethrough:k.hidden,textAlign:c.textAlign(k.textAlign)})},_=this.isHorizontal(),B=this._computeTitleHeight();_?m={x:it(s,this.left+f,this.right-r[0]),y:this.top+f+B,line:0}:m={x:this.left+f,y:it(s,this.top+B+f,this.bottom-n[0].height),line:0},dd(this.ctx,o.textDirection);const A=b+f;this.legendItems.forEach((C,x)=>{a.strokeStyle=C.fontColor,a.fillStyle=C.fontColor;const k=a.measureText(C.text).width,N=c.textAlign(C.textAlign||(C.textAlign=i.textAlign)),w=p+h+k;let v=m.x,S=m.y;c.setWidth(this.width),_?x>0&&v+w+f>this.right&&(S=m.y+=A,m.line++,v=m.x=it(s,this.left+f,this.right-r[m.line])):x>0&&S+A>this.bottom&&(v=m.x=v+n[m.line].width+f,m.line++,S=m.y=it(s,this.top+B+f,this.bottom-n[m.line].height));const D=c.x(v);if(g(D,S,C),v=uy(N,v+p+h,_?v+w:this.right,o.rtl),E(c.x(v),S,C),_)m.x+=w+f;else if(typeof C.text!="string"){const V=d.lineHeight;m.y+=xf(C,V)+f}else m.y+=A}),fd(this.ctx,o.textDirection)}drawTitle(){const o=this.options,n=o.title,r=lt(n.font),a=At(n.padding);if(!n.display)return;const s=ln(o.rtl,this.left,this.width),i=this.ctx,l=n.position,c=r.size/2,d=a.top+c;let f,u=this.left,h=this.width;if(this.isHorizontal())h=Math.max(...this.lineWidths),f=this.top+d,u=it(o.align,u,this.right-h);else{const p=this.columnSizes.reduce((y,b)=>Math.max(y,b.height),0);f=d+it(o.align,this.top,this.bottom-p-o.labels.padding-this._computeTitleHeight())}const m=it(l,u,u+h);i.textAlign=s.textAlign(xs(l)),i.textBaseline="middle",i.strokeStyle=n.color,i.fillStyle=n.color,i.font=r.string,jn(i,n.text,m,f,r)}_computeTitleHeight(){const o=this.options.title,n=lt(o.font),r=At(o.padding);return o.display?n.lineHeight+r.height:0}_getLegendItemAt(o,n){let r,a,s;if(oo(o,this.left,this.right)&&oo(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(a=s[r],oo(o,a.left,a.left+a.width)&&oo(n,a.top,a.top+a.height))return this.legendItems[r]}return null}handleEvent(o){const n=this.options;if(!F1(o.type,n))return;const r=this._getLegendItemAt(o.x,o.y);if(o.type==="mousemove"||o.type==="mouseout"){const a=this._hoveredItem,s=O1(a,r);a&&!s&&qe(n.onLeave,[o,a,this],this),this._hoveredItem=r,r&&!s&&qe(n.onHover,[o,r,this],this)}else r&&qe(n.onClick,[o,r,this],this)}}function R1(e,o,n,r,a){const s=L1(r,e,o,n),i=I1(a,r,o.lineHeight);return{itemWidth:s,itemHeight:i}}function L1(e,o,n,r){let a=e.text;return a&&typeof a!="string"&&(a=a.reduce((s,i)=>s.length>i.length?s:i)),o+n.size/2+r.measureText(a).width}function I1(e,o,n){let r=e;return typeof o.text!="string"&&(r=xf(o,n)),r}function xf(e,o){const n=e.text?e.text.length:0;return o*n}function F1(e,o){return!!((e==="mousemove"||e==="mouseout")&&(o.onHover||o.onLeave)||o.onClick&&(e==="click"||e==="mouseup"))}var z1={id:"legend",_element:yf,start(e,o,n){const r=e.legend=new yf({ctx:e.ctx,options:n,chart:e});vt.configure(e,r,n),vt.addBox(e,r)},stop(e){vt.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,o,n){const r=e.legend;vt.configure(e,r,n),r.options=n},afterUpdate(e){const o=e.legend;o.buildLabels(),o.adjustHitBoxes()},afterEvent(e,o){o.replay||e.legend.handleEvent(o.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,o,n){const r=o.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),o.hidden=!0):(a.show(r),o.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const o=e.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:a,color:s,useBorderRadius:i,borderRadius:l}}=e.legend.options;return e._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(n?0:void 0),f=At(d.borderWidth);return{text:o[c.index].label,fillStyle:d.backgroundColor,fontColor:s,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(f.width+f.height)/4,strokeStyle:d.borderColor,pointStyle:r||d.pointStyle,rotation:d.rotation,textAlign:a||d.textAlign,borderRadius:i&&(l||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};class kf extends ro{constructor(o){super(),this.chart=o.chart,this.options=o.options,this.ctx=o.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(o,n){const r=this.options;if(this.left=0,this.top=0,!r.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=o,this.height=this.bottom=n;const a=Ze(r.text)?r.text.length:1;this._padding=At(r.padding);const s=a*lt(r.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const o=this.options.position;return o==="top"||o==="bottom"}_drawArgs(o){const{top:n,left:r,bottom:a,right:s,options:i}=this,l=i.align;let c=0,d,f,u;return this.isHorizontal()?(f=it(l,r,s),u=n+o,d=s-r):(i.position==="left"?(f=r+o,u=it(l,a,n),c=Ue*-.5):(f=s-o,u=it(l,n,a),c=Ue*.5),d=a-n),{titleX:f,titleY:u,maxWidth:d,rotation:c}}draw(){const o=this.ctx,n=this.options;if(!n.display)return;const r=lt(n.font),s=r.lineHeight/2+this._padding.top,{titleX:i,titleY:l,maxWidth:c,rotation:d}=this._drawArgs(s);jn(o,n.text,0,0,r,{color:n.color,maxWidth:c,rotation:d,textAlign:xs(n.align),textBaseline:"middle",translation:[i,l]})}}function $1(e,o){const n=new kf({ctx:e.ctx,options:o,chart:e});vt.configure(e,n,o),vt.addBox(e,n),e.titleBlock=n}var j1={id:"title",_element:kf,start(e,o,n){$1(e,n)},stop(e){const o=e.titleBlock;vt.removeBox(e,o),delete e.titleBlock},beforeUpdate(e,o,n){const r=e.titleBlock;vt.configure(e,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Jn={average(e){if(!e.length)return!1;let o,n,r=new Set,a=0,s=0;for(o=0,n=e.length;o<n;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.tooltipPosition();r.add(c.x),a+=c.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((l,c)=>l+c)/r.size,y:a/s}},nearest(e,o){if(!e.length)return!1;let n=o.x,r=o.y,a=Number.POSITIVE_INFINITY,s,i,l;for(s=0,i=e.length;s<i;++s){const c=e[s].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),f=bs(o,d);f<a&&(a=f,l=c)}}if(l){const c=l.tooltipPosition();n=c.x,r=c.y}return{x:n,y:r}}};function Ut(e,o){return o&&(Ze(o)?Array.prototype.push.apply(e,o):e.push(o)),e}function so(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
40
40
|
`)>-1?e.split(`
|
|
41
|
-
`):e}function U1(e,o){const{element:n,datasetIndex:r,index:a}=o,s=e.getDatasetMeta(r).controller,{label:i,value:l}=s.getLabelAndValue(a);return{chart:e,label:i,parsed:s.getParsed(a),raw:e.data.datasets[r].data[a],formattedValue:l,dataset:s.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function wf(e,o){const n=e.chart.ctx,{body:r,footer:a,title:s}=e,{boxWidth:i,boxHeight:l}=o,c=lt(o.bodyFont),d=lt(o.titleFont),f=lt(o.footerFont),u=s.length,h=a.length,m=r.length,p=At(o.padding);let y=p.height,b=0,g=r.reduce((B,A)=>B+A.before.length+A.lines.length+A.after.length,0);if(g+=e.beforeBody.length+e.afterBody.length,u&&(y+=u*d.lineHeight+(u-1)*o.titleSpacing+o.titleMarginBottom),g){const B=o.displayColors?Math.max(l,c.lineHeight):c.lineHeight;y+=m*B+(g-m)*c.lineHeight+(g-1)*o.bodySpacing}h&&(y+=o.footerMarginTop+h*f.lineHeight+(h-1)*o.footerSpacing);let _=0;const E=function(B){b=Math.max(b,n.measureText(B).width+_)};return n.save(),n.font=d.string,je(e.title,E),n.font=c.string,je(e.beforeBody.concat(e.afterBody),E),_=o.displayColors?i+2+o.boxPadding:0,je(r,B=>{je(B.before,E),je(B.lines,E),je(B.after,E)}),_=0,n.font=f.string,je(e.footer,E),n.restore(),b+=p.width,{width:b,height:y}}function W1(e,o){const{y:n,height:r}=o;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function H1(e,o,n,r){const{x:a,width:s}=r,i=n.caretSize+n.caretPadding;if(e==="left"&&a+s+i>o.width||e==="right"&&a-s-i<0)return!0}function q1(e,o,n,r){const{x:a,width:s}=n,{width:i,chartArea:{left:l,right:c}}=e;let d="center";return r==="center"?d=a<=(l+c)/2?"left":"right":a<=s/2?d="left":a>=i-s/2&&(d="right"),H1(d,e,o,n)&&(d="center"),d}function Cf(e,o,n){const r=n.yAlign||o.yAlign||W1(e,n);return{xAlign:n.xAlign||o.xAlign||q1(e,o,n,r),yAlign:r}}function G1(e,o){let{x:n,width:r}=e;return o==="right"?n-=r:o==="center"&&(n-=r/2),n}function K1(e,o,n){let{y:r,height:a}=e;return o==="top"?r+=n:o==="bottom"?r-=a+n:r-=a/2,r}function _f(e,o,n,r){const{caretSize:a,caretPadding:s,cornerRadius:i}=e,{xAlign:l,yAlign:c}=n,d=a+s,{topLeft:f,topRight:u,bottomLeft:h,bottomRight:m}=rn(i);let p=G1(o,l);const y=K1(o,c,d);return c==="center"?l==="left"?p+=d:l==="right"&&(p-=d):l==="left"?p-=Math.max(f,h)+a:l==="right"&&(p+=Math.max(u,m)+a),{x:st(p,0,r.width-o.width),y:st(y,0,r.height-o.height)}}function oa(e,o,n){const r=At(n.padding);return o==="center"?e.x+e.width/2:o==="right"?e.x+e.width-r.right:e.x+r.left}function Ef(e){return Ut([],so(e))}function X1(e,o,n){return Io(e,{tooltip:o,tooltipItems:n,type:"tooltip"})}function Bf(e,o){const n=o&&o.dataset&&o.dataset.tooltip&&o.dataset.tooltip.callbacks;return n?e.override(n):e}const Sf={beforeTitle:eo,title(e){if(e.length>0){const o=e[0],n=o.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return o.dataset.label||"";if(o.label)return o.label;if(r>0&&o.dataIndex<r)return n[o.dataIndex]}return""},afterTitle:eo,beforeBody:eo,beforeLabel:eo,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let o=e.dataset.label||"";o&&(o+=": ");const n=e.formattedValue;return $e(n)||(o+=n),o},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:eo,afterBody:eo,beforeFooter:eo,footer:eo,afterFooter:eo};function mt(e,o,n,r){const a=e[o].call(n,r);return typeof a>"u"?Sf[o].call(n,r):a}class Xs extends ro{constructor(o){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=o.chart,this.options=o.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(o){this.options=o,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const o=this._cachedAnimations;if(o)return o;const n=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&n.options.animation&&r.animations,s=new kd(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=X1(this.chart.getContext(),this,this._tooltipItems))}getTitle(o,n){const{callbacks:r}=n,a=mt(r,"beforeTitle",this,o),s=mt(r,"title",this,o),i=mt(r,"afterTitle",this,o);let l=[];return l=Ut(l,so(a)),l=Ut(l,so(s)),l=Ut(l,so(i)),l}getBeforeBody(o,n){return Ef(mt(n.callbacks,"beforeBody",this,o))}getBody(o,n){const{callbacks:r}=n,a=[];return je(o,s=>{const i={before:[],lines:[],after:[]},l=Bf(r,s);Ut(i.before,so(mt(l,"beforeLabel",this,s))),Ut(i.lines,mt(l,"label",this,s)),Ut(i.after,so(mt(l,"afterLabel",this,s))),a.push(i)}),a}getAfterBody(o,n){return Ef(mt(n.callbacks,"afterBody",this,o))}getFooter(o,n){const{callbacks:r}=n,a=mt(r,"beforeFooter",this,o),s=mt(r,"footer",this,o),i=mt(r,"afterFooter",this,o);let l=[];return l=Ut(l,so(a)),l=Ut(l,so(s)),l=Ut(l,so(i)),l}_createItems(o){const n=this._active,r=this.chart.data,a=[],s=[],i=[];let l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(U1(this.chart,n[c]));return o.filter&&(l=l.filter((f,u,h)=>o.filter(f,u,h,r))),o.itemSort&&(l=l.sort((f,u)=>o.itemSort(f,u,r))),je(l,f=>{const u=Bf(o.callbacks,f);a.push(mt(u,"labelColor",this,f)),s.push(mt(u,"labelPointStyle",this,f)),i.push(mt(u,"labelTextColor",this,f))}),this.labelColors=a,this.labelPointStyles=s,this.labelTextColors=i,this.dataPoints=l,l}update(o,n){const r=this.options.setContext(this.getContext()),a=this._active;let s,i=[];if(!a.length)this.opacity!==0&&(s={opacity:0});else{const l=Jn[r.position].call(this,a,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const c=this._size=wf(this,r),d=Object.assign({},l,c),f=Cf(this.chart,r,d),u=_f(r,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=i,this.$context=void 0,s&&this._resolveAnimations().update(this,s),o&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(o,n,r,a){const s=this.getCaretPosition(o,r,a);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(o,n,r){const{xAlign:a,yAlign:s}=this,{caretSize:i,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:u}=rn(l),{x:h,y:m}=o,{width:p,height:y}=n;let b,g,_,E,B,A;return s==="center"?(B=m+y/2,a==="left"?(b=h,g=b-i,E=B+i,A=B-i):(b=h+p,g=b+i,E=B-i,A=B+i),_=b):(a==="left"?g=h+Math.max(c,f)+i:a==="right"?g=h+p-Math.max(d,u)-i:g=this.caretX,s==="top"?(E=m,B=E-i,b=g-i,_=g+i):(E=m+y,B=E+i,b=g+i,_=g-i),A=E),{x1:b,x2:g,x3:_,y1:E,y2:B,y3:A}}drawTitle(o,n,r){const a=this.title,s=a.length;let i,l,c;if(s){const d=ln(r.rtl,this.x,this.width);for(o.x=oa(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",i=lt(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=i.string,c=0;c<s;++c)n.fillText(a[c],d.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+l,c+1===s&&(o.y+=r.titleMarginBottom-l)}}_drawColorBox(o,n,r,a,s){const i=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=s,f=lt(s.bodyFont),u=oa(this,"left",s),h=a.x(u),m=c<f.lineHeight?(f.lineHeight-c)/2:0,p=n.y+m;if(s.usePointStyle){const y={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=a.leftForLtr(h,d)+d/2,g=p+c/2;o.strokeStyle=s.multiKeyBackground,o.fillStyle=s.multiKeyBackground,Bs(o,y,b,g),o.strokeStyle=i.borderColor,o.fillStyle=i.backgroundColor,Bs(o,y,b,g)}else{o.lineWidth=Pe(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,o.strokeStyle=i.borderColor,o.setLineDash(i.borderDash||[]),o.lineDashOffset=i.borderDashOffset||0;const y=a.leftForLtr(h,d),b=a.leftForLtr(a.xPlus(h,1),d-2),g=rn(i.borderRadius);Object.values(g).some(_=>_!==0)?(o.beginPath(),o.fillStyle=s.multiKeyBackground,Lr(o,{x:y,y:p,w:d,h:c,radius:g}),o.fill(),o.stroke(),o.fillStyle=i.backgroundColor,o.beginPath(),Lr(o,{x:b,y:p+1,w:d-2,h:c-2,radius:g}),o.fill()):(o.fillStyle=s.multiKeyBackground,o.fillRect(y,p,d,c),o.strokeRect(y,p,d,c),o.fillStyle=i.backgroundColor,o.fillRect(b,p+1,d-2,c-2))}o.fillStyle=this.labelTextColors[r]}drawBody(o,n,r){const{body:a}=this,{bodySpacing:s,bodyAlign:i,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:f}=r,u=lt(r.bodyFont);let h=u.lineHeight,m=0;const p=ln(r.rtl,this.x,this.width),y=function(w){n.fillText(w,p.x(o.x+m),o.y+h/2),o.y+=h+s},b=p.textAlign(i);let g,_,E,B,A,C,x;for(n.textAlign=i,n.textBaseline="middle",n.font=u.string,o.x=oa(this,b,r),n.fillStyle=r.bodyColor,je(this.beforeBody,y),m=l&&b!=="right"?i==="center"?d/2+f:d+2+f:0,B=0,C=a.length;B<C;++B){for(g=a[B],_=this.labelTextColors[B],n.fillStyle=_,je(g.before,y),E=g.lines,l&&E.length&&(this._drawColorBox(n,o,B,p,r),h=Math.max(u.lineHeight,c)),A=0,x=E.length;A<x;++A)y(E[A]),h=u.lineHeight;je(g.after,y)}m=0,h=u.lineHeight,je(this.afterBody,y),o.y-=s}drawFooter(o,n,r){const a=this.footer,s=a.length;let i,l;if(s){const c=ln(r.rtl,this.x,this.width);for(o.x=oa(this,r.footerAlign,r),o.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",i=lt(r.footerFont),n.fillStyle=r.footerColor,n.font=i.string,l=0;l<s;++l)n.fillText(a[l],c.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+r.footerSpacing}}drawBackground(o,n,r,a){const{xAlign:s,yAlign:i}=this,{x:l,y:c}=o,{width:d,height:f}=r,{topLeft:u,topRight:h,bottomLeft:m,bottomRight:p}=rn(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(l+u,c),i==="top"&&this.drawCaret(o,n,r,a),n.lineTo(l+d-h,c),n.quadraticCurveTo(l+d,c,l+d,c+h),i==="center"&&s==="right"&&this.drawCaret(o,n,r,a),n.lineTo(l+d,c+f-p),n.quadraticCurveTo(l+d,c+f,l+d-p,c+f),i==="bottom"&&this.drawCaret(o,n,r,a),n.lineTo(l+m,c+f),n.quadraticCurveTo(l,c+f,l,c+f-m),i==="center"&&s==="left"&&this.drawCaret(o,n,r,a),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(o){const n=this.chart,r=this.$animations,a=r&&r.x,s=r&&r.y;if(a||s){const i=Jn[o.position].call(this,this._active,this._eventPosition);if(!i)return;const l=this._size=wf(this,o),c=Object.assign({},i,this._size),d=Cf(n,o,c),f=_f(o,c,d,n);(a._to!==f.x||s._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(o){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=At(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(o.save(),o.globalAlpha=r,this.drawBackground(s,o,a,n),dd(o,n.textDirection),s.y+=i.top,this.drawTitle(s,o,n),this.drawBody(s,o,n),this.drawFooter(s,o,n),fd(o,n.textDirection),o.restore())}getActiveElements(){return this._active||[]}setActiveElements(o,n){const r=this._active,a=o.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),s=!Nr(r,a),i=this._positionChanged(a,n);(s||i)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(o,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,s=this._active||[],i=this._getActiveElements(o,s,n,r),l=this._positionChanged(i,o),c=n||!Nr(i,s)||l;return c&&(this._active=i,(a.enabled||a.external)&&(this._eventPosition={x:o.x,y:o.y},this.update(!0,n))),c}_getActiveElements(o,n,r,a){const s=this.options;if(o.type==="mouseout")return[];if(!a)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const i=this.chart.getElementsAtEventForMode(o,s.mode,s,r);return s.reverse&&i.reverse(),i}_positionChanged(o,n){const{caretX:r,caretY:a,options:s}=this,i=Jn[s.position].call(this,o,n);return i!==!1&&(r!==i.x||a!==i.y)}}be(Xs,"positioners",Jn);var Y1={id:"tooltip",_element:Xs,positioners:Jn,afterInit(e,o,n){n&&(e.tooltip=new Xs({chart:e,options:n}))},beforeUpdate(e,o,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,o,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const o=e.tooltip;if(o&&o._willRender()){const n={tooltip:o};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;o.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,o){if(e.tooltip){const n=o.replay;e.tooltip.handleEvent(o.event,n,o.inChartArea)&&(o.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,o)=>o.bodyFont.size,boxWidth:(e,o)=>o.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Sf},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const J1=(e,o,n,r)=>(typeof o=="string"?(n=e.push(o)-1,r.unshift({index:n,label:o})):isNaN(o)&&(n=null),n);function Q1(e,o,n,r){const a=e.indexOf(o);if(a===-1)return J1(e,o,n,r);const s=e.lastIndexOf(o);return a!==s?n:a}const Z1=(e,o)=>e===null?null:st(Math.round(e),0,o);function Af(e){const o=this.getLabels();return e>=0&&e<o.length?o[e]:e}class Ys extends dn{constructor(o){super(o),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(o){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:a,label:s}of n)r[a]===s&&r.splice(a,1);this._addedLabels=[]}super.init(o)}parse(o,n){if($e(o))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===o?n:Q1(r,o,Ae(n,o),this._addedLabels),Z1(n,r.length-1)}determineDataLimits(){const{minDefined:o,maxDefined:n}=this.getUserBounds();let{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(o||(r=0),n||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){const o=this.min,n=this.max,r=this.options.offset,a=[];let s=this.getLabels();s=o===0&&n===s.length-1?s:s.slice(o,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=o;i<=n;i++)a.push({value:i});return a}getLabelForValue(o){return Af.call(this,o)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(o){return typeof o!="number"&&(o=this.parse(o)),o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getValueForPixel(o){return Math.round(this._startValue+this.getDecimalForPixel(o)*this._valueRange)}getBasePixel(){return this.bottom}}be(Ys,"id","category"),be(Ys,"defaults",{ticks:{callback:Af}});function ew(e,o){const n=[],{bounds:a,step:s,min:i,max:l,precision:c,count:d,maxTicks:f,maxDigits:u,includeBounds:h}=e,m=s||1,p=f-1,{min:y,max:b}=o,g=!$e(i),_=!$e(l),E=!$e(d),B=(b-y)/(u+1);let A=Ic((b-y)/p/m)*m,C,x,w,D;if(A<1e-14&&!g&&!_)return[{value:y},{value:b}];D=Math.ceil(b/A)-Math.floor(y/A),D>p&&(A=Ic(D*A/p/m)*m),$e(c)||(C=Math.pow(10,c),A=Math.ceil(A*C)/C),a==="ticks"?(x=Math.floor(y/A)*A,w=Math.ceil(b/A)*A):(x=y,w=b),g&&_&&s&&ny((l-i)/s,A/1e3)?(D=Math.round(Math.min((l-i)/A,f)),A=(l-i)/D,x=i,w=l):E?(x=g?i:x,w=_?l:w,D=d-1,A=(w-x)/D):(D=(w-x)/A,Ln(D,Math.round(D),A/1e3)?D=Math.round(D):D=Math.ceil(D));const k=Math.max(Fc(A),Fc(x));C=Math.pow(10,$e(c)?k:c),x=Math.round(x*C)/C,w=Math.round(w*C)/C;let v=0;for(g&&(h&&x!==i?(n.push({value:i}),x<i&&v++,Ln(Math.round((x+v*A)*C)/C,i,vf(i,B,e))&&v++):x<i&&v++);v<D;++v){const S=Math.round((x+v*A)*C)/C;if(_&&S>l)break;n.push({value:S})}return _&&h&&w!==l?n.length&&Ln(n[n.length-1].value,l,vf(l,B,e))?n[n.length-1].value=l:n.push({value:l}):(!_||w===l)&&n.push({value:w}),n}function vf(e,o,{horizontal:n,minRotation:r}){const a=to(r),s=(n?Math.sin(a):Math.cos(a))||.001,i=.75*o*(""+e).length;return Math.min(o/s,i)}class tw extends dn{constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(o,n){return $e(o)||(typeof o=="number"||o instanceof Number)&&!isFinite(+o)?null:+o}handleTickRangeOptions(){const{beginAtZero:o}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:a,max:s}=this;const i=c=>a=n?a:c,l=c=>s=r?s:c;if(o){const c=$t(a),d=$t(s);c<0&&d<0?l(0):c>0&&d>0&&i(0)}if(a===s){let c=s===0?1:Math.abs(s*.05);l(s+c),o||i(a-c)}this.min=a,this.max=s}getTickLimit(){const o=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=o,a;return r?(a=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const o=this.options,n=o.ticks;let r=this.getTickLimit();r=Math.max(2,r);const a={maxTicks:r,bounds:o.bounds,min:o.min,max:o.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,i=ew(a,s);return o.bounds==="ticks"&&ry(i,this,"value"),o.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const o=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&o.length){const a=(r-n)/Math.max(o.length-1,1)/2;n-=a,r+=a}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(o){return Cs(o,this.chart.options.locale,this.options.ticks.format)}}class Js extends tw{determineDataLimits(){const{min:o,max:n}=this.getMinMax(!0);this.min=at(o)?o:0,this.max=at(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const o=this.isHorizontal(),n=o?this.width:this.height,r=to(this.options.ticks.minRotation),a=(o?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/a))}getPixelForValue(o){return o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getValueForPixel(o){return this._startValue+this.getDecimalForPixel(o)*this._valueRange}}be(Js,"id","linear"),be(Js,"defaults",{ticks:{callback:Yc.formatters.numeric}});const na={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},pt=Object.keys(na);function Df(e,o){return e-o}function Nf(e,o){if($e(o))return null;const n=e._adapter,{parser:r,round:a,isoWeekday:s}=e._parseOpts;let i=o;return typeof r=="function"&&(i=r(i)),at(i)||(i=typeof r=="string"?n.parse(i,r):n.parse(i)),i===null?null:(a&&(i=a==="week"&&(Rn(s)||s===!0)?n.startOf(i,"isoWeek",s):n.startOf(i,a)),+i)}function Vf(e,o,n,r){const a=pt.length;for(let s=pt.indexOf(e);s<a-1;++s){const i=na[pt[s]],l=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((n-o)/(l*i.size))<=r)return pt[s]}return pt[a-1]}function ow(e,o,n,r,a){for(let s=pt.length-1;s>=pt.indexOf(n);s--){const i=pt[s];if(na[i].common&&e._adapter.diff(a,r,i)>=o-1)return i}return pt[n?pt.indexOf(n):0]}function nw(e){for(let o=pt.indexOf(e)+1,n=pt.length;o<n;++o)if(na[pt[o]].common)return pt[o]}function Mf(e,o,n){if(!n)e[o]=!0;else if(n.length){const{lo:r,hi:a}=ys(n,o),s=n[r]>=o?n[r]:n[a];e[s]=!0}}function rw(e,o,n,r){const a=e._adapter,s=+a.startOf(o[0].value,r),i=o[o.length-1].value;let l,c;for(l=s;l<=i;l=+a.add(l,1,r))c=n[l],c>=0&&(o[c].major=!0);return o}function Tf(e,o,n){const r=[],a={},s=o.length;let i,l;for(i=0;i<s;++i)l=o[i],a[l]=i,r.push({value:l,major:!1});return s===0||!n?r:rw(e,r,a,n)}class ra extends dn{constructor(o){super(o),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(o,n={}){const r=o.time||(o.time={}),a=this._adapter=new zx._date(o.adapters.date);a.init(n),Pn(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(o),this._normalized=n.normalized}parse(o,n){return o===void 0?null:Nf(this,o)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const o=this.options,n=this._adapter,r=o.time.unit||"day";let{min:a,max:s,minDefined:i,maxDefined:l}=this.getUserBounds();function c(d){!i&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!l&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!i||!l)&&(c(this._getLabelBounds()),(o.bounds!=="ticks"||o.ticks.source!=="labels")&&c(this.getMinMax(!1))),a=at(a)&&!isNaN(a)?a:+n.startOf(Date.now(),r),s=at(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){const o=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return o.length&&(n=o[0],r=o[o.length-1]),{min:n,max:r}}buildTicks(){const o=this.options,n=o.time,r=o.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();o.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const s=this.min,i=this.max,l=cy(a,s,i);return this._unit=n.unit||(r.autoSkip?Vf(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):ow(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:nw(this._unit),this.initOffsets(a),o.reverse&&l.reverse(),Tf(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(o=>+o.value))}initOffsets(o=[]){let n=0,r=0,a,s;this.options.offset&&o.length&&(a=this.getDecimalForValue(o[0]),o.length===1?n=1-a:n=(this.getDecimalForValue(o[1])-a)/2,s=this.getDecimalForValue(o[o.length-1]),o.length===1?r=s:r=(s-this.getDecimalForValue(o[o.length-2]))/2);const i=o.length<3?.5:.25;n=st(n,0,i),r=st(r,0,i),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const o=this._adapter,n=this.min,r=this.max,a=this.options,s=a.time,i=s.unit||Vf(s.minUnit,n,r,this._getLabelCapacity(n)),l=Ae(a.ticks.stepSize,1),c=i==="week"?s.isoWeekday:!1,d=Rn(c)||c===!0,f={};let u=n,h,m;if(d&&(u=+o.startOf(u,"isoWeek",c)),u=+o.startOf(u,d?"day":i),o.diff(r,n,i)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+i);const p=a.ticks.source==="data"&&this.getDataTimestamps();for(h=u,m=0;h<r;h=+o.add(h,l,i),m++)Mf(f,h,p);return(h===r||a.bounds==="ticks"||m===1)&&Mf(f,h,p),Object.keys(f).sort(Df).map(y=>+y)}getLabelForValue(o){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(o,r.tooltipFormat):n.format(o,r.displayFormats.datetime)}format(o,n){const a=this.options.time.displayFormats,s=this._unit,i=n||a[s];return this._adapter.format(o,i)}_tickFormatFunction(o,n,r,a){const s=this.options,i=s.ticks.callback;if(i)return qe(i,[o,n,r],this);const l=s.time.displayFormats,c=this._unit,d=this._majorUnit,f=c&&l[c],u=d&&l[d],h=r[n],m=d&&u&&h&&h.major;return this._adapter.format(o,a||(m?u:f))}generateTickLabels(o){let n,r,a;for(n=0,r=o.length;n<r;++n)a=o[n],a.label=this._tickFormatFunction(a.value,n,o)}getDecimalForValue(o){return o===null?NaN:(o-this.min)/(this.max-this.min)}getPixelForValue(o){const n=this._offsets,r=this.getDecimalForValue(o);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(o){const n=this.options.ticks,r=this.ctx.measureText(o).width,a=to(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(a),i=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:r*s+l*i,h:r*i+l*s}}_getLabelCapacity(o){const n=this.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,s=this._tickFormatFunction(o,0,Tf(this,[o],this._majorUnit),a),i=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return l>0?l:1}getDataTimestamps(){let o=this._cache.data||[],n,r;if(o.length)return o;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,r=a.length;n<r;++n)o=o.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(o)}getLabelTimestamps(){const o=this._cache.labels||[];let n,r;if(o.length)return o;const a=this.getLabels();for(n=0,r=a.length;n<r;++n)o.push(Nf(this,a[n]));return this._cache.labels=this._normalized?o:this.normalize(o)}normalize(o){return Uc(o.sort(Df))}}be(ra,"id","time"),be(ra,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function aa(e,o,n){let r=0,a=e.length-1,s,i,l,c;n?(o>=e[r].pos&&o<=e[a].pos&&({lo:r,hi:a}=Oo(e,"pos",o)),{pos:s,time:l}=e[r],{pos:i,time:c}=e[a]):(o>=e[r].time&&o<=e[a].time&&({lo:r,hi:a}=Oo(e,"time",o)),{time:s,pos:l}=e[r],{time:i,pos:c}=e[a]);const d=i-s;return d?l+(c-l)*(o-s)/d:l}class Pf extends ra{constructor(o){super(o),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const o=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(o);this._minPos=aa(n,this.min),this._tableRange=aa(n,this.max)-this._minPos,super.initOffsets(o)}buildLookupTable(o){const{min:n,max:r}=this,a=[],s=[];let i,l,c,d,f;for(i=0,l=o.length;i<l;++i)d=o[i],d>=n&&d<=r&&a.push(d);if(a.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(i=0,l=a.length;i<l;++i)f=a[i+1],c=a[i-1],d=a[i],Math.round((f+c)/2)!==d&&s.push({time:d,pos:i/(l-1)});return s}_generate(){const o=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(o)||!r.length)&&r.splice(0,0,o),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((a,s)=>a-s)}_getTimestampsForTable(){let o=this._cache.all||[];if(o.length)return o;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?o=this.normalize(n.concat(r)):o=n.length?n:r,o=this._cache.all=o,o}getDecimalForValue(o){return(aa(this._table,o)-this._minPos)/this._tableRange}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return aa(this._table,r*this._tableRange+this._minPos,!0)}}be(Pf,"id","timeseries"),be(Pf,"defaults",ra.defaults);const aw={key:0,class:"mb-2 text-sm font-medium text-gray-700"},sw={key:0,class:"text-red-500 ml-1"},iw={key:0,class:"absolute inset-0 flex items-center justify-center bg-white"},lw={key:1,class:"absolute inset-0 flex items-center justify-center bg-red-50 border border-red-200 rounded"},cw={class:"text-red-600 text-sm"},dw={key:1,class:"mt-2 text-xs text-gray-500"},fw={key:0},Of=ft(t.defineComponent({name:"DCodeChart",__name:"DCodeChart",props:{type:{default:"line"},width:{default:400},height:{default:300},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{default:null},showInfo:{type:Boolean,default:!1},responsive:{type:Boolean,default:!0},maintainAspectRatio:{type:Boolean,default:!1},theme:{default:"light"},colors:{default:()=>["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"]},data:{},modelValue:{},options:{},onClick:{},onHover:{},label:{}},emits:["update:modelValue","click","hover","ready"],setup(e,{expose:o,emit:n}){ao.register(Ys,Js,Zr,wo,ea,Yn,j1,Y1,z1,P1,Ur,jr,Ls,cn);const r=e,a=n,s=t.ref(null),i=t.shallowRef(null),l=t.ref(null),c=t.computed(()=>({"opacity-50 pointer-events-none":r.loading||r.error})),d=()=>{const h=r.theme==="dark";return{responsive:r.responsive,maintainAspectRatio:r.maintainAspectRatio,animation:{duration:1e3,easing:"easeInOutQuart",delay:m=>{let p=0;return m.type==="data"&&m.mode==="default"&&(p=m.dataIndex*100+m.datasetIndex*50),p},onComplete:()=>{}},plugins:{legend:{position:"top",labels:{color:h?"#E5E7EB":"#374151",font:{size:12}}},tooltip:{backgroundColor:h?"#1F2937":"#FFFFFF",titleColor:h?"#F3F4F6":"#111827",bodyColor:h?"#D1D5DB":"#4B5563",borderColor:h?"#374151":"#E5E7EB",borderWidth:1,animation:{duration:200,easing:"easeInOutQuad"}}},scales:r.type!=="pie"&&r.type!=="doughnut"&&r.type!=="polarArea"?{x:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}},y:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}}}:void 0}},f=h=>!h||!h.datasets?h:{...h,datasets:h.datasets.map((m,p)=>{const y=p%r.colors.length,b=r.colors[y];let g=m.backgroundColor,_=m.borderColor;return["pie","doughnut","polarArea"].includes(r.type)&&(!g||g.length===0)?m.data&&(g=m.data.map((E,B)=>r.colors[B%r.colors.length]+"80"),_=m.data.map((E,B)=>r.colors[B%r.colors.length])):(g=g||b+"40",_=_||b),{...m,borderColor:_,backgroundColor:g,pointBackgroundColor:m.pointBackgroundColor||b,pointBorderColor:m.pointBorderColor||b,hoverBackgroundColor:m.hoverBackgroundColor||b+"60",hoverBorderColor:m.hoverBorderColor||b}})},u=async()=>{if(!s.value)return;await t.nextTick(),i.value&&i.value.destroy();const h=r.data||r.modelValue;let m=h;if(Array.isArray(h))if(h.length>0&&typeof h[0]=="object"&&h[0]!==null){const y=Object.keys(h[0]),b=y.find(_=>["label","name","x","category","title"].includes(_.toLowerCase()))||y[0],g=y.find(_=>_!==b&&["value","y","count","amount","total","data"].includes(_.toLowerCase()))||y.find(_=>_!==b&&typeof h[0][_]=="number")||(y.length>1?y.find(_=>_!==b):y[0]);m={labels:h.map(_=>_[b||""]),datasets:[{label:r.label||"Data",data:h.map(_=>_[g||""])}]}}else h.length>0?m={labels:h.map((y,b)=>`Data ${b+1}`),datasets:[{label:r.label||"Data",data:h}]}:m={labels:[],datasets:[]};if(l.value=f(m),!l.value)return;const p={...d(),...r.options,onClick:(y,b)=>{a("click",y,b),r.onClick&&r.onClick(y,b)},onHover:(y,b)=>{a("hover",y,b),r.onHover&&r.onHover(y,b)}};i.value=new ao(s.value,{type:r.type,data:l.value,options:p}),a("ready",i.value)};return t.watch(()=>[r.data,r.modelValue,r.type,r.options,r.theme],()=>{u()},{deep:!0}),t.watch(()=>[r.width,r.height],()=>{i.value&&i.value.resize()}),t.onMounted(()=>{u()}),t.onUnmounted(()=>{i.value&&i.value.destroy()}),o({chart:i,updateChart:u}),(h,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["d-code-chart",c.value])},[e.label?(t.openBlock(),t.createElementBlock("div",aw,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",sw,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"relative",style:t.normalizeStyle({height:e.height+"px"})},[t.createElementVNode("canvas",{ref_key:"chartCanvas",ref:s},null,512),e.loading?(t.openBlock(),t.createElementBlock("div",iw,[...m[0]||(m[0]=[t.createElementVNode("div",{class:"animate-pulse-slow rounded-full h-8 w-8 border-b-2 border-blue-600"},null,-1)])])):t.createCommentVNode("",!0),e.error?(t.openBlock(),t.createElementBlock("div",lw,[t.createElementVNode("div",cw,t.toDisplayString(e.error),1)])):t.createCommentVNode("",!0)],4),e.showInfo&&l.value?(t.openBlock(),t.createElementBlock("div",dw,[l.value.datasets?(t.openBlock(),t.createElementBlock("div",fw,t.toDisplayString(l.value.datasets.length)+" dataset(s) • "+t.toDisplayString(l.value.labels?l.value.labels.length:0)+" data points ",1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b1c7c58f"]]),Qn=t.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(_e.Label),t.mergeProps(t.unref(n),{class:t.unref(Te)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),uw={key:0,class:"ml-1 text-destructive"},hw=["aria-busy"],mw={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse mb-2"},pw={key:1,class:"flex items-center"},gw=["id","checked","indeterminate","disabled","required"],io=ft(t.defineComponent({name:"DCodeCheckbox",inheritAttrs:!1,__name:"DCodeCheckbox",props:{id:{default:""},label:{default:""},title:{default:""},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,null]},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>a.visible??!0),i=t.computed(()=>a.required),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`dcode-checkbox-${a.id||a.label||"checkbox"}-${l}`),d=t.ref(!!a.modelValue);t.watch(()=>a.modelValue,h=>{d.value=!!h},{immediate:!0});const f=()=>{if(a.disabled||a.readonly)return;const h=!d.value;d.value=h,r("update:modelValue",h)},u=h=>{(h.key===" "||h.key==="Enter")&&(h.preventDefault(),f())};return(h,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-1.5",a.disabled?"cursor-not-allowed":""])},[e.label?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",uw,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass([t.unref(n).class,{"opacity-60 cursor-not-allowed":e.disabled}]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",mw)):t.createCommentVNode("",!0),m[0]||(m[0]=t.createElementVNode("div",{class:"flex items-center gap-2.5"},[t.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"}),t.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1))],64)):(t.openBlock(),t.createElementBlock("div",pw,[t.createElementVNode("label",{class:t.normalizeClass(["flex items-center gap-2.5 group relative",{"cursor-pointer":!e.disabled&&!e.readonly,"opacity-50 cursor-not-allowed":e.disabled,"cursor-default opacity-80":e.readonly}])},[t.createElementVNode("input",{type:"checkbox",id:c.value,class:"sr-only peer",checked:d.value,indeterminate:e.indeterminate,disabled:e.disabled,required:i.value,onChange:f,onKeydown:u},null,40,gw),t.createElementVNode("div",{class:t.normalizeClass(["h-4 w-4 shrink-0 rounded-sm border shadow-sm transition-all focus:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-neutral-400 dark:peer-focus-visible:ring-neutral-600 peer-focus-visible:ring-offset-2 flex items-center justify-center",[d.value||e.indeterminate?"bg-primary border-primary text-primary-foreground":"border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]]),"aria-hidden":"true"},[d.value&&!e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:"h-3 w-3 text-white","stroke-width":"3"})):e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ne.Minus),{key:1,class:"h-3 w-3 text-white","stroke-width":"3"})):t.createCommentVNode("",!0)],2),e.title?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["text-sm leading-relaxed select-none transition-colors",[e.disabled?"text-gray-400 dark:text-gray-500":"text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-gray-100"]])},t.toDisplayString(e.title),3)):t.createCommentVNode("",!0)],2)]))],10,hw),[[t.vShow,s.value]])],2))}}),[["__scopeId","data-v-0f459b64"]]),bw={class:"w-full"},yw={key:0,class:"mb-4"},xw={key:0,class:"h-6 w-48 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},kw={key:1,class:"text-sm font-medium text-gray-900 dark:text-gray-100"},ww={key:0,class:"ml-1 text-destructive"},Cw={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-4"},_w={key:1,class:"flex flex-wrap gap-4"},Ew={key:0,class:"text-center py-8 text-gray-500 dark:text-gray-400"},Bw={key:1,class:"flex flex-wrap gap-x-6 gap-y-4"},Sw={key:3,class:"flex items-center gap-1 text-sm text-red-500 mt-4"},Qs=ft(t.defineComponent({name:"DCodeCardCheckboxList",inheritAttrs:!1,__name:"DCodeCardCheckboxList",props:{modelValue:{default:()=>[]},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},items:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},apiModule:{},apiAction:{},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""},columns:{default:2},apiParams:{default:()=>({})},returnArray:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Je(),r=o,a=e,s=t.ref(new Set);t.watch(()=>a.modelValue,A=>{if(!A){s.value=new Set;return}const C=A.map(x=>typeof x=="object"&&x!==null?x.id!==void 0?x.id:x.value:x);s.value=new Set(C)},{immediate:!0,deep:!0});const i=t.ref([]),l=t.ref(!1),c=t.ref(null),d=async()=>{var C,x;const A=((C=a.endpoint)==null?void 0:C.apiUrl)||a.apiUrl;if(!(!A&&!a.apiModule&&!a.apiAction)){l.value=!0,c.value=null;try{let w;const D=((x=a.endpoint)==null?void 0:x.apiMethod)||a.apiMethod||"GET",k={page:1,perPage:100,...a.apiParams};if(A)w=await n(A,D,k);else if(a.apiModule&&a.apiAction){const{DCodeApi:S}=Je();w=await S(a.apiModule,a.apiAction,k)}let v=w;a.dataPath?v=a.dataPath.split(".").reduce((N,V)=>N&&N[V]!==void 0?N[V]:void 0,w):typeof w=="object"&&!Array.isArray(w)&&w.data&&(v=w.data),Array.isArray(v)?i.value=v:(console.warn("DCodeCardCheckboxList: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(w){console.error("DCodeCardCheckboxList fetch error:",w),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},f=t.ref(!1);let u=null;const h=()=>{typeof document<"u"&&(f.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{var A;((A=a.endpoint)!=null&&A.apiUrl||a.apiUrl||a.apiModule&&a.apiAction)&&d(),h(),typeof document<"u"&&(u=new MutationObserver(h),u.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),u.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),t.onBeforeUnmount(()=>{u&&u.disconnect()});const m=t.computed(()=>a.options&&a.options.length>0?a.options:a.items&&a.items.length>0?a.items:i.value),p=A=>{if(typeof A!="object"||A===null)return A;const C=a.itemValue||a.model||"id";return A[C]},y=A=>{if(typeof A!="object"||A===null)return String(A);const C=a.itemTitle||"name";return A[C]},b=A=>s.value.has(A),g=(A,C)=>{if(a.disabled)return;const x=new Set(s.value);C?x.add(A):x.delete(A),s.value=x;const w=Array.from(s.value);r("update:modelValue",w),r("change",w)},_=t.computed(()=>a.skeleton||l.value),E=t.computed(()=>!!a.error||!!c.value),B=t.computed(()=>a.error||c.value);return(A,C)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",bw,[e.label||_.value?(t.openBlock(),t.createElementBlock("div",yw,[_.value?(t.openBlock(),t.createElementBlock("div",xw)):(t.openBlock(),t.createElementBlock("h3",kw,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",ww,"*")):t.createCommentVNode("",!0)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[l.value?(t.openBlock(),t.createElementBlock("div",Cw,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),C[0]||(C[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),_.value?(t.openBlock(),t.createElementBlock("div",_w,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,x=>t.createElementVNode("div",{key:`skeleton-${x}`,class:"flex items-center gap-2.5 min-w-[120px]"},[...C[1]||(C[1]=[t.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"},null,-1),t.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])),64))])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[m.value.length===0?(t.openBlock(),t.createElementBlock("div",Ew," Tidak ada data ")):(t.openBlock(),t.createElementBlock("div",Bw,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,(x,w)=>(t.openBlock(),t.createElementBlock("div",{key:w,class:"flex items-start"},[t.createVNode(io,{"model-value":b(p(x)),title:y(x),disabled:e.disabled,"onUpdate:modelValue":D=>g(p(x),D)},null,8,["model-value","title","disabled","onUpdate:modelValue"])]))),128))]))],64)),E.value&&B.value?(t.openBlock(),t.createElementBlock("div",Sw,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(B.value),1)])):t.createCommentVNode("",!0)])],512)),[[t.vShow,e.visible]])}}),[["__scopeId","data-v-8f934d59"]]),Aw=["aria-busy"],vw={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Dw={key:1,class:"flex justify-end"},Nw=["for"],Vw={key:0,class:"ml-1 text-destructive"},Mw={class:"relative w-full group"},Tw={class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700"},Pw={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},Ow=["id","disabled","readonly","placeholder","maxlength"],Lw={key:0,class:"absolute top-full right-0 z-10 text-[11px] text-gray-400 dark:text-gray-500 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100 mt-0.5"},Rw={key:1,class:"flex items-center gap-1 text-xs text-destructive"},Zs=t.defineComponent({name:"DCodeCurrencyField",inheritAttrs:!1,__name:"DCodeCurrencyField",props:{modelValue:{},currency:{default:"IDR"},locale:{},label:{},placeholder:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},prependInner:{},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=Math.random().toString(36).slice(2,7),i=t.computed(()=>`app-currency-field-${n.id||a.label||"currency-field"}-${s}`),l=t.computed(()=>{const v=n.required,S=n["aria-required"];return v===""||v===!0||v==="true"||(S==="true"||S===!0)}),c=t.computed(()=>{const v=n.maxlength??n.maxLength;let S=Number.NaN;return typeof v=="number"?S=v:typeof v=="string"&&(S=Number.parseInt(v,10)),Number.isFinite(S)&&S>0?S:void 0}),d=t.computed(()=>a.locale?a.locale:"en-US"),f=t.computed(()=>a.prependInner?a.prependInner:a.currency==="USD"?"$":a.currency==="IDR"?"Rp":a.currency),u=t.computed(()=>new Intl.NumberFormat(d.value,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})),h=v=>{const S=v.replaceAll(/\D/g,"");return S?Number(S):null},m=v=>u.value.format(v),p=t.ref(""),y=t.ref(null);t.watch(()=>a.modelValue,v=>{v==null?p.value="":h(p.value)!==v&&(p.value=m(v))},{immediate:!0});const b=(v,S)=>{let N=0;for(let V=0;V<S;V++)/\d/.test(v[V])&&N++;return N},g=(v,S)=>{let N=0;for(let V=0;V<v.length;V++)if(/\d/.test(v[V])&&(N++,N===S))return V+1;return v.length},_=v=>{const S=v.target,N=S.value,V=S.selectionStart??N.length,L=h(N);if(L===null){p.value="",r("update:modelValue",null);return}const O=m(L);if(N!==O){const P=b(N,V);p.value=O,t.nextTick(()=>{if(y.value){const R=g(O,P);y.value.setSelectionRange(R,R)}})}r("update:modelValue",L)},E=()=>{p.value="",r("update:modelValue",null),r("clear")},B=t.computed(()=>!a.clearable||a.disabled||a.readonly?!1:a.hideClearWhenEmpty?p.value.length>0:!0),A=t.computed(()=>!!a.error),C=t.computed(()=>{const{class:v,maxlength:S,maxLength:N,...V}=n;return V}),x=t.computed(()=>p.value.length),w=t.computed(()=>a.showCharCount?(c.value??0)>0:!1),D=t.computed(()=>w.value&&x.value>0),k=t.computed(()=>`${x.value} / ${c.value}`);return(v,S)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1.5 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",vw)):t.createCommentVNode("",!0),S[2]||(S[2]=t.createElementVNode("div",{class:"relative w-full"},[t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),w.value?(t.openBlock(),t.createElementBlock("div",Dw,[...S[1]||(S[1]=[t.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium text-gray-700 dark:text-gray-300"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),l.value?(t.openBlock(),t.createElementBlock("span",Vw,"*")):t.createCommentVNode("",!0)],8,Nw)):t.createCommentVNode("",!0),t.createElementVNode("div",Mw,[t.createElementVNode("div",{class:t.normalizeClass(["flex items-center w-full rounded-lg border overflow-hidden transition-all duration-200","bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",A.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 dark:focus-within:border-blue-400",a.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",a.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[t.createElementVNode("div",Tw,[t.createElementVNode("span",Pw,t.toDisplayString(f.value),1)]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:i.value,ref_key:"inputRef",ref:y,"onUpdate:modelValue":S[0]||(S[0]=N=>p.value=N),onInput:_,type:"text",inputmode:"numeric"},C.value,{disabled:a.disabled,readonly:a.readonly,placeholder:a.placeholder,maxlength:c.value,class:["flex-1 h-10 px-3 py-2 text-sm bg-transparent text-foreground dark:text-gray-300 outline-none placeholder:text-gray-400",B.value?"pr-8":""]}),null,16,Ow),[[t.vModelText,p.value]]),B.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center w-8 h-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors flex-shrink-0","aria-label":"Clear input",onClick:E},[t.createVNode(t.unref(ne.X),{class:"w-3.5 h-3.5"})])):t.createCommentVNode("",!0)],2),D.value&&!A.value?(t.openBlock(),t.createElementBlock("p",Lw,t.toDisplayString(k.value),1)):t.createCommentVNode("",!0)]),A.value?(t.openBlock(),t.createElementBlock("p",Rw,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-3.5 h-3.5 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(a.error),1)])):t.createCommentVNode("",!0)],64))],10,Aw))}}),Iw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fw=(e,o,n)=>{let r;const a=Iw[e];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function un(e){return(o={})=>{const n=o.width?String(o.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const zw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$w={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uw={date:un({formats:zw,defaultWidth:"full"}),time:un({formats:$w,defaultWidth:"full"}),dateTime:un({formats:jw,defaultWidth:"full"})},Ww={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hw=(e,o,n,r)=>Ww[e];function Wt(e){return(o,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):i;a=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(o):o;return a[s]}}const qw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Gw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Kw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Xw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Yw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Jw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qw={ordinalNumber:(e,o)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Wt({values:qw,defaultWidth:"wide"}),quarter:Wt({values:Gw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wt({values:Kw,defaultWidth:"wide"}),day:Wt({values:Xw,defaultWidth:"wide"}),dayPeriod:Wt({values:Yw,defaultWidth:"wide",formattingValues:Jw,defaultFormattingWidth:"wide"})};function Ht(e){return(o,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=o.match(a);if(!s)return null;const i=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?e2(l,u=>u.test(i)):Zw(l,u=>u.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=o.slice(i.length);return{value:d,rest:f}}}function Zw(e,o){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&o(e[n]))return n}function e2(e,o){for(let n=0;n<e.length;n++)if(o(e[n]))return n}function Lf(e){return(o,n={})=>{const r=o.match(e.matchPattern);if(!r)return null;const a=r[0],s=o.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const l=o.slice(a.length);return{value:i,rest:l}}}const t2=/^(\d+)(th|st|nd|rd)?/i,o2=/\d+/i,n2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},r2={any:[/^b/i,/^(a|c)/i]},a2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},s2={any:[/1/i,/2/i,/3/i,/4/i]},i2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},l2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},c2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},d2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},f2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},u2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},h2={ordinalNumber:Lf({matchPattern:t2,parsePattern:o2,valueCallback:e=>parseInt(e,10)}),era:Ht({matchPatterns:n2,defaultMatchWidth:"wide",parsePatterns:r2,defaultParseWidth:"any"}),quarter:Ht({matchPatterns:a2,defaultMatchWidth:"wide",parsePatterns:s2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ht({matchPatterns:i2,defaultMatchWidth:"wide",parsePatterns:l2,defaultParseWidth:"any"}),day:Ht({matchPatterns:c2,defaultMatchWidth:"wide",parsePatterns:d2,defaultParseWidth:"any"}),dayPeriod:Ht({matchPatterns:f2,defaultMatchWidth:"any",parsePatterns:u2,defaultParseWidth:"any"})},m2={code:"en-US",formatDistance:Fw,formatLong:Uw,formatRelative:Hw,localize:Qw,match:h2,options:{weekStartsOn:0,firstWeekContainsDate:1}},p2={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},g2=(e,o,n)=>{let r;const a=p2[e];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},b2={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},y2={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},x2={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k2={date:un({formats:b2,defaultWidth:"full"}),time:un({formats:y2,defaultWidth:"full"}),dateTime:un({formats:x2,defaultWidth:"full"})},w2={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},C2=(e,o,n,r)=>w2[e],_2={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},E2={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},B2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},S2={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},A2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},v2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},D2={ordinalNumber:(e,o)=>"ke-"+Number(e),era:Wt({values:_2,defaultWidth:"wide"}),quarter:Wt({values:E2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wt({values:B2,defaultWidth:"wide"}),day:Wt({values:S2,defaultWidth:"wide"}),dayPeriod:Wt({values:A2,defaultWidth:"wide",formattingValues:v2,defaultFormattingWidth:"wide"})},N2=/^ke-(\d+)?/i,V2=/\d+/i,M2={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},T2={any:[/^s/i,/^(m|e)/i]},P2={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},O2={any:[/1/i,/2/i,/3/i,/4/i]},L2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},R2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},I2={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},F2={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},z2={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},$2={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},j2={ordinalNumber:Lf({matchPattern:N2,parsePattern:V2,valueCallback:e=>parseInt(e,10)}),era:Ht({matchPatterns:M2,defaultMatchWidth:"wide",parsePatterns:T2,defaultParseWidth:"any"}),quarter:Ht({matchPatterns:P2,defaultMatchWidth:"wide",parsePatterns:O2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ht({matchPatterns:L2,defaultMatchWidth:"wide",parsePatterns:R2,defaultParseWidth:"any"}),day:Ht({matchPatterns:I2,defaultMatchWidth:"wide",parsePatterns:F2,defaultParseWidth:"any"}),dayPeriod:Ht({matchPatterns:z2,defaultMatchWidth:"any",parsePatterns:$2,defaultParseWidth:"any"})},U2={code:"id",formatDistance:g2,formatLong:k2,formatRelative:C2,localize:D2,match:j2,options:{weekStartsOn:1,firstWeekContainsDate:1}},Rf={primary:{light:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"#bfdbfe"},dark:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"rgba(30, 58, 138, 0.3)"}},emerald:{light:{primary:"#16a34a",text:"#ffffff",hover:"#dcfce7",border:"#16a34a",range:"#ecfdf5"},dark:{primary:"#22c55e",text:"#0b1220",hover:"#14532d",border:"#22c55e",range:"rgba(6, 78, 59, 0.3)"}},amber:{light:{primary:"#d97706",text:"#ffffff",hover:"#fffbeb",border:"#d97706",range:"#fffbeb"},dark:{primary:"#f59e0b",text:"#0b1220",hover:"#78350f",border:"#f59e0b",range:"rgba(120, 53, 15, 0.3)"}},violet:{light:{primary:"#7c3aed",text:"#ffffff",hover:"#f5f3ff",border:"#7c3aed",range:"#f5f3ff"},dark:{primary:"#8b5cf6",text:"#0b1220",hover:"#2e1065",border:"#8b5cf6",range:"rgba(46, 16, 101, 0.3)"}},destructive:{light:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.10)",border:"hsl(var(--destructive))",range:"#fef2f2"},dark:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.18)",border:"hsl(var(--destructive))",range:"rgba(127, 29, 29, 0.3)"}}},If="dcode-dp-theme-forced";function W2(e,o=If){const n=Rf[e]??Rf.primary,r=`
|
|
41
|
+
`):e}function U1(e,o){const{element:n,datasetIndex:r,index:a}=o,s=e.getDatasetMeta(r).controller,{label:i,value:l}=s.getLabelAndValue(a);return{chart:e,label:i,parsed:s.getParsed(a),raw:e.data.datasets[r].data[a],formattedValue:l,dataset:s.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function wf(e,o){const n=e.chart.ctx,{body:r,footer:a,title:s}=e,{boxWidth:i,boxHeight:l}=o,c=lt(o.bodyFont),d=lt(o.titleFont),f=lt(o.footerFont),u=s.length,h=a.length,m=r.length,p=At(o.padding);let y=p.height,b=0,g=r.reduce((B,A)=>B+A.before.length+A.lines.length+A.after.length,0);if(g+=e.beforeBody.length+e.afterBody.length,u&&(y+=u*d.lineHeight+(u-1)*o.titleSpacing+o.titleMarginBottom),g){const B=o.displayColors?Math.max(l,c.lineHeight):c.lineHeight;y+=m*B+(g-m)*c.lineHeight+(g-1)*o.bodySpacing}h&&(y+=o.footerMarginTop+h*f.lineHeight+(h-1)*o.footerSpacing);let E=0;const _=function(B){b=Math.max(b,n.measureText(B).width+E)};return n.save(),n.font=d.string,je(e.title,_),n.font=c.string,je(e.beforeBody.concat(e.afterBody),_),E=o.displayColors?i+2+o.boxPadding:0,je(r,B=>{je(B.before,_),je(B.lines,_),je(B.after,_)}),E=0,n.font=f.string,je(e.footer,_),n.restore(),b+=p.width,{width:b,height:y}}function W1(e,o){const{y:n,height:r}=o;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function H1(e,o,n,r){const{x:a,width:s}=r,i=n.caretSize+n.caretPadding;if(e==="left"&&a+s+i>o.width||e==="right"&&a-s-i<0)return!0}function q1(e,o,n,r){const{x:a,width:s}=n,{width:i,chartArea:{left:l,right:c}}=e;let d="center";return r==="center"?d=a<=(l+c)/2?"left":"right":a<=s/2?d="left":a>=i-s/2&&(d="right"),H1(d,e,o,n)&&(d="center"),d}function Cf(e,o,n){const r=n.yAlign||o.yAlign||W1(e,n);return{xAlign:n.xAlign||o.xAlign||q1(e,o,n,r),yAlign:r}}function G1(e,o){let{x:n,width:r}=e;return o==="right"?n-=r:o==="center"&&(n-=r/2),n}function K1(e,o,n){let{y:r,height:a}=e;return o==="top"?r+=n:o==="bottom"?r-=a+n:r-=a/2,r}function Ef(e,o,n,r){const{caretSize:a,caretPadding:s,cornerRadius:i}=e,{xAlign:l,yAlign:c}=n,d=a+s,{topLeft:f,topRight:u,bottomLeft:h,bottomRight:m}=rn(i);let p=G1(o,l);const y=K1(o,c,d);return c==="center"?l==="left"?p+=d:l==="right"&&(p-=d):l==="left"?p-=Math.max(f,h)+a:l==="right"&&(p+=Math.max(u,m)+a),{x:st(p,0,r.width-o.width),y:st(y,0,r.height-o.height)}}function oa(e,o,n){const r=At(n.padding);return o==="center"?e.x+e.width/2:o==="right"?e.x+e.width-r.right:e.x+r.left}function _f(e){return Ut([],so(e))}function X1(e,o,n){return Io(e,{tooltip:o,tooltipItems:n,type:"tooltip"})}function Bf(e,o){const n=o&&o.dataset&&o.dataset.tooltip&&o.dataset.tooltip.callbacks;return n?e.override(n):e}const Sf={beforeTitle:eo,title(e){if(e.length>0){const o=e[0],n=o.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return o.dataset.label||"";if(o.label)return o.label;if(r>0&&o.dataIndex<r)return n[o.dataIndex]}return""},afterTitle:eo,beforeBody:eo,beforeLabel:eo,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let o=e.dataset.label||"";o&&(o+=": ");const n=e.formattedValue;return $e(n)||(o+=n),o},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:eo,afterBody:eo,beforeFooter:eo,footer:eo,afterFooter:eo};function mt(e,o,n,r){const a=e[o].call(n,r);return typeof a>"u"?Sf[o].call(n,r):a}class Xs extends ro{constructor(o){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=o.chart,this.options=o.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(o){this.options=o,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const o=this._cachedAnimations;if(o)return o;const n=this.chart,r=this.options.setContext(this.getContext()),a=r.enabled&&n.options.animation&&r.animations,s=new kd(this.chart,a);return a._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=X1(this.chart.getContext(),this,this._tooltipItems))}getTitle(o,n){const{callbacks:r}=n,a=mt(r,"beforeTitle",this,o),s=mt(r,"title",this,o),i=mt(r,"afterTitle",this,o);let l=[];return l=Ut(l,so(a)),l=Ut(l,so(s)),l=Ut(l,so(i)),l}getBeforeBody(o,n){return _f(mt(n.callbacks,"beforeBody",this,o))}getBody(o,n){const{callbacks:r}=n,a=[];return je(o,s=>{const i={before:[],lines:[],after:[]},l=Bf(r,s);Ut(i.before,so(mt(l,"beforeLabel",this,s))),Ut(i.lines,mt(l,"label",this,s)),Ut(i.after,so(mt(l,"afterLabel",this,s))),a.push(i)}),a}getAfterBody(o,n){return _f(mt(n.callbacks,"afterBody",this,o))}getFooter(o,n){const{callbacks:r}=n,a=mt(r,"beforeFooter",this,o),s=mt(r,"footer",this,o),i=mt(r,"afterFooter",this,o);let l=[];return l=Ut(l,so(a)),l=Ut(l,so(s)),l=Ut(l,so(i)),l}_createItems(o){const n=this._active,r=this.chart.data,a=[],s=[],i=[];let l=[],c,d;for(c=0,d=n.length;c<d;++c)l.push(U1(this.chart,n[c]));return o.filter&&(l=l.filter((f,u,h)=>o.filter(f,u,h,r))),o.itemSort&&(l=l.sort((f,u)=>o.itemSort(f,u,r))),je(l,f=>{const u=Bf(o.callbacks,f);a.push(mt(u,"labelColor",this,f)),s.push(mt(u,"labelPointStyle",this,f)),i.push(mt(u,"labelTextColor",this,f))}),this.labelColors=a,this.labelPointStyles=s,this.labelTextColors=i,this.dataPoints=l,l}update(o,n){const r=this.options.setContext(this.getContext()),a=this._active;let s,i=[];if(!a.length)this.opacity!==0&&(s={opacity:0});else{const l=Jn[r.position].call(this,a,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);const c=this._size=wf(this,r),d=Object.assign({},l,c),f=Cf(this.chart,r,d),u=Ef(r,d,f,this.chart);this.xAlign=f.xAlign,this.yAlign=f.yAlign,s={opacity:1,x:u.x,y:u.y,width:c.width,height:c.height,caretX:l.x,caretY:l.y}}this._tooltipItems=i,this.$context=void 0,s&&this._resolveAnimations().update(this,s),o&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(o,n,r,a){const s=this.getCaretPosition(o,r,a);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(o,n,r){const{xAlign:a,yAlign:s}=this,{caretSize:i,cornerRadius:l}=r,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:u}=rn(l),{x:h,y:m}=o,{width:p,height:y}=n;let b,g,E,_,B,A;return s==="center"?(B=m+y/2,a==="left"?(b=h,g=b-i,_=B+i,A=B-i):(b=h+p,g=b+i,_=B-i,A=B+i),E=b):(a==="left"?g=h+Math.max(c,f)+i:a==="right"?g=h+p-Math.max(d,u)-i:g=this.caretX,s==="top"?(_=m,B=_-i,b=g-i,E=g+i):(_=m+y,B=_+i,b=g+i,E=g-i),A=_),{x1:b,x2:g,x3:E,y1:_,y2:B,y3:A}}drawTitle(o,n,r){const a=this.title,s=a.length;let i,l,c;if(s){const d=ln(r.rtl,this.x,this.width);for(o.x=oa(this,r.titleAlign,r),n.textAlign=d.textAlign(r.titleAlign),n.textBaseline="middle",i=lt(r.titleFont),l=r.titleSpacing,n.fillStyle=r.titleColor,n.font=i.string,c=0;c<s;++c)n.fillText(a[c],d.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+l,c+1===s&&(o.y+=r.titleMarginBottom-l)}}_drawColorBox(o,n,r,a,s){const i=this.labelColors[r],l=this.labelPointStyles[r],{boxHeight:c,boxWidth:d}=s,f=lt(s.bodyFont),u=oa(this,"left",s),h=a.x(u),m=c<f.lineHeight?(f.lineHeight-c)/2:0,p=n.y+m;if(s.usePointStyle){const y={radius:Math.min(d,c)/2,pointStyle:l.pointStyle,rotation:l.rotation,borderWidth:1},b=a.leftForLtr(h,d)+d/2,g=p+c/2;o.strokeStyle=s.multiKeyBackground,o.fillStyle=s.multiKeyBackground,Bs(o,y,b,g),o.strokeStyle=i.borderColor,o.fillStyle=i.backgroundColor,Bs(o,y,b,g)}else{o.lineWidth=Pe(i.borderWidth)?Math.max(...Object.values(i.borderWidth)):i.borderWidth||1,o.strokeStyle=i.borderColor,o.setLineDash(i.borderDash||[]),o.lineDashOffset=i.borderDashOffset||0;const y=a.leftForLtr(h,d),b=a.leftForLtr(a.xPlus(h,1),d-2),g=rn(i.borderRadius);Object.values(g).some(E=>E!==0)?(o.beginPath(),o.fillStyle=s.multiKeyBackground,Rr(o,{x:y,y:p,w:d,h:c,radius:g}),o.fill(),o.stroke(),o.fillStyle=i.backgroundColor,o.beginPath(),Rr(o,{x:b,y:p+1,w:d-2,h:c-2,radius:g}),o.fill()):(o.fillStyle=s.multiKeyBackground,o.fillRect(y,p,d,c),o.strokeRect(y,p,d,c),o.fillStyle=i.backgroundColor,o.fillRect(b,p+1,d-2,c-2))}o.fillStyle=this.labelTextColors[r]}drawBody(o,n,r){const{body:a}=this,{bodySpacing:s,bodyAlign:i,displayColors:l,boxHeight:c,boxWidth:d,boxPadding:f}=r,u=lt(r.bodyFont);let h=u.lineHeight,m=0;const p=ln(r.rtl,this.x,this.width),y=function(k){n.fillText(k,p.x(o.x+m),o.y+h/2),o.y+=h+s},b=p.textAlign(i);let g,E,_,B,A,C,x;for(n.textAlign=i,n.textBaseline="middle",n.font=u.string,o.x=oa(this,b,r),n.fillStyle=r.bodyColor,je(this.beforeBody,y),m=l&&b!=="right"?i==="center"?d/2+f:d+2+f:0,B=0,C=a.length;B<C;++B){for(g=a[B],E=this.labelTextColors[B],n.fillStyle=E,je(g.before,y),_=g.lines,l&&_.length&&(this._drawColorBox(n,o,B,p,r),h=Math.max(u.lineHeight,c)),A=0,x=_.length;A<x;++A)y(_[A]),h=u.lineHeight;je(g.after,y)}m=0,h=u.lineHeight,je(this.afterBody,y),o.y-=s}drawFooter(o,n,r){const a=this.footer,s=a.length;let i,l;if(s){const c=ln(r.rtl,this.x,this.width);for(o.x=oa(this,r.footerAlign,r),o.y+=r.footerMarginTop,n.textAlign=c.textAlign(r.footerAlign),n.textBaseline="middle",i=lt(r.footerFont),n.fillStyle=r.footerColor,n.font=i.string,l=0;l<s;++l)n.fillText(a[l],c.x(o.x),o.y+i.lineHeight/2),o.y+=i.lineHeight+r.footerSpacing}}drawBackground(o,n,r,a){const{xAlign:s,yAlign:i}=this,{x:l,y:c}=o,{width:d,height:f}=r,{topLeft:u,topRight:h,bottomLeft:m,bottomRight:p}=rn(a.cornerRadius);n.fillStyle=a.backgroundColor,n.strokeStyle=a.borderColor,n.lineWidth=a.borderWidth,n.beginPath(),n.moveTo(l+u,c),i==="top"&&this.drawCaret(o,n,r,a),n.lineTo(l+d-h,c),n.quadraticCurveTo(l+d,c,l+d,c+h),i==="center"&&s==="right"&&this.drawCaret(o,n,r,a),n.lineTo(l+d,c+f-p),n.quadraticCurveTo(l+d,c+f,l+d-p,c+f),i==="bottom"&&this.drawCaret(o,n,r,a),n.lineTo(l+m,c+f),n.quadraticCurveTo(l,c+f,l,c+f-m),i==="center"&&s==="left"&&this.drawCaret(o,n,r,a),n.lineTo(l,c+u),n.quadraticCurveTo(l,c,l+u,c),n.closePath(),n.fill(),a.borderWidth>0&&n.stroke()}_updateAnimationTarget(o){const n=this.chart,r=this.$animations,a=r&&r.x,s=r&&r.y;if(a||s){const i=Jn[o.position].call(this,this._active,this._eventPosition);if(!i)return;const l=this._size=wf(this,o),c=Object.assign({},i,this._size),d=Cf(n,o,c),f=Ef(o,c,d,n);(a._to!==f.x||s._to!==f.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=l.width,this.height=l.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,f))}}_willRender(){return!!this.opacity}draw(o){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const a={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const i=At(n.padding),l=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&l&&(o.save(),o.globalAlpha=r,this.drawBackground(s,o,a,n),dd(o,n.textDirection),s.y+=i.top,this.drawTitle(s,o,n),this.drawBody(s,o,n),this.drawFooter(s,o,n),fd(o,n.textDirection),o.restore())}getActiveElements(){return this._active||[]}setActiveElements(o,n){const r=this._active,a=o.map(({datasetIndex:l,index:c})=>{const d=this.chart.getDatasetMeta(l);if(!d)throw new Error("Cannot find a dataset at index "+l);return{datasetIndex:l,element:d.data[c],index:c}}),s=!Nr(r,a),i=this._positionChanged(a,n);(s||i)&&(this._active=a,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(o,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const a=this.options,s=this._active||[],i=this._getActiveElements(o,s,n,r),l=this._positionChanged(i,o),c=n||!Nr(i,s)||l;return c&&(this._active=i,(a.enabled||a.external)&&(this._eventPosition={x:o.x,y:o.y},this.update(!0,n))),c}_getActiveElements(o,n,r,a){const s=this.options;if(o.type==="mouseout")return[];if(!a)return n.filter(l=>this.chart.data.datasets[l.datasetIndex]&&this.chart.getDatasetMeta(l.datasetIndex).controller.getParsed(l.index)!==void 0);const i=this.chart.getElementsAtEventForMode(o,s.mode,s,r);return s.reverse&&i.reverse(),i}_positionChanged(o,n){const{caretX:r,caretY:a,options:s}=this,i=Jn[s.position].call(this,o,n);return i!==!1&&(r!==i.x||a!==i.y)}}be(Xs,"positioners",Jn);var Y1={id:"tooltip",_element:Xs,positioners:Jn,afterInit(e,o,n){n&&(e.tooltip=new Xs({chart:e,options:n}))},beforeUpdate(e,o,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,o,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const o=e.tooltip;if(o&&o._willRender()){const n={tooltip:o};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;o.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,o){if(e.tooltip){const n=o.replay;e.tooltip.handleEvent(o.event,n,o.inChartArea)&&(o.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,o)=>o.bodyFont.size,boxWidth:(e,o)=>o.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Sf},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const J1=(e,o,n,r)=>(typeof o=="string"?(n=e.push(o)-1,r.unshift({index:n,label:o})):isNaN(o)&&(n=null),n);function Q1(e,o,n,r){const a=e.indexOf(o);if(a===-1)return J1(e,o,n,r);const s=e.lastIndexOf(o);return a!==s?n:a}const Z1=(e,o)=>e===null?null:st(Math.round(e),0,o);function Af(e){const o=this.getLabels();return e>=0&&e<o.length?o[e]:e}class Ys extends dn{constructor(o){super(o),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(o){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:a,label:s}of n)r[a]===s&&r.splice(a,1);this._addedLabels=[]}super.init(o)}parse(o,n){if($e(o))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===o?n:Q1(r,o,ve(n,o),this._addedLabels),Z1(n,r.length-1)}determineDataLimits(){const{minDefined:o,maxDefined:n}=this.getUserBounds();let{min:r,max:a}=this.getMinMax(!0);this.options.bounds==="ticks"&&(o||(r=0),n||(a=this.getLabels().length-1)),this.min=r,this.max=a}buildTicks(){const o=this.min,n=this.max,r=this.options.offset,a=[];let s=this.getLabels();s=o===0&&n===s.length-1?s:s.slice(o,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let i=o;i<=n;i++)a.push({value:i});return a}getLabelForValue(o){return Af.call(this,o)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(o){return typeof o!="number"&&(o=this.parse(o)),o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getPixelForTick(o){const n=this.ticks;return o<0||o>n.length-1?null:this.getPixelForValue(n[o].value)}getValueForPixel(o){return Math.round(this._startValue+this.getDecimalForPixel(o)*this._valueRange)}getBasePixel(){return this.bottom}}be(Ys,"id","category"),be(Ys,"defaults",{ticks:{callback:Af}});function ew(e,o){const n=[],{bounds:a,step:s,min:i,max:l,precision:c,count:d,maxTicks:f,maxDigits:u,includeBounds:h}=e,m=s||1,p=f-1,{min:y,max:b}=o,g=!$e(i),E=!$e(l),_=!$e(d),B=(b-y)/(u+1);let A=Ic((b-y)/p/m)*m,C,x,k,N;if(A<1e-14&&!g&&!E)return[{value:y},{value:b}];N=Math.ceil(b/A)-Math.floor(y/A),N>p&&(A=Ic(N*A/p/m)*m),$e(c)||(C=Math.pow(10,c),A=Math.ceil(A*C)/C),a==="ticks"?(x=Math.floor(y/A)*A,k=Math.ceil(b/A)*A):(x=y,k=b),g&&E&&s&&ny((l-i)/s,A/1e3)?(N=Math.round(Math.min((l-i)/A,f)),A=(l-i)/N,x=i,k=l):_?(x=g?i:x,k=E?l:k,N=d-1,A=(k-x)/N):(N=(k-x)/A,Rn(N,Math.round(N),A/1e3)?N=Math.round(N):N=Math.ceil(N));const w=Math.max(Fc(A),Fc(x));C=Math.pow(10,$e(c)?w:c),x=Math.round(x*C)/C,k=Math.round(k*C)/C;let v=0;for(g&&(h&&x!==i?(n.push({value:i}),x<i&&v++,Rn(Math.round((x+v*A)*C)/C,i,vf(i,B,e))&&v++):x<i&&v++);v<N;++v){const S=Math.round((x+v*A)*C)/C;if(E&&S>l)break;n.push({value:S})}return E&&h&&k!==l?n.length&&Rn(n[n.length-1].value,l,vf(l,B,e))?n[n.length-1].value=l:n.push({value:l}):(!E||k===l)&&n.push({value:k}),n}function vf(e,o,{horizontal:n,minRotation:r}){const a=to(r),s=(n?Math.sin(a):Math.cos(a))||.001,i=.75*o*(""+e).length;return Math.min(o/s,i)}class tw extends dn{constructor(o){super(o),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(o,n){return $e(o)||(typeof o=="number"||o instanceof Number)&&!isFinite(+o)?null:+o}handleTickRangeOptions(){const{beginAtZero:o}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:a,max:s}=this;const i=c=>a=n?a:c,l=c=>s=r?s:c;if(o){const c=$t(a),d=$t(s);c<0&&d<0?l(0):c>0&&d>0&&i(0)}if(a===s){let c=s===0?1:Math.abs(s*.05);l(s+c),o||i(a-c)}this.min=a,this.max=s}getTickLimit(){const o=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=o,a;return r?(a=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,a>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${a} ticks. Limiting to 1000.`),a=1e3)):(a=this.computeTickLimit(),n=n||11),n&&(a=Math.min(n,a)),a}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const o=this.options,n=o.ticks;let r=this.getTickLimit();r=Math.max(2,r);const a={maxTicks:r,bounds:o.bounds,min:o.min,max:o.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,i=ew(a,s);return o.bounds==="ticks"&&ry(i,this,"value"),o.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}configure(){const o=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&o.length){const a=(r-n)/Math.max(o.length-1,1)/2;n-=a,r+=a}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(o){return Cs(o,this.chart.options.locale,this.options.ticks.format)}}class Js extends tw{determineDataLimits(){const{min:o,max:n}=this.getMinMax(!0);this.min=at(o)?o:0,this.max=at(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const o=this.isHorizontal(),n=o?this.width:this.height,r=to(this.options.ticks.minRotation),a=(o?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/a))}getPixelForValue(o){return o===null?NaN:this.getPixelForDecimal((o-this._startValue)/this._valueRange)}getValueForPixel(o){return this._startValue+this.getDecimalForPixel(o)*this._valueRange}}be(Js,"id","linear"),be(Js,"defaults",{ticks:{callback:Yc.formatters.numeric}});const na={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},pt=Object.keys(na);function Df(e,o){return e-o}function Nf(e,o){if($e(o))return null;const n=e._adapter,{parser:r,round:a,isoWeekday:s}=e._parseOpts;let i=o;return typeof r=="function"&&(i=r(i)),at(i)||(i=typeof r=="string"?n.parse(i,r):n.parse(i)),i===null?null:(a&&(i=a==="week"&&(Ln(s)||s===!0)?n.startOf(i,"isoWeek",s):n.startOf(i,a)),+i)}function Vf(e,o,n,r){const a=pt.length;for(let s=pt.indexOf(e);s<a-1;++s){const i=na[pt[s]],l=i.steps?i.steps:Number.MAX_SAFE_INTEGER;if(i.common&&Math.ceil((n-o)/(l*i.size))<=r)return pt[s]}return pt[a-1]}function ow(e,o,n,r,a){for(let s=pt.length-1;s>=pt.indexOf(n);s--){const i=pt[s];if(na[i].common&&e._adapter.diff(a,r,i)>=o-1)return i}return pt[n?pt.indexOf(n):0]}function nw(e){for(let o=pt.indexOf(e)+1,n=pt.length;o<n;++o)if(na[pt[o]].common)return pt[o]}function Mf(e,o,n){if(!n)e[o]=!0;else if(n.length){const{lo:r,hi:a}=ys(n,o),s=n[r]>=o?n[r]:n[a];e[s]=!0}}function rw(e,o,n,r){const a=e._adapter,s=+a.startOf(o[0].value,r),i=o[o.length-1].value;let l,c;for(l=s;l<=i;l=+a.add(l,1,r))c=n[l],c>=0&&(o[c].major=!0);return o}function Tf(e,o,n){const r=[],a={},s=o.length;let i,l;for(i=0;i<s;++i)l=o[i],a[l]=i,r.push({value:l,major:!1});return s===0||!n?r:rw(e,r,a,n)}class ra extends dn{constructor(o){super(o),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(o,n={}){const r=o.time||(o.time={}),a=this._adapter=new zx._date(o.adapters.date);a.init(n),Pn(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(o),this._normalized=n.normalized}parse(o,n){return o===void 0?null:Nf(this,o)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const o=this.options,n=this._adapter,r=o.time.unit||"day";let{min:a,max:s,minDefined:i,maxDefined:l}=this.getUserBounds();function c(d){!i&&!isNaN(d.min)&&(a=Math.min(a,d.min)),!l&&!isNaN(d.max)&&(s=Math.max(s,d.max))}(!i||!l)&&(c(this._getLabelBounds()),(o.bounds!=="ticks"||o.ticks.source!=="labels")&&c(this.getMinMax(!1))),a=at(a)&&!isNaN(a)?a:+n.startOf(Date.now(),r),s=at(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(a,s-1),this.max=Math.max(a+1,s)}_getLabelBounds(){const o=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return o.length&&(n=o[0],r=o[o.length-1]),{min:n,max:r}}buildTicks(){const o=this.options,n=o.time,r=o.ticks,a=r.source==="labels"?this.getLabelTimestamps():this._generate();o.bounds==="ticks"&&a.length&&(this.min=this._userMin||a[0],this.max=this._userMax||a[a.length-1]);const s=this.min,i=this.max,l=cy(a,s,i);return this._unit=n.unit||(r.autoSkip?Vf(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):ow(this,l.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:nw(this._unit),this.initOffsets(a),o.reverse&&l.reverse(),Tf(this,l,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(o=>+o.value))}initOffsets(o=[]){let n=0,r=0,a,s;this.options.offset&&o.length&&(a=this.getDecimalForValue(o[0]),o.length===1?n=1-a:n=(this.getDecimalForValue(o[1])-a)/2,s=this.getDecimalForValue(o[o.length-1]),o.length===1?r=s:r=(s-this.getDecimalForValue(o[o.length-2]))/2);const i=o.length<3?.5:.25;n=st(n,0,i),r=st(r,0,i),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const o=this._adapter,n=this.min,r=this.max,a=this.options,s=a.time,i=s.unit||Vf(s.minUnit,n,r,this._getLabelCapacity(n)),l=ve(a.ticks.stepSize,1),c=i==="week"?s.isoWeekday:!1,d=Ln(c)||c===!0,f={};let u=n,h,m;if(d&&(u=+o.startOf(u,"isoWeek",c)),u=+o.startOf(u,d?"day":i),o.diff(r,n,i)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+i);const p=a.ticks.source==="data"&&this.getDataTimestamps();for(h=u,m=0;h<r;h=+o.add(h,l,i),m++)Mf(f,h,p);return(h===r||a.bounds==="ticks"||m===1)&&Mf(f,h,p),Object.keys(f).sort(Df).map(y=>+y)}getLabelForValue(o){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(o,r.tooltipFormat):n.format(o,r.displayFormats.datetime)}format(o,n){const a=this.options.time.displayFormats,s=this._unit,i=n||a[s];return this._adapter.format(o,i)}_tickFormatFunction(o,n,r,a){const s=this.options,i=s.ticks.callback;if(i)return qe(i,[o,n,r],this);const l=s.time.displayFormats,c=this._unit,d=this._majorUnit,f=c&&l[c],u=d&&l[d],h=r[n],m=d&&u&&h&&h.major;return this._adapter.format(o,a||(m?u:f))}generateTickLabels(o){let n,r,a;for(n=0,r=o.length;n<r;++n)a=o[n],a.label=this._tickFormatFunction(a.value,n,o)}getDecimalForValue(o){return o===null?NaN:(o-this.min)/(this.max-this.min)}getPixelForValue(o){const n=this._offsets,r=this.getDecimalForValue(o);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(o){const n=this.options.ticks,r=this.ctx.measureText(o).width,a=to(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(a),i=Math.sin(a),l=this._resolveTickFontOptions(0).size;return{w:r*s+l*i,h:r*i+l*s}}_getLabelCapacity(o){const n=this.options.time,r=n.displayFormats,a=r[n.unit]||r.millisecond,s=this._tickFormatFunction(o,0,Tf(this,[o],this._majorUnit),a),i=this._getLabelSize(s),l=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return l>0?l:1}getDataTimestamps(){let o=this._cache.data||[],n,r;if(o.length)return o;const a=this.getMatchingVisibleMetas();if(this._normalized&&a.length)return this._cache.data=a[0].controller.getAllParsedValues(this);for(n=0,r=a.length;n<r;++n)o=o.concat(a[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(o)}getLabelTimestamps(){const o=this._cache.labels||[];let n,r;if(o.length)return o;const a=this.getLabels();for(n=0,r=a.length;n<r;++n)o.push(Nf(this,a[n]));return this._cache.labels=this._normalized?o:this.normalize(o)}normalize(o){return Uc(o.sort(Df))}}be(ra,"id","time"),be(ra,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function aa(e,o,n){let r=0,a=e.length-1,s,i,l,c;n?(o>=e[r].pos&&o<=e[a].pos&&({lo:r,hi:a}=Oo(e,"pos",o)),{pos:s,time:l}=e[r],{pos:i,time:c}=e[a]):(o>=e[r].time&&o<=e[a].time&&({lo:r,hi:a}=Oo(e,"time",o)),{time:s,pos:l}=e[r],{time:i,pos:c}=e[a]);const d=i-s;return d?l+(c-l)*(o-s)/d:l}class Pf extends ra{constructor(o){super(o),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const o=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(o);this._minPos=aa(n,this.min),this._tableRange=aa(n,this.max)-this._minPos,super.initOffsets(o)}buildLookupTable(o){const{min:n,max:r}=this,a=[],s=[];let i,l,c,d,f;for(i=0,l=o.length;i<l;++i)d=o[i],d>=n&&d<=r&&a.push(d);if(a.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(i=0,l=a.length;i<l;++i)f=a[i+1],c=a[i-1],d=a[i],Math.round((f+c)/2)!==d&&s.push({time:d,pos:i/(l-1)});return s}_generate(){const o=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(o)||!r.length)&&r.splice(0,0,o),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((a,s)=>a-s)}_getTimestampsForTable(){let o=this._cache.all||[];if(o.length)return o;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?o=this.normalize(n.concat(r)):o=n.length?n:r,o=this._cache.all=o,o}getDecimalForValue(o){return(aa(this._table,o)-this._minPos)/this._tableRange}getValueForPixel(o){const n=this._offsets,r=this.getDecimalForPixel(o)/n.factor-n.end;return aa(this._table,r*this._tableRange+this._minPos,!0)}}be(Pf,"id","timeseries"),be(Pf,"defaults",ra.defaults);const aw={key:0,class:"mb-2 text-sm font-medium text-gray-700"},sw={key:0,class:"text-red-500 ml-1"},iw={key:0,class:"absolute inset-0 flex items-center justify-center bg-white"},lw={key:1,class:"absolute inset-0 flex items-center justify-center bg-red-50 border border-red-200 rounded"},cw={class:"text-red-600 text-sm"},dw={key:1,class:"mt-2 text-xs text-gray-500"},fw={key:0},Of=ft(t.defineComponent({name:"DCodeChart",__name:"DCodeChart",props:{type:{default:"line"},width:{default:400},height:{default:300},required:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},error:{default:null},showInfo:{type:Boolean,default:!1},responsive:{type:Boolean,default:!0},maintainAspectRatio:{type:Boolean,default:!1},theme:{default:"light"},colors:{default:()=>["#3B82F6","#EF4444","#10B981","#F59E0B","#8B5CF6","#EC4899","#14B8A6","#F97316","#6366F1","#84CC16"]},data:{},modelValue:{},options:{},onClick:{},onHover:{},label:{}},emits:["update:modelValue","click","hover","ready"],setup(e,{expose:o,emit:n}){ao.register(Ys,Js,Zr,wo,ea,Yn,j1,Y1,z1,P1,Ur,jr,Rs,cn);const r=e,a=n,s=t.ref(null),i=t.shallowRef(null),l=t.ref(null),c=t.computed(()=>({"opacity-50 pointer-events-none":r.loading||r.error})),d=()=>{const h=r.theme==="dark";return{responsive:r.responsive,maintainAspectRatio:r.maintainAspectRatio,animation:{duration:1e3,easing:"easeInOutQuart",delay:m=>{let p=0;return m.type==="data"&&m.mode==="default"&&(p=m.dataIndex*100+m.datasetIndex*50),p},onComplete:()=>{}},plugins:{legend:{position:"top",labels:{color:h?"#E5E7EB":"#374151",font:{size:12}}},tooltip:{backgroundColor:h?"#1F2937":"#FFFFFF",titleColor:h?"#F3F4F6":"#111827",bodyColor:h?"#D1D5DB":"#4B5563",borderColor:h?"#374151":"#E5E7EB",borderWidth:1,animation:{duration:200,easing:"easeInOutQuad"}}},scales:r.type!=="pie"&&r.type!=="doughnut"&&r.type!=="polarArea"?{x:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}},y:{grid:{color:h?"#374151":"#E5E7EB"},ticks:{color:h?"#D1D5DB":"#6B7280"}}}:void 0}},f=h=>!h||!h.datasets?h:{...h,datasets:h.datasets.map((m,p)=>{const y=p%r.colors.length,b=r.colors[y];let g=m.backgroundColor,E=m.borderColor;return["pie","doughnut","polarArea"].includes(r.type)&&(!g||g.length===0)?m.data&&(g=m.data.map((_,B)=>r.colors[B%r.colors.length]+"80"),E=m.data.map((_,B)=>r.colors[B%r.colors.length])):(g=g||b+"40",E=E||b),{...m,borderColor:E,backgroundColor:g,pointBackgroundColor:m.pointBackgroundColor||b,pointBorderColor:m.pointBorderColor||b,hoverBackgroundColor:m.hoverBackgroundColor||b+"60",hoverBorderColor:m.hoverBorderColor||b}})},u=async()=>{if(!s.value)return;await t.nextTick(),i.value&&i.value.destroy();const h=r.data||r.modelValue;let m=h;if(Array.isArray(h))if(h.length>0&&typeof h[0]=="object"&&h[0]!==null){const y=Object.keys(h[0]),b=y.find(E=>["label","name","x","category","title"].includes(E.toLowerCase()))||y[0],g=y.find(E=>E!==b&&["value","y","count","amount","total","data"].includes(E.toLowerCase()))||y.find(E=>E!==b&&typeof h[0][E]=="number")||(y.length>1?y.find(E=>E!==b):y[0]);m={labels:h.map(E=>E[b||""]),datasets:[{label:r.label||"Data",data:h.map(E=>E[g||""])}]}}else h.length>0?m={labels:h.map((y,b)=>`Data ${b+1}`),datasets:[{label:r.label||"Data",data:h}]}:m={labels:[],datasets:[]};if(l.value=f(m),!l.value)return;const p={...d(),...r.options,onClick:(y,b)=>{a("click",y,b),r.onClick&&r.onClick(y,b)},onHover:(y,b)=>{a("hover",y,b),r.onHover&&r.onHover(y,b)}};i.value=new ao(s.value,{type:r.type,data:l.value,options:p}),a("ready",i.value)};return t.watch(()=>[r.data,r.modelValue,r.type,r.options,r.theme],()=>{u()},{deep:!0}),t.watch(()=>[r.width,r.height],()=>{i.value&&i.value.resize()}),t.onMounted(()=>{u()}),t.onUnmounted(()=>{i.value&&i.value.destroy()}),o({chart:i,updateChart:u}),(h,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["d-code-chart",c.value])},[e.label?(t.openBlock(),t.createElementBlock("div",aw,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",sw,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"relative",style:t.normalizeStyle({height:e.height+"px"})},[t.createElementVNode("canvas",{ref_key:"chartCanvas",ref:s},null,512),e.loading?(t.openBlock(),t.createElementBlock("div",iw,[...m[0]||(m[0]=[t.createElementVNode("div",{class:"animate-pulse-slow rounded-full h-8 w-8 border-b-2 border-blue-600"},null,-1)])])):t.createCommentVNode("",!0),e.error?(t.openBlock(),t.createElementBlock("div",lw,[t.createElementVNode("div",cw,t.toDisplayString(e.error),1)])):t.createCommentVNode("",!0)],4),e.showInfo&&l.value?(t.openBlock(),t.createElementBlock("div",dw,[l.value.datasets?(t.openBlock(),t.createElementBlock("div",fw,t.toDisplayString(l.value.datasets.length)+" dataset(s) • "+t.toDisplayString(l.value.labels?l.value.labels.length:0)+" data points ",1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-b1c7c58f"]]),Qn=t.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Ee.Label),t.mergeProps(t.unref(n),{class:t.unref(Te)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),uw={key:0,class:"ml-1 text-destructive"},hw=["aria-busy"],mw={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse mb-2"},pw={key:1,class:"flex items-center"},gw=["id","checked","indeterminate","disabled","required"],io=ft(t.defineComponent({name:"DCodeCheckbox",inheritAttrs:!1,__name:"DCodeCheckbox",props:{id:{default:""},label:{default:""},title:{default:""},required:{type:Boolean,default:!1},modelValue:{type:[Boolean,null]},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>a.visible??!0),i=t.computed(()=>a.required),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`dcode-checkbox-${a.id||a.label||"checkbox"}-${l}`),d=t.ref(!!a.modelValue);t.watch(()=>a.modelValue,h=>{d.value=!!h},{immediate:!0});const f=()=>{if(a.disabled||a.readonly)return;const h=!d.value;d.value=h,r("update:modelValue",h)},u=h=>{(h.key===" "||h.key==="Enter")&&(h.preventDefault(),f())};return(h,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-1.5",a.disabled?"cursor-not-allowed":""])},[e.label?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium mb-1"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",uw,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass([t.unref(n).class,{"opacity-60 cursor-not-allowed":e.disabled}]),"aria-busy":e.skeleton},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",mw)):t.createCommentVNode("",!0),m[0]||(m[0]=t.createElementVNode("div",{class:"flex items-center gap-2.5"},[t.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"}),t.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1))],64)):(t.openBlock(),t.createElementBlock("div",pw,[t.createElementVNode("label",{class:t.normalizeClass(["flex items-center gap-2.5 group relative",{"cursor-pointer":!e.disabled&&!e.readonly,"opacity-50 cursor-not-allowed":e.disabled,"cursor-default opacity-80":e.readonly}])},[t.createElementVNode("input",{type:"checkbox",id:c.value,class:"sr-only peer",checked:d.value,indeterminate:e.indeterminate,disabled:e.disabled,required:i.value,onChange:f,onKeydown:u},null,40,gw),t.createElementVNode("div",{class:t.normalizeClass(["h-4 w-4 shrink-0 rounded-sm border shadow-sm transition-all focus:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-neutral-400 dark:peer-focus-visible:ring-neutral-600 peer-focus-visible:ring-offset-2 flex items-center justify-center",[d.value||e.indeterminate?"bg-primary border-primary text-primary-foreground":"border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]]),"aria-hidden":"true"},[d.value&&!e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:"h-3 w-3 text-white","stroke-width":"3"})):e.indeterminate?(t.openBlock(),t.createBlock(t.unref(ne.Minus),{key:1,class:"h-3 w-3 text-white","stroke-width":"3"})):t.createCommentVNode("",!0)],2),e.title?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["text-sm leading-relaxed select-none transition-colors",[e.disabled?"text-gray-400 dark:text-gray-500":"text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-gray-100"]])},t.toDisplayString(e.title),3)):t.createCommentVNode("",!0)],2)]))],10,hw),[[t.vShow,s.value]])],2))}}),[["__scopeId","data-v-0f459b64"]]),bw={class:"w-full"},yw={key:0,class:"mb-4"},xw={key:0,class:"h-6 w-48 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},kw={key:1,class:"text-sm font-medium text-gray-900 dark:text-gray-100"},ww={key:0,class:"ml-1 text-destructive"},Cw={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-4"},Ew={key:1,class:"flex flex-wrap gap-4"},_w={key:0,class:"text-center py-8 text-gray-500 dark:text-gray-400"},Bw={key:1,class:"flex flex-wrap gap-x-6 gap-y-4"},Sw={key:3,class:"flex items-center gap-1 text-sm text-red-500 mt-4"},Qs=ft(t.defineComponent({name:"DCodeCardCheckboxList",inheritAttrs:!1,__name:"DCodeCardCheckboxList",props:{modelValue:{default:()=>[]},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},items:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},apiModule:{},apiAction:{},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""},columns:{default:2},apiParams:{default:()=>({})},returnArray:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Je(),r=o,a=e,s=t.ref(new Set);t.watch(()=>a.modelValue,A=>{if(!A){s.value=new Set;return}const C=A.map(x=>typeof x=="object"&&x!==null?x.id!==void 0?x.id:x.value:x);s.value=new Set(C)},{immediate:!0,deep:!0});const i=t.ref([]),l=t.ref(!1),c=t.ref(null),d=async()=>{var C,x;const A=((C=a.endpoint)==null?void 0:C.apiUrl)||a.apiUrl;if(!(!A&&!a.apiModule&&!a.apiAction)){l.value=!0,c.value=null;try{let k;const N=((x=a.endpoint)==null?void 0:x.apiMethod)||a.apiMethod||"GET",w={page:1,perPage:100,...a.apiParams};if(A)k=await n(A,N,w);else if(a.apiModule&&a.apiAction){const{DCodeApi:S}=Je();k=await S(a.apiModule,a.apiAction,w)}let v=k;a.dataPath?v=a.dataPath.split(".").reduce((D,V)=>D&&D[V]!==void 0?D[V]:void 0,k):typeof k=="object"&&!Array.isArray(k)&&k.data&&(v=k.data),Array.isArray(v)?i.value=v:(console.warn("DCodeCardCheckboxList: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(k){console.error("DCodeCardCheckboxList fetch error:",k),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},f=t.ref(!1);let u=null;const h=()=>{typeof document<"u"&&(f.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{var A;((A=a.endpoint)!=null&&A.apiUrl||a.apiUrl||a.apiModule&&a.apiAction)&&d(),h(),typeof document<"u"&&(u=new MutationObserver(h),u.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),u.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),t.onBeforeUnmount(()=>{u&&u.disconnect()});const m=t.computed(()=>a.options&&a.options.length>0?a.options:a.items&&a.items.length>0?a.items:i.value),p=A=>{if(typeof A!="object"||A===null)return A;const C=a.itemValue||a.model||"id";return A[C]},y=A=>{if(typeof A!="object"||A===null)return String(A);const C=a.itemTitle||"name";return A[C]},b=A=>s.value.has(A),g=(A,C)=>{if(a.disabled)return;const x=new Set(s.value);C?x.add(A):x.delete(A),s.value=x;const k=Array.from(s.value);r("update:modelValue",k),r("change",k)},E=t.computed(()=>a.skeleton||l.value),_=t.computed(()=>!!a.error||!!c.value),B=t.computed(()=>a.error||c.value);return(A,C)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",bw,[e.label||E.value?(t.openBlock(),t.createElementBlock("div",yw,[E.value?(t.openBlock(),t.createElementBlock("div",xw)):(t.openBlock(),t.createElementBlock("h3",kw,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",ww,"*")):t.createCommentVNode("",!0)]))])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[l.value?(t.openBlock(),t.createElementBlock("div",Cw,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),C[0]||(C[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),E.value?(t.openBlock(),t.createElementBlock("div",Ew,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,x=>t.createElementVNode("div",{key:`skeleton-${x}`,class:"flex items-center gap-2.5 min-w-[120px]"},[...C[1]||(C[1]=[t.createElementVNode("div",{class:"h-4 w-4 rounded bg-gray-200 dark:bg-gray-700 animate-pulse flex-shrink-0"},null,-1),t.createElementVNode("div",{class:"h-4 w-24 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])),64))])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[m.value.length===0?(t.openBlock(),t.createElementBlock("div",_w," Tidak ada data ")):(t.openBlock(),t.createElementBlock("div",Bw,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.value,(x,k)=>(t.openBlock(),t.createElementBlock("div",{key:k,class:"flex items-start"},[t.createVNode(io,{"model-value":b(p(x)),title:y(x),disabled:e.disabled,"onUpdate:modelValue":N=>g(p(x),N)},null,8,["model-value","title","disabled","onUpdate:modelValue"])]))),128))]))],64)),_.value&&B.value?(t.openBlock(),t.createElementBlock("div",Sw,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(B.value),1)])):t.createCommentVNode("",!0)])],512)),[[t.vShow,e.visible]])}}),[["__scopeId","data-v-8f934d59"]]),Aw=["aria-busy"],vw={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Dw={key:1,class:"flex justify-end"},Nw=["for"],Vw={key:0,class:"ml-1 text-destructive"},Mw={class:"relative w-full group"},Tw={class:"flex items-center self-stretch px-3 bg-gray-50 dark:bg-neutral-800 border-r border-gray-300 dark:border-gray-700"},Pw={class:"text-sm font-semibold text-gray-500 dark:text-gray-400 whitespace-nowrap select-none"},Ow=["id","disabled","readonly","placeholder","maxlength"],Rw={key:0,class:"absolute top-full right-0 z-10 text-[11px] text-gray-400 dark:text-gray-500 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100 mt-0.5"},Lw={key:1,class:"flex items-center gap-1 text-xs text-destructive"},Zs=t.defineComponent({name:"DCodeCurrencyField",inheritAttrs:!1,__name:"DCodeCurrencyField",props:{modelValue:{},currency:{default:"IDR"},locale:{},label:{},placeholder:{},error:{},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},prependInner:{},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=Math.random().toString(36).slice(2,7),i=t.computed(()=>`app-currency-field-${n.id||a.label||"currency-field"}-${s}`),l=t.computed(()=>{const v=n.required,S=n["aria-required"];return v===""||v===!0||v==="true"||(S==="true"||S===!0)}),c=t.computed(()=>{const v=n.maxlength??n.maxLength;let S=Number.NaN;return typeof v=="number"?S=v:typeof v=="string"&&(S=Number.parseInt(v,10)),Number.isFinite(S)&&S>0?S:void 0}),d=t.computed(()=>a.locale?a.locale:"en-US"),f=t.computed(()=>a.prependInner?a.prependInner:a.currency==="USD"?"$":a.currency==="IDR"?"Rp":a.currency),u=t.computed(()=>new Intl.NumberFormat(d.value,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0})),h=v=>{const S=v.replaceAll(/\D/g,"");return S?Number(S):null},m=v=>u.value.format(v),p=t.ref(""),y=t.ref(null);t.watch(()=>a.modelValue,v=>{v==null?p.value="":h(p.value)!==v&&(p.value=m(v))},{immediate:!0});const b=(v,S)=>{let D=0;for(let V=0;V<S;V++)/\d/.test(v[V])&&D++;return D},g=(v,S)=>{let D=0;for(let V=0;V<v.length;V++)if(/\d/.test(v[V])&&(D++,D===S))return V+1;return v.length},E=v=>{const S=v.target,D=S.value,V=S.selectionStart??D.length,R=h(D);if(R===null){p.value="",r("update:modelValue",null);return}const O=m(R);if(D!==O){const P=b(D,V);p.value=O,t.nextTick(()=>{if(y.value){const L=g(O,P);y.value.setSelectionRange(L,L)}})}r("update:modelValue",R)},_=()=>{p.value="",r("update:modelValue",null),r("clear")},B=t.computed(()=>!a.clearable||a.disabled||a.readonly?!1:a.hideClearWhenEmpty?p.value.length>0:!0),A=t.computed(()=>!!a.error),C=t.computed(()=>{const{class:v,maxlength:S,maxLength:D,...V}=n;return V}),x=t.computed(()=>p.value.length),k=t.computed(()=>a.showCharCount?(c.value??0)>0:!1),N=t.computed(()=>k.value&&x.value>0),w=t.computed(()=>`${x.value} / ${c.value}`);return(v,S)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1.5 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",vw)):t.createCommentVNode("",!0),S[2]||(S[2]=t.createElementVNode("div",{class:"relative w-full"},[t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"})],-1)),k.value?(t.openBlock(),t.createElementBlock("div",Dw,[...S[1]||(S[1]=[t.createElementVNode("div",{class:"h-3 w-14 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1)])])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium text-gray-700 dark:text-gray-300"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),l.value?(t.openBlock(),t.createElementBlock("span",Vw,"*")):t.createCommentVNode("",!0)],8,Nw)):t.createCommentVNode("",!0),t.createElementVNode("div",Mw,[t.createElementVNode("div",{class:t.normalizeClass(["flex items-center w-full rounded-lg border overflow-hidden transition-all duration-200","bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50",A.value?"border-destructive ring-1 ring-destructive":"border-gray-300 dark:border-gray-700 focus-within:border-blue-500 focus-within:ring-1 focus-within:ring-blue-500 dark:focus-within:border-blue-400",a.disabled?"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-neutral-800":"",a.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""])},[t.createElementVNode("div",Tw,[t.createElementVNode("span",Pw,t.toDisplayString(f.value),1)]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:i.value,ref_key:"inputRef",ref:y,"onUpdate:modelValue":S[0]||(S[0]=D=>p.value=D),onInput:E,type:"text",inputmode:"numeric"},C.value,{disabled:a.disabled,readonly:a.readonly,placeholder:a.placeholder,maxlength:c.value,class:["flex-1 h-10 px-3 py-2 text-sm bg-transparent text-foreground dark:text-gray-300 outline-none placeholder:text-gray-400",B.value?"pr-8":""]}),null,16,Ow),[[t.vModelText,p.value]]),B.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center w-8 h-10 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200 transition-colors flex-shrink-0","aria-label":"Clear input",onClick:_},[t.createVNode(t.unref(ne.X),{class:"w-3.5 h-3.5"})])):t.createCommentVNode("",!0)],2),N.value&&!A.value?(t.openBlock(),t.createElementBlock("p",Rw,t.toDisplayString(w.value),1)):t.createCommentVNode("",!0)]),A.value?(t.openBlock(),t.createElementBlock("p",Lw,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-3.5 h-3.5 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(a.error),1)])):t.createCommentVNode("",!0)],64))],10,Aw))}}),Iw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Fw=(e,o,n)=>{let r;const a=Iw[e];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function un(e){return(o={})=>{const n=o.width?String(o.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const zw={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$w={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Uw={date:un({formats:zw,defaultWidth:"full"}),time:un({formats:$w,defaultWidth:"full"}),dateTime:un({formats:jw,defaultWidth:"full"})},Ww={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hw=(e,o,n,r)=>Ww[e];function Wt(e){return(o,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):i;a=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;a=e.values[l]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(o):o;return a[s]}}const qw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Gw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Kw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Xw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Yw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Jw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Qw={ordinalNumber:(e,o)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Wt({values:qw,defaultWidth:"wide"}),quarter:Wt({values:Gw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wt({values:Kw,defaultWidth:"wide"}),day:Wt({values:Xw,defaultWidth:"wide"}),dayPeriod:Wt({values:Yw,defaultWidth:"wide",formattingValues:Jw,defaultFormattingWidth:"wide"})};function Ht(e){return(o,n={})=>{const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=o.match(a);if(!s)return null;const i=s[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?e2(l,u=>u.test(i)):Zw(l,u=>u.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const f=o.slice(i.length);return{value:d,rest:f}}}function Zw(e,o){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&o(e[n]))return n}function e2(e,o){for(let n=0;n<e.length;n++)if(o(e[n]))return n}function Rf(e){return(o,n={})=>{const r=o.match(e.matchPattern);if(!r)return null;const a=r[0],s=o.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const l=o.slice(a.length);return{value:i,rest:l}}}const t2=/^(\d+)(th|st|nd|rd)?/i,o2=/\d+/i,n2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},r2={any:[/^b/i,/^(a|c)/i]},a2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},s2={any:[/1/i,/2/i,/3/i,/4/i]},i2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},l2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},c2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},d2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},f2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},u2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},h2={ordinalNumber:Rf({matchPattern:t2,parsePattern:o2,valueCallback:e=>parseInt(e,10)}),era:Ht({matchPatterns:n2,defaultMatchWidth:"wide",parsePatterns:r2,defaultParseWidth:"any"}),quarter:Ht({matchPatterns:a2,defaultMatchWidth:"wide",parsePatterns:s2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ht({matchPatterns:i2,defaultMatchWidth:"wide",parsePatterns:l2,defaultParseWidth:"any"}),day:Ht({matchPatterns:c2,defaultMatchWidth:"wide",parsePatterns:d2,defaultParseWidth:"any"}),dayPeriod:Ht({matchPatterns:f2,defaultMatchWidth:"any",parsePatterns:u2,defaultParseWidth:"any"})},m2={code:"en-US",formatDistance:Fw,formatLong:Uw,formatRelative:Hw,localize:Qw,match:h2,options:{weekStartsOn:0,firstWeekContainsDate:1}},p2={lessThanXSeconds:{one:"kurang dari 1 detik",other:"kurang dari {{count}} detik"},xSeconds:{one:"1 detik",other:"{{count}} detik"},halfAMinute:"setengah menit",lessThanXMinutes:{one:"kurang dari 1 menit",other:"kurang dari {{count}} menit"},xMinutes:{one:"1 menit",other:"{{count}} menit"},aboutXHours:{one:"sekitar 1 jam",other:"sekitar {{count}} jam"},xHours:{one:"1 jam",other:"{{count}} jam"},xDays:{one:"1 hari",other:"{{count}} hari"},aboutXWeeks:{one:"sekitar 1 minggu",other:"sekitar {{count}} minggu"},xWeeks:{one:"1 minggu",other:"{{count}} minggu"},aboutXMonths:{one:"sekitar 1 bulan",other:"sekitar {{count}} bulan"},xMonths:{one:"1 bulan",other:"{{count}} bulan"},aboutXYears:{one:"sekitar 1 tahun",other:"sekitar {{count}} tahun"},xYears:{one:"1 tahun",other:"{{count}} tahun"},overXYears:{one:"lebih dari 1 tahun",other:"lebih dari {{count}} tahun"},almostXYears:{one:"hampir 1 tahun",other:"hampir {{count}} tahun"}},g2=(e,o,n)=>{let r;const a=p2[e];return typeof a=="string"?r=a:o===1?r=a.one:r=a.other.replace("{{count}}",o.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dalam waktu "+r:r+" yang lalu":r},b2={full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"d/M/yyyy"},y2={full:"HH.mm.ss",long:"HH.mm.ss",medium:"HH.mm",short:"HH.mm"},x2={full:"{{date}} 'pukul' {{time}}",long:"{{date}} 'pukul' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k2={date:un({formats:b2,defaultWidth:"full"}),time:un({formats:y2,defaultWidth:"full"}),dateTime:un({formats:x2,defaultWidth:"full"})},w2={lastWeek:"eeee 'lalu pukul' p",yesterday:"'Kemarin pukul' p",today:"'Hari ini pukul' p",tomorrow:"'Besok pukul' p",nextWeek:"eeee 'pukul' p",other:"P"},C2=(e,o,n,r)=>w2[e],E2={narrow:["SM","M"],abbreviated:["SM","M"],wide:["Sebelum Masehi","Masehi"]},_2={narrow:["1","2","3","4"],abbreviated:["K1","K2","K3","K4"],wide:["Kuartal ke-1","Kuartal ke-2","Kuartal ke-3","Kuartal ke-4"]},B2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","Mei","Jun","Jul","Agt","Sep","Okt","Nov","Des"],wide:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"]},S2={narrow:["M","S","S","R","K","J","S"],short:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],abbreviated:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],wide:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},A2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},v2={narrow:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},abbreviated:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"},wide:{am:"AM",pm:"PM",midnight:"tengah malam",noon:"tengah hari",morning:"pagi",afternoon:"siang",evening:"sore",night:"malam"}},D2={ordinalNumber:(e,o)=>"ke-"+Number(e),era:Wt({values:E2,defaultWidth:"wide"}),quarter:Wt({values:_2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Wt({values:B2,defaultWidth:"wide"}),day:Wt({values:S2,defaultWidth:"wide"}),dayPeriod:Wt({values:A2,defaultWidth:"wide",formattingValues:v2,defaultFormattingWidth:"wide"})},N2=/^ke-(\d+)?/i,V2=/\d+/i,M2={narrow:/^(sm|m)/i,abbreviated:/^(s\.?\s?m\.?|s\.?\s?e\.?\s?u\.?|m\.?|e\.?\s?u\.?)/i,wide:/^(sebelum masehi|sebelum era umum|masehi|era umum)/i},T2={any:[/^s/i,/^(m|e)/i]},P2={narrow:/^[1234]/i,abbreviated:/^K-?\s[1234]/i,wide:/^Kuartal ke-?\s?[1234]/i},O2={any:[/1/i,/2/i,/3/i,/4/i]},R2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|mei|jun|jul|agt|sep|okt|nov|des)/i,wide:/^(januari|februari|maret|april|mei|juni|juli|agustus|september|oktober|november|desember)/i},L2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^ma/i,/^ap/i,/^me/i,/^jun/i,/^jul/i,/^ag/i,/^s/i,/^o/i,/^n/i,/^d/i]},I2={narrow:/^[srkjm]/i,short:/^(min|sen|sel|rab|kam|jum|sab)/i,abbreviated:/^(min|sen|sel|rab|kam|jum|sab)/i,wide:/^(minggu|senin|selasa|rabu|kamis|jumat|sabtu)/i},F2={narrow:[/^m/i,/^s/i,/^s/i,/^r/i,/^k/i,/^j/i,/^s/i],any:[/^m/i,/^sen/i,/^sel/i,/^r/i,/^k/i,/^j/i,/^sa/i]},z2={narrow:/^(a|p|tengah m|tengah h|(di(\swaktu)?) (pagi|siang|sore|malam))/i,any:/^([ap]\.?\s?m\.?|tengah malam|tengah hari|(di(\swaktu)?) (pagi|siang|sore|malam))/i},$2={any:{am:/^a/i,pm:/^pm/i,midnight:/^tengah m/i,noon:/^tengah h/i,morning:/pagi/i,afternoon:/siang/i,evening:/sore/i,night:/malam/i}},j2={ordinalNumber:Rf({matchPattern:N2,parsePattern:V2,valueCallback:e=>parseInt(e,10)}),era:Ht({matchPatterns:M2,defaultMatchWidth:"wide",parsePatterns:T2,defaultParseWidth:"any"}),quarter:Ht({matchPatterns:P2,defaultMatchWidth:"wide",parsePatterns:O2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ht({matchPatterns:R2,defaultMatchWidth:"wide",parsePatterns:L2,defaultParseWidth:"any"}),day:Ht({matchPatterns:I2,defaultMatchWidth:"wide",parsePatterns:F2,defaultParseWidth:"any"}),dayPeriod:Ht({matchPatterns:z2,defaultMatchWidth:"any",parsePatterns:$2,defaultParseWidth:"any"})},U2={code:"id",formatDistance:g2,formatLong:k2,formatRelative:C2,localize:D2,match:j2,options:{weekStartsOn:1,firstWeekContainsDate:1}},Lf={primary:{light:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"#bfdbfe"},dark:{primary:"hsl(var(--primary))",text:"hsl(var(--primary-foreground))",hover:"hsl(var(--accent))",border:"hsl(var(--border))",range:"rgba(30, 58, 138, 0.3)"}},emerald:{light:{primary:"#16a34a",text:"#ffffff",hover:"#dcfce7",border:"#16a34a",range:"#ecfdf5"},dark:{primary:"#22c55e",text:"#0b1220",hover:"#14532d",border:"#22c55e",range:"rgba(6, 78, 59, 0.3)"}},amber:{light:{primary:"#d97706",text:"#ffffff",hover:"#fffbeb",border:"#d97706",range:"#fffbeb"},dark:{primary:"#f59e0b",text:"#0b1220",hover:"#78350f",border:"#f59e0b",range:"rgba(120, 53, 15, 0.3)"}},violet:{light:{primary:"#7c3aed",text:"#ffffff",hover:"#f5f3ff",border:"#7c3aed",range:"#f5f3ff"},dark:{primary:"#8b5cf6",text:"#0b1220",hover:"#2e1065",border:"#8b5cf6",range:"rgba(46, 16, 101, 0.3)"}},destructive:{light:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.10)",border:"hsl(var(--destructive))",range:"#fef2f2"},dark:{primary:"hsl(var(--destructive))",text:"hsl(var(--destructive-foreground))",hover:"hsl(var(--destructive) / 0.18)",border:"hsl(var(--destructive))",range:"rgba(127, 29, 29, 0.3)"}}},If="dcode-dp-theme-forced";function W2(e,o=If){const n=Lf[e]??Lf.primary,r=`
|
|
42
42
|
.dp__theme_light {
|
|
43
43
|
--dp-primary-color: ${n.light.primary} !important;
|
|
44
44
|
--dp-primary-text-color: ${n.light.text} !important;
|
|
@@ -86,7 +86,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),F=P,T=R),j===void 0&&(
|
|
|
86
86
|
.dcode-datepicker-menu .dp__menu_inner {
|
|
87
87
|
padding: 0 !important;
|
|
88
88
|
}
|
|
89
|
-
`.trim();let a=document.getElementById(o);a||(a=document.createElement("style"),a.id=o,document.head.appendChild(a)),a.textContent=r}function H2(e,o=If){t.watch(e,n=>W2(n,o),{immediate:!0})}const q2={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},G2=["for"],K2={key:0,class:"ml-1 text-destructive"},X2=["disabled","onClick"],Y2={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},J2=["id","value","placeholder","disabled","onClick","onFocus","onBlur","onInput","onKeydown","onKeypress","onPaste"],Q2={class:"flex items-center justify-end gap-2 w-full p-2"},Z2=["disabled","onClick"],eC={key:1,class:"text-xs text-destructive"},sa=t.defineComponent({name:"DCodeDatePicker",inheritAttrs:!1,__name:"DCodeDatePicker",props:{modelValue:{},range:{type:Boolean,default:!1},autoRangeDays:{default:null},disablePast:{type:Boolean,default:!1},maxDaysAhead:{default:null},placeholder:{default:"Pilih tanggal"},label:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},displayFormat:{default:"dd/MM/yyyy"},modelType:{default:"yyyy-MM-dd"},locale:{default:"en"},placement:{default:"bottom-start"},prependInner:{default:void 0},error:{default:null},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=e,a=o,s=Math.random().toString(36).slice(2,7),i=t.computed(()=>`dcode-datepicker-${n.id||r.label||"date-picker"}-${s}`),l=t.computed(()=>{const k=n.required,v=n["aria-required"];return k===""||k===!0||k==="true"||v==="true"||v===!0}),c=t.computed(()=>!!r.error),d=t.computed({get:()=>r.modelValue,set:k=>{a("update:modelValue",k),a("change",k)}}),f=t.computed(()=>r.locale==="en"?m2:U2),u=t.computed(()=>r.range?2:!1),h=k=>{const v=new Date(k);return v.setHours(0,0,0,0),v},m=k=>{const v=new Date(k);return v.setHours(23,59,59,999),v},p=(k,v)=>{const S=new Date(k);return S.setDate(S.getDate()+v),S},y=t.computed(()=>{if(r.disablePast)return h(new Date)}),b=t.computed(()=>{if(r.maxDaysAhead&&r.maxDaysAhead>0)return m(p(new Date,r.maxDaysAhead))}),g=t.ref(null),_=t.ref(null),E=k=>{_.value={month:k.month,year:k.year}},B=t.ref(!1);let A=null;t.onMounted(()=>{const k=document.documentElement,v=()=>B.value=k.classList.contains("dark");v(),A=new MutationObserver(v),A.observe(k,{attributes:!0,attributeFilter:["class"]})}),t.onBeforeUnmount(()=>{A==null||A.disconnect(),A=null}),H2(t.toRef(r,"tone"));const C=k=>{const v=new Date(k),S=v.getDay(),N=v.getDate()-S+(S===0?-6:1);return v.setDate(N),h(v)},x=k=>{const v=C(k);return v.setDate(v.getDate()+6),m(v)},w=k=>{const v=new Date(k);return v.setDate(1),h(v)},D=k=>{const v=new Date(k);return v.setMonth(v.getMonth()+1),v.setDate(0),m(v)};return t.computed(()=>{if(!r.range)return[];const k=new Date,v=h(k),S=C(k),N=x(k),V=w(k),L=D(k),O=(P,R)=>{let j=P;r.disablePast&&j<v&&(j=v);let T=R;if(r.autoRangeDays&&r.autoRangeDays>0){const F=m(p(j,r.autoRangeDays-1));T>F&&(T=F)}return T<j&&(T=m(new Date(j))),[j,T]};return[{label:r.locale==="id"?"Minggu Ini":"This Week",range:O(S,N)},{label:r.locale==="id"?"Bulan Ini":"This Month",range:O(V,L)}]}),(k,v)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,r.disabled?"cursor-not-allowed":""]])},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",q2)):t.createCommentVNode("",!0),v[2]||(v[2]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),l.value?(t.openBlock(),t.createElementBlock("span",K2,"*")):t.createCommentVNode("",!0)],8,G2)):t.createCommentVNode("",!0),t.createVNode(t.unref(Pu.VueDatePicker),{ref_key:"dpRef",ref:g,modelValue:d.value,"onUpdate:modelValue":v[1]||(v[1]=S=>d.value=S),dark:B.value,range:e.range,"multi-calendars":u.value,"auto-range":e.autoRangeDays,"max-range":e.autoRangeDays,"partial-range":!1,disabled:e.disabled,clearable:!1,"text-input":"","enable-time-picker":!1,"time-config":{enableTimePicker:!1},"auto-apply":!1,"action-row":{showPreview:!0,showNow:!1},locale:f.value,"model-type":e.modelType,formats:{input:e.displayFormat},"min-date":y.value,"max-date":b.value,floating:{placement:e.placement,offset:8,arrow:!1,flip:!1,shift:!0},teleport:!0,"menu-class-name":"dcode-datepicker-menu","calendar-class-name":"dcode-datepicker-calendar",onUpdateMonthYear:E},{"dp-input":t.withCtx(({value:S,onInput:N,onEnter:V,onTab:L,onBlur:O,onFocus:P,onKeypress:R,onPaste:j,toggleMenu:T})=>[t.createElementVNode("div",{class:t.normalizeClass(["flex items-center w-full h-10 rounded-lg border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-neutral-400 dark:focus-within:ring-neutral-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600",[c.value?"border-destructive":"",e.disabled?"opacity-50 cursor-not-allowed":"",e.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""]])},[t.createElementVNode("button",{type:"button",tabindex:"-1",disabled:e.disabled||e.readonly,class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none",onClick:F=>!e.disabled&&!e.readonly&&T()},[t.createVNode(t.unref(ne.Calendar),{class:"w-4 h-4 pointer-events-none"})],8,X2),v[4]||(v[4]=t.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),e.prependInner?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",Y2,t.toDisplayString(e.prependInner),1),v[3]||(v[3]=t.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):t.createCommentVNode("",!0),t.createElementVNode("input",{id:i.value,value:S,placeholder:e.placeholder,disabled:e.disabled,autocomplete:"off",readonly:"",class:t.normalizeClass(["flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]),onClick:F=>!e.disabled&&!e.readonly&&T(),onFocus:F=>P(),onBlur:F=>O(),onInput:F=>N(F),onKeydown:[t.withKeys(F=>V(F),["enter"]),t.withKeys(F=>L(F),["tab"])],onKeypress:F=>R(F),onPaste:F=>j()},null,42,J2)],2)]),"action-buttons":t.withCtx(({selectDate:S,selectionDisabled:N})=>[t.createElementVNode("div",Q2,[t.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400",onClick:v[0]||(v[0]=V=>{var L;return(L=g.value)==null?void 0:L.closeMenu()})},t.toDisplayString(e.cancelLabel),1),t.createElementVNode("button",{type:"button",disabled:N,class:"inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400 disabled:pointer-events-none disabled:opacity-50",onClick:V=>S()},t.toDisplayString(e.selectLabel),9,Z2)])]),_:1},8,["modelValue","dark","range","multi-calendars","auto-range","max-range","disabled","locale","model-type","formats","min-date","max-date","floating"]),c.value?(t.openBlock(),t.createElementBlock("p",eC,t.toDisplayString(r.error),1)):t.createCommentVNode("",!0)],64))],2))}}),tC=t.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:o}){const n=e,r=o,a=_e.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(_e.DialogRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),oC=t.defineComponent({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(_e.DialogPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(_e.DialogOverlay),{class:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),t.createVNode(t.unref(_e.DialogContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Te)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default"),t.createVNode(t.unref(_e.DialogClose),{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.X),{class:"w-4 h-4"}),l[0]||(l[0]=t.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),nC=t.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.DialogDescription),t.mergeProps(t.unref(r),{class:t.unref(Te)("text-sm text-muted-foreground",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),rC=t.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.DialogTitle),t.mergeProps(t.unref(r),{class:t.unref(Te)("text-lg font-medium leading-none tracking-tight",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),aC={key:0,class:"px-6 py-4 flex items-center justify-between border-b border-neutral-200/60 dark:border-neutral-700/50 bg-white/80 dark:bg-neutral-900/30 backdrop-blur-md sticky top-0 z-20"},sC={class:"flex items-center gap-3"},iC={class:"flex flex-col"},lC={key:0,class:"flex items-center gap-2"},cC={key:1,class:"px-6 py-4 border-t border-neutral-200/60 dark:border-neutral-700/50 bg-neutral-50/50 dark:bg-neutral-900/30 sticky bottom-0 z-20"},dC={class:"flex justify-end gap-3 flex-wrap"},lo=ft(t.defineComponent({name:"DCodeDialog",inheritAttrs:!1,__name:"DCodeDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},icon:{default:""},maxWidth:{default:500},persistent:{type:Boolean,default:!0},contentClass:{default:"p-5"},contentStyle:{default:()=>({})},iconClass:{default:""}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.computed(()=>{const{style:d,...f}=a;return f}),i=t.computed(()=>({maxWidth:typeof n.maxWidth=="number"?`${n.maxWidth}px`:n.maxWidth,width:"100%"})),l=t.computed(()=>n.icon?Rt[n.icon]??null:null),c=d=>{r("update:modelValue",d)};return(d,f)=>(t.openBlock(),t.createBlock(t.unref(tC),{open:e.modelValue,"onUpdate:open":c},{default:t.withCtx(()=>[t.createVNode(t.unref(oC),t.mergeProps(s.value,{style:i.value,class:"p-0 overflow-hidden rounded-xl flex flex-col max-h-[90vh] bg-white dark:bg-neutral-800 border-0",onInteractOutside:f[0]||(f[0]=u=>e.persistent?u.preventDefault():null),onEscapeKeyDown:f[1]||(f[1]=u=>e.persistent?u.preventDefault():null)}),{default:t.withCtx(()=>[e.title||d.$slots["header-append"]?(t.openBlock(),t.createElementBlock("div",aC,[t.createElementVNode("div",sC,[l.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["p-2 rounded-lg",e.iconClass||"bg-primary/10 text-primary"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),{class:"h-5 w-5"}))],2)):t.createCommentVNode("",!0),t.createElementVNode("div",iC,[t.createVNode(t.unref(rC),{class:"text-lg font-bold text-neutral-900 dark:text-neutral-50 leading-tight"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),t.createVNode(t.unref(nC),{class:"hidden"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title||"Dialog Content"),1)]),_:1})])]),d.$slots["header-append"]?(t.openBlock(),t.createElementBlock("div",lC,[t.renderSlot(d.$slots,"header-append",{},void 0,!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["flex-1 overflow-y-auto custom-scrollbar",e.contentClass]),style:t.normalizeStyle(e.contentStyle)},[t.renderSlot(d.$slots,"default",{},void 0,!0)],6),d.$slots.actions?(t.openBlock(),t.createElementBlock("div",cC,[t.createElementVNode("div",dC,[t.renderSlot(d.$slots,"actions",{},void 0,!0)])])):t.createCommentVNode("",!0)]),_:3},16,["style"])]),_:3},8,["open"]))}}),[["__scopeId","data-v-52781e0f"]]),Wo=t.defineComponent({name:"DCodeLabel",inheritAttrs:!1,__name:"DCodeLabel",props:{label:{},text:{},textSize:{},textType:{},icon:{},iconClass:{}},setup(e){const o=t.useAttrs(),n=e,r=t.computed(()=>No(n.icon,Rt)),a=t.computed(()=>n.textSize?`text-${n.textSize}`:"text-xs"),s={xs:"w-3 h-3",sm:"w-3.5 h-3.5",base:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5","2xl":"w-6 h-6","3xl":"w-7 h-7","4xl":"w-8 h-8","5xl":"w-10 h-10","6xl":"w-12 h-12"},i=t.computed(()=>s[n.textSize??"xs"]??"w-3 h-3"),l=t.computed(()=>n.textType==="BOLD"?"font-bold":n.textType==="ITALIC"?"italic font-normal":"font-normal"),c=t.computed(()=>{const f=`${a.value} ${l.value} text-zinc-700 dark:text-zinc-400 ml-1 inline-flex items-center gap-1`,u=o.class??"";return[f,u].filter(Boolean).join(" ")}),d=t.computed(()=>{const{class:f,...u}=o;return u});return(f,u)=>(t.openBlock(),t.createElementBlock("span",t.mergeProps({class:c.value},d.value),[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:t.normalizeClass(["shrink-0",i.value,e.iconClass])},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.label||e.text),1)],16))}}),fC={class:"flex flex-col gap-3 w-full"},uC={key:0,class:"col-span-full flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-dashed border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70 pointer-events-none animate-pulse"},hC={class:"flex flex-col items-center justify-center gap-2 py-6 rounded-lg border border-dashed border-slate-300 dark:border-neutral-700/50 bg-slate-50 dark:bg-neutral-900/30 text-slate-400"},mC={key:1,class:"col-span-full flex flex-col items-center justify-center text-center gap-2 px-3 py-8 bg-slate-50 dark:bg-neutral-900/10 border border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70"},pC={class:"text-sm font-medium text-slate-500"},gC={class:"flex items-center justify-between gap-2"},bC=["onClick"],yC={key:0,class:"flex items-center gap-3 px-3 py-2 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md"},xC={class:"text-xs text-green-700 dark:text-green-400 flex-1 truncate"},kC=["onClick"],wC=["for","onDrop"],CC={class:"text-xs text-slate-500 dark:text-slate-400"},_C={key:2,class:"text-xs text-slate-400"},EC=["id","disabled","accept","onChange"],BC={class:"flex flex-col items-center justify-center min-h-[300px]"},SC=["src","alt"],AC=["src"],vC={key:2,class:"flex flex-col items-center gap-4 py-12 text-slate-400"},DC={class:"text-sm font-medium"},NC=["href"],ei=t.defineComponent({__name:"DCodeDynamicUploadList",props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:""},labelID:{type:String,default:"Documents"},labelEN:{type:String,default:"Documents"},endpoint:{type:Object,default:()=>null},endpointReference:{type:Object,default:()=>null},itemTitle:{type:String,default:"name"},itemValue:{type:String,default:"id"},disabled:Boolean,required:Boolean,typeFile:{type:String,default:void 0},sizeFile:{type:Number,default:void 0},items:{type:Array,default:void 0},baseUrl:{type:String,default:void 0}},emits:["update:modelValue","uploaded","success"],setup(e,{emit:o}){const n=e,r=o,{t:a,locale:s}=Et.useI18n(),i=t.computed(()=>{const C=n.endpoint;if(!(C!=null&&C.apiUrl))return null;let x=C.apiUrl;if(!x.startsWith("http")&&n.baseUrl){const w=n.baseUrl.replace(/\/$/,""),D=x.startsWith("/")?x:`/${x}`;x=`${w}${D}`}return x}),l=t.computed(()=>{const C=c.value.length;return C<=1?"grid-cols-1":C===2?"grid-cols-1 md:grid-cols-2":C===3?"grid-cols-1 md:grid-cols-3 xl:grid-cols-4":C===4?"grid-cols-1 md:grid-cols-2 lg:grid-cols-3":"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}),c=t.ref([]),d=t.ref([]),f=t.ref(new Set),u=t.ref(!0),h=t.ref(!1),m=t.ref(""),p=t.ref(""),y=t.ref(""),b=async()=>{var C;if(u.value=!0,n.items!==void 0){c.value=n.items,u.value=!1;return}if(!((C=n.endpointReference)!=null&&C.apiUrl)){u.value=!1;return}try{const{apiUrl:x}=Je(),w=await x(n.endpointReference.apiUrl,n.endpointReference.apiMethod||"GET",{page:1,perPage:100});if(n.items!==void 0){u.value=!1;return}let D=(w==null?void 0:w.data)||w;Array.isArray(D)||(D=[D]),c.value=D}catch(x){console.error("Failed to fetch dynamic document list",x)}finally{u.value=!1}};t.onMounted(()=>{Array.isArray(n.modelValue)&&n.modelValue.length>0&&(d.value=JSON.parse(JSON.stringify(n.modelValue))),b()}),t.onBeforeUnmount(()=>{d.value.forEach(C=>{C._localPreviewUrl&&URL.revokeObjectURL(C._localPreviewUrl)})}),t.watch(()=>n.modelValue,C=>{if(Array.isArray(C)&&JSON.stringify(C)!==JSON.stringify(d.value)){const x=JSON.parse(JSON.stringify(C));x.forEach(w=>{const D=d.value.find(k=>k.typeDocument===w.typeDocument||k.idDocumentType===w.idDocumentType);D!=null&&D._localPreviewUrl&&(w._localPreviewUrl=D._localPreviewUrl)}),d.value=x}},{deep:!0}),t.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiUrl},(C,x)=>{C!==x&&b()}),t.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiMethod},(C,x)=>{C!==x&&b()}),t.watch(()=>n.items,C=>{c.value=C??[],u.value=!1},{deep:!0,immediate:!0});const g=C=>{const x=C[n.itemValue]||C.id||C.typeDocument;return d.value.find(w=>w.typeDocument===x||w.idDocumentType===x||w[n.itemValue]===x)||null},_=async(C,x,w)=>{var N,V,L,O;const D=w.target,k=(N=D.files)==null?void 0:N[0];if(!k)return;const v=C[n.itemValue]||C.id||C.typeDocument,S=URL.createObjectURL(k);if(!i.value){const P=[...d.value],R=P.findIndex(T=>T.typeDocument===v||T.idDocumentType===v);(V=P[R])!=null&&V._localPreviewUrl&&URL.revokeObjectURL(P[R]._localPreviewUrl);const j={id:null,idDocument:null,idDocumentType:v,filename:k.name,document:v,documentUrl:k.name,typeDocument:v,_localPreviewUrl:S,_fileType:k.type};R>-1?P[R]={...P[R],...j}:P.push(j),d.value=P,r("update:modelValue",P);return}f.value.add(x);try{const{apiUrl:P}=Je(),R=new FormData;R.append("doc",k),R.append("typeDocument",String(v));const j=await P(i.value,((L=n.endpoint)==null?void 0:L.apiMethod)||"POST",R),T=Array.isArray(j==null?void 0:j.data)?j.data[0]:(j==null?void 0:j.data)||j,F=(T==null?void 0:T.url)||(T==null?void 0:T.document)||k.name,X=(T==null?void 0:T.id)||null,H=(T==null?void 0:T.filename)||(T==null?void 0:T.name)||k.name,W=[...d.value],Z=W.findIndex(ye=>ye.typeDocument===v||ye.idDocumentType===v);(O=W[Z])!=null&&O._localPreviewUrl&&URL.revokeObjectURL(W[Z]._localPreviewUrl);const oe={...T,id:X||(T==null?void 0:T.idDocument)||(T==null?void 0:T.id_document)||null,idDocument:(T==null?void 0:T.idDocument)||X||(T==null?void 0:T.id_document)||null,idDocumentType:v,filename:H,document:v,documentUrl:F,typeDocument:v,_localPreviewUrl:S,_fileType:k.type};Z>-1?W[Z]={...W[Z],...oe}:W.push(oe),d.value=W,r("update:modelValue",W),r("uploaded",T),r("success",T)}catch(P){console.error("Upload failed",P)}finally{f.value.delete(x),D.value=""}},E=C=>{const x=C[n.itemValue]||C.id||C.typeDocument,w=d.value.find(k=>k.typeDocument===x||k.idDocumentType===x);w!=null&&w._localPreviewUrl&&URL.revokeObjectURL(w._localPreviewUrl);const D=d.value.filter(k=>k.typeDocument!==x&&k.idDocumentType!==x);d.value=D,r("update:modelValue",D)},B=C=>{const x=g(C);if(!x)return;let w=x._localPreviewUrl;if(!w)if(x.server&&x.url){const v=x.server.replace(/\/+$/,""),S=x.url.replace(/^\/+/,"");w=`${v}/${S}`}else w=x.document||x.url;if(!w)return;const D=x.mime||x._fileType||"",k=D==="application/pdf"||w.toLowerCase().endsWith(".pdf");k&&!w.includes("#")&&(w+="#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"),m.value=w,p.value=C[n.itemTitle]||C.name||x.filename||"Preview Document",y.value=D||(k?"application/pdf":"image/jpeg"),h.value=!0},A=(C,x,w)=>{var v,S;w.preventDefault();const D=(S=(v=w.dataTransfer)==null?void 0:v.files)==null?void 0:S[0];if(!D)return;_(C,x,{target:{files:[D],value:""}})};return(C,x)=>(t.openBlock(),t.createElementBlock("div",fC,[e.label||e.labelID||e.labelEN?(t.openBlock(),t.createBlock(Wo,{key:0,text:e.label||(t.unref(s).toLowerCase().startsWith("en")?e.labelEN:e.labelID),class:"font-semibold text-sm text-slate-700 dark:text-slate-300",required:e.required},null,8,["text","required"])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["w-full grid gap-4",l.value])},[c.value.length===0&&u.value?(t.openBlock(),t.createElementBlock("div",uC,[t.createVNode(Wo,{text:t.unref(a)("dynamicUploadList.loadingDocs"),class:"font-semibold text-sm text-slate-700 dark:text-neutral-300"},null,8,["text"]),t.createElementVNode("div",hC,[t.createVNode(t.unref(ne.Loader2),{class:"w-6 h-6 animate-spin"})])])):c.value.length===0&&!u.value?(t.openBlock(),t.createElementBlock("div",mC,[t.createVNode(t.unref(ne.CheckCircle2),{class:"w-6 h-6 text-slate-400"}),t.createElementVNode("span",pC,t.toDisplayString(t.unref(a)("dynamicUploadList.noDocsRequired")),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(w,D)=>{var k;return t.openBlock(),t.createElementBlock("div",{key:D,class:"flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-slate-200 dark:border-neutral-700/50 rounded-lg shadow-sm"},[t.createElementVNode("div",gC,[t.createVNode(Wo,{text:w[e.itemTitle]||w.name||w.filename||"Upload Document",class:"font-semibold text-sm text-slate-700 dark:text-neutral-300 truncate flex-1"},null,8,["text"]),g(w)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-slate-100 dark:hover:bg-zinc-700 rounded transition-colors text-slate-400 hover:text-primary-500",onClick:v=>B(w)},[t.createVNode(t.unref(ne.Eye),{class:"w-4 h-4"})],8,bC)):t.createCommentVNode("",!0)]),g(w)?(t.openBlock(),t.createElementBlock("div",yC,[t.createVNode(t.unref(ne.CheckCircle2),{class:"w-4 h-4 text-green-600 shrink-0"}),t.createElementVNode("span",xC,t.toDisplayString(((k=g(w))==null?void 0:k.filename)||t.unref(a)("dynamicUploadList.fileUploaded")),1),e.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"text-red-400 hover:text-red-600 transition-colors",onClick:v=>E(w)},[t.createVNode(t.unref(ne.X),{class:"w-4 h-4"})],8,kC))])):(t.openBlock(),t.createElementBlock("label",{key:1,for:`dyn-upload-input-${D}`,class:t.normalizeClass(["flex flex-col items-center justify-center gap-2 py-8 rounded-lg border-2 border-dashed transition-colors cursor-pointer",[e.disabled?"border-slate-200 bg-slate-50 cursor-not-allowed opacity-60":"border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-800 hover:border-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/10",f.value.has(D)?"pointer-events-none opacity-70":""]]),onDragover:x[0]||(x[0]=t.withModifiers(()=>{},["prevent"])),onDrop:v=>!e.disabled&&!f.value.has(D)&&A(w,D,v)},[f.value.has(D)?(t.openBlock(),t.createBlock(t.unref(ne.Loader2),{key:0,class:"w-6 h-6 animate-spin text-primary-500"})):(t.openBlock(),t.createBlock(t.unref(ne.Upload),{key:1,class:"w-6 h-6 text-slate-400"})),t.createElementVNode("span",CC,t.toDisplayString(f.value.has(D)?t.unref(a)("dynamicUploadList.uploading"):t.unref(a)("dynamicUploadList.clickOrDrag")),1),e.typeFile?(t.openBlock(),t.createElementBlock("span",_C,t.toDisplayString(e.typeFile),1)):t.createCommentVNode("",!0),t.createElementVNode("input",{id:`dyn-upload-input-${D}`,type:"file",class:"sr-only",disabled:e.disabled||f.value.has(D),accept:e.typeFile,onChange:v=>_(w,D,v)},null,40,EC)],42,wC))])}),128))],2),t.createVNode(lo,{modelValue:h.value,"onUpdate:modelValue":x[2]||(x[2]=w=>h.value=w),title:p.value,"max-width":y.value==="application/pdf"?"720":"500",class:t.normalizeClass(y.value==="application/pdf"?"max-w-[40vw]":""),"content-class":y.value==="application/pdf"?"p-0 overflow-hidden":"px-6 py-1 overflow-y-auto"},{actions:t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"px-4 py-2 border border-slate-200 dark:border-zinc-700 rounded-md text-sm font-medium hover:bg-slate-50 dark:hover:bg-zinc-800 transition-colors",onClick:x[1]||(x[1]=w=>h.value=!1)},t.toDisplayString(t.unref(a)("common.close")||"Close"),1)]),default:t.withCtx(()=>[t.createElementVNode("div",BC,[y.value.startsWith("image/")?(t.openBlock(),t.createElementBlock("img",{key:0,src:m.value,alt:p.value,class:"w-full h-auto max-h-[72vh] object-contain rounded-lg shadow-md"},null,8,SC)):y.value==="application/pdf"?(t.openBlock(),t.createElementBlock("iframe",{key:1,src:`${m.value}${m.value.includes("#")?"":"#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"}`,class:"w-full h-[70vh] rounded-lg border border-slate-200",title:"Document Preview"},null,8,AC)):(t.openBlock(),t.createElementBlock("div",vC,[t.createVNode(t.unref(ne.FileText),{class:"w-16 h-16 stroke-1"}),t.createElementVNode("span",DC,t.toDisplayString(t.unref(a)("dynamicUploadList.noSupportPreview")||"Preview not supported for this file type"),1),t.createElementVNode("a",{href:m.value,target:"_blank",class:"px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-semibold hover:bg-primary-600 transition-colors"},t.toDisplayString(t.unref(a)("dynamicUploadList.viewOriginal")||"View Original"),9,NC)]))])]),_:1},8,["modelValue","title","max-width","class","content-class"])]))}}),Ff=t.defineComponent({name:"DCodeDialogCloseBtn",__name:"DCodeDialogCloseBtn",props:{icon:{default:"X"},iconSize:{default:22}},setup(e){const o=e,n=t.computed(()=>Rt[o.icon]??Rt.X);return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Pt),{type:"button",variant:"secondary",size:"icon",class:"rounded-full shadow-sm"},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.value),{size:Number(e.iconSize)},null,8,["size"]))]),_:1}))}}),VC=t.defineComponent({__name:"Alert",props:{class:{type:[Boolean,null,String,Object,Array]},variant:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)(t.unref(TC)({variant:e.variant}),o.class)),role:"alert"},[t.renderSlot(n.$slots,"default")],2))}}),MC=t.defineComponent({__name:"AlertDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("text-sm [&_p]:leading-relaxed",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),TC=yr("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ti=t.defineComponent({__name:"Badge",props:{variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)(t.unref(PC)({variant:e.variant}),o.class))},[t.renderSlot(n.$slots,"default")],2))}}),PC=yr("inline-flex gap-1 items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),oi=t.defineComponent({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("rounded-xl border bg-card text-card-foreground shadow",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),ni=t.defineComponent({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("p-6 pt-0",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),ri=t.defineComponent({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("flex flex-col gap-y-1.5 p-6",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),ai=t.defineComponent({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("h3",{class:t.normalizeClass(t.unref(Te)("font-medium leading-none tracking-tight",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),OC={class:"h-full w-full p-6 flex flex-col items-center justify-center text-center gap-2"},LC={class:"flex flex-wrap items-center justify-center gap-2"},RC=["accept","multiple"],ia=ft(t.defineComponent({name:"DCodeDropzone",__name:"DCodeDropzone",props:{label:{default:"Upload File"},hint:{default:"Drag & drop file di sini atau klik area ini"},accept:{default:"*/*"},maxSizeMb:{default:2},mode:{default:"single"},disabled:{type:Boolean,default:!1},showSelected:{type:Boolean,default:!0},error:{default:null}},emits:["picked","picked:multiple","error"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null),s=t.ref(!1),i=t.ref(null),l=t.ref(null),c=t.ref(null);t.computed(()=>n.accept||"file/*");const d=t.computed(()=>n.error??i.value);function f(){var x;n.disabled||(x=a.value)==null||x.click()}function u(x){const w=x/1024,D=w/1024;return D>=1?`${D.toFixed(2)} MB`:w>=1?`${w.toFixed(1)} KB`:`${x} B`}function h(x){var D;if(!x)return"File tidak valid";if((D=n.accept)!=null&&D.includes("image/")&&!x.type.startsWith("image/"))return"Hanya file gambar yang diizinkan";const w=(n.maxSizeMb??2)*1024*1024;return x.size>w?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null}function m(x){l.value=x.name,c.value=x.size}function p(x){if(i.value=null,!x.length)return;if(n.mode==="single"){const D=x[0],k=h(D);if(k){i.value=k,r("error",k);return}n.showSelected&&m(D),r("picked",D);return}const w=[];for(const D of x){const k=h(D);if(k){i.value=k,r("error",k);return}w.push(D)}w.length&&(n.showSelected&&m(w[0]),r("picked:multiple",w))}function y(x){const w=x.target,D=Array.from(w.files??[]);p(D),w.value=""}function b(){n.disabled||(s.value=!0)}function g(){n.disabled||(s.value=!0)}function _(){s.value=!1}function E(x){var k,v;if(n.disabled)return;s.value=!1;const w=Array.from(((k=x.dataTransfer)==null?void 0:k.files)??[]),D=(v=n.accept)!=null&&v.includes("image/")?w.filter(S=>S.type.startsWith("image/")):w;p(D)}const B=t.computed(()=>(n.accept||"file/*").split(",").map(x=>x.trim()).filter(Boolean).map(x=>x==="image/*"?"IMAGE":x.replace(/^image\//,"").replace(/^\./,"")).join(", "));t.computed(()=>`${n.maxSizeMb??0}MB`);const A=t.ref(!1),C=t.computed(()=>{if(n.disabled||!A.value)return{};const x=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark");return{borderColor:x?"hsl(var(--primary) / 0.5)":"hsl(var(--primary) / 0.6)",backgroundColor:x?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"}});return(x,w)=>(t.openBlock(),t.createBlock(t.unref(oi),{class:t.normalizeClass([e.disabled?"opacity-60":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(t.unref(ri),{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(t.unref(ai),{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})]),_:1}),t.createVNode(t.unref(ni),{class:"pt-2"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["d-dropzone-area flex justify-center items-center rounded-xl border-2 border-dashed transition cursor-pointer select-none",[s.value?"is-dragging border-primary bg-primary/10 dark:bg-primary/20 -translate-y-[1px]":"border-border dark:border-neutral-700 bg-muted/30 dark:bg-neutral-800/50",e.disabled?"is-disabled":""]]),style:t.normalizeStyle([{minHeight:"190px"},C.value]),onClick:f,onDragenter:t.withModifiers(b,["prevent"]),onDragover:t.withModifiers(g,["prevent"]),onDragleave:t.withModifiers(_,["prevent"]),onDrop:t.withModifiers(E,["prevent"]),onMouseenter:w[0]||(w[0]=D=>A.value=!0),onMouseleave:w[1]||(w[1]=D=>A.value=!1)},[t.createElementVNode("div",OC,[w[2]||(w[2]=t.createElementVNode("div",{class:"text-sm font-medium dark:text-neutral-200"},"Drag & drop file di sini",-1)),w[3]||(w[3]=t.createElementVNode("div",{class:"text-xs text-muted-foreground dark:text-neutral-400"},"atau klik area ini untuk memilih file",-1)),t.createElementVNode("div",LC,[t.createVNode(t.unref(ti),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(" Allowed: "+t.toDisplayString(B.value),1)]),_:1}),t.createVNode(t.unref(ti),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(" Max: "+t.toDisplayString(n.maxSizeMb)+"MB ",1)]),_:1})]),e.showSelected&&l.value?(t.openBlock(),t.createBlock(t.unref(ti),{key:0,variant:"secondary",class:"mt-2 dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.value)+" • "+t.toDisplayString(c.value?u(c.value):""),1)]),_:1})):t.createCommentVNode("",!0)]),t.createElementVNode("input",{ref_key:"fileInputEl",ref:a,type:"file",class:"hidden",accept:e.accept,multiple:e.mode==="multiple",onChange:y},null,40,RC)],38),d.value?(t.openBlock(),t.createBlock(t.unref(VC),{key:0,variant:"destructive",class:"mt-3"},{default:t.withCtx(()=>[t.createVNode(t.unref(MC),{class:"text-sm"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.value),1)]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["class"]))}}),[["__scopeId","data-v-d8943808"]]),IC={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},FC=["src"],zC={key:1,class:"h-full w-full flex flex-col items-center justify-center text-muted-foreground dark:text-neutral-400 gap-2 p-4 text-center"},$C={class:"space-y-0.5"},jC={class:"text-sm font-medium truncate max-w-[180px] dark:text-neutral-200"},UC={class:"text-xs opacity-70"},WC=["disabled"],HC={key:1},qC=["disabled"],GC={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},KC={class:"flex gap-2"},XC={class:"font-medium truncate"},YC={class:"flex gap-2"},JC={class:"font-medium"},QC={class:"flex gap-2"},ZC={class:"font-medium truncate"},si=ft(t.defineComponent({name:"DCodeFileResult",__name:"DCodeFileResult",props:{file:{},title:{default:"File Terpilih"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0},forceFileIcon:{type:Boolean,default:!1}},emits:["edit","replace","remove"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null),s=t.computed(()=>n.forceFileIcon||!n.file?!1:(n.file.type||"").startsWith("image/"));t.watch(()=>n.file,m=>{a.value&&URL.revokeObjectURL(a.value),a.value=m?URL.createObjectURL(m):null},{immediate:!0}),t.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),f&&f.disconnect()});function i(m){const p=m/1024,y=p/1024;return y>=1?`${y.toFixed(2)} MB`:p>=1?`${p.toFixed(1)} KB`:`${m} B`}const l=t.computed(()=>n.file?{name:n.file.name,size:i(n.file.size),type:n.file.type||"unknown"}:null),c=t.ref(!1),d=t.ref(!1);let f=null;const u=()=>{typeof document<"u"&&(d.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{u(),typeof document<"u"&&(f=new MutationObserver(u),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),f.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const h=t.computed(()=>n.disabled||!c.value?{}:{borderColor:d.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:d.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(m,p)=>e.file?(t.openBlock(),t.createBlock(oi,{key:0,class:t.normalizeClass([e.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(ri,{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(ai,{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),e.description?(t.openBlock(),t.createElementBlock("div",IC,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),_:1}),t.createVNode(ni,{class:"pt-2"},{default:t.withCtx(()=>{var y,b,g,_,E;return[t.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:t.normalizeStyle([{height:`${e.previewHeight}px`},h.value]),onMouseenter:p[2]||(p[2]=B=>c.value=!0),onMouseleave:p[3]||(p[3]=B=>c.value=!1)},[s.value&&a.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,FC)):(t.openBlock(),t.createElementBlock("div",zC,[t.createVNode(t.unref(ne.FileText),{class:"w-10 h-10"}),t.createElementVNode("div",$C,[t.createElementVNode("p",jC,t.toDisplayString((y=l.value)==null?void 0:y.name),1),t.createElementVNode("p",UC,t.toDisplayString((b=l.value)==null?void 0:b.size),1)])])),t.createElementVNode("div",{class:"d-action-buttons",style:t.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:c.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:c.value?"auto":"none"})},[e.showEdit&&s.value?(t.openBlock(),t.createElementBlock("button",{key:0,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[0]||(p[0]=B=>r("edit"))},[t.createVNode(t.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,WC)):(t.openBlock(),t.createElementBlock("div",HC)),e.showRemove?(t.openBlock(),t.createElementBlock("button",{key:2,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[1]||(p[1]=B=>r("remove"))},[t.createVNode(t.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,qC)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"d-metadata-overlay",style:t.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:c.value?1:0,transform:c.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:d.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:d.value?"#e5e5e5":"#171717"})},[t.createElementVNode("div",GC,[t.createElementVNode("div",KC,[p[4]||(p[4]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),t.createElementVNode("span",XC,t.toDisplayString((g=l.value)==null?void 0:g.name),1)]),t.createElementVNode("div",YC,[p[5]||(p[5]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),t.createElementVNode("span",JC,t.toDisplayString((_=l.value)==null?void 0:_.size),1)]),t.createElementVNode("div",QC,[p[6]||(p[6]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),t.createElementVNode("span",ZC,t.toDisplayString((E=l.value)==null?void 0:E.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-bb5c9599"]]);function ii(){const e=s=>{var c;const i={type:s.type||"info",title:s.title,message:s.message,duration:s.duration??3e3};typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:toast",{detail:i,bubbles:!0,composed:!0})),(i.type==="error"?console.error:i.type==="warning"?console.warn:console.log)(`[Toast][${(c=i.type)==null?void 0:c.toUpperCase()}]`,i.title||"",i.message)};return{show:e,success:(s,i)=>e({type:"success",message:s,title:i}),error:(s,i)=>e({type:"error",message:s,title:i}),warning:(s,i)=>e({type:"warning",message:s,title:i}),info:(s,i)=>e({type:"info",message:s,title:i})}}const e_={class:"space-y-3"},t_={key:1,class:"flex items-center justify-center p-6 border rounded-lg bg-muted/30 dark:bg-neutral-800/20 dark:border-neutral-800"},zf=t.defineComponent({name:"DCodeFileField",inheritAttrs:!1,__name:"DCodeFileField",props:{modelValue:{default:null},label:{default:"Upload File"},hint:{},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:void 0},allowedTypes:{default:null},accept:{default:"*/*"},minSizeMb:{default:null},maxSizeMb:{default:1},endpoint:{},uploadFn:{}},emits:["update:modelValue","error","uploaded"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:C=>r("update:modelValue",C)}),s=t.ref(null),i=t.ref(null);function l(C){i.value=C,r("error",C)}function c(){i.value=null}const d=t.computed(()=>{const C=(n.allowedTypes??"").trim();return C?C.split(/[,\s;]+/g).map(w=>w.trim().toLowerCase()).filter(Boolean).map(w=>w.includes("/")||w.startsWith(".")?w:`.${w}`):[]});function f(C){const x=C.lastIndexOf(".");return x>=0?C.slice(x).toLowerCase():""}const u=t.computed(()=>{if(d.value.length){const C=d.value.filter(w=>w.startsWith("."));return[...d.value.filter(w=>w.includes("/")),...C].join(",")}return n.accept}),h=t.computed(()=>d.value.length?d.value.join(", "):n.accept||"Semua File");function m(C){if(d.value.length){const x=(C.type||"").toLowerCase(),w=f(C.name);return d.value.some(D=>D.includes("/")?x===D:D.startsWith(".")?w===D:w===`.${D}`)}if(n.accept){if(n.accept==="*/*")return!0;const x=n.accept.split(",").map(k=>k.trim().toLowerCase()),w=(C.type||"").toLowerCase(),D=f(C.name);return x.some(k=>{if(k.endsWith("/*")){const v=k.slice(0,-2);return w.startsWith(v)}return k.startsWith(".")?D===k:w===k})}return!0}function p(C){return C*1024*1024}async function y(C){return C?m(C)?n.minSizeMb!=null&&C.size<p(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&C.size>p(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null:`File Type not allowed. Allowed: ${h.value}`:"File tidak valid"}const{DCodeApi:b}=Je(),g=ii(),_=t.ref(!1);async function E(C){var x;if(n.uploadFn){try{_.value=!0;const w=await n.uploadFn(C);a.value=C,r("uploaded",w)}catch(w){console.error("Upload Error",w),g.error("Upload Failed",(w==null?void 0:w.message)||"Unknown error"),l((w==null?void 0:w.message)||"Upload Failed")}finally{_.value=!1}return}if(!((x=n.endpoint)!=null&&x.apiUrl)){a.value=C;return}if(typeof b!="function"){l("useApi() must expose DCodeApi()");return}try{_.value=!0;const w=new FormData;w.append("doc",C);const D=(n.endpoint.apiMethod||"POST").toUpperCase(),k=n.endpoint.apiUrl,v=await b("","",w,{_url:k,_method:D,withCredentials:!0,transformRequest:[(N,V)=>(V&&(delete V["Content-Type"],delete V["content-type"]),N)]}),S=(v==null?void 0:v.data)??v;a.value=C,r("uploaded",S)}catch(w){console.error("Upload Error",w),g.error("Upload Failed",(w==null?void 0:w.message)||"Unknown error"),l((w==null?void 0:w.message)||"Upload Failed")}finally{_.value=!1}}async function B(C){var w;if(n.disabled)return;c();const x=await y(C);if(x){l(x);return}s.value=C,n.uploadFn||(w=n.endpoint)!=null&&w.apiUrl?await E(C):a.value=C}function A(){c(),a.value=null,s.value=null}return t.watch(()=>n.modelValue,C=>{C&&!s.value&&(s.value=C),C||(s.value=null)},{immediate:!0}),(C,x)=>(t.openBlock(),t.createElementBlock("div",e_,[a.value?_.value?(t.openBlock(),t.createElementBlock("div",t_,[...x[1]||(x[1]=[t.createElementVNode("span",{class:"text-sm text-muted-foreground dark:text-neutral-400 animate-pulse"},"Uploading...",-1)])])):(t.openBlock(),t.createBlock(si,{key:2,file:a.value,title:e.label,description:e.hint,disabled:e.disabled,"show-edit":!1,"show-replace":!1,"show-remove":!0,"force-file-icon":!0,"preview-height":e.previewHeight,"preview-width":e.previewWidth,onRemove:A},null,8,["file","title","description","disabled","preview-height","preview-width"])):(t.openBlock(),t.createBlock(ia,{key:0,label:e.label,hint:e.hint,accept:u.value,maxSizeMb:e.maxSizeMb,disabled:e.disabled||_.value,onPicked:B,error:i.value,onError:x[0]||(x[0]=w=>l(w))},null,8,["label","hint","accept","maxSizeMb","disabled","error"]))]))}}),o_=["for"],n_={key:0,class:"!ml-1 !text-destructive"},r_={class:"relative w-full block box-border"},a_={key:0,class:"absolute inset-y-0 left-3 flex items-center text-muted-foreground pointer-events-none z-10"},s_=["id","readonly","disabled","placeholder"],i_={class:"absolute inset-y-0 right-4 flex items-center z-10"},l_={key:1,class:"absolute z-50 mt-1 w-full rounded-xl border bg-white dark:bg-neutral-800 border-neutral-200/60 dark:border-neutral-700/50 shadow-lg box-border"},c_={key:0,class:"flex items-center justify-center py-10 text-muted-foreground gap-2"},d_={key:1,class:"text-sm text-muted-foreground text-center"},f_=["onClick","title"],u_={class:"flex flex-col items-center justify-between gap-2 py-1 min-h-[72px]"},h_={class:"flex items-center justify-center flex-1"},m_={class:"text-[10px] leading-tight text-muted-foreground truncate w-full text-center block flex-shrink-0"},p_={key:3,class:"pt-2 text-[11px] text-muted-foreground text-center"},$f=t.defineComponent({name:"DCodeIconDropdown",__name:"DCodeIconDropdown",props:{modelValue:{},label:{},placeholder:{default:"Pilih icon…"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},columns:{default:4},maxHeight:{default:"335px"},iconSize:{default:20},pageSize:{default:120}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=e,r=o,a=Rt,s=t.ref(null),i=t.ref(null),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`dcode-icon-dropdown-${n.label||"icon-dropdown"}-${l}`),d=t.ref(!1),f=t.computed(()=>(n.modelValue??"").trim()||""),u=t.ref(""),h=t.ref(!1),m=t.ref(!1),p=t.ref(!1),y=t.shallowRef([]),b=t.ref(n.pageSize),g=new Set(["default","createLucideIcon","LucideIcon","Icon","icons","toKebabCase","camelCase","children","IconNode"]),_=async()=>{if(m.value||p.value)return;p.value=!0,await new Promise(F=>setTimeout(F,0));const T=Object.keys(a).filter(F=>!g.has(F)).filter(F=>/^[A-Z]/.test(F)).filter(F=>typeof a[F]=="function"||typeof a[F]=="object"&&a[F]).sort((F,X)=>F.localeCompare(X));y.value=T,m.value=!0,p.value=!1},E=t.computed(()=>f.value?No(f.value,a):null),B=t.ref(f.value),A=t.computed(()=>!!f.value&&!d.value),C=t.computed(()=>{if(!m.value)return[];const T=(u.value??"").trim().toLowerCase();return T?y.value.filter(F=>F.toLowerCase().includes(T)):y.value}),x=t.computed(()=>C.value.slice(0,b.value)),w=t.computed(()=>{const T=n.columns;return T<=2?"grid-cols-2":T===3?"grid-cols-3":T===4?"grid-cols-4":T===5?"grid-cols-5":T>=8?"grid-cols-8":"grid-cols-6"});t.computed(()=>n.clearable?"!pr-10":"!pr-3"),t.computed(()=>E.value&&!d.value?"!pl-12":"!pl-3");const D=async()=>{var T;await t.nextTick(),(T=i.value)==null||T.focus()},k=async T=>{if(n.disabled)return;const F=T!==!1;if(h.value){h.value=!1;return}d.value=!0,await _(),F&&(u.value="",B.value=""),b.value=n.pageSize,await D()},v=()=>{d.value=!1,u.value="",B.value=f.value,b.value=n.pageSize},S=async()=>{n.disabled||(d.value?v():await k())};let N=null;const V=async T=>{if(n.disabled)return;r("update:modelValue",null),d.value||await k(!1),N&&clearTimeout(N);const F=B.value;N=setTimeout(()=>{u.value=F},300)},L=T=>{n.disabled||(r("update:modelValue",T),v(),queueMicrotask(()=>{var F;return(F=i.value)==null?void 0:F.blur()}))},O=()=>{n.disabled||(r("update:modelValue",null),r("clear"),h.value=!0,v(),queueMicrotask(()=>{var T;return(T=i.value)==null?void 0:T.focus()}))},P=T=>{if(T.key==="Escape"){T.preventDefault(),v();return}if(T.key==="Enter"&&d.value){const F=C.value[0];F&&(T.preventDefault(),L(F))}},R=T=>{if(!d.value)return;const F=T.target;s.value&&!s.value.contains(F)&&v()},j=T=>{const F=T.target;F.scrollTop+F.clientHeight>=F.scrollHeight-24&&b.value<C.value.length&&(b.value=Math.min(b.value+n.pageSize,C.value.length))};return t.onMounted(()=>{document.addEventListener("mousedown",R),queueMicrotask(()=>{var T;i.value=((T=s.value)==null?void 0:T.querySelector("input"))??null}),f.value&&_()}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",R),N&&clearTimeout(N)}),t.watch(f,T=>{d.value||(B.value=T)}),t.watch(()=>u.value,()=>{b.value=n.pageSize}),(T,F)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:s,class:"!w-full !block !box-border"},[n.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"!text-sm !font-medium !mb-1 !block"},[t.createTextVNode(t.toDisplayString(n.label)+" ",1),n.required?(t.openBlock(),t.createElementBlock("span",n_,"*")):t.createCommentVNode("",!0)],8,o_)):t.createCommentVNode("",!0),t.createElementVNode("div",r_,[E.value&&!d.value?(t.openBlock(),t.createElementBlock("div",a_,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(E.value),{size:18}))])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("input",{id:c.value,"onUpdate:modelValue":F[0]||(F[0]=X=>B.value=X),readonly:A.value,disabled:n.disabled,placeholder:n.placeholder,class:t.normalizeClass(["w-full h-10 m-0 py-0 rounded-lg border bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 pr-10 outline-none box-border truncate",[E.value&&!d.value?"pl-10":"pl-4",A.value?"cursor-pointer select-none":""]]),onClick:k,onFocus:k,onInput:V,onKeydown:P},null,42,s_),[[t.vModelText,B.value]]),t.createElementVNode("div",i_,[n.clearable&&f.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition cursor-pointer outline-none",onMousedown:F[1]||(F[1]=t.withModifiers(()=>{},["prevent"])),onClick:O,title:"Clear"},[t.createVNode(t.unref(ne.X),{class:"h-4 w-4"})],32)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition-transform cursor-pointer outline-none",onMousedown:F[2]||(F[2]=t.withModifiers(()=>{},["prevent"])),onClick:S,title:"Open"},[t.createVNode(t.unref(ne.ChevronDown),{class:"h-4 w-4"})],32))]),d.value?(t.openBlock(),t.createElementBlock("div",l_,[t.createElementVNode("div",{class:"p-2 overflow-auto",style:t.normalizeStyle({maxHeight:n.maxHeight}),onScroll:j},[p.value?(t.openBlock(),t.createElementBlock("div",c_,[t.createVNode(t.unref(ne.Loader2),{class:"h-4 w-4 animate-spin"}),F[3]||(F[3]=t.createElementVNode("span",{class:"text-sm"},"Loading icons…",-1))])):m.value&&C.value.length===0?(t.openBlock(),t.createElementBlock("div",d_," Icon tidak ditemukan ")):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["grid gap-2",w.value])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(x.value,X=>(t.openBlock(),t.createElementBlock("button",{key:X,type:"button",class:t.normalizeClass(["group rounded-lg border p-2 hover:bg-muted/40 transition",f.value===X?"ring-1 ring-primary":""]),onClick:H=>L(X),title:X},[t.createElementVNode("div",u_,[t.createElementVNode("div",h_,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(a)[X]),{size:n.iconSize,class:"shrink-0"},null,8,["size"]))]),t.createElementVNode("span",m_,t.toDisplayString(X),1)])],10,f_))),128))],2)),m.value&&C.value.length>0?(t.openBlock(),t.createElementBlock("div",p_," Showing "+t.toDisplayString(x.value.length)+" / "+t.toDisplayString(C.value.length),1)):t.createCommentVNode("",!0)],36)])):t.createCommentVNode("",!0)])],512))}}),g_={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6"},b_={class:"flex items-center justify-between border-b dark:border-neutral-700/50 px-6 py-4"},y_={class:"relative overflow-auto p-0"},li=t.defineComponent({name:"DCodeImageCropperDialog",inheritAttrs:!1,__name:"DCodeImageCropperDialog",props:{modelValue:{type:Boolean},file:{},title:{default:"Resize & Crop Gambar"},description:{default:""},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!1}},emits:["update:modelValue","done","cancel"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:E=>r("update:modelValue",E)}),s=t.ref(null),i=t.ref(null);let l=null,c=!1,d=0,f=null;function u(){if(l){try{l.close()}catch{}l=null,f&&(f.disconnect(),f=null),s.value&&(s.value.innerHTML=""),i.value=null}}async function h(E,B,A,C,x){const w=await new Promise((v,S)=>{const N=URL.createObjectURL(E),V=new Image;V.onload=()=>{URL.revokeObjectURL(N),v(V)},V.onerror=L=>{URL.revokeObjectURL(N),S(L)},V.src=N}),D=document.createElement("canvas");D.width=B,D.height=A;const k=D.getContext("2d");return k?(k.drawImage(w,0,0,B,A),await new Promise(v=>{D.toBlob(S=>v(S||E),C,x)})):E}function m(){if(!l||!i.value)return;const E=l.getPlugin("Dashboard"),B=l.getFile(i.value);!E||!B||requestAnimationFrame(()=>{try{E.openFileEditor(B)}catch{try{E.openFileEditor(i.value)}catch{}}})}async function p(E){if(l){l.cancelAll(),i.value=null;try{const B=l.addFile({name:E.name,type:E.type,data:E,source:"Local",isRemote:!1});i.value=String(B)}catch{}}}function y(){if(!s.value)return;l&&u(),l=new Ou({autoProceed:!1,restrictions:{maxNumberOfFiles:1,allowedFileTypes:["image/*"]}});const E=document.documentElement.classList.contains("dark");l.use(zi,{target:s.value,inline:!0,height:480,theme:E?"dark":"light",proudlyDisplayPoweredByUppy:!1,hideUploadButton:!0,hideRetryButton:!0,hidePauseResumeButton:!0,hideCancelButton:!0,showProgressDetails:!1}),f=new MutationObserver(()=>{if(!l)return;const B=document.documentElement.classList.contains("dark"),A=l.getPlugin("Dashboard");A&&A.setOptions({theme:B?"dark":"light"})}),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),l.use(Lu,{target:zi,quality:n.quality,cropperOptions:{viewMode:1,dragMode:"move",autoCropArea:1,aspectRatio:n.aspectRatio==null?Number.NaN:n.aspectRatio}}),l.on("file-editor:cancel",()=>{a.value=!1}),l.on("file-added",B=>{i.value=(B==null?void 0:B.id)??null,n.autoOpenEditor&&setTimeout(()=>m(),80)}),l.on("file-editor:complete",async B=>{const A=++d;try{const C=B.data,x=C.type||B.type||"image/jpeg";let w=C;if(n.outputWidth&&n.outputHeight&&(w=await h(C,n.outputWidth,n.outputHeight,x,n.quality)),c||A!==d)return;const D=B.name||"edited-image.jpg",k=new File([w],D,{type:x});await b(k,"UPPY_EDITOR_COMPLETE"),r("done",k),a.value=!1}catch{}})}async function b(E,B="CROP_RESULT"){const A=URL.createObjectURL(E);try{const C=await new Promise((x,w)=>{const D=new Image;D.onload=()=>x(D),D.onerror=w,D.src=A});console.group(B),console.log("file:",E),console.table({name:E.name,type:E.type,sizeBytes:E.size,sizeMB:+(E.size/1024/1024).toFixed(3),width:C.naturalWidth,height:C.naturalHeight,ratio:+(C.naturalWidth/C.naturalHeight).toFixed(4)}),console.log("previewUrl:",A),console.groupEnd()}finally{URL.revokeObjectURL(A)}}t.watch(a,async E=>{c=!E,d++,E?(await t.nextTick(),y(),n.file&&await p(n.file)):u()},{flush:"post"}),t.watch(()=>n.file,async E=>{a.value&&E&&(await t.nextTick(),await p(E))}),t.onBeforeUnmount(()=>{c=!0,d++,u()});const g=E=>{E.key==="Escape"&&a.value&&(a.value=!1)};t.watch(a,E=>{E?globalThis.addEventListener("keydown",g):globalThis.removeEventListener("keydown",g)},{immediate:!0});const _=t.ref(!1);return(E,B)=>a.value?(t.openBlock(),t.createElementBlock("div",g_,[t.createVNode(t.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:B[0]||(B[0]=A=>a.value=!1)})):t.createCommentVNode("",!0)]),_:1}),t.createVNode(t.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"relative flex w-fit max-w-4xl flex-col overflow-hidden rounded-xl border border-border dark:border-neutral-700/50 bg-background dark:bg-neutral-800 shadow-2xl transition-all",onClick:B[4]||(B[4]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",b_,[B[6]||(B[6]=t.createElementVNode("h3",{class:"text-lg font-semibold leading-none tracking-tight dark:text-neutral-100"}," Crop & Resize ",-1)),t.createElementVNode("button",{class:"d-close-btn rounded-sm dark:text-neutral-400 ring-offset-background transition-opacity focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",style:t.normalizeStyle({opacity:_.value?1:.7}),onClick:B[1]||(B[1]=A=>a.value=!1),onMouseenter:B[2]||(B[2]=A=>_.value=!0),onMouseleave:B[3]||(B[3]=A=>_.value=!1)},[t.createVNode(t.unref(ne.X),{class:"h-4 w-4"}),B[5]||(B[5]=t.createElementVNode("span",{class:"sr-only"},"Close",-1))],36)]),t.createElementVNode("div",y_,[t.createElementVNode("div",{ref_key:"dashboardEl",ref:s,class:"uppy-wrap"},null,512)])])):t.createCommentVNode("",!0)]),_:1})])):t.createCommentVNode("",!0)}}),x_={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},k_=["src"],w_=["disabled"],C_=["disabled"],__={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},E_={class:"flex gap-2"},B_={class:"font-medium truncate"},S_={class:"flex gap-2"},A_={class:"font-medium"},v_={class:"flex gap-2"},D_={class:"font-medium truncate"},ci=ft(t.defineComponent({name:"DCodeImageResult",__name:"DCodeImageResult",props:{file:{},title:{default:"Hasil Gambar"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0}},emits:["edit","replace","remove"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null);t.watch(()=>n.file,h=>{a.value&&URL.revokeObjectURL(a.value),a.value=h?URL.createObjectURL(h):null},{immediate:!0}),t.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),d&&d.disconnect()});function s(h){const m=h/1024,p=m/1024;return p>=1?`${p.toFixed(2)} MB`:m>=1?`${m.toFixed(1)} KB`:`${h} B`}const i=t.computed(()=>n.file?{name:n.file.name,size:s(n.file.size),type:n.file.type||"unknown"}:null),l=t.ref(!1),c=t.ref(!1);let d=null;const f=()=>{typeof document<"u"&&(c.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{f(),typeof document<"u"&&(d=new MutationObserver(f),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),d.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const u=t.computed(()=>n.disabled||!l.value?{}:{borderColor:c.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:c.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(h,m)=>e.file?(t.openBlock(),t.createBlock(oi,{key:0,class:t.normalizeClass([e.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(ri,{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(ai,{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),e.description?(t.openBlock(),t.createElementBlock("div",x_,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),_:1}),t.createVNode(ni,{class:"pt-2"},{default:t.withCtx(()=>{var p,y,b;return[t.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:t.normalizeStyle([{height:`${e.previewHeight}px`},u.value]),onMouseenter:m[2]||(m[2]=g=>l.value=!0),onMouseleave:m[3]||(m[3]=g=>l.value=!1)},[a.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,k_)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"d-action-buttons",style:t.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:l.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:l.value?"auto":"none"})},[e.showEdit?(t.openBlock(),t.createElementBlock("button",{key:0,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[0]||(m[0]=g=>r("edit"))},[t.createVNode(t.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,w_)):t.createCommentVNode("",!0),e.showRemove?(t.openBlock(),t.createElementBlock("button",{key:1,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[1]||(m[1]=g=>r("remove"))},[t.createVNode(t.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,C_)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"d-metadata-overlay",style:t.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:l.value?1:0,transform:l.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:c.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:c.value?"#e5e5e5":"#171717"})},[t.createElementVNode("div",__,[t.createElementVNode("div",E_,[m[4]||(m[4]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),t.createElementVNode("span",B_,t.toDisplayString((p=i.value)==null?void 0:p.name),1)]),t.createElementVNode("div",S_,[m[5]||(m[5]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),t.createElementVNode("span",A_,t.toDisplayString((y=i.value)==null?void 0:y.size),1)]),t.createElementVNode("div",v_,[m[6]||(m[6]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),t.createElementVNode("span",D_,t.toDisplayString((b=i.value)==null?void 0:b.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-e1d893ab"]]),N_={class:"space-y-3"},la=t.defineComponent({name:"DCodeImageField",inheritAttrs:!1,__name:"DCodeImageField",props:{modelValue:{default:null},label:{default:"Upload Gambar"},hint:{default:"Drag & drop atau klik area ini"},disabled:{type:Boolean,default:!1},allowedTypes:{default:null},accept:{default:"image/*"},minSizeMb:{default:null},maxSizeMb:{default:1},title:{default:"Hasil Gambar"},description:{default:""},previewWidth:{default:360},previewHeight:{default:220},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!0},minWidth:{default:null},minHeight:{default:null},maxWidth:{default:null},maxHeight:{default:null},endpoint:{},uploadFn:{},editUseOriginal:{type:Boolean,default:!1}},emits:["update:modelValue","error","uploaded"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:O=>r("update:modelValue",O)}),s=t.ref(!1),i=t.ref(null),l=t.ref(null),c=t.ref(null);function d(O){c.value=O,r("error",O)}function f(){c.value=null}const u=t.computed(()=>{const O=(n.allowedTypes??"").trim();return O?O.split(/[,\s;]+/g).map(R=>R.trim().toLowerCase()).filter(Boolean).map(R=>R.includes("/")||R.startsWith(".")?R:`.${R}`):[]});function h(O){const P=O.lastIndexOf(".");return P>=0?O.slice(P).toLowerCase():""}const m=t.computed(()=>{if(u.value.length){const O=u.value.filter(R=>R.startsWith("."));return[...u.value.filter(R=>R.includes("/")),...O].join(",")}return n.accept||"image/*"}),p=t.computed(()=>u.value.length?u.value.join(", "):n.accept||"image/*");function y(O){if(u.value.length){const R=(O.type||"").toLowerCase(),j=h(O.name);return u.value.some(T=>T.includes("/")?R===T:T.startsWith(".")?j===T:j===`.${T}`)}return(n.accept||"image/*").toLowerCase().includes("image/")?(O.type||"").toLowerCase().startsWith("image/"):!0}function b(O){return O*1024*1024}async function g(O){var P;return(P=O.type)!=null&&P.startsWith("image/")?await new Promise(R=>{const j=URL.createObjectURL(O),T=new Image;T.onload=()=>{URL.revokeObjectURL(j),R({w:T.naturalWidth,h:T.naturalHeight})},T.onerror=()=>{URL.revokeObjectURL(j),R(null)},T.src=j}):null}async function _(O){if(!(n.minWidth!=null||n.minHeight!=null||n.maxWidth!=null||n.maxHeight!=null))return null;const R=await g(O);return R?n.minWidth!=null&&R.w<n.minWidth?`Lebar gambar minimal ${n.minWidth}px`:n.minHeight!=null&&R.h<n.minHeight?`Tinggi gambar minimal ${n.minHeight}px`:n.maxWidth!=null&&R.w>n.maxWidth?`Lebar gambar maksimal ${n.maxWidth}px`:n.maxHeight!=null&&R.h>n.maxHeight?`Tinggi gambar maksimal ${n.maxHeight}px`:null:"Gagal membaca dimensi gambar"}async function E(O){return O?y(O)?n.minSizeMb!=null&&O.size<b(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&O.size>b(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:await _(O):`only Allowed: ${p.value}`:"File tidak valid"}function B(O){n.disabled||(i.value=O,s.value=!0)}async function A(O){if(n.disabled)return;f();const P=await E(O);if(P){d(P);return}l.value=O,B(O)}const{DCodeApi:C}=Je(),x=ii(),w=t.ref(!1);t.ref(null);function D(O,P){return!O||!P?null:O.replace(/\/+$/,"")+"/"+P.replace(/^\/+/,"")}function k(O){var T;const P=(O==null?void 0:O.data)??O,R=(T=P==null?void 0:P.data)==null?void 0:T[0];if(!R)return null;const j=D(R.server,R.url);return{...R,fullUrl:j?encodeURI(j):null}}async function v(O){var P;if(n.uploadFn){try{w.value=!0;const R=await n.uploadFn(O);a.value=O,r("uploaded",R)}catch(R){console.error("Upload Error",R),x.error("Upload Failed",(R==null?void 0:R.message)||"Unknown error"),d((R==null?void 0:R.message)||"Upload Failed")}finally{w.value=!1}return}if(!((P=n.endpoint)!=null&&P.apiUrl)){a.value=O;return}if(typeof C!="function"){d("useApi() must expose DCodeApi()");return}try{w.value=!0;const R=new FormData;R.append("doc",O);const j=(n.endpoint.apiMethod||"POST").toUpperCase(),T=n.endpoint.apiUrl,F=await C("","",R,{_url:T,_method:j,withCredentials:!0,transformRequest:[(H,W)=>(W&&(delete W["Content-Type"],delete W["content-type"]),H)]}),X=(F==null?void 0:F.data)??F;k(X),a.value=O,r("uploaded",X)}catch(R){console.error("Upload Error",R),x.error("Upload Failed",(R==null?void 0:R.message)||"Unknown error"),d((R==null?void 0:R.message)||"Upload Failed")}finally{w.value=!1}}async function S(O){var P;f(),n.uploadFn||(P=n.endpoint)!=null&&P.apiUrl?await v(O):a.value=O,s.value=!1,i.value=null}function N(){s.value=!1,i.value=null}async function V(){if(!a.value)return;f();const O=n.editUseOriginal?l.value??a.value:a.value,P=await E(O);if(P){d(P);return}B(O)}function L(){f(),a.value=null,i.value=null,s.value=!1,l.value=null}return t.watch(()=>n.modelValue,O=>{O&&!l.value&&(l.value=O),O||(l.value=null)},{immediate:!0}),(O,P)=>(t.openBlock(),t.createElementBlock("div",N_,[a.value?(t.openBlock(),t.createBlock(ci,{key:1,file:a.value,title:e.label,description:e.description,"preview-width":e.previewWidth,disabled:e.disabled,"show-edit":!0,"show-remove":!0,"show-replace":!1,onEdit:V,onRemove:L,"aspect-ratio":16/9},null,8,["file","title","description","preview-width","disabled"])):(t.openBlock(),t.createBlock(ia,{key:0,label:e.label,hint:e.hint,accept:m.value,maxSizeMb:e.maxSizeMb,disabled:e.disabled,onPicked:A,error:c.value,onError:P[0]||(P[0]=R=>d(R))},null,8,["label","hint","accept","maxSizeMb","disabled","error"])),t.createVNode(li,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=R=>s.value=R),file:i.value,title:e.title,description:e.description,"auto-open-editor":e.autoOpenEditor,"aspect-ratio":e.aspectRatio,"output-width":e.outputWidth,"output-height":e.outputHeight,quality:e.quality,onDone:S,onCancel:N},null,8,["modelValue","file","title","description","auto-open-editor","aspect-ratio","output-width","output-height","quality"])]))}}),V_=["aria-busy"],M_={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},T_=["for"],P_={key:0,class:"ml-1 text-destructive"},O_=["id","disabled"],L_={class:"min-w-0 flex-1 text-left"},R_={key:0,class:"flex flex-wrap gap-1.5"},I_={class:"max-w-[220px] truncate"},F_=["onClick"],z_={key:0,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent"},$_={key:1,class:"text-muted-foreground truncate"},j_={class:"flex items-center gap-2 shrink-0"},U_={key:0,class:"p-2 border-b border-gray-200 dark:border-gray-800"},W_=["placeholder","onKeydown"],H_={key:0,class:"h-full flex items-center justify-center px-3 text-sm text-muted-foreground"},q_=["disabled","onClick"],G_={class:"truncate"},K_={key:0,class:"text-primary-600 dark:text-primary-400"},X_={key:1,class:"h-full flex items-center justify-center text-sm text-muted-foreground"},Y_={key:0},J_={key:1},Q_={key:1,class:"text-xs text-destructive"},di=t.defineComponent({name:"DCodeMultiSelect",inheritAttrs:!1,__name:"DCodeMultiSelect",props:{modelValue:{},items:{default:()=>[]},endpoint:{default:void 0},fetchItems:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},refreshOnOpen:{type:Boolean,default:!1},label:{default:""},placeholder:{default:"Pilih data…"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Cari…"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},maxChips:{default:5},maxSelected:{default:5},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},virtual:{type:Boolean,default:!0},itemHeight:{default:40},maxRows:{default:5},overscan:{default:6},error:{default:null},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear","max"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>(a.label||n.label)??void 0),i=t.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`app-multiselect-${n.id||s.value||"field"}-${l}`),d=t.computed(()=>{if(a.required)return!0;const G=n.required,ee=n["aria-required"];return G===""||G===!0||G==="true"||(ee==="true"||ee===!0)}),f=t.computed(()=>!!a.error);function u(G){return G?typeof a.itemTitle=="function"?a.itemTitle(G)??"":String((G==null?void 0:G[a.itemTitle])??""):""}function h(G){return G?typeof a.itemValue=="function"?a.itemValue(G):G==null?void 0:G[a.itemValue]:null}function m(G,ee){return h(G)??ee}const p=t.computed(()=>Array.isArray(a.modelValue)?a.modelValue:[]),y=t.computed(()=>{var G;return!!((G=a.endpoint)!=null&&G.apiUrl)||!!a.fetchItems}),b=t.ref([]),g=t.ref(!1),_=t.ref(!1),E=t.computed(()=>{var ee;const G=(ee=a.endpoint)==null?void 0:ee.apiOptions;if(G)return typeof G=="function"?G():G}),B=t.computed(()=>{var Ce,Ge;const G=((Ce=a.endpoint)==null?void 0:Ce.apiUrl)??"",ee=(((Ge=a.endpoint)==null?void 0:Ge.apiMethod)??"GET").toUpperCase(),re=JSON.stringify(E.value??null);return`${ee} ${G} :: ${re}`}),A=t.computed(()=>y.value?b.value:a.items||[]);async function C(){var G;if(y.value&&!(!((G=a.endpoint)!=null&&G.apiUrl)&&!a.fetchItems)&&!g.value){g.value=!0;try{let ee;if(a.fetchItems){const re=await a.fetchItems(),Ce=(re==null?void 0:re.data)??re;ee=(Ce==null?void 0:Ce.data)??Ce}else{const{DCodeApi:re}=Je();if(typeof re!="function"){console.error("[DCodeMultiSelectChips] useApi() must expose DCodeApi()");return}const Ce={page:1,perPage:100,...E.value||{}},Ge=await re("","",Ce,{_url:a.endpoint.apiUrl,_method:(a.endpoint.apiMethod||"GET").toUpperCase()}),wt=(Ge==null?void 0:Ge.data)??Ge;ee=(wt==null?void 0:wt.data)??wt}b.value=Array.isArray(ee)?ee:[],_.value=!0}catch(ee){console.error("[DCodeMultiSelectChips][fetchOptions] ERROR:",ee),b.value=[]}finally{g.value=!1}}}t.watch(()=>B.value,()=>{b.value=[],_.value=!1}),t.onMounted(()=>{a.autoFetchOnMount&&y.value&&C()});const x=t.computed(()=>{const G=p.value;if(a.returnObject)return G;const ee=new Map;for(const re of A.value)ee.set(h(re),re);return G.map(re=>ee.get(re)??{[a.itemValue]:re,[a.itemTitle]:String(re)})}),w=t.computed(()=>a.maxChips===null?x.value:x.value.slice(0,a.maxChips));function D(G){const ee=p.value;if(a.returnObject){const re=h(G);return ee.some(Ce=>h(Ce)===re)}return ee.includes(h(G))}const k=t.computed(()=>{if(a.maxSelected===null||a.maxSelected===void 0)return null;const G=Number(a.maxSelected);return Number.isFinite(G)&&G>0?G:null}),v=t.computed(()=>{const G=k.value;return G===null?!1:p.value.length>=G});function S(G){return!D(G)&&v.value}const N=t.computed(()=>{const G=p.value,ee=new Set;if(a.returnObject)for(const re of G)ee.add(h(re));else for(const re of G)ee.add(re);return ee}),V=t.computed(()=>{const G=N.value;return(A.value||[]).filter(ee=>!G.has(h(ee)))}),L=t.computed(()=>A.value.length===0?!1:V.value.length===0),O=t.ref(null),P=t.ref(null),R=t.ref(null),j=t.ref(!1),T=t.ref(""),F=t.ref(0),X=t.ref(0),{floatingStyles:H}=Ha(O,P,{whileElementsMounted:za,placement:"bottom-start",middleware:[$a(8),Ua(),ja({padding:8}),Wa({apply({rects:G,elements:ee}){Object.assign(ee.floating.style,{width:`${G.reference.width}px`,"--floating-width":`${G.reference.width}px`})}})]}),W=t.computed(()=>H.value),Z=t.computed(()=>{const G=Number(a.maxRows);return Number.isFinite(G)&&G>0?G:5});async function oe(){a.disabled||a.readonly||(j.value=!0,X.value=0,requestAnimationFrame(()=>{R.value&&(R.value.scrollTop=0),F.value=0}),y.value&&a.autoFetchOnOpen&&(a.refreshOnOpen||!_.value)&&!g.value&&await C())}function ye(){j.value=!1}function Ne(){j.value?ye():oe()}function we(G){var re,Ce;if(!j.value)return;const ee=G.target;(re=O.value)!=null&&re.contains(ee)||(Ce=P.value)!=null&&Ce.contains(ee)||ye()}t.onMounted(()=>document.addEventListener("mousedown",we)),t.onBeforeUnmount(()=>document.removeEventListener("mousedown",we));function Q(G){if(a.disabled||a.readonly)return;if(S(G)){r("max");return}const ee=[...p.value];if(a.returnObject){const re=h(G);if(ee.some(Ge=>h(Ge)===re))return;r("update:modelValue",[...ee,G])}else{const re=h(G);if(ee.includes(re))return;r("update:modelValue",[...ee,re])}T.value="",X.value=0,requestAnimationFrame(()=>{R.value&&(R.value.scrollTop=0),F.value=0})}function $(G){if(a.disabled||a.readonly)return;const ee=[...p.value];if(a.returnObject){const re=h(G);r("update:modelValue",ee.filter(Ce=>h(Ce)!==re))}else{const re=h(G);r("update:modelValue",ee.filter(Ce=>Ce!==re))}}function Y(){a.disabled||a.readonly||(r("update:modelValue",[]),r("clear"),ye())}const ae=t.computed(()=>{const G=T.value.trim().toLowerCase(),ee=V.value;return G?ee.filter(re=>u(re).toLowerCase().includes(G)):ee}),xe=t.computed(()=>ae.value.length);t.watch(j,G=>{G||(T.value="")});const Oe=t.computed(()=>{if(L.value)return a.itemHeight;const G=xe.value;return(G<=0?1:Math.min(G,Z.value))*a.itemHeight}),Ee=t.computed(()=>a.virtual?xe.value*a.itemHeight:0),We=t.computed(()=>a.virtual?Math.ceil(Oe.value/a.itemHeight)+a.overscan:xe.value),Fe=t.computed(()=>{if(!a.virtual)return 0;const G=Math.floor(F.value/a.itemHeight)-Math.floor(a.overscan/2);return Math.max(0,G)}),se=t.computed(()=>a.virtual?Math.min(xe.value,Fe.value+We.value):xe.value),Le=t.computed(()=>a.virtual?Fe.value*a.itemHeight:0),Re=t.computed(()=>{const G=ae.value;return a.virtual?G.slice(Fe.value,se.value):G});function ve(G){const ee=G.target;F.value=ee.scrollTop}function ct(G){return G===X.value}function q(G){const ee=R.value;if(!ee||!a.virtual)return;const re=G*a.itemHeight,Ce=re+a.itemHeight,Ge=ee.scrollTop,wt=ee.scrollTop+ee.clientHeight;re<Ge?ee.scrollTop=re:Ce>wt&&(ee.scrollTop=Ce-ee.clientHeight)}function ie(G){const ee=Math.max(0,xe.value-1);X.value=Math.min(ee,Math.max(0,X.value+G)),q(X.value)}function he(){const G=ae.value[X.value];G&&Q(G)}const te=t.computed(()=>a.clearable&&!a.disabled&&!a.readonly&&x.value.length>0),le=t.computed(()=>f.value?"border-destructive ring-1 ring-destructive":j.value?"border-neutral-400 ring-1 ring-neutral-400 dark:border-neutral-600 dark:ring-neutral-600":"");return(G,ee)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",M_)):t.createCommentVNode("",!0),ee[3]||(ee[3]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),d.value?(t.openBlock(),t.createElementBlock("span",P_,"*")):t.createCommentVNode("",!0)],8,T_)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"referenceEl",ref:O,class:"relative"},[t.createElementVNode("button",{id:c.value,type:"button",class:t.normalizeClass(["w-full justify-between h-auto min-h-10 px-3 py-2 transition border rounded-lg flex items-center",["bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 text-foreground dark:text-gray-300",a.disabled?"cursor-not-allowed opacity-50":a.readonly?"cursor-default bg-neutral-50/50 dark:bg-neutral-900/30":"",le.value]]),disabled:a.disabled||a.readonly,onClick:Ne},[t.createElementVNode("div",L_,[x.value.length?(t.openBlock(),t.createElementBlock("div",R_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(re,Ce)=>(t.openBlock(),t.createElementBlock("div",{key:`chip-${m(re,Ce)}`,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent gap-1"},[t.createElementVNode("span",I_,t.toDisplayString(u(re)),1),a.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,class:"ml-1 opacity-70 hover:opacity-100",onClick:t.withModifiers(Ge=>$(re),["stop"]),"aria-label":"Remove"}," ✕ ",8,F_))]))),128)),a.maxChips!==null&&x.value.length>a.maxChips?(t.openBlock(),t.createElementBlock("div",z_," +"+t.toDisplayString(x.value.length-(a.maxChips??0)),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",$_,t.toDisplayString(a.placeholder),1))]),t.createElementVNode("div",j_,[te.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"text-muted-foreground hover:text-foreground",onClick:t.withModifiers(Y,["stop"]),"aria-label":"Clear"}," ✕ ")):t.createCommentVNode("",!0),t.createVNode(t.unref(ne.ChevronDown),{class:"h-4 w-4 text-muted-foreground"})])],10,O_),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[j.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floatingEl",ref:P,class:"-mt-1 z-[9999] w-[var(--floating-width)] rounded-lg border shadow-lg overflow-hidden bg-white dark:bg-neutral-800 border-gray-200 dark:border-neutral-700/50",style:t.normalizeStyle(W.value)},[a.searchable&&!L.value?(t.openBlock(),t.createElementBlock("div",U_,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":ee[0]||(ee[0]=re=>T.value=re),placeholder:a.searchPlaceholder,class:"w-full h-10 px-3 py-2 text-sm bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-md focus:outline-none focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600",onKeydown:[ee[1]||(ee[1]=t.withKeys(t.withModifiers(re=>ie(1),["prevent"]),["down"])),ee[2]||(ee[2]=t.withKeys(t.withModifiers(re=>ie(-1),["prevent"]),["up"])),t.withKeys(t.withModifiers(he,["prevent"]),["enter"]),t.withKeys(t.withModifiers(ye,["prevent"]),["esc"])]},null,40,W_),[[t.vModelText,T.value]])])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"listEl",ref:R,class:"relative overflow-auto",style:t.normalizeStyle({height:Oe.value+"px"}),onScroll:ve},[L.value?(t.openBlock(),t.createElementBlock("div",H_," All items have been selected ")):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.virtual?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle({height:Ee.value+"px"})},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(a.virtual?"absolute left-0 top-0 w-full":""),style:t.normalizeStyle(a.virtual?{transform:`translateY(${Le.value}px)`}:void 0)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Re.value,(re,Ce)=>(t.openBlock(),t.createElementBlock("button",{key:String(m(re,Fe.value+Ce)),type:"button",class:t.normalizeClass(["w-full px-3 text-left text-sm flex items-center justify-between gap-3",[S(re)?"cursor-not-allowed opacity-50":"hover:bg-neutral-50 dark:hover:bg-neutral-800/60",ct(Fe.value+Ce)?"bg-neutral-50 dark:bg-neutral-800/60":"",D(re)?"font-semibold":"font-normal"]]),style:t.normalizeStyle({height:a.itemHeight+"px"}),disabled:a.disabled||S(re),onClick:Ge=>Q(re)},[t.createElementVNode("span",G_,t.toDisplayString(u(re)),1),D(re)?(t.openBlock(),t.createElementBlock("span",K_,"✓")):t.createCommentVNode("",!0)],14,q_))),128))],6),xe.value===0?(t.openBlock(),t.createElementBlock("div",X_,[g.value?(t.openBlock(),t.createElementBlock("span",Y_,"Loading data…")):(t.openBlock(),t.createElementBlock("span",J_,"Tidak ada data"))])):t.createCommentVNode("",!0)],64))],36)],4)):t.createCommentVNode("",!0)]))],512),f.value?(t.openBlock(),t.createElementBlock("p",Q_,t.toDisplayString(a.error),1)):t.createCommentVNode("",!0)],64))],10,V_)),[[t.vShow,i.value]])}}),Z_={class:"space-y-4"},eE={key:0,class:"flex flex-col gap-0.5"},tE=["for"],oE=["for"],nE={class:"text-[11px] text-gray-500 dark:text-gray-400"},rE={class:"flex items-center gap-2 flex-nowrap"},aE=["id","value","disabled","onKeydown","onInput","onPaste"],ca=t.defineComponent({name:"DCodeOtpInput",inheritAttrs:!1,__name:"DCodeOtpInput",props:{modelValue:{default:""},totalInput:{default:6},default:{default:""},label:{default:""},endpoint:{},submitFn:{}},emits:["updateOtp","update:modelValue","complete","loading","success","error"],setup(e,{emit:o}){const n=t.useAttrs(),r=Math.random().toString(36).slice(2,7),a=t.computed(()=>`app-otp-${(n.id||s.label||"otp-field").replaceAll(/\s+/g,"-").toLowerCase()}-${r}`),s=e,i=o,l=t.ref([]),c=t.ref([]),d=t.ref(!1),{DCodeApi:f}=Je(),u=ii(),h=t.computed(()=>{const C=Number(s.totalInput);return C&&C>0?C:6}),m=()=>{c.value=Array.from({length:h.value},(C,x)=>{var w;return((w=s.default)==null?void 0:w[x])??""}),i("updateOtp",c.value.join(""))};m(),t.watch(()=>[s.totalInput,s.default],()=>m());const p=C=>{C<0||C>=h.value||t.nextTick(()=>{var x;return(x=l.value[C])==null?void 0:x.focus()})},y=C=>C.match(/[a-zA-Z0-9]/)?C.match(/[a-zA-Z0-9]/)[0]:"";async function b(C){var x;if(i("complete",C),s.submitFn){try{d.value=!0,i("loading",!0);const w=await s.submitFn(C);i("success",w)}catch(w){console.error("OTP Submit Error",w),u.error("Submit Failed",(w==null?void 0:w.message)||"Unknown error"),i("error",(w==null?void 0:w.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}return}if((x=s.endpoint)!=null&&x.apiUrl){if(typeof f!="function"){i("error","useApi() must expose DCodeApi()");return}try{d.value=!0,i("loading",!0);const w=(s.endpoint.apiMethod||"POST").toUpperCase(),D=s.endpoint.apiUrl,k=await f("","",{otp:C},{_url:D,_method:w,withCredentials:!0}),v=(k==null?void 0:k.data)??k;i("success",v)}catch(w){console.error("OTP Submit Error",w),u.error("Submit Failed",(w==null?void 0:w.message)||"Unknown error"),i("error",(w==null?void 0:w.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}}}const g=(C,x)=>{c.value[C]=y(x);const w=c.value.join("");i("updateOtp",w),i("update:modelValue",w),w.length===h.value&&b(w)},_=(C,x)=>{const w=C.key,D=/^\d$/.test(w),k=/^[a-zA-Z]$/.test(w);if(w==="Backspace"){if(C.preventDefault(),c.value[x]){g(x,"");return}x>0&&(g(x-1,""),p(x-1));return}if(w==="ArrowLeft"){C.preventDefault(),p(x-1);return}if(w==="ArrowRight"){C.preventDefault(),p(x+1);return}if(D||k){C.preventDefault(),g(x,w),x<h.value-1&&p(x+1);return}w.length===1&&C.preventDefault()},E=(C,x)=>{const w=C.target,D=w.value??"",k=y(D);w.value=k,g(x,k),k&&x<h.value-1&&p(x+1)},B=(C,x)=>{var S;C.preventDefault();const D=(((S=C.clipboardData)==null?void 0:S.getData("text"))??"").replaceAll(/[^a-zA-Z0-9]/g,"");if(!D)return;let k=x;for(const N of D){if(k>=h.value)break;c.value[k]=N,k++}const v=c.value.join("");i("updateOtp",v),i("update:modelValue",v),v.length===h.value&&b(v),p(Math.min(k,h.value-1))},A=C=>x=>{l.value[C]=(x==null?void 0:x.$el)??x};return(C,x)=>(t.openBlock(),t.createElementBlock("div",Z_,[s.label||h.value?(t.openBlock(),t.createElementBlock("div",eE,[s.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:a.value,class:"text-sm font-medium text-foreground"},t.toDisplayString(s.label),9,tE)):(t.openBlock(),t.createElementBlock("label",{key:1,for:a.value,class:"text-sm font-medium text-foreground"}," Masukkan kode keamanan ",8,oE)),t.createElementVNode("p",nE," Ketik "+t.toDisplayString(h.value)+" digit kode verifikasi Anda ",1)])):t.createCommentVNode("",!0),t.createElementVNode("div",rE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,w=>(t.openBlock(),t.createElementBlock("input",{key:w,id:w===1?a.value:void 0,ref_for:!0,ref:A(w-1),value:c.value[w-1]||"",type:"text",inputmode:"text",maxlength:"1",autocomplete:"one-time-code","aria-label":"`OTP digit ${i}`",placeholder:"*",disabled:d.value,class:t.normalizeClass(["w-12 h-12 flex-none text-center text-xl font-bold rounded-xl border transition-all duration-200 box-border p-0","focus:outline-none focus:scale-105 disabled:opacity-50 disabled:cursor-not-allowed",c.value[w-1]?"border-blue-500 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300":"border-gray-300 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 text-gray-400 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600"]),onKeydown:D=>_(D,w-1),onInput:D=>E(D,w-1),onPaste:D=>B(D,w-1)},null,42,aE))),128))])]))}}),sE={class:"w-full"},iE={key:0,class:"flex items-center justify-between mb-2"},lE={key:0,class:"text-sm font-medium text-gray-700"},cE={key:1,class:"text-sm text-gray-600"},dE={name:"DCodeProgress"},jf=t.defineComponent({...dE,name:"DCodeProgress",inheritAttrs:!1,props:{modelValue:{default:0},max:{default:100},label:{default:""},showValue:{type:Boolean,default:!1},color:{default:"blue"},size:{default:"md"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=t.computed(()=>Math.min(n.modelValue/n.max*100,100)),a=t.computed(()=>["w-full rounded-full overflow-hidden",{sm:"h-1",md:"h-2",lg:"h-3"}[n.size],"bg-gray-200"].join(" ")),s=t.computed(()=>{const l={blue:"bg-blue-500",green:"bg-green-500",red:"bg-red-500",yellow:"bg-yellow-500",purple:"bg-purple-500",gray:"bg-gray-500"},c=["h-full transition-all duration-300 ease-out",l[n.color]||l.blue];return n.striped&&c.push("bg-gradient-to-r from-transparent via-white/20 to-transparent"),n.animated&&c.push("animate-pulse"),c.join(" ")}),i=t.computed(()=>`${Math.round(r.value)}%`);return(l,c)=>(t.openBlock(),t.createElementBlock("div",sE,[e.label||e.showValue?(t.openBlock(),t.createElementBlock("div",iE,[e.label?(t.openBlock(),t.createElementBlock("span",lE,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),e.showValue?(t.openBlock(),t.createElementBlock("span",cE,t.toDisplayString(i.value),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(a.value)},[t.createElementVNode("div",{class:t.normalizeClass(s.value),style:t.normalizeStyle({width:`${r.value}%`})},null,6)],2)]))}}),fE={key:0,class:"fixed top-0 left-0 right-0 z-[10000] h-[3px]"},Uf=ft(t.defineComponent({name:"DCodeProgressBar",__name:"DCodeProgressBar",props:{isApiLoading:{type:Boolean,default:!1},apiProgress:{default:0}},setup(e){return(o,n)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade"},{default:t.withCtx(()=>[e.isApiLoading?(t.openBlock(),t.createElementBlock("div",fE,[t.createElementVNode("div",{class:"h-full bg-primary-600 shadow-[0_0_15px_rgba(37,99,235,0.8)] transition-all duration-300 ease-out",style:t.normalizeStyle({width:`${e.apiProgress}%`})},null,4)])):t.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-85c68054"]]),uE={key:0,class:"ml-1 text-destructive"},hE={class:"flex flex-col"},mE={key:0,class:"flex items-center gap-2 text-sm text-gray-500 mb-2"},pE={class:"relative flex-shrink-0 mt-0.5"},gE=["id","name","value","checked","disabled","required","onChange"],bE=["onClick"],yE=["for"],xE={key:0,class:"ml-1 text-red-500"},kE={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-1"},fi=t.defineComponent({name:"DCodeRadio",inheritAttrs:!1,__name:"DCodeRadio",props:{modelValue:{default:void 0},label:{default:""},itemTitle:{default:"name"},itemValue:{default:"id"},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Je(),r=o,a=e,s=t.ref([]),i=t.ref(!1),l=t.ref(null),c=async()=>{var B,A;const E=((B=a.endpoint)==null?void 0:B.apiUrl)||a.apiUrl;if(E){i.value=!0,l.value=null;try{const C={page:1,perPage:100},x=((A=a.endpoint)==null?void 0:A.apiMethod)||a.apiMethod,w=await n(E,x,C);let D=w;a.dataPath?D=a.dataPath.split(".").reduce((v,S)=>v&&v[S]!=="undefined"?v[S]:void 0,w):typeof w=="object"&&!Array.isArray(w)&&w.data&&(D=w.data),Array.isArray(D)?s.value=D:(console.warn("DCodeRadio: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),l.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(C){console.error("DCodeRadio fetch error:",C),l.value="Gagal memuat data dari endpoint."}finally{i.value=!1}}};t.onMounted(()=>{var E;((E=a.endpoint)!=null&&E.apiUrl||a.apiUrl)&&c()});const d=t.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(s.value.length>0)return s.value;const E=a.itemValue||a.model||"id",B=a.itemTitle||(a.label===""?"name":a.label);return B&&a.label!==""?[{[E]:E,[B]:B}]:[]}),f=E=>{if(typeof E!="object")return E;const B=a.itemValue||a.model||"id";return E[B]},u=E=>{if(typeof E!="object")return String(E);const B=a.itemTitle||"name";return E[B]},h=t.computed(()=>a.model||`radio-group-${Math.random().toString(36).substr(2,9)}`),m=t.computed(()=>!!a.error||!!l.value),p=t.computed(()=>a.error||l.value),y=E=>E==null?a.modelValue===E:String(a.modelValue)===String(E),b=t.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),g=(E,B)=>{if(a.disabled||a.readonly){B.preventDefault();return}B.target.checked&&(r("update:modelValue",E),r("change",E))},_=E=>{!a.disabled&&!a.readonly&&!y(E)&&(r("update:modelValue",E),r("change",E))};return(E,B)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-3",e.disabled||e.readonly?"cursor-not-allowed":""])},[e.label?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",uE,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",hE,[i.value?(t.openBlock(),t.createElementBlock("div",mE,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),B[0]||(B[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["flex",e.layout?"flex-row flex-wrap gap-4":"flex-col gap-3"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(A,C)=>(t.openBlock(),t.createElementBlock("div",{key:C,class:t.normalizeClass(["flex items-start",b.value.container,e.disabled||e.readonly?"opacity-60 cursor-not-allowed":"cursor-pointer"])},[t.createElementVNode("div",pE,[t.createElementVNode("input",{id:e.id?`${e.id}-${C}`:`${h.value}-${C}`,name:h.value,type:"radio",value:f(A),checked:y(f(A)),disabled:e.disabled||e.readonly,required:e.required&&C===0,onChange:x=>g(f(A),x),class:"w-5 h-5 text-blue-600 focus:ring-blue-500 border-gray-300"},null,40,gE)]),t.createElementVNode("div",{class:"flex-1 min-w-0",onClick:x=>_(f(A))},[t.createElementVNode("label",{for:e.id?`${e.id}-${C}`:`${h.value}-${C}`,class:t.normalizeClass([b.value.label,"font-medium cursor-pointer select-none text-foreground dark:text-gray-300",e.disabled||e.readonly?"cursor-not-allowed opacity-60":""])},[t.createTextVNode(t.toDisplayString(u(A))+" ",1),e.required&&d.value.length===1&&e.label?(t.openBlock(),t.createElementBlock("span",xE,"*")):t.createCommentVNode("",!0)],10,yE)],8,bE)],2))),128))],2),m.value&&p.value?(t.openBlock(),t.createElementBlock("div",kE,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(p.value),1)])):t.createCommentVNode("",!0)])],2))}}),wE={class:"grid gap-3"},CE={key:0,class:"ml-1 text-destructive"},_E={class:"flex flex-col"},EE={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-2"},BE=["onClick"],SE=["id","name","value","checked","disabled","required","onChange"],AE={key:1,class:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20"},vE=["for"],DE={key:0,class:"ml-1 text-red-500"},NE={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-2"},ui=t.defineComponent({name:"DCodeRadioCustom",inheritAttrs:!1,__name:"DCodeRadioCustom",props:{modelValue:{default:void 0},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Je(),r=o,a=e,s=t.ref(a.modelValue??void 0);t.watch(()=>a.modelValue,k=>{s.value=k},{immediate:!0});const i=t.ref([]),l=t.ref(!1),c=t.ref(null),d=t.computed(()=>a.disabled||l.value||!!c.value),f=async()=>{var v,S;const k=((v=a.endpoint)==null?void 0:v.apiUrl)||a.apiUrl;if(k){l.value=!0,c.value=null;try{const N={page:1,perPage:100},V=((S=a.endpoint)==null?void 0:S.apiMethod)||a.apiMethod,L=await n(k,V,N);let O=L;a.dataPath?O=a.dataPath.split(".").reduce((R,j)=>R&&R[j]!=="undefined"?R[j]:void 0,L):typeof L=="object"&&!Array.isArray(L)&&L.data&&(O=L.data),Array.isArray(O)?i.value=O:(console.warn("DCodeRadioCustom: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(N){console.error("DCodeRadioCustom fetch error:",N),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},u=t.ref(!1);let h=null;const m=()=>{typeof document<"u"&&(u.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{var k;((k=a.endpoint)!=null&&k.apiUrl||a.apiUrl)&&f(),m(),typeof document<"u"&&(h=new MutationObserver(m),h.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),h.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),t.onBeforeUnmount(()=>{h&&h.disconnect()});const p=t.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(i.value.length>0)return i.value;const k=a.itemValue||a.model||"id",v=a.itemTitle||(a.label===""?"name":a.label);return v&&a.label!==""?[{[k]:k,[v]:v}]:[]}),y=k=>{if(typeof k!="object")return k;const v=a.itemValue||a.model||"id";return k[v]},b=k=>{if(typeof k!="object")return String(k);const v=a.itemTitle||"name";return k[v]},g=Math.random().toString(36).slice(2,7),_=t.computed(()=>a.id?`radio-custom-${a.id}`:`radio-custom-${a.model}-${g}`),E=t.computed(()=>!!a.error||!!c.value),B=t.computed(()=>a.error||c.value),A=k=>{const v=s.value;return k==null?v===k:String(v)===String(k)},C=t.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),x=k=>{const v=(k==null?void 0:k.icon)||a.icon;return No(v,Rt)},w=(k,v)=>{v.target.checked&&(s.value=k,r("update:modelValue",k),r("change",k))},D=k=>{a.disabled||A(k)||(s.value=k,r("update:modelValue",k),r("change",k))};return(k,v)=>(t.openBlock(),t.createElementBlock("div",wE,[e.label?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",CE,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",_E,[l.value?(t.openBlock(),t.createElementBlock("div",EE,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),v[0]||(v[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["grid",e.layout?"grid-cols-2 sm:grid-cols-3":"grid-cols-1","gap-3"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(S,N)=>(t.openBlock(),t.createElementBlock("div",{key:N,class:t.normalizeClass(["relative flex flex-col items-center justify-center gap-2 p-4 rounded-xl border-2 transition-all duration-200",A(y(S))?u.value?"border-primary-500 bg-primary-500/10 shadow-none":"border-primary-500 bg-primary-50 shadow-md shadow-primary-100":u.value?"border-neutral-700 bg-neutral-800 hover:border-neutral-600":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm",d.value?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:V=>!d.value&&D(y(S))},[t.createElementVNode("input",{id:e.id?`${e.id}-${N}`:`${_.value}-${N}`,name:_.value,type:"radio",value:y(S),checked:A(y(S)),disabled:d.value,required:e.required&&N===0,onChange:V=>w(y(S),V),class:"sr-only",tabindex:"-1"},null,40,SE),t.createElementVNode("div",{class:t.normalizeClass(["w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200",A(y(S))?u.value?"bg-primary-500/25 text-primary-400":"bg-primary-100 text-primary-600":u.value?"bg-neutral-700 text-neutral-500":"bg-gray-100 text-gray-400"])},[x(S)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(x(S)),{key:0,class:"w-6 h-6"})):(t.openBlock(),t.createElementBlock("svg",AE,[...v[1]||(v[1]=[t.createElementVNode("circle",{cx:"10",cy:"10",r:"6"},null,-1)])]))],2),t.createElementVNode("label",{for:e.id?`${e.id}-${N}`:`${_.value}-${N}`,class:t.normalizeClass([C.value.label,"font-medium text-center leading-tight select-none transition-colors duration-200",A(y(S))?u.value?"text-primary-400":"text-primary-700":u.value?"text-neutral-300":"text-gray-700",e.disabled?"cursor-not-allowed":"cursor-pointer"])},[t.createTextVNode(t.toDisplayString(b(S))+" ",1),e.required&&p.value.length===1&&e.label?(t.openBlock(),t.createElementBlock("span",DE,"*")):t.createCommentVNode("",!0)],10,vE)],10,BE))),128))],2),E.value&&B.value?(t.openBlock(),t.createElementBlock("div",NE,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(B.value),1)])):t.createCommentVNode("",!0)])]))}}),VE={key:0,class:"ml-1 text-destructive"},ME={class:"relative w-full"},TE={key:0,class:"mb-2 flex items-center justify-between"},PE={class:"text-sm text-muted-foreground"},OE={class:"text-sm font-medium text-foreground"},LE={class:"text-sm text-muted-foreground"},RE={class:"relative"},IE=["id","value","min","max","step","disabled","placeholder"],FE={key:1,class:"relative mt-2"},zE={class:"text-xs text-muted-foreground mt-1"},$E={key:1,class:"flex items-center gap-1 text-sm text-destructive"},jE={name:"DCodeSlider"},da=t.defineComponent({...jE,name:"DCodeSlider",inheritAttrs:!1,props:{modelValue:{default:0},min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},label:{default:""},placeholder:{default:""},required:{type:Boolean,default:!1},error:{default:null},showValue:{type:Boolean,default:!0},valuePrefix:{default:""},valueSuffix:{default:""},marks:{default:()=>[]},color:{default:"blue"},size:{default:"md"}},emits:["update:modelValue","change","input"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.ref(),i=t.ref(!1),l=t.computed(()=>!!a.error),c=t.computed(()=>`slider-${Math.random().toString(36).substr(2,9)}`),d=t.computed(()=>(a.label||n.label)??void 0),f=t.computed(()=>!0),u=t.computed(()=>{const A={sm:"h-2",md:"h-2.5",lg:"h-3"},C={blue:"accent-blue-500",green:"accent-green-500",red:"accent-red-500",yellow:"accent-yellow-500",purple:"accent-purple-500",gray:"accent-gray-500"};return["w-full appearance-none bg-transparent rounded-lg outline-none transition-all cursor-pointer relative z-10","disabled:opacity-50 disabled:cursor-not-allowed",A[a.size],C[a.color]||C.blue,l.value?"accent-red-500":"",n.class].filter(Boolean).join(" ")}),h=t.computed(()=>["appearance-none bg-white border-2 border-current rounded-full cursor-pointer transition-all","hover:scale-110 focus:scale-110","shadow-md hover:shadow-lg focus:shadow-lg","focus:outline-none focus:ring-2 focus:ring-offset-2",{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[a.size],a.color==="blue"?"focus:ring-blue-500":a.color==="green"?"focus:ring-green-500":a.color==="red"?"focus:ring-red-500":a.color==="yellow"?"focus:ring-yellow-500":a.color==="purple"?"focus:ring-purple-500":"focus:ring-gray-500"].join(" ")),m=t.computed(()=>`${a.valuePrefix}${a.modelValue}${a.valueSuffix}`),p=t.computed(()=>{const A=a.max-a.min;return(a.modelValue-a.min)/A*100}),y=A=>{const C=A.target,x=parseFloat(C.value);r("update:modelValue",x),r("input",x)},b=A=>{const C=A.target,x=parseFloat(C.value);r("change",x)},g=()=>{i.value=!0},_=()=>{i.value=!1},E=A=>{const C=a.max-a.min;return(A-a.min)/C*100},B=t.computed(()=>{const A={sm:16,md:20,lg:24};return`
|
|
89
|
+
`.trim();let a=document.getElementById(o);a||(a=document.createElement("style"),a.id=o,document.head.appendChild(a)),a.textContent=r}function H2(e,o=If){t.watch(e,n=>W2(n,o),{immediate:!0})}const q2={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},G2=["for"],K2={key:0,class:"ml-1 text-destructive"},X2=["disabled","onClick"],Y2={class:"flex-shrink-0 px-2 text-sm text-muted-foreground select-none whitespace-nowrap"},J2=["id","value","placeholder","disabled","onClick","onFocus","onBlur","onInput","onKeydown","onKeypress","onPaste"],Q2={class:"flex items-center justify-end gap-2 w-full p-2"},Z2=["disabled","onClick"],eC={key:1,class:"text-xs text-destructive"},sa=t.defineComponent({name:"DCodeDatePicker",inheritAttrs:!1,__name:"DCodeDatePicker",props:{modelValue:{},range:{type:Boolean,default:!1},autoRangeDays:{default:null},disablePast:{type:Boolean,default:!1},maxDaysAhead:{default:null},placeholder:{default:"Pilih tanggal"},label:{},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},displayFormat:{default:"dd/MM/yyyy"},modelType:{default:"yyyy-MM-dd"},locale:{default:"en"},placement:{default:"bottom-start"},prependInner:{default:void 0},error:{default:null},selectLabel:{default:"Select"},cancelLabel:{default:"Cancel"},tone:{default:"primary"},skeleton:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=e,a=o,s=Math.random().toString(36).slice(2,7),i=t.computed(()=>`dcode-datepicker-${n.id||r.label||"date-picker"}-${s}`),l=t.computed(()=>{const w=n.required,v=n["aria-required"];return w===""||w===!0||w==="true"||v==="true"||v===!0}),c=t.computed(()=>!!r.error),d=t.computed({get:()=>r.modelValue,set:w=>{a("update:modelValue",w),a("change",w)}}),f=t.computed(()=>r.locale==="en"?m2:U2),u=t.computed(()=>r.range?2:!1),h=w=>{const v=new Date(w);return v.setHours(0,0,0,0),v},m=w=>{const v=new Date(w);return v.setHours(23,59,59,999),v},p=(w,v)=>{const S=new Date(w);return S.setDate(S.getDate()+v),S},y=t.computed(()=>{if(r.disablePast)return h(new Date)}),b=t.computed(()=>{if(r.maxDaysAhead&&r.maxDaysAhead>0)return m(p(new Date,r.maxDaysAhead))}),g=t.ref(null),E=t.ref(null),_=w=>{E.value={month:w.month,year:w.year}},B=t.ref(!1);let A=null;t.onMounted(()=>{const w=document.documentElement,v=()=>B.value=w.classList.contains("dark");v(),A=new MutationObserver(v),A.observe(w,{attributes:!0,attributeFilter:["class"]})}),t.onBeforeUnmount(()=>{A==null||A.disconnect(),A=null}),H2(t.toRef(r,"tone"));const C=w=>{const v=new Date(w),S=v.getDay(),D=v.getDate()-S+(S===0?-6:1);return v.setDate(D),h(v)},x=w=>{const v=C(w);return v.setDate(v.getDate()+6),m(v)},k=w=>{const v=new Date(w);return v.setDate(1),h(v)},N=w=>{const v=new Date(w);return v.setMonth(v.getMonth()+1),v.setDate(0),m(v)};return t.computed(()=>{if(!r.range)return[];const w=new Date,v=h(w),S=C(w),D=x(w),V=k(w),R=N(w),O=(P,L)=>{let $=P;r.disablePast&&$<v&&($=v);let T=L;if(r.autoRangeDays&&r.autoRangeDays>0){const I=m(p($,r.autoRangeDays-1));T>I&&(T=I)}return T<$&&(T=m(new Date($))),[$,T]};return[{label:r.locale==="id"?"Minggu Ini":"This Week",range:O(S,D)},{label:r.locale==="id"?"Bulan Ini":"This Month",range:O(V,R)}]}),(w,v)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,r.disabled?"cursor-not-allowed":""]])},[e.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.label?(t.openBlock(),t.createElementBlock("div",q2)):t.createCommentVNode("",!0),v[2]||(v[2]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:i.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),l.value?(t.openBlock(),t.createElementBlock("span",K2,"*")):t.createCommentVNode("",!0)],8,G2)):t.createCommentVNode("",!0),t.createVNode(t.unref(Pu.VueDatePicker),{ref_key:"dpRef",ref:g,modelValue:d.value,"onUpdate:modelValue":v[1]||(v[1]=S=>d.value=S),dark:B.value,range:e.range,"multi-calendars":u.value,"auto-range":e.autoRangeDays,"max-range":e.autoRangeDays,"partial-range":!1,disabled:e.disabled,clearable:!1,"text-input":"","enable-time-picker":!1,"time-config":{enableTimePicker:!1},"auto-apply":!1,"action-row":{showPreview:!0,showNow:!1},locale:f.value,"model-type":e.modelType,formats:{input:e.displayFormat},"min-date":y.value,"max-date":b.value,floating:{placement:e.placement,offset:8,arrow:!1,flip:!1,shift:!0},teleport:!0,"menu-class-name":"dcode-datepicker-menu","calendar-class-name":"dcode-datepicker-calendar",onUpdateMonthYear:_},{"dp-input":t.withCtx(({value:S,onInput:D,onEnter:V,onTab:R,onBlur:O,onFocus:P,onKeypress:L,onPaste:$,toggleMenu:T})=>[t.createElementVNode("div",{class:t.normalizeClass(["flex items-center w-full h-10 rounded-lg border bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 overflow-hidden shadow-none transition-all duration-200 focus-within:ring-1 focus-within:ring-neutral-400 dark:focus-within:ring-neutral-600 focus-within:border-neutral-400 dark:focus-within:border-neutral-600",[c.value?"border-destructive":"",e.disabled?"opacity-50 cursor-not-allowed":"",e.readonly?"bg-neutral-50/50 dark:bg-neutral-900/30":""]])},[t.createElementVNode("button",{type:"button",tabindex:"-1",disabled:e.disabled||e.readonly,class:"flex-shrink-0 flex items-center justify-center w-10 h-full text-muted-foreground hover:text-foreground transition-colors focus:outline-none",onClick:I=>!e.disabled&&!e.readonly&&T()},[t.createVNode(t.unref(ne.Calendar),{class:"w-4 h-4 pointer-events-none"})],8,X2),v[4]||(v[4]=t.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1)),e.prependInner?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",Y2,t.toDisplayString(e.prependInner),1),v[3]||(v[3]=t.createElementVNode("span",{class:"w-px h-5 bg-gray-200 dark:bg-gray-700 flex-shrink-0"},null,-1))],64)):t.createCommentVNode("",!0),t.createElementVNode("input",{id:i.value,value:S,placeholder:e.placeholder,disabled:e.disabled,autocomplete:"off",readonly:"",class:t.normalizeClass(["flex-1 min-w-0 px-3 h-full bg-transparent text-sm text-foreground dark:text-gray-300 placeholder:text-muted-foreground outline-none",e.disabled?"cursor-not-allowed":e.readonly?"cursor-default":"cursor-pointer"]),onClick:I=>!e.disabled&&!e.readonly&&T(),onFocus:I=>P(),onBlur:I=>O(),onInput:I=>D(I),onKeydown:[t.withKeys(I=>V(I),["enter"]),t.withKeys(I=>R(I),["tab"])],onKeypress:I=>L(I),onPaste:I=>$()},null,42,J2)],2)]),"action-buttons":t.withCtx(({selectDate:S,selectionDisabled:D})=>[t.createElementVNode("div",Q2,[t.createElementVNode("button",{type:"button",class:"inline-flex items-center justify-center rounded-md text-sm font-medium border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400",onClick:v[0]||(v[0]=V=>{var R;return(R=g.value)==null?void 0:R.closeMenu()})},t.toDisplayString(e.cancelLabel),1),t.createElementVNode("button",{type:"button",disabled:D,class:"inline-flex items-center justify-center rounded-md text-sm font-medium bg-primary text-primary-foreground hover:bg-primary/90 h-9 px-4 py-2 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-400 disabled:pointer-events-none disabled:opacity-50",onClick:V=>S()},t.toDisplayString(e.selectLabel),9,Z2)])]),_:1},8,["modelValue","dark","range","multi-calendars","auto-range","max-range","disabled","locale","model-type","formats","min-date","max-date","floating"]),c.value?(t.openBlock(),t.createElementBlock("p",eC,t.toDisplayString(r.error),1)):t.createCommentVNode("",!0)],64))],2))}}),tC=t.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:o}){const n=e,r=o,a=Ee.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(Ee.DialogRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),oC=t.defineComponent({inheritAttrs:!1,__name:"DialogContent",props:{forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=Ee.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(Ee.DialogPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.DialogOverlay),{class:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"}),t.createVNode(t.unref(Ee.DialogContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Te)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default"),t.createVNode(t.unref(Ee.DialogClose),{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.X),{class:"w-4 h-4"}),l[0]||(l[0]=t.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),nC=t.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.DialogDescription),t.mergeProps(t.unref(r),{class:t.unref(Te)("text-sm text-muted-foreground",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),rC=t.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.DialogTitle),t.mergeProps(t.unref(r),{class:t.unref(Te)("text-lg font-medium leading-none tracking-tight",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),aC={key:0,class:"px-6 py-4 flex items-center justify-between border-b border-neutral-200/60 dark:border-neutral-700/50 bg-white/80 dark:bg-neutral-900/30 backdrop-blur-md sticky top-0 z-20"},sC={class:"flex items-center gap-3"},iC={class:"flex flex-col"},lC={key:0,class:"flex items-center gap-2"},cC={key:1,class:"px-6 py-4 border-t border-neutral-200/60 dark:border-neutral-700/50 bg-neutral-50/50 dark:bg-neutral-900/30 sticky bottom-0 z-20"},dC={class:"flex justify-end gap-3 flex-wrap"},lo=ft(t.defineComponent({name:"DCodeDialog",inheritAttrs:!1,__name:"DCodeDialog",props:{modelValue:{type:Boolean,default:!1},title:{default:""},icon:{default:""},maxWidth:{default:500},persistent:{type:Boolean,default:!0},contentClass:{default:"p-5"},contentStyle:{default:()=>({})},iconClass:{default:""}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=t.useAttrs(),s=t.computed(()=>{const{style:d,...f}=a;return f}),i=t.computed(()=>({maxWidth:typeof n.maxWidth=="number"?`${n.maxWidth}px`:n.maxWidth,width:"100%"})),l=t.computed(()=>n.icon?Lt[n.icon]??null:null),c=d=>{r("update:modelValue",d)};return(d,f)=>(t.openBlock(),t.createBlock(t.unref(tC),{open:e.modelValue,"onUpdate:open":c},{default:t.withCtx(()=>[t.createVNode(t.unref(oC),t.mergeProps(s.value,{style:i.value,class:"p-0 overflow-hidden rounded-xl flex flex-col max-h-[90vh] bg-white dark:bg-neutral-800 border-0",onInteractOutside:f[0]||(f[0]=u=>e.persistent?u.preventDefault():null),onEscapeKeyDown:f[1]||(f[1]=u=>e.persistent?u.preventDefault():null)}),{default:t.withCtx(()=>[e.title||d.$slots["header-append"]?(t.openBlock(),t.createElementBlock("div",aC,[t.createElementVNode("div",sC,[l.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["p-2 rounded-lg",e.iconClass||"bg-primary/10 text-primary"])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),{class:"h-5 w-5"}))],2)):t.createCommentVNode("",!0),t.createElementVNode("div",iC,[t.createVNode(t.unref(rC),{class:"text-lg font-bold text-neutral-900 dark:text-neutral-50 leading-tight"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),t.createVNode(t.unref(nC),{class:"hidden"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title||"Dialog Content"),1)]),_:1})])]),d.$slots["header-append"]?(t.openBlock(),t.createElementBlock("div",lC,[t.renderSlot(d.$slots,"header-append",{},void 0,!0)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["flex-1 overflow-y-auto custom-scrollbar",e.contentClass]),style:t.normalizeStyle(e.contentStyle)},[t.renderSlot(d.$slots,"default",{},void 0,!0)],6),d.$slots.actions?(t.openBlock(),t.createElementBlock("div",cC,[t.createElementVNode("div",dC,[t.renderSlot(d.$slots,"actions",{},void 0,!0)])])):t.createCommentVNode("",!0)]),_:3},16,["style"])]),_:3},8,["open"]))}}),[["__scopeId","data-v-52781e0f"]]),Wo=t.defineComponent({name:"DCodeLabel",inheritAttrs:!1,__name:"DCodeLabel",props:{label:{},text:{},textSize:{},textType:{},icon:{},iconClass:{}},setup(e){const o=t.useAttrs(),n=e,r=t.computed(()=>No(n.icon,Lt)),a=t.computed(()=>n.textSize?`text-${n.textSize}`:"text-xs"),s={xs:"w-3 h-3",sm:"w-3.5 h-3.5",base:"w-4 h-4",lg:"w-5 h-5",xl:"w-5 h-5","2xl":"w-6 h-6","3xl":"w-7 h-7","4xl":"w-8 h-8","5xl":"w-10 h-10","6xl":"w-12 h-12"},i=t.computed(()=>s[n.textSize??"xs"]??"w-3 h-3"),l=t.computed(()=>n.textType==="BOLD"?"font-bold":n.textType==="ITALIC"?"italic font-normal":"font-normal"),c=t.computed(()=>{const f=`${a.value} ${l.value} text-zinc-700 dark:text-zinc-400 ml-1 inline-flex items-center gap-1`,u=o.class??"";return[f,u].filter(Boolean).join(" ")}),d=t.computed(()=>{const{class:f,...u}=o;return u});return(f,u)=>(t.openBlock(),t.createElementBlock("span",t.mergeProps({class:c.value},d.value),[r.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.value),{key:0,class:t.normalizeClass(["shrink-0",i.value,e.iconClass])},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.label||e.text),1)],16))}}),fC={class:"flex flex-col gap-3 w-full"},uC={key:0,class:"col-span-full flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-dashed border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70 pointer-events-none animate-pulse"},hC={class:"flex flex-col items-center justify-center gap-2 py-6 rounded-lg border border-dashed border-slate-300 dark:border-neutral-700/50 bg-slate-50 dark:bg-neutral-900/30 text-slate-400"},mC={key:1,class:"col-span-full flex flex-col items-center justify-center text-center gap-2 px-3 py-8 bg-slate-50 dark:bg-neutral-900/10 border border-slate-200 dark:border-neutral-700/50 rounded-lg opacity-70"},pC={class:"text-sm font-medium text-slate-500"},gC={class:"flex items-center justify-between gap-2"},bC=["onClick"],yC={key:0,class:"flex items-center gap-3 px-3 py-2 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-md"},xC={class:"text-xs text-green-700 dark:text-green-400 flex-1 truncate"},kC=["onClick"],wC=["for","onDrop"],CC={class:"text-xs text-slate-500 dark:text-slate-400"},EC={key:2,class:"text-xs text-slate-400"},_C=["id","disabled","accept","onChange"],BC={class:"flex flex-col items-center justify-center min-h-[300px]"},SC=["src","alt"],AC=["src"],vC={key:2,class:"flex flex-col items-center gap-4 py-12 text-slate-400"},DC={class:"text-sm font-medium"},NC=["href"],ei=t.defineComponent({__name:"DCodeDynamicUploadList",props:{modelValue:{type:Array,default:()=>[]},label:{type:String,default:""},labelID:{type:String,default:"Documents"},labelEN:{type:String,default:"Documents"},endpoint:{type:Object,default:()=>null},endpointReference:{type:Object,default:()=>null},itemTitle:{type:String,default:"name"},itemValue:{type:String,default:"id"},disabled:Boolean,required:Boolean,typeFile:{type:String,default:void 0},sizeFile:{type:Number,default:void 0},items:{type:Array,default:void 0},baseUrl:{type:String,default:void 0}},emits:["update:modelValue","uploaded","success"],setup(e,{emit:o}){const n=e,r=o,{t:a,locale:s}=_t.useI18n(),i=t.computed(()=>{const C=n.endpoint;if(!(C!=null&&C.apiUrl))return null;let x=C.apiUrl;if(!x.startsWith("http")&&n.baseUrl){const k=n.baseUrl.replace(/\/$/,""),N=x.startsWith("/")?x:`/${x}`;x=`${k}${N}`}return x}),l=t.computed(()=>{const C=c.value.length;return C<=1?"grid-cols-1":C===2?"grid-cols-1 md:grid-cols-2":C===3?"grid-cols-1 md:grid-cols-3 xl:grid-cols-4":C===4?"grid-cols-1 md:grid-cols-2 lg:grid-cols-3":"grid-cols-1 md:grid-cols-2 lg:grid-cols-4"}),c=t.ref([]),d=t.ref([]),f=t.ref(new Set),u=t.ref(!0),h=t.ref(!1),m=t.ref(""),p=t.ref(""),y=t.ref(""),b=async()=>{var C;if(u.value=!0,n.items!==void 0){c.value=n.items,u.value=!1;return}if(!((C=n.endpointReference)!=null&&C.apiUrl)){u.value=!1;return}try{const{apiUrl:x}=Je(),k=await x(n.endpointReference.apiUrl,n.endpointReference.apiMethod||"GET",{page:1,perPage:100});if(n.items!==void 0){u.value=!1;return}let N=(k==null?void 0:k.data)||k;Array.isArray(N)||(N=[N]),c.value=N}catch(x){console.error("Failed to fetch dynamic document list",x)}finally{u.value=!1}};t.onMounted(()=>{Array.isArray(n.modelValue)&&n.modelValue.length>0&&(d.value=JSON.parse(JSON.stringify(n.modelValue))),b()}),t.onBeforeUnmount(()=>{d.value.forEach(C=>{C._localPreviewUrl&&URL.revokeObjectURL(C._localPreviewUrl)})}),t.watch(()=>n.modelValue,C=>{if(Array.isArray(C)&&JSON.stringify(C)!==JSON.stringify(d.value)){const x=JSON.parse(JSON.stringify(C));x.forEach(k=>{const N=d.value.find(w=>w.typeDocument===k.typeDocument||w.idDocumentType===k.idDocumentType);N!=null&&N._localPreviewUrl&&(k._localPreviewUrl=N._localPreviewUrl)}),d.value=x}},{deep:!0}),t.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiUrl},(C,x)=>{C!==x&&b()}),t.watch(()=>{var C;return(C=n.endpointReference)==null?void 0:C.apiMethod},(C,x)=>{C!==x&&b()}),t.watch(()=>n.items,C=>{c.value=C??[],u.value=!1},{deep:!0,immediate:!0});const g=C=>{const x=C[n.itemValue]||C.id||C.typeDocument;return d.value.find(k=>k.typeDocument===x||k.idDocumentType===x||k[n.itemValue]===x)||null},E=async(C,x,k)=>{var D,V,R,O;const N=k.target,w=(D=N.files)==null?void 0:D[0];if(!w)return;const v=C[n.itemValue]||C.id||C.typeDocument,S=URL.createObjectURL(w);if(!i.value){const P=[...d.value],L=P.findIndex(T=>T.typeDocument===v||T.idDocumentType===v);(V=P[L])!=null&&V._localPreviewUrl&&URL.revokeObjectURL(P[L]._localPreviewUrl);const $={id:null,idDocument:null,idDocumentType:v,filename:w.name,document:v,documentUrl:w.name,typeDocument:v,_localPreviewUrl:S,_fileType:w.type};L>-1?P[L]={...P[L],...$}:P.push($),d.value=P,r("update:modelValue",P);return}f.value.add(x);try{const{apiUrl:P}=Je(),L=new FormData;L.append("doc",w),L.append("typeDocument",String(v));const $=await P(i.value,((R=n.endpoint)==null?void 0:R.apiMethod)||"POST",L),T=Array.isArray($==null?void 0:$.data)?$.data[0]:($==null?void 0:$.data)||$,I=(T==null?void 0:T.url)||(T==null?void 0:T.document)||w.name,H=(T==null?void 0:T.id)||null,q=(T==null?void 0:T.filename)||(T==null?void 0:T.name)||w.name,W=[...d.value],Z=W.findIndex(xe=>xe.typeDocument===v||xe.idDocumentType===v);(O=W[Z])!=null&&O._localPreviewUrl&&URL.revokeObjectURL(W[Z]._localPreviewUrl);const te={...T,id:H||(T==null?void 0:T.idDocument)||(T==null?void 0:T.id_document)||null,idDocument:(T==null?void 0:T.idDocument)||H||(T==null?void 0:T.id_document)||null,idDocumentType:v,filename:q,document:v,documentUrl:I,typeDocument:v,_localPreviewUrl:S,_fileType:w.type};Z>-1?W[Z]={...W[Z],...te}:W.push(te),d.value=W,r("update:modelValue",W),r("uploaded",T),r("success",T)}catch(P){console.error("Upload failed",P)}finally{f.value.delete(x),N.value=""}},_=C=>{const x=C[n.itemValue]||C.id||C.typeDocument,k=d.value.find(w=>w.typeDocument===x||w.idDocumentType===x);k!=null&&k._localPreviewUrl&&URL.revokeObjectURL(k._localPreviewUrl);const N=d.value.filter(w=>w.typeDocument!==x&&w.idDocumentType!==x);d.value=N,r("update:modelValue",N)},B=C=>{const x=g(C);if(!x)return;let k=x._localPreviewUrl;if(!k)if(x.server&&x.url){const v=x.server.replace(/\/+$/,""),S=x.url.replace(/^\/+/,"");k=`${v}/${S}`}else k=x.document||x.url;if(!k)return;const N=x.mime||x._fileType||"",w=N==="application/pdf"||k.toLowerCase().endsWith(".pdf");w&&!k.includes("#")&&(k+="#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"),m.value=k,p.value=C[n.itemTitle]||C.name||x.filename||"Preview Document",y.value=N||(w?"application/pdf":"image/jpeg"),h.value=!0},A=(C,x,k)=>{var v,S;k.preventDefault();const N=(S=(v=k.dataTransfer)==null?void 0:v.files)==null?void 0:S[0];if(!N)return;E(C,x,{target:{files:[N],value:""}})};return(C,x)=>(t.openBlock(),t.createElementBlock("div",fC,[e.label||e.labelID||e.labelEN?(t.openBlock(),t.createBlock(Wo,{key:0,text:e.label||(t.unref(s).toLowerCase().startsWith("en")?e.labelEN:e.labelID),class:"font-semibold text-sm text-slate-700 dark:text-slate-300",required:e.required},null,8,["text","required"])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["w-full grid gap-4",l.value])},[c.value.length===0&&u.value?(t.openBlock(),t.createElementBlock("div",uC,[t.createVNode(Wo,{text:t.unref(a)("dynamicUploadList.loadingDocs"),class:"font-semibold text-sm text-slate-700 dark:text-neutral-300"},null,8,["text"]),t.createElementVNode("div",hC,[t.createVNode(t.unref(ne.Loader2),{class:"w-6 h-6 animate-spin"})])])):c.value.length===0&&!u.value?(t.openBlock(),t.createElementBlock("div",mC,[t.createVNode(t.unref(ne.CheckCircle2),{class:"w-6 h-6 text-slate-400"}),t.createElementVNode("span",pC,t.toDisplayString(t.unref(a)("dynamicUploadList.noDocsRequired")),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(k,N)=>{var w;return t.openBlock(),t.createElementBlock("div",{key:N,class:"flex flex-col gap-2 p-3 bg-white dark:bg-neutral-800 border border-slate-200 dark:border-neutral-700/50 rounded-lg shadow-sm"},[t.createElementVNode("div",gC,[t.createVNode(Wo,{text:k[e.itemTitle]||k.name||k.filename||"Upload Document",class:"font-semibold text-sm text-slate-700 dark:text-neutral-300 truncate flex-1"},null,8,["text"]),g(k)?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"p-1 hover:bg-slate-100 dark:hover:bg-zinc-700 rounded transition-colors text-slate-400 hover:text-primary-500",onClick:v=>B(k)},[t.createVNode(t.unref(ne.Eye),{class:"w-4 h-4"})],8,bC)):t.createCommentVNode("",!0)]),g(k)?(t.openBlock(),t.createElementBlock("div",yC,[t.createVNode(t.unref(ne.CheckCircle2),{class:"w-4 h-4 text-green-600 shrink-0"}),t.createElementVNode("span",xC,t.toDisplayString(((w=g(k))==null?void 0:w.filename)||t.unref(a)("dynamicUploadList.fileUploaded")),1),e.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"text-red-400 hover:text-red-600 transition-colors",onClick:v=>_(k)},[t.createVNode(t.unref(ne.X),{class:"w-4 h-4"})],8,kC))])):(t.openBlock(),t.createElementBlock("label",{key:1,for:`dyn-upload-input-${N}`,class:t.normalizeClass(["flex flex-col items-center justify-center gap-2 py-8 rounded-lg border-2 border-dashed transition-colors cursor-pointer",[e.disabled?"border-slate-200 bg-slate-50 cursor-not-allowed opacity-60":"border-slate-300 dark:border-slate-600 bg-slate-50 dark:bg-slate-800 hover:border-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/10",f.value.has(N)?"pointer-events-none opacity-70":""]]),onDragover:x[0]||(x[0]=t.withModifiers(()=>{},["prevent"])),onDrop:v=>!e.disabled&&!f.value.has(N)&&A(k,N,v)},[f.value.has(N)?(t.openBlock(),t.createBlock(t.unref(ne.Loader2),{key:0,class:"w-6 h-6 animate-spin text-primary-500"})):(t.openBlock(),t.createBlock(t.unref(ne.Upload),{key:1,class:"w-6 h-6 text-slate-400"})),t.createElementVNode("span",CC,t.toDisplayString(f.value.has(N)?t.unref(a)("dynamicUploadList.uploading"):t.unref(a)("dynamicUploadList.clickOrDrag")),1),e.typeFile?(t.openBlock(),t.createElementBlock("span",EC,t.toDisplayString(e.typeFile),1)):t.createCommentVNode("",!0),t.createElementVNode("input",{id:`dyn-upload-input-${N}`,type:"file",class:"sr-only",disabled:e.disabled||f.value.has(N),accept:e.typeFile,onChange:v=>E(k,N,v)},null,40,_C)],42,wC))])}),128))],2),t.createVNode(lo,{modelValue:h.value,"onUpdate:modelValue":x[2]||(x[2]=k=>h.value=k),title:p.value,"max-width":y.value==="application/pdf"?"720":"500",class:t.normalizeClass(y.value==="application/pdf"?"max-w-[40vw]":""),"content-class":y.value==="application/pdf"?"p-0 overflow-hidden":"px-6 py-1 overflow-y-auto"},{actions:t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"px-4 py-2 border border-slate-200 dark:border-zinc-700 rounded-md text-sm font-medium hover:bg-slate-50 dark:hover:bg-zinc-800 transition-colors",onClick:x[1]||(x[1]=k=>h.value=!1)},t.toDisplayString(t.unref(a)("common.close")||"Close"),1)]),default:t.withCtx(()=>[t.createElementVNode("div",BC,[y.value.startsWith("image/")?(t.openBlock(),t.createElementBlock("img",{key:0,src:m.value,alt:p.value,class:"w-full h-auto max-h-[72vh] object-contain rounded-lg shadow-md"},null,8,SC)):y.value==="application/pdf"?(t.openBlock(),t.createElementBlock("iframe",{key:1,src:`${m.value}${m.value.includes("#")?"":"#toolbar=0&navpanes=0&scrollbar=0&view=FitH&pagemode=none"}`,class:"w-full h-[70vh] rounded-lg border border-slate-200",title:"Document Preview"},null,8,AC)):(t.openBlock(),t.createElementBlock("div",vC,[t.createVNode(t.unref(ne.FileText),{class:"w-16 h-16 stroke-1"}),t.createElementVNode("span",DC,t.toDisplayString(t.unref(a)("dynamicUploadList.noSupportPreview")||"Preview not supported for this file type"),1),t.createElementVNode("a",{href:m.value,target:"_blank",class:"px-4 py-2 bg-primary-500 text-white rounded-md text-sm font-semibold hover:bg-primary-600 transition-colors"},t.toDisplayString(t.unref(a)("dynamicUploadList.viewOriginal")||"View Original"),9,NC)]))])]),_:1},8,["modelValue","title","max-width","class","content-class"])]))}}),Ff=t.defineComponent({name:"DCodeDialogCloseBtn",__name:"DCodeDialogCloseBtn",props:{icon:{default:"X"},iconSize:{default:22}},setup(e){const o=e,n=t.computed(()=>Lt[o.icon]??Lt.X);return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Pt),{type:"button",variant:"secondary",size:"icon",class:"rounded-full shadow-sm"},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.value),{size:Number(e.iconSize)},null,8,["size"]))]),_:1}))}}),VC=t.defineComponent({__name:"Alert",props:{class:{type:[Boolean,null,String,Object,Array]},variant:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)(t.unref(TC)({variant:e.variant}),o.class)),role:"alert"},[t.renderSlot(n.$slots,"default")],2))}}),MC=t.defineComponent({__name:"AlertDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("text-sm [&_p]:leading-relaxed",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),TC=yr("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ti=t.defineComponent({__name:"Badge",props:{variant:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)(t.unref(PC)({variant:e.variant}),o.class))},[t.renderSlot(n.$slots,"default")],2))}}),PC=yr("inline-flex gap-1 items-center rounded-full border px-2.5 py-0.5 text-xs font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),oi=t.defineComponent({__name:"Card",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("rounded-xl border bg-card text-card-foreground shadow",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),ni=t.defineComponent({__name:"CardContent",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("p-6 pt-0",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),ri=t.defineComponent({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(Te)("flex flex-col gap-y-1.5 p-6",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),ai=t.defineComponent({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createElementBlock("h3",{class:t.normalizeClass(t.unref(Te)("font-medium leading-none tracking-tight",o.class))},[t.renderSlot(n.$slots,"default")],2))}}),OC={class:"h-full w-full p-6 flex flex-col items-center justify-center text-center gap-2"},RC={class:"flex flex-wrap items-center justify-center gap-2"},LC=["accept","multiple"],ia=ft(t.defineComponent({name:"DCodeDropzone",__name:"DCodeDropzone",props:{label:{default:"Upload File"},hint:{default:"Drag & drop file di sini atau klik area ini"},accept:{default:"*/*"},maxSizeMb:{default:2},mode:{default:"single"},disabled:{type:Boolean,default:!1},showSelected:{type:Boolean,default:!0},error:{default:null}},emits:["picked","picked:multiple","error"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null),s=t.ref(!1),i=t.ref(null),l=t.ref(null),c=t.ref(null);t.computed(()=>n.accept||"file/*");const d=t.computed(()=>n.error??i.value);function f(){var x;n.disabled||(x=a.value)==null||x.click()}function u(x){const k=x/1024,N=k/1024;return N>=1?`${N.toFixed(2)} MB`:k>=1?`${k.toFixed(1)} KB`:`${x} B`}function h(x){var N;if(!x)return"File tidak valid";if((N=n.accept)!=null&&N.includes("image/")&&!x.type.startsWith("image/"))return"Hanya file gambar yang diizinkan";const k=(n.maxSizeMb??2)*1024*1024;return x.size>k?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null}function m(x){l.value=x.name,c.value=x.size}function p(x){if(i.value=null,!x.length)return;if(n.mode==="single"){const N=x[0],w=h(N);if(w){i.value=w,r("error",w);return}n.showSelected&&m(N),r("picked",N);return}const k=[];for(const N of x){const w=h(N);if(w){i.value=w,r("error",w);return}k.push(N)}k.length&&(n.showSelected&&m(k[0]),r("picked:multiple",k))}function y(x){const k=x.target,N=Array.from(k.files??[]);p(N),k.value=""}function b(){n.disabled||(s.value=!0)}function g(){n.disabled||(s.value=!0)}function E(){s.value=!1}function _(x){var w,v;if(n.disabled)return;s.value=!1;const k=Array.from(((w=x.dataTransfer)==null?void 0:w.files)??[]),N=(v=n.accept)!=null&&v.includes("image/")?k.filter(S=>S.type.startsWith("image/")):k;p(N)}const B=t.computed(()=>(n.accept||"file/*").split(",").map(x=>x.trim()).filter(Boolean).map(x=>x==="image/*"?"IMAGE":x.replace(/^image\//,"").replace(/^\./,"")).join(", "));t.computed(()=>`${n.maxSizeMb??0}MB`);const A=t.ref(!1),C=t.computed(()=>{if(n.disabled||!A.value)return{};const x=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark");return{borderColor:x?"hsl(var(--primary) / 0.5)":"hsl(var(--primary) / 0.6)",backgroundColor:x?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"}});return(x,k)=>(t.openBlock(),t.createBlock(t.unref(oi),{class:t.normalizeClass([e.disabled?"opacity-60":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(t.unref(ri),{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(t.unref(ai),{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1})]),_:1}),t.createVNode(t.unref(ni),{class:"pt-2"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["d-dropzone-area flex justify-center items-center rounded-xl border-2 border-dashed transition cursor-pointer select-none",[s.value?"is-dragging border-primary bg-primary/10 dark:bg-primary/20 -translate-y-[1px]":"border-border dark:border-neutral-700 bg-muted/30 dark:bg-neutral-800/50",e.disabled?"is-disabled":""]]),style:t.normalizeStyle([{minHeight:"190px"},C.value]),onClick:f,onDragenter:t.withModifiers(b,["prevent"]),onDragover:t.withModifiers(g,["prevent"]),onDragleave:t.withModifiers(E,["prevent"]),onDrop:t.withModifiers(_,["prevent"]),onMouseenter:k[0]||(k[0]=N=>A.value=!0),onMouseleave:k[1]||(k[1]=N=>A.value=!1)},[t.createElementVNode("div",OC,[k[2]||(k[2]=t.createElementVNode("div",{class:"text-sm font-medium dark:text-neutral-200"},"Drag & drop file di sini",-1)),k[3]||(k[3]=t.createElementVNode("div",{class:"text-xs text-muted-foreground dark:text-neutral-400"},"atau klik area ini untuk memilih file",-1)),t.createElementVNode("div",RC,[t.createVNode(t.unref(ti),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(" Allowed: "+t.toDisplayString(B.value),1)]),_:1}),t.createVNode(t.unref(ti),{variant:"secondary",class:"text-[11px] dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(" Max: "+t.toDisplayString(n.maxSizeMb)+"MB ",1)]),_:1})]),e.showSelected&&l.value?(t.openBlock(),t.createBlock(t.unref(ti),{key:0,variant:"secondary",class:"mt-2 dark:bg-neutral-800 dark:text-neutral-300"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.value)+" • "+t.toDisplayString(c.value?u(c.value):""),1)]),_:1})):t.createCommentVNode("",!0)]),t.createElementVNode("input",{ref_key:"fileInputEl",ref:a,type:"file",class:"hidden",accept:e.accept,multiple:e.mode==="multiple",onChange:y},null,40,LC)],38),d.value?(t.openBlock(),t.createBlock(t.unref(VC),{key:0,variant:"destructive",class:"mt-3"},{default:t.withCtx(()=>[t.createVNode(t.unref(MC),{class:"text-sm"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.value),1)]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1},8,["class"]))}}),[["__scopeId","data-v-d8943808"]]),IC={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},FC=["src"],zC={key:1,class:"h-full w-full flex flex-col items-center justify-center text-muted-foreground dark:text-neutral-400 gap-2 p-4 text-center"},$C={class:"space-y-0.5"},jC={class:"text-sm font-medium truncate max-w-[180px] dark:text-neutral-200"},UC={class:"text-xs opacity-70"},WC=["disabled"],HC={key:1},qC=["disabled"],GC={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},KC={class:"flex gap-2"},XC={class:"font-medium truncate"},YC={class:"flex gap-2"},JC={class:"font-medium"},QC={class:"flex gap-2"},ZC={class:"font-medium truncate"},si=ft(t.defineComponent({name:"DCodeFileResult",__name:"DCodeFileResult",props:{file:{},title:{default:"File Terpilih"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0},forceFileIcon:{type:Boolean,default:!1}},emits:["edit","replace","remove"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null),s=t.computed(()=>n.forceFileIcon||!n.file?!1:(n.file.type||"").startsWith("image/"));t.watch(()=>n.file,m=>{a.value&&URL.revokeObjectURL(a.value),a.value=m?URL.createObjectURL(m):null},{immediate:!0}),t.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),f&&f.disconnect()});function i(m){const p=m/1024,y=p/1024;return y>=1?`${y.toFixed(2)} MB`:p>=1?`${p.toFixed(1)} KB`:`${m} B`}const l=t.computed(()=>n.file?{name:n.file.name,size:i(n.file.size),type:n.file.type||"unknown"}:null),c=t.ref(!1),d=t.ref(!1);let f=null;const u=()=>{typeof document<"u"&&(d.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{u(),typeof document<"u"&&(f=new MutationObserver(u),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),f.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const h=t.computed(()=>n.disabled||!c.value?{}:{borderColor:d.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:d.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(m,p)=>e.file?(t.openBlock(),t.createBlock(oi,{key:0,class:t.normalizeClass([e.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(ri,{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(ai,{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),e.description?(t.openBlock(),t.createElementBlock("div",IC,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),_:1}),t.createVNode(ni,{class:"pt-2"},{default:t.withCtx(()=>{var y,b,g,E,_;return[t.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:t.normalizeStyle([{height:`${e.previewHeight}px`},h.value]),onMouseenter:p[2]||(p[2]=B=>c.value=!0),onMouseleave:p[3]||(p[3]=B=>c.value=!1)},[s.value&&a.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,FC)):(t.openBlock(),t.createElementBlock("div",zC,[t.createVNode(t.unref(ne.FileText),{class:"w-10 h-10"}),t.createElementVNode("div",$C,[t.createElementVNode("p",jC,t.toDisplayString((y=l.value)==null?void 0:y.name),1),t.createElementVNode("p",UC,t.toDisplayString((b=l.value)==null?void 0:b.size),1)])])),t.createElementVNode("div",{class:"d-action-buttons",style:t.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:c.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:c.value?"auto":"none"})},[e.showEdit&&s.value?(t.openBlock(),t.createElementBlock("button",{key:0,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[0]||(p[0]=B=>r("edit"))},[t.createVNode(t.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,WC)):(t.openBlock(),t.createElementBlock("div",HC)),e.showRemove?(t.openBlock(),t.createElementBlock("button",{key:2,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s"}),onClick:p[1]||(p[1]=B=>r("remove"))},[t.createVNode(t.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,qC)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"d-metadata-overlay",style:t.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:c.value?1:0,transform:c.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:d.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:d.value?"#e5e5e5":"#171717"})},[t.createElementVNode("div",GC,[t.createElementVNode("div",KC,[p[4]||(p[4]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),t.createElementVNode("span",XC,t.toDisplayString((g=l.value)==null?void 0:g.name),1)]),t.createElementVNode("div",YC,[p[5]||(p[5]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),t.createElementVNode("span",JC,t.toDisplayString((E=l.value)==null?void 0:E.size),1)]),t.createElementVNode("div",QC,[p[6]||(p[6]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),t.createElementVNode("span",ZC,t.toDisplayString((_=l.value)==null?void 0:_.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-bb5c9599"]]);function ii(){const e=s=>{var c;const i={type:s.type||"info",title:s.title,message:s.message,duration:s.duration??3e3};typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:toast",{detail:i,bubbles:!0,composed:!0})),(i.type==="error"?console.error:i.type==="warning"?console.warn:console.log)(`[Toast][${(c=i.type)==null?void 0:c.toUpperCase()}]`,i.title||"",i.message)};return{show:e,success:(s,i)=>e({type:"success",message:s,title:i}),error:(s,i)=>e({type:"error",message:s,title:i}),warning:(s,i)=>e({type:"warning",message:s,title:i}),info:(s,i)=>e({type:"info",message:s,title:i})}}const eE={class:"space-y-3"},tE={key:1,class:"flex items-center justify-center p-6 border rounded-lg bg-muted/30 dark:bg-neutral-800/20 dark:border-neutral-800"},zf=t.defineComponent({name:"DCodeFileField",inheritAttrs:!1,__name:"DCodeFileField",props:{modelValue:{default:null},label:{default:"Upload File"},hint:{},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:void 0},allowedTypes:{default:null},accept:{default:"*/*"},minSizeMb:{default:null},maxSizeMb:{default:1},endpoint:{},uploadFn:{}},emits:["update:modelValue","error","uploaded"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:C=>r("update:modelValue",C)}),s=t.ref(null),i=t.ref(null);function l(C){i.value=C,r("error",C)}function c(){i.value=null}const d=t.computed(()=>{const C=(n.allowedTypes??"").trim();return C?C.split(/[,\s;]+/g).map(k=>k.trim().toLowerCase()).filter(Boolean).map(k=>k.includes("/")||k.startsWith(".")?k:`.${k}`):[]});function f(C){const x=C.lastIndexOf(".");return x>=0?C.slice(x).toLowerCase():""}const u=t.computed(()=>{if(d.value.length){const C=d.value.filter(k=>k.startsWith("."));return[...d.value.filter(k=>k.includes("/")),...C].join(",")}return n.accept}),h=t.computed(()=>d.value.length?d.value.join(", "):n.accept||"Semua File");function m(C){if(d.value.length){const x=(C.type||"").toLowerCase(),k=f(C.name);return d.value.some(N=>N.includes("/")?x===N:N.startsWith(".")?k===N:k===`.${N}`)}if(n.accept){if(n.accept==="*/*")return!0;const x=n.accept.split(",").map(w=>w.trim().toLowerCase()),k=(C.type||"").toLowerCase(),N=f(C.name);return x.some(w=>{if(w.endsWith("/*")){const v=w.slice(0,-2);return k.startsWith(v)}return w.startsWith(".")?N===w:k===w})}return!0}function p(C){return C*1024*1024}async function y(C){return C?m(C)?n.minSizeMb!=null&&C.size<p(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&C.size>p(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:null:`File Type not allowed. Allowed: ${h.value}`:"File tidak valid"}const{DCodeApi:b}=Je(),g=ii(),E=t.ref(!1);async function _(C){var x;if(n.uploadFn){try{E.value=!0;const k=await n.uploadFn(C);a.value=C,r("uploaded",k)}catch(k){console.error("Upload Error",k),g.error("Upload Failed",(k==null?void 0:k.message)||"Unknown error"),l((k==null?void 0:k.message)||"Upload Failed")}finally{E.value=!1}return}if(!((x=n.endpoint)!=null&&x.apiUrl)){a.value=C;return}if(typeof b!="function"){l("useApi() must expose DCodeApi()");return}try{E.value=!0;const k=new FormData;k.append("doc",C);const N=(n.endpoint.apiMethod||"POST").toUpperCase(),w=n.endpoint.apiUrl,v=await b("","",k,{_url:w,_method:N,withCredentials:!0,transformRequest:[(D,V)=>(V&&(delete V["Content-Type"],delete V["content-type"]),D)]}),S=(v==null?void 0:v.data)??v;a.value=C,r("uploaded",S)}catch(k){console.error("Upload Error",k),g.error("Upload Failed",(k==null?void 0:k.message)||"Unknown error"),l((k==null?void 0:k.message)||"Upload Failed")}finally{E.value=!1}}async function B(C){var k;if(n.disabled)return;c();const x=await y(C);if(x){l(x);return}s.value=C,n.uploadFn||(k=n.endpoint)!=null&&k.apiUrl?await _(C):a.value=C}function A(){c(),a.value=null,s.value=null}return t.watch(()=>n.modelValue,C=>{C&&!s.value&&(s.value=C),C||(s.value=null)},{immediate:!0}),(C,x)=>(t.openBlock(),t.createElementBlock("div",eE,[a.value?E.value?(t.openBlock(),t.createElementBlock("div",tE,[...x[1]||(x[1]=[t.createElementVNode("span",{class:"text-sm text-muted-foreground dark:text-neutral-400 animate-pulse"},"Uploading...",-1)])])):(t.openBlock(),t.createBlock(si,{key:2,file:a.value,title:e.label,description:e.hint,disabled:e.disabled,"show-edit":!1,"show-replace":!1,"show-remove":!0,"force-file-icon":!0,"preview-height":e.previewHeight,"preview-width":e.previewWidth,onRemove:A},null,8,["file","title","description","disabled","preview-height","preview-width"])):(t.openBlock(),t.createBlock(ia,{key:0,label:e.label,hint:e.hint,accept:u.value,maxSizeMb:e.maxSizeMb,disabled:e.disabled||E.value,onPicked:B,error:i.value,onError:x[0]||(x[0]=k=>l(k))},null,8,["label","hint","accept","maxSizeMb","disabled","error"]))]))}}),oE=["for"],nE={key:0,class:"!ml-1 !text-destructive"},rE={class:"relative w-full block box-border"},aE={key:0,class:"absolute inset-y-0 left-3 flex items-center text-muted-foreground pointer-events-none z-10"},sE=["id","readonly","disabled","placeholder"],iE={class:"absolute inset-y-0 right-4 flex items-center z-10"},lE={key:1,class:"absolute z-50 mt-1 w-full rounded-xl border bg-white dark:bg-neutral-800 border-neutral-200/60 dark:border-neutral-700/50 shadow-lg box-border"},cE={key:0,class:"flex items-center justify-center py-10 text-muted-foreground gap-2"},dE={key:1,class:"text-sm text-muted-foreground text-center"},fE=["onClick","title"],uE={class:"flex flex-col items-center justify-between gap-2 py-1 min-h-[72px]"},hE={class:"flex items-center justify-center flex-1"},mE={class:"text-[10px] leading-tight text-muted-foreground truncate w-full text-center block flex-shrink-0"},pE={key:3,class:"pt-2 text-[11px] text-muted-foreground text-center"},$f=t.defineComponent({name:"DCodeIconDropdown",__name:"DCodeIconDropdown",props:{modelValue:{},label:{},placeholder:{default:"Pilih icon…"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},columns:{default:4},maxHeight:{default:"335px"},iconSize:{default:20},pageSize:{default:120}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=e,r=o,a=Lt,s=t.ref(null),i=t.ref(null),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`dcode-icon-dropdown-${n.label||"icon-dropdown"}-${l}`),d=t.ref(!1),f=t.computed(()=>(n.modelValue??"").trim()||""),u=t.ref(""),h=t.ref(!1),m=t.ref(!1),p=t.ref(!1),y=t.shallowRef([]),b=t.ref(n.pageSize),g=new Set(["default","createLucideIcon","LucideIcon","Icon","icons","toKebabCase","camelCase","children","IconNode"]),E=async()=>{if(m.value||p.value)return;p.value=!0,await new Promise(I=>setTimeout(I,0));const T=Object.keys(a).filter(I=>!g.has(I)).filter(I=>/^[A-Z]/.test(I)).filter(I=>typeof a[I]=="function"||typeof a[I]=="object"&&a[I]).sort((I,H)=>I.localeCompare(H));y.value=T,m.value=!0,p.value=!1},_=t.computed(()=>f.value?No(f.value,a):null),B=t.ref(f.value),A=t.computed(()=>!!f.value&&!d.value),C=t.computed(()=>{if(!m.value)return[];const T=(u.value??"").trim().toLowerCase();return T?y.value.filter(I=>I.toLowerCase().includes(T)):y.value}),x=t.computed(()=>C.value.slice(0,b.value)),k=t.computed(()=>{const T=n.columns;return T<=2?"grid-cols-2":T===3?"grid-cols-3":T===4?"grid-cols-4":T===5?"grid-cols-5":T>=8?"grid-cols-8":"grid-cols-6"});t.computed(()=>n.clearable?"!pr-10":"!pr-3"),t.computed(()=>_.value&&!d.value?"!pl-12":"!pl-3");const N=async()=>{var T;await t.nextTick(),(T=i.value)==null||T.focus()},w=async T=>{if(n.disabled)return;const I=T!==!1;if(h.value){h.value=!1;return}d.value=!0,await E(),I&&(u.value="",B.value=""),b.value=n.pageSize,await N()},v=()=>{d.value=!1,u.value="",B.value=f.value,b.value=n.pageSize},S=async()=>{n.disabled||(d.value?v():await w())};let D=null;const V=async T=>{if(n.disabled)return;r("update:modelValue",null),d.value||await w(!1),D&&clearTimeout(D);const I=B.value;D=setTimeout(()=>{u.value=I},300)},R=T=>{n.disabled||(r("update:modelValue",T),v(),queueMicrotask(()=>{var I;return(I=i.value)==null?void 0:I.blur()}))},O=()=>{n.disabled||(r("update:modelValue",null),r("clear"),h.value=!0,v(),queueMicrotask(()=>{var T;return(T=i.value)==null?void 0:T.focus()}))},P=T=>{if(T.key==="Escape"){T.preventDefault(),v();return}if(T.key==="Enter"&&d.value){const I=C.value[0];I&&(T.preventDefault(),R(I))}},L=T=>{if(!d.value)return;const I=T.target;s.value&&!s.value.contains(I)&&v()},$=T=>{const I=T.target;I.scrollTop+I.clientHeight>=I.scrollHeight-24&&b.value<C.value.length&&(b.value=Math.min(b.value+n.pageSize,C.value.length))};return t.onMounted(()=>{document.addEventListener("mousedown",L),queueMicrotask(()=>{var T;i.value=((T=s.value)==null?void 0:T.querySelector("input"))??null}),f.value&&E()}),t.onBeforeUnmount(()=>{document.removeEventListener("mousedown",L),D&&clearTimeout(D)}),t.watch(f,T=>{d.value||(B.value=T)}),t.watch(()=>u.value,()=>{b.value=n.pageSize}),(T,I)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"rootEl",ref:s,class:"!w-full !block !box-border"},[n.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"!text-sm !font-medium !mb-1 !block"},[t.createTextVNode(t.toDisplayString(n.label)+" ",1),n.required?(t.openBlock(),t.createElementBlock("span",nE,"*")):t.createCommentVNode("",!0)],8,oE)):t.createCommentVNode("",!0),t.createElementVNode("div",rE,[_.value&&!d.value?(t.openBlock(),t.createElementBlock("div",aE,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(_.value),{size:18}))])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("input",{id:c.value,"onUpdate:modelValue":I[0]||(I[0]=H=>B.value=H),readonly:A.value,disabled:n.disabled,placeholder:n.placeholder,class:t.normalizeClass(["w-full h-10 m-0 py-0 rounded-lg border bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 pr-10 outline-none box-border truncate",[_.value&&!d.value?"pl-10":"pl-4",A.value?"cursor-pointer select-none":""]]),onClick:w,onFocus:w,onInput:V,onKeydown:P},null,42,sE),[[t.vModelText,B.value]]),t.createElementVNode("div",iE,[n.clearable&&f.value?(t.openBlock(),t.createElementBlock("button",{key:0,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition cursor-pointer outline-none",onMousedown:I[1]||(I[1]=t.withModifiers(()=>{},["prevent"])),onClick:O,title:"Clear"},[t.createVNode(t.unref(ne.X),{class:"h-4 w-4"})],32)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",class:"flex items-center justify-center p-1 m-0 bg-transparent border-0 text-muted-foreground hover:text-foreground transition-transform cursor-pointer outline-none",onMousedown:I[2]||(I[2]=t.withModifiers(()=>{},["prevent"])),onClick:S,title:"Open"},[t.createVNode(t.unref(ne.ChevronDown),{class:"h-4 w-4"})],32))]),d.value?(t.openBlock(),t.createElementBlock("div",lE,[t.createElementVNode("div",{class:"p-2 overflow-auto",style:t.normalizeStyle({maxHeight:n.maxHeight}),onScroll:$},[p.value?(t.openBlock(),t.createElementBlock("div",cE,[t.createVNode(t.unref(ne.Loader2),{class:"h-4 w-4 animate-spin"}),I[3]||(I[3]=t.createElementVNode("span",{class:"text-sm"},"Loading icons…",-1))])):m.value&&C.value.length===0?(t.openBlock(),t.createElementBlock("div",dE," Icon tidak ditemukan ")):(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["grid gap-2",k.value])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(x.value,H=>(t.openBlock(),t.createElementBlock("button",{key:H,type:"button",class:t.normalizeClass(["group rounded-lg border p-2 hover:bg-muted/40 transition",f.value===H?"ring-1 ring-primary":""]),onClick:q=>R(H),title:H},[t.createElementVNode("div",uE,[t.createElementVNode("div",hE,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(a)[H]),{size:n.iconSize,class:"shrink-0"},null,8,["size"]))]),t.createElementVNode("span",mE,t.toDisplayString(H),1)])],10,fE))),128))],2)),m.value&&C.value.length>0?(t.openBlock(),t.createElementBlock("div",pE," Showing "+t.toDisplayString(x.value.length)+" / "+t.toDisplayString(C.value.length),1)):t.createCommentVNode("",!0)],36)])):t.createCommentVNode("",!0)])],512))}}),gE={key:0,class:"fixed inset-0 z-50 flex items-center justify-center p-4 sm:p-6"},bE={class:"flex items-center justify-between border-b dark:border-neutral-700/50 px-6 py-4"},yE={class:"relative overflow-auto p-0"},li=t.defineComponent({name:"DCodeImageCropperDialog",inheritAttrs:!1,__name:"DCodeImageCropperDialog",props:{modelValue:{type:Boolean},file:{},title:{default:"Resize & Crop Gambar"},description:{default:""},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!1}},emits:["update:modelValue","done","cancel"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:_=>r("update:modelValue",_)}),s=t.ref(null),i=t.ref(null);let l=null,c=!1,d=0,f=null;function u(){if(l){try{l.close()}catch{}l=null,f&&(f.disconnect(),f=null),s.value&&(s.value.innerHTML=""),i.value=null}}async function h(_,B,A,C,x){const k=await new Promise((v,S)=>{const D=URL.createObjectURL(_),V=new Image;V.onload=()=>{URL.revokeObjectURL(D),v(V)},V.onerror=R=>{URL.revokeObjectURL(D),S(R)},V.src=D}),N=document.createElement("canvas");N.width=B,N.height=A;const w=N.getContext("2d");return w?(w.drawImage(k,0,0,B,A),await new Promise(v=>{N.toBlob(S=>v(S||_),C,x)})):_}function m(){if(!l||!i.value)return;const _=l.getPlugin("Dashboard"),B=l.getFile(i.value);!_||!B||requestAnimationFrame(()=>{try{_.openFileEditor(B)}catch{try{_.openFileEditor(i.value)}catch{}}})}async function p(_){if(l){l.cancelAll(),i.value=null;try{const B=l.addFile({name:_.name,type:_.type,data:_,source:"Local",isRemote:!1});i.value=String(B)}catch{}}}function y(){if(!s.value)return;l&&u(),l=new Ou({autoProceed:!1,restrictions:{maxNumberOfFiles:1,allowedFileTypes:["image/*"]}});const _=document.documentElement.classList.contains("dark");l.use(zi,{target:s.value,inline:!0,height:480,theme:_?"dark":"light",proudlyDisplayPoweredByUppy:!1,hideUploadButton:!0,hideRetryButton:!0,hidePauseResumeButton:!0,hideCancelButton:!0,showProgressDetails:!1}),f=new MutationObserver(()=>{if(!l)return;const B=document.documentElement.classList.contains("dark"),A=l.getPlugin("Dashboard");A&&A.setOptions({theme:B?"dark":"light"})}),f.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),l.use(Ru,{target:zi,quality:n.quality,cropperOptions:{viewMode:1,dragMode:"move",autoCropArea:1,aspectRatio:n.aspectRatio==null?Number.NaN:n.aspectRatio}}),l.on("file-editor:cancel",()=>{a.value=!1}),l.on("file-added",B=>{i.value=(B==null?void 0:B.id)??null,n.autoOpenEditor&&setTimeout(()=>m(),80)}),l.on("file-editor:complete",async B=>{const A=++d;try{const C=B.data,x=C.type||B.type||"image/jpeg";let k=C;if(n.outputWidth&&n.outputHeight&&(k=await h(C,n.outputWidth,n.outputHeight,x,n.quality)),c||A!==d)return;const N=B.name||"edited-image.jpg",w=new File([k],N,{type:x});await b(w,"UPPY_EDITOR_COMPLETE"),r("done",w),a.value=!1}catch{}})}async function b(_,B="CROP_RESULT"){const A=URL.createObjectURL(_);try{const C=await new Promise((x,k)=>{const N=new Image;N.onload=()=>x(N),N.onerror=k,N.src=A});console.group(B),console.log("file:",_),console.table({name:_.name,type:_.type,sizeBytes:_.size,sizeMB:+(_.size/1024/1024).toFixed(3),width:C.naturalWidth,height:C.naturalHeight,ratio:+(C.naturalWidth/C.naturalHeight).toFixed(4)}),console.log("previewUrl:",A),console.groupEnd()}finally{URL.revokeObjectURL(A)}}t.watch(a,async _=>{c=!_,d++,_?(await t.nextTick(),y(),n.file&&await p(n.file)):u()},{flush:"post"}),t.watch(()=>n.file,async _=>{a.value&&_&&(await t.nextTick(),await p(_))}),t.onBeforeUnmount(()=>{c=!0,d++,u()});const g=_=>{_.key==="Escape"&&a.value&&(a.value=!1)};t.watch(a,_=>{_?globalThis.addEventListener("keydown",g):globalThis.removeEventListener("keydown",g)},{immediate:!0});const E=t.ref(!1);return(_,B)=>a.value?(t.openBlock(),t.createElementBlock("div",gE,[t.createVNode(t.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/60 backdrop-blur-sm transition-opacity",onClick:B[0]||(B[0]=A=>a.value=!1)})):t.createCommentVNode("",!0)]),_:1}),t.createVNode(t.Transition,{appear:"","enter-active-class":"duration-300 ease-out","enter-from-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-active-class":"duration-200 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 scale-95 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"relative flex w-fit max-w-4xl flex-col overflow-hidden rounded-xl border border-border dark:border-neutral-700/50 bg-background dark:bg-neutral-800 shadow-2xl transition-all",onClick:B[4]||(B[4]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",bE,[B[6]||(B[6]=t.createElementVNode("h3",{class:"text-lg font-semibold leading-none tracking-tight dark:text-neutral-100"}," Crop & Resize ",-1)),t.createElementVNode("button",{class:"d-close-btn rounded-sm dark:text-neutral-400 ring-offset-background transition-opacity focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",style:t.normalizeStyle({opacity:E.value?1:.7}),onClick:B[1]||(B[1]=A=>a.value=!1),onMouseenter:B[2]||(B[2]=A=>E.value=!0),onMouseleave:B[3]||(B[3]=A=>E.value=!1)},[t.createVNode(t.unref(ne.X),{class:"h-4 w-4"}),B[5]||(B[5]=t.createElementVNode("span",{class:"sr-only"},"Close",-1))],36)]),t.createElementVNode("div",yE,[t.createElementVNode("div",{ref_key:"dashboardEl",ref:s,class:"uppy-wrap"},null,512)])])):t.createCommentVNode("",!0)]),_:1})])):t.createCommentVNode("",!0)}}),xE={key:0,class:"text-xs text-muted-foreground dark:text-neutral-400"},kE=["src"],wE=["disabled"],CE=["disabled"],EE={class:"text-[11px] text-foreground/90 dark:text-neutral-200 space-y-1 whitespace-nowrap"},_E={class:"flex gap-2"},BE={class:"font-medium truncate"},SE={class:"flex gap-2"},AE={class:"font-medium"},vE={class:"flex gap-2"},DE={class:"font-medium truncate"},ci=ft(t.defineComponent({name:"DCodeImageResult",__name:"DCodeImageResult",props:{file:{},title:{default:"Hasil Gambar"},description:{default:""},disabled:{type:Boolean,default:!1},previewHeight:{default:190},previewWidth:{default:220},showEdit:{type:Boolean,default:!0},showReplace:{type:Boolean,default:!0},showRemove:{type:Boolean,default:!0}},emits:["edit","replace","remove"],setup(e,{emit:o}){const n=e,r=o,a=t.ref(null);t.watch(()=>n.file,h=>{a.value&&URL.revokeObjectURL(a.value),a.value=h?URL.createObjectURL(h):null},{immediate:!0}),t.onBeforeUnmount(()=>{a.value&&URL.revokeObjectURL(a.value),d&&d.disconnect()});function s(h){const m=h/1024,p=m/1024;return p>=1?`${p.toFixed(2)} MB`:m>=1?`${m.toFixed(1)} KB`:`${h} B`}const i=t.computed(()=>n.file?{name:n.file.name,size:s(n.file.size),type:n.file.type||"unknown"}:null),l=t.ref(!1),c=t.ref(!1);let d=null;const f=()=>{typeof document<"u"&&(c.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{f(),typeof document<"u"&&(d=new MutationObserver(f),d.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),d.observe(document.body,{attributes:!0,attributeFilter:["class"]}))});const u=t.computed(()=>n.disabled||!l.value?{}:{borderColor:c.value?"hsl(var(--primary) / 0.4)":"hsl(var(--primary) / 0.5)",backgroundColor:c.value?"hsl(var(--primary) / 0.1)":"hsl(var(--primary) / 0.05)"});return(h,m)=>e.file?(t.openBlock(),t.createBlock(oi,{key:0,class:t.normalizeClass([e.disabled?"opacity-60 pointer-events-none":"","dark:bg-neutral-800 dark:border-neutral-700/50"])},{default:t.withCtx(()=>[t.createVNode(ri,{class:"pb-2"},{default:t.withCtx(()=>[t.createVNode(ai,{class:"text-sm font-semibold dark:text-neutral-100"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1}),e.description?(t.openBlock(),t.createElementBlock("div",xE,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),_:1}),t.createVNode(ni,{class:"pt-2"},{default:t.withCtx(()=>{var p,y,b;return[t.createElementVNode("div",{class:"d-result-preview-wrap relative rounded-xl overflow-hidden border-2 border-dashed transition-colors duration-200 bg-muted dark:bg-neutral-900/30 border-border dark:border-neutral-700/50 w-full",style:t.normalizeStyle([{height:`${e.previewHeight}px`},u.value]),onMouseenter:m[2]||(m[2]=g=>l.value=!0),onMouseleave:m[3]||(m[3]=g=>l.value=!1)},[a.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:a.value,alt:"Preview",class:"h-full w-full object-contain"},null,8,kE)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"d-action-buttons",style:t.normalizeStyle({position:"absolute",top:"8px",left:"8px",right:"8px",display:"flex",alignItems:"center",justifyContent:"space-between",zIndex:50,opacity:l.value?1:0,transition:"opacity 0.2s ease-in-out",pointerEvents:l.value?"auto":"none"})},[e.showEdit?(t.openBlock(),t.createElementBlock("button",{key:0,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#eab308",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[0]||(m[0]=g=>r("edit"))},[t.createVNode(t.unref(ne.Pencil),{style:{width:"16px",height:"16px"}})],12,wE)):t.createCommentVNode("",!0),e.showRemove?(t.openBlock(),t.createElementBlock("button",{key:1,disabled:e.disabled,class:"d-action-btn shadow-md",style:t.normalizeStyle({height:"32px",width:"32px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#ef4444",color:"white",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.4)",cursor:e.disabled?"not-allowed":"pointer",transition:"all 0.2s",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"}),onClick:m[1]||(m[1]=g=>r("remove"))},[t.createVNode(t.unref(ne.Trash2),{style:{width:"16px",height:"16px"}})],12,CE)):t.createCommentVNode("",!0)],4),t.createElementVNode("div",{class:"d-metadata-overlay",style:t.normalizeStyle({position:"absolute",left:"8px",bottom:"8px",zIndex:10,display:"inline-block",maxWidth:"calc(100% - 16px)",borderRadius:"12px",border:"1px solid rgba(0,0,0,0.1)",padding:"8px 12px",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",backdropFilter:"blur(8px)",transition:"all 0.2s ease-in-out",opacity:l.value?1:0,transform:l.value?"translateY(0) scale(1)":"translateY(4px) scale(0.99)",backgroundColor:c.value?"rgba(38, 38, 38, 0.8)":"rgba(255, 255, 255, 0.8)",color:c.value?"#e5e5e5":"#171717"})},[t.createElementVNode("div",EE,[t.createElementVNode("div",_E,[m[4]||(m[4]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Nama",-1)),t.createElementVNode("span",BE,t.toDisplayString((p=i.value)==null?void 0:p.name),1)]),t.createElementVNode("div",SE,[m[5]||(m[5]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Ukuran",-1)),t.createElementVNode("span",AE,t.toDisplayString((y=i.value)==null?void 0:y.size),1)]),t.createElementVNode("div",vE,[m[6]||(m[6]=t.createElementVNode("span",{class:"w-14 shrink-0 text-muted-foreground dark:text-neutral-400"},"Tipe",-1)),t.createElementVNode("span",DE,t.toDisplayString((b=i.value)==null?void 0:b.type),1)])])],4)],36)]}),_:1})]),_:1},8,["class"])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-e1d893ab"]]),NE={class:"space-y-3"},la=t.defineComponent({name:"DCodeImageField",inheritAttrs:!1,__name:"DCodeImageField",props:{modelValue:{default:null},label:{default:"Upload Gambar"},hint:{default:"Drag & drop atau klik area ini"},disabled:{type:Boolean,default:!1},allowedTypes:{default:null},accept:{default:"image/*"},minSizeMb:{default:null},maxSizeMb:{default:1},title:{default:"Hasil Gambar"},description:{default:""},previewWidth:{default:360},previewHeight:{default:220},aspectRatio:{default:null},outputWidth:{default:null},outputHeight:{default:null},quality:{default:.92},autoOpenEditor:{type:Boolean,default:!0},minWidth:{default:null},minHeight:{default:null},maxWidth:{default:null},maxHeight:{default:null},endpoint:{},uploadFn:{},editUseOriginal:{type:Boolean,default:!1}},emits:["update:modelValue","error","uploaded"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:O=>r("update:modelValue",O)}),s=t.ref(!1),i=t.ref(null),l=t.ref(null),c=t.ref(null);function d(O){c.value=O,r("error",O)}function f(){c.value=null}const u=t.computed(()=>{const O=(n.allowedTypes??"").trim();return O?O.split(/[,\s;]+/g).map(L=>L.trim().toLowerCase()).filter(Boolean).map(L=>L.includes("/")||L.startsWith(".")?L:`.${L}`):[]});function h(O){const P=O.lastIndexOf(".");return P>=0?O.slice(P).toLowerCase():""}const m=t.computed(()=>{if(u.value.length){const O=u.value.filter(L=>L.startsWith("."));return[...u.value.filter(L=>L.includes("/")),...O].join(",")}return n.accept||"image/*"}),p=t.computed(()=>u.value.length?u.value.join(", "):n.accept||"image/*");function y(O){if(u.value.length){const L=(O.type||"").toLowerCase(),$=h(O.name);return u.value.some(T=>T.includes("/")?L===T:T.startsWith(".")?$===T:$===`.${T}`)}return(n.accept||"image/*").toLowerCase().includes("image/")?(O.type||"").toLowerCase().startsWith("image/"):!0}function b(O){return O*1024*1024}async function g(O){var P;return(P=O.type)!=null&&P.startsWith("image/")?await new Promise(L=>{const $=URL.createObjectURL(O),T=new Image;T.onload=()=>{URL.revokeObjectURL($),L({w:T.naturalWidth,h:T.naturalHeight})},T.onerror=()=>{URL.revokeObjectURL($),L(null)},T.src=$}):null}async function E(O){if(!(n.minWidth!=null||n.minHeight!=null||n.maxWidth!=null||n.maxHeight!=null))return null;const L=await g(O);return L?n.minWidth!=null&&L.w<n.minWidth?`Lebar gambar minimal ${n.minWidth}px`:n.minHeight!=null&&L.h<n.minHeight?`Tinggi gambar minimal ${n.minHeight}px`:n.maxWidth!=null&&L.w>n.maxWidth?`Lebar gambar maksimal ${n.maxWidth}px`:n.maxHeight!=null&&L.h>n.maxHeight?`Tinggi gambar maksimal ${n.maxHeight}px`:null:"Gagal membaca dimensi gambar"}async function _(O){return O?y(O)?n.minSizeMb!=null&&O.size<b(n.minSizeMb)?`Ukuran file terlalu kecil. Minimal ${n.minSizeMb}MB`:n.maxSizeMb!=null&&O.size>b(n.maxSizeMb)?`Ukuran file terlalu besar. Maks ${n.maxSizeMb}MB`:await E(O):`only Allowed: ${p.value}`:"File tidak valid"}function B(O){n.disabled||(i.value=O,s.value=!0)}async function A(O){if(n.disabled)return;f();const P=await _(O);if(P){d(P);return}l.value=O,B(O)}const{DCodeApi:C}=Je(),x=ii(),k=t.ref(!1);t.ref(null);function N(O,P){return!O||!P?null:O.replace(/\/+$/,"")+"/"+P.replace(/^\/+/,"")}function w(O){var T;const P=(O==null?void 0:O.data)??O,L=(T=P==null?void 0:P.data)==null?void 0:T[0];if(!L)return null;const $=N(L.server,L.url);return{...L,fullUrl:$?encodeURI($):null}}async function v(O){var P;if(n.uploadFn){try{k.value=!0;const L=await n.uploadFn(O);a.value=O,r("uploaded",L)}catch(L){console.error("Upload Error",L),x.error("Upload Failed",(L==null?void 0:L.message)||"Unknown error"),d((L==null?void 0:L.message)||"Upload Failed")}finally{k.value=!1}return}if(!((P=n.endpoint)!=null&&P.apiUrl)){a.value=O;return}if(typeof C!="function"){d("useApi() must expose DCodeApi()");return}try{k.value=!0;const L=new FormData;L.append("doc",O);const $=(n.endpoint.apiMethod||"POST").toUpperCase(),T=n.endpoint.apiUrl,I=await C("","",L,{_url:T,_method:$,withCredentials:!0,transformRequest:[(q,W)=>(W&&(delete W["Content-Type"],delete W["content-type"]),q)]}),H=(I==null?void 0:I.data)??I;w(H),a.value=O,r("uploaded",H)}catch(L){console.error("Upload Error",L),x.error("Upload Failed",(L==null?void 0:L.message)||"Unknown error"),d((L==null?void 0:L.message)||"Upload Failed")}finally{k.value=!1}}async function S(O){var P;f(),n.uploadFn||(P=n.endpoint)!=null&&P.apiUrl?await v(O):a.value=O,s.value=!1,i.value=null}function D(){s.value=!1,i.value=null}async function V(){if(!a.value)return;f();const O=n.editUseOriginal?l.value??a.value:a.value,P=await _(O);if(P){d(P);return}B(O)}function R(){f(),a.value=null,i.value=null,s.value=!1,l.value=null}return t.watch(()=>n.modelValue,O=>{O&&!l.value&&(l.value=O),O||(l.value=null)},{immediate:!0}),(O,P)=>(t.openBlock(),t.createElementBlock("div",NE,[a.value?(t.openBlock(),t.createBlock(ci,{key:1,file:a.value,title:e.label,description:e.description,"preview-width":e.previewWidth,disabled:e.disabled,"show-edit":!0,"show-remove":!0,"show-replace":!1,onEdit:V,onRemove:R,"aspect-ratio":16/9},null,8,["file","title","description","preview-width","disabled"])):(t.openBlock(),t.createBlock(ia,{key:0,label:e.label,hint:e.hint,accept:m.value,maxSizeMb:e.maxSizeMb,disabled:e.disabled,onPicked:A,error:c.value,onError:P[0]||(P[0]=L=>d(L))},null,8,["label","hint","accept","maxSizeMb","disabled","error"])),t.createVNode(li,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=L=>s.value=L),file:i.value,title:e.title,description:e.description,"auto-open-editor":e.autoOpenEditor,"aspect-ratio":e.aspectRatio,"output-width":e.outputWidth,"output-height":e.outputHeight,quality:e.quality,onDone:S,onCancel:D},null,8,["modelValue","file","title","description","auto-open-editor","aspect-ratio","output-width","output-height","quality"])]))}}),VE=["aria-busy"],ME={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},TE=["for"],PE={key:0,class:"ml-1 text-destructive"},OE=["id","disabled"],RE={class:"min-w-0 flex-1 text-left"},LE={key:0,class:"flex flex-wrap gap-1.5"},IE={class:"max-w-[220px] truncate"},FE=["onClick"],zE={key:0,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent"},$E={key:1,class:"text-muted-foreground truncate"},jE={class:"flex items-center gap-2 shrink-0"},UE={key:0,class:"p-2 border-b border-gray-200 dark:border-gray-800"},WE=["placeholder","onKeydown"],HE={key:0,class:"h-full flex items-center justify-center px-3 text-sm text-muted-foreground"},qE=["disabled","onClick"],GE={class:"truncate"},KE={key:0,class:"text-primary-600 dark:text-primary-400"},XE={key:1,class:"h-full flex items-center justify-center text-sm text-muted-foreground"},YE={key:0},JE={key:1},QE={key:1,class:"text-xs text-destructive"},di=t.defineComponent({name:"DCodeMultiSelect",inheritAttrs:!1,__name:"DCodeMultiSelect",props:{modelValue:{},items:{default:()=>[]},endpoint:{default:void 0},fetchItems:{},autoFetchOnOpen:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!1},refreshOnOpen:{type:Boolean,default:!1},label:{default:""},placeholder:{default:"Pilih data…"},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Cari…"},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},maxChips:{default:5},maxSelected:{default:5},itemTitle:{type:[String,Function],default:"name"},itemValue:{type:[String,Function],default:"id"},returnObject:{type:Boolean,default:!1},virtual:{type:Boolean,default:!0},itemHeight:{default:40},maxRows:{default:5},overscan:{default:6},error:{default:null},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear","max"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>(a.label||n.label)??void 0),i=t.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`app-multiselect-${n.id||s.value||"field"}-${l}`),d=t.computed(()=>{if(a.required)return!0;const K=n.required,ee=n["aria-required"];return K===""||K===!0||K==="true"||(ee==="true"||ee===!0)}),f=t.computed(()=>!!a.error);function u(K){return K?typeof a.itemTitle=="function"?a.itemTitle(K)??"":String((K==null?void 0:K[a.itemTitle])??""):""}function h(K){return K?typeof a.itemValue=="function"?a.itemValue(K):K==null?void 0:K[a.itemValue]:null}function m(K,ee){return h(K)??ee}const p=t.computed(()=>Array.isArray(a.modelValue)?a.modelValue:[]),y=t.computed(()=>{var K;return!!((K=a.endpoint)!=null&&K.apiUrl)||!!a.fetchItems}),b=t.ref([]),g=t.ref(!1),E=t.ref(!1),_=t.computed(()=>{var ee;const K=(ee=a.endpoint)==null?void 0:ee.apiOptions;if(K)return typeof K=="function"?K():K}),B=t.computed(()=>{var Ce,Ge;const K=((Ce=a.endpoint)==null?void 0:Ce.apiUrl)??"",ee=(((Ge=a.endpoint)==null?void 0:Ge.apiMethod)??"GET").toUpperCase(),re=JSON.stringify(_.value??null);return`${ee} ${K} :: ${re}`}),A=t.computed(()=>y.value?b.value:a.items||[]);async function C(){var K;if(y.value&&!(!((K=a.endpoint)!=null&&K.apiUrl)&&!a.fetchItems)&&!g.value){g.value=!0;try{let ee;if(a.fetchItems){const re=await a.fetchItems(),Ce=(re==null?void 0:re.data)??re;ee=(Ce==null?void 0:Ce.data)??Ce}else{const{DCodeApi:re}=Je();if(typeof re!="function"){console.error("[DCodeMultiSelectChips] useApi() must expose DCodeApi()");return}const Ce={page:1,perPage:100,..._.value||{}},Ge=await re("","",Ce,{_url:a.endpoint.apiUrl,_method:(a.endpoint.apiMethod||"GET").toUpperCase()}),wt=(Ge==null?void 0:Ge.data)??Ge;ee=(wt==null?void 0:wt.data)??wt}b.value=Array.isArray(ee)?ee:[],E.value=!0}catch(ee){console.error("[DCodeMultiSelectChips][fetchOptions] ERROR:",ee),b.value=[]}finally{g.value=!1}}}t.watch(()=>B.value,()=>{b.value=[],E.value=!1}),t.onMounted(()=>{a.autoFetchOnMount&&y.value&&C()});const x=t.computed(()=>{const K=p.value;if(a.returnObject)return K;const ee=new Map;for(const re of A.value)ee.set(h(re),re);return K.map(re=>ee.get(re)??{[a.itemValue]:re,[a.itemTitle]:String(re)})}),k=t.computed(()=>a.maxChips===null?x.value:x.value.slice(0,a.maxChips));function N(K){const ee=p.value;if(a.returnObject){const re=h(K);return ee.some(Ce=>h(Ce)===re)}return ee.includes(h(K))}const w=t.computed(()=>{if(a.maxSelected===null||a.maxSelected===void 0)return null;const K=Number(a.maxSelected);return Number.isFinite(K)&&K>0?K:null}),v=t.computed(()=>{const K=w.value;return K===null?!1:p.value.length>=K});function S(K){return!N(K)&&v.value}const D=t.computed(()=>{const K=p.value,ee=new Set;if(a.returnObject)for(const re of K)ee.add(h(re));else for(const re of K)ee.add(re);return ee}),V=t.computed(()=>{const K=D.value;return(A.value||[]).filter(ee=>!K.has(h(ee)))}),R=t.computed(()=>A.value.length===0?!1:V.value.length===0),O=t.ref(null),P=t.ref(null),L=t.ref(null),$=t.ref(!1),T=t.ref(""),I=t.ref(0),H=t.ref(0),{floatingStyles:q}=Ha(O,P,{whileElementsMounted:za,placement:"bottom-start",middleware:[$a(8),Ua(),ja({padding:8}),Wa({apply({rects:K,elements:ee}){Object.assign(ee.floating.style,{width:`${K.reference.width}px`,"--floating-width":`${K.reference.width}px`})}})]}),W=t.computed(()=>q.value),Z=t.computed(()=>{const K=Number(a.maxRows);return Number.isFinite(K)&&K>0?K:5});async function te(){a.disabled||a.readonly||($.value=!0,H.value=0,requestAnimationFrame(()=>{L.value&&(L.value.scrollTop=0),I.value=0}),y.value&&a.autoFetchOnOpen&&(a.refreshOnOpen||!E.value)&&!g.value&&await C())}function xe(){$.value=!1}function Se(){$.value?xe():te()}function ye(K){var re,Ce;if(!$.value)return;const ee=K.target;(re=O.value)!=null&&re.contains(ee)||(Ce=P.value)!=null&&Ce.contains(ee)||xe()}t.onMounted(()=>document.addEventListener("mousedown",ye)),t.onBeforeUnmount(()=>document.removeEventListener("mousedown",ye));function Q(K){if(a.disabled||a.readonly)return;if(S(K)){r("max");return}const ee=[...p.value];if(a.returnObject){const re=h(K);if(ee.some(Ge=>h(Ge)===re))return;r("update:modelValue",[...ee,K])}else{const re=h(K);if(ee.includes(re))return;r("update:modelValue",[...ee,re])}T.value="",H.value=0,requestAnimationFrame(()=>{L.value&&(L.value.scrollTop=0),I.value=0})}function j(K){if(a.disabled||a.readonly)return;const ee=[...p.value];if(a.returnObject){const re=h(K);r("update:modelValue",ee.filter(Ce=>h(Ce)!==re))}else{const re=h(K);r("update:modelValue",ee.filter(Ce=>Ce!==re))}}function Y(){a.disabled||a.readonly||(r("update:modelValue",[]),r("clear"),xe())}const ae=t.computed(()=>{const K=T.value.trim().toLowerCase(),ee=V.value;return K?ee.filter(re=>u(re).toLowerCase().includes(K)):ee}),ke=t.computed(()=>ae.value.length);t.watch($,K=>{K||(T.value="")});const Oe=t.computed(()=>{if(R.value)return a.itemHeight;const K=ke.value;return(K<=0?1:Math.min(K,Z.value))*a.itemHeight}),_e=t.computed(()=>a.virtual?ke.value*a.itemHeight:0),We=t.computed(()=>a.virtual?Math.ceil(Oe.value/a.itemHeight)+a.overscan:ke.value),Fe=t.computed(()=>{if(!a.virtual)return 0;const K=Math.floor(I.value/a.itemHeight)-Math.floor(a.overscan/2);return Math.max(0,K)}),se=t.computed(()=>a.virtual?Math.min(ke.value,Fe.value+We.value):ke.value),Re=t.computed(()=>a.virtual?Fe.value*a.itemHeight:0),Le=t.computed(()=>{const K=ae.value;return a.virtual?K.slice(Fe.value,se.value):K});function De(K){const ee=K.target;I.value=ee.scrollTop}function ct(K){return K===H.value}function G(K){const ee=L.value;if(!ee||!a.virtual)return;const re=K*a.itemHeight,Ce=re+a.itemHeight,Ge=ee.scrollTop,wt=ee.scrollTop+ee.clientHeight;re<Ge?ee.scrollTop=re:Ce>wt&&(ee.scrollTop=Ce-ee.clientHeight)}function ie(K){const ee=Math.max(0,ke.value-1);H.value=Math.min(ee,Math.max(0,H.value+K)),G(H.value)}function he(){const K=ae.value[H.value];K&&Q(K)}const oe=t.computed(()=>a.clearable&&!a.disabled&&!a.readonly&&x.value.length>0),le=t.computed(()=>f.value?"border-destructive ring-1 ring-destructive":$.value?"border-neutral-400 ring-1 ring-neutral-400 dark:border-neutral-600 dark:ring-neutral-600":"");return(K,ee)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",ME)):t.createCommentVNode("",!0),ee[3]||(ee[3]=t.createElementVNode("div",{class:"h-10 w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse"},null,-1))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),d.value?(t.openBlock(),t.createElementBlock("span",PE,"*")):t.createCommentVNode("",!0)],8,TE)):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"referenceEl",ref:O,class:"relative"},[t.createElementVNode("button",{id:c.value,type:"button",class:t.normalizeClass(["w-full justify-between h-auto min-h-10 px-3 py-2 transition border rounded-lg flex items-center",["bg-white dark:bg-neutral-800 border-gray-300 dark:border-neutral-700/50 text-foreground dark:text-gray-300",a.disabled?"cursor-not-allowed opacity-50":a.readonly?"cursor-default bg-neutral-50/50 dark:bg-neutral-900/30":"",le.value]]),disabled:a.disabled||a.readonly,onClick:Se},[t.createElementVNode("div",RE,[x.value.length?(t.openBlock(),t.createElementBlock("div",LE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(k.value,(re,Ce)=>(t.openBlock(),t.createElementBlock("div",{key:`chip-${m(re,Ce)}`,class:"inline-flex items-center rounded-md border px-1.5 py-0.5 text-xs font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-900 dark:text-neutral-100 border-transparent gap-1"},[t.createElementVNode("span",IE,t.toDisplayString(u(re)),1),a.disabled?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("button",{key:0,class:"ml-1 opacity-70 hover:opacity-100",onClick:t.withModifiers(Ge=>j(re),["stop"]),"aria-label":"Remove"}," ✕ ",8,FE))]))),128)),a.maxChips!==null&&x.value.length>a.maxChips?(t.openBlock(),t.createElementBlock("div",zE," +"+t.toDisplayString(x.value.length-(a.maxChips??0)),1)):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",$E,t.toDisplayString(a.placeholder),1))]),t.createElementVNode("div",jE,[oe.value?(t.openBlock(),t.createElementBlock("button",{key:0,class:"text-muted-foreground hover:text-foreground",onClick:t.withModifiers(Y,["stop"]),"aria-label":"Clear"}," ✕ ")):t.createCommentVNode("",!0),t.createVNode(t.unref(ne.ChevronDown),{class:"h-4 w-4 text-muted-foreground"})])],10,OE),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[$.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"floatingEl",ref:P,class:"-mt-1 z-[9999] w-[var(--floating-width)] rounded-lg border shadow-lg overflow-hidden bg-white dark:bg-neutral-800 border-gray-200 dark:border-neutral-700/50",style:t.normalizeStyle(W.value)},[a.searchable&&!R.value?(t.openBlock(),t.createElementBlock("div",UE,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":ee[0]||(ee[0]=re=>T.value=re),placeholder:a.searchPlaceholder,class:"w-full h-10 px-3 py-2 text-sm bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-md focus:outline-none focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600",onKeydown:[ee[1]||(ee[1]=t.withKeys(t.withModifiers(re=>ie(1),["prevent"]),["down"])),ee[2]||(ee[2]=t.withKeys(t.withModifiers(re=>ie(-1),["prevent"]),["up"])),t.withKeys(t.withModifiers(he,["prevent"]),["enter"]),t.withKeys(t.withModifiers(xe,["prevent"]),["esc"])]},null,40,WE),[[t.vModelText,T.value]])])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"listEl",ref:L,class:"relative overflow-auto",style:t.normalizeStyle({height:Oe.value+"px"}),onScroll:De},[R.value?(t.openBlock(),t.createElementBlock("div",HE," All items have been selected ")):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[a.virtual?(t.openBlock(),t.createElementBlock("div",{key:0,style:t.normalizeStyle({height:_e.value+"px"})},null,4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(a.virtual?"absolute left-0 top-0 w-full":""),style:t.normalizeStyle(a.virtual?{transform:`translateY(${Re.value}px)`}:void 0)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Le.value,(re,Ce)=>(t.openBlock(),t.createElementBlock("button",{key:String(m(re,Fe.value+Ce)),type:"button",class:t.normalizeClass(["w-full px-3 text-left text-sm flex items-center justify-between gap-3",[S(re)?"cursor-not-allowed opacity-50":"hover:bg-neutral-50 dark:hover:bg-neutral-800/60",ct(Fe.value+Ce)?"bg-neutral-50 dark:bg-neutral-800/60":"",N(re)?"font-semibold":"font-normal"]]),style:t.normalizeStyle({height:a.itemHeight+"px"}),disabled:a.disabled||S(re),onClick:Ge=>Q(re)},[t.createElementVNode("span",GE,t.toDisplayString(u(re)),1),N(re)?(t.openBlock(),t.createElementBlock("span",KE,"✓")):t.createCommentVNode("",!0)],14,qE))),128))],6),ke.value===0?(t.openBlock(),t.createElementBlock("div",XE,[g.value?(t.openBlock(),t.createElementBlock("span",YE,"Loading data…")):(t.openBlock(),t.createElementBlock("span",JE,"Tidak ada data"))])):t.createCommentVNode("",!0)],64))],36)],4)):t.createCommentVNode("",!0)]))],512),f.value?(t.openBlock(),t.createElementBlock("p",QE,t.toDisplayString(a.error),1)):t.createCommentVNode("",!0)],64))],10,VE)),[[t.vShow,i.value]])}}),ZE={class:"space-y-4"},e_={key:0,class:"flex flex-col gap-0.5"},t_=["for"],o_=["for"],n_={class:"text-[11px] text-gray-500 dark:text-gray-400"},r_={class:"flex items-center gap-2 flex-nowrap"},a_=["id","value","disabled","onKeydown","onInput","onPaste"],ca=t.defineComponent({name:"DCodeOtpInput",inheritAttrs:!1,__name:"DCodeOtpInput",props:{modelValue:{default:""},totalInput:{default:6},default:{default:""},label:{default:""},endpoint:{},submitFn:{}},emits:["updateOtp","update:modelValue","complete","loading","success","error"],setup(e,{emit:o}){const n=t.useAttrs(),r=Math.random().toString(36).slice(2,7),a=t.computed(()=>`app-otp-${(n.id||s.label||"otp-field").replaceAll(/\s+/g,"-").toLowerCase()}-${r}`),s=e,i=o,l=t.ref([]),c=t.ref([]),d=t.ref(!1),{DCodeApi:f}=Je(),u=ii(),h=t.computed(()=>{const C=Number(s.totalInput);return C&&C>0?C:6}),m=()=>{c.value=Array.from({length:h.value},(C,x)=>{var k;return((k=s.default)==null?void 0:k[x])??""}),i("updateOtp",c.value.join(""))};m(),t.watch(()=>[s.totalInput,s.default],()=>m());const p=C=>{C<0||C>=h.value||t.nextTick(()=>{var x;return(x=l.value[C])==null?void 0:x.focus()})},y=C=>C.match(/[a-zA-Z0-9]/)?C.match(/[a-zA-Z0-9]/)[0]:"";async function b(C){var x;if(i("complete",C),s.submitFn){try{d.value=!0,i("loading",!0);const k=await s.submitFn(C);i("success",k)}catch(k){console.error("OTP Submit Error",k),u.error("Submit Failed",(k==null?void 0:k.message)||"Unknown error"),i("error",(k==null?void 0:k.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}return}if((x=s.endpoint)!=null&&x.apiUrl){if(typeof f!="function"){i("error","useApi() must expose DCodeApi()");return}try{d.value=!0,i("loading",!0);const k=(s.endpoint.apiMethod||"POST").toUpperCase(),N=s.endpoint.apiUrl,w=await f("","",{otp:C},{_url:N,_method:k,withCredentials:!0}),v=(w==null?void 0:w.data)??w;i("success",v)}catch(k){console.error("OTP Submit Error",k),u.error("Submit Failed",(k==null?void 0:k.message)||"Unknown error"),i("error",(k==null?void 0:k.message)||"Submit Failed")}finally{d.value=!1,i("loading",!1)}}}const g=(C,x)=>{c.value[C]=y(x);const k=c.value.join("");i("updateOtp",k),i("update:modelValue",k),k.length===h.value&&b(k)},E=(C,x)=>{const k=C.key,N=/^\d$/.test(k),w=/^[a-zA-Z]$/.test(k);if(k==="Backspace"){if(C.preventDefault(),c.value[x]){g(x,"");return}x>0&&(g(x-1,""),p(x-1));return}if(k==="ArrowLeft"){C.preventDefault(),p(x-1);return}if(k==="ArrowRight"){C.preventDefault(),p(x+1);return}if(N||w){C.preventDefault(),g(x,k),x<h.value-1&&p(x+1);return}k.length===1&&C.preventDefault()},_=(C,x)=>{const k=C.target,N=k.value??"",w=y(N);k.value=w,g(x,w),w&&x<h.value-1&&p(x+1)},B=(C,x)=>{var S;C.preventDefault();const N=(((S=C.clipboardData)==null?void 0:S.getData("text"))??"").replaceAll(/[^a-zA-Z0-9]/g,"");if(!N)return;let w=x;for(const D of N){if(w>=h.value)break;c.value[w]=D,w++}const v=c.value.join("");i("updateOtp",v),i("update:modelValue",v),v.length===h.value&&b(v),p(Math.min(w,h.value-1))},A=C=>x=>{l.value[C]=(x==null?void 0:x.$el)??x};return(C,x)=>(t.openBlock(),t.createElementBlock("div",ZE,[s.label||h.value?(t.openBlock(),t.createElementBlock("div",e_,[s.label?(t.openBlock(),t.createElementBlock("label",{key:0,for:a.value,class:"text-sm font-medium text-foreground"},t.toDisplayString(s.label),9,t_)):(t.openBlock(),t.createElementBlock("label",{key:1,for:a.value,class:"text-sm font-medium text-foreground"}," Masukkan kode keamanan ",8,o_)),t.createElementVNode("p",n_," Ketik "+t.toDisplayString(h.value)+" digit kode verifikasi Anda ",1)])):t.createCommentVNode("",!0),t.createElementVNode("div",r_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.value,k=>(t.openBlock(),t.createElementBlock("input",{key:k,id:k===1?a.value:void 0,ref_for:!0,ref:A(k-1),value:c.value[k-1]||"",type:"text",inputmode:"text",maxlength:"1",autocomplete:"one-time-code","aria-label":"`OTP digit ${i}`",placeholder:"*",disabled:d.value,class:t.normalizeClass(["w-12 h-12 flex-none text-center text-xl font-bold rounded-xl border transition-all duration-200 box-border p-0","focus:outline-none focus:scale-105 disabled:opacity-50 disabled:cursor-not-allowed",c.value[k-1]?"border-blue-500 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300":"border-gray-300 dark:border-neutral-700/50 bg-white dark:bg-neutral-800 text-gray-400 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600"]),onKeydown:N=>E(N,k-1),onInput:N=>_(N,k-1),onPaste:N=>B(N,k-1)},null,42,a_))),128))])]))}}),s_={class:"w-full"},i_={key:0,class:"flex items-center justify-between mb-2"},l_={key:0,class:"text-sm font-medium text-gray-700"},c_={key:1,class:"text-sm text-gray-600"},d_={name:"DCodeProgress"},jf=t.defineComponent({...d_,name:"DCodeProgress",inheritAttrs:!1,props:{modelValue:{default:0},max:{default:100},label:{default:""},showValue:{type:Boolean,default:!1},color:{default:"blue"},size:{default:"md"},striped:{type:Boolean,default:!1},animated:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=t.computed(()=>Math.min(n.modelValue/n.max*100,100)),a=t.computed(()=>["w-full rounded-full overflow-hidden",{sm:"h-1",md:"h-2",lg:"h-3"}[n.size],"bg-gray-200"].join(" ")),s=t.computed(()=>{const l={blue:"bg-blue-500",green:"bg-green-500",red:"bg-red-500",yellow:"bg-yellow-500",purple:"bg-purple-500",gray:"bg-gray-500"},c=["h-full transition-all duration-300 ease-out",l[n.color]||l.blue];return n.striped&&c.push("bg-gradient-to-r from-transparent via-white/20 to-transparent"),n.animated&&c.push("animate-pulse"),c.join(" ")}),i=t.computed(()=>`${Math.round(r.value)}%`);return(l,c)=>(t.openBlock(),t.createElementBlock("div",s_,[e.label||e.showValue?(t.openBlock(),t.createElementBlock("div",i_,[e.label?(t.openBlock(),t.createElementBlock("span",l_,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0),e.showValue?(t.openBlock(),t.createElementBlock("span",c_,t.toDisplayString(i.value),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(a.value)},[t.createElementVNode("div",{class:t.normalizeClass(s.value),style:t.normalizeStyle({width:`${r.value}%`})},null,6)],2)]))}}),f_={key:0,class:"fixed top-0 left-0 right-0 z-[10000] h-[3px]"},Uf=ft(t.defineComponent({name:"DCodeProgressBar",__name:"DCodeProgressBar",props:{isApiLoading:{type:Boolean,default:!1},apiProgress:{default:0}},setup(e){return(o,n)=>(t.openBlock(),t.createBlock(t.Transition,{name:"fade"},{default:t.withCtx(()=>[e.isApiLoading?(t.openBlock(),t.createElementBlock("div",f_,[t.createElementVNode("div",{class:"h-full bg-primary-600 shadow-[0_0_15px_rgba(37,99,235,0.8)] transition-all duration-300 ease-out",style:t.normalizeStyle({width:`${e.apiProgress}%`})},null,4)])):t.createCommentVNode("",!0)]),_:1}))}}),[["__scopeId","data-v-85c68054"]]),u_={key:0,class:"ml-1 text-destructive"},h_={class:"flex flex-col"},m_={key:0,class:"flex items-center gap-2 text-sm text-gray-500 mb-2"},p_={class:"relative flex-shrink-0 mt-0.5"},g_=["id","name","value","checked","disabled","required","onChange"],b_=["onClick"],y_=["for"],x_={key:0,class:"ml-1 text-red-500"},k_={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-1"},fi=t.defineComponent({name:"DCodeRadio",inheritAttrs:!1,__name:"DCodeRadio",props:{modelValue:{default:void 0},label:{default:""},itemTitle:{default:"name"},itemValue:{default:"id"},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Je(),r=o,a=e,s=t.ref([]),i=t.ref(!1),l=t.ref(null),c=async()=>{var B,A;const _=((B=a.endpoint)==null?void 0:B.apiUrl)||a.apiUrl;if(_){i.value=!0,l.value=null;try{const C={page:1,perPage:100},x=((A=a.endpoint)==null?void 0:A.apiMethod)||a.apiMethod,k=await n(_,x,C);let N=k;a.dataPath?N=a.dataPath.split(".").reduce((v,S)=>v&&v[S]!=="undefined"?v[S]:void 0,k):typeof k=="object"&&!Array.isArray(k)&&k.data&&(N=k.data),Array.isArray(N)?s.value=N:(console.warn("DCodeRadio: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),l.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(C){console.error("DCodeRadio fetch error:",C),l.value="Gagal memuat data dari endpoint."}finally{i.value=!1}}};t.onMounted(()=>{var _;((_=a.endpoint)!=null&&_.apiUrl||a.apiUrl)&&c()});const d=t.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(s.value.length>0)return s.value;const _=a.itemValue||a.model||"id",B=a.itemTitle||(a.label===""?"name":a.label);return B&&a.label!==""?[{[_]:_,[B]:B}]:[]}),f=_=>{if(typeof _!="object")return _;const B=a.itemValue||a.model||"id";return _[B]},u=_=>{if(typeof _!="object")return String(_);const B=a.itemTitle||"name";return _[B]},h=t.computed(()=>a.model||`radio-group-${Math.random().toString(36).substr(2,9)}`),m=t.computed(()=>!!a.error||!!l.value),p=t.computed(()=>a.error||l.value),y=_=>_==null?a.modelValue===_:String(a.modelValue)===String(_),b=t.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),g=(_,B)=>{if(a.disabled||a.readonly){B.preventDefault();return}B.target.checked&&(r("update:modelValue",_),r("change",_))},E=_=>{!a.disabled&&!a.readonly&&!y(_)&&(r("update:modelValue",_),r("change",_))};return(_,B)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-3",e.disabled||e.readonly?"cursor-not-allowed":""])},[e.label?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",u_,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",h_,[i.value?(t.openBlock(),t.createElementBlock("div",m_,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),B[0]||(B[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["flex",e.layout?"flex-row flex-wrap gap-4":"flex-col gap-3"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(A,C)=>(t.openBlock(),t.createElementBlock("div",{key:C,class:t.normalizeClass(["flex items-start",b.value.container,e.disabled||e.readonly?"opacity-60 cursor-not-allowed":"cursor-pointer"])},[t.createElementVNode("div",p_,[t.createElementVNode("input",{id:e.id?`${e.id}-${C}`:`${h.value}-${C}`,name:h.value,type:"radio",value:f(A),checked:y(f(A)),disabled:e.disabled||e.readonly,required:e.required&&C===0,onChange:x=>g(f(A),x),class:"w-5 h-5 text-blue-600 focus:ring-blue-500 border-gray-300"},null,40,g_)]),t.createElementVNode("div",{class:"flex-1 min-w-0",onClick:x=>E(f(A))},[t.createElementVNode("label",{for:e.id?`${e.id}-${C}`:`${h.value}-${C}`,class:t.normalizeClass([b.value.label,"font-medium cursor-pointer select-none text-foreground dark:text-gray-300",e.disabled||e.readonly?"cursor-not-allowed opacity-60":""])},[t.createTextVNode(t.toDisplayString(u(A))+" ",1),e.required&&d.value.length===1&&e.label?(t.openBlock(),t.createElementBlock("span",x_,"*")):t.createCommentVNode("",!0)],10,y_)],8,b_)],2))),128))],2),m.value&&p.value?(t.openBlock(),t.createElementBlock("div",k_,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(p.value),1)])):t.createCommentVNode("",!0)])],2))}}),w_={class:"grid gap-3"},C_={key:0,class:"ml-1 text-destructive"},E_={class:"flex flex-col"},__={key:0,class:"flex items-center gap-2 text-sm text-gray-500 dark:text-neutral-400 mb-2"},B_=["onClick"],S_=["id","name","value","checked","disabled","required","onChange"],A_={key:1,class:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20"},v_=["for"],D_={key:0,class:"ml-1 text-red-500"},N_={key:1,class:"flex items-center gap-1 text-sm text-red-500 mt-2"},ui=t.defineComponent({name:"DCodeRadioCustom",inheritAttrs:!1,__name:"DCodeRadioCustom",props:{modelValue:{default:void 0},icon:{},itemTitle:{default:"name"},itemValue:{default:"id"},label:{default:""},options:{default:()=>[]},apiUrl:{default:""},apiMethod:{default:"GET"},endpoint:{},dataPath:{default:""},layout:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},error:{default:null},size:{default:"md"},color:{default:"blue"},model:{default:"id"},id:{default:""}},emits:["update:modelValue","change"],setup(e,{emit:o}){t.useAttrs();const{apiUrl:n}=Je(),r=o,a=e,s=t.ref(a.modelValue??void 0);t.watch(()=>a.modelValue,w=>{s.value=w},{immediate:!0});const i=t.ref([]),l=t.ref(!1),c=t.ref(null),d=t.computed(()=>a.disabled||l.value||!!c.value),f=async()=>{var v,S;const w=((v=a.endpoint)==null?void 0:v.apiUrl)||a.apiUrl;if(w){l.value=!0,c.value=null;try{const D={page:1,perPage:100},V=((S=a.endpoint)==null?void 0:S.apiMethod)||a.apiMethod,R=await n(w,V,D);let O=R;a.dataPath?O=a.dataPath.split(".").reduce((L,$)=>L&&L[$]!=="undefined"?L[$]:void 0,R):typeof R=="object"&&!Array.isArray(R)&&R.data&&(O=R.data),Array.isArray(O)?i.value=O:(console.warn("DCodeRadioCustom: Format response tidak terdeteksi sebagai Array. Gunakan prop 'dataPath'."),c.value="Format respons data tidak valid. Array tidak ditemukan.")}catch(D){console.error("DCodeRadioCustom fetch error:",D),c.value="Gagal memuat data dari endpoint."}finally{l.value=!1}}},u=t.ref(!1);let h=null;const m=()=>{typeof document<"u"&&(u.value=document.documentElement.classList.contains("dark")||document.body.classList.contains("dark"))};t.onMounted(()=>{var w;((w=a.endpoint)!=null&&w.apiUrl||a.apiUrl)&&f(),m(),typeof document<"u"&&(h=new MutationObserver(m),h.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),h.observe(document.body,{attributes:!0,attributeFilter:["class"]}))}),t.onBeforeUnmount(()=>{h&&h.disconnect()});const p=t.computed(()=>{if(a.options&&a.options.length>0)return a.options;if(i.value.length>0)return i.value;const w=a.itemValue||a.model||"id",v=a.itemTitle||(a.label===""?"name":a.label);return v&&a.label!==""?[{[w]:w,[v]:v}]:[]}),y=w=>{if(typeof w!="object")return w;const v=a.itemValue||a.model||"id";return w[v]},b=w=>{if(typeof w!="object")return String(w);const v=a.itemTitle||"name";return w[v]},g=Math.random().toString(36).slice(2,7),E=t.computed(()=>a.id?`radio-custom-${a.id}`:`radio-custom-${a.model}-${g}`),_=t.computed(()=>!!a.error||!!c.value),B=t.computed(()=>a.error||c.value),A=w=>{const v=s.value;return w==null?v===w:String(v)===String(w)},C=t.computed(()=>({sm:{radio:"w-3 h-3",label:"text-sm",container:"gap-2"},md:{radio:"w-4 h-4",label:"text-base",container:"gap-2"},lg:{radio:"w-5 h-5",label:"text-lg",container:"gap-3"}})[a.size]),x=w=>{const v=(w==null?void 0:w.icon)||a.icon;return No(v,Lt)},k=(w,v)=>{v.target.checked&&(s.value=w,r("update:modelValue",w),r("change",w))},N=w=>{a.disabled||A(w)||(s.value=w,r("update:modelValue",w),r("change",w))};return(w,v)=>(t.openBlock(),t.createElementBlock("div",w_,[e.label?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",C_,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",E_,[l.value?(t.openBlock(),t.createElementBlock("div",__,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),v[0]||(v[0]=t.createTextVNode(" Sedang memuat opsi... ",-1))])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["grid",e.layout?"grid-cols-2 sm:grid-cols-3":"grid-cols-1","gap-3"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.value,(S,D)=>(t.openBlock(),t.createElementBlock("div",{key:D,class:t.normalizeClass(["relative flex flex-col items-center justify-center gap-2 p-4 rounded-xl border-2 transition-all duration-200",A(y(S))?u.value?"border-primary-500 bg-primary-500/10 shadow-none":"border-primary-500 bg-primary-50 shadow-md shadow-primary-100":u.value?"border-neutral-700 bg-neutral-800 hover:border-neutral-600":"border-gray-200 bg-white hover:border-gray-300 hover:shadow-sm",d.value?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:V=>!d.value&&N(y(S))},[t.createElementVNode("input",{id:e.id?`${e.id}-${D}`:`${E.value}-${D}`,name:E.value,type:"radio",value:y(S),checked:A(y(S)),disabled:d.value,required:e.required&&D===0,onChange:V=>k(y(S),V),class:"sr-only",tabindex:"-1"},null,40,S_),t.createElementVNode("div",{class:t.normalizeClass(["w-10 h-10 rounded-full flex items-center justify-center transition-all duration-200",A(y(S))?u.value?"bg-primary-500/25 text-primary-400":"bg-primary-100 text-primary-600":u.value?"bg-neutral-700 text-neutral-500":"bg-gray-100 text-gray-400"])},[x(S)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(x(S)),{key:0,class:"w-6 h-6"})):(t.openBlock(),t.createElementBlock("svg",A_,[...v[1]||(v[1]=[t.createElementVNode("circle",{cx:"10",cy:"10",r:"6"},null,-1)])]))],2),t.createElementVNode("label",{for:e.id?`${e.id}-${D}`:`${E.value}-${D}`,class:t.normalizeClass([C.value.label,"font-medium text-center leading-tight select-none transition-colors duration-200",A(y(S))?u.value?"text-primary-400":"text-primary-700":u.value?"text-neutral-300":"text-gray-700",e.disabled?"cursor-not-allowed":"cursor-pointer"])},[t.createTextVNode(t.toDisplayString(b(S))+" ",1),e.required&&p.value.length===1&&e.label?(t.openBlock(),t.createElementBlock("span",D_,"*")):t.createCommentVNode("",!0)],10,v_)],10,B_))),128))],2),_.value&&B.value?(t.openBlock(),t.createElementBlock("div",N_,[t.createVNode(t.unref(ne.AlertCircle),{class:"w-4 h-4 flex-shrink-0"}),t.createTextVNode(" "+t.toDisplayString(B.value),1)])):t.createCommentVNode("",!0)])]))}}),V_={key:0,class:"ml-1 text-destructive"},M_={class:"relative w-full"},T_={key:0,class:"mb-2 flex items-center justify-between"},P_={class:"text-sm text-muted-foreground"},O_={class:"text-sm font-medium text-foreground"},R_={class:"text-sm text-muted-foreground"},L_={class:"relative"},I_=["id","value","min","max","step","disabled","placeholder"],F_={key:1,class:"relative mt-2"},z_={class:"text-xs text-muted-foreground mt-1"},$_={key:1,class:"flex items-center gap-1 text-sm text-destructive"},j_={name:"DCodeSlider"},da=t.defineComponent({...j_,name:"DCodeSlider",inheritAttrs:!1,props:{modelValue:{default:0},min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},label:{default:""},placeholder:{default:""},required:{type:Boolean,default:!1},error:{default:null},showValue:{type:Boolean,default:!0},valuePrefix:{default:""},valueSuffix:{default:""},marks:{default:()=>[]},color:{default:"blue"},size:{default:"md"}},emits:["update:modelValue","change","input"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.ref(),i=t.ref(!1),l=t.computed(()=>!!a.error),c=t.computed(()=>`slider-${Math.random().toString(36).substr(2,9)}`),d=t.computed(()=>(a.label||n.label)??void 0),f=t.computed(()=>!0),u=t.computed(()=>{const A={sm:"h-2",md:"h-2.5",lg:"h-3"},C={blue:"accent-blue-500",green:"accent-green-500",red:"accent-red-500",yellow:"accent-yellow-500",purple:"accent-purple-500",gray:"accent-gray-500"};return["w-full appearance-none bg-transparent rounded-lg outline-none transition-all cursor-pointer relative z-10","disabled:opacity-50 disabled:cursor-not-allowed",A[a.size],C[a.color]||C.blue,l.value?"accent-red-500":"",n.class].filter(Boolean).join(" ")}),h=t.computed(()=>["appearance-none bg-white border-2 border-current rounded-full cursor-pointer transition-all","hover:scale-110 focus:scale-110","shadow-md hover:shadow-lg focus:shadow-lg","focus:outline-none focus:ring-2 focus:ring-offset-2",{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[a.size],a.color==="blue"?"focus:ring-blue-500":a.color==="green"?"focus:ring-green-500":a.color==="red"?"focus:ring-red-500":a.color==="yellow"?"focus:ring-yellow-500":a.color==="purple"?"focus:ring-purple-500":"focus:ring-gray-500"].join(" ")),m=t.computed(()=>`${a.valuePrefix}${a.modelValue}${a.valueSuffix}`),p=t.computed(()=>{const A=a.max-a.min;return(a.modelValue-a.min)/A*100}),y=A=>{const C=A.target,x=parseFloat(C.value);r("update:modelValue",x),r("input",x)},b=A=>{const C=A.target,x=parseFloat(C.value);r("change",x)},g=()=>{i.value=!0},E=()=>{i.value=!1},_=A=>{const C=a.max-a.min;return(A-a.min)/C*100},B=t.computed(()=>{const A={sm:16,md:20,lg:24};return`
|
|
90
90
|
input[type="range"]::-webkit-slider-thumb {
|
|
91
91
|
${h.value}
|
|
92
92
|
width: ${A[a.size]}px;
|
|
@@ -115,6 +115,6 @@ https://github.com/highlightjs/highlight.js/issues/2277`),F=P,T=R),j===void 0&&(
|
|
|
115
115
|
input[type="range"]:focus::-moz-range-thumb {
|
|
116
116
|
transform: scale(1.1);
|
|
117
117
|
}
|
|
118
|
-
`});return(A,C)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-2 w-full",t.unref(n).class]),"aria-busy":!1},[d.value?(t.openBlock(),t.createBlock(t.unref(Qn),{key:0,for:c.value,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.value)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",VE,"*")):t.createCommentVNode("",!0)]),_:1},8,["for"])):t.createCommentVNode("",!0),t.createElementVNode("div",ME,[e.showValue?(t.openBlock(),t.createElementBlock("div",TE,[t.createElementVNode("span",PE,t.toDisplayString(a.valuePrefix)+t.toDisplayString(e.min)+t.toDisplayString(a.valueSuffix),1),t.createElementVNode("span",OE,t.toDisplayString(m.value),1),t.createElementVNode("span",LE,t.toDisplayString(a.valuePrefix)+t.toDisplayString(e.max)+t.toDisplayString(a.valueSuffix),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",RE,[t.createElementVNode("div",{class:t.normalizeClass(["absolute top-1/2 -translate-y-1/2 w-full h-full bg-gray-200 rounded-lg pointer-events-none",[e.size==="sm"?"h-2":e.size==="md"?"h-2.5":"h-3"]])},[t.createElementVNode("div",{class:t.normalizeClass(["absolute top-0 left-0 h-full rounded-lg transition-all",[e.color==="blue"?"bg-blue-500":e.color==="green"?"bg-green-500":e.color==="red"?"bg-red-500":e.color==="yellow"?"bg-yellow-500":e.color==="purple"?"bg-purple-500":"bg-gray-500"]]),style:t.normalizeStyle({width:`${p.value}%`})},null,6)],2),t.createElementVNode("input",{id:c.value,ref_key:"sliderRef",ref:s,type:"range",value:e.modelValue,min:e.min,max:e.max,step:e.step,disabled:e.disabled,placeholder:e.placeholder,class:t.normalizeClass(u.value),onInput:y,onChange:b,onMousedown:g,onMouseup:_,onTouchstart:g,onTouchend:_},null,42,IE)]),e.marks.length>0?(t.openBlock(),t.createElementBlock("div",FE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.marks,x=>(t.openBlock(),t.createElementBlock("div",{key:x.value,class:"absolute flex flex-col items-center",style:t.normalizeStyle({left:`${E(x.value)}%`,transform:"translateX(-50%)"})},[C[0]||(C[0]=t.createElementVNode("div",{class:"w-1 h-2 bg-gray-400 rounded-full"},null,-1)),t.createElementVNode("span",zE,t.toDisplayString(x.label),1)],4))),128))])):t.createCommentVNode("",!0)]),l.value?(t.openBlock(),t.createElementBlock("div",$E,[C[1]||(C[1]=t.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),t.createTextVNode(" "+t.toDisplayString(e.error),1)])):t.createCommentVNode("",!0),B.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent("style"),{key:2},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.value),1)]),_:1})):t.createCommentVNode("",!0)],2)),[[t.vShow,f.value]])}}),UE={key:0,class:"ml-1 text-destructive"},WE={class:"inline-flex items-center gap-3"},HE=["id","name","aria-checked","aria-label","disabled"],qE={key:0,class:"absolute inset-0 flex items-center justify-center"},GE={class:"relative z-10 flex items-center gap-2"},KE=["id","name","aria-checked","aria-label","disabled"],XE={key:0,class:"absolute inset-0 flex items-center justify-center"},YE={name:"DCodeSwitch"},fa=t.defineComponent({...YE,props:{modelValue:{type:Boolean,default:!1},label:{default:""},title:{default:"Title"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{default:"medium"},color:{default:"primary"},loading:{type:Boolean,default:!1},labelPosition:{default:"right"},id:{},name:{},required:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},tooltipActiveText:{default:"Aktif"},tooltipInactiveText:{default:"Tidak Aktif"}},emits:["update:modelValue","change"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:u=>{!n.disabled&&!n.loading&&(r("update:modelValue",u),r("change",u))}}),s=t.computed(()=>{switch(n.size){case"small":return"w-9 h-5";case"large":return"w-14 h-7";default:return"w-11 h-6"}}),i=t.computed(()=>{switch(n.size){case"small":return"w-4 h-4";case"large":return"w-6 h-6";default:return"w-5 h-5"}}),l=t.computed(()=>{switch(n.size){case"small":return"translate-x-4";case"large":return"translate-x-7";default:return"translate-x-5"}}),c=t.computed(()=>{if(n.disabled)return"bg-gray-300";if(n.readonly)return a.value?"bg-blue-400 opacity-80":"bg-gray-200 opacity-80";if(!a.value)return"bg-gray-200";switch(n.color){case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"danger":return"bg-red-500";default:return"bg-blue-500"}}),d=()=>{n.disabled||n.readonly||n.loading||(a.value=!a.value)},f=t.computed(()=>a.value?n.tooltipActiveText:n.tooltipInactiveText);return(u,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-3",n.disabled?"cursor-not-allowed":""])},[e.title?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",UE,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",WE,[t.createVNode(t.unref(jl),null,{default:t.withCtx(()=>[e.showTooltip?(t.openBlock(),t.createBlock(t.unref(zl),{key:0,"delay-duration":200},{default:t.withCtx(()=>[t.createVNode(t.unref(Ul),{"as-child":""},{default:t.withCtx(()=>[t.createElementVNode("button",{type:"button",id:e.id,name:e.name,"aria-checked":a.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:t.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[t.createElementVNode("span",{class:t.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(t.openBlock(),t.createElementBlock("span",qE,[...h[0]||(h[0]=[t.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:t.withCtx(()=>[a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.X),{key:1,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):t.createCommentVNode("",!0)]),_:1})],2)],10,HE)]),_:1}),t.createVNode(t.unref($l),{side:"top","side-offset":8,class:t.normalizeClass(["animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0",[a.value?"bg-green-600 dark:bg-green-500 text-white":"bg-gray-700 dark:bg-gray-600 text-white"]])},{default:t.withCtx(()=>[t.createElementVNode("span",GE,[t.createElementVNode("span",{class:t.normalizeClass(["inline-block w-2 h-2 rounded-full animate-pulse",a.value?"bg-green-200":"bg-gray-300"])},null,2),t.createTextVNode(" "+t.toDisplayString(f.value),1)])]),_:1},8,["class"])]),_:1})):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",id:e.id,name:e.name,"aria-checked":a.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:t.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[t.createElementVNode("span",{class:t.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(t.openBlock(),t.createElementBlock("span",XE,[...h[1]||(h[1]=[t.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:t.withCtx(()=>[a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.X),{key:1,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):t.createCommentVNode("",!0)]),_:1})],2)],10,KE))]),_:1})])],2))}}),JE=["aria-busy"],QE={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},ZE=["for"],eB={key:0,class:"ml-1 text-destructive"},tB={class:"relative w-full group"},oB=["id","value"],nB={key:0,class:"absolute top-1 right-2"},rB={key:1,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},aB={key:1,class:"text-xs text-destructive"},hn=t.defineComponent({name:"DCodeTextarea",inheritAttrs:!1,__name:"DCodeTextarea",props:{modelValue:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>n.label),i=t.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`app-textarea-${n.id||s.value||"field"}-${l}`),d=t.computed(()=>{const Q=n.required,$=n["aria-required"];return Q===""||Q===!0||Q==="true"||($==="true"||$===!0)}),f=t.computed(()=>{const{label:Q,class:$,id:Y,required:ae,"aria-required":xe,...Oe}=n,Ee={...Oe};return a.disabled&&(Ee.disabled=!0),a.readonly&&(Ee.readonly=!0),Ee}),u=t.computed(()=>{const Q=n.maxlength;let $=Number.NaN;return typeof Q=="number"?$=Q:typeof Q=="string"&&($=Number.parseInt(Q,10)),Number.isFinite($)&&$>0?$:-1}),h=Q=>u.value>0?Q.slice(0,u.value):Q,m=t.computed(()=>{const Q=a.modelValue;return Q==null||String(Q).length===0}),p=t.computed(()=>a.clearable?a.hideClearWhenEmpty?!m.value:!0:!1),y=t.ref(String(a.modelValue??""));t.watch(()=>a.modelValue,Q=>{const $=String(Q??"");$!==y.value&&(y.value=$)});const b=t.ref(!1),g=t.ref(!1),_=Q=>Q.split(/(\s+)/).map($=>{if($.trim()==="")return $;const Y=$.toLowerCase();return Y.charAt(0).toUpperCase()+Y.slice(1)}).join(""),E=Q=>{const $=Q.toLowerCase(),Y=$.search(new RegExp("\\p{L}","u"));return Y<0?$:$.slice(0,Y)+$.charAt(Y).toUpperCase()+$.slice(Y+1)},B=Q=>{switch(a.textCase){case"uppercase":return Q.toUpperCase();case"lowercase":return Q.toLowerCase();case"titlecase":return _(Q);case"sentencecase":return E(Q);case"none":default:return Q}},A=t.computed(()=>{switch(a.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),C=Q=>{if(!Q)return null;const $=Array.isArray(Q)?Q.join(""):Q;return $?new Set($):null},x=t.computed(()=>C(a.allowChars)),w=(Q,$)=>(Q.lastIndex=0,Q.test($)),D=Q=>{if(Q===`
|
|
119
|
-
`)return a.valueType!=="number";if(a.valueType==="free")return!0;const
|
|
120
|
-
`,""),Y=Number($);return Number.isFinite(Y)?Y:null}return Q},V=Q=>{y.value=Q,r("update:modelValue",N(Q))},L=(Q,$)=>{const Y=h($);g.value=!0,Q.value=Y,V(Y),queueMicrotask(()=>g.value=!1)},O=(Q,$)=>{const Y=Q.selectionStart??Q.value.length,ae=Q.selectionEnd??Q.value.length;if(u.value>0){const xe=Q.value.length-(ae-Y),Oe=u.value-xe;if(Oe<=0)return;$=$.slice(0,Oe)}Q.setRangeText($,Y,ae,"end"),L(Q,v(Q.value))},P=Q=>{var ae;if(!S||b.value||g.value||!((ae=Q.inputType)!=null&&ae.startsWith("insert")))return;const $=Q.data;if($==null)return;const Y=v($);Y!==$&&(Q.preventDefault(),Y.length>0&&O(S,Y))},R=Q=>{var ae;if(!S||b.value||g.value)return;const $=((ae=Q.clipboardData)==null?void 0:ae.getData("text"))??"",Y=v($);Y!==$&&(Q.preventDefault(),Y.length>0&&O(S,Y))},j=async Q=>{if(!S||b.value||g.value)return;const $=Q.target,Y=$.value??"",ae=v(Y);if(ae===Y){const xe=$.selectionStart??ae.length,Oe=$.selectionEnd??ae.length;L($,ae),await t.nextTick();try{$.setSelectionRange(xe,Oe)}catch{}V(ae)}else{const xe=$.selectionStart??ae.length,Oe=$.selectionEnd??ae.length;L($,ae),await t.nextTick();try{$.setSelectionRange(xe,Oe)}catch{}}},T=()=>b.value=!0,F=()=>{if(b.value=!1,!S)return;const Q=S.value??"",$=v(Q);$===Q?V($):L(S,$)};t.onMounted(()=>{if(S=document.getElementById(c.value),!S)return;S.addEventListener("beforeinput",P),S.addEventListener("paste",R),S.addEventListener("input",j),S.addEventListener("compositionstart",T),S.addEventListener("compositionend",F);const Q=S.value??"",$=v(Q);$===Q?V($):L(S,$)}),t.onBeforeUnmount(()=>{S&&(S.removeEventListener("beforeinput",P),S.removeEventListener("paste",R),S.removeEventListener("input",j),S.removeEventListener("compositionstart",T),S.removeEventListener("compositionend",F),S=null)});const X=()=>{y.value="",S&&(S.value=""),r("update:modelValue",null),r("clear")},H=t.computed(()=>y.value.length),W=t.computed(()=>a.showCharCount?u.value>0:!1),Z=t.computed(()=>W.value&&H.value>0),oe=t.computed(()=>`${H.value} / ${u.value}`),ye=t.computed(()=>!!a.error),Ne=t.computed(()=>{const Q=n.rows,$=typeof Q=="number"?Q:Number.parseInt(String(Q??""),10);return Number.isFinite($)&&$>0?$:3}),we=t.computed(()=>({height:`${Ne.value*24+16}px`}));return(Q,$)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",QE)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse",style:t.normalizeStyle(we.value)},null,4)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),d.value?(t.openBlock(),t.createElementBlock("span",eB,"*")):t.createCommentVNode("",!0)],8,ZE)):t.createCommentVNode("",!0),t.createElementVNode("div",tB,[t.createElementVNode("textarea",t.mergeProps({id:c.value,value:y.value},f.value,{style:`text-transform: ${A.value}; padding-right: ${p.value?"2.5rem":"0.75rem"} !important; padding-left: 0.75rem !important;`,class:["flex min-h-[120px] w-full rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",ye.value?"border-destructive focus-visible:ring-destructive focus:ring-destructive":""]}),null,16,oB),p.value?(t.openBlock(),t.createElementBlock("div",nB,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-sm leading-none","aria-label":"Clear textarea",onClick:X}," ✕ ")])):t.createCommentVNode("",!0),Z.value&&!ye.value?(t.openBlock(),t.createElementBlock("p",rB,t.toDisplayString(oe.value),1)):t.createCommentVNode("",!0)]),ye.value?(t.openBlock(),t.createElementBlock("p",aB,t.toDisplayString(a.error),1)):t.createCommentVNode("",!0)],64))],10,JE)),[[t.vShow,i.value]])}}),Wf=t.defineComponent({__name:"Avatar",props:{class:{type:[Boolean,null,String,Object,Array]},size:{default:"sm"},shape:{default:"circle"}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(_e.AvatarRoot),{class:t.normalizeClass(t.unref(Te)(t.unref(sB)({size:e.size,shape:e.shape}),o.class))},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["class"]))}}),Hf=t.defineComponent({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(_e.AvatarFallback),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),qf=t.defineComponent({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(_e.AvatarImage),t.mergeProps(o,{class:"h-full w-full object-cover"}),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),sB=yr("inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden",{variants:{size:{sm:"h-10 w-10 text-xs",base:"h-16 w-16 text-2xl",lg:"h-32 w-32 text-5xl"},shape:{circle:"rounded-full",square:"rounded-md"}}}),ua=t.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(_e.Separator),t.mergeProps(t.unref(n),{class:t.unref(Te)("shrink-0 bg-border",o.orientation==="horizontal"?"h-px w-full":"w-px h-full",o.class)}),null,16,["class"]))}}),iB={class:"bg-card text-card-foreground"},lB={class:"pb-6 px-3"},cB={key:0,class:"flex justify-center p-8"},dB={key:1,class:"p-8 text-center text-red-500"},fB={key:2,class:"relative"},uB={class:"space-y-6"},hB={class:"rounded-xl border bg-card text-card-foreground shadow"},mB={class:"p-4"},pB={class:"flex items-center justify-between gap-3"},gB={class:"font-medium"},bB={class:"text-xs text-muted-foreground"},yB={class:"mt-1 text-sm text-muted-foreground"},xB={class:"text-foreground"},kB={class:"text-foreground"},wB={class:"mt-1 text-xs text-muted-foreground"},CB={key:0,class:"mt-3 flex items-center gap-2 text-sm"},_B={class:"flex items-center justify-between gap-3"},EB={class:"font-medium"},BB={class:"text-xs text-muted-foreground"},SB={class:"mt-2 text-sm text-muted-foreground"},AB={class:"flex flex-wrap items-center justify-between gap-3"},vB={class:"flex items-center gap-3"},DB={class:"leading-tight"},NB={class:"text-sm font-medium"},VB={class:"text-xs text-muted-foreground"},MB={class:"flex items-center gap-2"},TB={key:2,class:"flex flex-col gap-3 sm:flex-row sm:items-start"},PB={class:"h-16 w-16 shrink-0 rounded-lg bg-muted flex items-center justify-center"},OB=["src"],LB={class:"flex-1"},RB={class:"flex items-center justify-between gap-3"},IB={class:"font-medium"},FB={class:"text-xs text-muted-foreground"},zB={class:"mt-1 text-sm text-muted-foreground"},$B={class:"text-left sm:text-center"},jB={class:"text-xs text-muted-foreground"},UB={class:"text-left sm:text-center"},WB={class:"text-xs text-muted-foreground"},HB={class:"text-left sm:text-center"},qB={class:"text-xs text-muted-foreground"},GB={class:"flex items-center justify-between gap-3"},KB={class:"font-medium"},XB={class:"text-xs text-muted-foreground"},YB={class:"mt-2 text-sm text-muted-foreground"},JB={class:"mt-3 flex items-center gap-3"},QB={class:"text-sm font-medium"},ZB={class:"flex items-start justify-between gap-3"},eS={class:"font-medium"},tS={class:"mt-3 grid gap-2 text-sm"},oS={class:"flex items-center justify-between gap-3"},nS={class:"flex items-center gap-2 text-muted-foreground"},rS={class:"font-medium"},aS={class:"flex items-center justify-between gap-3"},sS={class:"flex items-center gap-2 text-muted-foreground"},iS={class:"font-medium"},lS={class:"flex items-center justify-between gap-3"},cS={class:"flex items-center gap-2 text-muted-foreground"},dS={class:"font-medium"},fS={class:"flex items-center justify-between"},uS={class:"flex items-center gap-2"},hS={class:"flex items-start justify-between gap-3"},mS={class:"flex items-center gap-2"},pS={class:"font-medium"},gS={class:"mt-2 text-sm text-muted-foreground"},bS={key:0,class:"mt-1 text-sm text-muted-foreground"},yS={class:"flex flex-wrap items-center justify-between gap-3"},xS={class:"flex items-center gap-2"},kS={class:"text-xs text-muted-foreground"},Gf=t.defineComponent({name:"DCodeTimelineWithIcons",__name:"DCodeTimelineWithIcons",props:{items:{},apiUrl:{},apiMethod:{}},setup(e){const n=Xe.useBreakpoints(Xe.breakpointsTailwind).smaller("md");t.ref(!1);const r=e,a=t.ref(!1),s=t.ref(null),i=t.ref([]),l=t.computed(()=>i.value.length>0?i.value:r.items&&r.items.length>0?r.items:[]),c=async()=>{if(r.apiUrl){a.value=!0,s.value=null;try{const u=await fetch(r.apiUrl,{method:r.apiMethod||"GET",headers:{"Content-Type":"application/json"}});if(!u.ok)throw new Error(`Error: ${u.status} ${u.statusText}`);const h=await u.json();Array.isArray(h)?i.value=h:h.data&&Array.isArray(h.data)?i.value=h.data:h.items&&Array.isArray(h.items)?i.value=h.items:i.value=[]}catch(u){console.error("Failed to fetch timeline items:",u),s.value=u.message||"Failed to fetch data"}finally{a.value=!1}}};t.onMounted(()=>{r.apiUrl&&c()}),t.watch(()=>r.apiUrl,()=>{r.apiUrl?c():i.value=[]});const d=u=>{switch(u){case"flight":return{Icon:ne.PlaneIcon,Circle:"bg-primary/10 text-primary border-primary/30"};case"interview":return{Icon:ne.ClockIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};case"product":return{Icon:ne.ShoppingCartIcon,Circle:"bg-amber-500/10 text-amber-600 border-amber-500/30"};case"design":return{Icon:ne.PencilIcon,Circle:"bg-sky-500/10 text-sky-600 border-sky-500/30"};case"server":return{Icon:ne.ServerIcon,Circle:"bg-rose-500/10 text-rose-600 border-rose-500/30"};case"location":return{Icon:ne.MapPinIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};default:return{Icon:ne.Circle,Circle:"bg-primary/10 text-primary border-primary/30"}}},f=u=>u.split(" ").filter(Boolean).slice(0,2).map(h=>{var m;return(m=h[0])==null?void 0:m.toUpperCase()}).join("");return(u,h)=>{const m=t.resolveComponent("ShoppingCart"),p=t.resolveComponent("DCodeBadge"),y=t.resolveComponent("RefreshCcw"),b=t.resolveComponent("MapPin");return t.openBlock(),t.createElementBlock("div",iB,[h[8]||(h[8]=t.createElementVNode("div",{class:"flex flex-col space-y-1.5 py-6 px-3"},[t.createElementVNode("h3",{class:"leading-none tracking-tight text-lg font-medium"},"Timeline With Icons")],-1)),t.createElementVNode("div",lB,[a.value?(t.openBlock(),t.createElementBlock("div",cB,[...h[0]||(h[0]=[t.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):s.value?(t.openBlock(),t.createElementBlock("div",dB,t.toDisplayString(s.value),1)):(t.openBlock(),t.createElementBlock("div",fB,[h[7]||(h[7]=t.createElementVNode("div",{class:"absolute left-4 top-0 h-full w-px bg-border"},null,-1)),t.createElementVNode("div",uB,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(g,_)=>(t.openBlock(),t.createElementBlock("div",{key:_,class:"relative pl-14"},[t.createElementVNode("div",{class:t.normalizeClass(["absolute left-0 top-2 flex h-8 w-8 items-center justify-center rounded-full border",d(g.type).Circle])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d(g.type).Icon),{class:"h-4 w-4"}))],2),t.createElementVNode("div",hB,[t.createElementVNode("div",mB,[g.type==="flight"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",pB,[t.createElementVNode("p",gB,t.toDisplayString(g.title),1),t.createElementVNode("p",bB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",yB,[t.createElementVNode("span",xB,t.toDisplayString(g.from),1),t.createVNode(t.unref(ne.ArrowRight),{class:"mx-2 inline h-4 w-4"}),t.createElementVNode("span",kB,t.toDisplayString(g.to),1)]),t.createElementVNode("p",wB,t.toDisplayString(g.time),1),g.fileName?(t.openBlock(),t.createElementBlock("div",CB,[t.createVNode(t.unref(ne.FileText),{class:"h-4 w-4 text-muted-foreground"}),t.createElementVNode("span",null,t.toDisplayString(g.fileName),1)])):t.createCommentVNode("",!0)],64)):g.type==="interview"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",_B,[t.createElementVNode("p",EB,t.toDisplayString(g.title),1),t.createElementVNode("p",BB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",SB,t.toDisplayString(g.desc),1),t.createVNode(t.unref(ua),{class:"my-4"}),t.createElementVNode("div",AB,[t.createElementVNode("div",vB,[t.createVNode(t.unref(Wf),{class:"h-10 w-10"},{default:t.withCtx(()=>[g.avatarUrl?(t.openBlock(),t.createBlock(t.unref(qf),{key:0,src:g.avatarUrl},null,8,["src"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Hf),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),t.createElementVNode("div",DB,[t.createElementVNode("p",NB,t.toDisplayString(g.personName),1),t.createElementVNode("p",VB,t.toDisplayString(g.personRole),1)])]),t.createElementVNode("div",MB,[t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Phone),{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="product"?(t.openBlock(),t.createElementBlock("div",TB,[t.createElementVNode("div",PB,[g.imgUrl?(t.openBlock(),t.createElementBlock("img",{key:0,src:g.imgUrl,class:"h-full w-full rounded-lg object-cover",alt:"product"},null,8,OB)):(t.openBlock(),t.createBlock(m,{key:1,class:"h-5 w-5 text-muted-foreground"}))]),t.createElementVNode("div",LB,[t.createElementVNode("div",RB,[t.createElementVNode("p",IB,t.toDisplayString(g.title),1),t.createElementVNode("p",FB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",zB,t.toDisplayString(g.desc),1),t.createElementVNode("div",{class:t.normalizeClass(["mt-4 grid gap-3",t.unref(n)?"grid-cols-1":"grid-cols-3"])},[t.createElementVNode("div",$B,[h[1]||(h[1]=t.createElementVNode("p",{class:"text-sm font-medium"},"Customer",-1)),t.createElementVNode("p",jB,t.toDisplayString(g.customer),1)]),t.createElementVNode("div",UB,[h[2]||(h[2]=t.createElementVNode("p",{class:"text-sm font-medium"},"Price",-1)),t.createElementVNode("p",WB,t.toDisplayString(g.price),1)]),t.createElementVNode("div",HB,[h[3]||(h[3]=t.createElementVNode("p",{class:"text-sm font-medium"},"Quantity",-1)),t.createElementVNode("p",qB,t.toDisplayString(g.qty),1)])],2)])])):g.type==="design"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createElementVNode("div",GB,[t.createElementVNode("p",KB,t.toDisplayString(g.title),1),t.createElementVNode("p",XB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",YB,t.toDisplayString(g.desc),1),t.createElementVNode("div",JB,[t.createVNode(t.unref(Wf),{class:"h-10 w-10"},{default:t.withCtx(()=>[g.avatarUrl?(t.openBlock(),t.createBlock(t.unref(qf),{key:0,src:g.avatarUrl},null,8,["src"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Hf),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),t.createElementVNode("p",QB,t.toDisplayString(g.personName),1)])],64)):g.type==="server"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",ZB,[t.createElementVNode("p",eS,t.toDisplayString(g.title),1),t.createVNode(p,{variant:"destructive",class:"h-6"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.chipText??""),1)]),_:2},1024)]),t.createElementVNode("div",tS,[t.createElementVNode("div",oS,[t.createElementVNode("div",nS,[t.createVNode(t.unref(ne.Globe),{class:"h-4 w-4"}),h[4]||(h[4]=t.createElementVNode("span",null,"IP Address",-1))]),t.createElementVNode("span",rS,t.toDisplayString(g.ip),1)]),t.createElementVNode("div",aS,[t.createElementVNode("div",sS,[t.createVNode(t.unref(ne.Cpu),{class:"h-4 w-4"}),h[5]||(h[5]=t.createElementVNode("span",null,"CPU",-1))]),t.createElementVNode("span",iS,t.toDisplayString(g.cpu),1)]),t.createElementVNode("div",lS,[t.createElementVNode("div",cS,[t.createVNode(t.unref(ne.CpuIcon),{class:"h-4 w-4"}),h[6]||(h[6]=t.createElementVNode("span",null,"Memory",-1))]),t.createElementVNode("span",dS,t.toDisplayString(g.memory),1)])]),t.createVNode(t.unref(ua),{class:"my-4"}),t.createElementVNode("div",fS,[t.createElementVNode("div",uS,[t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Share2),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(y,{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="location"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createElementVNode("div",hS,[t.createElementVNode("div",mS,[t.createVNode(b,{class:"h-4 w-4 text-muted-foreground"}),t.createElementVNode("p",pS,t.toDisplayString(g.title),1)]),t.createVNode(p,{variant:"destructive",class:"h-6"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.chipText),1)]),_:2},1024)]),t.createElementVNode("p",gS,t.toDisplayString(g.desc1),1),g.desc2?(t.openBlock(),t.createElementBlock("p",bS,t.toDisplayString(g.desc2),1)):t.createCommentVNode("",!0),t.createVNode(t.unref(ua),{class:"my-4"}),t.createElementVNode("div",yS,[t.createElementVNode("div",xS,[t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Link),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.User),{class:"h-4 w-4"})]),_:1})]),t.createElementVNode("p",kS,"Due date: "+t.toDisplayString(g.due),1)])],64)):t.createCommentVNode("",!0)])])]))),128))])]))])])}}}),wS={class:"dcode-upload-file"},CS={class:"border-2 border-dashed border-gray-300 dark:border-gray-700 rounded-lg p-6 flex flex-col items-center justify-center text-center hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer"},_S={key:0,class:"text-xs text-gray-500 mt-1"},ES=["accept"],BS={key:1,class:"text-xs text-red-600 mt-1"},Kf=t.defineComponent({name:"DCodeUploadFile",__name:"DCodeUploadFile",props:{label:{},accept:{},errorMessage:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=o,r=a=>{var i;const s=(i=a.target.files)==null?void 0:i[0];s&&n("update:modelValue",s)};return(a,s)=>(t.openBlock(),t.createElementBlock("div",wS,[e.label?(t.openBlock(),t.createBlock(Wo,{key:0,label:e.label},null,8,["label"])):t.createCommentVNode("",!0),t.createElementVNode("div",CS,[t.createVNode(t.unref(ne.UploadCloud),{class:"w-8 h-8 text-gray-400 mb-2"}),s[0]||(s[0]=t.createElementVNode("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[t.createElementVNode("span",{class:"font-medium text-primary-600"},"Click to upload"),t.createTextVNode(" or drag and drop ")],-1)),e.accept?(t.openBlock(),t.createElementBlock("p",_S,t.toDisplayString(e.accept),1)):t.createCommentVNode("",!0),t.createElementVNode("input",{type:"file",class:"hidden",onChange:r,accept:e.accept},null,40,ES)]),e.errorMessage?(t.openBlock(),t.createElementBlock("p",BS,t.toDisplayString(e.errorMessage),1)):t.createCommentVNode("",!0)]))}}),SS=["onClick"],AS={key:1,class:"mr-2 text-xs font-bold shrink-0 opacity-50"},vS={class:"font-semibold text-sm whitespace-normal text-center leading-tight"},DS={key:1},NS={key:0,class:"text-white"},VS={key:1},MS={key:2},TS=["disabled","onClick"],PS={key:1,class:"mr-2 text-sm font-bold opacity-70"},OS={class:"whitespace-normal text-sm text-center leading-tight"},LS={class:"flex flex-col flex-1 min-w-0"},RS={class:"rounded-lg border bg-muted/30 px-4 py-3 text-sm text-muted-foreground flex items-center gap-2"},IS={class:"text-sm text-muted-foreground"},FS={class:"px-1"},zS=["disabled"],$S=["type"],jS=["disabled"],hi=ft(t.defineComponent({name:"DCodeWizard",__name:"DCodeWizard",props:{tabs:{},modelValue:{},defaultTab:{default:0},allowTabClick:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},cache:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!0},apiOptions:{type:[Object,Function],default:void 0},isVertical:{type:Boolean,default:!1},isWizard:{type:Boolean,default:!1},typeWizard:{default:"icon"},showNavigation:{type:Boolean,default:!0},submitText:{default:"Simpan"},loading:{type:Boolean,default:!1},isSubmit:{type:Boolean,default:!1}},emits:["update:modelValue","change","loaded","error"],setup(e,{emit:o}){const n=e,r=o,a=Je(),s=a==null?void 0:a.DCodeApi;typeof s!="function"&&console.error("[DCodeWizardTabs] useApi() must expose DCodeApi()");const i=t.ref(n.defaultTab),l=t.computed({get(){var x;if(typeof n.modelValue=="string"){const w=(x=n.tabs)==null?void 0:x.findIndex(D=>D.key===n.modelValue);if(w!==void 0&&w>=0)return w}return(typeof n.modelValue=="number"?n.modelValue:void 0)??i.value},set(x){var w;if(i.value=x,typeof n.modelValue=="string"){const D=(w=n.tabs)==null?void 0:w[x];D?r("update:modelValue",D.key):r("update:modelValue",x)}else r("update:modelValue",x)}}),c=t.computed(()=>{var x;return((x=n.tabs)==null?void 0:x.length)??0}),d=t.computed(()=>{var x;return(x=n.tabs)==null?void 0:x[l.value]});function f(x){return c.value<=0?0:Math.min(Math.max(x,0),c.value-1)}function u(x){return x?typeof x=="string"?No(x,Rt):x:null}const h=t.reactive({});function m(x){return h[x.key]||(h[x.key]={loaded:!1,loading:!1,data:null,error:null}),h[x.key]}function p(){if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions}function y(x){const w=x.endpoint||{};return{apiModule:x.apiModule||w.apiModule,apiAction:x.apiAction||w.apiAction,apiUrl:w.apiUrl,apiMethod:w.apiMethod||"GET",apiParams:x.apiParams}}function b(x){if(n.isWizard||!n.allowTabClick||n.disabled)return!1;const w=n.tabs[x];return!(!w||w.disabled)}async function g(x){if(typeof x.tab.fetchData=="function"){const V=await x.tab.fetchData(),L=(V==null?void 0:V.data)??V;return(L==null?void 0:L.data)??L}const w=y(x.tab);if(!(w.apiModule&&w.apiAction||w.apiUrl))return null;if(typeof s!="function")throw new Error("DCodeApi is not available");const k=p();let v;if(w.apiUrl)v=await s("","",k,{_url:w.apiUrl,_method:w.apiMethod,_data:w.apiParams??void 0});else{const V={...k,...w.apiParams};v=await s(w.apiModule,w.apiAction,V)}const S=(v==null?void 0:v.data)??v;return(S==null?void 0:S.data)??S}async function _(x,{force:w=!1}={}){const D=f(x),k=n.tabs[D];if(!k)return;const v=m(k);if(!(n.cache&&v.loaded&&!w)&&!v.loading){v.loading=!0,v.error=null;try{const S=await g({tabIndex:D,tab:k});v.data=S,v.loaded=!0,r("loaded",{tabIndex:D,tab:k,data:S})}catch(S){const N=typeof(S==null?void 0:S.message)=="string"&&S.message||typeof S=="string"&&S||"Failed to load tab data.";v.error=N,r("error",{tabIndex:D,tab:k,message:N})}finally{v.loading=!1}}}function E(x){const w=f(x);b(w)&&w!==l.value&&(l.value=w)}function B(x=l.value){return _(x,{force:!0})}function A(){const x=f(l.value-1);x!==l.value&&(l.value=x)}function C(){const x=f(l.value+1);x!==l.value&&(l.value=x)}return t.watch(()=>n.tabs,x=>{for(const w of x??[])m(w)},{immediate:!0}),t.watch(()=>l.value,async x=>{var D;const w=(D=n.tabs)==null?void 0:D[x];w&&r("change",{tabIndex:x,tab:w}),await _(x)},{immediate:!0}),t.watch(()=>n.autoFetchOnMount,async x=>{x&&await _(l.value)},{immediate:!0}),(x,w)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["w-full rounded-lg border bg-card text-card-foreground shadow-sm",{"flex flex-row":e.isVertical}])},[t.createElementVNode("div",{class:t.normalizeClass(["flex flex-col space-y-1.5 p-6",{"w-64 border-r pr-0":e.isVertical,"pb-2":e.isWizard&&!e.isVertical}])},[t.createElementVNode("div",{class:t.normalizeClass({"mt-4":!e.isVertical||e.isWizard})},[e.isWizard?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["w-full relative flex overflow-visible rounded-lg",e.isVertical?"flex-col gap-2":""])},[e.isVertical?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.tabs,(D,k)=>(t.openBlock(),t.createElementBlock("div",{key:D.key,class:"relative z-10 box-border flex items-center gap-3 w-full pb-6 last:pb-0"},[t.createElementVNode("div",{class:t.normalizeClass(["w-8 h-8 rounded-full flex shrink-0 items-center justify-center font-bold text-sm border-2 transition-all bg-card",[k<l.value?"border-[#2563eb] bg-[#2563eb] text-white dark:border-[#1e3a8a] dark:bg-[#1e3a8a]":k===l.value?"border-[#2563eb] text-[#2563eb] shadow-[0_0_0_2px_rgba(37,99,235,0.2)] dark:border-[#1e3a8a] dark:text-[#3b82f6] dark:shadow-[0_0_0_2px_rgba(30,58,138,0.2)]":"border-[#e2e8f0] text-[#94a3b8] dark:border-[#3f3f46] dark:text-[#71717a]"]])},[e.typeWizard==="icon"&&D.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(D.icon)),{key:0,class:"w-4 h-4"})):e.typeWizard==="number"||!D.icon&&e.typeWizard!=="none"?(t.openBlock(),t.createElementBlock("span",DS,[k<l.value?(t.openBlock(),t.createElementBlock("span",NS,"✓")):(t.openBlock(),t.createElementBlock("span",VS,t.toDisplayString(k+1),1))])):(t.openBlock(),t.createElementBlock("span",MS))],2),t.createElementVNode("span",{class:t.normalizeClass(["text-xs font-semibold whitespace-normal px-2 py-1 rounded transition-colors text-left",k===l.value?"text-[#2563eb] dark:text-[#3b82f6]":"text-[#64748b] dark:text-[#a1a1aa]"])},t.toDisplayString(D.title),3)]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.tabs,(D,k)=>(t.openBlock(),t.createElementBlock("div",{key:D.key,onClick:v=>E(k),style:t.normalizeStyle({zIndex:e.tabs.length-k}),class:"relative flex-1 group"},[t.createElementVNode("div",{class:t.normalizeClass(["relative flex items-center justify-center min-h-[3rem] h-auto py-2 px-2 cursor-pointer transition-colors w-full",[k>0?"pl-8":"",k===l.value?"bg-[#2563eb] text-white dark:bg-[#1e3a8a]":k<l.value?"bg-[#eff6ff] text-[#2563eb] hover:bg-[#dbeafe] dark:bg-[#191d2c] dark:text-[#3b82f6] dark:hover:bg-[#1e263d]":"bg-[#f8fafc] text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:bg-[#18181b] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#d4d4d8]"]])},[e.typeWizard==="icon"&&D.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(D.icon)),{key:0,class:"w-4 h-4 mr-2 shrink-0"})):e.typeWizard==="number"?(t.openBlock(),t.createElementBlock("span",AS,t.toDisplayString(k+1),1)):t.createCommentVNode("",!0),t.createElementVNode("span",vS,t.toDisplayString(D.title),1)],2),k<e.tabs.length-1?(t.openBlock(),t.createElementBlock("svg",{key:0,class:t.normalizeClass(["absolute top-0 -right-[15.5px] w-[16px] h-full transition-colors block z-10",[k===l.value?"fill-[#2563eb] text-[#2563eb] dark:fill-[#1e3a8a] dark:text-[#1e3a8a]":k<l.value?"fill-[#eff6ff] text-[#eff6ff] group-hover:fill-[#dbeafe] group-hover:text-[#dbeafe] dark:fill-[#191d2c] dark:text-[#191d2c] dark:group-hover:fill-[#1e263d] dark:group-hover:text-[#1e263d]":"fill-[#f8fafc] text-[#f8fafc] group-hover:fill-[#f1f5f9] group-hover:text-[#f1f5f9] dark:fill-[#18181b] dark:text-[#18181b] dark:group-hover:fill-[#27272a] dark:group-hover:text-[#27272a]"]]),preserveAspectRatio:"none",viewBox:"0 0 16 48"},[...w[0]||(w[0]=[t.createElementVNode("polygon",{points:"0,0 16,24 0,48"},null,-1)])],2)):t.createCommentVNode("",!0)],12,SS))),128))],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex w-full",e.isVertical?"flex-col gap-1":"flex-wrap border-b border-separate"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabs,(D,k)=>(t.openBlock(),t.createElementBlock("button",{key:D.key,type:"button",disabled:!b(k),onClick:v=>E(k),class:t.normalizeClass(["relative min-h-[3rem] h-auto py-2 flex items-center justify-center gap-2 px-4 transition-all rounded-none focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 border-[#e2e8f0] dark:border-[#3f3f46]",t.unref(Te)("border-b border-r",!e.isVertical&&k===e.tabs.length-1&&"border-r-0",k===l.value?"bg-[#2563eb]/[0.08] text-[#2563eb] font-semibold dark:bg-[#191d2c] dark:text-[#3b82f6]":"bg-transparent text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#f4f4f5]",!b(k)&&"opacity-60 cursor-not-allowed",e.isVertical?"w-full justify-start border-r-0":"flex-1")])},[e.typeWizard==="icon"&&D.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(D.icon)),{key:0,class:"h-4 w-4 shrink-0"})):e.typeWizard==="number"?(t.openBlock(),t.createElementBlock("span",PS,t.toDisplayString(k+1),1)):t.createCommentVNode("",!0),t.createElementVNode("span",OS,t.toDisplayString(D.title),1)],10,TS))),128))],2))],2)],2),e.isVertical?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(ua),{key:0})),t.createElementVNode("div",LS,[t.createElementVNode("div",{class:t.normalizeClass(["p-6 flex-1 min-w-0",{"pl-6":e.isVertical}])},[t.createVNode(t.Transition,{name:"wizard-fade",mode:"out-in"},{default:t.withCtx(()=>{var D,k,v,S;return[(t.openBlock(),t.createElementBlock("div",{key:((D=d.value)==null?void 0:D.key)||l.value,class:"w-full"},[d.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(k=h[d.value.key])!=null&&k.loading?t.renderSlot(x.$slots,"loading",{key:0,tab:d.value,tabIndex:l.value},()=>[t.createElementVNode("div",RS,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),w[1]||(w[1]=t.createTextVNode(" Loading... ",-1))])],!0):t.renderSlot(x.$slots,`tab-${d.value.key}`,{key:1,tab:d.value,tabIndex:l.value,data:(v=h[d.value.key])==null?void 0:v.data,loaded:(S=h[d.value.key])==null?void 0:S.loaded,reload:B},()=>[t.createElementVNode("div",IS,[w[2]||(w[2]=t.createTextVNode(" Slot ",-1)),t.createElementVNode("code",FS,"tab-"+t.toDisplayString(d.value.key),1),w[3]||(w[3]=t.createTextVNode(" belum dibuat. ",-1))])],!0)],64)):t.createCommentVNode("",!0)]))]}),_:3})],2),e.isWizard||e.showNavigation?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["flex items-center justify-between p-6 pt-0",{"pl-6":e.isVertical}])},[t.createElementVNode("button",{type:"button",onClick:A,disabled:l.value<=0,class:"relative inline-flex items-center justify-center gap-2 px-5 py-2.5 text-sm font-medium transition-all duration-300 rounded-lg bg-[#ffffff] border border-[#e2e8f0] text-[#334155] shadow-sm hover:bg-[#f8fafc] hover:text-[#0f172a] hover:-translate-y-0.5 hover:shadow disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#ffffff] disabled:hover:text-[#334155] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#18181b] dark:border-[#27272a] dark:text-[#d4d4d8] dark:hover:bg-[#27272a] dark:hover:border-[#3f3f46] dark:disabled:hover:bg-[#18181b] dark:disabled:hover:text-[#d4d4d8] focus:outline-none focus:ring-2 focus:ring-[#e2e8f0] focus:ring-offset-2 active:scale-95"}," Sebelumnya ",8,zS),l.value<c.value-1?(t.openBlock(),t.createElementBlock("button",{key:0,type:e.isSubmit?"submit":"button",onClick:C,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"}," Selanjutnya ",8,$S)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"submit",disabled:e.loading,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#1e3a8a] dark:hover:bg-[#1e40af] focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"},[e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Loader2),{key:0,class:"w-4 h-4 mr-2 animate-spin"})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.submitText),1)],8,jS))],2)):t.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-3330e7b3"]]),US={class:"permission-menu w-full space-y-4"},WS={class:"bg-neutral-50/50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-4"},HS={class:"flex items-center justify-between"},qS={class:"flex items-center gap-3 flex-1"},GS=["onClick"],KS={key:1,class:"w-7"},XS={key:2,class:"flex-shrink-0"},YS={class:"text-lg font-semibold flex-1"},JS={key:0,class:"p-4 bg-gray-50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-neutral-700"},QS={class:"text-xs font-semibold text-gray-600 dark:text-neutral-400 uppercase tracking-wide mb-3"},ZS={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},eA=["checked","disabled","onChange"],tA={class:"text-sm font-medium text-gray-700 dark:text-neutral-300 group-hover:text-blue-700 dark:group-hover:text-primary-400"},oA={key:0,class:"p-4 space-y-3 bg-gray-50 dark:bg-zinc-900/30"},nA={class:"text-sm font-semibold text-gray-700 dark:text-neutral-300 mb-3 flex items-center gap-2"},rA={class:"bg-neutral-50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-3"},aA={class:"flex items-center justify-between"},sA={class:"flex items-center gap-3 flex-1"},iA={key:0,class:"flex-shrink-0"},lA={class:"text-base font-semibold flex-1"},cA={key:1,class:"text-xs bg-white/20 px-2 py-1 rounded font-mono hidden sm:inline-block"},dA={class:"flex items-center gap-2 px-2.5 py-1 bg-white/20 hover:bg-white/30 rounded-lg cursor-pointer transition-colors"},fA=["checked","onChange"],uA={class:"text-xs font-medium"},hA={key:0,class:"p-3"},mA={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},pA=["checked","disabled","onChange"],gA={class:"text-xs font-medium text-gray-700 dark:text-neutral-300 group-hover:text-pink-700 dark:group-hover:text-pink-400"},mi=ft(t.defineComponent({__name:"DCodePermissionMenu",props:{menuList:{default:()=>[]},enableParentControl:{type:Boolean,default:!1},showIcons:{type:Boolean,default:!0},modelValue:{default:()=>[]},treeData:{default:()=>[]}},emits:["permission-change","menu-check","update:modelValue"],setup(e,{expose:o,emit:n}){const{t:r}=Et.useI18n(),a=e,s=n,i=t.computed(()=>a.menuList&&a.menuList.length>0?a.menuList:a.treeData||[]),l=t.ref(new Map),c=t.ref(new Set),d=(k=!0)=>{(S=>{S.forEach(N=>{N.permission.forEach(V=>{const L=`${N.id}-${V.id}-parent`,O=V.code==="VIEW"||V.name.toUpperCase()==="VIEW";l.value.has(L)||l.value.set(L,O||(k?N.checked??!1:!1))}),N.detail&&N.detail.length>0&&N.detail.forEach(V=>{V.permission.forEach(L=>{const O=`${V.id}-${L.id}-child`,P=L.code==="VIEW"||L.name.toUpperCase()==="VIEW";l.value.has(O)||l.value.set(O,P||(k?V.checked??!1:!1))})})})})(i.value)},f=()=>{console.log("[DCodePermissionMenu] initializeFromModelValue called. modelValue:",a.modelValue),l.value.clear(),d(!1),a.modelValue&&a.modelValue.length>0&&a.modelValue.forEach(k=>{const v=k.menuId,S=k.actionsIds;i.value.forEach(N=>{N.id===v&&S.forEach(V=>{const L=`${v}-${V}-parent`;l.value.set(L,!0)}),N.detail&&N.detail.length>0&&N.detail.forEach(V=>{V.id===v&&S.forEach(L=>{const O=`${v}-${L}-child`;l.value.set(O,!0)})})})})};f(),t.watch(()=>a.modelValue,()=>{f()},{deep:!0}),t.watch(()=>i.value.length,(k,v)=>{v===0&&k>0&&f()});const u=k=>k.detail&&k.detail.length>0,h=k=>{c.value.has(k)?c.value.delete(k):c.value.add(k)},m=k=>c.value.has(k),p=(k,v,S=!1)=>{const N=`${k}-${v}-${S?"child":"parent"}`;return l.value.get(N)??!1},y=()=>{const k=C();s("update:modelValue",k.permissions)},b=(k,v,S,N=!1)=>{const V=S.target.checked,L=`${k}-${v}-${N?"child":"parent"}`;l.value.set(L,V),s("permission-change",k,v,V,!N),y()},g=k=>k.permission.filter(_),_=k=>k.code==="VIEW"||k.name.toUpperCase()==="VIEW",E=(k,v,S)=>{const N=S.target.checked;v.permission.forEach(V=>{if(_(V)){const O=`${v.id}-${V.id}-child`;l.value.set(O,!0);return}const L=`${v.id}-${V.id}-child`;l.value.set(L,N)}),l.value=new Map(l.value),s("menu-check",v.id,N),y()},B=(k,v=!1)=>{const S=v?k.permission:g(k);return!S||S.length===0?!1:S.every(N=>{const V=`${k.id}-${N.id}-${v?"child":"parent"}`;return l.value.get(V)??!1})},A=()=>{const k={};return i.value.forEach(v=>{var S;k[v.id]={name:v.name,parentPermissions:v.permission.map(N=>({id:N.id,name:N.name,checked:p(v.id,N.id,!1)})),children:((S=v.detail)==null?void 0:S.map(N=>({id:N.id,name:N.name,permissions:N.permission.map(V=>({id:V.id,name:V.name,checked:p(N.id,V.id,!0)}))})))||[]}}),k},C=()=>{const k=[],v=(S,N=!1)=>{const V=[];S.permission.forEach(L=>{const O=`${S.id}-${L.id}-${N?"child":"parent"}`;(l.value.get(O)??!1)&&V.push(L.id)}),V.length>0&&k.push({menuId:S.id,actionsIds:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(N=>{v(N,!0)})}),{permissions:k}};return o({getCurrentStates:A,getPermissionsForDatabase:C,getAllPermissionsWithStatus:()=>{const k=[],v=(S,N=!1)=>{const V=S.permission.map(O=>{const P=`${S.id}-${O.id}-${N?"child":"parent"}`,R=l.value.get(P)??!1;return{id:O.id,name:O.name,checked:R}}),L=V.filter(O=>O.checked).map(O=>O.id);k.push({menuId:S.id,menuName:S.name,actionsIds:L,actions:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(N=>{v(N,!0)})}),{permissions:k}},permissionStates:l,expandAll:()=>{i.value.forEach(k=>{u(k)&&c.value.add(k.id)})},collapseAll:()=>{c.value.clear()}}),(k,v)=>(t.openBlock(),t.createElementBlock("div",US,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,S=>(t.openBlock(),t.createElementBlock("div",{key:S.id,class:t.normalizeClass(["dcode-card overflow-hidden",{"border-l-4 border-l-blue-500":u(S)}])},[t.createElementVNode("div",WS,[t.createElementVNode("div",HS,[t.createElementVNode("div",qS,[u(S)?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:N=>h(S.id),type:"button",class:"p-1 hover:bg-white/20 rounded-lg transition-colors"},[m(S.id)?(t.openBlock(),t.createBlock(t.unref(ne.ChevronDown),{key:0,class:"w-5 h-5"})):(t.openBlock(),t.createBlock(t.unref(ne.ChevronRight),{key:1,class:"w-5 h-5"}))],8,GS)):(t.openBlock(),t.createElementBlock("div",KS)),e.showIcons&&S.icon?(t.openBlock(),t.createElementBlock("span",XS,[t.createElementVNode("i",{class:t.normalizeClass([S.icon,"text-2xl"])},null,2)])):t.createCommentVNode("",!0),t.createElementVNode("h3",YS,t.toDisplayString(S.name),1)])])]),S.permission&&S.permission.length>0&&!u(S)?(t.openBlock(),t.createElementBlock("div",JS,[t.createElementVNode("h4",QS,t.toDisplayString(t.unref(r)("common.permissions"))+": ",1),t.createElementVNode("div",ZS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g(S),N=>(t.openBlock(),t.createElementBlock("label",{key:N.id,class:"flex items-center gap-2 px-3 py-2 bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-lg cursor-pointer hover:border-blue-400 dark:hover:border-primary-500 hover:bg-blue-50 dark:hover:bg-neutral-900/50 transition-all group"},[t.createElementVNode("input",{type:"checkbox",checked:_(N)||p(S.id,N.id,!1),disabled:_(N),onChange:V=>b(S.id,N.id,V,!1),class:t.normalizeClass(["w-4 h-4 text-blue-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-blue-500 dark:focus:ring-blue-600",_(N)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,eA),t.createElementVNode("span",tA,t.toDisplayString(N.name),1)]))),128))])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"opacity-100 max-h-[5000px]","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-[5000px]","leave-to-class":"opacity-0 max-h-0"},{default:t.withCtx(()=>[u(S)&&m(S.id)?(t.openBlock(),t.createElementBlock("div",oA,[t.createElementVNode("h4",nA,[v[0]||(v[0]=t.createElementVNode("span",{class:"w-1 h-4 bg-blue-500 rounded"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("common.subMenus")),1)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.detail,N=>(t.openBlock(),t.createElementBlock("div",{key:N.id,class:"bg-white dark:bg-neutral-800 rounded-lg border border-gray-200 dark:border-neutral-700/50 overflow-hidden shadow-sm hover:shadow transition-shadow"},[t.createElementVNode("div",rA,[t.createElementVNode("div",aA,[t.createElementVNode("div",sA,[e.showIcons&&N.icon?(t.openBlock(),t.createElementBlock("span",iA,[t.createElementVNode("i",{class:t.normalizeClass([N.icon,"text-xl"])},null,2)])):t.createCommentVNode("",!0),t.createElementVNode("h5",lA,t.toDisplayString(N.name),1),N.path?(t.openBlock(),t.createElementBlock("span",cA,t.toDisplayString(N.path),1)):t.createCommentVNode("",!0),t.createElementVNode("label",dA,[t.createElementVNode("input",{type:"checkbox",checked:B(N,!0),onChange:V=>E(S,N,V),class:"w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600 cursor-pointer"},null,40,fA),t.createElementVNode("span",uA,t.toDisplayString(t.unref(r)("common.selectAll")),1)])])])]),N.permission&&N.permission.length>0?(t.openBlock(),t.createElementBlock("div",hA,[t.createElementVNode("div",mA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.permission,V=>(t.openBlock(),t.createElementBlock("label",{key:V.id,class:"flex items-center gap-2 px-2.5 py-1.5 bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-neutral-700 rounded-md cursor-pointer hover:border-pink-400 dark:hover:border-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/20 transition-all group"},[t.createElementVNode("input",{type:"checkbox",checked:_(V)||p(N.id,V.id,!0),disabled:_(V),onChange:L=>b(N.id,V.id,L,!0),class:t.normalizeClass(["w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600",_(V)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,pA),t.createElementVNode("span",gA,t.toDisplayString(V.name),1)]))),128))])])):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)]),_:2},1024)],2))),128))]))}}),[["__scopeId","data-v-40ddf81d"]]),bA={class:"space-y-4"},yA={key:0,class:"block text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-2"},xA={key:0,class:"text-danger-500"},kA={key:1,class:"flex items-center justify-center p-8 bg-white dark:bg-gray-800 rounded-lg shadow"},wA={class:"text-neutral-600 dark:text-neutral-400"},CA={key:2,class:"p-6 bg-white dark:bg-gray-800 rounded-lg shadow text-center"},_A={class:"text-neutral-500 dark:text-neutral-400"},EA={key:3,class:"space-y-3"},BA={class:"flex items-center justify-between p-4 bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700"},SA={class:"flex items-center gap-3"},AA={class:"font-medium text-gray-900 dark:text-gray-100 text-base"},vA={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},DA={class:"flex items-center gap-2 text-sm font-medium"},NA={class:"px-2.5 py-1 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300"},VA={class:"p-4"},MA={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3"},TA={class:"ml-2 flex-1 min-w-0"},PA=["for"],OA={key:0,class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 line-clamp-2"},LA={key:4,class:"mt-1 text-xs text-danger-600"},pi=t.defineComponent({__name:"DCodeTreePermissions",props:{modelValue:{},label:{},required:{type:Boolean},disabled:{type:Boolean},error:{},treeData:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,{t:a}=Et.useI18n(),s=t.ref(!0),i=t.ref([]),l=t.ref({}),c=t.ref([]),d=t.ref({}),f=g=>{if(console.log(g),!g)return[];if(Array.isArray(g)&&g.length>0&&g[0].module&&Array.isArray(g[0].permissions))return g.map(_=>({menuId:_.menuId,module:_.module,label:_.label||_.module,permissions:_.permissions}));if(Array.isArray(g)&&g.length>0&&g[0].key){const _={};return g.forEach(E=>{const B=E.key,A=B&&B.includes(".")?B.split(".")[0]:"other";_[A]||(_[A]={menuId:0,module:A,label:A,permissions:[]}),_[A].permissions.push({id:E.id,key:E.key,label:E.label,description:E.description})}),Object.values(_)}if(Array.isArray(g)&&g.length>0&&g[0].id&&g[0].name&&Array.isArray(g[0].permission)){const _=[],E=(B,A="")=>{const C=A?`${A}.${B.name}`:B.name,x=C.toLowerCase().replace(/\s+/g,"_"),w=[];if(B.detail&&Array.isArray(B.detail)&&B.detail.forEach(D=>{w.push(D.id)}),B.permission&&B.permission.length>0){const D=B.permission.map(k=>({id:k.id,key:`${x}.${k.name.toLowerCase().replace(/\s+/g,"_")}`,label:`${k.name} ${B.name}`,description:`Permission to ${k.name.toLowerCase()} ${B.name.toLowerCase()}`}));_.push({menuId:B.id,module:x,label:B.name,permissions:D,subMenuIds:w.length>0?w:void 0})}B.detail&&Array.isArray(B.detail)&&B.detail.forEach(D=>{E(D,C)})};return g.forEach(B=>E(B)),_}return g.data?f(g.data):[]},u=async()=>{s.value=!0;try{let g;n.treeData&&n.treeData.length>0?g=n.treeData:g=[];const _=f(g);i.value=_;const E={},B=[],A={};_.forEach(x=>{x.permissions.forEach(w=>{const D=typeof w.id=="string"?parseInt(w.id):w.id;A[D]=x.menuId})});const C=new Set;n.modelValue&&Array.isArray(n.modelValue)&&n.modelValue.forEach(x=>{B.push(x.menuId),x.actionsIds&&Array.isArray(x.actionsIds)&&x.actionsIds.forEach(w=>C.add(w))}),_.forEach(x=>x.permissions.forEach(w=>{const D=typeof w.id=="string"?parseInt(w.id):w.id;E[D]=C.has(D)})),l.value=E,c.value=B,d.value=A}catch{i.value=[]}finally{s.value=!1}},h=g=>g.permissions.filter(_=>{const E=typeof _.id=="string"?parseInt(_.id):_.id;return l.value[E]}).length,m=g=>g.permissions.every(_=>{const E=typeof _.id=="string"?parseInt(_.id):_.id;return l.value[E]}),p=g=>{const _=h(g);return _>0&&_<g.permissions.length},y=t.ref(!1),b=(g,_)=>{y.value=!0,g.permissions.map(A=>typeof A.id=="string"?parseInt(A.id):A.id),g.permissions.forEach(A=>{const C=typeof A.id=="string"?parseInt(A.id):A.id;l.value[C]=_});let E=n.modelValue?[...n.modelValue]:[],B=[g.menuId];g.subMenuIds&&g.subMenuIds.length>0&&(B=[...B,...g.subMenuIds],g.subMenuIds.forEach(A=>{const C=i.value.find(x=>x.menuId===A);C&&C.permissions.forEach(x=>{const w=typeof x.id=="string"?parseInt(x.id):x.id;l.value[w]=_})})),_?B.forEach(A=>{const C=i.value.find(x=>x.menuId===A);if(C){const x=C.permissions.map(D=>typeof D.id=="string"?parseInt(D.id):D.id),w=E.findIndex(D=>D.menuId===A);w!==-1?E[w]={menuId:A,actionsIds:x}:E.push({menuId:A,actionsIds:x})}}):E=E.filter(A=>!B.includes(A.menuId)),c.value=E.map(A=>A.menuId),console.log("Full Result:",JSON.stringify(E,null,2)),r("update:modelValue",E),setTimeout(()=>{y.value=!1},100)};return t.watch(()=>n.modelValue,g=>{if(!g)return;const _=new Set,E=[];g.forEach(B=>{E.push(B.menuId),B.actionsIds&&Array.isArray(B.actionsIds)&&B.actionsIds.forEach(A=>_.add(A))}),Object.keys(l.value).forEach(B=>{const A=parseInt(B);l.value[A]=_.has(A)}),c.value=E}),t.watch(()=>n.treeData,g=>{g&&g.length>0&&u()},{deep:!0}),t.watch(l,(g,_)=>{if(y.value)return;if(Object.keys(g).map(B=>parseInt(B)).filter(B=>g[B]!==(_==null?void 0:_[B])).length>0){let B=n.modelValue?[...n.modelValue]:[];const A={};Object.keys(g).forEach(C=>{const x=parseInt(C);if(g[x]){const w=d.value[x];console.log(`Permission ${x} belongs to Menu ${w}`),w!==void 0&&(A[w]||(A[w]=[]),A[w].push(x))}}),Object.keys(A).forEach(C=>{const x=parseInt(C),w=A[x],D=B.findIndex(k=>k.menuId===x);D!==-1?B[D]={menuId:x,actionsIds:w}:B.push({menuId:x,actionsIds:w})}),B=B.filter(C=>A[C.menuId]&&A[C.menuId].length>0),c.value=B.map(C=>C.menuId),console.log("Result:",JSON.stringify(B,null,2)),r("update:modelValue",B)}},{deep:!0}),t.onMounted(u),(g,_)=>(t.openBlock(),t.createElementBlock("div",bA,[e.label?(t.openBlock(),t.createElementBlock("label",yA,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",xA,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),s.value?(t.openBlock(),t.createElementBlock("div",kA,[t.createVNode(t.unref(ne.Loader2),{class:"animate-spin text-primary-600 mr-2",size:24}),t.createElementVNode("span",wA,t.toDisplayString(t.unref(a)("common.loadingPermissions")),1)])):i.value.length===0?(t.openBlock(),t.createElementBlock("div",CA,[t.createElementVNode("p",_A,t.toDisplayString(t.unref(a)("common.noPermissions")),1)])):(t.openBlock(),t.createElementBlock("div",EA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,E=>(t.openBlock(),t.createElementBlock("div",{key:E.module,class:"bg-white dark:bg-neutral-800 rounded-lg border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm hover:shadow-md transition-shadow"},[t.createElementVNode("div",BA,[t.createElementVNode("div",SA,[t.createVNode(io,{modelValue:m(E),indeterminate:p(E),"onUpdate:modelValue":B=>b(E,!!B),disabled:e.disabled},null,8,["modelValue","indeterminate","onUpdate:modelValue","disabled"]),t.createElementVNode("div",null,[t.createElementVNode("div",AA,t.toDisplayString(E.label||E.module),1),t.createElementVNode("div",vA,t.toDisplayString(h(E))+" "+t.toDisplayString(t.unref(a)("common.from"))+" "+t.toDisplayString(E.permissions.length)+" "+t.toDisplayString(t.unref(a)("common.selected")),1)])]),t.createElementVNode("div",DA,[t.createElementVNode("div",NA,t.toDisplayString(h(E))+"/"+t.toDisplayString(E.permissions.length),1)])]),t.createElementVNode("div",VA,[t.createElementVNode("div",MA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.permissions,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"flex items-start p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-750 transition-colors"},[t.createVNode(io,{modelValue:l.value[typeof B.id=="string"?parseInt(B.id):B.id],"onUpdate:modelValue":A=>l.value[typeof B.id=="string"?parseInt(B.id):B.id]=A,disabled:e.disabled,class:"flex-shrink-0"},null,8,["modelValue","onUpdate:modelValue","disabled"]),t.createElementVNode("div",TA,[t.createElementVNode("label",{for:`perm-${B.id}`,class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer block"},t.toDisplayString(B.label||B.key),9,PA),B.description?(t.openBlock(),t.createElementBlock("p",OA,t.toDisplayString(B.description),1)):t.createCommentVNode("",!0)])]))),128))])])]))),128))])),e.error?(t.openBlock(),t.createElementBlock("p",LA,t.toDisplayString(e.error),1)):t.createCommentVNode("",!0)]))}}),RA={key:0,class:"fixed inset-0 z-[100] flex justify-end"},IA={key:0,class:"relative w-full max-w-sm h-full bg-white dark:bg-slate-900 shadow-2xl flex flex-col border-l border-gray-200 dark:border-gray-800"},FA={class:"px-6 py-4 border-b border-gray-100 dark:border-gray-800 flex items-center justify-between"},zA={class:"text-lg font-semibold text-gray-900 dark:text-gray-100"},$A={key:0,class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},jA={class:"flex-1 overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-gray-200 dark:scrollbar-thumb-gray-800"},UA={class:"px-6 py-4 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-slate-900/50"},WA=t.defineComponent({__name:"DataFilterSheet",props:{title:{default:"Filter Data"},description:{default:"Masukan parameter pencarian untuk memfilter data."}},setup(e,{expose:o}){const n=t.ref(!1),r=()=>{n.value=!0,document.body.style.overflow="hidden"},a=()=>{n.value=!1,document.body.style.overflow=""};return o({open:r,close:a}),(s,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{onClick:r},[t.renderSlot(s.$slots,"trigger",{},()=>[t.createVNode(He,{variant:"outline",class:"gap-2",icon:"Search",text:"Pencarian"})])]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[n.value?(t.openBlock(),t.createElementBlock("div",RA,[t.createVNode(t.Transition,{appear:"","enter-active-class":"transition-opacity duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:a})):t.createCommentVNode("",!0)]),_:1}),t.createVNode(t.Transition,{appear:"","enter-active-class":"transition-transform duration-300 ease-out","enter-from-class":"translate-x-full","enter-to-class":"translate-x-0","leave-active-class":"transition-transform duration-200 ease-in","leave-from-class":"translate-x-0","leave-to-class":"translate-x-full"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",IA,[t.createElementVNode("div",FA,[t.createElementVNode("div",null,[t.createElementVNode("h3",zA,t.toDisplayString(e.title),1),e.description?(t.openBlock(),t.createElementBlock("p",$A,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),t.createVNode(He,{variant:"ghost",size:"icon",onClick:a,icon:"X",class:"text-gray-400 hover:text-gray-600"})]),t.createElementVNode("div",jA,[t.renderSlot(s.$slots,"default")]),t.createElementVNode("div",UA,[t.renderSlot(s.$slots,"footer")])])):t.createCommentVNode("",!0)]),_:3})])):t.createCommentVNode("",!0)]))]))}}),HA={key:0},qA=["value","name"],GA=t.defineComponent({__name:"DynamicFilterField",props:{field:{},modelValue:{},disabled:{type:Boolean},required:{type:Boolean},readonly:{type:Boolean},options:{},dynamicLabels:{},dynamicLength:{}},emits:["update:modelValue"],setup(e,{emit:o}){const{locale:n}=Et.useI18n(),r=e,a=o,s=t.ref(r.modelValue);t.watch(()=>r.modelValue,f=>{s.value=f});const i={DCodeTextField:on,DCodeAutoComplete:ur,DCodeDatePicker:sa,DCodeTextarea:hn,DCodeTextArea:hn,DCodeCheckbox:io,DCodeSwitch:fa,DCodeOtpInput:ca,DCodeImageField:la,DCodeSlider:da},l=t.computed(()=>{const f=r.field.component;return i[f]||null}),c=t.computed(()=>{var h,m,p,y;const f=r.field.props,u={};return(f.labelID||f.labelEN)&&(u.label=n.value==="id"?f.labelID:f.labelEN),(f.placeholderID||f.placeholderEN)&&(u.placeholder=n.value==="id"?f.placeholderID:f.placeholderEN),(r.required!==void 0||f.required!==void 0)&&(u.required=r.required!==void 0?r.required:f.required),(r.disabled!==void 0||f.disabled!==void 0)&&(u.disabled=r.disabled!==void 0?r.disabled:f.disabled),(r.readonly!==void 0||f.readonly!==void 0)&&(u.readonly=r.readonly!==void 0?r.readonly:f.readonly),f.valueType&&(u.type=f.valueType),(((h=r.dynamicLength)==null?void 0:h.minLength)!==void 0||f.minLength!==void 0)&&(u.minlength=((m=r.dynamicLength)==null?void 0:m.minLength)??f.minLength),(((p=r.dynamicLength)==null?void 0:p.maxLength)!==void 0||f.maxLength!==void 0)&&(u.maxlength=((y=r.dynamicLength)==null?void 0:y.maxLength)??f.maxLength),f.min!==void 0&&(u.min=f.min),f.max!==void 0&&(u.max=f.max),(r.options||f.options)&&(u.options=r.options||f.options),f.endpoint&&(u.endpoint=f.endpoint),f.itemTitle&&(u.itemTitle=f.itemTitle),f.itemValue&&(u.itemValue=f.itemValue),f.returnObject!==void 0&&(u.returnObject=f.returnObject),f.clearable!==void 0&&(u.clearable=f.clearable),Object.keys(f).forEach(b=>{!["labelID","labelEN","placeholderID","placeholderEN"].includes(b)&&!u.hasOwnProperty(b)&&(u[b]=f[b])}),r.dynamicLabels&&((r.dynamicLabels.labelID||r.dynamicLabels.labelEN)&&(u.label=n.value==="id"?r.dynamicLabels.labelID:r.dynamicLabels.labelEN),(r.dynamicLabels.placeholderID||r.dynamicLabels.placeholderEN)&&(u.placeholder=n.value==="id"?r.dynamicLabels.placeholderID:r.dynamicLabels.placeholderEN)),u}),d=f=>{s.value=f,a("update:modelValue",f)};return(f,u)=>e.field.isHidden?(t.openBlock(),t.createElementBlock("div",HA,[t.createElementVNode("input",{type:"hidden",value:s.value,name:e.field.model},null,8,qA)])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),t.mergeProps({key:1},c.value,{modelValue:s.value,"onUpdate:modelValue":[u[0]||(u[0]=h=>s.value=h),d]}),null,16,["modelValue"]))}}),KA={class:"flex items-center gap-2 shrink-0"},XA={class:"flex-1 text-right overflow-hidden"},YA=["title"],mn=ft(t.defineComponent({name:"DCodeStaticLabel",__name:"DCodeStaticLabel",props:{label:{},value:{},icon:{},color:{}},setup(e){const o=e,n=t.computed(()=>{const a=o.color||"secondary",s={primary:"border-blue-200 text-blue-700",success:"border-green-200 text-green-700",warning:"border-yellow-200 text-yellow-700",danger:"border-red-200 text-red-700",info:"border-cyan-200 text-cyan-700",secondary:"border-slate-200 text-slate-700 dark:border-slate-700/50",dark:"border-b border-gray-300 text-gray-900 dark:text-gray-100"};return s[a]||s.secondary}),r=a=>a==null||a===""?"-":typeof a=="boolean"?a?"Yes":"No":String(a);return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-row justify-between items-center gap-4 py-3 px-0 border-b transition-all duration-300 rounded-none bg-transparent",n.value])},[t.createElementVNode("div",KA,[t.createVNode(Wo,{label:e.label,icon:e.icon,class:"text-xs font-semibold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider"},null,8,["label","icon"])]),t.createElementVNode("div",XA,[t.renderSlot(a.$slots,"value",{},()=>[t.createElementVNode("span",{class:"text-sm font-medium truncate block",title:r(e.value)},t.toDisplayString(r(e.value)),9,YA)],!0)])],2))}}),[["__scopeId","data-v-dd90fa7f"]]),JA={class:"space-y-2 group"},QA=["onClick"],ZA=["src","alt"],ev={key:0,class:"absolute inset-0 bg-black/0 group-hover/item:bg-black/20 flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-all duration-300"},tv={class:"bg-white/90 dark:bg-neutral-800/90 p-1.5 rounded-full shadow-sm"},ov={key:0,class:"flex flex-col h-full"},nv={class:"flex flex-col items-center justify-center p-8 bg-neutral-50 dark:bg-neutral-950/50"},rv=["src","alt"],av={class:"px-8 py-4 bg-white dark:bg-neutral-900 border-t border-neutral-200 dark:border-neutral-700/50"},sv={class:"flex flex-col space-y-0.5"},gi=ft(t.defineComponent({name:"DCodeStaticImage",__name:"DCodeStaticImage",props:{items:{},alt:{default:"Image"},label:{},aspectRatio:{default:"16/9"},width:{},height:{},fit:{default:"cover"},rounded:{type:Boolean,default:!1},allowPreview:{type:Boolean,default:!0},columns:{default:3},gap:{default:"0.5rem"}},setup(e){const o=e,n=t.computed(()=>Array.isArray(o.items)?o.items.map(d=>typeof d=="string"?{src:d,alt:o.alt}:{...d,alt:d.alt||o.alt}):[]),r=t.ref(null),a=t.ref(!1),s=d=>{o.allowPreview&&(r.value=d,a.value=!0)},i=()=>{r.value=null,a.value=!1},l=t.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${o.columns}, minmax(0, 1fr))`,gap:o.gap,width:o.width||"100%"})),c=t.computed(()=>["w-full h-full transition-all duration-500",o.rounded?"rounded-xl":"rounded-none",o.fit==="cover"?"object-cover":o.fit==="contain"?"object-contain":o.fit==="fill"?"object-fill":"object-none"].join(" "));return t.onMounted(()=>{window.addEventListener("keydown",d=>{r.value!==null&&d.key==="Escape"&&i()})}),(d,f)=>(t.openBlock(),t.createElementBlock("div",JA,[t.createElementVNode("div",{style:t.normalizeStyle(l.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(u,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,class:"flex flex-col space-y-1 group/item"},[t.createElementVNode("div",{class:t.normalizeClass(["relative overflow-hidden bg-neutral-100 dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 transition-all duration-300 transform hover:scale-[1.02] hover:z-10",[e.rounded?"rounded-xl":"rounded-none",e.allowPreview?"cursor-zoom-in":""]]),style:t.normalizeStyle({aspectRatio:e.aspectRatio}),onClick:m=>s(h)},[t.createElementVNode("img",{src:u.src,alt:u.alt,class:t.normalizeClass(c.value),loading:"lazy"},null,10,ZA),e.allowPreview?(t.openBlock(),t.createElementBlock("div",ev,[t.createElementVNode("div",tv,[t.createVNode(t.unref(ne.Maximize2),{class:"w-3.5 h-3.5 text-neutral-700 dark:text-neutral-200"})])])):t.createCommentVNode("",!0)],14,QA)]))),128))],4),t.createVNode(lo,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=u=>a.value=u),title:(r.value!==null?n.value[r.value].label:null)||e.label||"Preview Image","max-width":"1200",persistent:!1,onClose:i},{"header-append":t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"p-2 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-full text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200 transition-colors",onClick:i},[t.createVNode(t.unref(ne.X),{class:"w-5 h-5"})])]),actions:t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"px-5 py-2 text-sm font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-neutral-200 rounded-md hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors",onClick:i}," Close Preview ")]),default:t.withCtx(()=>[r.value!==null?(t.openBlock(),t.createElementBlock("div",ov,[t.createElementVNode("div",nv,[t.createElementVNode("img",{src:n.value[r.value].src,alt:n.value[r.value].alt||e.alt,class:"max-w-full max-h-[60vh] object-contain shadow-2xl rounded-sm border border-neutral-200 dark:border-white/10"},null,8,rv)]),t.createElementVNode("div",av,[t.createElementVNode("div",sv,[t.createVNode(mn,{label:"File Name",value:n.value[r.value].src.split("/").pop()||"Untitled"},null,8,["value"]),n.value[r.value].label?(t.openBlock(),t.createBlock(mn,{key:0,label:"Item Label",value:n.value[r.value].label},null,8,["value"])):t.createCommentVNode("",!0),e.label?(t.openBlock(),t.createBlock(mn,{key:1,label:"Gallery Label",value:e.label},null,8,["value"])):t.createCommentVNode("",!0)])])])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]))}}),[["__scopeId","data-v-ac931980"]]),iv={key:0},lv=["value","name"],cv={key:1,class:"flex flex-col gap-1"},dv={class:"text-xs font-medium text-neutral-500 dark:text-neutral-400"},fv=["src"],uv={key:1,class:"text-sm text-neutral-400 italic"},hv={key:2,class:"text-sm text-neutral-800 dark:text-neutral-100 font-medium"},mv={key:3,class:"text-xs text-neutral-400 italic"},pn=t.defineComponent({__name:"DynamicFormField",props:{field:{},modelValue:{default:null},formData:{default:()=>({})},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},options:{default:()=>[]},error:{default:null},dynamicLabels:{default:null},dynamicLength:{default:null},baseUrl:{default:void 0},viewOnly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){let n=t.ref("en");try{n=Et.useI18n().locale}catch{}const r=e,a=o,s=t.ref(r.modelValue);t.watch(()=>r.modelValue,b=>{s.value=b});const i={DCodeTextField:on,DCodeAutoComplete:ur,DCodeDatePicker:sa,DCodeTextarea:hn,DCodeTextArea:hn,DCodeCheckbox:io,DCodeSwitch:fa,DCodeOtpInput:ca,DCodeImageField:la,DCodeSlider:da,DCodeRadio:fi,DCodeRadioCustom:ui,DCodeDynamicUploadList:ei,DCodeMultiSelect:di,DCodeCurrencyField:Zs,DCodePermissionMenu:mi,DCodeTreePermissions:pi,DCodeCardCheckboxList:Qs,DCodeBeforeAfter:cs,DCodeListLabels:ds,DCodeStaticLabel:mn,DCodeStaticImage:gi},l=t.computed(()=>{const b=r.field.component;return i[b]||null}),c=t.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("image")||b.includes("upload")}),d=t.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("switch")||b.includes("checkbox")}),f=t.computed(()=>{var E,B;const b=r.field.props||r.field.propsFieldGlobal||{},g=((E=r.dynamicLabels)==null?void 0:E.labelID)||b.labelID,_=((B=r.dynamicLabels)==null?void 0:B.labelEN)||b.labelEN;return n.value==="id"?g||_||r.field.model:_||g||r.field.model}),u=t.computed(()=>{const b=r.modelValue;return b==null||b===""?null:Array.isArray(b)?b.map(g=>typeof g=="object"&&g!==null?g.label||g.name||g.code||g.value||JSON.stringify(g):String(g)).join(", "):typeof b=="object"?b.label||b.name||b.code||b.value||b.id||JSON.stringify(b):String(b)}),h=(b,g)=>{const _={label:"",placeholder:""},E=(g==null?void 0:g.labelID)||b.labelID,B=(g==null?void 0:g.labelEN)||b.labelEN;(E||B)&&(_.label=n.value==="id"?E:B);const A=(g==null?void 0:g.placeholderID)||b.placeholderID,C=(g==null?void 0:g.placeholderEN)||b.placeholderEN;return(A||C)&&(_.placeholder=n.value==="id"?A:C),_},m=(b,g)=>{const _=b.endpoint||{};if(!_.apiUrl)return{};const E={};let B=!0;if(Array.isArray(_.keyParam)&&_.keyParam.length>0&&_.keyParam.forEach(C=>{const x=g?g[C]:null;x!=null&&x!==""?E[C]=x:B=!1}),!B)return{};let A=_.apiUrl;if(r.baseUrl&&typeof A=="string"&&!A.startsWith("http")){const C=r.baseUrl.replace(/\/$/,""),x=A.startsWith("/")?A:`/${A}`;A=`${C}${x}`}return{endpoint:{apiUrl:A,apiMethod:_.apiMethod||"GET"},...Object.keys(E).length?{apiParams:E}:{}}},p=t.computed(()=>{var B,A,C;const b=r.field.props||r.field.propsFieldGlobal||{},g={},_=h(b,r.dynamicLabels);if(_.label&&(g.label=_.label),_.placeholder&&(g.placeholder=_.placeholder),g.required=r.required!==void 0?r.required:b.required??!1,g.readonly=r.readonly!==void 0?r.readonly:b.readonly??!1,["disabled","readonly","clearable","icon","returnObject","itemTitle","itemValue","maxValue","minValue","sizeFile","typeFile","treeData","menuList","enableParentControl","showIcons","dataBefore","dataAfter","range","autoRangeDays","disablePast","maxDaysAhead","displayFormat","modelType","placement","prependInner","selectLabel","cancelLabel","tone","skeleton"].forEach(x=>{b[x]!==void 0&&b[x]!==null&&(g[x]=b[x])}),g.minLength=((B=r.dynamicLength)==null?void 0:B.minLength)??b.minLength,g.maxLength=((A=r.dynamicLength)==null?void 0:A.maxLength)??b.maxLength,b.valueType&&(g.type=b.valueType),r.error&&(g.error=r.error),Object.assign(g,m(b,r.formData)),(C=b.endpointReference)!=null&&C.apiUrl){let x=b.endpointReference.apiUrl;if(r.baseUrl&&typeof x=="string"&&!x.startsWith("http")){const w=r.baseUrl.replace(/\/$/,""),D=x.startsWith("/")?x:`/${x}`;x=`${w}${D}`}g.endpointReference={...b.endpointReference,apiUrl:x}}return r.options&&r.options.length>0&&(g.items=r.options,g.options=r.options,r.field.component!=="DCodeDynamicUploadList"&&(delete g.endpoint,delete g.apiParams,delete g.apiUrl)),r.baseUrl&&(g.baseUrl=r.baseUrl),g}),y=b=>{s.value=b,a("update:modelValue",b)};return(b,g)=>e.field.isHidden?(t.openBlock(),t.createElementBlock("div",iv,[t.createElementVNode("input",{type:"hidden",value:s.value,name:e.field.model},null,8,lv)])):e.viewOnly?(t.openBlock(),t.createElementBlock("div",cv,[t.createElementVNode("span",dv,t.toDisplayString(f.value),1),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[u.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:u.value,class:"h-16 w-16 rounded-md object-cover border border-neutral-200",alt:""},null,8,fv)):(t.openBlock(),t.createElementBlock("span",uv,"-"))],64)):d.value?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["inline-flex items-center gap-1 text-sm font-medium",u.value?"text-green-600 dark:text-green-400":"text-neutral-400"])},t.toDisplayString(u.value?"✓ Ya":"✗ Tidak"),3)):(t.openBlock(),t.createElementBlock("span",hv,t.toDisplayString(u.value||"-"),1))])):l.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),t.mergeProps({key:2},p.value,{modelValue:s.value,"onUpdate:modelValue":[g[0]||(g[0]=_=>s.value=_),y]}),null,16,["modelValue"])):(t.openBlock(),t.createElementBlock("div",mv," Unknown field: "+t.toDisplayString(e.field.component),1))}}),pv=t.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=Xe.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,i)=>t.withDirectives((t.openBlock(),t.createElementBlock("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>t.isRef(a)?a.value=l:null),class:t.normalizeClass(t.unref(Te)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[t.vModelText,t.unref(a)]])}}),gv=t.defineComponent({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:page"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationRoot),t.mergeProps({"data-slot":"pagination"},t.unref(s),{class:n.class}),{default:t.withCtx(c=>[t.renderSlot(i.$slots,"default",t.normalizeProps(t.guardReactiveProps(c)))]),_:3},16,["class"]))}}),bv=t.defineComponent({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationList),t.mergeProps({"data-slot":"pagination-content"},t.unref(n),{class:t.unref(Te)("flex flex-row items-center gap-1",o.class)}),{default:t.withCtx(s=>[t.renderSlot(r.$slots,"default",t.normalizeProps(t.guardReactiveProps(s)))]),_:3},16,["class"]))}}),yv=t.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationEllipsis),t.mergeProps({"data-slot":"pagination-ellipsis"},t.unref(n),{class:t.unref(Te)("flex size-9 items-center justify-center",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default",{},()=>[t.createVNode(t.unref(ne.MoreHorizontal),{class:"size-4"}),a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),xv=t.defineComponent({__name:"PaginationFirst",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationFirst),t.mergeProps({"data-slot":"pagination-first",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"First",-1))])]),_:3},16,["class"]))}}),kv=t.defineComponent({__name:"PaginationItem",props:{value:{},asChild:{type:Boolean},as:{},size:{default:"icon"},class:{type:[Boolean,null,String,Object,Array]},isActive:{type:Boolean}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size","isActive");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationListItem),t.mergeProps({"data-slot":"pagination-item"},t.unref(n),{class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),e.isActive?"bg-[#0056a1] dark:bg-[#003d75] text-white hover:bg-[#0056a1]/90 dark:hover:bg-[#003d75]/90 hover:text-white":"",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),wv=t.defineComponent({__name:"PaginationLast",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationLast),t.mergeProps({"data-slot":"pagination-last",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Last",-1)),t.createVNode(t.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),Cv=t.defineComponent({__name:"PaginationNext",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationNext),t.mergeProps({"data-slot":"pagination-next",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Next",-1)),t.createVNode(t.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),_v=t.defineComponent({__name:"PaginationPrevious",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.PaginationPrev),t.mergeProps({"data-slot":"pagination-previous",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Previous",-1))])]),_:3},16,["class"]))}}),Ev=t.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:o}){const n=e,r=o,a=_e.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(_e.SelectRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),Bv=t.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=_e.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(_e.SelectPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(_e.SelectContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Te)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:t.withCtx(()=>[t.createVNode(t.unref(Dv)),t.createVNode(t.unref(_e.SelectViewport),{class:t.normalizeClass(t.unref(Te)("p-1",e.position==="popper"&&"h-[--reka-select-trigger-height] w-full min-w-[--reka-select-trigger-width]"))},{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default")]),_:3},8,["class"]),t.createVNode(t.unref(vv))]),_:3},16,["class"])]),_:3}))}}),Sv={class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},Av=t.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.SelectItem),t.mergeProps(t.unref(r),{class:t.unref(Te)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o.class)}),{default:t.withCtx(()=>[t.createElementVNode("span",Sv,[t.createVNode(t.unref(_e.SelectItemIndicator),null,{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Check),{class:"h-4 w-4"})]),_:1})]),t.createVNode(t.unref(_e.SelectItemText),null,{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),vv=t.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.SelectScrollDownButton),t.mergeProps(t.unref(r),{class:t.unref(Te)("flex cursor-default items-center justify-center py-1",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronDown))])]),_:3},16,["class"]))}}),Dv=t.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.SelectScrollUpButton),t.mergeProps(t.unref(r),{class:t.unref(Te)("flex cursor-default items-center justify-center py-1",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronUp))])]),_:3},16,["class"]))}}),Nv=t.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=_e.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(_e.SelectTrigger),t.mergeProps(t.unref(r),{class:t.unref(Te)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default"),t.createVNode(t.unref(_e.SelectIcon),{"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronDown),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),Vv=t.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(_e.SelectValue),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),Zn={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},gn={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},ut={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Mv={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},Tv={dangerouslyHTMLString:!1,multiple:!0,position:Zn.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},Pv={rtl:!1,newestOnTop:!1,toastClassName:""},Xf={...Tv,...Pv};ut.DEFAULT;var Ie=(e=>(e[e.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",e[e.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",e.CSS_NAMESPACE="Toastify",e))(Ie||{}),bi=(e=>(e.ENTRANCE_ANIMATION_END="d",e))(bi||{});const Ov={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},Lv={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},Rv={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},Iv={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},Yf="Toastify--animate Toastify__none-enter";function Jf(e,o=!1){var n;let r=Ov;if(!e||typeof e=="string")switch(e){case"flip":r=Iv;break;case"zoom":r=Rv;break;case"slide":r=Lv;break}else r=e;if(o)r.enter=Yf;else if(r.enter===Yf){const a=(n=r.exit.split("__")[1])==null?void 0:n.split("-")[0];r.enter=`Toastify--animate Toastify__${a}-enter`}return r}function Fv(e){return e.containerId||String(e.position)}const ha="will-unmount";function zv(e=Zn.TOP_RIGHT){return!!document.querySelector(`.${Ie.CSS_NAMESPACE}__toast-container--${e}`)}function $v(e=Zn.TOP_RIGHT){return`${Ie.CSS_NAMESPACE}__toast-container--${e}`}function jv(e,o,n=!1){const r=[`${Ie.CSS_NAMESPACE}__toast-container`,`${Ie.CSS_NAMESPACE}__toast-container--${e}`,n?`${Ie.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return yn(o)?o({position:e,rtl:n,defaultClassName:r}):`${r} ${o||""}`}function Uv(e){var o;const{position:n,containerClassName:r,rtl:a=!1,style:s={}}=e,i=Ie.CSS_NAMESPACE,l=$v(n),c=document.querySelector(`.${i}`),d=document.querySelector(`.${l}`),f=!!d&&!((o=d.className)!=null&&o.includes(ha)),u=c||document.createElement("div"),h=document.createElement("div");h.className=jv(n,r,a),h.dataset.testid=`${Ie.CSS_NAMESPACE}__toast-container--${n}`,h.id=Fv(e);for(const m in s)if(Object.prototype.hasOwnProperty.call(s,m)){const p=s[m];h.style[m]=p}return c||(u.className=Ie.CSS_NAMESPACE,document.body.appendChild(u)),f||u.appendChild(h),h}function yi(e){var o,n,r;const a=typeof e=="string"?e:((o=e.currentTarget)==null?void 0:o.id)||((n=e.target)==null?void 0:n.id),s=document.getElementById(a);s&&s.removeEventListener("animationend",yi,!1);try{er[a].unmount(),(r=document.getElementById(a))==null||r.remove(),delete er[a],delete ot[a]}catch{}}const er=t.reactive({});function Wv(e,o){const n=document.getElementById(String(o));n&&(er[n.id]=e)}function xi(e,o=!0){const n=String(e);if(!er[n])return;const r=document.getElementById(n);r&&r.classList.add(ha),o?(qv(e),r&&r.addEventListener("animationend",yi,!1)):yi(n),Dt.items=Dt.items.filter(a=>a.containerId!==e)}function Hv(e){for(const o in er)xi(o,e);Dt.items=[]}function Qf(e,o){const n=document.getElementById(e.toastId);if(n){let r=e;r={...r,...Jf(r.transition)};const a=r.appendPosition?`${r.exit}--${r.position}`:r.exit;n.className+=` ${a}`,o&&o(n)}}function qv(e){for(const o in ot)if(o===e)for(const n of ot[o]||[])Qf(n)}function Gv(e){const o=bn().find(n=>n.toastId===e);return o==null?void 0:o.containerId}function ki(e){return document.getElementById(e)}function Kv(e){const o=ki(e.containerId);return o&&o.classList.contains(ha)}function Zf(e){var o;const n=t.isVNode(e.content)?t.toRaw(e.content.props):null;return n??t.toRaw((o=e.data)!=null?o:{})}function Xv(e){return e?Dt.items.filter(o=>o.containerId===e).length>0:Dt.items.length>0}function Yv(){if(Dt.items.length>0){const e=Dt.items.shift();ma(e==null?void 0:e.toastContent,e==null?void 0:e.toastProps)}}const ot=t.reactive({}),Dt=t.reactive({items:[]});function bn(){const e=t.toRaw(ot);return Object.values(e).reduce((o,n)=>[...o,...n],[])}function Jv(e){return bn().find(o=>o.toastId===e)}function ma(e,o={}){if(Kv(o)){const n=ki(o.containerId);n&&n.addEventListener("animationend",wi.bind(null,e,o),!1)}else wi(e,o)}function wi(e,o={}){const n=ki(o.containerId);n&&n.removeEventListener("animationend",wi.bind(null,e,o),!1);const r=ot[o.containerId]||[],a=r.length>0;if(!a&&!zv(o.position)){const s=Uv(o),i=t.createApp(w5,o);o.useHandler&&o.useHandler(i),i.mount(s),Wv(i,s.id)}a&&!o.updateId&&(o.position=r[0].position),t.nextTick(()=>{o.updateId?xt.update(o):xt.add(e,o)})}const xt={add(e,o){const{containerId:n=""}=o;n&&(ot[n]=ot[n]||[],ot[n].find(r=>r.toastId===o.toastId)||setTimeout(()=>{var r,a;o.newestOnTop?(r=ot[n])==null||r.unshift(o):(a=ot[n])==null||a.push(o),o.onOpen&&o.onOpen(Zf(o))},o.delay||0))},remove(e){if(e){const o=Gv(e);if(o){const n=ot[o];let r=n.find(a=>a.toastId===e);ot[o]=n.filter(a=>a.toastId!==e),!ot[o].length&&!Xv(o)&&xi(o,!1),Yv(),t.nextTick(()=>{r!=null&&r.onClose&&(r.onClose(Zf(r)),r=void 0)})}}},update(e={}){const{containerId:o=""}=e;if(o&&e.updateId){ot[o]=ot[o]||[];const n=ot[o].find(s=>s.toastId===e.toastId),r=(n==null?void 0:n.position)!==e.position||(n==null?void 0:n.transition)!==e.transition,a={...e,disabledEnterTransition:!r,updateId:void 0};xt.dismissForce(e==null?void 0:e.toastId),setTimeout(()=>{ze(a.content,a)},e.delay||0)}},clear(e,o=!0){e?xi(e,o):Hv(o)},dismissCallback(e){var o;const n=(o=e.currentTarget)==null?void 0:o.id,r=document.getElementById(n);r&&(r.removeEventListener("animationend",xt.dismissCallback,!1),setTimeout(()=>{xt.remove(n)}))},dismiss(e){if(e){const o=bn();for(const n of o)if(n.toastId===e){Qf(n,r=>{r.addEventListener("animationend",xt.dismissCallback,!1)});break}}},dismissForce(e){if(e){const o=bn();for(const n of o)if(n.toastId===e){const r=document.getElementById(e);r&&(r.remove(),r.removeEventListener("animationend",xt.dismissCallback,!1),xt.remove(e));break}}}},Qv=t.reactive({useHandler:void 0}),eu=t.reactive({}),pa=t.reactive({});function tu(){return Math.random().toString(36).substring(2,9)}function Zv(e){return typeof e=="number"&&!isNaN(e)}function Ci(e){return typeof e=="string"}function yn(e){return typeof e=="function"}function ga(...e){return t.mergeProps(...e)}function ba(e){return typeof e=="object"&&(!!(e!=null&&e.render)||!!(e!=null&&e.setup)||typeof(e==null?void 0:e.type)=="object")}function e5(e={}){eu[`${Ie.CSS_NAMESPACE}-default-options`]=e}function ou(){return eu[`${Ie.CSS_NAMESPACE}-default-options`]||Xf}function t5(){const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||e?"dark":"light"}var ya=(e=>(e[e.Enter=0]="Enter",e[e.Exit=1]="Exit",e))(ya||{});const nu={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:Zn.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:gn.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:ut.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},o5={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:ut.DEFAULT},theme:{type:String,required:!1,default:gn.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},n5=t.defineComponent({name:"ProgressBar",props:o5,setup(e,{attrs:o}){const n=t.ref(),r=t.computed(()=>e.hide?"true":"false"),a=t.computed(()=>({...o.style||{},animationDuration:`${e.autoClose===!0?5e3:e.autoClose}ms`,animationPlayState:e.isRunning?"running":"paused",opacity:e.hide||e.autoClose===!1?0:1,transform:e.controlledProgress?`scaleX(${e.progress})`:"none"})),s=t.computed(()=>[`${Ie.CSS_NAMESPACE}__progress-bar`,e.controlledProgress?`${Ie.CSS_NAMESPACE}__progress-bar--controlled`:`${Ie.CSS_NAMESPACE}__progress-bar--animated`,`${Ie.CSS_NAMESPACE}__progress-bar-theme--${e.theme}`,`${Ie.CSS_NAMESPACE}__progress-bar--${e.type}`,e.rtl?`${Ie.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),i=t.computed(()=>`${s.value} ${(o==null?void 0:o.class)||""}`),l=()=>{n.value&&(n.value.onanimationend=null,n.value.ontransitionend=null)},c=()=>{e.isIn&&e.closeToast&&e.autoClose!==!1&&(e.closeToast(),l())},d=t.computed(()=>e.controlledProgress?null:c),f=t.computed(()=>e.controlledProgress?c:null);return t.watchEffect(()=>{n.value&&(l(),n.value.onanimationend=d.value,n.value.ontransitionend=f.value)}),()=>t.createVNode("div",{ref:n,role:"progressbar","aria-hidden":r.value,"aria-label":"notification timer",class:i.value,style:a.value},null)}}),r5=t.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:gn.AUTO},type:{type:String,required:!1,default:gn.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(e){return()=>t.createVNode("button",{class:`${Ie.CSS_NAMESPACE}__close-button ${Ie.CSS_NAMESPACE}__close-button--${e.theme}`,type:"button",onClick:o=>{o.stopPropagation(),e.closeToast&&e.closeToast(o)},"aria-label":e.ariaLabel},[t.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[t.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),xa=({theme:e,type:o,path:n,...r})=>t.createVNode("svg",t.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",style:{fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${o})`}},r),[t.createVNode("path",{d:n},null)]);function a5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function s5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function i5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function l5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function c5(){return t.createVNode("div",{class:`${Ie.CSS_NAMESPACE}__spinner`},null)}const ka={info:s5,warning:a5,success:i5,error:l5,spinner:c5},d5=e=>e in ka;function f5({theme:e,type:o,isLoading:n,icon:r}){let a;const s=!!n||o==="loading",i={theme:e,type:o};if(s&&(r===void 0||typeof r=="boolean"))return ka.spinner();if(r!==!1){if(ba(r))a=t.toRaw(r);else if(yn(r)){const l=r;i.type=s?"loading":o,a=l(i),a=!a&&s?ka.spinner():a}else t.isVNode(r)?a=t.cloneVNode(r,i):Ci(r)||Zv(r)?a=r:d5(o)&&(a=ka[o](i));return a}}const u5=()=>{};function h5(e,o,n=Ie.COLLAPSE_DURATION){const{scrollHeight:r,style:a}=e,s=n;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${s}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(o,s)})})}function m5(e){const o=t.ref(!1),n=t.ref(!1),r=t.ref(!1),a=t.ref(ya.Enter),s=t.reactive({...e,appendPosition:e.appendPosition||!1,collapse:typeof e.collapse>"u"?!0:e.collapse,collapseDuration:e.collapseDuration||Ie.COLLAPSE_DURATION}),i=s.done||u5,l=t.computed(()=>s.appendPosition?`${s.enter}--${s.position}`:s.enter),c=t.computed(()=>s.appendPosition?`${s.exit}--${s.position}`:s.exit),d=t.computed(()=>e.pauseOnHover?{onMouseenter:b,onMouseleave:y}:{});function f(){const _=l.value.split(" ");h().addEventListener(bi.ENTRANCE_ANIMATION_END,y,{once:!0});const E=A=>{const C=h();A.target===C&&(C.dispatchEvent(new Event(bi.ENTRANCE_ANIMATION_END)),C.removeEventListener("animationend",E),C.removeEventListener("animationcancel",E),a.value===ya.Enter&&A.type!=="animationcancel"&&C.classList.remove(..._))},B=()=>{const A=h();A.classList.add(..._),A.addEventListener("animationend",E),A.addEventListener("animationcancel",E)};e.pauseOnFocusLoss&&m(),B()}function u(){if(!h())return;const _=()=>{const B=h();B.removeEventListener("animationend",_),s.collapse?h5(B,i,s.collapseDuration):i()},E=()=>{const B=h();a.value=ya.Exit,B&&(B.className+=` ${c.value}`,B.addEventListener("animationend",_))};n.value||(r.value?_():setTimeout(E))}function h(){return e.toastRef.value}function m(){document.hasFocus()||b(),window.addEventListener("focus",y),window.addEventListener("blur",b)}function p(){window.removeEventListener("focus",y),window.removeEventListener("blur",b)}function y(){(!e.loading.value||e.isLoading===void 0)&&(o.value=!0)}function b(){o.value=!1}function g(_){_&&(_.stopPropagation(),_.preventDefault()),n.value=!1}return t.watchEffect(u),t.watchEffect(()=>{const _=bn();n.value=_.findIndex(E=>E.toastId===s.toastId)>-1}),t.watchEffect(()=>{e.isLoading!==void 0&&(e.loading.value?b():y())}),t.onMounted(f),t.onUnmounted(()=>{e.pauseOnFocusLoss&&p()}),{isIn:n,isRunning:o,hideToast:g,eventHandlers:d}}function p5(e){if(!e||typeof e!="object"||Array.isArray(e)||e.__v_isVNode)return!1;const o=e;return["title","content"].some(n=>n in o)}const g5=t.defineComponent({name:"ToastItem",inheritAttrs:!1,props:nu,setup(e){const o=t.ref(),n=t.computed(()=>!!e.isLoading),r=t.computed(()=>e.progress!==void 0&&e.progress!==null),a=t.computed(()=>f5(e)),s=t.computed(()=>[`${Ie.CSS_NAMESPACE}__toast`,`${Ie.CSS_NAMESPACE}__toast-theme--${e.theme}`,`${Ie.CSS_NAMESPACE}__toast--${e.type}`,e.rtl?`${Ie.CSS_NAMESPACE}__toast--rtl`:void 0,e.toastClassName||""].filter(Boolean).join(" ")),{isRunning:i,isIn:l,hideToast:c,eventHandlers:d}=m5({toastRef:o,loading:n,done:()=>{xt.remove(e.toastId)},...Jf(e.transition,e.disabledEnterTransition),...e});function f(){const u=e.content;if(p5(u)){const h=[];return u.title!==void 0&&h.push(t.createVNode("div",{"data-testid":"toast-text-title",class:`${Ie.CSS_NAMESPACE}__toast-text-title`},[u.title])),u.content!==void 0&&h.push(t.createVNode("div",{"data-testid":"toast-text-content",class:`${Ie.CSS_NAMESPACE}__toast-text-content`},[u.content])),t.createVNode("div",{"data-testid":"toast-text-content-wrapper",class:`${Ie.CSS_NAMESPACE}__toast-text`},[h])}return ba(u)?t.h(t.toRaw(u),{toastProps:t.toRaw(e),closeToast:c,data:e.data,...e.expandCustomProps?e.contentProps:{contentProps:e.contentProps||{}}}):yn(u)?u({toastProps:t.toRaw(e),closeToast:c,data:e.data}):e.dangerouslyHTMLString?t.h("div",{innerHTML:u}):u}return()=>t.createVNode("div",t.mergeProps({id:e.toastId,class:s.value,style:e.toastStyle||{},ref:o,"data-testid":`toast-item-${e.toastId}`,onClick:u=>{e.closeOnClick&&c(),e.onClick&&e.onClick(u)}},d.value),[t.createVNode("div",{role:e.role,"data-testid":"toast-body",class:`${Ie.CSS_NAMESPACE}__toast-body ${e.bodyClassName||""}`},[a.value!=null&&t.createVNode("div",{"data-testid":`toast-icon-${e.type}`,class:[`${Ie.CSS_NAMESPACE}__toast-icon`,e.isLoading?"":`${Ie.CSS_NAMESPACE}--animate-icon ${Ie.CSS_NAMESPACE}__zoom-enter`].join(" ")},[ba(a.value)?t.h(t.toRaw(a.value),{theme:e.theme,type:e.type}):yn(a.value)?a.value({theme:e.theme,type:e.type}):a.value]),t.createVNode("div",{"data-testid":"toast-content"},[f()])]),(e.closeButton===void 0||e.closeButton===!0)&&t.createVNode(r5,{theme:e.theme,closeToast:u=>{u.stopPropagation(),u.preventDefault(),c()}},null),ba(e.closeButton)?t.h(t.toRaw(e.closeButton),{closeToast:c,type:e.type,theme:e.theme}):yn(e.closeButton)?e.closeButton({closeToast:c,type:e.type,theme:e.theme}):null,t.createVNode(n5,{className:e.progressClassName,style:e.progressStyle,rtl:e.rtl,theme:e.theme,isIn:l.value,type:e.type,hide:e.hideProgressBar,isRunning:i.value,autoClose:e.autoClose,controlledProgress:r.value,progress:e.progress,closeToast:e.isLoading?void 0:c},null)])}}),wa="vue3-toastify:url-change";let Ca=0,tr;function b5(){if(!(typeof window>"u")&&pa.lastUrl!==window.location.href){pa.lastUrl=window.location.href;const e=n=>typeof n.clearOnUrlChange=="boolean"?n.clearOnUrlChange:ou().clearOnUrlChange!==!1,o=Object.values(ot).reduce((n,r)=>(Array.isArray(r)&&n.push(...r),n),[]);for(const n of o)n.toastId&&e(n)&&xt.dismiss(n.toastId);Dt.items=Dt.items.filter(n=>!e(n.toastProps))}}function y5(){const{history:e}=window,o=e.pushState,n=e.replaceState;return e.pushState=function(...r){const a=o.apply(this,r);return window.dispatchEvent(new Event(wa)),a},e.replaceState=function(...r){const a=n.apply(this,r);return window.dispatchEvent(new Event(wa)),a},()=>{e.pushState=o,e.replaceState=n}}function x5(){if(typeof window>"u"||tr)return;const e=y5(),o=()=>b5();window.addEventListener(wa,o),window.addEventListener("popstate",o),window.addEventListener("hashchange",o),tr=()=>{e(),window.removeEventListener(wa,o),window.removeEventListener("popstate",o),window.removeEventListener("hashchange",o),tr=void 0}}function k5(){tr&&(tr(),pa.lastUrl="")}const w5=t.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:nu,setup(e){const o=t.computed(()=>e.containerId),n=t.computed(()=>ot[o.value]||[]),r=t.computed(()=>n.value.filter(a=>a.position===e.position));return t.onMounted(()=>{typeof window<"u"&&(Ca+=1,x5())}),t.onUnmounted(()=>{typeof window<"u"&&Ca>0&&(Ca-=1,Ca===0&&k5())}),()=>t.createVNode(t.Fragment,null,[r.value.map(a=>{const{toastId:s=""}=a;return t.createVNode(g5,t.mergeProps({key:s},a),null)})])}});let _i=!1;const ru={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function au(){const e=[];return bn().forEach(o=>{const n=document.getElementById(o.containerId);n&&!n.classList.contains(ha)&&e.push(o)}),e}function C5(e){const o=au().length,n=e??0;return n>0&&o+Dt.items.length>=n}function _5(e){C5(e.limit)&&!e.updateId&&Dt.items.push({toastId:e.toastId,containerId:e.containerId,toastContent:e.content,toastProps:e})}function _o(e,o,n={}){if(_i)return;n=ga(ou(),{type:o},t.toRaw(n)),(!n.toastId||typeof n.toastId!="string"&&typeof n.toastId!="number")&&(n.toastId=tu()),n={...n,...n.type==="loading"?ru:{},content:e,containerId:n.containerId||String(n.position)};const r=Number(n==null?void 0:n.progress);return!isNaN(r)&&r<0&&(n.progress=0),r>1&&(n.progress=1),n.theme==="auto"&&(n.theme=t5()),_5(n),pa.lastUrl=window.location.href,n.multiple?Dt.items.length?n.updateId&&ma(e,n):ma(e,n):(_i=!0,ze.clearAll(void 0,!1),setTimeout(()=>{ma(e,n)},0),setTimeout(()=>{_i=!1},390)),n.toastId}const ze=(e,o)=>_o(e,ut.DEFAULT,o);ze.info=(e,o)=>_o(e,ut.DEFAULT,{...o,type:ut.INFO}),ze.error=(e,o)=>_o(e,ut.DEFAULT,{...o,type:ut.ERROR}),ze.warning=(e,o)=>_o(e,ut.DEFAULT,{...o,type:ut.WARNING}),ze.warn=ze.warning,ze.success=(e,o)=>_o(e,ut.DEFAULT,{...o,type:ut.SUCCESS}),ze.loading=(e,o)=>_o(e,ut.DEFAULT,ga(o,ru)),ze.dark=(e,o)=>_o(e,ut.DEFAULT,ga(o,{theme:gn.DARK})),ze.remove=e=>{e?xt.dismiss(e):xt.clear()},ze.clearAll=(e,o)=>{t.nextTick(()=>{xt.clear(e,o)})},ze.isActive=e=>{let o=!1;return o=au().findIndex(n=>n.toastId===e)>-1,o},ze.update=(e,o={})=>{setTimeout(()=>{const n=Jv(e);if(n){const r=t.toRaw(n),{content:a}=r,s={...r,...o,toastId:o.toastId||e,updateId:tu()},i=s.render||a;delete s.render,_o(i,s.type,s)}},0)},ze.done=e=>{ze.update(e,{isLoading:!1,progress:1})},ze.promise=E5;function E5(e,{pending:o,error:n,success:r},a){var s,i,l;let c;const d={...a||{},autoClose:!1};o&&(c=Ci(o)?ze.loading(o,d):ze.loading(o.render,{...d,...o}));const f={autoClose:(s=a==null?void 0:a.autoClose)!=null?s:!0,closeOnClick:(i=a==null?void 0:a.closeOnClick)!=null?i:!0,closeButton:(l=a==null?void 0:a.autoClose)!=null?l:null,isLoading:void 0,draggable:null,delay:100},u=(m,p,y)=>{if(p==null){ze.remove(c);return}const b={type:m,...f,...a,data:y},g=Ci(p)?{render:p}:p;return c?ze.update(c,{...b,...g,isLoading:!1}):ze(g.render,{...b,...g,isLoading:!1}),y},h=yn(e)?e():e;return h.then(m=>{u("success",r,m)}).catch(m=>{u("error",n,m)}),h}ze.POSITION=Zn,ze.THEME=gn,ze.TYPE=ut,ze.TRANSITIONS=Mv;const B5={install(e,o={}){Qv.useHandler=o.useHandler||(()=>{}),S5(o)}};typeof window<"u"&&(window.Vue3Toastify=B5);function S5(e={}){const o=ga(Xf,e);e5(o)}const A5={v:"4.8.0",meta:{g:"LottieFiles AE ",a:"",k:"",d:"",tc:""},fr:25,ip:0,op:273,w:500,h:500,nm:"not_found",ddd:0,assets:JSON.parse('[{"id":"image_0","w":175,"h":173,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAACtCAYAAADGWi9+AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAYj0lEQVR4nO2dXVMb2ZnH/+cg1BIIkABjPF7bxFvZnamaqYHUrh1XqjbMxc7YV4Mucj3kEwzfIOwnCLnei+BP0PgmME5twWQry8DWFrh2qpKt3aRgXB4DtngRWKIlcc5eSGLUp7ul7qPWS7fO78rdWK1G+vP0c57zvAAKhUKhUCgUCoVCoVAoFAqFQqEIMqTTN9Au9Ofb0+B8CgzTICRJCZ8GAHAkOfBxnZeeEYJdAGAMewD2ALIHXO0hFttNfzJz2up7V9gTSvHqq5tTQN8sCKYp4dOc4+ctfLt9DuwCfAOUbqQ/fbDbwvdS1BAa8epfbc2Bk1kCPgfgXgdv5YwDG+BkBbH+FWWZW0egxauvbs4CdJ4QzAEY6fT92MGBZ0rIrSFw4tXXd5IwjHkCsgCPFjYej6E/EkF/fx80LQpKKQBgIB5zfI1hFHDFGAAgn78EAOTyBkrFEoqlkpe3P+McK+gjS8q18IfAiLfsx9JFt1ZW06IYiGvQotGyaPsjvt8TYwyXRgH5/CVyeeNa3I0gBF8zxhbTTx5t+H5TPUTXi7dGtF80+r+JwQEkBuMtE6sbLt7lcHGRRz5/6cYy73OChfRnD1facW9ho2vFq6/vJHFZWGok2ng8hpGhQSQSA9duQLdQFfLFuxxYxfWwQ1liObpSvPraNwsEZBEO7gGlFInBAYyNjnTMwnqBMYaLixwyx2d1rXF5cccW0k8e7bXv7oJLV4lXf749TRlfdto0oJQilRxCKjncdVbWLRfvcjg5Pa/nH59x8MX0458utfO+gkjXiFdf3VokBL+y+1kYRCuSy1/izdsTGEbB9ucVV2JeWWFnOi5efXVzihK64mRtU8khjI0mQyNakWz2op47ccY5WUg/ebDc5tsKBB0Vr766PU8IX4KNbxuPxzAxnoKmRTtwZ+2FMYbM8SlOTs9tf845niIWXVCbHGY6Jl59bXuJgH8pnqeUYmx0BKnkcCduq6MYRgEHRxlbV4IALxhnc8qN+IG2i7e8Q1ZYJsDn4s80LYr3Jm8EIoLQSt68PXaywmecklm1Q1emreLV13eS1Chs2Pm3qeQQboyPtvN2upqLdzkcHGbs4sPKD67QNvE6LcwopZgYT2F4ONGuW3Gkut1bzn/ovPUvFkv4/uCNrRvBOfllrwu4LeLVn29PE8Y3ICzMKKW4c/tm2xZlhlGAYRRQLJWQyxtgjDmGqmrpj0QQ6Y9cJ/XE4zHEahJ7WgljDEdvTpA9v7D8rNcF3HLx6qubU4TQXQjC1bQo7ty+2VIBFIslXLzLIZ83cPEu5/v1q8k/g4MDdTPT/ODgMKMELNBS8Tr5uK0UblWw2fN3rqyqX1S3rFPJoZY9SU5Os3jz9sRyvlcF3DLxtlu4ufwlstl3ttbJCwR4wYEpNJHc3h+JYGx0pCV+fDZ7gYOjjOU8p2Sm16IQrRPv2taKGA5rhXBz+Utkjs885tJiw0sRZbliAwDoLAimCTANF4nwrdrWdhBwz4XRWiJeuw0Iv4VrGAUcvT1pKNpycB8rANvwM+XwhyJPPmcXs66lFZbYzgcmwAumRWd7ZSfOd/FWtnx/W3uOUor7U7d9EW6jrdQK+xxkBfxqqR07UuXc4+IcJXyhXhm931vedgLmwLP044dzvrxBl+OreO0iC36Gw3L5SxweZurlxO5zThY7uXjRn29P44ov1EuiHxsdwdho0pf323/52rIw5Rz/kn7ycNGXN+hifBXvs7WtXdHyTE6M+fK4zByfInN85vTjjotWpFH5Ujwew+TEWNObIYwx7H/32vIH3QsLON/Ea5eP68eWL2MMr16/cfJtuz5xW1/dnKWELtm5E5RSvHfrRtMxYsMoYP/la/H0Ptei02H2f30Rb2UHbaf2nKZFce/OraauWy/LKmglM/VKm/x4OtnFgDnIb9KPHyw0deEuxhfxiu4CpRT37txq6pFoGAW8fHVon5jS5dbWiXplTn74wS9fHVqeUGF2H5pe/utr31hW2M0WRtYR7j6nZDaIwgWA9KcPdpkWneUcT8WfZY7PcHBo3XzwwuTEmCWiQxlfbuqiXUxTlldf30kSo7CHmkdhPB7Dnds3pa/pJNywxTArbsSvxfPNrhNs3YeQbh83Z3kvC5YSnonxlPTlnITLOZ5+/vhhqBYf6cc/XeKc/FI8f3J6jmxWfos7lRxGXFgAEsKX9PUdf2JzXYS0eMsxXXMYqJmkFMYYDo6sydec42n6ycN52fvsZtJPHizbCfjgKNNUFtzYqGVNOILLQugWbk1YXrpoOqK0qQXHq9fWpOswC7eKo4AP7aMsbhiIxzA8ZI5eEIKFsFlfKfE6WV3Z7d/M8alllUyAF2EXbhU7ATs9idzSC9ZX0vJara5stW81K0xgn2nRWakLBpSygM1RCMMoIHMs5+b390dCb309i1df30lW2oxeI2t1GWM4tIaHzjglc2FanLkl/eThPCH4uvbcyek5ci7TPUXsrW8xNEk73hVnGPMQEm9krW7m+NS6Jw++GNaguhtYNDoHwPQoOrSvIm6IvfXli83cXzfhWbyVjuTXJAblWosaRsGS1lhO5wvmBoRfpD+ZOeUE87XniqUSTk6zUtdLJYfEU/f059vTcnfXXXhSXaWiwFRBYPNocsWRtRbrDJyFakEhS/qzhysceFZ7LnN8hmLR0xgBAOUcE0v48oqH4nP2aDLpfO2RbAfyXP7SugcPvhiUJJu2UP5DNrkPdVJC65IaMVtfcc0SVDyJV/ylR4YGpd7ULrrQ6+6CSPrJoz3OYfpMsucXUtY3kRgQT43oX20FXsCuxVv5ZU0+gs2H0hBbq8vJoucL9QKx6BJ8sL7VsnwTLPjW173l5WS29lB2oZbNvhNP7YcxacQP0p/MnNpZX5nIQ2IwbjoOg+vgWn2VyZLXiB+GG4rFkrVgUFnd+thY3zOJxB1b1yHgUQdX4i3XY5mjDGLmkhtskk3OlNWtT/qTmVMOslx77rR+5bQtlFLrd3bFA219XVrevtnaI02LSkUZsudml0H8UhQO8CuT61AslaSSdsSnJaWYbeq+Oow78RKYHi8Dcc3zGxWLNh+48KUo7Ek/ebRHgBe152TaWonxXs7x8+burLO4Ei8l3CReLeo9Z1d0GcpZYyqu6xYGczlPLm94voZdlXKQ/V5X4hX/QmX83bzwYZdbMClcw7np8zKMglTUwer3IrzitfvLlPF3rYs1tuH5Ij1M5Sm1X3tOJtsspvULZ/iU9E11mMaWl5t/ORmra7e4UHN2vcM5NmqP3XbGrCUSMRueIC/aGouXmR8r/RHvVlcUr5izqnAL2ag9ujSKnq9gSdLhCGxyemPxEmL65fr7+zy/iZizW+6Pq/BMH0x5zjLhspgYcajT1bLbaSheS6RBojrYujIme54vooCYpM8Y87xoC9MYXM+/iWy5j5mrPc8XUQAohxhrjy8lrK/o+v3Q+T1YuFiwNe8TWR5vsVjPlvk0DUHTtX2RLpgx5wcNxSv6RH6MbOrF4kq/YNws3nZOPOo2wuMA9QocFr+3V2m5eHv5w1W0lpaLV1xQiAsOhUKWlotXXNlWBvQpFE3TevFaV7bSkyUVilrUgi1oCDuevYwb8Zrqp3o5NNMN+LHjGRYaipcQc2jmSqZnVkh2dLoRf3Y8g0lb3Iaw7Oh0A2JhgB9ZfkHd8WwoXsawV3ssk0Nq/YDprOeLKKpV3CaanaAJBHfH043l3Wv2TSxplCS4pScdhVIfMvwsxmff7v8FARfiNacvyhT+WabTQIlXCqEwQKYQ1jIijDRvnDqFC/Ga0xdLEo3exARoAPfsHoGK+oglO5qlHq0xor/LOAmkvwu4EK9Ya1YslaQSoK2POHMjE0V99PWdpLhYk8nwsz452V4Tt9VR3EYbTH6RTAK0pVEJCXarobZTKMzWHtobhMZYG7/w8FpeAOAwx3plIg6DQotNAnwepsk0LUdoSWppWeqCYtH61AxyFbdLy8s3ao9ku7VYAuohmkzTSioTmExz7xIJ71067WbdNXdnncWdeCndqD2UsbyA1VpQEo7ZCC1H+CO3bRbtAtHoMKGUPmi4Em+latWU4yAzG1ecTMOBj4PcK6tdiOOnZIQL2HxnxPxEDRqut4c5zL0WLi7ynt9M06LW3baQTKZpFXYTmGzGUzXEtrdZNLohfWNdgJe2/qZGb7Kugzj6ihB8oWK+zlBqHpUbj8ekogxiS1RC8HVQt4WruBdvrN8k3mKpJOU6DA8nbDKhzF+Qooy+ujkrxnZlrC5gfVIyoetkEHEt3nJ7efNgOxnXAbB+ARXrOyt1sRBDCF2uPe6PRCQXapeWlltiy9Qg4i0lUnAdLt7lpHJDU8lhi+9LCVVd0mvQ175ZgODr3rw5JnUtcQITIfg6DI29vYm37DpcRx0YY7i48O46UEotvi8HPq58YT2Pvro5RWCekhSPx6S2gxljFn+XsXDMAvEk3spcMJP1lR0pOjycsMk2I4sqdAZQSpchFKpOjKekrmUzcPtMXL8EFe+VFH3EMplGZuEG2H4hI5Tx5V7eNtZXtxbFRdrY6Ih0rdqJMPaKgywHPcpQxbN4058+2BWbQ4sfkFs0LWrrPuCy0JP+r766OUsIflV7rvwZyf0tZ7M20zJDNIFJqoaNMbZYe5zPX0rNRwCAsdGk1X0g+KLX/F/9+fY0IdTyOJ+ckFukAVaXjnM8DcNCrYqUeCuZSKY0yTdvT6RvYnJizBL7JSC/1le356UvGiD09Z0kYXwFgp87OTEm7S5kjk+t4THB5Qs60tXDnMBkGQ2jgKzETFygXET43q0blvOE8N+GXcD6+k6SGoUNCGGx4aEEhocTUtdkjFldOYLfiZ3Vg460eNOfPVwRfd/M8Zl0T4CBeMz2ERlmAVeFK/ZAjsdjmJSM6QJlq2v1dfEj6Qt2KU31bRB932KphMyx/EJ2eDhhWcAB4RSw/nx7mhiFXVG4mhbFbZunkFsMo+C0gP5AX9tWbkOV9JNHG+KW8cnpeVMtocZGkxgesj4uywLeWpa+cBehr27OEsY3ILgKmhbFnds3mxp6cnCUcfwZAf8yTHH05jvmcLYAIde33gfohsmbY7YJKITgi2dfbW0EOQ6sr24tEkLXISzO/BBu5vjUYjj6hOtRzkNjfYkfF9HXvlkgIL+uPZdKDuHG+GhT181mL5z+EM44wXz6s4eB2SnSVzenKKXLdpPW4/EYbt+60ZRwDaOA/ZevTedGhgZw/94kdr79q+k85+xHYQiZ+dKrLP34p0t2GxeyO29VhocTeM/+Sx0hHLq+trUShFxgfe2bBULorp1wh4cSTVtcxhi+f/3Gcn7mo/u4e3vcpnKbhKJ20LdGe4yxeYjuw2EGRYkmJbUkBgdw5/ZN23gnAT4nhO7qq1uL3ehK6KubsytrW3uVp5JlJTo5MdZUVKHKwWHGEtP98P27GBkqp0/ev3fT9DMKMt/0m3YBvrgNVfTV7XlC+G9rz/nhywFl65I5Pq23FX3GOZYQiy51eu9eX92cpZRachSqaFq0qQ2IWjLHp5adtPHRIfzsHz+4Ps7lDfz+D+ZC4bnHD3397juB77+Avrq1LJZpDw8lfLEwQDmx+tDG0tRwxkGWwa+W2unX6es7SVwW5yrFkvec/t/Y6Ih0roKI3ZqgP9KHf/75NPoj5uaGv/u3/0KxdHV9zCmZCfqmhf+Nc2PRBWIUpmvjl9V8Uj8EPBCP4d7dWzg5zTqlY44Q8C9B6JfP1rZeMPBlcL7SCiHr6ztJFAqzYJgjRuGLeqYgHo9hYjzlWydzwyjgyGZL/mcPPrAIFwBGhgfw9rjmqXV11XVullda8ujQVzenCKG7EPy8G+MppJLDvr1PsVhC5vjMkmztwD7n2ADIBvqwK2N19NXNKVA6DYZpSmGpL7OjPxLBzZtjvkwOrWIYBbx8dWjZRZv5sLxAs+OP//knk3g5Z58EuVsO0CLxApUdpHIg3pJsIrtn74RHEV9DgBcgOGUcp+JkyfJ/IMnqDAg3Qq0lHo8hlRyS7rHghJNw79+bxEfv33V8nRKvR+wWcEBrBAyUF3Vn2Qucnp7X84lbRrWTTSo51JJBJ07CvfPeOH7y0f26rxV9XgD/NPf44b/7fpNtpOUrTicB+7mIs8MwCsieXyCXN1o6wagq2EQi7ruVrcVJuJMTKTyc+XHd19pFGwjwgmnR2U5HZpqhLeGSTgm4CmMMufwl8vlLXBpF++4xLtG0KLRoFJrWjwHJBiBeyWYvcPT2xHLPI0MDjgu0Wv6yf4Bv//yd5XzQBdy2WJ+TgP2KA3uFMXbdZ7iemDUtCkop+iMRX4aXeMUujguULe5PPrrfULgA8Ps/vHDs7BlkAbc1UO0k4P5IORm9lwfiiTDGcHCYsd1id+PjVnGyurUEVcBt32VxikIA/ofSgophFPD96ze2i85GUYVacnkDG//xrbhQsyWIAu7IFqH+fHuaMr4sJmIDlSqCibGOPKK7ASc3AagfxxUplq7wx+0/4ezcbLnHRkccrx80AXdsf1tf30nCKCwT4HPxZ9WOOr1khQ2jgIOjjG1kpD/Sh589+OA60aYRTsKtpqnWSTUNlIA7npxhlwtcJR6PYWx0xNfdqW6jUcJRaiSBR//w964WZgDw+ugEO//9V4uroGlR3Ltz6/rYrYDLORuX00D3za/ouHiBaz94BQ4JLcND5dq2sLkSVdHWC9v1R/owOZHC305N1rW83716i5ffvzHnL1RwiujUEzBAvgf4MYAPTWeBF4yTpfSTB8uON9MmukK8QNWNKC4S8C+d/k9YRJzNXiBzfOZ5F3AgrmEgHsVYquxOFUtXyJ6/sxVslUahyPoCdqYb3IuuEW+Veou5KsNDiZZtwbaKci+FbCNLewZO/hWE/wJ10irdkkoOYWw02TCGHlQBd514q1RiwkuwCalV0bQoUiNDSCQG2r7J4ZZc/hLZ7LuGSUOc4yli0YUf/MzCAik3dnH8/Z2QWSvUi3KMDA2gWLqy3ejopIC7VrxANcHb3ZeYGBxAYjDeFUKu5lVcXOQbugac4ynAFu3yjcuulDFPQebrPYlqIYTg7t9MenoqOeVNjI8OYebD+9c1cLm8ge2d/7VEMTol4K4WbxWvligejyExGIemRdsSqSgWS5Vmg4brbvH1RGvHD6v+vimATxGKSXDMA9DE/0spdaz7E/GaqeYUhuuEgAMh3ipuS21E4vEYYlo/IpEINC2KWCVfQYZc/hKMMRhG4TpjzUOSj68lSvV2K90IWDbFslsEHCjx1qI/357GFV8gBHOQ8AuBck5FxEXkoipWWQjB14yR5VaEl2QF3ExuMNAdAg6seGvRv9qaA8NcM0L2G0LwNeN8pVX1c7V4FXCzwq3SaQGHQry1VCzyXKXGbBptEjMBXjCQDRC+gWh0o92LF7cC9ku4VTop4NCJV6QsZkwDfIpSzIIj6Xbl7sA+IdhjnOwCbA+c73bLtmkjAd+cGMXh0bFvwq3SKQGHXrz18DS4MBbbDUKySj0B29GscKt0QsA9Ld6w4lbAfgm3SrsFrMQbUhoJ2G/hVmmngJV4Q0xFwN9A2MholXCrtEvASrwhZ2Vt6xzAdZMMsQlfq2iHgLszm0XhC5UF6bVw+yN9eDDzd215b6fqDw58TI2CL93tlXjDDKUmgYwMD7iuyPCDVgtYiTfMcD5VexiJtD+Jv5UCVuINM5ybmgdmz5sbsyBLqwSsxBtmYjGTeHN5A3/+v1cduZVGApa5phJviEl/MnNazhv+gf/5yyt89+ptR+6nnoBlBhwq8YYetghh0M3Ot3/tOgHLDDhU4g056SeP9jgnC+L5Tgv4wcyPrZEPxhe9XEeJtwdIP3mwzDn5pXi+kwIeiGv48H1zMQwBPvcyV0+Jt0foRgE3O+BQibeH6EYBT06khDNk1u1rlXh7jG4T8K0Jc4iXALNuX6vE24N0k4DHRy2dQF2XbSnx9ijdJGBZlHh7mKALWIm3xwmygJV4FR0V8NvjrHjKvtufDUq8CgCdE/DrI3NBBQc23L5WiVdxTScEfHAkTq7nG25fq8SrMNFOAX/36q215y/nK25fr8SrsNAOARdLV/j2z/umcxx45qWvmxKvwpZWCrhaWWwZbkjJopfrKPEqHKkn4L/sH0hd06kknoP8Jv3pg12Hl9mi+jYoGuI0M3pyIoWP3r9rzQxzwGlGnGwvByVehSucBAyUO/DcvT1ul6eAYukKrw9PHGfEAdjnWnRapgmJEq/CNfUEXGV8dOj637l8wXaCUJVmu+co8So80WhaqVtqR3fJXkOJVyGFvrq1KDMnrjyfgy360ZBbiVchTXU6EwifqySROwl5n4OsgGLZa0ShHkq8Ct+oFE9OmU4GpKO8QqFQKBQKhUKhUCgUCoVCoVAoFAqFa/4fCbut2hEefs8AAAAASUVORK5CYII=","e":1},{"id":"image_1","w":85,"h":85,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAABVCAYAAAA49ahaAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAEE0lEQVR4nO2d/XXaMBTF72OB0AnqThA6Qd0JygalEzQj0A3aCUo3gAnqbEAmKNmATHD7hyTqEuMvycgW73cOJzYY83zzJMuS3pNgJJDMAWT2tQAwb/jKEcDe/RWRYjjruiGxfpjkEkBuX/eBTvsEI/QWQCEix0DnHS8klyS3JI+8DluSK5JNXj8tSGYk11cUsoojyQ3JLLYeXlgxNxGFvMT0xCU5p/HMsbPhFKoFmjozZjHvypHkQ2zdKqHxzm1kgXwoGLBK8G5S0bQvtwDuvK2JywuABxHZ+J5o5vNlmqLzG9MXFDDX8JPkd98T9fZUkhsAn30NGCk7AKu+Dw+9RE1cUMcTgLyPsJ1FJblHuMfKsdNL2E51qvXQWxEUMNdasGN7trWoN1Lkq7iHad20ppWo9i5/i4I6PlinakVjnWrbob89DEqJL23asbWi2rrkgDTaoSF4gblx7esOair+G6igZe5gNKnloqg0PfOfAhqUCvck13UHVBZ/LfaNvABYiMih6sNLnvoAFbSOOwAX+wheeartAvszoEEp8bFqFLfKU9eDm5IO66o3//NU9dJevPLWc09dXc2UdFidv3HuqUfoDaoPb8o9WSdPte1SFbQfq/LO7NIHSidW5Z1T8dei78079zAwA7ToB2LpNlzxz+PYkRS521BRw5G7DQEAkoxmSlq8F5H9zPbsK2HIAFP8s6hmpMUCUFFDcxJ1EdmQlJgDRtTxT3ydDhngOetPecVbQEUdBC3+A6CiDsAMZihaCYjWqQOgooblGTCiph8Uez0OgBG1dgab0okjoJ4amj2gnhqaA6Cd1KExndR25ymqKYngZlg7UbUK8OfRbThRO4W0KJWcNHSiFnHsSIrCbcwAwE6u2sWyJgGeyxEr5cdUrQL6synvlOdSafBEf96VgypOnmqrAPXW7uzOo1R0ero/9dPTreK/rmjQ1Hmsik7RkB8/2oX8qLe2ptJLAQ2j9OH9pWjqyuEU2xJYD2nRxPlRF57eFO9fAPgQ2qKJ8wwT7Huxc79p4G8FEzGs/KMxX1WtqPamNc4Eg3H41iZNc6u8VDZV21dfiybOTkSWzYd1SPZFcovbzVTRKelXF1HnMH2Gt5TsC+iRRa1TWrobFLZVdp9zOk37sf+tHLcxUOg8tPP4Xd+slHOYbsJU27C9M1ICPSeoichRRHKk2Uewg4eggOesPxFZAfiCdB4QvonIchQrWZBckNwPlYX7Chw41shHxl95og/fOfZ8/zQrUUwhPX1BclqBeSRza/jYKDjWot4WGnHHsIbKllMX8xyaVSseeN0b2oGmns+uea1RFvmyF1le5CvksM0j/i3yFWU2Y7SV08rQ3DAymIhutxRdBhvrWcEzzBiaW5LuALMknU4JTZW/U1qiUwiP8oYAAAAASUVORK5CYII=","e":1},{"id":"image_2","w":186,"h":242,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAADyCAYAAAD6Bd/wAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAPn0lEQVR4nO3dXVobR74G8LeqW60vGgkZFA/J2OZ54rkNZwXxDiY7GGYHnrOBISs4mbMCZwPnOCsYZwf2re05Mk6GsYUQSE2jr+6ucyGaMCBA6KtK1Pu7sUBSV7n00vp3qVoNEBERERGRScSiGqrVjp7ETrytlNoWSjw7a/3bRbVP2u1B4QMEPiioD0jw6unWxqtFNT7XoL+t1bellDtKiGdCqW/m2RYtrZ8g8NKJnZdbW2vH82pkLkF//7GxoyCeXw53PptBLuci4zpwHYms50LKhb2pkEa9foQkUegPYvT6ETq9AaIoufiQAMD/OImzu7W19mHW7c80Ze8/NnagsAvgcfo7v5hFseAhn80w1PRvoihB2OmjHfbQ70cX7/px1oGfSfLe1urbwnFepHtw15Xwi1mU/TzDTWPpdAcIwh6CsHf+OwX1vZu4P8yipJk6he/2DnYFxF8BQEqBkp9jwGliUZSgfniCTm8AAFBCvFFxvPOHrerrabY7cRprtaNyLOKX6cxJMe+h+mCFAaeZCDt91A9PkCRq+AuBP3/9aP3FpNubKJUXSxUpBdbXivCL2Un7QDRSkijUD08Qdvrpr378+vH6ziTbunPQz6YMfwaw6roSD9d9ZD13kraJxtJsneKo1Ul/nCjsdwr6xZB7nosvq6ssVWghgrCH+uFJ+uOdwy7HfWCtdlQWjvMCDDlp4BezqD5YSX/807u9g927PH/soMcifimU+sZ1JUNOWlwMu4D46/uPje/Gfe5YQX+3d7ALgW+lFHi47jPkpI1fzP428aHwY6129GSc590a9Le1+nY6T76+VuSBJ2lXfbACb5jD1VjEL8Z5zq1BP6vLUcx7nEIkY1QrxeENgW/HKWFuDPr7j42ddK78woEAkXZZz8VaKT/8QeG/b3v8zXv04QItlPwc63IyTqVUgOtKAPj9P/YOn9/02GuD/v5jYwfAY9eVqJQKs+0h0Yyk2VRQ/3nT464NuoJ4DoB1ORnNL2bP9+pnO+eRRgb9ba2+nS65Lfv5uXSQaFYuTDdee1A6MuhSyp10A6zNyXSrxVx684+12lF51GOuK12+A4BiwZtDt4hmy3VlOq+O2IlH7tWvBP3sk6bHwHDunGgZrP5Wvjwbdf+VoMdOvA0MT2QmWhZexklvPht1/5WgK6W2ASCX40f9tDzyufMd8+NRdfqVoKdfLpRxnct3ERktrdMjRNuX77t2Ht11xl7BS2QERwxnCIUjnly+72qaz0525ipFWjZpua2UenL5vmt325w/p/uE9QlZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysYeWJotxchCLvo9SPE6QVVyWg5z0Uu62KlmINj4GmYRgW9FXRw0AwxiGLdXaE7Oj2/6G0bJT+PjUrRqK9MMSLocaLw66fjC4NFy6wVdBCEXTxc91Ey5NuYtQc9ThQ+/rOJbj/S3RWaoSRR2K+3AcCIsGs/GGXI77f9ehutoHP7A+dMa9APmicMuQU+NQLtx13agh4nCs3Wqa7maYGSROGgGWrtg7agt4IOEk4dWiMIu1qnirUFPQh7upomDZJEaZ1V0xZ0TiXap9sbaGtb+6wL2WMQJdraZtBpYXTOvDDotDCFnL7rYmkLOr9/3T6OxquoaGvZ/+0iqGSJQk7f5Tw1Bj2rq2nSIOM6yGX1La3SGnSTlnHSfG1Uilrb13owulld1dk8LUgh72lfwag16IW8hy/WfZ1doDmTUuCrh1eub7v4fujuQKVUwPqa3rc1mo+M6+DxZsWIU+u0n3gBABuVFeSyGXw2YDknzUbJz+OLdd+IkAOGBB0YHpwW8h5Owi6ax6dcp76EpBTwizmU/RwKeX1TiaMYE3QAcKRAyc+fH7hw4dfykFJqnT68jbk9A4zbK9Dy0n4wSrQIDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUjv2Q0PrtuvM5Lai9aLptBIe8t/PvEZzXWjiNRyHnGfqOuUb3q9iI0W6doBR3dXdGm5OexUSnO/UJmp50+mq1TBGFvptvNuA5Kfg6VctGYiwAABgX9cyNAs3WquxvatYIOWkEH62tFbFRW5tLGPMd6EMVoHIVoBV1sVleN+epv7TV6nCjs7R8x5Jc0jkLs19sz3WacKNR+OVzIWA+iGHv7R8a8O2sP+udGwCtbXKMVdGYa9l8/HS/8kjn79bYRr6/WoNtej4+jFXRmUkcfNE+0Be6XT8eIE6Wl7ZS2oMeJwkHzRFfzS+VzI5jq+XGitJaGSaLQPA61tQ9oDPpJ2EWi+a98WQyieKp3vlbQ0T7Wuo/BtAV91tNa990049Vq6y8Pk0Rpfc0Z9CURTlFfm3LNVp0fAGqfdaHxTFp6mHQl7kGUaGubQb/nBgOTgq6vLwz6PZfNZnR34dy8lzXcRFvQpUHrIJbBpCExab1JxtW3X9XWctGQNRDLYpo1I6asN9H5mmsLul/M6mp6KU0zXiaMtZRC6x+ctqCX/LzWmm2ZZFxnqrCW/Lz2UrFSKmhtX+vB6Bfrvs7ml8a04+RIMbclv+PIuA4q5aK29gHNQfeLWZT8vM4uGK9SKsyk9KiUClrGWkqBrx6WtR8Ua59e3KyuMuzXKPn5mb7rLXqspRR4vFkx4vQ6/T3A8AXIuBKNI70r3Ewhz0qNedS1ixrrnOfid9WSESEHDAk6AGxUVlBezeOgGSKwdGWjlAJlP49KuTDXA/V5jnXOc1Ep6ymTbmJM0IHhQctmdRXAKk47fQyiGH2DPsKeFy/jIOtlFrr3uzzW3X6EOJ58LUouO+y/qTNpRgX9IlM+5LBBIe/d+/HWfjBKtAgMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBWO/ZHQQxRgM4nv/jbpexkHGdZA5+1eHacc6vdqcyV9UalTQ40SheRyiFXSNurT3omRcByU/h0q5OPdLocxyrC9eVMAvZlEpFYwLvTFBbwUdfGoEVl4AIDWIYjSOQjRbp9isluZ22cRm6xQHzZO5jHUQ9hCEPRTy3tnVNcz4vnQjavT9ehv79bbVIb8oSRR+/XSMz41g5tver7fxeQE7lNNOH//3yyG6vWiu7YxLe9A/NwK0go7ubhgp3fPOyn69vdCxThKFvf2mEWHXGvQg7KHZOtXZBeM1jkKcdvpTbycIe1p2KEmi8K96a+HtXqY16PN4a76P9uvtqbehc6y7/Wim70yT0Bb0VtCxcmZlEoMoRhD2Jn6+CWPdCrpa29cW9GleOBtNM14mjPUgimdSgk1KW9BDjf/pZTRNSEwIOqD3NdcWdE4l3s2kpUds0DgPosmvYzot7dOLNF+93kB3F87pPE5g0O+5TMaMTyYBzH1Zw00Y9CUhJwyJKR/BA0DW07fiRFvQTVv0Y7riFOOV0xiwi3LZjLa2tQV9XguW7qtpxqu0mp9hTyYjpdC6c9MW9JKfn/jt2DZSCqwUcxM/34Sx9os5O2t0RwpUSgVdzS+VjcrKVCHRPdZSCnyx7mtrH9B8MLpRWWGtfov0RIZpbVRWtNXqm9WS1r05YMCsy1cPy8YcLJkm57n4XbU0s+09+rKy8LHerK4acTymPeiOFHj0ZQUlX/8Bk0kqpQK2fv9gpnvCdKwXETwpBb56WDbmdTViV+pIgc3qKsp+DgczWn+9rAp5DxtrxbmVdM5ZAE87/bmMtTw7HljEea93YUTQU4W8h8d573ylW38Qo9ePjFqvMWsZ10HGlfAyDgp5b2Ef8Fwc6yDsIY6Ticc657mQUiCXzRhRpoxiVNBTw7PhzXjLu+8yrmPF7Jf2Gp1oERh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZIVRQW8BQK8fLbgrRNNJbriIwdWgK7y+7UlEJur34+GNBK8u33c16ALHANAfxPPtFdGMDeLrM3sl6ArqNcDShZZLkihEUQIAeLq18ery/Vf36Ge7/R736LREOr0BAEAJ8WbU/VeCnv419PvR+V8Ikek63WHQhVKvRt0/enpR4WcACC2+3ictl/OsiqsHosA1QRdCvASAdtibU7eIZqf3W/XR/vrR+stRjxkZdJnIFwDLF1oOraCb3vzf6x4zMuhbW2vHAH4EgGbrdOYdI5qVJFEIziqPJEl+uO5x1y4BUIl6AQBB2ONenYx1HHSGNxR+/sNW9fV1j7s26E+3Nl6lB6Xcq5OJoijBUWsYdKXU7k2PvXFRV/rkIOydT98QmaJxFA5vKPw86kOii24M+tmT/wYA9eYJ17+QMcJO/3xKMVHJ89sef+syXSdxdgG0oyj57S+ISKMoSlA/PAEAKKjvb6rNU2KcDb+rHTwTUvwdAKoPVuAXs1N1lGhSSaLwz3ob/X4EJcSbp48ebI/zvLFOvHi6tfFKQX0PAPXDE9brpE3jKER/uOCw7cbyu3GfN9YePfV+r/ECwJ+kFNisriLruXfrJdEU6ocnF+fM/2OckiV1p6ADwPsPjVcQ+FZKgfW1IssYmrskUWgchechh8Cfv360/uIu27jzOaOOcr4D8FOSKNQPTy5+/Eo0c2lNPk3Ih0+bUFrGAEAx76H6YAVSTrw5oivCTh/1w/Np7bZK1B9vmy+/zlTJ/Mfe4XMF9V8AwFKGZuVyqaKEeKPieOcuNfllU++C39bq28JxXgilvgGAfDaDtVIe+Vxm2k2TZZJE4TjooBV0L344+TcncXbPFhpObGa1xru9g10B8RcAq8Aw8P5Klnt4ulUUJWiH3X8LuBLiDeLk+aSlymUzLaprtaNyLOMfcFa7A8OSppj3UCx4yGczrOMJwPBkiW4vQjvspfPiqT0I7E5ywHmTuaSuVjsqRzJ6LiB2ADy+eJ/nucg4Ep7nABju+el+i+IEgyhGkij0+zF6g2jUuqmfIPDiujOEpjX33evbWn1bSrmjhHiW1vFEGH4j3CsIvHRi5+W0NfhtFl5HvKsdPJNSbidIygLiCRSeLLoPtHhKDM/OF0K8dmLn9dbW2ge9PSIiIiIiIp3+H/yNcCHjpRNmAAAAAElFTkSuQmCC","e":1},{"id":"image_3","w":216,"h":260,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAEECAYAAABKq/oNAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAeX0lEQVR4nO2dX3Ybx5XGv6puNEAIAkGR4vAokQnO2H41ZwXiDuysIM4GJjnZQJIV2LOCaHZg74DeAfwqKQFgOxoOBRIgBDXxp7tqHtAFNWmA+NdV1Q3c3zl+oAii22R/qFu37ncvQBAEQRAEQRAEQZiC2b4BItu8ql+ecodXpZSnDKwKieq010kmzzl4RwhRc+HWTk72OkZv1BIkMGIh6vV2JUBwCo6ziZAYXqz6fpKxH5mU50KIl5+fHNaSu9N0QQIjfsXr+rsz5rAqJE4hcQqGUwC7017LOYOXc+DlHHDGUMi7v3pNEAoEgUAQCgxHIYaj8P5LmgzsWy74y01b2UhgW0y93q6GTngahXenkrEqk/KLWa8v5F24DofrcBTy7lhUfPlHSAgJvz9CfxDA748ghFTf6krIb1zhfrspQiOBbQEqvOOcn0rI03nhnevwyarkec7kax0osXW6fQShUP/cBcMfP/3k4KWWixqEBLZhqPBOSlllkp0tGt4pEU0L8UzR84d3hSbxgyOdr7K8mpHAMkq93q4GCKpR0mFueBcXUiHvwnXHoV4a6XT76Lzvqy+7UsgvPzt5em7xllaGBJZy7oV31Sjp8GB457ocBc/VHt7pZDgK0Wr7HxMiDH/IYshIAksR0ZnSaSy8qwI4nvbatIV3OhBC4vrmFj1/OP6HDIqMBGaBVcK7uIjSHN7p4PrmFt3eYPxFxkRGAtPM6/q7s3vh3cykQzy8c92PmTxinABptf3xFxkSGQksIe6UDM0J7wBMzpHiKfFVzpS2iVbbn4SLQoj/zEIFCP1Fl+ReeFeVjJ1SeGeOy6sP8PsjAOg6wjlOewqfBPYAy4R3KumgwjuVDieSRQiJi1ZPZRe///T44Cvb9/QQJDD8qiL8FMAp5oR3d6odKLwzynAU4u3l+/EXDL/79JOD7+ze0Wy26qlYtiL8zh7J+5gSJ+wTO4xufnp8ULV8OzPZWIGtWhEer3Yg0osQEr/8X3dcKJzirGLmBXa/IhwLhnfrVoQT9oml7lO7imXmyUpzRThhj5/+9ybVq1gq46BpFeEhwl0GBonIOxR9NFB4t92UH+XHezGJrwC8tH0/97G6gi1r+MtSRThhhiAU+OWiCwBwhHNycrLXsHtHdzH2UR+J6SyWdHgRIgQkwCKdMzlenTalIpzQj3o2hqMQoROeIWWrmFaB1evtiuDia8HwdSjDL1R0Ny2829SKcEI/paKH65vbVIaJWp7mer1dDXn41xDh7wGARcIq5F0UPJfCOyJRYh/KZxZvYyqJ7sGUsAD8Xv1bIe+iVPRQLOQoHU5oo/GvcUli2vZhia1gr5vv/hoi/DOAx8B42S6X8rR3IoxQyLvoDwIECKoAGpZvZ8LaAqvX29XAEd+p7F8h7+LJ7g4JizCKl3PQHwQAxxmAc8u3M2Etgb2uvzsLefg9kyhzzvBkdwelopfUvRHEwqj9fFTNkxpWFtibn1pfQ+LvwPjT43D/ESUtCGuoiEkyVrV6I/dYSWBxcZWKHg72isneFUEsiRLYQ4UKNlh6ySFxEWmEczaJoF7VL1MTJi4lsNf1d2ckLiKtuO74ceYOz57A6vV2lXH2PUDiItJJwRvveKSUVbt38pGFBRay8CWAspdz8GR3R98dEcSKqBWMSXZm904+spDA/tG8+hMYXnDOcLj/iCoyiFQyOXtl06ds2mCuwOr1dkVC/g0AKo8LlIonUkusuOG4Xm9XbN6LYq5aQh5+C6BcyLsol/IGbokgVkeJLECQikTHgwKr19tVRIW7lccFE/dDEGuhBMZ5OjKJDwosqowf20zIp0VkALWFkUhHJnGmwKIY9ncArV5EdpgsBBLpXsFCJ/wKQJmayBBZQqXqH+o4ZpLZIeLYfk2JDSJTuA6fHCNFOQSrPLQH+xIAijs5Q7dCEMmgEh2hE1oPE6cK7HX93RmASQdcgsgSE+uKlOkUWOQKpdWLyCRpMl9OFZi6MbL9E1kkTebLqQJTN0bhIZFFVNY7DebL6StYrIENQWQRtTiofIK1+7B5cSL7jIIQg2GIwTDAYBggFOMuswXPRd5zsFPIIeea32q4LkcQCjCHVY1fPH4fNi9OZAchJPqRiAbDAKNA4HY8jHwq8e+Vih72K0XkPXOPW8Eb90m0bb4kgRG/wu+PEAQhRoGA3x9hMAzGM7hWpOcP0fOH2K8UsV8x44T3PNUEx675kgS2xdwP70aBwGAYaLveVcfHKAhxdPBY2zUUkwQds1uTSALbAuLhXRAI9IfBg+GdTrq9AXKuo30lix0x7dbr7crJyV5H6wVnQALbMOKrUTzUSxNXHR+loqd9T6bmhkXmy3OtF5vBrP/DJoDj4Sikw+aUMoqEcxvtkXSHd0lzef0Bz492tV5DCSwyX55rvdgMpgtMogGG4yAUJDDLpCm8S5Lb/gijINSawo+ZL63tw6YKTDJ5zsBeDIchigWqRzRFfCVKa3iXJD1/iL2yvhaAhbwLvAcg7XWZmiowxlgDEuhnKOTIEvHwLp7J2zZu+yOtAkuD+XL6ChbKBuMMwQZ/eppCnSOp8G7dM6VNItT8e1DmSyEk6vV21cbky6kC++zk6fmbZgtBSAJblG0L77KCGswXmS8bpq8/M08qGfuRSflFfxBQ0W8MlXRQ4d28kiHCLkpgkfnyO9PXn6kcJmUDwBfDUbi1AlMr0WAYUningYKB2sTJ3DBL5svZKxhkjYF9uQ1hYjy8ix/UEnrJe/qPgGKexnQJjDFWgwSGo9Dk/Whl2YpwQh+cM5SK+juWxaKvY+0Xm8JMgTmhUwt5mFmBJV0RTiTLXnnH2JQe1xl7w17X3519dvL03MhF1bVnfePkZK/xptmCEBJBKFLbPsB0RTixPjmXaz3/uo+Xc6yZLx/eZUr8AIYXQZAOgakUOIV32YVzhmeHZaMz5rycA78/stJO+2GBMTQAvLCdqu/2+pGXiBIPWYZzhudHu0adzcBH86UNgT24LDGwGgBrB86jIETzbQcXrR6JK+PsFHI4flYxLi7ArvnyQYEJIWqAnUziYBig+bZD+6mMUyp6+O3RLp4f7VppfgP82nxp8toPfpy4cGshzGcShZD4+eKGsn4ZIudyuK6DYiGHnMuR91wrq9UsCvlxExzT5ssHfwMnJ3udN83WDYBdk+bLf112SVwpZqeQQ8Fz4UZCKniu0aTFKkzCxHFb+HNj1537CokaGF6YMl/6/RFlB1NC3nPvrEZ5z7EW5q1LrF991eh1573AtPmy073Vfg3iLpwz5D13Et6pUG+TsGW+nCsw0+bLnj80cp1tZefeHikL4V0STKIvw+bLuQIToahxzo2YL30KDRPjbmiX7fAuCThnE/Plq/rl6ecnhzUT150rsM9PDmvKfCmE3IpPuyyhwjvVC34Tw7ukUN4w7vAqgHQIDPhovtxmb1gaUOFdznUmmTz6wFscG+bLhdRC5kuz3A/v1NfEetgwXy62ghkyXzpb9mkcD+/UmRKFd/qwYb5c7GNR4Bwcf9Fd0ZGPQp5NPGSOJxrioR5hDhvmy4UE5sJthAjRH+hP1ZeKHrq9gfbr6CJ+jkThXfpQ7bRNmS8X+ssr8yUA7ebL/UoxEwKj8C6buA432q9+8Y9WQ+bLnOtgr7yDdooqOuIrEYV32UaZLyXMTL5cXGAMNRgyX+5XihPnsknSXhFOrI9p8+XCTw8Da0hII9YV5Xz9+eJGm8iyWBFOrE+sZCpdAhNC1BhnxtzNSmRXHX+tcJHCOyJObHuza6Jf/cICs2G+5Jzh6ZNHqJQLuOr46PnDmSn8bagIJ5IhZr6sQnO/+oUFFpkvrUy+zLnOZHC23x9BCInBMJgIicI7YhlMmi+X28FHky9tjpZVq1Kp6Fm5PpF9YiVTVd3XWirfLpk8B0Bzw4hMowQmmf6axKUExhhrADT5ksg2kxVMyi90X2spgYlw3MaNVjAiyyjzJQC8ql9qXcWWEphygSrzJUFkFbWKReZLbSxd8yQZ+xHYrLFGxPahhv9F5kttLC0wJqW1br8EkRSuG7Vxk+xM53WWX8EgG4C9fvUEkQSxfvVVnddZvixejA/maAUjsowp8+XSAnPhNgAYMV8ShE5UouN1/d2ZrmssLbCoOPIGoDCRWI5REMLvj+78ZzMbrcLEyHyp5xor/VTUr344ClMx+ZJIH8rPFwRiMnh+lpjynou9cgHlUsHoPZowX64msMh8aapfPZFe4nOx43Oyl32Pi1YPVx0fzw7LxkyusX716VrBTJoviXQhhMRNr4+eP0x8Cs4oEGi+7eDooGRkNVOpep3my5XiOzX5kvZg28VVx8c/f7nGu+sPWkdMXbR66Pb62t5fcd98qeMaKwlMtbuiFWw7EEKi+baDq45vLClxef0Bo0D/86XS9ZH5MnHWyVA0AUrXbzpqnK/pBkRCSFx1fO3Xmfgax+bLxFldYHJstaYwcbP512XX2iD6bm+gfRWLTb7Usg9bWWBkvtx8ur2+9XG+ugcyxsyXVR3vv3I+lDFWMzn5clsRQk7OkdSZUpycy1Es5LRk3UyEaPPo+UPslXe0vb9u8+XKAhOhaHDOKdGRIPFzJL8/QhCEc8+UbjEOpS6vP2CvvIP9SjGxe1n2PEsHupMqnDO4DkcQCi2TL1cWmJp8KYSkyZdLMoqEcxtVO6iD2nVQSYGeP8Szw8dr935My6xsE/s/1x0LjDv8FAlPvlzryJwmX87nfsmQ7j3NYBig+baD42eVtURmIkW+CCY+uAueqyZfVpN+77VUEZkvSWC4WzK0aHinCyEk3l6+x/Oj3ZUf0DSEhwCMlE3pNF+ut4JBNhjYVu3D4uHdKAgxGIbW0tgPMRgGaHdvE9uT2aJgQGCxfvXVpN97vbuPJl9u6lnYMhXhaeSq42OvvLPSKpZzOdIwQOqRgQazsSa6x/V6u3JystdJ6r3XEpjqV5/1ao4kKsLTyk2vv1Kaexya2R2EqI4gTKAmXwYIEh3Mt5bAon71NwB2dU++TAJ1pqTCOxXqbTKrniOVih7eXX/QcEeL82/RPAIT6Jp8uX6Am1LzpUo0DIZhJsO7pFj1A0QNa7f1AbRX3jHqNdRlvlxfYCkxXyqfUrc3SGXSIYvsV4r45eLG+HXLpTyePnlk9Jq6zJfJCEzata70/CEuWu+3coXSSbGQMz4ve6+8Y1xcwB3z5Ysk33ftmE6G4z6JtgR20XqPt5ddEpcmnj55hHIpr/06paKH42cVK+ICxnswlW1N0ny59gr22cnT8zfNlhXbykXrPbo9u5mutJPEQa0afpjU71pNIy14LvKeE432tT/W18s5iU++TOoUrwnguD8IjFV09PwhiWsBktoXHx08RqmYx7vr3lJHGPlIRCppkuYZ2UpgSU6+TEoNNQDHplYxISQuWu+NXCvrJBnelYoeSsUnk4Y38exsPhrjWyzk7gyezxI6zJeJ/AYkZI2BfWlqH3bT69OeawF2ooc9acZC27wRvjrMl4kcXDHGjE5codBwPpwzHB2UbN9GplDbmyTNl4kITISiAZgTGJ1zzefoYH1P2DaiwsSk+tUnIjDlAlXmS534G17atC5q5drEEM4EE+uKw6pJvF9ytU0SPwDUK9EmO4Ucnh/tGu/xvknEJl9Wk3i/5HbADA0AL0ym6olxxflO1PSG5gSsj+epJjjJmC8TU4IyX+pO1efc9BQUm0adI43PlsYHtdQLJVliky8TSdUnt9QYMl/mXAecs41O08dFFD+oJfQTM1/uJmG+TExgJs2XpaK3Ean6+yVDrutQmJcCkjRfJiawuPlyOArjnwSJUy4VMieweJnQTiFH4V2KUQJLwnyZbDYiMl8GodAqsGIhZ9UM+BD3w7sslgxtO2ofJiHX3ocl+5c3aL78zWEZ//zl2tpeLB7euZGIKLzbDGLmy+q675W8wAyZLzlneH60i58vbrSLLEsV4cT6JGm+TFRgMpQNxs31Scx7Lp4f7eKi1UukfCrn8kmigcK77UWZL4WQqNfb1ZOTvcbK75XgfVkxXyqRtbu3aHdvF17NVKKBwjtiGsobFjrhKdYwXyb+8az61Zus6OCcYb9SxH6leMerpHCi/RKFd8SiKIFJKU8BfLfq+ySuACZlAxb71W+qV4kwS1Lmy8TrjiRkDaDRskS2Scp8mbjATJsvCUIHSZkvExeYEzokMGIjSMJ8mbjAVEpTCElhIpFpJvOb1zBf6vF+RObLYEMmlBDbyaTcb4122noENjZfZn6sEbHdKPNl6gTGwCiTSGSeJMyXWgQmhKBEB5F57psvV3kPLQJz4ZLAiI1Apesj8+XSaBFYZLO+AUhkRLaZhInjfvXL/3yC93IXQ+ZLIvvE52KryaRqwIRyNOwUctgtFYy7wGMlU9WVfj65W7mLZPKcgVmffEmkh/hc7Pjg+Yd/RmAUDNHzh3h3/QH7lSL2yjvGhLau+VKbwBhjDUjcqWontgchJHr+YDIjO6n2DlcdH91eH88Oy0a8epPoa0XzpbYmg2ryJR02bxejIMRF6z3e/HSFi1YP7e5t4r1TRoHAzxc3RmYUcM4mq+Wr+uXSiQ5tAvvs5Ok5QGdh20S310fzbcdIxy8hpLHRwWoV4w6vLvuzWtvkSsZ+BKiiYxvo9vq4aPWMNiEaBQJXHV/7dSbWFbl8lymtAovMl5Sq33B6/hAXrZ6Va7e7txgFep+vSdHvCuZLvSsYmS83njSM8+35Q63vPzkLw/IlU3onKYhxV1Rawczh90fo9vq46vi46vhod2+1zlS76vjW5wToFlis9cXxsj+rNc/pwm2ECElgGoifI8UPamfBOUOp6GG/Uky06c9Nr5/Ye62KiWyi63AEocDr+rszlcBb6Oc03hNOTvYab5qtifkyttQSCyKERP+eiFZJewsh0e0N0O0NJh241sXvj6yvXgCMZRKDUCxtvtR/UifxAxheBAEJbB7xMiE/qnbQ8fBcdXwMhgGODh6vVRGRxtkAuvByzjjUXtIbpl9gUb96mnz5kVEQYjAM76xKpge79/whLq97ODp4bPS6WWVV86X2J56BNSTkVu7DkgrvdNHtDZD3XOyVd2zfylrsGKh1jZVMpUtgQoga4/pHy9rmoYrwNHPV8a1UqSeJiUazse3N7jL96rULTE2+3JQVbJWK8DQjhMRNr7/SKpaWedmmOjkX8i76gwABgioW7FevXWDR5MsmgGPdky+TJB7eBYFItCI8bfT84UoCMxGazaNcyhubNXDPfHm+0M9ou5s4Eg2w9Aosq+FdUqz6wZFzHeQ919oKzjnD4ZOSsevFSqaqi/6MEYEp82UarCvKpzROg4eZDu+SRAi50j5sr1ywUoeoBjCa3DvG+tUvnOgwIrA0mC+FkEvPENsm+sNgJed5uVTATW9gNHxW4jI9HHGygi3Rr97ILlWE4zZutlawwTBA8207FXVzaWWdhMVvDsvGEh7lUh7//tsnViaPrmK+NPJb+fzkcFJVb/oBHwwD/Hxxs1V7qlVYJ1HAOcNvNa4oO4Uc9itFnPx2b+3qk3VZ1nxp7GNATb40OZhPCGlkSHrWSSIbmHMdPD/anVTwr/YePBo4794ZPJ8mCp671ORLYwKzMfny8tqswzarJHWOxDnD0yePUCkXcNXx0fOHU3//PBrpW4hEpAbPZwE3CoWZZGcLvV7nzcSRkDUG9qWpio5REBrpDZF1OGfYLRUSfc+c60xqHEf3jjwKnpvpqpFYv/rqIq83dxRv2HzZ6dr3KWWB/UpR6wOfi1Yn9V+WxQUsb740JjAXbgMw1wCn59PqNY9S0ct8oa8NVKJjkcmXxgQWFUfeAGZ6dFDW8GHynktWlRVRYSLnfG6q3my1poSR8zCdPSg2gb3yDo6fVTIfrtliUtEBWZ33WrMCG5svqU+iJcqlPI6fVfD0ySPbt5JpljFfGj0ON2W+LFg45U8bec+9M5kk69m7NLGM+dLok2jKfKlKWrbhDCzn8sk5UvygltDHMuZLo3+Jz06enr9ptoyk6ouFnPZ+eaZRK5EbCYlWJXssar608VHXBHCsuwlOuVTIrMDuh3c5l6euZGjb8XLOOJcwx3xpXmCR+VJ3mFgqelbNgIugSoZUeJelkqFtZ9HJl8YFZtJ8eXRQQvNtR/t1FmHn3h6Jwrtss6j50rjAGGM1U+bL8WFqyajjNh7epbUinFifRc2XxgUmQtHgnBurSSxHhaxJiyzLFeHE+nDOJv3qX9UvT5Xn8T7GBfb5yWFN9atftQ/EspRLBeQ9F5fXH1aytscTDXSmRChcdyww7vBTAOkQGGDHfJn3XDw/2p2M95nmVbpv+FNfE8Q0YubL6qzXWHl6mJQ1GDZfKpRtQuH3R5QGJ1ZiEfOlnRUMssHAUtHtl/ZNxKrESqaqs15jp/dxZL7c9H71xGYTa6J7XK+3K9NeY0Vgps2XBKELJbIAwdTzMCsCM22+JAhdzDNf2huPEZkv07API4hVmWe+tCewyHw5HJLAiOwyyYLPMF9aExgDawC0ghGbgeQsPUkOYGy+BGgPRmSbeTWJ1gT22cnTc4BWMCLbzCuZsz0DtAlQup7YXGwLjMJEYqOxKjAJSal6ItPMWxysCowxRgIjMs3EmS/xw7TvWxWYCEUDIIER2UXIh1sDWhWYcoEq8yVBZA1VKCGZPJ/2fdtJjsnSSqsYkUVUbxnGxoUT97EvMDZu2kipeiKLqOfWCZ3zad+3LjAJ2QAoVU9kj9gUn+as9tnWBUbmSyKr+LcTgc0chm5dYC5cGmlEZBK1gkkh0yuwk5O9DiLzJSU6iKwQ60rWVHW107AuMAAfJ19SmEhkhE63DwBgYN8+9Lp0CIzMl0SG6PlDtRh0ueAvH3ptugRGISKRcoSQk9VLQn4TbXFmkgqByXCcqieBEWmn2xuo1etnV7gPhodASgSmNom0ByPSTH8QoPN+vHqB4b/mrV5ASgQWQeZLIrUIIdFq++rL7z/95GBmaj5OmgRGmUQitVy0eurZbDrC+XrRn0uNwMh8SaSVVttXz2VXCPHVIqGhIjUCI/MlkUZabR89fwgAkEJ+OWvQ3ixSM/zKCZ1ayEMSGJEKhJC4vP7wMSfA8IeHKjZmkZoVTFUjCyFpH0ZYZTgKcdHqKXF1wfC7Tz85eLnKe6VGYAAm5stJnwOCMEy3N8BFqxffc71YNGM4jXQJjMyXhCX6gwBvL9/j+uZ2XMQr8YMjnONl91z3Sc0eDAAYWE1C/p5CRMIU6vA49qHeZWB/+Y/q/twqjUVIlcCEEDXG0zFalthchJDw+yN0e4P7z9r/OML50zJp+HmkSmAu3FqIcSZRCDm37zdBLEIQCgxHIYbDEH5/NO0D/H8c4fx1lu1/HVL3BL/+6arGpPzicP8RDSgnlqY/CDAchR9FFX1Y30cy9iOXeMkFf5nkinWfVK1gAMCkPAfwhX87IoERM5mIaBiiPwwQBOLh4x2JH8BQA0PNCZ3vdIoqTuoEJoR4yTn/Y6xjD7HFCCExHIXoD4I7q9IsJGM/MikbErLGGKs5oVPTEfotSupCRAB402w1ABwf7BVRKnq2b4cwxH0RzQrvIm4gUZNMnjPGGjKUjVUqLXSTuhUMGPc5kJDfdHsDEtgGEg/vlJAWCO8aDKwmhKi5cGumQrx1SeUKVq+3KyEPmwDKRwelj4OmiUxxP7wLQjGviKAJoKbCOxGKxroHvbZJpcAA4HXz3V8Z2F+8nINnh49t3w4xh4mIAoH+MFgovFNJh7SGd0mQWoHFV7Enuzsol/K2b4nA3TOleDp8JlF4JyEbEDjPUniXBKkVGAD8o3n1Jwn5DecMzw4fw3XSVTq5yajwLr5H2rbwLglSLTDg48FzIe/i6KBk+3Y2komIlgzvGFhDCFHb1PAuCVIvsHq9XQ15+COAcrmUx5PdHdu3lFkme6R71Q6ziM6UarHwrmHzTCmLpF5gAPDmp9bXkPg7ANDZ2Hzi4Z0S0dzwTqIRnSlReJcgmRAYALxptr4F8EeARBbnfni3aMkQhXdmyIzAAOBNs/USwO+B7RPZiuFdQ0LWKLyzR6YEBtwV2abuyRatCI+Ih3cNEYoahXfpIXMCA+6Gi4W8i4O9YiZT+KtWhKvwbtvOlLJIJgUGTBIf/w2gzDlD5XEhtYfR8fAuixXhxOpkVmAA8Kp+ecoc5yWT8gsA8HIOnuzuWK1d3MSKcGJ1Mi0wRVTx8TcAZWAcNpaKntYkyDZVhBOrsxECA8a1iwEP/sTA/gzgMQBwzlAs5FDcyaHguSv1+Fi3IpzCu+1mYwSmiAntawDH8e95OQdezoHr8Jlh5BLZu62pCCdWZ+MEFudV/fKUc/61ZOxM7dNWYssrwonV2WiBxanX25UAwSk4zhhYBRKnU18YCYlKhgiCIAiCIAiCIAgiW/w/zQ1m2VyA5iUAAAAASUVORK5CYII=","e":1},{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"magnify","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":42,"s":[75]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":90,"s":[8]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":121,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":134,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":164,"s":[53]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":183,"s":[53]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":219,"s":[53]},{"t":272,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[333.752,339.42,0],"to":[-26,-25,0],"ti":[-4.333,25,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":42,"s":[177.752,189.42,0],"to":[4.333,-25,0],"ti":[-25.667,-23.333,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":90,"s":[359.752,189.42,0],"to":[25.667,23.333,0],"ti":[4.667,-23.333,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":121,"s":[331.752,329.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":134,"s":[331.752,329.42,0],"to":[-28.333,4.667,0],"ti":[28.333,-4.667,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":164,"s":[161.752,357.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":183,"s":[161.752,357.42,0],"to":[0,-24.333,0],"ti":[-28.667,3,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":219,"s":[161.752,211.42,0],"to":[28.667,-3,0],"ti":[-28.667,-21.333,0]},{"t":272,"s":[333.752,339.42,0]}],"ix":2},"a":{"a":0,"k":[87.194,86.29,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"glass 2","parent":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":20,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":2,"nm":"glass","parent":1,"td":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"paper","tt":1,"refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[125,125,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"paper","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"paper_1","refId":"image_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[263.625,231.897,0],"ix":2},"a":{"a":0,"k":[92.771,120.853,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"paper_2","refId":"image_3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[214.478,258.49,0],"ix":2},"a":{"a":0,"k":[107.933,130,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0}]}]'),layers:[{ddd:0,ind:1,ty:0,nm:"not_found 2",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[250,250,0],ix:2},a:{a:0,k:[250,250,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,w:500,h:500,ip:0,op:273,st:0,bm:0}],markers:[]},v5={key:0,class:"inline-block"},Ei=ft(t.defineComponent({name:"DCodeBadge",inheritAttrs:!1,__name:"DCodeBadge",props:{text:{default:""},variant:{default:"default"},size:{default:"sm"},icon:{},dot:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},color:{},skeleton:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},class:{}},setup(e){const o=e,n=t.computed(()=>No(o.icon,Rt)),r=t.computed(()=>o.visible??!0),a=t.computed(()=>{const u={xs:"px-1.5 py-0.5 text-[10px] gap-1",sm:"px-2.5 py-0.5 text-xs gap-1.5",md:"px-3 py-1 text-sm gap-2",lg:"px-4 py-1.5 text-base gap-2.5"};return u[o.size]||u.sm}),s=t.computed(()=>{const u={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};return u[o.size]||u.sm}),i=t.computed(()=>{const u={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"};return u[o.size]||u.sm}),l=t.computed(()=>{const u={default:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",success:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",warning:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",info:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",outline:"bg-transparent border-border text-foreground",tonal:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",ghost:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",purple:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",pink:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",dark:"bg-gray-900 text-white border-transparent shadow-sm hover:bg-gray-950",light:"bg-gray-100 text-gray-900 border-gray-200 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700"};return u[o.variant]||u.default}),c=t.computed(()=>({default:"bg-primary-foreground",secondary:"bg-secondary-foreground",destructive:"bg-destructive-foreground",success:"bg-white",warning:"bg-white",info:"bg-white",outline:"bg-primary",tonal:"bg-primary",ghost:"bg-muted-foreground"})[o.variant]||"bg-current"),d=t.computed(()=>{const u={xs:"h-4 w-10",sm:"h-5 w-14",md:"h-6 w-18",lg:"h-7 w-24"};return Te(u[o.size]||u.sm,"rounded animate-pulse bg-muted")}),f=t.computed(()=>Te("inline-flex items-center font-semibold border transition-all duration-300 select-none focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",o.pill?"rounded-full":"rounded-md",a.value,l.value,o.class));return(u,h)=>r.value?(t.openBlock(),t.createElementBlock("div",v5,[e.skeleton?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(d.value)},null,2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(f.value)},[e.dot?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["rounded-full animate-pulse",s.value,c.value])},null,2)):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.value),{key:1,class:t.normalizeClass(["flex-shrink-0",i.value]),"stroke-width":"2.5"},null,8,["class"])):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.text),1)],!0)],2))])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-1e8e809d"]]);var _a={exports:{}},D5=_a.exports,su;function N5(){return su||(su=1,(function(e,o){(function(n,r){e.exports=r()})(D5,function(){Array.isArray||(Array.isArray=function(s){return Object.prototype.toString.call(s)==="[object Array]"});function n(s){for(var i=[],l=0,c=s.length;l<c;l++)i.indexOf(s[l])===-1&&i.push(s[l]);return i}var r={},a={"==":function(s,i){return s==i},"===":function(s,i){return s===i},"!=":function(s,i){return s!=i},"!==":function(s,i){return s!==i},">":function(s,i){return s>i},">=":function(s,i){return s>=i},"<":function(s,i,l){return l===void 0?s<i:s<i&&i<l},"<=":function(s,i,l){return l===void 0?s<=i:s<=i&&i<=l},"!!":function(s){return r.truthy(s)},"!":function(s){return!r.truthy(s)},"%":function(s,i){return s%i},log:function(s){return console.log(s),s},in:function(s,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(s)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(s,i,l){if(l<0){var c=String(s).substr(i);return c.substr(0,c.length+l)}return String(s).substr(i,l)},"+":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)*parseFloat(i,10)})},"-":function(s,i){return i===void 0?-s:s-i},"/":function(s,i){return s/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(s,i){return s.concat(i)},[])},var:function(s,i){var l=i===void 0?null:i,c=this;if(typeof s>"u"||s===""||s===null)return c;for(var d=String(s).split("."),f=0;f<d.length;f++)if(c==null||(c=c[d[f]],c===void 0))return l;return c},missing:function(){for(var s=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,l=0;l<i.length;l++){var c=i[l],d=r.apply({var:c},this);(d===null||d==="")&&s.push(c)}return s},missing_some:function(s,i){var l=r.apply({missing:i},this);return i.length-l.length>=s?[]:l}};return r.is_logic=function(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length===1},r.truthy=function(s){return Array.isArray(s)&&s.length===0?!1:!!s},r.get_operator=function(s){return Object.keys(s)[0]},r.get_values=function(s){return s[r.get_operator(s)]},r.apply=function(s,i){if(Array.isArray(s))return s.map(function(b){return r.apply(b,i)});if(!r.is_logic(s))return s;var l=r.get_operator(s),c=s[l],d,f,u,h,m;if(Array.isArray(c)||(c=[c]),l==="if"||l=="?:"){for(d=0;d<c.length-1;d+=2)if(r.truthy(r.apply(c[d],i)))return r.apply(c[d+1],i);return c.length===d+1?r.apply(c[d],i):null}else if(l==="and"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),!r.truthy(f))return f;return f}else if(l==="or"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),r.truthy(f))return f;return f}else{if(l==="filter")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.filter(function(b){return r.truthy(r.apply(u,b))}):[];if(l==="map")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.map(function(b){return r.apply(u,b)}):[];if(l==="reduce")return h=r.apply(c[0],i),u=c[1],m=typeof c[2]<"u"?r.apply(c[2],i):null,Array.isArray(h)?h.reduce(function(b,g){return r.apply(u,{current:g,accumulator:b})},m):m;if(l==="all"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(!r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="none"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!0;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="some"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!0;return!1}}if(c=c.map(function(b){return r.apply(b,i)}),a.hasOwnProperty(l)&&typeof a[l]=="function")return a[l].apply(i,c);if(l.indexOf(".")>0){var p=String(l).split("."),y=a;for(d=0;d<p.length;d++){if(!y.hasOwnProperty(p[d]))throw new Error("Unrecognized operation "+l+" (failed at "+p.slice(0,d+1).join(".")+")");y=y[p[d]]}return y.apply(i,c)}throw new Error("Unrecognized operation "+l)},r.uses_data=function(s){var i=[];if(r.is_logic(s)){var l=r.get_operator(s),c=s[l];Array.isArray(c)||(c=[c]),l==="var"?i.push(c[0]):c.forEach(function(d){i.push.apply(i,r.uses_data(d))})}return n(i)},r.add_operation=function(s,i){a[s]=i},r.rm_operation=function(s){delete a[s]},r.rule_like=function(s,i){if(i===s||i==="@")return!0;if(i==="number")return typeof s=="number";if(i==="string")return typeof s=="string";if(i==="array")return Array.isArray(s)&&!r.is_logic(s);if(r.is_logic(i)){if(r.is_logic(s)){var l=r.get_operator(i),c=r.get_operator(s);if(l==="@"||l===c)return r.rule_like(r.get_values(s,!1),r.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(s)){if(i.length!==s.length)return!1;for(var d=0;d<i.length;d+=1)if(!r.rule_like(s[d],i[d]))return!1;return!0}else return!1;return!1},r})})(_a)),_a.exports}var V5=N5();const kt=Ml(V5),Ea=e=>{var o,n,r;return((o=e.propsForm)==null?void 0:o.key)||((n=e.propsTable)==null?void 0:n.key)||((r=e.propsWizard)==null?void 0:r.key)||e.id},xn=(e,o)=>o?o.split(".").reduce((n,r)=>n==null?void 0:n[r],e):void 0,iu=(e,o,n)=>{if(!o)return;const r=o.split(".");let a=e;for(let s=0;s<r.length-1;s++){const i=r[s];(a[i]===void 0||a[i]===null||typeof a[i]!="object")&&(a[i]={}),a=a[i]}a[r[r.length-1]]=n},Ho=e=>{const o=t.toRaw(e);if(Array.isArray(o))return o.map(n=>Ho(n));if(o&&typeof o=="object"){const n={};return Object.keys(o).forEach(r=>n[r]=Ho(o[r])),n}return o},Ba=e=>{if(!e||typeof e!="object")return[];if("var"in e)return[e.var];let o=[];return Object.values(e).forEach(n=>{Array.isArray(n)?n.forEach(r=>{o=o.concat(Ba(r))}):typeof n=="object"&&(o=o.concat(Ba(n)))}),o},M5=e=>e?[...e].sort((o,n)=>(o.seq||0)-(n.seq||0)):[],lu=(e,o={})=>(!e||typeof e!="object"||Object.keys(e).forEach(n=>{const r=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&!r._isLogicValue?lu(r,o):o[n]=r}),o),Bi=(e,o)=>{if(!e||typeof e!="string"||e.startsWith("http")||!o)return e;const n=o.replace(/\/$/,""),r=e.startsWith("/")?e:`/${e}`;return`${n}${r}`};function Si({formData:e,errors:o,fieldMap:n,rawItemsCache:r,activeSchema:a,locale:s}){const i=(S,N)=>{if(N==null||typeof N=="object"&&N._isLogicValue)return N;const V=n.value.get(S);if(!V)return N;const L=V.field,O=r[L.key];if(!O||!Array.isArray(O))return N;const R=(L.props||{}).itemValue||"id",j=O.find(T=>String(T[R])===String(N)||String(T.id)===String(N)||String(T.code)===String(N));return j!=null&&j.code?{id:N,code:j.code,_isLogicValue:!0}:N},l=S=>{const N=(V,L)=>{if(V==null||typeof V=="object"&&V._isLogicValue)return V;if(typeof V=="boolean")return String(V);if(typeof V=="number"||typeof V=="string")return L?i(L,V):V;if(typeof V=="object"&&!Array.isArray(V)){const O=(V==null?void 0:V.id)??(V==null?void 0:V.code)??(V==null?void 0:V.value)??(V==null?void 0:V.key)??V;return L&&(typeof O=="string"||typeof O=="number")?i(L,O):O}return V};return new Proxy(S,{get(V,L){if(typeof L!="string")return V[L];const O=n.value.get(L);if(O){const P=xn(V,O.path);if(P!=null)return N(P,L)}return N(V[L],L)}})},c=t.computed(()=>{const S={};for(const N of Object.keys(e))S[N]=e[N];return S}),d=t.computed(()=>l(c.value)),f=()=>{const S=N=>N&&typeof N=="object"&&N._isLogicValue;kt.add_operation("length",N=>N==null?0:S(N)?Object.keys(N).length:typeof N=="string"?N.length:typeof N=="number"?String(N).length:Array.isArray(N)?N.length:typeof N=="object"?Object.keys(N).length:0),kt.add_operation("==",(N,V)=>N==null?V==null:V==null?N==null:S(N)&&S(V)?String(N.id)===String(V.id)||String(N.code)===String(V.code):S(N)?String(N.code)===String(V)||String(N.id)===String(V):S(V)?String(V.code)===String(N)||String(V.id)===String(N):typeof N=="boolean"&&typeof V=="string"?String(N)===V:typeof V=="boolean"&&typeof N=="string"?String(V)===N:String(N)===String(V)),kt.add_operation("!=",(N,V)=>{const L=O=>O&&typeof O=="object"&&O._isLogicValue;return N==null&&V==null?!1:N==null||V==null?!0:L(N)&&L(V)?String(N.id)!==String(V.id)&&String(N.code)!==String(V.code):L(N)?String(N.code)!==String(V)&&String(N.id)!==String(V):L(V)?String(V.code)!==String(N)&&String(V.id)!==String(N):String(N)!==String(V)})},u=(S,N,V="LOGIC")=>{if(S==null||typeof S=="object"&&Object.keys(S).length===0)return!0;if(typeof S=="boolean")return S;if(typeof S=="object")try{return f(),kt.apply(S,N)}catch(L){return console.error(`[${V}] JsonLogic error:`,L),!1}return!1},h=(S,N,V)=>S==null?null:Array.isArray(S)?S.find(L=>!L.condition||u(L.condition,N))||null:S,m=(S,N)=>{var P;if(S.isHidden)return!0;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.visibleRule;if(L==null)return!0;const O=h(L,V,`VISIBLE-${S.model}`);return O===null?!0:typeof O=="object"?!!u(O,V,`VISIBLE-${S.model}`):!!O},p=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.requiredRule;if(L==null)return((R=S.props)==null?void 0:R.required)||!1;const O=h(L,V,`REQUIRED-${S.model}`);return O===null?((j=S.props)==null?void 0:j.required)||!1:typeof O=="object"?"required"in O?!!O.required:!!u(O,V):!!O},y=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.disabledRule;if(L==null)return((R=S.props)==null?void 0:R.disabled)||!1;const O=h(L,V,`DISABLED-${S.model}`);return O===null?((j=S.props)==null?void 0:j.disabled)||!1:typeof O=="object"?"disabled"in O?!!O.disabled:!!u(O,V):!!O},b=(S,N)=>{var P,R,j;const V=N?l(N):d.value,L=(P=S.logic)==null?void 0:P.disabledRule;return L===!1?!0:L==null?((R=S.props)==null?void 0:R.readonly)||!1:h(L,V,`READONLY-${S.model}`)===!1?!0:((j=S.props)==null?void 0:j.readonly)||!1},g=S=>{var P;const N=S.propsForm||S.propsTable||S.propsWizard||S.props||{};let V=s.value==="id"?N.titleID||S.titleID||S.labelID:N.titleEN||S.titleEN||S.labelEN,L=s.value==="id"?N.descriptionID||S.descriptionID:N.descriptionEN||S.descriptionEN;const O=h((P=S.logic||N.logic)==null?void 0:P.labelingRule,d.value);return O&&(V=s.value==="id"?O.labelID||O.titleID||O.title:O.labelEN||O.titleEN||O.title,L=s.value==="id"?O.descriptionID:O.descriptionEN),{title:V,description:L}},_=(S,N)=>{var R,j;if(!S)return!0;const V=S.propsForm||S.propsTable||S.propsDataTableWizard||S.propsWizard||S.props||{},L=(R=S.logic||V.logic)==null?void 0:R.visibleRule,O=N?l(N):d.value;if(L!=null){const T=h(L,O);return T===null?!0:typeof T=="object"?!!u(T,O,"VISIBLE-SEC"):!!T}if(S.type==="TABLE"&&((j=V.headers)!=null&&j.length))return!0;const P=V.fields||S.fields||[];return P.length===0||P.some(T=>m(T,N))},E=(S,N)=>{var O;const V=N?l(N):d.value;return h((O=S.logic)==null?void 0:O.labelingRule,V,`LABEL-${S.model}`)||null},B=(S,N)=>{var O;const V=N?l(N):d.value;return h((O=S.logic)==null?void 0:O.lengthRule,V,`LENGTH-${S.model}`)||null},A=(S,N)=>{var T;const V=S.props||{},L=r[S.key]||V.items||V.options||[];if(!((T=S.logic)!=null&&T.optionsFilterRule))return L;const O=N?l(N):d.value,P=h(S.logic.optionsFilterRule,O,`FILTER-${S.model}`);if(!(P!=null&&P.values))return L;const R=new Set((P.values||[]).map(String)),j=V.itemValue||"id";return L.filter(F=>F==null?!1:typeof F!="object"?R.has(String(F)):[j,"code","id","value","key"].some(X=>{const H=F[X];return H!=null&&R.has(String(H))}))},C=S=>{var V;return(((V=S.propsWizard)==null?void 0:V.propsSteps)||[]).filter(L=>_(L)).map((L,O)=>{var j;let P=[];if(Array.isArray(L.sectionsWizard))P=L.sectionsWizard;else if(L.sectionsWizard&&typeof L.sectionsWizard=="object"){const T=L.sectionsWizard;let F=T.type;F||(T.propsDataTableWizard||T.isDataTable||T.propsTable?F="TABLE":T.fields?F="FORM":F="UNKNOWN"),P=[{type:F,...T}]}const R=g(L);return{key:L.key||`step-${O}`,title:R.title,description:R.description,icon:L.icon||void 0,sections:P,actions:((j=L.propsComponent)==null?void 0:j.actionComponent)||L.actionComponent||[]}})},x=()=>{var S;if((S=a.value)!=null&&S.sections)for(let N=0;N<3;N++){let V=!1;if(a.value.sections.forEach(L=>{var O;(((O=L.propsForm)==null?void 0:O.fields)||L.fields||[]).forEach(P=>{var j;const R=(j=P.logic)==null?void 0:j.calculateRule;if(R&&typeof R=="object"){const T=Object.keys(R)[0],F=u(R[T],d.value,`CALC-${T}`);F!==void 0&&e[T]!==F&&(e[T]=F,V=!0)}})}),!V)break}},w=S=>{if(!m(S)||!p(S))return!1;const N=e[S.model];return Array.isArray(N)?N.length===0:N==null||N===""},D=S=>S.sections.flatMap(V=>V.fields||[]).some(w),k=S=>{var V;return(((V=S.propsForm)==null?void 0:V.fields)||S.fields||[]).some(w)?!0:S.type==="WIZARD"?C(S).some(D):!1},v=t.computed(()=>{var S;return(S=a.value)!=null&&S.sections?Object.keys(o).length>0?!0:a.value.sections.some(k):!1});return{normalizedData:d,getNormalizedData:l,evaluateLogic:u,resolveActiveRule:h,resolveValueIdentifier:i,getFilteredItems:A,isFieldVisible:m,isFieldRequired:p,isFieldDisabled:y,isFieldReadonly:b,resolveSectionLabels:g,isSectionVisible:_,resolveFieldLabels:E,resolveFieldLength:B,getWizardTabs:C,applyCalculations:x,isSubmitDisabled:v,resolveSectionGridClass:S=>{switch(S){case"FULL":return"grid-cols-1";case"HALF":return"grid-cols-1 md:grid-cols-2";case"THIRD":return"grid-cols-1 md:grid-cols-3";case"QUARTED":return"grid-cols-1 md:grid-cols-4";case"TWO-THIRD":return"grid-cols-2 md:grid-cols-3";case"THREE-QUARTER":return"grid-cols-3 md:grid-cols-4";default:return"grid-cols-1"}},resolveFieldColumnClass:(S,N="")=>{var L;const V=(L=S.props)==null?void 0:L.colSpan;return V==="FULL"?"col-span-1 md:col-span-full":V==="HALF"?"col-span-1 md:col-span-1":"col-span-1"}}}const T5={class:"dcode-card animate-slide-up"},P5={class:"px-4 py-2 bg-primary-700 dark:bg-primary-900 border-b border-primary-500/30 dark:border-primary-900/50 rounded-t-xl relative z-30"},O5={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between items-start gap-4"},L5={key:0,class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 flex-1 xl:max-w-[15vw] md:max-w-[20vw] max-w-[30vw]"},R5={class:"relative w-full sm:w-64"},I5={key:0,class:"relative"},F5={class:"flex flex-col h-full"},z5={key:0,class:"flex-1 overflow-y-auto py-4"},$5={class:"grid grid-cols-1 gap-4 px-1"},j5={key:0,class:"sticky bottom-0 left-0 right-0 bg-transparent border-t border-neutral-200 dark:border-neutral-700 pt-4 flex gap-2"},U5={class:"flex justify-end gap-2 w-full"},W5={key:0,class:"font-medium text-sm text-neutral-600 dark:text-neutral-400"},H5={class:"overflow-auto custom-scrollbar relative max-h-[calc(100vh-17rem)]"},q5={class:"dcode-table w-full"},G5={class:"bg-primary-700 dark:bg-primary-900 sticky top-0 z-20 shadow-sm"},K5=["onClick"],X5={key:0,class:"flex items-center justify-center w-full"},Y5={key:0,class:"px-3 py-2 text-xs font-medium text-white dark:text-neutral-100 uppercase tracking-wider"},J5={class:"bg-white dark:bg-zinc-900 divide-y divide-neutral-200 dark:divide-neutral-700"},Q5={key:0,class:"px-3 py-0.5"},Z5={key:1},eD=["colspan"],tD={class:"flex flex-col items-center gap-2"},oD={class:"text-base font-medium text-neutral-700 dark:text-neutral-300"},nD={class:"text-sm text-neutral-500 dark:text-neutral-400 mt-1"},rD={class:"hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-colors duration-150"},aD={key:0,class:"flex items-center justify-center"},sD=["href","target"],iD={key:0,class:"text-[10px]"},lD={key:0,class:"px-3 py-0.5 !text-center"},cD={key:0,class:"flex items-center justify-center gap-1.5"},dD={key:0,class:"bg-zinc-50/50 dark:bg-zinc-800/30"},fD=["colspan"],uD={key:0,class:"px-4 py-3 bg-zinc-50/50 dark:bg-zinc-800/30 border-t border-neutral-200 dark:border-neutral-700 flex flex-col sm:flex-row items-center justify-between gap-4 w-full"},hD={class:"flex items-center gap-4"},mD={class:"text-xs text-neutral-500 dark:text-neutral-400 font-medium"},pD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},gD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},bD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},yD={class:"flex-shrink-0"},xD={class:"space-y-4"},kD={class:"text-gray-600 dark:text-gray-400"},wD={class:"grid grid-cols-1 gap-4 py-4 px-1 relative"},CD={key:0,class:"absolute inset-0 z-10 bg-white/50 dark:bg-neutral-900/50 flex items-center justify-center backdrop-blur-[1px]"},_D={class:"flex flex-col items-center gap-2"},ED={class:"text-xs font-medium text-neutral-500"},BD={key:1,class:"mb-2 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-100 dark:border-amber-900/30 rounded-lg flex items-center gap-3"},SD={class:"p-1.5 bg-amber-100 dark:bg-amber-900/40 rounded-md text-amber-600 dark:text-amber-400"},AD={class:"flex flex-col gap-0.5"},vD={class:"text-[10px] font-bold uppercase tracking-wider text-amber-500/70 dark:text-amber-400/50"},DD={class:"text-xs text-amber-700 dark:text-amber-300 leading-relaxed font-medium transition-all"},ND={class:"flex items-end gap-2"},kn=t.defineComponent({name:"DataTable",__name:"DataTable",props:{columns:{default:()=>[]},data:{default:()=>[]},perPage:{default:10},loading:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!1},nested:{type:Boolean,default:!1},apiModule:{},apiAction:{default:"list"},apiMethod:{},apiUrl:{},permissionBase:{},apiParams:{default:()=>({})},configKey:{},tableConfig:{},dynamicColumns:{type:Boolean,default:!1},searchApiEndpoint:{},enableQuickSearch:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},ignorePermissions:{type:Boolean,default:!1},userPermissions:{default:null},permissionChecker:{type:Function,default:void 0},permissions:{default:void 0},checkPermission:{type:Function,default:void 0},menuPermissions:{default:()=>[]},dummyMode:{type:Boolean,default:!1},baseUrl:{default:void 0}},emits:["update:search","update:sort","update:page","create","export","action","update:selection","navigate"],setup(e,{expose:o,emit:n}){var Su,Au,vu,Du,Nu,Vu;kt.add_operation("length",M=>M==null?0:typeof M=="string"||Array.isArray(M)?M.length:typeof M=="number"?String(M).length:typeof M=="object"?Object.keys(M).length:0),kt.add_operation("==",(M,I)=>M!==null&&typeof M=="object"&&"_isLogicValue"in M?M.id==I||M.code==I:I!==null&&typeof I=="object"&&"_isLogicValue"in I?I.id==M||I.code==M:M==I),kt.add_operation("!=",(M,I)=>M!==null&&typeof M=="object"&&"_isLogicValue"in M?!(M.id==I||M.code==I):I!==null&&typeof I=="object"&&"_isLogicValue"in I?!(I.id==M||I.code==M):M!=I);const r=e,a=n,s=t.getCurrentInstance(),{apiUrl:i}=Je(),{locale:l}=Et.useI18n();let c={query:{},params:{},path:""};try{const M=Eo.useRoute();M?c=M:(vu=(Au=(Su=s==null?void 0:s.appContext)==null?void 0:Su.config)==null?void 0:Au.globalProperties)!=null&&vu.$route&&(c=s.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let d={back:()=>console.warn("Router back() not available"),push:M=>{console.warn("Router push() logic called from fallback:",M),typeof M=="string"&&M.startsWith("/")&&(window.location.href=M)}};try{const M=Eo.useRouter();M?d=M:(Vu=(Nu=(Du=s==null?void 0:s.appContext)==null?void 0:Du.config)==null?void 0:Nu.globalProperties)!=null&&Vu.$router&&(d=s.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const f=t.ref(""),u=t.ref(1),h=t.ref(r.perPage),m=t.ref({key:"",direction:"asc"}),p=t.ref([]),y=t.ref(!1),b=t.ref(0),g=t.ref({}),_=t.ref([]),E=t.ref(null),B=t.ref(!0),A=t.ref([]),C=t.ref([]),x=t.ref([]),w=t.ref(!1),D=t.ref(!1),k=t.reactive({}),v=t.reactive({}),S=t.reactive({}),N=t.ref(null),V=t.ref(null),L=t.ref(null),O=t.computed(()=>V.value?V.value.fieldActionCustom||V.value.fieldActionGlobal||V.value.field||[]:[]),P=t.computed(()=>{const M=new Map;return O.value.forEach(I=>{I.model&&M.set(I.model,{field:I,path:I.model})}),M}),R=t.computed(()=>({sections:[{fields:O.value}]})),j=t.computed(()=>l.value),{isFieldVisible:T,isFieldRequired:F,isFieldDisabled:X,isFieldReadonly:H,resolveFieldLabels:W,resolveFieldLength:Z,getFilteredItems:oe,applyCalculations:ye,getNormalizedData:Ne}=Si({formData:k,errors:v,fieldMap:P,rawItemsCache:S,activeSchema:R,locale:j}),we=async(M,I=!1)=>{const K=M.props||{},z=K.endpointReference||K.endpoint;if(z!=null&&z.apiUrl&&!(!I&&S[M.key]))try{const{apiUrl:U}=Je();let J=z.apiUrl;if(r.baseUrl&&typeof J=="string"&&!J.startsWith("http")){const Ve=r.baseUrl.replace(/\/$/,""),Be=J.startsWith("/")?J:`/${J}`;J=`${Ve}${Be}`}const ce={page:1,perPage:100};if(Array.isArray(z.keyParam)){let Ve=!1;if(z.keyParam.forEach(Be=>{const Se=Ne(k)[Be];Se==null||Se===""?Ve=!0:ce[Be]=Se&&typeof Se=="object"&&Se._isLogicValue?Se.id:Se}),Ve){S[M.key]=[];return}}const me=await U(J,z.apiMethod||"GET",ce),ge=(me==null?void 0:me.data)||me;let ke=[];Array.isArray(ge)?ke=ge:ge&&(ke=[ge]),S[M.key]=ke}catch(U){console.error(`[prefetchDialogFieldItems] Error fetching items for ${M.key}:`,U),S[M.key]=[]}};t.watch(k,M=>{D.value&&(ye(),O.value.forEach(I=>{const K=I.props||{},z=K.endpoint||K.endpointReference;Array.isArray(z==null?void 0:z.keyParam)&&we(I,!0)}))},{deep:!0});const Q=t.computed(()=>{const M=new Map;return Ce.value.forEach(I=>{I.model&&M.set(I.model,{field:I,path:I.model})}),M}),$=t.computed(()=>({sections:[{fields:Ce.value}]})),{isFieldVisible:Y,isFieldRequired:ae,isFieldDisabled:xe,isFieldReadonly:Oe,resolveFieldLabels:Ee,resolveFieldLength:We,getFilteredItems:Fe}=Si({formData:g,errors:{},fieldMap:Q,rawItemsCache:{},activeSchema:$,locale:j}),se=t.ref([]),Le=t.computed(()=>{if(co.value.length===0)return!1;const M=co.value.map(I=>{const K=rt.value.find(U=>U.type==="CHECKBOX"),z=(K==null?void 0:K.keyCheckbox)||"id";return I[z]}).filter(I=>I!=null);return M.length===0?!1:M.every(I=>se.value.includes(I))}),Re=t.computed(()=>{if(co.value.length===0)return!1;const M=rt.value.find(U=>U.type==="CHECKBOX"),I=(M==null?void 0:M.keyCheckbox)||"id",K=co.value.map(U=>U[I]).filter(U=>U!=null),z=K.filter(U=>se.value.includes(U)).length;return z>0&&z<K.length}),ve=M=>{const I=rt.value.find(U=>U.type==="CHECKBOX"),K=(I==null?void 0:I.keyCheckbox)||"id",z=M[K];return z!==void 0&&se.value.includes(z)},ct=M=>{const I=rt.value.find(U=>U.type==="CHECKBOX"),K=(I==null?void 0:I.keyCheckbox)||"id",z=co.value.map(U=>U[K]).filter(U=>U!=null);if(M){const U=new Set([...se.value,...z]);se.value=Array.from(U)}else se.value=se.value.filter(U=>!z.includes(U))},q=(M,I)=>{const K=rt.value.find(J=>J.type==="CHECKBOX"),z=(K==null?void 0:K.keyCheckbox)||"id",U=M[z];U!=null&&(I?se.value.includes(U)||se.value.push(U):se.value=se.value.filter(J=>J!==U))};t.watch(se,M=>{var K;a("update:selection",M);const I=Le.value||M.length>1;(K=C.value)!=null&&K.length&&C.value.forEach(z=>{var U;(U=z.fieldActionGlobal)!=null&&U.length&&z.fieldActionGlobal.forEach(J=>{var ke,Ve;const ce=z.endpoint||((ke=z.propsActionGlobal)==null?void 0:ke.endpointPropAction)||z.propsActionGlobal,me=(Ve=ce==null?void 0:ce.keyParam)==null?void 0:Ve[0];(me&&J.model===me||!me&&/^(id|ids|idAuditTrail)/i.test(J.model))&&I&&J.model&&(k[J.model]=M)})})},{deep:!0});const ie=M=>Array.from({length:M}).map((I,K)=>{const z={id:K+1,no:K+1};return rt.value.forEach(U=>{U.key!=="no"&&U.key!=="action"&&U.type!=="ACTION"&&U.type!=="action"&&(U.type==="CHECKBOX"?z[U.keyCheckbox||"id"]=K+1:U.type==="BADGE"||U.type==="badge"||U.condition?z[U.key]=U.condition&&U.condition.length>0?U.condition[0].value:"Active":z[U.key]=`Data ${U.label} ${K+1}`)}),z}),he=M=>M&&typeof M=="string"&&M.trim()?M:void 0,te=t.computed(()=>{var M,I,K,z;return he((I=(M=E.value)==null?void 0:M.endpoint)==null?void 0:I.apiModule)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiModule)||r.apiModule}),le=t.computed(()=>{var M,I,K,z;return he((I=(M=E.value)==null?void 0:M.endpoint)==null?void 0:I.apiAction)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiAction)||r.apiAction}),G=t.computed(()=>{var M,I,K,z;return he((I=(M=E.value)==null?void 0:M.endpoint)==null?void 0:I.apiMethod)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiMethod)||r.apiMethod||"POST"}),ee=t.computed(()=>{var M,I,K,z;return he((I=(M=E.value)==null?void 0:M.endpoint)==null?void 0:I.apiUrl)||he((z=(K=E.value)==null?void 0:K.endpointGlobal)==null?void 0:z.apiUrl)||r.apiUrl}),re=t.computed(()=>r.permissionBase||""),Ce=t.computed(()=>!x.value||x.value.length===0?[]:[...x.value].sort((M,I)=>(M.seq||0)-(I.seq||0))),Ge=M=>{var J,ce,me;const I=(M==null?void 0:M.column)||((J=M==null?void 0:M.props)==null?void 0:J.column)||((ce=M==null?void 0:M.propsFieldGlobal)==null?void 0:ce.column)||((me=M==null?void 0:M.propsFieldCustom)==null?void 0:me.column);if(!I)return"col-span-1";const K=I.toLowerCase(),U={full:"col-span-1 md:col-span-2",half:"col-span-1",third:"col-span-1","two-thirds":"col-span-1 md:col-span-2",two_thirds:"col-span-1 md:col-span-2"}[K]||"col-span-1";return console.log(`[DEBUG] getColumnClass for ${M==null?void 0:M.model}: type=${I}, returned=${U}`),U},wt=()=>{let M=null;if(r.tableConfig&&(M=r.tableConfig),M){E.value=M,A.value=[],C.value=[],M.headers&&(_.value=M.headers.map(z=>{var ce,me,ge,ke,Ve,Be,Se,Ct,qt,Da,Mu;if(z.key==="action"||((ce=z.custom)==null?void 0:ce.type)==="ACTION"||((me=z.custom)==null?void 0:me.type)==="action"){const _t=((ge=z.custom)==null?void 0:ge.actionCustom)||((ke=z.custom)==null?void 0:ke.action);if(_t){const TN=_t.map(Nt=>{const Ye=Nt.propsActionCustom||Nt.props||{},Na=Nt.propCustomMessage||{};return{permission:Nt.permission,label:l.value==="id"?Ye.labelID:Ye.labelEN,tooltip:l.value==="id"?Ye.tooltipID||Ye.labelID:Ye.tooltipEN||Ye.labelEN,icon:Ye.icon,variant:Ye.variant||"ghost",bgColor:Ye.bgColor,action:Ye.actionType||Ye.key,route:Ye.route,path:Ye.path,endpoint:Ye.endpointPropAction,requiredCondition:Nt.requiredCondition||!1,propCustomCondition:Nt.propCustomCondition||[],fieldMapping:Nt.fieldMapping||Ye.fieldMapping||null,openDialog:Nt.openDialog||!1,fieldActionCustom:(Nt.fieldActionCustom||[]).map(Va=>{const Fi=Va.propsFieldCustom||Va.propsFieldGlobal||Va.props||{};return{...Va,props:{...Fi,endpoint:Fi.endpointComponent||Fi.endpoint}}}),condition:Nt.visibleRule||Nt.propCustomCondition||Ye.visibleRule||Ye.propCustomCondition||null,requireConfirm:Nt.requireConfirm||Ye.requireConfirm||!1,confirmTitle:l.value==="id"?Na.titleID||Ye.confirmTitleID||"Konfirmasi":Na.titleEN||Ye.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?Na.messageID||Ye.confirmMessageID||"Apakah Anda yakin?":Na.messageEN||Ye.confirmMessageEN||"Are you sure?"}});A.value.push(...TN)}return null}let U;const J=((Ve=z.custom)==null?void 0:Ve.conditionBadge)||((Be=z.custom)==null?void 0:Be.condition);return(((Se=z.custom)==null?void 0:Se.type)==="BADGE"||((Ct=z.custom)==null?void 0:Ct.type)==="badge")&&J&&(U=J.map(_t=>({value:_t.value,label:l.value==="id"?_t.labelID:_t.labelEN,labelID:_t.labelID,labelEN:_t.labelEN,color:_t.color||_t.bgColor,variant:_t.variant,logic:_t.logic||_t.conditionRule||null}))),{key:z.key,label:l.value==="id"?z.labelID:z.labelEN,width:z.width,align:z.align,sortable:!0,type:(qt=z.custom)==null?void 0:qt.type,condition:U,keyCheckbox:(Da=z.custom)==null?void 0:Da.keyCheckbox,propsCustom:(Mu=z.custom)==null?void 0:Mu.propsCustom}}).filter(z=>z!==null));const I=M.filters||M.filter;I&&Array.isArray(I)&&(x.value=I.map(z=>({...z,props:z.propsFilters||z.props||{}})),x.value.forEach(z=>{g.value[z.model]=""}));const K=M.actionTableGlobal||M.actionGlobal||M.action;console.log("[DEBUG] loadConfig rawActions:",K),K&&Array.isArray(K)?(C.value=K.map(z=>{const U=z.propsActionGlobal||z.props||{},J=z.propCustomMessage||{};return{key:U.key,permission:z.permission,label:l.value==="id"?U.labelID||"Action":U.labelEN||"Action",tooltip:l.value==="id"?U.tooltipID||U.labelID:U.tooltipEN||U.labelEN,icon:U.icon,variant:U.variant||"default",bgColor:U.bgColor,textColor:U.textColor,route:U.route,path:U.path,endpoint:U.endpointPropAction||z.endpoint,fieldMapping:z.fieldMapping||U.fieldMapping||null,visibleRule:z.visibleRule||U.visibleRule||z.propCustomCondition||U.propCustomCondition||null,openDialog:z.openDialog||!1,requireConfirm:z.requireConfirm||U.requireConfirm||!1,confirmTitle:l.value==="id"?J.titleID||U.confirmTitleID||"Konfirmasi":J.titleEN||U.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?J.messageID||U.confirmMessageID||"Apakah Anda yakin?":J.messageEN||U.confirmMessageEN||"Are you sure?",fieldActionGlobal:(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).map(ce=>{const me=ce.propsFieldGlobal||ce.props||{};return{...ce,props:{...me,endpoint:me.endpointComponent||me.endpoint}}})}}),console.log("[DEBUG] loadConfig headerActions set:",C.value)):console.log("[DEBUG] loadConfig no rawActions found"),M.pagination!==void 0&&(B.value=M.pagination)}};t.watch(()=>r.tableConfig,()=>{wt()},{deep:!0,immediate:!0});const rt=t.computed(()=>r.dynamicColumns||r.configKey||r.tableConfig?_.value:r.columns||[]),or=t.computed(()=>r.hasActions||A.value.length>0),qo=t.computed(()=>r.dummyMode?!1:te.value||ee.value?y.value:r.loading),nt=t.computed(()=>!!te.value||!!ee.value),mu=t.computed(()=>[]),Ni=M=>{if(console.log("[DEBUG] hasAction called:",{actionCode:M,permissionChecker:!!r.permissionChecker,effectivePath:re.value}),r.menuPermissions&&r.menuPermissions.length>0){const I=c.path,K=r.menuPermissions.find(z=>I.startsWith(z.path));if(K&&K.actions){const z=K.actions.find(U=>U.code===M.toUpperCase());return z?z.checked:!1}return!1}if(r.permissionChecker){const I=r.permissionChecker(re.value,M);return console.log("[DEBUG] permissionChecker result:",I),I}return mu.value.some(I=>I.code===M)},pu=(M,I)=>{if(M.condition)try{return kt.apply(M.condition,I)}catch(ce){return console.warn("Row action jsonLogic error:",ce),!1}if(!M.visibilityCondition)return!0;const{field:K,operator:z,value:U}=M.visibilityCondition,J=dt(I,K);switch(z){case"equals":return J===U;case"notEquals":return J!==U;case"in":return Array.isArray(U)&&U.includes(J);case"notIn":return Array.isArray(U)&&!U.includes(J);case"greaterThan":return J>U;case"lessThan":return J<U;case"contains":return String(J).includes(String(U));default:return!0}},Vi=t.computed(()=>{if(console.log("[DEBUG] visibleHeaderActions:",{headerActions:C.value,ignorePermissions:r.ignorePermissions}),C.value.length===0)return C.value;const M=C.value.filter(I=>{if(I.visibleRule)try{const z=co.value[0]||{};if(!kt.apply(I.visibleRule,z))return!1}catch(z){console.warn("Header action visibility logic error:",z)}if(r.ignorePermissions||r.dummyMode)return!0;if(!I.permission)return console.log("[DEBUG] Action no permission, showing:",I.label),!0;if(r.checkPermission){const z=r.checkPermission(I.permission);return console.log("[DEBUG] Parent checkPermission result:",z),z}if(r.permissions){const z=r.permissions.includes(I.permission);return console.log("[DEBUG] Parent permissions check result:",z),z}const K=Ni(I.permission);return console.log("[DEBUG] Internal permission check:",{label:I.label,permission:I.permission,hasPerm:K}),K});return console.log("[DEBUG] Filtered header actions:",M.length),M}),gu=t.computed(()=>A.value.length===0?A.value:A.value.filter(M=>r.ignorePermissions||r.dummyMode||!M.permission?!0:r.checkPermission?r.checkPermission(M.permission):r.permissions?r.permissions.includes(M.permission):Ni(M.permission))),Aa=M=>gu.value.filter(I=>pu(I,M)),Mi=(M,I)=>{var U,J;if(M.requiredCondition&&((U=M.propCustomCondition)==null?void 0:U.length)>0){const ce=dt(I,"status"),me=M.propCustomCondition.find(ge=>ge.value===ce);if(me)return me.bgColor||M.bgColor||"primary"}if(!M.dynamicColor||!M.colorCondition)return M.bgColor||"primary";const K=dt(I,M.colorCondition.field),z=(J=M.colorCondition.conditions)==null?void 0:J.find(ce=>ce.value===K);return(z==null?void 0:z.bgColor)||M.bgColor||"primary"},bu=M=>{const I=(M||"left").toLowerCase();return I==="center"?"justify-center":I==="right"?"justify-end":"justify-start"},yu={ToggleLeft:ne.ToggleLeft,SquarePen:ne.SquarePen,Trash2:ne.Trash2,Eye:ne.Eye,CheckCircle:ne.CheckCircle,Plus:ne.Plus,Download:ne.Download,RefreshCw:ne.RefreshCw,Search:ne.Search,SlidersHorizontal:ne.SlidersHorizontal},Ti=M=>M&&(No(M,Rt)||yu[M])||null,co=t.computed(()=>r.dummyMode?rt.value.length>0?ie(5):[]:nt.value?p.value.map((M,I)=>({...M,no:(u.value-1)*h.value+I+1})):gN.value),nr=t.computed(()=>r.dummyMode?5:nt.value?b.value:Pi.value.length),hN=t.computed(()=>nr.value===0?0:(u.value-1)*h.value+1),mN=t.computed(()=>{const M=u.value*h.value;return M>nr.value?nr.value:M}),dt=(M,I)=>{if(!(!M||!I))return I in M?M[I]:I.split(".").reduce((K,z)=>K&&K[z],M)},Pi=t.computed(()=>{if(nt.value)return[];if(!f.value)return r.data;const M=f.value.toLowerCase();return r.data.filter(I=>rt.value.some(K=>{const z=dt(I,K.key);return z==null?!1:String(z).toLowerCase().includes(M)}))}),pN=t.computed(()=>nt.value?[]:m.value.key?[...Pi.value].sort((I,K)=>{const z=dt(I,m.value.key),U=dt(K,m.value.key);if(z===U)return 0;let J=0;return typeof z=="number"&&typeof U=="number"?J=z-U:J=String(z).localeCompare(String(U)),m.value.direction==="asc"?J:-J}):Pi.value),gN=t.computed(()=>{if(nt.value)return[];const M=(u.value-1)*h.value,I=M+h.value;return pN.value.slice(M,I).map((K,z)=>({...K,no:M+z+1}))}),bN=(M,I)=>{var U,J,ce,me;const K=dt(M,I.key);if(K==null||K==="")return"-";if((I.type==="TEXT"||I.type==="text")&&((J=(U=I.propsCustom)==null?void 0:U[0])!=null&&J.value)){const ge=I.propsCustom[0].value;if(K&&typeof K=="object")return dt(K,ge)||"-"}if(["DATE","date","DATETIME","datetime"].includes(I.type||"")){const ge=(I.type||"").toUpperCase()==="DATETIME";return gp(K,ge?"datetime":"long")}if(I.type==="CURRENCY"||I.type==="currency"){const ge=((me=(ce=I.propsCustom)==null?void 0:ce[0])==null?void 0:me.value)||"IDR";return pp(K,ge)}return I.format?I.format(K):K},xu=t.computed(()=>nt.value?Object.values(g.value).some(M=>!!M):!!f.value),yN=[10,25,50,100],ku=()=>{nt.value&&(g.value={...g.value,keyword:f.value},u.value=1,ht())};let Oi;const xN=()=>{r.enableQuickSearch&&(clearTimeout(Oi),Oi=setTimeout(()=>{ku()},500))};let Li;const kN=()=>{clearTimeout(Li),Li=setTimeout(()=>{nt.value&&ht()},1e3)};t.watch(f,()=>{r.enableQuickSearch&&nt.value&&xN()});const ht=async()=>{if(!r.dummyMode&&nt.value&&!(!te.value&&!ee.value))try{y.value=!0;const M={page:u.value,perPage:h.value,...g.value,...r.apiParams};f.value&&(M.keyword=f.value),Object.keys(M).forEach(K=>{(M[K]===""||M[K]===null||M[K]===void 0)&&delete M[K]});let I;if(te.value)I=await i(te.value,le.value,M);else if(ee.value){let K=ee.value;if(r.baseUrl&&typeof K=="string"&&!K.startsWith("http")){const z=r.baseUrl.replace(/\/$/,""),U=K.startsWith("/")?K:`/${K}`;K=`${z}${U}`}I=await i(K,G.value,M)}wN(I)}catch(M){console.error("DataTable fetch error",M),y.value=!1}},wN=M=>{console.log("DataTable handleResponseData:",M),M&&(r.dynamicColumns&&M.columns&&Array.isArray(M.columns)&&(_.value=M.columns.map(I=>({key:I.key||I.field||I.name,label:I.label||I.header||I.name,width:I.width,align:I.align||"LEFT",sortable:I.sortable!==!1,type:I.type,condition:I.condition,format:I.format}))),M.data&&Array.isArray(M.data)?(p.value=M.data,M.totalData?b.value=M.totalData:M.maxPage?b.value=M.maxPage*h.value:b.value=M.data.length*(M.maxPage||1)):Array.isArray(M)?(p.value=M,b.value=M.length):M.users?(p.value=M.users,b.value=M.users.length):M.items&&Array.isArray(M.items)?(p.value=M.items,b.value=M.total||M.totalItems||M.items.length):M.list&&Array.isArray(M.list)?(p.value=M.list,b.value=M.total||M.list.length):M.rows&&Array.isArray(M.rows)?(p.value=M.rows,b.value=M.count||M.total||M.rows.length):M.result&&Array.isArray(M.result)?(p.value=M.result,b.value=M.total||M.count||M.result.length):(console.warn("DataTable: Unknown response format",M),p.value=[],b.value=0)),y.value=!1};t.onUnmounted(()=>{clearTimeout(Oi),clearTimeout(Li)});const Ri=()=>{Object.keys(g.value).forEach(M=>{g.value[M]=""}),f.value="",u.value=1,ht()},CN=()=>{u.value=1,ht()},Ii=(M,I)=>{const K=dt(M,I.key);let z={variant:"secondary",class:"",label:K};if(I.condition){const U=I.condition.find(J=>{if(J.logic||typeof J.value=="object"&&J.value!==null)try{const me=J.logic||J.value;return kt.apply(me,M)}catch(me){return console.warn("Badge logic error:",me),!1}const ce=(me,ge)=>me==null||ge===void 0||ge===null?!1:typeof me=="string"&&typeof ge=="string"?me.toLowerCase().trim()===ge.toLowerCase().trim():me==ge;if(ce(J.value,K)||typeof K=="object"&&K!==null&&(ce(J.value,K.code)||ce(J.value,K.id)))return!0;if(I.key.includes(".")){const ge=I.key.split(".").slice(0,-1).join("."),ke=dt(M,ge);if(ke&&typeof ke=="object"&&(ce(J.value,ke.code)||ce(J.value,ke.id)))return!0}return!1});if(U){U.variant&&(z.variant=U.variant);const ce=(l.value||"en")==="id"?U.labelID:U.labelEN;if(z.label=ce||U.label||(typeof K=="object"?K.name||K.code:K),U.color||U.bgColor){const me=(U.color||U.bgColor||"").toLowerCase(),ge=z.variant==="outline",ke={success:"bg-green-500 hover:bg-green-600 border-transparent text-white shadow",warning:"bg-yellow-500 hover:bg-yellow-600 border-transparent text-white shadow",info:"bg-blue-500 hover:bg-blue-600 border-transparent text-white shadow",primary:"bg-primary-600 hover:bg-primary-700 border-transparent text-white shadow",secondary:"bg-neutral-500 hover:bg-neutral-600 border-transparent text-white shadow",danger:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow",destructive:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow"},Ve={success:"text-green-600 border-green-600 hover:bg-green-50",warning:"text-yellow-600 border-yellow-600 hover:bg-yellow-50",info:"text-blue-600 border-blue-600 hover:bg-blue-50",danger:"text-red-600 border-red-600 hover:bg-red-50",destructive:"text-red-600 border-red-600 hover:bg-red-50",primary:"text-primary-600 border-primary-600 hover:bg-primary-50",secondary:"text-neutral-600 border-neutral-600 hover:bg-zinc-50"},Be={danger:"destructive",destructive:"destructive",secondary:"secondary",primary:"default",success:"success",warning:"warning",info:"info"};ge?Ve[me]&&(z.class=Ve[me]):Be[me]?z.variant=Be[me]:ke[me]&&(z.class=ke[me])}}else z.label=typeof K=="object"?(K==null?void 0:K.name)||(K==null?void 0:K.code)||"-":K}else z.label=typeof K=="object"?(K==null?void 0:K.name)||(K==null?void 0:K.code)||"-":K;return z},_N=M=>{m.value.key===M?m.value.direction=m.value.direction==="asc"?"desc":"asc":(m.value.key=M,m.value.direction="asc"),a("update:sort",m.value)},wu=M=>{M!==u.value&&(u.value=M,nt.value&&ht(),a("update:page",M))},EN=M=>{h.value=M,u.value=1,nt.value&&ht()},BN=M=>{const I=Math.random()*15+75;if(M.width){const K=parseInt(String(M.width));return K<100?`${Math.floor(K*(Math.random()*.2+.7))}px`:`${I}%`}return`${I}%`},Cu=()=>{f.value="",g.value={},u.value=1,ht()},_u=M=>{var I;if(console.log("[DEBUG] handleHeaderAction called:",M),M.requireConfirm){N.value={button:M,row:null},w.value=!0;return}if(M.route&&!r.dummyMode){if(M.path){const K=M.route.startsWith("/")?M.route:"/"+M.route;sessionStorage.setItem(`layout_${K}`,M.path)}d==null||d.push(M.route)}else if(M.openDialog||r.dummyMode&&M.route){V.value=M,L.value=null,Object.keys(k).forEach(z=>delete k[z]);const K=M.fieldActionGlobal||M.fieldActionCustom||M.field||[];K.length&&K.forEach(z=>{var ce;we(z);const U=M.endpoint||((ce=M.propsActionGlobal)==null?void 0:ce.endpointPropAction)||M.propsActionGlobal,J=U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null;J&&z.model===J||!J&&/^(id|ids|idAuditTrail)/i.test(z.model)?k[z.model]=se.value:k[z.model]||(k[z.model]="")}),D.value=!0}else a("action",{action:((I=M.propsActionCustom)==null?void 0:I.key)||M.key||"create",row:null,selection:se.value})},Eu=async(M,I)=>{var K,z,U,J;if(M.requireConfirm){N.value={button:M,row:I},w.value=!0;return}if(M.openDialog){V.value=M,L.value=I,Object.keys(k).forEach(ke=>delete k[ke]),D.value=!0;const ce=rt.value.find(ke=>ke.type==="CHECKBOX"),me=(ce==null?void 0:ce.keyCheckbox)||"id";M.fieldActionCustom&&M.fieldActionCustom.forEach(ke=>{we(ke),/^(id|ids|idAuditTrail)/i.test(ke.model)?k[ke.model]=[I[me]]:M.action==="showToken"&&ke.model==="token"?k[ke.model]=I.token!==void 0?I.token:"":I[ke.model]!==void 0?k[ke.model]=I[ke.model]:k[ke.model]=""});const ge=M.endpoint||((K=M.propsActionGlobal)==null?void 0:K.endpointPropAction)||((z=M.propsActionCustom)==null?void 0:z.endpointPropAction)||((U=M.props)==null?void 0:U.endpointPropAction);if(((J=ge==null?void 0:ge.apiMethod)==null?void 0:J.toUpperCase())==="GET"&&ge.apiUrl){y.value=!0;const{apiUrl:ke}=Je(),Ve={};ge.keyParam&&Array.isArray(ge.keyParam)&&ge.keyParam.forEach((Be,Se)=>{const Ct=ge.model&&Se===0?ge.model:Be;I[Be]!==void 0&&(Ve[Ct]=I[Be])}),Object.keys(Ve).length===0&&I.id&&(Ve.id=I.id),ke(ge.apiUrl,"GET",Ve).then(Be=>{let Se=Be;if(Be&&Be.data!==void 0?Se=Be.data:Be&&Be.result!==void 0&&(Se=Be.result),Se!=null){if(typeof Se=="string")Object.prototype.hasOwnProperty.call(k,"token")&&(k.token=Se);else if(typeof Se=="object"&&(Se.item&&(Se=Se.item),Array.isArray(Se)&&(Se=Se[0]||{}),Object.keys(Se).forEach(Ct=>{k[Ct]=Se[Ct]}),!k.token)){const Ct=Object.keys(Se).find(qt=>qt.toLowerCase().includes("token"));if(Ct)k.token=Se[Ct];else{const qt=Object.values(Se).filter(Da=>typeof Da=="string");qt.length===1&&(k.token=qt[0])}}}}).catch(Be=>{console.error("Fetch Data Failed",Be)}).finally(()=>{y.value=!1});return}return}SN(M,I)},SN=(M,I)=>{if(M.route){if(M.path){const U=M.route.startsWith("/")?M.route:"/"+M.route;sessionStorage.setItem(`layout_${U}`,M.path)}let K=M.route;K.includes(":")?K=K.replaceAll(/:([a-zA-Z0-9_]+)/g,(U,J)=>(I?I[J]||I.id:null)||J):I&&I.id&&(K=`${K.replace(/\/$/,"")}/${I.id}`);const z={};M.path&&(z.code=M.path),d==null||d.push({path:K,query:z})}else if(M.endpoint&&M.endpoint.apiUrl){y.value=!0;const{apiUrl:K}=Je(),z=M.endpoint.apiUrl,U=M.endpoint.apiMethod||"POST",J={},ce=M.fieldMapping;if(ce&&typeof ce=="object"){const{locale:me}=Et.useI18n(),ge=me.value||"en",ke=[];if(Object.entries(ce).forEach(([Ve,Be])=>{if(typeof Be=="string"){const Se=dt(I,Ve);Se!==void 0?J[Be]=Se:(console.warn(`[MAPPING-DEBUG] No matching source found for '${Ve}'`),ke.push(Ve))}}),ke.length>0){const Ve=ge==="id"?"Masalah Sinkronisasi Data":"Data Synchronization Issue",Be=ge==="id"?`Terdapat ketidaksesuaian skema pada field: ${ke.join(", ")}. Harap hubungi tim pengembang.`:`Schema mismatch detected in fields: ${ke.join(", ")}. Please contact the development team.`;ze.warning(`${Ve}: ${Be}`,{autoClose:5e3,position:"top-right"})}}if(Object.keys(J).length===0){const me=M.endpoint;I&&me.model&&me.keyParam&&Array.isArray(me.keyParam)?me.keyParam.forEach(ge=>{const ke=dt(I,ge);ke!==void 0&&(J[me.model]=ke)}):I&&I.id&&(J.id=I.id)}K(z,U,J).then(()=>{ht(),a("action",{action:M.action||"success",row:I})}).catch(me=>{console.error("Action Failed",me)}).finally(()=>{y.value=!1})}else a("action",{action:M.action,row:I})},AN=()=>{if(N.value){const{button:M,row:I}=N.value;Bu(),I===null?_u({...M,requireConfirm:!1}):Eu({...M,requireConfirm:!1},I)}},vN=()=>{var M,I,K;if(V.value){const z=V.value,U=z.endpoint||((M=z.propsActionGlobal)==null?void 0:M.endpointPropAction)||z.propsActionGlobal;let J=(U==null?void 0:U.model)||(U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null);if(!J){const ke=(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).find(Ve=>/^(id|ids|idAuditTrail)/i.test(Ve.model));J=ke?ke.model:"ids"}let ce=null,me=!1;if(L.value){const ge=rt.value.find(Be=>Be.type==="CHECKBOX"),ke=(ge==null?void 0:ge.keyCheckbox)||"id",Ve=L.value[ke];if(U!=null&&U.apiUrl){ce={...k};const Be=z.fieldMapping;Be&&typeof Be=="object"&&Object.entries(Be).forEach(([Se,Ct])=>{if(typeof Ct=="string"){const qt=dt(L.value,Se);qt!==void 0&&(ce[Ct]=qt)}}),ce[J]||(ce[J]=U!=null&&U.model?Ve:[Ve]),me=!0}}else U!=null&&U.apiUrl&&(ce={...k},ce[J]||(ce[J]=se.value||[]),me=!0);if(me&&ce&&(U!=null&&U.apiUrl)){if(((I=U==null?void 0:U.apiMethod)==null?void 0:I.toUpperCase())==="GET"){D.value=!1,L.value||(se.value=[]);return}const{apiUrl:ge}=Je(),ke=U.apiUrl,Ve=U.apiMethod||"POST";ge(ke,Ve,ce).then(()=>{D.value=!1,L.value||(se.value=[]),ht(),a("action",{action:"success",row:null})}).catch(Be=>{console.error("Action Failed",Be)})}else if(L.value){const ge=rt.value.find(Se=>Se.type==="CHECKBOX"),ke=(ge==null?void 0:ge.keyCheckbox)||"id",Ve=L.value[ke],Be={...k};Be[J]||(Be[J]=[Ve]),a("action",{action:V.value.action,row:Be}),D.value=!1}else{const ge={...k};ge[J]||(ge[J]=se.value);const ke={action:((K=V.value.propsActionGlobal)==null?void 0:K.key)||V.value.key,row:ge,selection:se.value};a("action",ke),D.value=!1}}},DN=M=>{const I=k[M];I&&yp(String(I)).then(()=>{ze.success("Berhasil disalin!",{autoClose:2e3,theme:"dark",pauseOnHover:!1})}).catch(K=>{console.error("Failed to copy",K)})},Bu=()=>{w.value=!1,N.value=null},NN=t.computed(()=>N.value?N.value.button.confirmTitle||"Confirm":""),VN=t.computed(()=>N.value?N.value.button.confirmMessage||"Confirm":"");o({fetchData:ht,filters:g,resetFilters:Ri,handleRefresh:Cu});const va=t.ref(""),MN=M=>{if(!M)return"";const I=M.endpoint||M.endpointGlobal||{};return JSON.stringify({url:I.apiUrl||M.apiUrl,module:I.apiModule||M.apiModule,action:I.apiAction||M.apiAction,method:I.apiMethod||M.apiMethod,params:M.apiParams,socket:I.socket||M.socketEndpoint,socketParams:M.socketParams})};return t.watch(()=>r.tableConfig,()=>{if(r.tableConfig){wt();const M=MN(r.tableConfig);M!==va.value&&(!va.value&&nt.value?(va.value=M,ht()):(va.value=M,nt.value&&kN()))}},{deep:!0,immediate:!0}),t.watch(()=>r.apiModule,()=>{nt.value&&ht()}),t.watch(()=>r.apiParams,()=>{nt.value&&ht()},{deep:!0}),t.watch(()=>C.value,M=>{console.log("[DEBUG] headerActions changed:",M.length,"items");const I=Vi.value;console.log("[DEBUG] visibleHeaderActions evaluated:",I.length,"items")},{deep:!0}),t.onMounted(()=>{wt(),nt.value&&(r.tableConfig||(y.value=!0,ht()))}),(M,I)=>{var K;return t.openBlock(),t.createElementBlock("div",T5,[t.createElementVNode("div",P5,[t.createElementVNode("div",O5,[e.nested?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",L5,[t.createElementVNode("div",R5,[t.createVNode(t.unref(ne.Search),{class:"absolute left-2.5 top-2.5 h-4 w-4 text-neutral-500 dark:text-neutral-400"}),t.createVNode(t.unref(pv),{modelValue:f.value,"onUpdate:modelValue":I[0]||(I[0]=z=>f.value=z),placeholder:"Search...",style:{"padding-left":"2.25rem !important"},class:"h-9 bg-white/95 dark:bg-zinc-800/95 border-white/30 dark:border-neutral-700/50 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-500 dark:placeholder:text-neutral-400",onKeyup:t.withKeys(ku,["enter"])},null,8,["modelValue"])]),x.value.length>0?(t.openBlock(),t.createElementBlock("div",I5,[t.createVNode(WA,null,{trigger:t.withCtx(()=>[t.createVNode(He,{variant:"secondary",icon:"SlidersHorizontal",tooltip:"Advance Search",class:"gap-2 h-9 w-full sm:w-auto justify-center bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium"})]),footer:t.withCtx(()=>[t.createElementVNode("div",U5,[t.renderSlot(M.$slots,"filter-footer",{fetch:ht,reset:Ri})])]),default:t.withCtx(()=>[I[9]||(I[9]=t.createElementVNode("hr",{class:"border-neutral-200 dark:border-neutral-700"},null,-1)),t.createElementVNode("div",F5,[t.renderSlot(M.$slots,"filter-form",{filters:g.value},()=>[x.value.length>0?(t.openBlock(),t.createElementBlock("div",z5,[t.createElementVNode("div",$5,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ce.value,(z,U)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:U},[t.unref(Y)(z)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(Ge(z))},[t.createVNode(GA,{field:z,modelValue:g.value[z.model],"onUpdate:modelValue":J=>g.value[z.model]=J,disabled:t.unref(xe)(z),required:t.unref(ae)(z),readonly:t.unref(Oe)(z),options:t.unref(Fe)(z),"dynamic-labels":t.unref(Ee)(z),"dynamic-length":t.unref(We)(z)},null,8,["field","modelValue","onUpdate:modelValue","disabled","required","readonly","options","dynamic-labels","dynamic-length"])],2)):t.createCommentVNode("",!0)],64))),128))])])):t.createCommentVNode("",!0)]),x.value.length>0?(t.openBlock(),t.createElementBlock("div",j5,[t.createVNode(He,{variant:"outline",text:"Reset",tooltip:"Reset",rounded:"md",icon:"RefreshCw",onClick:Ri,disabled:qo.value},null,8,["disabled"]),t.createVNode(He,{onClick:CN,disabled:qo.value,rounded:"md",text:"Search",tooltip:"Search",icon:"Search"},null,8,["disabled"])])):t.createCommentVNode("",!0)])]),_:3})])):t.createCommentVNode("",!0)])),t.createElementVNode("div",{class:t.normalizeClass(["flex items-center gap-2 flex-wrap",{"w-full justify-between":e.nested}])},[e.nested?(t.openBlock(),t.createElementBlock("span",W5)):t.createCommentVNode("",!0),e.nested?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(He,{key:1,variant:"secondary",icon:"RefreshCw",text:"Refresh",tooltip:"Refresh",class:"gap-2 h-9 bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-white dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium",onClick:Cu,disabled:qo.value},{icon:t.withCtx(()=>[t.createVNode(t.unref(ne.RefreshCw),{class:t.normalizeClass(["w-3.5 h-3.5",{"animate-spin":qo.value}])},null,8,["class"])]),_:1},8,["disabled"])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Vi.value,(z,U)=>(t.openBlock(),t.createBlock(He,{key:U,icon:z.icon,text:z.label,tooltip:z.tooltip,variant:z.variant,"bg-color":z.bgColor,"text-color":z.textColor,class:"gap-2 h-9 shadow-lg shadow-primary-500/20 border-none text-xs font-medium",onClick:J=>_u(z)},null,8,["icon","text","tooltip","variant","bg-color","text-color","onClick"]))),128)),t.renderSlot(M.$slots,"header-actions")],2)])]),t.createElementVNode("div",H5,[t.createElementVNode("table",q5,[t.createElementVNode("thead",G5,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(rt.value,z=>(t.openBlock(),t.createElementBlock("th",{key:z.key,class:t.normalizeClass([z.align?`text-${z.align.toLowerCase()}`:"text-left",z.sortable?"cursor-pointer select-none":"","px-3 py-2 text-xs font-black text-white dark:text-neutral-100 uppercase tracking-wider transition-colors duration-150"]),style:t.normalizeStyle(z.width?{width:z.width}:{}),onClick:U=>z.sortable&&_N(z.key)},[z.type==="CHECKBOX"?(t.openBlock(),t.createElementBlock("div",X5,[t.createVNode(io,{"model-value":Le.value,indeterminate:Re.value,"onUpdate:modelValue":I[1]||(I[1]=U=>ct(!!U)),onClick:I[2]||(I[2]=t.withModifiers(()=>{},["stop"]))},null,8,["model-value","indeterminate"])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex items-center gap-2 w-full",bu(z.align)])},[t.createElementVNode("span",null,t.toDisplayString(z.label),1)],2))],14,K5))),128)),or.value?(t.openBlock(),t.createElementBlock("th",Y5,[...I[10]||(I[10]=[t.createElementVNode("div",{class:"flex items-center justify-center w-full"}," Actions ",-1)])])):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",J5,[qo.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(h.value,z=>(t.openBlock(),t.createElementBlock("tr",{key:`skeleton-${z}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(rt.value,U=>{var J,ce;return t.openBlock(),t.createElementBlock("td",{key:U.key,class:t.normalizeClass([U.align?`text-${U.align.toLowerCase()}`:"text-left","px-3 py-0.5"])},[t.createElementVNode("div",{class:t.normalizeClass(["bg-gradient-to-r from-neutral-200 via-neutral-300 to-neutral-200 dark:from-neutral-700 dark:via-neutral-600 dark:to-neutral-700 animate-shimmer",[["badge","BADGE"].includes(U.type??"")||U.condition?"h-5 rounded-full w-20":"h-4 rounded-md",((J=U.align)==null?void 0:J.toLowerCase())==="center"?"mx-auto":"",((ce=U.align)==null?void 0:ce.toLowerCase())==="right"?"ml-auto":""]]),style:t.normalizeStyle({width:["badge","BADGE"].includes(U.type??"")||U.condition?void 0:BN(U),backgroundSize:"200% 100%"})},null,6)],2)}),128)),e.hasActions?(t.openBlock(),t.createElementBlock("td",Q5,[...I[11]||(I[11]=[t.createElementVNode("div",{class:"flex items-center justify-center gap-1.5"},[t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse"}),t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-75"}),t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-150"})],-1)])])):t.createCommentVNode("",!0)]))),128)):co.value.length===0?(t.openBlock(),t.createElementBlock("tr",Z5,[t.createElementVNode("td",{colspan:rt.value.length+(or.value?1:0),class:"text-center py-16"},[t.createElementVNode("div",tD,[t.createVNode(t.unref(Ru.Vue3Lottie),{animationData:t.unref(A5),height:200,width:200},null,8,["animationData"]),t.createElementVNode("div",null,[t.createElementVNode("p",oD,t.toDisplayString(xu.value?"No search results":"No data"),1),t.createElementVNode("p",nD,t.toDisplayString(xu.value?"Try changing keywords":"No data added"),1)])])],8,eD)])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(co.value,(z,U)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:U},[t.createElementVNode("tr",rD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(rt.value,J=>(t.openBlock(),t.createElementBlock("td",{key:J.key,class:t.normalizeClass([J.align?`text-${J.align.toLowerCase()}`:"text-left","px-3 py-0.5 text-sm text-neutral-900 dark:text-neutral-100"])},[t.renderSlot(M.$slots,`cell-${J.key}`,{row:z,value:dt(z,J.key)},()=>{var ce,me,ge,ke,Ve,Be;return[J.type==="CHECKBOX"?(t.openBlock(),t.createElementBlock("div",aD,[t.createVNode(io,{"model-value":ve(z),"onUpdate:modelValue":Se=>q(z,!!Se),onClick:I[3]||(I[3]=t.withModifiers(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])])):J.type==="badge"||J.type==="BADGE"||J.condition?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex items-center gap-1.5 flex-wrap md:flex-nowrap",[J.align?`justify-${J.align.toLowerCase()}`:"justify-start"]])},[t.createVNode(Ei,{variant:Ii(z,J).variant,class:t.normalizeClass([Ii(z,J).class,"whitespace-nowrap truncate max-w-[150px] inline-block"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(Ii(z,J).label),1)]),_:2},1032,["variant","class"])],2)):J.key==="no"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString((u.value-1)*h.value+U+1),1)],64)):J.type==="HYPERLINK"||J.type==="hyperlink"?(t.openBlock(),t.createElementBlock("a",{key:3,href:dt(z,(me=(ce=J.propsCustom)==null?void 0:ce[0])==null?void 0:me.urlLink)||"#",target:((ke=(ge=J.propsCustom)==null?void 0:ge[0])==null?void 0:ke.target)||"_blank",class:"text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1 font-medium"},[t.createTextVNode(t.toDisplayString(dt(z,J.key)||"-")+" ",1),((Be=(Ve=J.propsCustom)==null?void 0:Ve[0])==null?void 0:Be.target)==="_blank"?(t.openBlock(),t.createElementBlock("span",iD,[...I[12]||(I[12]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),t.createElementVNode("polyline",{points:"15 3 21 3 21 9"}),t.createElementVNode("line",{x1:"10",y1:"14",x2:"21",y2:"3"})],-1)])])):t.createCommentVNode("",!0)],8,sD)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createTextVNode(t.toDisplayString(bN(z,J)),1)],64))]})],2))),128)),or.value?(t.openBlock(),t.createElementBlock("td",lD,[t.renderSlot(M.$slots,"actions",{row:z,buttons:Aa(z),getButtonColor:Mi,getIconComponent:Ti},()=>[Aa(z).length>0?(t.openBlock(),t.createElementBlock("div",cD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Aa(z),(J,ce)=>(t.openBlock(),t.createElementBlock("div",{key:ce,class:"group relative"},[t.createVNode(He,{tooltip:J.tooltip||J.label,icon:J.icon,text:J.icon?"":J.label||(t.unref(l)==="id"?"Aksi":"Action"),size:J.icon?"icon":"sm",rounded:J.rounded||"sm",borderStyle:J.borderStyle||"none",variant:J.variant||"ghost","bg-color":Mi(J,z),onClick:me=>Eu(J,z)},null,8,["tooltip","icon","text","size","rounded","borderStyle","variant","bg-color","onClick"])]))),128))])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),M.$slots["expanded-row"]?(t.openBlock(),t.createElementBlock("tr",dD,[t.createElementVNode("td",{colspan:rt.value.length+(or.value?1:0),class:"px-0 py-0"},[t.renderSlot(M.$slots,"expanded-row",{row:z,index:U})],8,fD)])):t.createCommentVNode("",!0)],64))),128))])])]),!qo.value&&co.value.length>0&&e.showPagination&&B.value?(t.openBlock(),t.createElementBlock("div",uD,[t.createElementVNode("div",hD,[t.createVNode(t.unref(Ev),{"model-value":String(h.value),"onUpdate:modelValue":I[4]||(I[4]=z=>EN(Number(z)))},{default:t.withCtx(()=>[t.createVNode(t.unref(Nv),{class:"h-8 w-[70px] bg-white dark:bg-zinc-800 border-neutral-200 dark:border-neutral-700"},{default:t.withCtx(()=>[t.createVNode(t.unref(Vv),{placeholder:String(h.value)},null,8,["placeholder"])]),_:1}),t.createVNode(t.unref(Bv),null,{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(yN,z=>t.createVNode(t.unref(Av),{key:z,value:String(z)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(z),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"]),I[17]||(I[17]=t.createElementVNode("div",{class:"h-5 w-px bg-zinc-300 dark:bg-zinc-600"},null,-1)),t.createElementVNode("span",mD,[I[13]||(I[13]=t.createTextVNode(" Showing ",-1)),t.createElementVNode("span",pD,t.toDisplayString(hN.value),1),I[14]||(I[14]=t.createTextVNode(" to ",-1)),t.createElementVNode("span",gD,t.toDisplayString(mN.value),1),I[15]||(I[15]=t.createTextVNode(" of ",-1)),t.createElementVNode("span",bD,t.toDisplayString(nr.value),1),I[16]||(I[16]=t.createTextVNode(" items ",-1))])]),t.createElementVNode("div",yD,[t.createVNode(t.unref(gv),{total:nr.value,"items-per-page":h.value,"sibling-count":1,"show-edges":"",page:u.value,"onUpdate:page":wu,class:"scale-90 origin-right"},{default:t.withCtx(()=>[t.createVNode(t.unref(bv),{class:"flex items-center gap-1"},{default:t.withCtx(({items:z})=>[t.createVNode(t.unref(xv),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronsLeft),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(_v),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronLeft),{class:"h-4 w-4"})]),_:1}),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z,(U,J)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[U.type==="page"?(t.openBlock(),t.createBlock(t.unref(kv),{key:J,value:U.value,"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(Pt),{class:"w-8 h-8 p-0 text-sm",variant:U.value===u.value?"default":"outline",disabled:U.value===u.value,onClick:ce=>wu(U.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.value),1)]),_:2},1032,["variant","disabled","onClick"])]),_:2},1032,["value"])):(t.openBlock(),t.createBlock(t.unref(yv),{key:U.type,index:J},null,8,["index"]))],64))),256)),t.createVNode(t.unref(Cv),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronRight),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(wv),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronsRight),{class:"h-4 w-4"})]),_:1})]),_:1})]),_:1},8,["total","items-per-page","page"])])])):t.createCommentVNode("",!0),t.createVNode(lo,{modelValue:w.value,"onUpdate:modelValue":I[5]||(I[5]=z=>w.value=z),title:NN.value,icon:"AlertCircle","max-width":450,persistent:!1},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",onClick:Bu,text:"Cancel"}),t.createVNode(He,{variant:"default",onClick:AN,text:"Yes"})]),default:t.withCtx(()=>[t.createElementVNode("div",xD,[t.createElementVNode("p",kD,t.toDisplayString(VN.value),1)])]),_:1},8,["modelValue","title"]),t.createVNode(lo,{modelValue:D.value,"onUpdate:modelValue":I[8]||(I[8]=z=>D.value=z),title:((K=V.value)==null?void 0:K.label)||"Action",icon:"AlertCircle","max-width":450},{actions:t.withCtx(()=>{var z;return[t.createVNode(He,{variant:"outline",onClick:I[6]||(I[6]=U=>D.value=!1),text:"Cancel"}),e.dummyMode&&((z=V.value)!=null&&z.route)?(t.openBlock(),t.createBlock(He,{key:1,variant:"default",onClick:I[7]||(I[7]=U=>D.value=!1),text:t.unref(l)==="id"?"Tutup":"Close"},null,8,["text"])):(t.openBlock(),t.createBlock(He,{key:0,variant:"default",onClick:vN,text:"Save"}))]}),default:t.withCtx(()=>{var z,U,J;return[t.createElementVNode("div",wD,[y.value?(t.openBlock(),t.createElementBlock("div",CD,[t.createElementVNode("div",_D,[I[18]||(I[18]=t.createElementVNode("div",{class:"w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin"},null,-1)),t.createElementVNode("span",ED,t.toDisplayString(t.unref(l)==="id"?"Memuat data...":"Loading data..."),1)])])):t.createCommentVNode("",!0),e.dummyMode&&((z=V.value)!=null&&z.route)?(t.openBlock(),t.createElementBlock("div",BD,[t.createElementVNode("div",SD,[t.createVNode(t.unref(ne.Search),{class:"w-4 h-4"})]),t.createElementVNode("div",AD,[t.createElementVNode("span",vD,t.toDisplayString(t.unref(l)==="id"?"Info Navigasi":"Navigation Info"),1),t.createElementVNode("p",DD,t.toDisplayString(t.unref(l)==="id"?`Aksi ini akan mengarah ke rute: ${V.value.route}`:`This action will navigate to: ${V.value.route}`),1)])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(((U=V.value)==null?void 0:U.fieldActionCustom)||((J=V.value)==null?void 0:J.fieldActionGlobal)||[],(ce,me)=>{var ge,ke,Ve,Be;return t.openBlock(),t.createElementBlock(t.Fragment,{key:me},[!ce.isHidden&&t.unref(T)(ce)&&!(e.dummyMode&&((ge=V.value)!=null&&ge.route))?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(Ge(ce))},[t.createElementVNode("div",ND,[t.createVNode(pn,{class:"flex-1 w-full",field:ce,"model-value":k[ce.model],"form-data":k,required:t.unref(F)(ce),disabled:t.unref(X)(ce),readonly:t.unref(H)(ce),options:t.unref(oe)(ce),"dynamic-labels":t.unref(W)(ce),"dynamic-length":t.unref(Z)(ce),"onUpdate:modelValue":Se=>k[ce.model]=Se},null,8,["field","model-value","form-data","required","disabled","readonly","options","dynamic-labels","dynamic-length","onUpdate:modelValue"]),ce.isCopyable||(ke=ce.props)!=null&&ke.isCopyable||((Ve=V.value)==null?void 0:Ve.action)==="showToken"||((Be=V.value)==null?void 0:Be.action)==="copyToken"?(t.openBlock(),t.createBlock(He,{key:0,icon:"Copy",variant:"outline",class:"h-10 w-10 p-0 flex-shrink-0",tooltip:"Salin",onClick:Se=>DN(ce.model)},null,8,["onClick"])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)],64)}),128))])]}),_:1},8,["modelValue","title"])])}}});function VD(){const e=t.reactive({}),o=t.reactive({}),n=t.reactive({}),r=t.reactive({}),a=t.reactive({}),s=t.ref(!1),i=t.ref(null),l=t.reactive({}),c=t.reactive({visible:!1,title:"",message:"",action:null});return{formData:e,errors:o,fieldErrors:n,wizardState:r,inlineState:a,isSubmitting:s,internalSchema:i,rawItemsCache:l,confirmDialog:c}}function MD({formData:e,locale:o,errors:n,fieldMap:r,activeSchema:a,isSectionVisible:s,isFieldVisible:i,isFieldRequired:l,resolveFieldLength:c}){const d=(u,h,m)=>{const p=u.props||u.propsFieldGlobal||{},y=h==null?"":String(h).trim();if(l(u,m)&&y==="")return o.value==="id"?"Wajib diisi":"Required";if(y==="")return null;const b=c==null?void 0:c(u,m),g=Number((b==null?void 0:b.minLength)??p.minLength),_=Number((b==null?void 0:b.maxLength)??p.maxLength);if(!Number.isNaN(g)&&g>0&&y.length<g)return o.value==="id"?`Minimal ${g} karakter`:`Minimum ${g} characters`;if(!Number.isNaN(_)&&_>0&&y.length>_)return o.value==="id"?`Maksimal ${_} karakter`:`Maximum ${_} characters`;if(p.regex)try{if(!new RegExp(p.regex).test(y))return p.regexMessage||(o.value==="id"?"Format tidak valid":"Invalid format")}catch{console.warn(`[DynamicForm] Invalid validation regex for field ${u.model}:`,p.regex)}return null};return{validateField:d,validateAll:()=>{var h,m;let u=!0;return(m=(h=a.value)==null?void 0:h.sections)==null||m.forEach(p=>{var y;s(p)&&(((y=p.propsForm)==null?void 0:y.fields)||p.fields||[]).forEach(b=>{if(b.model&&i(b)){const g=r.value.get(b.model),_=g?xn(e,g.path):e[b.model],E=d(b,_);E&&(n[b.model]=E,u=!1)}})}),u}}}function TD({formData:e,activeSchema:o,isSectionVisible:n,isFieldVisible:r,getWizardTabs:a}){const s=()=>{var u;const d=[],f=h=>{h==null||h.forEach(m=>{var y;if(m.type==="TABLE"||m.propsTable){const b=m.propsTable||m;b.modelDatatable&&d.push({key:b.modelDatatable,subFields:(b.headers||[]).map(g=>g.key)})}(((y=m.propsForm)==null?void 0:y.fields)||m.fields||[]).forEach(b=>{var _,E;const g=["DCodeDynamicUploadList","DCodeUploadList","DCodeDataTable","DCodeDynamicFormList"].includes(b.component);if(b.model&&((_=b.props)!=null&&_.multiple||((E=b.props)==null?void 0:E.valueType)==="array"||g)){const B=b.component.includes("Upload")?["id","filename","document","typeDocument","idDocumentType"]:["id"];d.push({key:b.model,subFields:B})}}),m.type==="WIZARD"&&a(m).forEach(b=>f(b.sections))})};return f((u=o.value)==null?void 0:u.sections),d};return{getCleanPayload:()=>{var u;if(!((u=o.value)!=null&&u.sections))return{...e};const d={},f=new Set;return o.value.sections.forEach(h=>{var b,g;if(!n(h))return;const p=Ea(h),y=(_,E)=>{if(_.model&&r(_)){const B=xn(e,E?`${E}.${_.model}`:_.model)??e[_.model];d[_.model]=Ho(B)??null,f.add(_.model)}};if((((b=h.propsForm)==null?void 0:b.fields)||h.fields||[]).forEach(_=>{var E;return y(_,p||((E=h.propsForm)==null?void 0:E.key))}),h.type==="WIZARD"&&a(h).forEach(_=>_.sections.forEach(E=>(E.fields||[]).forEach(B=>y(B,_.key)))),(g=h.propsTable)!=null&&g.modelDatatable){const _=h.propsTable.modelDatatable;d[_]=Ho(e[_]||[]),f.add(_)}}),["id","_id"].forEach(h=>{e[h]!==void 0&&!f.has(h)&&(d[h]=Ho(e[h]))}),d},applyFieldMapping:(d,f)=>{const u={},h=m=>m&&typeof m=="object"?m._isLogicValue?m.id:m.id??m.code??m.value??m:m;return Object.entries(f).forEach(([m,p])=>{if(typeof p=="string"){const y=d[m]??xn(e,m)??e[m];y!==void 0&&(u[p]=h(y))}else if(Array.isArray(p)&&p[0]){const y=p[0],b=Object.keys(y);let g=d[m]??xn(e,m)??e[m];if(!Array.isArray(g)||g.length===0){const _=s().find(E=>b.some(B=>E.subFields.includes(B)));if(_){const E=d[_.key]??xn(e,_.key)??e[_.key];Array.isArray(E)&&E.length>0&&(g=E)}}Array.isArray(g)&&(console.log(`[DynamicForm][MAPPING-SOURCE] ${m}:`,Ho(g)),u[m]=g.map((_,E)=>{const B={},A=Ho(_);return Object.entries(y).forEach(([C,x])=>{const w=A[C]??A[x]??_[C]??_[x]??null;B[x]=h(w)}),B}))}}),console.log("[DynamicForm][MAPPING-RESULT]",u),u},handleResponseMapping:(d,f)=>{const u=(d==null?void 0:d.data)!==void 0?d.data:d,h=Array.isArray(u)?u[0]:u;h&&Object.entries(f).forEach(([m,p])=>{const y=h[p]??h[m];y!==void 0&&iu(e,m,y)})},getFormArrayModels:s}}function PD({state:e,props:o,emit:n,apiUrl:r,router:a,locale:s,mapping:i,validation:l,fieldMap:c,activeSchema:d,resolvedBaseUrl:f}){const u=_=>o.dummyMode||!_.permission||(o.isEditMode?_.permission!=="CREATE":_.permission!=="UPDATE"),h=_=>{var E,B,A,C;_.requireConfirm?(e.confirmDialog.title=s.value==="id"?((E=_.propCustomMessage)==null?void 0:E.titleID)||"Konfirmasi":((B=_.propCustomMessage)==null?void 0:B.titleEN)||"Confirm",e.confirmDialog.message=s.value==="id"?((A=_.propCustomMessage)==null?void 0:A.messageID)||"Lanjutkan?":((C=_.propCustomMessage)==null?void 0:C.messageEN)||"Continue?",e.confirmDialog.action=_,e.confirmDialog.visible=!0):p(_)},m=()=>{e.confirmDialog.visible=!1,e.confirmDialog.action&&p(e.confirmDialog.action)},p=async _=>{var C,x;const E=_.propsActionGlobal||_.props||{},B=i.applyFieldMapping(i.getCleanPayload(),E.fieldMapping||_.fieldMapping||{});n("action",_,B);const A=E.endpointPropAction||_.endpointPropAction||E.endpoint||_.endpoint;if((E.type==="SUBMIT"||E.type==="ACTION")&&(A!=null&&A.apiUrl)){const w=ze.loading(s.value==="id"?"Memproses...":"Processing..."),D=Bi(A.apiUrl,f.value);try{const k=await r(D,A.apiMethod||"POST",B);console.log("[DynamicForm][ACTIONS] API Response:",k);const v=(k==null?void 0:k.status)===!0||(k==null?void 0:k.success)===!0||(k==null?void 0:k.code)===200||(k==null?void 0:k.code)==="00"||(k==null?void 0:k.status)==="SUCCESS",S=(k==null?void 0:k.message)||(v?s.value==="id"?"Sukses":"Success":s.value==="id"?"Gagal":"Failed");if(ze.update(w,{render:S,type:v?"success":"error",isLoading:!1,autoClose:v?3e3:5e3}),v){if((E.fieldMapping||_.fieldMapping)&&i.handleResponseMapping(k,E.fieldMapping||_.fieldMapping),n("success",k),console.log("[DynamicForm][ACTIONS] Router Instance:",a?"FOUND":"NOT FOUND"),a){const N=V=>{const L=V.startsWith("/")?V:"/"+V;console.log("[DynamicForm][ACTIONS] Navigating to:",L),a.push(L).catch(O=>{console.error("[DynamicForm][ACTIONS] Router Push Failed:",O)})};if(E.routeBack)N(E.routeBack);else{const V=a.currentRoute.value.path,L=V.split("/").filter(Boolean);console.log("[DynamicForm][ACTIONS] No routeBack, fallback to parent. Current path:",V),L.length>1?(L.pop(),N("/"+L.join("/"))):N("/")}}}else n("error",k)}catch(k){const v=((x=(C=k.response)==null?void 0:C.data)==null?void 0:x.message)||k.message||(s.value==="id"?"Terjadi kesalahan":"An error occurred");ze.update(w,{render:`Gagal: ${v}`,type:"error",isLoading:!1,autoClose:5e3}),n("error",k)}}else E.type==="SUBMIT"&&n("submit",B);E.keyRedirect&&E.route&&a&&a.push(E.route)};return{isActionVisible:u,handleGlobalButtonClick:h,confirmAction:m,performAction:p,handleSubmit:async()=>{var _,E;if(l.validateAll()){e.isSubmitting.value=!0;try{const B=i.getCleanPayload(),A=(((_=d.value)==null?void 0:_.actions)||[]).find(x=>{var w;return x.type==="SUBMIT"||x.key==="SUBMIT"||((w=x.propsActionGlobal)==null?void 0:w.type)==="SUBMIT"}),C=(A==null?void 0:A.fieldMapping)||((E=A==null?void 0:A.propsActionGlobal)==null?void 0:E.fieldMapping);n("submit",C?i.applyFieldMapping(B,C):B)}finally{e.isSubmitting.value=!1}}},handleCancel:()=>n("cancel"),handleFieldUpdate:(_,E,B)=>{var C;e.formData[_]=E;const A=(C=c.value.get(_))==null?void 0:C.field;if(A){const x=l.validateField(A,E);x?e.errors[_]=x:delete e.errors[_]}}}}function OD({formData:e,validation:o,locale:n,emit:r,mapping:a}){const s=t.ref(!1),i=t.ref(""),l=t.ref("Plus"),c=t.ref([]),d=t.reactive({}),f=t.reactive({}),u=t.ref(""),h=t.ref(null),m=t.ref(!1),p=t.ref(null),y=t.ref(!1),b=k=>{var v;return!(k!=null&&k.apiUrl)&&!((v=k==null?void 0:k.endpointTable)!=null&&v.apiUrl)},g=k=>{if(!k)return!1;const v=(k.key||"").toLowerCase(),S=(k.permission||"").toUpperCase();return v==="detail"||v.includes("view")||S==="VIEW"},_=k=>Array.isArray(e[k.modelDatatable])?e[k.modelDatatable]:[],E=k=>{var S,N;if((S=k.fields)!=null&&S.length)return k.fields;const v=(k.actionTableGlobal||[]).find(V=>V.permission==="CREATE"||(V.key||"").toLowerCase().includes("add"));return(N=v==null?void 0:v.fieldActionGlobal)!=null&&N.length?v.fieldActionGlobal:(k.headers||[]).filter(V=>V.key&&V.key!=="no").map(V=>({key:V.key,model:V.key,component:"DCodeTextField"}))},B=(k,v)=>{p.value={propsTable:k,row:v},y.value=!0},A=()=>{if(!p.value)return;const{propsTable:k,row:v}=p.value;y.value=!1;const S=e[k.modelDatatable];if(Array.isArray(S)){const N=S.indexOf(v);if(N!==-1)S.splice(N,1);else{const V=JSON.stringify(v,(O,P)=>["no","_index"].includes(O)?void 0:P),L=S.findIndex(O=>JSON.stringify(O,(P,R)=>["no","_index"].includes(P)?void 0:R)===V);L!==-1&&S.splice(L,1)}r("update:model",a.getCleanPayload())}},C=(k,v)=>{d[k]=v;const S=c.value.find(N=>N.model===k);if(S){const N=o.validateField(S,v);N?f[k]=N:delete f[k]}},x=(k,v,S)=>{u.value=k.modelDatatable||"",m.value=g(v),h.value=null,i.value=n.value==="id"?v.labelID||"Tambah Data":v.labelEN||"Add Data",l.value=v.icon||"Plus";const N=E(k);c.value=N,Object.keys(d).forEach(V=>delete d[V]),Object.keys(f).forEach(V=>delete f[V]),N.forEach(V=>d[V.model]=S?S[V.model]??null:null),s.value=!0};return{tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,tableRowFormData:d,tableRowErrors:f,activeTableKey:u,editingRowIndex:h,tableDialogViewOnly:m,confirmDeletePending:p,confirmDeleteOpen:y,isTemporaryTable:b,isActionViewOnly:g,tableRows:_,resolveTableFields:E,confirmTableDelete:B,executeTableDelete:A,handleTableRowUpdate:C,openTableRowDialog:x,handleDataTableAction:(k,v)=>{const{action:S,row:N}=v;if(/delete|trash/i.test(S)){const R=e[k.modelDatatable];if(Array.isArray(R)){const j=R.indexOf(N);if(j!==-1)R.splice(j,1);else{const T=JSON.stringify(N,(X,H)=>["no","_index"].includes(X)?void 0:H),F=R.findIndex(X=>JSON.stringify(X,(H,W)=>["no","_index"].includes(H)?void 0:W)===T);F!==-1&&R.splice(F,1)}}return}if(/detail|view/i.test(S)){x(k,{key:"detail",permission:"VIEW"},N);return}const V=k.modelDatatable||"";u.value=V,m.value=!1,i.value=n.value==="id"?"Ubah Data":"Edit Data",l.value="SquarePen";const L=e[V];let O=Array.isArray(L)?L.indexOf(N):-1;if(O===-1&&Array.isArray(L)){const R=JSON.stringify(N,(j,T)=>["no","_index"].includes(j)?void 0:T);O=L.findIndex(j=>JSON.stringify(j,(T,F)=>["no","_index"].includes(T)?void 0:F)===R)}h.value=O!==-1?O:null;const P=E(k);c.value=P,Object.keys(d).forEach(R=>delete d[R]),P.forEach(R=>d[R.model]=N[R.model]??null),s.value=!0},saveTableRow:()=>{let k=!0;if(c.value.forEach(S=>{const N=o.validateField(S,d[S.model]);N&&(f[S.model]=N,k=!1)}),!k)return;const v=u.value;v&&(e[v]=e[v]||[],h.value!==null?e[v].splice(h.value,1,{...d}):e[v].push({...d}),s.value=!1,r("update:model",a.getCleanPayload()))}}}function LD(e){const{state:o,props:n,emit:r,logic:a,mapping:s,activeSchema:i,fieldMap:l,prefetchFieldItems:c}=e;let d="";const f=new Map,u=new Map,h=(m,p)=>{var A;const y=(A=i.value)==null?void 0:A.sections;if(!y)return;a.applyCalculations();const b=a.getNormalizedData(m),g=(C,x,w,D)=>{const k=C.model,v=a.isFieldVisible(C,w)&&x,S=f.get(k),N=o.formData[k];return f.set(k,v),D&&S===!0&&v===!1&&N!=null&&(console.log(`[DynamicForm][DEBUG][RESET-VISIBLE] ${k} became hidden. Clearing value:`,N),o.formData[k]=Array.isArray(N)?[]:null),v},_=(C,x,w,D)=>{var P,R,j,T,F,X;const k=C.model,v=C.logic,S=Array.isArray((R=(P=C.props)==null?void 0:P.endpoint)==null?void 0:R.keyParam)||Array.isArray((T=(j=C.props)==null?void 0:j.endpointReference)==null?void 0:T.keyParam);if(!v&&!S)return;const N={};let V=!1;["lengthRule","optionsFilterRule","visibleRule","disabledRule"].forEach(H=>{const W=v==null?void 0:v[H];if(!W)return;const Z=a.resolveActiveRule(W,w,`${H}-${k}`),oe=JSON.stringify(Z);N[H]=oe;const ye=u.get(k);(ye==null?void 0:ye[H])!==void 0&&ye[H]!==oe&&(V=!0,console.log(`[DynamicForm][DEBUG][CONTEXT-CHANGE] ${k} rule ${H} changed while tracking.`))});const O=((F=C.props)==null?void 0:F.endpoint)||((X=C.props)==null?void 0:X.endpointReference);Array.isArray(O==null?void 0:O.keyParam)&&O.keyParam.forEach(H=>{const W=w[H],Z=JSON.stringify(W);N[`kp-${H}`]=Z;const oe=u.get(k);(oe==null?void 0:oe[`kp-${H}`])!==void 0&&oe[`kp-${H}`]!==Z&&(V=!0,console.log(`[DynamicForm][DEBUG][CASCADE] ${k} dependency ${H} changed while tracking.`),D&&x&&c(C,!0))}),D&&V&&o.formData[k]!=null&&(console.log(`[DynamicForm][DEBUG][RESET-LOGIC] Context changed for ${k}. Clearing value.`),o.formData[k]=Array.isArray(o.formData[k])?[]:null),u.set(k,N)},E=(C,x,w)=>{var k;if(C.type!=="WIZARD")return;(((k=C.propsWizard)==null?void 0:k.propsSteps)||[]).forEach(v=>{const N=a.isSectionVisible(v,w)&&x;Array.isArray(v.sectionsWizard)?B(v.sectionsWizard,N):v.sectionsWizard&&B([v.sectionsWizard],N)})},B=(C,x=!0)=>{var w;for(const D of C){const v=a.isSectionVisible(D,m)&&x,S=((w=D.propsForm)==null?void 0:w.fields)||D.fields||[];for(const N of S){if(!N.model)continue;const V=g(N,v,m,p);_(N,V,b,p)}E(D,v,m)}};B(y,!0)};return t.watch(()=>i.value,m=>{var y,b,g,_,E;if(!(m!=null&&m.sections))return;const p=B=>{if(!B)return;const A=["visibleRule","requiredRule","disabledRule","optionsFilterRule","lengthRule","calculateRule"];for(const C of A){const x=B[C];if(Array.isArray(x))for(const w of x)w.condition&&Ba(w.condition);else x&&Ba(x)}};for(const B of m.sections){if(p(B.logic||((y=B.propsForm)==null?void 0:y.logic)),B.type==="WIZARD")for(const C of((b=B.propsWizard)==null?void 0:b.propsSteps)||[])p(C.logic);const A=((g=B.propsForm)==null?void 0:g.fields)||B.fields||[];for(const C of A)p(C.logic),(_=C.logic)!=null&&_.optionsFilterRule&&c(C);if(B.type==="TABLE"&&((E=B.propsTable)!=null&&E.modelDatatable)&&(o.formData[B.propsTable.modelDatatable]=o.formData[B.propsTable.modelDatatable]||[]),B.type==="WIZARD"){const C=Ea(B);o.wizardState[C]===void 0&&(o.wizardState[C]=0)}}h(o.formData,!1)},{immediate:!0}),t.watch(o.formData,m=>{h(m,!0);const p=s.getCleanPayload()||{},y=JSON.stringify(p);y!==d&&(console.log("[DynamicForm][DEBUG][EMIT] Sending updated model to parent:",p),d=y,r("update:model",p))},{deep:!0}),t.watch(()=>n.model,m=>{m&&Object.keys(m).length>0&&JSON.stringify(m)!==d&&Object.entries(m).forEach(([y,b])=>{if(f.get(y)===!1)return;if(b==null&&f.get(y)===!0){const E=o.formData[y];if(E!=null)return}const g=l.value.get(y),_=(g==null?void 0:g.path)||y;iu(o.formData,_,b)})},{immediate:!0,deep:!0}),{lastEmittedPayload:()=>d}}kt.add_operation("length",e=>e==null?0:typeof e=="string"||Array.isArray(e)?e.length:typeof e=="number"?String(e).length:typeof e=="object"?Object.keys(e).length:0),kt.add_operation("==",(e,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return e==null?o==null:o==null?e==null:n(e)&&n(o)?String(e.id)===String(o.id)||String(e.code)===String(o.code):n(e)?String(e.code)===String(o)||String(e.id)===String(o):n(o)?String(o.code)===String(e)||String(o.id)===String(e):typeof e=="boolean"&&typeof o=="string"?String(e)===o:typeof o=="boolean"&&typeof e=="string"?String(o)===e:String(e)===String(o)}),kt.add_operation("!=",(e,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return e==null&&o==null?!1:e==null||o===null||o===void 0?!0:n(e)&&n(o)?!(String(e.id)===String(o.id)||String(e.code)===String(o.code)):n(e)?!(String(e.code)===String(o)||String(e.id)===String(o)):n(o)?!(String(o.code)===String(e)||String(o.id)===String(e)):String(e)!==String(o)});function RD(e,o){const{t:n,locale:r}=Et.useI18n(),a=t.computed(()=>r.value),{apiUrl:s}=Je(),i=e.router||Eo.useRouter(),l=VD(),c=t.computed(()=>e.schema||l.internalSchema.value),d=t.computed(()=>{var B;if((B=e.selectedTokenCore)!=null&&B.address)return e.selectedTokenCore.address;if(e.baseUrl)return e.baseUrl}),f=(B,A,C)=>{A.model&&B.set(A.model,{field:A,path:A.model})},u=(B,A)=>{A.key||A.id;const C=Array.isArray(A.sectionsWizard)?A.sectionsWizard:[A.sectionsWizard].filter(Boolean);for(const x of C)if(x.fields)for(const w of x.fields)f(B,w)},h=t.computed(()=>{var C,x,w;const B=new Map,A=(C=c.value)==null?void 0:C.sections;if(!A)return B;for(const D of A){const k=D.propsForm||D.propsTable||D.props||{};Ea(D);const v=k.fields||D.fields||[];for(const S of v)f(B,S);if(((x=D.type)==null?void 0:x.toUpperCase())==="WIZARD"&&((w=D.propsWizard)!=null&&w.propsSteps))for(const S of D.propsWizard.propsSteps)u(B,S)}return B}),m=Si({formData:l.formData,errors:l.errors,fieldMap:h,rawItemsCache:l.rawItemsCache,activeSchema:c,locale:a});t.watch(()=>c.value,B=>{if(B!=null&&B.payload){console.log("[DynamicForm][DEBUG] Initializing flat state from schema payload...");const A=lu(B.payload);Object.keys(A).forEach(C=>{(l.formData[C]===void 0||l.formData[C]===null)&&(l.formData[C]=A[C])})}},{immediate:!0});const p=MD({formData:l.formData,locale:a,errors:l.errors,fieldMap:h,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,isFieldRequired:m.isFieldRequired,resolveFieldLength:m.resolveFieldLength}),y=TD({formData:l.formData,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,getWizardTabs:m.getWizardTabs}),b=PD({state:l,props:e,emit:o,apiUrl:s,router:i,locale:a,mapping:y,validation:p,fieldMap:h,activeSchema:c,resolvedBaseUrl:d}),g=OD({formData:l.formData,validation:p,locale:a,emit:o,mapping:y}),_=async(B,A=!1)=>{const C=B.props||{},x=C.endpointReference||C.endpoint;if(x!=null&&x.apiUrl&&!(!A&&l.rawItemsCache[B.key]))try{const w=Bi(x.apiUrl,d.value),D={page:1,perPage:100};if(Array.isArray(x.keyParam)){let N=!1;if(x.keyParam.forEach(V=>{const L=m.getNormalizedData(l.formData)[V];L==null||L===""?N=!0:D[V]=L&&typeof L=="object"&&L._isLogicValue?L.id:L}),N){l.rawItemsCache[B.key]=[];return}}const k=await s(w,x.apiMethod||"GET",D),v=(k==null?void 0:k.data)||k;let S=[];Array.isArray(v)?S=v:v&&(S=[v]),l.rawItemsCache[B.key]=S}catch(w){console.error(`[prefetchFieldItems] Error fetching items for ${B.key}:`,w),l.rawItemsCache[B.key]=[]}};LD({state:l,props:e,emit:o,logic:m,mapping:y,fieldMap:h,activeSchema:c,prefetchFieldItems:_});const E=t.computed(()=>{const B={},A=c.value;return A!=null&&A.sections&&A.sections.forEach(C=>{var w,D,k;(((w=C.propsForm)==null?void 0:w.fields)||((D=C.propsTable)==null?void 0:D.fields)||((k=C.props)==null?void 0:k.fields)||[]).forEach(v=>{var S,N,V,L,O,P,R,j,T,F,X;if(v.component==="DCodeRadioCustom"){const H=((S=v.props)==null?void 0:S.name)||"default-group";B[H]||(B[H]=[]);let W=((V=(N=v.props)==null?void 0:N.endpoint)==null?void 0:V.apiUrl)||((L=v.props)==null?void 0:L.apiUrl);W=Bi(W,d.value),B[H].push({key:v.key,value:(O=v.props)==null?void 0:O.value,label:((P=v.props)==null?void 0:P.labelID)||((R=v.props)==null?void 0:R.labelEN)||v.key,model:v.model||v.key,apiUrl:W,apiMethod:((T=(j=v.props)==null?void 0:j.endpoint)==null?void 0:T.apiMethod)||((F=v.props)==null?void 0:F.apiMethod),icon:(X=v.props)==null?void 0:X.icon,name:H})}})}),B});return{t:n,locale:a,i18nLocale:r,apiUrl:s,router:i,isSubmitting:l.isSubmitting,internalSchema:l.internalSchema,activeSchema:c,resolvedBaseUrl:d,radioGroups:E,confirmDialog:l.confirmDialog,fieldMap:h,rawItemsCache:l.rawItemsCache,formData:l.formData,errors:l.errors,fieldErrors:l.fieldErrors,inlineState:l.inlineState,wizardState:l.wizardState,getSectionKey:Ea,sortedFields:M5,prefetchFieldItems:_,...m,...y,...b,...g}}const ID={class:"flex items-center gap-2"},FD=t.defineComponent({__name:"DynamicFormSection",props:{section:{},sIdx:{}},setup(e){const o=t.computed(()=>{var k,v;switch((v=(k=e.section)==null?void 0:k.propsForm)==null?void 0:v.layoutColumns){case"FULL":return"grid-cols-1";case"HALF":return"grid-cols-1 md:grid-cols-2";case"THIRD":return"grid-cols-1 md:grid-cols-3";case"QUARTED":return"grid-cols-1 md:grid-cols-4";case"TWO-THIRD":return"grid-cols-2 md:grid-cols-3";case"THREE-QUARTER":return"grid-cols-3 md:grid-cols-4";default:return"grid-cols-1"}}),n=t.inject("dynamicFormContext",{}),r=t.computed(()=>{var v,S,N;const D=(N=(S=(v=e.section)==null?void 0:v.propsForm)==null?void 0:S.actionSection)==null?void 0:N.some(V=>s==null?void 0:s(V)),k=e.sIdx===0;return D||k}),{resolveSectionLabels:a,isActionVisible:s,handleGlobalButtonClick:i,locale:l,t:c,handleCancel:d,sortedFields:f,isFieldVisible:u,getDeepValue:h,formData:m,getSectionKey:p,isFieldRequired:y,isFieldDisabled:b,isFieldReadonly:g,getFilteredItems:_,errors:E,resolveFieldLabels:B,resolveFieldLength:A,resolvedBaseUrl:C,handleFieldUpdate:x}=n,w=D=>typeof f!="function"?[]:f(D||[]);return(D,k)=>{var v;return t.openBlock(),t.createBlock(Jo,{title:(v=t.unref(a)(e.section))==null?void 0:v.title,border:!0,padding:"",class:"overflow-hidden"},t.createSlots({default:t.withCtx(()=>{var S,N;return[t.createElementVNode("div",{class:t.normalizeClass(["p-4 grid gap-4",o.value])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w((N=(S=e.section)==null?void 0:S.propsForm)==null?void 0:N.fields),V=>{var L,O,P,R,j,T,F,X,H;return t.openBlock(),t.createElementBlock(t.Fragment,{key:V==null?void 0:V.key},[(L=t.unref(u))!=null&&L(V)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(o.value)},[t.createVNode(pn,{field:V,"model-value":(O=t.unref(m))==null?void 0:O[V.model],"form-data":t.unref(m),required:(P=t.unref(y))==null?void 0:P(V),disabled:(R=t.unref(b))==null?void 0:R(V),readonly:(j=t.unref(g))==null?void 0:j(V),options:(T=t.unref(_))==null?void 0:T(V),error:(F=t.unref(E))==null?void 0:F[V.model],"dynamic-labels":(X=t.unref(B))==null?void 0:X(V),"dynamic-length":(H=t.unref(A))==null?void 0:H(V),"base-url":t.unref(C),"onUpdate:modelValue":W=>t.unref(x)(V.model,W)},null,8,["field","model-value","form-data","required","disabled","readonly","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):t.createCommentVNode("",!0)],64)}),128))],2)]}),_:2},[r.value?{name:"actions",fn:t.withCtx(()=>{var S,N,V,L;return[t.createElementVNode("div",ID,[(V=(N=(S=e.section)==null?void 0:S.propsForm)==null?void 0:N.actionSection)!=null&&V.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.section.propsForm.actionSection,(O,P)=>{var R,j,T,F,X,H,W,Z;return t.openBlock(),t.createElementBlock(t.Fragment,{key:P},[(R=t.unref(s))!=null&&R(O)?(t.openBlock(),t.createBlock(He,{key:0,icon:O.icon||((j=O.propsActionGlobal)==null?void 0:j.icon),text:t.unref(l)==="id"?O.labelID||((T=O.propsActionGlobal)==null?void 0:T.labelID):O.labelEN||((F=O.propsActionGlobal)==null?void 0:F.labelEN),"bg-color":((H=O.bgColor||((X=O.propsActionGlobal)==null?void 0:X.bgColor))==null?void 0:H.toLowerCase())||"primary",variant:((Z=O.variant||((W=O.propsActionGlobal)==null?void 0:W.variant))==null?void 0:Z.toLowerCase())||"outline",size:"sm",onClick:oe=>{var ye;return(ye=t.unref(i))==null?void 0:ye(O)}},null,8,["icon","text","bg-color","variant","onClick"])):t.createCommentVNode("",!0)],64)}),128)):t.createCommentVNode("",!0),e.sIdx===0?(t.openBlock(),t.createBlock(He,{key:1,size:"sm",icon:"List",text:(L=t.unref(c))==null?void 0:L("common.back"),variant:"outline",onClick:k[0]||(k[0]=O=>{var P;return(P=t.unref(d))==null?void 0:P()})},null,8,["text"])):t.createCommentVNode("",!0)])]}),key:"0"}:void 0]),1032,["title"])}}}),zD=t.defineComponent({__name:"DynamicTableSection",props:{section:{},dummyMode:{type:Boolean}},setup(e){const o=t.inject("dynamicFormContext"),{tableRows:n,isTemporaryTable:r,handleDataTableAction:a,resolvedBaseUrl:s}=o;return(i,l)=>(t.openBlock(),t.createBlock(Jo,{border:!0,padding:"",class:"overflow-hidden"},{default:t.withCtx(()=>[t.createVNode(kn,{"table-config":e.section.propsTable,data:t.unref(n)(e.section.propsTable),nested:!0,"show-pagination":e.section.propsTable.pagination??!0,"has-actions":t.unref(r)(e.section.propsTable),"base-url":t.unref(s),"dummy-mode":e.dummyMode,onAction:l[0]||(l[0]=c=>t.unref(a)(e.section.propsTable,c))},null,8,["table-config","data","show-pagination","has-actions","base-url","dummy-mode"])]),_:1}))}}),$D={class:"w-full"},jD={class:"space-y-6 mt-4"},UD={key:2,class:"p-4 border border-dashed border-neutral-300 rounded-lg text-xs text-neutral-400"},WD=t.defineComponent({__name:"DynamicWizardSection",props:{section:{},dummyMode:{type:Boolean}},setup(e){const o=t.inject("dynamicFormContext"),{getWizardTabs:n,wizardState:r,getSectionKey:a,isSubmitting:s,isSectionVisible:i,sortedFields:l,isFieldVisible:c,formData:d,isFieldRequired:f,isFieldDisabled:u,getFilteredItems:h,errors:m,resolveFieldLabels:p,resolveFieldLength:y,resolvedBaseUrl:b,handleFieldUpdate:g,tableRows:_,handleDataTableAction:E,resolveSectionGridClass:B,resolveFieldColumnClass:A}=o;return(C,x)=>{var w;return t.openBlock(),t.createElementBlock("div",$D,[t.createVNode(hi,{tabs:t.unref(n)(e.section),modelValue:t.unref(r)[t.unref(a)(e.section)],"onUpdate:modelValue":x[0]||(x[0]=D=>t.unref(r)[t.unref(a)(e.section)]=D),"is-vertical":e.section.propsWizard.isVertical,"is-wizard":e.section.propsWizard.isWizard,"type-wizard":((w=e.section.propsWizard.typeWizard)==null?void 0:w.toLowerCase())||"icon",loading:t.unref(s)},t.createSlots({_:2},[t.renderList(t.unref(n)(e.section),D=>({name:`tab-${D.key}`,fn:t.withCtx(()=>[t.createElementVNode("div",jD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.sections,(k,v)=>{var S,N;return t.openBlock(),t.createElementBlock(t.Fragment,{key:v},[t.unref(i)(k)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[((S=k.type)==null?void 0:S.toUpperCase())==="FORM"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["grid gap-4",t.unref(B)(k.layoutColumns)])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l)(k.fields),V=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:V.key},[t.unref(c)(V)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(A)(V,k.layoutColumns))},[t.createVNode(pn,{field:V,"model-value":t.unref(d)[V.model],"form-data":t.unref(d),required:t.unref(f)(V),disabled:t.unref(u)(V),options:t.unref(h)(V),error:t.unref(m)[V.model],"dynamic-labels":t.unref(p)(V),"dynamic-length":t.unref(y)(V),"base-url":t.unref(b),"onUpdate:modelValue":L=>t.unref(g)(V.model,L)},null,8,["field","model-value","form-data","required","disabled","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):t.createCommentVNode("",!0)],64))),128))],2)):((N=k.type)==null?void 0:N.toUpperCase())==="TABLE"||k.isDataTable?(t.openBlock(),t.createBlock(Jo,{key:1,border:!0,padding:"",class:"overflow-hidden"},{default:t.withCtx(()=>{var V;return[t.createVNode(kn,{"dummy-mode":e.dummyMode,"table-config":k.propsDataTableWizard||k.propsTable,data:t.unref(_)(k.propsDataTableWizard||k.propsTable),nested:!0,"show-pagination":((V=k.propsDataTableWizard||k.propsTable)==null?void 0:V.pagination)??!0,onAction:L=>t.unref(E)(k.propsDataTableWizard||k.propsTable,L)},null,8,["dummy-mode","table-config","data","show-pagination","onAction"])]}),_:2},1024)):(t.openBlock(),t.createElementBlock("div",UD," Unknown section type: "+t.toDisplayString(k.type),1))],64)):t.createCommentVNode("",!0)],64)}),128))])])}))]),1032,["tabs","modelValue","is-vertical","is-wizard","type-wizard","loading"])])}}}),HD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},qD={key:0,class:"grid grid-cols-1 md:grid-cols-2 gap-4 py-2"},GD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},KD=t.defineComponent({__name:"DynamicFormDialogs",setup(e){const o=t.inject("dynamicFormContext"),{confirmDialog:n,t:r,confirmAction:a,tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,isFieldVisible:d,tableRowFormData:f,tableDialogViewOnly:u,isFieldRequired:h,isFieldDisabled:m,getFilteredItems:p,tableRowErrors:y,resolveFieldLabels:b,resolveFieldLength:g,resolvedBaseUrl:_,handleTableRowUpdate:E,locale:B,saveTableRow:A,confirmDeleteOpen:C,executeTableDelete:x}=o;return(w,D)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(lo,{modelValue:t.unref(n).visible,"onUpdate:modelValue":D[1]||(D[1]=k=>t.unref(n).visible=k),title:t.unref(n).title,icon:"AlertTriangle","max-width":450},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(r)("common.cancel"),onClick:D[0]||(D[0]=k=>t.unref(n).visible=!1)},null,8,["text"]),t.createVNode(He,{text:t.unref(r)("common.confirm"),onClick:t.unref(a)},null,8,["text","onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",HD,t.toDisplayString(t.unref(n).message),1)]),_:1},8,["modelValue","title"]),t.createVNode(lo,{modelValue:t.unref(s),"onUpdate:modelValue":D[3]||(D[3]=k=>t.isRef(s)?s.value=k:null),title:t.unref(i),icon:t.unref(l),"max-width":700},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(u)?t.unref(B)==="id"?"Tutup":"Close":t.unref(B)==="id"?"Batal":"Cancel",onClick:D[2]||(D[2]=k=>s.value=!1)},null,8,["text"]),t.unref(u)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(He,{key:0,text:"Save",onClick:t.unref(A)},null,8,["onClick"]))]),default:t.withCtx(()=>[t.unref(c).length?(t.openBlock(),t.createElementBlock("div",qD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),k=>(t.openBlock(),t.createElementBlock("div",{key:k.key,class:t.normalizeClass(k.column==="FULL"?"md:col-span-2":"col-span-1")},[t.unref(d)(k,t.unref(f))?(t.openBlock(),t.createBlock(pn,{key:0,field:k,"model-value":t.unref(f)[k.model],"form-data":t.unref(f),required:t.unref(u)?!1:t.unref(h)(k,t.unref(f)),disabled:t.unref(u)||t.unref(m)(k,t.unref(f)),"view-only":t.unref(u),options:t.unref(p)(k,t.unref(f)),error:t.unref(u)?void 0:t.unref(y)[k.model],"dynamic-labels":t.unref(b)(k,t.unref(f)),"dynamic-length":t.unref(g)(k,t.unref(f)),"base-url":t.unref(_),"onUpdate:modelValue":v=>t.unref(E)(k.model,v)},null,8,["field","model-value","form-data","required","disabled","view-only","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])):t.createCommentVNode("",!0)],2))),128))])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","title","icon"]),t.createVNode(lo,{modelValue:t.unref(C),"onUpdate:modelValue":D[5]||(D[5]=k=>t.isRef(C)?C.value=k:null),title:t.unref(B)==="id"?"Konfirmasi Hapus":"Confirm Delete",icon:"Trash2","max-width":440},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(B)==="id"?"Batal":"Cancel",onClick:D[4]||(D[4]=k=>C.value=!1)},null,8,["text"]),t.createVNode(He,{variant:"default","bg-color":"danger",icon:"Trash2",text:t.unref(B)==="id"?"Hapus":"Delete",onClick:t.unref(x)},null,8,["text","onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",GD,t.toDisplayString(t.unref(B)==="id"?"Apakah Anda yakin ingin menghapus data ini? Tindakan ini tidak dapat dibatalkan.":"Are you sure you want to delete this row? This action cannot be undone."),1)]),_:1},8,["modelValue","title"])]))}}),XD={class:"w-full space-y-6"},Ai=t.defineComponent({__name:"DynamicForm",props:{schema:{},model:{default:()=>({})},isEditMode:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},baseUrl:{default:void 0},selectedTokenCore:{default:null},dummyMode:{type:Boolean,default:!1},router:{default:null}},emits:["submit","cancel","action","update:model","success","error"],setup(e,{emit:o}){const n=e,a=RD(n,o);t.provide("dynamicFormContext",a);const{activeSchema:s,isSectionVisible:i,inlineState:l,isActionVisible:c,locale:d,isSubmitting:f,isSubmitDisabled:u,handleGlobalButtonClick:h,handleSubmit:m}=a;return(p,y)=>{var b,g,_,E,B,A;return t.openBlock(),t.createElementBlock("div",XD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((b=t.unref(s))==null?void 0:b.sections,(C,x)=>{var w,D,k;return t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[((w=C.type)==null?void 0:w.toUpperCase())==="FORM"&&C.propsForm&&t.unref(i)(C)?(t.openBlock(),t.createBlock(FD,{key:0,"dummy-mode":n.dummyMode,section:C,sIdx:Number(x)},null,8,["dummy-mode","section","sIdx"])):((D=C.type)==null?void 0:D.toUpperCase())==="TABLE"&&C.propsTable&&t.unref(i)(C)?(t.openBlock(),t.createBlock(zD,{key:1,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):((k=C.type)==null?void 0:k.toUpperCase())==="WIZARD"&&C.propsWizard&&t.unref(i)(C)?(t.openBlock(),t.createBlock(WD,{key:2,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):t.createCommentVNode("",!0)],64)}),128)),(g=t.unref(l))!=null&&g.global?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(((E=(_=t.unref(s))==null?void 0:_.ui)==null?void 0:E.actionsClass)||"flex items-center gap-2 flex-wrap pt-4 border-t border-neutral-100 dark:border-neutral-800")},[(A=(B=t.unref(s))==null?void 0:B.actionGlobal)!=null&&A.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(s).actionGlobal,(C,x)=>{var w,D,k;return t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[C.propsActionGlobal&&t.unref(c)(C)?(t.openBlock(),t.createBlock(He,{key:0,icon:C.propsActionGlobal.icon,text:t.unref(d)==="id"?C.propsActionGlobal.labelID:C.propsActionGlobal.labelEN,"bg-color":((w=C.propsActionGlobal.bgColor)==null?void 0:w.toLowerCase())||"primary",variant:((D=C.propsActionGlobal.variant)==null?void 0:D.toLowerCase())||"default",loading:t.unref(f),disabled:t.unref(u)&&(C.permission==="CREATE"||C.permission==="UPDATE"||((k=C.propsActionGlobal)==null?void 0:k.key)==="submit"),onClick:v=>t.unref(h)(C)},null,8,["icon","text","bg-color","variant","loading","disabled","onClick"])):t.createCommentVNode("",!0)],64)}),128)):t.createCommentVNode("",!0)],2)),t.createVNode(KD)])}}}),YD={"aria-label":"Breadcrumb"},JD={class:"flex flex-wrap items-center text-sm md:text-base"},QD={class:"truncate max-w-[100px] sm:max-w-[150px] md:max-w-none"},cu=t.defineComponent({__name:"Breadcrumb",props:{items:{},showHomeIcon:{type:Boolean,default:!0},iconSize:{default:18},separatorSize:{default:16},separatorType:{default:"chevron"},strokeWidth:{default:2}},setup(e){const o=e,n=ne.Home,r=o.separatorType==="slash"?ne.Slash:ne.ChevronRight;return(a,s)=>(t.openBlock(),t.createElementBlock("nav",YD,[t.createElementVNode("ol",JD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:"flex items-center"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.to?"router-link":"span"),{to:i.to,class:t.normalizeClass(["inline-flex items-center gap-1.5 transition-all duration-200 rounded-lg font-medium",i.to?"text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/20 cursor-pointer":"dark:text-gray-100 bg-primary-50 dark:bg-primary-900/30 text-primary-700"])},{default:t.withCtx(()=>[i.icon||l===0&&e.showHomeIcon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon||t.unref(n)),{key:0,size:e.iconSize,class:t.normalizeClass(["flex-shrink-0",i.to?"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-400":"text-primary-600 dark:text-primary-400",i.iconClass||""]),"stroke-width":e.strokeWidth},null,8,["size","class","stroke-width"])):t.createCommentVNode("",!0),t.createElementVNode("span",QD,t.toDisplayString(i.label),1)]),_:2},1032,["to","class"])),l<e.items.length-1?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(r)),{key:0,size:e.separatorSize,class:"mx-1.5 text-gray-300 dark:text-gray-700 flex-shrink-0"},null,8,["size"])):t.createCommentVNode("",!0)]))),128))])]))}});function du(){return{setPageTitle:n=>{typeof document<"u"&&(document.title=n||document.title),typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:page-title",{detail:{title:n},bubbles:!0,composed:!0}))},setBreadcrumb:n=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:breadcrumb",{detail:{items:n},bubbles:!0,composed:!0}))}}}const ZD={class:"w-full space-y-6 animate-pulse"},eN={class:"p-4 grid grid-cols-1 md:grid-cols-2 gap-4"},tN=t.defineComponent({__name:"AutoLayoutSkeleton",setup(e){return(o,n)=>(t.openBlock(),t.createElementBlock("div",ZD,[n[2]||(n[2]=t.createElementVNode("div",{class:"h-6 w-48 bg-neutral-200 dark:bg-neutral-700 rounded-md"},null,-1)),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(2,r=>t.createElementVNode("div",{key:r,class:"rounded-xl border border-neutral-200 dark:border-neutral-700 overflow-hidden"},[n[1]||(n[1]=t.createElementVNode("div",{class:"px-4 py-3 bg-neutral-200 dark:bg-neutral-700"},[t.createElementVNode("div",{class:"h-4 w-32 bg-neutral-300 dark:bg-neutral-600 rounded"})],-1)),t.createElementVNode("div",eN,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,a=>t.createElementVNode("div",{key:a,class:t.normalizeClass(a>4?"md:col-span-2":"col-span-1")},[...n[0]||(n[0]=[t.createElementVNode("div",{class:"h-3 w-24 bg-neutral-200 dark:bg-neutral-700 rounded mb-2"},null,-1),t.createElementVNode("div",{class:"h-10 w-full bg-neutral-200 dark:bg-neutral-700 rounded-lg"},null,-1)])],2)),64))])])),64)),n[3]||(n[3]=t.createElementVNode("div",{class:"flex items-center gap-2"},[t.createElementVNode("div",{class:"h-9 w-24 bg-neutral-300 dark:bg-neutral-600 rounded-lg"}),t.createElementVNode("div",{class:"h-9 w-20 bg-neutral-200 dark:bg-neutral-700 rounded-lg"})],-1))]))}}),oN={class:"w-full"},nN={class:"relative mx-auto min-h-[37.5rem]"},rN={key:"content",class:"w-full"},aN={class:"mb-6"},sN={class:"text-neutral-500 dark:text-neutral-400"},iN={key:"skeleton",class:"w-full"},lN={key:"error",class:"flex items-center justify-center p-20 text-red-500 w-full"},vi=ft(t.defineComponent({name:"AutoLayoutForm",__name:"AutoLayoutForm",props:{layoutCode:{},isEditMode:{type:Boolean},model:{},selectedTokenCore:{},router:{}},emits:["submit-success","cancel","action-success","update:model"],setup(e,{emit:o}){var S,N,V,L,O,P,R,j;const n=e,r=o,a=(N=(S=t.getCurrentInstance())==null?void 0:S.appContext)==null?void 0:N.app;a&&!a._context.provides[Symbol.for("vue-router-route-location")]&&a.provide(Symbol.for("vue-router-route-location"),{query:{},params:{},path:""});let s={query:{},params:{},path:""};try{const T=Eo.useRoute();if(T&&Object.keys(T).length>0)s=T;else{const F=t.getCurrentInstance();(O=(L=(V=F==null?void 0:F.appContext)==null?void 0:V.config)==null?void 0:L.globalProperties)!=null&&O.$route&&(s=F.appContext.config.globalProperties.$route)}}catch{console.warn("useRoute not available, using fallback")}let i={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:T=>{typeof window<"u"&&(typeof T=="string"?window.location.href=T:T&&T.path&&(window.location.href=T.path))},__isFallback:!0};try{const T=n.router||Eo.useRouter();if(T)i=T;else{const F=t.getCurrentInstance();(j=(R=(P=F==null?void 0:F.appContext)==null?void 0:P.config)==null?void 0:R.globalProperties)!=null&&j.$router&&(i=F.appContext.config.globalProperties.$router)}}catch{console.warn("useRouter not available, using fallback")}const{apiUrl:l,DCodeApi:c}=Je();let d;try{d=Et.useI18n().locale}catch{d=t.ref("en")}const{setPageTitle:f}=du(),u=t.computed(()=>n.isEditMode!==void 0?n.isEditMode:s.params&&"id"in s.params?!0:s.path?/\/edit\/[^\/]+$/.test(s.path):!1);t.watchEffect(()=>{console.log("isEditModeisEditMode",u.value)});const h=t.computed(()=>{if(s.params&&"id"in s.params)return s.params.id;if(!s.path)return null;const T=s.path.match(/\/edit\/([^\/]+)$/);return T?T[1]:null}),m=t.ref({}),p=t.ref(null),y=t.ref(!0),b=t.ref(!1),g="https://dcodedynamic.skyworx.co.id/api/auto-layout/form/form-dynamic?code=",_="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",E=t.ref(n.layoutCode),B=t.computed(()=>{var X;if(!p.value)return"";const T=((X=d==null?void 0:d.value)==null?void 0:X.toLowerCase())||"en";return(T==="en"||T.startsWith("en-")?p.value.titleEN:p.value.titleID)||p.value.title||n.layoutCode});t.watch(B,T=>{T&&f(T)},{immediate:!0});const A=(T,F="")=>{const X={};return!T||typeof T!="object"||Object.keys(T).forEach(H=>{const W=T[H],Z=F?`${F}.${H}`:H;W&&typeof W=="object"&&!Array.isArray(W)&&!(W instanceof Date)&&Object.assign(X,A(W,Z)),X[Z]=W}),X},C=T=>{var W;if(!T||typeof T!="string"||T.startsWith("http"))return T;const F=(W=n.selectedTokenCore)==null?void 0:W.address;if(!F)return T;const X=F.replace(/\/$/,""),H=T.startsWith("/")?T:`/${T}`;return`${X}${H}`},x=async()=>{var T,F,X,H,W,Z;y.value=!0;try{let oe=n.layoutCode;s&&s.query&&typeof s.query=="object"&&"code"in s.query&&(oe=s.query.code||n.layoutCode);const ye="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",Ne=ye?{Authorization:`Bearer ${ye}`}:{},we=C(`${g}${oe}`);let Q=await l(we,"GET",null,Ne);if(!Q.status||!Q.data||Array.isArray(Q.data)&&Q.data.length===0)try{const $=C(`${_}${oe}`),Y=await l($,"GET",null,Ne);if(Y.status){const ae=Array.isArray(Y.data)?Y.data[0]:Y.data;ae&&ae.code&&(oe=ae.code,E.value=oe,Q=await l(C(`${g}${oe}`),"GET",null,Ne))}}catch($){console.warn("Failed to resolve layout code via datatable",$)}if(Q.status){p.value=Array.isArray(Q.data)?Q.data[0]:Q.data;const $={};if((T=p.value)!=null&&T.sections&&p.value.sections.forEach(Y=>{((Y.propsForm||Y.props||{}).fields||Y.fields||[]).forEach(Oe=>{var We;const Ee=Oe.model||((We=Oe.props)==null?void 0:We.model)||Oe.key;Ee&&($[Ee]=null)})}),m.value=$,y.value=!1,u.value&&h.value){b.value=!0;try{const Y=(H=(X=(F=p.value.sections)==null?void 0:F[0])==null?void 0:X.propsForm)==null?void 0:H.endpointForm,ae=p.value.endpointForm,xe=Y||ae;if(xe!=null&&xe.apiUrl){const Oe=xe.apiUrl,Ee=xe.apiMethod||"GET",We=xe.keyParam||[],Fe={};We.length>0?We.forEach(Le=>{Fe[Le]=h.value}):Fe.id=h.value;const se=await c(C(Oe),Ee,Fe);if(console.log(`[AutoLayoutForm] API Result for ${Oe}:`,se),se.status){let Le=Array.isArray(se.data)?se.data[0]:se.data;se.payload&&(Le={...Le,...se.payload}),console.log("[AutoLayoutForm] Successfully fetched record:",Le);const Re=A(Le);m.value={...m.value,...Le,...Re},console.log("[AutoLayoutForm] Updated initialData:",m.value)}else console.warn("[AutoLayoutForm] Record API returned status: false",se)}else if((W=p.value.endpointGlobal)!=null&&W.apiUrl){const Oe=p.value.endpointGlobal.apiUrl,Ee=p.value.endpointGlobal.apiMethod||"GET",We={id:h.value},Fe=await c(C(Oe),Ee,We);if(Fe.status){const se=Array.isArray(Fe.data)?Fe.data[0]:Fe.data,Le=A(se);m.value={...m.value,...se,...Le}}}else{const Oe=((Z=p.value.endpoint)==null?void 0:Z.detailUrl)||`/api/${E.value}/detail/${h.value}`,Ee=await l(C(Oe),"GET");if(Ee.status){let We=Array.isArray(Ee.data)?Ee.data[0]:Ee.data;if(Ee.payload){const Le={...Ee.payload};if(Object.keys(Le).forEach(Re=>{We[Re]!==void 0&&We[Re]!==null&&(Le[Re]=We[Re])}),!("id"in Le)&&We.id){const Re=Object.keys(Le).find(ve=>ve.startsWith("id")&&ve.length>2&&!Le[ve]);Re&&(Le[Re]=We.id)}We=Le}const Fe={...We};Object.keys(m.value).forEach(Le=>{if(Fe[Le]===void 0||Fe[Le]===null){if(Le.toLowerCase().startsWith("id")&&Le.length>2){const ve=Le.substring(2).toLowerCase(),ct=Array.isArray(Ee.data)?Ee.data[0]:Ee.data,q=Object.keys(ct).find(ie=>ie.toLowerCase()===ve);q&&ct[q]&&typeof ct[q]=="object"&&"id"in ct[q]&&(Fe[Le]=ct[q].id)}if(Le==="idSupervisor"){const ve=Array.isArray(Ee.data)?Ee.data[0]:Ee.data;ve.supervisorId&&(Fe[Le]=ve.supervisorId)}}});const se=A(Fe);m.value={...m.value,...Fe,...se}}}}catch(Y){console.error("Failed to fetch record data:",Y)}finally{b.value=!1}}}}catch(oe){console.error("Failed to load form layout:",oe),y.value=!1}},w=T=>{const F=Object.keys(m.value||{}).filter(H=>m.value[H]!==null&&m.value[H]!==void 0),X=Object.keys(T||{}).filter(H=>T[H]!==null&&T[H]!==void 0);if(F.length>3&&X.length<F.length/2){console.warn('[AutoLayoutForm] Circuit breaker triggered: Ignoring likely erroneous "empty" update from child.',{currentCount:F.length,incomingCount:X.length,data:T});return}console.log("[AutoLayoutForm] Allowing model update:",T),m.value=T,r("update:model",T)},D=async T=>{var F,X,H;try{const W=(H=(X=(F=p.value.sections)==null?void 0:F[0])==null?void 0:X.propsForm)==null?void 0:H.endpointForm,Z=p.value.endpointGlobal||p.value.endpoint,oe=(W==null?void 0:W.submitUrl)||(Z==null?void 0:Z.submitUrl)||`/api/generic/${n.layoutCode}`,ye=(W==null?void 0:W.submitMethod)||(Z==null?void 0:Z.submitMethod)||(u.value?"PUT":"POST"),Ne=Object.values(T).some(Q=>Q instanceof File||Q instanceof Blob);let we;Ne?(we=new FormData,Object.keys(T).forEach(Q=>{const $=T[Q];$!=null&&(Array.isArray($)?$.forEach(Y=>we.append(`${Q}[]`,Y)):we.append(Q,$))})):(we={...T},u.value&&h.value&&!we.id&&(we.id=h.value)),await l(C(oe),ye,we),r("submit-success",we),i.back()}catch(W){console.error("Submit failed:",W)}},k=async(T,F,X)=>{if(T==="cancel"){v();return}const H=F.endpointPropAction||F.propsActionGlobal&&F.propsActionGlobal.endpointPropAction;if(H)try{y.value=!0;const W=X?{...X}:{...m.value};u.value&&F.model&&h.value&&(W[F.model]=h.value);const Z=H.apiUrl,oe=H.apiMethod||"POST";(await c(C(Z),oe,W)).status&&(r("action-success",T,F,W),i.back())}catch(W){console.error("Action failed:",W)}finally{y.value=!1}},v=()=>{r("cancel"),i.back()};return t.onMounted(()=>{x()}),t.watch(()=>n.model,T=>{T&&Object.keys(T).length>0&&(m.value={...m.value,...T})},{immediate:!0,deep:!0}),t.onUnmounted(()=>{f("")}),(T,F)=>(t.openBlock(),t.createElementBlock("div",oN,[t.createElementVNode("div",nN,[t.createVNode(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[!y.value&&p.value?(t.openBlock(),t.createElementBlock("div",rN,[t.createElementVNode("div",aN,[t.createElementVNode("p",sN,t.toDisplayString(p.value.description),1)]),t.createVNode(Ai,{schema:p.value,model:m.value,"is-edit-mode":u.value,loading:b.value,"selected-token-core":n.selectedTokenCore,router:t.unref(i),"onUpdate:model":F[0]||(F[0]=X=>w(X)),onSubmit:D,onCancel:v,onAction:k,class:"w-full"},null,8,["schema","model","is-edit-mode","loading","selected-token-core","router"])])):y.value?(t.openBlock(),t.createElementBlock("div",iN,[t.createVNode(tN)])):(t.openBlock(),t.createElementBlock("div",lN," Failed to load form configuration for "+t.toDisplayString(n.layoutCode),1))]),_:1})])]))}}),[["__scopeId","data-v-fa0a05fb"]]),cN={class:"h-full flex flex-col"},dN={key:1,class:"flex-1 flex items-center justify-center"},fN={key:2,class:"flex-1 flex items-center justify-center text-red-500"},Di=t.defineComponent({name:"AutoLayoutDatatable",__name:"AutoLayoutDatatable",props:{layoutCode:{},userPermissions:{},permissionBase:{},checkPermission:{type:Function}},emits:["action","navigate"],setup(e,{emit:o}){var A,C,x,w,D,k;const n=e,r=o,a=t.getCurrentInstance(),{apiUrl:s}=Je();let i={query:{},params:{},path:""};try{const v=Eo.useRoute();v?i=v:(x=(C=(A=a==null?void 0:a.appContext)==null?void 0:A.config)==null?void 0:C.globalProperties)!=null&&x.$route&&(i=a.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let l={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:v=>{typeof window<"u"&&(typeof v=="string"?window.location.href=v:v&&v.path&&(window.location.href=v.path))}};try{const v=Eo.useRouter();v?l=v:(k=(D=(w=a==null?void 0:a.appContext)==null?void 0:w.config)==null?void 0:D.globalProperties)!=null&&k.$router&&(l=a.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const c=t.inject("hasActionAccess",()=>!1),d=t.inject("userPermissions",null),f=t.ref(null),u=t.ref(!0),h=t.ref(null),m="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",p=t.computed(()=>`${m}${n.layoutCode}`),{setPageTitle:y}=du();let b;try{b=Et.useI18n().locale}catch{b=t.ref("en")}const g=()=>{if(f.value){const S=(b.value==="id"?f.value.titleID:f.value.titleEN)||f.value.title||"Datatable";y(S)}};t.watch(b,()=>{g()});const _=async()=>{u.value=!0;try{const v="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",S=v?{Authorization:`Bearer ${v}`}:{},N=await s(p.value,"GET",null,S);N.status&&(f.value=Array.isArray(N.data)?N.data[0]:N.data,console.log("[DEBUG] AutoLayoutDatatable config loaded:",f.value),g())}catch(v){console.error("Gagal Menampilkan Datatable:",v)}finally{u.value=!1}},E=v=>{v.action==="add"&&console.log("[AutoLayoutDatatable] Add action triggered"),console.log("Aksi:",v.action,v)},B=v=>{console.log("[DEBUG] AutoLayoutDatatable handleNavigate:",v);let S=v.route;const N=v.path;if(!S&&N){const L=((i==null?void 0:i.path)||"").split("/");L.length>=2&&(S=`/${L[1]}/create`)}if(S||N){const V={...v.query||{},code:N||void 0};Object.keys(V).forEach(L=>V[L]===void 0&&delete V[L]),console.log("[DEBUG] Emitting navigate to parent:",{route:S,query:V}),r("navigate",{route:S||"/form",query:V}),l&&!l.__isFallback&&l.push({path:S||"/form",query:V})}else console.warn("[DEBUG] No route or path provided for navigation")};return t.onMounted(()=>{_()}),(v,S)=>(t.openBlock(),t.createElementBlock("div",cN,[!u.value&&f.value?(t.openBlock(),t.createBlock(kn,{key:0,ref_key:"dtRef",ref:h,"api-url":p.value,"api-method":"GET","table-config":f.value,"permission-base":n.permissionBase||"","dummy-mode":["datatable-create","datatable-edit"].includes(n.layoutCode),"user-permissions":n.userPermissions||t.unref(d),"permission-checker":t.unref(c),checkPermission:n.checkPermission,onAction:E,onNavigate:B},{"header-actions":t.withCtx(()=>[...S[0]||(S[0]=[])]),_:1},8,["api-url","table-config","permission-base","dummy-mode","user-permissions","permission-checker","checkPermission"])):u.value?(t.openBlock(),t.createElementBlock("div",dN,[...S[1]||(S[1]=[t.createElementVNode("i",{class:"mdi mdi-loading mdi-spin text-4xl text-primary-600"},null,-1)])])):(t.openBlock(),t.createElementBlock("div",fN," Failed to load configuration for "+t.toDisplayString(n.layoutCode),1))]))}}),fu=t.defineCustomElement(vi),uu=t.defineCustomElement(Di);typeof customElements<"u"&&(customElements.get("micro-dynamic-form")||customElements.define("micro-dynamic-form",fu),customElements.get("micro-dynamic-datatable")||customElements.define("micro-dynamic-datatable",uu));const uN=[ur,cl,He,Jo,cs,ds,Of,io,Qs,Zs,sa,lo,Ff,ia,zf,si,ei,$f,li,la,ci,Wo,di,ca,jf,Uf,fi,ui,da,fa,on,hn,Gf,Kf,hi,mi,pi,Ei,mn,gi,kn,vi,Di,Ai,cu,pn],hu={install(e,o={}){o&&Object.keys(o).length>0&&$i(o),uN.forEach(n=>{n.name&&e.component(n.name,n)})}};de.AutoLayoutDatatable=Di,de.AutoLayoutForm=vi,de.Breadcrumb=cu,de.DCodeAutoComplete=ur,de.DCodeBadge=Ei,de.DCodeBeforeAfter=cs,de.DCodeButton=He,de.DCodeCard=Jo,de.DCodeCardCheckboxList=Qs,de.DCodeChart=Of,de.DCodeCheckbox=io,de.DCodeCurrencyField=Zs,de.DCodeDatePicker=sa,de.DCodeDialog=lo,de.DCodeDialogCloseBtn=Ff,de.DCodeDropzone=ia,de.DCodeDynamicUploadList=ei,de.DCodeFileField=zf,de.DCodeFileResult=si,de.DCodeIconDropdown=$f,de.DCodeImageCropperDialog=li,de.DCodeImageField=la,de.DCodeImageResult=ci,de.DCodeInfiniteAutoComplete=cl,de.DCodeLabel=Wo,de.DCodeListLabels=ds,de.DCodeMultiSelect=di,de.DCodeOtpInput=ca,de.DCodePermissionMenu=mi,de.DCodeProgress=jf,de.DCodeProgressBar=Uf,de.DCodeRadio=fi,de.DCodeRadioCustom=ui,de.DCodeSlider=da,de.DCodeStaticImage=gi,de.DCodeStaticLabel=mn,de.DCodeSwitch=fa,de.DCodeTextField=on,de.DCodeTextarea=hn,de.DCodeTimelineWithIcons=Gf,de.DCodeTreePermissions=pi,de.DCodeUploadFile=Kf,de.DCodeWizard=hi,de.DataTable=kn,de.DataTableComponent=kn,de.DynamicForm=Ai,de.DynamicFormField=pn,de.DynamicUI=hu,de.MicroDynamicDatatable=uu,de.MicroDynamicForm=fu,de.cn=Te,de.default=hu,de.setApiConfig=$i,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
118
|
+
`});return(A,C)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-2 w-full",t.unref(n).class]),"aria-busy":!1},[d.value?(t.openBlock(),t.createBlock(t.unref(Qn),{key:0,for:c.value,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(d.value)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",V_,"*")):t.createCommentVNode("",!0)]),_:1},8,["for"])):t.createCommentVNode("",!0),t.createElementVNode("div",M_,[e.showValue?(t.openBlock(),t.createElementBlock("div",T_,[t.createElementVNode("span",P_,t.toDisplayString(a.valuePrefix)+t.toDisplayString(e.min)+t.toDisplayString(a.valueSuffix),1),t.createElementVNode("span",O_,t.toDisplayString(m.value),1),t.createElementVNode("span",R_,t.toDisplayString(a.valuePrefix)+t.toDisplayString(e.max)+t.toDisplayString(a.valueSuffix),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",L_,[t.createElementVNode("div",{class:t.normalizeClass(["absolute top-1/2 -translate-y-1/2 w-full h-full bg-gray-200 rounded-lg pointer-events-none",[e.size==="sm"?"h-2":e.size==="md"?"h-2.5":"h-3"]])},[t.createElementVNode("div",{class:t.normalizeClass(["absolute top-0 left-0 h-full rounded-lg transition-all",[e.color==="blue"?"bg-blue-500":e.color==="green"?"bg-green-500":e.color==="red"?"bg-red-500":e.color==="yellow"?"bg-yellow-500":e.color==="purple"?"bg-purple-500":"bg-gray-500"]]),style:t.normalizeStyle({width:`${p.value}%`})},null,6)],2),t.createElementVNode("input",{id:c.value,ref_key:"sliderRef",ref:s,type:"range",value:e.modelValue,min:e.min,max:e.max,step:e.step,disabled:e.disabled,placeholder:e.placeholder,class:t.normalizeClass(u.value),onInput:y,onChange:b,onMousedown:g,onMouseup:E,onTouchstart:g,onTouchend:E},null,42,I_)]),e.marks.length>0?(t.openBlock(),t.createElementBlock("div",F_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.marks,x=>(t.openBlock(),t.createElementBlock("div",{key:x.value,class:"absolute flex flex-col items-center",style:t.normalizeStyle({left:`${_(x.value)}%`,transform:"translateX(-50%)"})},[C[0]||(C[0]=t.createElementVNode("div",{class:"w-1 h-2 bg-gray-400 rounded-full"},null,-1)),t.createElementVNode("span",z_,t.toDisplayString(x.label),1)],4))),128))])):t.createCommentVNode("",!0)]),l.value?(t.openBlock(),t.createElementBlock("div",$_,[C[1]||(C[1]=t.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),t.createTextVNode(" "+t.toDisplayString(e.error),1)])):t.createCommentVNode("",!0),B.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent("style"),{key:2},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.value),1)]),_:1})):t.createCommentVNode("",!0)],2)),[[t.vShow,f.value]])}}),U_={key:0,class:"ml-1 text-destructive"},W_={class:"inline-flex items-center gap-3"},H_=["id","name","aria-checked","aria-label","disabled"],q_={key:0,class:"absolute inset-0 flex items-center justify-center"},G_={class:"relative z-10 flex items-center gap-2"},K_=["id","name","aria-checked","aria-label","disabled"],X_={key:0,class:"absolute inset-0 flex items-center justify-center"},Y_={name:"DCodeSwitch"},fa=t.defineComponent({...Y_,props:{modelValue:{type:Boolean,default:!1},label:{default:""},title:{default:"Title"},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{default:"medium"},color:{default:"primary"},loading:{type:Boolean,default:!1},labelPosition:{default:"right"},id:{},name:{},required:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!1},tooltipActiveText:{default:"Aktif"},tooltipInactiveText:{default:"Tidak Aktif"}},emits:["update:modelValue","change"],setup(e,{emit:o}){const n=e,r=o,a=t.computed({get:()=>n.modelValue,set:u=>{!n.disabled&&!n.loading&&(r("update:modelValue",u),r("change",u))}}),s=t.computed(()=>{switch(n.size){case"small":return"w-9 h-5";case"large":return"w-14 h-7";default:return"w-11 h-6"}}),i=t.computed(()=>{switch(n.size){case"small":return"w-4 h-4";case"large":return"w-6 h-6";default:return"w-5 h-5"}}),l=t.computed(()=>{switch(n.size){case"small":return"translate-x-4";case"large":return"translate-x-7";default:return"translate-x-5"}}),c=t.computed(()=>{if(n.disabled)return"bg-gray-300";if(n.readonly)return a.value?"bg-blue-400 opacity-80":"bg-gray-200 opacity-80";if(!a.value)return"bg-gray-200";switch(n.color){case"success":return"bg-green-500";case"warning":return"bg-yellow-500";case"danger":return"bg-red-500";default:return"bg-blue-500"}}),d=()=>{n.disabled||n.readonly||n.loading||(a.value=!a.value)},f=t.computed(()=>a.value?n.tooltipActiveText:n.tooltipInactiveText);return(u,h)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["grid gap-3",n.disabled?"cursor-not-allowed":""])},[e.title?(t.openBlock(),t.createBlock(Qn,{key:0,class:"text-sm font-medium"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",U_,"*")):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",W_,[t.createVNode(t.unref(jl),null,{default:t.withCtx(()=>[e.showTooltip?(t.openBlock(),t.createBlock(t.unref(zl),{key:0,"delay-duration":200},{default:t.withCtx(()=>[t.createVNode(t.unref(Ul),{"as-child":""},{default:t.withCtx(()=>[t.createElementVNode("button",{type:"button",id:e.id,name:e.name,"aria-checked":a.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:t.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[t.createElementVNode("span",{class:t.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(t.openBlock(),t.createElementBlock("span",q_,[...h[0]||(h[0]=[t.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:t.withCtx(()=>[a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.X),{key:1,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):t.createCommentVNode("",!0)]),_:1})],2)],10,H_)]),_:1}),t.createVNode(t.unref($l),{side:"top","side-offset":8,class:t.normalizeClass(["animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 px-3 py-2 rounded-lg text-sm font-medium shadow-xl border-0",[a.value?"bg-green-600 dark:bg-green-500 text-white":"bg-gray-700 dark:bg-gray-600 text-white"]])},{default:t.withCtx(()=>[t.createElementVNode("span",G_,[t.createElementVNode("span",{class:t.normalizeClass(["inline-block w-2 h-2 rounded-full animate-pulse",a.value?"bg-green-200":"bg-gray-300"])},null,2),t.createTextVNode(" "+t.toDisplayString(f.value),1)])]),_:1},8,["class"])]),_:1})):(t.openBlock(),t.createElementBlock("button",{key:1,type:"button",id:e.id,name:e.name,"aria-checked":a.value?"true":"false","aria-label":e.label||"Toggle switch",disabled:e.disabled||e.loading,class:t.normalizeClass([s.value,c.value,"relative inline-flex items-center rounded-full transition-all duration-300 ease-in-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500","hover:scale-105 active:scale-95",{"cursor-not-allowed opacity-50":e.disabled,"cursor-wait":e.loading,"cursor-default opacity-80":e.readonly&&!e.loading,"cursor-pointer":!e.disabled&&!e.loading&&!e.readonly}]),onClick:d},[t.createElementVNode("span",{class:t.normalizeClass([i.value,a.value?l.value:"translate-x-0.5","inline-block transform rounded-full bg-white shadow-lg transition-all duration-300 ease-in-out","hover:shadow-xl flex items-center justify-center"])},[e.loading?(t.openBlock(),t.createElementBlock("span",X_,[...h[1]||(h[1]=[t.createElementVNode("svg",{class:"animate-spin h-3 w-3 text-gray-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"scale-0 rotate-90 opacity-0","enter-to-class":"scale-100 rotate-0 opacity-100","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"scale-100 rotate-0 opacity-100","leave-to-class":"scale-0 -rotate-90 opacity-0"},{default:t.withCtx(()=>[a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Check),{key:0,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-green-600 stroke-[3]"])},null,8,["class"])):!a.value&&!e.loading?(t.openBlock(),t.createBlock(t.unref(ne.X),{key:1,class:t.normalizeClass([e.size==="small"?"w-2.5 h-2.5":e.size==="large"?"w-4 h-4":"w-3 h-3","text-gray-400 stroke-[3]"])},null,8,["class"])):t.createCommentVNode("",!0)]),_:1})],2)],10,K_))]),_:1})])],2))}}),J_=["aria-busy"],Q_={key:0,class:"h-4 w-32 rounded bg-gray-200 dark:bg-gray-700 animate-pulse"},Z_=["for"],eB={key:0,class:"ml-1 text-destructive"},tB={class:"relative w-full group"},oB=["id","value"],nB={key:0,class:"absolute top-1 right-2"},rB={key:1,class:"absolute top-full right-0 z-10 text-[11px] text-gray-500 dark:text-gray-400 opacity-0 transition-opacity pointer-events-none group-focus-within:opacity-100"},aB={key:1,class:"text-xs text-destructive"},hn=t.defineComponent({name:"DCodeTextarea",inheritAttrs:!1,__name:"DCodeTextarea",props:{modelValue:{},clearable:{type:Boolean},hideClearWhenEmpty:{type:Boolean,default:!0},textCase:{default:"none"},applyTextCaseToValue:{type:Boolean,default:!0},valueType:{default:"free"},allowSpaces:{type:Boolean,default:!0},allowChars:{},pattern:{},visible:{type:Boolean,default:!0},skeleton:{type:Boolean,default:!1},showCharCount:{type:Boolean,default:!0},returnNumber:{type:Boolean,default:!1},error:{default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:modelValue","clear"],setup(e,{emit:o}){const n=t.useAttrs(),r=o,a=e,s=t.computed(()=>n.label),i=t.computed(()=>a.visible??!0),l=Math.random().toString(36).slice(2,7),c=t.computed(()=>`app-textarea-${n.id||s.value||"field"}-${l}`),d=t.computed(()=>{const Q=n.required,j=n["aria-required"];return Q===""||Q===!0||Q==="true"||(j==="true"||j===!0)}),f=t.computed(()=>{const{label:Q,class:j,id:Y,required:ae,"aria-required":ke,...Oe}=n,_e={...Oe};return a.disabled&&(_e.disabled=!0),a.readonly&&(_e.readonly=!0),_e}),u=t.computed(()=>{const Q=n.maxlength;let j=Number.NaN;return typeof Q=="number"?j=Q:typeof Q=="string"&&(j=Number.parseInt(Q,10)),Number.isFinite(j)&&j>0?j:-1}),h=Q=>u.value>0?Q.slice(0,u.value):Q,m=t.computed(()=>{const Q=a.modelValue;return Q==null||String(Q).length===0}),p=t.computed(()=>a.clearable?a.hideClearWhenEmpty?!m.value:!0:!1),y=t.ref(String(a.modelValue??""));t.watch(()=>a.modelValue,Q=>{const j=String(Q??"");j!==y.value&&(y.value=j)});const b=t.ref(!1),g=t.ref(!1),E=Q=>Q.split(/(\s+)/).map(j=>{if(j.trim()==="")return j;const Y=j.toLowerCase();return Y.charAt(0).toUpperCase()+Y.slice(1)}).join(""),_=Q=>{const j=Q.toLowerCase(),Y=j.search(new RegExp("\\p{L}","u"));return Y<0?j:j.slice(0,Y)+j.charAt(Y).toUpperCase()+j.slice(Y+1)},B=Q=>{switch(a.textCase){case"uppercase":return Q.toUpperCase();case"lowercase":return Q.toLowerCase();case"titlecase":return E(Q);case"sentencecase":return _(Q);case"none":default:return Q}},A=t.computed(()=>{switch(a.textCase){case"uppercase":return"uppercase";case"lowercase":return"lowercase";default:return"none"}}),C=Q=>{if(!Q)return null;const j=Array.isArray(Q)?Q.join(""):Q;return j?new Set(j):null},x=t.computed(()=>C(a.allowChars)),k=(Q,j)=>(Q.lastIndex=0,Q.test(j)),N=Q=>{if(Q===`
|
|
119
|
+
`)return a.valueType!=="number";if(a.valueType==="free")return!0;const j=Q===" ",Y=/\d/.test(Q),ae=new RegExp("\\p{L}","u").test(Q),ke=new RegExp("\\p{N}","u").test(Q);return a.valueType==="number"?Y:a.valueType==="letter"?ae||a.allowSpaces&&j:a.valueType==="letternumber"?ae||ke||a.allowSpaces&&j:!0},w=Q=>{let j="";for(const Y of Q){const ae=!!x.value&&x.value.has(Y);a.pattern&&!ae&&!k(a.pattern,Y)||!ae&&!N(Y)||(j+=Y)}return j},v=Q=>{const j=w(Q),Y=a.applyTextCaseToValue?B(j):j;return h(Y)};let S=null;const D=Q=>{if(Q==="")return null;if(a.valueType==="number"&&a.returnNumber){const j=Q.replaceAll(`
|
|
120
|
+
`,""),Y=Number(j);return Number.isFinite(Y)?Y:null}return Q},V=Q=>{y.value=Q,r("update:modelValue",D(Q))},R=(Q,j)=>{const Y=h(j);g.value=!0,Q.value=Y,V(Y),queueMicrotask(()=>g.value=!1)},O=(Q,j)=>{const Y=Q.selectionStart??Q.value.length,ae=Q.selectionEnd??Q.value.length;if(u.value>0){const ke=Q.value.length-(ae-Y),Oe=u.value-ke;if(Oe<=0)return;j=j.slice(0,Oe)}Q.setRangeText(j,Y,ae,"end"),R(Q,v(Q.value))},P=Q=>{var ae;if(!S||b.value||g.value||!((ae=Q.inputType)!=null&&ae.startsWith("insert")))return;const j=Q.data;if(j==null)return;const Y=v(j);Y!==j&&(Q.preventDefault(),Y.length>0&&O(S,Y))},L=Q=>{var ae;if(!S||b.value||g.value)return;const j=((ae=Q.clipboardData)==null?void 0:ae.getData("text"))??"",Y=v(j);Y!==j&&(Q.preventDefault(),Y.length>0&&O(S,Y))},$=async Q=>{if(!S||b.value||g.value)return;const j=Q.target,Y=j.value??"",ae=v(Y);if(ae===Y){const ke=j.selectionStart??ae.length,Oe=j.selectionEnd??ae.length;R(j,ae),await t.nextTick();try{j.setSelectionRange(ke,Oe)}catch{}V(ae)}else{const ke=j.selectionStart??ae.length,Oe=j.selectionEnd??ae.length;R(j,ae),await t.nextTick();try{j.setSelectionRange(ke,Oe)}catch{}}},T=()=>b.value=!0,I=()=>{if(b.value=!1,!S)return;const Q=S.value??"",j=v(Q);j===Q?V(j):R(S,j)};t.onMounted(()=>{if(S=document.getElementById(c.value),!S)return;S.addEventListener("beforeinput",P),S.addEventListener("paste",L),S.addEventListener("input",$),S.addEventListener("compositionstart",T),S.addEventListener("compositionend",I);const Q=S.value??"",j=v(Q);j===Q?V(j):R(S,j)}),t.onBeforeUnmount(()=>{S&&(S.removeEventListener("beforeinput",P),S.removeEventListener("paste",L),S.removeEventListener("input",$),S.removeEventListener("compositionstart",T),S.removeEventListener("compositionend",I),S=null)});const H=()=>{y.value="",S&&(S.value=""),r("update:modelValue",null),r("clear")},q=t.computed(()=>y.value.length),W=t.computed(()=>a.showCharCount?u.value>0:!1),Z=t.computed(()=>W.value&&q.value>0),te=t.computed(()=>`${q.value} / ${u.value}`),xe=t.computed(()=>!!a.error),Se=t.computed(()=>{const Q=n.rows,j=typeof Q=="number"?Q:Number.parseInt(String(Q??""),10);return Number.isFinite(j)&&j>0?j:3}),ye=t.computed(()=>({height:`${Se.value*24+16}px`}));return(Q,j)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-col gap-1 w-full",[t.unref(n).class,a.disabled?"cursor-not-allowed":""]]),"aria-busy":a.skeleton},[a.skeleton?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[s.value?(t.openBlock(),t.createElementBlock("div",Q_)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"w-full rounded-lg bg-gray-200 dark:bg-gray-700 animate-pulse",style:t.normalizeStyle(ye.value)},null,4)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[s.value?(t.openBlock(),t.createElementBlock("label",{key:0,for:c.value,class:"text-sm font-medium"},[t.createTextVNode(t.toDisplayString(s.value)+" ",1),d.value?(t.openBlock(),t.createElementBlock("span",eB,"*")):t.createCommentVNode("",!0)],8,Z_)):t.createCommentVNode("",!0),t.createElementVNode("div",tB,[t.createElementVNode("textarea",t.mergeProps({id:c.value,value:y.value},f.value,{style:`text-transform: ${A.value}; padding-right: ${p.value?"2.5rem":"0.75rem"} !important; padding-left: 0.75rem !important;`,class:["flex min-h-[120px] w-full rounded-lg border py-2 bg-white dark:bg-neutral-800 text-foreground dark:text-gray-300 border-gray-300 dark:border-neutral-700/50 focus:ring-1 focus:ring-neutral-400 dark:focus:ring-neutral-600 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 readonly:bg-neutral-50/50 dark:readonly:bg-neutral-900/30",xe.value?"border-destructive focus-visible:ring-destructive focus:ring-destructive":""]}),null,16,oB),p.value?(t.openBlock(),t.createElementBlock("div",nB,[t.createElementVNode("button",{type:"button",class:"text-muted-foreground hover:text-foreground text-sm leading-none","aria-label":"Clear textarea",onClick:H}," ✕ ")])):t.createCommentVNode("",!0),Z.value&&!xe.value?(t.openBlock(),t.createElementBlock("p",rB,t.toDisplayString(te.value),1)):t.createCommentVNode("",!0)]),xe.value?(t.openBlock(),t.createElementBlock("p",aB,t.toDisplayString(a.error),1)):t.createCommentVNode("",!0)],64))],10,J_)),[[t.vShow,i.value]])}}),Wf=t.defineComponent({__name:"Avatar",props:{class:{type:[Boolean,null,String,Object,Array]},size:{default:"sm"},shape:{default:"circle"}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ee.AvatarRoot),{class:t.normalizeClass(t.unref(Te)(t.unref(sB)({size:e.size,shape:e.shape}),o.class))},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["class"]))}}),Hf=t.defineComponent({__name:"AvatarFallback",props:{delayMs:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ee.AvatarFallback),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),qf=t.defineComponent({__name:"AvatarImage",props:{src:{},referrerPolicy:{},crossOrigin:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ee.AvatarImage),t.mergeProps(o,{class:"h-full w-full object-cover"}),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),sB=yr("inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden",{variants:{size:{sm:"h-10 w-10 text-xs",base:"h-16 w-16 text-2xl",lg:"h-32 w-32 text-5xl"},shape:{circle:"rounded-full",square:"rounded-md"}}}),ua=t.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Ee.Separator),t.mergeProps(t.unref(n),{class:t.unref(Te)("shrink-0 bg-border",o.orientation==="horizontal"?"h-px w-full":"w-px h-full",o.class)}),null,16,["class"]))}}),iB={class:"bg-card text-card-foreground"},lB={class:"pb-6 px-3"},cB={key:0,class:"flex justify-center p-8"},dB={key:1,class:"p-8 text-center text-red-500"},fB={key:2,class:"relative"},uB={class:"space-y-6"},hB={class:"rounded-xl border bg-card text-card-foreground shadow"},mB={class:"p-4"},pB={class:"flex items-center justify-between gap-3"},gB={class:"font-medium"},bB={class:"text-xs text-muted-foreground"},yB={class:"mt-1 text-sm text-muted-foreground"},xB={class:"text-foreground"},kB={class:"text-foreground"},wB={class:"mt-1 text-xs text-muted-foreground"},CB={key:0,class:"mt-3 flex items-center gap-2 text-sm"},EB={class:"flex items-center justify-between gap-3"},_B={class:"font-medium"},BB={class:"text-xs text-muted-foreground"},SB={class:"mt-2 text-sm text-muted-foreground"},AB={class:"flex flex-wrap items-center justify-between gap-3"},vB={class:"flex items-center gap-3"},DB={class:"leading-tight"},NB={class:"text-sm font-medium"},VB={class:"text-xs text-muted-foreground"},MB={class:"flex items-center gap-2"},TB={key:2,class:"flex flex-col gap-3 sm:flex-row sm:items-start"},PB={class:"h-16 w-16 shrink-0 rounded-lg bg-muted flex items-center justify-center"},OB=["src"],RB={class:"flex-1"},LB={class:"flex items-center justify-between gap-3"},IB={class:"font-medium"},FB={class:"text-xs text-muted-foreground"},zB={class:"mt-1 text-sm text-muted-foreground"},$B={class:"text-left sm:text-center"},jB={class:"text-xs text-muted-foreground"},UB={class:"text-left sm:text-center"},WB={class:"text-xs text-muted-foreground"},HB={class:"text-left sm:text-center"},qB={class:"text-xs text-muted-foreground"},GB={class:"flex items-center justify-between gap-3"},KB={class:"font-medium"},XB={class:"text-xs text-muted-foreground"},YB={class:"mt-2 text-sm text-muted-foreground"},JB={class:"mt-3 flex items-center gap-3"},QB={class:"text-sm font-medium"},ZB={class:"flex items-start justify-between gap-3"},eS={class:"font-medium"},tS={class:"mt-3 grid gap-2 text-sm"},oS={class:"flex items-center justify-between gap-3"},nS={class:"flex items-center gap-2 text-muted-foreground"},rS={class:"font-medium"},aS={class:"flex items-center justify-between gap-3"},sS={class:"flex items-center gap-2 text-muted-foreground"},iS={class:"font-medium"},lS={class:"flex items-center justify-between gap-3"},cS={class:"flex items-center gap-2 text-muted-foreground"},dS={class:"font-medium"},fS={class:"flex items-center justify-between"},uS={class:"flex items-center gap-2"},hS={class:"flex items-start justify-between gap-3"},mS={class:"flex items-center gap-2"},pS={class:"font-medium"},gS={class:"mt-2 text-sm text-muted-foreground"},bS={key:0,class:"mt-1 text-sm text-muted-foreground"},yS={class:"flex flex-wrap items-center justify-between gap-3"},xS={class:"flex items-center gap-2"},kS={class:"text-xs text-muted-foreground"},Gf=t.defineComponent({name:"DCodeTimelineWithIcons",__name:"DCodeTimelineWithIcons",props:{items:{},apiUrl:{},apiMethod:{}},setup(e){const n=Xe.useBreakpoints(Xe.breakpointsTailwind).smaller("md");t.ref(!1);const r=e,a=t.ref(!1),s=t.ref(null),i=t.ref([]),l=t.computed(()=>i.value.length>0?i.value:r.items&&r.items.length>0?r.items:[]),c=async()=>{if(r.apiUrl){a.value=!0,s.value=null;try{const u=await fetch(r.apiUrl,{method:r.apiMethod||"GET",headers:{"Content-Type":"application/json"}});if(!u.ok)throw new Error(`Error: ${u.status} ${u.statusText}`);const h=await u.json();Array.isArray(h)?i.value=h:h.data&&Array.isArray(h.data)?i.value=h.data:h.items&&Array.isArray(h.items)?i.value=h.items:i.value=[]}catch(u){console.error("Failed to fetch timeline items:",u),s.value=u.message||"Failed to fetch data"}finally{a.value=!1}}};t.onMounted(()=>{r.apiUrl&&c()}),t.watch(()=>r.apiUrl,()=>{r.apiUrl?c():i.value=[]});const d=u=>{switch(u){case"flight":return{Icon:ne.PlaneIcon,Circle:"bg-primary/10 text-primary border-primary/30"};case"interview":return{Icon:ne.ClockIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};case"product":return{Icon:ne.ShoppingCartIcon,Circle:"bg-amber-500/10 text-amber-600 border-amber-500/30"};case"design":return{Icon:ne.PencilIcon,Circle:"bg-sky-500/10 text-sky-600 border-sky-500/30"};case"server":return{Icon:ne.ServerIcon,Circle:"bg-rose-500/10 text-rose-600 border-rose-500/30"};case"location":return{Icon:ne.MapPinIcon,Circle:"bg-emerald-500/10 text-emerald-600 border-emerald-500/30"};default:return{Icon:ne.Circle,Circle:"bg-primary/10 text-primary border-primary/30"}}},f=u=>u.split(" ").filter(Boolean).slice(0,2).map(h=>{var m;return(m=h[0])==null?void 0:m.toUpperCase()}).join("");return(u,h)=>{const m=t.resolveComponent("ShoppingCart"),p=t.resolveComponent("DCodeBadge"),y=t.resolveComponent("RefreshCcw"),b=t.resolveComponent("MapPin");return t.openBlock(),t.createElementBlock("div",iB,[h[8]||(h[8]=t.createElementVNode("div",{class:"flex flex-col space-y-1.5 py-6 px-3"},[t.createElementVNode("h3",{class:"leading-none tracking-tight text-lg font-medium"},"Timeline With Icons")],-1)),t.createElementVNode("div",lB,[a.value?(t.openBlock(),t.createElementBlock("div",cB,[...h[0]||(h[0]=[t.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):s.value?(t.openBlock(),t.createElementBlock("div",dB,t.toDisplayString(s.value),1)):(t.openBlock(),t.createElementBlock("div",fB,[h[7]||(h[7]=t.createElementVNode("div",{class:"absolute left-4 top-0 h-full w-px bg-border"},null,-1)),t.createElementVNode("div",uB,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(g,E)=>(t.openBlock(),t.createElementBlock("div",{key:E,class:"relative pl-14"},[t.createElementVNode("div",{class:t.normalizeClass(["absolute left-0 top-2 flex h-8 w-8 items-center justify-center rounded-full border",d(g.type).Circle])},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d(g.type).Icon),{class:"h-4 w-4"}))],2),t.createElementVNode("div",hB,[t.createElementVNode("div",mB,[g.type==="flight"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",pB,[t.createElementVNode("p",gB,t.toDisplayString(g.title),1),t.createElementVNode("p",bB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",yB,[t.createElementVNode("span",xB,t.toDisplayString(g.from),1),t.createVNode(t.unref(ne.ArrowRight),{class:"mx-2 inline h-4 w-4"}),t.createElementVNode("span",kB,t.toDisplayString(g.to),1)]),t.createElementVNode("p",wB,t.toDisplayString(g.time),1),g.fileName?(t.openBlock(),t.createElementBlock("div",CB,[t.createVNode(t.unref(ne.FileText),{class:"h-4 w-4 text-muted-foreground"}),t.createElementVNode("span",null,t.toDisplayString(g.fileName),1)])):t.createCommentVNode("",!0)],64)):g.type==="interview"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",EB,[t.createElementVNode("p",_B,t.toDisplayString(g.title),1),t.createElementVNode("p",BB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",SB,t.toDisplayString(g.desc),1),t.createVNode(t.unref(ua),{class:"my-4"}),t.createElementVNode("div",AB,[t.createElementVNode("div",vB,[t.createVNode(t.unref(Wf),{class:"h-10 w-10"},{default:t.withCtx(()=>[g.avatarUrl?(t.openBlock(),t.createBlock(t.unref(qf),{key:0,src:g.avatarUrl},null,8,["src"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Hf),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),t.createElementVNode("div",DB,[t.createElementVNode("p",NB,t.toDisplayString(g.personName),1),t.createElementVNode("p",VB,t.toDisplayString(g.personRole),1)])]),t.createElementVNode("div",MB,[t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Phone),{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="product"?(t.openBlock(),t.createElementBlock("div",TB,[t.createElementVNode("div",PB,[g.imgUrl?(t.openBlock(),t.createElementBlock("img",{key:0,src:g.imgUrl,class:"h-full w-full rounded-lg object-cover",alt:"product"},null,8,OB)):(t.openBlock(),t.createBlock(m,{key:1,class:"h-5 w-5 text-muted-foreground"}))]),t.createElementVNode("div",RB,[t.createElementVNode("div",LB,[t.createElementVNode("p",IB,t.toDisplayString(g.title),1),t.createElementVNode("p",FB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",zB,t.toDisplayString(g.desc),1),t.createElementVNode("div",{class:t.normalizeClass(["mt-4 grid gap-3",t.unref(n)?"grid-cols-1":"grid-cols-3"])},[t.createElementVNode("div",$B,[h[1]||(h[1]=t.createElementVNode("p",{class:"text-sm font-medium"},"Customer",-1)),t.createElementVNode("p",jB,t.toDisplayString(g.customer),1)]),t.createElementVNode("div",UB,[h[2]||(h[2]=t.createElementVNode("p",{class:"text-sm font-medium"},"Price",-1)),t.createElementVNode("p",WB,t.toDisplayString(g.price),1)]),t.createElementVNode("div",HB,[h[3]||(h[3]=t.createElementVNode("p",{class:"text-sm font-medium"},"Quantity",-1)),t.createElementVNode("p",qB,t.toDisplayString(g.qty),1)])],2)])])):g.type==="design"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createElementVNode("div",GB,[t.createElementVNode("p",KB,t.toDisplayString(g.title),1),t.createElementVNode("p",XB,t.toDisplayString(g.meta),1)]),t.createElementVNode("p",YB,t.toDisplayString(g.desc),1),t.createElementVNode("div",JB,[t.createVNode(t.unref(Wf),{class:"h-10 w-10"},{default:t.withCtx(()=>[g.avatarUrl?(t.openBlock(),t.createBlock(t.unref(qf),{key:0,src:g.avatarUrl},null,8,["src"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Hf),null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(f(g.personName??"")),1)]),_:2},1024)]),_:2},1024),t.createElementVNode("p",QB,t.toDisplayString(g.personName),1)])],64)):g.type==="server"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",ZB,[t.createElementVNode("p",eS,t.toDisplayString(g.title),1),t.createVNode(p,{variant:"destructive",class:"h-6"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.chipText??""),1)]),_:2},1024)]),t.createElementVNode("div",tS,[t.createElementVNode("div",oS,[t.createElementVNode("div",nS,[t.createVNode(t.unref(ne.Globe),{class:"h-4 w-4"}),h[4]||(h[4]=t.createElementVNode("span",null,"IP Address",-1))]),t.createElementVNode("span",rS,t.toDisplayString(g.ip),1)]),t.createElementVNode("div",aS,[t.createElementVNode("div",sS,[t.createVNode(t.unref(ne.Cpu),{class:"h-4 w-4"}),h[5]||(h[5]=t.createElementVNode("span",null,"CPU",-1))]),t.createElementVNode("span",iS,t.toDisplayString(g.cpu),1)]),t.createElementVNode("div",lS,[t.createElementVNode("div",cS,[t.createVNode(t.unref(ne.CpuIcon),{class:"h-4 w-4"}),h[6]||(h[6]=t.createElementVNode("span",null,"Memory",-1))]),t.createElementVNode("span",dS,t.toDisplayString(g.memory),1)])]),t.createVNode(t.unref(ua),{class:"my-4"}),t.createElementVNode("div",fS,[t.createElementVNode("div",uS,[t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Share2),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(y,{class:"h-4 w-4"})]),_:1})])])],64)):g.type==="location"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createElementVNode("div",hS,[t.createElementVNode("div",mS,[t.createVNode(b,{class:"h-4 w-4 text-muted-foreground"}),t.createElementVNode("p",pS,t.toDisplayString(g.title),1)]),t.createVNode(p,{variant:"destructive",class:"h-6"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.chipText),1)]),_:2},1024)]),t.createElementVNode("p",gS,t.toDisplayString(g.desc1),1),g.desc2?(t.openBlock(),t.createElementBlock("p",bS,t.toDisplayString(g.desc2),1)):t.createCommentVNode("",!0),t.createVNode(t.unref(ua),{class:"my-4"}),t.createElementVNode("div",yS,[t.createElementVNode("div",xS,[t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Link),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.MessageSquare),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Pt),{size:"icon",variant:"ghost"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.User),{class:"h-4 w-4"})]),_:1})]),t.createElementVNode("p",kS,"Due date: "+t.toDisplayString(g.due),1)])],64)):t.createCommentVNode("",!0)])])]))),128))])]))])])}}}),wS={class:"dcode-upload-file"},CS={class:"border-2 border-dashed border-gray-300 dark:border-gray-700 rounded-lg p-6 flex flex-col items-center justify-center text-center hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors cursor-pointer"},ES={key:0,class:"text-xs text-gray-500 mt-1"},_S=["accept"],BS={key:1,class:"text-xs text-red-600 mt-1"},Kf=t.defineComponent({name:"DCodeUploadFile",__name:"DCodeUploadFile",props:{label:{},accept:{},errorMessage:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=o,r=a=>{var i;const s=(i=a.target.files)==null?void 0:i[0];s&&n("update:modelValue",s)};return(a,s)=>(t.openBlock(),t.createElementBlock("div",wS,[e.label?(t.openBlock(),t.createBlock(Wo,{key:0,label:e.label},null,8,["label"])):t.createCommentVNode("",!0),t.createElementVNode("div",CS,[t.createVNode(t.unref(ne.UploadCloud),{class:"w-8 h-8 text-gray-400 mb-2"}),s[0]||(s[0]=t.createElementVNode("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[t.createElementVNode("span",{class:"font-medium text-primary-600"},"Click to upload"),t.createTextVNode(" or drag and drop ")],-1)),e.accept?(t.openBlock(),t.createElementBlock("p",ES,t.toDisplayString(e.accept),1)):t.createCommentVNode("",!0),t.createElementVNode("input",{type:"file",class:"hidden",onChange:r,accept:e.accept},null,40,_S)]),e.errorMessage?(t.openBlock(),t.createElementBlock("p",BS,t.toDisplayString(e.errorMessage),1)):t.createCommentVNode("",!0)]))}}),SS=["onClick"],AS={key:1,class:"mr-2 text-xs font-bold shrink-0 opacity-50"},vS={class:"font-semibold text-sm whitespace-normal text-center leading-tight"},DS={key:1},NS={key:0,class:"text-white"},VS={key:1},MS={key:2},TS=["disabled","onClick"],PS={key:1,class:"mr-2 text-sm font-bold opacity-70"},OS={class:"whitespace-normal text-sm text-center leading-tight"},RS={class:"flex flex-col flex-1 min-w-0"},LS={class:"rounded-lg border bg-muted/30 px-4 py-3 text-sm text-muted-foreground flex items-center gap-2"},IS={class:"text-sm text-muted-foreground"},FS={class:"px-1"},zS=["disabled"],$S=["type"],jS=["disabled"],hi=ft(t.defineComponent({name:"DCodeWizard",__name:"DCodeWizard",props:{tabs:{},modelValue:{},defaultTab:{default:0},allowTabClick:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},cache:{type:Boolean,default:!0},autoFetchOnMount:{type:Boolean,default:!0},apiOptions:{type:[Object,Function],default:void 0},isVertical:{type:Boolean,default:!1},isWizard:{type:Boolean,default:!1},typeWizard:{default:"icon"},showNavigation:{type:Boolean,default:!0},submitText:{default:"Simpan"},loading:{type:Boolean,default:!1},isSubmit:{type:Boolean,default:!1}},emits:["update:modelValue","change","loaded","error"],setup(e,{emit:o}){const n=e,r=o,a=Je(),s=a==null?void 0:a.DCodeApi;typeof s!="function"&&console.error("[DCodeWizardTabs] useApi() must expose DCodeApi()");const i=t.ref(n.defaultTab),l=t.computed({get(){var x;if(typeof n.modelValue=="string"){const k=(x=n.tabs)==null?void 0:x.findIndex(N=>N.key===n.modelValue);if(k!==void 0&&k>=0)return k}return(typeof n.modelValue=="number"?n.modelValue:void 0)??i.value},set(x){var k;if(i.value=x,typeof n.modelValue=="string"){const N=(k=n.tabs)==null?void 0:k[x];N?r("update:modelValue",N.key):r("update:modelValue",x)}else r("update:modelValue",x)}}),c=t.computed(()=>{var x;return((x=n.tabs)==null?void 0:x.length)??0}),d=t.computed(()=>{var x;return(x=n.tabs)==null?void 0:x[l.value]});function f(x){return c.value<=0?0:Math.min(Math.max(x,0),c.value-1)}function u(x){return x?typeof x=="string"?No(x,Lt):x:null}const h=t.reactive({});function m(x){return h[x.key]||(h[x.key]={loaded:!1,loading:!1,data:null,error:null}),h[x.key]}function p(){if(n.apiOptions)return typeof n.apiOptions=="function"?n.apiOptions():n.apiOptions}function y(x){const k=x.endpoint||{};return{apiModule:x.apiModule||k.apiModule,apiAction:x.apiAction||k.apiAction,apiUrl:k.apiUrl,apiMethod:k.apiMethod||"GET",apiParams:x.apiParams}}function b(x){if(n.isWizard||!n.allowTabClick||n.disabled)return!1;const k=n.tabs[x];return!(!k||k.disabled)}async function g(x){if(typeof x.tab.fetchData=="function"){const V=await x.tab.fetchData(),R=(V==null?void 0:V.data)??V;return(R==null?void 0:R.data)??R}const k=y(x.tab);if(!(k.apiModule&&k.apiAction||k.apiUrl))return null;if(typeof s!="function")throw new Error("DCodeApi is not available");const w=p();let v;if(k.apiUrl)v=await s("","",w,{_url:k.apiUrl,_method:k.apiMethod,_data:k.apiParams??void 0});else{const V={...w,...k.apiParams};v=await s(k.apiModule,k.apiAction,V)}const S=(v==null?void 0:v.data)??v;return(S==null?void 0:S.data)??S}async function E(x,{force:k=!1}={}){const N=f(x),w=n.tabs[N];if(!w)return;const v=m(w);if(!(n.cache&&v.loaded&&!k)&&!v.loading){v.loading=!0,v.error=null;try{const S=await g({tabIndex:N,tab:w});v.data=S,v.loaded=!0,r("loaded",{tabIndex:N,tab:w,data:S})}catch(S){const D=typeof(S==null?void 0:S.message)=="string"&&S.message||typeof S=="string"&&S||"Failed to load tab data.";v.error=D,r("error",{tabIndex:N,tab:w,message:D})}finally{v.loading=!1}}}function _(x){const k=f(x);b(k)&&k!==l.value&&(l.value=k)}function B(x=l.value){return E(x,{force:!0})}function A(){const x=f(l.value-1);x!==l.value&&(l.value=x)}function C(){const x=f(l.value+1);x!==l.value&&(l.value=x)}return t.watch(()=>n.tabs,x=>{for(const k of x??[])m(k)},{immediate:!0}),t.watch(()=>l.value,async x=>{var N;const k=(N=n.tabs)==null?void 0:N[x];k&&r("change",{tabIndex:x,tab:k}),await E(x)},{immediate:!0}),t.watch(()=>n.autoFetchOnMount,async x=>{x&&await E(l.value)},{immediate:!0}),(x,k)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["w-full rounded-lg border bg-card text-card-foreground shadow-sm",{"flex flex-row":e.isVertical}])},[t.createElementVNode("div",{class:t.normalizeClass(["flex flex-col space-y-1.5 p-6",{"w-64 border-r pr-0":e.isVertical,"pb-2":e.isWizard&&!e.isVertical}])},[t.createElementVNode("div",{class:t.normalizeClass({"mt-4":!e.isVertical||e.isWizard})},[e.isWizard?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["w-full relative flex overflow-visible rounded-lg",e.isVertical?"flex-col gap-2":""])},[e.isVertical?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.tabs,(N,w)=>(t.openBlock(),t.createElementBlock("div",{key:N.key,class:"relative z-10 box-border flex items-center gap-3 w-full pb-6 last:pb-0"},[t.createElementVNode("div",{class:t.normalizeClass(["w-8 h-8 rounded-full flex shrink-0 items-center justify-center font-bold text-sm border-2 transition-all bg-card",[w<l.value?"border-[#2563eb] bg-[#2563eb] text-white dark:border-[#1e3a8a] dark:bg-[#1e3a8a]":w===l.value?"border-[#2563eb] text-[#2563eb] shadow-[0_0_0_2px_rgba(37,99,235,0.2)] dark:border-[#1e3a8a] dark:text-[#3b82f6] dark:shadow-[0_0_0_2px_rgba(30,58,138,0.2)]":"border-[#e2e8f0] text-[#94a3b8] dark:border-[#3f3f46] dark:text-[#71717a]"]])},[e.typeWizard==="icon"&&N.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(N.icon)),{key:0,class:"w-4 h-4"})):e.typeWizard==="number"||!N.icon&&e.typeWizard!=="none"?(t.openBlock(),t.createElementBlock("span",DS,[w<l.value?(t.openBlock(),t.createElementBlock("span",NS,"✓")):(t.openBlock(),t.createElementBlock("span",VS,t.toDisplayString(w+1),1))])):(t.openBlock(),t.createElementBlock("span",MS))],2),t.createElementVNode("span",{class:t.normalizeClass(["text-xs font-semibold whitespace-normal px-2 py-1 rounded transition-colors text-left",w===l.value?"text-[#2563eb] dark:text-[#3b82f6]":"text-[#64748b] dark:text-[#a1a1aa]"])},t.toDisplayString(N.title),3)]))),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.tabs,(N,w)=>(t.openBlock(),t.createElementBlock("div",{key:N.key,onClick:v=>_(w),style:t.normalizeStyle({zIndex:e.tabs.length-w}),class:"relative flex-1 group"},[t.createElementVNode("div",{class:t.normalizeClass(["relative flex items-center justify-center min-h-[3rem] h-auto py-2 px-2 cursor-pointer transition-colors w-full",[w>0?"pl-8":"",w===l.value?"bg-[#2563eb] text-white dark:bg-[#1e3a8a]":w<l.value?"bg-[#eff6ff] text-[#2563eb] hover:bg-[#dbeafe] dark:bg-[#191d2c] dark:text-[#3b82f6] dark:hover:bg-[#1e263d]":"bg-[#f8fafc] text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:bg-[#18181b] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#d4d4d8]"]])},[e.typeWizard==="icon"&&N.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(N.icon)),{key:0,class:"w-4 h-4 mr-2 shrink-0"})):e.typeWizard==="number"?(t.openBlock(),t.createElementBlock("span",AS,t.toDisplayString(w+1),1)):t.createCommentVNode("",!0),t.createElementVNode("span",vS,t.toDisplayString(N.title),1)],2),w<e.tabs.length-1?(t.openBlock(),t.createElementBlock("svg",{key:0,class:t.normalizeClass(["absolute top-0 -right-[15.5px] w-[16px] h-full transition-colors block z-10",[w===l.value?"fill-[#2563eb] text-[#2563eb] dark:fill-[#1e3a8a] dark:text-[#1e3a8a]":w<l.value?"fill-[#eff6ff] text-[#eff6ff] group-hover:fill-[#dbeafe] group-hover:text-[#dbeafe] dark:fill-[#191d2c] dark:text-[#191d2c] dark:group-hover:fill-[#1e263d] dark:group-hover:text-[#1e263d]":"fill-[#f8fafc] text-[#f8fafc] group-hover:fill-[#f1f5f9] group-hover:text-[#f1f5f9] dark:fill-[#18181b] dark:text-[#18181b] dark:group-hover:fill-[#27272a] dark:group-hover:text-[#27272a]"]]),preserveAspectRatio:"none",viewBox:"0 0 16 48"},[...k[0]||(k[0]=[t.createElementVNode("polygon",{points:"0,0 16,24 0,48"},null,-1)])],2)):t.createCommentVNode("",!0)],12,SS))),128))],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex w-full",e.isVertical?"flex-col gap-1":"flex-wrap border-b border-separate"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabs,(N,w)=>(t.openBlock(),t.createElementBlock("button",{key:N.key,type:"button",disabled:!b(w),onClick:v=>_(w),class:t.normalizeClass(["relative min-h-[3rem] h-auto py-2 flex items-center justify-center gap-2 px-4 transition-all rounded-none focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 border-[#e2e8f0] dark:border-[#3f3f46]",t.unref(Te)("border-b border-r",!e.isVertical&&w===e.tabs.length-1&&"border-r-0",w===l.value?"bg-[#2563eb]/[0.08] text-[#2563eb] font-semibold dark:bg-[#191d2c] dark:text-[#3b82f6]":"bg-transparent text-[#64748b] hover:bg-[#f1f5f9] hover:text-[#334155] dark:text-[#a1a1aa] dark:hover:bg-[#27272a] dark:hover:text-[#f4f4f5]",!b(w)&&"opacity-60 cursor-not-allowed",e.isVertical?"w-full justify-start border-r-0":"flex-1")])},[e.typeWizard==="icon"&&N.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u(N.icon)),{key:0,class:"h-4 w-4 shrink-0"})):e.typeWizard==="number"?(t.openBlock(),t.createElementBlock("span",PS,t.toDisplayString(w+1),1)):t.createCommentVNode("",!0),t.createElementVNode("span",OS,t.toDisplayString(N.title),1)],10,TS))),128))],2))],2)],2),e.isVertical?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(ua),{key:0})),t.createElementVNode("div",RS,[t.createElementVNode("div",{class:t.normalizeClass(["p-6 flex-1 min-w-0",{"pl-6":e.isVertical}])},[t.createVNode(t.Transition,{name:"wizard-fade",mode:"out-in"},{default:t.withCtx(()=>{var N,w,v,S;return[(t.openBlock(),t.createElementBlock("div",{key:((N=d.value)==null?void 0:N.key)||l.value,class:"w-full"},[d.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[(w=h[d.value.key])!=null&&w.loading?t.renderSlot(x.$slots,"loading",{key:0,tab:d.value,tabIndex:l.value},()=>[t.createElementVNode("div",LS,[t.createVNode(t.unref(ne.Loader2),{class:"w-4 h-4 animate-spin"}),k[1]||(k[1]=t.createTextVNode(" Loading... ",-1))])],!0):t.renderSlot(x.$slots,`tab-${d.value.key}`,{key:1,tab:d.value,tabIndex:l.value,data:(v=h[d.value.key])==null?void 0:v.data,loaded:(S=h[d.value.key])==null?void 0:S.loaded,reload:B},()=>[t.createElementVNode("div",IS,[k[2]||(k[2]=t.createTextVNode(" Slot ",-1)),t.createElementVNode("code",FS,"tab-"+t.toDisplayString(d.value.key),1),k[3]||(k[3]=t.createTextVNode(" belum dibuat. ",-1))])],!0)],64)):t.createCommentVNode("",!0)]))]}),_:3})],2),e.isWizard||e.showNavigation?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["flex items-center justify-between p-6 pt-0",{"pl-6":e.isVertical}])},[t.createElementVNode("button",{type:"button",onClick:A,disabled:l.value<=0,class:"relative inline-flex items-center justify-center gap-2 px-5 py-2.5 text-sm font-medium transition-all duration-300 rounded-lg bg-[#ffffff] border border-[#e2e8f0] text-[#334155] shadow-sm hover:bg-[#f8fafc] hover:text-[#0f172a] hover:-translate-y-0.5 hover:shadow disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#ffffff] disabled:hover:text-[#334155] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#18181b] dark:border-[#27272a] dark:text-[#d4d4d8] dark:hover:bg-[#27272a] dark:hover:border-[#3f3f46] dark:disabled:hover:bg-[#18181b] dark:disabled:hover:text-[#d4d4d8] focus:outline-none focus:ring-2 focus:ring-[#e2e8f0] focus:ring-offset-2 active:scale-95"}," Sebelumnya ",8,zS),l.value<c.value-1?(t.openBlock(),t.createElementBlock("button",{key:0,type:e.isSubmit?"submit":"button",onClick:C,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"}," Selanjutnya ",8,$S)):(t.openBlock(),t.createElementBlock("button",{key:1,type:"submit",disabled:e.loading,class:"relative inline-flex items-center justify-center gap-2 px-6 py-2.5 text-sm font-medium text-[#ffffff] transition-all duration-300 rounded-lg shadow-md bg-[#2563eb] hover:bg-[#1d4ed8] hover:shadow-lg hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed disabled:shadow-none disabled:hover:bg-[#2563eb] disabled:hover:translate-y-0 disabled:active:scale-100 dark:bg-[#1e3a8a] dark:hover:bg-[#1e40af] focus:outline-none focus:ring-2 focus:ring-[#2563eb] focus:ring-offset-2 active:scale-95"},[e.loading?(t.openBlock(),t.createBlock(t.unref(ne.Loader2),{key:0,class:"w-4 h-4 mr-2 animate-spin"})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.submitText),1)],8,jS))],2)):t.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-3330e7b3"]]),US={class:"permission-menu w-full space-y-4"},WS={class:"bg-neutral-50/50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-4"},HS={class:"flex items-center justify-between"},qS={class:"flex items-center gap-3 flex-1"},GS=["onClick"],KS={key:1,class:"w-7"},XS={key:2,class:"flex-shrink-0"},YS={class:"text-lg font-semibold flex-1"},JS={key:0,class:"p-4 bg-gray-50 dark:bg-zinc-900/50 border-b border-gray-200 dark:border-neutral-700"},QS={class:"text-xs font-semibold text-gray-600 dark:text-neutral-400 uppercase tracking-wide mb-3"},ZS={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},eA=["checked","disabled","onChange"],tA={class:"text-sm font-medium text-gray-700 dark:text-neutral-300 group-hover:text-blue-700 dark:group-hover:text-primary-400"},oA={key:0,class:"p-4 space-y-3 bg-gray-50 dark:bg-zinc-900/30"},nA={class:"text-sm font-semibold text-gray-700 dark:text-neutral-300 mb-3 flex items-center gap-2"},rA={class:"bg-neutral-50 dark:bg-neutral-900/30 border-b border-neutral-200/60 dark:border-neutral-700/30 text-neutral-900 dark:text-neutral-100 p-3"},aA={class:"flex items-center justify-between"},sA={class:"flex items-center gap-3 flex-1"},iA={key:0,class:"flex-shrink-0"},lA={class:"text-base font-semibold flex-1"},cA={key:1,class:"text-xs bg-white/20 px-2 py-1 rounded font-mono hidden sm:inline-block"},dA={class:"flex items-center gap-2 px-2.5 py-1 bg-white/20 hover:bg-white/30 rounded-lg cursor-pointer transition-colors"},fA=["checked","onChange"],uA={class:"text-xs font-medium"},hA={key:0,class:"p-3"},mA={class:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-2 w-full"},pA=["checked","disabled","onChange"],gA={class:"text-xs font-medium text-gray-700 dark:text-neutral-300 group-hover:text-pink-700 dark:group-hover:text-pink-400"},mi=ft(t.defineComponent({__name:"DCodePermissionMenu",props:{menuList:{default:()=>[]},enableParentControl:{type:Boolean,default:!1},showIcons:{type:Boolean,default:!0},modelValue:{default:()=>[]},treeData:{default:()=>[]}},emits:["permission-change","menu-check","update:modelValue"],setup(e,{expose:o,emit:n}){const{t:r}=_t.useI18n(),a=e,s=n,i=t.computed(()=>a.menuList&&a.menuList.length>0?a.menuList:a.treeData||[]),l=t.ref(new Map),c=t.ref(new Set),d=(w=!0)=>{(S=>{S.forEach(D=>{D.permission.forEach(V=>{const R=`${D.id}-${V.id}-parent`,O=V.code==="VIEW"||V.name.toUpperCase()==="VIEW";l.value.has(R)||l.value.set(R,O||(w?D.checked??!1:!1))}),D.detail&&D.detail.length>0&&D.detail.forEach(V=>{V.permission.forEach(R=>{const O=`${V.id}-${R.id}-child`,P=R.code==="VIEW"||R.name.toUpperCase()==="VIEW";l.value.has(O)||l.value.set(O,P||(w?V.checked??!1:!1))})})})})(i.value)},f=()=>{console.log("[DCodePermissionMenu] initializeFromModelValue called. modelValue:",a.modelValue),l.value.clear(),d(!1),a.modelValue&&a.modelValue.length>0&&a.modelValue.forEach(w=>{const v=w.menuId,S=w.actionsIds;i.value.forEach(D=>{D.id===v&&S.forEach(V=>{const R=`${v}-${V}-parent`;l.value.set(R,!0)}),D.detail&&D.detail.length>0&&D.detail.forEach(V=>{V.id===v&&S.forEach(R=>{const O=`${v}-${R}-child`;l.value.set(O,!0)})})})})};f(),t.watch(()=>a.modelValue,()=>{f()},{deep:!0}),t.watch(()=>i.value.length,(w,v)=>{v===0&&w>0&&f()});const u=w=>w.detail&&w.detail.length>0,h=w=>{c.value.has(w)?c.value.delete(w):c.value.add(w)},m=w=>c.value.has(w),p=(w,v,S=!1)=>{const D=`${w}-${v}-${S?"child":"parent"}`;return l.value.get(D)??!1},y=()=>{const w=C();s("update:modelValue",w.permissions)},b=(w,v,S,D=!1)=>{const V=S.target.checked,R=`${w}-${v}-${D?"child":"parent"}`;l.value.set(R,V),s("permission-change",w,v,V,!D),y()},g=w=>w.permission.filter(E),E=w=>w.code==="VIEW"||w.name.toUpperCase()==="VIEW",_=(w,v,S)=>{const D=S.target.checked;v.permission.forEach(V=>{if(E(V)){const O=`${v.id}-${V.id}-child`;l.value.set(O,!0);return}const R=`${v.id}-${V.id}-child`;l.value.set(R,D)}),l.value=new Map(l.value),s("menu-check",v.id,D),y()},B=(w,v=!1)=>{const S=v?w.permission:g(w);return!S||S.length===0?!1:S.every(D=>{const V=`${w.id}-${D.id}-${v?"child":"parent"}`;return l.value.get(V)??!1})},A=()=>{const w={};return i.value.forEach(v=>{var S;w[v.id]={name:v.name,parentPermissions:v.permission.map(D=>({id:D.id,name:D.name,checked:p(v.id,D.id,!1)})),children:((S=v.detail)==null?void 0:S.map(D=>({id:D.id,name:D.name,permissions:D.permission.map(V=>({id:V.id,name:V.name,checked:p(D.id,V.id,!0)}))})))||[]}}),w},C=()=>{const w=[],v=(S,D=!1)=>{const V=[];S.permission.forEach(R=>{const O=`${S.id}-${R.id}-${D?"child":"parent"}`;(l.value.get(O)??!1)&&V.push(R.id)}),V.length>0&&w.push({menuId:S.id,actionsIds:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(D=>{v(D,!0)})}),{permissions:w}};return o({getCurrentStates:A,getPermissionsForDatabase:C,getAllPermissionsWithStatus:()=>{const w=[],v=(S,D=!1)=>{const V=S.permission.map(O=>{const P=`${S.id}-${O.id}-${D?"child":"parent"}`,L=l.value.get(P)??!1;return{id:O.id,name:O.name,checked:L}}),R=V.filter(O=>O.checked).map(O=>O.id);w.push({menuId:S.id,menuName:S.name,actionsIds:R,actions:V})};return i.value.forEach(S=>{v(S,!1),S.detail&&S.detail.length>0&&S.detail.forEach(D=>{v(D,!0)})}),{permissions:w}},permissionStates:l,expandAll:()=>{i.value.forEach(w=>{u(w)&&c.value.add(w.id)})},collapseAll:()=>{c.value.clear()}}),(w,v)=>(t.openBlock(),t.createElementBlock("div",US,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,S=>(t.openBlock(),t.createElementBlock("div",{key:S.id,class:t.normalizeClass(["dcode-card overflow-hidden",{"border-l-4 border-l-blue-500":u(S)}])},[t.createElementVNode("div",WS,[t.createElementVNode("div",HS,[t.createElementVNode("div",qS,[u(S)?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:D=>h(S.id),type:"button",class:"p-1 hover:bg-white/20 rounded-lg transition-colors"},[m(S.id)?(t.openBlock(),t.createBlock(t.unref(ne.ChevronDown),{key:0,class:"w-5 h-5"})):(t.openBlock(),t.createBlock(t.unref(ne.ChevronRight),{key:1,class:"w-5 h-5"}))],8,GS)):(t.openBlock(),t.createElementBlock("div",KS)),e.showIcons&&S.icon?(t.openBlock(),t.createElementBlock("span",XS,[t.createElementVNode("i",{class:t.normalizeClass([S.icon,"text-2xl"])},null,2)])):t.createCommentVNode("",!0),t.createElementVNode("h3",YS,t.toDisplayString(S.name),1)])])]),S.permission&&S.permission.length>0&&!u(S)?(t.openBlock(),t.createElementBlock("div",JS,[t.createElementVNode("h4",QS,t.toDisplayString(t.unref(r)("common.permissions"))+": ",1),t.createElementVNode("div",ZS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g(S),D=>(t.openBlock(),t.createElementBlock("label",{key:D.id,class:"flex items-center gap-2 px-3 py-2 bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700/50 rounded-lg cursor-pointer hover:border-blue-400 dark:hover:border-primary-500 hover:bg-blue-50 dark:hover:bg-neutral-900/50 transition-all group"},[t.createElementVNode("input",{type:"checkbox",checked:E(D)||p(S.id,D.id,!1),disabled:E(D),onChange:V=>b(S.id,D.id,V,!1),class:t.normalizeClass(["w-4 h-4 text-blue-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-blue-500 dark:focus:ring-blue-600",E(D)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,eA),t.createElementVNode("span",tA,t.toDisplayString(D.name),1)]))),128))])])):t.createCommentVNode("",!0),t.createVNode(t.Transition,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"opacity-100 max-h-[5000px]","leave-active-class":"transition-all duration-300 ease-in","leave-from-class":"opacity-100 max-h-[5000px]","leave-to-class":"opacity-0 max-h-0"},{default:t.withCtx(()=>[u(S)&&m(S.id)?(t.openBlock(),t.createElementBlock("div",oA,[t.createElementVNode("h4",nA,[v[0]||(v[0]=t.createElementVNode("span",{class:"w-1 h-4 bg-blue-500 rounded"},null,-1)),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("common.subMenus")),1)]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(S.detail,D=>(t.openBlock(),t.createElementBlock("div",{key:D.id,class:"bg-white dark:bg-neutral-800 rounded-lg border border-gray-200 dark:border-neutral-700/50 overflow-hidden shadow-sm hover:shadow transition-shadow"},[t.createElementVNode("div",rA,[t.createElementVNode("div",aA,[t.createElementVNode("div",sA,[e.showIcons&&D.icon?(t.openBlock(),t.createElementBlock("span",iA,[t.createElementVNode("i",{class:t.normalizeClass([D.icon,"text-xl"])},null,2)])):t.createCommentVNode("",!0),t.createElementVNode("h5",lA,t.toDisplayString(D.name),1),D.path?(t.openBlock(),t.createElementBlock("span",cA,t.toDisplayString(D.path),1)):t.createCommentVNode("",!0),t.createElementVNode("label",dA,[t.createElementVNode("input",{type:"checkbox",checked:B(D,!0),onChange:V=>_(S,D,V),class:"w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600 cursor-pointer"},null,40,fA),t.createElementVNode("span",uA,t.toDisplayString(t.unref(r)("common.selectAll")),1)])])])]),D.permission&&D.permission.length>0?(t.openBlock(),t.createElementBlock("div",hA,[t.createElementVNode("div",mA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.permission,V=>(t.openBlock(),t.createElementBlock("label",{key:V.id,class:"flex items-center gap-2 px-2.5 py-1.5 bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-neutral-700 rounded-md cursor-pointer hover:border-pink-400 dark:hover:border-pink-500 hover:bg-pink-50 dark:hover:bg-pink-900/20 transition-all group"},[t.createElementVNode("input",{type:"checkbox",checked:E(V)||p(D.id,V.id,!0),disabled:E(V),onChange:R=>b(D.id,V.id,R,!0),class:t.normalizeClass(["w-3.5 h-3.5 text-pink-600 border-gray-300 dark:border-neutral-600 dark:bg-zinc-800 rounded focus:ring-pink-500 dark:focus:ring-pink-600",E(V)?"cursor-not-allowed opacity-75":"cursor-pointer"])},null,42,pA),t.createElementVNode("span",gA,t.toDisplayString(V.name),1)]))),128))])])):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)]),_:2},1024)],2))),128))]))}}),[["__scopeId","data-v-40ddf81d"]]),bA={class:"space-y-4"},yA={key:0,class:"block text-sm font-medium text-neutral-700 dark:text-neutral-300 mb-2"},xA={key:0,class:"text-danger-500"},kA={key:1,class:"flex items-center justify-center p-8 bg-white dark:bg-gray-800 rounded-lg shadow"},wA={class:"text-neutral-600 dark:text-neutral-400"},CA={key:2,class:"p-6 bg-white dark:bg-gray-800 rounded-lg shadow text-center"},EA={class:"text-neutral-500 dark:text-neutral-400"},_A={key:3,class:"space-y-3"},BA={class:"flex items-center justify-between p-4 bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700"},SA={class:"flex items-center gap-3"},AA={class:"font-medium text-gray-900 dark:text-gray-100 text-base"},vA={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},DA={class:"flex items-center gap-2 text-sm font-medium"},NA={class:"px-2.5 py-1 rounded-full bg-primary-100 dark:bg-primary-900 text-primary-700 dark:text-primary-300"},VA={class:"p-4"},MA={class:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3"},TA={class:"ml-2 flex-1 min-w-0"},PA=["for"],OA={key:0,class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5 line-clamp-2"},RA={key:4,class:"mt-1 text-xs text-danger-600"},pi=t.defineComponent({__name:"DCodeTreePermissions",props:{modelValue:{},label:{},required:{type:Boolean},disabled:{type:Boolean},error:{},treeData:{}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,{t:a}=_t.useI18n(),s=t.ref(!0),i=t.ref([]),l=t.ref({}),c=t.ref([]),d=t.ref({}),f=g=>{if(console.log(g),!g)return[];if(Array.isArray(g)&&g.length>0&&g[0].module&&Array.isArray(g[0].permissions))return g.map(E=>({menuId:E.menuId,module:E.module,label:E.label||E.module,permissions:E.permissions}));if(Array.isArray(g)&&g.length>0&&g[0].key){const E={};return g.forEach(_=>{const B=_.key,A=B&&B.includes(".")?B.split(".")[0]:"other";E[A]||(E[A]={menuId:0,module:A,label:A,permissions:[]}),E[A].permissions.push({id:_.id,key:_.key,label:_.label,description:_.description})}),Object.values(E)}if(Array.isArray(g)&&g.length>0&&g[0].id&&g[0].name&&Array.isArray(g[0].permission)){const E=[],_=(B,A="")=>{const C=A?`${A}.${B.name}`:B.name,x=C.toLowerCase().replace(/\s+/g,"_"),k=[];if(B.detail&&Array.isArray(B.detail)&&B.detail.forEach(N=>{k.push(N.id)}),B.permission&&B.permission.length>0){const N=B.permission.map(w=>({id:w.id,key:`${x}.${w.name.toLowerCase().replace(/\s+/g,"_")}`,label:`${w.name} ${B.name}`,description:`Permission to ${w.name.toLowerCase()} ${B.name.toLowerCase()}`}));E.push({menuId:B.id,module:x,label:B.name,permissions:N,subMenuIds:k.length>0?k:void 0})}B.detail&&Array.isArray(B.detail)&&B.detail.forEach(N=>{_(N,C)})};return g.forEach(B=>_(B)),E}return g.data?f(g.data):[]},u=async()=>{s.value=!0;try{let g;n.treeData&&n.treeData.length>0?g=n.treeData:g=[];const E=f(g);i.value=E;const _={},B=[],A={};E.forEach(x=>{x.permissions.forEach(k=>{const N=typeof k.id=="string"?parseInt(k.id):k.id;A[N]=x.menuId})});const C=new Set;n.modelValue&&Array.isArray(n.modelValue)&&n.modelValue.forEach(x=>{B.push(x.menuId),x.actionsIds&&Array.isArray(x.actionsIds)&&x.actionsIds.forEach(k=>C.add(k))}),E.forEach(x=>x.permissions.forEach(k=>{const N=typeof k.id=="string"?parseInt(k.id):k.id;_[N]=C.has(N)})),l.value=_,c.value=B,d.value=A}catch{i.value=[]}finally{s.value=!1}},h=g=>g.permissions.filter(E=>{const _=typeof E.id=="string"?parseInt(E.id):E.id;return l.value[_]}).length,m=g=>g.permissions.every(E=>{const _=typeof E.id=="string"?parseInt(E.id):E.id;return l.value[_]}),p=g=>{const E=h(g);return E>0&&E<g.permissions.length},y=t.ref(!1),b=(g,E)=>{y.value=!0,g.permissions.map(A=>typeof A.id=="string"?parseInt(A.id):A.id),g.permissions.forEach(A=>{const C=typeof A.id=="string"?parseInt(A.id):A.id;l.value[C]=E});let _=n.modelValue?[...n.modelValue]:[],B=[g.menuId];g.subMenuIds&&g.subMenuIds.length>0&&(B=[...B,...g.subMenuIds],g.subMenuIds.forEach(A=>{const C=i.value.find(x=>x.menuId===A);C&&C.permissions.forEach(x=>{const k=typeof x.id=="string"?parseInt(x.id):x.id;l.value[k]=E})})),E?B.forEach(A=>{const C=i.value.find(x=>x.menuId===A);if(C){const x=C.permissions.map(N=>typeof N.id=="string"?parseInt(N.id):N.id),k=_.findIndex(N=>N.menuId===A);k!==-1?_[k]={menuId:A,actionsIds:x}:_.push({menuId:A,actionsIds:x})}}):_=_.filter(A=>!B.includes(A.menuId)),c.value=_.map(A=>A.menuId),console.log("Full Result:",JSON.stringify(_,null,2)),r("update:modelValue",_),setTimeout(()=>{y.value=!1},100)};return t.watch(()=>n.modelValue,g=>{if(!g)return;const E=new Set,_=[];g.forEach(B=>{_.push(B.menuId),B.actionsIds&&Array.isArray(B.actionsIds)&&B.actionsIds.forEach(A=>E.add(A))}),Object.keys(l.value).forEach(B=>{const A=parseInt(B);l.value[A]=E.has(A)}),c.value=_}),t.watch(()=>n.treeData,g=>{g&&g.length>0&&u()},{deep:!0}),t.watch(l,(g,E)=>{if(y.value)return;if(Object.keys(g).map(B=>parseInt(B)).filter(B=>g[B]!==(E==null?void 0:E[B])).length>0){let B=n.modelValue?[...n.modelValue]:[];const A={};Object.keys(g).forEach(C=>{const x=parseInt(C);if(g[x]){const k=d.value[x];console.log(`Permission ${x} belongs to Menu ${k}`),k!==void 0&&(A[k]||(A[k]=[]),A[k].push(x))}}),Object.keys(A).forEach(C=>{const x=parseInt(C),k=A[x],N=B.findIndex(w=>w.menuId===x);N!==-1?B[N]={menuId:x,actionsIds:k}:B.push({menuId:x,actionsIds:k})}),B=B.filter(C=>A[C.menuId]&&A[C.menuId].length>0),c.value=B.map(C=>C.menuId),console.log("Result:",JSON.stringify(B,null,2)),r("update:modelValue",B)}},{deep:!0}),t.onMounted(u),(g,E)=>(t.openBlock(),t.createElementBlock("div",bA,[e.label?(t.openBlock(),t.createElementBlock("label",yA,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",xA,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),s.value?(t.openBlock(),t.createElementBlock("div",kA,[t.createVNode(t.unref(ne.Loader2),{class:"animate-spin text-primary-600 mr-2",size:24}),t.createElementVNode("span",wA,t.toDisplayString(t.unref(a)("common.loadingPermissions")),1)])):i.value.length===0?(t.openBlock(),t.createElementBlock("div",CA,[t.createElementVNode("p",EA,t.toDisplayString(t.unref(a)("common.noPermissions")),1)])):(t.openBlock(),t.createElementBlock("div",_A,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,_=>(t.openBlock(),t.createElementBlock("div",{key:_.module,class:"bg-white dark:bg-neutral-800 rounded-lg border border-neutral-200/60 dark:border-neutral-700/50 shadow-sm hover:shadow-md transition-shadow"},[t.createElementVNode("div",BA,[t.createElementVNode("div",SA,[t.createVNode(io,{modelValue:m(_),indeterminate:p(_),"onUpdate:modelValue":B=>b(_,!!B),disabled:e.disabled},null,8,["modelValue","indeterminate","onUpdate:modelValue","disabled"]),t.createElementVNode("div",null,[t.createElementVNode("div",AA,t.toDisplayString(_.label||_.module),1),t.createElementVNode("div",vA,t.toDisplayString(h(_))+" "+t.toDisplayString(t.unref(a)("common.from"))+" "+t.toDisplayString(_.permissions.length)+" "+t.toDisplayString(t.unref(a)("common.selected")),1)])]),t.createElementVNode("div",DA,[t.createElementVNode("div",NA,t.toDisplayString(h(_))+"/"+t.toDisplayString(_.permissions.length),1)])]),t.createElementVNode("div",VA,[t.createElementVNode("div",MA,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.permissions,B=>(t.openBlock(),t.createElementBlock("div",{key:B.id,class:"flex items-start p-2 rounded hover:bg-gray-50 dark:hover:bg-gray-750 transition-colors"},[t.createVNode(io,{modelValue:l.value[typeof B.id=="string"?parseInt(B.id):B.id],"onUpdate:modelValue":A=>l.value[typeof B.id=="string"?parseInt(B.id):B.id]=A,disabled:e.disabled,class:"flex-shrink-0"},null,8,["modelValue","onUpdate:modelValue","disabled"]),t.createElementVNode("div",TA,[t.createElementVNode("label",{for:`perm-${B.id}`,class:"text-sm font-medium text-gray-700 dark:text-gray-300 cursor-pointer block"},t.toDisplayString(B.label||B.key),9,PA),B.description?(t.openBlock(),t.createElementBlock("p",OA,t.toDisplayString(B.description),1)):t.createCommentVNode("",!0)])]))),128))])])]))),128))])),e.error?(t.openBlock(),t.createElementBlock("p",RA,t.toDisplayString(e.error),1)):t.createCommentVNode("",!0)]))}}),LA={key:0,class:"fixed inset-0 z-[100] flex justify-end"},IA={key:0,class:"relative w-full max-w-sm h-full bg-white dark:bg-slate-900 shadow-2xl flex flex-col border-l border-gray-200 dark:border-gray-800"},FA={class:"px-6 py-4 border-b border-gray-100 dark:border-gray-800 flex items-center justify-between"},zA={class:"text-lg font-semibold text-gray-900 dark:text-gray-100"},$A={key:0,class:"text-sm text-gray-500 dark:text-gray-400 mt-1"},jA={class:"flex-1 overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-gray-200 dark:scrollbar-thumb-gray-800"},UA={class:"px-6 py-4 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-slate-900/50"},WA=t.defineComponent({__name:"DataFilterSheet",props:{title:{default:"Filter Data"},description:{default:"Masukan parameter pencarian untuk memfilter data."}},setup(e,{expose:o}){const n=t.ref(!1),r=()=>{n.value=!0,document.body.style.overflow="hidden"},a=()=>{n.value=!1,document.body.style.overflow=""};return o({open:r,close:a}),(s,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{onClick:r},[t.renderSlot(s.$slots,"trigger",{},()=>[t.createVNode(He,{variant:"outline",class:"gap-2",icon:"Search",text:"Pencarian"})])]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[n.value?(t.openBlock(),t.createElementBlock("div",LA,[t.createVNode(t.Transition,{appear:"","enter-active-class":"transition-opacity duration-300 ease-out","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-200 ease-in","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fixed inset-0 bg-black/40 backdrop-blur-sm",onClick:a})):t.createCommentVNode("",!0)]),_:1}),t.createVNode(t.Transition,{appear:"","enter-active-class":"transition-transform duration-300 ease-out","enter-from-class":"translate-x-full","enter-to-class":"translate-x-0","leave-active-class":"transition-transform duration-200 ease-in","leave-from-class":"translate-x-0","leave-to-class":"translate-x-full"},{default:t.withCtx(()=>[n.value?(t.openBlock(),t.createElementBlock("div",IA,[t.createElementVNode("div",FA,[t.createElementVNode("div",null,[t.createElementVNode("h3",zA,t.toDisplayString(e.title),1),e.description?(t.openBlock(),t.createElementBlock("p",$A,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),t.createVNode(He,{variant:"ghost",size:"icon",onClick:a,icon:"X",class:"text-gray-400 hover:text-gray-600"})]),t.createElementVNode("div",jA,[t.renderSlot(s.$slots,"default")]),t.createElementVNode("div",UA,[t.renderSlot(s.$slots,"footer")])])):t.createCommentVNode("",!0)]),_:3})])):t.createCommentVNode("",!0)]))]))}}),HA={key:0},qA=["value","name"],GA=t.defineComponent({__name:"DynamicFilterField",props:{field:{},modelValue:{},disabled:{type:Boolean},required:{type:Boolean},readonly:{type:Boolean},options:{},dynamicLabels:{},dynamicLength:{}},emits:["update:modelValue"],setup(e,{emit:o}){const{locale:n}=_t.useI18n(),r=e,a=o,s=t.ref(r.modelValue);t.watch(()=>r.modelValue,f=>{s.value=f});const i={DCodeTextField:on,DCodeAutoComplete:ur,DCodeDatePicker:sa,DCodeTextarea:hn,DCodeTextArea:hn,DCodeCheckbox:io,DCodeSwitch:fa,DCodeOtpInput:ca,DCodeImageField:la,DCodeSlider:da},l=t.computed(()=>{const f=r.field.component;return i[f]||null}),c=t.computed(()=>{var h,m,p,y;const f=r.field.props,u={};return(f.labelID||f.labelEN)&&(u.label=n.value==="id"?f.labelID:f.labelEN),(f.placeholderID||f.placeholderEN)&&(u.placeholder=n.value==="id"?f.placeholderID:f.placeholderEN),(r.required!==void 0||f.required!==void 0)&&(u.required=r.required!==void 0?r.required:f.required),(r.disabled!==void 0||f.disabled!==void 0)&&(u.disabled=r.disabled!==void 0?r.disabled:f.disabled),(r.readonly!==void 0||f.readonly!==void 0)&&(u.readonly=r.readonly!==void 0?r.readonly:f.readonly),f.valueType&&(u.type=f.valueType),(((h=r.dynamicLength)==null?void 0:h.minLength)!==void 0||f.minLength!==void 0)&&(u.minlength=((m=r.dynamicLength)==null?void 0:m.minLength)??f.minLength),(((p=r.dynamicLength)==null?void 0:p.maxLength)!==void 0||f.maxLength!==void 0)&&(u.maxlength=((y=r.dynamicLength)==null?void 0:y.maxLength)??f.maxLength),f.min!==void 0&&(u.min=f.min),f.max!==void 0&&(u.max=f.max),(r.options||f.options)&&(u.options=r.options||f.options),f.endpoint&&(u.endpoint=f.endpoint),f.itemTitle&&(u.itemTitle=f.itemTitle),f.itemValue&&(u.itemValue=f.itemValue),f.returnObject!==void 0&&(u.returnObject=f.returnObject),f.clearable!==void 0&&(u.clearable=f.clearable),Object.keys(f).forEach(b=>{!["labelID","labelEN","placeholderID","placeholderEN"].includes(b)&&!u.hasOwnProperty(b)&&(u[b]=f[b])}),r.dynamicLabels&&((r.dynamicLabels.labelID||r.dynamicLabels.labelEN)&&(u.label=n.value==="id"?r.dynamicLabels.labelID:r.dynamicLabels.labelEN),(r.dynamicLabels.placeholderID||r.dynamicLabels.placeholderEN)&&(u.placeholder=n.value==="id"?r.dynamicLabels.placeholderID:r.dynamicLabels.placeholderEN)),u}),d=f=>{s.value=f,a("update:modelValue",f)};return(f,u)=>e.field.isHidden?(t.openBlock(),t.createElementBlock("div",HA,[t.createElementVNode("input",{type:"hidden",value:s.value,name:e.field.model},null,8,qA)])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),t.mergeProps({key:1},c.value,{modelValue:s.value,"onUpdate:modelValue":[u[0]||(u[0]=h=>s.value=h),d]}),null,16,["modelValue"]))}}),KA={class:"flex items-center gap-2 shrink-0"},XA={class:"flex-1 text-right overflow-hidden"},YA=["title"],mn=ft(t.defineComponent({name:"DCodeStaticLabel",__name:"DCodeStaticLabel",props:{label:{},value:{},icon:{},color:{}},setup(e){const o=e,n=t.computed(()=>{const a=o.color||"secondary",s={primary:"border-blue-200 text-blue-700",success:"border-green-200 text-green-700",warning:"border-yellow-200 text-yellow-700",danger:"border-red-200 text-red-700",info:"border-cyan-200 text-cyan-700",secondary:"border-slate-200 text-slate-700 dark:border-slate-700/50",dark:"border-b border-gray-300 text-gray-900 dark:text-gray-100"};return s[a]||s.secondary}),r=a=>a==null||a===""?"-":typeof a=="boolean"?a?"Yes":"No":String(a);return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["flex flex-row justify-between items-center gap-4 py-3 px-0 border-b transition-all duration-300 rounded-none bg-transparent",n.value])},[t.createElementVNode("div",KA,[t.createVNode(Wo,{label:e.label,icon:e.icon,class:"text-xs font-semibold text-neutral-500 dark:text-neutral-400 uppercase tracking-wider"},null,8,["label","icon"])]),t.createElementVNode("div",XA,[t.renderSlot(a.$slots,"value",{},()=>[t.createElementVNode("span",{class:"text-sm font-medium truncate block",title:r(e.value)},t.toDisplayString(r(e.value)),9,YA)],!0)])],2))}}),[["__scopeId","data-v-dd90fa7f"]]),JA={class:"space-y-2 group"},QA=["onClick"],ZA=["src","alt"],ev={key:0,class:"absolute inset-0 bg-black/0 group-hover/item:bg-black/20 flex items-center justify-center opacity-0 group-hover/item:opacity-100 transition-all duration-300"},tv={class:"bg-white/90 dark:bg-neutral-800/90 p-1.5 rounded-full shadow-sm"},ov={key:0,class:"flex flex-col h-full"},nv={class:"flex flex-col items-center justify-center p-8 bg-neutral-50 dark:bg-neutral-950/50"},rv=["src","alt"],av={class:"px-8 py-4 bg-white dark:bg-neutral-900 border-t border-neutral-200 dark:border-neutral-700/50"},sv={class:"flex flex-col space-y-0.5"},gi=ft(t.defineComponent({name:"DCodeStaticImage",__name:"DCodeStaticImage",props:{items:{},alt:{default:"Image"},label:{},aspectRatio:{default:"16/9"},width:{},height:{},fit:{default:"cover"},rounded:{type:Boolean,default:!1},allowPreview:{type:Boolean,default:!0},columns:{default:3},gap:{default:"0.5rem"}},setup(e){const o=e,n=t.computed(()=>Array.isArray(o.items)?o.items.map(d=>typeof d=="string"?{src:d,alt:o.alt}:{...d,alt:d.alt||o.alt}):[]),r=t.ref(null),a=t.ref(!1),s=d=>{o.allowPreview&&(r.value=d,a.value=!0)},i=()=>{r.value=null,a.value=!1},l=t.computed(()=>({display:"grid",gridTemplateColumns:`repeat(${o.columns}, minmax(0, 1fr))`,gap:o.gap,width:o.width||"100%"})),c=t.computed(()=>["w-full h-full transition-all duration-500",o.rounded?"rounded-xl":"rounded-none",o.fit==="cover"?"object-cover":o.fit==="contain"?"object-contain":o.fit==="fill"?"object-fill":"object-none"].join(" "));return t.onMounted(()=>{window.addEventListener("keydown",d=>{r.value!==null&&d.key==="Escape"&&i()})}),(d,f)=>(t.openBlock(),t.createElementBlock("div",JA,[t.createElementVNode("div",{style:t.normalizeStyle(l.value)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,(u,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,class:"flex flex-col space-y-1 group/item"},[t.createElementVNode("div",{class:t.normalizeClass(["relative overflow-hidden bg-neutral-100 dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-800 transition-all duration-300 transform hover:scale-[1.02] hover:z-10",[e.rounded?"rounded-xl":"rounded-none",e.allowPreview?"cursor-zoom-in":""]]),style:t.normalizeStyle({aspectRatio:e.aspectRatio}),onClick:m=>s(h)},[t.createElementVNode("img",{src:u.src,alt:u.alt,class:t.normalizeClass(c.value),loading:"lazy"},null,10,ZA),e.allowPreview?(t.openBlock(),t.createElementBlock("div",ev,[t.createElementVNode("div",tv,[t.createVNode(t.unref(ne.Maximize2),{class:"w-3.5 h-3.5 text-neutral-700 dark:text-neutral-200"})])])):t.createCommentVNode("",!0)],14,QA)]))),128))],4),t.createVNode(lo,{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=u=>a.value=u),title:(r.value!==null?n.value[r.value].label:null)||e.label||"Preview Image","max-width":"1200",persistent:!1,onClose:i},{"header-append":t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"p-2 hover:bg-neutral-100 dark:hover:bg-neutral-800 rounded-full text-neutral-400 hover:text-neutral-600 dark:hover:text-neutral-200 transition-colors",onClick:i},[t.createVNode(t.unref(ne.X),{class:"w-5 h-5"})])]),actions:t.withCtx(()=>[t.createElementVNode("button",{type:"button",class:"px-5 py-2 text-sm font-medium bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-neutral-200 rounded-md hover:bg-neutral-200 dark:hover:bg-neutral-700 transition-colors",onClick:i}," Close Preview ")]),default:t.withCtx(()=>[r.value!==null?(t.openBlock(),t.createElementBlock("div",ov,[t.createElementVNode("div",nv,[t.createElementVNode("img",{src:n.value[r.value].src,alt:n.value[r.value].alt||e.alt,class:"max-w-full max-h-[60vh] object-contain shadow-2xl rounded-sm border border-neutral-200 dark:border-white/10"},null,8,rv)]),t.createElementVNode("div",av,[t.createElementVNode("div",sv,[t.createVNode(mn,{label:"File Name",value:n.value[r.value].src.split("/").pop()||"Untitled"},null,8,["value"]),n.value[r.value].label?(t.openBlock(),t.createBlock(mn,{key:0,label:"Item Label",value:n.value[r.value].label},null,8,["value"])):t.createCommentVNode("",!0),e.label?(t.openBlock(),t.createBlock(mn,{key:1,label:"Gallery Label",value:e.label},null,8,["value"])):t.createCommentVNode("",!0)])])])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])]))}}),[["__scopeId","data-v-ac931980"]]),iv={key:0},lv=["value","name"],cv={key:1,class:"flex flex-col gap-1"},dv={class:"text-xs font-medium text-neutral-500 dark:text-neutral-400"},fv=["src"],uv={key:1,class:"text-sm text-neutral-400 italic"},hv={key:2,class:"text-sm text-neutral-800 dark:text-neutral-100 font-medium"},mv={key:3,class:"text-xs text-neutral-400 italic"},pn=t.defineComponent({__name:"DynamicFormField",props:{field:{},modelValue:{default:null},formData:{default:()=>({})},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},options:{default:()=>[]},error:{default:null},dynamicLabels:{default:null},dynamicLength:{default:null},baseUrl:{default:void 0},viewOnly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:o}){let n=t.ref("en");try{n=_t.useI18n().locale}catch{}const r=e,a=o,s=t.ref(r.modelValue);t.watch(()=>r.modelValue,b=>{s.value=b});const i={DCodeTextField:on,DCodeAutoComplete:ur,DCodeDatePicker:sa,DCodeTextarea:hn,DCodeTextArea:hn,DCodeCheckbox:io,DCodeSwitch:fa,DCodeOtpInput:ca,DCodeImageField:la,DCodeSlider:da,DCodeRadio:fi,DCodeRadioCustom:ui,DCodeDynamicUploadList:ei,DCodeMultiSelect:di,DCodeCurrencyField:Zs,DCodePermissionMenu:mi,DCodeTreePermissions:pi,DCodeCardCheckboxList:Qs,DCodeBeforeAfter:cs,DCodeListLabels:ds,DCodeStaticLabel:mn,DCodeStaticImage:gi},l=t.computed(()=>{const b=r.field.component;return i[b]||null}),c=t.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("image")||b.includes("upload")}),d=t.computed(()=>{var g;const b=((g=r.field.component)==null?void 0:g.toLowerCase())||"";return b.includes("switch")||b.includes("checkbox")}),f=t.computed(()=>{var _,B;const b=r.field.props||r.field.propsFieldGlobal||{},g=((_=r.dynamicLabels)==null?void 0:_.labelID)||b.labelID,E=((B=r.dynamicLabels)==null?void 0:B.labelEN)||b.labelEN;return n.value==="id"?g||E||r.field.model:E||g||r.field.model}),u=t.computed(()=>{const b=r.modelValue;return b==null||b===""?null:Array.isArray(b)?b.map(g=>typeof g=="object"&&g!==null?g.label||g.name||g.code||g.value||JSON.stringify(g):String(g)).join(", "):typeof b=="object"?b.label||b.name||b.code||b.value||b.id||JSON.stringify(b):String(b)}),h=(b,g)=>{const E={label:"",placeholder:""},_=(g==null?void 0:g.labelID)||b.labelID,B=(g==null?void 0:g.labelEN)||b.labelEN;(_||B)&&(E.label=n.value==="id"?_:B);const A=(g==null?void 0:g.placeholderID)||b.placeholderID,C=(g==null?void 0:g.placeholderEN)||b.placeholderEN;return(A||C)&&(E.placeholder=n.value==="id"?A:C),E},m=(b,g)=>{const E=b.endpoint||{};if(!E.apiUrl)return{};const _={};let B=!0;if(Array.isArray(E.keyParam)&&E.keyParam.length>0&&E.keyParam.forEach(C=>{const x=g?g[C]:null;x!=null&&x!==""?_[C]=x:B=!1}),!B)return{};let A=E.apiUrl;if(r.baseUrl&&typeof A=="string"&&!A.startsWith("http")){const C=r.baseUrl.replace(/\/$/,""),x=A.startsWith("/")?A:`/${A}`;A=`${C}${x}`}return{endpoint:{apiUrl:A,apiMethod:E.apiMethod||"GET"},...Object.keys(_).length?{apiParams:_}:{}}},p=t.computed(()=>{var B,A,C;const b=r.field.props||r.field.propsFieldGlobal||{},g={},E=h(b,r.dynamicLabels);if(E.label&&(g.label=E.label),E.placeholder&&(g.placeholder=E.placeholder),g.required=r.required!==void 0?r.required:b.required??!1,g.readonly=r.readonly!==void 0?r.readonly:b.readonly??!1,["disabled","readonly","clearable","icon","returnObject","itemTitle","itemValue","maxValue","minValue","sizeFile","typeFile","treeData","menuList","enableParentControl","showIcons","dataBefore","dataAfter","range","autoRangeDays","disablePast","maxDaysAhead","displayFormat","modelType","placement","prependInner","selectLabel","cancelLabel","tone","skeleton"].forEach(x=>{b[x]!==void 0&&b[x]!==null&&(g[x]=b[x])}),g.minLength=((B=r.dynamicLength)==null?void 0:B.minLength)??b.minLength,g.maxLength=((A=r.dynamicLength)==null?void 0:A.maxLength)??b.maxLength,b.valueType&&(g.type=b.valueType),r.error&&(g.error=r.error),Object.assign(g,m(b,r.formData)),(C=b.endpointReference)!=null&&C.apiUrl){let x=b.endpointReference.apiUrl;if(r.baseUrl&&typeof x=="string"&&!x.startsWith("http")){const k=r.baseUrl.replace(/\/$/,""),N=x.startsWith("/")?x:`/${x}`;x=`${k}${N}`}g.endpointReference={...b.endpointReference,apiUrl:x}}return r.options&&r.options.length>0&&(g.items=r.options,g.options=r.options,r.field.component!=="DCodeDynamicUploadList"&&(delete g.endpoint,delete g.apiParams,delete g.apiUrl)),r.baseUrl&&(g.baseUrl=r.baseUrl),g}),y=b=>{s.value=b,a("update:modelValue",b)};return(b,g)=>e.field.isHidden?(t.openBlock(),t.createElementBlock("div",iv,[t.createElementVNode("input",{type:"hidden",value:s.value,name:e.field.model},null,8,lv)])):e.viewOnly?(t.openBlock(),t.createElementBlock("div",cv,[t.createElementVNode("span",dv,t.toDisplayString(f.value),1),c.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[u.value?(t.openBlock(),t.createElementBlock("img",{key:0,src:u.value,class:"h-16 w-16 rounded-md object-cover border border-neutral-200",alt:""},null,8,fv)):(t.openBlock(),t.createElementBlock("span",uv,"-"))],64)):d.value?(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(["inline-flex items-center gap-1 text-sm font-medium",u.value?"text-green-600 dark:text-green-400":"text-neutral-400"])},t.toDisplayString(u.value?"✓ Ya":"✗ Tidak"),3)):(t.openBlock(),t.createElementBlock("span",hv,t.toDisplayString(u.value||"-"),1))])):l.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),t.mergeProps({key:2},p.value,{modelValue:s.value,"onUpdate:modelValue":[g[0]||(g[0]=E=>s.value=E),y]}),null,16,["modelValue"])):(t.openBlock(),t.createElementBlock("div",mv," Unknown field: "+t.toDisplayString(e.field.component),1))}}),pv=t.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:modelValue"],setup(e,{emit:o}){const n=e,r=o,a=Xe.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,i)=>t.withDirectives((t.openBlock(),t.createElementBlock("input",{"onUpdate:modelValue":i[0]||(i[0]=l=>t.isRef(a)?a.value=l:null),class:t.normalizeClass(t.unref(Te)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[t.vModelText,t.unref(a)]])}}),gv=t.defineComponent({__name:"Pagination",props:{page:{},defaultPage:{},itemsPerPage:{},total:{},siblingCount:{},disabled:{type:Boolean},showEdges:{type:Boolean},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},emits:["update:page"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=Ee.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationRoot),t.mergeProps({"data-slot":"pagination"},t.unref(s),{class:n.class}),{default:t.withCtx(c=>[t.renderSlot(i.$slots,"default",t.normalizeProps(t.guardReactiveProps(c)))]),_:3},16,["class"]))}}),bv=t.defineComponent({__name:"PaginationContent",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationList),t.mergeProps({"data-slot":"pagination-content"},t.unref(n),{class:t.unref(Te)("flex flex-row items-center gap-1",o.class)}),{default:t.withCtx(s=>[t.renderSlot(r.$slots,"default",t.normalizeProps(t.guardReactiveProps(s)))]),_:3},16,["class"]))}}),yv=t.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationEllipsis),t.mergeProps({"data-slot":"pagination-ellipsis"},t.unref(n),{class:t.unref(Te)("flex size-9 items-center justify-center",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default",{},()=>[t.createVNode(t.unref(ne.MoreHorizontal),{class:"size-4"}),a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"More pages",-1))])]),_:3},16,["class"]))}}),xv=t.defineComponent({__name:"PaginationFirst",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationFirst),t.mergeProps({"data-slot":"pagination-first",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"First",-1))])]),_:3},16,["class"]))}}),kv=t.defineComponent({__name:"PaginationItem",props:{value:{},asChild:{type:Boolean},as:{},size:{default:"icon"},class:{type:[Boolean,null,String,Object,Array]},isActive:{type:Boolean}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size","isActive");return(r,a)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationListItem),t.mergeProps({"data-slot":"pagination-item"},t.unref(n),{class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),e.isActive?"bg-[#0056a1] dark:bg-[#003d75] text-white hover:bg-[#0056a1]/90 dark:hover:bg-[#003d75]/90 hover:text-white":"",o.class)}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),wv=t.defineComponent({__name:"PaginationLast",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationLast),t.mergeProps({"data-slot":"pagination-last",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Last",-1)),t.createVNode(t.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),Cv=t.defineComponent({__name:"PaginationNext",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationNext),t.mergeProps({"data-slot":"pagination-next",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Next",-1)),t.createVNode(t.unref(ne.ChevronRightIcon))])]),_:3},16,["class"]))}}),Ev=t.defineComponent({__name:"PaginationPrevious",props:{asChild:{type:Boolean},as:{},size:{default:"default"},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class","size"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.PaginationPrev),t.mergeProps({"data-slot":"pagination-previous",class:t.unref(Te)(t.unref(Yo)({variant:"ghost",size:e.size}),"gap-1 px-2.5 sm:pr-2.5",o.class)},t.unref(r)),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronLeftIcon)),s[0]||(s[0]=t.createElementVNode("span",{class:"hidden sm:block"},"Previous",-1))])]),_:3},16,["class"]))}}),_v=t.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:o}){const n=e,r=o,a=Ee.useForwardPropsEmits(n,r);return(s,i)=>(t.openBlock(),t.createBlock(t.unref(Ee.SelectRoot),t.normalizeProps(t.guardReactiveProps(t.unref(a))),{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default")]),_:3},16))}}),Bv=t.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},sideFlip:{type:Boolean},align:{},alignOffset:{},alignFlip:{type:Boolean},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},hideShiftedArrow:{type:Boolean},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{type:[Boolean,null,String,Object,Array]}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:o}){const n=e,r=o,a=Xe.reactiveOmit(n,"class"),s=Ee.useForwardPropsEmits(a,r);return(i,l)=>(t.openBlock(),t.createBlock(t.unref(Ee.SelectPortal),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Ee.SelectContent),t.mergeProps({...t.unref(s),...i.$attrs},{class:t.unref(Te)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:t.withCtx(()=>[t.createVNode(t.unref(Dv)),t.createVNode(t.unref(Ee.SelectViewport),{class:t.normalizeClass(t.unref(Te)("p-1",e.position==="popper"&&"h-[--reka-select-trigger-height] w-full min-w-[--reka-select-trigger-width]"))},{default:t.withCtx(()=>[t.renderSlot(i.$slots,"default")]),_:3},8,["class"]),t.createVNode(t.unref(vv))]),_:3},16,["class"])]),_:3}))}}),Sv={class:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center"},Av=t.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.SelectItem),t.mergeProps(t.unref(r),{class:t.unref(Te)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o.class)}),{default:t.withCtx(()=>[t.createElementVNode("span",Sv,[t.createVNode(t.unref(Ee.SelectItemIndicator),null,{default:t.withCtx(()=>[t.createVNode(t.unref(ne.Check),{class:"h-4 w-4"})]),_:1})]),t.createVNode(t.unref(Ee.SelectItemText),null,{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),vv=t.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.SelectScrollDownButton),t.mergeProps(t.unref(r),{class:t.unref(Te)("flex cursor-default items-center justify-center py-1",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronDown))])]),_:3},16,["class"]))}}),Dv=t.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.SelectScrollUpButton),t.mergeProps(t.unref(r),{class:t.unref(Te)("flex cursor-default items-center justify-center py-1",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default",{},()=>[t.createVNode(t.unref(ne.ChevronUp))])]),_:3},16,["class"]))}}),Nv=t.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{type:[Boolean,null,String,Object,Array]}},setup(e){const o=e,n=Xe.reactiveOmit(o,"class"),r=Ee.useForwardProps(n);return(a,s)=>(t.openBlock(),t.createBlock(t.unref(Ee.SelectTrigger),t.mergeProps(t.unref(r),{class:t.unref(Te)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",o.class)}),{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default"),t.createVNode(t.unref(Ee.SelectIcon),{"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronDown),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),Vv=t.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const o=e;return(n,r)=>(t.openBlock(),t.createBlock(t.unref(Ee.SelectValue),t.normalizeProps(t.guardReactiveProps(o)),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16))}}),Zn={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},gn={LIGHT:"light",DARK:"dark",COLORED:"colored",AUTO:"auto"},ut={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Mv={BOUNCE:"bounce",SLIDE:"slide",FLIP:"flip",ZOOM:"zoom",NONE:"none"},Tv={dangerouslyHTMLString:!1,multiple:!0,position:Zn.TOP_RIGHT,autoClose:5e3,transition:"bounce",hideProgressBar:!1,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,className:"",bodyClassName:"",style:{},progressClassName:"",progressStyle:{},role:"alert",theme:"light"},Pv={rtl:!1,newestOnTop:!1,toastClassName:""},Xf={...Tv,...Pv};ut.DEFAULT;var Ie=(e=>(e[e.COLLAPSE_DURATION=300]="COLLAPSE_DURATION",e[e.DEBOUNCE_DURATION=50]="DEBOUNCE_DURATION",e.CSS_NAMESPACE="Toastify",e))(Ie||{}),bi=(e=>(e.ENTRANCE_ANIMATION_END="d",e))(bi||{});const Ov={enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0},Rv={enter:"Toastify--animate Toastify__slide-enter",exit:"Toastify--animate Toastify__slide-exit",appendPosition:!0},Lv={enter:"Toastify--animate Toastify__zoom-enter",exit:"Toastify--animate Toastify__zoom-exit"},Iv={enter:"Toastify--animate Toastify__flip-enter",exit:"Toastify--animate Toastify__flip-exit"},Yf="Toastify--animate Toastify__none-enter";function Jf(e,o=!1){var n;let r=Ov;if(!e||typeof e=="string")switch(e){case"flip":r=Iv;break;case"zoom":r=Lv;break;case"slide":r=Rv;break}else r=e;if(o)r.enter=Yf;else if(r.enter===Yf){const a=(n=r.exit.split("__")[1])==null?void 0:n.split("-")[0];r.enter=`Toastify--animate Toastify__${a}-enter`}return r}function Fv(e){return e.containerId||String(e.position)}const ha="will-unmount";function zv(e=Zn.TOP_RIGHT){return!!document.querySelector(`.${Ie.CSS_NAMESPACE}__toast-container--${e}`)}function $v(e=Zn.TOP_RIGHT){return`${Ie.CSS_NAMESPACE}__toast-container--${e}`}function jv(e,o,n=!1){const r=[`${Ie.CSS_NAMESPACE}__toast-container`,`${Ie.CSS_NAMESPACE}__toast-container--${e}`,n?`${Ie.CSS_NAMESPACE}__toast-container--rtl`:null].filter(Boolean).join(" ");return yn(o)?o({position:e,rtl:n,defaultClassName:r}):`${r} ${o||""}`}function Uv(e){var o;const{position:n,containerClassName:r,rtl:a=!1,style:s={}}=e,i=Ie.CSS_NAMESPACE,l=$v(n),c=document.querySelector(`.${i}`),d=document.querySelector(`.${l}`),f=!!d&&!((o=d.className)!=null&&o.includes(ha)),u=c||document.createElement("div"),h=document.createElement("div");h.className=jv(n,r,a),h.dataset.testid=`${Ie.CSS_NAMESPACE}__toast-container--${n}`,h.id=Fv(e);for(const m in s)if(Object.prototype.hasOwnProperty.call(s,m)){const p=s[m];h.style[m]=p}return c||(u.className=Ie.CSS_NAMESPACE,document.body.appendChild(u)),f||u.appendChild(h),h}function yi(e){var o,n,r;const a=typeof e=="string"?e:((o=e.currentTarget)==null?void 0:o.id)||((n=e.target)==null?void 0:n.id),s=document.getElementById(a);s&&s.removeEventListener("animationend",yi,!1);try{er[a].unmount(),(r=document.getElementById(a))==null||r.remove(),delete er[a],delete ot[a]}catch{}}const er=t.reactive({});function Wv(e,o){const n=document.getElementById(String(o));n&&(er[n.id]=e)}function xi(e,o=!0){const n=String(e);if(!er[n])return;const r=document.getElementById(n);r&&r.classList.add(ha),o?(qv(e),r&&r.addEventListener("animationend",yi,!1)):yi(n),Dt.items=Dt.items.filter(a=>a.containerId!==e)}function Hv(e){for(const o in er)xi(o,e);Dt.items=[]}function Qf(e,o){const n=document.getElementById(e.toastId);if(n){let r=e;r={...r,...Jf(r.transition)};const a=r.appendPosition?`${r.exit}--${r.position}`:r.exit;n.className+=` ${a}`,o&&o(n)}}function qv(e){for(const o in ot)if(o===e)for(const n of ot[o]||[])Qf(n)}function Gv(e){const o=bn().find(n=>n.toastId===e);return o==null?void 0:o.containerId}function ki(e){return document.getElementById(e)}function Kv(e){const o=ki(e.containerId);return o&&o.classList.contains(ha)}function Zf(e){var o;const n=t.isVNode(e.content)?t.toRaw(e.content.props):null;return n??t.toRaw((o=e.data)!=null?o:{})}function Xv(e){return e?Dt.items.filter(o=>o.containerId===e).length>0:Dt.items.length>0}function Yv(){if(Dt.items.length>0){const e=Dt.items.shift();ma(e==null?void 0:e.toastContent,e==null?void 0:e.toastProps)}}const ot=t.reactive({}),Dt=t.reactive({items:[]});function bn(){const e=t.toRaw(ot);return Object.values(e).reduce((o,n)=>[...o,...n],[])}function Jv(e){return bn().find(o=>o.toastId===e)}function ma(e,o={}){if(Kv(o)){const n=ki(o.containerId);n&&n.addEventListener("animationend",wi.bind(null,e,o),!1)}else wi(e,o)}function wi(e,o={}){const n=ki(o.containerId);n&&n.removeEventListener("animationend",wi.bind(null,e,o),!1);const r=ot[o.containerId]||[],a=r.length>0;if(!a&&!zv(o.position)){const s=Uv(o),i=t.createApp(w5,o);o.useHandler&&o.useHandler(i),i.mount(s),Wv(i,s.id)}a&&!o.updateId&&(o.position=r[0].position),t.nextTick(()=>{o.updateId?xt.update(o):xt.add(e,o)})}const xt={add(e,o){const{containerId:n=""}=o;n&&(ot[n]=ot[n]||[],ot[n].find(r=>r.toastId===o.toastId)||setTimeout(()=>{var r,a;o.newestOnTop?(r=ot[n])==null||r.unshift(o):(a=ot[n])==null||a.push(o),o.onOpen&&o.onOpen(Zf(o))},o.delay||0))},remove(e){if(e){const o=Gv(e);if(o){const n=ot[o];let r=n.find(a=>a.toastId===e);ot[o]=n.filter(a=>a.toastId!==e),!ot[o].length&&!Xv(o)&&xi(o,!1),Yv(),t.nextTick(()=>{r!=null&&r.onClose&&(r.onClose(Zf(r)),r=void 0)})}}},update(e={}){const{containerId:o=""}=e;if(o&&e.updateId){ot[o]=ot[o]||[];const n=ot[o].find(s=>s.toastId===e.toastId),r=(n==null?void 0:n.position)!==e.position||(n==null?void 0:n.transition)!==e.transition,a={...e,disabledEnterTransition:!r,updateId:void 0};xt.dismissForce(e==null?void 0:e.toastId),setTimeout(()=>{ze(a.content,a)},e.delay||0)}},clear(e,o=!0){e?xi(e,o):Hv(o)},dismissCallback(e){var o;const n=(o=e.currentTarget)==null?void 0:o.id,r=document.getElementById(n);r&&(r.removeEventListener("animationend",xt.dismissCallback,!1),setTimeout(()=>{xt.remove(n)}))},dismiss(e){if(e){const o=bn();for(const n of o)if(n.toastId===e){Qf(n,r=>{r.addEventListener("animationend",xt.dismissCallback,!1)});break}}},dismissForce(e){if(e){const o=bn();for(const n of o)if(n.toastId===e){const r=document.getElementById(e);r&&(r.remove(),r.removeEventListener("animationend",xt.dismissCallback,!1),xt.remove(e));break}}}},Qv=t.reactive({useHandler:void 0}),eu=t.reactive({}),pa=t.reactive({});function tu(){return Math.random().toString(36).substring(2,9)}function Zv(e){return typeof e=="number"&&!isNaN(e)}function Ci(e){return typeof e=="string"}function yn(e){return typeof e=="function"}function ga(...e){return t.mergeProps(...e)}function ba(e){return typeof e=="object"&&(!!(e!=null&&e.render)||!!(e!=null&&e.setup)||typeof(e==null?void 0:e.type)=="object")}function e5(e={}){eu[`${Ie.CSS_NAMESPACE}-default-options`]=e}function ou(){return eu[`${Ie.CSS_NAMESPACE}-default-options`]||Xf}function t5(){const e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return document.documentElement.classList.contains("dark")||e?"dark":"light"}var ya=(e=>(e[e.Enter=0]="Enter",e[e.Exit=1]="Exit",e))(ya||{});const nu={containerId:{type:[String,Number],required:!1,default:""},clearOnUrlChange:{type:Boolean,required:!1,default:!0},disabledEnterTransition:{type:Boolean,required:!1,default:!1},dangerouslyHTMLString:{type:Boolean,required:!1,default:!1},multiple:{type:Boolean,required:!1,default:!0},limit:{type:Number,required:!1,default:void 0},position:{type:String,required:!1,default:Zn.TOP_LEFT},bodyClassName:{type:String,required:!1,default:""},autoClose:{type:[Number,Boolean],required:!1,default:!1},closeButton:{type:[Boolean,Function,Object],required:!1,default:void 0},transition:{type:[String,Object],required:!1,default:"bounce"},hideProgressBar:{type:Boolean,required:!1,default:!1},pauseOnHover:{type:Boolean,required:!1,default:!0},pauseOnFocusLoss:{type:Boolean,required:!1,default:!0},closeOnClick:{type:Boolean,required:!1,default:!0},progress:{type:Number,required:!1,default:void 0},progressClassName:{type:String,required:!1,default:""},toastStyle:{type:Object,required:!1,default(){return{}}},progressStyle:{type:Object,required:!1,default(){return{}}},role:{type:String,required:!1,default:"alert"},theme:{type:String,required:!1,default:gn.AUTO},content:{type:[String,Object,Function],required:!1,default:""},toastId:{type:[String,Number],required:!1,default:""},data:{type:[Object,String],required:!1,default(){return{}}},type:{type:String,required:!1,default:ut.DEFAULT},icon:{type:[Boolean,String,Number,Object,Function],required:!1,default:void 0},delay:{type:Number,required:!1,default:void 0},onOpen:{type:Function,required:!1,default:void 0},onClose:{type:Function,required:!1,default:void 0},onClick:{type:Function,required:!1,default:void 0},isLoading:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:!1},toastClassName:{type:String,required:!1,default:""},updateId:{type:[String,Number],required:!1,default:""},contentProps:{type:Object,required:!1,default:null},expandCustomProps:{type:Boolean,required:!1,default:!1}},o5={autoClose:{type:[Number,Boolean],required:!0},isRunning:{type:Boolean,required:!1,default:void 0},type:{type:String,required:!1,default:ut.DEFAULT},theme:{type:String,required:!1,default:gn.AUTO},hide:{type:Boolean,required:!1,default:void 0},className:{type:[String,Function],required:!1,default:""},controlledProgress:{type:Boolean,required:!1,default:void 0},rtl:{type:Boolean,required:!1,default:void 0},isIn:{type:Boolean,required:!1,default:void 0},progress:{type:Number,required:!1,default:void 0},closeToast:{type:Function,required:!1,default:void 0}},n5=t.defineComponent({name:"ProgressBar",props:o5,setup(e,{attrs:o}){const n=t.ref(),r=t.computed(()=>e.hide?"true":"false"),a=t.computed(()=>({...o.style||{},animationDuration:`${e.autoClose===!0?5e3:e.autoClose}ms`,animationPlayState:e.isRunning?"running":"paused",opacity:e.hide||e.autoClose===!1?0:1,transform:e.controlledProgress?`scaleX(${e.progress})`:"none"})),s=t.computed(()=>[`${Ie.CSS_NAMESPACE}__progress-bar`,e.controlledProgress?`${Ie.CSS_NAMESPACE}__progress-bar--controlled`:`${Ie.CSS_NAMESPACE}__progress-bar--animated`,`${Ie.CSS_NAMESPACE}__progress-bar-theme--${e.theme}`,`${Ie.CSS_NAMESPACE}__progress-bar--${e.type}`,e.rtl?`${Ie.CSS_NAMESPACE}__progress-bar--rtl`:null].filter(Boolean).join(" ")),i=t.computed(()=>`${s.value} ${(o==null?void 0:o.class)||""}`),l=()=>{n.value&&(n.value.onanimationend=null,n.value.ontransitionend=null)},c=()=>{e.isIn&&e.closeToast&&e.autoClose!==!1&&(e.closeToast(),l())},d=t.computed(()=>e.controlledProgress?null:c),f=t.computed(()=>e.controlledProgress?c:null);return t.watchEffect(()=>{n.value&&(l(),n.value.onanimationend=d.value,n.value.ontransitionend=f.value)}),()=>t.createVNode("div",{ref:n,role:"progressbar","aria-hidden":r.value,"aria-label":"notification timer",class:i.value,style:a.value},null)}}),r5=t.defineComponent({name:"CloseButton",inheritAttrs:!1,props:{theme:{type:String,required:!1,default:gn.AUTO},type:{type:String,required:!1,default:gn.LIGHT},ariaLabel:{type:String,required:!1,default:"close"},closeToast:{type:Function,required:!1,default:void 0}},setup(e){return()=>t.createVNode("button",{class:`${Ie.CSS_NAMESPACE}__close-button ${Ie.CSS_NAMESPACE}__close-button--${e.theme}`,type:"button",onClick:o=>{o.stopPropagation(),e.closeToast&&e.closeToast(o)},"aria-label":e.ariaLabel},[t.createVNode("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},[t.createVNode("path",{"fill-rule":"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"},null)])])}}),xa=({theme:e,type:o,path:n,...r})=>t.createVNode("svg",t.mergeProps({viewBox:"0 0 24 24",width:"100%",height:"100%",style:{fill:e==="colored"?"currentColor":`var(--toastify-icon-color-${o})`}},r),[t.createVNode("path",{d:n},null)]);function a5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}),null)}function s5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}),null)}function i5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}),null)}function l5(e){return t.createVNode(xa,t.mergeProps(e,{path:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}),null)}function c5(){return t.createVNode("div",{class:`${Ie.CSS_NAMESPACE}__spinner`},null)}const ka={info:s5,warning:a5,success:i5,error:l5,spinner:c5},d5=e=>e in ka;function f5({theme:e,type:o,isLoading:n,icon:r}){let a;const s=!!n||o==="loading",i={theme:e,type:o};if(s&&(r===void 0||typeof r=="boolean"))return ka.spinner();if(r!==!1){if(ba(r))a=t.toRaw(r);else if(yn(r)){const l=r;i.type=s?"loading":o,a=l(i),a=!a&&s?ka.spinner():a}else t.isVNode(r)?a=t.cloneVNode(r,i):Ci(r)||Zv(r)?a=r:d5(o)&&(a=ka[o](i));return a}}const u5=()=>{};function h5(e,o,n=Ie.COLLAPSE_DURATION){const{scrollHeight:r,style:a}=e,s=n;requestAnimationFrame(()=>{a.minHeight="initial",a.height=r+"px",a.transition=`all ${s}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(o,s)})})}function m5(e){const o=t.ref(!1),n=t.ref(!1),r=t.ref(!1),a=t.ref(ya.Enter),s=t.reactive({...e,appendPosition:e.appendPosition||!1,collapse:typeof e.collapse>"u"?!0:e.collapse,collapseDuration:e.collapseDuration||Ie.COLLAPSE_DURATION}),i=s.done||u5,l=t.computed(()=>s.appendPosition?`${s.enter}--${s.position}`:s.enter),c=t.computed(()=>s.appendPosition?`${s.exit}--${s.position}`:s.exit),d=t.computed(()=>e.pauseOnHover?{onMouseenter:b,onMouseleave:y}:{});function f(){const E=l.value.split(" ");h().addEventListener(bi.ENTRANCE_ANIMATION_END,y,{once:!0});const _=A=>{const C=h();A.target===C&&(C.dispatchEvent(new Event(bi.ENTRANCE_ANIMATION_END)),C.removeEventListener("animationend",_),C.removeEventListener("animationcancel",_),a.value===ya.Enter&&A.type!=="animationcancel"&&C.classList.remove(...E))},B=()=>{const A=h();A.classList.add(...E),A.addEventListener("animationend",_),A.addEventListener("animationcancel",_)};e.pauseOnFocusLoss&&m(),B()}function u(){if(!h())return;const E=()=>{const B=h();B.removeEventListener("animationend",E),s.collapse?h5(B,i,s.collapseDuration):i()},_=()=>{const B=h();a.value=ya.Exit,B&&(B.className+=` ${c.value}`,B.addEventListener("animationend",E))};n.value||(r.value?E():setTimeout(_))}function h(){return e.toastRef.value}function m(){document.hasFocus()||b(),window.addEventListener("focus",y),window.addEventListener("blur",b)}function p(){window.removeEventListener("focus",y),window.removeEventListener("blur",b)}function y(){(!e.loading.value||e.isLoading===void 0)&&(o.value=!0)}function b(){o.value=!1}function g(E){E&&(E.stopPropagation(),E.preventDefault()),n.value=!1}return t.watchEffect(u),t.watchEffect(()=>{const E=bn();n.value=E.findIndex(_=>_.toastId===s.toastId)>-1}),t.watchEffect(()=>{e.isLoading!==void 0&&(e.loading.value?b():y())}),t.onMounted(f),t.onUnmounted(()=>{e.pauseOnFocusLoss&&p()}),{isIn:n,isRunning:o,hideToast:g,eventHandlers:d}}function p5(e){if(!e||typeof e!="object"||Array.isArray(e)||e.__v_isVNode)return!1;const o=e;return["title","content"].some(n=>n in o)}const g5=t.defineComponent({name:"ToastItem",inheritAttrs:!1,props:nu,setup(e){const o=t.ref(),n=t.computed(()=>!!e.isLoading),r=t.computed(()=>e.progress!==void 0&&e.progress!==null),a=t.computed(()=>f5(e)),s=t.computed(()=>[`${Ie.CSS_NAMESPACE}__toast`,`${Ie.CSS_NAMESPACE}__toast-theme--${e.theme}`,`${Ie.CSS_NAMESPACE}__toast--${e.type}`,e.rtl?`${Ie.CSS_NAMESPACE}__toast--rtl`:void 0,e.toastClassName||""].filter(Boolean).join(" ")),{isRunning:i,isIn:l,hideToast:c,eventHandlers:d}=m5({toastRef:o,loading:n,done:()=>{xt.remove(e.toastId)},...Jf(e.transition,e.disabledEnterTransition),...e});function f(){const u=e.content;if(p5(u)){const h=[];return u.title!==void 0&&h.push(t.createVNode("div",{"data-testid":"toast-text-title",class:`${Ie.CSS_NAMESPACE}__toast-text-title`},[u.title])),u.content!==void 0&&h.push(t.createVNode("div",{"data-testid":"toast-text-content",class:`${Ie.CSS_NAMESPACE}__toast-text-content`},[u.content])),t.createVNode("div",{"data-testid":"toast-text-content-wrapper",class:`${Ie.CSS_NAMESPACE}__toast-text`},[h])}return ba(u)?t.h(t.toRaw(u),{toastProps:t.toRaw(e),closeToast:c,data:e.data,...e.expandCustomProps?e.contentProps:{contentProps:e.contentProps||{}}}):yn(u)?u({toastProps:t.toRaw(e),closeToast:c,data:e.data}):e.dangerouslyHTMLString?t.h("div",{innerHTML:u}):u}return()=>t.createVNode("div",t.mergeProps({id:e.toastId,class:s.value,style:e.toastStyle||{},ref:o,"data-testid":`toast-item-${e.toastId}`,onClick:u=>{e.closeOnClick&&c(),e.onClick&&e.onClick(u)}},d.value),[t.createVNode("div",{role:e.role,"data-testid":"toast-body",class:`${Ie.CSS_NAMESPACE}__toast-body ${e.bodyClassName||""}`},[a.value!=null&&t.createVNode("div",{"data-testid":`toast-icon-${e.type}`,class:[`${Ie.CSS_NAMESPACE}__toast-icon`,e.isLoading?"":`${Ie.CSS_NAMESPACE}--animate-icon ${Ie.CSS_NAMESPACE}__zoom-enter`].join(" ")},[ba(a.value)?t.h(t.toRaw(a.value),{theme:e.theme,type:e.type}):yn(a.value)?a.value({theme:e.theme,type:e.type}):a.value]),t.createVNode("div",{"data-testid":"toast-content"},[f()])]),(e.closeButton===void 0||e.closeButton===!0)&&t.createVNode(r5,{theme:e.theme,closeToast:u=>{u.stopPropagation(),u.preventDefault(),c()}},null),ba(e.closeButton)?t.h(t.toRaw(e.closeButton),{closeToast:c,type:e.type,theme:e.theme}):yn(e.closeButton)?e.closeButton({closeToast:c,type:e.type,theme:e.theme}):null,t.createVNode(n5,{className:e.progressClassName,style:e.progressStyle,rtl:e.rtl,theme:e.theme,isIn:l.value,type:e.type,hide:e.hideProgressBar,isRunning:i.value,autoClose:e.autoClose,controlledProgress:r.value,progress:e.progress,closeToast:e.isLoading?void 0:c},null)])}}),wa="vue3-toastify:url-change";let Ca=0,tr;function b5(){if(!(typeof window>"u")&&pa.lastUrl!==window.location.href){pa.lastUrl=window.location.href;const e=n=>typeof n.clearOnUrlChange=="boolean"?n.clearOnUrlChange:ou().clearOnUrlChange!==!1,o=Object.values(ot).reduce((n,r)=>(Array.isArray(r)&&n.push(...r),n),[]);for(const n of o)n.toastId&&e(n)&&xt.dismiss(n.toastId);Dt.items=Dt.items.filter(n=>!e(n.toastProps))}}function y5(){const{history:e}=window,o=e.pushState,n=e.replaceState;return e.pushState=function(...r){const a=o.apply(this,r);return window.dispatchEvent(new Event(wa)),a},e.replaceState=function(...r){const a=n.apply(this,r);return window.dispatchEvent(new Event(wa)),a},()=>{e.pushState=o,e.replaceState=n}}function x5(){if(typeof window>"u"||tr)return;const e=y5(),o=()=>b5();window.addEventListener(wa,o),window.addEventListener("popstate",o),window.addEventListener("hashchange",o),tr=()=>{e(),window.removeEventListener(wa,o),window.removeEventListener("popstate",o),window.removeEventListener("hashchange",o),tr=void 0}}function k5(){tr&&(tr(),pa.lastUrl="")}const w5=t.defineComponent({name:"ToastifyContainer",inheritAttrs:!1,props:nu,setup(e){const o=t.computed(()=>e.containerId),n=t.computed(()=>ot[o.value]||[]),r=t.computed(()=>n.value.filter(a=>a.position===e.position));return t.onMounted(()=>{typeof window<"u"&&(Ca+=1,x5())}),t.onUnmounted(()=>{typeof window<"u"&&Ca>0&&(Ca-=1,Ca===0&&k5())}),()=>t.createVNode(t.Fragment,null,[r.value.map(a=>{const{toastId:s=""}=a;return t.createVNode(g5,t.mergeProps({key:s},a),null)})])}});let Ei=!1;const ru={isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1};function au(){const e=[];return bn().forEach(o=>{const n=document.getElementById(o.containerId);n&&!n.classList.contains(ha)&&e.push(o)}),e}function C5(e){const o=au().length,n=e??0;return n>0&&o+Dt.items.length>=n}function E5(e){C5(e.limit)&&!e.updateId&&Dt.items.push({toastId:e.toastId,containerId:e.containerId,toastContent:e.content,toastProps:e})}function Eo(e,o,n={}){if(Ei)return;n=ga(ou(),{type:o},t.toRaw(n)),(!n.toastId||typeof n.toastId!="string"&&typeof n.toastId!="number")&&(n.toastId=tu()),n={...n,...n.type==="loading"?ru:{},content:e,containerId:n.containerId||String(n.position)};const r=Number(n==null?void 0:n.progress);return!isNaN(r)&&r<0&&(n.progress=0),r>1&&(n.progress=1),n.theme==="auto"&&(n.theme=t5()),E5(n),pa.lastUrl=window.location.href,n.multiple?Dt.items.length?n.updateId&&ma(e,n):ma(e,n):(Ei=!0,ze.clearAll(void 0,!1),setTimeout(()=>{ma(e,n)},0),setTimeout(()=>{Ei=!1},390)),n.toastId}const ze=(e,o)=>Eo(e,ut.DEFAULT,o);ze.info=(e,o)=>Eo(e,ut.DEFAULT,{...o,type:ut.INFO}),ze.error=(e,o)=>Eo(e,ut.DEFAULT,{...o,type:ut.ERROR}),ze.warning=(e,o)=>Eo(e,ut.DEFAULT,{...o,type:ut.WARNING}),ze.warn=ze.warning,ze.success=(e,o)=>Eo(e,ut.DEFAULT,{...o,type:ut.SUCCESS}),ze.loading=(e,o)=>Eo(e,ut.DEFAULT,ga(o,ru)),ze.dark=(e,o)=>Eo(e,ut.DEFAULT,ga(o,{theme:gn.DARK})),ze.remove=e=>{e?xt.dismiss(e):xt.clear()},ze.clearAll=(e,o)=>{t.nextTick(()=>{xt.clear(e,o)})},ze.isActive=e=>{let o=!1;return o=au().findIndex(n=>n.toastId===e)>-1,o},ze.update=(e,o={})=>{setTimeout(()=>{const n=Jv(e);if(n){const r=t.toRaw(n),{content:a}=r,s={...r,...o,toastId:o.toastId||e,updateId:tu()},i=s.render||a;delete s.render,Eo(i,s.type,s)}},0)},ze.done=e=>{ze.update(e,{isLoading:!1,progress:1})},ze.promise=_5;function _5(e,{pending:o,error:n,success:r},a){var s,i,l;let c;const d={...a||{},autoClose:!1};o&&(c=Ci(o)?ze.loading(o,d):ze.loading(o.render,{...d,...o}));const f={autoClose:(s=a==null?void 0:a.autoClose)!=null?s:!0,closeOnClick:(i=a==null?void 0:a.closeOnClick)!=null?i:!0,closeButton:(l=a==null?void 0:a.autoClose)!=null?l:null,isLoading:void 0,draggable:null,delay:100},u=(m,p,y)=>{if(p==null){ze.remove(c);return}const b={type:m,...f,...a,data:y},g=Ci(p)?{render:p}:p;return c?ze.update(c,{...b,...g,isLoading:!1}):ze(g.render,{...b,...g,isLoading:!1}),y},h=yn(e)?e():e;return h.then(m=>{u("success",r,m)}).catch(m=>{u("error",n,m)}),h}ze.POSITION=Zn,ze.THEME=gn,ze.TYPE=ut,ze.TRANSITIONS=Mv;const B5={install(e,o={}){Qv.useHandler=o.useHandler||(()=>{}),S5(o)}};typeof window<"u"&&(window.Vue3Toastify=B5);function S5(e={}){const o=ga(Xf,e);e5(o)}const A5={v:"4.8.0",meta:{g:"LottieFiles AE ",a:"",k:"",d:"",tc:""},fr:25,ip:0,op:273,w:500,h:500,nm:"not_found",ddd:0,assets:JSON.parse('[{"id":"image_0","w":175,"h":173,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK8AAACtCAYAAADGWi9+AAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAYj0lEQVR4nO2dXVMb2ZnH/+cg1BIIkABjPF7bxFvZnamaqYHUrh1XqjbMxc7YV4Mucj3kEwzfIOwnCLnei+BP0PgmME5twWQry8DWFrh2qpKt3aRgXB4DtngRWKIlcc5eSGLUp7ul7qPWS7fO78rdWK1G+vP0c57zvAAKhUKhUCgUCoVCoVAoFAqFQqEIMqTTN9Au9Ofb0+B8CgzTICRJCZ8GAHAkOfBxnZeeEYJdAGAMewD2ALIHXO0hFttNfzJz2up7V9gTSvHqq5tTQN8sCKYp4dOc4+ctfLt9DuwCfAOUbqQ/fbDbwvdS1BAa8epfbc2Bk1kCPgfgXgdv5YwDG+BkBbH+FWWZW0egxauvbs4CdJ4QzAEY6fT92MGBZ0rIrSFw4tXXd5IwjHkCsgCPFjYej6E/EkF/fx80LQpKKQBgIB5zfI1hFHDFGAAgn78EAOTyBkrFEoqlkpe3P+McK+gjS8q18IfAiLfsx9JFt1ZW06IYiGvQotGyaPsjvt8TYwyXRgH5/CVyeeNa3I0gBF8zxhbTTx5t+H5TPUTXi7dGtF80+r+JwQEkBuMtE6sbLt7lcHGRRz5/6cYy73OChfRnD1facW9ho2vFq6/vJHFZWGok2ng8hpGhQSQSA9duQLdQFfLFuxxYxfWwQ1liObpSvPraNwsEZBEO7gGlFInBAYyNjnTMwnqBMYaLixwyx2d1rXF5cccW0k8e7bXv7oJLV4lXf749TRlfdto0oJQilRxCKjncdVbWLRfvcjg5Pa/nH59x8MX0458utfO+gkjXiFdf3VokBL+y+1kYRCuSy1/izdsTGEbB9ucVV2JeWWFnOi5efXVzihK64mRtU8khjI0mQyNakWz2op47ccY5WUg/ebDc5tsKBB0Vr766PU8IX4KNbxuPxzAxnoKmRTtwZ+2FMYbM8SlOTs9tf845niIWXVCbHGY6Jl59bXuJgH8pnqeUYmx0BKnkcCduq6MYRgEHRxlbV4IALxhnc8qN+IG2i7e8Q1ZYJsDn4s80LYr3Jm8EIoLQSt68PXaywmecklm1Q1emreLV13eS1Chs2Pm3qeQQboyPtvN2upqLdzkcHGbs4sPKD67QNvE6LcwopZgYT2F4ONGuW3Gkut1bzn/ovPUvFkv4/uCNrRvBOfllrwu4LeLVn29PE8Y3ICzMKKW4c/tm2xZlhlGAYRRQLJWQyxtgjDmGqmrpj0QQ6Y9cJ/XE4zHEahJ7WgljDEdvTpA9v7D8rNcF3HLx6qubU4TQXQjC1bQo7ty+2VIBFIslXLzLIZ83cPEu5/v1q8k/g4MDdTPT/ODgMKMELNBS8Tr5uK0UblWw2fN3rqyqX1S3rFPJoZY9SU5Os3jz9sRyvlcF3DLxtlu4ufwlstl3ttbJCwR4wYEpNJHc3h+JYGx0pCV+fDZ7gYOjjOU8p2Sm16IQrRPv2taKGA5rhXBz+Utkjs885tJiw0sRZbliAwDoLAimCTANF4nwrdrWdhBwz4XRWiJeuw0Iv4VrGAUcvT1pKNpycB8rANvwM+XwhyJPPmcXs66lFZbYzgcmwAumRWd7ZSfOd/FWtnx/W3uOUor7U7d9EW6jrdQK+xxkBfxqqR07UuXc4+IcJXyhXhm931vedgLmwLP044dzvrxBl+OreO0iC36Gw3L5SxweZurlxO5zThY7uXjRn29P44ov1EuiHxsdwdho0pf323/52rIw5Rz/kn7ycNGXN+hifBXvs7WtXdHyTE6M+fK4zByfInN85vTjjotWpFH5Ujwew+TEWNObIYwx7H/32vIH3QsLON/Ea5eP68eWL2MMr16/cfJtuz5xW1/dnKWELtm5E5RSvHfrRtMxYsMoYP/la/H0Ptei02H2f30Rb2UHbaf2nKZFce/OraauWy/LKmglM/VKm/x4OtnFgDnIb9KPHyw0deEuxhfxiu4CpRT37txq6pFoGAW8fHVon5jS5dbWiXplTn74wS9fHVqeUGF2H5pe/utr31hW2M0WRtYR7j6nZDaIwgWA9KcPdpkWneUcT8WfZY7PcHBo3XzwwuTEmCWiQxlfbuqiXUxTlldf30kSo7CHmkdhPB7Dnds3pa/pJNywxTArbsSvxfPNrhNs3YeQbh83Z3kvC5YSnonxlPTlnITLOZ5+/vhhqBYf6cc/XeKc/FI8f3J6jmxWfos7lRxGXFgAEsKX9PUdf2JzXYS0eMsxXXMYqJmkFMYYDo6sydec42n6ycN52fvsZtJPHizbCfjgKNNUFtzYqGVNOILLQugWbk1YXrpoOqK0qQXHq9fWpOswC7eKo4AP7aMsbhiIxzA8ZI5eEIKFsFlfKfE6WV3Z7d/M8alllUyAF2EXbhU7ATs9idzSC9ZX0vJara5stW81K0xgn2nRWakLBpSygM1RCMMoIHMs5+b390dCb309i1df30lW2oxeI2t1GWM4tIaHzjglc2FanLkl/eThPCH4uvbcyek5ci7TPUXsrW8xNEk73hVnGPMQEm9krW7m+NS6Jw++GNaguhtYNDoHwPQoOrSvIm6IvfXli83cXzfhWbyVjuTXJAblWosaRsGS1lhO5wvmBoRfpD+ZOeUE87XniqUSTk6zUtdLJYfEU/f059vTcnfXXXhSXaWiwFRBYPNocsWRtRbrDJyFakEhS/qzhysceFZ7LnN8hmLR0xgBAOUcE0v48oqH4nP2aDLpfO2RbAfyXP7SugcPvhiUJJu2UP5DNrkPdVJC65IaMVtfcc0SVDyJV/ylR4YGpd7ULrrQ6+6CSPrJoz3OYfpMsucXUtY3kRgQT43oX20FXsCuxVv5ZU0+gs2H0hBbq8vJoucL9QKx6BJ8sL7VsnwTLPjW173l5WS29lB2oZbNvhNP7YcxacQP0p/MnNpZX5nIQ2IwbjoOg+vgWn2VyZLXiB+GG4rFkrVgUFnd+thY3zOJxB1b1yHgUQdX4i3XY5mjDGLmkhtskk3OlNWtT/qTmVMOslx77rR+5bQtlFLrd3bFA219XVrevtnaI02LSkUZsudml0H8UhQO8CuT61AslaSSdsSnJaWYbeq+Oow78RKYHi8Dcc3zGxWLNh+48KUo7Ek/ebRHgBe152TaWonxXs7x8+burLO4Ei8l3CReLeo9Z1d0GcpZYyqu6xYGczlPLm94voZdlXKQ/V5X4hX/QmX83bzwYZdbMClcw7np8zKMglTUwer3IrzitfvLlPF3rYs1tuH5Ij1M5Sm1X3tOJtsspvULZ/iU9E11mMaWl5t/ORmra7e4UHN2vcM5NmqP3XbGrCUSMRueIC/aGouXmR8r/RHvVlcUr5izqnAL2ag9ujSKnq9gSdLhCGxyemPxEmL65fr7+zy/iZizW+6Pq/BMH0x5zjLhspgYcajT1bLbaSheS6RBojrYujIme54vooCYpM8Y87xoC9MYXM+/iWy5j5mrPc8XUQAohxhrjy8lrK/o+v3Q+T1YuFiwNe8TWR5vsVjPlvk0DUHTtX2RLpgx5wcNxSv6RH6MbOrF4kq/YNws3nZOPOo2wuMA9QocFr+3V2m5eHv5w1W0lpaLV1xQiAsOhUKWlotXXNlWBvQpFE3TevFaV7bSkyUVilrUgi1oCDuevYwb8Zrqp3o5NNMN+LHjGRYaipcQc2jmSqZnVkh2dLoRf3Y8g0lb3Iaw7Oh0A2JhgB9ZfkHd8WwoXsawV3ssk0Nq/YDprOeLKKpV3CaanaAJBHfH043l3Wv2TSxplCS4pScdhVIfMvwsxmff7v8FARfiNacvyhT+WabTQIlXCqEwQKYQ1jIijDRvnDqFC/Ga0xdLEo3exARoAPfsHoGK+oglO5qlHq0xor/LOAmkvwu4EK9Ya1YslaQSoK2POHMjE0V99PWdpLhYk8nwsz452V4Tt9VR3EYbTH6RTAK0pVEJCXarobZTKMzWHtobhMZYG7/w8FpeAOAwx3plIg6DQotNAnwepsk0LUdoSWppWeqCYtH61AxyFbdLy8s3ao9ku7VYAuohmkzTSioTmExz7xIJ71067WbdNXdnncWdeCndqD2UsbyA1VpQEo7ZCC1H+CO3bRbtAtHoMKGUPmi4Em+latWU4yAzG1ecTMOBj4PcK6tdiOOnZIQL2HxnxPxEDRqut4c5zL0WLi7ynt9M06LW3baQTKZpFXYTmGzGUzXEtrdZNLohfWNdgJe2/qZGb7Kugzj6ihB8oWK+zlBqHpUbj8ekogxiS1RC8HVQt4WruBdvrN8k3mKpJOU6DA8nbDKhzF+Qooy+ujkrxnZlrC5gfVIyoetkEHEt3nJ7efNgOxnXAbB+ARXrOyt1sRBDCF2uPe6PRCQXapeWlltiy9Qg4i0lUnAdLt7lpHJDU8lhi+9LCVVd0mvQ175ZgODr3rw5JnUtcQITIfg6DI29vYm37DpcRx0YY7i48O46UEotvi8HPq58YT2Pvro5RWCekhSPx6S2gxljFn+XsXDMAvEk3spcMJP1lR0pOjycsMk2I4sqdAZQSpchFKpOjKekrmUzcPtMXL8EFe+VFH3EMplGZuEG2H4hI5Tx5V7eNtZXtxbFRdrY6Ih0rdqJMPaKgywHPcpQxbN4058+2BWbQ4sfkFs0LWrrPuCy0JP+r766OUsIflV7rvwZyf0tZ7M20zJDNIFJqoaNMbZYe5zPX0rNRwCAsdGk1X0g+KLX/F/9+fY0IdTyOJ+ckFukAVaXjnM8DcNCrYqUeCuZSKY0yTdvT6RvYnJizBL7JSC/1le356UvGiD09Z0kYXwFgp87OTEm7S5kjk+t4THB5Qs60tXDnMBkGQ2jgKzETFygXET43q0blvOE8N+GXcD6+k6SGoUNCGGx4aEEhocTUtdkjFldOYLfiZ3Vg460eNOfPVwRfd/M8Zl0T4CBeMz2ERlmAVeFK/ZAjsdjmJSM6QJlq2v1dfEj6Qt2KU31bRB932KphMyx/EJ2eDhhWcAB4RSw/nx7mhiFXVG4mhbFbZunkFsMo+C0gP5AX9tWbkOV9JNHG+KW8cnpeVMtocZGkxgesj4uywLeWpa+cBehr27OEsY3ILgKmhbFnds3mxp6cnCUcfwZAf8yTHH05jvmcLYAIde33gfohsmbY7YJKITgi2dfbW0EOQ6sr24tEkLXISzO/BBu5vjUYjj6hOtRzkNjfYkfF9HXvlkgIL+uPZdKDuHG+GhT181mL5z+EM44wXz6s4eB2SnSVzenKKXLdpPW4/EYbt+60ZRwDaOA/ZevTedGhgZw/94kdr79q+k85+xHYQiZ+dKrLP34p0t2GxeyO29VhocTeM/+Sx0hHLq+trUShFxgfe2bBULorp1wh4cSTVtcxhi+f/3Gcn7mo/u4e3vcpnKbhKJ20LdGe4yxeYjuw2EGRYkmJbUkBgdw5/ZN23gnAT4nhO7qq1uL3ehK6KubsytrW3uVp5JlJTo5MdZUVKHKwWHGEtP98P27GBkqp0/ev3fT9DMKMt/0m3YBvrgNVfTV7XlC+G9rz/nhywFl65I5Pq23FX3GOZYQiy51eu9eX92cpZRachSqaFq0qQ2IWjLHp5adtPHRIfzsHz+4Ps7lDfz+D+ZC4bnHD3397juB77+Avrq1LJZpDw8lfLEwQDmx+tDG0tRwxkGWwa+W2unX6es7SVwW5yrFkvec/t/Y6Ih0roKI3ZqgP9KHf/75NPoj5uaGv/u3/0KxdHV9zCmZCfqmhf+Nc2PRBWIUpmvjl9V8Uj8EPBCP4d7dWzg5zTqlY44Q8C9B6JfP1rZeMPBlcL7SCiHr6ztJFAqzYJgjRuGLeqYgHo9hYjzlWydzwyjgyGZL/mcPPrAIFwBGhgfw9rjmqXV11XVullda8ujQVzenCKG7EPy8G+MppJLDvr1PsVhC5vjMkmztwD7n2ADIBvqwK2N19NXNKVA6DYZpSmGpL7OjPxLBzZtjvkwOrWIYBbx8dWjZRZv5sLxAs+OP//knk3g5Z58EuVsO0CLxApUdpHIg3pJsIrtn74RHEV9DgBcgOGUcp+JkyfJ/IMnqDAg3Qq0lHo8hlRyS7rHghJNw79+bxEfv33V8nRKvR+wWcEBrBAyUF3Vn2Qucnp7X84lbRrWTTSo51JJBJ07CvfPeOH7y0f26rxV9XgD/NPf44b/7fpNtpOUrTicB+7mIs8MwCsieXyCXN1o6wagq2EQi7ruVrcVJuJMTKTyc+XHd19pFGwjwgmnR2U5HZpqhLeGSTgm4CmMMufwl8vlLXBpF++4xLtG0KLRoFJrWjwHJBiBeyWYvcPT2xHLPI0MDjgu0Wv6yf4Bv//yd5XzQBdy2WJ+TgP2KA3uFMXbdZ7iemDUtCkop+iMRX4aXeMUujguULe5PPrrfULgA8Ps/vHDs7BlkAbc1UO0k4P5IORm9lwfiiTDGcHCYsd1id+PjVnGyurUEVcBt32VxikIA/ofSgophFPD96ze2i85GUYVacnkDG//xrbhQsyWIAu7IFqH+fHuaMr4sJmIDlSqCibGOPKK7ASc3AagfxxUplq7wx+0/4ezcbLnHRkccrx80AXdsf1tf30nCKCwT4HPxZ9WOOr1khQ2jgIOjjG1kpD/Sh589+OA60aYRTsKtpqnWSTUNlIA7npxhlwtcJR6PYWx0xNfdqW6jUcJRaiSBR//w964WZgDw+ugEO//9V4uroGlR3Ltz6/rYrYDLORuX00D3za/ouHiBaz94BQ4JLcND5dq2sLkSVdHWC9v1R/owOZHC305N1rW83716i5ffvzHnL1RwiujUEzBAvgf4MYAPTWeBF4yTpfSTB8uON9MmukK8QNWNKC4S8C+d/k9YRJzNXiBzfOZ5F3AgrmEgHsVYquxOFUtXyJ6/sxVslUahyPoCdqYb3IuuEW+Veou5KsNDiZZtwbaKci+FbCNLewZO/hWE/wJ10irdkkoOYWw02TCGHlQBd514q1RiwkuwCalV0bQoUiNDSCQG2r7J4ZZc/hLZ7LuGSUOc4yli0YUf/MzCAik3dnH8/Z2QWSvUi3KMDA2gWLqy3ejopIC7VrxANcHb3ZeYGBxAYjDeFUKu5lVcXOQbugac4ynAFu3yjcuulDFPQebrPYlqIYTg7t9MenoqOeVNjI8OYebD+9c1cLm8ge2d/7VEMTol4K4WbxWvligejyExGIemRdsSqSgWS5Vmg4brbvH1RGvHD6v+vimATxGKSXDMA9DE/0spdaz7E/GaqeYUhuuEgAMh3ipuS21E4vEYYlo/IpEINC2KWCVfQYZc/hKMMRhG4TpjzUOSj68lSvV2K90IWDbFslsEHCjx1qI/357GFV8gBHOQ8AuBck5FxEXkoipWWQjB14yR5VaEl2QF3ExuMNAdAg6seGvRv9qaA8NcM0L2G0LwNeN8pVX1c7V4FXCzwq3SaQGHQry1VCzyXKXGbBptEjMBXjCQDRC+gWh0o92LF7cC9ku4VTop4NCJV6QsZkwDfIpSzIIj6Xbl7sA+IdhjnOwCbA+c73bLtmkjAd+cGMXh0bFvwq3SKQGHXrz18DS4MBbbDUKySj0B29GscKt0QsA9Ld6w4lbAfgm3SrsFrMQbUhoJ2G/hVmmngJV4Q0xFwN9A2MholXCrtEvASrwhZ2Vt6xzAdZMMsQlfq2iHgLszm0XhC5UF6bVw+yN9eDDzd215b6fqDw58TI2CL93tlXjDDKUmgYwMD7iuyPCDVgtYiTfMcD5VexiJtD+Jv5UCVuINM5ybmgdmz5sbsyBLqwSsxBtmYjGTeHN5A3/+v1cduZVGApa5phJviEl/MnNazhv+gf/5yyt89+ptR+6nnoBlBhwq8YYetghh0M3Ot3/tOgHLDDhU4g056SeP9jgnC+L5Tgv4wcyPrZEPxhe9XEeJtwdIP3mwzDn5pXi+kwIeiGv48H1zMQwBPvcyV0+Jt0foRgE3O+BQibeH6EYBT06khDNk1u1rlXh7jG4T8K0Jc4iXALNuX6vE24N0k4DHRy2dQF2XbSnx9ijdJGBZlHh7mKALWIm3xwmygJV4FR0V8NvjrHjKvtufDUq8CgCdE/DrI3NBBQc23L5WiVdxTScEfHAkTq7nG25fq8SrMNFOAX/36q215y/nK25fr8SrsNAOARdLV/j2z/umcxx45qWvmxKvwpZWCrhaWWwZbkjJopfrKPEqHKkn4L/sH0hd06kknoP8Jv3pg12Hl9mi+jYoGuI0M3pyIoWP3r9rzQxzwGlGnGwvByVehSucBAyUO/DcvT1ul6eAYukKrw9PHGfEAdjnWnRapgmJEq/CNfUEXGV8dOj637l8wXaCUJVmu+co8So80WhaqVtqR3fJXkOJVyGFvrq1KDMnrjyfgy360ZBbiVchTXU6EwifqySROwl5n4OsgGLZa0ShHkq8Ct+oFE9OmU4GpKO8QqFQKBQKhUKhUCgUCoVCoVAoFAqFa/4fCbut2hEefs8AAAAASUVORK5CYII=","e":1},{"id":"image_1","w":85,"h":85,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFUAAABVCAYAAAA49ahaAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAEE0lEQVR4nO2d/XXaMBTF72OB0AnqThA6Qd0JygalEzQj0A3aCUo3gAnqbEAmKNmATHD7hyTqEuMvycgW73cOJzYY83zzJMuS3pNgJJDMAWT2tQAwb/jKEcDe/RWRYjjruiGxfpjkEkBuX/eBTvsEI/QWQCEix0DnHS8klyS3JI+8DluSK5JNXj8tSGYk11cUsoojyQ3JLLYeXlgxNxGFvMT0xCU5p/HMsbPhFKoFmjozZjHvypHkQ2zdKqHxzm1kgXwoGLBK8G5S0bQvtwDuvK2JywuABxHZ+J5o5vNlmqLzG9MXFDDX8JPkd98T9fZUkhsAn30NGCk7AKu+Dw+9RE1cUMcTgLyPsJ1FJblHuMfKsdNL2E51qvXQWxEUMNdasGN7trWoN1Lkq7iHad20ppWo9i5/i4I6PlinakVjnWrbob89DEqJL23asbWi2rrkgDTaoSF4gblx7esOair+G6igZe5gNKnloqg0PfOfAhqUCvck13UHVBZ/LfaNvABYiMih6sNLnvoAFbSOOwAX+wheeartAvszoEEp8bFqFLfKU9eDm5IO66o3//NU9dJevPLWc09dXc2UdFidv3HuqUfoDaoPb8o9WSdPte1SFbQfq/LO7NIHSidW5Z1T8dei78079zAwA7ToB2LpNlzxz+PYkRS521BRw5G7DQEAkoxmSlq8F5H9zPbsK2HIAFP8s6hmpMUCUFFDcxJ1EdmQlJgDRtTxT3ydDhngOetPecVbQEUdBC3+A6CiDsAMZihaCYjWqQOgooblGTCiph8Uez0OgBG1dgab0okjoJ4amj2gnhqaA6Cd1KExndR25ymqKYngZlg7UbUK8OfRbThRO4W0KJWcNHSiFnHsSIrCbcwAwE6u2sWyJgGeyxEr5cdUrQL6synvlOdSafBEf96VgypOnmqrAPXW7uzOo1R0ero/9dPTreK/rmjQ1Hmsik7RkB8/2oX8qLe2ptJLAQ2j9OH9pWjqyuEU2xJYD2nRxPlRF57eFO9fAPgQ2qKJ8wwT7Huxc79p4G8FEzGs/KMxX1WtqPamNc4Eg3H41iZNc6u8VDZV21dfiybOTkSWzYd1SPZFcovbzVTRKelXF1HnMH2Gt5TsC+iRRa1TWrobFLZVdp9zOk37sf+tHLcxUOg8tPP4Xd+slHOYbsJU27C9M1ICPSeoichRRHKk2Uewg4eggOesPxFZAfiCdB4QvonIchQrWZBckNwPlYX7Chw41shHxl95og/fOfZ8/zQrUUwhPX1BclqBeSRza/jYKDjWot4WGnHHsIbKllMX8xyaVSseeN0b2oGmns+uea1RFvmyF1le5CvksM0j/i3yFWU2Y7SV08rQ3DAymIhutxRdBhvrWcEzzBiaW5LuALMknU4JTZW/U1qiUwiP8oYAAAAASUVORK5CYII=","e":1},{"id":"image_2","w":186,"h":242,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAADyCAYAAAD6Bd/wAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAPn0lEQVR4nO3dXVobR74G8LeqW60vGgkZFA/J2OZ54rkNZwXxDiY7GGYHnrOBISs4mbMCZwPnOCsYZwf2re05Mk6GsYUQSE2jr+6ucyGaMCBA6KtK1Pu7sUBSV7n00vp3qVoNEBERERGRScSiGqrVjp7ETrytlNoWSjw7a/3bRbVP2u1B4QMEPiioD0jw6unWxqtFNT7XoL+t1bellDtKiGdCqW/m2RYtrZ8g8NKJnZdbW2vH82pkLkF//7GxoyCeXw53PptBLuci4zpwHYms50LKhb2pkEa9foQkUegPYvT6ETq9AaIoufiQAMD/OImzu7W19mHW7c80Ze8/NnagsAvgcfo7v5hFseAhn80w1PRvoihB2OmjHfbQ70cX7/px1oGfSfLe1urbwnFepHtw15Xwi1mU/TzDTWPpdAcIwh6CsHf+OwX1vZu4P8yipJk6he/2DnYFxF8BQEqBkp9jwGliUZSgfniCTm8AAFBCvFFxvPOHrerrabY7cRprtaNyLOKX6cxJMe+h+mCFAaeZCDt91A9PkCRq+AuBP3/9aP3FpNubKJUXSxUpBdbXivCL2Un7QDRSkijUD08Qdvrpr378+vH6ziTbunPQz6YMfwaw6roSD9d9ZD13kraJxtJsneKo1Ul/nCjsdwr6xZB7nosvq6ssVWghgrCH+uFJ+uOdwy7HfWCtdlQWjvMCDDlp4BezqD5YSX/807u9g927PH/soMcifimU+sZ1JUNOWlwMu4D46/uPje/Gfe5YQX+3d7ALgW+lFHi47jPkpI1fzP428aHwY6129GSc590a9Le1+nY6T76+VuSBJ2lXfbACb5jD1VjEL8Z5zq1BP6vLUcx7nEIkY1QrxeENgW/HKWFuDPr7j42ddK78woEAkXZZz8VaKT/8QeG/b3v8zXv04QItlPwc63IyTqVUgOtKAPj9P/YOn9/02GuD/v5jYwfAY9eVqJQKs+0h0Yyk2VRQ/3nT464NuoJ4DoB1ORnNL2bP9+pnO+eRRgb9ba2+nS65Lfv5uXSQaFYuTDdee1A6MuhSyp10A6zNyXSrxVx684+12lF51GOuK12+A4BiwZtDt4hmy3VlOq+O2IlH7tWvBP3sk6bHwHDunGgZrP5Wvjwbdf+VoMdOvA0MT2QmWhZexklvPht1/5WgK6W2ASCX40f9tDzyufMd8+NRdfqVoKdfLpRxnct3ERktrdMjRNuX77t2Ht11xl7BS2QERwxnCIUjnly+72qaz0525ipFWjZpua2UenL5vmt325w/p/uE9QlZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysYeWJotxchCLvo9SPE6QVVyWg5z0Uu62KlmINj4GmYRgW9FXRw0AwxiGLdXaE7Oj2/6G0bJT+PjUrRqK9MMSLocaLw66fjC4NFy6wVdBCEXTxc91Ey5NuYtQc9ThQ+/rOJbj/S3RWaoSRR2K+3AcCIsGs/GGXI77f9ehutoHP7A+dMa9APmicMuQU+NQLtx13agh4nCs3Wqa7maYGSROGgGWrtg7agt4IOEk4dWiMIu1qnirUFPQh7upomDZJEaZ1V0xZ0TiXap9sbaGtb+6wL2WMQJdraZtBpYXTOvDDotDCFnL7rYmkLOr9/3T6OxquoaGvZ/+0iqGSJQk7f5Tw1Bj2rq2nSIOM6yGX1La3SGnSTlnHSfG1Uilrb13owulld1dk8LUgh72lfwag16IW8hy/WfZ1doDmTUuCrh1eub7v4fujuQKVUwPqa3rc1mo+M6+DxZsWIU+u0n3gBABuVFeSyGXw2YDknzUbJz+OLdd+IkAOGBB0YHpwW8h5Owi6ax6dcp76EpBTwizmU/RwKeX1TiaMYE3QAcKRAyc+fH7hw4dfykFJqnT68jbk9A4zbK9Dy0n4wSrQIDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUjv2Q0PrtuvM5Lai9aLptBIe8t/PvEZzXWjiNRyHnGfqOuUb3q9iI0W6doBR3dXdGm5OexUSnO/UJmp50+mq1TBGFvptvNuA5Kfg6VctGYiwAABgX9cyNAs3WquxvatYIOWkEH62tFbFRW5tLGPMd6EMVoHIVoBV1sVleN+epv7TV6nCjs7R8x5Jc0jkLs19sz3WacKNR+OVzIWA+iGHv7R8a8O2sP+udGwCtbXKMVdGYa9l8/HS/8kjn79bYRr6/WoNtej4+jFXRmUkcfNE+0Be6XT8eIE6Wl7ZS2oMeJwkHzRFfzS+VzI5jq+XGitJaGSaLQPA61tQ9oDPpJ2EWi+a98WQyieKp3vlbQ0T7Wuo/BtAV91tNa990049Vq6y8Pk0Rpfc0Z9CURTlFfm3LNVp0fAGqfdaHxTFp6mHQl7kGUaGubQb/nBgOTgq6vLwz6PZfNZnR34dy8lzXcRFvQpUHrIJbBpCExab1JxtW3X9XWctGQNRDLYpo1I6asN9H5mmsLul/M6mp6KU0zXiaMtZRC6x+ctqCX/LzWmm2ZZFxnqrCW/Lz2UrFSKmhtX+vB6Bfrvs7ml8a04+RIMbclv+PIuA4q5aK29gHNQfeLWZT8vM4uGK9SKsyk9KiUClrGWkqBrx6WtR8Ua59e3KyuMuzXKPn5mb7rLXqspRR4vFkx4vQ6/T3A8AXIuBKNI70r3Ewhz0qNedS1ixrrnOfid9WSESEHDAk6AGxUVlBezeOgGSKwdGWjlAJlP49KuTDXA/V5jnXOc1Ep6ymTbmJM0IHhQctmdRXAKk47fQyiGH2DPsKeFy/jIOtlFrr3uzzW3X6EOJ58LUouO+y/qTNpRgX9IlM+5LBBIe/d+/HWfjBKtAgMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBWO/ZHQQxRgM4nv/jbpexkHGdZA5+1eHacc6vdqcyV9UalTQ40SheRyiFXSNurT3omRcByU/h0q5OPdLocxyrC9eVMAvZlEpFYwLvTFBbwUdfGoEVl4AIDWIYjSOQjRbp9isluZ22cRm6xQHzZO5jHUQ9hCEPRTy3tnVNcz4vnQjavT9ehv79bbVIb8oSRR+/XSMz41g5tver7fxeQE7lNNOH//3yyG6vWiu7YxLe9A/NwK0go7ubhgp3fPOyn69vdCxThKFvf2mEWHXGvQg7KHZOtXZBeM1jkKcdvpTbycIe1p2KEmi8K96a+HtXqY16PN4a76P9uvtqbehc6y7/Wim70yT0Bb0VtCxcmZlEoMoRhD2Jn6+CWPdCrpa29cW9GleOBtNM14mjPUgimdSgk1KW9BDjf/pZTRNSEwIOqD3NdcWdE4l3s2kpUds0DgPosmvYzot7dOLNF+93kB3F87pPE5g0O+5TMaMTyYBzH1Zw00Y9CUhJwyJKR/BA0DW07fiRFvQTVv0Y7riFOOV0xiwi3LZjLa2tQV9XguW7qtpxqu0mp9hTyYjpdC6c9MW9JKfn/jt2DZSCqwUcxM/34Sx9os5O2t0RwpUSgVdzS+VjcrKVCHRPdZSCnyx7mtrH9B8MLpRWWGtfov0RIZpbVRWtNXqm9WS1r05YMCsy1cPy8YcLJkm57n4XbU0s+09+rKy8LHerK4acTymPeiOFHj0ZQUlX/8Bk0kqpQK2fv9gpnvCdKwXETwpBb56WDbmdTViV+pIgc3qKsp+DgczWn+9rAp5DxtrxbmVdM5ZAE87/bmMtTw7HljEea93YUTQU4W8h8d573ylW38Qo9ePjFqvMWsZ10HGlfAyDgp5b2Ef8Fwc6yDsIY6Ticc657mQUiCXzRhRpoxiVNBTw7PhzXjLu+8yrmPF7Jf2Gp1oERh0sgKDTlZg0MkKDDpZgUEnKzDoZAUGnazAoJMVGHSyAoNOVmDQyQoMOlmBQScrMOhkBQadrMCgkxUYdLICg05WYNDJCgw6WYFBJysw6GQFBp2swKCTFRh0sgKDTlZg0MkKDDpZgUEnKzDoZIVRQW8BQK8fLbgrRNNJbriIwdWgK7y+7UlEJur34+GNBK8u33c16ALHANAfxPPtFdGMDeLrM3sl6ArqNcDShZZLkihEUQIAeLq18ery/Vf36Ge7/R736LREOr0BAEAJ8WbU/VeCnv419PvR+V8Ikek63WHQhVKvRt0/enpR4WcACC2+3ictl/OsiqsHosA1QRdCvASAdtibU7eIZqf3W/XR/vrR+stRjxkZdJnIFwDLF1oOraCb3vzf6x4zMuhbW2vHAH4EgGbrdOYdI5qVJFEIziqPJEl+uO5x1y4BUIl6AQBB2ONenYx1HHSGNxR+/sNW9fV1j7s26E+3Nl6lB6Xcq5OJoijBUWsYdKXU7k2PvXFRV/rkIOydT98QmaJxFA5vKPw86kOii24M+tmT/wYA9eYJ17+QMcJO/3xKMVHJ89sef+syXSdxdgG0oyj57S+ISKMoSlA/PAEAKKjvb6rNU2KcDb+rHTwTUvwdAKoPVuAXs1N1lGhSSaLwz3ob/X4EJcSbp48ebI/zvLFOvHi6tfFKQX0PAPXDE9brpE3jKER/uOCw7cbyu3GfN9YePfV+r/ECwJ+kFNisriLruXfrJdEU6ocnF+fM/2OckiV1p6ADwPsPjVcQ+FZKgfW1IssYmrskUWgchechh8Cfv360/uIu27jzOaOOcr4D8FOSKNQPTy5+/Eo0c2lNPk3Ih0+bUFrGAEAx76H6YAVSTrw5oivCTh/1w/Np7bZK1B9vmy+/zlTJ/Mfe4XMF9V8AwFKGZuVyqaKEeKPieOcuNfllU++C39bq28JxXgilvgGAfDaDtVIe+Vxm2k2TZZJE4TjooBV0L344+TcncXbPFhpObGa1xru9g10B8RcAq8Aw8P5Klnt4ulUUJWiH3X8LuBLiDeLk+aSlymUzLaprtaNyLOMfcFa7A8OSppj3UCx4yGczrOMJwPBkiW4vQjvspfPiqT0I7E5ywHmTuaSuVjsqRzJ6LiB2ADy+eJ/nucg4Ep7nABju+el+i+IEgyhGkij0+zF6g2jUuqmfIPDiujOEpjX33evbWn1bSrmjhHiW1vFEGH4j3CsIvHRi5+W0NfhtFl5HvKsdPJNSbidIygLiCRSeLLoPtHhKDM/OF0K8dmLn9dbW2ge9PSIiIiIiIp3+H/yNcCHjpRNmAAAAAElFTkSuQmCC","e":1},{"id":"image_3","w":216,"h":260,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAAEECAYAAABKq/oNAAAACXBIWXMAAAABAAAAAQBPJcTWAAAAJHpUWHRDcmVhdG9yAAAImXNMyU9KVXBMK0ktUnBNS0tNLikGAEF6Bs5qehXFAAAeX0lEQVR4nO2dX3Ybx5XGv6puNEAIAkGR4vAokQnO2H41ZwXiDuysIM4GJjnZQJIV2LOCaHZg74DeAfwqKQFgOxoOBRIgBDXxp7tqHtAFNWmA+NdV1Q3c3zl+oAii22R/qFu37ncvQBAEQRAEQRAEQZiC2b4BItu8ql+ecodXpZSnDKwKieq010kmzzl4RwhRc+HWTk72OkZv1BIkMGIh6vV2JUBwCo6ziZAYXqz6fpKxH5mU50KIl5+fHNaSu9N0QQIjfsXr+rsz5rAqJE4hcQqGUwC7017LOYOXc+DlHHDGUMi7v3pNEAoEgUAQCgxHIYaj8P5LmgzsWy74y01b2UhgW0y93q6GTngahXenkrEqk/KLWa8v5F24DofrcBTy7lhUfPlHSAgJvz9CfxDA748ghFTf6krIb1zhfrspQiOBbQEqvOOcn0rI03nhnevwyarkec7kax0osXW6fQShUP/cBcMfP/3k4KWWixqEBLZhqPBOSlllkp0tGt4pEU0L8UzR84d3hSbxgyOdr7K8mpHAMkq93q4GCKpR0mFueBcXUiHvwnXHoV4a6XT76Lzvqy+7UsgvPzt5em7xllaGBJZy7oV31Sjp8GB457ocBc/VHt7pZDgK0Wr7HxMiDH/IYshIAksR0ZnSaSy8qwI4nvbatIV3OhBC4vrmFj1/OP6HDIqMBGaBVcK7uIjSHN7p4PrmFt3eYPxFxkRGAtPM6/q7s3vh3cykQzy8c92PmTxinABptf3xFxkSGQksIe6UDM0J7wBMzpHiKfFVzpS2iVbbn4SLQoj/zEIFCP1Fl+ReeFeVjJ1SeGeOy6sP8PsjAOg6wjlOewqfBPYAy4R3KumgwjuVDieSRQiJi1ZPZRe///T44Cvb9/QQJDD8qiL8FMAp5oR3d6odKLwzynAU4u3l+/EXDL/79JOD7+ze0Wy26qlYtiL8zh7J+5gSJ+wTO4xufnp8ULV8OzPZWIGtWhEer3Yg0osQEr/8X3dcKJzirGLmBXa/IhwLhnfrVoQT9oml7lO7imXmyUpzRThhj5/+9ybVq1gq46BpFeEhwl0GBonIOxR9NFB4t92UH+XHezGJrwC8tH0/97G6gi1r+MtSRThhhiAU+OWiCwBwhHNycrLXsHtHdzH2UR+J6SyWdHgRIgQkwCKdMzlenTalIpzQj3o2hqMQoROeIWWrmFaB1evtiuDia8HwdSjDL1R0Ny2829SKcEI/paKH65vbVIaJWp7mer1dDXn41xDh7wGARcIq5F0UPJfCOyJRYh/KZxZvYyqJ7sGUsAD8Xv1bIe+iVPRQLOQoHU5oo/GvcUli2vZhia1gr5vv/hoi/DOAx8B42S6X8rR3IoxQyLvoDwIECKoAGpZvZ8LaAqvX29XAEd+p7F8h7+LJ7g4JizCKl3PQHwQAxxmAc8u3M2Etgb2uvzsLefg9kyhzzvBkdwelopfUvRHEwqj9fFTNkxpWFtibn1pfQ+LvwPjT43D/ESUtCGuoiEkyVrV6I/dYSWBxcZWKHg72isneFUEsiRLYQ4UKNlh6ySFxEWmEczaJoF7VL1MTJi4lsNf1d2ckLiKtuO74ceYOz57A6vV2lXH2PUDiItJJwRvveKSUVbt38pGFBRay8CWAspdz8GR3R98dEcSKqBWMSXZm904+spDA/tG8+hMYXnDOcLj/iCoyiFQyOXtl06ds2mCuwOr1dkVC/g0AKo8LlIonUkusuOG4Xm9XbN6LYq5aQh5+C6BcyLsol/IGbokgVkeJLECQikTHgwKr19tVRIW7lccFE/dDEGuhBMZ5OjKJDwosqowf20zIp0VkALWFkUhHJnGmwKIY9ncArV5EdpgsBBLpXsFCJ/wKQJmayBBZQqXqH+o4ZpLZIeLYfk2JDSJTuA6fHCNFOQSrPLQH+xIAijs5Q7dCEMmgEh2hE1oPE6cK7HX93RmASQdcgsgSE+uKlOkUWOQKpdWLyCRpMl9OFZi6MbL9E1kkTebLqQJTN0bhIZFFVNY7DebL6StYrIENQWQRtTiofIK1+7B5cSL7jIIQg2GIwTDAYBggFOMuswXPRd5zsFPIIeea32q4LkcQCjCHVY1fPH4fNi9OZAchJPqRiAbDAKNA4HY8jHwq8e+Vih72K0XkPXOPW8Eb90m0bb4kgRG/wu+PEAQhRoGA3x9hMAzGM7hWpOcP0fOH2K8UsV8x44T3PNUEx675kgS2xdwP70aBwGAYaLveVcfHKAhxdPBY2zUUkwQds1uTSALbAuLhXRAI9IfBg+GdTrq9AXKuo30lix0x7dbr7crJyV5H6wVnQALbMOKrUTzUSxNXHR+loqd9T6bmhkXmy3OtF5vBrP/DJoDj4Sikw+aUMoqEcxvtkXSHd0lzef0Bz492tV5DCSwyX55rvdgMpgtMogGG4yAUJDDLpCm8S5Lb/gijINSawo+ZL63tw6YKTDJ5zsBeDIchigWqRzRFfCVKa3iXJD1/iL2yvhaAhbwLvAcg7XWZmiowxlgDEuhnKOTIEvHwLp7J2zZu+yOtAkuD+XL6ChbKBuMMwQZ/eppCnSOp8G7dM6VNItT8e1DmSyEk6vV21cbky6kC++zk6fmbZgtBSAJblG0L77KCGswXmS8bpq8/M08qGfuRSflFfxBQ0W8MlXRQ4d28kiHCLkpgkfnyO9PXn6kcJmUDwBfDUbi1AlMr0WAYUningYKB2sTJ3DBL5svZKxhkjYF9uQ1hYjy8ix/UEnrJe/qPgGKexnQJjDFWgwSGo9Dk/Whl2YpwQh+cM5SK+juWxaKvY+0Xm8JMgTmhUwt5mFmBJV0RTiTLXnnH2JQe1xl7w17X3519dvL03MhF1bVnfePkZK/xptmCEBJBKFLbPsB0RTixPjmXaz3/uo+Xc6yZLx/eZUr8AIYXQZAOgakUOIV32YVzhmeHZaMz5rycA78/stJO+2GBMTQAvLCdqu/2+pGXiBIPWYZzhudHu0adzcBH86UNgT24LDGwGgBrB86jIETzbQcXrR6JK+PsFHI4flYxLi7ArvnyQYEJIWqAnUziYBig+bZD+6mMUyp6+O3RLp4f7VppfgP82nxp8toPfpy4cGshzGcShZD4+eKGsn4ZIudyuK6DYiGHnMuR91wrq9UsCvlxExzT5ssHfwMnJ3udN83WDYBdk+bLf112SVwpZqeQQ8Fz4UZCKniu0aTFKkzCxHFb+HNj1537CokaGF6YMl/6/RFlB1NC3nPvrEZ5z7EW5q1LrF991eh1573AtPmy073Vfg3iLpwz5D13Et6pUG+TsGW+nCsw0+bLnj80cp1tZefeHikL4V0STKIvw+bLuQIToahxzo2YL30KDRPjbmiX7fAuCThnE/Plq/rl6ecnhzUT150rsM9PDmvKfCmE3IpPuyyhwjvVC34Tw7ukUN4w7vAqgHQIDPhovtxmb1gaUOFdznUmmTz6wFscG+bLhdRC5kuz3A/v1NfEetgwXy62ghkyXzpb9mkcD+/UmRKFd/qwYb5c7GNR4Bwcf9Fd0ZGPQp5NPGSOJxrioR5hDhvmy4UE5sJthAjRH+hP1ZeKHrq9gfbr6CJ+jkThXfpQ7bRNmS8X+ssr8yUA7ebL/UoxEwKj8C6buA432q9+8Y9WQ+bLnOtgr7yDdooqOuIrEYV32UaZLyXMTL5cXGAMNRgyX+5XihPnsknSXhFOrI9p8+XCTw8Da0hII9YV5Xz9+eJGm8iyWBFOrE+sZCpdAhNC1BhnxtzNSmRXHX+tcJHCOyJObHuza6Jf/cICs2G+5Jzh6ZNHqJQLuOr46PnDmSn8bagIJ5IhZr6sQnO/+oUFFpkvrUy+zLnOZHC23x9BCInBMJgIicI7YhlMmi+X28FHky9tjpZVq1Kp6Fm5PpF9YiVTVd3XWirfLpk8B0Bzw4hMowQmmf6axKUExhhrADT5ksg2kxVMyi90X2spgYlw3MaNVjAiyyjzJQC8ql9qXcWWEphygSrzJUFkFbWKReZLbSxd8yQZ+xHYrLFGxPahhv9F5kttLC0wJqW1br8EkRSuG7Vxk+xM53WWX8EgG4C9fvUEkQSxfvVVnddZvixejA/maAUjsowp8+XSAnPhNgAYMV8ShE5UouN1/d2ZrmssLbCoOPIGoDCRWI5REMLvj+78ZzMbrcLEyHyp5xor/VTUr344ClMx+ZJIH8rPFwRiMnh+lpjynou9cgHlUsHoPZowX64msMh8aapfPZFe4nOx43Oyl32Pi1YPVx0fzw7LxkyusX716VrBTJoviXQhhMRNr4+eP0x8Cs4oEGi+7eDooGRkNVOpep3my5XiOzX5kvZg28VVx8c/f7nGu+sPWkdMXbR66Pb62t5fcd98qeMaKwlMtbuiFWw7EEKi+baDq45vLClxef0Bo0D/86XS9ZH5MnHWyVA0AUrXbzpqnK/pBkRCSFx1fO3Xmfgax+bLxFldYHJstaYwcbP512XX2iD6bm+gfRWLTb7Usg9bWWBkvtx8ur2+9XG+ugcyxsyXVR3vv3I+lDFWMzn5clsRQk7OkdSZUpycy1Es5LRk3UyEaPPo+UPslXe0vb9u8+XKAhOhaHDOKdGRIPFzJL8/QhCEc8+UbjEOpS6vP2CvvIP9SjGxe1n2PEsHupMqnDO4DkcQCi2TL1cWmJp8KYSkyZdLMoqEcxtVO6iD2nVQSYGeP8Szw8dr935My6xsE/s/1x0LjDv8FAlPvlzryJwmX87nfsmQ7j3NYBig+baD42eVtURmIkW+CCY+uAueqyZfVpN+77VUEZkvSWC4WzK0aHinCyEk3l6+x/Oj3ZUf0DSEhwCMlE3pNF+ut4JBNhjYVu3D4uHdKAgxGIbW0tgPMRgGaHdvE9uT2aJgQGCxfvXVpN97vbuPJl9u6lnYMhXhaeSq42OvvLPSKpZzOdIwQOqRgQazsSa6x/V6u3JystdJ6r3XEpjqV5/1ao4kKsLTyk2vv1Kaexya2R2EqI4gTKAmXwYIEh3Mt5bAon71NwB2dU++TAJ1pqTCOxXqbTKrniOVih7eXX/QcEeL82/RPAIT6Jp8uX6Am1LzpUo0DIZhJsO7pFj1A0QNa7f1AbRX3jHqNdRlvlxfYCkxXyqfUrc3SGXSIYvsV4r45eLG+HXLpTyePnlk9Jq6zJfJCEzata70/CEuWu+3coXSSbGQMz4ve6+8Y1xcwB3z5Ysk33ftmE6G4z6JtgR20XqPt5ddEpcmnj55hHIpr/06paKH42cVK+ICxnswlW1N0ny59gr22cnT8zfNlhXbykXrPbo9u5mutJPEQa0afpjU71pNIy14LvKeE432tT/W18s5iU++TOoUrwnguD8IjFV09PwhiWsBktoXHx08RqmYx7vr3lJHGPlIRCppkuYZ2UpgSU6+TEoNNQDHplYxISQuWu+NXCvrJBnelYoeSsUnk4Y38exsPhrjWyzk7gyezxI6zJeJ/AYkZI2BfWlqH3bT69OeawF2ooc9acZC27wRvjrMl4kcXDHGjE5codBwPpwzHB2UbN9GplDbmyTNl4kITISiAZgTGJ1zzefoYH1P2DaiwsSk+tUnIjDlAlXmS534G17atC5q5drEEM4EE+uKw6pJvF9ytU0SPwDUK9EmO4Ucnh/tGu/xvknEJl9Wk3i/5HbADA0AL0ym6olxxflO1PSG5gSsj+epJjjJmC8TU4IyX+pO1efc9BQUm0adI43PlsYHtdQLJVliky8TSdUnt9QYMl/mXAecs41O08dFFD+oJfQTM1/uJmG+TExgJs2XpaK3Ean6+yVDrutQmJcCkjRfJiawuPlyOArjnwSJUy4VMieweJnQTiFH4V2KUQJLwnyZbDYiMl8GodAqsGIhZ9UM+BD3w7sslgxtO2ofJiHX3ocl+5c3aL78zWEZ//zl2tpeLB7euZGIKLzbDGLmy+q675W8wAyZLzlneH60i58vbrSLLEsV4cT6JGm+TFRgMpQNxs31Scx7Lp4f7eKi1UukfCrn8kmigcK77UWZL4WQqNfb1ZOTvcbK75XgfVkxXyqRtbu3aHdvF17NVKKBwjtiGsobFjrhKdYwXyb+8az61Zus6OCcYb9SxH6leMerpHCi/RKFd8SiKIFJKU8BfLfq+ySuACZlAxb71W+qV4kwS1Lmy8TrjiRkDaDRskS2Scp8mbjATJsvCUIHSZkvExeYEzokMGIjSMJ8mbjAVEpTCElhIpFpJvOb1zBf6vF+RObLYEMmlBDbyaTcb4122noENjZfZn6sEbHdKPNl6gTGwCiTSGSeJMyXWgQmhKBEB5F57psvV3kPLQJz4ZLAiI1Apesj8+XSaBFYZLO+AUhkRLaZhInjfvXL/3yC93IXQ+ZLIvvE52KryaRqwIRyNOwUctgtFYy7wGMlU9WVfj65W7mLZPKcgVmffEmkh/hc7Pjg+Yd/RmAUDNHzh3h3/QH7lSL2yjvGhLau+VKbwBhjDUjcqWontgchJHr+YDIjO6n2DlcdH91eH88Oy0a8epPoa0XzpbYmg2ryJR02bxejIMRF6z3e/HSFi1YP7e5t4r1TRoHAzxc3RmYUcM4mq+Wr+uXSiQ5tAvvs5Ok5QGdh20S310fzbcdIxy8hpLHRwWoV4w6vLvuzWtvkSsZ+BKiiYxvo9vq4aPWMNiEaBQJXHV/7dSbWFbl8lymtAovMl5Sq33B6/hAXrZ6Va7e7txgFep+vSdHvCuZLvSsYmS83njSM8+35Q63vPzkLw/IlU3onKYhxV1Rawczh90fo9vq46vi46vhod2+1zlS76vjW5wToFlis9cXxsj+rNc/pwm2ECElgGoifI8UPamfBOUOp6GG/Uky06c9Nr5/Ye62KiWyi63AEocDr+rszlcBb6Oc03hNOTvYab5qtifkyttQSCyKERP+eiFZJewsh0e0N0O0NJh241sXvj6yvXgCMZRKDUCxtvtR/UifxAxheBAEJbB7xMiE/qnbQ8fBcdXwMhgGODh6vVRGRxtkAuvByzjjUXtIbpl9gUb96mnz5kVEQYjAM76xKpge79/whLq97ODp4bPS6WWVV86X2J56BNSTkVu7DkgrvdNHtDZD3XOyVd2zfylrsGKh1jZVMpUtgQoga4/pHy9rmoYrwNHPV8a1UqSeJiUazse3N7jL96rULTE2+3JQVbJWK8DQjhMRNr7/SKpaWedmmOjkX8i76gwABgioW7FevXWDR5MsmgGPdky+TJB7eBYFItCI8bfT84UoCMxGazaNcyhubNXDPfHm+0M9ou5s4Eg2w9Aosq+FdUqz6wZFzHeQ919oKzjnD4ZOSsevFSqaqi/6MEYEp82UarCvKpzROg4eZDu+SRAi50j5sr1ywUoeoBjCa3DvG+tUvnOgwIrA0mC+FkEvPENsm+sNgJed5uVTATW9gNHxW4jI9HHGygi3Rr97ILlWE4zZutlawwTBA8207FXVzaWWdhMVvDsvGEh7lUh7//tsnViaPrmK+NPJb+fzkcFJVb/oBHwwD/Hxxs1V7qlVYJ1HAOcNvNa4oO4Uc9itFnPx2b+3qk3VZ1nxp7GNATb40OZhPCGlkSHrWSSIbmHMdPD/anVTwr/YePBo4794ZPJ8mCp671ORLYwKzMfny8tqswzarJHWOxDnD0yePUCkXcNXx0fOHU3//PBrpW4hEpAbPZwE3CoWZZGcLvV7nzcSRkDUG9qWpio5REBrpDZF1OGfYLRUSfc+c60xqHEf3jjwKnpvpqpFYv/rqIq83dxRv2HzZ6dr3KWWB/UpR6wOfi1Yn9V+WxQUsb740JjAXbgMw1wCn59PqNY9S0ct8oa8NVKJjkcmXxgQWFUfeAGZ6dFDW8GHynktWlRVRYSLnfG6q3my1poSR8zCdPSg2gb3yDo6fVTIfrtliUtEBWZ33WrMCG5svqU+iJcqlPI6fVfD0ySPbt5JpljFfGj0ON2W+LFg45U8bec+9M5kk69m7NLGM+dLok2jKfKlKWrbhDCzn8sk5UvygltDHMuZLo3+Jz06enr9ptoyk6ouFnPZ+eaZRK5EbCYlWJXssar608VHXBHCsuwlOuVTIrMDuh3c5l6euZGjb8XLOOJcwx3xpXmCR+VJ3mFgqelbNgIugSoZUeJelkqFtZ9HJl8YFZtJ8eXRQQvNtR/t1FmHn3h6Jwrtss6j50rjAGGM1U+bL8WFqyajjNh7epbUinFifRc2XxgUmQtHgnBurSSxHhaxJiyzLFeHE+nDOJv3qX9UvT5Xn8T7GBfb5yWFN9atftQ/EspRLBeQ9F5fXH1aytscTDXSmRChcdyww7vBTAOkQGGDHfJn3XDw/2p2M95nmVbpv+FNfE8Q0YubL6qzXWHl6mJQ1GDZfKpRtQuH3R5QGJ1ZiEfOlnRUMssHAUtHtl/ZNxKrESqaqs15jp/dxZL7c9H71xGYTa6J7XK+3K9NeY0Vgps2XBKELJbIAwdTzMCsCM22+JAhdzDNf2huPEZkv07API4hVmWe+tCewyHw5HJLAiOwyyYLPMF9aExgDawC0ghGbgeQsPUkOYGy+BGgPRmSbeTWJ1gT22cnTc4BWMCLbzCuZsz0DtAlQup7YXGwLjMJEYqOxKjAJSal6ItPMWxysCowxRgIjMs3EmS/xw7TvWxWYCEUDIIER2UXIh1sDWhWYcoEq8yVBZA1VKCGZPJ/2fdtJjsnSSqsYkUVUbxnGxoUT97EvMDZu2kipeiKLqOfWCZ3zad+3LjAJ2QAoVU9kj9gUn+as9tnWBUbmSyKr+LcTgc0chm5dYC5cGmlEZBK1gkkh0yuwk5O9DiLzJSU6iKwQ60rWVHW107AuMAAfJ19SmEhkhE63DwBgYN8+9Lp0CIzMl0SG6PlDtRh0ueAvH3ptugRGISKRcoSQk9VLQn4TbXFmkgqByXCcqieBEWmn2xuo1etnV7gPhodASgSmNom0ByPSTH8QoPN+vHqB4b/mrV5ASgQWQeZLIrUIIdFq++rL7z/95GBmaj5OmgRGmUQitVy0eurZbDrC+XrRn0uNwMh8SaSVVttXz2VXCPHVIqGhIjUCI/MlkUZabR89fwgAkEJ+OWvQ3ixSM/zKCZ1ayEMSGJEKhJC4vP7wMSfA8IeHKjZmkZoVTFUjCyFpH0ZYZTgKcdHqKXF1wfC7Tz85eLnKe6VGYAAm5stJnwOCMEy3N8BFqxffc71YNGM4jXQJjMyXhCX6gwBvL9/j+uZ2XMQr8YMjnONl91z3Sc0eDAAYWE1C/p5CRMIU6vA49qHeZWB/+Y/q/twqjUVIlcCEEDXG0zFalthchJDw+yN0e4P7z9r/OML50zJp+HmkSmAu3FqIcSZRCDm37zdBLEIQCgxHIYbDEH5/NO0D/H8c4fx1lu1/HVL3BL/+6arGpPzicP8RDSgnlqY/CDAchR9FFX1Y30cy9iOXeMkFf5nkinWfVK1gAMCkPAfwhX87IoERM5mIaBiiPwwQBOLh4x2JH8BQA0PNCZ3vdIoqTuoEJoR4yTn/Y6xjD7HFCCExHIXoD4I7q9IsJGM/MikbErLGGKs5oVPTEfotSupCRAB402w1ABwf7BVRKnq2b4cwxH0RzQrvIm4gUZNMnjPGGjKUjVUqLXSTuhUMGPc5kJDfdHsDEtgGEg/vlJAWCO8aDKwmhKi5cGumQrx1SeUKVq+3KyEPmwDKRwelj4OmiUxxP7wLQjGviKAJoKbCOxGKxroHvbZJpcAA4HXz3V8Z2F+8nINnh49t3w4xh4mIAoH+MFgovFNJh7SGd0mQWoHFV7Enuzsol/K2b4nA3TOleDp8JlF4JyEbEDjPUniXBKkVGAD8o3n1Jwn5DecMzw4fw3XSVTq5yajwLr5H2rbwLglSLTDg48FzIe/i6KBk+3Y2komIlgzvGFhDCFHb1PAuCVIvsHq9XQ15+COAcrmUx5PdHdu3lFkme6R71Q6ziM6UarHwrmHzTCmLpF5gAPDmp9bXkPg7ANDZ2Hzi4Z0S0dzwTqIRnSlReJcgmRAYALxptr4F8EeARBbnfni3aMkQhXdmyIzAAOBNs/USwO+B7RPZiuFdQ0LWKLyzR6YEBtwV2abuyRatCI+Ih3cNEYoahXfpIXMCA+6Gi4W8i4O9YiZT+KtWhKvwbtvOlLJIJgUGTBIf/w2gzDlD5XEhtYfR8fAuixXhxOpkVmAA8Kp+ecoc5yWT8gsA8HIOnuzuWK1d3MSKcGJ1Mi0wRVTx8TcAZWAcNpaKntYkyDZVhBOrsxECA8a1iwEP/sTA/gzgMQBwzlAs5FDcyaHguSv1+Fi3IpzCu+1mYwSmiAntawDH8e95OQdezoHr8Jlh5BLZu62pCCdWZ+MEFudV/fKUc/61ZOxM7dNWYssrwonV2WiBxanX25UAwSk4zhhYBRKnU18YCYlKhgiCIAiCIAiCIAgiW/w/zQ1m2VyA5iUAAAAASUVORK5CYII=","e":1},{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"magnify","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":42,"s":[75]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":90,"s":[8]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":121,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":134,"s":[32]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":164,"s":[53]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":183,"s":[53]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":219,"s":[53]},{"t":272,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[333.752,339.42,0],"to":[-26,-25,0],"ti":[-4.333,25,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":42,"s":[177.752,189.42,0],"to":[4.333,-25,0],"ti":[-25.667,-23.333,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":90,"s":[359.752,189.42,0],"to":[25.667,23.333,0],"ti":[4.667,-23.333,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":121,"s":[331.752,329.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":134,"s":[331.752,329.42,0],"to":[-28.333,4.667,0],"ti":[28.333,-4.667,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.167,"y":0.167},"t":164,"s":[161.752,357.42,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":183,"s":[161.752,357.42,0],"to":[0,-24.333,0],"ti":[-28.667,3,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":219,"s":[161.752,211.42,0],"to":[28.667,-3,0],"ti":[-28.667,-21.333,0]},{"t":272,"s":[333.752,339.42,0]}],"ix":2},"a":{"a":0,"k":[87.194,86.29,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"glass 2","parent":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":20,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":2,"nm":"glass","parent":1,"td":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[68.687,68.686,0],"ix":2},"a":{"a":0,"k":[42.065,42.066,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"paper","tt":1,"refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[125,125,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"paper","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[250,250,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":500,"h":500,"ip":0,"op":750,"st":0,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":2,"nm":"paper_1","refId":"image_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[263.625,231.897,0],"ix":2},"a":{"a":0,"k":[92.771,120.853,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":2,"nm":"paper_2","refId":"image_3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[214.478,258.49,0],"ix":2},"a":{"a":0,"k":[107.933,130,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":750,"st":0,"bm":0}]}]'),layers:[{ddd:0,ind:1,ty:0,nm:"not_found 2",refId:"comp_0",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[250,250,0],ix:2},a:{a:0,k:[250,250,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,w:500,h:500,ip:0,op:273,st:0,bm:0}],markers:[]},v5={key:0,class:"inline-block"},_i=ft(t.defineComponent({name:"DCodeBadge",inheritAttrs:!1,__name:"DCodeBadge",props:{text:{default:""},variant:{default:"default"},size:{default:"sm"},icon:{},dot:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},color:{},skeleton:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},class:{}},setup(e){const o=e,n=t.computed(()=>No(o.icon,Lt)),r=t.computed(()=>o.visible??!0),a=t.computed(()=>{const u={xs:"px-1.5 py-0.5 text-[10px] gap-1",sm:"px-2.5 py-0.5 text-xs gap-1.5",md:"px-3 py-1 text-sm gap-2",lg:"px-4 py-1.5 text-base gap-2.5"};return u[o.size]||u.sm}),s=t.computed(()=>{const u={xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-2.5 h-2.5"};return u[o.size]||u.sm}),i=t.computed(()=>{const u={xs:"w-2.5 h-2.5",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"};return u[o.size]||u.sm}),l=t.computed(()=>{const u={default:"bg-primary text-primary-foreground border-transparent shadow hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground border-transparent hover:bg-secondary/80",destructive:"bg-destructive text-destructive-foreground border-transparent shadow hover:bg-destructive/80",success:"bg-success-500 text-white border-transparent shadow-sm hover:bg-success-600",warning:"bg-warning-500 text-white border-transparent shadow-sm hover:bg-warning-600",info:"bg-blue-500 text-white border-transparent shadow-sm hover:bg-blue-600",outline:"bg-transparent border-border text-foreground",tonal:"bg-primary/10 text-primary border-transparent hover:bg-primary/20",ghost:"bg-transparent text-muted-foreground border-transparent hover:bg-accent hover:text-accent-foreground",purple:"bg-purple-600 text-white border-transparent shadow-sm hover:bg-purple-700",pink:"bg-pink-600 text-white border-transparent shadow-sm hover:bg-pink-700",dark:"bg-gray-900 text-white border-transparent shadow-sm hover:bg-gray-950",light:"bg-gray-100 text-gray-900 border-gray-200 hover:bg-gray-200 dark:bg-gray-800 dark:text-gray-100 dark:border-gray-700"};return u[o.variant]||u.default}),c=t.computed(()=>({default:"bg-primary-foreground",secondary:"bg-secondary-foreground",destructive:"bg-destructive-foreground",success:"bg-white",warning:"bg-white",info:"bg-white",outline:"bg-primary",tonal:"bg-primary",ghost:"bg-muted-foreground"})[o.variant]||"bg-current"),d=t.computed(()=>{const u={xs:"h-4 w-10",sm:"h-5 w-14",md:"h-6 w-18",lg:"h-7 w-24"};return Te(u[o.size]||u.sm,"rounded animate-pulse bg-muted")}),f=t.computed(()=>Te("inline-flex items-center font-semibold border transition-all duration-300 select-none focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",o.pill?"rounded-full":"rounded-md",a.value,l.value,o.class));return(u,h)=>r.value?(t.openBlock(),t.createElementBlock("div",v5,[e.skeleton?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(d.value)},null,2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(f.value)},[e.dot?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(["rounded-full animate-pulse",s.value,c.value])},null,2)):t.createCommentVNode("",!0),n.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.value),{key:1,class:t.normalizeClass(["flex-shrink-0",i.value]),"stroke-width":"2.5"},null,8,["class"])):t.createCommentVNode("",!0),t.renderSlot(u.$slots,"default",{},()=>[t.createElementVNode("span",null,t.toDisplayString(e.text),1)],!0)],2))])):t.createCommentVNode("",!0)}}),[["__scopeId","data-v-1e8e809d"]]);var Ea={exports:{}},D5=Ea.exports,su;function N5(){return su||(su=1,(function(e,o){(function(n,r){e.exports=r()})(D5,function(){Array.isArray||(Array.isArray=function(s){return Object.prototype.toString.call(s)==="[object Array]"});function n(s){for(var i=[],l=0,c=s.length;l<c;l++)i.indexOf(s[l])===-1&&i.push(s[l]);return i}var r={},a={"==":function(s,i){return s==i},"===":function(s,i){return s===i},"!=":function(s,i){return s!=i},"!==":function(s,i){return s!==i},">":function(s,i){return s>i},">=":function(s,i){return s>=i},"<":function(s,i,l){return l===void 0?s<i:s<i&&i<l},"<=":function(s,i,l){return l===void 0?s<=i:s<=i&&i<=l},"!!":function(s){return r.truthy(s)},"!":function(s){return!r.truthy(s)},"%":function(s,i){return s%i},log:function(s){return console.log(s),s},in:function(s,i){return!i||typeof i.indexOf>"u"?!1:i.indexOf(s)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(s,i,l){if(l<0){var c=String(s).substr(i);return c.substr(0,c.length+l)}return String(s).substr(i,l)},"+":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(s,i){return parseFloat(s,10)*parseFloat(i,10)})},"-":function(s,i){return i===void 0?-s:s-i},"/":function(s,i){return s/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(s,i){return s.concat(i)},[])},var:function(s,i){var l=i===void 0?null:i,c=this;if(typeof s>"u"||s===""||s===null)return c;for(var d=String(s).split("."),f=0;f<d.length;f++)if(c==null||(c=c[d[f]],c===void 0))return l;return c},missing:function(){for(var s=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,l=0;l<i.length;l++){var c=i[l],d=r.apply({var:c},this);(d===null||d==="")&&s.push(c)}return s},missing_some:function(s,i){var l=r.apply({missing:i},this);return i.length-l.length>=s?[]:l}};return r.is_logic=function(s){return typeof s=="object"&&s!==null&&!Array.isArray(s)&&Object.keys(s).length===1},r.truthy=function(s){return Array.isArray(s)&&s.length===0?!1:!!s},r.get_operator=function(s){return Object.keys(s)[0]},r.get_values=function(s){return s[r.get_operator(s)]},r.apply=function(s,i){if(Array.isArray(s))return s.map(function(b){return r.apply(b,i)});if(!r.is_logic(s))return s;var l=r.get_operator(s),c=s[l],d,f,u,h,m;if(Array.isArray(c)||(c=[c]),l==="if"||l=="?:"){for(d=0;d<c.length-1;d+=2)if(r.truthy(r.apply(c[d],i)))return r.apply(c[d+1],i);return c.length===d+1?r.apply(c[d],i):null}else if(l==="and"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),!r.truthy(f))return f;return f}else if(l==="or"){for(d=0;d<c.length;d+=1)if(f=r.apply(c[d],i),r.truthy(f))return f;return f}else{if(l==="filter")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.filter(function(b){return r.truthy(r.apply(u,b))}):[];if(l==="map")return h=r.apply(c[0],i),u=c[1],Array.isArray(h)?h.map(function(b){return r.apply(u,b)}):[];if(l==="reduce")return h=r.apply(c[0],i),u=c[1],m=typeof c[2]<"u"?r.apply(c[2],i):null,Array.isArray(h)?h.reduce(function(b,g){return r.apply(u,{current:g,accumulator:b})},m):m;if(l==="all"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(!r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="none"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!0;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!1;return!0}else if(l==="some"){if(h=r.apply(c[0],i),u=c[1],!Array.isArray(h)||!h.length)return!1;for(d=0;d<h.length;d+=1)if(r.truthy(r.apply(u,h[d])))return!0;return!1}}if(c=c.map(function(b){return r.apply(b,i)}),a.hasOwnProperty(l)&&typeof a[l]=="function")return a[l].apply(i,c);if(l.indexOf(".")>0){var p=String(l).split("."),y=a;for(d=0;d<p.length;d++){if(!y.hasOwnProperty(p[d]))throw new Error("Unrecognized operation "+l+" (failed at "+p.slice(0,d+1).join(".")+")");y=y[p[d]]}return y.apply(i,c)}throw new Error("Unrecognized operation "+l)},r.uses_data=function(s){var i=[];if(r.is_logic(s)){var l=r.get_operator(s),c=s[l];Array.isArray(c)||(c=[c]),l==="var"?i.push(c[0]):c.forEach(function(d){i.push.apply(i,r.uses_data(d))})}return n(i)},r.add_operation=function(s,i){a[s]=i},r.rm_operation=function(s){delete a[s]},r.rule_like=function(s,i){if(i===s||i==="@")return!0;if(i==="number")return typeof s=="number";if(i==="string")return typeof s=="string";if(i==="array")return Array.isArray(s)&&!r.is_logic(s);if(r.is_logic(i)){if(r.is_logic(s)){var l=r.get_operator(i),c=r.get_operator(s);if(l==="@"||l===c)return r.rule_like(r.get_values(s,!1),r.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(s)){if(i.length!==s.length)return!1;for(var d=0;d<i.length;d+=1)if(!r.rule_like(s[d],i[d]))return!1;return!0}else return!1;return!1},r})})(Ea)),Ea.exports}var V5=N5();const kt=Ml(V5),_a=e=>{var o,n,r;return((o=e.propsForm)==null?void 0:o.key)||((n=e.propsTable)==null?void 0:n.key)||((r=e.propsWizard)==null?void 0:r.key)||e.id},xn=(e,o)=>o?o.split(".").reduce((n,r)=>n==null?void 0:n[r],e):void 0,iu=(e,o,n)=>{if(!o)return;const r=o.split(".");let a=e;for(let s=0;s<r.length-1;s++){const i=r[s];(a[i]===void 0||a[i]===null||typeof a[i]!="object")&&(a[i]={}),a=a[i]}a[r[r.length-1]]=n},Ho=e=>{const o=t.toRaw(e);if(Array.isArray(o))return o.map(n=>Ho(n));if(o&&typeof o=="object"){const n={};return Object.keys(o).forEach(r=>n[r]=Ho(o[r])),n}return o},Ba=e=>{if(!e||typeof e!="object")return[];if("var"in e)return[e.var];let o=[];return Object.values(e).forEach(n=>{Array.isArray(n)?n.forEach(r=>{o=o.concat(Ba(r))}):typeof n=="object"&&(o=o.concat(Ba(n)))}),o},M5=e=>e?[...e].sort((o,n)=>(o.seq||0)-(n.seq||0)):[],lu=(e,o={})=>(!e||typeof e!="object"||Object.keys(e).forEach(n=>{const r=e[n];r&&typeof r=="object"&&!Array.isArray(r)&&!r._isLogicValue?lu(r,o):o[n]=r}),o),Bi=(e,o)=>{if(!e||typeof e!="string"||e.startsWith("http")||!o)return e;const n=o.replace(/\/$/,""),r=e.startsWith("/")?e:`/${e}`;return`${n}${r}`};function Si({formData:e,errors:o,fieldMap:n,rawItemsCache:r,activeSchema:a,locale:s}){const i=(S,D)=>{if(D==null||typeof D=="object"&&D._isLogicValue)return D;const V=n.value.get(S);if(!V)return D;const R=V.field,O=r[R.key];if(!O||!Array.isArray(O))return D;const L=(R.props||{}).itemValue||"id",$=O.find(T=>String(T[L])===String(D)||String(T.id)===String(D)||String(T.code)===String(D));return $!=null&&$.code?{id:D,code:$.code,_isLogicValue:!0}:D},l=S=>{const D=(V,R)=>{if(V==null||typeof V=="object"&&V._isLogicValue)return V;if(typeof V=="boolean")return String(V);if(typeof V=="number"||typeof V=="string")return R?i(R,V):V;if(typeof V=="object"&&!Array.isArray(V)){const O=(V==null?void 0:V.id)??(V==null?void 0:V.code)??(V==null?void 0:V.value)??(V==null?void 0:V.key)??V;return R&&(typeof O=="string"||typeof O=="number")?i(R,O):O}return V};return new Proxy(S,{get(V,R){if(typeof R!="string")return V[R];const O=n.value.get(R);if(O){const P=xn(V,O.path);if(P!=null)return D(P,R)}return D(V[R],R)}})},c=t.computed(()=>{const S={};for(const D of Object.keys(e))S[D]=e[D];return S}),d=t.computed(()=>l(c.value)),f=()=>{const S=D=>D&&typeof D=="object"&&D._isLogicValue;kt.add_operation("length",D=>D==null?0:S(D)?Object.keys(D).length:typeof D=="string"?D.length:typeof D=="number"?String(D).length:Array.isArray(D)?D.length:typeof D=="object"?Object.keys(D).length:0),kt.add_operation("==",(D,V)=>D==null?V==null:V==null?D==null:S(D)&&S(V)?String(D.id)===String(V.id)||String(D.code)===String(V.code):S(D)?String(D.code)===String(V)||String(D.id)===String(V):S(V)?String(V.code)===String(D)||String(V.id)===String(D):typeof D=="boolean"&&typeof V=="string"?String(D)===V:typeof V=="boolean"&&typeof D=="string"?String(V)===D:String(D)===String(V)),kt.add_operation("!=",(D,V)=>{const R=O=>O&&typeof O=="object"&&O._isLogicValue;return D==null&&V==null?!1:D==null||V==null?!0:R(D)&&R(V)?String(D.id)!==String(V.id)&&String(D.code)!==String(V.code):R(D)?String(D.code)!==String(V)&&String(D.id)!==String(V):R(V)?String(V.code)!==String(D)&&String(V.id)!==String(D):String(D)!==String(V)})},u=(S,D,V="LOGIC")=>{if(S==null||typeof S=="object"&&Object.keys(S).length===0)return!0;if(typeof S=="boolean")return S;if(typeof S=="object")try{return f(),kt.apply(S,D)}catch(R){return console.error(`[${V}] JsonLogic error:`,R),!1}return!1},h=(S,D,V)=>S==null?null:Array.isArray(S)?S.find(R=>!R.condition||u(R.condition,D))||null:S,m=(S,D)=>{var P;if(S.isHidden)return!0;const V=D?l(D):d.value,R=(P=S.logic)==null?void 0:P.visibleRule;if(R==null)return!0;const O=h(R,V,`VISIBLE-${S.model}`);return O===null?!0:typeof O=="object"?!!u(O,V,`VISIBLE-${S.model}`):!!O},p=(S,D)=>{var P,L,$;const V=D?l(D):d.value,R=(P=S.logic)==null?void 0:P.requiredRule;if(R==null)return((L=S.props)==null?void 0:L.required)||!1;const O=h(R,V,`REQUIRED-${S.model}`);return O===null?(($=S.props)==null?void 0:$.required)||!1:typeof O=="object"?"required"in O?!!O.required:!!u(O,V):!!O},y=(S,D)=>{var P,L,$;const V=D?l(D):d.value,R=(P=S.logic)==null?void 0:P.disabledRule;if(R==null)return((L=S.props)==null?void 0:L.disabled)||!1;const O=h(R,V,`DISABLED-${S.model}`);return O===null?(($=S.props)==null?void 0:$.disabled)||!1:typeof O=="object"?"disabled"in O?!!O.disabled:!!u(O,V):!!O},b=(S,D)=>{var P,L,$;const V=D?l(D):d.value,R=(P=S.logic)==null?void 0:P.disabledRule;return R===!1?!0:R==null?((L=S.props)==null?void 0:L.readonly)||!1:h(R,V,`READONLY-${S.model}`)===!1?!0:(($=S.props)==null?void 0:$.readonly)||!1},g=S=>{var P;const D=S.propsForm||S.propsTable||S.propsWizard||S.props||{};let V=s.value==="id"?D.titleID||S.titleID||S.labelID:D.titleEN||S.titleEN||S.labelEN,R=s.value==="id"?D.descriptionID||S.descriptionID:D.descriptionEN||S.descriptionEN;const O=h((P=S.logic||D.logic)==null?void 0:P.labelingRule,d.value);return O&&(V=s.value==="id"?O.labelID||O.titleID||O.title:O.labelEN||O.titleEN||O.title,R=s.value==="id"?O.descriptionID:O.descriptionEN),{title:V,description:R}},E=(S,D)=>{var L,$;if(!S)return!0;const V=S.propsForm||S.propsTable||S.propsDataTableWizard||S.propsWizard||S.props||{},R=(L=S.logic||V.logic)==null?void 0:L.visibleRule,O=D?l(D):d.value;if(R!=null){const T=h(R,O);return T===null?!0:typeof T=="object"?!!u(T,O,"VISIBLE-SEC"):!!T}if(S.type==="TABLE"&&(($=V.headers)!=null&&$.length))return!0;const P=V.fields||S.fields||[];return P.length===0||P.some(T=>m(T,D))},_=(S,D)=>{var O;const V=D?l(D):d.value;return h((O=S.logic)==null?void 0:O.labelingRule,V,`LABEL-${S.model}`)||null},B=(S,D)=>{var O;const V=D?l(D):d.value;return h((O=S.logic)==null?void 0:O.lengthRule,V,`LENGTH-${S.model}`)||null},A=(S,D)=>{var T;const V=S.props||{},R=r[S.key]||V.items||V.options||[];if(!((T=S.logic)!=null&&T.optionsFilterRule))return R;const O=D?l(D):d.value,P=h(S.logic.optionsFilterRule,O,`FILTER-${S.model}`);if(!(P!=null&&P.values))return R;const L=new Set((P.values||[]).map(String)),$=V.itemValue||"id";return R.filter(I=>I==null?!1:typeof I!="object"?L.has(String(I)):[$,"code","id","value","key"].some(H=>{const q=I[H];return q!=null&&L.has(String(q))}))},C=S=>{var V;return(((V=S.propsWizard)==null?void 0:V.propsSteps)||[]).filter(R=>E(R)).map((R,O)=>{var $;let P=[];if(Array.isArray(R.sectionsWizard))P=R.sectionsWizard;else if(R.sectionsWizard&&typeof R.sectionsWizard=="object"){const T=R.sectionsWizard;let I=T.type;I||(T.propsDataTableWizard||T.isDataTable||T.propsTable?I="TABLE":T.fields?I="FORM":I="UNKNOWN"),P=[{type:I,...T}]}const L=g(R);return{key:R.key||`step-${O}`,title:L.title,description:L.description,icon:R.icon||void 0,sections:P,actions:(($=R.propsComponent)==null?void 0:$.actionComponent)||R.actionComponent||[]}})},x=()=>{var S;if((S=a.value)!=null&&S.sections)for(let D=0;D<3;D++){let V=!1;if(a.value.sections.forEach(R=>{var O;(((O=R.propsForm)==null?void 0:O.fields)||R.fields||[]).forEach(P=>{var $;const L=($=P.logic)==null?void 0:$.calculateRule;if(L&&typeof L=="object"){const T=Object.keys(L)[0],I=u(L[T],d.value,`CALC-${T}`);I!==void 0&&e[T]!==I&&(e[T]=I,V=!0)}})}),!V)break}},k=S=>{if(!m(S)||!p(S))return!1;const D=e[S.model];return Array.isArray(D)?D.length===0:D==null||D===""},N=S=>S.sections.flatMap(V=>V.fields||[]).some(k),w=S=>{var V;return(((V=S.propsForm)==null?void 0:V.fields)||S.fields||[]).some(k)?!0:S.type==="WIZARD"?C(S).some(N):!1},v=t.computed(()=>{var S;return(S=a.value)!=null&&S.sections?Object.keys(o).length>0?!0:a.value.sections.some(w):!1});return{normalizedData:d,getNormalizedData:l,evaluateLogic:u,resolveActiveRule:h,resolveValueIdentifier:i,getFilteredItems:A,isFieldVisible:m,isFieldRequired:p,isFieldDisabled:y,isFieldReadonly:b,resolveSectionLabels:g,isSectionVisible:E,resolveFieldLabels:_,resolveFieldLength:B,getWizardTabs:C,applyCalculations:x,isSubmitDisabled:v,resolveSectionGridClass:S=>{switch(String(S||"FULL").toUpperCase()){case"FULL":return"grid-cols-1";case"HALF":return"grid-cols-1 md:grid-cols-2";case"THIRD":return"grid-cols-1 md:grid-cols-3";case"QUARTER":case"QUARTED":return"grid-cols-1 md:grid-cols-4";case"TWO-THIRD":case"TWO-THIRDS":return"grid-cols-2 md:grid-cols-3";case"THREE-QUARTER":case"THREE-QUARTERS":return"grid-cols-3 md:grid-cols-4";default:return"grid-cols-1"}},resolveFieldColumnClass:(S,D="FULL")=>{var T;const V=I=>{switch(String(I||"FULL").toUpperCase()){case"FULL":return 1;case"HALF":return 2;case"THIRD":return 3;case"TWO-THIRD":case"TWO-THIRDS":return 3;case"QUARTER":case"QUARTED":return 4;case"THREE-QUARTER":case"THREE-QUARTERS":return 4;default:return 1}},R=I=>{switch(String(I).toUpperCase()){case"FULL":return 1;case"HALF":return .5;case"THIRD":return .333;case"TWO-THIRD":case"TWO-THIRDS":return .666;case"QUARTER":case"QUARTED":return .25;case"THREE-QUARTER":case"THREE-QUARTERS":return .75;default:return 1}},O=V(D),P=S.column||((T=S.props)==null?void 0:T.colSpan)||"FULL",L=R(P),$=Math.max(1,Math.ceil(O*L));return O===1?"col-span-1":`col-span-1 md:col-span-${$}`}}}const T5={class:"dcode-card animate-slide-up"},P5={class:"px-4 py-2 bg-primary-700 dark:bg-primary-900 border-b border-primary-500/30 dark:border-primary-900/50 rounded-t-xl relative z-30"},O5={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between items-start gap-4"},R5={key:0,class:"flex flex-col sm:flex-row items-start sm:items-center gap-2 flex-1 xl:max-w-[15vw] md:max-w-[20vw] max-w-[30vw]"},L5={class:"relative w-full sm:w-64"},I5={key:0,class:"relative"},F5={class:"flex flex-col h-full"},z5={key:0,class:"flex-1 overflow-y-auto py-4"},$5={class:"grid grid-cols-1 gap-4 px-1"},j5={key:0,class:"sticky bottom-0 left-0 right-0 bg-transparent border-t border-neutral-200 dark:border-neutral-700 pt-4 flex gap-2"},U5={class:"flex justify-end gap-2 w-full"},W5={key:0,class:"font-medium text-sm text-neutral-600 dark:text-neutral-400"},H5={class:"overflow-auto custom-scrollbar relative max-h-[calc(100vh-17rem)]"},q5={class:"dcode-table w-full"},G5={class:"bg-primary-700 dark:bg-primary-900 sticky top-0 z-20 shadow-sm"},K5=["onClick"],X5={key:0,class:"flex items-center justify-center w-full"},Y5={key:0,class:"px-3 py-2 text-xs font-medium text-white dark:text-neutral-100 uppercase tracking-wider"},J5={class:"bg-white dark:bg-zinc-900 divide-y divide-neutral-200 dark:divide-neutral-700"},Q5={key:0,class:"px-3 py-0.5"},Z5={key:1},eD=["colspan"],tD={class:"flex flex-col items-center gap-2"},oD={class:"text-base font-medium text-neutral-700 dark:text-neutral-300"},nD={class:"text-sm text-neutral-500 dark:text-neutral-400 mt-1"},rD={class:"hover:bg-zinc-50 dark:hover:bg-zinc-800/50 transition-colors duration-150"},aD={key:0,class:"flex items-center justify-center"},sD=["href","target"],iD={key:0,class:"text-[10px]"},lD={key:0,class:"px-3 py-0.5 !text-center"},cD={key:0,class:"flex items-center justify-center gap-1.5"},dD={key:0,class:"bg-zinc-50/50 dark:bg-zinc-800/30"},fD=["colspan"],uD={key:0,class:"px-4 py-3 bg-zinc-50/50 dark:bg-zinc-800/30 border-t border-neutral-200 dark:border-neutral-700 flex flex-col sm:flex-row items-center justify-between gap-4 w-full"},hD={class:"flex items-center gap-4"},mD={class:"text-xs text-neutral-500 dark:text-neutral-400 font-medium"},pD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},gD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},bD={class:"text-neutral-900 dark:text-neutral-100 font-medium"},yD={class:"flex-shrink-0"},xD={class:"space-y-4"},kD={class:"text-gray-600 dark:text-gray-400"},wD={class:"grid grid-cols-1 gap-4 py-4 px-1 relative"},CD={key:0,class:"absolute inset-0 z-10 bg-white/50 dark:bg-neutral-900/50 flex items-center justify-center backdrop-blur-[1px]"},ED={class:"flex flex-col items-center gap-2"},_D={class:"text-xs font-medium text-neutral-500"},BD={key:1,class:"mb-2 p-3 bg-amber-50 dark:bg-amber-900/20 border border-amber-100 dark:border-amber-900/30 rounded-lg flex items-center gap-3"},SD={class:"p-1.5 bg-amber-100 dark:bg-amber-900/40 rounded-md text-amber-600 dark:text-amber-400"},AD={class:"flex flex-col gap-0.5"},vD={class:"text-[10px] font-bold uppercase tracking-wider text-amber-500/70 dark:text-amber-400/50"},DD={class:"text-xs text-amber-700 dark:text-amber-300 leading-relaxed font-medium transition-all"},ND={class:"flex items-end gap-2"},kn=t.defineComponent({name:"DataTable",__name:"DataTable",props:{columns:{default:()=>[]},data:{default:()=>[]},perPage:{default:10},loading:{type:Boolean,default:!1},hasActions:{type:Boolean,default:!1},nested:{type:Boolean,default:!1},apiModule:{},apiAction:{default:"list"},apiMethod:{},apiUrl:{},permissionBase:{},apiParams:{default:()=>({})},configKey:{},tableConfig:{},dynamicColumns:{type:Boolean,default:!1},searchApiEndpoint:{},enableQuickSearch:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},ignorePermissions:{type:Boolean,default:!1},userPermissions:{default:null},permissionChecker:{type:Function,default:void 0},permissions:{default:void 0},checkPermission:{type:Function,default:void 0},menuPermissions:{default:()=>[]},dummyMode:{type:Boolean,default:!1},baseUrl:{default:void 0}},emits:["update:search","update:sort","update:page","create","export","action","update:selection","navigate"],setup(e,{expose:o,emit:n}){var Su,Au,vu,Du,Nu,Vu;kt.add_operation("length",M=>M==null?0:typeof M=="string"||Array.isArray(M)?M.length:typeof M=="number"?String(M).length:typeof M=="object"?Object.keys(M).length:0),kt.add_operation("==",(M,F)=>M!==null&&typeof M=="object"&&"_isLogicValue"in M?M.id==F||M.code==F:F!==null&&typeof F=="object"&&"_isLogicValue"in F?F.id==M||F.code==M:M==F),kt.add_operation("!=",(M,F)=>M!==null&&typeof M=="object"&&"_isLogicValue"in M?!(M.id==F||M.code==F):F!==null&&typeof F=="object"&&"_isLogicValue"in F?!(F.id==M||F.code==M):M!=F);const r=e,a=n,s=t.getCurrentInstance(),{apiUrl:i}=Je(),{locale:l}=_t.useI18n();let c={query:{},params:{},path:""};try{const M=_o.useRoute();M?c=M:(vu=(Au=(Su=s==null?void 0:s.appContext)==null?void 0:Su.config)==null?void 0:Au.globalProperties)!=null&&vu.$route&&(c=s.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let d={back:()=>console.warn("Router back() not available"),push:M=>{console.warn("Router push() logic called from fallback:",M),typeof M=="string"&&M.startsWith("/")&&(window.location.href=M)}};try{const M=_o.useRouter();M?d=M:(Vu=(Nu=(Du=s==null?void 0:s.appContext)==null?void 0:Du.config)==null?void 0:Nu.globalProperties)!=null&&Vu.$router&&(d=s.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const f=t.ref(""),u=t.ref(1),h=t.ref(r.perPage),m=t.ref({key:"",direction:"asc"}),p=t.ref([]),y=t.ref(!1),b=t.ref(0),g=t.ref({}),E=t.ref([]),_=t.ref(null),B=t.ref(!0),A=t.ref([]),C=t.ref([]),x=t.ref([]),k=t.ref(!1),N=t.ref(!1),w=t.reactive({}),v=t.reactive({}),S=t.reactive({}),D=t.ref(null),V=t.ref(null),R=t.ref(null),O=t.computed(()=>V.value?V.value.fieldActionCustom||V.value.fieldActionGlobal||V.value.field||[]:[]),P=t.computed(()=>{const M=new Map;return O.value.forEach(F=>{F.model&&M.set(F.model,{field:F,path:F.model})}),M}),L=t.computed(()=>({sections:[{fields:O.value}]})),$=t.computed(()=>l.value),{isFieldVisible:T,isFieldRequired:I,isFieldDisabled:H,isFieldReadonly:q,resolveFieldLabels:W,resolveFieldLength:Z,getFilteredItems:te,applyCalculations:xe,getNormalizedData:Se}=Si({formData:w,errors:v,fieldMap:P,rawItemsCache:S,activeSchema:L,locale:$}),ye=async(M,F=!1)=>{const X=M.props||{},z=X.endpointReference||X.endpoint;if(z!=null&&z.apiUrl&&!(!F&&S[M.key]))try{const{apiUrl:U}=Je();let J=z.apiUrl;if(r.baseUrl&&typeof J=="string"&&!J.startsWith("http")){const Ve=r.baseUrl.replace(/\/$/,""),Be=J.startsWith("/")?J:`/${J}`;J=`${Ve}${Be}`}const ce={page:1,perPage:100};if(Array.isArray(z.keyParam)){let Ve=!1;if(z.keyParam.forEach(Be=>{const Ae=Se(w)[Be];Ae==null||Ae===""?Ve=!0:ce[Be]=Ae&&typeof Ae=="object"&&Ae._isLogicValue?Ae.id:Ae}),Ve){S[M.key]=[];return}}const me=await U(J,z.apiMethod||"GET",ce),ge=(me==null?void 0:me.data)||me;let we=[];Array.isArray(ge)?we=ge:ge&&(we=[ge]),S[M.key]=we}catch(U){console.error(`[prefetchDialogFieldItems] Error fetching items for ${M.key}:`,U),S[M.key]=[]}};t.watch(w,M=>{N.value&&(xe(),O.value.forEach(F=>{const X=F.props||{},z=X.endpoint||X.endpointReference;Array.isArray(z==null?void 0:z.keyParam)&&ye(F,!0)}))},{deep:!0});const Q=t.computed(()=>{const M=new Map;return Ce.value.forEach(F=>{F.model&&M.set(F.model,{field:F,path:F.model})}),M}),j=t.computed(()=>({sections:[{fields:Ce.value}]})),{isFieldVisible:Y,isFieldRequired:ae,isFieldDisabled:ke,isFieldReadonly:Oe,resolveFieldLabels:_e,resolveFieldLength:We,getFilteredItems:Fe}=Si({formData:g,errors:{},fieldMap:Q,rawItemsCache:{},activeSchema:j,locale:$}),se=t.ref([]),Re=t.computed(()=>{if(co.value.length===0)return!1;const M=co.value.map(F=>{const X=rt.value.find(U=>U.type==="CHECKBOX"),z=(X==null?void 0:X.keyCheckbox)||"id";return F[z]}).filter(F=>F!=null);return M.length===0?!1:M.every(F=>se.value.includes(F))}),Le=t.computed(()=>{if(co.value.length===0)return!1;const M=rt.value.find(U=>U.type==="CHECKBOX"),F=(M==null?void 0:M.keyCheckbox)||"id",X=co.value.map(U=>U[F]).filter(U=>U!=null),z=X.filter(U=>se.value.includes(U)).length;return z>0&&z<X.length}),De=M=>{const F=rt.value.find(U=>U.type==="CHECKBOX"),X=(F==null?void 0:F.keyCheckbox)||"id",z=M[X];return z!==void 0&&se.value.includes(z)},ct=M=>{const F=rt.value.find(U=>U.type==="CHECKBOX"),X=(F==null?void 0:F.keyCheckbox)||"id",z=co.value.map(U=>U[X]).filter(U=>U!=null);if(M){const U=new Set([...se.value,...z]);se.value=Array.from(U)}else se.value=se.value.filter(U=>!z.includes(U))},G=(M,F)=>{const X=rt.value.find(J=>J.type==="CHECKBOX"),z=(X==null?void 0:X.keyCheckbox)||"id",U=M[z];U!=null&&(F?se.value.includes(U)||se.value.push(U):se.value=se.value.filter(J=>J!==U))};t.watch(se,M=>{var X;a("update:selection",M);const F=Re.value||M.length>1;(X=C.value)!=null&&X.length&&C.value.forEach(z=>{var U;(U=z.fieldActionGlobal)!=null&&U.length&&z.fieldActionGlobal.forEach(J=>{var we,Ve;const ce=z.endpoint||((we=z.propsActionGlobal)==null?void 0:we.endpointPropAction)||z.propsActionGlobal,me=(Ve=ce==null?void 0:ce.keyParam)==null?void 0:Ve[0];(me&&J.model===me||!me&&/^(id|ids|idAuditTrail)/i.test(J.model))&&F&&J.model&&(w[J.model]=M)})})},{deep:!0});const ie=M=>Array.from({length:M}).map((F,X)=>{const z={id:X+1,no:X+1};return rt.value.forEach(U=>{U.key!=="no"&&U.key!=="action"&&U.type!=="ACTION"&&U.type!=="action"&&(U.type==="CHECKBOX"?z[U.keyCheckbox||"id"]=X+1:U.type==="BADGE"||U.type==="badge"||U.condition?z[U.key]=U.condition&&U.condition.length>0?U.condition[0].value:"Active":z[U.key]=`Data ${U.label} ${X+1}`)}),z}),he=M=>M&&typeof M=="string"&&M.trim()?M:void 0,oe=t.computed(()=>{var M,F,X,z;return he((F=(M=_.value)==null?void 0:M.endpoint)==null?void 0:F.apiModule)||he((z=(X=_.value)==null?void 0:X.endpointGlobal)==null?void 0:z.apiModule)||r.apiModule}),le=t.computed(()=>{var M,F,X,z;return he((F=(M=_.value)==null?void 0:M.endpoint)==null?void 0:F.apiAction)||he((z=(X=_.value)==null?void 0:X.endpointGlobal)==null?void 0:z.apiAction)||r.apiAction}),K=t.computed(()=>{var M,F,X,z;return he((F=(M=_.value)==null?void 0:M.endpoint)==null?void 0:F.apiMethod)||he((z=(X=_.value)==null?void 0:X.endpointGlobal)==null?void 0:z.apiMethod)||r.apiMethod||"POST"}),ee=t.computed(()=>{var M,F,X,z;return he((F=(M=_.value)==null?void 0:M.endpoint)==null?void 0:F.apiUrl)||he((z=(X=_.value)==null?void 0:X.endpointGlobal)==null?void 0:z.apiUrl)||r.apiUrl}),re=t.computed(()=>r.permissionBase||""),Ce=t.computed(()=>!x.value||x.value.length===0?[]:[...x.value].sort((M,F)=>(M.seq||0)-(F.seq||0))),Ge=M=>{var J,ce,me;const F=(M==null?void 0:M.column)||((J=M==null?void 0:M.props)==null?void 0:J.column)||((ce=M==null?void 0:M.propsFieldGlobal)==null?void 0:ce.column)||((me=M==null?void 0:M.propsFieldCustom)==null?void 0:me.column);if(!F)return"col-span-1";const X=F.toLowerCase(),U={full:"col-span-1 md:col-span-2",half:"col-span-1",third:"col-span-1","two-thirds":"col-span-1 md:col-span-2",two_thirds:"col-span-1 md:col-span-2"}[X]||"col-span-1";return console.log(`[DEBUG] getColumnClass for ${M==null?void 0:M.model}: type=${F}, returned=${U}`),U},wt=()=>{let M=null;if(r.tableConfig&&(M=r.tableConfig),M){_.value=M,A.value=[],C.value=[],M.headers&&(E.value=M.headers.map(z=>{var ce,me,ge,we,Ve,Be,Ae,Ct,qt,Da,Mu;if(z.key==="action"||((ce=z.custom)==null?void 0:ce.type)==="ACTION"||((me=z.custom)==null?void 0:me.type)==="action"){const Et=((ge=z.custom)==null?void 0:ge.actionCustom)||((we=z.custom)==null?void 0:we.action);if(Et){const TN=Et.map(Nt=>{const Ye=Nt.propsActionCustom||Nt.props||{},Na=Nt.propCustomMessage||{};return{permission:Nt.permission,label:l.value==="id"?Ye.labelID:Ye.labelEN,tooltip:l.value==="id"?Ye.tooltipID||Ye.labelID:Ye.tooltipEN||Ye.labelEN,icon:Ye.icon,variant:Ye.variant||"ghost",bgColor:Ye.bgColor,action:Ye.actionType||Ye.key,route:Ye.route,path:Ye.path,endpoint:Ye.endpointPropAction,requiredCondition:Nt.requiredCondition||!1,propCustomCondition:Nt.propCustomCondition||[],fieldMapping:Nt.fieldMapping||Ye.fieldMapping||null,openDialog:Nt.openDialog||!1,fieldActionCustom:(Nt.fieldActionCustom||[]).map(Va=>{const Fi=Va.propsFieldCustom||Va.propsFieldGlobal||Va.props||{};return{...Va,props:{...Fi,endpoint:Fi.endpointComponent||Fi.endpoint}}}),condition:Nt.visibleRule||Nt.propCustomCondition||Ye.visibleRule||Ye.propCustomCondition||null,requireConfirm:Nt.requireConfirm||Ye.requireConfirm||!1,confirmTitle:l.value==="id"?Na.titleID||Ye.confirmTitleID||"Konfirmasi":Na.titleEN||Ye.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?Na.messageID||Ye.confirmMessageID||"Apakah Anda yakin?":Na.messageEN||Ye.confirmMessageEN||"Are you sure?"}});A.value.push(...TN)}return null}let U;const J=((Ve=z.custom)==null?void 0:Ve.conditionBadge)||((Be=z.custom)==null?void 0:Be.condition);return(((Ae=z.custom)==null?void 0:Ae.type)==="BADGE"||((Ct=z.custom)==null?void 0:Ct.type)==="badge")&&J&&(U=J.map(Et=>({value:Et.value,label:l.value==="id"?Et.labelID:Et.labelEN,labelID:Et.labelID,labelEN:Et.labelEN,color:Et.color||Et.bgColor,variant:Et.variant,logic:Et.logic||Et.conditionRule||null}))),{key:z.key,label:l.value==="id"?z.labelID:z.labelEN,width:z.width,align:z.align,sortable:!0,type:(qt=z.custom)==null?void 0:qt.type,condition:U,keyCheckbox:(Da=z.custom)==null?void 0:Da.keyCheckbox,propsCustom:(Mu=z.custom)==null?void 0:Mu.propsCustom}}).filter(z=>z!==null));const F=M.filters||M.filter;F&&Array.isArray(F)&&(x.value=F.map(z=>({...z,props:z.propsFilters||z.props||{}})),x.value.forEach(z=>{g.value[z.model]=""}));const X=M.actionTableGlobal||M.actionGlobal||M.action;console.log("[DEBUG] loadConfig rawActions:",X),X&&Array.isArray(X)?(C.value=X.map(z=>{const U=z.propsActionGlobal||z.props||{},J=z.propCustomMessage||{};return{key:U.key,permission:z.permission,label:l.value==="id"?U.labelID||"Action":U.labelEN||"Action",tooltip:l.value==="id"?U.tooltipID||U.labelID:U.tooltipEN||U.labelEN,icon:U.icon,variant:U.variant||"default",bgColor:U.bgColor,textColor:U.textColor,route:U.route,path:U.path,endpoint:U.endpointPropAction||z.endpoint,fieldMapping:z.fieldMapping||U.fieldMapping||null,visibleRule:z.visibleRule||U.visibleRule||z.propCustomCondition||U.propCustomCondition||null,openDialog:z.openDialog||!1,requireConfirm:z.requireConfirm||U.requireConfirm||!1,confirmTitle:l.value==="id"?J.titleID||U.confirmTitleID||"Konfirmasi":J.titleEN||U.confirmTitleEN||"Confirm",confirmMessage:l.value==="id"?J.messageID||U.confirmMessageID||"Apakah Anda yakin?":J.messageEN||U.confirmMessageEN||"Are you sure?",fieldActionGlobal:(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).map(ce=>{const me=ce.propsFieldGlobal||ce.props||{};return{...ce,props:{...me,endpoint:me.endpointComponent||me.endpoint}}})}}),console.log("[DEBUG] loadConfig headerActions set:",C.value)):console.log("[DEBUG] loadConfig no rawActions found"),M.pagination!==void 0&&(B.value=M.pagination)}};t.watch(()=>r.tableConfig,()=>{wt()},{deep:!0,immediate:!0});const rt=t.computed(()=>r.dynamicColumns||r.configKey||r.tableConfig?E.value:r.columns||[]),or=t.computed(()=>r.hasActions||A.value.length>0),qo=t.computed(()=>r.dummyMode?!1:oe.value||ee.value?y.value:r.loading),nt=t.computed(()=>!!oe.value||!!ee.value),mu=t.computed(()=>[]),Ni=M=>{if(console.log("[DEBUG] hasAction called:",{actionCode:M,permissionChecker:!!r.permissionChecker,effectivePath:re.value}),r.menuPermissions&&r.menuPermissions.length>0){const F=c.path,X=r.menuPermissions.find(z=>F.startsWith(z.path));if(X&&X.actions){const z=X.actions.find(U=>U.code===M.toUpperCase());return z?z.checked:!1}return!1}if(r.permissionChecker){const F=r.permissionChecker(re.value,M);return console.log("[DEBUG] permissionChecker result:",F),F}return mu.value.some(F=>F.code===M)},pu=(M,F)=>{if(M.condition)try{return kt.apply(M.condition,F)}catch(ce){return console.warn("Row action jsonLogic error:",ce),!1}if(!M.visibilityCondition)return!0;const{field:X,operator:z,value:U}=M.visibilityCondition,J=dt(F,X);switch(z){case"equals":return J===U;case"notEquals":return J!==U;case"in":return Array.isArray(U)&&U.includes(J);case"notIn":return Array.isArray(U)&&!U.includes(J);case"greaterThan":return J>U;case"lessThan":return J<U;case"contains":return String(J).includes(String(U));default:return!0}},Vi=t.computed(()=>{if(console.log("[DEBUG] visibleHeaderActions:",{headerActions:C.value,ignorePermissions:r.ignorePermissions}),C.value.length===0)return C.value;const M=C.value.filter(F=>{if(F.visibleRule)try{const z=co.value[0]||{};if(!kt.apply(F.visibleRule,z))return!1}catch(z){console.warn("Header action visibility logic error:",z)}if(r.ignorePermissions||r.dummyMode)return!0;if(!F.permission)return console.log("[DEBUG] Action no permission, showing:",F.label),!0;if(r.checkPermission){const z=r.checkPermission(F.permission);return console.log("[DEBUG] Parent checkPermission result:",z),z}if(r.permissions){const z=r.permissions.includes(F.permission);return console.log("[DEBUG] Parent permissions check result:",z),z}const X=Ni(F.permission);return console.log("[DEBUG] Internal permission check:",{label:F.label,permission:F.permission,hasPerm:X}),X});return console.log("[DEBUG] Filtered header actions:",M.length),M}),gu=t.computed(()=>A.value.length===0?A.value:A.value.filter(M=>r.ignorePermissions||r.dummyMode||!M.permission?!0:r.checkPermission?r.checkPermission(M.permission):r.permissions?r.permissions.includes(M.permission):Ni(M.permission))),Aa=M=>gu.value.filter(F=>pu(F,M)),Mi=(M,F)=>{var U,J;if(M.requiredCondition&&((U=M.propCustomCondition)==null?void 0:U.length)>0){const ce=dt(F,"status"),me=M.propCustomCondition.find(ge=>ge.value===ce);if(me)return me.bgColor||M.bgColor||"primary"}if(!M.dynamicColor||!M.colorCondition)return M.bgColor||"primary";const X=dt(F,M.colorCondition.field),z=(J=M.colorCondition.conditions)==null?void 0:J.find(ce=>ce.value===X);return(z==null?void 0:z.bgColor)||M.bgColor||"primary"},bu=M=>{const F=(M||"left").toLowerCase();return F==="center"?"justify-center":F==="right"?"justify-end":"justify-start"},yu={ToggleLeft:ne.ToggleLeft,SquarePen:ne.SquarePen,Trash2:ne.Trash2,Eye:ne.Eye,CheckCircle:ne.CheckCircle,Plus:ne.Plus,Download:ne.Download,RefreshCw:ne.RefreshCw,Search:ne.Search,SlidersHorizontal:ne.SlidersHorizontal},Ti=M=>M&&(No(M,Lt)||yu[M])||null,co=t.computed(()=>r.dummyMode?rt.value.length>0?ie(5):[]:nt.value?p.value.map((M,F)=>({...M,no:(u.value-1)*h.value+F+1})):gN.value),nr=t.computed(()=>r.dummyMode?5:nt.value?b.value:Pi.value.length),hN=t.computed(()=>nr.value===0?0:(u.value-1)*h.value+1),mN=t.computed(()=>{const M=u.value*h.value;return M>nr.value?nr.value:M}),dt=(M,F)=>{if(!(!M||!F))return F in M?M[F]:F.split(".").reduce((X,z)=>X&&X[z],M)},Pi=t.computed(()=>{if(nt.value)return[];if(!f.value)return r.data;const M=f.value.toLowerCase();return r.data.filter(F=>rt.value.some(X=>{const z=dt(F,X.key);return z==null?!1:String(z).toLowerCase().includes(M)}))}),pN=t.computed(()=>nt.value?[]:m.value.key?[...Pi.value].sort((F,X)=>{const z=dt(F,m.value.key),U=dt(X,m.value.key);if(z===U)return 0;let J=0;return typeof z=="number"&&typeof U=="number"?J=z-U:J=String(z).localeCompare(String(U)),m.value.direction==="asc"?J:-J}):Pi.value),gN=t.computed(()=>{if(nt.value)return[];const M=(u.value-1)*h.value,F=M+h.value;return pN.value.slice(M,F).map((X,z)=>({...X,no:M+z+1}))}),bN=(M,F)=>{var U,J,ce,me;const X=dt(M,F.key);if(X==null||X==="")return"-";if((F.type==="TEXT"||F.type==="text")&&((J=(U=F.propsCustom)==null?void 0:U[0])!=null&&J.value)){const ge=F.propsCustom[0].value;if(X&&typeof X=="object")return dt(X,ge)||"-"}if(["DATE","date","DATETIME","datetime"].includes(F.type||"")){const ge=(F.type||"").toUpperCase()==="DATETIME";return gp(X,ge?"datetime":"long")}if(F.type==="CURRENCY"||F.type==="currency"){const ge=((me=(ce=F.propsCustom)==null?void 0:ce[0])==null?void 0:me.value)||"IDR";return pp(X,ge)}return F.format?F.format(X):X},xu=t.computed(()=>nt.value?Object.values(g.value).some(M=>!!M):!!f.value),yN=[10,25,50,100],ku=()=>{nt.value&&(g.value={...g.value,keyword:f.value},u.value=1,ht())};let Oi;const xN=()=>{r.enableQuickSearch&&(clearTimeout(Oi),Oi=setTimeout(()=>{ku()},500))};let Ri;const kN=()=>{clearTimeout(Ri),Ri=setTimeout(()=>{nt.value&&ht()},1e3)};t.watch(f,()=>{r.enableQuickSearch&&nt.value&&xN()});const ht=async()=>{if(!r.dummyMode&&nt.value&&!(!oe.value&&!ee.value))try{y.value=!0;const M={page:u.value,perPage:h.value,...g.value,...r.apiParams};f.value&&(M.keyword=f.value),Object.keys(M).forEach(X=>{(M[X]===""||M[X]===null||M[X]===void 0)&&delete M[X]});let F;if(oe.value)F=await i(oe.value,le.value,M);else if(ee.value){let X=ee.value;if(r.baseUrl&&typeof X=="string"&&!X.startsWith("http")){const z=r.baseUrl.replace(/\/$/,""),U=X.startsWith("/")?X:`/${X}`;X=`${z}${U}`}F=await i(X,K.value,M)}wN(F)}catch(M){console.error("DataTable fetch error",M),y.value=!1}},wN=M=>{console.log("DataTable handleResponseData:",M),M&&(r.dynamicColumns&&M.columns&&Array.isArray(M.columns)&&(E.value=M.columns.map(F=>({key:F.key||F.field||F.name,label:F.label||F.header||F.name,width:F.width,align:F.align||"LEFT",sortable:F.sortable!==!1,type:F.type,condition:F.condition,format:F.format}))),M.data&&Array.isArray(M.data)?(p.value=M.data,M.totalData?b.value=M.totalData:M.maxPage?b.value=M.maxPage*h.value:b.value=M.data.length*(M.maxPage||1)):Array.isArray(M)?(p.value=M,b.value=M.length):M.users?(p.value=M.users,b.value=M.users.length):M.items&&Array.isArray(M.items)?(p.value=M.items,b.value=M.total||M.totalItems||M.items.length):M.list&&Array.isArray(M.list)?(p.value=M.list,b.value=M.total||M.list.length):M.rows&&Array.isArray(M.rows)?(p.value=M.rows,b.value=M.count||M.total||M.rows.length):M.result&&Array.isArray(M.result)?(p.value=M.result,b.value=M.total||M.count||M.result.length):(console.warn("DataTable: Unknown response format",M),p.value=[],b.value=0)),y.value=!1};t.onUnmounted(()=>{clearTimeout(Oi),clearTimeout(Ri)});const Li=()=>{Object.keys(g.value).forEach(M=>{g.value[M]=""}),f.value="",u.value=1,ht()},CN=()=>{u.value=1,ht()},Ii=(M,F)=>{const X=dt(M,F.key);let z={variant:"secondary",class:"",label:X};if(F.condition){const U=F.condition.find(J=>{if(J.logic||typeof J.value=="object"&&J.value!==null)try{const me=J.logic||J.value;return kt.apply(me,M)}catch(me){return console.warn("Badge logic error:",me),!1}const ce=(me,ge)=>me==null||ge===void 0||ge===null?!1:typeof me=="string"&&typeof ge=="string"?me.toLowerCase().trim()===ge.toLowerCase().trim():me==ge;if(ce(J.value,X)||typeof X=="object"&&X!==null&&(ce(J.value,X.code)||ce(J.value,X.id)))return!0;if(F.key.includes(".")){const ge=F.key.split(".").slice(0,-1).join("."),we=dt(M,ge);if(we&&typeof we=="object"&&(ce(J.value,we.code)||ce(J.value,we.id)))return!0}return!1});if(U){U.variant&&(z.variant=U.variant);const ce=(l.value||"en")==="id"?U.labelID:U.labelEN;if(z.label=ce||U.label||(typeof X=="object"?X.name||X.code:X),U.color||U.bgColor){const me=(U.color||U.bgColor||"").toLowerCase(),ge=z.variant==="outline",we={success:"bg-green-500 hover:bg-green-600 border-transparent text-white shadow",warning:"bg-yellow-500 hover:bg-yellow-600 border-transparent text-white shadow",info:"bg-blue-500 hover:bg-blue-600 border-transparent text-white shadow",primary:"bg-primary-600 hover:bg-primary-700 border-transparent text-white shadow",secondary:"bg-neutral-500 hover:bg-neutral-600 border-transparent text-white shadow",danger:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow",destructive:"bg-red-500 hover:bg-red-600 border-transparent text-white shadow"},Ve={success:"text-green-600 border-green-600 hover:bg-green-50",warning:"text-yellow-600 border-yellow-600 hover:bg-yellow-50",info:"text-blue-600 border-blue-600 hover:bg-blue-50",danger:"text-red-600 border-red-600 hover:bg-red-50",destructive:"text-red-600 border-red-600 hover:bg-red-50",primary:"text-primary-600 border-primary-600 hover:bg-primary-50",secondary:"text-neutral-600 border-neutral-600 hover:bg-zinc-50"},Be={danger:"destructive",destructive:"destructive",secondary:"secondary",primary:"default",success:"success",warning:"warning",info:"info"};ge?Ve[me]&&(z.class=Ve[me]):Be[me]?z.variant=Be[me]:we[me]&&(z.class=we[me])}}else z.label=typeof X=="object"?(X==null?void 0:X.name)||(X==null?void 0:X.code)||"-":X}else z.label=typeof X=="object"?(X==null?void 0:X.name)||(X==null?void 0:X.code)||"-":X;return z},EN=M=>{m.value.key===M?m.value.direction=m.value.direction==="asc"?"desc":"asc":(m.value.key=M,m.value.direction="asc"),a("update:sort",m.value)},wu=M=>{M!==u.value&&(u.value=M,nt.value&&ht(),a("update:page",M))},_N=M=>{h.value=M,u.value=1,nt.value&&ht()},BN=M=>{const F=Math.random()*15+75;if(M.width){const X=parseInt(String(M.width));return X<100?`${Math.floor(X*(Math.random()*.2+.7))}px`:`${F}%`}return`${F}%`},Cu=()=>{f.value="",g.value={},u.value=1,ht()},Eu=M=>{var F;if(console.log("[DEBUG] handleHeaderAction called:",M),M.requireConfirm){D.value={button:M,row:null},k.value=!0;return}if(M.route&&!r.dummyMode){if(M.path){const X=M.route.startsWith("/")?M.route:"/"+M.route;sessionStorage.setItem(`layout_${X}`,M.path)}d==null||d.push(M.route)}else if(M.openDialog||r.dummyMode&&M.route){V.value=M,R.value=null,Object.keys(w).forEach(z=>delete w[z]);const X=M.fieldActionGlobal||M.fieldActionCustom||M.field||[];X.length&&X.forEach(z=>{var ce;ye(z);const U=M.endpoint||((ce=M.propsActionGlobal)==null?void 0:ce.endpointPropAction)||M.propsActionGlobal,J=U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null;J&&z.model===J||!J&&/^(id|ids|idAuditTrail)/i.test(z.model)?w[z.model]=se.value:w[z.model]||(w[z.model]="")}),N.value=!0}else a("action",{action:((F=M.propsActionCustom)==null?void 0:F.key)||M.key||"create",row:null,selection:se.value})},_u=async(M,F)=>{var X,z,U,J;if(M.requireConfirm){D.value={button:M,row:F},k.value=!0;return}if(M.openDialog){V.value=M,R.value=F,Object.keys(w).forEach(we=>delete w[we]),N.value=!0;const ce=rt.value.find(we=>we.type==="CHECKBOX"),me=(ce==null?void 0:ce.keyCheckbox)||"id";M.fieldActionCustom&&M.fieldActionCustom.forEach(we=>{ye(we),/^(id|ids|idAuditTrail)/i.test(we.model)?w[we.model]=[F[me]]:M.action==="showToken"&&we.model==="token"?w[we.model]=F.token!==void 0?F.token:"":F[we.model]!==void 0?w[we.model]=F[we.model]:w[we.model]=""});const ge=M.endpoint||((X=M.propsActionGlobal)==null?void 0:X.endpointPropAction)||((z=M.propsActionCustom)==null?void 0:z.endpointPropAction)||((U=M.props)==null?void 0:U.endpointPropAction);if(((J=ge==null?void 0:ge.apiMethod)==null?void 0:J.toUpperCase())==="GET"&&ge.apiUrl){y.value=!0;const{apiUrl:we}=Je(),Ve={};ge.keyParam&&Array.isArray(ge.keyParam)&&ge.keyParam.forEach((Be,Ae)=>{const Ct=ge.model&&Ae===0?ge.model:Be;F[Be]!==void 0&&(Ve[Ct]=F[Be])}),Object.keys(Ve).length===0&&F.id&&(Ve.id=F.id),we(ge.apiUrl,"GET",Ve).then(Be=>{let Ae=Be;if(Be&&Be.data!==void 0?Ae=Be.data:Be&&Be.result!==void 0&&(Ae=Be.result),Ae!=null){if(typeof Ae=="string")Object.prototype.hasOwnProperty.call(w,"token")&&(w.token=Ae);else if(typeof Ae=="object"&&(Ae.item&&(Ae=Ae.item),Array.isArray(Ae)&&(Ae=Ae[0]||{}),Object.keys(Ae).forEach(Ct=>{w[Ct]=Ae[Ct]}),!w.token)){const Ct=Object.keys(Ae).find(qt=>qt.toLowerCase().includes("token"));if(Ct)w.token=Ae[Ct];else{const qt=Object.values(Ae).filter(Da=>typeof Da=="string");qt.length===1&&(w.token=qt[0])}}}}).catch(Be=>{console.error("Fetch Data Failed",Be)}).finally(()=>{y.value=!1});return}return}SN(M,F)},SN=(M,F)=>{if(M.route){if(M.path){const U=M.route.startsWith("/")?M.route:"/"+M.route;sessionStorage.setItem(`layout_${U}`,M.path)}let X=M.route;X.includes(":")?X=X.replaceAll(/:([a-zA-Z0-9_]+)/g,(U,J)=>(F?F[J]||F.id:null)||J):F&&F.id&&(X=`${X.replace(/\/$/,"")}/${F.id}`);const z={};M.path&&(z.code=M.path),d==null||d.push({path:X,query:z})}else if(M.endpoint&&M.endpoint.apiUrl){y.value=!0;const{apiUrl:X}=Je(),z=M.endpoint.apiUrl,U=M.endpoint.apiMethod||"POST",J={},ce=M.fieldMapping;if(ce&&typeof ce=="object"){const{locale:me}=_t.useI18n(),ge=me.value||"en",we=[];if(Object.entries(ce).forEach(([Ve,Be])=>{if(typeof Be=="string"){const Ae=dt(F,Ve);Ae!==void 0?J[Be]=Ae:(console.warn(`[MAPPING-DEBUG] No matching source found for '${Ve}'`),we.push(Ve))}}),we.length>0){const Ve=ge==="id"?"Masalah Sinkronisasi Data":"Data Synchronization Issue",Be=ge==="id"?`Terdapat ketidaksesuaian skema pada field: ${we.join(", ")}. Harap hubungi tim pengembang.`:`Schema mismatch detected in fields: ${we.join(", ")}. Please contact the development team.`;ze.warning(`${Ve}: ${Be}`,{autoClose:5e3,position:"top-right"})}}if(Object.keys(J).length===0){const me=M.endpoint;F&&me.model&&me.keyParam&&Array.isArray(me.keyParam)?me.keyParam.forEach(ge=>{const we=dt(F,ge);we!==void 0&&(J[me.model]=we)}):F&&F.id&&(J.id=F.id)}X(z,U,J).then(()=>{ht(),a("action",{action:M.action||"success",row:F})}).catch(me=>{console.error("Action Failed",me)}).finally(()=>{y.value=!1})}else a("action",{action:M.action,row:F})},AN=()=>{if(D.value){const{button:M,row:F}=D.value;Bu(),F===null?Eu({...M,requireConfirm:!1}):_u({...M,requireConfirm:!1},F)}},vN=()=>{var M,F,X;if(V.value){const z=V.value,U=z.endpoint||((M=z.propsActionGlobal)==null?void 0:M.endpointPropAction)||z.propsActionGlobal;let J=(U==null?void 0:U.model)||(U!=null&&U.keyParam&&U.keyParam.length>0?U.keyParam[0]:null);if(!J){const we=(z.fieldActionGlobal||z.fieldActionCustom||z.field||[]).find(Ve=>/^(id|ids|idAuditTrail)/i.test(Ve.model));J=we?we.model:"ids"}let ce=null,me=!1;if(R.value){const ge=rt.value.find(Be=>Be.type==="CHECKBOX"),we=(ge==null?void 0:ge.keyCheckbox)||"id",Ve=R.value[we];if(U!=null&&U.apiUrl){ce={...w};const Be=z.fieldMapping;Be&&typeof Be=="object"&&Object.entries(Be).forEach(([Ae,Ct])=>{if(typeof Ct=="string"){const qt=dt(R.value,Ae);qt!==void 0&&(ce[Ct]=qt)}}),ce[J]||(ce[J]=U!=null&&U.model?Ve:[Ve]),me=!0}}else U!=null&&U.apiUrl&&(ce={...w},ce[J]||(ce[J]=se.value||[]),me=!0);if(me&&ce&&(U!=null&&U.apiUrl)){if(((F=U==null?void 0:U.apiMethod)==null?void 0:F.toUpperCase())==="GET"){N.value=!1,R.value||(se.value=[]);return}const{apiUrl:ge}=Je(),we=U.apiUrl,Ve=U.apiMethod||"POST";ge(we,Ve,ce).then(()=>{N.value=!1,R.value||(se.value=[]),ht(),a("action",{action:"success",row:null})}).catch(Be=>{console.error("Action Failed",Be)})}else if(R.value){const ge=rt.value.find(Ae=>Ae.type==="CHECKBOX"),we=(ge==null?void 0:ge.keyCheckbox)||"id",Ve=R.value[we],Be={...w};Be[J]||(Be[J]=[Ve]),a("action",{action:V.value.action,row:Be}),N.value=!1}else{const ge={...w};ge[J]||(ge[J]=se.value);const we={action:((X=V.value.propsActionGlobal)==null?void 0:X.key)||V.value.key,row:ge,selection:se.value};a("action",we),N.value=!1}}},DN=M=>{const F=w[M];F&&yp(String(F)).then(()=>{ze.success("Berhasil disalin!",{autoClose:2e3,theme:"dark",pauseOnHover:!1})}).catch(X=>{console.error("Failed to copy",X)})},Bu=()=>{k.value=!1,D.value=null},NN=t.computed(()=>D.value?D.value.button.confirmTitle||"Confirm":""),VN=t.computed(()=>D.value?D.value.button.confirmMessage||"Confirm":"");o({fetchData:ht,filters:g,resetFilters:Li,handleRefresh:Cu});const va=t.ref(""),MN=M=>{if(!M)return"";const F=M.endpoint||M.endpointGlobal||{};return JSON.stringify({url:F.apiUrl||M.apiUrl,module:F.apiModule||M.apiModule,action:F.apiAction||M.apiAction,method:F.apiMethod||M.apiMethod,params:M.apiParams,socket:F.socket||M.socketEndpoint,socketParams:M.socketParams})};return t.watch(()=>r.tableConfig,()=>{if(r.tableConfig){wt();const M=MN(r.tableConfig);M!==va.value&&(!va.value&&nt.value?(va.value=M,ht()):(va.value=M,nt.value&&kN()))}},{deep:!0,immediate:!0}),t.watch(()=>r.apiModule,()=>{nt.value&&ht()}),t.watch(()=>r.apiParams,()=>{nt.value&&ht()},{deep:!0}),t.watch(()=>C.value,M=>{console.log("[DEBUG] headerActions changed:",M.length,"items");const F=Vi.value;console.log("[DEBUG] visibleHeaderActions evaluated:",F.length,"items")},{deep:!0}),t.onMounted(()=>{wt(),nt.value&&(r.tableConfig||(y.value=!0,ht()))}),(M,F)=>{var X;return t.openBlock(),t.createElementBlock("div",T5,[t.createElementVNode("div",P5,[t.createElementVNode("div",O5,[e.nested?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",R5,[t.createElementVNode("div",L5,[t.createVNode(t.unref(ne.Search),{class:"absolute left-2.5 top-2.5 h-4 w-4 text-neutral-500 dark:text-neutral-400"}),t.createVNode(t.unref(pv),{modelValue:f.value,"onUpdate:modelValue":F[0]||(F[0]=z=>f.value=z),placeholder:"Search...",style:{"padding-left":"2.25rem !important"},class:"h-9 bg-white/95 dark:bg-zinc-800/95 border-white/30 dark:border-neutral-700/50 text-neutral-900 dark:text-neutral-100 placeholder:text-neutral-500 dark:placeholder:text-neutral-400",onKeyup:t.withKeys(ku,["enter"])},null,8,["modelValue"])]),x.value.length>0?(t.openBlock(),t.createElementBlock("div",I5,[t.createVNode(WA,null,{trigger:t.withCtx(()=>[t.createVNode(He,{variant:"secondary",icon:"SlidersHorizontal",tooltip:"Advance Search",class:"gap-2 h-9 w-full sm:w-auto justify-center bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-zinc-50 dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium"})]),footer:t.withCtx(()=>[t.createElementVNode("div",U5,[t.renderSlot(M.$slots,"filter-footer",{fetch:ht,reset:Li})])]),default:t.withCtx(()=>[F[9]||(F[9]=t.createElementVNode("hr",{class:"border-neutral-200 dark:border-neutral-700"},null,-1)),t.createElementVNode("div",F5,[t.renderSlot(M.$slots,"filter-form",{filters:g.value},()=>[x.value.length>0?(t.openBlock(),t.createElementBlock("div",z5,[t.createElementVNode("div",$5,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ce.value,(z,U)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:U},[t.unref(Y)(z)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(Ge(z))},[t.createVNode(GA,{field:z,modelValue:g.value[z.model],"onUpdate:modelValue":J=>g.value[z.model]=J,disabled:t.unref(ke)(z),required:t.unref(ae)(z),readonly:t.unref(Oe)(z),options:t.unref(Fe)(z),"dynamic-labels":t.unref(_e)(z),"dynamic-length":t.unref(We)(z)},null,8,["field","modelValue","onUpdate:modelValue","disabled","required","readonly","options","dynamic-labels","dynamic-length"])],2)):t.createCommentVNode("",!0)],64))),128))])])):t.createCommentVNode("",!0)]),x.value.length>0?(t.openBlock(),t.createElementBlock("div",j5,[t.createVNode(He,{variant:"outline",text:"Reset",tooltip:"Reset",rounded:"md",icon:"RefreshCw",onClick:Li,disabled:qo.value},null,8,["disabled"]),t.createVNode(He,{onClick:CN,disabled:qo.value,rounded:"md",text:"Search",tooltip:"Search",icon:"Search"},null,8,["disabled"])])):t.createCommentVNode("",!0)])]),_:3})])):t.createCommentVNode("",!0)])),t.createElementVNode("div",{class:t.normalizeClass(["flex items-center gap-2 flex-wrap",{"w-full justify-between":e.nested}])},[e.nested?(t.openBlock(),t.createElementBlock("span",W5)):t.createCommentVNode("",!0),e.nested?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(He,{key:1,variant:"secondary",icon:"RefreshCw",text:"Refresh",tooltip:"Refresh",class:"gap-2 h-9 bg-white/95 dark:bg-zinc-800/95 text-neutral-700 dark:text-neutral-300 hover:bg-white dark:hover:bg-zinc-800 border border-white/30 dark:border-neutral-700/50 shadow-sm backdrop-blur-sm text-xs font-medium",onClick:Cu,disabled:qo.value},{icon:t.withCtx(()=>[t.createVNode(t.unref(ne.RefreshCw),{class:t.normalizeClass(["w-3.5 h-3.5",{"animate-spin":qo.value}])},null,8,["class"])]),_:1},8,["disabled"])),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Vi.value,(z,U)=>(t.openBlock(),t.createBlock(He,{key:U,icon:z.icon,text:z.label,tooltip:z.tooltip,variant:z.variant,"bg-color":z.bgColor,"text-color":z.textColor,class:"gap-2 h-9 shadow-lg shadow-primary-500/20 border-none text-xs font-medium",onClick:J=>Eu(z)},null,8,["icon","text","tooltip","variant","bg-color","text-color","onClick"]))),128)),t.renderSlot(M.$slots,"header-actions")],2)])]),t.createElementVNode("div",H5,[t.createElementVNode("table",q5,[t.createElementVNode("thead",G5,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(rt.value,z=>(t.openBlock(),t.createElementBlock("th",{key:z.key,class:t.normalizeClass([z.align?`text-${z.align.toLowerCase()}`:"text-left",z.sortable?"cursor-pointer select-none":"","px-3 py-2 text-xs font-black text-white dark:text-neutral-100 uppercase tracking-wider transition-colors duration-150"]),style:t.normalizeStyle(z.width?{width:z.width}:{}),onClick:U=>z.sortable&&EN(z.key)},[z.type==="CHECKBOX"?(t.openBlock(),t.createElementBlock("div",X5,[t.createVNode(io,{"model-value":Re.value,indeterminate:Le.value,"onUpdate:modelValue":F[1]||(F[1]=U=>ct(!!U)),onClick:F[2]||(F[2]=t.withModifiers(()=>{},["stop"]))},null,8,["model-value","indeterminate"])])):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex items-center gap-2 w-full",bu(z.align)])},[t.createElementVNode("span",null,t.toDisplayString(z.label),1)],2))],14,K5))),128)),or.value?(t.openBlock(),t.createElementBlock("th",Y5,[...F[10]||(F[10]=[t.createElementVNode("div",{class:"flex items-center justify-center w-full"}," Actions ",-1)])])):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",J5,[qo.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(h.value,z=>(t.openBlock(),t.createElementBlock("tr",{key:`skeleton-${z}`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(rt.value,U=>{var J,ce;return t.openBlock(),t.createElementBlock("td",{key:U.key,class:t.normalizeClass([U.align?`text-${U.align.toLowerCase()}`:"text-left","px-3 py-0.5"])},[t.createElementVNode("div",{class:t.normalizeClass(["bg-gradient-to-r from-neutral-200 via-neutral-300 to-neutral-200 dark:from-neutral-700 dark:via-neutral-600 dark:to-neutral-700 animate-shimmer",[["badge","BADGE"].includes(U.type??"")||U.condition?"h-5 rounded-full w-20":"h-4 rounded-md",((J=U.align)==null?void 0:J.toLowerCase())==="center"?"mx-auto":"",((ce=U.align)==null?void 0:ce.toLowerCase())==="right"?"ml-auto":""]]),style:t.normalizeStyle({width:["badge","BADGE"].includes(U.type??"")||U.condition?void 0:BN(U),backgroundSize:"200% 100%"})},null,6)],2)}),128)),e.hasActions?(t.openBlock(),t.createElementBlock("td",Q5,[...F[11]||(F[11]=[t.createElementVNode("div",{class:"flex items-center justify-center gap-1.5"},[t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse"}),t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-75"}),t.createElementVNode("div",{class:"w-9 h-9 bg-zinc-200 dark:bg-zinc-700 rounded-xl animate-pulse delay-150"})],-1)])])):t.createCommentVNode("",!0)]))),128)):co.value.length===0?(t.openBlock(),t.createElementBlock("tr",Z5,[t.createElementVNode("td",{colspan:rt.value.length+(or.value?1:0),class:"text-center py-16"},[t.createElementVNode("div",tD,[t.createVNode(t.unref(Lu.Vue3Lottie),{animationData:t.unref(A5),height:200,width:200},null,8,["animationData"]),t.createElementVNode("div",null,[t.createElementVNode("p",oD,t.toDisplayString(xu.value?"No search results":"No data"),1),t.createElementVNode("p",nD,t.toDisplayString(xu.value?"Try changing keywords":"No data added"),1)])])],8,eD)])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(co.value,(z,U)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:U},[t.createElementVNode("tr",rD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(rt.value,J=>(t.openBlock(),t.createElementBlock("td",{key:J.key,class:t.normalizeClass([J.align?`text-${J.align.toLowerCase()}`:"text-left","px-3 py-0.5 text-sm text-neutral-900 dark:text-neutral-100"])},[t.renderSlot(M.$slots,`cell-${J.key}`,{row:z,value:dt(z,J.key)},()=>{var ce,me,ge,we,Ve,Be;return[J.type==="CHECKBOX"?(t.openBlock(),t.createElementBlock("div",aD,[t.createVNode(io,{"model-value":De(z),"onUpdate:modelValue":Ae=>G(z,!!Ae),onClick:F[3]||(F[3]=t.withModifiers(()=>{},["stop"]))},null,8,["model-value","onUpdate:modelValue"])])):J.type==="badge"||J.type==="BADGE"||J.condition?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["flex items-center gap-1.5 flex-wrap md:flex-nowrap",[J.align?`justify-${J.align.toLowerCase()}`:"justify-start"]])},[t.createVNode(_i,{variant:Ii(z,J).variant,class:t.normalizeClass([Ii(z,J).class,"whitespace-nowrap truncate max-w-[150px] inline-block"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(Ii(z,J).label),1)]),_:2},1032,["variant","class"])],2)):J.key==="no"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString((u.value-1)*h.value+U+1),1)],64)):J.type==="HYPERLINK"||J.type==="hyperlink"?(t.openBlock(),t.createElementBlock("a",{key:3,href:dt(z,(me=(ce=J.propsCustom)==null?void 0:ce[0])==null?void 0:me.urlLink)||"#",target:((we=(ge=J.propsCustom)==null?void 0:ge[0])==null?void 0:we.target)||"_blank",class:"text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1 font-medium"},[t.createTextVNode(t.toDisplayString(dt(z,J.key)||"-")+" ",1),((Be=(Ve=J.propsCustom)==null?void 0:Ve[0])==null?void 0:Be.target)==="_blank"?(t.openBlock(),t.createElementBlock("span",iD,[...F[12]||(F[12]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t.createElementVNode("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),t.createElementVNode("polyline",{points:"15 3 21 3 21 9"}),t.createElementVNode("line",{x1:"10",y1:"14",x2:"21",y2:"3"})],-1)])])):t.createCommentVNode("",!0)],8,sD)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createTextVNode(t.toDisplayString(bN(z,J)),1)],64))]})],2))),128)),or.value?(t.openBlock(),t.createElementBlock("td",lD,[t.renderSlot(M.$slots,"actions",{row:z,buttons:Aa(z),getButtonColor:Mi,getIconComponent:Ti},()=>[Aa(z).length>0?(t.openBlock(),t.createElementBlock("div",cD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Aa(z),(J,ce)=>(t.openBlock(),t.createElementBlock("div",{key:ce,class:"group relative"},[t.createVNode(He,{tooltip:J.tooltip||J.label,icon:J.icon,text:J.icon?"":J.label||(t.unref(l)==="id"?"Aksi":"Action"),size:J.icon?"icon":"sm",rounded:J.rounded||"sm",borderStyle:J.borderStyle||"none",variant:J.variant||"ghost","bg-color":Mi(J,z),onClick:me=>_u(J,z)},null,8,["tooltip","icon","text","size","rounded","borderStyle","variant","bg-color","onClick"])]))),128))])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),M.$slots["expanded-row"]?(t.openBlock(),t.createElementBlock("tr",dD,[t.createElementVNode("td",{colspan:rt.value.length+(or.value?1:0),class:"px-0 py-0"},[t.renderSlot(M.$slots,"expanded-row",{row:z,index:U})],8,fD)])):t.createCommentVNode("",!0)],64))),128))])])]),!qo.value&&co.value.length>0&&e.showPagination&&B.value?(t.openBlock(),t.createElementBlock("div",uD,[t.createElementVNode("div",hD,[t.createVNode(t.unref(_v),{"model-value":String(h.value),"onUpdate:modelValue":F[4]||(F[4]=z=>_N(Number(z)))},{default:t.withCtx(()=>[t.createVNode(t.unref(Nv),{class:"h-8 w-[70px] bg-white dark:bg-zinc-800 border-neutral-200 dark:border-neutral-700"},{default:t.withCtx(()=>[t.createVNode(t.unref(Vv),{placeholder:String(h.value)},null,8,["placeholder"])]),_:1}),t.createVNode(t.unref(Bv),null,{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(yN,z=>t.createVNode(t.unref(Av),{key:z,value:String(z)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(z),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"]),F[17]||(F[17]=t.createElementVNode("div",{class:"h-5 w-px bg-zinc-300 dark:bg-zinc-600"},null,-1)),t.createElementVNode("span",mD,[F[13]||(F[13]=t.createTextVNode(" Showing ",-1)),t.createElementVNode("span",pD,t.toDisplayString(hN.value),1),F[14]||(F[14]=t.createTextVNode(" to ",-1)),t.createElementVNode("span",gD,t.toDisplayString(mN.value),1),F[15]||(F[15]=t.createTextVNode(" of ",-1)),t.createElementVNode("span",bD,t.toDisplayString(nr.value),1),F[16]||(F[16]=t.createTextVNode(" items ",-1))])]),t.createElementVNode("div",yD,[t.createVNode(t.unref(gv),{total:nr.value,"items-per-page":h.value,"sibling-count":1,"show-edges":"",page:u.value,"onUpdate:page":wu,class:"scale-90 origin-right"},{default:t.withCtx(()=>[t.createVNode(t.unref(bv),{class:"flex items-center gap-1"},{default:t.withCtx(({items:z})=>[t.createVNode(t.unref(xv),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:opacity-50 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronsLeft),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(Ev),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronLeft),{class:"h-4 w-4"})]),_:1}),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z,(U,J)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[U.type==="page"?(t.openBlock(),t.createBlock(t.unref(kv),{key:J,value:U.value,"as-child":""},{default:t.withCtx(()=>[t.createVNode(t.unref(Pt),{class:"w-8 h-8 p-0 text-sm",variant:U.value===u.value?"default":"outline",disabled:U.value===u.value,onClick:ce=>wu(U.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(U.value),1)]),_:2},1032,["variant","disabled","onClick"])]),_:2},1032,["value"])):(t.openBlock(),t.createBlock(t.unref(yv),{key:U.type,index:J},null,8,["index"]))],64))),256)),t.createVNode(t.unref(Cv),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronRight),{class:"h-4 w-4"})]),_:1}),t.createVNode(t.unref(wv),{class:"w-8 h-8 p-0 flex items-center justify-center border border-neutral-200 dark:border-neutral-700 rounded-md bg-white dark:bg-zinc-800 text-neutral-900 dark:text-neutral-100 hover:bg-zinc-100 dark:hover:bg-zinc-700 disabled:cursor-not-allowed"},{default:t.withCtx(()=>[t.createVNode(t.unref(ne.ChevronsRight),{class:"h-4 w-4"})]),_:1})]),_:1})]),_:1},8,["total","items-per-page","page"])])])):t.createCommentVNode("",!0),t.createVNode(lo,{modelValue:k.value,"onUpdate:modelValue":F[5]||(F[5]=z=>k.value=z),title:NN.value,icon:"AlertCircle","max-width":450,persistent:!1},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",onClick:Bu,text:"Cancel"}),t.createVNode(He,{variant:"default",onClick:AN,text:"Yes"})]),default:t.withCtx(()=>[t.createElementVNode("div",xD,[t.createElementVNode("p",kD,t.toDisplayString(VN.value),1)])]),_:1},8,["modelValue","title"]),t.createVNode(lo,{modelValue:N.value,"onUpdate:modelValue":F[8]||(F[8]=z=>N.value=z),title:((X=V.value)==null?void 0:X.label)||"Action",icon:"AlertCircle","max-width":450},{actions:t.withCtx(()=>{var z;return[t.createVNode(He,{variant:"outline",onClick:F[6]||(F[6]=U=>N.value=!1),text:"Cancel"}),e.dummyMode&&((z=V.value)!=null&&z.route)?(t.openBlock(),t.createBlock(He,{key:1,variant:"default",onClick:F[7]||(F[7]=U=>N.value=!1),text:t.unref(l)==="id"?"Tutup":"Close"},null,8,["text"])):(t.openBlock(),t.createBlock(He,{key:0,variant:"default",onClick:vN,text:"Save"}))]}),default:t.withCtx(()=>{var z,U,J;return[t.createElementVNode("div",wD,[y.value?(t.openBlock(),t.createElementBlock("div",CD,[t.createElementVNode("div",ED,[F[18]||(F[18]=t.createElementVNode("div",{class:"w-8 h-8 border-4 border-primary border-t-transparent rounded-full animate-spin"},null,-1)),t.createElementVNode("span",_D,t.toDisplayString(t.unref(l)==="id"?"Memuat data...":"Loading data..."),1)])])):t.createCommentVNode("",!0),e.dummyMode&&((z=V.value)!=null&&z.route)?(t.openBlock(),t.createElementBlock("div",BD,[t.createElementVNode("div",SD,[t.createVNode(t.unref(ne.Search),{class:"w-4 h-4"})]),t.createElementVNode("div",AD,[t.createElementVNode("span",vD,t.toDisplayString(t.unref(l)==="id"?"Info Navigasi":"Navigation Info"),1),t.createElementVNode("p",DD,t.toDisplayString(t.unref(l)==="id"?`Aksi ini akan mengarah ke rute: ${V.value.route}`:`This action will navigate to: ${V.value.route}`),1)])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(((U=V.value)==null?void 0:U.fieldActionCustom)||((J=V.value)==null?void 0:J.fieldActionGlobal)||[],(ce,me)=>{var ge,we,Ve,Be;return t.openBlock(),t.createElementBlock(t.Fragment,{key:me},[!ce.isHidden&&t.unref(T)(ce)&&!(e.dummyMode&&((ge=V.value)!=null&&ge.route))?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(Ge(ce))},[t.createElementVNode("div",ND,[t.createVNode(pn,{class:"flex-1 w-full",field:ce,"model-value":w[ce.model],"form-data":w,required:t.unref(I)(ce),disabled:t.unref(H)(ce),readonly:t.unref(q)(ce),options:t.unref(te)(ce),"dynamic-labels":t.unref(W)(ce),"dynamic-length":t.unref(Z)(ce),"onUpdate:modelValue":Ae=>w[ce.model]=Ae},null,8,["field","model-value","form-data","required","disabled","readonly","options","dynamic-labels","dynamic-length","onUpdate:modelValue"]),ce.isCopyable||(we=ce.props)!=null&&we.isCopyable||((Ve=V.value)==null?void 0:Ve.action)==="showToken"||((Be=V.value)==null?void 0:Be.action)==="copyToken"?(t.openBlock(),t.createBlock(He,{key:0,icon:"Copy",variant:"outline",class:"h-10 w-10 p-0 flex-shrink-0",tooltip:"Salin",onClick:Ae=>DN(ce.model)},null,8,["onClick"])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)],64)}),128))])]}),_:1},8,["modelValue","title"])])}}});function VD(){const e=t.reactive({}),o=t.reactive({}),n=t.reactive({}),r=t.reactive({}),a=t.reactive({}),s=t.ref(!1),i=t.ref(null),l=t.reactive({}),c=t.reactive({visible:!1,title:"",message:"",action:null});return{formData:e,errors:o,fieldErrors:n,wizardState:r,inlineState:a,isSubmitting:s,internalSchema:i,rawItemsCache:l,confirmDialog:c}}function MD({formData:e,locale:o,errors:n,fieldMap:r,activeSchema:a,isSectionVisible:s,isFieldVisible:i,isFieldRequired:l,resolveFieldLength:c}){const d=(u,h,m)=>{const p=u.props||u.propsFieldGlobal||{},y=h==null?"":String(h).trim();if(l(u,m)&&y==="")return o.value==="id"?"Wajib diisi":"Required";if(y==="")return null;const b=c==null?void 0:c(u,m),g=Number((b==null?void 0:b.minLength)??p.minLength),E=Number((b==null?void 0:b.maxLength)??p.maxLength);if(!Number.isNaN(g)&&g>0&&y.length<g)return o.value==="id"?`Minimal ${g} karakter`:`Minimum ${g} characters`;if(!Number.isNaN(E)&&E>0&&y.length>E)return o.value==="id"?`Maksimal ${E} karakter`:`Maximum ${E} characters`;if(p.regex)try{if(!new RegExp(p.regex).test(y))return p.regexMessage||(o.value==="id"?"Format tidak valid":"Invalid format")}catch{console.warn(`[DynamicForm] Invalid validation regex for field ${u.model}:`,p.regex)}return null};return{validateField:d,validateAll:()=>{var h,m;let u=!0;return(m=(h=a.value)==null?void 0:h.sections)==null||m.forEach(p=>{var y;s(p)&&(((y=p.propsForm)==null?void 0:y.fields)||p.fields||[]).forEach(b=>{if(b.model&&i(b)){const g=r.value.get(b.model),E=g?xn(e,g.path):e[b.model],_=d(b,E);_&&(n[b.model]=_,u=!1)}})}),u}}}function TD({formData:e,activeSchema:o,isSectionVisible:n,isFieldVisible:r,getWizardTabs:a}){const s=()=>{var u;const d=[],f=h=>{h==null||h.forEach(m=>{var y;if(m.type==="TABLE"||m.propsTable){const b=m.propsTable||m;b.modelDatatable&&d.push({key:b.modelDatatable,subFields:(b.headers||[]).map(g=>g.key)})}(((y=m.propsForm)==null?void 0:y.fields)||m.fields||[]).forEach(b=>{var E,_;const g=["DCodeDynamicUploadList","DCodeUploadList","DCodeDataTable","DCodeDynamicFormList"].includes(b.component);if(b.model&&((E=b.props)!=null&&E.multiple||((_=b.props)==null?void 0:_.valueType)==="array"||g)){const B=b.component.includes("Upload")?["id","filename","document","typeDocument","idDocumentType"]:["id"];d.push({key:b.model,subFields:B})}}),m.type==="WIZARD"&&a(m).forEach(b=>f(b.sections))})};return f((u=o.value)==null?void 0:u.sections),d};return{getCleanPayload:()=>{var u;if(!((u=o.value)!=null&&u.sections))return{...e};const d={},f=new Set;return o.value.sections.forEach(h=>{var b,g;if(!n(h))return;const p=_a(h),y=(E,_)=>{if(E.model&&r(E)){const B=xn(e,_?`${_}.${E.model}`:E.model)??e[E.model];d[E.model]=Ho(B)??null,f.add(E.model)}};if((((b=h.propsForm)==null?void 0:b.fields)||h.fields||[]).forEach(E=>{var _;return y(E,p||((_=h.propsForm)==null?void 0:_.key))}),h.type==="WIZARD"&&a(h).forEach(E=>E.sections.forEach(_=>(_.fields||[]).forEach(B=>y(B,E.key)))),(g=h.propsTable)!=null&&g.modelDatatable){const E=h.propsTable.modelDatatable;d[E]=Ho(e[E]||[]),f.add(E)}}),["id","_id"].forEach(h=>{e[h]!==void 0&&!f.has(h)&&(d[h]=Ho(e[h]))}),d},applyFieldMapping:(d,f)=>{const u={},h=m=>m&&typeof m=="object"?m._isLogicValue?m.id:m.id??m.code??m.value??m:m;return Object.entries(f).forEach(([m,p])=>{if(typeof p=="string"){const y=d[m]??xn(e,m)??e[m];y!==void 0&&(u[p]=h(y))}else if(Array.isArray(p)&&p[0]){const y=p[0],b=Object.keys(y);let g=d[m]??xn(e,m)??e[m];if(!Array.isArray(g)||g.length===0){const E=s().find(_=>b.some(B=>_.subFields.includes(B)));if(E){const _=d[E.key]??xn(e,E.key)??e[E.key];Array.isArray(_)&&_.length>0&&(g=_)}}Array.isArray(g)&&(console.log(`[DynamicForm][MAPPING-SOURCE] ${m}:`,Ho(g)),u[m]=g.map((E,_)=>{const B={},A=Ho(E);return Object.entries(y).forEach(([C,x])=>{const k=A[C]??A[x]??E[C]??E[x]??null;B[x]=h(k)}),B}))}}),console.log("[DynamicForm][MAPPING-RESULT]",u),u},handleResponseMapping:(d,f)=>{const u=(d==null?void 0:d.data)!==void 0?d.data:d,h=Array.isArray(u)?u[0]:u;h&&Object.entries(f).forEach(([m,p])=>{const y=h[p]??h[m];y!==void 0&&iu(e,m,y)})},getFormArrayModels:s}}function PD({state:e,props:o,emit:n,apiUrl:r,router:a,locale:s,mapping:i,validation:l,fieldMap:c,activeSchema:d,resolvedBaseUrl:f}){const u=E=>o.dummyMode||!E.permission||(o.isEditMode?E.permission!=="CREATE":E.permission!=="UPDATE"),h=E=>{var _,B,A,C;E.requireConfirm?(e.confirmDialog.title=s.value==="id"?((_=E.propCustomMessage)==null?void 0:_.titleID)||"Konfirmasi":((B=E.propCustomMessage)==null?void 0:B.titleEN)||"Confirm",e.confirmDialog.message=s.value==="id"?((A=E.propCustomMessage)==null?void 0:A.messageID)||"Lanjutkan?":((C=E.propCustomMessage)==null?void 0:C.messageEN)||"Continue?",e.confirmDialog.action=E,e.confirmDialog.visible=!0):p(E)},m=()=>{e.confirmDialog.visible=!1,e.confirmDialog.action&&p(e.confirmDialog.action)},p=async E=>{var C,x;const _=E.propsActionGlobal||E.props||{},B=i.applyFieldMapping(i.getCleanPayload(),_.fieldMapping||E.fieldMapping||{});n("action",E,B);const A=_.endpointPropAction||E.endpointPropAction||_.endpoint||E.endpoint;if((_.type==="SUBMIT"||_.type==="ACTION")&&(A!=null&&A.apiUrl)){const k=ze.loading(s.value==="id"?"Memproses...":"Processing..."),N=Bi(A.apiUrl,f.value);try{const w=await r(N,A.apiMethod||"POST",B);console.log("[DynamicForm][ACTIONS] API Response:",w);const v=(w==null?void 0:w.status)===!0||(w==null?void 0:w.success)===!0||(w==null?void 0:w.code)===200||(w==null?void 0:w.code)==="00"||(w==null?void 0:w.status)==="SUCCESS",S=(w==null?void 0:w.message)||(v?s.value==="id"?"Sukses":"Success":s.value==="id"?"Gagal":"Failed");if(ze.update(k,{render:S,type:v?"success":"error",isLoading:!1,autoClose:v?3e3:5e3}),v){if((_.fieldMapping||E.fieldMapping)&&i.handleResponseMapping(w,_.fieldMapping||E.fieldMapping),n("success",w),console.log("[DynamicForm][ACTIONS] Router Instance:",a?"FOUND":"NOT FOUND"),a){const D=V=>{const R=V.startsWith("/")?V:"/"+V;console.log("[DynamicForm][ACTIONS] Navigating to:",R),a.push(R).catch(O=>{console.error("[DynamicForm][ACTIONS] Router Push Failed:",O)})};if(_.routeBack)D(_.routeBack);else{const V=a.currentRoute.value.path,R=V.split("/").filter(Boolean);console.log("[DynamicForm][ACTIONS] No routeBack, fallback to parent. Current path:",V),R.length>1?(R.pop(),D("/"+R.join("/"))):D("/")}}}else n("error",w)}catch(w){const v=((x=(C=w.response)==null?void 0:C.data)==null?void 0:x.message)||w.message||(s.value==="id"?"Terjadi kesalahan":"An error occurred");ze.update(k,{render:`Gagal: ${v}`,type:"error",isLoading:!1,autoClose:5e3}),n("error",w)}}else _.type==="SUBMIT"&&n("submit",B);_.keyRedirect&&_.route&&a&&a.push(_.route)};return{isActionVisible:u,handleGlobalButtonClick:h,confirmAction:m,performAction:p,handleSubmit:async()=>{var E,_;if(l.validateAll()){e.isSubmitting.value=!0;try{const B=i.getCleanPayload(),A=(((E=d.value)==null?void 0:E.actions)||[]).find(x=>{var k;return x.type==="SUBMIT"||x.key==="SUBMIT"||((k=x.propsActionGlobal)==null?void 0:k.type)==="SUBMIT"}),C=(A==null?void 0:A.fieldMapping)||((_=A==null?void 0:A.propsActionGlobal)==null?void 0:_.fieldMapping);n("submit",C?i.applyFieldMapping(B,C):B)}finally{e.isSubmitting.value=!1}}},handleCancel:()=>n("cancel"),handleFieldUpdate:(E,_,B)=>{var C;e.formData[E]=_;const A=(C=c.value.get(E))==null?void 0:C.field;if(A){const x=l.validateField(A,_);x?e.errors[E]=x:delete e.errors[E]}}}}function OD({formData:e,validation:o,locale:n,emit:r,mapping:a}){const s=t.ref(!1),i=t.ref(""),l=t.ref("Plus"),c=t.ref([]),d=t.reactive({}),f=t.reactive({}),u=t.ref(""),h=t.ref(null),m=t.ref(!1),p=t.ref(null),y=t.ref(!1),b=w=>{var v;return!(w!=null&&w.apiUrl)&&!((v=w==null?void 0:w.endpointTable)!=null&&v.apiUrl)},g=w=>{if(!w)return!1;const v=(w.key||"").toLowerCase(),S=(w.permission||"").toUpperCase();return v==="detail"||v.includes("view")||S==="VIEW"},E=w=>Array.isArray(e[w.modelDatatable])?e[w.modelDatatable]:[],_=w=>{var S,D;if((S=w.fields)!=null&&S.length)return w.fields;const v=(w.actionTableGlobal||[]).find(V=>V.permission==="CREATE"||(V.key||"").toLowerCase().includes("add"));return(D=v==null?void 0:v.fieldActionGlobal)!=null&&D.length?v.fieldActionGlobal:(w.headers||[]).filter(V=>V.key&&V.key!=="no").map(V=>({key:V.key,model:V.key,component:"DCodeTextField"}))},B=(w,v)=>{p.value={propsTable:w,row:v},y.value=!0},A=()=>{if(!p.value)return;const{propsTable:w,row:v}=p.value;y.value=!1;const S=e[w.modelDatatable];if(Array.isArray(S)){const D=S.indexOf(v);if(D!==-1)S.splice(D,1);else{const V=JSON.stringify(v,(O,P)=>["no","_index"].includes(O)?void 0:P),R=S.findIndex(O=>JSON.stringify(O,(P,L)=>["no","_index"].includes(P)?void 0:L)===V);R!==-1&&S.splice(R,1)}r("update:model",a.getCleanPayload())}},C=(w,v)=>{d[w]=v;const S=c.value.find(D=>D.model===w);if(S){const D=o.validateField(S,v);D?f[w]=D:delete f[w]}},x=(w,v,S)=>{u.value=w.modelDatatable||"",m.value=g(v),h.value=null,i.value=n.value==="id"?v.labelID||"Tambah Data":v.labelEN||"Add Data",l.value=v.icon||"Plus";const D=_(w);c.value=D,Object.keys(d).forEach(V=>delete d[V]),Object.keys(f).forEach(V=>delete f[V]),D.forEach(V=>d[V.model]=S?S[V.model]??null:null),s.value=!0};return{tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,tableRowFormData:d,tableRowErrors:f,activeTableKey:u,editingRowIndex:h,tableDialogViewOnly:m,confirmDeletePending:p,confirmDeleteOpen:y,isTemporaryTable:b,isActionViewOnly:g,tableRows:E,resolveTableFields:_,confirmTableDelete:B,executeTableDelete:A,handleTableRowUpdate:C,openTableRowDialog:x,handleDataTableAction:(w,v)=>{const{action:S,row:D}=v;if(/delete|trash/i.test(S)){const L=e[w.modelDatatable];if(Array.isArray(L)){const $=L.indexOf(D);if($!==-1)L.splice($,1);else{const T=JSON.stringify(D,(H,q)=>["no","_index"].includes(H)?void 0:q),I=L.findIndex(H=>JSON.stringify(H,(q,W)=>["no","_index"].includes(q)?void 0:W)===T);I!==-1&&L.splice(I,1)}}return}if(/detail|view/i.test(S)){x(w,{key:"detail",permission:"VIEW"},D);return}const V=w.modelDatatable||"";u.value=V,m.value=!1,i.value=n.value==="id"?"Ubah Data":"Edit Data",l.value="SquarePen";const R=e[V];let O=Array.isArray(R)?R.indexOf(D):-1;if(O===-1&&Array.isArray(R)){const L=JSON.stringify(D,($,T)=>["no","_index"].includes($)?void 0:T);O=R.findIndex($=>JSON.stringify($,(T,I)=>["no","_index"].includes(T)?void 0:I)===L)}h.value=O!==-1?O:null;const P=_(w);c.value=P,Object.keys(d).forEach(L=>delete d[L]),P.forEach(L=>d[L.model]=D[L.model]??null),s.value=!0},saveTableRow:()=>{let w=!0;if(c.value.forEach(S=>{const D=o.validateField(S,d[S.model]);D&&(f[S.model]=D,w=!1)}),!w)return;const v=u.value;v&&(e[v]=e[v]||[],h.value!==null?e[v].splice(h.value,1,{...d}):e[v].push({...d}),s.value=!1,r("update:model",a.getCleanPayload()))}}}function RD(e){const{state:o,props:n,emit:r,logic:a,mapping:s,activeSchema:i,fieldMap:l,prefetchFieldItems:c}=e;let d="";const f=new Map,u=new Map,h=(m,p)=>{var A;const y=(A=i.value)==null?void 0:A.sections;if(!y)return;a.applyCalculations();const b=a.getNormalizedData(m),g=(C,x,k,N)=>{const w=C.model,v=a.isFieldVisible(C,k)&&x;return f.get(w),o.formData[w],f.set(w,v),v},E=(C,x,k,N)=>{var O,P,L,$,T,I;const w=C.model,v=C.logic,S=Array.isArray((P=(O=C.props)==null?void 0:O.endpoint)==null?void 0:P.keyParam)||Array.isArray(($=(L=C.props)==null?void 0:L.endpointReference)==null?void 0:$.keyParam);if(!v&&!S)return;const D={};["lengthRule","optionsFilterRule","visibleRule","disabledRule"].forEach(H=>{const q=v==null?void 0:v[H];if(!q)return;const W=a.resolveActiveRule(q,k,`${H}-${w}`),Z=JSON.stringify(W);D[H]=Z;const te=u.get(w);(te==null?void 0:te[H])!==void 0&&te[H]!==Z&&console.log(`[DynamicForm][DEBUG][CONTEXT-CHANGE] ${w} rule ${H} changed while tracking.`)});const R=((T=C.props)==null?void 0:T.endpoint)||((I=C.props)==null?void 0:I.endpointReference);Array.isArray(R==null?void 0:R.keyParam)&&R.keyParam.forEach(H=>{const q=k[H],W=JSON.stringify(q);D[`kp-${H}`]=W;const Z=u.get(w);(Z==null?void 0:Z[`kp-${H}`])!==void 0&&Z[`kp-${H}`]!==W&&(console.log(`[DynamicForm][DEBUG][CASCADE] ${w} dependency ${H} changed while tracking.`),N&&x&&c(C,!0))}),u.set(w,D)},_=(C,x,k)=>{var w;if(C.type!=="WIZARD")return;(((w=C.propsWizard)==null?void 0:w.propsSteps)||[]).forEach(v=>{const D=a.isSectionVisible(v,k)&&x;Array.isArray(v.sectionsWizard)?B(v.sectionsWizard,D):v.sectionsWizard&&B([v.sectionsWizard],D)})},B=(C,x=!0)=>{var k;for(const N of C){const v=a.isSectionVisible(N,m)&&x,S=((k=N.propsForm)==null?void 0:k.fields)||N.fields||[];for(const D of S){if(!D.model)continue;const V=g(D,v,m);E(D,V,b,p)}_(N,v,m)}};B(y,!0)};return t.watch(()=>i.value,m=>{var y,b,g,E,_;if(!(m!=null&&m.sections))return;const p=B=>{if(!B)return;const A=["visibleRule","requiredRule","disabledRule","optionsFilterRule","lengthRule","calculateRule"];for(const C of A){const x=B[C];if(Array.isArray(x))for(const k of x)k.condition&&Ba(k.condition);else x&&Ba(x)}};for(const B of m.sections){if(p(B.logic||((y=B.propsForm)==null?void 0:y.logic)),B.type==="WIZARD")for(const C of((b=B.propsWizard)==null?void 0:b.propsSteps)||[])p(C.logic);const A=((g=B.propsForm)==null?void 0:g.fields)||B.fields||[];for(const C of A)p(C.logic),(E=C.logic)!=null&&E.optionsFilterRule&&c(C);if(B.type==="TABLE"&&((_=B.propsTable)!=null&&_.modelDatatable)&&(o.formData[B.propsTable.modelDatatable]=o.formData[B.propsTable.modelDatatable]||[]),B.type==="WIZARD"){const C=_a(B);o.wizardState[C]===void 0&&(o.wizardState[C]=0)}}h(o.formData,!1)},{immediate:!0}),t.watch(o.formData,m=>{h(m,!0);const p=s.getCleanPayload()||{},y=JSON.stringify(p);y!==d&&(console.log("[DynamicForm][DEBUG][EMIT] Sending updated model to parent:",p),d=y,r("update:model",p))},{deep:!0}),t.watch(()=>n.model,m=>{m&&Object.keys(m).length>0&&JSON.stringify(m)!==d&&Object.entries(m).forEach(([y,b])=>{if(f.get(y)===!1)return;if(b==null&&f.get(y)===!0){const _=o.formData[y];if(_!=null)return}const g=l.value.get(y),E=(g==null?void 0:g.path)||y;iu(o.formData,E,b)})},{immediate:!0,deep:!0}),{lastEmittedPayload:()=>d}}kt.add_operation("length",e=>e==null?0:typeof e=="string"||Array.isArray(e)?e.length:typeof e=="number"?String(e).length:typeof e=="object"?Object.keys(e).length:0),kt.add_operation("==",(e,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return e==null?o==null:o==null?e==null:n(e)&&n(o)?String(e.id)===String(o.id)||String(e.code)===String(o.code):n(e)?String(e.code)===String(o)||String(e.id)===String(o):n(o)?String(o.code)===String(e)||String(o.id)===String(e):typeof e=="boolean"&&typeof o=="string"?String(e)===o:typeof o=="boolean"&&typeof e=="string"?String(o)===e:String(e)===String(o)}),kt.add_operation("!=",(e,o)=>{const n=r=>r&&typeof r=="object"&&r._isLogicValue;return e==null&&o==null?!1:e==null||o===null||o===void 0?!0:n(e)&&n(o)?!(String(e.id)===String(o.id)||String(e.code)===String(o.code)):n(e)?!(String(e.code)===String(o)||String(e.id)===String(o)):n(o)?!(String(o.code)===String(e)||String(o.id)===String(e)):String(e)!==String(o)});function LD(e,o){const{t:n,locale:r}=_t.useI18n(),a=t.computed(()=>r.value),{apiUrl:s}=Je(),i=e.router||_o.useRouter(),l=VD(),c=t.computed(()=>e.schema||l.internalSchema.value),d=t.computed(()=>{var B;if((B=e.selectedTokenCore)!=null&&B.address)return e.selectedTokenCore.address;if(e.baseUrl)return e.baseUrl}),f=(B,A,C)=>{A.model&&B.set(A.model,{field:A,path:A.model})},u=(B,A)=>{A.key||A.id;const C=Array.isArray(A.sectionsWizard)?A.sectionsWizard:[A.sectionsWizard].filter(Boolean);for(const x of C)if(x.fields)for(const k of x.fields)f(B,k)},h=t.computed(()=>{var C,x,k;const B=new Map,A=(C=c.value)==null?void 0:C.sections;if(!A)return B;for(const N of A){const w=N.propsForm||N.propsTable||N.props||{};_a(N);const v=w.fields||N.fields||[];for(const S of v)f(B,S);if(((x=N.type)==null?void 0:x.toUpperCase())==="WIZARD"&&((k=N.propsWizard)!=null&&k.propsSteps))for(const S of N.propsWizard.propsSteps)u(B,S)}return B}),m=Si({formData:l.formData,errors:l.errors,fieldMap:h,rawItemsCache:l.rawItemsCache,activeSchema:c,locale:a});t.watch(()=>c.value,B=>{if(B!=null&&B.payload){console.log("[DynamicForm][DEBUG] Initializing flat state from schema payload...");const A=lu(B.payload);Object.keys(A).forEach(C=>{(l.formData[C]===void 0||l.formData[C]===null)&&(l.formData[C]=A[C])})}},{immediate:!0});const p=MD({formData:l.formData,locale:a,errors:l.errors,fieldMap:h,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,isFieldRequired:m.isFieldRequired,resolveFieldLength:m.resolveFieldLength}),y=TD({formData:l.formData,activeSchema:c,isSectionVisible:m.isSectionVisible,isFieldVisible:m.isFieldVisible,getWizardTabs:m.getWizardTabs}),b=PD({state:l,props:e,emit:o,apiUrl:s,router:i,locale:a,mapping:y,validation:p,fieldMap:h,activeSchema:c,resolvedBaseUrl:d}),g=OD({formData:l.formData,validation:p,locale:a,emit:o,mapping:y}),E=async(B,A=!1)=>{const C=B.props||{},x=C.endpointReference||C.endpoint;if(x!=null&&x.apiUrl&&!(!A&&l.rawItemsCache[B.key]))try{const k=Bi(x.apiUrl,d.value),N={page:1,perPage:100};if(Array.isArray(x.keyParam)){let D=!1;if(x.keyParam.forEach(V=>{const R=m.getNormalizedData(l.formData)[V];R==null||R===""?D=!0:N[V]=R&&typeof R=="object"&&R._isLogicValue?R.id:R}),D){l.rawItemsCache[B.key]=[];return}}const w=await s(k,x.apiMethod||"GET",N),v=(w==null?void 0:w.data)||w;let S=[];Array.isArray(v)?S=v:v&&(S=[v]),l.rawItemsCache[B.key]=S}catch(k){console.error(`[prefetchFieldItems] Error fetching items for ${B.key}:`,k),l.rawItemsCache[B.key]=[]}};RD({state:l,props:e,emit:o,logic:m,mapping:y,fieldMap:h,activeSchema:c,prefetchFieldItems:E});const _=t.computed(()=>{const B={},A=c.value;return A!=null&&A.sections&&A.sections.forEach(C=>{var k,N,w;(((k=C.propsForm)==null?void 0:k.fields)||((N=C.propsTable)==null?void 0:N.fields)||((w=C.props)==null?void 0:w.fields)||[]).forEach(v=>{var S,D,V,R,O,P,L,$,T,I,H;if(v.component==="DCodeRadioCustom"){const q=((S=v.props)==null?void 0:S.name)||"default-group";B[q]||(B[q]=[]);let W=((V=(D=v.props)==null?void 0:D.endpoint)==null?void 0:V.apiUrl)||((R=v.props)==null?void 0:R.apiUrl);W=Bi(W,d.value),B[q].push({key:v.key,value:(O=v.props)==null?void 0:O.value,label:((P=v.props)==null?void 0:P.labelID)||((L=v.props)==null?void 0:L.labelEN)||v.key,model:v.model||v.key,apiUrl:W,apiMethod:((T=($=v.props)==null?void 0:$.endpoint)==null?void 0:T.apiMethod)||((I=v.props)==null?void 0:I.apiMethod),icon:(H=v.props)==null?void 0:H.icon,name:q})}})}),B});return{t:n,locale:a,i18nLocale:r,apiUrl:s,router:i,isSubmitting:l.isSubmitting,internalSchema:l.internalSchema,activeSchema:c,resolvedBaseUrl:d,radioGroups:_,confirmDialog:l.confirmDialog,fieldMap:h,rawItemsCache:l.rawItemsCache,formData:l.formData,errors:l.errors,fieldErrors:l.fieldErrors,inlineState:l.inlineState,wizardState:l.wizardState,getSectionKey:_a,sortedFields:M5,prefetchFieldItems:E,...m,...y,...b,...g}}const ID={class:"flex items-center gap-2"},FD=t.defineComponent({__name:"DynamicFormSection",props:{section:{},sIdx:{}},setup(e){const o=t.inject("dynamicFormContext",{}),n=t.computed(()=>{var S,D,V;const w=(V=(D=(S=e.section)==null?void 0:S.propsForm)==null?void 0:D.actionSection)==null?void 0:V.some(R=>a==null?void 0:a(R)),v=e.sIdx===0;return w||v}),{resolveSectionLabels:r,isActionVisible:a,handleGlobalButtonClick:s,locale:i,t:l,handleCancel:c,sortedFields:d,isFieldVisible:f,getDeepValue:u,formData:h,getSectionKey:m,isFieldRequired:p,isFieldDisabled:y,isFieldReadonly:b,getFilteredItems:g,errors:E,resolveFieldLabels:_,resolveFieldLength:B,resolvedBaseUrl:A,handleFieldUpdate:C,resolveSectionGridClass:x,resolveFieldColumnClass:k}=o,N=w=>typeof d!="function"?[]:d(w||[]);return(w,v)=>{var S;return t.openBlock(),t.createBlock(Jo,{title:(S=t.unref(r)(e.section))==null?void 0:S.title,border:!0,padding:"",class:"overflow-hidden"},t.createSlots({default:t.withCtx(()=>{var D,V,R,O,P,L;return[t.createElementVNode("div",{class:t.normalizeClass(["p-4 grid gap-4",t.unref(x)(((V=(D=e.section)==null?void 0:D.propsForm)==null?void 0:V.layoutColumns)||((R=e.section)==null?void 0:R.layoutColumns))])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N(((P=(O=e.section)==null?void 0:O.propsForm)==null?void 0:P.fields)||((L=e.section)==null?void 0:L.fields)),$=>{var T,I,H,q,W,Z,te,xe,Se,ye,Q,j;return t.openBlock(),t.createElementBlock(t.Fragment,{key:$==null?void 0:$.key},[(T=t.unref(f))!=null&&T($)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(k)($,((H=(I=e.section)==null?void 0:I.propsForm)==null?void 0:H.layoutColumns)||((q=e.section)==null?void 0:q.layoutColumns)))},[t.createVNode(pn,{field:$,"model-value":(W=t.unref(h))==null?void 0:W[$.model],"form-data":t.unref(h),required:(Z=t.unref(p))==null?void 0:Z($),disabled:(te=t.unref(y))==null?void 0:te($),readonly:(xe=t.unref(b))==null?void 0:xe($),options:(Se=t.unref(g))==null?void 0:Se($),error:(ye=t.unref(E))==null?void 0:ye[$.model],"dynamic-labels":(Q=t.unref(_))==null?void 0:Q($),"dynamic-length":(j=t.unref(B))==null?void 0:j($),"base-url":t.unref(A),"onUpdate:modelValue":Y=>t.unref(C)($.model,Y)},null,8,["field","model-value","form-data","required","disabled","readonly","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):t.createCommentVNode("",!0)],64)}),128))],2)]}),_:2},[n.value?{name:"actions",fn:t.withCtx(()=>{var D,V,R,O;return[t.createElementVNode("div",ID,[(R=(V=(D=e.section)==null?void 0:D.propsForm)==null?void 0:V.actionSection)!=null&&R.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.section.propsForm.actionSection,(P,L)=>{var $,T,I,H,q,W,Z,te;return t.openBlock(),t.createElementBlock(t.Fragment,{key:L},[($=t.unref(a))!=null&&$(P)?(t.openBlock(),t.createBlock(He,{key:0,icon:P.icon||((T=P.propsActionGlobal)==null?void 0:T.icon),text:t.unref(i)==="id"?P.labelID||((I=P.propsActionGlobal)==null?void 0:I.labelID):P.labelEN||((H=P.propsActionGlobal)==null?void 0:H.labelEN),"bg-color":((W=P.bgColor||((q=P.propsActionGlobal)==null?void 0:q.bgColor))==null?void 0:W.toLowerCase())||"primary",variant:((te=P.variant||((Z=P.propsActionGlobal)==null?void 0:Z.variant))==null?void 0:te.toLowerCase())||"outline",size:"sm",onClick:xe=>{var Se;return(Se=t.unref(s))==null?void 0:Se(P)}},null,8,["icon","text","bg-color","variant","onClick"])):t.createCommentVNode("",!0)],64)}),128)):t.createCommentVNode("",!0),e.sIdx===0?(t.openBlock(),t.createBlock(He,{key:1,size:"sm",icon:"List",text:(O=t.unref(l))==null?void 0:O("common.back"),variant:"outline",onClick:v[0]||(v[0]=P=>{var L;return(L=t.unref(c))==null?void 0:L()})},null,8,["text"])):t.createCommentVNode("",!0)])]}),key:"0"}:void 0]),1032,["title"])}}}),zD=t.defineComponent({__name:"DynamicTableSection",props:{section:{},dummyMode:{type:Boolean}},setup(e){const o=t.inject("dynamicFormContext"),{tableRows:n,isTemporaryTable:r,handleDataTableAction:a,resolvedBaseUrl:s}=o;return(i,l)=>(t.openBlock(),t.createBlock(Jo,{border:!0,padding:"",class:"overflow-hidden"},{default:t.withCtx(()=>[t.createVNode(kn,{"table-config":e.section.propsTable,data:t.unref(n)(e.section.propsTable),nested:!0,"show-pagination":e.section.propsTable.pagination??!0,"has-actions":t.unref(r)(e.section.propsTable),"base-url":t.unref(s),"dummy-mode":e.dummyMode,onAction:l[0]||(l[0]=c=>t.unref(a)(e.section.propsTable,c))},null,8,["table-config","data","show-pagination","has-actions","base-url","dummy-mode"])]),_:1}))}}),$D={class:"w-full"},jD={class:"space-y-6 mt-4"},UD={key:2,class:"p-4 border border-dashed border-neutral-300 rounded-lg text-xs text-neutral-400"},WD=t.defineComponent({__name:"DynamicWizardSection",props:{section:{},dummyMode:{type:Boolean}},setup(e){const o=t.inject("dynamicFormContext"),{getWizardTabs:n,wizardState:r,getSectionKey:a,isSubmitting:s,isSectionVisible:i,sortedFields:l,isFieldVisible:c,formData:d,isFieldRequired:f,isFieldDisabled:u,getFilteredItems:h,errors:m,resolveFieldLabels:p,resolveFieldLength:y,resolvedBaseUrl:b,handleFieldUpdate:g,tableRows:E,handleDataTableAction:_,resolveSectionGridClass:B,resolveFieldColumnClass:A}=o;return(C,x)=>{var k;return t.openBlock(),t.createElementBlock("div",$D,[t.createVNode(hi,{tabs:t.unref(n)(e.section),modelValue:t.unref(r)[t.unref(a)(e.section)],"onUpdate:modelValue":x[0]||(x[0]=N=>t.unref(r)[t.unref(a)(e.section)]=N),"is-vertical":e.section.propsWizard.isVertical,"is-wizard":e.section.propsWizard.isWizard,"type-wizard":((k=e.section.propsWizard.typeWizard)==null?void 0:k.toLowerCase())||"icon",loading:t.unref(s)},t.createSlots({_:2},[t.renderList(t.unref(n)(e.section),N=>({name:`tab-${N.key}`,fn:t.withCtx(()=>[t.createElementVNode("div",jD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.sections,(w,v)=>{var S,D,V,R;return t.openBlock(),t.createElementBlock(t.Fragment,{key:v},[t.unref(i)(w)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[((S=w.type)==null?void 0:S.toUpperCase())==="FORM"?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["grid gap-4",t.unref(B)(w.layoutColumns||((D=w.propsForm)==null?void 0:D.layoutColumns))])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l)(w.fields||((V=w.propsForm)==null?void 0:V.fields)),O=>{var P;return t.openBlock(),t.createElementBlock(t.Fragment,{key:O.key},[t.unref(c)(O)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(A)(O,w.layoutColumns||((P=w.propsForm)==null?void 0:P.layoutColumns)))},[t.createVNode(pn,{field:O,"model-value":t.unref(d)[O.model],"form-data":t.unref(d),required:t.unref(f)(O),disabled:t.unref(u)(O),options:t.unref(h)(O),error:t.unref(m)[O.model],"dynamic-labels":t.unref(p)(O),"dynamic-length":t.unref(y)(O),"base-url":t.unref(b),"onUpdate:modelValue":L=>t.unref(g)(O.model,L)},null,8,["field","model-value","form-data","required","disabled","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])],2)):t.createCommentVNode("",!0)],64)}),128))],2)):((R=w.type)==null?void 0:R.toUpperCase())==="TABLE"||w.isDataTable?(t.openBlock(),t.createBlock(Jo,{key:1,border:!0,padding:"",class:"overflow-hidden"},{default:t.withCtx(()=>{var O;return[t.createVNode(kn,{"dummy-mode":e.dummyMode,"table-config":w.propsDataTableWizard||w.propsTable,data:t.unref(E)(w.propsDataTableWizard||w.propsTable),nested:!0,"show-pagination":((O=w.propsDataTableWizard||w.propsTable)==null?void 0:O.pagination)??!0,onAction:P=>t.unref(_)(w.propsDataTableWizard||w.propsTable,P)},null,8,["dummy-mode","table-config","data","show-pagination","onAction"])]}),_:2},1024)):(t.openBlock(),t.createElementBlock("div",UD," Unknown section type: "+t.toDisplayString(w.type),1))],64)):t.createCommentVNode("",!0)],64)}),128))])])}))]),1032,["tabs","modelValue","is-vertical","is-wizard","type-wizard","loading"])])}}}),HD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},qD={key:0,class:"grid grid-cols-1 md:grid-cols-2 gap-4 py-2"},GD={class:"py-2 text-sm text-neutral-600 dark:text-neutral-400"},KD=t.defineComponent({__name:"DynamicFormDialogs",setup(e){const o=t.inject("dynamicFormContext"),{confirmDialog:n,t:r,confirmAction:a,tableDialogOpen:s,tableDialogTitle:i,tableDialogIcon:l,tableDialogFields:c,isFieldVisible:d,tableRowFormData:f,tableDialogViewOnly:u,isFieldRequired:h,isFieldDisabled:m,getFilteredItems:p,tableRowErrors:y,resolveFieldLabels:b,resolveFieldLength:g,resolvedBaseUrl:E,handleTableRowUpdate:_,locale:B,saveTableRow:A,confirmDeleteOpen:C,executeTableDelete:x}=o;return(k,N)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(lo,{modelValue:t.unref(n).visible,"onUpdate:modelValue":N[1]||(N[1]=w=>t.unref(n).visible=w),title:t.unref(n).title,icon:"AlertTriangle","max-width":450},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(r)("common.cancel"),onClick:N[0]||(N[0]=w=>t.unref(n).visible=!1)},null,8,["text"]),t.createVNode(He,{text:t.unref(r)("common.confirm"),onClick:t.unref(a)},null,8,["text","onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",HD,t.toDisplayString(t.unref(n).message),1)]),_:1},8,["modelValue","title"]),t.createVNode(lo,{modelValue:t.unref(s),"onUpdate:modelValue":N[3]||(N[3]=w=>t.isRef(s)?s.value=w:null),title:t.unref(i),icon:t.unref(l),"max-width":700},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(u)?t.unref(B)==="id"?"Tutup":"Close":t.unref(B)==="id"?"Batal":"Cancel",onClick:N[2]||(N[2]=w=>s.value=!1)},null,8,["text"]),t.unref(u)?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(He,{key:0,text:"Save",onClick:t.unref(A)},null,8,["onClick"]))]),default:t.withCtx(()=>[t.unref(c).length?(t.openBlock(),t.createElementBlock("div",qD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),w=>(t.openBlock(),t.createElementBlock("div",{key:w.key,class:t.normalizeClass(w.column==="FULL"?"md:col-span-2":"col-span-1")},[t.unref(d)(w,t.unref(f))?(t.openBlock(),t.createBlock(pn,{key:0,field:w,"model-value":t.unref(f)[w.model],"form-data":t.unref(f),required:t.unref(u)?!1:t.unref(h)(w,t.unref(f)),disabled:t.unref(u)||t.unref(m)(w,t.unref(f)),"view-only":t.unref(u),options:t.unref(p)(w,t.unref(f)),error:t.unref(u)?void 0:t.unref(y)[w.model],"dynamic-labels":t.unref(b)(w,t.unref(f)),"dynamic-length":t.unref(g)(w,t.unref(f)),"base-url":t.unref(E),"onUpdate:modelValue":v=>t.unref(_)(w.model,v)},null,8,["field","model-value","form-data","required","disabled","view-only","options","error","dynamic-labels","dynamic-length","base-url","onUpdate:modelValue"])):t.createCommentVNode("",!0)],2))),128))])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","title","icon"]),t.createVNode(lo,{modelValue:t.unref(C),"onUpdate:modelValue":N[5]||(N[5]=w=>t.isRef(C)?C.value=w:null),title:t.unref(B)==="id"?"Konfirmasi Hapus":"Confirm Delete",icon:"Trash2","max-width":440},{actions:t.withCtx(()=>[t.createVNode(He,{variant:"outline",text:t.unref(B)==="id"?"Batal":"Cancel",onClick:N[4]||(N[4]=w=>C.value=!1)},null,8,["text"]),t.createVNode(He,{variant:"default","bg-color":"danger",icon:"Trash2",text:t.unref(B)==="id"?"Hapus":"Delete",onClick:t.unref(x)},null,8,["text","onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",GD,t.toDisplayString(t.unref(B)==="id"?"Apakah Anda yakin ingin menghapus data ini? Tindakan ini tidak dapat dibatalkan.":"Are you sure you want to delete this row? This action cannot be undone."),1)]),_:1},8,["modelValue","title"])]))}}),XD={class:"w-full space-y-6"},Ai=t.defineComponent({__name:"DynamicForm",props:{schema:{},model:{default:()=>({})},isEditMode:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},baseUrl:{default:void 0},selectedTokenCore:{default:null},dummyMode:{type:Boolean,default:!1},router:{default:null}},emits:["submit","cancel","action","update:model","success","error"],setup(e,{emit:o}){const n=e,a=LD(n,o);t.provide("dynamicFormContext",a);const{activeSchema:s,isSectionVisible:i,inlineState:l,isActionVisible:c,locale:d,isSubmitting:f,isSubmitDisabled:u,handleGlobalButtonClick:h,handleSubmit:m}=a;return(p,y)=>{var b,g,E,_,B,A;return t.openBlock(),t.createElementBlock("div",XD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((b=t.unref(s))==null?void 0:b.sections,(C,x)=>{var k,N,w;return t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[((k=C.type)==null?void 0:k.toUpperCase())==="FORM"&&C.propsForm&&t.unref(i)(C)?(t.openBlock(),t.createBlock(FD,{key:0,"dummy-mode":n.dummyMode,section:C,sIdx:Number(x)},null,8,["dummy-mode","section","sIdx"])):((N=C.type)==null?void 0:N.toUpperCase())==="TABLE"&&C.propsTable&&t.unref(i)(C)?(t.openBlock(),t.createBlock(zD,{key:1,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):((w=C.type)==null?void 0:w.toUpperCase())==="WIZARD"&&C.propsWizard&&t.unref(i)(C)?(t.openBlock(),t.createBlock(WD,{key:2,"dummy-mode":n.dummyMode,section:C},null,8,["dummy-mode","section"])):t.createCommentVNode("",!0)],64)}),128)),(g=t.unref(l))!=null&&g.global?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(((_=(E=t.unref(s))==null?void 0:E.ui)==null?void 0:_.actionsClass)||"flex items-center gap-2 flex-wrap pt-4 border-t border-neutral-100 dark:border-neutral-800")},[(A=(B=t.unref(s))==null?void 0:B.actionGlobal)!=null&&A.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(s).actionGlobal,(C,x)=>{var k,N,w;return t.openBlock(),t.createElementBlock(t.Fragment,{key:x},[C.propsActionGlobal&&t.unref(c)(C)?(t.openBlock(),t.createBlock(He,{key:0,icon:C.propsActionGlobal.icon,text:t.unref(d)==="id"?C.propsActionGlobal.labelID:C.propsActionGlobal.labelEN,"bg-color":((k=C.propsActionGlobal.bgColor)==null?void 0:k.toLowerCase())||"primary",variant:((N=C.propsActionGlobal.variant)==null?void 0:N.toLowerCase())||"default",loading:t.unref(f),disabled:t.unref(u)&&(C.permission==="CREATE"||C.permission==="UPDATE"||((w=C.propsActionGlobal)==null?void 0:w.key)==="submit"),onClick:v=>t.unref(h)(C)},null,8,["icon","text","bg-color","variant","loading","disabled","onClick"])):t.createCommentVNode("",!0)],64)}),128)):t.createCommentVNode("",!0)],2)),t.createVNode(KD)])}}}),YD={"aria-label":"Breadcrumb"},JD={class:"flex flex-wrap items-center text-sm md:text-base"},QD={class:"truncate max-w-[100px] sm:max-w-[150px] md:max-w-none"},cu=t.defineComponent({__name:"Breadcrumb",props:{items:{},showHomeIcon:{type:Boolean,default:!0},iconSize:{default:18},separatorSize:{default:16},separatorType:{default:"chevron"},strokeWidth:{default:2}},setup(e){const o=e,n=ne.Home,r=o.separatorType==="slash"?ne.Slash:ne.ChevronRight;return(a,s)=>(t.openBlock(),t.createElementBlock("nav",YD,[t.createElementVNode("ol",JD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.items,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:"flex items-center"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.to?"router-link":"span"),{to:i.to,class:t.normalizeClass(["inline-flex items-center gap-1.5 transition-all duration-200 rounded-lg font-medium",i.to?"text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 hover:bg-primary-50 dark:hover:bg-primary-900/20 cursor-pointer":"dark:text-gray-100 bg-primary-50 dark:bg-primary-900/30 text-primary-700"])},{default:t.withCtx(()=>[i.icon||l===0&&e.showHomeIcon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.icon||t.unref(n)),{key:0,size:e.iconSize,class:t.normalizeClass(["flex-shrink-0",i.to?"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-400":"text-primary-600 dark:text-primary-400",i.iconClass||""]),"stroke-width":e.strokeWidth},null,8,["size","class","stroke-width"])):t.createCommentVNode("",!0),t.createElementVNode("span",QD,t.toDisplayString(i.label),1)]),_:2},1032,["to","class"])),l<e.items.length-1?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(r)),{key:0,size:e.separatorSize,class:"mx-1.5 text-gray-300 dark:text-gray-700 flex-shrink-0"},null,8,["size"])):t.createCommentVNode("",!0)]))),128))])]))}});function du(){return{setPageTitle:n=>{typeof document<"u"&&(document.title=n||document.title),typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:page-title",{detail:{title:n},bubbles:!0,composed:!0}))},setBreadcrumb:n=>{typeof window<"u"&&window.dispatchEvent(new CustomEvent("micro:breadcrumb",{detail:{items:n},bubbles:!0,composed:!0}))}}}const ZD={class:"w-full space-y-6 animate-pulse"},eN={class:"p-4 grid grid-cols-1 md:grid-cols-2 gap-4"},tN=t.defineComponent({__name:"AutoLayoutSkeleton",setup(e){return(o,n)=>(t.openBlock(),t.createElementBlock("div",ZD,[n[2]||(n[2]=t.createElementVNode("div",{class:"h-6 w-48 bg-neutral-200 dark:bg-neutral-700 rounded-md"},null,-1)),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(2,r=>t.createElementVNode("div",{key:r,class:"rounded-xl border border-neutral-200 dark:border-neutral-700 overflow-hidden"},[n[1]||(n[1]=t.createElementVNode("div",{class:"px-4 py-3 bg-neutral-200 dark:bg-neutral-700"},[t.createElementVNode("div",{class:"h-4 w-32 bg-neutral-300 dark:bg-neutral-600 rounded"})],-1)),t.createElementVNode("div",eN,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(6,a=>t.createElementVNode("div",{key:a,class:t.normalizeClass(a>4?"md:col-span-2":"col-span-1")},[...n[0]||(n[0]=[t.createElementVNode("div",{class:"h-3 w-24 bg-neutral-200 dark:bg-neutral-700 rounded mb-2"},null,-1),t.createElementVNode("div",{class:"h-10 w-full bg-neutral-200 dark:bg-neutral-700 rounded-lg"},null,-1)])],2)),64))])])),64)),n[3]||(n[3]=t.createElementVNode("div",{class:"flex items-center gap-2"},[t.createElementVNode("div",{class:"h-9 w-24 bg-neutral-300 dark:bg-neutral-600 rounded-lg"}),t.createElementVNode("div",{class:"h-9 w-20 bg-neutral-200 dark:bg-neutral-700 rounded-lg"})],-1))]))}}),oN={class:"w-full"},nN={class:"relative mx-auto min-h-[37.5rem]"},rN={key:"content",class:"w-full"},aN={class:"mb-6"},sN={class:"text-neutral-500 dark:text-neutral-400"},iN={key:"skeleton",class:"w-full"},lN={key:"error",class:"flex items-center justify-center p-20 text-red-500 w-full"},vi=ft(t.defineComponent({name:"AutoLayoutForm",__name:"AutoLayoutForm",props:{layoutCode:{},isEditMode:{type:Boolean},model:{},selectedTokenCore:{},router:{}},emits:["submit-success","cancel","action-success","update:model"],setup(e,{emit:o}){var S,D,V,R,O,P,L,$;const n=e,r=o,a=(D=(S=t.getCurrentInstance())==null?void 0:S.appContext)==null?void 0:D.app;a&&!a._context.provides[Symbol.for("vue-router-route-location")]&&a.provide(Symbol.for("vue-router-route-location"),{query:{},params:{},path:""});let s={query:{},params:{},path:""};try{const T=_o.useRoute();if(T&&Object.keys(T).length>0)s=T;else{const I=t.getCurrentInstance();(O=(R=(V=I==null?void 0:I.appContext)==null?void 0:V.config)==null?void 0:R.globalProperties)!=null&&O.$route&&(s=I.appContext.config.globalProperties.$route)}}catch{console.warn("useRoute not available, using fallback")}let i={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:T=>{typeof window<"u"&&(typeof T=="string"?window.location.href=T:T&&T.path&&(window.location.href=T.path))},__isFallback:!0};try{const T=n.router||_o.useRouter();if(T)i=T;else{const I=t.getCurrentInstance();($=(L=(P=I==null?void 0:I.appContext)==null?void 0:P.config)==null?void 0:L.globalProperties)!=null&&$.$router&&(i=I.appContext.config.globalProperties.$router)}}catch{console.warn("useRouter not available, using fallback")}const{apiUrl:l,DCodeApi:c}=Je();let d;try{d=_t.useI18n().locale}catch{d=t.ref("en")}const{setPageTitle:f}=du(),u=t.computed(()=>n.isEditMode!==void 0?n.isEditMode:s.params&&"id"in s.params?!0:s.path?/\/edit\/[^\/]+$/.test(s.path):!1);t.watchEffect(()=>{console.log("isEditModeisEditMode",u.value)});const h=t.computed(()=>{if(s.params&&"id"in s.params)return s.params.id;if(!s.path)return null;const T=s.path.match(/\/edit\/([^\/]+)$/);return T?T[1]:null}),m=t.ref({}),p=t.ref(null),y=t.ref(!0),b=t.ref(!1),g="https://dcodedynamic.skyworx.co.id/api/auto-layout/form/form-dynamic?code=",E="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",_=t.ref(n.layoutCode),B=t.computed(()=>{var H;if(!p.value)return"";const T=((H=d==null?void 0:d.value)==null?void 0:H.toLowerCase())||"en";return(T==="en"||T.startsWith("en-")?p.value.titleEN:p.value.titleID)||p.value.title||n.layoutCode});t.watch(B,T=>{T&&f(T)},{immediate:!0});const A=(T,I="")=>{const H={};return!T||typeof T!="object"||Object.keys(T).forEach(q=>{const W=T[q],Z=I?`${I}.${q}`:q;W&&typeof W=="object"&&!Array.isArray(W)&&!(W instanceof Date)&&Object.assign(H,A(W,Z)),H[Z]=W}),H},C=T=>{var W;if(!T||typeof T!="string"||T.startsWith("http"))return T;const I=(W=n.selectedTokenCore)==null?void 0:W.address;if(!I)return T;const H=I.replace(/\/$/,""),q=T.startsWith("/")?T:`/${T}`;return`${H}${q}`},x=async()=>{var T,I,H,q,W,Z;y.value=!0;try{let te=n.layoutCode;s&&s.query&&typeof s.query=="object"&&"code"in s.query&&(te=s.query.code||n.layoutCode);const xe="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",Se=xe?{Authorization:`Bearer ${xe}`}:{},ye=C(`${g}${te}`);let Q=await l(ye,"GET",null,Se);if(!Q.status||!Q.data||Array.isArray(Q.data)&&Q.data.length===0)try{const j=C(`${E}${te}`),Y=await l(j,"GET",null,Se);if(Y.status){const ae=Array.isArray(Y.data)?Y.data[0]:Y.data;ae&&ae.code&&(te=ae.code,_.value=te,Q=await l(C(`${g}${te}`),"GET",null,Se))}}catch(j){console.warn("Failed to resolve layout code via datatable",j)}if(Q.status){p.value=Array.isArray(Q.data)?Q.data[0]:Q.data;const j={};if((T=p.value)!=null&&T.sections&&p.value.sections.forEach(Y=>{((Y.propsForm||Y.props||{}).fields||Y.fields||[]).forEach(Oe=>{var We;const _e=Oe.model||((We=Oe.props)==null?void 0:We.model)||Oe.key;_e&&(j[_e]=null)})}),m.value=j,y.value=!1,u.value&&h.value){b.value=!0;try{const Y=(q=(H=(I=p.value.sections)==null?void 0:I[0])==null?void 0:H.propsForm)==null?void 0:q.endpointForm,ae=p.value.endpointForm,ke=Y||ae;if(ke!=null&&ke.apiUrl){const Oe=ke.apiUrl,_e=ke.apiMethod||"GET",We=ke.keyParam||[],Fe={};We.length>0?We.forEach(Re=>{Fe[Re]=h.value}):Fe.id=h.value;const se=await c(C(Oe),_e,Fe);if(console.log(`[AutoLayoutForm] API Result for ${Oe}:`,se),se.status){let Re=Array.isArray(se.data)?se.data[0]:se.data;se.payload&&(Re={...Re,...se.payload}),console.log("[AutoLayoutForm] Successfully fetched record:",Re);const Le=A(Re);m.value={...m.value,...Re,...Le},console.log("[AutoLayoutForm] Updated initialData:",m.value)}else console.warn("[AutoLayoutForm] Record API returned status: false",se)}else if((W=p.value.endpointGlobal)!=null&&W.apiUrl){const Oe=p.value.endpointGlobal.apiUrl,_e=p.value.endpointGlobal.apiMethod||"GET",We={id:h.value},Fe=await c(C(Oe),_e,We);if(Fe.status){const se=Array.isArray(Fe.data)?Fe.data[0]:Fe.data,Re=A(se);m.value={...m.value,...se,...Re}}}else{const Oe=((Z=p.value.endpoint)==null?void 0:Z.detailUrl)||`/api/${_.value}/detail/${h.value}`,_e=await l(C(Oe),"GET");if(_e.status){let We=Array.isArray(_e.data)?_e.data[0]:_e.data;if(_e.payload){const Re={..._e.payload};if(Object.keys(Re).forEach(Le=>{We[Le]!==void 0&&We[Le]!==null&&(Re[Le]=We[Le])}),!("id"in Re)&&We.id){const Le=Object.keys(Re).find(De=>De.startsWith("id")&&De.length>2&&!Re[De]);Le&&(Re[Le]=We.id)}We=Re}const Fe={...We};Object.keys(m.value).forEach(Re=>{if(Fe[Re]===void 0||Fe[Re]===null){if(Re.toLowerCase().startsWith("id")&&Re.length>2){const De=Re.substring(2).toLowerCase(),ct=Array.isArray(_e.data)?_e.data[0]:_e.data,G=Object.keys(ct).find(ie=>ie.toLowerCase()===De);G&&ct[G]&&typeof ct[G]=="object"&&"id"in ct[G]&&(Fe[Re]=ct[G].id)}if(Re==="idSupervisor"){const De=Array.isArray(_e.data)?_e.data[0]:_e.data;De.supervisorId&&(Fe[Re]=De.supervisorId)}}});const se=A(Fe);m.value={...m.value,...Fe,...se}}}}catch(Y){console.error("Failed to fetch record data:",Y)}finally{b.value=!1}}}}catch(te){console.error("Failed to load form layout:",te),y.value=!1}},k=T=>{const I=Object.keys(m.value||{}).filter(q=>m.value[q]!==null&&m.value[q]!==void 0),H=Object.keys(T||{}).filter(q=>T[q]!==null&&T[q]!==void 0);if(I.length>3&&H.length<I.length/2){console.warn('[AutoLayoutForm] Circuit breaker triggered: Ignoring likely erroneous "empty" update from child.',{currentCount:I.length,incomingCount:H.length,data:T});return}console.log("[AutoLayoutForm] Allowing model update:",T),m.value=T,r("update:model",T)},N=async T=>{var I,H,q;try{const W=(q=(H=(I=p.value.sections)==null?void 0:I[0])==null?void 0:H.propsForm)==null?void 0:q.endpointForm,Z=p.value.endpointGlobal||p.value.endpoint,te=(W==null?void 0:W.submitUrl)||(Z==null?void 0:Z.submitUrl)||`/api/generic/${n.layoutCode}`,xe=(W==null?void 0:W.submitMethod)||(Z==null?void 0:Z.submitMethod)||(u.value?"PUT":"POST"),Se=Object.values(T).some(Q=>Q instanceof File||Q instanceof Blob);let ye;Se?(ye=new FormData,Object.keys(T).forEach(Q=>{const j=T[Q];j!=null&&(Array.isArray(j)?j.forEach(Y=>ye.append(`${Q}[]`,Y)):ye.append(Q,j))})):(ye={...T},u.value&&h.value&&!ye.id&&(ye.id=h.value)),await l(C(te),xe,ye),r("submit-success",ye),i.back()}catch(W){console.error("Submit failed:",W)}},w=async(T,I,H)=>{if(T==="cancel"){v();return}const q=I.endpointPropAction||I.propsActionGlobal&&I.propsActionGlobal.endpointPropAction;if(q)try{y.value=!0;const W=H?{...H}:{...m.value};u.value&&I.model&&h.value&&(W[I.model]=h.value);const Z=q.apiUrl,te=q.apiMethod||"POST";(await c(C(Z),te,W)).status&&(r("action-success",T,I,W),i.back())}catch(W){console.error("Action failed:",W)}finally{y.value=!1}},v=()=>{r("cancel"),i.back()};return t.onMounted(()=>{x()}),t.watch(()=>n.model,T=>{T&&Object.keys(T).length>0&&(m.value={...m.value,...T})},{immediate:!0,deep:!0}),t.onUnmounted(()=>{f("")}),(T,I)=>(t.openBlock(),t.createElementBlock("div",oN,[t.createElementVNode("div",nN,[t.createVNode(t.Transition,{name:"fade",mode:"out-in"},{default:t.withCtx(()=>[!y.value&&p.value?(t.openBlock(),t.createElementBlock("div",rN,[t.createElementVNode("div",aN,[t.createElementVNode("p",sN,t.toDisplayString(p.value.description),1)]),t.createVNode(Ai,{schema:p.value,model:m.value,"is-edit-mode":u.value,loading:b.value,"selected-token-core":n.selectedTokenCore,router:t.unref(i),"onUpdate:model":I[0]||(I[0]=H=>k(H)),onSubmit:N,onCancel:v,onAction:w,class:"w-full"},null,8,["schema","model","is-edit-mode","loading","selected-token-core","router"])])):y.value?(t.openBlock(),t.createElementBlock("div",iN,[t.createVNode(tN)])):(t.openBlock(),t.createElementBlock("div",lN," Failed to load form configuration for "+t.toDisplayString(n.layoutCode),1))]),_:1})])]))}}),[["__scopeId","data-v-fa0a05fb"]]),cN={class:"h-full flex flex-col"},dN={key:1,class:"flex-1 flex items-center justify-center"},fN={key:2,class:"flex-1 flex items-center justify-center text-red-500"},Di=t.defineComponent({name:"AutoLayoutDatatable",__name:"AutoLayoutDatatable",props:{layoutCode:{},userPermissions:{},permissionBase:{},checkPermission:{type:Function}},emits:["action","navigate"],setup(e,{emit:o}){var A,C,x,k,N,w;const n=e,r=o,a=t.getCurrentInstance(),{apiUrl:s}=Je();let i={query:{},params:{},path:""};try{const v=_o.useRoute();v?i=v:(x=(C=(A=a==null?void 0:a.appContext)==null?void 0:A.config)==null?void 0:C.globalProperties)!=null&&x.$route&&(i=a.appContext.config.globalProperties.$route)}catch{console.warn("useRoute not available, using fallback")}let l={back:()=>{typeof window<"u"&&window.history&&window.history.length>1&&window.history.back()},push:v=>{typeof window<"u"&&(typeof v=="string"?window.location.href=v:v&&v.path&&(window.location.href=v.path))}};try{const v=_o.useRouter();v?l=v:(w=(N=(k=a==null?void 0:a.appContext)==null?void 0:k.config)==null?void 0:N.globalProperties)!=null&&w.$router&&(l=a.appContext.config.globalProperties.$router)}catch{console.warn("useRouter not available, using fallback")}const c=t.inject("hasActionAccess",()=>!1),d=t.inject("userPermissions",null),f=t.ref(null),u=t.ref(!0),h=t.ref(null),m="https://dcodedynamic.skyworx.co.id/api/auto-layout/datatable/form-dynamic?code=",p=t.computed(()=>`${m}${n.layoutCode}`),{setPageTitle:y}=du();let b;try{b=_t.useI18n().locale}catch{b=t.ref("en")}const g=()=>{if(f.value){const S=(b.value==="id"?f.value.titleID:f.value.titleEN)||f.value.title||"Datatable";y(S)}};t.watch(b,()=>{g()});const E=async()=>{u.value=!0;try{const v="eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJDQkFTIiwiaWF0IjoxNzcyNDU5MzQ0LCJkYXRlIjoiMDIwMzIwMjYiLCJjb2RlIjoidGVzdGVyIiwidXJsRm9ybSI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvZm9ybSIsInVybEFjdGlvbiI6Ii9hcGkvY2Jhcy9lbmRwb2ludHMvYWN0aW9uIiwidXJsRGF0YXRhYmxlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9kYXRhdGFibGUiLCJ1cmxQYXRoIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9wYXRoIiwidXJsUmVmZXJhbmNlIjoiL2FwaS9jYmFzL2VuZHBvaW50cy9yZWZlcmVuY2UifQ.JGIUTL0GEAp34zanY6dqLKg7jOLHwKzataY271JStsE",S=v?{Authorization:`Bearer ${v}`}:{},D=await s(p.value,"GET",null,S);D.status&&(f.value=Array.isArray(D.data)?D.data[0]:D.data,console.log("[DEBUG] AutoLayoutDatatable config loaded:",f.value),g())}catch(v){console.error("Gagal Menampilkan Datatable:",v)}finally{u.value=!1}},_=v=>{v.action==="add"&&console.log("[AutoLayoutDatatable] Add action triggered"),console.log("Aksi:",v.action,v)},B=v=>{console.log("[DEBUG] AutoLayoutDatatable handleNavigate:",v);let S=v.route;const D=v.path;if(!S&&D){const R=((i==null?void 0:i.path)||"").split("/");R.length>=2&&(S=`/${R[1]}/create`)}if(S||D){const V={...v.query||{},code:D||void 0};Object.keys(V).forEach(R=>V[R]===void 0&&delete V[R]),console.log("[DEBUG] Emitting navigate to parent:",{route:S,query:V}),r("navigate",{route:S||"/form",query:V}),l&&!l.__isFallback&&l.push({path:S||"/form",query:V})}else console.warn("[DEBUG] No route or path provided for navigation")};return t.onMounted(()=>{E()}),(v,S)=>(t.openBlock(),t.createElementBlock("div",cN,[!u.value&&f.value?(t.openBlock(),t.createBlock(kn,{key:0,ref_key:"dtRef",ref:h,"api-url":p.value,"api-method":"GET","table-config":f.value,"permission-base":n.permissionBase||"","dummy-mode":["datatable-create","datatable-edit"].includes(n.layoutCode),"user-permissions":n.userPermissions||t.unref(d),"permission-checker":t.unref(c),checkPermission:n.checkPermission,onAction:_,onNavigate:B},{"header-actions":t.withCtx(()=>[...S[0]||(S[0]=[])]),_:1},8,["api-url","table-config","permission-base","dummy-mode","user-permissions","permission-checker","checkPermission"])):u.value?(t.openBlock(),t.createElementBlock("div",dN,[...S[1]||(S[1]=[t.createElementVNode("i",{class:"mdi mdi-loading mdi-spin text-4xl text-primary-600"},null,-1)])])):(t.openBlock(),t.createElementBlock("div",fN," Failed to load configuration for "+t.toDisplayString(n.layoutCode),1))]))}}),fu=t.defineCustomElement(vi),uu=t.defineCustomElement(Di);typeof customElements<"u"&&(customElements.get("micro-dynamic-form")||customElements.define("micro-dynamic-form",fu),customElements.get("micro-dynamic-datatable")||customElements.define("micro-dynamic-datatable",uu));const uN=[ur,cl,He,Jo,cs,ds,Of,io,Qs,Zs,sa,lo,Ff,ia,zf,si,ei,$f,li,la,ci,Wo,di,ca,jf,Uf,fi,ui,da,fa,on,hn,Gf,Kf,hi,mi,pi,_i,mn,gi,kn,vi,Di,Ai,cu,pn],hu={install(e,o={}){o&&Object.keys(o).length>0&&$i(o),uN.forEach(n=>{n.name&&e.component(n.name,n)})}};de.AutoLayoutDatatable=Di,de.AutoLayoutForm=vi,de.Breadcrumb=cu,de.DCodeAutoComplete=ur,de.DCodeBadge=_i,de.DCodeBeforeAfter=cs,de.DCodeButton=He,de.DCodeCard=Jo,de.DCodeCardCheckboxList=Qs,de.DCodeChart=Of,de.DCodeCheckbox=io,de.DCodeCurrencyField=Zs,de.DCodeDatePicker=sa,de.DCodeDialog=lo,de.DCodeDialogCloseBtn=Ff,de.DCodeDropzone=ia,de.DCodeDynamicUploadList=ei,de.DCodeFileField=zf,de.DCodeFileResult=si,de.DCodeIconDropdown=$f,de.DCodeImageCropperDialog=li,de.DCodeImageField=la,de.DCodeImageResult=ci,de.DCodeInfiniteAutoComplete=cl,de.DCodeLabel=Wo,de.DCodeListLabels=ds,de.DCodeMultiSelect=di,de.DCodeOtpInput=ca,de.DCodePermissionMenu=mi,de.DCodeProgress=jf,de.DCodeProgressBar=Uf,de.DCodeRadio=fi,de.DCodeRadioCustom=ui,de.DCodeSlider=da,de.DCodeStaticImage=gi,de.DCodeStaticLabel=mn,de.DCodeSwitch=fa,de.DCodeTextField=on,de.DCodeTextarea=hn,de.DCodeTimelineWithIcons=Gf,de.DCodeTreePermissions=pi,de.DCodeUploadFile=Kf,de.DCodeWizard=hi,de.DataTable=kn,de.DataTableComponent=kn,de.DynamicForm=Ai,de.DynamicFormField=pn,de.DynamicUI=hu,de.MicroDynamicDatatable=uu,de.MicroDynamicForm=fu,de.cn=Te,de.default=hu,de.setApiConfig=$i,Object.defineProperties(de,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|