var pO = Object.defineProperty;
var Ag = (e) => {
  throw TypeError(e);
};
var hO = (e, t, n) => t in e ? pO(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var qe = (e, t, n) => hO(e, typeof t != "symbol" ? t + "" : t, n), mp = (e, t, n) => t.has(e) || Ag("Cannot " + n);
var Ji = (e, t, n) => (mp(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ol = (e, t, n) => t.has(e) ? Ag("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), vp = (e, t, n, s) => (mp(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n), Mg = (e, t, n) => (mp(e, t, "access private method"), n);
var Ib = {};
/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function bn(e) {
  const t = /* @__PURE__ */ Object.create(null);
  for (const n of e.split(",")) t[n] = 1;
  return (n) => n in t;
}
const ut = Ib.NODE_ENV !== "production" ? Object.freeze({}) : {}, yi = Ib.NODE_ENV !== "production" ? Object.freeze([]) : [], Gt = () => {
}, da = () => !1, wo = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), Xl = (e) => e.startsWith("onUpdate:"), st = Object.assign, Qd = (e, t) => {
  const n = e.indexOf(t);
  n > -1 && e.splice(n, 1);
}, mO = Object.prototype.hasOwnProperty, Et = (e, t) => mO.call(e, t), Ne = Array.isArray, Lr = (e) => Hi(e) === "[object Map]", Xr = (e) => Hi(e) === "[object Set]", fh = (e) => Hi(e) === "[object Date]", Rb = (e) => Hi(e) === "[object RegExp]", Le = (e) => typeof e == "function", We = (e) => typeof e == "string", ns = (e) => typeof e == "symbol", ft = (e) => e !== null && typeof e == "object", Nc = (e) => (ft(e) || Le(e)) && Le(e.then) && Le(e.catch), km = Object.prototype.toString, Hi = (e) => km.call(e), Zd = (e) => Hi(e).slice(8, -1), Oc = (e) => Hi(e) === "[object Object]", ef = (e) => We(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Zo = /* @__PURE__ */ bn(
  // the leading comma is intentional so empty string "" is also included
  ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
), Dm = /* @__PURE__ */ bn(
  "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
), tf = (e) => {
  const t = /* @__PURE__ */ Object.create(null);
  return (n) => t[n] || (t[n] = e(n));
}, vO = /-(\w)/g, Lt = tf(
  (e) => e.replace(vO, (t, n) => n ? n.toUpperCase() : "")
), gO = /\B([A-Z])/g, Mn = tf(
  (e) => e.replace(gO, "-$1").toLowerCase()
), so = tf((e) => e.charAt(0).toUpperCase() + e.slice(1)), zs = tf(
  (e) => e ? `on${so(e)}` : ""
), Fn = (e, t) => !Object.is(e, t), Wo = (e, ...t) => {
  for (let n = 0; n < e.length; n++)
    e[n](...t);
}, Ci = (e, t, n, s = !1) => {
  Object.defineProperty(e, t, {
    configurable: !0,
    enumerable: !1,
    writable: s,
    value: n
  });
}, ql = (e) => {
  const t = parseFloat(e);
  return isNaN(t) ? e : t;
}, Jl = (e) => {
  const t = We(e) ? Number(e) : NaN;
  return isNaN(t) ? e : t;
};
let Pg;
const Ha = () => Pg || (Pg = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {}), yO = /^[_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*$/;
function _O(e) {
  return yO.test(e) ? `__props.${e}` : `__props[${JSON.stringify(e)}]`;
}
function bO(e, t) {
  return e + JSON.stringify(
    t,
    (n, s) => typeof s == "function" ? s.toString() : s
  );
}
const EO = {
  TEXT: 1,
  1: "TEXT",
  CLASS: 2,
  2: "CLASS",
  STYLE: 4,
  4: "STYLE",
  PROPS: 8,
  8: "PROPS",
  FULL_PROPS: 16,
  16: "FULL_PROPS",
  NEED_HYDRATION: 32,
  32: "NEED_HYDRATION",
  STABLE_FRAGMENT: 64,
  64: "STABLE_FRAGMENT",
  KEYED_FRAGMENT: 128,
  128: "KEYED_FRAGMENT",
  UNKEYED_FRAGMENT: 256,
  256: "UNKEYED_FRAGMENT",
  NEED_PATCH: 512,
  512: "NEED_PATCH",
  DYNAMIC_SLOTS: 1024,
  1024: "DYNAMIC_SLOTS",
  DEV_ROOT_FRAGMENT: 2048,
  2048: "DEV_ROOT_FRAGMENT",
  CACHED: -1,
  "-1": "CACHED",
  BAIL: -2,
  "-2": "BAIL"
}, kl = {
  1: "TEXT",
  2: "CLASS",
  4: "STYLE",
  8: "PROPS",
  16: "FULL_PROPS",
  32: "NEED_HYDRATION",
  64: "STABLE_FRAGMENT",
  128: "KEYED_FRAGMENT",
  256: "UNKEYED_FRAGMENT",
  512: "NEED_PATCH",
  1024: "DYNAMIC_SLOTS",
  2048: "DEV_ROOT_FRAGMENT",
  [-1]: "HOISTED",
  [-2]: "BAIL"
}, SO = {
  ELEMENT: 1,
  1: "ELEMENT",
  FUNCTIONAL_COMPONENT: 2,
  2: "FUNCTIONAL_COMPONENT",
  STATEFUL_COMPONENT: 4,
  4: "STATEFUL_COMPONENT",
  TEXT_CHILDREN: 8,
  8: "TEXT_CHILDREN",
  ARRAY_CHILDREN: 16,
  16: "ARRAY_CHILDREN",
  SLOTS_CHILDREN: 32,
  32: "SLOTS_CHILDREN",
  TELEPORT: 64,
  64: "TELEPORT",
  SUSPENSE: 128,
  128: "SUSPENSE",
  COMPONENT_SHOULD_KEEP_ALIVE: 256,
  256: "COMPONENT_SHOULD_KEEP_ALIVE",
  COMPONENT_KEPT_ALIVE: 512,
  512: "COMPONENT_KEPT_ALIVE",
  COMPONENT: 6,
  6: "COMPONENT"
}, wO = {
  STABLE: 1,
  1: "STABLE",
  DYNAMIC: 2,
  2: "DYNAMIC",
  FORWARDED: 3,
  3: "FORWARDED"
}, Ab = {
  1: "STABLE",
  2: "DYNAMIC",
  3: "FORWARDED"
}, NO = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol", Im = /* @__PURE__ */ bn(NO), OO = Im, Vg = 2;
function Mb(e, t = 0, n = e.length) {
  if (t = Math.max(0, Math.min(t, e.length)), n = Math.max(0, Math.min(n, e.length)), t > n) return "";
  let s = e.split(/(\r?\n)/);
  const o = s.filter((a, l) => l % 2 === 1);
  s = s.filter((a, l) => l % 2 === 0);
  let i = 0;
  const r = [];
  for (let a = 0; a < s.length; a++)
    if (i += s[a].length + (o[a] && o[a].length || 0), i >= t) {
      for (let l = a - Vg; l <= a + Vg || n > i; l++) {
        if (l < 0 || l >= s.length) continue;
        const c = l + 1;
        r.push(
          `${c}${" ".repeat(Math.max(3 - String(c).length, 0))}|  ${s[l]}`
        );
        const d = s[l].length, f = o[l] && o[l].length || 0;
        if (l === a) {
          const p = t - (i - (d + f)), h = Math.max(
            1,
            n > i ? d - p : n - t
          );
          r.push("   |  " + " ".repeat(p) + "^".repeat(h));
        } else if (l > a) {
          if (n > i) {
            const p = Math.max(Math.min(n - i, d), 1);
            r.push("   |  " + "^".repeat(p));
          }
          i += d + f;
        }
      }
      break;
    }
  return r.join(`
`);
}
function fs(e) {
  if (Ne(e)) {
    const t = {};
    for (let n = 0; n < e.length; n++) {
      const s = e[n], o = We(s) ? Rm(s) : fs(s);
      if (o)
        for (const i in o)
          t[i] = o[i];
    }
    return t;
  } else if (We(e) || ft(e))
    return e;
}
const xO = /;(?![^(]*\))/g, CO = /:([^]+)/, TO = /\/\*[^]*?\*\//g;
function Rm(e) {
  const t = {};
  return e.replace(TO, "").split(xO).forEach((n) => {
    if (n) {
      const s = n.split(CO);
      s.length > 1 && (t[s[0].trim()] = s[1].trim());
    }
  }), t;
}
function Pb(e) {
  if (!e) return "";
  if (We(e)) return e;
  let t = "";
  for (const n in e) {
    const s = e[n];
    if (We(s) || typeof s == "number") {
      const o = n.startsWith("--") ? n : Mn(n);
      t += `${o}:${s};`;
    }
  }
  return t;
}
function Te(e) {
  let t = "";
  if (We(e))
    t = e;
  else if (Ne(e))
    for (let n = 0; n < e.length; n++) {
      const s = Te(e[n]);
      s && (t += s + " ");
    }
  else if (ft(e))
    for (const n in e)
      e[n] && (t += n + " ");
  return t.trim();
}
function Ft(e) {
  if (!e) return null;
  let { class: t, style: n } = e;
  return t && !We(t) && (e.class = Te(t)), n && (e.style = fs(n)), e;
}
const $O = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", kO = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", DO = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", IO = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr", Am = /* @__PURE__ */ bn($O), Mm = /* @__PURE__ */ bn(kO), Pm = /* @__PURE__ */ bn(DO), Vb = /* @__PURE__ */ bn(IO), Lb = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", Fb = /* @__PURE__ */ bn(Lb), ph = /* @__PURE__ */ bn(
  Lb + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected"
);
function nf(e) {
  return !!e || e === "";
}
const RO = /[>/="'\u0009\u000a\u000c\u0020]/, gp = {};
function AO(e) {
  if (gp.hasOwnProperty(e))
    return gp[e];
  const t = RO.test(e);
  return t && console.error(`unsafe attribute name: ${e}`), gp[e] = !t;
}
const MO = {
  acceptCharset: "accept-charset",
  className: "class",
  htmlFor: "for",
  httpEquiv: "http-equiv"
}, Ub = /* @__PURE__ */ bn(
  "accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap"
), jb = /* @__PURE__ */ bn(
  "xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan"
), PO = /* @__PURE__ */ bn(
  "accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns"
);
function Bb(e) {
  if (e == null)
    return !1;
  const t = typeof e;
  return t === "string" || t === "number" || t === "boolean";
}
const VO = /["'&<>]/;
function LO(e) {
  const t = "" + e, n = VO.exec(t);
  if (!n)
    return t;
  let s = "", o, i, r = 0;
  for (i = n.index; i < t.length; i++) {
    switch (t.charCodeAt(i)) {
      case 34:
        o = "&quot;";
        break;
      case 38:
        o = "&amp;";
        break;
      case 39:
        o = "&#39;";
        break;
      case 60:
        o = "&lt;";
        break;
      case 62:
        o = "&gt;";
        break;
      default:
        continue;
    }
    r !== i && (s += t.slice(r, i)), r = i + 1, s += o;
  }
  return r !== i ? s + t.slice(r, i) : s;
}
const FO = /^-?>|<!--|-->|--!>|<!-$/g;
function UO(e) {
  return e.replace(FO, "");
}
const Hb = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g;
function Yb(e, t) {
  return e.replace(
    Hb,
    (n) => t ? n === '"' ? '\\\\\\"' : `\\\\${n}` : `\\${n}`
  );
}
function jO(e, t) {
  if (e.length !== t.length) return !1;
  let n = !0;
  for (let s = 0; n && s < e.length; s++)
    n = or(e[s], t[s]);
  return n;
}
function or(e, t) {
  if (e === t) return !0;
  let n = fh(e), s = fh(t);
  if (n || s)
    return n && s ? e.getTime() === t.getTime() : !1;
  if (n = ns(e), s = ns(t), n || s)
    return e === t;
  if (n = Ne(e), s = Ne(t), n || s)
    return n && s ? jO(e, t) : !1;
  if (n = ft(e), s = ft(t), n || s) {
    if (!n || !s)
      return !1;
    const o = Object.keys(e).length, i = Object.keys(t).length;
    if (o !== i)
      return !1;
    for (const r in e) {
      const a = e.hasOwnProperty(r), l = t.hasOwnProperty(r);
      if (a && !l || !a && l || !or(e[r], t[r]))
        return !1;
    }
  }
  return String(e) === String(t);
}
function xc(e, t) {
  return e.findIndex((n) => or(n, t));
}
const Wb = (e) => !!(e && e.__v_isRef === !0), H = (e) => We(e) ? e : e == null ? "" : Ne(e) || ft(e) && (e.toString === km || !Le(e.toString)) ? Wb(e) ? H(e.value) : JSON.stringify(e, Gb, 2) : String(e), Gb = (e, t) => Wb(t) ? Gb(e, t.value) : Lr(t) ? {
  [`Map(${t.size})`]: [...t.entries()].reduce(
    (n, [s, o], i) => (n[yp(s, i) + " =>"] = o, n),
    {}
  )
} : Xr(t) ? {
  [`Set(${t.size})`]: [...t.values()].map((n) => yp(n))
} : ns(t) ? yp(t) : ft(t) && !Ne(t) && !Oc(t) ? String(t) : t, yp = (e, t = "") => {
  var n;
  return (
    // Symbol.description in es2019+ so we need to cast here to pass
    // the lib: es2016 check
    ns(e) ? `Symbol(${(n = e.description) != null ? n : t})` : e
  );
}, BO = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  EMPTY_ARR: yi,
  EMPTY_OBJ: ut,
  NO: da,
  NOOP: Gt,
  PatchFlagNames: kl,
  PatchFlags: EO,
  ShapeFlags: SO,
  SlotFlags: wO,
  camelize: Lt,
  capitalize: so,
  cssVarNameEscapeSymbolsRE: Hb,
  def: Ci,
  escapeHtml: LO,
  escapeHtmlComment: UO,
  extend: st,
  genCacheKey: bO,
  genPropsAccessExp: _O,
  generateCodeFrame: Mb,
  getEscapedCssVarName: Yb,
  getGlobalThis: Ha,
  hasChanged: Fn,
  hasOwn: Et,
  hyphenate: Mn,
  includeBooleanAttr: nf,
  invokeArrayFns: Wo,
  isArray: Ne,
  isBooleanAttr: ph,
  isBuiltInDirective: Dm,
  isDate: fh,
  isFunction: Le,
  isGloballyAllowed: Im,
  isGloballyWhitelisted: OO,
  isHTMLTag: Am,
  isIntegerKey: ef,
  isKnownHtmlAttr: Ub,
  isKnownMathMLAttr: PO,
  isKnownSvgAttr: jb,
  isMap: Lr,
  isMathMLTag: Pm,
  isModelListener: Xl,
  isObject: ft,
  isOn: wo,
  isPlainObject: Oc,
  isPromise: Nc,
  isRegExp: Rb,
  isRenderableAttrValue: Bb,
  isReservedProp: Zo,
  isSSRSafeAttrName: AO,
  isSVGTag: Mm,
  isSet: Xr,
  isSpecialBooleanAttr: Fb,
  isString: We,
  isSymbol: ns,
  isVoidTag: Vb,
  looseEqual: or,
  looseIndexOf: xc,
  looseToNumber: ql,
  makeMap: bn,
  normalizeClass: Te,
  normalizeProps: Ft,
  normalizeStyle: fs,
  objectToString: km,
  parseStringStyle: Rm,
  propsToAttrMap: MO,
  remove: Qd,
  slotFlagsText: Ab,
  stringifyStyle: Pb,
  toDisplayString: H,
  toHandlerKey: zs,
  toNumber: Jl,
  toRawType: Zd,
  toTypeString: Hi
}, Symbol.toStringTag, { value: "Module" }));
var It = {};
function Ms(e, ...t) {
  console.warn(`[Vue warn] ${e}`, ...t);
}
let Jn;
class Vm {
  constructor(t = !1) {
    this.detached = t, this._active = !0, this.effects = [], this.cleanups = [], this._isPaused = !1, this.parent = Jn, !t && Jn && (this.index = (Jn.scopes || (Jn.scopes = [])).push(
      this
    ) - 1);
  }
  get active() {
    return this._active;
  }
  pause() {
    if (this._active) {
      this._isPaused = !0;
      let t, n;
      if (this.scopes)
        for (t = 0, n = this.scopes.length; t < n; t++)
          this.scopes[t].pause();
      for (t = 0, n = this.effects.length; t < n; t++)
        this.effects[t].pause();
    }
  }
  /**
   * Resumes the effect scope, including all child scopes and effects.
   */
  resume() {
    if (this._active && this._isPaused) {
      this._isPaused = !1;
      let t, n;
      if (this.scopes)
        for (t = 0, n = this.scopes.length; t < n; t++)
          this.scopes[t].resume();
      for (t = 0, n = this.effects.length; t < n; t++)
        this.effects[t].resume();
    }
  }
  run(t) {
    if (this._active) {
      const n = Jn;
      try {
        return Jn = this, t();
      } finally {
        Jn = n;
      }
    } else It.NODE_ENV !== "production" && Ms("cannot run an inactive effect scope.");
  }
  /**
   * This should only be called on non-detached scopes
   * @internal
   */
  on() {
    Jn = this;
  }
  /**
   * This should only be called on non-detached scopes
   * @internal
   */
  off() {
    Jn = this.parent;
  }
  stop(t) {
    if (this._active) {
      this._active = !1;
      let n, s;
      for (n = 0, s = this.effects.length; n < s; n++)
        this.effects[n].stop();
      for (this.effects.length = 0, n = 0, s = this.cleanups.length; n < s; n++)
        this.cleanups[n]();
      if (this.cleanups.length = 0, this.scopes) {
        for (n = 0, s = this.scopes.length; n < s; n++)
          this.scopes[n].stop(!0);
        this.scopes.length = 0;
      }
      if (!this.detached && this.parent && !t) {
        const o = this.parent.scopes.pop();
        o && o !== this && (this.parent.scopes[this.index] = o, o.index = this.index);
      }
      this.parent = void 0;
    }
  }
}
function Lm(e) {
  return new Vm(e);
}
function Fm() {
  return Jn;
}
function zb(e, t = !1) {
  Jn ? Jn.cleanups.push(e) : It.NODE_ENV !== "production" && !t && Ms(
    "onScopeDispose() is called when there is no active effect scope to be associated with."
  );
}
let Rt;
const _p = /* @__PURE__ */ new WeakSet();
class Ql {
  constructor(t) {
    this.fn = t, this.deps = void 0, this.depsTail = void 0, this.flags = 5, this.next = void 0, this.cleanup = void 0, this.scheduler = void 0, Jn && Jn.active && Jn.effects.push(this);
  }
  pause() {
    this.flags |= 64;
  }
  resume() {
    this.flags & 64 && (this.flags &= -65, _p.has(this) && (_p.delete(this), this.trigger()));
  }
  /**
   * @internal
   */
  notify() {
    this.flags & 2 && !(this.flags & 32) || this.flags & 8 || Xb(this);
  }
  run() {
    if (!(this.flags & 1))
      return this.fn();
    this.flags |= 2, Lg(this), qb(this);
    const t = Rt, n = no;
    Rt = this, no = !0;
    try {
      return this.fn();
    } finally {
      It.NODE_ENV !== "production" && Rt !== this && Ms(
        "Active effect was not restored correctly - this is likely a Vue internal bug."
      ), Jb(this), Rt = t, no = n, this.flags &= -3;
    }
  }
  stop() {
    if (this.flags & 1) {
      for (let t = this.deps; t; t = t.nextDep)
        Bm(t);
      this.deps = this.depsTail = void 0, Lg(this), this.onStop && this.onStop(), this.flags &= -2;
    }
  }
  trigger() {
    this.flags & 64 ? _p.add(this) : this.scheduler ? this.scheduler() : this.runIfDirty();
  }
  /**
   * @internal
   */
  runIfDirty() {
    hh(this) && this.run();
  }
  get dirty() {
    return hh(this);
  }
}
let Kb = 0, Dl, Il;
function Xb(e, t = !1) {
  if (e.flags |= 8, t) {
    e.next = Il, Il = e;
    return;
  }
  e.next = Dl, Dl = e;
}
function Um() {
  Kb++;
}
function jm() {
  if (--Kb > 0)
    return;
  if (Il) {
    let t = Il;
    for (Il = void 0; t; ) {
      const n = t.next;
      t.next = void 0, t.flags &= -9, t = n;
    }
  }
  let e;
  for (; Dl; ) {
    let t = Dl;
    for (Dl = void 0; t; ) {
      const n = t.next;
      if (t.next = void 0, t.flags &= -9, t.flags & 1)
        try {
          t.trigger();
        } catch (s) {
          e || (e = s);
        }
      t = n;
    }
  }
  if (e) throw e;
}
function qb(e) {
  for (let t = e.deps; t; t = t.nextDep)
    t.version = -1, t.prevActiveLink = t.dep.activeLink, t.dep.activeLink = t;
}
function Jb(e) {
  let t, n = e.depsTail, s = n;
  for (; s; ) {
    const o = s.prevDep;
    s.version === -1 ? (s === n && (n = o), Bm(s), HO(s)) : t = s, s.dep.activeLink = s.prevActiveLink, s.prevActiveLink = void 0, s = o;
  }
  e.deps = t, e.depsTail = n;
}
function hh(e) {
  for (let t = e.deps; t; t = t.nextDep)
    if (t.dep.version !== t.version || t.dep.computed && (Qb(t.dep.computed) || t.dep.version !== t.version))
      return !0;
  return !!e._dirty;
}
function Qb(e) {
  if (e.flags & 4 && !(e.flags & 16) || (e.flags &= -17, e.globalVersion === Zl))
    return;
  e.globalVersion = Zl;
  const t = e.dep;
  if (e.flags |= 2, t.version > 0 && !e.isSSR && e.deps && !hh(e)) {
    e.flags &= -3;
    return;
  }
  const n = Rt, s = no;
  Rt = e, no = !0;
  try {
    qb(e);
    const o = e.fn(e._value);
    (t.version === 0 || Fn(o, e._value)) && (e._value = o, t.version++);
  } catch (o) {
    throw t.version++, o;
  } finally {
    Rt = n, no = s, Jb(e), e.flags &= -3;
  }
}
function Bm(e, t = !1) {
  const { dep: n, prevSub: s, nextSub: o } = e;
  if (s && (s.nextSub = o, e.prevSub = void 0), o && (o.prevSub = s, e.nextSub = void 0), It.NODE_ENV !== "production" && n.subsHead === e && (n.subsHead = o), n.subs === e && (n.subs = s, !s && n.computed)) {
    n.computed.flags &= -5;
    for (let i = n.computed.deps; i; i = i.nextDep)
      Bm(i, !0);
  }
  !t && !--n.sc && n.map && n.map.delete(n.key);
}
function HO(e) {
  const { prevDep: t, nextDep: n } = e;
  t && (t.nextDep = n, e.prevDep = void 0), n && (n.prevDep = t, e.nextDep = void 0);
}
function YO(e, t) {
  e.effect instanceof Ql && (e = e.effect.fn);
  const n = new Ql(e);
  t && st(n, t);
  try {
    n.run();
  } catch (o) {
    throw n.stop(), o;
  }
  const s = n.run.bind(n);
  return s.effect = n, s;
}
function WO(e) {
  e.effect.stop();
}
let no = !0;
const Zb = [];
function cr() {
  Zb.push(no), no = !1;
}
function ur() {
  const e = Zb.pop();
  no = e === void 0 ? !0 : e;
}
function Lg(e) {
  const { cleanup: t } = e;
  if (e.cleanup = void 0, t) {
    const n = Rt;
    Rt = void 0;
    try {
      t();
    } finally {
      Rt = n;
    }
  }
}
let Zl = 0;
class GO {
  constructor(t, n) {
    this.sub = t, this.dep = n, this.version = n.version, this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
  }
}
class sf {
  constructor(t) {
    this.computed = t, this.version = 0, this.activeLink = void 0, this.subs = void 0, this.map = void 0, this.key = void 0, this.sc = 0, It.NODE_ENV !== "production" && (this.subsHead = void 0);
  }
  track(t) {
    if (!Rt || !no || Rt === this.computed)
      return;
    let n = this.activeLink;
    if (n === void 0 || n.sub !== Rt)
      n = this.activeLink = new GO(Rt, this), Rt.deps ? (n.prevDep = Rt.depsTail, Rt.depsTail.nextDep = n, Rt.depsTail = n) : Rt.deps = Rt.depsTail = n, e1(n);
    else if (n.version === -1 && (n.version = this.version, n.nextDep)) {
      const s = n.nextDep;
      s.prevDep = n.prevDep, n.prevDep && (n.prevDep.nextDep = s), n.prevDep = Rt.depsTail, n.nextDep = void 0, Rt.depsTail.nextDep = n, Rt.depsTail = n, Rt.deps === n && (Rt.deps = s);
    }
    return It.NODE_ENV !== "production" && Rt.onTrack && Rt.onTrack(
      st(
        {
          effect: Rt
        },
        t
      )
    ), n;
  }
  trigger(t) {
    this.version++, Zl++, this.notify(t);
  }
  notify(t) {
    Um();
    try {
      if (It.NODE_ENV !== "production")
        for (let n = this.subsHead; n; n = n.nextSub)
          n.sub.onTrigger && !(n.sub.flags & 8) && n.sub.onTrigger(
            st(
              {
                effect: n.sub
              },
              t
            )
          );
      for (let n = this.subs; n; n = n.prevSub)
        n.sub.notify() && n.sub.dep.notify();
    } finally {
      jm();
    }
  }
}
function e1(e) {
  if (e.dep.sc++, e.sub.flags & 4) {
    const t = e.dep.computed;
    if (t && !e.dep.subs) {
      t.flags |= 20;
      for (let s = t.deps; s; s = s.nextDep)
        e1(s);
    }
    const n = e.dep.subs;
    n !== e && (e.prevSub = n, n && (n.nextSub = e)), It.NODE_ENV !== "production" && e.dep.subsHead === void 0 && (e.dep.subsHead = e), e.dep.subs = e;
  }
}
const cd = /* @__PURE__ */ new WeakMap(), _i = Symbol(
  It.NODE_ENV !== "production" ? "Object iterate" : ""
), mh = Symbol(
  It.NODE_ENV !== "production" ? "Map keys iterate" : ""
), ec = Symbol(
  It.NODE_ENV !== "production" ? "Array iterate" : ""
);
function Sn(e, t, n) {
  if (no && Rt) {
    let s = cd.get(e);
    s || cd.set(e, s = /* @__PURE__ */ new Map());
    let o = s.get(n);
    o || (s.set(n, o = new sf()), o.map = s, o.key = n), It.NODE_ENV !== "production" ? o.track({
      target: e,
      type: t,
      key: n
    }) : o.track();
  }
}
function vo(e, t, n, s, o, i) {
  const r = cd.get(e);
  if (!r) {
    Zl++;
    return;
  }
  const a = (l) => {
    l && (It.NODE_ENV !== "production" ? l.trigger({
      target: e,
      type: t,
      key: n,
      newValue: s,
      oldValue: o,
      oldTarget: i
    }) : l.trigger());
  };
  if (Um(), t === "clear")
    r.forEach(a);
  else {
    const l = Ne(e), c = l && ef(n);
    if (l && n === "length") {
      const d = Number(s);
      r.forEach((f, p) => {
        (p === "length" || p === ec || !ns(p) && p >= d) && a(f);
      });
    } else
      switch ((n !== void 0 || r.has(void 0)) && a(r.get(n)), c && a(r.get(ec)), t) {
        case "add":
          l ? c && a(r.get("length")) : (a(r.get(_i)), Lr(e) && a(r.get(mh)));
          break;
        case "delete":
          l || (a(r.get(_i)), Lr(e) && a(r.get(mh)));
          break;
        case "set":
          Lr(e) && a(r.get(_i));
          break;
      }
  }
  jm();
}
function zO(e, t) {
  const n = cd.get(e);
  return n && n.get(t);
}
function Qi(e) {
  const t = He(e);
  return t === e ? t : (Sn(t, "iterate", ec), Wn(e) ? t : t.map(Un));
}
function of(e) {
  return Sn(e = He(e), "iterate", ec), e;
}
const KO = {
  __proto__: null,
  [Symbol.iterator]() {
    return bp(this, Symbol.iterator, Un);
  },
  concat(...e) {
    return Qi(this).concat(
      ...e.map((t) => Ne(t) ? Qi(t) : t)
    );
  },
  entries() {
    return bp(this, "entries", (e) => (e[1] = Un(e[1]), e));
  },
  every(e, t) {
    return Mo(this, "every", e, t, void 0, arguments);
  },
  filter(e, t) {
    return Mo(this, "filter", e, t, (n) => n.map(Un), arguments);
  },
  find(e, t) {
    return Mo(this, "find", e, t, Un, arguments);
  },
  findIndex(e, t) {
    return Mo(this, "findIndex", e, t, void 0, arguments);
  },
  findLast(e, t) {
    return Mo(this, "findLast", e, t, Un, arguments);
  },
  findLastIndex(e, t) {
    return Mo(this, "findLastIndex", e, t, void 0, arguments);
  },
  // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
  forEach(e, t) {
    return Mo(this, "forEach", e, t, void 0, arguments);
  },
  includes(...e) {
    return Ep(this, "includes", e);
  },
  indexOf(...e) {
    return Ep(this, "indexOf", e);
  },
  join(e) {
    return Qi(this).join(e);
  },
  // keys() iterator only reads `length`, no optimisation required
  lastIndexOf(...e) {
    return Ep(this, "lastIndexOf", e);
  },
  map(e, t) {
    return Mo(this, "map", e, t, void 0, arguments);
  },
  pop() {
    return rl(this, "pop");
  },
  push(...e) {
    return rl(this, "push", e);
  },
  reduce(e, ...t) {
    return Fg(this, "reduce", e, t);
  },
  reduceRight(e, ...t) {
    return Fg(this, "reduceRight", e, t);
  },
  shift() {
    return rl(this, "shift");
  },
  // slice could use ARRAY_ITERATE but also seems to beg for range tracking
  some(e, t) {
    return Mo(this, "some", e, t, void 0, arguments);
  },
  splice(...e) {
    return rl(this, "splice", e);
  },
  toReversed() {
    return Qi(this).toReversed();
  },
  toSorted(e) {
    return Qi(this).toSorted(e);
  },
  toSpliced(...e) {
    return Qi(this).toSpliced(...e);
  },
  unshift(...e) {
    return rl(this, "unshift", e);
  },
  values() {
    return bp(this, "values", Un);
  }
};
function bp(e, t, n) {
  const s = of(e), o = s[t]();
  return s !== e && !Wn(e) && (o._next = o.next, o.next = () => {
    const i = o._next();
    return i.value && (i.value = n(i.value)), i;
  }), o;
}
const XO = Array.prototype;
function Mo(e, t, n, s, o, i) {
  const r = of(e), a = r !== e && !Wn(e), l = r[t];
  if (l !== XO[t]) {
    const f = l.apply(e, i);
    return a ? Un(f) : f;
  }
  let c = n;
  r !== e && (a ? c = function(f, p) {
    return n.call(this, Un(f), p, e);
  } : n.length > 2 && (c = function(f, p) {
    return n.call(this, f, p, e);
  }));
  const d = l.call(r, c, s);
  return a && o ? o(d) : d;
}
function Fg(e, t, n, s) {
  const o = of(e);
  let i = n;
  return o !== e && (Wn(e) ? n.length > 3 && (i = function(r, a, l) {
    return n.call(this, r, a, l, e);
  }) : i = function(r, a, l) {
    return n.call(this, r, Un(a), l, e);
  }), o[t](i, ...s);
}
function Ep(e, t, n) {
  const s = He(e);
  Sn(s, "iterate", ec);
  const o = s[t](...n);
  return (o === -1 || o === !1) && Oa(n[0]) ? (n[0] = He(n[0]), s[t](...n)) : o;
}
function rl(e, t, n = []) {
  cr(), Um();
  const s = He(e)[t].apply(e, n);
  return jm(), ur(), s;
}
const qO = /* @__PURE__ */ bn("__proto__,__v_isRef,__isVue"), t1 = new Set(
  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ns)
);
function JO(e) {
  ns(e) || (e = String(e));
  const t = He(this);
  return Sn(t, "has", e), t.hasOwnProperty(e);
}
class n1 {
  constructor(t = !1, n = !1) {
    this._isReadonly = t, this._isShallow = n;
  }
  get(t, n, s) {
    if (n === "__v_skip") return t.__v_skip;
    const o = this._isReadonly, i = this._isShallow;
    if (n === "__v_isReactive")
      return !o;
    if (n === "__v_isReadonly")
      return o;
    if (n === "__v_isShallow")
      return i;
    if (n === "__v_raw")
      return s === (o ? i ? l1 : a1 : i ? i1 : r1).get(t) || // receiver is not the reactive proxy, but has the same prototype
      // this means the receiver is a user proxy of the reactive proxy
      Object.getPrototypeOf(t) === Object.getPrototypeOf(s) ? t : void 0;
    const r = Ne(t);
    if (!o) {
      let l;
      if (r && (l = KO[n]))
        return l;
      if (n === "hasOwnProperty")
        return JO;
    }
    const a = Reflect.get(
      t,
      n,
      // if this is a proxy wrapping a ref, return methods using the raw ref
      // as receiver so that we don't have to call `toRaw` on the ref in all
      // its class methods
      lt(t) ? t : s
    );
    return (ns(n) ? t1.has(n) : qO(n)) || (o || Sn(t, "get", n), i) ? a : lt(a) ? r && ef(n) ? a : a.value : ft(a) ? o ? af(a) : mt(a) : a;
  }
}
class s1 extends n1 {
  constructor(t = !1) {
    super(!1, t);
  }
  set(t, n, s, o) {
    let i = t[n];
    if (!this._isShallow) {
      const l = No(i);
      if (!Wn(s) && !No(s) && (i = He(i), s = He(s)), !Ne(t) && lt(i) && !lt(s))
        return l ? !1 : (i.value = s, !0);
    }
    const r = Ne(t) && ef(n) ? Number(n) < t.length : Et(t, n), a = Reflect.set(
      t,
      n,
      s,
      lt(t) ? t : o
    );
    return t === He(o) && (r ? Fn(s, i) && vo(t, "set", n, s, i) : vo(t, "add", n, s)), a;
  }
  deleteProperty(t, n) {
    const s = Et(t, n), o = t[n], i = Reflect.deleteProperty(t, n);
    return i && s && vo(t, "delete", n, void 0, o), i;
  }
  has(t, n) {
    const s = Reflect.has(t, n);
    return (!ns(n) || !t1.has(n)) && Sn(t, "has", n), s;
  }
  ownKeys(t) {
    return Sn(
      t,
      "iterate",
      Ne(t) ? "length" : _i
    ), Reflect.ownKeys(t);
  }
}
class o1 extends n1 {
  constructor(t = !1) {
    super(!0, t);
  }
  set(t, n) {
    return It.NODE_ENV !== "production" && Ms(
      `Set operation on key "${String(n)}" failed: target is readonly.`,
      t
    ), !0;
  }
  deleteProperty(t, n) {
    return It.NODE_ENV !== "production" && Ms(
      `Delete operation on key "${String(n)}" failed: target is readonly.`,
      t
    ), !0;
  }
}
const QO = /* @__PURE__ */ new s1(), ZO = /* @__PURE__ */ new o1(), ex = /* @__PURE__ */ new s1(!0), tx = /* @__PURE__ */ new o1(!0), vh = (e) => e, tu = (e) => Reflect.getPrototypeOf(e);
function nx(e, t, n) {
  return function(...s) {
    const o = this.__v_raw, i = He(o), r = Lr(i), a = e === "entries" || e === Symbol.iterator && r, l = e === "keys" && r, c = o[e](...s), d = n ? vh : t ? gh : Un;
    return !t && Sn(
      i,
      "iterate",
      l ? mh : _i
    ), {
      // iterator protocol
      next() {
        const { value: f, done: p } = c.next();
        return p ? { value: f, done: p } : {
          value: a ? [d(f[0]), d(f[1])] : d(f),
          done: p
        };
      },
      // iterable protocol
      [Symbol.iterator]() {
        return this;
      }
    };
  };
}
function nu(e) {
  return function(...t) {
    if (It.NODE_ENV !== "production") {
      const n = t[0] ? `on key "${t[0]}" ` : "";
      Ms(
        `${so(e)} operation ${n}failed: target is readonly.`,
        He(this)
      );
    }
    return e === "delete" ? !1 : e === "clear" ? void 0 : this;
  };
}
function sx(e, t) {
  const n = {
    get(o) {
      const i = this.__v_raw, r = He(i), a = He(o);
      e || (Fn(o, a) && Sn(r, "get", o), Sn(r, "get", a));
      const { has: l } = tu(r), c = t ? vh : e ? gh : Un;
      if (l.call(r, o))
        return c(i.get(o));
      if (l.call(r, a))
        return c(i.get(a));
      i !== r && i.get(o);
    },
    get size() {
      const o = this.__v_raw;
      return !e && Sn(He(o), "iterate", _i), Reflect.get(o, "size", o);
    },
    has(o) {
      const i = this.__v_raw, r = He(i), a = He(o);
      return e || (Fn(o, a) && Sn(r, "has", o), Sn(r, "has", a)), o === a ? i.has(o) : i.has(o) || i.has(a);
    },
    forEach(o, i) {
      const r = this, a = r.__v_raw, l = He(a), c = t ? vh : e ? gh : Un;
      return !e && Sn(l, "iterate", _i), a.forEach((d, f) => o.call(i, c(d), c(f), r));
    }
  };
  return st(
    n,
    e ? {
      add: nu("add"),
      set: nu("set"),
      delete: nu("delete"),
      clear: nu("clear")
    } : {
      add(o) {
        !t && !Wn(o) && !No(o) && (o = He(o));
        const i = He(this);
        return tu(i).has.call(i, o) || (i.add(o), vo(i, "add", o, o)), this;
      },
      set(o, i) {
        !t && !Wn(i) && !No(i) && (i = He(i));
        const r = He(this), { has: a, get: l } = tu(r);
        let c = a.call(r, o);
        c ? It.NODE_ENV !== "production" && Ug(r, a, o) : (o = He(o), c = a.call(r, o));
        const d = l.call(r, o);
        return r.set(o, i), c ? Fn(i, d) && vo(r, "set", o, i, d) : vo(r, "add", o, i), this;
      },
      delete(o) {
        const i = He(this), { has: r, get: a } = tu(i);
        let l = r.call(i, o);
        l ? It.NODE_ENV !== "production" && Ug(i, r, o) : (o = He(o), l = r.call(i, o));
        const c = a ? a.call(i, o) : void 0, d = i.delete(o);
        return l && vo(i, "delete", o, void 0, c), d;
      },
      clear() {
        const o = He(this), i = o.size !== 0, r = It.NODE_ENV !== "production" ? Lr(o) ? new Map(o) : new Set(o) : void 0, a = o.clear();
        return i && vo(
          o,
          "clear",
          void 0,
          void 0,
          r
        ), a;
      }
    }
  ), [
    "keys",
    "values",
    "entries",
    Symbol.iterator
  ].forEach((o) => {
    n[o] = nx(o, e, t);
  }), n;
}
function rf(e, t) {
  const n = sx(e, t);
  return (s, o, i) => o === "__v_isReactive" ? !e : o === "__v_isReadonly" ? e : o === "__v_raw" ? s : Reflect.get(
    Et(n, o) && o in s ? n : s,
    o,
    i
  );
}
const ox = {
  get: /* @__PURE__ */ rf(!1, !1)
}, rx = {
  get: /* @__PURE__ */ rf(!1, !0)
}, ix = {
  get: /* @__PURE__ */ rf(!0, !1)
}, ax = {
  get: /* @__PURE__ */ rf(!0, !0)
};
function Ug(e, t, n) {
  const s = He(n);
  if (s !== n && t.call(e, s)) {
    const o = Zd(e);
    Ms(
      `Reactive ${o} contains both the raw and reactive versions of the same object${o === "Map" ? " as keys" : ""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
    );
  }
}
const r1 = /* @__PURE__ */ new WeakMap(), i1 = /* @__PURE__ */ new WeakMap(), a1 = /* @__PURE__ */ new WeakMap(), l1 = /* @__PURE__ */ new WeakMap();
function lx(e) {
  switch (e) {
    case "Object":
    case "Array":
      return 1;
    case "Map":
    case "Set":
    case "WeakMap":
    case "WeakSet":
      return 2;
    default:
      return 0;
  }
}
function cx(e) {
  return e.__v_skip || !Object.isExtensible(e) ? 0 : lx(Zd(e));
}
function mt(e) {
  return No(e) ? e : lf(
    e,
    !1,
    QO,
    ox,
    r1
  );
}
function Hm(e) {
  return lf(
    e,
    !1,
    ex,
    rx,
    i1
  );
}
function af(e) {
  return lf(
    e,
    !0,
    ZO,
    ix,
    a1
  );
}
function Js(e) {
  return lf(
    e,
    !0,
    tx,
    ax,
    l1
  );
}
function lf(e, t, n, s, o) {
  if (!ft(e))
    return It.NODE_ENV !== "production" && Ms(
      `value cannot be made ${t ? "readonly" : "reactive"}: ${String(
        e
      )}`
    ), e;
  if (e.__v_raw && !(t && e.__v_isReactive))
    return e;
  const i = o.get(e);
  if (i)
    return i;
  const r = cx(e);
  if (r === 0)
    return e;
  const a = new Proxy(
    e,
    r === 2 ? s : n
  );
  return o.set(e, a), a;
}
function Is(e) {
  return No(e) ? Is(e.__v_raw) : !!(e && e.__v_isReactive);
}
function No(e) {
  return !!(e && e.__v_isReadonly);
}
function Wn(e) {
  return !!(e && e.__v_isShallow);
}
function Oa(e) {
  return e ? !!e.__v_raw : !1;
}
function He(e) {
  const t = e && e.__v_raw;
  return t ? He(t) : e;
}
function Xo(e) {
  return !Et(e, "__v_skip") && Object.isExtensible(e) && Ci(e, "__v_skip", !0), e;
}
const Un = (e) => ft(e) ? mt(e) : e, gh = (e) => ft(e) ? af(e) : e;
function lt(e) {
  return e ? e.__v_isRef === !0 : !1;
}
function L(e) {
  return c1(e, !1);
}
function Ym(e) {
  return c1(e, !0);
}
function c1(e, t) {
  return lt(e) ? e : new ux(e, t);
}
class ux {
  constructor(t, n) {
    this.dep = new sf(), this.__v_isRef = !0, this.__v_isShallow = !1, this._rawValue = n ? t : He(t), this._value = n ? t : Un(t), this.__v_isShallow = n;
  }
  get value() {
    return It.NODE_ENV !== "production" ? this.dep.track({
      target: this,
      type: "get",
      key: "value"
    }) : this.dep.track(), this._value;
  }
  set value(t) {
    const n = this._rawValue, s = this.__v_isShallow || Wn(t) || No(t);
    t = s ? t : He(t), Fn(t, n) && (this._rawValue = t, this._value = s ? t : Un(t), It.NODE_ENV !== "production" ? this.dep.trigger({
      target: this,
      type: "set",
      key: "value",
      newValue: t,
      oldValue: n
    }) : this.dep.trigger());
  }
}
function dx(e) {
  e.dep && (It.NODE_ENV !== "production" ? e.dep.trigger({
    target: e,
    type: "set",
    key: "value",
    newValue: e._value
  }) : e.dep.trigger());
}
function T(e) {
  return lt(e) ? e.value : e;
}
function fx(e) {
  return Le(e) ? e() : T(e);
}
const px = {
  get: (e, t, n) => t === "__v_raw" ? e : T(Reflect.get(e, t, n)),
  set: (e, t, n, s) => {
    const o = e[t];
    return lt(o) && !lt(n) ? (o.value = n, !0) : Reflect.set(e, t, n, s);
  }
};
function Wm(e) {
  return Is(e) ? e : new Proxy(e, px);
}
class hx {
  constructor(t) {
    this.__v_isRef = !0, this._value = void 0;
    const n = this.dep = new sf(), { get: s, set: o } = t(n.track.bind(n), n.trigger.bind(n));
    this._get = s, this._set = o;
  }
  get value() {
    return this._value = this._get();
  }
  set value(t) {
    this._set(t);
  }
}
function u1(e) {
  return new hx(e);
}
function xe(e) {
  It.NODE_ENV !== "production" && !Oa(e) && Ms("toRefs() expects a reactive object but received a plain one.");
  const t = Ne(e) ? new Array(e.length) : {};
  for (const n in e)
    t[n] = d1(e, n);
  return t;
}
class mx {
  constructor(t, n, s) {
    this._object = t, this._key = n, this._defaultValue = s, this.__v_isRef = !0, this._value = void 0;
  }
  get value() {
    const t = this._object[this._key];
    return this._value = t === void 0 ? this._defaultValue : t;
  }
  set value(t) {
    this._object[this._key] = t;
  }
  get dep() {
    return zO(He(this._object), this._key);
  }
}
class vx {
  constructor(t) {
    this._getter = t, this.__v_isRef = !0, this.__v_isReadonly = !0, this._value = void 0;
  }
  get value() {
    return this._value = this._getter();
  }
}
function ma(e, t, n) {
  return lt(e) ? e : Le(e) ? new vx(e) : ft(e) && arguments.length > 1 ? d1(e, t, n) : L(e);
}
function d1(e, t, n) {
  const s = e[t];
  return lt(s) ? s : new mx(e, t, n);
}
class gx {
  constructor(t, n, s) {
    this.fn = t, this.setter = n, this._value = void 0, this.dep = new sf(this), this.__v_isRef = !0, this.deps = void 0, this.depsTail = void 0, this.flags = 16, this.globalVersion = Zl - 1, this.next = void 0, this.effect = this, this.__v_isReadonly = !n, this.isSSR = s;
  }
  /**
   * @internal
   */
  notify() {
    if (this.flags |= 16, !(this.flags & 8) && // avoid infinite self recursion
    Rt !== this)
      return Xb(this, !0), !0;
  }
  get value() {
    const t = It.NODE_ENV !== "production" ? this.dep.track({
      target: this,
      type: "get",
      key: "value"
    }) : this.dep.track();
    return Qb(this), t && (t.version = this.dep.version), this._value;
  }
  set value(t) {
    this.setter ? this.setter(t) : It.NODE_ENV !== "production" && Ms("Write operation failed: computed value is readonly");
  }
}
function yx(e, t, n = !1) {
  let s, o;
  Le(e) ? s = e : (s = e.get, o = e.set);
  const i = new gx(s, o, n);
  return It.NODE_ENV !== "production" && t && !n && (i.onTrack = t.onTrack, i.onTrigger = t.onTrigger), i;
}
const _x = {
  GET: "get",
  HAS: "has",
  ITERATE: "iterate"
}, bx = {
  SET: "set",
  ADD: "add",
  DELETE: "delete",
  CLEAR: "clear"
}, su = {}, ud = /* @__PURE__ */ new WeakMap();
let Sr;
function Ex() {
  return Sr;
}
function f1(e, t = !1, n = Sr) {
  if (n) {
    let s = ud.get(n);
    s || ud.set(n, s = []), s.push(e);
  } else It.NODE_ENV !== "production" && !t && Ms(
    "onWatcherCleanup() was called when there was no active watcher to associate with."
  );
}
function Sx(e, t, n = ut) {
  const { immediate: s, deep: o, once: i, scheduler: r, augmentJob: a, call: l } = n, c = (w) => {
    (n.onWarn || Ms)(
      "Invalid watch source: ",
      w,
      "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types."
    );
  }, d = (w) => o ? w : Wn(w) || o === !1 || o === 0 ? Go(w, 1) : Go(w);
  let f, p, h, m, v = !1, g = !1;
  if (lt(e) ? (p = () => e.value, v = Wn(e)) : Is(e) ? (p = () => d(e), v = !0) : Ne(e) ? (g = !0, v = e.some((w) => Is(w) || Wn(w)), p = () => e.map((w) => {
    if (lt(w))
      return w.value;
    if (Is(w))
      return d(w);
    if (Le(w))
      return l ? l(w, 2) : w();
    It.NODE_ENV !== "production" && c(w);
  })) : Le(e) ? t ? p = l ? () => l(e, 2) : e : p = () => {
    if (h) {
      cr();
      try {
        h();
      } finally {
        ur();
      }
    }
    const w = Sr;
    Sr = f;
    try {
      return l ? l(e, 3, [m]) : e(m);
    } finally {
      Sr = w;
    }
  } : (p = Gt, It.NODE_ENV !== "production" && c(e)), t && o) {
    const w = p, N = o === !0 ? 1 / 0 : o;
    p = () => Go(w(), N);
  }
  const _ = Fm(), S = () => {
    f.stop(), _ && _.active && Qd(_.effects, f);
  };
  if (i && t) {
    const w = t;
    t = (...N) => {
      w(...N), S();
    };
  }
  let b = g ? new Array(e.length).fill(su) : su;
  const O = (w) => {
    if (!(!(f.flags & 1) || !f.dirty && !w))
      if (t) {
        const N = f.run();
        if (o || v || (g ? N.some((C, k) => Fn(C, b[k])) : Fn(N, b))) {
          h && h();
          const C = Sr;
          Sr = f;
          try {
            const k = [
              N,
              // pass undefined as the old value when it's changed for the first time
              b === su ? void 0 : g && b[0] === su ? [] : b,
              m
            ];
            l ? l(t, 3, k) : (
              // @ts-expect-error
              t(...k)
            ), b = N;
          } finally {
            Sr = C;
          }
        }
      } else
        f.run();
  };
  return a && a(O), f = new Ql(p), f.scheduler = r ? () => r(O, !1) : O, m = (w) => f1(w, !1, f), h = f.onStop = () => {
    const w = ud.get(f);
    if (w) {
      if (l)
        l(w, 4);
      else
        for (const N of w) N();
      ud.delete(f);
    }
  }, It.NODE_ENV !== "production" && (f.onTrack = n.onTrack, f.onTrigger = n.onTrigger), t ? s ? O(!0) : b = f.run() : r ? r(O.bind(null, !0), !0) : f.run(), S.pause = f.pause.bind(f), S.resume = f.resume.bind(f), S.stop = S, S;
}
function Go(e, t = 1 / 0, n) {
  if (t <= 0 || !ft(e) || e.__v_skip || (n = n || /* @__PURE__ */ new Set(), n.has(e)))
    return e;
  if (n.add(e), t--, lt(e))
    Go(e.value, t, n);
  else if (Ne(e))
    for (let s = 0; s < e.length; s++)
      Go(e[s], t, n);
  else if (Xr(e) || Lr(e))
    e.forEach((s) => {
      Go(s, t, n);
    });
  else if (Oc(e)) {
    for (const s in e)
      Go(e[s], t, n);
    for (const s of Object.getOwnPropertySymbols(e))
      Object.prototype.propertyIsEnumerable.call(e, s) && Go(e[s], t, n);
  }
  return e;
}
var Y = {};
const bi = [];
function va(e) {
  bi.push(e);
}
function ga() {
  bi.pop();
}
let Sp = !1;
function oe(e, ...t) {
  if (Sp) return;
  Sp = !0, cr();
  const n = bi.length ? bi[bi.length - 1].component : null, s = n && n.appContext.config.warnHandler, o = wx();
  if (s)
    Yi(
      s,
      n,
      11,
      [
        // eslint-disable-next-line no-restricted-syntax
        e + t.map((i) => {
          var r, a;
          return (a = (r = i.toString) == null ? void 0 : r.call(i)) != null ? a : JSON.stringify(i);
        }).join(""),
        n && n.proxy,
        o.map(
          ({ vnode: i }) => `at <${yf(n, i.type)}>`
        ).join(`
`),
        o
      ]
    );
  else {
    const i = [`[Vue warn]: ${e}`, ...t];
    o.length && i.push(`
`, ...Nx(o)), console.warn(...i);
  }
  ur(), Sp = !1;
}
function wx() {
  let e = bi[bi.length - 1];
  if (!e)
    return [];
  const t = [];
  for (; e; ) {
    const n = t[0];
    n && n.vnode === e ? n.recurseCount++ : t.push({
      vnode: e,
      recurseCount: 0
    });
    const s = e.component && e.component.parent;
    e = s && s.vnode;
  }
  return t;
}
function Nx(e) {
  const t = [];
  return e.forEach((n, s) => {
    t.push(...s === 0 ? [] : [`
`], ...Ox(n));
  }), t;
}
function Ox({ vnode: e, recurseCount: t }) {
  const n = t > 0 ? `... (${t} recursive calls)` : "", s = e.component ? e.component.parent == null : !1, o = ` at <${yf(
    e.component,
    e.type,
    s
  )}`, i = ">" + n;
  return e.props ? [o, ...xx(e.props), i] : [o + i];
}
function xx(e) {
  const t = [], n = Object.keys(e);
  return n.slice(0, 3).forEach((s) => {
    t.push(...p1(s, e[s]));
  }), n.length > 3 && t.push(" ..."), t;
}
function p1(e, t, n) {
  return We(t) ? (t = JSON.stringify(t), n ? t : [`${e}=${t}`]) : typeof t == "number" || typeof t == "boolean" || t == null ? n ? t : [`${e}=${t}`] : lt(t) ? (t = p1(e, He(t.value), !0), n ? t : [`${e}=Ref<`, t, ">"]) : Le(t) ? [`${e}=fn${t.name ? `<${t.name}>` : ""}`] : (t = He(t), n ? t : [`${e}=`, t]);
}
function Gm(e, t) {
  Y.NODE_ENV !== "production" && e !== void 0 && (typeof e != "number" ? oe(`${t} is not a valid number - got ${JSON.stringify(e)}.`) : isNaN(e) && oe(`${t} is NaN - the duration expression might be incorrect.`));
}
const Cx = {
  SETUP_FUNCTION: 0,
  0: "SETUP_FUNCTION",
  RENDER_FUNCTION: 1,
  1: "RENDER_FUNCTION",
  NATIVE_EVENT_HANDLER: 5,
  5: "NATIVE_EVENT_HANDLER",
  COMPONENT_EVENT_HANDLER: 6,
  6: "COMPONENT_EVENT_HANDLER",
  VNODE_HOOK: 7,
  7: "VNODE_HOOK",
  DIRECTIVE_HOOK: 8,
  8: "DIRECTIVE_HOOK",
  TRANSITION_HOOK: 9,
  9: "TRANSITION_HOOK",
  APP_ERROR_HANDLER: 10,
  10: "APP_ERROR_HANDLER",
  APP_WARN_HANDLER: 11,
  11: "APP_WARN_HANDLER",
  FUNCTION_REF: 12,
  12: "FUNCTION_REF",
  ASYNC_COMPONENT_LOADER: 13,
  13: "ASYNC_COMPONENT_LOADER",
  SCHEDULER: 14,
  14: "SCHEDULER",
  COMPONENT_UPDATE: 15,
  15: "COMPONENT_UPDATE",
  APP_UNMOUNT_CLEANUP: 16,
  16: "APP_UNMOUNT_CLEANUP"
}, cf = {
  sp: "serverPrefetch hook",
  bc: "beforeCreate hook",
  c: "created hook",
  bm: "beforeMount hook",
  m: "mounted hook",
  bu: "beforeUpdate hook",
  u: "updated",
  bum: "beforeUnmount hook",
  um: "unmounted hook",
  a: "activated hook",
  da: "deactivated hook",
  ec: "errorCaptured hook",
  rtc: "renderTracked hook",
  rtg: "renderTriggered hook",
  0: "setup function",
  1: "render function",
  2: "watcher getter",
  3: "watcher callback",
  4: "watcher cleanup function",
  5: "native event handler",
  6: "component event handler",
  7: "vnode hook",
  8: "directive hook",
  9: "transition hook",
  10: "app errorHandler",
  11: "app warnHandler",
  12: "ref function",
  13: "async component loader",
  14: "scheduler flush",
  15: "component update",
  16: "app unmount cleanup function"
};
function Yi(e, t, n, s) {
  try {
    return s ? e(...s) : e();
  } catch (o) {
    qr(o, t, n);
  }
}
function Ps(e, t, n, s) {
  if (Le(e)) {
    const o = Yi(e, t, n, s);
    return o && Nc(o) && o.catch((i) => {
      qr(i, t, n);
    }), o;
  }
  if (Ne(e)) {
    const o = [];
    for (let i = 0; i < e.length; i++)
      o.push(Ps(e[i], t, n, s));
    return o;
  } else Y.NODE_ENV !== "production" && oe(
    `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`
  );
}
function qr(e, t, n, s = !0) {
  const o = t ? t.vnode : null, { errorHandler: i, throwUnhandledErrorInProduction: r } = t && t.appContext.config || ut;
  if (t) {
    let a = t.parent;
    const l = t.proxy, c = Y.NODE_ENV !== "production" ? cf[n] : `https://vuejs.org/error-reference/#runtime-${n}`;
    for (; a; ) {
      const d = a.ec;
      if (d) {
        for (let f = 0; f < d.length; f++)
          if (d[f](e, l, c) === !1)
            return;
      }
      a = a.parent;
    }
    if (i) {
      cr(), Yi(i, null, 10, [
        e,
        l,
        c
      ]), ur();
      return;
    }
  }
  Tx(e, n, o, s, r);
}
function Tx(e, t, n, s = !0, o = !1) {
  if (Y.NODE_ENV !== "production") {
    const i = cf[t];
    if (n && va(n), oe(`Unhandled error${i ? ` during execution of ${i}` : ""}`), n && ga(), s)
      throw e;
    console.error(e);
  } else {
    if (o)
      throw e;
    console.error(e);
  }
}
const Qn = [];
let po = -1;
const ya = [];
let wr = null, la = 0;
const h1 = /* @__PURE__ */ Promise.resolve();
let dd = null;
const $x = 100;
function rr(e) {
  const t = dd || h1;
  return e ? t.then(this ? e.bind(this) : e) : t;
}
function kx(e) {
  let t = po + 1, n = Qn.length;
  for (; t < n; ) {
    const s = t + n >>> 1, o = Qn[s], i = tc(o);
    i < e || i === e && o.flags & 2 ? t = s + 1 : n = s;
  }
  return t;
}
function uf(e) {
  if (!(e.flags & 1)) {
    const t = tc(e), n = Qn[Qn.length - 1];
    !n || // fast path when the job id is larger than the tail
    !(e.flags & 2) && t >= tc(n) ? Qn.push(e) : Qn.splice(kx(t), 0, e), e.flags |= 1, m1();
  }
}
function m1() {
  dd || (dd = h1.then(v1));
}
function xa(e) {
  Ne(e) ? ya.push(...e) : wr && e.id === -1 ? wr.splice(la + 1, 0, e) : e.flags & 1 || (ya.push(e), e.flags |= 1), m1();
}
function jg(e, t, n = po + 1) {
  for (Y.NODE_ENV !== "production" && (t = t || /* @__PURE__ */ new Map()); n < Qn.length; n++) {
    const s = Qn[n];
    if (s && s.flags & 2) {
      if (e && s.id !== e.uid || Y.NODE_ENV !== "production" && zm(t, s))
        continue;
      Qn.splice(n, 1), n--, s.flags & 4 && (s.flags &= -2), s(), s.flags & 4 || (s.flags &= -2);
    }
  }
}
function fd(e) {
  if (ya.length) {
    const t = [...new Set(ya)].sort(
      (n, s) => tc(n) - tc(s)
    );
    if (ya.length = 0, wr) {
      wr.push(...t);
      return;
    }
    for (wr = t, Y.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map()), la = 0; la < wr.length; la++) {
      const n = wr[la];
      Y.NODE_ENV !== "production" && zm(e, n) || (n.flags & 4 && (n.flags &= -2), n.flags & 8 || n(), n.flags &= -2);
    }
    wr = null, la = 0;
  }
}
const tc = (e) => e.id == null ? e.flags & 2 ? -1 : 1 / 0 : e.id;
function v1(e) {
  Y.NODE_ENV !== "production" && (e = e || /* @__PURE__ */ new Map());
  const t = Y.NODE_ENV !== "production" ? (n) => zm(e, n) : Gt;
  try {
    for (po = 0; po < Qn.length; po++) {
      const n = Qn[po];
      if (n && !(n.flags & 8)) {
        if (Y.NODE_ENV !== "production" && t(n))
          continue;
        n.flags & 4 && (n.flags &= -2), Yi(
          n,
          n.i,
          n.i ? 15 : 14
        ), n.flags & 4 || (n.flags &= -2);
      }
    }
  } finally {
    for (; po < Qn.length; po++) {
      const n = Qn[po];
      n && (n.flags &= -2);
    }
    po = -1, Qn.length = 0, fd(e), dd = null, (Qn.length || ya.length) && v1(e);
  }
}
function zm(e, t) {
  const n = e.get(t) || 0;
  if (n > $x) {
    const s = t.i, o = s && ac(s.type);
    return qr(
      `Maximum recursive updates exceeded${o ? ` in component <${o}>` : ""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,
      null,
      10
    ), !0;
  }
  return e.set(t, n + 1), !1;
}
let Qs = !1;
const Au = /* @__PURE__ */ new Map();
Y.NODE_ENV !== "production" && (Ha().__VUE_HMR_RUNTIME__ = {
  createRecord: wp(g1),
  rerender: wp(Rx),
  reload: wp(Ax)
});
const Ti = /* @__PURE__ */ new Map();
function Dx(e) {
  const t = e.type.__hmrId;
  let n = Ti.get(t);
  n || (g1(t, e.type), n = Ti.get(t)), n.instances.add(e);
}
function Ix(e) {
  Ti.get(e.type.__hmrId).instances.delete(e);
}
function g1(e, t) {
  return Ti.has(e) ? !1 : (Ti.set(e, {
    initialDef: pd(t),
    instances: /* @__PURE__ */ new Set()
  }), !0);
}
function pd(e) {
  return SE(e) ? e.__vccOpts : e;
}
function Rx(e, t) {
  const n = Ti.get(e);
  n && (n.initialDef.render = t, [...n.instances].forEach((s) => {
    t && (s.render = t, pd(s.type).render = t), s.renderCache = [], Qs = !0, s.update(), Qs = !1;
  }));
}
function Ax(e, t) {
  const n = Ti.get(e);
  if (!n) return;
  t = pd(t), Bg(n.initialDef, t);
  const s = [...n.instances];
  for (let o = 0; o < s.length; o++) {
    const i = s[o], r = pd(i.type);
    let a = Au.get(r);
    a || (r !== n.initialDef && Bg(r, t), Au.set(r, a = /* @__PURE__ */ new Set())), a.add(i), i.appContext.propsCache.delete(i.type), i.appContext.emitsCache.delete(i.type), i.appContext.optionsCache.delete(i.type), i.ceReload ? (a.add(i), i.ceReload(t.styles), a.delete(i)) : i.parent ? uf(() => {
      Qs = !0, i.parent.update(), Qs = !1, a.delete(i);
    }) : i.appContext.reload ? i.appContext.reload() : typeof window < "u" ? window.location.reload() : console.warn(
      "[HMR] Root or manually mounted instance modified. Full reload required."
    ), i.root.ce && i !== i.root && i.root.ce._removeChildStyle(r);
  }
  xa(() => {
    Au.clear();
  });
}
function Bg(e, t) {
  st(e, t);
  for (const n in e)
    n !== "__file" && !(n in t) && delete e[n];
}
function wp(e) {
  return (t, n) => {
    try {
      return e(t, n);
    } catch (s) {
      console.error(s), console.warn(
        "[HMR] Something went wrong during Vue component hot-reload. Full reload required."
      );
    }
  };
}
let Xs, El = [], yh = !1;
function Cc(e, ...t) {
  Xs ? Xs.emit(e, ...t) : yh || El.push({ event: e, args: t });
}
function Km(e, t) {
  var n, s;
  Xs = e, Xs ? (Xs.enabled = !0, El.forEach(({ event: o, args: i }) => Xs.emit(o, ...i)), El = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
  window.HTMLElement && // also exclude jsdom
  // eslint-disable-next-line no-restricted-syntax
  !((s = (n = window.navigator) == null ? void 0 : n.userAgent) != null && s.includes("jsdom")) ? ((t.__VUE_DEVTOOLS_HOOK_REPLAY__ = t.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((i) => {
    Km(i, t);
  }), setTimeout(() => {
    Xs || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, yh = !0, El = []);
  }, 3e3)) : (yh = !0, El = []);
}
function Mx(e, t) {
  Cc("app:init", e, t, {
    Fragment: J,
    Text: bo,
    Comment: zt,
    Static: Ur
  });
}
function Px(e) {
  Cc("app:unmount", e);
}
const _h = /* @__PURE__ */ Xm(
  "component:added"
  /* COMPONENT_ADDED */
), y1 = /* @__PURE__ */ Xm(
  "component:updated"
  /* COMPONENT_UPDATED */
), Vx = /* @__PURE__ */ Xm(
  "component:removed"
  /* COMPONENT_REMOVED */
), Lx = (e) => {
  Xs && typeof Xs.cleanupBuffer == "function" && // remove the component if it wasn't buffered
  !Xs.cleanupBuffer(e) && Vx(e);
};
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function Xm(e) {
  return (t) => {
    Cc(
      e,
      t.appContext.app,
      t.uid,
      t.parent ? t.parent.uid : void 0,
      t
    );
  };
}
const Fx = /* @__PURE__ */ _1(
  "perf:start"
  /* PERFORMANCE_START */
), Ux = /* @__PURE__ */ _1(
  "perf:end"
  /* PERFORMANCE_END */
);
function _1(e) {
  return (t, n, s) => {
    Cc(e, t.appContext.app, t.uid, t, n, s);
  };
}
function jx(e, t, n) {
  Cc(
    "component:emit",
    e.appContext.app,
    e,
    t,
    n
  );
}
let an = null, df = null;
function nc(e) {
  const t = an;
  return an = e, df = e && e.type.__scopeId || null, t;
}
function Bx(e) {
  df = e;
}
function Hx() {
  df = null;
}
const Yx = (e) => K;
function K(e, t = an, n) {
  if (!t || e._n)
    return e;
  const s = (...o) => {
    s._d && Th(-1);
    const i = nc(t);
    let r;
    try {
      r = e(...o);
    } finally {
      nc(i), s._d && Th(1);
    }
    return Y.NODE_ENV !== "production" && y1(t), r;
  };
  return s._n = !0, s._c = !0, s._d = !0, s;
}
function b1(e) {
  Dm(e) && oe("Do not use built-in directive ids as custom directive id: " + e);
}
function P(e, t) {
  if (an === null)
    return Y.NODE_ENV !== "production" && oe("withDirectives can only be used inside render functions."), e;
  const n = $c(an), s = e.dirs || (e.dirs = []);
  for (let o = 0; o < t.length; o++) {
    let [i, r, a, l = ut] = t[o];
    i && (Le(i) && (i = {
      mounted: i,
      updated: i
    }), i.deep && Go(r), s.push({
      dir: i,
      instance: n,
      value: r,
      oldValue: void 0,
      arg: a,
      modifiers: l
    }));
  }
  return e;
}
function mo(e, t, n, s) {
  const o = e.dirs, i = t && t.dirs;
  for (let r = 0; r < o.length; r++) {
    const a = o[r];
    i && (a.oldValue = i[r].value);
    let l = a.dir[s];
    l && (cr(), Ps(l, n, 8, [
      e.el,
      a,
      e,
      t
    ]), ur());
  }
}
const E1 = Symbol("_vte"), S1 = (e) => e.__isTeleport, Ei = (e) => e && (e.disabled || e.disabled === ""), Hg = (e) => e && (e.defer || e.defer === ""), Yg = (e) => typeof SVGElement < "u" && e instanceof SVGElement, Wg = (e) => typeof MathMLElement == "function" && e instanceof MathMLElement, bh = (e, t) => {
  const n = e && e.to;
  if (We(n))
    if (t) {
      const s = t(n);
      return Y.NODE_ENV !== "production" && !s && !Ei(e) && oe(
        `Failed to locate Teleport target with selector "${n}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
      ), s;
    } else
      return Y.NODE_ENV !== "production" && oe(
        "Current renderer does not support string target for Teleports. (missing querySelector renderer option)"
      ), null;
  else
    return Y.NODE_ENV !== "production" && !n && !Ei(e) && oe(`Invalid Teleport target: ${n}`), n;
}, w1 = {
  name: "Teleport",
  __isTeleport: !0,
  process(e, t, n, s, o, i, r, a, l, c) {
    const {
      mc: d,
      pc: f,
      pbc: p,
      o: { insert: h, querySelector: m, createText: v, createComment: g }
    } = c, _ = Ei(t.props);
    let { shapeFlag: S, children: b, dynamicChildren: O } = t;
    if (Y.NODE_ENV !== "production" && Qs && (l = !1, O = null), e == null) {
      const w = t.el = Y.NODE_ENV !== "production" ? g("teleport start") : v(""), N = t.anchor = Y.NODE_ENV !== "production" ? g("teleport end") : v("");
      h(w, n, s), h(N, n, s);
      const C = (x, $) => {
        S & 16 && (o && o.isCE && (o.ce._teleportTarget = x), d(
          b,
          x,
          $,
          o,
          i,
          r,
          a,
          l
        ));
      }, k = () => {
        const x = t.target = bh(t.props, m), $ = N1(x, t, v, h);
        x ? (r !== "svg" && Yg(x) ? r = "svg" : r !== "mathml" && Wg(x) && (r = "mathml"), _ || (C(x, $), Mu(t, !1))) : Y.NODE_ENV !== "production" && !_ && oe(
          "Invalid Teleport target on mount:",
          x,
          `(${typeof x})`
        );
      };
      _ && (C(n, N), Mu(t, !0)), Hg(t.props) ? En(() => {
        k(), t.el.__isMounted = !0;
      }, i) : k();
    } else {
      if (Hg(t.props) && !e.el.__isMounted) {
        En(() => {
          w1.process(
            e,
            t,
            n,
            s,
            o,
            i,
            r,
            a,
            l,
            c
          ), delete e.el.__isMounted;
        }, i);
        return;
      }
      t.el = e.el, t.targetStart = e.targetStart;
      const w = t.anchor = e.anchor, N = t.target = e.target, C = t.targetAnchor = e.targetAnchor, k = Ei(e.props), x = k ? n : N, $ = k ? w : C;
      if (r === "svg" || Yg(N) ? r = "svg" : (r === "mathml" || Wg(N)) && (r = "mathml"), O ? (p(
        e.dynamicChildren,
        O,
        x,
        o,
        i,
        r,
        a
      ), Al(e, t, !0)) : l || f(
        e,
        t,
        x,
        $,
        o,
        i,
        r,
        a,
        !1
      ), _)
        k ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : ou(
          t,
          n,
          w,
          c,
          1
        );
      else if ((t.props && t.props.to) !== (e.props && e.props.to)) {
        const M = t.target = bh(
          t.props,
          m
        );
        M ? ou(
          t,
          M,
          null,
          c,
          0
        ) : Y.NODE_ENV !== "production" && oe(
          "Invalid Teleport target on update:",
          N,
          `(${typeof N})`
        );
      } else k && ou(
        t,
        N,
        C,
        c,
        1
      );
      Mu(t, _);
    }
  },
  remove(e, t, n, { um: s, o: { remove: o } }, i) {
    const {
      shapeFlag: r,
      children: a,
      anchor: l,
      targetStart: c,
      targetAnchor: d,
      target: f,
      props: p
    } = e;
    if (f && (o(c), o(d)), i && o(l), r & 16) {
      const h = i || !Ei(p);
      for (let m = 0; m < a.length; m++) {
        const v = a[m];
        s(
          v,
          t,
          n,
          h,
          !!v.dynamicChildren
        );
      }
    }
  },
  move: ou,
  hydrate: Wx
};
function ou(e, t, n, { o: { insert: s }, m: o }, i = 2) {
  i === 0 && s(e.targetAnchor, t, n);
  const { el: r, anchor: a, shapeFlag: l, children: c, props: d } = e, f = i === 2;
  if (f && s(r, t, n), (!f || Ei(d)) && l & 16)
    for (let p = 0; p < c.length; p++)
      o(
        c[p],
        t,
        n,
        2
      );
  f && s(a, t, n);
}
function Wx(e, t, n, s, o, i, {
  o: { nextSibling: r, parentNode: a, querySelector: l, insert: c, createText: d }
}, f) {
  const p = t.target = bh(
    t.props,
    l
  );
  if (p) {
    const h = Ei(t.props), m = p._lpa || p.firstChild;
    if (t.shapeFlag & 16)
      if (h)
        t.anchor = f(
          r(e),
          t,
          a(e),
          n,
          s,
          o,
          i
        ), t.targetStart = m, t.targetAnchor = m && r(m);
      else {
        t.anchor = r(e);
        let v = m;
        for (; v; ) {
          if (v && v.nodeType === 8) {
            if (v.data === "teleport start anchor")
              t.targetStart = v;
            else if (v.data === "teleport anchor") {
              t.targetAnchor = v, p._lpa = t.targetAnchor && r(t.targetAnchor);
              break;
            }
          }
          v = r(v);
        }
        t.targetAnchor || N1(p, t, d, c), f(
          m && r(m),
          t,
          p,
          n,
          s,
          o,
          i
        );
      }
    Mu(t, h);
  }
  return t.anchor && r(t.anchor);
}
const Ss = w1;
function Mu(e, t) {
  const n = e.ctx;
  if (n && n.ut) {
    let s, o;
    for (t ? (s = e.el, o = e.anchor) : (s = e.targetStart, o = e.targetAnchor); s && s !== o; )
      s.nodeType === 1 && s.setAttribute("data-v-owner", n.uid), s = s.nextSibling;
    n.ut();
  }
}
function N1(e, t, n, s) {
  const o = t.targetStart = n(""), i = t.targetAnchor = n("");
  return o[E1] = i, e && (s(o, e), s(i, e)), i;
}
const Nr = Symbol("_leaveCb"), ru = Symbol("_enterCb");
function qm() {
  const e = {
    isMounted: !1,
    isLeaving: !1,
    isUnmounting: !1,
    leavingVNodes: /* @__PURE__ */ new Map()
  };
  return Mt(() => {
    e.isMounted = !0;
  }), Wi(() => {
    e.isUnmounting = !0;
  }), e;
}
const Os = [Function, Array], Jm = {
  mode: String,
  appear: Boolean,
  persisted: Boolean,
  // enter
  onBeforeEnter: Os,
  onEnter: Os,
  onAfterEnter: Os,
  onEnterCancelled: Os,
  // leave
  onBeforeLeave: Os,
  onLeave: Os,
  onAfterLeave: Os,
  onLeaveCancelled: Os,
  // appear
  onBeforeAppear: Os,
  onAppear: Os,
  onAfterAppear: Os,
  onAppearCancelled: Os
}, O1 = (e) => {
  const t = e.subTree;
  return t.component ? O1(t.component) : t;
}, Gx = {
  name: "BaseTransition",
  props: Jm,
  setup(e, { slots: t }) {
    const n = un(), s = qm();
    return () => {
      const o = t.default && ff(t.default(), !0);
      if (!o || !o.length)
        return;
      const i = x1(o), r = He(e), { mode: a } = r;
      if (Y.NODE_ENV !== "production" && a && a !== "in-out" && a !== "out-in" && a !== "default" && oe(`invalid <transition> mode: ${a}`), s.isLeaving)
        return Np(i);
      const l = Gg(i);
      if (!l)
        return Np(i);
      let c = Ca(
        l,
        r,
        s,
        n,
        // #11061, ensure enterHooks is fresh after clone
        (f) => c = f
      );
      l.type !== zt && ir(l, c);
      let d = n.subTree && Gg(n.subTree);
      if (d && d.type !== zt && !qs(l, d) && O1(n).type !== zt) {
        let f = Ca(
          d,
          r,
          s,
          n
        );
        if (ir(d, f), a === "out-in" && l.type !== zt)
          return s.isLeaving = !0, f.afterLeave = () => {
            s.isLeaving = !1, n.job.flags & 8 || n.update(), delete f.afterLeave, d = void 0;
          }, Np(i);
        a === "in-out" && l.type !== zt ? f.delayLeave = (p, h, m) => {
          const v = T1(
            s,
            d
          );
          v[String(d.key)] = d, p[Nr] = () => {
            h(), p[Nr] = void 0, delete c.delayedLeave, d = void 0;
          }, c.delayedLeave = () => {
            m(), delete c.delayedLeave, d = void 0;
          };
        } : d = void 0;
      } else d && (d = void 0);
      return i;
    };
  }
};
function x1(e) {
  let t = e[0];
  if (e.length > 1) {
    let n = !1;
    for (const s of e)
      if (s.type !== zt) {
        if (Y.NODE_ENV !== "production" && n) {
          oe(
            "<transition> can only be used on a single element or component. Use <transition-group> for lists."
          );
          break;
        }
        if (t = s, n = !0, Y.NODE_ENV === "production") break;
      }
  }
  return t;
}
const C1 = Gx;
function T1(e, t) {
  const { leavingVNodes: n } = e;
  let s = n.get(t.type);
  return s || (s = /* @__PURE__ */ Object.create(null), n.set(t.type, s)), s;
}
function Ca(e, t, n, s, o) {
  const {
    appear: i,
    mode: r,
    persisted: a = !1,
    onBeforeEnter: l,
    onEnter: c,
    onAfterEnter: d,
    onEnterCancelled: f,
    onBeforeLeave: p,
    onLeave: h,
    onAfterLeave: m,
    onLeaveCancelled: v,
    onBeforeAppear: g,
    onAppear: _,
    onAfterAppear: S,
    onAppearCancelled: b
  } = t, O = String(e.key), w = T1(n, e), N = (x, $) => {
    x && Ps(
      x,
      s,
      9,
      $
    );
  }, C = (x, $) => {
    const M = $[1];
    N(x, $), Ne(x) ? x.every((R) => R.length <= 1) && M() : x.length <= 1 && M();
  }, k = {
    mode: r,
    persisted: a,
    beforeEnter(x) {
      let $ = l;
      if (!n.isMounted)
        if (i)
          $ = g || l;
        else
          return;
      x[Nr] && x[Nr](
        !0
        /* cancelled */
      );
      const M = w[O];
      M && qs(e, M) && M.el[Nr] && M.el[Nr](), N($, [x]);
    },
    enter(x) {
      let $ = c, M = d, R = f;
      if (!n.isMounted)
        if (i)
          $ = _ || c, M = S || d, R = b || f;
        else
          return;
      let V = !1;
      const j = x[ru] = (U) => {
        V || (V = !0, U ? N(R, [x]) : N(M, [x]), k.delayedLeave && k.delayedLeave(), x[ru] = void 0);
      };
      $ ? C($, [x, j]) : j();
    },
    leave(x, $) {
      const M = String(e.key);
      if (x[ru] && x[ru](
        !0
        /* cancelled */
      ), n.isUnmounting)
        return $();
      N(p, [x]);
      let R = !1;
      const V = x[Nr] = (j) => {
        R || (R = !0, $(), j ? N(v, [x]) : N(m, [x]), x[Nr] = void 0, w[M] === e && delete w[M]);
      };
      w[M] = e, h ? C(h, [x, V]) : V();
    },
    clone(x) {
      const $ = Ca(
        x,
        t,
        n,
        s,
        o
      );
      return o && o($), $;
    }
  };
  return k;
}
function Np(e) {
  if (Ya(e))
    return e = Vs(e), e.children = null, e;
}
function Gg(e) {
  if (!Ya(e))
    return S1(e.type) && e.children ? x1(e.children) : e;
  if (Y.NODE_ENV !== "production" && e.component)
    return e.component.subTree;
  const { shapeFlag: t, children: n } = e;
  if (n) {
    if (t & 16)
      return n[0];
    if (t & 32 && Le(n.default))
      return n.default();
  }
}
function ir(e, t) {
  e.shapeFlag & 6 && e.component ? (e.transition = t, ir(e.component.subTree, t)) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
}
function ff(e, t = !1, n) {
  let s = [], o = 0;
  for (let i = 0; i < e.length; i++) {
    let r = e[i];
    const a = n == null ? r.key : String(n) + String(r.key != null ? r.key : i);
    r.type === J ? (r.patchFlag & 128 && o++, s = s.concat(
      ff(r.children, t, a)
    )) : (t || r.type !== zt) && s.push(a != null ? Vs(r, { key: a }) : r);
  }
  if (o > 1)
    for (let i = 0; i < s.length; i++)
      s[i].patchFlag = -2;
  return s;
}
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function Cn(e, t) {
  return Le(e) ? (
    // #8236: extend call and options.name access are considered side-effects
    // by Rollup, so we have to wrap it in a pure-annotated IIFE.
    st({ name: e.name }, t, { setup: e })
  ) : e;
}
function zx() {
  const e = un();
  return e ? (e.appContext.config.idPrefix || "v") + "-" + e.ids[0] + e.ids[1]++ : (Y.NODE_ENV !== "production" && oe(
    "useId() is called when there is no active component instance to be associated with."
  ), "");
}
function Qm(e) {
  e.ids = [e.ids[0] + e.ids[2]++ + "-", 0, 0];
}
const $1 = /* @__PURE__ */ new WeakSet();
function Wr(e) {
  const t = un(), n = Ym(null);
  if (t) {
    const o = t.refs === ut ? t.refs = {} : t.refs;
    let i;
    Y.NODE_ENV !== "production" && (i = Object.getOwnPropertyDescriptor(o, e)) && !i.configurable ? oe(`useTemplateRef('${e}') already exists.`) : Object.defineProperty(o, e, {
      enumerable: !0,
      get: () => n.value,
      set: (r) => n.value = r
    });
  } else Y.NODE_ENV !== "production" && oe(
    "useTemplateRef() is called when there is no active component instance to be associated with."
  );
  const s = Y.NODE_ENV !== "production" ? af(n) : n;
  return Y.NODE_ENV !== "production" && $1.add(s), s;
}
function sc(e, t, n, s, o = !1) {
  if (Ne(e)) {
    e.forEach(
      (m, v) => sc(
        m,
        t && (Ne(t) ? t[v] : t),
        n,
        s,
        o
      )
    );
    return;
  }
  if (Fr(s) && !o) {
    s.shapeFlag & 512 && s.type.__asyncResolved && s.component.subTree.component && sc(e, t, n, s.component.subTree);
    return;
  }
  const i = s.shapeFlag & 4 ? $c(s.component) : s.el, r = o ? null : i, { i: a, r: l } = e;
  if (Y.NODE_ENV !== "production" && !a) {
    oe(
      "Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function."
    );
    return;
  }
  const c = t && t.r, d = a.refs === ut ? a.refs = {} : a.refs, f = a.setupState, p = He(f), h = f === ut ? () => !1 : (m) => Y.NODE_ENV !== "production" && (Et(p, m) && !lt(p[m]) && oe(
    `Template ref "${m}" used on a non-ref value. It will not work in the production build.`
  ), $1.has(p[m])) ? !1 : Et(p, m);
  if (c != null && c !== l && (We(c) ? (d[c] = null, h(c) && (f[c] = null)) : lt(c) && (c.value = null)), Le(l))
    Yi(l, a, 12, [r, d]);
  else {
    const m = We(l), v = lt(l);
    if (m || v) {
      const g = () => {
        if (e.f) {
          const _ = m ? h(l) ? f[l] : d[l] : l.value;
          o ? Ne(_) && Qd(_, i) : Ne(_) ? _.includes(i) || _.push(i) : m ? (d[l] = [i], h(l) && (f[l] = d[l])) : (l.value = [i], e.k && (d[e.k] = l.value));
        } else m ? (d[l] = r, h(l) && (f[l] = r)) : v ? (l.value = r, e.k && (d[e.k] = r)) : Y.NODE_ENV !== "production" && oe("Invalid template ref type:", l, `(${typeof l})`);
      };
      r ? (g.id = -1, En(g, n)) : g();
    } else Y.NODE_ENV !== "production" && oe("Invalid template ref type:", l, `(${typeof l})`);
  }
}
let zg = !1;
const Zr = () => {
  zg || (console.error("Hydration completed but contains mismatches."), zg = !0);
}, Kx = (e) => e.namespaceURI.includes("svg") && e.tagName !== "foreignObject", Xx = (e) => e.namespaceURI.includes("MathML"), iu = (e) => {
  if (e.nodeType === 1) {
    if (Kx(e)) return "svg";
    if (Xx(e)) return "mathml";
  }
}, ui = (e) => e.nodeType === 8;
function qx(e) {
  const {
    mt: t,
    p: n,
    o: {
      patchProp: s,
      createText: o,
      nextSibling: i,
      parentNode: r,
      remove: a,
      insert: l,
      createComment: c
    }
  } = e, d = (b, O) => {
    if (!O.hasChildNodes()) {
      Y.NODE_ENV !== "production" && oe(
        "Attempting to hydrate existing markup but container is empty. Performing full mount instead."
      ), n(null, b, O), fd(), O._vnode = b;
      return;
    }
    f(O.firstChild, b, null, null, null), fd(), O._vnode = b;
  }, f = (b, O, w, N, C, k = !1) => {
    k = k || !!O.dynamicChildren;
    const x = ui(b) && b.data === "[", $ = () => v(
      b,
      O,
      w,
      N,
      C,
      x
    ), { type: M, ref: R, shapeFlag: V, patchFlag: j } = O;
    let U = b.nodeType;
    O.el = b, Y.NODE_ENV !== "production" && (Ci(b, "__vnode", O, !0), Ci(b, "__vueParentComponent", w, !0)), j === -2 && (k = !1, O.dynamicChildren = null);
    let A = null;
    switch (M) {
      case bo:
        U !== 3 ? O.children === "" ? (l(O.el = o(""), r(b), b), A = b) : A = $() : (b.data !== O.children && (Y.NODE_ENV !== "production" && oe(
          "Hydration text mismatch in",
          b.parentNode,
          `
  - rendered on server: ${JSON.stringify(
            b.data
          )}
  - expected on client: ${JSON.stringify(O.children)}`
        ), Zr(), b.data = O.children), A = i(b));
        break;
      case zt:
        S(b) ? (A = i(b), _(
          O.el = b.content.firstChild,
          b,
          w
        )) : U !== 8 || x ? A = $() : A = i(b);
        break;
      case Ur:
        if (x && (b = i(b), U = b.nodeType), U === 1 || U === 3) {
          A = b;
          const G = !O.children.length;
          for (let X = 0; X < O.staticCount; X++)
            G && (O.children += A.nodeType === 1 ? A.outerHTML : A.data), X === O.staticCount - 1 && (O.anchor = A), A = i(A);
          return x ? i(A) : A;
        } else
          $();
        break;
      case J:
        x ? A = m(
          b,
          O,
          w,
          N,
          C,
          k
        ) : A = $();
        break;
      default:
        if (V & 1)
          (U !== 1 || O.type.toLowerCase() !== b.tagName.toLowerCase()) && !S(b) ? A = $() : A = p(
            b,
            O,
            w,
            N,
            C,
            k
          );
        else if (V & 6) {
          O.slotScopeIds = C;
          const G = r(b);
          if (x ? A = g(b) : ui(b) && b.data === "teleport start" ? A = g(b, b.data, "teleport end") : A = i(b), t(
            O,
            G,
            null,
            w,
            N,
            iu(G),
            k
          ), Fr(O) && !O.type.__asyncResolved) {
            let X;
            x ? (X = F(J), X.anchor = A ? A.previousSibling : G.lastChild) : X = b.nodeType === 3 ? se("") : F("div"), X.el = b, O.component.subTree = X;
          }
        } else V & 64 ? U !== 8 ? A = $() : A = O.type.hydrate(
          b,
          O,
          w,
          N,
          C,
          k,
          e,
          h
        ) : V & 128 ? A = O.type.hydrate(
          b,
          O,
          w,
          N,
          iu(r(b)),
          C,
          k,
          e,
          f
        ) : Y.NODE_ENV !== "production" && oe("Invalid HostVNode type:", M, `(${typeof M})`);
    }
    return R != null && sc(R, null, N, O), A;
  }, p = (b, O, w, N, C, k) => {
    k = k || !!O.dynamicChildren;
    const { type: x, props: $, patchFlag: M, shapeFlag: R, dirs: V, transition: j } = O, U = x === "input" || x === "option";
    if (Y.NODE_ENV !== "production" || U || M !== -1) {
      V && mo(O, null, w, "created");
      let A = !1;
      if (S(b)) {
        A = tE(
          null,
          // no need check parentSuspense in hydration
          j
        ) && w && w.vnode.props && w.vnode.props.appear;
        const X = b.content.firstChild;
        A && j.beforeEnter(X), _(X, b, w), O.el = b = X;
      }
      if (R & 16 && // skip if element has innerHTML / textContent
      !($ && ($.innerHTML || $.textContent))) {
        let X = h(
          b.firstChild,
          O,
          b,
          w,
          N,
          C,
          k
        ), te = !1;
        for (; X; ) {
          Sl(
            b,
            1
            /* CHILDREN */
          ) || (Y.NODE_ENV !== "production" && !te && (oe(
            "Hydration children mismatch on",
            b,
            `
Server rendered element contains more child nodes than client vdom.`
          ), te = !0), Zr());
          const $e = X;
          X = X.nextSibling, a($e);
        }
      } else if (R & 8) {
        let X = O.children;
        X[0] === `
` && (b.tagName === "PRE" || b.tagName === "TEXTAREA") && (X = X.slice(1)), b.textContent !== X && (Sl(
          b,
          0
          /* TEXT */
        ) || (Y.NODE_ENV !== "production" && oe(
          "Hydration text content mismatch on",
          b,
          `
  - rendered on server: ${b.textContent}
  - expected on client: ${O.children}`
        ), Zr()), b.textContent = O.children);
      }
      if ($) {
        if (Y.NODE_ENV !== "production" || U || !k || M & 48) {
          const X = b.tagName.includes("-");
          for (const te in $)
            Y.NODE_ENV !== "production" && // #11189 skip if this node has directives that have created hooks
            // as it could have mutated the DOM in any possible way
            !(V && V.some(($e) => $e.dir.created)) && Jx(b, te, $[te], O, w) && Zr(), (U && (te.endsWith("value") || te === "indeterminate") || wo(te) && !Zo(te) || // force hydrate v-bind with .prop modifiers
            te[0] === "." || X) && s(b, te, null, $[te], void 0, w);
        } else if ($.onClick)
          s(
            b,
            "onClick",
            null,
            $.onClick,
            void 0,
            w
          );
        else if (M & 4 && Is($.style))
          for (const X in $.style) $.style[X];
      }
      let G;
      (G = $ && $.onVnodeBeforeMount) && cs(G, w, O), V && mo(O, null, w, "beforeMount"), ((G = $ && $.onVnodeMounted) || V || A) && dE(() => {
        G && cs(G, w, O), A && j.enter(b), V && mo(O, null, w, "mounted");
      }, N);
    }
    return b.nextSibling;
  }, h = (b, O, w, N, C, k, x) => {
    x = x || !!O.dynamicChildren;
    const $ = O.children, M = $.length;
    let R = !1;
    for (let V = 0; V < M; V++) {
      const j = x ? $[V] : $[V] = Zn($[V]), U = j.type === bo;
      b ? (U && !x && V + 1 < M && Zn($[V + 1]).type === bo && (l(
        o(
          b.data.slice(j.children.length)
        ),
        w,
        i(b)
      ), b.data = j.children), b = f(
        b,
        j,
        N,
        C,
        k,
        x
      )) : U && !j.children ? l(j.el = o(""), w) : (Sl(
        w,
        1
        /* CHILDREN */
      ) || (Y.NODE_ENV !== "production" && !R && (oe(
        "Hydration children mismatch on",
        w,
        `
Server rendered element contains fewer child nodes than client vdom.`
      ), R = !0), Zr()), n(
        null,
        j,
        w,
        null,
        N,
        C,
        iu(w),
        k
      ));
    }
    return b;
  }, m = (b, O, w, N, C, k) => {
    const { slotScopeIds: x } = O;
    x && (C = C ? C.concat(x) : x);
    const $ = r(b), M = h(
      i(b),
      O,
      $,
      w,
      N,
      C,
      k
    );
    return M && ui(M) && M.data === "]" ? i(O.anchor = M) : (Zr(), l(O.anchor = c("]"), $, M), M);
  }, v = (b, O, w, N, C, k) => {
    if (Sl(
      b.parentElement,
      1
      /* CHILDREN */
    ) || (Y.NODE_ENV !== "production" && oe(
      `Hydration node mismatch:
- rendered on server:`,
      b,
      b.nodeType === 3 ? "(text)" : ui(b) && b.data === "[" ? "(start of fragment)" : "",
      `
- expected on client:`,
      O.type
    ), Zr()), O.el = null, k) {
      const M = g(b);
      for (; ; ) {
        const R = i(b);
        if (R && R !== M)
          a(R);
        else
          break;
      }
    }
    const x = i(b), $ = r(b);
    return a(b), n(
      null,
      O,
      $,
      x,
      w,
      N,
      iu($),
      C
    ), w && (w.vnode.el = O.el, gf(w, O.el)), x;
  }, g = (b, O = "[", w = "]") => {
    let N = 0;
    for (; b; )
      if (b = i(b), b && ui(b) && (b.data === O && N++, b.data === w)) {
        if (N === 0)
          return i(b);
        N--;
      }
    return b;
  }, _ = (b, O, w) => {
    const N = O.parentNode;
    N && N.replaceChild(b, O);
    let C = w;
    for (; C; )
      C.vnode.el === O && (C.vnode.el = C.subTree.el = b), C = C.parent;
  }, S = (b) => b.nodeType === 1 && b.tagName === "TEMPLATE";
  return [d, f];
}
function Jx(e, t, n, s, o) {
  let i, r, a, l;
  if (t === "class")
    a = e.getAttribute("class"), l = Te(n), Qx(Kg(a || ""), Kg(l)) || (i = 2, r = "class");
  else if (t === "style") {
    a = e.getAttribute("style") || "", l = We(n) ? n : Pb(fs(n));
    const c = Xg(a), d = Xg(l);
    if (s.dirs)
      for (const { dir: f, value: p } of s.dirs)
        f.name === "show" && !p && d.set("display", "none");
    o && k1(o, s, d), Zx(c, d) || (i = 3, r = "style");
  } else (e instanceof SVGElement && jb(t) || e instanceof HTMLElement && (ph(t) || Ub(t))) && (ph(t) ? (a = e.hasAttribute(t), l = nf(n)) : n == null ? (a = e.hasAttribute(t), l = !1) : (e.hasAttribute(t) ? a = e.getAttribute(t) : t === "value" && e.tagName === "TEXTAREA" ? a = e.value : a = !1, l = Bb(n) ? String(n) : !1), a !== l && (i = 4, r = t));
  if (i != null && !Sl(e, i)) {
    const c = (p) => p === !1 ? "(not rendered)" : `${r}="${p}"`, d = `Hydration ${D1[i]} mismatch on`, f = `
  - rendered on server: ${c(a)}
  - expected on client: ${c(l)}
  Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
  You should fix the source of the mismatch.`;
    return oe(d, e, f), !0;
  }
  return !1;
}
function Kg(e) {
  return new Set(e.trim().split(/\s+/));
}
function Qx(e, t) {
  if (e.size !== t.size)
    return !1;
  for (const n of e)
    if (!t.has(n))
      return !1;
  return !0;
}
function Xg(e) {
  const t = /* @__PURE__ */ new Map();
  for (const n of e.split(";")) {
    let [s, o] = n.split(":");
    s = s.trim(), o = o && o.trim(), s && o && t.set(s, o);
  }
  return t;
}
function Zx(e, t) {
  if (e.size !== t.size)
    return !1;
  for (const [n, s] of e)
    if (s !== t.get(n))
      return !1;
  return !0;
}
function k1(e, t, n) {
  const s = e.subTree;
  if (e.getCssVars && (t === s || s && s.type === J && s.children.includes(t))) {
    const o = e.getCssVars();
    for (const i in o)
      n.set(
        `--${Yb(i, !1)}`,
        String(o[i])
      );
  }
  t === s && e.parent && k1(e.parent, e.vnode, n);
}
const qg = "data-allow-mismatch", D1 = {
  0: "text",
  1: "children",
  2: "class",
  3: "style",
  4: "attribute"
};
function Sl(e, t) {
  if (t === 0 || t === 1)
    for (; e && !e.hasAttribute(qg); )
      e = e.parentElement;
  const n = e && e.getAttribute(qg);
  if (n == null)
    return !1;
  if (n === "")
    return !0;
  {
    const s = n.split(",");
    return t === 0 && s.includes("children") ? !0 : n.split(",").includes(D1[t]);
  }
}
const eC = Ha().requestIdleCallback || ((e) => setTimeout(e, 1)), tC = Ha().cancelIdleCallback || ((e) => clearTimeout(e)), nC = (e = 1e4) => (t) => {
  const n = eC(t, { timeout: e });
  return () => tC(n);
};
function sC(e) {
  const { top: t, left: n, bottom: s, right: o } = e.getBoundingClientRect(), { innerHeight: i, innerWidth: r } = window;
  return (t > 0 && t < i || s > 0 && s < i) && (n > 0 && n < r || o > 0 && o < r);
}
const oC = (e) => (t, n) => {
  const s = new IntersectionObserver((o) => {
    for (const i of o)
      if (i.isIntersecting) {
        s.disconnect(), t();
        break;
      }
  }, e);
  return n((o) => {
    if (o instanceof Element) {
      if (sC(o))
        return t(), s.disconnect(), !1;
      s.observe(o);
    }
  }), () => s.disconnect();
}, rC = (e) => (t) => {
  if (e) {
    const n = matchMedia(e);
    if (n.matches)
      t();
    else
      return n.addEventListener("change", t, { once: !0 }), () => n.removeEventListener("change", t);
  }
}, iC = (e = []) => (t, n) => {
  We(e) && (e = [e]);
  let s = !1;
  const o = (r) => {
    s || (s = !0, i(), t(), r.target.dispatchEvent(new r.constructor(r.type, r)));
  }, i = () => {
    n((r) => {
      for (const a of e)
        r.removeEventListener(a, o);
    });
  };
  return n((r) => {
    for (const a of e)
      r.addEventListener(a, o, { once: !0 });
  }), i;
};
function aC(e, t) {
  if (ui(e) && e.data === "[") {
    let n = 1, s = e.nextSibling;
    for (; s; ) {
      if (s.nodeType === 1) {
        if (t(s) === !1)
          break;
      } else if (ui(s))
        if (s.data === "]") {
          if (--n === 0) break;
        } else s.data === "[" && n++;
      s = s.nextSibling;
    }
  } else
    t(e);
}
const Fr = (e) => !!e.type.__asyncLoader;
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function lC(e) {
  Le(e) && (e = { loader: e });
  const {
    loader: t,
    loadingComponent: n,
    errorComponent: s,
    delay: o = 200,
    hydrate: i,
    timeout: r,
    // undefined = never times out
    suspensible: a = !0,
    onError: l
  } = e;
  let c = null, d, f = 0;
  const p = () => (f++, c = null, h()), h = () => {
    let m;
    return c || (m = c = t().catch((v) => {
      if (v = v instanceof Error ? v : new Error(String(v)), l)
        return new Promise((g, _) => {
          l(v, () => g(p()), () => _(v), f + 1);
        });
      throw v;
    }).then((v) => {
      if (m !== c && c)
        return c;
      if (Y.NODE_ENV !== "production" && !v && oe(
        "Async component loader resolved to undefined. If you are using retry(), make sure to return its return value."
      ), v && (v.__esModule || v[Symbol.toStringTag] === "Module") && (v = v.default), Y.NODE_ENV !== "production" && v && !ft(v) && !Le(v))
        throw new Error(`Invalid async component load result: ${v}`);
      return d = v, v;
    }));
  };
  return /* @__PURE__ */ Cn({
    name: "AsyncComponentWrapper",
    __asyncLoader: h,
    __asyncHydrate(m, v, g) {
      const _ = i ? () => {
        const S = i(
          g,
          (b) => aC(m, b)
        );
        S && (v.bum || (v.bum = [])).push(S);
      } : g;
      d ? _() : h().then(() => !v.isUnmounted && _());
    },
    get __asyncResolved() {
      return d;
    },
    setup() {
      const m = pn;
      if (Qm(m), d)
        return () => Op(d, m);
      const v = (b) => {
        c = null, qr(
          b,
          m,
          13,
          !s
        );
      };
      if (a && m.suspense || Ta)
        return h().then((b) => () => Op(b, m)).catch((b) => (v(b), () => s ? F(s, {
          error: b
        }) : null));
      const g = L(!1), _ = L(), S = L(!!o);
      return o && setTimeout(() => {
        S.value = !1;
      }, o), r != null && setTimeout(() => {
        if (!g.value && !_.value) {
          const b = new Error(
            `Async component timed out after ${r}ms.`
          );
          v(b), _.value = b;
        }
      }, r), h().then(() => {
        g.value = !0, m.parent && Ya(m.parent.vnode) && m.parent.update();
      }).catch((b) => {
        v(b), _.value = b;
      }), () => {
        if (g.value && d)
          return Op(d, m);
        if (_.value && s)
          return F(s, {
            error: _.value
          });
        if (n && !S.value)
          return F(n);
      };
    }
  });
}
function Op(e, t) {
  const { ref: n, props: s, children: o, ce: i } = t.vnode, r = F(e, s, o);
  return r.ref = n, r.ce = i, delete t.vnode.ce, r;
}
const Ya = (e) => e.type.__isKeepAlive, cC = {
  name: "KeepAlive",
  // Marker for special handling inside the renderer. We are not using a ===
  // check directly on KeepAlive in the renderer, because importing it directly
  // would prevent it from being tree-shaken.
  __isKeepAlive: !0,
  props: {
    include: [String, RegExp, Array],
    exclude: [String, RegExp, Array],
    max: [String, Number]
  },
  setup(e, { slots: t }) {
    const n = un(), s = n.ctx;
    if (!s.renderer)
      return () => {
        const S = t.default && t.default();
        return S && S.length === 1 ? S[0] : S;
      };
    const o = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set();
    let r = null;
    Y.NODE_ENV !== "production" && (n.__v_cache = o);
    const a = n.suspense, {
      renderer: {
        p: l,
        m: c,
        um: d,
        o: { createElement: f }
      }
    } = s, p = f("div");
    s.activate = (S, b, O, w, N) => {
      const C = S.component;
      c(S, b, O, 0, a), l(
        C.vnode,
        S,
        b,
        O,
        C,
        a,
        w,
        S.slotScopeIds,
        N
      ), En(() => {
        C.isDeactivated = !1, C.a && Wo(C.a);
        const k = S.props && S.props.onVnodeMounted;
        k && cs(k, C.parent, S);
      }, a), Y.NODE_ENV !== "production" && _h(C);
    }, s.deactivate = (S) => {
      const b = S.component;
      gd(b.m), gd(b.a), c(S, p, null, 1, a), En(() => {
        b.da && Wo(b.da);
        const O = S.props && S.props.onVnodeUnmounted;
        O && cs(O, b.parent, S), b.isDeactivated = !0;
      }, a), Y.NODE_ENV !== "production" && _h(b);
    };
    function h(S) {
      xp(S), d(S, n, a, !0);
    }
    function m(S) {
      o.forEach((b, O) => {
        const w = ac(b.type);
        w && !S(w) && v(O);
      });
    }
    function v(S) {
      const b = o.get(S);
      b && (!r || !qs(b, r)) ? h(b) : r && xp(r), o.delete(S), i.delete(S);
    }
    ht(
      () => [e.include, e.exclude],
      ([S, b]) => {
        S && m((O) => wl(S, O)), b && m((O) => !wl(b, O));
      },
      // prune post-render after `current` has been updated
      { flush: "post", deep: !0 }
    );
    let g = null;
    const _ = () => {
      g != null && (_d(n.subTree.type) ? En(() => {
        o.set(g, au(n.subTree));
      }, n.subTree.suspense) : o.set(g, au(n.subTree)));
    };
    return Mt(_), hf(_), Wi(() => {
      o.forEach((S) => {
        const { subTree: b, suspense: O } = n, w = au(b);
        if (S.type === w.type && S.key === w.key) {
          xp(w);
          const N = w.component.da;
          N && En(N, O);
          return;
        }
        h(S);
      });
    }), () => {
      if (g = null, !t.default)
        return r = null;
      const S = t.default(), b = S[0];
      if (S.length > 1)
        return Y.NODE_ENV !== "production" && oe("KeepAlive should contain exactly one component child."), r = null, S;
      if (!Oo(b) || !(b.shapeFlag & 4) && !(b.shapeFlag & 128))
        return r = null, b;
      let O = au(b);
      if (O.type === zt)
        return r = null, O;
      const w = O.type, N = ac(
        Fr(O) ? O.type.__asyncResolved || {} : w
      ), { include: C, exclude: k, max: x } = e;
      if (C && (!N || !wl(C, N)) || k && N && wl(k, N))
        return O.shapeFlag &= -257, r = O, b;
      const $ = O.key == null ? w : O.key, M = o.get($);
      return O.el && (O = Vs(O), b.shapeFlag & 128 && (b.ssContent = O)), g = $, M ? (O.el = M.el, O.component = M.component, O.transition && ir(O, O.transition), O.shapeFlag |= 512, i.delete($), i.add($)) : (i.add($), x && i.size > parseInt(x, 10) && v(i.values().next().value)), O.shapeFlag |= 256, r = O, _d(b.type) ? b : O;
    };
  }
}, uC = cC;
function wl(e, t) {
  return Ne(e) ? e.some((n) => wl(n, t)) : We(e) ? e.split(",").includes(t) : Rb(e) ? (e.lastIndex = 0, e.test(t)) : !1;
}
function Zm(e, t) {
  I1(e, "a", t);
}
function ev(e, t) {
  I1(e, "da", t);
}
function I1(e, t, n = pn) {
  const s = e.__wdc || (e.__wdc = () => {
    let o = n;
    for (; o; ) {
      if (o.isDeactivated)
        return;
      o = o.parent;
    }
    return e();
  });
  if (pf(t, s, n), n) {
    let o = n.parent;
    for (; o && o.parent; )
      Ya(o.parent.vnode) && dC(s, t, n, o), o = o.parent;
  }
}
function dC(e, t, n, s) {
  const o = pf(
    t,
    e,
    s,
    !0
    /* prepend */
  );
  fr(() => {
    Qd(s[t], o);
  }, n);
}
function xp(e) {
  e.shapeFlag &= -257, e.shapeFlag &= -513;
}
function au(e) {
  return e.shapeFlag & 128 ? e.ssContent : e;
}
function pf(e, t, n = pn, s = !1) {
  if (n) {
    const o = n[e] || (n[e] = []), i = t.__weh || (t.__weh = (...r) => {
      cr();
      const a = ki(n), l = Ps(t, n, e, r);
      return a(), ur(), l;
    });
    return s ? o.unshift(i) : o.push(i), i;
  } else if (Y.NODE_ENV !== "production") {
    const o = zs(cf[e].replace(/ hook$/, ""));
    oe(
      `${o} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`
    );
  }
}
const dr = (e) => (t, n = pn) => {
  (!Ta || e === "sp") && pf(e, (...s) => t(...s), n);
}, R1 = dr("bm"), Mt = dr("m"), tv = dr(
  "bu"
), hf = dr("u"), Wi = dr(
  "bum"
), fr = dr("um"), A1 = dr(
  "sp"
), M1 = dr("rtg"), P1 = dr("rtc");
function V1(e, t = pn) {
  pf("ec", e, t);
}
const hd = "components", fC = "directives";
function be(e, t) {
  return sv(hd, e, !0, t) || e;
}
const nv = Symbol.for("v-ndc");
function oc(e) {
  return We(e) ? sv(hd, e, !1) || e : e || nv;
}
function Bt(e) {
  return sv(fC, e);
}
function sv(e, t, n = !0, s = !1) {
  const o = an || pn;
  if (o) {
    const i = o.type;
    if (e === hd) {
      const a = ac(
        i,
        !1
      );
      if (a && (a === t || a === Lt(t) || a === so(Lt(t))))
        return i;
    }
    const r = (
      // local registration
      // check instance[type] first which is resolved for options API
      Jg(o[e] || i[e], t) || // global registration
      Jg(o.appContext[e], t)
    );
    if (!r && s)
      return i;
    if (Y.NODE_ENV !== "production" && n && !r) {
      const a = e === hd ? `
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : "";
      oe(`Failed to resolve ${e.slice(0, -1)}: ${t}${a}`);
    }
    return r;
  } else Y.NODE_ENV !== "production" && oe(
    `resolve${so(e.slice(0, -1))} can only be used in render() or setup().`
  );
}
function Jg(e, t) {
  return e && (e[t] || e[Lt(t)] || e[so(Lt(t))]);
}
function Ee(e, t, n, s) {
  let o;
  const i = n && n[s], r = Ne(e);
  if (r || We(e)) {
    const a = r && Is(e);
    let l = !1;
    a && (l = !Wn(e), e = of(e)), o = new Array(e.length);
    for (let c = 0, d = e.length; c < d; c++)
      o[c] = t(
        l ? Un(e[c]) : e[c],
        c,
        void 0,
        i && i[c]
      );
  } else if (typeof e == "number") {
    Y.NODE_ENV !== "production" && !Number.isInteger(e) && oe(`The v-for range expect an integer value but got ${e}.`), o = new Array(e);
    for (let a = 0; a < e; a++)
      o[a] = t(a + 1, a, void 0, i && i[a]);
  } else if (ft(e))
    if (e[Symbol.iterator])
      o = Array.from(
        e,
        (a, l) => t(a, l, void 0, i && i[l])
      );
    else {
      const a = Object.keys(e);
      o = new Array(a.length);
      for (let l = 0, c = a.length; l < c; l++) {
        const d = a[l];
        o[l] = t(e[d], d, l, i && i[l]);
      }
    }
  else
    o = [];
  return n && (n[s] = o), o;
}
function pC(e, t) {
  for (let n = 0; n < t.length; n++) {
    const s = t[n];
    if (Ne(s))
      for (let o = 0; o < s.length; o++)
        e[s[o].name] = s[o].fn;
    else s && (e[s.name] = s.key ? (...o) => {
      const i = s.fn(...o);
      return i && (i.key = s.key), i;
    } : s.fn);
  }
  return e;
}
function ye(e, t, n = {}, s, o) {
  if (an.ce || an.parent && Fr(an.parent) && an.parent.ce)
    return t !== "default" && (n.name = t), y(), le(
      J,
      null,
      [F("slot", n, s && s())],
      64
    );
  let i = e[t];
  Y.NODE_ENV !== "production" && i && i.length > 1 && (oe(
    "SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."
  ), i = () => []), i && i._c && (i._d = !1), y();
  const r = i && ov(i(n)), a = n.key || // slot content array of a dynamic conditional slot may have a branch
  // key attached in the `createSlots` helper, respect that
  r && r.key, l = le(
    J,
    {
      key: (a && !ns(a) ? a : `_${t}`) + // #7256 force differentiate fallback content from actual content
      (!r && s ? "_fb" : "")
    },
    r || (s ? s() : []),
    r && e._ === 1 ? 64 : -2
  );
  return !o && l.scopeId && (l.slotScopeIds = [l.scopeId + "-s"]), i && i._c && (i._d = !0), l;
}
function ov(e) {
  return e.some((t) => Oo(t) ? !(t.type === zt || t.type === J && !ov(t.children)) : !0) ? e : null;
}
function hC(e, t) {
  const n = {};
  if (Y.NODE_ENV !== "production" && !ft(e))
    return oe("v-on with no argument expects an object value."), n;
  for (const s in e)
    n[t && /[A-Z]/.test(s) ? `on:${s}` : zs(s)] = e[s];
  return n;
}
const Eh = (e) => e ? yE(e) ? $c(e) : Eh(e.parent) : null, Si = (
  // Move PURE marker to new line to workaround compiler discarding it
  // due to type annotation
  /* @__PURE__ */ st(/* @__PURE__ */ Object.create(null), {
    $: (e) => e,
    $el: (e) => e.vnode.el,
    $data: (e) => e.data,
    $props: (e) => Y.NODE_ENV !== "production" ? Js(e.props) : e.props,
    $attrs: (e) => Y.NODE_ENV !== "production" ? Js(e.attrs) : e.attrs,
    $slots: (e) => Y.NODE_ENV !== "production" ? Js(e.slots) : e.slots,
    $refs: (e) => Y.NODE_ENV !== "production" ? Js(e.refs) : e.refs,
    $parent: (e) => Eh(e.parent),
    $root: (e) => Eh(e.root),
    $host: (e) => e.ce,
    $emit: (e) => e.emit,
    $options: (e) => iv(e),
    $forceUpdate: (e) => e.f || (e.f = () => {
      uf(e.update);
    }),
    $nextTick: (e) => e.n || (e.n = rr.bind(e.proxy)),
    $watch: (e) => eT.bind(e)
  })
), rv = (e) => e === "_" || e === "$", Cp = (e, t) => e !== ut && !e.__isScriptSetup && Et(e, t), Rl = {
  get({ _: e }, t) {
    if (t === "__v_skip")
      return !0;
    const { ctx: n, setupState: s, data: o, props: i, accessCache: r, type: a, appContext: l } = e;
    if (Y.NODE_ENV !== "production" && t === "__isVue")
      return !0;
    let c;
    if (t[0] !== "$") {
      const h = r[t];
      if (h !== void 0)
        switch (h) {
          case 1:
            return s[t];
          case 2:
            return o[t];
          case 4:
            return n[t];
          case 3:
            return i[t];
        }
      else {
        if (Cp(s, t))
          return r[t] = 1, s[t];
        if (o !== ut && Et(o, t))
          return r[t] = 2, o[t];
        if (
          // only cache other properties when instance has declared (thus stable)
          // props
          (c = e.propsOptions[0]) && Et(c, t)
        )
          return r[t] = 3, i[t];
        if (n !== ut && Et(n, t))
          return r[t] = 4, n[t];
        Sh && (r[t] = 0);
      }
    }
    const d = Si[t];
    let f, p;
    if (d)
      return t === "$attrs" ? (Sn(e.attrs, "get", ""), Y.NODE_ENV !== "production" && yd()) : Y.NODE_ENV !== "production" && t === "$slots" && Sn(e, "get", t), d(e);
    if (
      // css module (injected by vue-loader)
      (f = a.__cssModules) && (f = f[t])
    )
      return f;
    if (n !== ut && Et(n, t))
      return r[t] = 4, n[t];
    if (
      // global properties
      p = l.config.globalProperties, Et(p, t)
    )
      return p[t];
    Y.NODE_ENV !== "production" && an && (!We(t) || // #1091 avoid internal isRef/isVNode checks on component instance leading
    // to infinite warning loop
    t.indexOf("__v") !== 0) && (o !== ut && rv(t[0]) && Et(o, t) ? oe(
      `Property ${JSON.stringify(
        t
      )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
    ) : e === an && oe(
      `Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`
    ));
  },
  set({ _: e }, t, n) {
    const { data: s, setupState: o, ctx: i } = e;
    return Cp(o, t) ? (o[t] = n, !0) : Y.NODE_ENV !== "production" && o.__isScriptSetup && Et(o, t) ? (oe(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : s !== ut && Et(s, t) ? (s[t] = n, !0) : Et(e.props, t) ? (Y.NODE_ENV !== "production" && oe(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (Y.NODE_ENV !== "production" && oe(
      `Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`
    ), !1) : (Y.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(i, t, {
      enumerable: !0,
      configurable: !0,
      value: n
    }) : i[t] = n, !0);
  },
  has({
    _: { data: e, setupState: t, accessCache: n, ctx: s, appContext: o, propsOptions: i }
  }, r) {
    let a;
    return !!n[r] || e !== ut && Et(e, r) || Cp(t, r) || (a = i[0]) && Et(a, r) || Et(s, r) || Et(Si, r) || Et(o.config.globalProperties, r);
  },
  defineProperty(e, t, n) {
    return n.get != null ? e._.accessCache[t] = 0 : Et(n, "value") && this.set(e, t, n.value, null), Reflect.defineProperty(e, t, n);
  }
};
Y.NODE_ENV !== "production" && (Rl.ownKeys = (e) => (oe(
  "Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."
), Reflect.ownKeys(e)));
const mC = /* @__PURE__ */ st({}, Rl, {
  get(e, t) {
    if (t !== Symbol.unscopables)
      return Rl.get(e, t, e);
  },
  has(e, t) {
    const n = t[0] !== "_" && !Im(t);
    return Y.NODE_ENV !== "production" && !n && Rl.has(e, t) && oe(
      `Property ${JSON.stringify(
        t
      )} should not start with _ which is a reserved prefix for Vue internals.`
    ), n;
  }
});
function vC(e) {
  const t = {};
  return Object.defineProperty(t, "_", {
    configurable: !0,
    enumerable: !1,
    get: () => e
  }), Object.keys(Si).forEach((n) => {
    Object.defineProperty(t, n, {
      configurable: !0,
      enumerable: !1,
      get: () => Si[n](e),
      // intercepted by the proxy so no need for implementation,
      // but needed to prevent set errors
      set: Gt
    });
  }), t;
}
function gC(e) {
  const {
    ctx: t,
    propsOptions: [n]
  } = e;
  n && Object.keys(n).forEach((s) => {
    Object.defineProperty(t, s, {
      enumerable: !0,
      configurable: !0,
      get: () => e.props[s],
      set: Gt
    });
  });
}
function yC(e) {
  const { ctx: t, setupState: n } = e;
  Object.keys(He(n)).forEach((s) => {
    if (!n.__isScriptSetup) {
      if (rv(s[0])) {
        oe(
          `setup() return property ${JSON.stringify(
            s
          )} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
        );
        return;
      }
      Object.defineProperty(t, s, {
        enumerable: !0,
        configurable: !0,
        get: () => n[s],
        set: Gt
      });
    }
  });
}
const Gi = (e) => oe(
  `${e}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
);
function _C() {
  return Y.NODE_ENV !== "production" && Gi("defineProps"), null;
}
function bC() {
  return Y.NODE_ENV !== "production" && Gi("defineEmits"), null;
}
function EC(e) {
  Y.NODE_ENV !== "production" && Gi("defineExpose");
}
function SC(e) {
  Y.NODE_ENV !== "production" && Gi("defineOptions");
}
function wC() {
  return Y.NODE_ENV !== "production" && Gi("defineSlots"), null;
}
function NC() {
  Y.NODE_ENV !== "production" && Gi("defineModel");
}
function OC(e, t) {
  return Y.NODE_ENV !== "production" && Gi("withDefaults"), null;
}
function L1() {
  return F1().slots;
}
function xC() {
  return F1().attrs;
}
function F1() {
  const e = un();
  return Y.NODE_ENV !== "production" && !e && oe("useContext() called without active instance."), e.setupContext || (e.setupContext = EE(e));
}
function rc(e) {
  return Ne(e) ? e.reduce(
    (t, n) => (t[n] = null, t),
    {}
  ) : e;
}
function CC(e, t) {
  const n = rc(e);
  for (const s in t) {
    if (s.startsWith("__skip")) continue;
    let o = n[s];
    o ? Ne(o) || Le(o) ? o = n[s] = { type: o, default: t[s] } : o.default = t[s] : o === null ? o = n[s] = { default: t[s] } : Y.NODE_ENV !== "production" && oe(`props default key "${s}" has no corresponding declaration.`), o && t[`__skip_${s}`] && (o.skipFactory = !0);
  }
  return n;
}
function bs(e, t) {
  return !e || !t ? e || t : Ne(e) && Ne(t) ? e.concat(t) : st({}, rc(e), rc(t));
}
function TC(e, t) {
  const n = {};
  for (const s in e)
    t.includes(s) || Object.defineProperty(n, s, {
      enumerable: !0,
      get: () => e[s]
    });
  return n;
}
function $C(e) {
  const t = un();
  Y.NODE_ENV !== "production" && !t && oe(
    "withAsyncContext called without active current instance. This is likely a bug."
  );
  let n = e();
  return Dh(), Nc(n) && (n = n.catch((s) => {
    throw ki(t), s;
  })), [n, () => ki(t)];
}
function kC() {
  const e = /* @__PURE__ */ Object.create(null);
  return (t, n) => {
    e[n] ? oe(`${t} property "${n}" is already defined in ${e[n]}.`) : e[n] = t;
  };
}
let Sh = !0;
function DC(e) {
  const t = iv(e), n = e.proxy, s = e.ctx;
  Sh = !1, t.beforeCreate && Qg(t.beforeCreate, e, "bc");
  const {
    // state
    data: o,
    computed: i,
    methods: r,
    watch: a,
    provide: l,
    inject: c,
    // lifecycle
    created: d,
    beforeMount: f,
    mounted: p,
    beforeUpdate: h,
    updated: m,
    activated: v,
    deactivated: g,
    beforeDestroy: _,
    beforeUnmount: S,
    destroyed: b,
    unmounted: O,
    render: w,
    renderTracked: N,
    renderTriggered: C,
    errorCaptured: k,
    serverPrefetch: x,
    // public API
    expose: $,
    inheritAttrs: M,
    // assets
    components: R,
    directives: V,
    filters: j
  } = t, U = Y.NODE_ENV !== "production" ? kC() : null;
  if (Y.NODE_ENV !== "production") {
    const [G] = e.propsOptions;
    if (G)
      for (const X in G)
        U("Props", X);
  }
  if (c && IC(c, s, U), r)
    for (const G in r) {
      const X = r[G];
      Le(X) ? (Y.NODE_ENV !== "production" ? Object.defineProperty(s, G, {
        value: X.bind(n),
        configurable: !0,
        enumerable: !0,
        writable: !0
      }) : s[G] = X.bind(n), Y.NODE_ENV !== "production" && U("Methods", G)) : Y.NODE_ENV !== "production" && oe(
        `Method "${G}" has type "${typeof X}" in the component definition. Did you reference the function correctly?`
      );
    }
  if (o) {
    Y.NODE_ENV !== "production" && !Le(o) && oe(
      "The data option must be a function. Plain object usage is no longer supported."
    );
    const G = o.call(n, n);
    if (Y.NODE_ENV !== "production" && Nc(G) && oe(
      "data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."
    ), !ft(G))
      Y.NODE_ENV !== "production" && oe("data() should return an object.");
    else if (e.data = mt(G), Y.NODE_ENV !== "production")
      for (const X in G)
        U("Data", X), rv(X[0]) || Object.defineProperty(s, X, {
          configurable: !0,
          enumerable: !0,
          get: () => G[X],
          set: Gt
        });
  }
  if (Sh = !0, i)
    for (const G in i) {
      const X = i[G], te = Le(X) ? X.bind(n, n) : Le(X.get) ? X.get.bind(n, n) : Gt;
      Y.NODE_ENV !== "production" && te === Gt && oe(`Computed property "${G}" has no getter.`);
      const $e = !Le(X) && Le(X.set) ? X.set.bind(n) : Y.NODE_ENV !== "production" ? () => {
        oe(
          `Write operation failed: computed property "${G}" is readonly.`
        );
      } : Gt, Ge = I({
        get: te,
        set: $e
      });
      Object.defineProperty(s, G, {
        enumerable: !0,
        configurable: !0,
        get: () => Ge.value,
        set: (Ye) => Ge.value = Ye
      }), Y.NODE_ENV !== "production" && U("Computed", G);
    }
  if (a)
    for (const G in a)
      U1(a[G], s, n, G);
  if (l) {
    const G = Le(l) ? l.call(n) : l;
    Reflect.ownKeys(G).forEach((X) => {
      wn(X, G[X]);
    });
  }
  d && Qg(d, e, "c");
  function A(G, X) {
    Ne(X) ? X.forEach((te) => G(te.bind(n))) : X && G(X.bind(n));
  }
  if (A(R1, f), A(Mt, p), A(tv, h), A(hf, m), A(Zm, v), A(ev, g), A(V1, k), A(P1, N), A(M1, C), A(Wi, S), A(fr, O), A(A1, x), Ne($))
    if ($.length) {
      const G = e.exposed || (e.exposed = {});
      $.forEach((X) => {
        Object.defineProperty(G, X, {
          get: () => n[X],
          set: (te) => n[X] = te
        });
      });
    } else e.exposed || (e.exposed = {});
  w && e.render === Gt && (e.render = w), M != null && (e.inheritAttrs = M), R && (e.components = R), V && (e.directives = V), x && Qm(e);
}
function IC(e, t, n = Gt) {
  Ne(e) && (e = wh(e));
  for (const s in e) {
    const o = e[s];
    let i;
    ft(o) ? "default" in o ? i = Ie(
      o.from || s,
      o.default,
      !0
    ) : i = Ie(o.from || s) : i = Ie(o), lt(i) ? Object.defineProperty(t, s, {
      enumerable: !0,
      configurable: !0,
      get: () => i.value,
      set: (r) => i.value = r
    }) : t[s] = i, Y.NODE_ENV !== "production" && n("Inject", s);
  }
}
function Qg(e, t, n) {
  Ps(
    Ne(e) ? e.map((s) => s.bind(t.proxy)) : e.bind(t.proxy),
    t,
    n
  );
}
function U1(e, t, n, s) {
  let o = s.includes(".") ? iE(n, s) : () => n[s];
  if (We(e)) {
    const i = t[e];
    Le(i) ? ht(o, i) : Y.NODE_ENV !== "production" && oe(`Invalid watch handler specified by key "${e}"`, i);
  } else if (Le(e))
    ht(o, e.bind(n));
  else if (ft(e))
    if (Ne(e))
      e.forEach((i) => U1(i, t, n, s));
    else {
      const i = Le(e.handler) ? e.handler.bind(n) : t[e.handler];
      Le(i) ? ht(o, i, e) : Y.NODE_ENV !== "production" && oe(`Invalid watch handler specified by key "${e.handler}"`, i);
    }
  else Y.NODE_ENV !== "production" && oe(`Invalid watch option: "${s}"`, e);
}
function iv(e) {
  const t = e.type, { mixins: n, extends: s } = t, {
    mixins: o,
    optionsCache: i,
    config: { optionMergeStrategies: r }
  } = e.appContext, a = i.get(t);
  let l;
  return a ? l = a : !o.length && !n && !s ? l = t : (l = {}, o.length && o.forEach(
    (c) => md(l, c, r, !0)
  ), md(l, t, r)), ft(t) && i.set(t, l), l;
}
function md(e, t, n, s = !1) {
  const { mixins: o, extends: i } = t;
  i && md(e, i, n, !0), o && o.forEach(
    (r) => md(e, r, n, !0)
  );
  for (const r in t)
    if (s && r === "expose")
      Y.NODE_ENV !== "production" && oe(
        '"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.'
      );
    else {
      const a = RC[r] || n && n[r];
      e[r] = a ? a(e[r], t[r]) : t[r];
    }
  return e;
}
const RC = {
  data: Zg,
  props: ey,
  emits: ey,
  // objects
  methods: Nl,
  computed: Nl,
  // lifecycle
  beforeCreate: Xn,
  created: Xn,
  beforeMount: Xn,
  mounted: Xn,
  beforeUpdate: Xn,
  updated: Xn,
  beforeDestroy: Xn,
  beforeUnmount: Xn,
  destroyed: Xn,
  unmounted: Xn,
  activated: Xn,
  deactivated: Xn,
  errorCaptured: Xn,
  serverPrefetch: Xn,
  // assets
  components: Nl,
  directives: Nl,
  // watch
  watch: MC,
  // provide / inject
  provide: Zg,
  inject: AC
};
function Zg(e, t) {
  return t ? e ? function() {
    return st(
      Le(e) ? e.call(this, this) : e,
      Le(t) ? t.call(this, this) : t
    );
  } : t : e;
}
function AC(e, t) {
  return Nl(wh(e), wh(t));
}
function wh(e) {
  if (Ne(e)) {
    const t = {};
    for (let n = 0; n < e.length; n++)
      t[e[n]] = e[n];
    return t;
  }
  return e;
}
function Xn(e, t) {
  return e ? [...new Set([].concat(e, t))] : t;
}
function Nl(e, t) {
  return e ? st(/* @__PURE__ */ Object.create(null), e, t) : t;
}
function ey(e, t) {
  return e ? Ne(e) && Ne(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : st(
    /* @__PURE__ */ Object.create(null),
    rc(e),
    rc(t ?? {})
  ) : t;
}
function MC(e, t) {
  if (!e) return t;
  if (!t) return e;
  const n = st(/* @__PURE__ */ Object.create(null), e);
  for (const s in t)
    n[s] = Xn(e[s], t[s]);
  return n;
}
function j1() {
  return {
    app: null,
    config: {
      isNativeTag: da,
      performance: !1,
      globalProperties: {},
      optionMergeStrategies: {},
      errorHandler: void 0,
      warnHandler: void 0,
      compilerOptions: {}
    },
    mixins: [],
    components: {},
    directives: {},
    provides: /* @__PURE__ */ Object.create(null),
    optionsCache: /* @__PURE__ */ new WeakMap(),
    propsCache: /* @__PURE__ */ new WeakMap(),
    emitsCache: /* @__PURE__ */ new WeakMap()
  };
}
let PC = 0;
function VC(e, t) {
  return function(s, o = null) {
    Le(s) || (s = st({}, s)), o != null && !ft(o) && (Y.NODE_ENV !== "production" && oe("root props passed to app.mount() must be an object."), o = null);
    const i = j1(), r = /* @__PURE__ */ new WeakSet(), a = [];
    let l = !1;
    const c = i.app = {
      _uid: PC++,
      _component: s,
      _props: o,
      _container: null,
      _context: i,
      _instance: null,
      version: Mh,
      get config() {
        return i.config;
      },
      set config(d) {
        Y.NODE_ENV !== "production" && oe(
          "app.config cannot be replaced. Modify individual options instead."
        );
      },
      use(d, ...f) {
        return r.has(d) ? Y.NODE_ENV !== "production" && oe("Plugin has already been applied to target app.") : d && Le(d.install) ? (r.add(d), d.install(c, ...f)) : Le(d) ? (r.add(d), d(c, ...f)) : Y.NODE_ENV !== "production" && oe(
          'A plugin must either be a function or an object with an "install" function.'
        ), c;
      },
      mixin(d) {
        return i.mixins.includes(d) ? Y.NODE_ENV !== "production" && oe(
          "Mixin has already been applied to target app" + (d.name ? `: ${d.name}` : "")
        ) : i.mixins.push(d), c;
      },
      component(d, f) {
        return Y.NODE_ENV !== "production" && Ih(d, i.config), f ? (Y.NODE_ENV !== "production" && i.components[d] && oe(`Component "${d}" has already been registered in target app.`), i.components[d] = f, c) : i.components[d];
      },
      directive(d, f) {
        return Y.NODE_ENV !== "production" && b1(d), f ? (Y.NODE_ENV !== "production" && i.directives[d] && oe(`Directive "${d}" has already been registered in target app.`), i.directives[d] = f, c) : i.directives[d];
      },
      mount(d, f, p) {
        if (l)
          Y.NODE_ENV !== "production" && oe(
            "App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`"
          );
        else {
          Y.NODE_ENV !== "production" && d.__vue_app__ && oe(
            "There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first."
          );
          const h = c._ceVNode || F(s, o);
          return h.appContext = i, p === !0 ? p = "svg" : p === !1 && (p = void 0), Y.NODE_ENV !== "production" && (i.reload = () => {
            e(
              Vs(h),
              d,
              p
            );
          }), f && t ? t(h, d) : e(h, d, p), l = !0, c._container = d, d.__vue_app__ = c, Y.NODE_ENV !== "production" && (c._instance = h.component, Mx(c, Mh)), $c(h.component);
        }
      },
      onUnmount(d) {
        Y.NODE_ENV !== "production" && typeof d != "function" && oe(
          `Expected function as first argument to app.onUnmount(), but got ${typeof d}`
        ), a.push(d);
      },
      unmount() {
        l ? (Ps(
          a,
          c._instance,
          16
        ), e(null, c._container), Y.NODE_ENV !== "production" && (c._instance = null, Px(c)), delete c._container.__vue_app__) : Y.NODE_ENV !== "production" && oe("Cannot unmount an app that is not mounted.");
      },
      provide(d, f) {
        return Y.NODE_ENV !== "production" && d in i.provides && oe(
          `App already provides property with key "${String(d)}". It will be overwritten with the new value.`
        ), i.provides[d] = f, c;
      },
      runWithContext(d) {
        const f = wi;
        wi = c;
        try {
          return d();
        } finally {
          wi = f;
        }
      }
    };
    return c;
  };
}
let wi = null;
function wn(e, t) {
  if (!pn)
    Y.NODE_ENV !== "production" && oe("provide() can only be used inside setup().");
  else {
    let n = pn.provides;
    const s = pn.parent && pn.parent.provides;
    s === n && (n = pn.provides = Object.create(s)), n[e] = t;
  }
}
function Ie(e, t, n = !1) {
  const s = pn || an;
  if (s || wi) {
    const o = wi ? wi._context.provides : s ? s.parent == null ? s.vnode.appContext && s.vnode.appContext.provides : s.parent.provides : void 0;
    if (o && e in o)
      return o[e];
    if (arguments.length > 1)
      return n && Le(t) ? t.call(s && s.proxy) : t;
    Y.NODE_ENV !== "production" && oe(`injection "${String(e)}" not found.`);
  } else Y.NODE_ENV !== "production" && oe("inject() can only be used inside setup() or functional components.");
}
function B1() {
  return !!(pn || an || wi);
}
const H1 = {}, Y1 = () => Object.create(H1), W1 = (e) => Object.getPrototypeOf(e) === H1;
function LC(e, t, n, s = !1) {
  const o = {}, i = Y1();
  e.propsDefaults = /* @__PURE__ */ Object.create(null), G1(e, t, o, i);
  for (const r in e.propsOptions[0])
    r in o || (o[r] = void 0);
  Y.NODE_ENV !== "production" && K1(t || {}, o, e), n ? e.props = s ? o : Hm(o) : e.type.props ? e.props = o : e.props = i, e.attrs = i;
}
function FC(e) {
  for (; e; ) {
    if (e.type.__hmrId) return !0;
    e = e.parent;
  }
}
function UC(e, t, n, s) {
  const {
    props: o,
    attrs: i,
    vnode: { patchFlag: r }
  } = e, a = He(o), [l] = e.propsOptions;
  let c = !1;
  if (
    // always force full diff in dev
    // - #1942 if hmr is enabled with sfc component
    // - vite#872 non-sfc component used by sfc component
    !(Y.NODE_ENV !== "production" && FC(e)) && (s || r > 0) && !(r & 16)
  ) {
    if (r & 8) {
      const d = e.vnode.dynamicProps;
      for (let f = 0; f < d.length; f++) {
        let p = d[f];
        if (mf(e.emitsOptions, p))
          continue;
        const h = t[p];
        if (l)
          if (Et(i, p))
            h !== i[p] && (i[p] = h, c = !0);
          else {
            const m = Lt(p);
            o[m] = Nh(
              l,
              a,
              m,
              h,
              e,
              !1
            );
          }
        else
          h !== i[p] && (i[p] = h, c = !0);
      }
    }
  } else {
    G1(e, t, o, i) && (c = !0);
    let d;
    for (const f in a)
      (!t || // for camelCase
      !Et(t, f) && // it's possible the original props was passed in as kebab-case
      // and converted to camelCase (#955)
      ((d = Mn(f)) === f || !Et(t, d))) && (l ? n && // for camelCase
      (n[f] !== void 0 || // for kebab-case
      n[d] !== void 0) && (o[f] = Nh(
        l,
        a,
        f,
        void 0,
        e,
        !0
      )) : delete o[f]);
    if (i !== a)
      for (const f in i)
        (!t || !Et(t, f)) && (delete i[f], c = !0);
  }
  c && vo(e.attrs, "set", ""), Y.NODE_ENV !== "production" && K1(t || {}, o, e);
}
function G1(e, t, n, s) {
  const [o, i] = e.propsOptions;
  let r = !1, a;
  if (t)
    for (let l in t) {
      if (Zo(l))
        continue;
      const c = t[l];
      let d;
      o && Et(o, d = Lt(l)) ? !i || !i.includes(d) ? n[d] = c : (a || (a = {}))[d] = c : mf(e.emitsOptions, l) || (!(l in s) || c !== s[l]) && (s[l] = c, r = !0);
    }
  if (i) {
    const l = He(n), c = a || ut;
    for (let d = 0; d < i.length; d++) {
      const f = i[d];
      n[f] = Nh(
        o,
        l,
        f,
        c[f],
        e,
        !Et(c, f)
      );
    }
  }
  return r;
}
function Nh(e, t, n, s, o, i) {
  const r = e[n];
  if (r != null) {
    const a = Et(r, "default");
    if (a && s === void 0) {
      const l = r.default;
      if (r.type !== Function && !r.skipFactory && Le(l)) {
        const { propsDefaults: c } = o;
        if (n in c)
          s = c[n];
        else {
          const d = ki(o);
          s = c[n] = l.call(
            null,
            t
          ), d();
        }
      } else
        s = l;
      o.ce && o.ce._setProp(n, s);
    }
    r[
      0
      /* shouldCast */
    ] && (i && !a ? s = !1 : r[
      1
      /* shouldCastTrue */
    ] && (s === "" || s === Mn(n)) && (s = !0));
  }
  return s;
}
const jC = /* @__PURE__ */ new WeakMap();
function z1(e, t, n = !1) {
  const s = n ? jC : t.propsCache, o = s.get(e);
  if (o)
    return o;
  const i = e.props, r = {}, a = [];
  let l = !1;
  if (!Le(e)) {
    const d = (f) => {
      l = !0;
      const [p, h] = z1(f, t, !0);
      st(r, p), h && a.push(...h);
    };
    !n && t.mixins.length && t.mixins.forEach(d), e.extends && d(e.extends), e.mixins && e.mixins.forEach(d);
  }
  if (!i && !l)
    return ft(e) && s.set(e, yi), yi;
  if (Ne(i))
    for (let d = 0; d < i.length; d++) {
      Y.NODE_ENV !== "production" && !We(i[d]) && oe("props must be strings when using array syntax.", i[d]);
      const f = Lt(i[d]);
      ty(f) && (r[f] = ut);
    }
  else if (i) {
    Y.NODE_ENV !== "production" && !ft(i) && oe("invalid props options", i);
    for (const d in i) {
      const f = Lt(d);
      if (ty(f)) {
        const p = i[d], h = r[f] = Ne(p) || Le(p) ? { type: p } : st({}, p), m = h.type;
        let v = !1, g = !0;
        if (Ne(m))
          for (let _ = 0; _ < m.length; ++_) {
            const S = m[_], b = Le(S) && S.name;
            if (b === "Boolean") {
              v = !0;
              break;
            } else b === "String" && (g = !1);
          }
        else
          v = Le(m) && m.name === "Boolean";
        h[
          0
          /* shouldCast */
        ] = v, h[
          1
          /* shouldCastTrue */
        ] = g, (v || Et(h, "default")) && a.push(f);
      }
    }
  }
  const c = [r, a];
  return ft(e) && s.set(e, c), c;
}
function ty(e) {
  return e[0] !== "$" && !Zo(e) ? !0 : (Y.NODE_ENV !== "production" && oe(`Invalid prop name: "${e}" is a reserved property.`), !1);
}
function BC(e) {
  return e === null ? "null" : typeof e == "function" ? e.name || "" : typeof e == "object" && e.constructor && e.constructor.name || "";
}
function K1(e, t, n) {
  const s = He(t), o = n.propsOptions[0], i = Object.keys(e).map((r) => Lt(r));
  for (const r in o) {
    let a = o[r];
    a != null && HC(
      r,
      s[r],
      a,
      Y.NODE_ENV !== "production" ? Js(s) : s,
      !i.includes(r)
    );
  }
}
function HC(e, t, n, s, o) {
  const { type: i, required: r, validator: a, skipCheck: l } = n;
  if (r && o) {
    oe('Missing required prop: "' + e + '"');
    return;
  }
  if (!(t == null && !r)) {
    if (i != null && i !== !0 && !l) {
      let c = !1;
      const d = Ne(i) ? i : [i], f = [];
      for (let p = 0; p < d.length && !c; p++) {
        const { valid: h, expectedType: m } = WC(t, d[p]);
        f.push(m || ""), c = h;
      }
      if (!c) {
        oe(GC(e, t, f));
        return;
      }
    }
    a && !a(t, s) && oe('Invalid prop: custom validator check failed for prop "' + e + '".');
  }
}
const YC = /* @__PURE__ */ bn(
  "String,Number,Boolean,Function,Symbol,BigInt"
);
function WC(e, t) {
  let n;
  const s = BC(t);
  if (s === "null")
    n = e === null;
  else if (YC(s)) {
    const o = typeof e;
    n = o === s.toLowerCase(), !n && o === "object" && (n = e instanceof t);
  } else s === "Object" ? n = ft(e) : s === "Array" ? n = Ne(e) : n = e instanceof t;
  return {
    valid: n,
    expectedType: s
  };
}
function GC(e, t, n) {
  if (n.length === 0)
    return `Prop type [] for prop "${e}" won't match anything. Did you mean to use type Array instead?`;
  let s = `Invalid prop: type check failed for prop "${e}". Expected ${n.map(so).join(" | ")}`;
  const o = n[0], i = Zd(t), r = ny(t, o), a = ny(t, i);
  return n.length === 1 && sy(o) && !zC(o, i) && (s += ` with value ${r}`), s += `, got ${i} `, sy(i) && (s += `with value ${a}.`), s;
}
function ny(e, t) {
  return t === "String" ? `"${e}"` : t === "Number" ? `${Number(e)}` : `${e}`;
}
function sy(e) {
  return ["string", "number", "boolean"].some((n) => e.toLowerCase() === n);
}
function zC(...e) {
  return e.some((t) => t.toLowerCase() === "boolean");
}
const X1 = (e) => e[0] === "_" || e === "$stable", av = (e) => Ne(e) ? e.map(Zn) : [Zn(e)], KC = (e, t, n) => {
  if (t._n)
    return t;
  const s = K((...o) => (Y.NODE_ENV !== "production" && pn && (!n || n.root === pn.root) && oe(
    `Slot "${e}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
  ), av(t(...o))), n);
  return s._c = !1, s;
}, q1 = (e, t, n) => {
  const s = e._ctx;
  for (const o in e) {
    if (X1(o)) continue;
    const i = e[o];
    if (Le(i))
      t[o] = KC(o, i, s);
    else if (i != null) {
      Y.NODE_ENV !== "production" && oe(
        `Non-function value encountered for slot "${o}". Prefer function slots for better performance.`
      );
      const r = av(i);
      t[o] = () => r;
    }
  }
}, J1 = (e, t) => {
  Y.NODE_ENV !== "production" && !Ya(e.vnode) && oe(
    "Non-function value encountered for default slot. Prefer function slots for better performance."
  );
  const n = av(t);
  e.slots.default = () => n;
}, Oh = (e, t, n) => {
  for (const s in t)
    (n || s !== "_") && (e[s] = t[s]);
}, XC = (e, t, n) => {
  const s = e.slots = Y1();
  if (e.vnode.shapeFlag & 32) {
    const o = t._;
    o ? (Oh(s, t, n), n && Ci(s, "_", o, !0)) : q1(t, s);
  } else t && J1(e, t);
}, qC = (e, t, n) => {
  const { vnode: s, slots: o } = e;
  let i = !0, r = ut;
  if (s.shapeFlag & 32) {
    const a = t._;
    a ? Y.NODE_ENV !== "production" && Qs ? (Oh(o, t, n), vo(e, "set", "$slots")) : n && a === 1 ? i = !1 : Oh(o, t, n) : (i = !t.$stable, q1(t, o)), r = t;
  } else t && (J1(e, t), r = { default: 1 });
  if (i)
    for (const a in o)
      !X1(a) && r[a] == null && delete o[a];
};
let il, Dr;
function Fo(e, t) {
  e.appContext.config.performance && vd() && Dr.mark(`vue-${t}-${e.uid}`), Y.NODE_ENV !== "production" && Fx(e, t, vd() ? Dr.now() : Date.now());
}
function Uo(e, t) {
  if (e.appContext.config.performance && vd()) {
    const n = `vue-${t}-${e.uid}`, s = n + ":end";
    Dr.mark(s), Dr.measure(
      `<${yf(e, e.type)}> ${t}`,
      n,
      s
    ), Dr.clearMarks(n), Dr.clearMarks(s);
  }
  Y.NODE_ENV !== "production" && Ux(e, t, vd() ? Dr.now() : Date.now());
}
function vd() {
  return il !== void 0 || (typeof window < "u" && window.performance ? (il = !0, Dr = window.performance) : il = !1), il;
}
function JC() {
  const e = [];
  if (Y.NODE_ENV !== "production" && e.length) {
    const t = e.length > 1;
    console.warn(
      `Feature flag${t ? "s" : ""} ${e.join(", ")} ${t ? "are" : "is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.

For more details, see https://link.vuejs.org/feature-flags.`
    );
  }
}
const En = dE;
function Q1(e) {
  return eE(e);
}
function Z1(e) {
  return eE(e, qx);
}
function eE(e, t) {
  JC();
  const n = Ha();
  n.__VUE__ = !0, Y.NODE_ENV !== "production" && Km(n.__VUE_DEVTOOLS_GLOBAL_HOOK__, n);
  const {
    insert: s,
    remove: o,
    patchProp: i,
    createElement: r,
    createText: a,
    createComment: l,
    setText: c,
    setElementText: d,
    parentNode: f,
    nextSibling: p,
    setScopeId: h = Gt,
    insertStaticContent: m
  } = e, v = (D, B, Q, ne = null, ie = null, ce = null, ve = void 0, fe = null, pe = Y.NODE_ENV !== "production" && Qs ? !1 : !!B.dynamicChildren) => {
    if (D === B)
      return;
    D && !qs(D, B) && (ne = _e(D), et(D, ie, ce, !0), D = null), B.patchFlag === -2 && (pe = !1, B.dynamicChildren = null);
    const { type: ue, ref: je, shapeFlag: Se } = B;
    switch (ue) {
      case bo:
        g(D, B, Q, ne);
        break;
      case zt:
        _(D, B, Q, ne);
        break;
      case Ur:
        D == null ? S(B, Q, ne, ve) : Y.NODE_ENV !== "production" && b(D, B, Q, ve);
        break;
      case J:
        V(
          D,
          B,
          Q,
          ne,
          ie,
          ce,
          ve,
          fe,
          pe
        );
        break;
      default:
        Se & 1 ? N(
          D,
          B,
          Q,
          ne,
          ie,
          ce,
          ve,
          fe,
          pe
        ) : Se & 6 ? j(
          D,
          B,
          Q,
          ne,
          ie,
          ce,
          ve,
          fe,
          pe
        ) : Se & 64 || Se & 128 ? ue.process(
          D,
          B,
          Q,
          ne,
          ie,
          ce,
          ve,
          fe,
          pe,
          Ze
        ) : Y.NODE_ENV !== "production" && oe("Invalid VNode type:", ue, `(${typeof ue})`);
    }
    je != null && ie && sc(je, D && D.ref, ce, B || D, !B);
  }, g = (D, B, Q, ne) => {
    if (D == null)
      s(
        B.el = a(B.children),
        Q,
        ne
      );
    else {
      const ie = B.el = D.el;
      B.children !== D.children && c(ie, B.children);
    }
  }, _ = (D, B, Q, ne) => {
    D == null ? s(
      B.el = l(B.children || ""),
      Q,
      ne
    ) : B.el = D.el;
  }, S = (D, B, Q, ne) => {
    [D.el, D.anchor] = m(
      D.children,
      B,
      Q,
      ne,
      D.el,
      D.anchor
    );
  }, b = (D, B, Q, ne) => {
    if (B.children !== D.children) {
      const ie = p(D.anchor);
      w(D), [B.el, B.anchor] = m(
        B.children,
        Q,
        ie,
        ne
      );
    } else
      B.el = D.el, B.anchor = D.anchor;
  }, O = ({ el: D, anchor: B }, Q, ne) => {
    let ie;
    for (; D && D !== B; )
      ie = p(D), s(D, Q, ne), D = ie;
    s(B, Q, ne);
  }, w = ({ el: D, anchor: B }) => {
    let Q;
    for (; D && D !== B; )
      Q = p(D), o(D), D = Q;
    o(B);
  }, N = (D, B, Q, ne, ie, ce, ve, fe, pe) => {
    B.type === "svg" ? ve = "svg" : B.type === "math" && (ve = "mathml"), D == null ? C(
      B,
      Q,
      ne,
      ie,
      ce,
      ve,
      fe,
      pe
    ) : $(
      D,
      B,
      ie,
      ce,
      ve,
      fe,
      pe
    );
  }, C = (D, B, Q, ne, ie, ce, ve, fe) => {
    let pe, ue;
    const { props: je, shapeFlag: Se, transition: Re, dirs: ze } = D;
    if (pe = D.el = r(
      D.type,
      ce,
      je && je.is,
      je
    ), Se & 8 ? d(pe, D.children) : Se & 16 && x(
      D.children,
      pe,
      null,
      ne,
      ie,
      Tp(D, ce),
      ve,
      fe
    ), ze && mo(D, null, ne, "created"), k(pe, D, D.scopeId, ve, ne), je) {
      for (const z in je)
        z !== "value" && !Zo(z) && i(pe, z, null, je[z], ce, ne);
      "value" in je && i(pe, "value", null, je.value, ce), (ue = je.onVnodeBeforeMount) && cs(ue, ne, D);
    }
    Y.NODE_ENV !== "production" && (Ci(pe, "__vnode", D, !0), Ci(pe, "__vueParentComponent", ne, !0)), ze && mo(D, null, ne, "beforeMount");
    const ct = tE(ie, Re);
    ct && Re.beforeEnter(pe), s(pe, B, Q), ((ue = je && je.onVnodeMounted) || ct || ze) && En(() => {
      ue && cs(ue, ne, D), ct && Re.enter(pe), ze && mo(D, null, ne, "mounted");
    }, ie);
  }, k = (D, B, Q, ne, ie) => {
    if (Q && h(D, Q), ne)
      for (let ce = 0; ce < ne.length; ce++)
        h(D, ne[ce]);
    if (ie) {
      let ce = ie.subTree;
      if (Y.NODE_ENV !== "production" && ce.patchFlag > 0 && ce.patchFlag & 2048 && (ce = vf(ce.children) || ce), B === ce || _d(ce.type) && (ce.ssContent === B || ce.ssFallback === B)) {
        const ve = ie.vnode;
        k(
          D,
          ve,
          ve.scopeId,
          ve.slotScopeIds,
          ie.parent
        );
      }
    }
  }, x = (D, B, Q, ne, ie, ce, ve, fe, pe = 0) => {
    for (let ue = pe; ue < D.length; ue++) {
      const je = D[ue] = fe ? Or(D[ue]) : Zn(D[ue]);
      v(
        null,
        je,
        B,
        Q,
        ne,
        ie,
        ce,
        ve,
        fe
      );
    }
  }, $ = (D, B, Q, ne, ie, ce, ve) => {
    const fe = B.el = D.el;
    Y.NODE_ENV !== "production" && (fe.__vnode = B);
    let { patchFlag: pe, dynamicChildren: ue, dirs: je } = B;
    pe |= D.patchFlag & 16;
    const Se = D.props || ut, Re = B.props || ut;
    let ze;
    if (Q && ei(Q, !1), (ze = Re.onVnodeBeforeUpdate) && cs(ze, Q, B, D), je && mo(B, D, Q, "beforeUpdate"), Q && ei(Q, !0), Y.NODE_ENV !== "production" && Qs && (pe = 0, ve = !1, ue = null), (Se.innerHTML && Re.innerHTML == null || Se.textContent && Re.textContent == null) && d(fe, ""), ue ? (M(
      D.dynamicChildren,
      ue,
      fe,
      Q,
      ne,
      Tp(B, ie),
      ce
    ), Y.NODE_ENV !== "production" && Al(D, B)) : ve || te(
      D,
      B,
      fe,
      null,
      Q,
      ne,
      Tp(B, ie),
      ce,
      !1
    ), pe > 0) {
      if (pe & 16)
        R(fe, Se, Re, Q, ie);
      else if (pe & 2 && Se.class !== Re.class && i(fe, "class", null, Re.class, ie), pe & 4 && i(fe, "style", Se.style, Re.style, ie), pe & 8) {
        const ct = B.dynamicProps;
        for (let z = 0; z < ct.length; z++) {
          const W = ct[z], Z = Se[W], re = Re[W];
          (re !== Z || W === "value") && i(fe, W, Z, re, ie, Q);
        }
      }
      pe & 1 && D.children !== B.children && d(fe, B.children);
    } else !ve && ue == null && R(fe, Se, Re, Q, ie);
    ((ze = Re.onVnodeUpdated) || je) && En(() => {
      ze && cs(ze, Q, B, D), je && mo(B, D, Q, "updated");
    }, ne);
  }, M = (D, B, Q, ne, ie, ce, ve) => {
    for (let fe = 0; fe < B.length; fe++) {
      const pe = D[fe], ue = B[fe], je = (
        // oldVNode may be an errored async setup() component inside Suspense
        // which will not have a mounted element
        pe.el && // - In the case of a Fragment, we need to provide the actual parent
        // of the Fragment itself so it can move its children.
        (pe.type === J || // - In the case of different nodes, there is going to be a replacement
        // which also requires the correct parent container
        !qs(pe, ue) || // - In the case of a component, it could contain anything.
        pe.shapeFlag & 70) ? f(pe.el) : (
          // In other cases, the parent container is not actually used so we
          // just pass the block element here to avoid a DOM parentNode call.
          Q
        )
      );
      v(
        pe,
        ue,
        je,
        null,
        ne,
        ie,
        ce,
        ve,
        !0
      );
    }
  }, R = (D, B, Q, ne, ie) => {
    if (B !== Q) {
      if (B !== ut)
        for (const ce in B)
          !Zo(ce) && !(ce in Q) && i(
            D,
            ce,
            B[ce],
            null,
            ie,
            ne
          );
      for (const ce in Q) {
        if (Zo(ce)) continue;
        const ve = Q[ce], fe = B[ce];
        ve !== fe && ce !== "value" && i(D, ce, fe, ve, ie, ne);
      }
      "value" in Q && i(D, "value", B.value, Q.value, ie);
    }
  }, V = (D, B, Q, ne, ie, ce, ve, fe, pe) => {
    const ue = B.el = D ? D.el : a(""), je = B.anchor = D ? D.anchor : a("");
    let { patchFlag: Se, dynamicChildren: Re, slotScopeIds: ze } = B;
    Y.NODE_ENV !== "production" && // #5523 dev root fragment may inherit directives
    (Qs || Se & 2048) && (Se = 0, pe = !1, Re = null), ze && (fe = fe ? fe.concat(ze) : ze), D == null ? (s(ue, Q, ne), s(je, Q, ne), x(
      // #10007
      // such fragment like `<></>` will be compiled into
      // a fragment which doesn't have a children.
      // In this case fallback to an empty array
      B.children || [],
      Q,
      je,
      ie,
      ce,
      ve,
      fe,
      pe
    )) : Se > 0 && Se & 64 && Re && // #2715 the previous fragment could've been a BAILed one as a result
    // of renderSlot() with no valid children
    D.dynamicChildren ? (M(
      D.dynamicChildren,
      Re,
      Q,
      ie,
      ce,
      ve,
      fe
    ), Y.NODE_ENV !== "production" ? Al(D, B) : (
      // #2080 if the stable fragment has a key, it's a <template v-for> that may
      //  get moved around. Make sure all root level vnodes inherit el.
      // #2134 or if it's a component root, it may also get moved around
      // as the component is being moved.
      (B.key != null || ie && B === ie.subTree) && Al(
        D,
        B,
        !0
        /* shallow */
      )
    )) : te(
      D,
      B,
      Q,
      je,
      ie,
      ce,
      ve,
      fe,
      pe
    );
  }, j = (D, B, Q, ne, ie, ce, ve, fe, pe) => {
    B.slotScopeIds = fe, D == null ? B.shapeFlag & 512 ? ie.ctx.activate(
      B,
      Q,
      ne,
      ve,
      pe
    ) : U(
      B,
      Q,
      ne,
      ie,
      ce,
      ve,
      pe
    ) : A(D, B, pe);
  }, U = (D, B, Q, ne, ie, ce, ve) => {
    const fe = D.component = gE(
      D,
      ne,
      ie
    );
    if (Y.NODE_ENV !== "production" && fe.type.__hmrId && Dx(fe), Y.NODE_ENV !== "production" && (va(D), Fo(fe, "mount")), Ya(D) && (fe.ctx.renderer = Ze), Y.NODE_ENV !== "production" && Fo(fe, "init"), _E(fe, !1, ve), Y.NODE_ENV !== "production" && Uo(fe, "init"), fe.asyncDep) {
      if (Y.NODE_ENV !== "production" && Qs && (D.el = null), ie && ie.registerDep(fe, G, ve), !D.el) {
        const pe = fe.subTree = F(zt);
        _(null, pe, B, Q);
      }
    } else
      G(
        fe,
        D,
        B,
        Q,
        ie,
        ce,
        ve
      );
    Y.NODE_ENV !== "production" && (ga(), Uo(fe, "mount"));
  }, A = (D, B, Q) => {
    const ne = B.component = D.component;
    if (oT(D, B, Q))
      if (ne.asyncDep && !ne.asyncResolved) {
        Y.NODE_ENV !== "production" && va(B), X(ne, B, Q), Y.NODE_ENV !== "production" && ga();
        return;
      } else
        ne.next = B, ne.update();
    else
      B.el = D.el, ne.vnode = B;
  }, G = (D, B, Q, ne, ie, ce, ve) => {
    const fe = () => {
      if (D.isMounted) {
        let { next: Se, bu: Re, u: ze, parent: ct, vnode: z } = D;
        {
          const Me = nE(D);
          if (Me) {
            Se && (Se.el = z.el, X(D, Se, ve)), Me.asyncDep.then(() => {
              D.isUnmounted || fe();
            });
            return;
          }
        }
        let W = Se, Z;
        Y.NODE_ENV !== "production" && va(Se || D.vnode), ei(D, !1), Se ? (Se.el = z.el, X(D, Se, ve)) : Se = z, Re && Wo(Re), (Z = Se.props && Se.props.onVnodeBeforeUpdate) && cs(Z, ct, Se, z), ei(D, !0), Y.NODE_ENV !== "production" && Fo(D, "render");
        const re = Pu(D);
        Y.NODE_ENV !== "production" && Uo(D, "render");
        const Ce = D.subTree;
        D.subTree = re, Y.NODE_ENV !== "production" && Fo(D, "patch"), v(
          Ce,
          re,
          // parent may have changed if it's in a teleport
          f(Ce.el),
          // anchor may have changed if it's in a fragment
          _e(Ce),
          D,
          ie,
          ce
        ), Y.NODE_ENV !== "production" && Uo(D, "patch"), Se.el = re.el, W === null && gf(D, re.el), ze && En(ze, ie), (Z = Se.props && Se.props.onVnodeUpdated) && En(
          () => cs(Z, ct, Se, z),
          ie
        ), Y.NODE_ENV !== "production" && y1(D), Y.NODE_ENV !== "production" && ga();
      } else {
        let Se;
        const { el: Re, props: ze } = B, { bm: ct, m: z, parent: W, root: Z, type: re } = D, Ce = Fr(B);
        if (ei(D, !1), ct && Wo(ct), !Ce && (Se = ze && ze.onVnodeBeforeMount) && cs(Se, W, B), ei(D, !0), Re && Ve) {
          const Me = () => {
            Y.NODE_ENV !== "production" && Fo(D, "render"), D.subTree = Pu(D), Y.NODE_ENV !== "production" && Uo(D, "render"), Y.NODE_ENV !== "production" && Fo(D, "hydrate"), Ve(
              Re,
              D.subTree,
              D,
              ie,
              null
            ), Y.NODE_ENV !== "production" && Uo(D, "hydrate");
          };
          Ce && re.__asyncHydrate ? re.__asyncHydrate(
            Re,
            D,
            Me
          ) : Me();
        } else {
          Z.ce && Z.ce._injectChildStyle(re), Y.NODE_ENV !== "production" && Fo(D, "render");
          const Me = D.subTree = Pu(D);
          Y.NODE_ENV !== "production" && Uo(D, "render"), Y.NODE_ENV !== "production" && Fo(D, "patch"), v(
            null,
            Me,
            Q,
            ne,
            D,
            ie,
            ce
          ), Y.NODE_ENV !== "production" && Uo(D, "patch"), B.el = Me.el;
        }
        if (z && En(z, ie), !Ce && (Se = ze && ze.onVnodeMounted)) {
          const Me = B;
          En(
            () => cs(Se, W, Me),
            ie
          );
        }
        (B.shapeFlag & 256 || W && Fr(W.vnode) && W.vnode.shapeFlag & 256) && D.a && En(D.a, ie), D.isMounted = !0, Y.NODE_ENV !== "production" && _h(D), B = Q = ne = null;
      }
    };
    D.scope.on();
    const pe = D.effect = new Ql(fe);
    D.scope.off();
    const ue = D.update = pe.run.bind(pe), je = D.job = pe.runIfDirty.bind(pe);
    je.i = D, je.id = D.uid, pe.scheduler = () => uf(je), ei(D, !0), Y.NODE_ENV !== "production" && (pe.onTrack = D.rtc ? (Se) => Wo(D.rtc, Se) : void 0, pe.onTrigger = D.rtg ? (Se) => Wo(D.rtg, Se) : void 0), ue();
  }, X = (D, B, Q) => {
    B.component = D;
    const ne = D.vnode.props;
    D.vnode = B, D.next = null, UC(D, B.props, ne, Q), qC(D, B.children, Q), cr(), jg(D), ur();
  }, te = (D, B, Q, ne, ie, ce, ve, fe, pe = !1) => {
    const ue = D && D.children, je = D ? D.shapeFlag : 0, Se = B.children, { patchFlag: Re, shapeFlag: ze } = B;
    if (Re > 0) {
      if (Re & 128) {
        Ge(
          ue,
          Se,
          Q,
          ne,
          ie,
          ce,
          ve,
          fe,
          pe
        );
        return;
      } else if (Re & 256) {
        $e(
          ue,
          Se,
          Q,
          ne,
          ie,
          ce,
          ve,
          fe,
          pe
        );
        return;
      }
    }
    ze & 8 ? (je & 16 && q(ue, ie, ce), Se !== ue && d(Q, Se)) : je & 16 ? ze & 16 ? Ge(
      ue,
      Se,
      Q,
      ne,
      ie,
      ce,
      ve,
      fe,
      pe
    ) : q(ue, ie, ce, !0) : (je & 8 && d(Q, ""), ze & 16 && x(
      Se,
      Q,
      ne,
      ie,
      ce,
      ve,
      fe,
      pe
    ));
  }, $e = (D, B, Q, ne, ie, ce, ve, fe, pe) => {
    D = D || yi, B = B || yi;
    const ue = D.length, je = B.length, Se = Math.min(ue, je);
    let Re;
    for (Re = 0; Re < Se; Re++) {
      const ze = B[Re] = pe ? Or(B[Re]) : Zn(B[Re]);
      v(
        D[Re],
        ze,
        Q,
        null,
        ie,
        ce,
        ve,
        fe,
        pe
      );
    }
    ue > je ? q(
      D,
      ie,
      ce,
      !0,
      !1,
      Se
    ) : x(
      B,
      Q,
      ne,
      ie,
      ce,
      ve,
      fe,
      pe,
      Se
    );
  }, Ge = (D, B, Q, ne, ie, ce, ve, fe, pe) => {
    let ue = 0;
    const je = B.length;
    let Se = D.length - 1, Re = je - 1;
    for (; ue <= Se && ue <= Re; ) {
      const ze = D[ue], ct = B[ue] = pe ? Or(B[ue]) : Zn(B[ue]);
      if (qs(ze, ct))
        v(
          ze,
          ct,
          Q,
          null,
          ie,
          ce,
          ve,
          fe,
          pe
        );
      else
        break;
      ue++;
    }
    for (; ue <= Se && ue <= Re; ) {
      const ze = D[Se], ct = B[Re] = pe ? Or(B[Re]) : Zn(B[Re]);
      if (qs(ze, ct))
        v(
          ze,
          ct,
          Q,
          null,
          ie,
          ce,
          ve,
          fe,
          pe
        );
      else
        break;
      Se--, Re--;
    }
    if (ue > Se) {
      if (ue <= Re) {
        const ze = Re + 1, ct = ze < je ? B[ze].el : ne;
        for (; ue <= Re; )
          v(
            null,
            B[ue] = pe ? Or(B[ue]) : Zn(B[ue]),
            Q,
            ct,
            ie,
            ce,
            ve,
            fe,
            pe
          ), ue++;
      }
    } else if (ue > Re)
      for (; ue <= Se; )
        et(D[ue], ie, ce, !0), ue++;
    else {
      const ze = ue, ct = ue, z = /* @__PURE__ */ new Map();
      for (ue = ct; ue <= Re; ue++) {
        const pt = B[ue] = pe ? Or(B[ue]) : Zn(B[ue]);
        pt.key != null && (Y.NODE_ENV !== "production" && z.has(pt.key) && oe(
          "Duplicate keys found during update:",
          JSON.stringify(pt.key),
          "Make sure keys are unique."
        ), z.set(pt.key, ue));
      }
      let W, Z = 0;
      const re = Re - ct + 1;
      let Ce = !1, Me = 0;
      const Qe = new Array(re);
      for (ue = 0; ue < re; ue++) Qe[ue] = 0;
      for (ue = ze; ue <= Se; ue++) {
        const pt = D[ue];
        if (Z >= re) {
          et(pt, ie, ce, !0);
          continue;
        }
        let Fe;
        if (pt.key != null)
          Fe = z.get(pt.key);
        else
          for (W = ct; W <= Re; W++)
            if (Qe[W - ct] === 0 && qs(pt, B[W])) {
              Fe = W;
              break;
            }
        Fe === void 0 ? et(pt, ie, ce, !0) : (Qe[Fe - ct] = ue + 1, Fe >= Me ? Me = Fe : Ce = !0, v(
          pt,
          B[Fe],
          Q,
          null,
          ie,
          ce,
          ve,
          fe,
          pe
        ), Z++);
      }
      const wt = Ce ? QC(Qe) : yi;
      for (W = wt.length - 1, ue = re - 1; ue >= 0; ue--) {
        const pt = ct + ue, Fe = B[pt], Ae = pt + 1 < je ? B[pt + 1].el : ne;
        Qe[ue] === 0 ? v(
          null,
          Fe,
          Q,
          Ae,
          ie,
          ce,
          ve,
          fe,
          pe
        ) : Ce && (W < 0 || ue !== wt[W] ? Ye(Fe, Q, Ae, 2) : W--);
      }
    }
  }, Ye = (D, B, Q, ne, ie = null) => {
    const { el: ce, type: ve, transition: fe, children: pe, shapeFlag: ue } = D;
    if (ue & 6) {
      Ye(D.component.subTree, B, Q, ne);
      return;
    }
    if (ue & 128) {
      D.suspense.move(B, Q, ne);
      return;
    }
    if (ue & 64) {
      ve.move(D, B, Q, Ze);
      return;
    }
    if (ve === J) {
      s(ce, B, Q);
      for (let Se = 0; Se < pe.length; Se++)
        Ye(pe[Se], B, Q, ne);
      s(D.anchor, B, Q);
      return;
    }
    if (ve === Ur) {
      O(D, B, Q);
      return;
    }
    if (ne !== 2 && ue & 1 && fe)
      if (ne === 0)
        fe.beforeEnter(ce), s(ce, B, Q), En(() => fe.enter(ce), ie);
      else {
        const { leave: Se, delayLeave: Re, afterLeave: ze } = fe, ct = () => s(ce, B, Q), z = () => {
          Se(ce, () => {
            ct(), ze && ze();
          });
        };
        Re ? Re(ce, ct, z) : z();
      }
    else
      s(ce, B, Q);
  }, et = (D, B, Q, ne = !1, ie = !1) => {
    const {
      type: ce,
      props: ve,
      ref: fe,
      children: pe,
      dynamicChildren: ue,
      shapeFlag: je,
      patchFlag: Se,
      dirs: Re,
      cacheIndex: ze
    } = D;
    if (Se === -2 && (ie = !1), fe != null && sc(fe, null, Q, D, !0), ze != null && (B.renderCache[ze] = void 0), je & 256) {
      B.ctx.deactivate(D);
      return;
    }
    const ct = je & 1 && Re, z = !Fr(D);
    let W;
    if (z && (W = ve && ve.onVnodeBeforeUnmount) && cs(W, B, D), je & 6)
      _t(D.component, Q, ne);
    else {
      if (je & 128) {
        D.suspense.unmount(Q, ne);
        return;
      }
      ct && mo(D, null, B, "beforeUnmount"), je & 64 ? D.type.remove(
        D,
        B,
        Q,
        Ze,
        ne
      ) : ue && // #5154
      // when v-once is used inside a block, setBlockTracking(-1) marks the
      // parent block with hasOnce: true
      // so that it doesn't take the fast path during unmount - otherwise
      // components nested in v-once are never unmounted.
      !ue.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments
      (ce !== J || Se > 0 && Se & 64) ? q(
        ue,
        B,
        Q,
        !1,
        !0
      ) : (ce === J && Se & 384 || !ie && je & 16) && q(pe, B, Q), ne && Dt(D);
    }
    (z && (W = ve && ve.onVnodeUnmounted) || ct) && En(() => {
      W && cs(W, B, D), ct && mo(D, null, B, "unmounted");
    }, Q);
  }, Dt = (D) => {
    const { type: B, el: Q, anchor: ne, transition: ie } = D;
    if (B === J) {
      Y.NODE_ENV !== "production" && D.patchFlag > 0 && D.patchFlag & 2048 && ie && !ie.persisted ? D.children.forEach((ve) => {
        ve.type === zt ? o(ve.el) : Dt(ve);
      }) : Pt(Q, ne);
      return;
    }
    if (B === Ur) {
      w(D);
      return;
    }
    const ce = () => {
      o(Q), ie && !ie.persisted && ie.afterLeave && ie.afterLeave();
    };
    if (D.shapeFlag & 1 && ie && !ie.persisted) {
      const { leave: ve, delayLeave: fe } = ie, pe = () => ve(Q, ce);
      fe ? fe(D.el, ce, pe) : pe();
    } else
      ce();
  }, Pt = (D, B) => {
    let Q;
    for (; D !== B; )
      Q = p(D), o(D), D = Q;
    o(B);
  }, _t = (D, B, Q) => {
    Y.NODE_ENV !== "production" && D.type.__hmrId && Ix(D);
    const { bum: ne, scope: ie, job: ce, subTree: ve, um: fe, m: pe, a: ue } = D;
    gd(pe), gd(ue), ne && Wo(ne), ie.stop(), ce && (ce.flags |= 8, et(ve, D, B, Q)), fe && En(fe, B), En(() => {
      D.isUnmounted = !0;
    }, B), B && B.pendingBranch && !B.isUnmounted && D.asyncDep && !D.asyncResolved && D.suspenseId === B.pendingId && (B.deps--, B.deps === 0 && B.resolve()), Y.NODE_ENV !== "production" && Lx(D);
  }, q = (D, B, Q, ne = !1, ie = !1, ce = 0) => {
    for (let ve = ce; ve < D.length; ve++)
      et(D[ve], B, Q, ne, ie);
  }, _e = (D) => {
    if (D.shapeFlag & 6)
      return _e(D.component.subTree);
    if (D.shapeFlag & 128)
      return D.suspense.next();
    const B = p(D.anchor || D.el), Q = B && B[E1];
    return Q ? p(Q) : B;
  };
  let ge = !1;
  const ke = (D, B, Q) => {
    D == null ? B._vnode && et(B._vnode, null, null, !0) : v(
      B._vnode || null,
      D,
      B,
      null,
      null,
      null,
      Q
    ), B._vnode = D, ge || (ge = !0, jg(), fd(), ge = !1);
  }, Ze = {
    p: v,
    um: et,
    m: Ye,
    r: Dt,
    mt: U,
    mc: x,
    pc: te,
    pbc: M,
    n: _e,
    o: e
  };
  let xt, Ve;
  return t && ([xt, Ve] = t(
    Ze
  )), {
    render: ke,
    hydrate: xt,
    createApp: VC(ke, xt)
  };
}
function Tp({ type: e, props: t }, n) {
  return n === "svg" && e === "foreignObject" || n === "mathml" && e === "annotation-xml" && t && t.encoding && t.encoding.includes("html") ? void 0 : n;
}
function ei({ effect: e, job: t }, n) {
  n ? (e.flags |= 32, t.flags |= 4) : (e.flags &= -33, t.flags &= -5);
}
function tE(e, t) {
  return (!e || e && !e.pendingBranch) && t && !t.persisted;
}
function Al(e, t, n = !1) {
  const s = e.children, o = t.children;
  if (Ne(s) && Ne(o))
    for (let i = 0; i < s.length; i++) {
      const r = s[i];
      let a = o[i];
      a.shapeFlag & 1 && !a.dynamicChildren && ((a.patchFlag <= 0 || a.patchFlag === 32) && (a = o[i] = Or(o[i]), a.el = r.el), !n && a.patchFlag !== -2 && Al(r, a)), a.type === bo && (a.el = r.el), Y.NODE_ENV !== "production" && a.type === zt && !a.el && (a.el = r.el);
    }
}
function QC(e) {
  const t = e.slice(), n = [0];
  let s, o, i, r, a;
  const l = e.length;
  for (s = 0; s < l; s++) {
    const c = e[s];
    if (c !== 0) {
      if (o = n[n.length - 1], e[o] < c) {
        t[s] = o, n.push(s);
        continue;
      }
      for (i = 0, r = n.length - 1; i < r; )
        a = i + r >> 1, e[n[a]] < c ? i = a + 1 : r = a;
      c < e[n[i]] && (i > 0 && (t[s] = n[i - 1]), n[i] = s);
    }
  }
  for (i = n.length, r = n[i - 1]; i-- > 0; )
    n[i] = r, r = t[r];
  return n;
}
function nE(e) {
  const t = e.subTree.component;
  if (t)
    return t.asyncDep && !t.asyncResolved ? t : nE(t);
}
function gd(e) {
  if (e)
    for (let t = 0; t < e.length; t++)
      e[t].flags |= 8;
}
const sE = Symbol.for("v-scx"), oE = () => {
  {
    const e = Ie(sE);
    return e || Y.NODE_ENV !== "production" && oe(
      "Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."
    ), e;
  }
};
function tn(e, t) {
  return Tc(e, null, t);
}
function ZC(e, t) {
  return Tc(
    e,
    null,
    Y.NODE_ENV !== "production" ? st({}, t, { flush: "post" }) : { flush: "post" }
  );
}
function rE(e, t) {
  return Tc(
    e,
    null,
    Y.NODE_ENV !== "production" ? st({}, t, { flush: "sync" }) : { flush: "sync" }
  );
}
function ht(e, t, n) {
  return Y.NODE_ENV !== "production" && !Le(t) && oe(
    "`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."
  ), Tc(e, t, n);
}
function Tc(e, t, n = ut) {
  const { immediate: s, deep: o, flush: i, once: r } = n;
  Y.NODE_ENV !== "production" && !t && (s !== void 0 && oe(
    'watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'
  ), o !== void 0 && oe(
    'watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'
  ), r !== void 0 && oe(
    'watch() "once" option is only respected when using the watch(source, callback, options?) signature.'
  ));
  const a = st({}, n);
  Y.NODE_ENV !== "production" && (a.onWarn = oe);
  const l = t && s || !t && i !== "post";
  let c;
  if (Ta) {
    if (i === "sync") {
      const h = oE();
      c = h.__watcherHandles || (h.__watcherHandles = []);
    } else if (!l) {
      const h = () => {
      };
      return h.stop = Gt, h.resume = Gt, h.pause = Gt, h;
    }
  }
  const d = pn;
  a.call = (h, m, v) => Ps(h, d, m, v);
  let f = !1;
  i === "post" ? a.scheduler = (h) => {
    En(h, d && d.suspense);
  } : i !== "sync" && (f = !0, a.scheduler = (h, m) => {
    m ? h() : uf(h);
  }), a.augmentJob = (h) => {
    t && (h.flags |= 4), f && (h.flags |= 2, d && (h.id = d.uid, h.i = d));
  };
  const p = Sx(e, t, a);
  return Ta && (c ? c.push(p) : l && p()), p;
}
function eT(e, t, n) {
  const s = this.proxy, o = We(e) ? e.includes(".") ? iE(s, e) : () => s[e] : e.bind(s, s);
  let i;
  Le(t) ? i = t : (i = t.handler, n = t);
  const r = ki(this), a = Tc(o, i.bind(s), n);
  return r(), a;
}
function iE(e, t) {
  const n = t.split(".");
  return () => {
    let s = e;
    for (let o = 0; o < n.length && s; o++)
      s = s[n[o]];
    return s;
  };
}
function mn(e, t, n = ut) {
  const s = un();
  if (Y.NODE_ENV !== "production" && !s)
    return oe("useModel() called without active instance."), L();
  const o = Lt(t);
  if (Y.NODE_ENV !== "production" && !s.propsOptions[0][o])
    return oe(`useModel() called with prop "${t}" which is not declared.`), L();
  const i = Mn(t), r = aE(e, o), a = u1((l, c) => {
    let d, f = ut, p;
    return rE(() => {
      const h = e[o];
      Fn(d, h) && (d = h, c());
    }), {
      get() {
        return l(), n.get ? n.get(d) : d;
      },
      set(h) {
        const m = n.set ? n.set(h) : h;
        if (!Fn(m, d) && !(f !== ut && Fn(h, f)))
          return;
        const v = s.vnode.props;
        v && // check if parent has passed v-model
        (t in v || o in v || i in v) && (`onUpdate:${t}` in v || `onUpdate:${o}` in v || `onUpdate:${i}` in v) || (d = h, c()), s.emit(`update:${t}`, m), Fn(h, m) && Fn(h, f) && !Fn(m, p) && c(), f = h, p = m;
      }
    };
  });
  return a[Symbol.iterator] = () => {
    let l = 0;
    return {
      next() {
        return l < 2 ? { value: l++ ? r || ut : a, done: !1 } : { done: !0 };
      }
    };
  }, a;
}
const aE = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${Lt(t)}Modifiers`] || e[`${Mn(t)}Modifiers`];
function tT(e, t, ...n) {
  if (e.isUnmounted) return;
  const s = e.vnode.props || ut;
  if (Y.NODE_ENV !== "production") {
    const {
      emitsOptions: d,
      propsOptions: [f]
    } = e;
    if (d)
      if (!(t in d))
        (!f || !(zs(Lt(t)) in f)) && oe(
          `Component emitted event "${t}" but it is neither declared in the emits option nor as an "${zs(Lt(t))}" prop.`
        );
      else {
        const p = d[t];
        Le(p) && (p(...n) || oe(
          `Invalid event arguments: event validation failed for event "${t}".`
        ));
      }
  }
  let o = n;
  const i = t.startsWith("update:"), r = i && aE(s, t.slice(7));
  if (r && (r.trim && (o = n.map((d) => We(d) ? d.trim() : d)), r.number && (o = n.map(ql))), Y.NODE_ENV !== "production" && jx(e, t, o), Y.NODE_ENV !== "production") {
    const d = t.toLowerCase();
    d !== t && s[zs(d)] && oe(
      `Event "${d}" is emitted in component ${yf(
        e,
        e.type
      )} but the handler is registered for "${t}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${Mn(
        t
      )}" instead of "${t}".`
    );
  }
  let a, l = s[a = zs(t)] || // also try camelCase event handler (#2249)
  s[a = zs(Lt(t))];
  !l && i && (l = s[a = zs(Mn(t))]), l && Ps(
    l,
    e,
    6,
    o
  );
  const c = s[a + "Once"];
  if (c) {
    if (!e.emitted)
      e.emitted = {};
    else if (e.emitted[a])
      return;
    e.emitted[a] = !0, Ps(
      c,
      e,
      6,
      o
    );
  }
}
function lE(e, t, n = !1) {
  const s = t.emitsCache, o = s.get(e);
  if (o !== void 0)
    return o;
  const i = e.emits;
  let r = {}, a = !1;
  if (!Le(e)) {
    const l = (c) => {
      const d = lE(c, t, !0);
      d && (a = !0, st(r, d));
    };
    !n && t.mixins.length && t.mixins.forEach(l), e.extends && l(e.extends), e.mixins && e.mixins.forEach(l);
  }
  return !i && !a ? (ft(e) && s.set(e, null), null) : (Ne(i) ? i.forEach((l) => r[l] = null) : st(r, i), ft(e) && s.set(e, r), r);
}
function mf(e, t) {
  return !e || !wo(t) ? !1 : (t = t.slice(2).replace(/Once$/, ""), Et(e, t[0].toLowerCase() + t.slice(1)) || Et(e, Mn(t)) || Et(e, t));
}
let xh = !1;
function yd() {
  xh = !0;
}
function Pu(e) {
  const {
    type: t,
    vnode: n,
    proxy: s,
    withProxy: o,
    propsOptions: [i],
    slots: r,
    attrs: a,
    emit: l,
    render: c,
    renderCache: d,
    props: f,
    data: p,
    setupState: h,
    ctx: m,
    inheritAttrs: v
  } = e, g = nc(e);
  let _, S;
  Y.NODE_ENV !== "production" && (xh = !1);
  try {
    if (n.shapeFlag & 4) {
      const w = o || s, N = Y.NODE_ENV !== "production" && h.__isScriptSetup ? new Proxy(w, {
        get(C, k, x) {
          return oe(
            `Property '${String(
              k
            )}' was accessed via 'this'. Avoid using 'this' in templates.`
          ), Reflect.get(C, k, x);
        }
      }) : w;
      _ = Zn(
        c.call(
          N,
          w,
          d,
          Y.NODE_ENV !== "production" ? Js(f) : f,
          h,
          p,
          m
        )
      ), S = a;
    } else {
      const w = t;
      Y.NODE_ENV !== "production" && a === f && yd(), _ = Zn(
        w.length > 1 ? w(
          Y.NODE_ENV !== "production" ? Js(f) : f,
          Y.NODE_ENV !== "production" ? {
            get attrs() {
              return yd(), Js(a);
            },
            slots: r,
            emit: l
          } : { attrs: a, slots: r, emit: l }
        ) : w(
          Y.NODE_ENV !== "production" ? Js(f) : f,
          null
        )
      ), S = t.props ? a : nT(a);
    }
  } catch (w) {
    Ml.length = 0, qr(w, e, 1), _ = F(zt);
  }
  let b = _, O;
  if (Y.NODE_ENV !== "production" && _.patchFlag > 0 && _.patchFlag & 2048 && ([b, O] = cE(_)), S && v !== !1) {
    const w = Object.keys(S), { shapeFlag: N } = b;
    if (w.length) {
      if (N & 7)
        i && w.some(Xl) && (S = sT(
          S,
          i
        )), b = Vs(b, S, !1, !0);
      else if (Y.NODE_ENV !== "production" && !xh && b.type !== zt) {
        const C = Object.keys(a), k = [], x = [];
        for (let $ = 0, M = C.length; $ < M; $++) {
          const R = C[$];
          wo(R) ? Xl(R) || k.push(R[2].toLowerCase() + R.slice(3)) : x.push(R);
        }
        x.length && oe(
          `Extraneous non-props attributes (${x.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`
        ), k.length && oe(
          `Extraneous non-emits event listeners (${k.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
        );
      }
    }
  }
  return n.dirs && (Y.NODE_ENV !== "production" && !oy(b) && oe(
    "Runtime directive used on component with non-element root node. The directives will not function as intended."
  ), b = Vs(b, null, !1, !0), b.dirs = b.dirs ? b.dirs.concat(n.dirs) : n.dirs), n.transition && (Y.NODE_ENV !== "production" && !oy(b) && oe(
    "Component inside <Transition> renders non-element root node that cannot be animated."
  ), ir(b, n.transition)), Y.NODE_ENV !== "production" && O ? O(b) : _ = b, nc(g), _;
}
const cE = (e) => {
  const t = e.children, n = e.dynamicChildren, s = vf(t, !1);
  if (s) {
    if (Y.NODE_ENV !== "production" && s.patchFlag > 0 && s.patchFlag & 2048)
      return cE(s);
  } else return [e, void 0];
  const o = t.indexOf(s), i = n ? n.indexOf(s) : -1, r = (a) => {
    t[o] = a, n && (i > -1 ? n[i] = a : a.patchFlag > 0 && (e.dynamicChildren = [...n, a]));
  };
  return [Zn(s), r];
};
function vf(e, t = !0) {
  let n;
  for (let s = 0; s < e.length; s++) {
    const o = e[s];
    if (Oo(o)) {
      if (o.type !== zt || o.children === "v-if") {
        if (n)
          return;
        if (n = o, Y.NODE_ENV !== "production" && t && n.patchFlag > 0 && n.patchFlag & 2048)
          return vf(n.children);
      }
    } else
      return;
  }
  return n;
}
const nT = (e) => {
  let t;
  for (const n in e)
    (n === "class" || n === "style" || wo(n)) && ((t || (t = {}))[n] = e[n]);
  return t;
}, sT = (e, t) => {
  const n = {};
  for (const s in e)
    (!Xl(s) || !(s.slice(9) in t)) && (n[s] = e[s]);
  return n;
}, oy = (e) => e.shapeFlag & 7 || e.type === zt;
function oT(e, t, n) {
  const { props: s, children: o, component: i } = e, { props: r, children: a, patchFlag: l } = t, c = i.emitsOptions;
  if (Y.NODE_ENV !== "production" && (o || a) && Qs || t.dirs || t.transition)
    return !0;
  if (n && l >= 0) {
    if (l & 1024)
      return !0;
    if (l & 16)
      return s ? ry(s, r, c) : !!r;
    if (l & 8) {
      const d = t.dynamicProps;
      for (let f = 0; f < d.length; f++) {
        const p = d[f];
        if (r[p] !== s[p] && !mf(c, p))
          return !0;
      }
    }
  } else
    return (o || a) && (!a || !a.$stable) ? !0 : s === r ? !1 : s ? r ? ry(s, r, c) : !0 : !!r;
  return !1;
}
function ry(e, t, n) {
  const s = Object.keys(t);
  if (s.length !== Object.keys(e).length)
    return !0;
  for (let o = 0; o < s.length; o++) {
    const i = s[o];
    if (t[i] !== e[i] && !mf(n, i))
      return !0;
  }
  return !1;
}
function gf({ vnode: e, parent: t }, n) {
  for (; t; ) {
    const s = t.subTree;
    if (s.suspense && s.suspense.activeBranch === e && (s.el = e.el), s === e)
      (e = t.vnode).el = n, t = t.parent;
    else
      break;
  }
}
const _d = (e) => e.__isSuspense;
let Ch = 0;
const rT = {
  name: "Suspense",
  // In order to make Suspense tree-shakable, we need to avoid importing it
  // directly in the renderer. The renderer checks for the __isSuspense flag
  // on a vnode's type and calls the `process` method, passing in renderer
  // internals.
  __isSuspense: !0,
  process(e, t, n, s, o, i, r, a, l, c) {
    if (e == null)
      aT(
        t,
        n,
        s,
        o,
        i,
        r,
        a,
        l,
        c
      );
    else {
      if (i && i.deps > 0 && !e.suspense.isInFallback) {
        t.suspense = e.suspense, t.suspense.vnode = t, t.el = e.el;
        return;
      }
      lT(
        e,
        t,
        n,
        s,
        o,
        r,
        a,
        l,
        c
      );
    }
  },
  hydrate: cT,
  normalize: uT
}, iT = rT;
function ic(e, t) {
  const n = e.props && e.props[t];
  Le(n) && n();
}
function aT(e, t, n, s, o, i, r, a, l) {
  const {
    p: c,
    o: { createElement: d }
  } = l, f = d("div"), p = e.suspense = uE(
    e,
    o,
    s,
    t,
    f,
    n,
    i,
    r,
    a,
    l
  );
  c(
    null,
    p.pendingBranch = e.ssContent,
    f,
    null,
    s,
    p,
    i,
    r
  ), p.deps > 0 ? (ic(e, "onPending"), ic(e, "onFallback"), c(
    null,
    e.ssFallback,
    t,
    n,
    s,
    null,
    // fallback tree will not have suspense context
    i,
    r
  ), _a(p, e.ssFallback)) : p.resolve(!1, !0);
}
function lT(e, t, n, s, o, i, r, a, { p: l, um: c, o: { createElement: d } }) {
  const f = t.suspense = e.suspense;
  f.vnode = t, t.el = e.el;
  const p = t.ssContent, h = t.ssFallback, { activeBranch: m, pendingBranch: v, isInFallback: g, isHydrating: _ } = f;
  if (v)
    f.pendingBranch = p, qs(p, v) ? (l(
      v,
      p,
      f.hiddenContainer,
      null,
      o,
      f,
      i,
      r,
      a
    ), f.deps <= 0 ? f.resolve() : g && (_ || (l(
      m,
      h,
      n,
      s,
      o,
      null,
      // fallback tree will not have suspense context
      i,
      r,
      a
    ), _a(f, h)))) : (f.pendingId = Ch++, _ ? (f.isHydrating = !1, f.activeBranch = v) : c(v, o, f), f.deps = 0, f.effects.length = 0, f.hiddenContainer = d("div"), g ? (l(
      null,
      p,
      f.hiddenContainer,
      null,
      o,
      f,
      i,
      r,
      a
    ), f.deps <= 0 ? f.resolve() : (l(
      m,
      h,
      n,
      s,
      o,
      null,
      // fallback tree will not have suspense context
      i,
      r,
      a
    ), _a(f, h))) : m && qs(p, m) ? (l(
      m,
      p,
      n,
      s,
      o,
      f,
      i,
      r,
      a
    ), f.resolve(!0)) : (l(
      null,
      p,
      f.hiddenContainer,
      null,
      o,
      f,
      i,
      r,
      a
    ), f.deps <= 0 && f.resolve()));
  else if (m && qs(p, m))
    l(
      m,
      p,
      n,
      s,
      o,
      f,
      i,
      r,
      a
    ), _a(f, p);
  else if (ic(t, "onPending"), f.pendingBranch = p, p.shapeFlag & 512 ? f.pendingId = p.component.suspenseId : f.pendingId = Ch++, l(
    null,
    p,
    f.hiddenContainer,
    null,
    o,
    f,
    i,
    r,
    a
  ), f.deps <= 0)
    f.resolve();
  else {
    const { timeout: S, pendingId: b } = f;
    S > 0 ? setTimeout(() => {
      f.pendingId === b && f.fallback(h);
    }, S) : S === 0 && f.fallback(h);
  }
}
let iy = !1;
function uE(e, t, n, s, o, i, r, a, l, c, d = !1) {
  Y.NODE_ENV !== "production" && !iy && (iy = !0, console[console.info ? "info" : "log"](
    "<Suspense> is an experimental feature and its API will likely change."
  ));
  const {
    p: f,
    m: p,
    um: h,
    n: m,
    o: { parentNode: v, remove: g }
  } = c;
  let _;
  const S = dT(e);
  S && t && t.pendingBranch && (_ = t.pendingId, t.deps++);
  const b = e.props ? Jl(e.props.timeout) : void 0;
  Y.NODE_ENV !== "production" && Gm(b, "Suspense timeout");
  const O = i, w = {
    vnode: e,
    parent: t,
    parentComponent: n,
    namespace: r,
    container: s,
    hiddenContainer: o,
    deps: 0,
    pendingId: Ch++,
    timeout: typeof b == "number" ? b : -1,
    activeBranch: null,
    pendingBranch: null,
    isInFallback: !d,
    isHydrating: d,
    isUnmounted: !1,
    effects: [],
    resolve(N = !1, C = !1) {
      if (Y.NODE_ENV !== "production") {
        if (!N && !w.pendingBranch)
          throw new Error(
            "suspense.resolve() is called without a pending branch."
          );
        if (w.isUnmounted)
          throw new Error(
            "suspense.resolve() is called on an already unmounted suspense boundary."
          );
      }
      const {
        vnode: k,
        activeBranch: x,
        pendingBranch: $,
        pendingId: M,
        effects: R,
        parentComponent: V,
        container: j
      } = w;
      let U = !1;
      w.isHydrating ? w.isHydrating = !1 : N || (U = x && $.transition && $.transition.mode === "out-in", U && (x.transition.afterLeave = () => {
        M === w.pendingId && (p(
          $,
          j,
          i === O ? m(x) : i,
          0
        ), xa(R));
      }), x && (v(x.el) === j && (i = m(x)), h(x, V, w, !0)), U || p($, j, i, 0)), _a(w, $), w.pendingBranch = null, w.isInFallback = !1;
      let A = w.parent, G = !1;
      for (; A; ) {
        if (A.pendingBranch) {
          A.effects.push(...R), G = !0;
          break;
        }
        A = A.parent;
      }
      !G && !U && xa(R), w.effects = [], S && t && t.pendingBranch && _ === t.pendingId && (t.deps--, t.deps === 0 && !C && t.resolve()), ic(k, "onResolve");
    },
    fallback(N) {
      if (!w.pendingBranch)
        return;
      const { vnode: C, activeBranch: k, parentComponent: x, container: $, namespace: M } = w;
      ic(C, "onFallback");
      const R = m(k), V = () => {
        w.isInFallback && (f(
          null,
          N,
          $,
          R,
          x,
          null,
          // fallback tree will not have suspense context
          M,
          a,
          l
        ), _a(w, N));
      }, j = N.transition && N.transition.mode === "out-in";
      j && (k.transition.afterLeave = V), w.isInFallback = !0, h(
        k,
        x,
        null,
        // no suspense so unmount hooks fire now
        !0
        // shouldRemove
      ), j || V();
    },
    move(N, C, k) {
      w.activeBranch && p(w.activeBranch, N, C, k), w.container = N;
    },
    next() {
      return w.activeBranch && m(w.activeBranch);
    },
    registerDep(N, C, k) {
      const x = !!w.pendingBranch;
      x && w.deps++;
      const $ = N.vnode.el;
      N.asyncDep.catch((M) => {
        qr(M, N, 0);
      }).then((M) => {
        if (N.isUnmounted || w.isUnmounted || w.pendingId !== N.suspenseId)
          return;
        N.asyncResolved = !0;
        const { vnode: R } = N;
        Y.NODE_ENV !== "production" && va(R), Rh(N, M, !1), $ && (R.el = $);
        const V = !$ && N.subTree.el;
        C(
          N,
          R,
          // component may have been moved before resolve.
          // if this is not a hydration, instance.subTree will be the comment
          // placeholder.
          v($ || N.subTree.el),
          // anchor will not be used if this is hydration, so only need to
          // consider the comment placeholder case.
          $ ? null : m(N.subTree),
          w,
          r,
          k
        ), V && g(V), gf(N, R.el), Y.NODE_ENV !== "production" && ga(), x && --w.deps === 0 && w.resolve();
      });
    },
    unmount(N, C) {
      w.isUnmounted = !0, w.activeBranch && h(
        w.activeBranch,
        n,
        N,
        C
      ), w.pendingBranch && h(
        w.pendingBranch,
        n,
        N,
        C
      );
    }
  };
  return w;
}
function cT(e, t, n, s, o, i, r, a, l) {
  const c = t.suspense = uE(
    t,
    s,
    n,
    e.parentNode,
    // eslint-disable-next-line no-restricted-globals
    document.createElement("div"),
    null,
    o,
    i,
    r,
    a,
    !0
  ), d = l(
    e,
    c.pendingBranch = t.ssContent,
    n,
    c,
    i,
    r
  );
  return c.deps === 0 && c.resolve(!1, !0), d;
}
function uT(e) {
  const { shapeFlag: t, children: n } = e, s = t & 32;
  e.ssContent = ay(
    s ? n.default : n
  ), e.ssFallback = s ? ay(n.fallback) : F(zt);
}
function ay(e) {
  let t;
  if (Le(e)) {
    const n = $i && e._c;
    n && (e._d = !1, y()), e = e(), n && (e._d = !0, t = Yn, fE());
  }
  if (Ne(e)) {
    const n = vf(e);
    Y.NODE_ENV !== "production" && !n && e.filter((s) => s !== nv).length > 0 && oe("<Suspense> slots expect a single root node."), e = n;
  }
  return e = Zn(e), t && !e.dynamicChildren && (e.dynamicChildren = t.filter((n) => n !== e)), e;
}
function dE(e, t) {
  t && t.pendingBranch ? Ne(e) ? t.effects.push(...e) : t.effects.push(e) : xa(e);
}
function _a(e, t) {
  e.activeBranch = t;
  const { vnode: n, parentComponent: s } = e;
  let o = t.el;
  for (; !o && t.component; )
    t = t.component.subTree, o = t.el;
  n.el = o, s && s.subTree === n && (s.vnode.el = o, gf(s, o));
}
function dT(e) {
  const t = e.props && e.props.suspensible;
  return t != null && t !== !1;
}
const J = Symbol.for("v-fgt"), bo = Symbol.for("v-txt"), zt = Symbol.for("v-cmt"), Ur = Symbol.for("v-stc"), Ml = [];
let Yn = null;
function y(e = !1) {
  Ml.push(Yn = e ? null : []);
}
function fE() {
  Ml.pop(), Yn = Ml[Ml.length - 1] || null;
}
let $i = 1;
function Th(e, t = !1) {
  $i += e, e < 0 && Yn && t && (Yn.hasOnce = !0);
}
function pE(e) {
  return e.dynamicChildren = $i > 0 ? Yn || yi : null, fE(), $i > 0 && Yn && Yn.push(e), e;
}
function E(e, t, n, s, o, i) {
  return pE(
    u(
      e,
      t,
      n,
      s,
      o,
      i,
      !0
    )
  );
}
function le(e, t, n, s, o) {
  return pE(
    F(
      e,
      t,
      n,
      s,
      o,
      !0
    )
  );
}
function Oo(e) {
  return e ? e.__v_isVNode === !0 : !1;
}
function qs(e, t) {
  if (Y.NODE_ENV !== "production" && t.shapeFlag & 6 && e.component) {
    const n = Au.get(t.type);
    if (n && n.has(e.component))
      return e.shapeFlag &= -257, t.shapeFlag &= -513, !1;
  }
  return e.type === t.type && e.key === t.key;
}
let $h;
function fT(e) {
  $h = e;
}
const pT = (...e) => mE(
  ...$h ? $h(e, an) : e
), hE = ({ key: e }) => e ?? null, Vu = ({
  ref: e,
  ref_key: t,
  ref_for: n
}) => (typeof e == "number" && (e = "" + e), e != null ? We(e) || lt(e) || Le(e) ? { i: an, r: e, k: t, f: !!n } : e : null);
function u(e, t = null, n = null, s = 0, o = null, i = e === J ? 0 : 1, r = !1, a = !1) {
  const l = {
    __v_isVNode: !0,
    __v_skip: !0,
    type: e,
    props: t,
    key: t && hE(t),
    ref: t && Vu(t),
    scopeId: df,
    slotScopeIds: null,
    children: n,
    component: null,
    suspense: null,
    ssContent: null,
    ssFallback: null,
    dirs: null,
    transition: null,
    el: null,
    anchor: null,
    target: null,
    targetStart: null,
    targetAnchor: null,
    staticCount: 0,
    shapeFlag: i,
    patchFlag: s,
    dynamicProps: o,
    dynamicChildren: null,
    appContext: null,
    ctx: an
  };
  return a ? (cv(l, n), i & 128 && e.normalize(l)) : n && (l.shapeFlag |= We(n) ? 8 : 16), Y.NODE_ENV !== "production" && l.key !== l.key && oe("VNode created with invalid key (NaN). VNode type:", l.type), $i > 0 && // avoid a block node from tracking itself
  !r && // has current parent block
  Yn && // presence of a patch flag indicates this node needs patching on updates.
  // component nodes also should always be patched, because even if the
  // component doesn't need to update, it needs to persist the instance on to
  // the next vnode so that it can be properly unmounted later.
  (l.patchFlag > 0 || i & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
  // vnode should not be considered dynamic due to handler caching.
  l.patchFlag !== 32 && Yn.push(l), l;
}
const F = Y.NODE_ENV !== "production" ? pT : mE;
function mE(e, t = null, n = null, s = 0, o = null, i = !1) {
  if ((!e || e === nv) && (Y.NODE_ENV !== "production" && !e && oe(`Invalid vnode type when creating vnode: ${e}.`), e = zt), Oo(e)) {
    const a = Vs(
      e,
      t,
      !0
      /* mergeRef: true */
    );
    return n && cv(a, n), $i > 0 && !i && Yn && (a.shapeFlag & 6 ? Yn[Yn.indexOf(e)] = a : Yn.push(a)), a.patchFlag = -2, a;
  }
  if (SE(e) && (e = e.__vccOpts), t) {
    t = Ut(t);
    let { class: a, style: l } = t;
    a && !We(a) && (t.class = Te(a)), ft(l) && (Oa(l) && !Ne(l) && (l = st({}, l)), t.style = fs(l));
  }
  const r = We(e) ? 1 : _d(e) ? 128 : S1(e) ? 64 : ft(e) ? 4 : Le(e) ? 2 : 0;
  return Y.NODE_ENV !== "production" && r & 4 && Oa(e) && (e = He(e), oe(
    "Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",
    `
Component that was made reactive: `,
    e
  )), u(
    e,
    t,
    n,
    s,
    o,
    r,
    i,
    !0
  );
}
function Ut(e) {
  return e ? Oa(e) || W1(e) ? st({}, e) : e : null;
}
function Vs(e, t, n = !1, s = !1) {
  const { props: o, ref: i, patchFlag: r, children: a, transition: l } = e, c = t ? On(o || {}, t) : o, d = {
    __v_isVNode: !0,
    __v_skip: !0,
    type: e.type,
    props: c,
    key: c && hE(c),
    ref: t && t.ref ? (
      // #2078 in the case of <component :is="vnode" ref="extra"/>
      // if the vnode itself already has a ref, cloneVNode will need to merge
      // the refs so the single vnode can be set on multiple refs
      n && i ? Ne(i) ? i.concat(Vu(t)) : [i, Vu(t)] : Vu(t)
    ) : i,
    scopeId: e.scopeId,
    slotScopeIds: e.slotScopeIds,
    children: Y.NODE_ENV !== "production" && r === -1 && Ne(a) ? a.map(vE) : a,
    target: e.target,
    targetStart: e.targetStart,
    targetAnchor: e.targetAnchor,
    staticCount: e.staticCount,
    shapeFlag: e.shapeFlag,
    // if the vnode is cloned with extra props, we can no longer assume its
    // existing patch flag to be reliable and need to add the FULL_PROPS flag.
    // note: preserve flag for fragments since they use the flag for children
    // fast paths only.
    patchFlag: t && e.type !== J ? r === -1 ? 16 : r | 16 : r,
    dynamicProps: e.dynamicProps,
    dynamicChildren: e.dynamicChildren,
    appContext: e.appContext,
    dirs: e.dirs,
    transition: l,
    // These should technically only be non-null on mounted VNodes. However,
    // they *should* be copied for kept-alive vnodes. So we just always copy
    // them since them being non-null during a mount doesn't affect the logic as
    // they will simply be overwritten.
    component: e.component,
    suspense: e.suspense,
    ssContent: e.ssContent && Vs(e.ssContent),
    ssFallback: e.ssFallback && Vs(e.ssFallback),
    el: e.el,
    anchor: e.anchor,
    ctx: e.ctx,
    ce: e.ce
  };
  return l && s && ir(
    d,
    l.clone(d)
  ), d;
}
function vE(e) {
  const t = Vs(e);
  return Ne(e.children) && (t.children = e.children.map(vE)), t;
}
function se(e = " ", t = 0) {
  return F(bo, null, e, t);
}
function lv(e, t) {
  const n = F(Ur, null, e);
  return n.staticCount = t, n;
}
function ae(e = "", t = !1) {
  return t ? (y(), le(zt, null, e)) : F(zt, null, e);
}
function Zn(e) {
  return e == null || typeof e == "boolean" ? F(zt) : Ne(e) ? F(
    J,
    null,
    // #3666, avoid reference pollution when reusing vnode
    e.slice()
  ) : Oo(e) ? Or(e) : F(bo, null, String(e));
}
function Or(e) {
  return e.el === null && e.patchFlag !== -1 || e.memo ? e : Vs(e);
}
function cv(e, t) {
  let n = 0;
  const { shapeFlag: s } = e;
  if (t == null)
    t = null;
  else if (Ne(t))
    n = 16;
  else if (typeof t == "object")
    if (s & 65) {
      const o = t.default;
      o && (o._c && (o._d = !1), cv(e, o()), o._c && (o._d = !0));
      return;
    } else {
      n = 32;
      const o = t._;
      !o && !W1(t) ? t._ctx = an : o === 3 && an && (an.slots._ === 1 ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024));
    }
  else Le(t) ? (t = { default: t, _ctx: an }, n = 32) : (t = String(t), s & 64 ? (n = 16, t = [se(t)]) : n = 8);
  e.children = t, e.shapeFlag |= n;
}
function On(...e) {
  const t = {};
  for (let n = 0; n < e.length; n++) {
    const s = e[n];
    for (const o in s)
      if (o === "class")
        t.class !== s.class && (t.class = Te([t.class, s.class]));
      else if (o === "style")
        t.style = fs([t.style, s.style]);
      else if (wo(o)) {
        const i = t[o], r = s[o];
        r && i !== r && !(Ne(i) && i.includes(r)) && (t[o] = i ? [].concat(i, r) : r);
      } else o !== "" && (t[o] = s[o]);
  }
  return t;
}
function cs(e, t, n, s = null) {
  Ps(e, t, 7, [
    n,
    s
  ]);
}
const hT = j1();
let mT = 0;
function gE(e, t, n) {
  const s = e.type, o = (t ? t.appContext : e.appContext) || hT, i = {
    uid: mT++,
    vnode: e,
    type: s,
    parent: t,
    appContext: o,
    root: null,
    // to be immediately set
    next: null,
    subTree: null,
    // will be set synchronously right after creation
    effect: null,
    update: null,
    // will be set synchronously right after creation
    job: null,
    scope: new Vm(
      !0
      /* detached */
    ),
    render: null,
    proxy: null,
    exposed: null,
    exposeProxy: null,
    withProxy: null,
    provides: t ? t.provides : Object.create(o.provides),
    ids: t ? t.ids : ["", 0, 0],
    accessCache: null,
    renderCache: [],
    // local resolved assets
    components: null,
    directives: null,
    // resolved props and emits options
    propsOptions: z1(s, o),
    emitsOptions: lE(s, o),
    // emit
    emit: null,
    // to be set immediately
    emitted: null,
    // props default value
    propsDefaults: ut,
    // inheritAttrs
    inheritAttrs: s.inheritAttrs,
    // state
    ctx: ut,
    data: ut,
    props: ut,
    attrs: ut,
    slots: ut,
    refs: ut,
    setupState: ut,
    setupContext: null,
    // suspense related
    suspense: n,
    suspenseId: n ? n.pendingId : 0,
    asyncDep: null,
    asyncResolved: !1,
    // lifecycle hooks
    // not using enums here because it results in computed properties
    isMounted: !1,
    isUnmounted: !1,
    isDeactivated: !1,
    bc: null,
    c: null,
    bm: null,
    m: null,
    bu: null,
    u: null,
    um: null,
    bum: null,
    da: null,
    a: null,
    rtg: null,
    rtc: null,
    ec: null,
    sp: null
  };
  return Y.NODE_ENV !== "production" ? i.ctx = vC(i) : i.ctx = { _: i }, i.root = t ? t.root : i, i.emit = tT.bind(null, i), e.ce && e.ce(i), i;
}
let pn = null;
const un = () => pn || an;
let bd, kh;
{
  const e = Ha(), t = (n, s) => {
    let o;
    return (o = e[n]) || (o = e[n] = []), o.push(s), (i) => {
      o.length > 1 ? o.forEach((r) => r(i)) : o[0](i);
    };
  };
  bd = t(
    "__VUE_INSTANCE_SETTERS__",
    (n) => pn = n
  ), kh = t(
    "__VUE_SSR_SETTERS__",
    (n) => Ta = n
  );
}
const ki = (e) => {
  const t = pn;
  return bd(e), e.scope.on(), () => {
    e.scope.off(), bd(t);
  };
}, Dh = () => {
  pn && pn.scope.off(), bd(null);
}, vT = /* @__PURE__ */ bn("slot,component");
function Ih(e, { isNativeTag: t }) {
  (vT(e) || t(e)) && oe(
    "Do not use built-in or reserved HTML elements as component id: " + e
  );
}
function yE(e) {
  return e.vnode.shapeFlag & 4;
}
let Ta = !1;
function _E(e, t = !1, n = !1) {
  t && kh(t);
  const { props: s, children: o } = e.vnode, i = yE(e);
  LC(e, s, i, t), XC(e, o, n);
  const r = i ? gT(e, t) : void 0;
  return t && kh(!1), r;
}
function gT(e, t) {
  var n;
  const s = e.type;
  if (Y.NODE_ENV !== "production") {
    if (s.name && Ih(s.name, e.appContext.config), s.components) {
      const i = Object.keys(s.components);
      for (let r = 0; r < i.length; r++)
        Ih(i[r], e.appContext.config);
    }
    if (s.directives) {
      const i = Object.keys(s.directives);
      for (let r = 0; r < i.length; r++)
        b1(i[r]);
    }
    s.compilerOptions && uv() && oe(
      '"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.'
    );
  }
  e.accessCache = /* @__PURE__ */ Object.create(null), e.proxy = new Proxy(e.ctx, Rl), Y.NODE_ENV !== "production" && gC(e);
  const { setup: o } = s;
  if (o) {
    cr();
    const i = e.setupContext = o.length > 1 ? EE(e) : null, r = ki(e), a = Yi(
      o,
      e,
      0,
      [
        Y.NODE_ENV !== "production" ? Js(e.props) : e.props,
        i
      ]
    ), l = Nc(a);
    if (ur(), r(), (l || e.sp) && !Fr(e) && Qm(e), l) {
      if (a.then(Dh, Dh), t)
        return a.then((c) => {
          Rh(e, c, t);
        }).catch((c) => {
          qr(c, e, 0);
        });
      if (e.asyncDep = a, Y.NODE_ENV !== "production" && !e.suspense) {
        const c = (n = s.name) != null ? n : "Anonymous";
        oe(
          `Component <${c}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
        );
      }
    } else
      Rh(e, a, t);
  } else
    bE(e, t);
}
function Rh(e, t, n) {
  Le(t) ? e.type.__ssrInlineRender ? e.ssrRender = t : e.render = t : ft(t) ? (Y.NODE_ENV !== "production" && Oo(t) && oe(
    "setup() should not return VNodes directly - return a render function instead."
  ), Y.NODE_ENV !== "production" && (e.devtoolsRawSetupState = t), e.setupState = Wm(t), Y.NODE_ENV !== "production" && yC(e)) : Y.NODE_ENV !== "production" && t !== void 0 && oe(
    `setup() should return an object. Received: ${t === null ? "null" : typeof t}`
  ), bE(e, n);
}
let Pl, Ah;
function yT(e) {
  Pl = e, Ah = (t) => {
    t.render._rc && (t.withProxy = new Proxy(t.ctx, mC));
  };
}
const uv = () => !Pl;
function bE(e, t, n) {
  const s = e.type;
  if (!e.render) {
    if (!t && Pl && !s.render) {
      const o = s.template || iv(e).template;
      if (o) {
        Y.NODE_ENV !== "production" && Fo(e, "compile");
        const { isCustomElement: i, compilerOptions: r } = e.appContext.config, { delimiters: a, compilerOptions: l } = s, c = st(
          st(
            {
              isCustomElement: i,
              delimiters: a
            },
            r
          ),
          l
        );
        s.render = Pl(o, c), Y.NODE_ENV !== "production" && Uo(e, "compile");
      }
    }
    e.render = s.render || Gt, Ah && Ah(e);
  }
  {
    const o = ki(e);
    cr();
    try {
      DC(e);
    } finally {
      ur(), o();
    }
  }
  Y.NODE_ENV !== "production" && !s.render && e.render === Gt && !t && (!Pl && s.template ? oe(
    'Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'
  ) : oe("Component is missing template or render function: ", s));
}
const ly = Y.NODE_ENV !== "production" ? {
  get(e, t) {
    return yd(), Sn(e, "get", ""), e[t];
  },
  set() {
    return oe("setupContext.attrs is readonly."), !1;
  },
  deleteProperty() {
    return oe("setupContext.attrs is readonly."), !1;
  }
} : {
  get(e, t) {
    return Sn(e, "get", ""), e[t];
  }
};
function _T(e) {
  return new Proxy(e.slots, {
    get(t, n) {
      return Sn(e, "get", "$slots"), t[n];
    }
  });
}
function EE(e) {
  const t = (n) => {
    if (Y.NODE_ENV !== "production" && (e.exposed && oe("expose() should be called only once per setup()."), n != null)) {
      let s = typeof n;
      s === "object" && (Ne(n) ? s = "array" : lt(n) && (s = "ref")), s !== "object" && oe(
        `expose() should be passed a plain object, received ${s}.`
      );
    }
    e.exposed = n || {};
  };
  if (Y.NODE_ENV !== "production") {
    let n, s;
    return Object.freeze({
      get attrs() {
        return n || (n = new Proxy(e.attrs, ly));
      },
      get slots() {
        return s || (s = _T(e));
      },
      get emit() {
        return (o, ...i) => e.emit(o, ...i);
      },
      expose: t
    });
  } else
    return {
      attrs: new Proxy(e.attrs, ly),
      slots: e.slots,
      emit: e.emit,
      expose: t
    };
}
function $c(e) {
  return e.exposed ? e.exposeProxy || (e.exposeProxy = new Proxy(Wm(Xo(e.exposed)), {
    get(t, n) {
      if (n in t)
        return t[n];
      if (n in Si)
        return Si[n](e);
    },
    has(t, n) {
      return n in t || n in Si;
    }
  })) : e.proxy;
}
const bT = /(?:^|[-_])(\w)/g, ET = (e) => e.replace(bT, (t) => t.toUpperCase()).replace(/[-_]/g, "");
function ac(e, t = !0) {
  return Le(e) ? e.displayName || e.name : e.name || t && e.__name;
}
function yf(e, t, n = !1) {
  let s = ac(t);
  if (!s && t.__file) {
    const o = t.__file.match(/([^/\\]+)\.\w+$/);
    o && (s = o[1]);
  }
  if (!s && e && e.parent) {
    const o = (i) => {
      for (const r in i)
        if (i[r] === t)
          return r;
    };
    s = o(
      e.components || e.parent.type.components
    ) || o(e.appContext.components);
  }
  return s ? ET(s) : n ? "App" : "Anonymous";
}
function SE(e) {
  return Le(e) && "__vccOpts" in e;
}
const I = (e, t) => {
  const n = yx(e, t, Ta);
  if (Y.NODE_ENV !== "production") {
    const s = un();
    s && s.appContext.config.warnRecursiveComputed && (n._warnRecursive = !0);
  }
  return n;
};
function yo(e, t, n) {
  const s = arguments.length;
  return s === 2 ? ft(t) && !Ne(t) ? Oo(t) ? F(e, null, [t]) : F(e, t) : F(e, null, t) : (s > 3 ? n = Array.prototype.slice.call(arguments, 2) : s === 3 && Oo(n) && (n = [n]), F(e, t, n));
}
function wE() {
  if (Y.NODE_ENV === "production" || typeof window > "u")
    return;
  const e = { style: "color:#3ba776" }, t = { style: "color:#1677ff" }, n = { style: "color:#f5222d" }, s = { style: "color:#eb2f96" }, o = {
    __vue_custom_formatter: !0,
    header(f) {
      return ft(f) ? f.__isVue ? ["div", e, "VueInstance"] : lt(f) ? [
        "div",
        {},
        ["span", e, d(f)],
        "<",
        // avoid debugger accessing value affecting behavior
        a("_value" in f ? f._value : f),
        ">"
      ] : Is(f) ? [
        "div",
        {},
        ["span", e, Wn(f) ? "ShallowReactive" : "Reactive"],
        "<",
        a(f),
        `>${No(f) ? " (readonly)" : ""}`
      ] : No(f) ? [
        "div",
        {},
        ["span", e, Wn(f) ? "ShallowReadonly" : "Readonly"],
        "<",
        a(f),
        ">"
      ] : null : null;
    },
    hasBody(f) {
      return f && f.__isVue;
    },
    body(f) {
      if (f && f.__isVue)
        return [
          "div",
          {},
          ...i(f.$)
        ];
    }
  };
  function i(f) {
    const p = [];
    f.type.props && f.props && p.push(r("props", He(f.props))), f.setupState !== ut && p.push(r("setup", f.setupState)), f.data !== ut && p.push(r("data", He(f.data)));
    const h = l(f, "computed");
    h && p.push(r("computed", h));
    const m = l(f, "inject");
    return m && p.push(r("injected", m)), p.push([
      "div",
      {},
      [
        "span",
        {
          style: s.style + ";opacity:0.66"
        },
        "$ (internal): "
      ],
      ["object", { object: f }]
    ]), p;
  }
  function r(f, p) {
    return p = st({}, p), Object.keys(p).length ? [
      "div",
      { style: "line-height:1.25em;margin-bottom:0.6em" },
      [
        "div",
        {
          style: "color:#476582"
        },
        f
      ],
      [
        "div",
        {
          style: "padding-left:1.25em"
        },
        ...Object.keys(p).map((h) => [
          "div",
          {},
          ["span", s, h + ": "],
          a(p[h], !1)
        ])
      ]
    ] : ["span", {}];
  }
  function a(f, p = !0) {
    return typeof f == "number" ? ["span", t, f] : typeof f == "string" ? ["span", n, JSON.stringify(f)] : typeof f == "boolean" ? ["span", s, f] : ft(f) ? ["object", { object: p ? He(f) : f }] : ["span", n, String(f)];
  }
  function l(f, p) {
    const h = f.type;
    if (Le(h))
      return;
    const m = {};
    for (const v in f.ctx)
      c(h, v, p) && (m[v] = f.ctx[v]);
    return m;
  }
  function c(f, p, h) {
    const m = f[h];
    if (Ne(m) && m.includes(p) || ft(m) && p in m || f.extends && c(f.extends, p, h) || f.mixins && f.mixins.some((v) => c(v, p, h)))
      return !0;
  }
  function d(f) {
    return Wn(f) ? "ShallowRef" : f.effect ? "ComputedRef" : "Ref";
  }
  window.devtoolsFormatters ? window.devtoolsFormatters.push(o) : window.devtoolsFormatters = [o];
}
function ST(e, t, n, s) {
  const o = n[s];
  if (o && NE(o, e))
    return o;
  const i = t();
  return i.memo = e.slice(), i.cacheIndex = s, n[s] = i;
}
function NE(e, t) {
  const n = e.memo;
  if (n.length != t.length)
    return !1;
  for (let s = 0; s < n.length; s++)
    if (Fn(n[s], t[s]))
      return !1;
  return $i > 0 && Yn && Yn.push(e), !0;
}
const Mh = "3.5.13", hn = Y.NODE_ENV !== "production" ? oe : Gt, wT = cf, NT = Xs, OT = Km, xT = {
  createComponentInstance: gE,
  setupComponent: _E,
  renderComponentRoot: Pu,
  setCurrentRenderingInstance: nc,
  isVNode: Oo,
  normalizeVNode: Zn,
  getComponentPublicInstance: $c,
  ensureValidVNode: ov,
  pushWarningContext: va,
  popWarningContext: ga
}, CT = xT, TT = null, $T = null, kT = null;
var jt = {};
let Ph;
const cy = typeof window < "u" && window.trustedTypes;
if (cy)
  try {
    Ph = /* @__PURE__ */ cy.createPolicy("vue", {
      createHTML: (e) => e
    });
  } catch (e) {
    jt.NODE_ENV !== "production" && hn(`Error creating trusted types policy: ${e}`);
  }
const OE = Ph ? (e) => Ph.createHTML(e) : (e) => e, DT = "http://www.w3.org/2000/svg", IT = "http://www.w3.org/1998/Math/MathML", Bo = typeof document < "u" ? document : null, uy = Bo && /* @__PURE__ */ Bo.createElement("template"), RT = {
  insert: (e, t, n) => {
    t.insertBefore(e, n || null);
  },
  remove: (e) => {
    const t = e.parentNode;
    t && t.removeChild(e);
  },
  createElement: (e, t, n, s) => {
    const o = t === "svg" ? Bo.createElementNS(DT, e) : t === "mathml" ? Bo.createElementNS(IT, e) : n ? Bo.createElement(e, { is: n }) : Bo.createElement(e);
    return e === "select" && s && s.multiple != null && o.setAttribute("multiple", s.multiple), o;
  },
  createText: (e) => Bo.createTextNode(e),
  createComment: (e) => Bo.createComment(e),
  setText: (e, t) => {
    e.nodeValue = t;
  },
  setElementText: (e, t) => {
    e.textContent = t;
  },
  parentNode: (e) => e.parentNode,
  nextSibling: (e) => e.nextSibling,
  querySelector: (e) => Bo.querySelector(e),
  setScopeId(e, t) {
    e.setAttribute(t, "");
  },
  // __UNSAFE__
  // Reason: innerHTML.
  // Static content here can only come from compiled templates.
  // As long as the user only uses trusted templates, this is safe.
  insertStaticContent(e, t, n, s, o, i) {
    const r = n ? n.previousSibling : t.lastChild;
    if (o && (o === i || o.nextSibling))
      for (; t.insertBefore(o.cloneNode(!0), n), !(o === i || !(o = o.nextSibling)); )
        ;
    else {
      uy.innerHTML = OE(
        s === "svg" ? `<svg>${e}</svg>` : s === "mathml" ? `<math>${e}</math>` : e
      );
      const a = uy.content;
      if (s === "svg" || s === "mathml") {
        const l = a.firstChild;
        for (; l.firstChild; )
          a.appendChild(l.firstChild);
        a.removeChild(l);
      }
      t.insertBefore(a, n);
    }
    return [
      // first
      r ? r.nextSibling : t.firstChild,
      // last
      n ? n.previousSibling : t.lastChild
    ];
  }
}, yr = "transition", al = "animation", $a = Symbol("_vtc"), xE = {
  name: String,
  type: String,
  css: {
    type: Boolean,
    default: !0
  },
  duration: [String, Number, Object],
  enterFromClass: String,
  enterActiveClass: String,
  enterToClass: String,
  appearFromClass: String,
  appearActiveClass: String,
  appearToClass: String,
  leaveFromClass: String,
  leaveActiveClass: String,
  leaveToClass: String
}, CE = /* @__PURE__ */ st(
  {},
  Jm,
  xE
), AT = (e) => (e.displayName = "Transition", e.props = CE, e), TE = /* @__PURE__ */ AT(
  (e, { slots: t }) => yo(C1, $E(e), t)
), ti = (e, t = []) => {
  Ne(e) ? e.forEach((n) => n(...t)) : e && e(...t);
}, dy = (e) => e ? Ne(e) ? e.some((t) => t.length > 1) : e.length > 1 : !1;
function $E(e) {
  const t = {};
  for (const R in e)
    R in xE || (t[R] = e[R]);
  if (e.css === !1)
    return t;
  const {
    name: n = "v",
    type: s,
    duration: o,
    enterFromClass: i = `${n}-enter-from`,
    enterActiveClass: r = `${n}-enter-active`,
    enterToClass: a = `${n}-enter-to`,
    appearFromClass: l = i,
    appearActiveClass: c = r,
    appearToClass: d = a,
    leaveFromClass: f = `${n}-leave-from`,
    leaveActiveClass: p = `${n}-leave-active`,
    leaveToClass: h = `${n}-leave-to`
  } = e, m = MT(o), v = m && m[0], g = m && m[1], {
    onBeforeEnter: _,
    onEnter: S,
    onEnterCancelled: b,
    onLeave: O,
    onLeaveCancelled: w,
    onBeforeAppear: N = _,
    onAppear: C = S,
    onAppearCancelled: k = b
  } = t, x = (R, V, j, U) => {
    R._enterCancelled = U, Er(R, V ? d : a), Er(R, V ? c : r), j && j();
  }, $ = (R, V) => {
    R._isLeaving = !1, Er(R, f), Er(R, h), Er(R, p), V && V();
  }, M = (R) => (V, j) => {
    const U = R ? C : S, A = () => x(V, R, j);
    ti(U, [V, A]), fy(() => {
      Er(V, R ? l : i), fo(V, R ? d : a), dy(U) || py(V, s, v, A);
    });
  };
  return st(t, {
    onBeforeEnter(R) {
      ti(_, [R]), fo(R, i), fo(R, r);
    },
    onBeforeAppear(R) {
      ti(N, [R]), fo(R, l), fo(R, c);
    },
    onEnter: M(!1),
    onAppear: M(!0),
    onLeave(R, V) {
      R._isLeaving = !0;
      const j = () => $(R, V);
      fo(R, f), R._enterCancelled ? (fo(R, p), Vh()) : (Vh(), fo(R, p)), fy(() => {
        R._isLeaving && (Er(R, f), fo(R, h), dy(O) || py(R, s, g, j));
      }), ti(O, [R, j]);
    },
    onEnterCancelled(R) {
      x(R, !1, void 0, !0), ti(b, [R]);
    },
    onAppearCancelled(R) {
      x(R, !0, void 0, !0), ti(k, [R]);
    },
    onLeaveCancelled(R) {
      $(R), ti(w, [R]);
    }
  });
}
function MT(e) {
  if (e == null)
    return null;
  if (ft(e))
    return [$p(e.enter), $p(e.leave)];
  {
    const t = $p(e);
    return [t, t];
  }
}
function $p(e) {
  const t = Jl(e);
  return jt.NODE_ENV !== "production" && Gm(t, "<transition> explicit duration"), t;
}
function fo(e, t) {
  t.split(/\s+/).forEach((n) => n && e.classList.add(n)), (e[$a] || (e[$a] = /* @__PURE__ */ new Set())).add(t);
}
function Er(e, t) {
  t.split(/\s+/).forEach((s) => s && e.classList.remove(s));
  const n = e[$a];
  n && (n.delete(t), n.size || (e[$a] = void 0));
}
function fy(e) {
  requestAnimationFrame(() => {
    requestAnimationFrame(e);
  });
}
let PT = 0;
function py(e, t, n, s) {
  const o = e._endId = ++PT, i = () => {
    o === e._endId && s();
  };
  if (n != null)
    return setTimeout(i, n);
  const { type: r, timeout: a, propCount: l } = kE(e, t);
  if (!r)
    return s();
  const c = r + "end";
  let d = 0;
  const f = () => {
    e.removeEventListener(c, p), i();
  }, p = (h) => {
    h.target === e && ++d >= l && f();
  };
  setTimeout(() => {
    d < l && f();
  }, a + 1), e.addEventListener(c, p);
}
function kE(e, t) {
  const n = window.getComputedStyle(e), s = (m) => (n[m] || "").split(", "), o = s(`${yr}Delay`), i = s(`${yr}Duration`), r = hy(o, i), a = s(`${al}Delay`), l = s(`${al}Duration`), c = hy(a, l);
  let d = null, f = 0, p = 0;
  t === yr ? r > 0 && (d = yr, f = r, p = i.length) : t === al ? c > 0 && (d = al, f = c, p = l.length) : (f = Math.max(r, c), d = f > 0 ? r > c ? yr : al : null, p = d ? d === yr ? i.length : l.length : 0);
  const h = d === yr && /\b(transform|all)(,|$)/.test(
    s(`${yr}Property`).toString()
  );
  return {
    type: d,
    timeout: f,
    propCount: p,
    hasTransform: h
  };
}
function hy(e, t) {
  for (; e.length < t.length; )
    e = e.concat(e);
  return Math.max(...t.map((n, s) => my(n) + my(e[s])));
}
function my(e) {
  return e === "auto" ? 0 : Number(e.slice(0, -1).replace(",", ".")) * 1e3;
}
function Vh() {
  return document.body.offsetHeight;
}
function VT(e, t, n) {
  const s = e[$a];
  s && (t = (t ? [t, ...s] : [...s]).join(" ")), t == null ? e.removeAttribute("class") : n ? e.setAttribute("class", t) : e.className = t;
}
const Ed = Symbol("_vod"), DE = Symbol("_vsh"), Di = {
  beforeMount(e, { value: t }, { transition: n }) {
    e[Ed] = e.style.display === "none" ? "" : e.style.display, n && t ? n.beforeEnter(e) : ll(e, t);
  },
  mounted(e, { value: t }, { transition: n }) {
    n && t && n.enter(e);
  },
  updated(e, { value: t, oldValue: n }, { transition: s }) {
    !t != !n && (s ? t ? (s.beforeEnter(e), ll(e, !0), s.enter(e)) : s.leave(e, () => {
      ll(e, !1);
    }) : ll(e, t));
  },
  beforeUnmount(e, { value: t }) {
    ll(e, t);
  }
};
jt.NODE_ENV !== "production" && (Di.name = "show");
function ll(e, t) {
  e.style.display = t ? e[Ed] : "none", e[DE] = !t;
}
function LT() {
  Di.getSSRProps = ({ value: e }) => {
    if (!e)
      return { style: { display: "none" } };
  };
}
const IE = Symbol(jt.NODE_ENV !== "production" ? "CSS_VAR_TEXT" : "");
function FT(e) {
  const t = un();
  if (!t) {
    jt.NODE_ENV !== "production" && hn("useCssVars is called without current active component instance.");
    return;
  }
  const n = t.ut = (o = e(t.proxy)) => {
    Array.from(
      document.querySelectorAll(`[data-v-owner="${t.uid}"]`)
    ).forEach((i) => Sd(i, o));
  };
  jt.NODE_ENV !== "production" && (t.getCssVars = () => e(t.proxy));
  const s = () => {
    const o = e(t.proxy);
    t.ce ? Sd(t.ce, o) : Lh(t.subTree, o), n(o);
  };
  tv(() => {
    xa(s);
  }), Mt(() => {
    ht(s, Gt, { flush: "post" });
    const o = new MutationObserver(s);
    o.observe(t.subTree.el.parentNode, { childList: !0 }), fr(() => o.disconnect());
  });
}
function Lh(e, t) {
  if (e.shapeFlag & 128) {
    const n = e.suspense;
    e = n.activeBranch, n.pendingBranch && !n.isHydrating && n.effects.push(() => {
      Lh(n.activeBranch, t);
    });
  }
  for (; e.component; )
    e = e.component.subTree;
  if (e.shapeFlag & 1 && e.el)
    Sd(e.el, t);
  else if (e.type === J)
    e.children.forEach((n) => Lh(n, t));
  else if (e.type === Ur) {
    let { el: n, anchor: s } = e;
    for (; n && (Sd(n, t), n !== s); )
      n = n.nextSibling;
  }
}
function Sd(e, t) {
  if (e.nodeType === 1) {
    const n = e.style;
    let s = "";
    for (const o in t)
      n.setProperty(`--${o}`, t[o]), s += `--${o}: ${t[o]};`;
    n[IE] = s;
  }
}
const UT = /(^|;)\s*display\s*:/;
function jT(e, t, n) {
  const s = e.style, o = We(n);
  let i = !1;
  if (n && !o) {
    if (t)
      if (We(t))
        for (const r of t.split(";")) {
          const a = r.slice(0, r.indexOf(":")).trim();
          n[a] == null && Lu(s, a, "");
        }
      else
        for (const r in t)
          n[r] == null && Lu(s, r, "");
    for (const r in n)
      r === "display" && (i = !0), Lu(s, r, n[r]);
  } else if (o) {
    if (t !== n) {
      const r = s[IE];
      r && (n += ";" + r), s.cssText = n, i = UT.test(n);
    }
  } else t && e.removeAttribute("style");
  Ed in e && (e[Ed] = i ? s.display : "", e[DE] && (s.display = "none"));
}
const BT = /[^\\];\s*$/, vy = /\s*!important$/;
function Lu(e, t, n) {
  if (Ne(n))
    n.forEach((s) => Lu(e, t, s));
  else if (n == null && (n = ""), jt.NODE_ENV !== "production" && BT.test(n) && hn(
    `Unexpected semicolon at the end of '${t}' style value: '${n}'`
  ), t.startsWith("--"))
    e.setProperty(t, n);
  else {
    const s = HT(e, t);
    vy.test(n) ? e.setProperty(
      Mn(s),
      n.replace(vy, ""),
      "important"
    ) : e[s] = n;
  }
}
const gy = ["Webkit", "Moz", "ms"], kp = {};
function HT(e, t) {
  const n = kp[t];
  if (n)
    return n;
  let s = Lt(t);
  if (s !== "filter" && s in e)
    return kp[t] = s;
  s = so(s);
  for (let o = 0; o < gy.length; o++) {
    const i = gy[o] + s;
    if (i in e)
      return kp[t] = i;
  }
  return t;
}
const yy = "http://www.w3.org/1999/xlink";
function _y(e, t, n, s, o, i = Fb(t)) {
  s && t.startsWith("xlink:") ? n == null ? e.removeAttributeNS(yy, t.slice(6, t.length)) : e.setAttributeNS(yy, t, n) : n == null || i && !nf(n) ? e.removeAttribute(t) : e.setAttribute(
    t,
    i ? "" : ns(n) ? String(n) : n
  );
}
function by(e, t, n, s, o) {
  if (t === "innerHTML" || t === "textContent") {
    n != null && (e[t] = t === "innerHTML" ? OE(n) : n);
    return;
  }
  const i = e.tagName;
  if (t === "value" && i !== "PROGRESS" && // custom elements may use _value internally
  !i.includes("-")) {
    const a = i === "OPTION" ? e.getAttribute("value") || "" : e.value, l = n == null ? (
      // #11647: value should be set as empty string for null and undefined,
      // but <input type="checkbox"> should be set as 'on'.
      e.type === "checkbox" ? "on" : ""
    ) : String(n);
    (a !== l || !("_value" in e)) && (e.value = l), n == null && e.removeAttribute(t), e._value = n;
    return;
  }
  let r = !1;
  if (n === "" || n == null) {
    const a = typeof e[t];
    a === "boolean" ? n = nf(n) : n == null && a === "string" ? (n = "", r = !0) : a === "number" && (n = 0, r = !0);
  }
  try {
    e[t] = n;
  } catch (a) {
    jt.NODE_ENV !== "production" && !r && hn(
      `Failed setting prop "${t}" on <${i.toLowerCase()}>: value ${n} is invalid.`,
      a
    );
  }
  r && e.removeAttribute(o || t);
}
function zo(e, t, n, s) {
  e.addEventListener(t, n, s);
}
function YT(e, t, n, s) {
  e.removeEventListener(t, n, s);
}
const Ey = Symbol("_vei");
function WT(e, t, n, s, o = null) {
  const i = e[Ey] || (e[Ey] = {}), r = i[t];
  if (s && r)
    r.value = jt.NODE_ENV !== "production" ? wy(s, t) : s;
  else {
    const [a, l] = GT(t);
    if (s) {
      const c = i[t] = XT(
        jt.NODE_ENV !== "production" ? wy(s, t) : s,
        o
      );
      zo(e, a, c, l);
    } else r && (YT(e, a, r, l), i[t] = void 0);
  }
}
const Sy = /(?:Once|Passive|Capture)$/;
function GT(e) {
  let t;
  if (Sy.test(e)) {
    t = {};
    let s;
    for (; s = e.match(Sy); )
      e = e.slice(0, e.length - s[0].length), t[s[0].toLowerCase()] = !0;
  }
  return [e[2] === ":" ? e.slice(3) : Mn(e.slice(2)), t];
}
let Dp = 0;
const zT = /* @__PURE__ */ Promise.resolve(), KT = () => Dp || (zT.then(() => Dp = 0), Dp = Date.now());
function XT(e, t) {
  const n = (s) => {
    if (!s._vts)
      s._vts = Date.now();
    else if (s._vts <= n.attached)
      return;
    Ps(
      qT(s, n.value),
      t,
      5,
      [s]
    );
  };
  return n.value = e, n.attached = KT(), n;
}
function wy(e, t) {
  return Le(e) || Ne(e) ? e : (hn(
    `Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
Expected function or array of functions, received type ${typeof e}.`
  ), Gt);
}
function qT(e, t) {
  if (Ne(t)) {
    const n = e.stopImmediatePropagation;
    return e.stopImmediatePropagation = () => {
      n.call(e), e._stopped = !0;
    }, t.map(
      (s) => (o) => !o._stopped && s && s(o)
    );
  } else
    return t;
}
const Ny = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // lowercase letter
e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, JT = (e, t, n, s, o, i) => {
  const r = o === "svg";
  t === "class" ? VT(e, s, r) : t === "style" ? jT(e, n, s) : wo(t) ? Xl(t) || WT(e, t, n, s, i) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : QT(e, t, s, r)) ? (by(e, t, s), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && _y(e, t, s, r, i, t !== "value")) : /* #11081 force set props for possible async custom element */ e._isVueCE && (/[A-Z]/.test(t) || !We(s)) ? by(e, Lt(t), s, i, t) : (t === "true-value" ? e._trueValue = s : t === "false-value" && (e._falseValue = s), _y(e, t, s, r));
};
function QT(e, t, n, s) {
  if (s)
    return !!(t === "innerHTML" || t === "textContent" || t in e && Ny(t) && Le(n));
  if (t === "spellcheck" || t === "draggable" || t === "translate" || t === "form" || t === "list" && e.tagName === "INPUT" || t === "type" && e.tagName === "TEXTAREA")
    return !1;
  if (t === "width" || t === "height") {
    const o = e.tagName;
    if (o === "IMG" || o === "VIDEO" || o === "CANVAS" || o === "SOURCE")
      return !1;
  }
  return Ny(t) && We(n) ? !1 : t in e;
}
const Oy = {};
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function RE(e, t, n) {
  const s = /* @__PURE__ */ Cn(e, t);
  Oc(s) && st(s, t);
  class o extends _f {
    constructor(r) {
      super(s, r, n);
    }
  }
  return o.def = s, o;
}
/*! #__NO_SIDE_EFFECTS__ */
const ZT = /* @__NO_SIDE_EFFECTS__ */ (e, t) => /* @__PURE__ */ RE(e, t, BE), e$ = typeof HTMLElement < "u" ? HTMLElement : class {
};
class _f extends e$ {
  constructor(t, n = {}, s = xn) {
    super(), this._def = t, this._props = n, this._createApp = s, this._isVueCE = !0, this._instance = null, this._app = null, this._nonce = this._def.nonce, this._connected = !1, this._resolved = !1, this._numberProps = null, this._styleChildren = /* @__PURE__ */ new WeakSet(), this._ob = null, this.shadowRoot && s !== xn ? this._root = this.shadowRoot : (jt.NODE_ENV !== "production" && this.shadowRoot && hn(
      "Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use `defineSSRCustomElement`."
    ), t.shadowRoot !== !1 ? (this.attachShadow({ mode: "open" }), this._root = this.shadowRoot) : this._root = this), this._def.__asyncLoader || this._resolveProps(this._def);
  }
  connectedCallback() {
    if (!this.isConnected) return;
    this.shadowRoot || this._parseSlots(), this._connected = !0;
    let t = this;
    for (; t = t && (t.parentNode || t.host); )
      if (t instanceof _f) {
        this._parent = t;
        break;
      }
    this._instance || (this._resolved ? (this._setParent(), this._update()) : t && t._pendingResolve ? this._pendingResolve = t._pendingResolve.then(() => {
      this._pendingResolve = void 0, this._resolveDef();
    }) : this._resolveDef());
  }
  _setParent(t = this._parent) {
    t && (this._instance.parent = t._instance, this._instance.provides = t._instance.provides);
  }
  disconnectedCallback() {
    this._connected = !1, rr(() => {
      this._connected || (this._ob && (this._ob.disconnect(), this._ob = null), this._app && this._app.unmount(), this._instance && (this._instance.ce = void 0), this._app = this._instance = null);
    });
  }
  /**
   * resolve inner component definition (handle possible async component)
   */
  _resolveDef() {
    if (this._pendingResolve)
      return;
    for (let s = 0; s < this.attributes.length; s++)
      this._setAttr(this.attributes[s].name);
    this._ob = new MutationObserver((s) => {
      for (const o of s)
        this._setAttr(o.attributeName);
    }), this._ob.observe(this, { attributes: !0 });
    const t = (s, o = !1) => {
      this._resolved = !0, this._pendingResolve = void 0;
      const { props: i, styles: r } = s;
      let a;
      if (i && !Ne(i))
        for (const l in i) {
          const c = i[l];
          (c === Number || c && c.type === Number) && (l in this._props && (this._props[l] = Jl(this._props[l])), (a || (a = /* @__PURE__ */ Object.create(null)))[Lt(l)] = !0);
        }
      this._numberProps = a, o && this._resolveProps(s), this.shadowRoot ? this._applyStyles(r) : jt.NODE_ENV !== "production" && r && hn(
        "Custom element style injection is not supported when using shadowRoot: false"
      ), this._mount(s);
    }, n = this._def.__asyncLoader;
    n ? this._pendingResolve = n().then(
      (s) => t(this._def = s, !0)
    ) : t(this._def);
  }
  _mount(t) {
    jt.NODE_ENV !== "production" && !t.name && (t.name = "VueElement"), this._app = this._createApp(t), t.configureApp && t.configureApp(this._app), this._app._ceVNode = this._createVNode(), this._app.mount(this._root);
    const n = this._instance && this._instance.exposed;
    if (n)
      for (const s in n)
        Et(this, s) ? jt.NODE_ENV !== "production" && hn(`Exposed property "${s}" already exists on custom element.`) : Object.defineProperty(this, s, {
          // unwrap ref to be consistent with public instance behavior
          get: () => T(n[s])
        });
  }
  _resolveProps(t) {
    const { props: n } = t, s = Ne(n) ? n : Object.keys(n || {});
    for (const o of Object.keys(this))
      o[0] !== "_" && s.includes(o) && this._setProp(o, this[o]);
    for (const o of s.map(Lt))
      Object.defineProperty(this, o, {
        get() {
          return this._getProp(o);
        },
        set(i) {
          this._setProp(o, i, !0, !0);
        }
      });
  }
  _setAttr(t) {
    if (t.startsWith("data-v-")) return;
    const n = this.hasAttribute(t);
    let s = n ? this.getAttribute(t) : Oy;
    const o = Lt(t);
    n && this._numberProps && this._numberProps[o] && (s = Jl(s)), this._setProp(o, s, !1, !0);
  }
  /**
   * @internal
   */
  _getProp(t) {
    return this._props[t];
  }
  /**
   * @internal
   */
  _setProp(t, n, s = !0, o = !1) {
    if (n !== this._props[t] && (n === Oy ? delete this._props[t] : (this._props[t] = n, t === "key" && this._app && (this._app._ceVNode.key = n)), o && this._instance && this._update(), s)) {
      const i = this._ob;
      i && i.disconnect(), n === !0 ? this.setAttribute(Mn(t), "") : typeof n == "string" || typeof n == "number" ? this.setAttribute(Mn(t), n + "") : n || this.removeAttribute(Mn(t)), i && i.observe(this, { attributes: !0 });
    }
  }
  _update() {
    jE(this._createVNode(), this._root);
  }
  _createVNode() {
    const t = {};
    this.shadowRoot || (t.onVnodeMounted = t.onVnodeUpdated = this._renderSlots.bind(this));
    const n = F(this._def, st(t, this._props));
    return this._instance || (n.ce = (s) => {
      this._instance = s, s.ce = this, s.isCE = !0, jt.NODE_ENV !== "production" && (s.ceReload = (i) => {
        this._styles && (this._styles.forEach((r) => this._root.removeChild(r)), this._styles.length = 0), this._applyStyles(i), this._instance = null, this._update();
      });
      const o = (i, r) => {
        this.dispatchEvent(
          new CustomEvent(
            i,
            Oc(r[0]) ? st({ detail: r }, r[0]) : { detail: r }
          )
        );
      };
      s.emit = (i, ...r) => {
        o(i, r), Mn(i) !== i && o(Mn(i), r);
      }, this._setParent();
    }), n;
  }
  _applyStyles(t, n) {
    if (!t) return;
    if (n) {
      if (n === this._def || this._styleChildren.has(n))
        return;
      this._styleChildren.add(n);
    }
    const s = this._nonce;
    for (let o = t.length - 1; o >= 0; o--) {
      const i = document.createElement("style");
      if (s && i.setAttribute("nonce", s), i.textContent = t[o], this.shadowRoot.prepend(i), jt.NODE_ENV !== "production")
        if (n) {
          if (n.__hmrId) {
            this._childStyles || (this._childStyles = /* @__PURE__ */ new Map());
            let r = this._childStyles.get(n.__hmrId);
            r || this._childStyles.set(n.__hmrId, r = []), r.push(i);
          }
        } else
          (this._styles || (this._styles = [])).push(i);
    }
  }
  /**
   * Only called when shadowRoot is false
   */
  _parseSlots() {
    const t = this._slots = {};
    let n;
    for (; n = this.firstChild; ) {
      const s = n.nodeType === 1 && n.getAttribute("slot") || "default";
      (t[s] || (t[s] = [])).push(n), this.removeChild(n);
    }
  }
  /**
   * Only called when shadowRoot is false
   */
  _renderSlots() {
    const t = (this._teleportTarget || this).querySelectorAll("slot"), n = this._instance.type.__scopeId;
    for (let s = 0; s < t.length; s++) {
      const o = t[s], i = o.getAttribute("name") || "default", r = this._slots[i], a = o.parentNode;
      if (r)
        for (const l of r) {
          if (n && l.nodeType === 1) {
            const c = n + "-s", d = document.createTreeWalker(l, 1);
            l.setAttribute(c, "");
            let f;
            for (; f = d.nextNode(); )
              f.setAttribute(c, "");
          }
          a.insertBefore(l, o);
        }
      else
        for (; o.firstChild; ) a.insertBefore(o.firstChild, o);
      a.removeChild(o);
    }
  }
  /**
   * @internal
   */
  _injectChildStyle(t) {
    this._applyStyles(t.styles, t);
  }
  /**
   * @internal
   */
  _removeChildStyle(t) {
    if (jt.NODE_ENV !== "production" && (this._styleChildren.delete(t), this._childStyles && t.__hmrId)) {
      const n = this._childStyles.get(t.__hmrId);
      n && (n.forEach((s) => this._root.removeChild(s)), n.length = 0);
    }
  }
}
function Fh(e) {
  const t = un(), n = t && t.ce;
  return n || (jt.NODE_ENV !== "production" && hn(
    t ? `${e || "useHost"} can only be used in components defined via defineCustomElement.` : `${e || "useHost"} called without an active component instance.`
  ), null);
}
function t$() {
  const e = jt.NODE_ENV !== "production" ? Fh("useShadowRoot") : Fh();
  return e && e.shadowRoot;
}
function n$(e = "$style") {
  {
    const t = un();
    if (!t)
      return jt.NODE_ENV !== "production" && hn("useCssModule must be called inside setup()"), ut;
    const n = t.type.__cssModules;
    if (!n)
      return jt.NODE_ENV !== "production" && hn("Current instance does not have CSS modules injected."), ut;
    const s = n[e];
    return s || (jt.NODE_ENV !== "production" && hn(`Current instance does not have CSS module named "${e}".`), ut);
  }
}
const AE = /* @__PURE__ */ new WeakMap(), ME = /* @__PURE__ */ new WeakMap(), wd = Symbol("_moveCb"), xy = Symbol("_enterCb"), s$ = (e) => (delete e.props.mode, e), o$ = /* @__PURE__ */ s$({
  name: "TransitionGroup",
  props: /* @__PURE__ */ st({}, CE, {
    tag: String,
    moveClass: String
  }),
  setup(e, { slots: t }) {
    const n = un(), s = qm();
    let o, i;
    return hf(() => {
      if (!o.length)
        return;
      const r = e.moveClass || `${e.name || "v"}-move`;
      if (!c$(
        o[0].el,
        n.vnode.el,
        r
      ))
        return;
      o.forEach(i$), o.forEach(a$);
      const a = o.filter(l$);
      Vh(), a.forEach((l) => {
        const c = l.el, d = c.style;
        fo(c, r), d.transform = d.webkitTransform = d.transitionDuration = "";
        const f = c[wd] = (p) => {
          p && p.target !== c || (!p || /transform$/.test(p.propertyName)) && (c.removeEventListener("transitionend", f), c[wd] = null, Er(c, r));
        };
        c.addEventListener("transitionend", f);
      });
    }), () => {
      const r = He(e), a = $E(r);
      let l = r.tag || J;
      if (o = [], i)
        for (let c = 0; c < i.length; c++) {
          const d = i[c];
          d.el && d.el instanceof Element && (o.push(d), ir(
            d,
            Ca(
              d,
              a,
              s,
              n
            )
          ), AE.set(
            d,
            d.el.getBoundingClientRect()
          ));
        }
      i = t.default ? ff(t.default()) : [];
      for (let c = 0; c < i.length; c++) {
        const d = i[c];
        d.key != null ? ir(
          d,
          Ca(d, a, s, n)
        ) : jt.NODE_ENV !== "production" && d.type !== bo && hn("<TransitionGroup> children must be keyed.");
      }
      return F(l, null, i);
    };
  }
}), r$ = o$;
function i$(e) {
  const t = e.el;
  t[wd] && t[wd](), t[xy] && t[xy]();
}
function a$(e) {
  ME.set(e, e.el.getBoundingClientRect());
}
function l$(e) {
  const t = AE.get(e), n = ME.get(e), s = t.left - n.left, o = t.top - n.top;
  if (s || o) {
    const i = e.el.style;
    return i.transform = i.webkitTransform = `translate(${s}px,${o}px)`, i.transitionDuration = "0s", e;
  }
}
function c$(e, t, n) {
  const s = e.cloneNode(), o = e[$a];
  o && o.forEach((a) => {
    a.split(/\s+/).forEach((l) => l && s.classList.remove(l));
  }), n.split(/\s+/).forEach((a) => a && s.classList.add(a)), s.style.display = "none";
  const i = t.nodeType === 1 ? t : t.parentNode;
  i.appendChild(s);
  const { hasTransform: r } = kE(s);
  return i.removeChild(s), r;
}
const Gr = (e) => {
  const t = e.props["onUpdate:modelValue"] || !1;
  return Ne(t) ? (n) => Wo(t, n) : t;
};
function u$(e) {
  e.target.composing = !0;
}
function Cy(e) {
  const t = e.target;
  t.composing && (t.composing = !1, t.dispatchEvent(new Event("input")));
}
const Rs = Symbol("_assign"), Ue = {
  created(e, { modifiers: { lazy: t, trim: n, number: s } }, o) {
    e[Rs] = Gr(o);
    const i = s || o.props && o.props.type === "number";
    zo(e, t ? "change" : "input", (r) => {
      if (r.target.composing) return;
      let a = e.value;
      n && (a = a.trim()), i && (a = ql(a)), e[Rs](a);
    }), n && zo(e, "change", () => {
      e.value = e.value.trim();
    }), t || (zo(e, "compositionstart", u$), zo(e, "compositionend", Cy), zo(e, "change", Cy));
  },
  // set value on mounted so it's after min/max for type="range"
  mounted(e, { value: t }) {
    e.value = t ?? "";
  },
  beforeUpdate(e, { value: t, oldValue: n, modifiers: { lazy: s, trim: o, number: i } }, r) {
    if (e[Rs] = Gr(r), e.composing) return;
    const a = (i || e.type === "number") && !/^0\d/.test(e.value) ? ql(e.value) : e.value, l = t ?? "";
    a !== l && (document.activeElement === e && e.type !== "range" && (s && t === n || o && e.value.trim() === l) || (e.value = l));
  }
}, _n = {
  // #4096 array checkboxes need to be deep traversed
  deep: !0,
  created(e, t, n) {
    e[Rs] = Gr(n), zo(e, "change", () => {
      const s = e._modelValue, o = ka(e), i = e.checked, r = e[Rs];
      if (Ne(s)) {
        const a = xc(s, o), l = a !== -1;
        if (i && !l)
          r(s.concat(o));
        else if (!i && l) {
          const c = [...s];
          c.splice(a, 1), r(c);
        }
      } else if (Xr(s)) {
        const a = new Set(s);
        i ? a.add(o) : a.delete(o), r(a);
      } else
        r(PE(e, i));
    });
  },
  // set initial checked on mount to wait for true-value/false-value
  mounted: Ty,
  beforeUpdate(e, t, n) {
    e[Rs] = Gr(n), Ty(e, t, n);
  }
};
function Ty(e, { value: t, oldValue: n }, s) {
  e._modelValue = t;
  let o;
  if (Ne(t))
    o = xc(t, s.props.value) > -1;
  else if (Xr(t))
    o = t.has(s.props.value);
  else {
    if (t === n) return;
    o = or(t, PE(e, !0));
  }
  e.checked !== o && (e.checked = o);
}
const ba = {
  created(e, { value: t }, n) {
    e.checked = or(t, n.props.value), e[Rs] = Gr(n), zo(e, "change", () => {
      e[Rs](ka(e));
    });
  },
  beforeUpdate(e, { value: t, oldValue: n }, s) {
    e[Rs] = Gr(s), t !== n && (e.checked = or(t, s.props.value));
  }
}, Zt = {
  // <select multiple> value need to be deep traversed
  deep: !0,
  created(e, { value: t, modifiers: { number: n } }, s) {
    const o = Xr(t);
    zo(e, "change", () => {
      const i = Array.prototype.filter.call(e.options, (r) => r.selected).map(
        (r) => n ? ql(ka(r)) : ka(r)
      );
      e[Rs](
        e.multiple ? o ? new Set(i) : i : i[0]
      ), e._assigning = !0, rr(() => {
        e._assigning = !1;
      });
    }), e[Rs] = Gr(s);
  },
  // set value in mounted & updated because <select> relies on its children
  // <option>s.
  mounted(e, { value: t }) {
    $y(e, t);
  },
  beforeUpdate(e, t, n) {
    e[Rs] = Gr(n);
  },
  updated(e, { value: t }) {
    e._assigning || $y(e, t);
  }
};
function $y(e, t) {
  const n = e.multiple, s = Ne(t);
  if (n && !s && !Xr(t)) {
    jt.NODE_ENV !== "production" && hn(
      `<select multiple v-model> expects an Array or Set value for its binding, but got ${Object.prototype.toString.call(t).slice(8, -1)}.`
    );
    return;
  }
  for (let o = 0, i = e.options.length; o < i; o++) {
    const r = e.options[o], a = ka(r);
    if (n)
      if (s) {
        const l = typeof a;
        l === "string" || l === "number" ? r.selected = t.some((c) => String(c) === String(a)) : r.selected = xc(t, a) > -1;
      } else
        r.selected = t.has(a);
    else if (or(ka(r), t)) {
      e.selectedIndex !== o && (e.selectedIndex = o);
      return;
    }
  }
  !n && e.selectedIndex !== -1 && (e.selectedIndex = -1);
}
function ka(e) {
  return "_value" in e ? e._value : e.value;
}
function PE(e, t) {
  const n = t ? "_trueValue" : "_falseValue";
  return n in e ? e[n] : t;
}
const dv = {
  created(e, t, n) {
    lu(e, t, n, null, "created");
  },
  mounted(e, t, n) {
    lu(e, t, n, null, "mounted");
  },
  beforeUpdate(e, t, n, s) {
    lu(e, t, n, s, "beforeUpdate");
  },
  updated(e, t, n, s) {
    lu(e, t, n, s, "updated");
  }
};
function VE(e, t) {
  switch (e) {
    case "SELECT":
      return Zt;
    case "TEXTAREA":
      return Ue;
    default:
      switch (t) {
        case "checkbox":
          return _n;
        case "radio":
          return ba;
        default:
          return Ue;
      }
  }
}
function lu(e, t, n, s, o) {
  const r = VE(
    e.tagName,
    n.props && n.props.type
  )[o];
  r && r(e, t, n, s);
}
function d$() {
  Ue.getSSRProps = ({ value: e }) => ({ value: e }), ba.getSSRProps = ({ value: e }, t) => {
    if (t.props && or(t.props.value, e))
      return { checked: !0 };
  }, _n.getSSRProps = ({ value: e }, t) => {
    if (Ne(e)) {
      if (t.props && xc(e, t.props.value) > -1)
        return { checked: !0 };
    } else if (Xr(e)) {
      if (t.props && e.has(t.props.value))
        return { checked: !0 };
    } else if (e)
      return { checked: !0 };
  }, dv.getSSRProps = (e, t) => {
    if (typeof t.type != "string")
      return;
    const n = VE(
      // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
      t.type.toUpperCase(),
      t.props && t.props.type
    );
    if (n.getSSRProps)
      return n.getSSRProps(e, t);
  };
}
const f$ = ["ctrl", "shift", "alt", "meta"], p$ = {
  stop: (e) => e.stopPropagation(),
  prevent: (e) => e.preventDefault(),
  self: (e) => e.target !== e.currentTarget,
  ctrl: (e) => !e.ctrlKey,
  shift: (e) => !e.shiftKey,
  alt: (e) => !e.altKey,
  meta: (e) => !e.metaKey,
  left: (e) => "button" in e && e.button !== 0,
  middle: (e) => "button" in e && e.button !== 1,
  right: (e) => "button" in e && e.button !== 2,
  exact: (e, t) => f$.some((n) => e[`${n}Key`] && !t.includes(n))
}, Vt = (e, t) => {
  const n = e._withMods || (e._withMods = {}), s = t.join(".");
  return n[s] || (n[s] = (o, ...i) => {
    for (let r = 0; r < t.length; r++) {
      const a = p$[t[r]];
      if (a && a(o, t)) return;
    }
    return e(o, ...i);
  });
}, h$ = {
  esc: "escape",
  space: " ",
  up: "arrow-up",
  left: "arrow-left",
  right: "arrow-right",
  down: "arrow-down",
  delete: "backspace"
}, fv = (e, t) => {
  const n = e._withKeys || (e._withKeys = {}), s = t.join(".");
  return n[s] || (n[s] = (o) => {
    if (!("key" in o))
      return;
    const i = Mn(o.key);
    if (t.some(
      (r) => r === i || h$[r] === i
    ))
      return e(o);
  });
}, LE = /* @__PURE__ */ st({ patchProp: JT }, RT);
let Vl, ky = !1;
function FE() {
  return Vl || (Vl = Q1(LE));
}
function UE() {
  return Vl = ky ? Vl : Z1(LE), ky = !0, Vl;
}
const jE = (...e) => {
  FE().render(...e);
}, m$ = (...e) => {
  UE().hydrate(...e);
}, xn = (...e) => {
  const t = FE().createApp(...e);
  jt.NODE_ENV !== "production" && (YE(t), WE(t));
  const { mount: n } = t;
  return t.mount = (s) => {
    const o = GE(s);
    if (!o) return;
    const i = t._component;
    !Le(i) && !i.render && !i.template && (i.template = o.innerHTML), o.nodeType === 1 && (o.textContent = "");
    const r = n(o, !1, HE(o));
    return o instanceof Element && (o.removeAttribute("v-cloak"), o.setAttribute("data-v-app", "")), r;
  }, t;
}, BE = (...e) => {
  const t = UE().createApp(...e);
  jt.NODE_ENV !== "production" && (YE(t), WE(t));
  const { mount: n } = t;
  return t.mount = (s) => {
    const o = GE(s);
    if (o)
      return n(o, !0, HE(o));
  }, t;
};
function HE(e) {
  if (e instanceof SVGElement)
    return "svg";
  if (typeof MathMLElement == "function" && e instanceof MathMLElement)
    return "mathml";
}
function YE(e) {
  Object.defineProperty(e.config, "isNativeTag", {
    value: (t) => Am(t) || Mm(t) || Pm(t),
    writable: !1
  });
}
function WE(e) {
  if (uv()) {
    const t = e.config.isCustomElement;
    Object.defineProperty(e.config, "isCustomElement", {
      get() {
        return t;
      },
      set() {
        hn(
          "The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead."
        );
      }
    });
    const n = e.config.compilerOptions, s = 'The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';
    Object.defineProperty(e.config, "compilerOptions", {
      get() {
        return hn(s), n;
      },
      set() {
        hn(s);
      }
    });
  }
}
function GE(e) {
  if (We(e)) {
    const t = document.querySelector(e);
    return jt.NODE_ENV !== "production" && !t && hn(
      `Failed to mount app: mount target selector "${e}" returned null.`
    ), t;
  }
  return jt.NODE_ENV !== "production" && window.ShadowRoot && e instanceof window.ShadowRoot && e.mode === "closed" && hn(
    'mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'
  ), e;
}
let Dy = !1;
const v$ = () => {
  Dy || (Dy = !0, d$(), LT());
}, g$ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  BaseTransition: C1,
  BaseTransitionPropsValidators: Jm,
  Comment: zt,
  DeprecationTypes: kT,
  EffectScope: Vm,
  ErrorCodes: Cx,
  ErrorTypeStrings: wT,
  Fragment: J,
  KeepAlive: uC,
  ReactiveEffect: Ql,
  Static: Ur,
  Suspense: iT,
  Teleport: Ss,
  Text: bo,
  TrackOpTypes: _x,
  Transition: TE,
  TransitionGroup: r$,
  TriggerOpTypes: bx,
  VueElement: _f,
  assertNumber: Gm,
  callWithAsyncErrorHandling: Ps,
  callWithErrorHandling: Yi,
  camelize: Lt,
  capitalize: so,
  cloneVNode: Vs,
  compatUtils: $T,
  computed: I,
  createApp: xn,
  createBlock: le,
  createCommentVNode: ae,
  createElementBlock: E,
  createElementVNode: u,
  createHydrationRenderer: Z1,
  createPropsRestProxy: TC,
  createRenderer: Q1,
  createSSRApp: BE,
  createSlots: pC,
  createStaticVNode: lv,
  createTextVNode: se,
  createVNode: F,
  customRef: u1,
  defineAsyncComponent: lC,
  defineComponent: Cn,
  defineCustomElement: RE,
  defineEmits: bC,
  defineExpose: EC,
  defineModel: NC,
  defineOptions: SC,
  defineProps: _C,
  defineSSRCustomElement: ZT,
  defineSlots: wC,
  devtools: NT,
  effect: YO,
  effectScope: Lm,
  getCurrentInstance: un,
  getCurrentScope: Fm,
  getCurrentWatcher: Ex,
  getTransitionRawChildren: ff,
  guardReactiveProps: Ut,
  h: yo,
  handleError: qr,
  hasInjectionContext: B1,
  hydrate: m$,
  hydrateOnIdle: nC,
  hydrateOnInteraction: iC,
  hydrateOnMediaQuery: rC,
  hydrateOnVisible: oC,
  initCustomFormatter: wE,
  initDirectivesForSSR: v$,
  inject: Ie,
  isMemoSame: NE,
  isProxy: Oa,
  isReactive: Is,
  isReadonly: No,
  isRef: lt,
  isRuntimeOnly: uv,
  isShallow: Wn,
  isVNode: Oo,
  markRaw: Xo,
  mergeDefaults: CC,
  mergeModels: bs,
  mergeProps: On,
  nextTick: rr,
  normalizeClass: Te,
  normalizeProps: Ft,
  normalizeStyle: fs,
  onActivated: Zm,
  onBeforeMount: R1,
  onBeforeUnmount: Wi,
  onBeforeUpdate: tv,
  onDeactivated: ev,
  onErrorCaptured: V1,
  onMounted: Mt,
  onRenderTracked: P1,
  onRenderTriggered: M1,
  onScopeDispose: zb,
  onServerPrefetch: A1,
  onUnmounted: fr,
  onUpdated: hf,
  onWatcherCleanup: f1,
  openBlock: y,
  popScopeId: Hx,
  provide: wn,
  proxyRefs: Wm,
  pushScopeId: Bx,
  queuePostFlushCb: xa,
  reactive: mt,
  readonly: af,
  ref: L,
  registerRuntimeCompiler: yT,
  render: jE,
  renderList: Ee,
  renderSlot: ye,
  resolveComponent: be,
  resolveDirective: Bt,
  resolveDynamicComponent: oc,
  resolveFilter: TT,
  resolveTransitionHooks: Ca,
  setBlockTracking: Th,
  setDevtoolsHook: OT,
  setTransitionHooks: ir,
  shallowReactive: Hm,
  shallowReadonly: Js,
  shallowRef: Ym,
  ssrContextKey: sE,
  ssrUtils: CT,
  stop: WO,
  toDisplayString: H,
  toHandlerKey: zs,
  toHandlers: hC,
  toRaw: He,
  toRef: ma,
  toRefs: xe,
  toValue: fx,
  transformVNodeArgs: fT,
  triggerRef: dx,
  unref: T,
  useAttrs: xC,
  useCssModule: n$,
  useCssVars: FT,
  useHost: Fh,
  useId: zx,
  useModel: mn,
  useSSRContext: oE,
  useShadowRoot: t$,
  useSlots: L1,
  useTemplateRef: Wr,
  useTransitionState: qm,
  vModelCheckbox: _n,
  vModelDynamic: dv,
  vModelRadio: ba,
  vModelSelect: Zt,
  vModelText: Ue,
  vShow: Di,
  version: Mh,
  warn: hn,
  watch: ht,
  watchEffect: tn,
  watchPostEffect: ZC,
  watchSyncEffect: rE,
  withAsyncContext: $C,
  withCtx: K,
  withDefaults: OC,
  withDirectives: P,
  withKeys: fv,
  withMemo: ST,
  withModifiers: Vt,
  withScopeId: Yx
}, Symbol.toStringTag, { value: "Module" }));
var y$ = {};
function _$() {
  wE();
}
y$.NODE_ENV !== "production" && _$();
function b$() {
  return "10000000-1000-4000-8000-100000000000".replace(
    /[018]/g,
    (e) => (e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> e / 4).toString(16)
  );
}
const Uh = {}, ms = (e, t, n = !1) => {
  const s = b$();
  return n && (Uh[s] = {}), () => {
    const i = Ie("store");
    let r = n ? Uh[s] : i;
    return typeof r[e] > "u" && (r[e] = t()), r[e];
  };
}, zi = () => {
  const e = {};
  return {
    install: (t) => {
      t.config.globalProperties.$store = e, t.provide("store", e), t.config.globalProperties.$sharedStore = e, t.provide("sharedStore", Uh);
    }
  };
};
//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var zE;
function de() {
  return zE.apply(null, arguments);
}
function E$(e) {
  zE = e;
}
function oo(e) {
  return e instanceof Array || Object.prototype.toString.call(e) === "[object Array]";
}
function Ni(e) {
  return e != null && Object.prototype.toString.call(e) === "[object Object]";
}
function $t(e, t) {
  return Object.prototype.hasOwnProperty.call(e, t);
}
function pv(e) {
  if (Object.getOwnPropertyNames)
    return Object.getOwnPropertyNames(e).length === 0;
  var t;
  for (t in e)
    if ($t(e, t))
      return !1;
  return !0;
}
function ls(e) {
  return e === void 0;
}
function ar(e) {
  return typeof e == "number" || Object.prototype.toString.call(e) === "[object Number]";
}
function kc(e) {
  return e instanceof Date || Object.prototype.toString.call(e) === "[object Date]";
}
function KE(e, t) {
  var n = [], s, o = e.length;
  for (s = 0; s < o; ++s)
    n.push(t(e[s], s));
  return n;
}
function Rr(e, t) {
  for (var n in t)
    $t(t, n) && (e[n] = t[n]);
  return $t(t, "toString") && (e.toString = t.toString), $t(t, "valueOf") && (e.valueOf = t.valueOf), e;
}
function $o(e, t, n, s) {
  return g0(e, t, n, s, !0).utc();
}
function S$() {
  return {
    empty: !1,
    unusedTokens: [],
    unusedInput: [],
    overflow: -2,
    charsLeftOver: 0,
    nullInput: !1,
    invalidEra: null,
    invalidMonth: null,
    invalidFormat: !1,
    userInvalidated: !1,
    iso: !1,
    parsedDateParts: [],
    era: null,
    meridiem: null,
    rfc2822: !1,
    weekdayMismatch: !1
  };
}
function at(e) {
  return e._pf == null && (e._pf = S$()), e._pf;
}
var jh;
Array.prototype.some ? jh = Array.prototype.some : jh = function(e) {
  var t = Object(this), n = t.length >>> 0, s;
  for (s = 0; s < n; s++)
    if (s in t && e.call(this, t[s], s, t))
      return !0;
  return !1;
};
function hv(e) {
  var t = null, n = !1, s = e._d && !isNaN(e._d.getTime());
  if (s && (t = at(e), n = jh.call(t.parsedDateParts, function(o) {
    return o != null;
  }), s = t.overflow < 0 && !t.empty && !t.invalidEra && !t.invalidMonth && !t.invalidWeekday && !t.weekdayMismatch && !t.nullInput && !t.invalidFormat && !t.userInvalidated && (!t.meridiem || t.meridiem && n), e._strict && (s = s && t.charsLeftOver === 0 && t.unusedTokens.length === 0 && t.bigHour === void 0)), Object.isFrozen == null || !Object.isFrozen(e))
    e._isValid = s;
  else
    return s;
  return e._isValid;
}
function bf(e) {
  var t = $o(NaN);
  return e != null ? Rr(at(t), e) : at(t).userInvalidated = !0, t;
}
var Iy = de.momentProperties = [], Ip = !1;
function mv(e, t) {
  var n, s, o, i = Iy.length;
  if (ls(t._isAMomentObject) || (e._isAMomentObject = t._isAMomentObject), ls(t._i) || (e._i = t._i), ls(t._f) || (e._f = t._f), ls(t._l) || (e._l = t._l), ls(t._strict) || (e._strict = t._strict), ls(t._tzm) || (e._tzm = t._tzm), ls(t._isUTC) || (e._isUTC = t._isUTC), ls(t._offset) || (e._offset = t._offset), ls(t._pf) || (e._pf = at(t)), ls(t._locale) || (e._locale = t._locale), i > 0)
    for (n = 0; n < i; n++)
      s = Iy[n], o = t[s], ls(o) || (e[s] = o);
  return e;
}
function Dc(e) {
  mv(this, e), this._d = new Date(e._d != null ? e._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), Ip === !1 && (Ip = !0, de.updateOffset(this), Ip = !1);
}
function ro(e) {
  return e instanceof Dc || e != null && e._isAMomentObject != null;
}
function XE(e) {
  de.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + e);
}
function Fs(e, t) {
  var n = !0;
  return Rr(function() {
    if (de.deprecationHandler != null && de.deprecationHandler(null, e), n) {
      var s = [], o, i, r, a = arguments.length;
      for (i = 0; i < a; i++) {
        if (o = "", typeof arguments[i] == "object") {
          o += `
[` + i + "] ";
          for (r in arguments[0])
            $t(arguments[0], r) && (o += r + ": " + arguments[0][r] + ", ");
          o = o.slice(0, -2);
        } else
          o = arguments[i];
        s.push(o);
      }
      XE(
        e + `
Arguments: ` + Array.prototype.slice.call(s).join("") + `
` + new Error().stack
      ), n = !1;
    }
    return t.apply(this, arguments);
  }, t);
}
var Ry = {};
function qE(e, t) {
  de.deprecationHandler != null && de.deprecationHandler(e, t), Ry[e] || (XE(t), Ry[e] = !0);
}
de.suppressDeprecationWarnings = !1;
de.deprecationHandler = null;
function ko(e) {
  return typeof Function < "u" && e instanceof Function || Object.prototype.toString.call(e) === "[object Function]";
}
function w$(e) {
  var t, n;
  for (n in e)
    $t(e, n) && (t = e[n], ko(t) ? this[n] = t : this["_" + n] = t);
  this._config = e, this._dayOfMonthOrdinalParseLenient = new RegExp(
    (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
  );
}
function Bh(e, t) {
  var n = Rr({}, e), s;
  for (s in t)
    $t(t, s) && (Ni(e[s]) && Ni(t[s]) ? (n[s] = {}, Rr(n[s], e[s]), Rr(n[s], t[s])) : t[s] != null ? n[s] = t[s] : delete n[s]);
  for (s in e)
    $t(e, s) && !$t(t, s) && Ni(e[s]) && (n[s] = Rr({}, n[s]));
  return n;
}
function vv(e) {
  e != null && this.set(e);
}
var Hh;
Object.keys ? Hh = Object.keys : Hh = function(e) {
  var t, n = [];
  for (t in e)
    $t(e, t) && n.push(t);
  return n;
};
var N$ = {
  sameDay: "[Today at] LT",
  nextDay: "[Tomorrow at] LT",
  nextWeek: "dddd [at] LT",
  lastDay: "[Yesterday at] LT",
  lastWeek: "[Last] dddd [at] LT",
  sameElse: "L"
};
function O$(e, t, n) {
  var s = this._calendar[e] || this._calendar.sameElse;
  return ko(s) ? s.call(t, n) : s;
}
function xo(e, t, n) {
  var s = "" + Math.abs(e), o = t - s.length, i = e >= 0;
  return (i ? n ? "+" : "" : "-") + Math.pow(10, Math.max(0, o)).toString().substr(1) + s;
}
var gv = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, cu = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, Rp = {}, Ea = {};
function Be(e, t, n, s) {
  var o = s;
  typeof s == "string" && (o = function() {
    return this[s]();
  }), e && (Ea[e] = o), t && (Ea[t[0]] = function() {
    return xo(o.apply(this, arguments), t[1], t[2]);
  }), n && (Ea[n] = function() {
    return this.localeData().ordinal(
      o.apply(this, arguments),
      e
    );
  });
}
function x$(e) {
  return e.match(/\[[\s\S]/) ? e.replace(/^\[|\]$/g, "") : e.replace(/\\/g, "");
}
function C$(e) {
  var t = e.match(gv), n, s;
  for (n = 0, s = t.length; n < s; n++)
    Ea[t[n]] ? t[n] = Ea[t[n]] : t[n] = x$(t[n]);
  return function(o) {
    var i = "", r;
    for (r = 0; r < s; r++)
      i += ko(t[r]) ? t[r].call(o, e) : t[r];
    return i;
  };
}
function Fu(e, t) {
  return e.isValid() ? (t = JE(t, e.localeData()), Rp[t] = Rp[t] || C$(t), Rp[t](e)) : e.localeData().invalidDate();
}
function JE(e, t) {
  var n = 5;
  function s(o) {
    return t.longDateFormat(o) || o;
  }
  for (cu.lastIndex = 0; n >= 0 && cu.test(e); )
    e = e.replace(
      cu,
      s
    ), cu.lastIndex = 0, n -= 1;
  return e;
}
var T$ = {
  LTS: "h:mm:ss A",
  LT: "h:mm A",
  L: "MM/DD/YYYY",
  LL: "MMMM D, YYYY",
  LLL: "MMMM D, YYYY h:mm A",
  LLLL: "dddd, MMMM D, YYYY h:mm A"
};
function $$(e) {
  var t = this._longDateFormat[e], n = this._longDateFormat[e.toUpperCase()];
  return t || !n ? t : (this._longDateFormat[e] = n.match(gv).map(function(s) {
    return s === "MMMM" || s === "MM" || s === "DD" || s === "dddd" ? s.slice(1) : s;
  }).join(""), this._longDateFormat[e]);
}
var k$ = "Invalid date";
function D$() {
  return this._invalidDate;
}
var I$ = "%d", R$ = /\d{1,2}/;
function A$(e) {
  return this._ordinal.replace("%d", e);
}
var M$ = {
  future: "in %s",
  past: "%s ago",
  s: "a few seconds",
  ss: "%d seconds",
  m: "a minute",
  mm: "%d minutes",
  h: "an hour",
  hh: "%d hours",
  d: "a day",
  dd: "%d days",
  w: "a week",
  ww: "%d weeks",
  M: "a month",
  MM: "%d months",
  y: "a year",
  yy: "%d years"
};
function P$(e, t, n, s) {
  var o = this._relativeTime[n];
  return ko(o) ? o(e, t, n, s) : o.replace(/%d/i, e);
}
function V$(e, t) {
  var n = this._relativeTime[e > 0 ? "future" : "past"];
  return ko(n) ? n(t) : n.replace(/%s/i, t);
}
var Ay = {
  D: "date",
  dates: "date",
  date: "date",
  d: "day",
  days: "day",
  day: "day",
  e: "weekday",
  weekdays: "weekday",
  weekday: "weekday",
  E: "isoWeekday",
  isoweekdays: "isoWeekday",
  isoweekday: "isoWeekday",
  DDD: "dayOfYear",
  dayofyears: "dayOfYear",
  dayofyear: "dayOfYear",
  h: "hour",
  hours: "hour",
  hour: "hour",
  ms: "millisecond",
  milliseconds: "millisecond",
  millisecond: "millisecond",
  m: "minute",
  minutes: "minute",
  minute: "minute",
  M: "month",
  months: "month",
  month: "month",
  Q: "quarter",
  quarters: "quarter",
  quarter: "quarter",
  s: "second",
  seconds: "second",
  second: "second",
  gg: "weekYear",
  weekyears: "weekYear",
  weekyear: "weekYear",
  GG: "isoWeekYear",
  isoweekyears: "isoWeekYear",
  isoweekyear: "isoWeekYear",
  w: "week",
  weeks: "week",
  week: "week",
  W: "isoWeek",
  isoweeks: "isoWeek",
  isoweek: "isoWeek",
  y: "year",
  years: "year",
  year: "year"
};
function Us(e) {
  return typeof e == "string" ? Ay[e] || Ay[e.toLowerCase()] : void 0;
}
function yv(e) {
  var t = {}, n, s;
  for (s in e)
    $t(e, s) && (n = Us(s), n && (t[n] = e[s]));
  return t;
}
var L$ = {
  date: 9,
  day: 11,
  weekday: 11,
  isoWeekday: 11,
  dayOfYear: 4,
  hour: 13,
  millisecond: 16,
  minute: 14,
  month: 8,
  quarter: 7,
  second: 15,
  weekYear: 1,
  isoWeekYear: 1,
  week: 5,
  isoWeek: 5,
  year: 1
};
function F$(e) {
  var t = [], n;
  for (n in e)
    $t(e, n) && t.push({ unit: n, priority: L$[n] });
  return t.sort(function(s, o) {
    return s.priority - o.priority;
  }), t;
}
var QE = /\d/, ws = /\d\d/, ZE = /\d{3}/, _v = /\d{4}/, Ef = /[+-]?\d{6}/, Xt = /\d\d?/, e0 = /\d\d\d\d?/, t0 = /\d\d\d\d\d\d?/, Sf = /\d{1,3}/, bv = /\d{1,4}/, wf = /[+-]?\d{1,6}/, Wa = /\d+/, Nf = /[+-]?\d+/, U$ = /Z|[+-]\d\d:?\d\d/gi, Of = /Z|[+-]\d\d(?::?\d\d)?/gi, j$ = /[+-]?\d+(\.\d{1,3})?/, Ic = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, Ga = /^[1-9]\d?/, Ev = /^([1-9]\d|\d)/, Nd;
Nd = {};
function De(e, t, n) {
  Nd[e] = ko(t) ? t : function(s, o) {
    return s && n ? n : t;
  };
}
function B$(e, t) {
  return $t(Nd, e) ? Nd[e](t._strict, t._locale) : new RegExp(H$(e));
}
function H$(e) {
  return er(
    e.replace("\\", "").replace(
      /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
      function(t, n, s, o, i) {
        return n || s || o || i;
      }
    )
  );
}
function er(e) {
  return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
function ks(e) {
  return e < 0 ? Math.ceil(e) || 0 : Math.floor(e);
}
function yt(e) {
  var t = +e, n = 0;
  return t !== 0 && isFinite(t) && (n = ks(t)), n;
}
var Yh = {};
function Ht(e, t) {
  var n, s = t, o;
  for (typeof e == "string" && (e = [e]), ar(t) && (s = function(i, r) {
    r[t] = yt(i);
  }), o = e.length, n = 0; n < o; n++)
    Yh[e[n]] = s;
}
function Rc(e, t) {
  Ht(e, function(n, s, o, i) {
    o._w = o._w || {}, t(n, o._w, o, i);
  });
}
function Y$(e, t, n) {
  t != null && $t(Yh, e) && Yh[e](t, n._a, n, e);
}
function xf(e) {
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0;
}
var Gn = 0, qo = 1, go = 2, Nn = 3, Zs = 4, Jo = 5, di = 6, W$ = 7, G$ = 8;
Be("Y", 0, 0, function() {
  var e = this.year();
  return e <= 9999 ? xo(e, 4) : "+" + e;
});
Be(0, ["YY", 2], 0, function() {
  return this.year() % 100;
});
Be(0, ["YYYY", 4], 0, "year");
Be(0, ["YYYYY", 5], 0, "year");
Be(0, ["YYYYYY", 6, !0], 0, "year");
De("Y", Nf);
De("YY", Xt, ws);
De("YYYY", bv, _v);
De("YYYYY", wf, Ef);
De("YYYYYY", wf, Ef);
Ht(["YYYYY", "YYYYYY"], Gn);
Ht("YYYY", function(e, t) {
  t[Gn] = e.length === 2 ? de.parseTwoDigitYear(e) : yt(e);
});
Ht("YY", function(e, t) {
  t[Gn] = de.parseTwoDigitYear(e);
});
Ht("Y", function(e, t) {
  t[Gn] = parseInt(e, 10);
});
function Ll(e) {
  return xf(e) ? 366 : 365;
}
de.parseTwoDigitYear = function(e) {
  return yt(e) + (yt(e) > 68 ? 1900 : 2e3);
};
var n0 = za("FullYear", !0);
function z$() {
  return xf(this.year());
}
function za(e, t) {
  return function(n) {
    return n != null ? (s0(this, e, n), de.updateOffset(this, t), this) : lc(this, e);
  };
}
function lc(e, t) {
  if (!e.isValid())
    return NaN;
  var n = e._d, s = e._isUTC;
  switch (t) {
    case "Milliseconds":
      return s ? n.getUTCMilliseconds() : n.getMilliseconds();
    case "Seconds":
      return s ? n.getUTCSeconds() : n.getSeconds();
    case "Minutes":
      return s ? n.getUTCMinutes() : n.getMinutes();
    case "Hours":
      return s ? n.getUTCHours() : n.getHours();
    case "Date":
      return s ? n.getUTCDate() : n.getDate();
    case "Day":
      return s ? n.getUTCDay() : n.getDay();
    case "Month":
      return s ? n.getUTCMonth() : n.getMonth();
    case "FullYear":
      return s ? n.getUTCFullYear() : n.getFullYear();
    default:
      return NaN;
  }
}
function s0(e, t, n) {
  var s, o, i, r, a;
  if (!(!e.isValid() || isNaN(n))) {
    switch (s = e._d, o = e._isUTC, t) {
      case "Milliseconds":
        return void (o ? s.setUTCMilliseconds(n) : s.setMilliseconds(n));
      case "Seconds":
        return void (o ? s.setUTCSeconds(n) : s.setSeconds(n));
      case "Minutes":
        return void (o ? s.setUTCMinutes(n) : s.setMinutes(n));
      case "Hours":
        return void (o ? s.setUTCHours(n) : s.setHours(n));
      case "Date":
        return void (o ? s.setUTCDate(n) : s.setDate(n));
      // case 'Day': // Not real
      //    return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
      // case 'Month': // Not used because we need to pass two variables
      //     return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
      case "FullYear":
        break;
      // See below ...
      default:
        return;
    }
    i = n, r = e.month(), a = e.date(), a = a === 29 && r === 1 && !xf(i) ? 28 : a, o ? s.setUTCFullYear(i, r, a) : s.setFullYear(i, r, a);
  }
}
function K$(e) {
  return e = Us(e), ko(this[e]) ? this[e]() : this;
}
function X$(e, t) {
  if (typeof e == "object") {
    e = yv(e);
    var n = F$(e), s, o = n.length;
    for (s = 0; s < o; s++)
      this[n[s].unit](e[n[s].unit]);
  } else if (e = Us(e), ko(this[e]))
    return this[e](t);
  return this;
}
function q$(e, t) {
  return (e % t + t) % t;
}
var fn;
Array.prototype.indexOf ? fn = Array.prototype.indexOf : fn = function(e) {
  var t;
  for (t = 0; t < this.length; ++t)
    if (this[t] === e)
      return t;
  return -1;
};
function Sv(e, t) {
  if (isNaN(e) || isNaN(t))
    return NaN;
  var n = q$(t, 12);
  return e += (t - n) / 12, n === 1 ? xf(e) ? 29 : 28 : 31 - n % 7 % 2;
}
Be("M", ["MM", 2], "Mo", function() {
  return this.month() + 1;
});
Be("MMM", 0, 0, function(e) {
  return this.localeData().monthsShort(this, e);
});
Be("MMMM", 0, 0, function(e) {
  return this.localeData().months(this, e);
});
De("M", Xt, Ga);
De("MM", Xt, ws);
De("MMM", function(e, t) {
  return t.monthsShortRegex(e);
});
De("MMMM", function(e, t) {
  return t.monthsRegex(e);
});
Ht(["M", "MM"], function(e, t) {
  t[qo] = yt(e) - 1;
});
Ht(["MMM", "MMMM"], function(e, t, n, s) {
  var o = n._locale.monthsParse(e, s, n._strict);
  o != null ? t[qo] = o : at(n).invalidMonth = e;
});
var J$ = "January_February_March_April_May_June_July_August_September_October_November_December".split(
  "_"
), o0 = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), r0 = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, Q$ = Ic, Z$ = Ic;
function ek(e, t) {
  return e ? oo(this._months) ? this._months[e.month()] : this._months[(this._months.isFormat || r0).test(t) ? "format" : "standalone"][e.month()] : oo(this._months) ? this._months : this._months.standalone;
}
function tk(e, t) {
  return e ? oo(this._monthsShort) ? this._monthsShort[e.month()] : this._monthsShort[r0.test(t) ? "format" : "standalone"][e.month()] : oo(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
}
function nk(e, t, n) {
  var s, o, i, r = e.toLocaleLowerCase();
  if (!this._monthsParse)
    for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], s = 0; s < 12; ++s)
      i = $o([2e3, s]), this._shortMonthsParse[s] = this.monthsShort(
        i,
        ""
      ).toLocaleLowerCase(), this._longMonthsParse[s] = this.months(i, "").toLocaleLowerCase();
  return n ? t === "MMM" ? (o = fn.call(this._shortMonthsParse, r), o !== -1 ? o : null) : (o = fn.call(this._longMonthsParse, r), o !== -1 ? o : null) : t === "MMM" ? (o = fn.call(this._shortMonthsParse, r), o !== -1 ? o : (o = fn.call(this._longMonthsParse, r), o !== -1 ? o : null)) : (o = fn.call(this._longMonthsParse, r), o !== -1 ? o : (o = fn.call(this._shortMonthsParse, r), o !== -1 ? o : null));
}
function sk(e, t, n) {
  var s, o, i;
  if (this._monthsParseExact)
    return nk.call(this, e, t, n);
  for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), s = 0; s < 12; s++) {
    if (o = $o([2e3, s]), n && !this._longMonthsParse[s] && (this._longMonthsParse[s] = new RegExp(
      "^" + this.months(o, "").replace(".", "") + "$",
      "i"
    ), this._shortMonthsParse[s] = new RegExp(
      "^" + this.monthsShort(o, "").replace(".", "") + "$",
      "i"
    )), !n && !this._monthsParse[s] && (i = "^" + this.months(o, "") + "|^" + this.monthsShort(o, ""), this._monthsParse[s] = new RegExp(i.replace(".", ""), "i")), n && t === "MMMM" && this._longMonthsParse[s].test(e))
      return s;
    if (n && t === "MMM" && this._shortMonthsParse[s].test(e))
      return s;
    if (!n && this._monthsParse[s].test(e))
      return s;
  }
}
function i0(e, t) {
  if (!e.isValid())
    return e;
  if (typeof t == "string") {
    if (/^\d+$/.test(t))
      t = yt(t);
    else if (t = e.localeData().monthsParse(t), !ar(t))
      return e;
  }
  var n = t, s = e.date();
  return s = s < 29 ? s : Math.min(s, Sv(e.year(), n)), e._isUTC ? e._d.setUTCMonth(n, s) : e._d.setMonth(n, s), e;
}
function a0(e) {
  return e != null ? (i0(this, e), de.updateOffset(this, !0), this) : lc(this, "Month");
}
function ok() {
  return Sv(this.year(), this.month());
}
function rk(e) {
  return this._monthsParseExact ? ($t(this, "_monthsRegex") || l0.call(this), e ? this._monthsShortStrictRegex : this._monthsShortRegex) : ($t(this, "_monthsShortRegex") || (this._monthsShortRegex = Q$), this._monthsShortStrictRegex && e ? this._monthsShortStrictRegex : this._monthsShortRegex);
}
function ik(e) {
  return this._monthsParseExact ? ($t(this, "_monthsRegex") || l0.call(this), e ? this._monthsStrictRegex : this._monthsRegex) : ($t(this, "_monthsRegex") || (this._monthsRegex = Z$), this._monthsStrictRegex && e ? this._monthsStrictRegex : this._monthsRegex);
}
function l0() {
  function e(l, c) {
    return c.length - l.length;
  }
  var t = [], n = [], s = [], o, i, r, a;
  for (o = 0; o < 12; o++)
    i = $o([2e3, o]), r = er(this.monthsShort(i, "")), a = er(this.months(i, "")), t.push(r), n.push(a), s.push(a), s.push(r);
  t.sort(e), n.sort(e), s.sort(e), this._monthsRegex = new RegExp("^(" + s.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._monthsShortStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function ak(e, t, n, s, o, i, r) {
  var a;
  return e < 100 && e >= 0 ? (a = new Date(e + 400, t, n, s, o, i, r), isFinite(a.getFullYear()) && a.setFullYear(e)) : a = new Date(e, t, n, s, o, i, r), a;
}
function uc(e) {
  var t, n;
  return e < 100 && e >= 0 ? (n = Array.prototype.slice.call(arguments), n[0] = e + 400, t = new Date(Date.UTC.apply(null, n)), isFinite(t.getUTCFullYear()) && t.setUTCFullYear(e)) : t = new Date(Date.UTC.apply(null, arguments)), t;
}
function Od(e, t, n) {
  var s = 7 + t - n, o = (7 + uc(e, 0, s).getUTCDay() - t) % 7;
  return -o + s - 1;
}
function c0(e, t, n, s, o) {
  var i = (7 + n - s) % 7, r = Od(e, s, o), a = 1 + 7 * (t - 1) + i + r, l, c;
  return a <= 0 ? (l = e - 1, c = Ll(l) + a) : a > Ll(e) ? (l = e + 1, c = a - Ll(e)) : (l = e, c = a), {
    year: l,
    dayOfYear: c
  };
}
function dc(e, t, n) {
  var s = Od(e.year(), t, n), o = Math.floor((e.dayOfYear() - s - 1) / 7) + 1, i, r;
  return o < 1 ? (r = e.year() - 1, i = o + tr(r, t, n)) : o > tr(e.year(), t, n) ? (i = o - tr(e.year(), t, n), r = e.year() + 1) : (r = e.year(), i = o), {
    week: i,
    year: r
  };
}
function tr(e, t, n) {
  var s = Od(e, t, n), o = Od(e + 1, t, n);
  return (Ll(e) - s + o) / 7;
}
Be("w", ["ww", 2], "wo", "week");
Be("W", ["WW", 2], "Wo", "isoWeek");
De("w", Xt, Ga);
De("ww", Xt, ws);
De("W", Xt, Ga);
De("WW", Xt, ws);
Rc(
  ["w", "ww", "W", "WW"],
  function(e, t, n, s) {
    t[s.substr(0, 1)] = yt(e);
  }
);
function lk(e) {
  return dc(e, this._week.dow, this._week.doy).week;
}
var ck = {
  dow: 0,
  // Sunday is the first day of the week.
  doy: 6
  // The week that contains Jan 6th is the first week of the year.
};
function uk() {
  return this._week.dow;
}
function dk() {
  return this._week.doy;
}
function fk(e) {
  var t = this.localeData().week(this);
  return e == null ? t : this.add((e - t) * 7, "d");
}
function pk(e) {
  var t = dc(this, 1, 4).week;
  return e == null ? t : this.add((e - t) * 7, "d");
}
Be("d", 0, "do", "day");
Be("dd", 0, 0, function(e) {
  return this.localeData().weekdaysMin(this, e);
});
Be("ddd", 0, 0, function(e) {
  return this.localeData().weekdaysShort(this, e);
});
Be("dddd", 0, 0, function(e) {
  return this.localeData().weekdays(this, e);
});
Be("e", 0, 0, "weekday");
Be("E", 0, 0, "isoWeekday");
De("d", Xt);
De("e", Xt);
De("E", Xt);
De("dd", function(e, t) {
  return t.weekdaysMinRegex(e);
});
De("ddd", function(e, t) {
  return t.weekdaysShortRegex(e);
});
De("dddd", function(e, t) {
  return t.weekdaysRegex(e);
});
Rc(["dd", "ddd", "dddd"], function(e, t, n, s) {
  var o = n._locale.weekdaysParse(e, s, n._strict);
  o != null ? t.d = o : at(n).invalidWeekday = e;
});
Rc(["d", "e", "E"], function(e, t, n, s) {
  t[s] = yt(e);
});
function hk(e, t) {
  return typeof e != "string" ? e : isNaN(e) ? (e = t.weekdaysParse(e), typeof e == "number" ? e : null) : parseInt(e, 10);
}
function mk(e, t) {
  return typeof e == "string" ? t.weekdaysParse(e) % 7 || 7 : isNaN(e) ? null : e;
}
function wv(e, t) {
  return e.slice(t, 7).concat(e.slice(0, t));
}
var vk = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), u0 = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), gk = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), yk = Ic, _k = Ic, bk = Ic;
function Ek(e, t) {
  var n = oo(this._weekdays) ? this._weekdays : this._weekdays[e && e !== !0 && this._weekdays.isFormat.test(t) ? "format" : "standalone"];
  return e === !0 ? wv(n, this._week.dow) : e ? n[e.day()] : n;
}
function Sk(e) {
  return e === !0 ? wv(this._weekdaysShort, this._week.dow) : e ? this._weekdaysShort[e.day()] : this._weekdaysShort;
}
function wk(e) {
  return e === !0 ? wv(this._weekdaysMin, this._week.dow) : e ? this._weekdaysMin[e.day()] : this._weekdaysMin;
}
function Nk(e, t, n) {
  var s, o, i, r = e.toLocaleLowerCase();
  if (!this._weekdaysParse)
    for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], s = 0; s < 7; ++s)
      i = $o([2e3, 1]).day(s), this._minWeekdaysParse[s] = this.weekdaysMin(
        i,
        ""
      ).toLocaleLowerCase(), this._shortWeekdaysParse[s] = this.weekdaysShort(
        i,
        ""
      ).toLocaleLowerCase(), this._weekdaysParse[s] = this.weekdays(i, "").toLocaleLowerCase();
  return n ? t === "dddd" ? (o = fn.call(this._weekdaysParse, r), o !== -1 ? o : null) : t === "ddd" ? (o = fn.call(this._shortWeekdaysParse, r), o !== -1 ? o : null) : (o = fn.call(this._minWeekdaysParse, r), o !== -1 ? o : null) : t === "dddd" ? (o = fn.call(this._weekdaysParse, r), o !== -1 || (o = fn.call(this._shortWeekdaysParse, r), o !== -1) ? o : (o = fn.call(this._minWeekdaysParse, r), o !== -1 ? o : null)) : t === "ddd" ? (o = fn.call(this._shortWeekdaysParse, r), o !== -1 || (o = fn.call(this._weekdaysParse, r), o !== -1) ? o : (o = fn.call(this._minWeekdaysParse, r), o !== -1 ? o : null)) : (o = fn.call(this._minWeekdaysParse, r), o !== -1 || (o = fn.call(this._weekdaysParse, r), o !== -1) ? o : (o = fn.call(this._shortWeekdaysParse, r), o !== -1 ? o : null));
}
function Ok(e, t, n) {
  var s, o, i;
  if (this._weekdaysParseExact)
    return Nk.call(this, e, t, n);
  for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), s = 0; s < 7; s++) {
    if (o = $o([2e3, 1]).day(s), n && !this._fullWeekdaysParse[s] && (this._fullWeekdaysParse[s] = new RegExp(
      "^" + this.weekdays(o, "").replace(".", "\\.?") + "$",
      "i"
    ), this._shortWeekdaysParse[s] = new RegExp(
      "^" + this.weekdaysShort(o, "").replace(".", "\\.?") + "$",
      "i"
    ), this._minWeekdaysParse[s] = new RegExp(
      "^" + this.weekdaysMin(o, "").replace(".", "\\.?") + "$",
      "i"
    )), this._weekdaysParse[s] || (i = "^" + this.weekdays(o, "") + "|^" + this.weekdaysShort(o, "") + "|^" + this.weekdaysMin(o, ""), this._weekdaysParse[s] = new RegExp(i.replace(".", ""), "i")), n && t === "dddd" && this._fullWeekdaysParse[s].test(e))
      return s;
    if (n && t === "ddd" && this._shortWeekdaysParse[s].test(e))
      return s;
    if (n && t === "dd" && this._minWeekdaysParse[s].test(e))
      return s;
    if (!n && this._weekdaysParse[s].test(e))
      return s;
  }
}
function xk(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = lc(this, "Day");
  return e != null ? (e = hk(e, this.localeData()), this.add(e - t, "d")) : t;
}
function Ck(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  var t = (this.day() + 7 - this.localeData()._week.dow) % 7;
  return e == null ? t : this.add(e - t, "d");
}
function Tk(e) {
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    var t = mk(e, this.localeData());
    return this.day(this.day() % 7 ? t : t - 7);
  } else
    return this.day() || 7;
}
function $k(e) {
  return this._weekdaysParseExact ? ($t(this, "_weekdaysRegex") || Nv.call(this), e ? this._weekdaysStrictRegex : this._weekdaysRegex) : ($t(this, "_weekdaysRegex") || (this._weekdaysRegex = yk), this._weekdaysStrictRegex && e ? this._weekdaysStrictRegex : this._weekdaysRegex);
}
function kk(e) {
  return this._weekdaysParseExact ? ($t(this, "_weekdaysRegex") || Nv.call(this), e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : ($t(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = _k), this._weekdaysShortStrictRegex && e ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
}
function Dk(e) {
  return this._weekdaysParseExact ? ($t(this, "_weekdaysRegex") || Nv.call(this), e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : ($t(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = bk), this._weekdaysMinStrictRegex && e ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
}
function Nv() {
  function e(d, f) {
    return f.length - d.length;
  }
  var t = [], n = [], s = [], o = [], i, r, a, l, c;
  for (i = 0; i < 7; i++)
    r = $o([2e3, 1]).day(i), a = er(this.weekdaysMin(r, "")), l = er(this.weekdaysShort(r, "")), c = er(this.weekdays(r, "")), t.push(a), n.push(l), s.push(c), o.push(a), o.push(l), o.push(c);
  t.sort(e), n.sort(e), s.sort(e), o.sort(e), this._weekdaysRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
    "^(" + s.join("|") + ")",
    "i"
  ), this._weekdaysShortStrictRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  ), this._weekdaysMinStrictRegex = new RegExp(
    "^(" + t.join("|") + ")",
    "i"
  );
}
function Ov() {
  return this.hours() % 12 || 12;
}
function Ik() {
  return this.hours() || 24;
}
Be("H", ["HH", 2], 0, "hour");
Be("h", ["hh", 2], 0, Ov);
Be("k", ["kk", 2], 0, Ik);
Be("hmm", 0, 0, function() {
  return "" + Ov.apply(this) + xo(this.minutes(), 2);
});
Be("hmmss", 0, 0, function() {
  return "" + Ov.apply(this) + xo(this.minutes(), 2) + xo(this.seconds(), 2);
});
Be("Hmm", 0, 0, function() {
  return "" + this.hours() + xo(this.minutes(), 2);
});
Be("Hmmss", 0, 0, function() {
  return "" + this.hours() + xo(this.minutes(), 2) + xo(this.seconds(), 2);
});
function d0(e, t) {
  Be(e, 0, 0, function() {
    return this.localeData().meridiem(
      this.hours(),
      this.minutes(),
      t
    );
  });
}
d0("a", !0);
d0("A", !1);
function f0(e, t) {
  return t._meridiemParse;
}
De("a", f0);
De("A", f0);
De("H", Xt, Ev);
De("h", Xt, Ga);
De("k", Xt, Ga);
De("HH", Xt, ws);
De("hh", Xt, ws);
De("kk", Xt, ws);
De("hmm", e0);
De("hmmss", t0);
De("Hmm", e0);
De("Hmmss", t0);
Ht(["H", "HH"], Nn);
Ht(["k", "kk"], function(e, t, n) {
  var s = yt(e);
  t[Nn] = s === 24 ? 0 : s;
});
Ht(["a", "A"], function(e, t, n) {
  n._isPm = n._locale.isPM(e), n._meridiem = e;
});
Ht(["h", "hh"], function(e, t, n) {
  t[Nn] = yt(e), at(n).bigHour = !0;
});
Ht("hmm", function(e, t, n) {
  var s = e.length - 2;
  t[Nn] = yt(e.substr(0, s)), t[Zs] = yt(e.substr(s)), at(n).bigHour = !0;
});
Ht("hmmss", function(e, t, n) {
  var s = e.length - 4, o = e.length - 2;
  t[Nn] = yt(e.substr(0, s)), t[Zs] = yt(e.substr(s, 2)), t[Jo] = yt(e.substr(o)), at(n).bigHour = !0;
});
Ht("Hmm", function(e, t, n) {
  var s = e.length - 2;
  t[Nn] = yt(e.substr(0, s)), t[Zs] = yt(e.substr(s));
});
Ht("Hmmss", function(e, t, n) {
  var s = e.length - 4, o = e.length - 2;
  t[Nn] = yt(e.substr(0, s)), t[Zs] = yt(e.substr(s, 2)), t[Jo] = yt(e.substr(o));
});
function Rk(e) {
  return (e + "").toLowerCase().charAt(0) === "p";
}
var Ak = /[ap]\.?m?\.?/i, Mk = za("Hours", !0);
function Pk(e, t, n) {
  return e > 11 ? n ? "pm" : "PM" : n ? "am" : "AM";
}
var p0 = {
  calendar: N$,
  longDateFormat: T$,
  invalidDate: k$,
  ordinal: I$,
  dayOfMonthOrdinalParse: R$,
  relativeTime: M$,
  months: J$,
  monthsShort: o0,
  week: ck,
  weekdays: vk,
  weekdaysMin: gk,
  weekdaysShort: u0,
  meridiemParse: Ak
}, Qt = {}, cl = {}, fc;
function Vk(e, t) {
  var n, s = Math.min(e.length, t.length);
  for (n = 0; n < s; n += 1)
    if (e[n] !== t[n])
      return n;
  return s;
}
function My(e) {
  return e && e.toLowerCase().replace("_", "-");
}
function Lk(e) {
  for (var t = 0, n, s, o, i; t < e.length; ) {
    for (i = My(e[t]).split("-"), n = i.length, s = My(e[t + 1]), s = s ? s.split("-") : null; n > 0; ) {
      if (o = Cf(i.slice(0, n).join("-")), o)
        return o;
      if (s && s.length >= n && Vk(i, s) >= n - 1)
        break;
      n--;
    }
    t++;
  }
  return fc;
}
function Fk(e) {
  return !!(e && e.match("^[^/\\\\]*$"));
}
function Cf(e) {
  var t = null, n;
  if (Qt[e] === void 0 && typeof module < "u" && module && module.exports && Fk(e))
    try {
      t = fc._abbr, n = require, n("./locale/" + e), jr(t);
    } catch {
      Qt[e] = null;
    }
  return Qt[e];
}
function jr(e, t) {
  var n;
  return e && (ls(t) ? n = pr(e) : n = xv(e, t), n ? fc = n : typeof console < "u" && console.warn && console.warn(
    "Locale " + e + " not found. Did you forget to load it?"
  )), fc._abbr;
}
function xv(e, t) {
  if (t !== null) {
    var n, s = p0;
    if (t.abbr = e, Qt[e] != null)
      qE(
        "defineLocaleOverride",
        "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
      ), s = Qt[e]._config;
    else if (t.parentLocale != null)
      if (Qt[t.parentLocale] != null)
        s = Qt[t.parentLocale]._config;
      else if (n = Cf(t.parentLocale), n != null)
        s = n._config;
      else
        return cl[t.parentLocale] || (cl[t.parentLocale] = []), cl[t.parentLocale].push({
          name: e,
          config: t
        }), null;
    return Qt[e] = new vv(Bh(s, t)), cl[e] && cl[e].forEach(function(o) {
      xv(o.name, o.config);
    }), jr(e), Qt[e];
  } else
    return delete Qt[e], null;
}
function Uk(e, t) {
  if (t != null) {
    var n, s, o = p0;
    Qt[e] != null && Qt[e].parentLocale != null ? Qt[e].set(Bh(Qt[e]._config, t)) : (s = Cf(e), s != null && (o = s._config), t = Bh(o, t), s == null && (t.abbr = e), n = new vv(t), n.parentLocale = Qt[e], Qt[e] = n), jr(e);
  } else
    Qt[e] != null && (Qt[e].parentLocale != null ? (Qt[e] = Qt[e].parentLocale, e === jr() && jr(e)) : Qt[e] != null && delete Qt[e]);
  return Qt[e];
}
function pr(e) {
  var t;
  if (e && e._locale && e._locale._abbr && (e = e._locale._abbr), !e)
    return fc;
  if (!oo(e)) {
    if (t = Cf(e), t)
      return t;
    e = [e];
  }
  return Lk(e);
}
function jk() {
  return Hh(Qt);
}
function Cv(e) {
  var t, n = e._a;
  return n && at(e).overflow === -2 && (t = n[qo] < 0 || n[qo] > 11 ? qo : n[go] < 1 || n[go] > Sv(n[Gn], n[qo]) ? go : n[Nn] < 0 || n[Nn] > 24 || n[Nn] === 24 && (n[Zs] !== 0 || n[Jo] !== 0 || n[di] !== 0) ? Nn : n[Zs] < 0 || n[Zs] > 59 ? Zs : n[Jo] < 0 || n[Jo] > 59 ? Jo : n[di] < 0 || n[di] > 999 ? di : -1, at(e)._overflowDayOfYear && (t < Gn || t > go) && (t = go), at(e)._overflowWeeks && t === -1 && (t = W$), at(e)._overflowWeekday && t === -1 && (t = G$), at(e).overflow = t), e;
}
var Bk = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Hk = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Yk = /Z|[+-]\d\d(?::?\d\d)?/, uu = [
  ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
  ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
  ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
  ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
  ["YYYY-DDD", /\d{4}-\d{3}/],
  ["YYYY-MM", /\d{4}-\d\d/, !1],
  ["YYYYYYMMDD", /[+-]\d{10}/],
  ["YYYYMMDD", /\d{8}/],
  ["GGGG[W]WWE", /\d{4}W\d{3}/],
  ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
  ["YYYYDDD", /\d{7}/],
  ["YYYYMM", /\d{6}/, !1],
  ["YYYY", /\d{4}/, !1]
], Ap = [
  ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
  ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
  ["HH:mm:ss", /\d\d:\d\d:\d\d/],
  ["HH:mm", /\d\d:\d\d/],
  ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
  ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
  ["HHmmss", /\d\d\d\d\d\d/],
  ["HHmm", /\d\d\d\d/],
  ["HH", /\d\d/]
], Wk = /^\/?Date\((-?\d+)/i, Gk = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, zk = {
  UT: 0,
  GMT: 0,
  EDT: -4 * 60,
  EST: -5 * 60,
  CDT: -5 * 60,
  CST: -6 * 60,
  MDT: -6 * 60,
  MST: -7 * 60,
  PDT: -7 * 60,
  PST: -8 * 60
};
function h0(e) {
  var t, n, s = e._i, o = Bk.exec(s) || Hk.exec(s), i, r, a, l, c = uu.length, d = Ap.length;
  if (o) {
    for (at(e).iso = !0, t = 0, n = c; t < n; t++)
      if (uu[t][1].exec(o[1])) {
        r = uu[t][0], i = uu[t][2] !== !1;
        break;
      }
    if (r == null) {
      e._isValid = !1;
      return;
    }
    if (o[3]) {
      for (t = 0, n = d; t < n; t++)
        if (Ap[t][1].exec(o[3])) {
          a = (o[2] || " ") + Ap[t][0];
          break;
        }
      if (a == null) {
        e._isValid = !1;
        return;
      }
    }
    if (!i && a != null) {
      e._isValid = !1;
      return;
    }
    if (o[4])
      if (Yk.exec(o[4]))
        l = "Z";
      else {
        e._isValid = !1;
        return;
      }
    e._f = r + (a || "") + (l || ""), $v(e);
  } else
    e._isValid = !1;
}
function Kk(e, t, n, s, o, i) {
  var r = [
    Xk(e),
    o0.indexOf(t),
    parseInt(n, 10),
    parseInt(s, 10),
    parseInt(o, 10)
  ];
  return i && r.push(parseInt(i, 10)), r;
}
function Xk(e) {
  var t = parseInt(e, 10);
  return t <= 49 ? 2e3 + t : t <= 999 ? 1900 + t : t;
}
function qk(e) {
  return e.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function Jk(e, t, n) {
  if (e) {
    var s = u0.indexOf(e), o = new Date(
      t[0],
      t[1],
      t[2]
    ).getDay();
    if (s !== o)
      return at(n).weekdayMismatch = !0, n._isValid = !1, !1;
  }
  return !0;
}
function Qk(e, t, n) {
  if (e)
    return zk[e];
  if (t)
    return 0;
  var s = parseInt(n, 10), o = s % 100, i = (s - o) / 100;
  return i * 60 + o;
}
function m0(e) {
  var t = Gk.exec(qk(e._i)), n;
  if (t) {
    if (n = Kk(
      t[4],
      t[3],
      t[2],
      t[5],
      t[6],
      t[7]
    ), !Jk(t[1], n, e))
      return;
    e._a = n, e._tzm = Qk(t[8], t[9], t[10]), e._d = uc.apply(null, e._a), e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), at(e).rfc2822 = !0;
  } else
    e._isValid = !1;
}
function Zk(e) {
  var t = Wk.exec(e._i);
  if (t !== null) {
    e._d = /* @__PURE__ */ new Date(+t[1]);
    return;
  }
  if (h0(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  if (m0(e), e._isValid === !1)
    delete e._isValid;
  else
    return;
  e._strict ? e._isValid = !1 : de.createFromInputFallback(e);
}
de.createFromInputFallback = Fs(
  "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
  function(e) {
    e._d = /* @__PURE__ */ new Date(e._i + (e._useUTC ? " UTC" : ""));
  }
);
function ca(e, t, n) {
  return e ?? t ?? n;
}
function eD(e) {
  var t = new Date(de.now());
  return e._useUTC ? [
    t.getUTCFullYear(),
    t.getUTCMonth(),
    t.getUTCDate()
  ] : [t.getFullYear(), t.getMonth(), t.getDate()];
}
function Tv(e) {
  var t, n, s = [], o, i, r;
  if (!e._d) {
    for (o = eD(e), e._w && e._a[go] == null && e._a[qo] == null && tD(e), e._dayOfYear != null && (r = ca(e._a[Gn], o[Gn]), (e._dayOfYear > Ll(r) || e._dayOfYear === 0) && (at(e)._overflowDayOfYear = !0), n = uc(r, 0, e._dayOfYear), e._a[qo] = n.getUTCMonth(), e._a[go] = n.getUTCDate()), t = 0; t < 3 && e._a[t] == null; ++t)
      e._a[t] = s[t] = o[t];
    for (; t < 7; t++)
      e._a[t] = s[t] = e._a[t] == null ? t === 2 ? 1 : 0 : e._a[t];
    e._a[Nn] === 24 && e._a[Zs] === 0 && e._a[Jo] === 0 && e._a[di] === 0 && (e._nextDay = !0, e._a[Nn] = 0), e._d = (e._useUTC ? uc : ak).apply(
      null,
      s
    ), i = e._useUTC ? e._d.getUTCDay() : e._d.getDay(), e._tzm != null && e._d.setUTCMinutes(e._d.getUTCMinutes() - e._tzm), e._nextDay && (e._a[Nn] = 24), e._w && typeof e._w.d < "u" && e._w.d !== i && (at(e).weekdayMismatch = !0);
  }
}
function tD(e) {
  var t, n, s, o, i, r, a, l, c;
  t = e._w, t.GG != null || t.W != null || t.E != null ? (i = 1, r = 4, n = ca(
    t.GG,
    e._a[Gn],
    dc(Kt(), 1, 4).year
  ), s = ca(t.W, 1), o = ca(t.E, 1), (o < 1 || o > 7) && (l = !0)) : (i = e._locale._week.dow, r = e._locale._week.doy, c = dc(Kt(), i, r), n = ca(t.gg, e._a[Gn], c.year), s = ca(t.w, c.week), t.d != null ? (o = t.d, (o < 0 || o > 6) && (l = !0)) : t.e != null ? (o = t.e + i, (t.e < 0 || t.e > 6) && (l = !0)) : o = i), s < 1 || s > tr(n, i, r) ? at(e)._overflowWeeks = !0 : l != null ? at(e)._overflowWeekday = !0 : (a = c0(n, s, o, i, r), e._a[Gn] = a.year, e._dayOfYear = a.dayOfYear);
}
de.ISO_8601 = function() {
};
de.RFC_2822 = function() {
};
function $v(e) {
  if (e._f === de.ISO_8601) {
    h0(e);
    return;
  }
  if (e._f === de.RFC_2822) {
    m0(e);
    return;
  }
  e._a = [], at(e).empty = !0;
  var t = "" + e._i, n, s, o, i, r, a = t.length, l = 0, c, d;
  for (o = JE(e._f, e._locale).match(gv) || [], d = o.length, n = 0; n < d; n++)
    i = o[n], s = (t.match(B$(i, e)) || [])[0], s && (r = t.substr(0, t.indexOf(s)), r.length > 0 && at(e).unusedInput.push(r), t = t.slice(
      t.indexOf(s) + s.length
    ), l += s.length), Ea[i] ? (s ? at(e).empty = !1 : at(e).unusedTokens.push(i), Y$(i, s, e)) : e._strict && !s && at(e).unusedTokens.push(i);
  at(e).charsLeftOver = a - l, t.length > 0 && at(e).unusedInput.push(t), e._a[Nn] <= 12 && at(e).bigHour === !0 && e._a[Nn] > 0 && (at(e).bigHour = void 0), at(e).parsedDateParts = e._a.slice(0), at(e).meridiem = e._meridiem, e._a[Nn] = nD(
    e._locale,
    e._a[Nn],
    e._meridiem
  ), c = at(e).era, c !== null && (e._a[Gn] = e._locale.erasConvertYear(c, e._a[Gn])), Tv(e), Cv(e);
}
function nD(e, t, n) {
  var s;
  return n == null ? t : e.meridiemHour != null ? e.meridiemHour(t, n) : (e.isPM != null && (s = e.isPM(n), s && t < 12 && (t += 12), !s && t === 12 && (t = 0)), t);
}
function sD(e) {
  var t, n, s, o, i, r, a = !1, l = e._f.length;
  if (l === 0) {
    at(e).invalidFormat = !0, e._d = /* @__PURE__ */ new Date(NaN);
    return;
  }
  for (o = 0; o < l; o++)
    i = 0, r = !1, t = mv({}, e), e._useUTC != null && (t._useUTC = e._useUTC), t._f = e._f[o], $v(t), hv(t) && (r = !0), i += at(t).charsLeftOver, i += at(t).unusedTokens.length * 10, at(t).score = i, a ? i < s && (s = i, n = t) : (s == null || i < s || r) && (s = i, n = t, r && (a = !0));
  Rr(e, n || t);
}
function oD(e) {
  if (!e._d) {
    var t = yv(e._i), n = t.day === void 0 ? t.date : t.day;
    e._a = KE(
      [t.year, t.month, n, t.hour, t.minute, t.second, t.millisecond],
      function(s) {
        return s && parseInt(s, 10);
      }
    ), Tv(e);
  }
}
function rD(e) {
  var t = new Dc(Cv(v0(e)));
  return t._nextDay && (t.add(1, "d"), t._nextDay = void 0), t;
}
function v0(e) {
  var t = e._i, n = e._f;
  return e._locale = e._locale || pr(e._l), t === null || n === void 0 && t === "" ? bf({ nullInput: !0 }) : (typeof t == "string" && (e._i = t = e._locale.preparse(t)), ro(t) ? new Dc(Cv(t)) : (kc(t) ? e._d = t : oo(n) ? sD(e) : n ? $v(e) : iD(e), hv(e) || (e._d = null), e));
}
function iD(e) {
  var t = e._i;
  ls(t) ? e._d = new Date(de.now()) : kc(t) ? e._d = new Date(t.valueOf()) : typeof t == "string" ? Zk(e) : oo(t) ? (e._a = KE(t.slice(0), function(n) {
    return parseInt(n, 10);
  }), Tv(e)) : Ni(t) ? oD(e) : ar(t) ? e._d = new Date(t) : de.createFromInputFallback(e);
}
function g0(e, t, n, s, o) {
  var i = {};
  return (t === !0 || t === !1) && (s = t, t = void 0), (n === !0 || n === !1) && (s = n, n = void 0), (Ni(e) && pv(e) || oo(e) && e.length === 0) && (e = void 0), i._isAMomentObject = !0, i._useUTC = i._isUTC = o, i._l = n, i._i = e, i._f = t, i._strict = s, rD(i);
}
function Kt(e, t, n, s) {
  return g0(e, t, n, s, !1);
}
var aD = Fs(
  "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = Kt.apply(null, arguments);
    return this.isValid() && e.isValid() ? e < this ? this : e : bf();
  }
), lD = Fs(
  "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
  function() {
    var e = Kt.apply(null, arguments);
    return this.isValid() && e.isValid() ? e > this ? this : e : bf();
  }
);
function y0(e, t) {
  var n, s;
  if (t.length === 1 && oo(t[0]) && (t = t[0]), !t.length)
    return Kt();
  for (n = t[0], s = 1; s < t.length; ++s)
    (!t[s].isValid() || t[s][e](n)) && (n = t[s]);
  return n;
}
function cD() {
  var e = [].slice.call(arguments, 0);
  return y0("isBefore", e);
}
function uD() {
  var e = [].slice.call(arguments, 0);
  return y0("isAfter", e);
}
var dD = function() {
  return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
}, ul = [
  "year",
  "quarter",
  "month",
  "week",
  "day",
  "hour",
  "minute",
  "second",
  "millisecond"
];
function fD(e) {
  var t, n = !1, s, o = ul.length;
  for (t in e)
    if ($t(e, t) && !(fn.call(ul, t) !== -1 && (e[t] == null || !isNaN(e[t]))))
      return !1;
  for (s = 0; s < o; ++s)
    if (e[ul[s]]) {
      if (n)
        return !1;
      parseFloat(e[ul[s]]) !== yt(e[ul[s]]) && (n = !0);
    }
  return !0;
}
function pD() {
  return this._isValid;
}
function hD() {
  return ao(NaN);
}
function Tf(e) {
  var t = yv(e), n = t.year || 0, s = t.quarter || 0, o = t.month || 0, i = t.week || t.isoWeek || 0, r = t.day || 0, a = t.hour || 0, l = t.minute || 0, c = t.second || 0, d = t.millisecond || 0;
  this._isValid = fD(t), this._milliseconds = +d + c * 1e3 + // 1000
  l * 6e4 + // 1000 * 60
  a * 1e3 * 60 * 60, this._days = +r + i * 7, this._months = +o + s * 3 + n * 12, this._data = {}, this._locale = pr(), this._bubble();
}
function Uu(e) {
  return e instanceof Tf;
}
function Wh(e) {
  return e < 0 ? Math.round(-1 * e) * -1 : Math.round(e);
}
function mD(e, t, n) {
  var s = Math.min(e.length, t.length), o = Math.abs(e.length - t.length), i = 0, r;
  for (r = 0; r < s; r++)
    yt(e[r]) !== yt(t[r]) && i++;
  return i + o;
}
function _0(e, t) {
  Be(e, 0, 0, function() {
    var n = this.utcOffset(), s = "+";
    return n < 0 && (n = -n, s = "-"), s + xo(~~(n / 60), 2) + t + xo(~~n % 60, 2);
  });
}
_0("Z", ":");
_0("ZZ", "");
De("Z", Of);
De("ZZ", Of);
Ht(["Z", "ZZ"], function(e, t, n) {
  n._useUTC = !0, n._tzm = kv(Of, e);
});
var vD = /([\+\-]|\d\d)/gi;
function kv(e, t) {
  var n = (t || "").match(e), s, o, i;
  return n === null ? null : (s = n[n.length - 1] || [], o = (s + "").match(vD) || ["-", 0, 0], i = +(o[1] * 60) + yt(o[2]), i === 0 ? 0 : o[0] === "+" ? i : -i);
}
function Dv(e, t) {
  var n, s;
  return t._isUTC ? (n = t.clone(), s = (ro(e) || kc(e) ? e.valueOf() : Kt(e).valueOf()) - n.valueOf(), n._d.setTime(n._d.valueOf() + s), de.updateOffset(n, !1), n) : Kt(e).local();
}
function Gh(e) {
  return -Math.round(e._d.getTimezoneOffset());
}
de.updateOffset = function() {
};
function gD(e, t, n) {
  var s = this._offset || 0, o;
  if (!this.isValid())
    return e != null ? this : NaN;
  if (e != null) {
    if (typeof e == "string") {
      if (e = kv(Of, e), e === null)
        return this;
    } else Math.abs(e) < 16 && !n && (e = e * 60);
    return !this._isUTC && t && (o = Gh(this)), this._offset = e, this._isUTC = !0, o != null && this.add(o, "m"), s !== e && (!t || this._changeInProgress ? S0(
      this,
      ao(e - s, "m"),
      1,
      !1
    ) : this._changeInProgress || (this._changeInProgress = !0, de.updateOffset(this, !0), this._changeInProgress = null)), this;
  } else
    return this._isUTC ? s : Gh(this);
}
function yD(e, t) {
  return e != null ? (typeof e != "string" && (e = -e), this.utcOffset(e, t), this) : -this.utcOffset();
}
function _D(e) {
  return this.utcOffset(0, e);
}
function bD(e) {
  return this._isUTC && (this.utcOffset(0, e), this._isUTC = !1, e && this.subtract(Gh(this), "m")), this;
}
function ED() {
  if (this._tzm != null)
    this.utcOffset(this._tzm, !1, !0);
  else if (typeof this._i == "string") {
    var e = kv(U$, this._i);
    e != null ? this.utcOffset(e) : this.utcOffset(0, !0);
  }
  return this;
}
function SD(e) {
  return this.isValid() ? (e = e ? Kt(e).utcOffset() : 0, (this.utcOffset() - e) % 60 === 0) : !1;
}
function wD() {
  return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}
function ND() {
  if (!ls(this._isDSTShifted))
    return this._isDSTShifted;
  var e = {}, t;
  return mv(e, this), e = v0(e), e._a ? (t = e._isUTC ? $o(e._a) : Kt(e._a), this._isDSTShifted = this.isValid() && mD(e._a, t.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
}
function OD() {
  return this.isValid() ? !this._isUTC : !1;
}
function xD() {
  return this.isValid() ? this._isUTC : !1;
}
function b0() {
  return this.isValid() ? this._isUTC && this._offset === 0 : !1;
}
var CD = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, TD = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function ao(e, t) {
  var n = e, s = null, o, i, r;
  return Uu(e) ? n = {
    ms: e._milliseconds,
    d: e._days,
    M: e._months
  } : ar(e) || !isNaN(+e) ? (n = {}, t ? n[t] = +e : n.milliseconds = +e) : (s = CD.exec(e)) ? (o = s[1] === "-" ? -1 : 1, n = {
    y: 0,
    d: yt(s[go]) * o,
    h: yt(s[Nn]) * o,
    m: yt(s[Zs]) * o,
    s: yt(s[Jo]) * o,
    ms: yt(Wh(s[di] * 1e3)) * o
    // the millisecond decimal point is included in the match
  }) : (s = TD.exec(e)) ? (o = s[1] === "-" ? -1 : 1, n = {
    y: ni(s[2], o),
    M: ni(s[3], o),
    w: ni(s[4], o),
    d: ni(s[5], o),
    h: ni(s[6], o),
    m: ni(s[7], o),
    s: ni(s[8], o)
  }) : n == null ? n = {} : typeof n == "object" && ("from" in n || "to" in n) && (r = $D(
    Kt(n.from),
    Kt(n.to)
  ), n = {}, n.ms = r.milliseconds, n.M = r.months), i = new Tf(n), Uu(e) && $t(e, "_locale") && (i._locale = e._locale), Uu(e) && $t(e, "_isValid") && (i._isValid = e._isValid), i;
}
ao.fn = Tf.prototype;
ao.invalid = hD;
function ni(e, t) {
  var n = e && parseFloat(e.replace(",", "."));
  return (isNaN(n) ? 0 : n) * t;
}
function Py(e, t) {
  var n = {};
  return n.months = t.month() - e.month() + (t.year() - e.year()) * 12, e.clone().add(n.months, "M").isAfter(t) && --n.months, n.milliseconds = +t - +e.clone().add(n.months, "M"), n;
}
function $D(e, t) {
  var n;
  return e.isValid() && t.isValid() ? (t = Dv(t, e), e.isBefore(t) ? n = Py(e, t) : (n = Py(t, e), n.milliseconds = -n.milliseconds, n.months = -n.months), n) : { milliseconds: 0, months: 0 };
}
function E0(e, t) {
  return function(n, s) {
    var o, i;
    return s !== null && !isNaN(+s) && (qE(
      t,
      "moment()." + t + "(period, number) is deprecated. Please use moment()." + t + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
    ), i = n, n = s, s = i), o = ao(n, s), S0(this, o, e), this;
  };
}
function S0(e, t, n, s) {
  var o = t._milliseconds, i = Wh(t._days), r = Wh(t._months);
  e.isValid() && (s = s ?? !0, r && i0(e, lc(e, "Month") + r * n), i && s0(e, "Date", lc(e, "Date") + i * n), o && e._d.setTime(e._d.valueOf() + o * n), s && de.updateOffset(e, i || r));
}
var kD = E0(1, "add"), DD = E0(-1, "subtract");
function w0(e) {
  return typeof e == "string" || e instanceof String;
}
function ID(e) {
  return ro(e) || kc(e) || w0(e) || ar(e) || AD(e) || RD(e) || e === null || e === void 0;
}
function RD(e) {
  var t = Ni(e) && !pv(e), n = !1, s = [
    "years",
    "year",
    "y",
    "months",
    "month",
    "M",
    "days",
    "day",
    "d",
    "dates",
    "date",
    "D",
    "hours",
    "hour",
    "h",
    "minutes",
    "minute",
    "m",
    "seconds",
    "second",
    "s",
    "milliseconds",
    "millisecond",
    "ms"
  ], o, i, r = s.length;
  for (o = 0; o < r; o += 1)
    i = s[o], n = n || $t(e, i);
  return t && n;
}
function AD(e) {
  var t = oo(e), n = !1;
  return t && (n = e.filter(function(s) {
    return !ar(s) && w0(e);
  }).length === 0), t && n;
}
function MD(e) {
  var t = Ni(e) && !pv(e), n = !1, s = [
    "sameDay",
    "nextDay",
    "lastDay",
    "nextWeek",
    "lastWeek",
    "sameElse"
  ], o, i;
  for (o = 0; o < s.length; o += 1)
    i = s[o], n = n || $t(e, i);
  return t && n;
}
function PD(e, t) {
  var n = e.diff(t, "days", !0);
  return n < -6 ? "sameElse" : n < -1 ? "lastWeek" : n < 0 ? "lastDay" : n < 1 ? "sameDay" : n < 2 ? "nextDay" : n < 7 ? "nextWeek" : "sameElse";
}
function VD(e, t) {
  arguments.length === 1 && (arguments[0] ? ID(arguments[0]) ? (e = arguments[0], t = void 0) : MD(arguments[0]) && (t = arguments[0], e = void 0) : (e = void 0, t = void 0));
  var n = e || Kt(), s = Dv(n, this).startOf("day"), o = de.calendarFormat(this, s) || "sameElse", i = t && (ko(t[o]) ? t[o].call(this, n) : t[o]);
  return this.format(
    i || this.localeData().calendar(o, this, Kt(n))
  );
}
function LD() {
  return new Dc(this);
}
function FD(e, t) {
  var n = ro(e) ? e : Kt(e);
  return this.isValid() && n.isValid() ? (t = Us(t) || "millisecond", t === "millisecond" ? this.valueOf() > n.valueOf() : n.valueOf() < this.clone().startOf(t).valueOf()) : !1;
}
function UD(e, t) {
  var n = ro(e) ? e : Kt(e);
  return this.isValid() && n.isValid() ? (t = Us(t) || "millisecond", t === "millisecond" ? this.valueOf() < n.valueOf() : this.clone().endOf(t).valueOf() < n.valueOf()) : !1;
}
function jD(e, t, n, s) {
  var o = ro(e) ? e : Kt(e), i = ro(t) ? t : Kt(t);
  return this.isValid() && o.isValid() && i.isValid() ? (s = s || "()", (s[0] === "(" ? this.isAfter(o, n) : !this.isBefore(o, n)) && (s[1] === ")" ? this.isBefore(i, n) : !this.isAfter(i, n))) : !1;
}
function BD(e, t) {
  var n = ro(e) ? e : Kt(e), s;
  return this.isValid() && n.isValid() ? (t = Us(t) || "millisecond", t === "millisecond" ? this.valueOf() === n.valueOf() : (s = n.valueOf(), this.clone().startOf(t).valueOf() <= s && s <= this.clone().endOf(t).valueOf())) : !1;
}
function HD(e, t) {
  return this.isSame(e, t) || this.isAfter(e, t);
}
function YD(e, t) {
  return this.isSame(e, t) || this.isBefore(e, t);
}
function WD(e, t, n) {
  var s, o, i;
  if (!this.isValid())
    return NaN;
  if (s = Dv(e, this), !s.isValid())
    return NaN;
  switch (o = (s.utcOffset() - this.utcOffset()) * 6e4, t = Us(t), t) {
    case "year":
      i = ju(this, s) / 12;
      break;
    case "month":
      i = ju(this, s);
      break;
    case "quarter":
      i = ju(this, s) / 3;
      break;
    case "second":
      i = (this - s) / 1e3;
      break;
    // 1000
    case "minute":
      i = (this - s) / 6e4;
      break;
    // 1000 * 60
    case "hour":
      i = (this - s) / 36e5;
      break;
    // 1000 * 60 * 60
    case "day":
      i = (this - s - o) / 864e5;
      break;
    // 1000 * 60 * 60 * 24, negate dst
    case "week":
      i = (this - s - o) / 6048e5;
      break;
    // 1000 * 60 * 60 * 24 * 7, negate dst
    default:
      i = this - s;
  }
  return n ? i : ks(i);
}
function ju(e, t) {
  if (e.date() < t.date())
    return -ju(t, e);
  var n = (t.year() - e.year()) * 12 + (t.month() - e.month()), s = e.clone().add(n, "months"), o, i;
  return t - s < 0 ? (o = e.clone().add(n - 1, "months"), i = (t - s) / (s - o)) : (o = e.clone().add(n + 1, "months"), i = (t - s) / (o - s)), -(n + i) || 0;
}
de.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
de.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
function GD() {
  return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}
function zD(e) {
  if (!this.isValid())
    return null;
  var t = e !== !0, n = t ? this.clone().utc() : this;
  return n.year() < 0 || n.year() > 9999 ? Fu(
    n,
    t ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
  ) : ko(Date.prototype.toISOString) ? t ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", Fu(n, "Z")) : Fu(
    n,
    t ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
  );
}
function KD() {
  if (!this.isValid())
    return "moment.invalid(/* " + this._i + " */)";
  var e = "moment", t = "", n, s, o, i;
  return this.isLocal() || (e = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", t = "Z"), n = "[" + e + '("]', s = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", o = "-MM-DD[T]HH:mm:ss.SSS", i = t + '[")]', this.format(n + s + o + i);
}
function XD(e) {
  e || (e = this.isUtc() ? de.defaultFormatUtc : de.defaultFormat);
  var t = Fu(this, e);
  return this.localeData().postformat(t);
}
function qD(e, t) {
  return this.isValid() && (ro(e) && e.isValid() || Kt(e).isValid()) ? ao({ to: this, from: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function JD(e) {
  return this.from(Kt(), e);
}
function QD(e, t) {
  return this.isValid() && (ro(e) && e.isValid() || Kt(e).isValid()) ? ao({ from: this, to: e }).locale(this.locale()).humanize(!t) : this.localeData().invalidDate();
}
function ZD(e) {
  return this.to(Kt(), e);
}
function N0(e) {
  var t;
  return e === void 0 ? this._locale._abbr : (t = pr(e), t != null && (this._locale = t), this);
}
var O0 = Fs(
  "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
  function(e) {
    return e === void 0 ? this.localeData() : this.locale(e);
  }
);
function x0() {
  return this._locale;
}
var xd = 1e3, Sa = 60 * xd, Cd = 60 * Sa, C0 = (365 * 400 + 97) * 24 * Cd;
function wa(e, t) {
  return (e % t + t) % t;
}
function T0(e, t, n) {
  return e < 100 && e >= 0 ? new Date(e + 400, t, n) - C0 : new Date(e, t, n).valueOf();
}
function $0(e, t, n) {
  return e < 100 && e >= 0 ? Date.UTC(e + 400, t, n) - C0 : Date.UTC(e, t, n);
}
function eI(e) {
  var t, n;
  if (e = Us(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? $0 : T0, e) {
    case "year":
      t = n(this.year(), 0, 1);
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3,
        1
      );
      break;
    case "month":
      t = n(this.year(), this.month(), 1);
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday()
      );
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1)
      );
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date());
      break;
    case "hour":
      t = this._d.valueOf(), t -= wa(
        t + (this._isUTC ? 0 : this.utcOffset() * Sa),
        Cd
      );
      break;
    case "minute":
      t = this._d.valueOf(), t -= wa(t, Sa);
      break;
    case "second":
      t = this._d.valueOf(), t -= wa(t, xd);
      break;
  }
  return this._d.setTime(t), de.updateOffset(this, !0), this;
}
function tI(e) {
  var t, n;
  if (e = Us(e), e === void 0 || e === "millisecond" || !this.isValid())
    return this;
  switch (n = this._isUTC ? $0 : T0, e) {
    case "year":
      t = n(this.year() + 1, 0, 1) - 1;
      break;
    case "quarter":
      t = n(
        this.year(),
        this.month() - this.month() % 3 + 3,
        1
      ) - 1;
      break;
    case "month":
      t = n(this.year(), this.month() + 1, 1) - 1;
      break;
    case "week":
      t = n(
        this.year(),
        this.month(),
        this.date() - this.weekday() + 7
      ) - 1;
      break;
    case "isoWeek":
      t = n(
        this.year(),
        this.month(),
        this.date() - (this.isoWeekday() - 1) + 7
      ) - 1;
      break;
    case "day":
    case "date":
      t = n(this.year(), this.month(), this.date() + 1) - 1;
      break;
    case "hour":
      t = this._d.valueOf(), t += Cd - wa(
        t + (this._isUTC ? 0 : this.utcOffset() * Sa),
        Cd
      ) - 1;
      break;
    case "minute":
      t = this._d.valueOf(), t += Sa - wa(t, Sa) - 1;
      break;
    case "second":
      t = this._d.valueOf(), t += xd - wa(t, xd) - 1;
      break;
  }
  return this._d.setTime(t), de.updateOffset(this, !0), this;
}
function nI() {
  return this._d.valueOf() - (this._offset || 0) * 6e4;
}
function sI() {
  return Math.floor(this.valueOf() / 1e3);
}
function oI() {
  return new Date(this.valueOf());
}
function rI() {
  var e = this;
  return [
    e.year(),
    e.month(),
    e.date(),
    e.hour(),
    e.minute(),
    e.second(),
    e.millisecond()
  ];
}
function iI() {
  var e = this;
  return {
    years: e.year(),
    months: e.month(),
    date: e.date(),
    hours: e.hours(),
    minutes: e.minutes(),
    seconds: e.seconds(),
    milliseconds: e.milliseconds()
  };
}
function aI() {
  return this.isValid() ? this.toISOString() : null;
}
function lI() {
  return hv(this);
}
function cI() {
  return Rr({}, at(this));
}
function uI() {
  return at(this).overflow;
}
function dI() {
  return {
    input: this._i,
    format: this._f,
    locale: this._locale,
    isUTC: this._isUTC,
    strict: this._strict
  };
}
Be("N", 0, 0, "eraAbbr");
Be("NN", 0, 0, "eraAbbr");
Be("NNN", 0, 0, "eraAbbr");
Be("NNNN", 0, 0, "eraName");
Be("NNNNN", 0, 0, "eraNarrow");
Be("y", ["y", 1], "yo", "eraYear");
Be("y", ["yy", 2], 0, "eraYear");
Be("y", ["yyy", 3], 0, "eraYear");
Be("y", ["yyyy", 4], 0, "eraYear");
De("N", Iv);
De("NN", Iv);
De("NNN", Iv);
De("NNNN", SI);
De("NNNNN", wI);
Ht(
  ["N", "NN", "NNN", "NNNN", "NNNNN"],
  function(e, t, n, s) {
    var o = n._locale.erasParse(e, s, n._strict);
    o ? at(n).era = o : at(n).invalidEra = e;
  }
);
De("y", Wa);
De("yy", Wa);
De("yyy", Wa);
De("yyyy", Wa);
De("yo", NI);
Ht(["y", "yy", "yyy", "yyyy"], Gn);
Ht(["yo"], function(e, t, n, s) {
  var o;
  n._locale._eraYearOrdinalRegex && (o = e.match(n._locale._eraYearOrdinalRegex)), n._locale.eraYearOrdinalParse ? t[Gn] = n._locale.eraYearOrdinalParse(e, o) : t[Gn] = parseInt(e, 10);
});
function fI(e, t) {
  var n, s, o, i = this._eras || pr("en")._eras;
  for (n = 0, s = i.length; n < s; ++n) {
    switch (typeof i[n].since) {
      case "string":
        o = de(i[n].since).startOf("day"), i[n].since = o.valueOf();
        break;
    }
    switch (typeof i[n].until) {
      case "undefined":
        i[n].until = 1 / 0;
        break;
      case "string":
        o = de(i[n].until).startOf("day").valueOf(), i[n].until = o.valueOf();
        break;
    }
  }
  return i;
}
function pI(e, t, n) {
  var s, o, i = this.eras(), r, a, l;
  for (e = e.toUpperCase(), s = 0, o = i.length; s < o; ++s)
    if (r = i[s].name.toUpperCase(), a = i[s].abbr.toUpperCase(), l = i[s].narrow.toUpperCase(), n)
      switch (t) {
        case "N":
        case "NN":
        case "NNN":
          if (a === e)
            return i[s];
          break;
        case "NNNN":
          if (r === e)
            return i[s];
          break;
        case "NNNNN":
          if (l === e)
            return i[s];
          break;
      }
    else if ([r, a, l].indexOf(e) >= 0)
      return i[s];
}
function hI(e, t) {
  var n = e.since <= e.until ? 1 : -1;
  return t === void 0 ? de(e.since).year() : de(e.since).year() + (t - e.offset) * n;
}
function mI() {
  var e, t, n, s = this.localeData().eras();
  for (e = 0, t = s.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), s[e].since <= n && n <= s[e].until || s[e].until <= n && n <= s[e].since)
      return s[e].name;
  return "";
}
function vI() {
  var e, t, n, s = this.localeData().eras();
  for (e = 0, t = s.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), s[e].since <= n && n <= s[e].until || s[e].until <= n && n <= s[e].since)
      return s[e].narrow;
  return "";
}
function gI() {
  var e, t, n, s = this.localeData().eras();
  for (e = 0, t = s.length; e < t; ++e)
    if (n = this.clone().startOf("day").valueOf(), s[e].since <= n && n <= s[e].until || s[e].until <= n && n <= s[e].since)
      return s[e].abbr;
  return "";
}
function yI() {
  var e, t, n, s, o = this.localeData().eras();
  for (e = 0, t = o.length; e < t; ++e)
    if (n = o[e].since <= o[e].until ? 1 : -1, s = this.clone().startOf("day").valueOf(), o[e].since <= s && s <= o[e].until || o[e].until <= s && s <= o[e].since)
      return (this.year() - de(o[e].since).year()) * n + o[e].offset;
  return this.year();
}
function _I(e) {
  return $t(this, "_erasNameRegex") || Rv.call(this), e ? this._erasNameRegex : this._erasRegex;
}
function bI(e) {
  return $t(this, "_erasAbbrRegex") || Rv.call(this), e ? this._erasAbbrRegex : this._erasRegex;
}
function EI(e) {
  return $t(this, "_erasNarrowRegex") || Rv.call(this), e ? this._erasNarrowRegex : this._erasRegex;
}
function Iv(e, t) {
  return t.erasAbbrRegex(e);
}
function SI(e, t) {
  return t.erasNameRegex(e);
}
function wI(e, t) {
  return t.erasNarrowRegex(e);
}
function NI(e, t) {
  return t._eraYearOrdinalRegex || Wa;
}
function Rv() {
  var e = [], t = [], n = [], s = [], o, i, r, a, l, c = this.eras();
  for (o = 0, i = c.length; o < i; ++o)
    r = er(c[o].name), a = er(c[o].abbr), l = er(c[o].narrow), t.push(r), e.push(a), n.push(l), s.push(r), s.push(a), s.push(l);
  this._erasRegex = new RegExp("^(" + s.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + t.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + e.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
    "^(" + n.join("|") + ")",
    "i"
  );
}
Be(0, ["gg", 2], 0, function() {
  return this.weekYear() % 100;
});
Be(0, ["GG", 2], 0, function() {
  return this.isoWeekYear() % 100;
});
function $f(e, t) {
  Be(0, [e, e.length], 0, t);
}
$f("gggg", "weekYear");
$f("ggggg", "weekYear");
$f("GGGG", "isoWeekYear");
$f("GGGGG", "isoWeekYear");
De("G", Nf);
De("g", Nf);
De("GG", Xt, ws);
De("gg", Xt, ws);
De("GGGG", bv, _v);
De("gggg", bv, _v);
De("GGGGG", wf, Ef);
De("ggggg", wf, Ef);
Rc(
  ["gggg", "ggggg", "GGGG", "GGGGG"],
  function(e, t, n, s) {
    t[s.substr(0, 2)] = yt(e);
  }
);
Rc(["gg", "GG"], function(e, t, n, s) {
  t[s] = de.parseTwoDigitYear(e);
});
function OI(e) {
  return k0.call(
    this,
    e,
    this.week(),
    this.weekday() + this.localeData()._week.dow,
    this.localeData()._week.dow,
    this.localeData()._week.doy
  );
}
function xI(e) {
  return k0.call(
    this,
    e,
    this.isoWeek(),
    this.isoWeekday(),
    1,
    4
  );
}
function CI() {
  return tr(this.year(), 1, 4);
}
function TI() {
  return tr(this.isoWeekYear(), 1, 4);
}
function $I() {
  var e = this.localeData()._week;
  return tr(this.year(), e.dow, e.doy);
}
function kI() {
  var e = this.localeData()._week;
  return tr(this.weekYear(), e.dow, e.doy);
}
function k0(e, t, n, s, o) {
  var i;
  return e == null ? dc(this, s, o).year : (i = tr(e, s, o), t > i && (t = i), DI.call(this, e, t, n, s, o));
}
function DI(e, t, n, s, o) {
  var i = c0(e, t, n, s, o), r = uc(i.year, 0, i.dayOfYear);
  return this.year(r.getUTCFullYear()), this.month(r.getUTCMonth()), this.date(r.getUTCDate()), this;
}
Be("Q", 0, "Qo", "quarter");
De("Q", QE);
Ht("Q", function(e, t) {
  t[qo] = (yt(e) - 1) * 3;
});
function II(e) {
  return e == null ? Math.ceil((this.month() + 1) / 3) : this.month((e - 1) * 3 + this.month() % 3);
}
Be("D", ["DD", 2], "Do", "date");
De("D", Xt, Ga);
De("DD", Xt, ws);
De("Do", function(e, t) {
  return e ? t._dayOfMonthOrdinalParse || t._ordinalParse : t._dayOfMonthOrdinalParseLenient;
});
Ht(["D", "DD"], go);
Ht("Do", function(e, t) {
  t[go] = yt(e.match(Xt)[0]);
});
var D0 = za("Date", !0);
Be("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
De("DDD", Sf);
De("DDDD", ZE);
Ht(["DDD", "DDDD"], function(e, t, n) {
  n._dayOfYear = yt(e);
});
function RI(e) {
  var t = Math.round(
    (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
  ) + 1;
  return e == null ? t : this.add(e - t, "d");
}
Be("m", ["mm", 2], 0, "minute");
De("m", Xt, Ev);
De("mm", Xt, ws);
Ht(["m", "mm"], Zs);
var AI = za("Minutes", !1);
Be("s", ["ss", 2], 0, "second");
De("s", Xt, Ev);
De("ss", Xt, ws);
Ht(["s", "ss"], Jo);
var MI = za("Seconds", !1);
Be("S", 0, 0, function() {
  return ~~(this.millisecond() / 100);
});
Be(0, ["SS", 2], 0, function() {
  return ~~(this.millisecond() / 10);
});
Be(0, ["SSS", 3], 0, "millisecond");
Be(0, ["SSSS", 4], 0, function() {
  return this.millisecond() * 10;
});
Be(0, ["SSSSS", 5], 0, function() {
  return this.millisecond() * 100;
});
Be(0, ["SSSSSS", 6], 0, function() {
  return this.millisecond() * 1e3;
});
Be(0, ["SSSSSSS", 7], 0, function() {
  return this.millisecond() * 1e4;
});
Be(0, ["SSSSSSSS", 8], 0, function() {
  return this.millisecond() * 1e5;
});
Be(0, ["SSSSSSSSS", 9], 0, function() {
  return this.millisecond() * 1e6;
});
De("S", Sf, QE);
De("SS", Sf, ws);
De("SSS", Sf, ZE);
var Ar, I0;
for (Ar = "SSSS"; Ar.length <= 9; Ar += "S")
  De(Ar, Wa);
function PI(e, t) {
  t[di] = yt(("0." + e) * 1e3);
}
for (Ar = "S"; Ar.length <= 9; Ar += "S")
  Ht(Ar, PI);
I0 = za("Milliseconds", !1);
Be("z", 0, 0, "zoneAbbr");
Be("zz", 0, 0, "zoneName");
function VI() {
  return this._isUTC ? "UTC" : "";
}
function LI() {
  return this._isUTC ? "Coordinated Universal Time" : "";
}
var me = Dc.prototype;
me.add = kD;
me.calendar = VD;
me.clone = LD;
me.diff = WD;
me.endOf = tI;
me.format = XD;
me.from = qD;
me.fromNow = JD;
me.to = QD;
me.toNow = ZD;
me.get = K$;
me.invalidAt = uI;
me.isAfter = FD;
me.isBefore = UD;
me.isBetween = jD;
me.isSame = BD;
me.isSameOrAfter = HD;
me.isSameOrBefore = YD;
me.isValid = lI;
me.lang = O0;
me.locale = N0;
me.localeData = x0;
me.max = lD;
me.min = aD;
me.parsingFlags = cI;
me.set = X$;
me.startOf = eI;
me.subtract = DD;
me.toArray = rI;
me.toObject = iI;
me.toDate = oI;
me.toISOString = zD;
me.inspect = KD;
typeof Symbol < "u" && Symbol.for != null && (me[Symbol.for("nodejs.util.inspect.custom")] = function() {
  return "Moment<" + this.format() + ">";
});
me.toJSON = aI;
me.toString = GD;
me.unix = sI;
me.valueOf = nI;
me.creationData = dI;
me.eraName = mI;
me.eraNarrow = vI;
me.eraAbbr = gI;
me.eraYear = yI;
me.year = n0;
me.isLeapYear = z$;
me.weekYear = OI;
me.isoWeekYear = xI;
me.quarter = me.quarters = II;
me.month = a0;
me.daysInMonth = ok;
me.week = me.weeks = fk;
me.isoWeek = me.isoWeeks = pk;
me.weeksInYear = $I;
me.weeksInWeekYear = kI;
me.isoWeeksInYear = CI;
me.isoWeeksInISOWeekYear = TI;
me.date = D0;
me.day = me.days = xk;
me.weekday = Ck;
me.isoWeekday = Tk;
me.dayOfYear = RI;
me.hour = me.hours = Mk;
me.minute = me.minutes = AI;
me.second = me.seconds = MI;
me.millisecond = me.milliseconds = I0;
me.utcOffset = gD;
me.utc = _D;
me.local = bD;
me.parseZone = ED;
me.hasAlignedHourOffset = SD;
me.isDST = wD;
me.isLocal = OD;
me.isUtcOffset = xD;
me.isUtc = b0;
me.isUTC = b0;
me.zoneAbbr = VI;
me.zoneName = LI;
me.dates = Fs(
  "dates accessor is deprecated. Use date instead.",
  D0
);
me.months = Fs(
  "months accessor is deprecated. Use month instead",
  a0
);
me.years = Fs(
  "years accessor is deprecated. Use year instead",
  n0
);
me.zone = Fs(
  "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
  yD
);
me.isDSTShifted = Fs(
  "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
  ND
);
function FI(e) {
  return Kt(e * 1e3);
}
function UI() {
  return Kt.apply(null, arguments).parseZone();
}
function R0(e) {
  return e;
}
var kt = vv.prototype;
kt.calendar = O$;
kt.longDateFormat = $$;
kt.invalidDate = D$;
kt.ordinal = A$;
kt.preparse = R0;
kt.postformat = R0;
kt.relativeTime = P$;
kt.pastFuture = V$;
kt.set = w$;
kt.eras = fI;
kt.erasParse = pI;
kt.erasConvertYear = hI;
kt.erasAbbrRegex = bI;
kt.erasNameRegex = _I;
kt.erasNarrowRegex = EI;
kt.months = ek;
kt.monthsShort = tk;
kt.monthsParse = sk;
kt.monthsRegex = ik;
kt.monthsShortRegex = rk;
kt.week = lk;
kt.firstDayOfYear = dk;
kt.firstDayOfWeek = uk;
kt.weekdays = Ek;
kt.weekdaysMin = wk;
kt.weekdaysShort = Sk;
kt.weekdaysParse = Ok;
kt.weekdaysRegex = $k;
kt.weekdaysShortRegex = kk;
kt.weekdaysMinRegex = Dk;
kt.isPM = Rk;
kt.meridiem = Pk;
function Td(e, t, n, s) {
  var o = pr(), i = $o().set(s, t);
  return o[n](i, e);
}
function A0(e, t, n) {
  if (ar(e) && (t = e, e = void 0), e = e || "", t != null)
    return Td(e, t, n, "month");
  var s, o = [];
  for (s = 0; s < 12; s++)
    o[s] = Td(e, s, n, "month");
  return o;
}
function Av(e, t, n, s) {
  typeof e == "boolean" ? (ar(t) && (n = t, t = void 0), t = t || "") : (t = e, n = t, e = !1, ar(t) && (n = t, t = void 0), t = t || "");
  var o = pr(), i = e ? o._week.dow : 0, r, a = [];
  if (n != null)
    return Td(t, (n + i) % 7, s, "day");
  for (r = 0; r < 7; r++)
    a[r] = Td(t, (r + i) % 7, s, "day");
  return a;
}
function jI(e, t) {
  return A0(e, t, "months");
}
function BI(e, t) {
  return A0(e, t, "monthsShort");
}
function HI(e, t, n) {
  return Av(e, t, n, "weekdays");
}
function YI(e, t, n) {
  return Av(e, t, n, "weekdaysShort");
}
function WI(e, t, n) {
  return Av(e, t, n, "weekdaysMin");
}
jr("en", {
  eras: [
    {
      since: "0001-01-01",
      until: 1 / 0,
      offset: 1,
      name: "Anno Domini",
      narrow: "AD",
      abbr: "AD"
    },
    {
      since: "0000-12-31",
      until: -1 / 0,
      offset: 1,
      name: "Before Christ",
      narrow: "BC",
      abbr: "BC"
    }
  ],
  dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  ordinal: function(e) {
    var t = e % 10, n = yt(e % 100 / 10) === 1 ? "th" : t === 1 ? "st" : t === 2 ? "nd" : t === 3 ? "rd" : "th";
    return e + n;
  }
});
de.lang = Fs(
  "moment.lang is deprecated. Use moment.locale instead.",
  jr
);
de.langData = Fs(
  "moment.langData is deprecated. Use moment.localeData instead.",
  pr
);
var Po = Math.abs;
function GI() {
  var e = this._data;
  return this._milliseconds = Po(this._milliseconds), this._days = Po(this._days), this._months = Po(this._months), e.milliseconds = Po(e.milliseconds), e.seconds = Po(e.seconds), e.minutes = Po(e.minutes), e.hours = Po(e.hours), e.months = Po(e.months), e.years = Po(e.years), this;
}
function M0(e, t, n, s) {
  var o = ao(t, n);
  return e._milliseconds += s * o._milliseconds, e._days += s * o._days, e._months += s * o._months, e._bubble();
}
function zI(e, t) {
  return M0(this, e, t, 1);
}
function KI(e, t) {
  return M0(this, e, t, -1);
}
function Vy(e) {
  return e < 0 ? Math.floor(e) : Math.ceil(e);
}
function XI() {
  var e = this._milliseconds, t = this._days, n = this._months, s = this._data, o, i, r, a, l;
  return e >= 0 && t >= 0 && n >= 0 || e <= 0 && t <= 0 && n <= 0 || (e += Vy(zh(n) + t) * 864e5, t = 0, n = 0), s.milliseconds = e % 1e3, o = ks(e / 1e3), s.seconds = o % 60, i = ks(o / 60), s.minutes = i % 60, r = ks(i / 60), s.hours = r % 24, t += ks(r / 24), l = ks(P0(t)), n += l, t -= Vy(zh(l)), a = ks(n / 12), n %= 12, s.days = t, s.months = n, s.years = a, this;
}
function P0(e) {
  return e * 4800 / 146097;
}
function zh(e) {
  return e * 146097 / 4800;
}
function qI(e) {
  if (!this.isValid())
    return NaN;
  var t, n, s = this._milliseconds;
  if (e = Us(e), e === "month" || e === "quarter" || e === "year")
    switch (t = this._days + s / 864e5, n = this._months + P0(t), e) {
      case "month":
        return n;
      case "quarter":
        return n / 3;
      case "year":
        return n / 12;
    }
  else
    switch (t = this._days + Math.round(zh(this._months)), e) {
      case "week":
        return t / 7 + s / 6048e5;
      case "day":
        return t + s / 864e5;
      case "hour":
        return t * 24 + s / 36e5;
      case "minute":
        return t * 1440 + s / 6e4;
      case "second":
        return t * 86400 + s / 1e3;
      // Math.floor prevents floating point math errors here
      case "millisecond":
        return Math.floor(t * 864e5) + s;
      default:
        throw new Error("Unknown unit " + e);
    }
}
function hr(e) {
  return function() {
    return this.as(e);
  };
}
var V0 = hr("ms"), JI = hr("s"), QI = hr("m"), ZI = hr("h"), e2 = hr("d"), t2 = hr("w"), n2 = hr("M"), s2 = hr("Q"), o2 = hr("y"), r2 = V0;
function i2() {
  return ao(this);
}
function a2(e) {
  return e = Us(e), this.isValid() ? this[e + "s"]() : NaN;
}
function Ki(e) {
  return function() {
    return this.isValid() ? this._data[e] : NaN;
  };
}
var l2 = Ki("milliseconds"), c2 = Ki("seconds"), u2 = Ki("minutes"), d2 = Ki("hours"), f2 = Ki("days"), p2 = Ki("months"), h2 = Ki("years");
function m2() {
  return ks(this.days() / 7);
}
var Ho = Math.round, fa = {
  ss: 44,
  // a few seconds to seconds
  s: 45,
  // seconds to minute
  m: 45,
  // minutes to hour
  h: 22,
  // hours to day
  d: 26,
  // days to month/week
  w: null,
  // weeks to month
  M: 11
  // months to year
};
function v2(e, t, n, s, o) {
  return o.relativeTime(t || 1, !!n, e, s);
}
function g2(e, t, n, s) {
  var o = ao(e).abs(), i = Ho(o.as("s")), r = Ho(o.as("m")), a = Ho(o.as("h")), l = Ho(o.as("d")), c = Ho(o.as("M")), d = Ho(o.as("w")), f = Ho(o.as("y")), p = i <= n.ss && ["s", i] || i < n.s && ["ss", i] || r <= 1 && ["m"] || r < n.m && ["mm", r] || a <= 1 && ["h"] || a < n.h && ["hh", a] || l <= 1 && ["d"] || l < n.d && ["dd", l];
  return n.w != null && (p = p || d <= 1 && ["w"] || d < n.w && ["ww", d]), p = p || c <= 1 && ["M"] || c < n.M && ["MM", c] || f <= 1 && ["y"] || ["yy", f], p[2] = t, p[3] = +e > 0, p[4] = s, v2.apply(null, p);
}
function y2(e) {
  return e === void 0 ? Ho : typeof e == "function" ? (Ho = e, !0) : !1;
}
function _2(e, t) {
  return fa[e] === void 0 ? !1 : t === void 0 ? fa[e] : (fa[e] = t, e === "s" && (fa.ss = t - 1), !0);
}
function b2(e, t) {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var n = !1, s = fa, o, i;
  return typeof e == "object" && (t = e, e = !1), typeof e == "boolean" && (n = e), typeof t == "object" && (s = Object.assign({}, fa, t), t.s != null && t.ss == null && (s.ss = t.s - 1)), o = this.localeData(), i = g2(this, !n, s, o), n && (i = o.pastFuture(+this, i)), o.postformat(i);
}
var Mp = Math.abs;
function Zi(e) {
  return (e > 0) - (e < 0) || +e;
}
function kf() {
  if (!this.isValid())
    return this.localeData().invalidDate();
  var e = Mp(this._milliseconds) / 1e3, t = Mp(this._days), n = Mp(this._months), s, o, i, r, a = this.asSeconds(), l, c, d, f;
  return a ? (s = ks(e / 60), o = ks(s / 60), e %= 60, s %= 60, i = ks(n / 12), n %= 12, r = e ? e.toFixed(3).replace(/\.?0+$/, "") : "", l = a < 0 ? "-" : "", c = Zi(this._months) !== Zi(a) ? "-" : "", d = Zi(this._days) !== Zi(a) ? "-" : "", f = Zi(this._milliseconds) !== Zi(a) ? "-" : "", l + "P" + (i ? c + i + "Y" : "") + (n ? c + n + "M" : "") + (t ? d + t + "D" : "") + (o || s || e ? "T" : "") + (o ? f + o + "H" : "") + (s ? f + s + "M" : "") + (e ? f + r + "S" : "")) : "P0D";
}
var Ot = Tf.prototype;
Ot.isValid = pD;
Ot.abs = GI;
Ot.add = zI;
Ot.subtract = KI;
Ot.as = qI;
Ot.asMilliseconds = V0;
Ot.asSeconds = JI;
Ot.asMinutes = QI;
Ot.asHours = ZI;
Ot.asDays = e2;
Ot.asWeeks = t2;
Ot.asMonths = n2;
Ot.asQuarters = s2;
Ot.asYears = o2;
Ot.valueOf = r2;
Ot._bubble = XI;
Ot.clone = i2;
Ot.get = a2;
Ot.milliseconds = l2;
Ot.seconds = c2;
Ot.minutes = u2;
Ot.hours = d2;
Ot.days = f2;
Ot.weeks = m2;
Ot.months = p2;
Ot.years = h2;
Ot.humanize = b2;
Ot.toISOString = kf;
Ot.toString = kf;
Ot.toJSON = kf;
Ot.locale = N0;
Ot.localeData = x0;
Ot.toIsoString = Fs(
  "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
  kf
);
Ot.lang = O0;
Be("X", 0, 0, "unix");
Be("x", 0, 0, "valueOf");
De("x", Nf);
De("X", j$);
Ht("X", function(e, t, n) {
  n._d = new Date(parseFloat(e) * 1e3);
});
Ht("x", function(e, t, n) {
  n._d = new Date(yt(e));
});
//! moment.js
de.version = "2.30.1";
E$(Kt);
de.fn = me;
de.min = cD;
de.max = uD;
de.now = dD;
de.utc = $o;
de.unix = FI;
de.months = jI;
de.isDate = kc;
de.locale = jr;
de.invalid = bf;
de.duration = ao;
de.isMoment = ro;
de.weekdays = HI;
de.parseZone = UI;
de.localeData = pr;
de.isDuration = Uu;
de.monthsShort = BI;
de.weekdaysMin = WI;
de.defineLocale = xv;
de.updateLocale = Uk;
de.locales = jk;
de.weekdaysShort = YI;
de.normalizeUnits = Us;
de.relativeTimeRounding = y2;
de.relativeTimeThreshold = _2;
de.calendarFormat = PD;
de.prototype = me;
de.HTML5_FMT = {
  DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
  // <input type="datetime-local" />
  DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
  // <input type="datetime-local" step="1" />
  DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
  // <input type="datetime-local" step="0.001" />
  DATE: "YYYY-MM-DD",
  // <input type="date" />
  TIME: "HH:mm",
  // <input type="time" />
  TIME_SECONDS: "HH:mm:ss",
  // <input type="time" step="1" />
  TIME_MS: "HH:mm:ss.SSS",
  // <input type="time" step="0.001" />
  WEEK: "GGGG-[W]WW",
  // <input type="week" />
  MONTH: "YYYY-MM"
  // <input type="month" />
};
class E2 {
  constructor(t) {
    qe(this, "body");
    qe(this, "createdAt");
    qe(this, "expiration");
    qe(this, "from");
    qe(this, "id");
    qe(this, "lifespan");
    qe(this, "read");
    qe(this, "subject");
    qe(this, "summary");
    qe(this, "to");
    for (const [n, s] of Object.entries(t))
      n in this && (this[n] = s);
  }
  getReadable(t) {
    return console.log(t), de(t).fromNow();
  }
  get readableCreatedAt() {
    return this.getReadable(this.createdAt);
  }
  get readableExpiration() {
    return this.getReadable(this.expiration);
  }
}
function L0(e, t) {
  return function() {
    return e.apply(t, arguments);
  };
}
const { toString: S2 } = Object.prototype, { getPrototypeOf: Mv } = Object, { iterator: Df, toStringTag: F0 } = Symbol, If = /* @__PURE__ */ ((e) => (t) => {
  const n = S2.call(t);
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), lo = (e) => (e = e.toLowerCase(), (t) => If(t) === e), Rf = (e) => (t) => typeof t === e, { isArray: Ka } = Array, pc = Rf("undefined");
function w2(e) {
  return e !== null && !pc(e) && e.constructor !== null && !pc(e.constructor) && ps(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const U0 = lo("ArrayBuffer");
function N2(e) {
  let t;
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && U0(e.buffer), t;
}
const O2 = Rf("string"), ps = Rf("function"), j0 = Rf("number"), Af = (e) => e !== null && typeof e == "object", x2 = (e) => e === !0 || e === !1, Bu = (e) => {
  if (If(e) !== "object")
    return !1;
  const t = Mv(e);
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(F0 in e) && !(Df in e);
}, C2 = lo("Date"), T2 = lo("File"), $2 = lo("Blob"), k2 = lo("FileList"), D2 = (e) => Af(e) && ps(e.pipe), I2 = (e) => {
  let t;
  return e && (typeof FormData == "function" && e instanceof FormData || ps(e.append) && ((t = If(e)) === "formdata" || // detect form-data instance
  t === "object" && ps(e.toString) && e.toString() === "[object FormData]"));
}, R2 = lo("URLSearchParams"), [A2, M2, P2, V2] = ["ReadableStream", "Request", "Response", "Headers"].map(lo), L2 = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function Ac(e, t, { allOwnKeys: n = !1 } = {}) {
  if (e === null || typeof e > "u")
    return;
  let s, o;
  if (typeof e != "object" && (e = [e]), Ka(e))
    for (s = 0, o = e.length; s < o; s++)
      t.call(null, e[s], s, e);
  else {
    const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), r = i.length;
    let a;
    for (s = 0; s < r; s++)
      a = i[s], t.call(null, e[a], a, e);
  }
}
function B0(e, t) {
  t = t.toLowerCase();
  const n = Object.keys(e);
  let s = n.length, o;
  for (; s-- > 0; )
    if (o = n[s], t === o.toLowerCase())
      return o;
  return null;
}
const fi = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, H0 = (e) => !pc(e) && e !== fi;
function Kh() {
  const { caseless: e } = H0(this) && this || {}, t = {}, n = (s, o) => {
    const i = e && B0(t, o) || o;
    Bu(t[i]) && Bu(s) ? t[i] = Kh(t[i], s) : Bu(s) ? t[i] = Kh({}, s) : Ka(s) ? t[i] = s.slice() : t[i] = s;
  };
  for (let s = 0, o = arguments.length; s < o; s++)
    arguments[s] && Ac(arguments[s], n);
  return t;
}
const F2 = (e, t, n, { allOwnKeys: s } = {}) => (Ac(t, (o, i) => {
  n && ps(o) ? e[i] = L0(o, n) : e[i] = o;
}, { allOwnKeys: s }), e), U2 = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), j2 = (e, t, n, s) => {
  e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
    value: t.prototype
  }), n && Object.assign(e.prototype, n);
}, B2 = (e, t, n, s) => {
  let o, i, r;
  const a = {};
  if (t = t || {}, e == null) return t;
  do {
    for (o = Object.getOwnPropertyNames(e), i = o.length; i-- > 0; )
      r = o[i], (!s || s(r, e, t)) && !a[r] && (t[r] = e[r], a[r] = !0);
    e = n !== !1 && Mv(e);
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
  return t;
}, H2 = (e, t, n) => {
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
  const s = e.indexOf(t, n);
  return s !== -1 && s === n;
}, Y2 = (e) => {
  if (!e) return null;
  if (Ka(e)) return e;
  let t = e.length;
  if (!j0(t)) return null;
  const n = new Array(t);
  for (; t-- > 0; )
    n[t] = e[t];
  return n;
}, W2 = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Mv(Uint8Array)), G2 = (e, t) => {
  const s = (e && e[Df]).call(e);
  let o;
  for (; (o = s.next()) && !o.done; ) {
    const i = o.value;
    t.call(e, i[0], i[1]);
  }
}, z2 = (e, t) => {
  let n;
  const s = [];
  for (; (n = e.exec(t)) !== null; )
    s.push(n);
  return s;
}, K2 = lo("HTMLFormElement"), X2 = (e) => e.toLowerCase().replace(
  /[-_\s]([a-z\d])(\w*)/g,
  function(n, s, o) {
    return s.toUpperCase() + o;
  }
), Ly = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), q2 = lo("RegExp"), Y0 = (e, t) => {
  const n = Object.getOwnPropertyDescriptors(e), s = {};
  Ac(n, (o, i) => {
    let r;
    (r = t(o, i, e)) !== !1 && (s[i] = r || o);
  }), Object.defineProperties(e, s);
}, J2 = (e) => {
  Y0(e, (t, n) => {
    if (ps(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
      return !1;
    const s = e[n];
    if (ps(s)) {
      if (t.enumerable = !1, "writable" in t) {
        t.writable = !1;
        return;
      }
      t.set || (t.set = () => {
        throw Error("Can not rewrite read-only method '" + n + "'");
      });
    }
  });
}, Q2 = (e, t) => {
  const n = {}, s = (o) => {
    o.forEach((i) => {
      n[i] = !0;
    });
  };
  return Ka(e) ? s(e) : s(String(e).split(t)), n;
}, Z2 = () => {
}, eR = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
function tR(e) {
  return !!(e && ps(e.append) && e[F0] === "FormData" && e[Df]);
}
const nR = (e) => {
  const t = new Array(10), n = (s, o) => {
    if (Af(s)) {
      if (t.indexOf(s) >= 0)
        return;
      if (!("toJSON" in s)) {
        t[o] = s;
        const i = Ka(s) ? [] : {};
        return Ac(s, (r, a) => {
          const l = n(r, o + 1);
          !pc(l) && (i[a] = l);
        }), t[o] = void 0, i;
      }
    }
    return s;
  };
  return n(e, 0);
}, sR = lo("AsyncFunction"), oR = (e) => e && (Af(e) || ps(e)) && ps(e.then) && ps(e.catch), W0 = ((e, t) => e ? setImmediate : t ? ((n, s) => (fi.addEventListener("message", ({ source: o, data: i }) => {
  o === fi && i === n && s.length && s.shift()();
}, !1), (o) => {
  s.push(o), fi.postMessage(n, "*");
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
  typeof setImmediate == "function",
  ps(fi.postMessage)
), rR = typeof queueMicrotask < "u" ? queueMicrotask.bind(fi) : typeof process < "u" && process.nextTick || W0, iR = (e) => e != null && ps(e[Df]), ee = {
  isArray: Ka,
  isArrayBuffer: U0,
  isBuffer: w2,
  isFormData: I2,
  isArrayBufferView: N2,
  isString: O2,
  isNumber: j0,
  isBoolean: x2,
  isObject: Af,
  isPlainObject: Bu,
  isReadableStream: A2,
  isRequest: M2,
  isResponse: P2,
  isHeaders: V2,
  isUndefined: pc,
  isDate: C2,
  isFile: T2,
  isBlob: $2,
  isRegExp: q2,
  isFunction: ps,
  isStream: D2,
  isURLSearchParams: R2,
  isTypedArray: W2,
  isFileList: k2,
  forEach: Ac,
  merge: Kh,
  extend: F2,
  trim: L2,
  stripBOM: U2,
  inherits: j2,
  toFlatObject: B2,
  kindOf: If,
  kindOfTest: lo,
  endsWith: H2,
  toArray: Y2,
  forEachEntry: G2,
  matchAll: z2,
  isHTMLForm: K2,
  hasOwnProperty: Ly,
  hasOwnProp: Ly,
  // an alias to avoid ESLint no-prototype-builtins detection
  reduceDescriptors: Y0,
  freezeMethods: J2,
  toObjectSet: Q2,
  toCamelCase: X2,
  noop: Z2,
  toFiniteNumber: eR,
  findKey: B0,
  global: fi,
  isContextDefined: H0,
  isSpecCompliantForm: tR,
  toJSONObject: nR,
  isAsyncFn: sR,
  isThenable: oR,
  setImmediate: W0,
  asap: rR,
  isIterable: iR
};
function it(e, t, n, s, o) {
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), s && (this.request = s), o && (this.response = o, this.status = o.status ? o.status : null);
}
ee.inherits(it, Error, {
  toJSON: function() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: ee.toJSONObject(this.config),
      code: this.code,
      status: this.status
    };
  }
});
const G0 = it.prototype, z0 = {};
[
  "ERR_BAD_OPTION_VALUE",
  "ERR_BAD_OPTION",
  "ECONNABORTED",
  "ETIMEDOUT",
  "ERR_NETWORK",
  "ERR_FR_TOO_MANY_REDIRECTS",
  "ERR_DEPRECATED",
  "ERR_BAD_RESPONSE",
  "ERR_BAD_REQUEST",
  "ERR_CANCELED",
  "ERR_NOT_SUPPORT",
  "ERR_INVALID_URL"
  // eslint-disable-next-line func-names
].forEach((e) => {
  z0[e] = { value: e };
});
Object.defineProperties(it, z0);
Object.defineProperty(G0, "isAxiosError", { value: !0 });
it.from = (e, t, n, s, o, i) => {
  const r = Object.create(G0);
  return ee.toFlatObject(e, r, function(l) {
    return l !== Error.prototype;
  }, (a) => a !== "isAxiosError"), it.call(r, e.message, t, n, s, o), r.cause = e, r.name = e.name, i && Object.assign(r, i), r;
};
const aR = null;
function Xh(e) {
  return ee.isPlainObject(e) || ee.isArray(e);
}
function K0(e) {
  return ee.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function Fy(e, t, n) {
  return e ? e.concat(t).map(function(o, i) {
    return o = K0(o), !n && i ? "[" + o + "]" : o;
  }).join(n ? "." : "") : t;
}
function lR(e) {
  return ee.isArray(e) && !e.some(Xh);
}
const cR = ee.toFlatObject(ee, {}, null, function(t) {
  return /^is[A-Z]/.test(t);
});
function Mf(e, t, n) {
  if (!ee.isObject(e))
    throw new TypeError("target must be an object");
  t = t || new FormData(), n = ee.toFlatObject(n, {
    metaTokens: !0,
    dots: !1,
    indexes: !1
  }, !1, function(v, g) {
    return !ee.isUndefined(g[v]);
  });
  const s = n.metaTokens, o = n.visitor || d, i = n.dots, r = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && ee.isSpecCompliantForm(t);
  if (!ee.isFunction(o))
    throw new TypeError("visitor must be a function");
  function c(m) {
    if (m === null) return "";
    if (ee.isDate(m))
      return m.toISOString();
    if (ee.isBoolean(m))
      return m.toString();
    if (!l && ee.isBlob(m))
      throw new it("Blob is not supported. Use a Buffer instead.");
    return ee.isArrayBuffer(m) || ee.isTypedArray(m) ? l && typeof Blob == "function" ? new Blob([m]) : Buffer.from(m) : m;
  }
  function d(m, v, g) {
    let _ = m;
    if (m && !g && typeof m == "object") {
      if (ee.endsWith(v, "{}"))
        v = s ? v : v.slice(0, -2), m = JSON.stringify(m);
      else if (ee.isArray(m) && lR(m) || (ee.isFileList(m) || ee.endsWith(v, "[]")) && (_ = ee.toArray(m)))
        return v = K0(v), _.forEach(function(b, O) {
          !(ee.isUndefined(b) || b === null) && t.append(
            // eslint-disable-next-line no-nested-ternary
            r === !0 ? Fy([v], O, i) : r === null ? v : v + "[]",
            c(b)
          );
        }), !1;
    }
    return Xh(m) ? !0 : (t.append(Fy(g, v, i), c(m)), !1);
  }
  const f = [], p = Object.assign(cR, {
    defaultVisitor: d,
    convertValue: c,
    isVisitable: Xh
  });
  function h(m, v) {
    if (!ee.isUndefined(m)) {
      if (f.indexOf(m) !== -1)
        throw Error("Circular reference detected in " + v.join("."));
      f.push(m), ee.forEach(m, function(_, S) {
        (!(ee.isUndefined(_) || _ === null) && o.call(
          t,
          _,
          ee.isString(S) ? S.trim() : S,
          v,
          p
        )) === !0 && h(_, v ? v.concat(S) : [S]);
      }), f.pop();
    }
  }
  if (!ee.isObject(e))
    throw new TypeError("data must be an object");
  return h(e), t;
}
function Uy(e) {
  const t = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
    "%00": "\0"
  };
  return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(s) {
    return t[s];
  });
}
function Pv(e, t) {
  this._pairs = [], e && Mf(e, this, t);
}
const X0 = Pv.prototype;
X0.append = function(t, n) {
  this._pairs.push([t, n]);
};
X0.toString = function(t) {
  const n = t ? function(s) {
    return t.call(this, s, Uy);
  } : Uy;
  return this._pairs.map(function(o) {
    return n(o[0]) + "=" + n(o[1]);
  }, "").join("&");
};
function uR(e) {
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function q0(e, t, n) {
  if (!t)
    return e;
  const s = n && n.encode || uR;
  ee.isFunction(n) && (n = {
    serialize: n
  });
  const o = n && n.serialize;
  let i;
  if (o ? i = o(t, n) : i = ee.isURLSearchParams(t) ? t.toString() : new Pv(t, n).toString(s), i) {
    const r = e.indexOf("#");
    r !== -1 && (e = e.slice(0, r)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
  }
  return e;
}
class jy {
  constructor() {
    this.handlers = [];
  }
  /**
   * Add a new interceptor to the stack
   *
   * @param {Function} fulfilled The function to handle `then` for a `Promise`
   * @param {Function} rejected The function to handle `reject` for a `Promise`
   *
   * @return {Number} An ID used to remove interceptor later
   */
  use(t, n, s) {
    return this.handlers.push({
      fulfilled: t,
      rejected: n,
      synchronous: s ? s.synchronous : !1,
      runWhen: s ? s.runWhen : null
    }), this.handlers.length - 1;
  }
  /**
   * Remove an interceptor from the stack
   *
   * @param {Number} id The ID that was returned by `use`
   *
   * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
   */
  eject(t) {
    this.handlers[t] && (this.handlers[t] = null);
  }
  /**
   * Clear all interceptors from the stack
   *
   * @returns {void}
   */
  clear() {
    this.handlers && (this.handlers = []);
  }
  /**
   * Iterate over all the registered interceptors
   *
   * This method is particularly useful for skipping over any
   * interceptors that may have become `null` calling `eject`.
   *
   * @param {Function} fn The function to call for each interceptor
   *
   * @returns {void}
   */
  forEach(t) {
    ee.forEach(this.handlers, function(s) {
      s !== null && t(s);
    });
  }
}
const J0 = {
  silentJSONParsing: !0,
  forcedJSONParsing: !0,
  clarifyTimeoutError: !1
}, dR = typeof URLSearchParams < "u" ? URLSearchParams : Pv, fR = typeof FormData < "u" ? FormData : null, pR = typeof Blob < "u" ? Blob : null, hR = {
  isBrowser: !0,
  classes: {
    URLSearchParams: dR,
    FormData: fR,
    Blob: pR
  },
  protocols: ["http", "https", "file", "blob", "url", "data"]
}, Vv = typeof window < "u" && typeof document < "u", qh = typeof navigator == "object" && navigator || void 0, mR = Vv && (!qh || ["ReactNative", "NativeScript", "NS"].indexOf(qh.product) < 0), vR = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", gR = Vv && window.location.href || "http://localhost", yR = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  hasBrowserEnv: Vv,
  hasStandardBrowserEnv: mR,
  hasStandardBrowserWebWorkerEnv: vR,
  navigator: qh,
  origin: gR
}, Symbol.toStringTag, { value: "Module" })), Bn = {
  ...yR,
  ...hR
};
function _R(e, t) {
  return Mf(e, new Bn.classes.URLSearchParams(), Object.assign({
    visitor: function(n, s, o, i) {
      return Bn.isNode && ee.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
    }
  }, t));
}
function bR(e) {
  return ee.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
}
function ER(e) {
  const t = {}, n = Object.keys(e);
  let s;
  const o = n.length;
  let i;
  for (s = 0; s < o; s++)
    i = n[s], t[i] = e[i];
  return t;
}
function Q0(e) {
  function t(n, s, o, i) {
    let r = n[i++];
    if (r === "__proto__") return !0;
    const a = Number.isFinite(+r), l = i >= n.length;
    return r = !r && ee.isArray(o) ? o.length : r, l ? (ee.hasOwnProp(o, r) ? o[r] = [o[r], s] : o[r] = s, !a) : ((!o[r] || !ee.isObject(o[r])) && (o[r] = []), t(n, s, o[r], i) && ee.isArray(o[r]) && (o[r] = ER(o[r])), !a);
  }
  if (ee.isFormData(e) && ee.isFunction(e.entries)) {
    const n = {};
    return ee.forEachEntry(e, (s, o) => {
      t(bR(s), o, n, 0);
    }), n;
  }
  return null;
}
function SR(e, t, n) {
  if (ee.isString(e))
    try {
      return (t || JSON.parse)(e), ee.trim(e);
    } catch (s) {
      if (s.name !== "SyntaxError")
        throw s;
    }
  return (n || JSON.stringify)(e);
}
const Mc = {
  transitional: J0,
  adapter: ["xhr", "http", "fetch"],
  transformRequest: [function(t, n) {
    const s = n.getContentType() || "", o = s.indexOf("application/json") > -1, i = ee.isObject(t);
    if (i && ee.isHTMLForm(t) && (t = new FormData(t)), ee.isFormData(t))
      return o ? JSON.stringify(Q0(t)) : t;
    if (ee.isArrayBuffer(t) || ee.isBuffer(t) || ee.isStream(t) || ee.isFile(t) || ee.isBlob(t) || ee.isReadableStream(t))
      return t;
    if (ee.isArrayBufferView(t))
      return t.buffer;
    if (ee.isURLSearchParams(t))
      return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
    let a;
    if (i) {
      if (s.indexOf("application/x-www-form-urlencoded") > -1)
        return _R(t, this.formSerializer).toString();
      if ((a = ee.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
        const l = this.env && this.env.FormData;
        return Mf(
          a ? { "files[]": t } : t,
          l && new l(),
          this.formSerializer
        );
      }
    }
    return i || o ? (n.setContentType("application/json", !1), SR(t)) : t;
  }],
  transformResponse: [function(t) {
    const n = this.transitional || Mc.transitional, s = n && n.forcedJSONParsing, o = this.responseType === "json";
    if (ee.isResponse(t) || ee.isReadableStream(t))
      return t;
    if (t && ee.isString(t) && (s && !this.responseType || o)) {
      const r = !(n && n.silentJSONParsing) && o;
      try {
        return JSON.parse(t);
      } catch (a) {
        if (r)
          throw a.name === "SyntaxError" ? it.from(a, it.ERR_BAD_RESPONSE, this, null, this.response) : a;
      }
    }
    return t;
  }],
  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,
  xsrfCookieName: "XSRF-TOKEN",
  xsrfHeaderName: "X-XSRF-TOKEN",
  maxContentLength: -1,
  maxBodyLength: -1,
  env: {
    FormData: Bn.classes.FormData,
    Blob: Bn.classes.Blob
  },
  validateStatus: function(t) {
    return t >= 200 && t < 300;
  },
  headers: {
    common: {
      Accept: "application/json, text/plain, */*",
      "Content-Type": void 0
    }
  }
};
ee.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
  Mc.headers[e] = {};
});
const wR = ee.toObjectSet([
  "age",
  "authorization",
  "content-length",
  "content-type",
  "etag",
  "expires",
  "from",
  "host",
  "if-modified-since",
  "if-unmodified-since",
  "last-modified",
  "location",
  "max-forwards",
  "proxy-authorization",
  "referer",
  "retry-after",
  "user-agent"
]), NR = (e) => {
  const t = {};
  let n, s, o;
  return e && e.split(`
`).forEach(function(r) {
    o = r.indexOf(":"), n = r.substring(0, o).trim().toLowerCase(), s = r.substring(o + 1).trim(), !(!n || t[n] && wR[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
  }), t;
}, By = Symbol("internals");
function dl(e) {
  return e && String(e).trim().toLowerCase();
}
function Hu(e) {
  return e === !1 || e == null ? e : ee.isArray(e) ? e.map(Hu) : String(e);
}
function OR(e) {
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  let s;
  for (; s = n.exec(e); )
    t[s[1]] = s[2];
  return t;
}
const xR = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
function Pp(e, t, n, s, o) {
  if (ee.isFunction(s))
    return s.call(this, t, n);
  if (o && (t = n), !!ee.isString(t)) {
    if (ee.isString(s))
      return t.indexOf(s) !== -1;
    if (ee.isRegExp(s))
      return s.test(t);
  }
}
function CR(e) {
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
}
function TR(e, t) {
  const n = ee.toCamelCase(" " + t);
  ["get", "set", "has"].forEach((s) => {
    Object.defineProperty(e, s + n, {
      value: function(o, i, r) {
        return this[s].call(this, t, o, i, r);
      },
      configurable: !0
    });
  });
}
let hs = class {
  constructor(t) {
    t && this.set(t);
  }
  set(t, n, s) {
    const o = this;
    function i(a, l, c) {
      const d = dl(l);
      if (!d)
        throw new Error("header name must be a non-empty string");
      const f = ee.findKey(o, d);
      (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || l] = Hu(a));
    }
    const r = (a, l) => ee.forEach(a, (c, d) => i(c, d, l));
    if (ee.isPlainObject(t) || t instanceof this.constructor)
      r(t, n);
    else if (ee.isString(t) && (t = t.trim()) && !xR(t))
      r(NR(t), n);
    else if (ee.isObject(t) && ee.isIterable(t)) {
      let a = {}, l, c;
      for (const d of t) {
        if (!ee.isArray(d))
          throw TypeError("Object iterator must return a key-value pair");
        a[c = d[0]] = (l = a[c]) ? ee.isArray(l) ? [...l, d[1]] : [l, d[1]] : d[1];
      }
      r(a, n);
    } else
      t != null && i(n, t, s);
    return this;
  }
  get(t, n) {
    if (t = dl(t), t) {
      const s = ee.findKey(this, t);
      if (s) {
        const o = this[s];
        if (!n)
          return o;
        if (n === !0)
          return OR(o);
        if (ee.isFunction(n))
          return n.call(this, o, s);
        if (ee.isRegExp(n))
          return n.exec(o);
        throw new TypeError("parser must be boolean|regexp|function");
      }
    }
  }
  has(t, n) {
    if (t = dl(t), t) {
      const s = ee.findKey(this, t);
      return !!(s && this[s] !== void 0 && (!n || Pp(this, this[s], s, n)));
    }
    return !1;
  }
  delete(t, n) {
    const s = this;
    let o = !1;
    function i(r) {
      if (r = dl(r), r) {
        const a = ee.findKey(s, r);
        a && (!n || Pp(s, s[a], a, n)) && (delete s[a], o = !0);
      }
    }
    return ee.isArray(t) ? t.forEach(i) : i(t), o;
  }
  clear(t) {
    const n = Object.keys(this);
    let s = n.length, o = !1;
    for (; s--; ) {
      const i = n[s];
      (!t || Pp(this, this[i], i, t, !0)) && (delete this[i], o = !0);
    }
    return o;
  }
  normalize(t) {
    const n = this, s = {};
    return ee.forEach(this, (o, i) => {
      const r = ee.findKey(s, i);
      if (r) {
        n[r] = Hu(o), delete n[i];
        return;
      }
      const a = t ? CR(i) : String(i).trim();
      a !== i && delete n[i], n[a] = Hu(o), s[a] = !0;
    }), this;
  }
  concat(...t) {
    return this.constructor.concat(this, ...t);
  }
  toJSON(t) {
    const n = /* @__PURE__ */ Object.create(null);
    return ee.forEach(this, (s, o) => {
      s != null && s !== !1 && (n[o] = t && ee.isArray(s) ? s.join(", ") : s);
    }), n;
  }
  [Symbol.iterator]() {
    return Object.entries(this.toJSON())[Symbol.iterator]();
  }
  toString() {
    return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
`);
  }
  getSetCookie() {
    return this.get("set-cookie") || [];
  }
  get [Symbol.toStringTag]() {
    return "AxiosHeaders";
  }
  static from(t) {
    return t instanceof this ? t : new this(t);
  }
  static concat(t, ...n) {
    const s = new this(t);
    return n.forEach((o) => s.set(o)), s;
  }
  static accessor(t) {
    const s = (this[By] = this[By] = {
      accessors: {}
    }).accessors, o = this.prototype;
    function i(r) {
      const a = dl(r);
      s[a] || (TR(o, r), s[a] = !0);
    }
    return ee.isArray(t) ? t.forEach(i) : i(t), this;
  }
};
hs.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
ee.reduceDescriptors(hs.prototype, ({ value: e }, t) => {
  let n = t[0].toUpperCase() + t.slice(1);
  return {
    get: () => e,
    set(s) {
      this[n] = s;
    }
  };
});
ee.freezeMethods(hs);
function Vp(e, t) {
  const n = this || Mc, s = t || n, o = hs.from(s.headers);
  let i = s.data;
  return ee.forEach(e, function(a) {
    i = a.call(n, i, o.normalize(), t ? t.status : void 0);
  }), o.normalize(), i;
}
function Z0(e) {
  return !!(e && e.__CANCEL__);
}
function Xa(e, t, n) {
  it.call(this, e ?? "canceled", it.ERR_CANCELED, t, n), this.name = "CanceledError";
}
ee.inherits(Xa, it, {
  __CANCEL__: !0
});
function eS(e, t, n) {
  const s = n.config.validateStatus;
  !n.status || !s || s(n.status) ? e(n) : t(new it(
    "Request failed with status code " + n.status,
    [it.ERR_BAD_REQUEST, it.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
    n.config,
    n.request,
    n
  ));
}
function $R(e) {
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
  return t && t[1] || "";
}
function kR(e, t) {
  e = e || 10;
  const n = new Array(e), s = new Array(e);
  let o = 0, i = 0, r;
  return t = t !== void 0 ? t : 1e3, function(l) {
    const c = Date.now(), d = s[i];
    r || (r = c), n[o] = l, s[o] = c;
    let f = i, p = 0;
    for (; f !== o; )
      p += n[f++], f = f % e;
    if (o = (o + 1) % e, o === i && (i = (i + 1) % e), c - r < t)
      return;
    const h = d && c - d;
    return h ? Math.round(p * 1e3 / h) : void 0;
  };
}
function DR(e, t) {
  let n = 0, s = 1e3 / t, o, i;
  const r = (c, d = Date.now()) => {
    n = d, o = null, i && (clearTimeout(i), i = null), e.apply(null, c);
  };
  return [(...c) => {
    const d = Date.now(), f = d - n;
    f >= s ? r(c, d) : (o = c, i || (i = setTimeout(() => {
      i = null, r(o);
    }, s - f)));
  }, () => o && r(o)];
}
const $d = (e, t, n = 3) => {
  let s = 0;
  const o = kR(50, 250);
  return DR((i) => {
    const r = i.loaded, a = i.lengthComputable ? i.total : void 0, l = r - s, c = o(l), d = r <= a;
    s = r;
    const f = {
      loaded: r,
      total: a,
      progress: a ? r / a : void 0,
      bytes: l,
      rate: c || void 0,
      estimated: c && a && d ? (a - r) / c : void 0,
      event: i,
      lengthComputable: a != null,
      [t ? "download" : "upload"]: !0
    };
    e(f);
  }, n);
}, Hy = (e, t) => {
  const n = e != null;
  return [(s) => t[0]({
    lengthComputable: n,
    total: e,
    loaded: s
  }), t[1]];
}, Yy = (e) => (...t) => ee.asap(() => e(...t)), IR = Bn.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, Bn.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
  new URL(Bn.origin),
  Bn.navigator && /(msie|trident)/i.test(Bn.navigator.userAgent)
) : () => !0, RR = Bn.hasStandardBrowserEnv ? (
  // Standard browser envs support document.cookie
  {
    write(e, t, n, s, o, i) {
      const r = [e + "=" + encodeURIComponent(t)];
      ee.isNumber(n) && r.push("expires=" + new Date(n).toGMTString()), ee.isString(s) && r.push("path=" + s), ee.isString(o) && r.push("domain=" + o), i === !0 && r.push("secure"), document.cookie = r.join("; ");
    },
    read(e) {
      const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
      return t ? decodeURIComponent(t[3]) : null;
    },
    remove(e) {
      this.write(e, "", Date.now() - 864e5);
    }
  }
) : (
  // Non-standard browser env (web workers, react-native) lack needed support.
  {
    write() {
    },
    read() {
      return null;
    },
    remove() {
    }
  }
);
function AR(e) {
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
}
function MR(e, t) {
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
}
function tS(e, t, n) {
  let s = !AR(t);
  return e && (s || n == !1) ? MR(e, t) : t;
}
const Wy = (e) => e instanceof hs ? { ...e } : e;
function Ii(e, t) {
  t = t || {};
  const n = {};
  function s(c, d, f, p) {
    return ee.isPlainObject(c) && ee.isPlainObject(d) ? ee.merge.call({ caseless: p }, c, d) : ee.isPlainObject(d) ? ee.merge({}, d) : ee.isArray(d) ? d.slice() : d;
  }
  function o(c, d, f, p) {
    if (ee.isUndefined(d)) {
      if (!ee.isUndefined(c))
        return s(void 0, c, f, p);
    } else return s(c, d, f, p);
  }
  function i(c, d) {
    if (!ee.isUndefined(d))
      return s(void 0, d);
  }
  function r(c, d) {
    if (ee.isUndefined(d)) {
      if (!ee.isUndefined(c))
        return s(void 0, c);
    } else return s(void 0, d);
  }
  function a(c, d, f) {
    if (f in t)
      return s(c, d);
    if (f in e)
      return s(void 0, c);
  }
  const l = {
    url: i,
    method: i,
    data: i,
    baseURL: r,
    transformRequest: r,
    transformResponse: r,
    paramsSerializer: r,
    timeout: r,
    timeoutMessage: r,
    withCredentials: r,
    withXSRFToken: r,
    adapter: r,
    responseType: r,
    xsrfCookieName: r,
    xsrfHeaderName: r,
    onUploadProgress: r,
    onDownloadProgress: r,
    decompress: r,
    maxContentLength: r,
    maxBodyLength: r,
    beforeRedirect: r,
    transport: r,
    httpAgent: r,
    httpsAgent: r,
    cancelToken: r,
    socketPath: r,
    responseEncoding: r,
    validateStatus: a,
    headers: (c, d, f) => o(Wy(c), Wy(d), f, !0)
  };
  return ee.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
    const f = l[d] || o, p = f(e[d], t[d], d);
    ee.isUndefined(p) && f !== a || (n[d] = p);
  }), n;
}
const nS = (e) => {
  const t = Ii({}, e);
  let { data: n, withXSRFToken: s, xsrfHeaderName: o, xsrfCookieName: i, headers: r, auth: a } = t;
  t.headers = r = hs.from(r), t.url = q0(tS(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && r.set(
    "Authorization",
    "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
  );
  let l;
  if (ee.isFormData(n)) {
    if (Bn.hasStandardBrowserEnv || Bn.hasStandardBrowserWebWorkerEnv)
      r.setContentType(void 0);
    else if ((l = r.getContentType()) !== !1) {
      const [c, ...d] = l ? l.split(";").map((f) => f.trim()).filter(Boolean) : [];
      r.setContentType([c || "multipart/form-data", ...d].join("; "));
    }
  }
  if (Bn.hasStandardBrowserEnv && (s && ee.isFunction(s) && (s = s(t)), s || s !== !1 && IR(t.url))) {
    const c = o && i && RR.read(i);
    c && r.set(o, c);
  }
  return t;
}, PR = typeof XMLHttpRequest < "u", VR = PR && function(e) {
  return new Promise(function(n, s) {
    const o = nS(e);
    let i = o.data;
    const r = hs.from(o.headers).normalize();
    let { responseType: a, onUploadProgress: l, onDownloadProgress: c } = o, d, f, p, h, m;
    function v() {
      h && h(), m && m(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
    }
    let g = new XMLHttpRequest();
    g.open(o.method.toUpperCase(), o.url, !0), g.timeout = o.timeout;
    function _() {
      if (!g)
        return;
      const b = hs.from(
        "getAllResponseHeaders" in g && g.getAllResponseHeaders()
      ), w = {
        data: !a || a === "text" || a === "json" ? g.responseText : g.response,
        status: g.status,
        statusText: g.statusText,
        headers: b,
        config: e,
        request: g
      };
      eS(function(C) {
        n(C), v();
      }, function(C) {
        s(C), v();
      }, w), g = null;
    }
    "onloadend" in g ? g.onloadend = _ : g.onreadystatechange = function() {
      !g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(_);
    }, g.onabort = function() {
      g && (s(new it("Request aborted", it.ECONNABORTED, e, g)), g = null);
    }, g.onerror = function() {
      s(new it("Network Error", it.ERR_NETWORK, e, g)), g = null;
    }, g.ontimeout = function() {
      let O = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
      const w = o.transitional || J0;
      o.timeoutErrorMessage && (O = o.timeoutErrorMessage), s(new it(
        O,
        w.clarifyTimeoutError ? it.ETIMEDOUT : it.ECONNABORTED,
        e,
        g
      )), g = null;
    }, i === void 0 && r.setContentType(null), "setRequestHeader" in g && ee.forEach(r.toJSON(), function(O, w) {
      g.setRequestHeader(w, O);
    }), ee.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), a && a !== "json" && (g.responseType = o.responseType), c && ([p, m] = $d(c, !0), g.addEventListener("progress", p)), l && g.upload && ([f, h] = $d(l), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", h)), (o.cancelToken || o.signal) && (d = (b) => {
      g && (s(!b || b.type ? new Xa(null, e, g) : b), g.abort(), g = null);
    }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
    const S = $R(o.url);
    if (S && Bn.protocols.indexOf(S) === -1) {
      s(new it("Unsupported protocol " + S + ":", it.ERR_BAD_REQUEST, e));
      return;
    }
    g.send(i || null);
  });
}, LR = (e, t) => {
  const { length: n } = e = e ? e.filter(Boolean) : [];
  if (t || n) {
    let s = new AbortController(), o;
    const i = function(c) {
      if (!o) {
        o = !0, a();
        const d = c instanceof Error ? c : this.reason;
        s.abort(d instanceof it ? d : new Xa(d instanceof Error ? d.message : d));
      }
    };
    let r = t && setTimeout(() => {
      r = null, i(new it(`timeout ${t} of ms exceeded`, it.ETIMEDOUT));
    }, t);
    const a = () => {
      e && (r && clearTimeout(r), r = null, e.forEach((c) => {
        c.unsubscribe ? c.unsubscribe(i) : c.removeEventListener("abort", i);
      }), e = null);
    };
    e.forEach((c) => c.addEventListener("abort", i));
    const { signal: l } = s;
    return l.unsubscribe = () => ee.asap(a), l;
  }
}, FR = function* (e, t) {
  let n = e.byteLength;
  if (n < t) {
    yield e;
    return;
  }
  let s = 0, o;
  for (; s < n; )
    o = s + t, yield e.slice(s, o), s = o;
}, UR = async function* (e, t) {
  for await (const n of jR(e))
    yield* FR(n, t);
}, jR = async function* (e) {
  if (e[Symbol.asyncIterator]) {
    yield* e;
    return;
  }
  const t = e.getReader();
  try {
    for (; ; ) {
      const { done: n, value: s } = await t.read();
      if (n)
        break;
      yield s;
    }
  } finally {
    await t.cancel();
  }
}, Gy = (e, t, n, s) => {
  const o = UR(e, t);
  let i = 0, r, a = (l) => {
    r || (r = !0, s && s(l));
  };
  return new ReadableStream({
    async pull(l) {
      try {
        const { done: c, value: d } = await o.next();
        if (c) {
          a(), l.close();
          return;
        }
        let f = d.byteLength;
        if (n) {
          let p = i += f;
          n(p);
        }
        l.enqueue(new Uint8Array(d));
      } catch (c) {
        throw a(c), c;
      }
    },
    cancel(l) {
      return a(l), o.return();
    }
  }, {
    highWaterMark: 2
  });
}, Pf = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", sS = Pf && typeof ReadableStream == "function", BR = Pf && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), oS = (e, ...t) => {
  try {
    return !!e(...t);
  } catch {
    return !1;
  }
}, HR = sS && oS(() => {
  let e = !1;
  const t = new Request(Bn.origin, {
    body: new ReadableStream(),
    method: "POST",
    get duplex() {
      return e = !0, "half";
    }
  }).headers.has("Content-Type");
  return e && !t;
}), zy = 64 * 1024, Jh = sS && oS(() => ee.isReadableStream(new Response("").body)), kd = {
  stream: Jh && ((e) => e.body)
};
Pf && ((e) => {
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
    !kd[t] && (kd[t] = ee.isFunction(e[t]) ? (n) => n[t]() : (n, s) => {
      throw new it(`Response type '${t}' is not supported`, it.ERR_NOT_SUPPORT, s);
    });
  });
})(new Response());
const YR = async (e) => {
  if (e == null)
    return 0;
  if (ee.isBlob(e))
    return e.size;
  if (ee.isSpecCompliantForm(e))
    return (await new Request(Bn.origin, {
      method: "POST",
      body: e
    }).arrayBuffer()).byteLength;
  if (ee.isArrayBufferView(e) || ee.isArrayBuffer(e))
    return e.byteLength;
  if (ee.isURLSearchParams(e) && (e = e + ""), ee.isString(e))
    return (await BR(e)).byteLength;
}, WR = async (e, t) => {
  const n = ee.toFiniteNumber(e.getContentLength());
  return n ?? YR(t);
}, GR = Pf && (async (e) => {
  let {
    url: t,
    method: n,
    data: s,
    signal: o,
    cancelToken: i,
    timeout: r,
    onDownloadProgress: a,
    onUploadProgress: l,
    responseType: c,
    headers: d,
    withCredentials: f = "same-origin",
    fetchOptions: p
  } = nS(e);
  c = c ? (c + "").toLowerCase() : "text";
  let h = LR([o, i && i.toAbortSignal()], r), m;
  const v = h && h.unsubscribe && (() => {
    h.unsubscribe();
  });
  let g;
  try {
    if (l && HR && n !== "get" && n !== "head" && (g = await WR(d, s)) !== 0) {
      let w = new Request(t, {
        method: "POST",
        body: s,
        duplex: "half"
      }), N;
      if (ee.isFormData(s) && (N = w.headers.get("content-type")) && d.setContentType(N), w.body) {
        const [C, k] = Hy(
          g,
          $d(Yy(l))
        );
        s = Gy(w.body, zy, C, k);
      }
    }
    ee.isString(f) || (f = f ? "include" : "omit");
    const _ = "credentials" in Request.prototype;
    m = new Request(t, {
      ...p,
      signal: h,
      method: n.toUpperCase(),
      headers: d.normalize().toJSON(),
      body: s,
      duplex: "half",
      credentials: _ ? f : void 0
    });
    let S = await fetch(m, p);
    const b = Jh && (c === "stream" || c === "response");
    if (Jh && (a || b && v)) {
      const w = {};
      ["status", "statusText", "headers"].forEach((x) => {
        w[x] = S[x];
      });
      const N = ee.toFiniteNumber(S.headers.get("content-length")), [C, k] = a && Hy(
        N,
        $d(Yy(a), !0)
      ) || [];
      S = new Response(
        Gy(S.body, zy, C, () => {
          k && k(), v && v();
        }),
        w
      );
    }
    c = c || "text";
    let O = await kd[ee.findKey(kd, c) || "text"](S, e);
    return !b && v && v(), await new Promise((w, N) => {
      eS(w, N, {
        data: O,
        headers: hs.from(S.headers),
        status: S.status,
        statusText: S.statusText,
        config: e,
        request: m
      });
    });
  } catch (_) {
    throw v && v(), _ && _.name === "TypeError" && /Load failed|fetch/i.test(_.message) ? Object.assign(
      new it("Network Error", it.ERR_NETWORK, e, m),
      {
        cause: _.cause || _
      }
    ) : it.from(_, _ && _.code, e, m);
  }
}), Qh = {
  http: aR,
  xhr: VR,
  fetch: GR
};
ee.forEach(Qh, (e, t) => {
  if (e) {
    try {
      Object.defineProperty(e, "name", { value: t });
    } catch {
    }
    Object.defineProperty(e, "adapterName", { value: t });
  }
});
const Ky = (e) => `- ${e}`, zR = (e) => ee.isFunction(e) || e === null || e === !1, rS = {
  getAdapter: (e) => {
    e = ee.isArray(e) ? e : [e];
    const { length: t } = e;
    let n, s;
    const o = {};
    for (let i = 0; i < t; i++) {
      n = e[i];
      let r;
      if (s = n, !zR(n) && (s = Qh[(r = String(n)).toLowerCase()], s === void 0))
        throw new it(`Unknown adapter '${r}'`);
      if (s)
        break;
      o[r || "#" + i] = s;
    }
    if (!s) {
      const i = Object.entries(o).map(
        ([a, l]) => `adapter ${a} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
      );
      let r = t ? i.length > 1 ? `since :
` + i.map(Ky).join(`
`) : " " + Ky(i[0]) : "as no adapter specified";
      throw new it(
        "There is no suitable adapter to dispatch the request " + r,
        "ERR_NOT_SUPPORT"
      );
    }
    return s;
  },
  adapters: Qh
};
function Lp(e) {
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
    throw new Xa(null, e);
}
function Xy(e) {
  return Lp(e), e.headers = hs.from(e.headers), e.data = Vp.call(
    e,
    e.transformRequest
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), rS.getAdapter(e.adapter || Mc.adapter)(e).then(function(s) {
    return Lp(e), s.data = Vp.call(
      e,
      e.transformResponse,
      s
    ), s.headers = hs.from(s.headers), s;
  }, function(s) {
    return Z0(s) || (Lp(e), s && s.response && (s.response.data = Vp.call(
      e,
      e.transformResponse,
      s.response
    ), s.response.headers = hs.from(s.response.headers))), Promise.reject(s);
  });
}
const iS = "1.10.0", Vf = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
  Vf[e] = function(s) {
    return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
  };
});
const qy = {};
Vf.transitional = function(t, n, s) {
  function o(i, r) {
    return "[Axios v" + iS + "] Transitional option '" + i + "'" + r + (s ? ". " + s : "");
  }
  return (i, r, a) => {
    if (t === !1)
      throw new it(
        o(r, " has been removed" + (n ? " in " + n : "")),
        it.ERR_DEPRECATED
      );
    return n && !qy[r] && (qy[r] = !0, console.warn(
      o(
        r,
        " has been deprecated since v" + n + " and will be removed in the near future"
      )
    )), t ? t(i, r, a) : !0;
  };
};
Vf.spelling = function(t) {
  return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
};
function KR(e, t, n) {
  if (typeof e != "object")
    throw new it("options must be an object", it.ERR_BAD_OPTION_VALUE);
  const s = Object.keys(e);
  let o = s.length;
  for (; o-- > 0; ) {
    const i = s[o], r = t[i];
    if (r) {
      const a = e[i], l = a === void 0 || r(a, i, e);
      if (l !== !0)
        throw new it("option " + i + " must be " + l, it.ERR_BAD_OPTION_VALUE);
      continue;
    }
    if (n !== !0)
      throw new it("Unknown option " + i, it.ERR_BAD_OPTION);
  }
}
const Yu = {
  assertOptions: KR,
  validators: Vf
}, uo = Yu.validators;
let Oi = class {
  constructor(t) {
    this.defaults = t || {}, this.interceptors = {
      request: new jy(),
      response: new jy()
    };
  }
  /**
   * Dispatch a request
   *
   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
   * @param {?Object} config
   *
   * @returns {Promise} The Promise to be fulfilled
   */
  async request(t, n) {
    try {
      return await this._request(t, n);
    } catch (s) {
      if (s instanceof Error) {
        let o = {};
        Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
        const i = o.stack ? o.stack.replace(/^.+\n/, "") : "";
        try {
          s.stack ? i && !String(s.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (s.stack += `
` + i) : s.stack = i;
        } catch {
        }
      }
      throw s;
    }
  }
  _request(t, n) {
    typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Ii(this.defaults, n);
    const { transitional: s, paramsSerializer: o, headers: i } = n;
    s !== void 0 && Yu.assertOptions(s, {
      silentJSONParsing: uo.transitional(uo.boolean),
      forcedJSONParsing: uo.transitional(uo.boolean),
      clarifyTimeoutError: uo.transitional(uo.boolean)
    }, !1), o != null && (ee.isFunction(o) ? n.paramsSerializer = {
      serialize: o
    } : Yu.assertOptions(o, {
      encode: uo.function,
      serialize: uo.function
    }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Yu.assertOptions(n, {
      baseUrl: uo.spelling("baseURL"),
      withXsrfToken: uo.spelling("withXSRFToken")
    }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
    let r = i && ee.merge(
      i.common,
      i[n.method]
    );
    i && ee.forEach(
      ["delete", "get", "head", "post", "put", "patch", "common"],
      (m) => {
        delete i[m];
      }
    ), n.headers = hs.concat(r, i);
    const a = [];
    let l = !0;
    this.interceptors.request.forEach(function(v) {
      typeof v.runWhen == "function" && v.runWhen(n) === !1 || (l = l && v.synchronous, a.unshift(v.fulfilled, v.rejected));
    });
    const c = [];
    this.interceptors.response.forEach(function(v) {
      c.push(v.fulfilled, v.rejected);
    });
    let d, f = 0, p;
    if (!l) {
      const m = [Xy.bind(this), void 0];
      for (m.unshift.apply(m, a), m.push.apply(m, c), p = m.length, d = Promise.resolve(n); f < p; )
        d = d.then(m[f++], m[f++]);
      return d;
    }
    p = a.length;
    let h = n;
    for (f = 0; f < p; ) {
      const m = a[f++], v = a[f++];
      try {
        h = m(h);
      } catch (g) {
        v.call(this, g);
        break;
      }
    }
    try {
      d = Xy.call(this, h);
    } catch (m) {
      return Promise.reject(m);
    }
    for (f = 0, p = c.length; f < p; )
      d = d.then(c[f++], c[f++]);
    return d;
  }
  getUri(t) {
    t = Ii(this.defaults, t);
    const n = tS(t.baseURL, t.url, t.allowAbsoluteUrls);
    return q0(n, t.params, t.paramsSerializer);
  }
};
ee.forEach(["delete", "get", "head", "options"], function(t) {
  Oi.prototype[t] = function(n, s) {
    return this.request(Ii(s || {}, {
      method: t,
      url: n,
      data: (s || {}).data
    }));
  };
});
ee.forEach(["post", "put", "patch"], function(t) {
  function n(s) {
    return function(i, r, a) {
      return this.request(Ii(a || {}, {
        method: t,
        headers: s ? {
          "Content-Type": "multipart/form-data"
        } : {},
        url: i,
        data: r
      }));
    };
  }
  Oi.prototype[t] = n(), Oi.prototype[t + "Form"] = n(!0);
});
let XR = class aS {
  constructor(t) {
    if (typeof t != "function")
      throw new TypeError("executor must be a function.");
    let n;
    this.promise = new Promise(function(i) {
      n = i;
    });
    const s = this;
    this.promise.then((o) => {
      if (!s._listeners) return;
      let i = s._listeners.length;
      for (; i-- > 0; )
        s._listeners[i](o);
      s._listeners = null;
    }), this.promise.then = (o) => {
      let i;
      const r = new Promise((a) => {
        s.subscribe(a), i = a;
      }).then(o);
      return r.cancel = function() {
        s.unsubscribe(i);
      }, r;
    }, t(function(i, r, a) {
      s.reason || (s.reason = new Xa(i, r, a), n(s.reason));
    });
  }
  /**
   * Throws a `CanceledError` if cancellation has been requested.
   */
  throwIfRequested() {
    if (this.reason)
      throw this.reason;
  }
  /**
   * Subscribe to the cancel signal
   */
  subscribe(t) {
    if (this.reason) {
      t(this.reason);
      return;
    }
    this._listeners ? this._listeners.push(t) : this._listeners = [t];
  }
  /**
   * Unsubscribe from the cancel signal
   */
  unsubscribe(t) {
    if (!this._listeners)
      return;
    const n = this._listeners.indexOf(t);
    n !== -1 && this._listeners.splice(n, 1);
  }
  toAbortSignal() {
    const t = new AbortController(), n = (s) => {
      t.abort(s);
    };
    return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
  }
  /**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */
  static source() {
    let t;
    return {
      token: new aS(function(o) {
        t = o;
      }),
      cancel: t
    };
  }
};
function qR(e) {
  return function(n) {
    return e.apply(null, n);
  };
}
function JR(e) {
  return ee.isObject(e) && e.isAxiosError === !0;
}
const Zh = {
  Continue: 100,
  SwitchingProtocols: 101,
  Processing: 102,
  EarlyHints: 103,
  Ok: 200,
  Created: 201,
  Accepted: 202,
  NonAuthoritativeInformation: 203,
  NoContent: 204,
  ResetContent: 205,
  PartialContent: 206,
  MultiStatus: 207,
  AlreadyReported: 208,
  ImUsed: 226,
  MultipleChoices: 300,
  MovedPermanently: 301,
  Found: 302,
  SeeOther: 303,
  NotModified: 304,
  UseProxy: 305,
  Unused: 306,
  TemporaryRedirect: 307,
  PermanentRedirect: 308,
  BadRequest: 400,
  Unauthorized: 401,
  PaymentRequired: 402,
  Forbidden: 403,
  NotFound: 404,
  MethodNotAllowed: 405,
  NotAcceptable: 406,
  ProxyAuthenticationRequired: 407,
  RequestTimeout: 408,
  Conflict: 409,
  Gone: 410,
  LengthRequired: 411,
  PreconditionFailed: 412,
  PayloadTooLarge: 413,
  UriTooLong: 414,
  UnsupportedMediaType: 415,
  RangeNotSatisfiable: 416,
  ExpectationFailed: 417,
  ImATeapot: 418,
  MisdirectedRequest: 421,
  UnprocessableEntity: 422,
  Locked: 423,
  FailedDependency: 424,
  TooEarly: 425,
  UpgradeRequired: 426,
  PreconditionRequired: 428,
  TooManyRequests: 429,
  RequestHeaderFieldsTooLarge: 431,
  UnavailableForLegalReasons: 451,
  InternalServerError: 500,
  NotImplemented: 501,
  BadGateway: 502,
  ServiceUnavailable: 503,
  GatewayTimeout: 504,
  HttpVersionNotSupported: 505,
  VariantAlsoNegotiates: 506,
  InsufficientStorage: 507,
  LoopDetected: 508,
  NotExtended: 510,
  NetworkAuthenticationRequired: 511
};
Object.entries(Zh).forEach(([e, t]) => {
  Zh[t] = e;
});
function lS(e) {
  const t = new Oi(e), n = L0(Oi.prototype.request, t);
  return ee.extend(n, Oi.prototype, t, { allOwnKeys: !0 }), ee.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
    return lS(Ii(e, o));
  }, n;
}
const cn = lS(Mc);
cn.Axios = Oi;
cn.CanceledError = Xa;
cn.CancelToken = XR;
cn.isCancel = Z0;
cn.VERSION = iS;
cn.toFormData = Mf;
cn.AxiosError = it;
cn.Cancel = cn.CanceledError;
cn.all = function(t) {
  return Promise.all(t);
};
cn.spread = qR;
cn.isAxiosError = JR;
cn.mergeConfig = Ii;
cn.AxiosHeaders = hs;
cn.formToJSON = (e) => Q0(ee.isHTMLForm(e) ? new FormData(e) : e);
cn.getAdapter = rS.getAdapter;
cn.HttpStatusCode = Zh;
cn.default = cn;
const {
  Axios: Loe,
  AxiosError: QR,
  CanceledError: Foe,
  isCancel: Uoe,
  CancelToken: joe,
  VERSION: Boe,
  all: Hoe,
  Cancel: Yoe,
  isAxiosError: Woe,
  spread: Goe,
  toFormData: zoe,
  AxiosHeaders: Koe,
  HttpStatusCode: Xoe,
  formToJSON: qoe,
  getAdapter: Joe,
  mergeConfig: Qoe
} = cn, mr = () => {
  let e = "";
  return window.app_path_webroot_full ? e = `${window.app_path_webroot_full}redcap_v${window.redcap_version}/` : e = `${location.protocol}//${location.host}/api`, e;
}, vr = (e, t = [], n = {}) => {
  n = { ...{
    baseURL: e,
    timeout: 6e4
  }, ...n };
  const o = cn.create(n);
  o.interceptors.request.use(
    function(r) {
      const a = i(t);
      for (const [l, c] of Object.entries(a))
        r.params[l] = c;
      return r.headers = {
        "Content-Type": "application/json",
        "X-Requested-With": "XMLHttpRequest",
        ...r.headers
      }, r;
    },
    function(r) {
      return Promise.reject(r);
    }
  );
  function i(r = []) {
    let a = new URLSearchParams(location.search), l = {};
    for (let [c, d] of a.entries())
      r.includes(c) && (l[c] = d);
    return window.redcap_csrf_token && (l.redcap_csrf_token = window.redcap_csrf_token), l;
  }
  return o;
}, io = (e) => {
  var o, i, r, a, l;
  let t = "";
  const n = ["Something happened in setting up the request that triggered an Error"];
  if (e.response) {
    let c = `The request was made and the server responded with a status code ${e.response.status}`;
    (i = (o = e == null ? void 0 : e.response) == null ? void 0 : o.data) != null && i.message && (c += ` - ${(a = (r = e == null ? void 0 : e.response) == null ? void 0 : r.data) == null ? void 0 : a.message}`), n.push(c), t = (l = e == null ? void 0 : e.response) == null ? void 0 : l.data;
  } else e.request && (n.push("The request was made but no response was received"), t = e.request);
  return e.message && n.push(e.message), t && t !== "" && (typeof t == "string" || t instanceof String) && n.push(t), n.join(`
`);
}, Jy = Object.freeze({
  TOGGLE_READ: "toggle_read",
  DELETE: "delete",
  DELETE_SELECTED: "delete_selected",
  MARK_UNREAD_SELECTED: "mark_unread_selected",
  MARK_READ_SELECTED: "mark_read_selected"
}), ZR = mr(), Fp = vr(ZR, ["pid"]), Up = [
  { label: "1 minute", value: 1e3 * 60 },
  // 1 minute
  { label: "5 minutes", value: 1e3 * 60 * 5 },
  { label: "10 minutes", value: 1e3 * 60 * 10 }
], eA = () => {
  let e = null;
  const t = mt({
    ready: !1,
    loading: !1,
    settings: {},
    list: [],
    //parcels
    active: null,
    // active parcel
    selected: [],
    // list of selected (checked) parcels
    refreshInterval: !1,
    findParcel(n) {
      return this.list.find((o) => o.id === n);
    },
    get unread() {
      let n = 0;
      for (const s of this.list)
        (s == null ? void 0 : s.read) === !1 && n++;
      return n;
    },
    reset() {
      this.active = null, this.selected = [];
    },
    async fetchList() {
      try {
        this.loading = !0, this.reset();
        const n = {
          route: "ParcelController:list"
        }, s = await Fp.get("", { params: n, method: "GET" }), {
          data: { data: o = [], metadata: i = {} }
        } = s;
        this.list = o.map((r) => new E2(r));
      } catch (n) {
        console.log("error fetching messages", n);
      } finally {
        this.loading = !1;
      }
    },
    async fetchSettings() {
      const n = {
        route: "ParcelController:settings"
      }, s = await Fp.get("", { params: n });
      this.settings = (s == null ? void 0 : s.data) ?? {};
    },
    async sendCommand(n, s = {}) {
      const o = {
        route: "ParcelController:command"
      }, i = { action: n, args: s };
      return await Fp.post("", i, { params: o });
    },
    /**
     * send commands, but use optimistic update
     *
     * @param {String} ID
     * @returns
     */
    async deleteParcel(n) {
      const s = (a) => {
        const l = this.list.indexOf(a);
        l >= 0 && this.list.splice(l, 1);
      }, o = (a) => {
        const l = this.selected.indexOf(a);
        l < 0 || this.selected.splice(l, 1);
      }, i = (a) => {
        r === this.active && (this.active = null);
      }, r = this.findParcel(n);
      if (r)
        return o(n), i(), s(r), this.sendCommand(Jy.DELETE, { id: n });
    },
    /**
     * send commands, but use optimistic update
     *
     * @param {String} ID
     * @param {Boolean} read
     * @returns
     */
    async markParcel(n, s) {
      const o = this.findParcel(n);
      return o && (o.read = s), this.sendCommand(Jy.TOGGLE_READ, { id: n, read: s });
    },
    /**
     * toggle active parcel
     * @param {Object} parcel
     */
    toggle(n) {
      this.active === n ? this.active = null : this.active = n;
    },
    async init() {
      if (!this.ready)
        return this.ready = !0, await this.fetchSettings(), await this.fetchList(), !0;
    }
  });
  return tn(() => {
    typeof t.refreshInterval == "number" && !isNaN(t.refreshInterval) ? (e && clearInterval(e), e = setInterval(() => {
      t.fetchList();
    }, t.refreshInterval)) : clearInterval(e);
  }), t;
}, qa = ms("parcels", eA, !0), tA = { id: "post-master" }, nA = {
  __name: "App",
  setup(e) {
    const t = qa();
    return Mt(() => t.init()), (n, s) => {
      const o = be("router-view");
      return y(), E("div", tA, [
        F(o)
      ]);
    };
  }
}, he = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [s, o] of t)
    n[s] = o;
  return n;
}, sA = { class: "d-inline-block" }, oA = { class: "d-flex align-items-center" }, rA = { class: "position-relative" }, iA = ["href"], aA = {
  key: 0,
  class: "action"
}, lA = {
  key: 2,
  class: "badge bg-danger"
}, cA = {
  __name: "NotificationBadge",
  setup(e) {
    const t = qa(), n = I(() => t.loading), s = I(() => t.unread), o = I(() => {
      var r;
      return (r = t == null ? void 0 : t.settings) == null ? void 0 : r.indexURL;
    });
    Mt(() => {
      var r;
      t.init(), t.refreshInterval = (r = Up == null ? void 0 : Up[0]) == null ? void 0 : r.value;
    }), fr(() => t.refreshInterval = !1);
    function i() {
      t.fetchList();
    }
    return (r, a) => (y(), E("div", sA, [
      u("div", oA, [
        u("div", rA, [
          u("a", { href: o.value }, "Messages", 8, iA)
        ]),
        n.value ? (y(), E("span", aA, a[0] || (a[0] = [
          u("i", { class: "fa-solid fa-spinner fa-spin fa-fw" }, null, -1)
        ]))) : (y(), E("span", {
          key: 1,
          class: "action",
          onClick: i
        }, a[1] || (a[1] = [
          u("i", { class: "fas fa-sync-alt fa-fw" }, null, -1)
        ]))),
        s.value > 0 ? (y(), E("span", lA, H(s.value) + " unread", 1)) : ae("", !0)
      ])
    ]));
  }
}, uA = /* @__PURE__ */ he(cA, [["__scopeId", "data-v-0b40fdbf"]]);
function dA() {
  return cS().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
function cS() {
  return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
}
const fA = typeof Proxy == "function", pA = "devtools-plugin:setup", hA = "plugin:settings:set";
let ea, em;
function mA() {
  var e;
  return ea !== void 0 || (typeof window < "u" && window.performance ? (ea = !0, em = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ea = !0, em = globalThis.perf_hooks.performance) : ea = !1), ea;
}
function vA() {
  return mA() ? em.now() : Date.now();
}
class gA {
  constructor(t, n) {
    this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
    const s = {};
    if (t.settings)
      for (const r in t.settings) {
        const a = t.settings[r];
        s[r] = a.defaultValue;
      }
    const o = `__vue-devtools-plugin-settings__${t.id}`;
    let i = Object.assign({}, s);
    try {
      const r = localStorage.getItem(o), a = JSON.parse(r);
      Object.assign(i, a);
    } catch {
    }
    this.fallbacks = {
      getSettings() {
        return i;
      },
      setSettings(r) {
        try {
          localStorage.setItem(o, JSON.stringify(r));
        } catch {
        }
        i = r;
      },
      now() {
        return vA();
      }
    }, n && n.on(hA, (r, a) => {
      r === this.plugin.id && this.fallbacks.setSettings(a);
    }), this.proxiedOn = new Proxy({}, {
      get: (r, a) => this.target ? this.target.on[a] : (...l) => {
        this.onQueue.push({
          method: a,
          args: l
        });
      }
    }), this.proxiedTarget = new Proxy({}, {
      get: (r, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...l) => (this.targetQueue.push({
        method: a,
        args: l,
        resolve: () => {
        }
      }), this.fallbacks[a](...l)) : (...l) => new Promise((c) => {
        this.targetQueue.push({
          method: a,
          args: l,
          resolve: c
        });
      })
    });
  }
  async setRealTarget(t) {
    this.target = t;
    for (const n of this.onQueue)
      this.target.on[n.method](...n.args);
    for (const n of this.targetQueue)
      n.resolve(await this.target[n.method](...n.args));
  }
}
function Lv(e, t) {
  const n = e, s = cS(), o = dA(), i = fA && n.enableEarlyProxy;
  if (o && (s.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !i))
    o.emit(pA, e, t);
  else {
    const r = i ? new gA(n, o) : null;
    (s.__VUE_DEVTOOLS_PLUGINS__ = s.__VUE_DEVTOOLS_PLUGINS__ || []).push({
      pluginDescriptor: n,
      setupFn: t,
      proxy: r
    }), r && t(r.proxiedTarget);
  }
}
var Je = {};
const Yo = typeof document < "u";
function uS(e) {
  return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
}
function yA(e) {
  return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
  // add the Module string tag
  e.default && uS(e.default);
}
const Tt = Object.assign;
function jp(e, t) {
  const n = {};
  for (const s in t) {
    const o = t[s];
    n[s] = Es(o) ? o.map(e) : e(o);
  }
  return n;
}
const Fl = () => {
}, Es = Array.isArray;
function rt(e) {
  const t = Array.from(arguments).slice(1);
  console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
}
const dS = /#/g, _A = /&/g, bA = /\//g, EA = /=/g, SA = /\?/g, fS = /\+/g, wA = /%5B/g, NA = /%5D/g, pS = /%5E/g, OA = /%60/g, hS = /%7B/g, xA = /%7C/g, mS = /%7D/g, CA = /%20/g;
function Fv(e) {
  return encodeURI("" + e).replace(xA, "|").replace(wA, "[").replace(NA, "]");
}
function TA(e) {
  return Fv(e).replace(hS, "{").replace(mS, "}").replace(pS, "^");
}
function tm(e) {
  return Fv(e).replace(fS, "%2B").replace(CA, "+").replace(dS, "%23").replace(_A, "%26").replace(OA, "`").replace(hS, "{").replace(mS, "}").replace(pS, "^");
}
function $A(e) {
  return tm(e).replace(EA, "%3D");
}
function kA(e) {
  return Fv(e).replace(dS, "%23").replace(SA, "%3F");
}
function DA(e) {
  return e == null ? "" : kA(e).replace(bA, "%2F");
}
function Da(e) {
  try {
    return decodeURIComponent("" + e);
  } catch {
    Je.NODE_ENV !== "production" && rt(`Error decoding "${e}". Using original value`);
  }
  return "" + e;
}
const IA = /\/$/, RA = (e) => e.replace(IA, "");
function Bp(e, t, n = "/") {
  let s, o = {}, i = "", r = "";
  const a = t.indexOf("#");
  let l = t.indexOf("?");
  return a < l && a >= 0 && (l = -1), l > -1 && (s = t.slice(0, l), i = t.slice(l + 1, a > -1 ? a : t.length), o = e(i)), a > -1 && (s = s || t.slice(0, a), r = t.slice(a, t.length)), s = PA(s ?? t, n), {
    fullPath: s + (i && "?") + i + r,
    path: s,
    query: o,
    hash: Da(r)
  };
}
function AA(e, t) {
  const n = t.query ? e(t.query) : "";
  return t.path + (n && "?") + n + (t.hash || "");
}
function Qy(e, t) {
  return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
}
function Zy(e, t, n) {
  const s = t.matched.length - 1, o = n.matched.length - 1;
  return s > -1 && s === o && zr(t.matched[s], n.matched[o]) && vS(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
}
function zr(e, t) {
  return (e.aliasOf || e) === (t.aliasOf || t);
}
function vS(e, t) {
  if (Object.keys(e).length !== Object.keys(t).length)
    return !1;
  for (const n in e)
    if (!MA(e[n], t[n]))
      return !1;
  return !0;
}
function MA(e, t) {
  return Es(e) ? e_(e, t) : Es(t) ? e_(t, e) : e === t;
}
function e_(e, t) {
  return Es(t) ? e.length === t.length && e.every((n, s) => n === t[s]) : e.length === 1 && e[0] === t;
}
function PA(e, t) {
  if (e.startsWith("/"))
    return e;
  if (Je.NODE_ENV !== "production" && !t.startsWith("/"))
    return rt(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e;
  if (!e)
    return t;
  const n = t.split("/"), s = e.split("/"), o = s[s.length - 1];
  (o === ".." || o === ".") && s.push("");
  let i = n.length - 1, r, a;
  for (r = 0; r < s.length; r++)
    if (a = s[r], a !== ".")
      if (a === "..")
        i > 1 && i--;
      else
        break;
  return n.slice(0, i).join("/") + "/" + s.slice(r).join("/");
}
const _r = {
  path: "/",
  // TODO: could we use a symbol in the future?
  name: void 0,
  params: {},
  query: {},
  hash: "",
  fullPath: "/",
  matched: [],
  meta: {},
  redirectedFrom: void 0
};
var hc;
(function(e) {
  e.pop = "pop", e.push = "push";
})(hc || (hc = {}));
var Ul;
(function(e) {
  e.back = "back", e.forward = "forward", e.unknown = "";
})(Ul || (Ul = {}));
function VA(e) {
  if (!e)
    if (Yo) {
      const t = document.querySelector("base");
      e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
    } else
      e = "/";
  return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), RA(e);
}
const LA = /^[^#]+#/;
function FA(e, t) {
  return e.replace(LA, "#") + t;
}
function UA(e, t) {
  const n = document.documentElement.getBoundingClientRect(), s = e.getBoundingClientRect();
  return {
    behavior: t.behavior,
    left: s.left - n.left - (t.left || 0),
    top: s.top - n.top - (t.top || 0)
  };
}
const Lf = () => ({
  left: window.scrollX,
  top: window.scrollY
});
function jA(e) {
  let t;
  if ("el" in e) {
    const n = e.el, s = typeof n == "string" && n.startsWith("#");
    if (Je.NODE_ENV !== "production" && typeof e.el == "string" && (!s || !document.getElementById(e.el.slice(1))))
      try {
        const i = document.querySelector(e.el);
        if (s && i) {
          rt(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);
          return;
        }
      } catch {
        rt(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
        return;
      }
    const o = typeof n == "string" ? s ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
    if (!o) {
      Je.NODE_ENV !== "production" && rt(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
      return;
    }
    t = UA(o, e);
  } else
    t = e;
  "scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
}
function t_(e, t) {
  return (history.state ? history.state.position - t : -1) + e;
}
const nm = /* @__PURE__ */ new Map();
function BA(e, t) {
  nm.set(e, t);
}
function HA(e) {
  const t = nm.get(e);
  return nm.delete(e), t;
}
let YA = () => location.protocol + "//" + location.host;
function gS(e, t) {
  const { pathname: n, search: s, hash: o } = t, i = e.indexOf("#");
  if (i > -1) {
    let a = o.includes(e.slice(i)) ? e.slice(i).length : 1, l = o.slice(a);
    return l[0] !== "/" && (l = "/" + l), Qy(l, "");
  }
  return Qy(n, e) + s + o;
}
function WA(e, t, n, s) {
  let o = [], i = [], r = null;
  const a = ({ state: p }) => {
    const h = gS(e, location), m = n.value, v = t.value;
    let g = 0;
    if (p) {
      if (n.value = h, t.value = p, r && r === m) {
        r = null;
        return;
      }
      g = v ? p.position - v.position : 0;
    } else
      s(h);
    o.forEach((_) => {
      _(n.value, m, {
        delta: g,
        type: hc.pop,
        direction: g ? g > 0 ? Ul.forward : Ul.back : Ul.unknown
      });
    });
  };
  function l() {
    r = n.value;
  }
  function c(p) {
    o.push(p);
    const h = () => {
      const m = o.indexOf(p);
      m > -1 && o.splice(m, 1);
    };
    return i.push(h), h;
  }
  function d() {
    const { history: p } = window;
    p.state && p.replaceState(Tt({}, p.state, { scroll: Lf() }), "");
  }
  function f() {
    for (const p of i)
      p();
    i = [], window.removeEventListener("popstate", a), window.removeEventListener("beforeunload", d);
  }
  return window.addEventListener("popstate", a), window.addEventListener("beforeunload", d, {
    passive: !0
  }), {
    pauseListeners: l,
    listen: c,
    destroy: f
  };
}
function n_(e, t, n, s = !1, o = !1) {
  return {
    back: e,
    current: t,
    forward: n,
    replaced: s,
    position: window.history.length,
    scroll: o ? Lf() : null
  };
}
function GA(e) {
  const { history: t, location: n } = window, s = {
    value: gS(e, n)
  }, o = { value: t.state };
  o.value || i(s.value, {
    back: null,
    current: s.value,
    forward: null,
    // the length is off by one, we need to decrease it
    position: t.length - 1,
    replaced: !0,
    // don't add a scroll as the user may have an anchor, and we want
    // scrollBehavior to be triggered without a saved position
    scroll: null
  }, !0);
  function i(l, c, d) {
    const f = e.indexOf("#"), p = f > -1 ? (n.host && document.querySelector("base") ? e : e.slice(f)) + l : YA() + e + l;
    try {
      t[d ? "replaceState" : "pushState"](c, "", p), o.value = c;
    } catch (h) {
      Je.NODE_ENV !== "production" ? rt("Error with push/replace State", h) : console.error(h), n[d ? "replace" : "assign"](p);
    }
  }
  function r(l, c) {
    const d = Tt({}, t.state, n_(
      o.value.back,
      // keep back and forward entries but override current position
      l,
      o.value.forward,
      !0
    ), c, { position: o.value.position });
    i(l, d, !0), s.value = l;
  }
  function a(l, c) {
    const d = Tt(
      {},
      // use current history state to gracefully handle a wrong call to
      // history.replaceState
      // https://github.com/vuejs/router/issues/366
      o.value,
      t.state,
      {
        forward: l,
        scroll: Lf()
      }
    );
    Je.NODE_ENV !== "production" && !t.state && rt(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:

history.replaceState(history.state, '', url)

You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), i(d.current, d, !0);
    const f = Tt({}, n_(s.value, l, null), { position: d.position + 1 }, c);
    i(l, f, !1), s.value = l;
  }
  return {
    location: s,
    state: o,
    push: a,
    replace: r
  };
}
function zA(e) {
  e = VA(e);
  const t = GA(e), n = WA(e, t.state, t.location, t.replace);
  function s(i, r = !0) {
    r || n.pauseListeners(), history.go(i);
  }
  const o = Tt({
    // it's overridden right after
    location: "",
    base: e,
    go: s,
    createHref: FA.bind(null, e)
  }, t, n);
  return Object.defineProperty(o, "location", {
    enumerable: !0,
    get: () => t.location.value
  }), Object.defineProperty(o, "state", {
    enumerable: !0,
    get: () => t.state.value
  }), o;
}
function Ja(e) {
  return e = location.host ? e || location.pathname + location.search : "", e.includes("#") || (e += "#"), Je.NODE_ENV !== "production" && !e.endsWith("#/") && !e.endsWith("#") && rt(`A hash base must end with a "#":
"${e}" should be "${e.replace(/#.*$/, "#")}".`), zA(e);
}
function Dd(e) {
  return typeof e == "string" || e && typeof e == "object";
}
function yS(e) {
  return typeof e == "string" || typeof e == "symbol";
}
const sm = Symbol(Je.NODE_ENV !== "production" ? "navigation failure" : "");
var s_;
(function(e) {
  e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
})(s_ || (s_ = {}));
const KA = {
  1({ location: e, currentLocation: t }) {
    return `No match for
 ${JSON.stringify(e)}${t ? `
while being at
` + JSON.stringify(t) : ""}`;
  },
  2({ from: e, to: t }) {
    return `Redirected from "${e.fullPath}" to "${qA(t)}" via a navigation guard.`;
  },
  4({ from: e, to: t }) {
    return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
  },
  8({ from: e, to: t }) {
    return `Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`;
  },
  16({ from: e, to: t }) {
    return `Avoided redundant navigation to current location: "${e.fullPath}".`;
  }
};
function Ia(e, t) {
  return Je.NODE_ENV !== "production" ? Tt(new Error(KA[e](t)), {
    type: e,
    [sm]: !0
  }, t) : Tt(new Error(), {
    type: e,
    [sm]: !0
  }, t);
}
function Vo(e, t) {
  return e instanceof Error && sm in e && (t == null || !!(e.type & t));
}
const XA = ["params", "query", "hash"];
function qA(e) {
  if (typeof e == "string")
    return e;
  if (e.path != null)
    return e.path;
  const t = {};
  for (const n of XA)
    n in e && (t[n] = e[n]);
  return JSON.stringify(t, null, 2);
}
const o_ = "[^/]+?", JA = {
  sensitive: !1,
  strict: !1,
  start: !0,
  end: !0
}, QA = /[.+*?^${}()[\]/\\]/g;
function ZA(e, t) {
  const n = Tt({}, JA, t), s = [];
  let o = n.start ? "^" : "";
  const i = [];
  for (const c of e) {
    const d = c.length ? [] : [
      90
      /* PathScore.Root */
    ];
    n.strict && !c.length && (o += "/");
    for (let f = 0; f < c.length; f++) {
      const p = c[f];
      let h = 40 + (n.sensitive ? 0.25 : 0);
      if (p.type === 0)
        f || (o += "/"), o += p.value.replace(QA, "\\$&"), h += 40;
      else if (p.type === 1) {
        const { value: m, repeatable: v, optional: g, regexp: _ } = p;
        i.push({
          name: m,
          repeatable: v,
          optional: g
        });
        const S = _ || o_;
        if (S !== o_) {
          h += 10;
          try {
            new RegExp(`(${S})`);
          } catch (O) {
            throw new Error(`Invalid custom RegExp for param "${m}" (${S}): ` + O.message);
          }
        }
        let b = v ? `((?:${S})(?:/(?:${S}))*)` : `(${S})`;
        f || (b = // avoid an optional / if there are more segments e.g. /:p?-static
        // or /:p?-:p2
        g && c.length < 2 ? `(?:/${b})` : "/" + b), g && (b += "?"), o += b, h += 20, g && (h += -8), v && (h += -20), S === ".*" && (h += -50);
      }
      d.push(h);
    }
    s.push(d);
  }
  if (n.strict && n.end) {
    const c = s.length - 1;
    s[c][s[c].length - 1] += 0.7000000000000001;
  }
  n.strict || (o += "/?"), n.end ? o += "$" : n.strict && !o.endsWith("/") && (o += "(?:/|$)");
  const r = new RegExp(o, n.sensitive ? "" : "i");
  function a(c) {
    const d = c.match(r), f = {};
    if (!d)
      return null;
    for (let p = 1; p < d.length; p++) {
      const h = d[p] || "", m = i[p - 1];
      f[m.name] = h && m.repeatable ? h.split("/") : h;
    }
    return f;
  }
  function l(c) {
    let d = "", f = !1;
    for (const p of e) {
      (!f || !d.endsWith("/")) && (d += "/"), f = !1;
      for (const h of p)
        if (h.type === 0)
          d += h.value;
        else if (h.type === 1) {
          const { value: m, repeatable: v, optional: g } = h, _ = m in c ? c[m] : "";
          if (Es(_) && !v)
            throw new Error(`Provided param "${m}" is an array but it is not repeatable (* or + modifiers)`);
          const S = Es(_) ? _.join("/") : _;
          if (!S)
            if (g)
              p.length < 2 && (d.endsWith("/") ? d = d.slice(0, -1) : f = !0);
            else
              throw new Error(`Missing required param "${m}"`);
          d += S;
        }
    }
    return d || "/";
  }
  return {
    re: r,
    score: s,
    keys: i,
    parse: a,
    stringify: l
  };
}
function eM(e, t) {
  let n = 0;
  for (; n < e.length && n < t.length; ) {
    const s = t[n] - e[n];
    if (s)
      return s;
    n++;
  }
  return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
}
function _S(e, t) {
  let n = 0;
  const s = e.score, o = t.score;
  for (; n < s.length && n < o.length; ) {
    const i = eM(s[n], o[n]);
    if (i)
      return i;
    n++;
  }
  if (Math.abs(o.length - s.length) === 1) {
    if (r_(s))
      return 1;
    if (r_(o))
      return -1;
  }
  return o.length - s.length;
}
function r_(e) {
  const t = e[e.length - 1];
  return e.length > 0 && t[t.length - 1] < 0;
}
const tM = {
  type: 0,
  value: ""
}, nM = /[a-zA-Z0-9_]/;
function sM(e) {
  if (!e)
    return [[]];
  if (e === "/")
    return [[tM]];
  if (!e.startsWith("/"))
    throw new Error(Je.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
  function t(h) {
    throw new Error(`ERR (${n})/"${c}": ${h}`);
  }
  let n = 0, s = n;
  const o = [];
  let i;
  function r() {
    i && o.push(i), i = [];
  }
  let a = 0, l, c = "", d = "";
  function f() {
    c && (n === 0 ? i.push({
      type: 0,
      value: c
    }) : n === 1 || n === 2 || n === 3 ? (i.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`), i.push({
      type: 1,
      value: c,
      regexp: d,
      repeatable: l === "*" || l === "+",
      optional: l === "*" || l === "?"
    })) : t("Invalid state to consume buffer"), c = "");
  }
  function p() {
    c += l;
  }
  for (; a < e.length; ) {
    if (l = e[a++], l === "\\" && n !== 2) {
      s = n, n = 4;
      continue;
    }
    switch (n) {
      case 0:
        l === "/" ? (c && f(), r()) : l === ":" ? (f(), n = 1) : p();
        break;
      case 4:
        p(), n = s;
        break;
      case 1:
        l === "(" ? n = 2 : nM.test(l) ? p() : (f(), n = 0, l !== "*" && l !== "?" && l !== "+" && a--);
        break;
      case 2:
        l === ")" ? d[d.length - 1] == "\\" ? d = d.slice(0, -1) + l : n = 3 : d += l;
        break;
      case 3:
        f(), n = 0, l !== "*" && l !== "?" && l !== "+" && a--, d = "";
        break;
      default:
        t("Unknown state");
        break;
    }
  }
  return n === 2 && t(`Unfinished custom RegExp for param "${c}"`), f(), r(), o;
}
function oM(e, t, n) {
  const s = ZA(sM(e.path), n);
  if (Je.NODE_ENV !== "production") {
    const i = /* @__PURE__ */ new Set();
    for (const r of s.keys)
      i.has(r.name) && rt(`Found duplicated params with name "${r.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), i.add(r.name);
  }
  const o = Tt(s, {
    record: e,
    parent: t,
    // these needs to be populated by the parent
    children: [],
    alias: []
  });
  return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
}
function rM(e, t) {
  const n = [], s = /* @__PURE__ */ new Map();
  t = c_({ strict: !1, end: !0, sensitive: !1 }, t);
  function o(f) {
    return s.get(f);
  }
  function i(f, p, h) {
    const m = !h, v = a_(f);
    Je.NODE_ENV !== "production" && cM(v, p), v.aliasOf = h && h.record;
    const g = c_(t, f), _ = [v];
    if ("alias" in f) {
      const O = typeof f.alias == "string" ? [f.alias] : f.alias;
      for (const w of O)
        _.push(
          // we need to normalize again to ensure the `mods` property
          // being non enumerable
          a_(Tt({}, v, {
            // this allows us to hold a copy of the `components` option
            // so that async components cache is hold on the original record
            components: h ? h.record.components : v.components,
            path: w,
            // we might be the child of an alias
            aliasOf: h ? h.record : v
            // the aliases are always of the same kind as the original since they
            // are defined on the same record
          }))
        );
    }
    let S, b;
    for (const O of _) {
      const { path: w } = O;
      if (p && w[0] !== "/") {
        const N = p.record.path, C = N[N.length - 1] === "/" ? "" : "/";
        O.path = p.record.path + (w && C + w);
      }
      if (Je.NODE_ENV !== "production" && O.path === "*")
        throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
      if (S = oM(O, p, g), Je.NODE_ENV !== "production" && p && w[0] === "/" && dM(S, p), h ? (h.alias.push(S), Je.NODE_ENV !== "production" && lM(h, S)) : (b = b || S, b !== S && b.alias.push(S), m && f.name && !l_(S) && (Je.NODE_ENV !== "production" && uM(f, p), r(f.name))), bS(S) && l(S), v.children) {
        const N = v.children;
        for (let C = 0; C < N.length; C++)
          i(N[C], S, h && h.children[C]);
      }
      h = h || S;
    }
    return b ? () => {
      r(b);
    } : Fl;
  }
  function r(f) {
    if (yS(f)) {
      const p = s.get(f);
      p && (s.delete(f), n.splice(n.indexOf(p), 1), p.children.forEach(r), p.alias.forEach(r));
    } else {
      const p = n.indexOf(f);
      p > -1 && (n.splice(p, 1), f.record.name && s.delete(f.record.name), f.children.forEach(r), f.alias.forEach(r));
    }
  }
  function a() {
    return n;
  }
  function l(f) {
    const p = fM(f, n);
    n.splice(p, 0, f), f.record.name && !l_(f) && s.set(f.record.name, f);
  }
  function c(f, p) {
    let h, m = {}, v, g;
    if ("name" in f && f.name) {
      if (h = s.get(f.name), !h)
        throw Ia(1, {
          location: f
        });
      if (Je.NODE_ENV !== "production") {
        const b = Object.keys(f.params || {}).filter((O) => !h.keys.find((w) => w.name === O));
        b.length && rt(`Discarded invalid param(s) "${b.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
      }
      g = h.record.name, m = Tt(
        // paramsFromLocation is a new object
        i_(
          p.params,
          // only keep params that exist in the resolved location
          // only keep optional params coming from a parent record
          h.keys.filter((b) => !b.optional).concat(h.parent ? h.parent.keys.filter((b) => b.optional) : []).map((b) => b.name)
        ),
        // discard any existing params in the current location that do not exist here
        // #1497 this ensures better active/exact matching
        f.params && i_(f.params, h.keys.map((b) => b.name))
      ), v = h.stringify(m);
    } else if (f.path != null)
      v = f.path, Je.NODE_ENV !== "production" && !v.startsWith("/") && rt(`The Matcher cannot resolve relative paths but received "${v}". Unless you directly called \`matcher.resolve("${v}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), h = n.find((b) => b.re.test(v)), h && (m = h.parse(v), g = h.record.name);
    else {
      if (h = p.name ? s.get(p.name) : n.find((b) => b.re.test(p.path)), !h)
        throw Ia(1, {
          location: f,
          currentLocation: p
        });
      g = h.record.name, m = Tt({}, p.params, f.params), v = h.stringify(m);
    }
    const _ = [];
    let S = h;
    for (; S; )
      _.unshift(S.record), S = S.parent;
    return {
      name: g,
      path: v,
      params: m,
      matched: _,
      meta: aM(_)
    };
  }
  e.forEach((f) => i(f));
  function d() {
    n.length = 0, s.clear();
  }
  return {
    addRoute: i,
    resolve: c,
    removeRoute: r,
    clearRoutes: d,
    getRoutes: a,
    getRecordMatcher: o
  };
}
function i_(e, t) {
  const n = {};
  for (const s of t)
    s in e && (n[s] = e[s]);
  return n;
}
function a_(e) {
  const t = {
    path: e.path,
    redirect: e.redirect,
    name: e.name,
    meta: e.meta || {},
    aliasOf: e.aliasOf,
    beforeEnter: e.beforeEnter,
    props: iM(e),
    children: e.children || [],
    instances: {},
    leaveGuards: /* @__PURE__ */ new Set(),
    updateGuards: /* @__PURE__ */ new Set(),
    enterCallbacks: {},
    // must be declared afterwards
    // mods: {},
    components: "components" in e ? e.components || null : e.component && { default: e.component }
  };
  return Object.defineProperty(t, "mods", {
    value: {}
  }), t;
}
function iM(e) {
  const t = {}, n = e.props || !1;
  if ("component" in e)
    t.default = n;
  else
    for (const s in e.components)
      t[s] = typeof n == "object" ? n[s] : n;
  return t;
}
function l_(e) {
  for (; e; ) {
    if (e.record.aliasOf)
      return !0;
    e = e.parent;
  }
  return !1;
}
function aM(e) {
  return e.reduce((t, n) => Tt(t, n.meta), {});
}
function c_(e, t) {
  const n = {};
  for (const s in e)
    n[s] = s in t ? t[s] : e[s];
  return n;
}
function om(e, t) {
  return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
}
function lM(e, t) {
  for (const n of e.keys)
    if (!n.optional && !t.keys.find(om.bind(null, n)))
      return rt(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
  for (const n of t.keys)
    if (!n.optional && !e.keys.find(om.bind(null, n)))
      return rt(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
}
function cM(e, t) {
  t && t.record.name && !e.name && !e.path && rt(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
}
function uM(e, t) {
  for (let n = t; n; n = n.parent)
    if (n.record.name === e.name)
      throw new Error(`A route named "${String(e.name)}" has been added as a ${t === n ? "child" : "descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);
}
function dM(e, t) {
  for (const n of t.keys)
    if (!e.keys.find(om.bind(null, n)))
      return rt(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
}
function fM(e, t) {
  let n = 0, s = t.length;
  for (; n !== s; ) {
    const i = n + s >> 1;
    _S(e, t[i]) < 0 ? s = i : n = i + 1;
  }
  const o = pM(e);
  return o && (s = t.lastIndexOf(o, s - 1), Je.NODE_ENV !== "production" && s < 0 && rt(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), s;
}
function pM(e) {
  let t = e;
  for (; t = t.parent; )
    if (bS(t) && _S(e, t) === 0)
      return t;
}
function bS({ record: e }) {
  return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
}
function hM(e) {
  const t = {};
  if (e === "" || e === "?")
    return t;
  const s = (e[0] === "?" ? e.slice(1) : e).split("&");
  for (let o = 0; o < s.length; ++o) {
    const i = s[o].replace(fS, " "), r = i.indexOf("="), a = Da(r < 0 ? i : i.slice(0, r)), l = r < 0 ? null : Da(i.slice(r + 1));
    if (a in t) {
      let c = t[a];
      Es(c) || (c = t[a] = [c]), c.push(l);
    } else
      t[a] = l;
  }
  return t;
}
function u_(e) {
  let t = "";
  for (let n in e) {
    const s = e[n];
    if (n = $A(n), s == null) {
      s !== void 0 && (t += (t.length ? "&" : "") + n);
      continue;
    }
    (Es(s) ? s.map((i) => i && tm(i)) : [s && tm(s)]).forEach((i) => {
      i !== void 0 && (t += (t.length ? "&" : "") + n, i != null && (t += "=" + i));
    });
  }
  return t;
}
function mM(e) {
  const t = {};
  for (const n in e) {
    const s = e[n];
    s !== void 0 && (t[n] = Es(s) ? s.map((o) => o == null ? null : "" + o) : s == null ? s : "" + s);
  }
  return t;
}
const ES = Symbol(Je.NODE_ENV !== "production" ? "router view location matched" : ""), d_ = Symbol(Je.NODE_ENV !== "production" ? "router view depth" : ""), Ff = Symbol(Je.NODE_ENV !== "production" ? "router" : ""), Uv = Symbol(Je.NODE_ENV !== "production" ? "route location" : ""), rm = Symbol(Je.NODE_ENV !== "production" ? "router view location" : "");
function fl() {
  let e = [];
  function t(s) {
    return e.push(s), () => {
      const o = e.indexOf(s);
      o > -1 && e.splice(o, 1);
    };
  }
  function n() {
    e = [];
  }
  return {
    add: t,
    list: () => e.slice(),
    reset: n
  };
}
function vM(e, t, n) {
  const s = () => {
    e[t].delete(n);
  };
  fr(s), ev(s), Zm(() => {
    e[t].add(n);
  }), e[t].add(n);
}
function gM(e) {
  if (Je.NODE_ENV !== "production" && !un()) {
    rt("getCurrentInstance() returned null. onBeforeRouteLeave() must be called at the top of a setup function");
    return;
  }
  const t = Ie(
    ES,
    // to avoid warning
    {}
  ).value;
  if (!t) {
    Je.NODE_ENV !== "production" && rt("No active route record was found when calling `onBeforeRouteLeave()`. Make sure you call this function inside a component child of <router-view>. Maybe you called it inside of App.vue?");
    return;
  }
  vM(t, "leaveGuards", e);
}
function xr(e, t, n, s, o, i = (r) => r()) {
  const r = s && // name is defined if record is because of the function overload
  (s.enterCallbacks[o] = s.enterCallbacks[o] || []);
  return () => new Promise((a, l) => {
    const c = (p) => {
      p === !1 ? l(Ia(4, {
        from: n,
        to: t
      })) : p instanceof Error ? l(p) : Dd(p) ? l(Ia(2, {
        from: t,
        to: p
      })) : (r && // since enterCallbackArray is truthy, both record and name also are
      s.enterCallbacks[o] === r && typeof p == "function" && r.push(p), a());
    }, d = i(() => e.call(s && s.instances[o], t, n, Je.NODE_ENV !== "production" ? yM(c, t, n) : c));
    let f = Promise.resolve(d);
    if (e.length < 3 && (f = f.then(c)), Je.NODE_ENV !== "production" && e.length > 2) {
      const p = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
${e.toString()}
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
      if (typeof d == "object" && "then" in d)
        f = f.then((h) => c._called ? h : (rt(p), Promise.reject(new Error("Invalid navigation guard"))));
      else if (d !== void 0 && !c._called) {
        rt(p), l(new Error("Invalid navigation guard"));
        return;
      }
    }
    f.catch((p) => l(p));
  });
}
function yM(e, t, n) {
  let s = 0;
  return function() {
    s++ === 1 && rt(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, s === 1 && e.apply(null, arguments);
  };
}
function Hp(e, t, n, s, o = (i) => i()) {
  const i = [];
  for (const r of e) {
    Je.NODE_ENV !== "production" && !r.components && !r.children.length && rt(`Record with path "${r.path}" is either missing a "component(s)" or "children" property.`);
    for (const a in r.components) {
      let l = r.components[a];
      if (Je.NODE_ENV !== "production") {
        if (!l || typeof l != "object" && typeof l != "function")
          throw rt(`Component "${a}" in record with path "${r.path}" is not a valid component. Received "${String(l)}".`), new Error("Invalid route component");
        if ("then" in l) {
          rt(`Component "${a}" in record with path "${r.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
          const c = l;
          l = () => c;
        } else l.__asyncLoader && // warn only once per component
        !l.__warnedDefineAsync && (l.__warnedDefineAsync = !0, rt(`Component "${a}" in record with path "${r.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
      }
      if (!(t !== "beforeRouteEnter" && !r.instances[a]))
        if (uS(l)) {
          const d = (l.__vccOpts || l)[t];
          d && i.push(xr(d, n, s, r, a, o));
        } else {
          let c = l();
          Je.NODE_ENV !== "production" && !("catch" in c) && (rt(`Component "${a}" in record with path "${r.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), c = Promise.resolve(c)), i.push(() => c.then((d) => {
            if (!d)
              throw new Error(`Couldn't resolve component "${a}" at "${r.path}"`);
            const f = yA(d) ? d.default : d;
            r.mods[a] = d, r.components[a] = f;
            const h = (f.__vccOpts || f)[t];
            return h && xr(h, n, s, r, a, o)();
          }));
        }
    }
  }
  return i;
}
function im(e) {
  const t = Ie(Ff), n = Ie(Uv);
  let s = !1, o = null;
  const i = I(() => {
    const d = T(e.to);
    return Je.NODE_ENV !== "production" && (!s || d !== o) && (Dd(d) || (s ? rt(`Invalid value for prop "to" in useLink()
- to:`, d, `
- previous to:`, o, `
- props:`, e) : rt(`Invalid value for prop "to" in useLink()
- to:`, d, `
- props:`, e)), o = d, s = !0), t.resolve(d);
  }), r = I(() => {
    const { matched: d } = i.value, { length: f } = d, p = d[f - 1], h = n.matched;
    if (!p || !h.length)
      return -1;
    const m = h.findIndex(zr.bind(null, p));
    if (m > -1)
      return m;
    const v = f_(d[f - 2]);
    return (
      // we are dealing with nested routes
      f > 1 && // if the parent and matched route have the same path, this link is
      // referring to the empty child. Or we currently are on a different
      // child of the same parent
      f_(p) === v && // avoid comparing the child with its parent
      h[h.length - 1].path !== v ? h.findIndex(zr.bind(null, d[f - 2])) : m
    );
  }), a = I(() => r.value > -1 && SM(n.params, i.value.params)), l = I(() => r.value > -1 && r.value === n.matched.length - 1 && vS(n.params, i.value.params));
  function c(d = {}) {
    if (EM(d)) {
      const f = t[T(e.replace) ? "replace" : "push"](
        T(e.to)
        // avoid uncaught errors are they are logged anyway
      ).catch(Fl);
      return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => f), f;
    }
    return Promise.resolve();
  }
  if (Je.NODE_ENV !== "production" && Yo) {
    const d = un();
    if (d) {
      const f = {
        route: i.value,
        isActive: a.value,
        isExactActive: l.value,
        error: null
      };
      d.__vrl_devtools = d.__vrl_devtools || [], d.__vrl_devtools.push(f), tn(() => {
        f.route = i.value, f.isActive = a.value, f.isExactActive = l.value, f.error = Dd(T(e.to)) ? null : 'Invalid "to" value';
      }, { flush: "post" });
    }
  }
  return {
    route: i,
    href: I(() => i.value.href),
    isActive: a,
    isExactActive: l,
    navigate: c
  };
}
function _M(e) {
  return e.length === 1 ? e[0] : e;
}
const bM = /* @__PURE__ */ Cn({
  name: "RouterLink",
  compatConfig: { MODE: 3 },
  props: {
    to: {
      type: [String, Object],
      required: !0
    },
    replace: Boolean,
    activeClass: String,
    // inactiveClass: String,
    exactActiveClass: String,
    custom: Boolean,
    ariaCurrentValue: {
      type: String,
      default: "page"
    }
  },
  useLink: im,
  setup(e, { slots: t }) {
    const n = mt(im(e)), { options: s } = Ie(Ff), o = I(() => ({
      [p_(e.activeClass, s.linkActiveClass, "router-link-active")]: n.isActive,
      // [getLinkClass(
      //   props.inactiveClass,
      //   options.linkInactiveClass,
      //   'router-link-inactive'
      // )]: !link.isExactActive,
      [p_(e.exactActiveClass, s.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
    }));
    return () => {
      const i = t.default && _M(t.default(n));
      return e.custom ? i : yo("a", {
        "aria-current": n.isExactActive ? e.ariaCurrentValue : null,
        href: n.href,
        // this would override user added attrs but Vue will still add
        // the listener, so we end up triggering both
        onClick: n.navigate,
        class: o.value
      }, i);
    };
  }
}), Ra = bM;
function EM(e) {
  if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
    if (e.currentTarget && e.currentTarget.getAttribute) {
      const t = e.currentTarget.getAttribute("target");
      if (/\b_blank\b/i.test(t))
        return;
    }
    return e.preventDefault && e.preventDefault(), !0;
  }
}
function SM(e, t) {
  for (const n in t) {
    const s = t[n], o = e[n];
    if (typeof s == "string") {
      if (s !== o)
        return !1;
    } else if (!Es(o) || o.length !== s.length || s.some((i, r) => i !== o[r]))
      return !1;
  }
  return !0;
}
function f_(e) {
  return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
}
const p_ = (e, t, n) => e ?? t ?? n, wM = /* @__PURE__ */ Cn({
  name: "RouterView",
  // #674 we manually inherit them
  inheritAttrs: !1,
  props: {
    name: {
      type: String,
      default: "default"
    },
    route: Object
  },
  // Better compat for @vue/compat users
  // https://github.com/vuejs/router/issues/1315
  compatConfig: { MODE: 3 },
  setup(e, { attrs: t, slots: n }) {
    Je.NODE_ENV !== "production" && OM();
    const s = Ie(rm), o = I(() => e.route || s.value), i = Ie(d_, 0), r = I(() => {
      let c = T(i);
      const { matched: d } = o.value;
      let f;
      for (; (f = d[c]) && !f.components; )
        c++;
      return c;
    }), a = I(() => o.value.matched[r.value]);
    wn(d_, I(() => r.value + 1)), wn(ES, a), wn(rm, o);
    const l = L();
    return ht(() => [l.value, a.value, e.name], ([c, d, f], [p, h, m]) => {
      d && (d.instances[f] = c, h && h !== d && c && c === p && (d.leaveGuards.size || (d.leaveGuards = h.leaveGuards), d.updateGuards.size || (d.updateGuards = h.updateGuards))), c && d && // if there is no instance but to and from are the same this might be
      // the first visit
      (!h || !zr(d, h) || !p) && (d.enterCallbacks[f] || []).forEach((v) => v(c));
    }, { flush: "post" }), () => {
      const c = o.value, d = e.name, f = a.value, p = f && f.components[d];
      if (!p)
        return h_(n.default, { Component: p, route: c });
      const h = f.props[d], m = h ? h === !0 ? c.params : typeof h == "function" ? h(c) : h : null, g = yo(p, Tt({}, m, t, {
        onVnodeUnmounted: (_) => {
          _.component.isUnmounted && (f.instances[d] = null);
        },
        ref: l
      }));
      if (Je.NODE_ENV !== "production" && Yo && g.ref) {
        const _ = {
          depth: r.value,
          name: f.name,
          path: f.path,
          meta: f.meta
        };
        (Es(g.ref) ? g.ref.map((b) => b.i) : [g.ref.i]).forEach((b) => {
          b.__vrv_devtools = _;
        });
      }
      return (
        // pass the vnode to the slot as a prop.
        // h and <component :is="..."> both accept vnodes
        h_(n.default, { Component: g, route: c }) || g
      );
    };
  }
});
function h_(e, t) {
  if (!e)
    return null;
  const n = e(t);
  return n.length === 1 ? n[0] : n;
}
const NM = wM;
function OM() {
  const e = un(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
  if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
    const s = t === "KeepAlive" ? "keep-alive" : "transition";
    rt(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
Use slot props instead:

<router-view v-slot="{ Component }">
  <${s}>
    <component :is="Component" />
  </${s}>
</router-view>`);
  }
}
function pl(e, t) {
  const n = Tt({}, e, {
    // remove variables that can contain vue instances
    matched: e.matched.map((s) => PM(s, ["instances", "children", "aliasOf"]))
  });
  return {
    _custom: {
      type: null,
      readOnly: !0,
      display: e.fullPath,
      tooltip: t,
      value: n
    }
  };
}
function du(e) {
  return {
    _custom: {
      display: e
    }
  };
}
let xM = 0;
function CM(e, t, n) {
  if (t.__hasDevtools)
    return;
  t.__hasDevtools = !0;
  const s = xM++;
  Lv({
    id: "org.vuejs.router" + (s ? "." + s : ""),
    label: "Vue Router",
    packageName: "vue-router",
    homepage: "https://router.vuejs.org",
    logo: "https://router.vuejs.org/logo.png",
    componentStateTypes: ["Routing"],
    app: e
  }, (o) => {
    typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((d, f) => {
      d.instanceData && d.instanceData.state.push({
        type: "Routing",
        key: "$route",
        editable: !1,
        value: pl(t.currentRoute.value, "Current Route")
      });
    }), o.on.visitComponentTree(({ treeNode: d, componentInstance: f }) => {
      if (f.__vrv_devtools) {
        const p = f.__vrv_devtools;
        d.tags.push({
          label: (p.name ? `${p.name.toString()}: ` : "") + p.path,
          textColor: 0,
          tooltip: "This component is rendered by &lt;router-view&gt;",
          backgroundColor: SS
        });
      }
      Es(f.__vrl_devtools) && (f.__devtoolsApi = o, f.__vrl_devtools.forEach((p) => {
        let h = p.route.path, m = OS, v = "", g = 0;
        p.error ? (h = p.error, m = IM, g = RM) : p.isExactActive ? (m = NS, v = "This is exactly active") : p.isActive && (m = wS, v = "This link is active"), d.tags.push({
          label: h,
          textColor: g,
          tooltip: v,
          backgroundColor: m
        });
      }));
    }), ht(t.currentRoute, () => {
      l(), o.notifyComponentUpdate(), o.sendInspectorTree(a), o.sendInspectorState(a);
    });
    const i = "router:navigations:" + s;
    o.addTimelineLayer({
      id: i,
      label: `Router${s ? " " + s : ""} Navigations`,
      color: 4237508
    }), t.onError((d, f) => {
      o.addTimelineEvent({
        layerId: i,
        event: {
          title: "Error during Navigation",
          subtitle: f.fullPath,
          logType: "error",
          time: o.now(),
          data: { error: d },
          groupId: f.meta.__navigationId
        }
      });
    });
    let r = 0;
    t.beforeEach((d, f) => {
      const p = {
        guard: du("beforeEach"),
        from: pl(f, "Current Location during this navigation"),
        to: pl(d, "Target location")
      };
      Object.defineProperty(d.meta, "__navigationId", {
        value: r++
      }), o.addTimelineEvent({
        layerId: i,
        event: {
          time: o.now(),
          title: "Start of navigation",
          subtitle: d.fullPath,
          data: p,
          groupId: d.meta.__navigationId
        }
      });
    }), t.afterEach((d, f, p) => {
      const h = {
        guard: du("afterEach")
      };
      p ? (h.failure = {
        _custom: {
          type: Error,
          readOnly: !0,
          display: p ? p.message : "",
          tooltip: "Navigation Failure",
          value: p
        }
      }, h.status = du("❌")) : h.status = du("✅"), h.from = pl(f, "Current Location during this navigation"), h.to = pl(d, "Target location"), o.addTimelineEvent({
        layerId: i,
        event: {
          title: "End of navigation",
          subtitle: d.fullPath,
          time: o.now(),
          data: h,
          logType: p ? "warning" : "default",
          groupId: d.meta.__navigationId
        }
      });
    });
    const a = "router-inspector:" + s;
    o.addInspector({
      id: a,
      label: "Routes" + (s ? " " + s : ""),
      icon: "book",
      treeFilterPlaceholder: "Search routes"
    });
    function l() {
      if (!c)
        return;
      const d = c;
      let f = n.getRoutes().filter((p) => !p.parent || // these routes have a parent with no component which will not appear in the view
      // therefore we still need to include them
      !p.parent.record.components);
      f.forEach(TS), d.filter && (f = f.filter((p) => (
        // save matches state based on the payload
        am(p, d.filter.toLowerCase())
      ))), f.forEach((p) => CS(p, t.currentRoute.value)), d.rootNodes = f.map(xS);
    }
    let c;
    o.on.getInspectorTree((d) => {
      c = d, d.app === e && d.inspectorId === a && l();
    }), o.on.getInspectorState((d) => {
      if (d.app === e && d.inspectorId === a) {
        const p = n.getRoutes().find((h) => h.record.__vd_id === d.nodeId);
        p && (d.state = {
          options: $M(p)
        });
      }
    }), o.sendInspectorTree(a), o.sendInspectorState(a);
  });
}
function TM(e) {
  return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
}
function $M(e) {
  const { record: t } = e, n = [
    { editable: !1, key: "path", value: t.path }
  ];
  return t.name != null && n.push({
    editable: !1,
    key: "name",
    value: t.name
  }), n.push({ editable: !1, key: "regexp", value: e.re }), e.keys.length && n.push({
    editable: !1,
    key: "keys",
    value: {
      _custom: {
        type: null,
        readOnly: !0,
        display: e.keys.map((s) => `${s.name}${TM(s)}`).join(" "),
        tooltip: "Param keys",
        value: e.keys
      }
    }
  }), t.redirect != null && n.push({
    editable: !1,
    key: "redirect",
    value: t.redirect
  }), e.alias.length && n.push({
    editable: !1,
    key: "aliases",
    value: e.alias.map((s) => s.record.path)
  }), Object.keys(e.record.meta).length && n.push({
    editable: !1,
    key: "meta",
    value: e.record.meta
  }), n.push({
    key: "score",
    editable: !1,
    value: {
      _custom: {
        type: null,
        readOnly: !0,
        display: e.score.map((s) => s.join(", ")).join(" | "),
        tooltip: "Score used to sort routes",
        value: e.score
      }
    }
  }), n;
}
const SS = 15485081, wS = 2450411, NS = 8702998, kM = 2282478, OS = 16486972, DM = 6710886, IM = 16704226, RM = 12131356;
function xS(e) {
  const t = [], { record: n } = e;
  n.name != null && t.push({
    label: String(n.name),
    textColor: 0,
    backgroundColor: kM
  }), n.aliasOf && t.push({
    label: "alias",
    textColor: 0,
    backgroundColor: OS
  }), e.__vd_match && t.push({
    label: "matches",
    textColor: 0,
    backgroundColor: SS
  }), e.__vd_exactActive && t.push({
    label: "exact",
    textColor: 0,
    backgroundColor: NS
  }), e.__vd_active && t.push({
    label: "active",
    textColor: 0,
    backgroundColor: wS
  }), n.redirect && t.push({
    label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
    textColor: 16777215,
    backgroundColor: DM
  });
  let s = n.__vd_id;
  return s == null && (s = String(AM++), n.__vd_id = s), {
    id: s,
    label: n.path,
    tags: t,
    children: e.children.map(xS)
  };
}
let AM = 0;
const MM = /^\/(.*)\/([a-z]*)$/;
function CS(e, t) {
  const n = t.matched.length && zr(t.matched[t.matched.length - 1], e.record);
  e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((s) => zr(s, e.record))), e.children.forEach((s) => CS(s, t));
}
function TS(e) {
  e.__vd_match = !1, e.children.forEach(TS);
}
function am(e, t) {
  const n = String(e.re).match(MM);
  if (e.__vd_match = !1, !n || n.length < 3)
    return !1;
  if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
    return e.children.forEach((r) => am(r, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
  const o = e.record.path.toLowerCase(), i = Da(o);
  return !t.startsWith("/") && (i.includes(t) || o.includes(t)) || i.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((r) => am(r, t));
}
function PM(e, t) {
  const n = {};
  for (const s in e)
    t.includes(s) || (n[s] = e[s]);
  return n;
}
function Qa(e) {
  const t = rM(e.routes, e), n = e.parseQuery || hM, s = e.stringifyQuery || u_, o = e.history;
  if (Je.NODE_ENV !== "production" && !o)
    throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
  const i = fl(), r = fl(), a = fl(), l = Ym(_r);
  let c = _r;
  Yo && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
  const d = jp.bind(null, (q) => "" + q), f = jp.bind(null, DA), p = (
    // @ts-expect-error: intentionally avoid the type check
    jp.bind(null, Da)
  );
  function h(q, _e) {
    let ge, ke;
    return yS(q) ? (ge = t.getRecordMatcher(q), Je.NODE_ENV !== "production" && !ge && rt(`Parent route "${String(q)}" not found when adding child route`, _e), ke = _e) : ke = q, t.addRoute(ke, ge);
  }
  function m(q) {
    const _e = t.getRecordMatcher(q);
    _e ? t.removeRoute(_e) : Je.NODE_ENV !== "production" && rt(`Cannot remove non-existent route "${String(q)}"`);
  }
  function v() {
    return t.getRoutes().map((q) => q.record);
  }
  function g(q) {
    return !!t.getRecordMatcher(q);
  }
  function _(q, _e) {
    if (_e = Tt({}, _e || l.value), typeof q == "string") {
      const D = Bp(n, q, _e.path), B = t.resolve({ path: D.path }, _e), Q = o.createHref(D.fullPath);
      return Je.NODE_ENV !== "production" && (Q.startsWith("//") ? rt(`Location "${q}" resolved to "${Q}". A resolved location cannot start with multiple slashes.`) : B.matched.length || rt(`No match found for location with path "${q}"`)), Tt(D, B, {
        params: p(B.params),
        hash: Da(D.hash),
        redirectedFrom: void 0,
        href: Q
      });
    }
    if (Je.NODE_ENV !== "production" && !Dd(q))
      return rt(`router.resolve() was passed an invalid location. This will fail in production.
- Location:`, q), _({});
    let ge;
    if (q.path != null)
      Je.NODE_ENV !== "production" && "params" in q && !("name" in q) && // @ts-expect-error: the type is never
      Object.keys(q.params).length && rt(`Path "${q.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), ge = Tt({}, q, {
        path: Bp(n, q.path, _e.path).path
      });
    else {
      const D = Tt({}, q.params);
      for (const B in D)
        D[B] == null && delete D[B];
      ge = Tt({}, q, {
        params: f(D)
      }), _e.params = f(_e.params);
    }
    const ke = t.resolve(ge, _e), Ze = q.hash || "";
    Je.NODE_ENV !== "production" && Ze && !Ze.startsWith("#") && rt(`A \`hash\` should always start with the character "#". Replace "${Ze}" with "#${Ze}".`), ke.params = d(p(ke.params));
    const xt = AA(s, Tt({}, q, {
      hash: TA(Ze),
      path: ke.path
    })), Ve = o.createHref(xt);
    return Je.NODE_ENV !== "production" && (Ve.startsWith("//") ? rt(`Location "${q}" resolved to "${Ve}". A resolved location cannot start with multiple slashes.`) : ke.matched.length || rt(`No match found for location with path "${q.path != null ? q.path : q}"`)), Tt({
      fullPath: xt,
      // keep the hash encoded so fullPath is effectively path + encodedQuery +
      // hash
      hash: Ze,
      query: (
        // if the user is using a custom query lib like qs, we might have
        // nested objects, so we keep the query as is, meaning it can contain
        // numbers at `$route.query`, but at the point, the user will have to
        // use their own type anyway.
        // https://github.com/vuejs/router/issues/328#issuecomment-649481567
        s === u_ ? mM(q.query) : q.query || {}
      )
    }, ke, {
      redirectedFrom: void 0,
      href: Ve
    });
  }
  function S(q) {
    return typeof q == "string" ? Bp(n, q, l.value.path) : Tt({}, q);
  }
  function b(q, _e) {
    if (c !== q)
      return Ia(8, {
        from: _e,
        to: q
      });
  }
  function O(q) {
    return C(q);
  }
  function w(q) {
    return O(Tt(S(q), { replace: !0 }));
  }
  function N(q) {
    const _e = q.matched[q.matched.length - 1];
    if (_e && _e.redirect) {
      const { redirect: ge } = _e;
      let ke = typeof ge == "function" ? ge(q) : ge;
      if (typeof ke == "string" && (ke = ke.includes("?") || ke.includes("#") ? ke = S(ke) : (
        // force empty params
        { path: ke }
      ), ke.params = {}), Je.NODE_ENV !== "production" && ke.path == null && !("name" in ke))
        throw rt(`Invalid redirect found:
${JSON.stringify(ke, null, 2)}
 when navigating to "${q.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
      return Tt({
        query: q.query,
        hash: q.hash,
        // avoid transferring params if the redirect has a path
        params: ke.path != null ? {} : q.params
      }, ke);
    }
  }
  function C(q, _e) {
    const ge = c = _(q), ke = l.value, Ze = q.state, xt = q.force, Ve = q.replace === !0, D = N(ge);
    if (D)
      return C(
        Tt(S(D), {
          state: typeof D == "object" ? Tt({}, Ze, D.state) : Ze,
          force: xt,
          replace: Ve
        }),
        // keep original redirectedFrom if it exists
        _e || ge
      );
    const B = ge;
    B.redirectedFrom = _e;
    let Q;
    return !xt && Zy(s, ke, ge) && (Q = Ia(16, { to: B, from: ke }), Ge(
      ke,
      ke,
      // this is a push, the only way for it to be triggered from a
      // history.listen is with a redirect, which makes it become a push
      !0,
      // This cannot be the first navigation because the initial location
      // cannot be manually navigated to
      !1
    )), (Q ? Promise.resolve(Q) : $(B, ke)).catch((ne) => Vo(ne) ? (
      // navigation redirects still mark the router as ready
      Vo(
        ne,
        2
        /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
      ) ? ne : $e(ne)
    ) : (
      // reject any unknown error
      X(ne, B, ke)
    )).then((ne) => {
      if (ne) {
        if (Vo(
          ne,
          2
          /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
        ))
          return Je.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
          Zy(s, _(ne.to), B) && // and we have done it a couple of times
          _e && // @ts-expect-error: added only in dev
          (_e._count = _e._count ? (
            // @ts-expect-error
            _e._count + 1
          ) : 1) > 30 ? (rt(`Detected a possibly infinite redirection in a navigation guard when going from "${ke.fullPath}" to "${B.fullPath}". Aborting to avoid a Stack Overflow.
 Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : C(
            // keep options
            Tt({
              // preserve an existing replacement but allow the redirect to override it
              replace: Ve
            }, S(ne.to), {
              state: typeof ne.to == "object" ? Tt({}, Ze, ne.to.state) : Ze,
              force: xt
            }),
            // preserve the original redirectedFrom if any
            _e || B
          );
      } else
        ne = R(B, ke, !0, Ve, Ze);
      return M(B, ke, ne), ne;
    });
  }
  function k(q, _e) {
    const ge = b(q, _e);
    return ge ? Promise.reject(ge) : Promise.resolve();
  }
  function x(q) {
    const _e = Dt.values().next().value;
    return _e && typeof _e.runWithContext == "function" ? _e.runWithContext(q) : q();
  }
  function $(q, _e) {
    let ge;
    const [ke, Ze, xt] = VM(q, _e);
    ge = Hp(ke.reverse(), "beforeRouteLeave", q, _e);
    for (const D of ke)
      D.leaveGuards.forEach((B) => {
        ge.push(xr(B, q, _e));
      });
    const Ve = k.bind(null, q, _e);
    return ge.push(Ve), _t(ge).then(() => {
      ge = [];
      for (const D of i.list())
        ge.push(xr(D, q, _e));
      return ge.push(Ve), _t(ge);
    }).then(() => {
      ge = Hp(Ze, "beforeRouteUpdate", q, _e);
      for (const D of Ze)
        D.updateGuards.forEach((B) => {
          ge.push(xr(B, q, _e));
        });
      return ge.push(Ve), _t(ge);
    }).then(() => {
      ge = [];
      for (const D of xt)
        if (D.beforeEnter)
          if (Es(D.beforeEnter))
            for (const B of D.beforeEnter)
              ge.push(xr(B, q, _e));
          else
            ge.push(xr(D.beforeEnter, q, _e));
      return ge.push(Ve), _t(ge);
    }).then(() => (q.matched.forEach((D) => D.enterCallbacks = {}), ge = Hp(xt, "beforeRouteEnter", q, _e, x), ge.push(Ve), _t(ge))).then(() => {
      ge = [];
      for (const D of r.list())
        ge.push(xr(D, q, _e));
      return ge.push(Ve), _t(ge);
    }).catch((D) => Vo(
      D,
      8
      /* ErrorTypes.NAVIGATION_CANCELLED */
    ) ? D : Promise.reject(D));
  }
  function M(q, _e, ge) {
    a.list().forEach((ke) => x(() => ke(q, _e, ge)));
  }
  function R(q, _e, ge, ke, Ze) {
    const xt = b(q, _e);
    if (xt)
      return xt;
    const Ve = _e === _r, D = Yo ? history.state : {};
    ge && (ke || Ve ? o.replace(q.fullPath, Tt({
      scroll: Ve && D && D.scroll
    }, Ze)) : o.push(q.fullPath, Ze)), l.value = q, Ge(q, _e, ge, Ve), $e();
  }
  let V;
  function j() {
    V || (V = o.listen((q, _e, ge) => {
      if (!Pt.listening)
        return;
      const ke = _(q), Ze = N(ke);
      if (Ze) {
        C(Tt(Ze, { replace: !0, force: !0 }), ke).catch(Fl);
        return;
      }
      c = ke;
      const xt = l.value;
      Yo && BA(t_(xt.fullPath, ge.delta), Lf()), $(ke, xt).catch((Ve) => Vo(
        Ve,
        12
        /* ErrorTypes.NAVIGATION_CANCELLED */
      ) ? Ve : Vo(
        Ve,
        2
        /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
      ) ? (C(
        Tt(S(Ve.to), {
          force: !0
        }),
        ke
        // avoid an uncaught rejection, let push call triggerError
      ).then((D) => {
        Vo(
          D,
          20
          /* ErrorTypes.NAVIGATION_DUPLICATED */
        ) && !ge.delta && ge.type === hc.pop && o.go(-1, !1);
      }).catch(Fl), Promise.reject()) : (ge.delta && o.go(-ge.delta, !1), X(Ve, ke, xt))).then((Ve) => {
        Ve = Ve || R(
          // after navigation, all matched components are resolved
          ke,
          xt,
          !1
        ), Ve && (ge.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
        // entry while a different route is displayed
        !Vo(
          Ve,
          8
          /* ErrorTypes.NAVIGATION_CANCELLED */
        ) ? o.go(-ge.delta, !1) : ge.type === hc.pop && Vo(
          Ve,
          20
          /* ErrorTypes.NAVIGATION_DUPLICATED */
        ) && o.go(-1, !1)), M(ke, xt, Ve);
      }).catch(Fl);
    }));
  }
  let U = fl(), A = fl(), G;
  function X(q, _e, ge) {
    $e(q);
    const ke = A.list();
    return ke.length ? ke.forEach((Ze) => Ze(q, _e, ge)) : (Je.NODE_ENV !== "production" && rt("uncaught error during route navigation:"), console.error(q)), Promise.reject(q);
  }
  function te() {
    return G && l.value !== _r ? Promise.resolve() : new Promise((q, _e) => {
      U.add([q, _e]);
    });
  }
  function $e(q) {
    return G || (G = !q, j(), U.list().forEach(([_e, ge]) => q ? ge(q) : _e()), U.reset()), q;
  }
  function Ge(q, _e, ge, ke) {
    const { scrollBehavior: Ze } = e;
    if (!Yo || !Ze)
      return Promise.resolve();
    const xt = !ge && HA(t_(q.fullPath, 0)) || (ke || !ge) && history.state && history.state.scroll || null;
    return rr().then(() => Ze(q, _e, xt)).then((Ve) => Ve && jA(Ve)).catch((Ve) => X(Ve, q, _e));
  }
  const Ye = (q) => o.go(q);
  let et;
  const Dt = /* @__PURE__ */ new Set(), Pt = {
    currentRoute: l,
    listening: !0,
    addRoute: h,
    removeRoute: m,
    clearRoutes: t.clearRoutes,
    hasRoute: g,
    getRoutes: v,
    resolve: _,
    options: e,
    push: O,
    replace: w,
    go: Ye,
    back: () => Ye(-1),
    forward: () => Ye(1),
    beforeEach: i.add,
    beforeResolve: r.add,
    afterEach: a.add,
    onError: A.add,
    isReady: te,
    install(q) {
      const _e = this;
      q.component("RouterLink", Ra), q.component("RouterView", NM), q.config.globalProperties.$router = _e, Object.defineProperty(q.config.globalProperties, "$route", {
        enumerable: !0,
        get: () => T(l)
      }), Yo && // used for the initial navigation client side to avoid pushing
      // multiple times when the router is used in multiple apps
      !et && l.value === _r && (et = !0, O(o.location).catch((Ze) => {
        Je.NODE_ENV !== "production" && rt("Unexpected error when starting the router:", Ze);
      }));
      const ge = {};
      for (const Ze in _r)
        Object.defineProperty(ge, Ze, {
          get: () => l.value[Ze],
          enumerable: !0
        });
      q.provide(Ff, _e), q.provide(Uv, Hm(ge)), q.provide(rm, l);
      const ke = q.unmount;
      Dt.add(q), q.unmount = function() {
        Dt.delete(q), Dt.size < 1 && (c = _r, V && V(), V = null, l.value = _r, et = !1, G = !1), ke();
      }, Je.NODE_ENV !== "production" && Yo && CM(q, _e, t);
    }
  };
  function _t(q) {
    return q.reduce((_e, ge) => _e.then(() => x(ge)), Promise.resolve());
  }
  return Pt;
}
function VM(e, t) {
  const n = [], s = [], o = [], i = Math.max(t.matched.length, e.matched.length);
  for (let r = 0; r < i; r++) {
    const a = t.matched[r];
    a && (e.matched.find((c) => zr(c, a)) ? s.push(a) : n.push(a));
    const l = e.matched[r];
    l && (t.matched.find((c) => zr(c, l)) || o.push(l));
  }
  return [n, s, o];
}
function co() {
  return Ie(Ff);
}
function Pc(e) {
  return Ie(Uv);
}
const LM = {}, FM = { id: "post-master" };
function UM(e, t, n, s, o, i) {
  const r = be("router-view");
  return y(), E("div", FM, [
    F(r)
  ]);
}
const jM = /* @__PURE__ */ he(LM, [["render", UM]]), BM = {}, HM = { class: "wrapper" }, YM = { class: "detail" };
function WM(e, t, n, s, o, i) {
  const r = be("router-view");
  return y(), E("div", HM, [
    u("aside", null, [
      F(r, { name: "Aside" })
    ]),
    u("main", null, [
      u("div", YM, [
        F(r)
      ])
    ])
  ]);
}
const GM = /* @__PURE__ */ he(BM, [["render", WM], ["__scopeId", "data-v-54e5965f"]]), zM = {
  created() {
  }
};
function KM(e, t, n, s, o, i) {
  return y(), E("div", null, t[0] || (t[0] = [
    u("p", null, [
      u("em", null, "Parcel"),
      se(" is a system designed to securely store and manage messages that could contain sensitive data such as protected health information (PHI).")
    ], -1),
    u("p", null, "All messages are encrypted to ensure the confidentiality and integrity of the data.", -1),
    u("p", null, "Additionally, the system includes a functionality that automatically deletes messages once they reach their expiration date. This ensures that PHI is only accessible to authorized individuals for the necessary duration, and that it is subsequently removed to maintain compliance with relevant regulations.", -1),
    u("p", null, "Overall, our messaging system provides a secure and efficient way to manage PHI while maintaining compliance with relevant regulations.", -1)
  ]));
}
const XM = /* @__PURE__ */ he(zM, [["render", KM]]), qM = ["title"], JM = {
  __name: "ParcelToolbar",
  props: {
    read: { type: Boolean, default: !1 },
    parcelId: { type: String, default: null }
  },
  setup(e) {
    const t = qa(), n = e, s = I(() => n.read ? "fa-envelope" : "fa-envelope-open");
    function o() {
      if (!confirm("Are you sure you want to delete this item?")) return;
      const a = n.parcelId;
      t.deleteParcel(a);
    }
    function i() {
      const r = n.parcelId, a = !n.read;
      t.markParcel(r, a);
    }
    return (r, a) => (y(), E("ul", null, [
      u("li", {
        onClick: Vt(o, ["stop"]),
        title: "delete"
      }, a[0] || (a[0] = [
        u("i", { class: "fa-regular fa-trash-can fa-fw" }, null, -1)
      ])),
      u("li", {
        onClick: Vt(i, ["stop"]),
        title: `mark as ${e.read ? "unread" : "read"}`
      }, [
        u("i", {
          class: Te(["fa-regular fa-empty-set fa-fw", s.value])
        }, null, 2)
      ], 8, qM)
    ]));
  }
}, QM = /* @__PURE__ */ he(JM, [["__scopeId", "data-v-9c8eb155"]]), ZM = {
  __name: "DateTime",
  props: {
    value: { type: String, default: null }
  },
  setup(e) {
    const t = e, n = I(() => {
      const s = de(), o = new Date(t.value);
      return s.isSame(o, "day") ? de(o).format("LT") : de(o).format("L");
    });
    return (s, o) => (y(), E("span", null, [
      se(H(n.value), 1),
      ye(s.$slots, "default")
    ]));
  }
}, eP = { class: "pl-2 mr-2" }, tP = ["value"], nP = { class: "flex-fill" }, sP = {
  class: "d-block",
  "data-from": ""
}, oP = { class: "d-flex" }, rP = {
  class: "d-block",
  "data-subject": ""
}, iP = ["title"], aP = {
  class: "d-block",
  "data-summary": ""
}, lP = {
  __name: "ParcelListItem",
  props: {
    parcel: {
      type: Object,
      default: () => ({})
    }
  },
  setup(e) {
    const t = qa(), n = e, { parcel: s } = xe(n), o = I(() => {
      var a, l;
      return ((a = t.active) == null ? void 0 : a.id) === ((l = s.value) == null ? void 0 : l.id);
    }), i = I(() => {
      var a;
      return ((a = s.value) == null ? void 0 : a.read) === !0;
    }), r = I({
      get() {
        return t.selected.indexOf(s.value.id) >= 0;
      },
      set(a) {
        const l = s.value.id, d = [...t.selected].indexOf(l);
        if (a === !0) {
          if (d >= 0) return;
          t.selected.push(l);
        } else {
          if (d < 0) return;
          t.selected.splice(d, 1);
        }
      }
    });
    return (a, l) => (y(), E("main", {
      class: Te(["d-flex align-items-center p-2", { active: o.value, read: i.value }])
    }, [
      u("aside", eP, [
        P(u("input", {
          type: "checkbox",
          "onUpdate:modelValue": l[0] || (l[0] = (c) => r.value = c),
          value: T(s).id,
          onClick: l[1] || (l[1] = Vt(() => {
          }, ["stop"]))
        }, null, 8, tP), [
          [_n, r.value]
        ])
      ]),
      u("article", nP, [
        u("span", sP, H(T(s).from), 1),
        u("span", oP, [
          u("span", rP, H(T(s).subject), 1),
          u("span", {
            class: "d-block ml-auto text-muted text-right",
            "data-created-at": "",
            title: T(s).createdAt
          }, [
            F(ZM, {
              value: T(s).createdAt
            }, null, 8, ["value"])
          ], 8, iP)
        ]),
        u("span", aP, H(T(s).summary), 1),
        F(QM, {
          "data-toolbar": "",
          read: T(s).read,
          "parcel-id": T(s).id
        }, null, 8, ["read", "parcel-id"])
      ])
    ], 2));
  }
}, cP = /* @__PURE__ */ he(lP, [["__scopeId", "data-v-5355b812"]]), uP = {}, dP = { "data-wrapper": "" };
function fP(e, t) {
  return y(), E("div", dP, t[0] || (t[0] = [
    u("span", { class: "title" }, "Folder is empty", -1),
    u("i", { class: "icon fa-regular fa-folder-open" }, null, -1),
    u("span", { class: "description" }, "Nothing to select.", -1)
  ]));
}
const pP = /* @__PURE__ */ he(uP, [["render", fP], ["__scopeId", "data-v-16ffa4e0"]]), hP = { class: "d-flex align-items-center" }, mP = { class: "action" }, vP = {
  key: 0,
  class: "fa-solid fa-spinner fa-spin fa-fw"
}, gP = {
  key: 0,
  class: "badge bg-danger"
}, yP = { class: "toolbar d-flex" }, _P = { class: "ml-1 d-flex align-items-center justify-content-center" }, bP = ["indeterminate"], EP = {
  for: "select-all-checkbox",
  class: "m-0"
}, SP = { class: "ml-auto" }, wP = ["title"], NP = { class: "parcels-wrapper" }, OP = {
  __name: "ParcelList",
  setup(e) {
    const t = co(), n = qa(), s = I(() => {
      const v = [...n.selected];
      for (const g of n.list)
        if (v.includes(g.id) && g.read === !0)
          return !0;
      return !1;
    }), o = I(() => n.loading), i = I(() => n.list), r = I(() => n.unread), a = I(() => s.value ? "fa-envelope" : "fa-envelope-open"), l = I(() => {
      const v = [...n.selected];
      if (v.length === 0) return !1;
      const g = n.list.map((_) => _.id);
      return v.length != g.length;
    }), c = I({
      get() {
        const v = [...n.selected];
        if (v.length === 0) return !1;
        const g = n.list.map((_) => _.id);
        return v.length === g.length;
      },
      set(v) {
        v === !1 ? n.selected = [] : n.selected = n.list.map((g) => g.id);
      }
    }), d = I(() => [...n.selected].length <= 0);
    async function f() {
      n.fetchList();
    }
    function p(v) {
      n.toggle(v), n.active === null ? t.push("/inbox") : t.push(`/inbox/${v.id}`);
    }
    function h() {
      const v = [...n.selected], g = v.length;
      if (!(g < 1 || confirm(
        `Are you sure wyou want to delete ${g} element${g === 1 ? "" : "s"}`
      ) === !1)) {
        console.log("onDeleteClickedAll clicked");
        for (const S of v)
          n.deleteParcel(S);
      }
    }
    function m() {
      const v = [...n.selected], g = !s.value;
      for (const _ of v)
        n.markParcel(_, g);
    }
    return (v, g) => (y(), E(J, null, [
      u("header", null, [
        u("div", hP, [
          g[1] || (g[1] = u("strong", null, "Inbox", -1)),
          u("span", mP, [
            o.value ? (y(), E("i", vP)) : (y(), E("i", {
              key: 1,
              onClick: f,
              class: "fas fa-sync-alt fa-fw"
            }))
          ]),
          r.value > 0 ? (y(), E("span", gP, H(r.value) + " unread", 1)) : ae("", !0)
        ]),
        u("div", yP, [
          u("div", _P, [
            P(u("input", {
              class: "mr-2",
              type: "checkbox",
              indeterminate: l.value,
              "onUpdate:modelValue": g[0] || (g[0] = (_) => c.value = _),
              id: "select-all-checkbox"
            }, null, 8, bP), [
              [_n, c.value]
            ]),
            u("label", EP, H(c.value ? "deselect" : "select") + " all", 1)
          ]),
          u("div", SP, [
            u("ul", {
              class: Te(["actions", { disabled: d.value }])
            }, [
              u("li", null, [
                u("span", {
                  class: "action",
                  onClick: Vt(h, ["stop"]),
                  title: "delete"
                }, g[2] || (g[2] = [
                  u("i", { class: "fa-regular fa-trash-can fa-fw" }, null, -1)
                ]))
              ]),
              u("li", null, [
                u("span", {
                  class: "action",
                  onClick: Vt(m, ["stop"]),
                  title: `mark all as ${s.value ? "unread" : "read"}`
                }, [
                  u("i", {
                    class: Te(["fa-regular fa-empty-set fa-fw", a.value])
                  }, null, 2)
                ], 8, wP)
              ])
            ], 2)
          ])
        ])
      ]),
      u("div", NP, [
        i.value.length === 0 ? (y(), le(pP, {
          key: 0,
          class: "my-5"
        })) : (y(!0), E(J, { key: 1 }, Ee(i.value, (_) => (y(), le(cP, {
          key: _.id,
          "data-parcel-item": "",
          parcel: _,
          onClick: Vt((S) => p(_), ["stop"])
        }, null, 8, ["parcel", "onClick"]))), 128))
      ])
    ], 64));
  }
}, m_ = /* @__PURE__ */ he(OP, [["__scopeId", "data-v-2c04335c"]]), xP = {
  key: 0,
  class: "parcel-detail"
}, CP = { class: "border-bottom p-2" }, TP = { class: "d-flex" }, $P = { class: "d-block text-bold" }, kP = { class: "d-block" }, DP = { class: "ml-auto text-right" }, IP = { class: "time" }, RP = ["title"], AP = ["title"], MP = ["title"], PP = ["title"], VP = { class: "d-block" }, LP = { class: "p-2" }, FP = ["innerHTML"], UP = { key: 1 }, jP = {
  __name: "ParcelDetail",
  props: {
    id: {
      type: String,
      default: null
    }
  },
  setup(e) {
    const t = qa(), n = co(), s = e, o = I(() => t.list.find((d) => d.id === s.id));
    tn(() => {
      o.value && (t.active = o.value);
    });
    const i = I(() => t.active), r = I(() => "created at"), a = I(() => "expiration: date when the message will be automatically deleted"), l = I(() => {
      var p;
      const c = (p = o.value) == null ? void 0 : p.createdAt;
      if (!c) return "no date available";
      const d = de(c).format("LT");
      return `${de(c).format("L")}, ${d}`;
    });
    return ht(
      o,
      (c) => {
        !c || c.read === !0 || t.markParcel(c.id, !0);
      },
      {
        immediate: !0
      }
    ), ht(
      i,
      (c) => {
        c === null && n.push("/inbox");
      },
      {
        immediate: !1
      }
    ), (c, d) => o.value ? (y(), E("article", xP, [
      u("header", CP, [
        u("div", TP, [
          u("div", null, [
            u("span", $P, [
              d[0] || (d[0] = u("span", { class: "detail-label" }, "From:", -1)),
              se(H(o.value.from), 1)
            ]),
            u("span", kP, [
              d[1] || (d[1] = u("span", { class: "detail-label" }, "To:", -1)),
              se(H(o.value.to), 1)
            ])
          ]),
          u("div", DP, [
            u("div", IP, [
              u("small", {
                title: o.value.createdAt,
                class: "text-muted"
              }, "created " + H(l.value), 9, RP),
              u("small", {
                title: r.value,
                class: "text-muted"
              }, d[2] || (d[2] = [
                u("i", { class: "far fa-clock fa-fw" }, null, -1)
              ]), 8, AP),
              u("small", {
                title: o.value.expiration,
                class: "text-muted"
              }, "expires " + H(o.value.readableExpiration), 9, MP),
              u("small", {
                title: a.value,
                class: "text-muted"
              }, d[3] || (d[3] = [
                u("i", { class: "far fa-hourglass fa-fw" }, null, -1)
              ]), 8, PP)
            ])
          ])
        ]),
        u("span", VP, [
          d[4] || (d[4] = u("span", { class: "detail-label" }, "Subject:", -1)),
          se(H(o.value.subject), 1)
        ])
      ]),
      u("main", LP, [
        u("span", {
          class: "d-block",
          innerHTML: o.value.body
        }, null, 8, FP)
      ])
    ])) : (y(), E("span", UP, "Parcel ID " + H(e.id) + " was not found", 1));
  }
}, BP = /* @__PURE__ */ he(jP, [["__scopeId", "data-v-158b73d6"]]), HP = {}, YP = {
  "data-wrapper": "",
  class: "position-absolute top-50 start-50 translate-middle"
};
function WP(e, t) {
  return y(), E("div", YP, t[0] || (t[0] = [
    u("span", { class: "title" }, "No Conversation Selected", -1),
    u("i", { class: "icon fas fa-inbox" }, null, -1),
    u("span", { class: "description" }, "Select a conversation to read.", -1)
  ]));
}
const GP = /* @__PURE__ */ he(HP, [["render", WP], ["__scopeId", "data-v-48b655bf"]]), zP = [
  {
    path: "/",
    name: "home",
    component: jM,
    redirect: "/inbox",
    children: [
      {
        path: "inbox",
        component: GM,
        children: [
          {
            path: "",
            name: "inbox",
            components: {
              Aside: m_,
              default: GP
            }
          },
          {
            path: ":id",
            name: "inbox-detail",
            components: {
              Aside: m_,
              default: BP
            },
            props: { default: !0, Aside: !1 }
          }
        ]
      },
      { path: "/about", component: XM }
    ]
  }
];
let lm;
const KP = () => (lm = Qa({
  // Provide the history implementation to use. We are using the hash history for simplicity here.
  history: Ja(),
  routes: zP
}), lm);
var XP = Object.defineProperty, qP = (e, t, n) => t in e ? XP(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, eo = (e, t, n) => qP(e, typeof t != "symbol" ? t + "" : t, n);
const JP = { class: "toast-header" }, QP = ["textContent"], ZP = ["textContent"], eV = { class: "toast-body" }, tV = ["textContent"], nV = /* @__PURE__ */ Cn({
  __name: "Toast",
  props: {
    visible: { type: Boolean, default: !1 },
    title: { default: "" },
    subtitle: { default: "" },
    body: { default: "" },
    animation: { type: Boolean, default: !0 },
    autohide: { type: Boolean, default: !0 },
    delay: { default: 15e3 },
    variant: {}
  },
  emits: ["hide", "hidden", "show", "shown"],
  setup(e, { expose: t, emit: n }) {
    const s = e, o = n, { visible: i, animation: r, autohide: a, delay: l } = xe(s), c = L(), d = L();
    ht(i, (C) => {
      _();
    }, { immediate: !0 });
    function f() {
      c.value.show();
    }
    function p() {
      c.value.hide();
    }
    function h() {
      c.value.dispose();
    }
    function m() {
      c.value.isShown();
    }
    function v() {
      c.value.getOrCreateInstance();
    }
    function g() {
      c.value.getInstance();
    }
    function _() {
      c.value && (i.value === !0 ? f() : p());
    }
    function S() {
      o("hide", c.value);
    }
    function b() {
      o("hidden", c.value);
    }
    function O() {
      o("show", c.value);
    }
    async function w() {
      o("shown", c.value);
    }
    const N = { show: f, hide: p, dispose: h, isShown: m, getOrCreateInstance: v, getInstance: g };
    return t({ ...N }), Mt(() => {
      d.value.addEventListener("hide.bs.toast", S), d.value.addEventListener("hidden.bs.toast", b), d.value.addEventListener("show.bs.toast", O), d.value.addEventListener("shown.bs.toast", w), c.value = new bootstrap.Toast(d.value, {
        animation: r.value,
        autohide: a.value,
        delay: l.value
      }), _();
    }), (C, k) => (y(), E("div", {
      ref_key: "toastRef",
      ref: d,
      class: Te(["toast", [C.variant ? `text-bg-${C.variant}` : ""]]),
      role: "alert",
      "aria-live": "assertive",
      "aria-atomic": "true"
    }, [
      ye(C.$slots, "header", Ft(Ut({ ...N })), () => [
        u("div", JP, [
          ye(C.$slots, "title", Ft(Ut({ ...N })), () => [
            u("strong", {
              class: "me-auto",
              textContent: H(C.title)
            }, null, 8, QP)
          ], !0),
          ye(C.$slots, "subtitle", Ft(Ut({ ...N })), () => [
            u("small", {
              textContent: H(C.subtitle)
            }, null, 8, ZP)
          ], !0),
          u("button", {
            type: "button",
            class: "btn-close",
            "aria-label": "Close",
            onClick: p
          })
        ])
      ], !0),
      ye(C.$slots, "body", Ft(Ut({ ...N })), () => [
        u("div", eV, [
          ye(C.$slots, "default", Ft(Ut({ ...N })), () => [
            u("span", {
              textContent: H(C.body)
            }, null, 8, tV)
          ], !0)
        ])
      ], !0)
    ], 2));
  }
}), Do = (e, t) => {
  const n = e.__vccOpts || e;
  for (const [s, o] of t)
    n[s] = o;
  return n;
}, $S = /* @__PURE__ */ Do(nV, [["__scopeId", "data-v-c0cdbae8"]]);
function sV() {
  let e = (/* @__PURE__ */ new Date()).getTime();
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
    const n = (e + Math.random() * 16) % 16 | 0;
    return e = Math.floor(e / 16), (t == "x" ? n : n & 3 | 8).toString(16);
  });
}
const oV = { id: "toast-wrapper" };
let v_;
const rV = /* @__PURE__ */ Cn({
  __name: "Toaster",
  setup(e, { expose: t }) {
    const n = {
      visible: !0,
      title: "",
      subtitle: "",
      body: "",
      animation: !0,
      autohide: !0,
      delay: 5e3,
      variant: void 0
    }, s = L(/* @__PURE__ */ new Map());
    v_ = (i, r = "top right") => {
      const a = sV(), l = { ...n, ...i, id: a };
      let c = s.value.get(r);
      c instanceof Set || (c = /* @__PURE__ */ new Set()), c.add(l), s.value.set(r, c);
    };
    function o(i, r) {
      const a = s.value.get(i);
      a == null || a.delete(r);
    }
    return t({ toast: v_ }), (i, r) => (y(), le(Ss, { to: "body" }, [
      u("div", oV, [
        (y(!0), E(J, null, Ee(s.value, ([a, l]) => (y(), E("div", {
          key: a,
          class: Te(["toast-group", `${a}`])
        }, [
          (y(!0), E(J, null, Ee(l, (c, d) => (y(), le($S, On({
            key: c.id,
            ref_for: !0
          }, c, {
            onHidden: (f) => o(a, c)
          }), null, 16, ["onHidden"]))), 128))
        ], 2))), 128))
      ])
    ]));
  }
}), iV = /* @__PURE__ */ Do(rV, [["__scopeId", "data-v-786d1c50"]]), kS = () => {
  let e = [];
  function t() {
    e = [], document.querySelectorAll("*").forEach((s) => {
      const o = getComputedStyle(s);
      o.position === "sticky" && (e.push({ element: s, originalPosition: o.position }), s.style.position = "relative");
    });
  }
  function n() {
    e.forEach((s) => {
      s.element.style.position = s.originalPosition;
    });
  }
  return { removeStickyElements: t, restoreStickyElements: n };
};
var Co = /* @__PURE__ */ ((e) => (e.SMALL = "sm", e.STANDARD = "", e.LARGE = "lg", e.EXTRA_LARGE = "xl", e))(Co || {});
const Aa = (e, t = "") => {
  let n = e.toLowerCase();
  return !Object.values(Co).includes(n) || n == "" ? "" : `${t}${n}`;
}, aV = { class: "modal-content" }, lV = { class: "modal-header" }, cV = ["innerHTML"], uV = { class: "modal-body" }, dV = ["innerHTML"], fV = { class: "modal-footer" }, pV = ["innerHTML"], hV = ["innerHTML"];
typeof window < "u" && !window._managedModals && (window._managedModals = []);
const mV = /* @__PURE__ */ Cn({
  __name: "Modal",
  props: {
    title: { default: "" },
    body: { default: "" },
    textCancel: { default: "Cancel" },
    textOk: { type: [String, Boolean], default: "Ok" },
    backdrop: { type: [Boolean, String], default: !0 },
    keyboard: { type: Boolean, default: !0 },
    focus: { type: Boolean, default: !0 },
    disableOutsideClick: { type: Boolean, default: !1 },
    okOnly: { type: Boolean, default: !1 },
    size: { default: Co.STANDARD },
    btnSize: { default: Co.SMALL },
    visible: { type: Boolean, default: !1 }
  },
  emits: ["onShown", "onHidden"],
  setup(e, { expose: t, emit: n }) {
    const s = e, {
      backdrop: o,
      keyboard: i,
      focus: r,
      disableOutsideClick: a,
      size: l,
      btnSize: c
    } = xe(s), d = n, f = I(() => Aa(l.value, "modal-")), p = I(() => Aa(c.value, "btn-")), h = L();
    let m;
    const v = un(), g = () => document.querySelectorAll(".modal.show").length, _ = () => typeof window < "u" && window._managedModals ? window._managedModals : [], S = 1055, b = L(S), O = () => {
      const A = g();
      b.value = S + A;
    };
    let w;
    const N = kS();
    function C() {
      return new Promise((A, G) => {
        if (!h.value) return;
        N.removeStickyElements(), O(), h.value.classList.add("managed-modal");
        const X = _(), te = X.length + 1, $e = {
          element: h.value,
          priority: te,
          instance: v
        };
        X.push($e), h.value.addEventListener("shown.bs.modal", () => {
          $();
        }, { once: !0 }), m == null || m.show(), w = A, d("onShown", m);
      });
    }
    function k(A = !0) {
      if (!h.value) return;
      const G = _(), X = G.findIndex((te) => te.element === h.value);
      X > -1 && G.splice(X, 1), h.value.addEventListener("hidden.bs.modal", () => {
        h.value && (h.value.style.display = ""), $();
      }, { once: !0 }), m == null || m.hide(), typeof w == "function" && w(A), d("onHidden", m), N.restoreStickyElements();
    }
    function x() {
      m == null || m.toggle();
    }
    const $ = () => {
      const A = _();
      if (A.length === 0) return;
      A.sort((X, te) => X.priority - te.priority);
      const G = A[A.length - 1];
      A.forEach((X) => {
        X.element !== G.element ? X.element.style.opacity = "0" : X.element.style.opacity = "1";
      });
    };
    Mt(() => {
      m = new bootstrap.Modal(h.value, {
        backdrop: o == null ? void 0 : o.value,
        keyboard: i.value,
        focus: r.value
      }), h.value.classList.add("managed-modal"), tn(() => {
        (s == null ? void 0 : s.visible) === !0 ? m == null || m.show() : m == null || m.hide();
      });
    });
    function M(A) {
      (o == null ? void 0 : o.value) !== "static" && k(!1);
    }
    function R() {
      k(!1);
    }
    function V() {
      k(!1);
    }
    function j() {
      k(!0);
    }
    t({
      modal: m,
      show: C,
      hide: k,
      toggle: x,
      onHeaderCloseClicked: R,
      onCancelClicked: V,
      onOkCLicked: j
    });
    const U = { show: C, hide: k, toggle: x, modal: m };
    return (A, G) => (y(), E("div", On({
      ref_key: "modalElement",
      ref: h,
      class: "modal fade",
      tabindex: "-1"
    }, { ...A.$attrs }, {
      onClick: Vt(M, ["self"]),
      style: { zIndex: b.value }
    }), [
      u("div", {
        class: Te(["modal-dialog", f.value])
      }, [
        u("div", aV, [
          ye(A.$slots, "header", Ft(Ut({ ...U })), () => [
            u("div", lV, [
              ye(A.$slots, "title", Ft(Ut({ ...U })), () => [
                u("h5", {
                  class: "modal-title",
                  innerHTML: A.title
                }, null, 8, cV)
              ], !0),
              ye(A.$slots, "header-close-button", Ft(Ut({ ...U })), () => [
                u("button", {
                  type: "button",
                  class: "btn-close",
                  "aria-label": "Close",
                  onClick: R
                })
              ], !0)
            ])
          ], !0),
          u("div", uV, [
            ye(A.$slots, "default", Ft(Ut({ ...U })), () => [
              u("span", { innerHTML: A.body }, null, 8, dV)
            ], !0)
          ]),
          u("div", fV, [
            ye(A.$slots, "footer", Ft(Ut({ ...U })), () => [
              A.okOnly ? ae("", !0) : (y(), E("button", {
                key: 0,
                type: "button",
                class: Te(["btn btn-secondary", p.value]),
                onClick: V
              }, [
                ye(A.$slots, "button-cancel", Ft(Ut({ ...U })), () => [
                  u("span", { innerHTML: A.textCancel }, null, 8, pV)
                ], !0)
              ], 2)),
              u("button", {
                type: "button",
                class: Te(["btn btn-primary", p.value]),
                onClick: j
              }, [
                ye(A.$slots, "button-ok", Ft(Ut({ ...U })), () => [
                  u("span", { innerHTML: A.textOk }, null, 8, hV)
                ], !0)
              ], 2)
            ], !0)
          ])
        ])
      ], 2)
    ], 16));
  }
}), DS = /* @__PURE__ */ Do(mV, [["__scopeId", "data-v-b8ba4eaa"]]), vV = /* @__PURE__ */ Cn({
  __name: "ModalManager",
  setup(e, { expose: t }) {
    const n = L(void 0), s = L({});
    function o(r = {}) {
      var a;
      return r.okOnly = !1, s.value = r, (a = n.value) == null ? void 0 : a.show();
    }
    function i(r = {}) {
      var a;
      return r.okOnly = !0, s.value = r, (a = n.value) == null ? void 0 : a.show();
    }
    return t({ confirm: o, alert: i }), (r, a) => (y(), le(Ss, { to: "body" }, [
      F(DS, On({
        ref_key: "modalRef",
        ref: n
      }, { ...s.value }), null, 16)
    ]));
  }
}), gV = {
  "data-header": "",
  class: "border-bottom"
}, yV = { class: "d-flex gap-2 p-2" }, _V = { class: "p-2" }, bV = {
  "data-footer": "",
  class: "border-top p-2"
}, EV = { class: "buttons" }, SV = /* @__PURE__ */ Cn({
  __name: "DialogBox",
  props: {
    title: { default: "" },
    body: { default: "" },
    textCancel: { default: "Cancel" },
    textOk: { type: [String, Boolean], default: "Ok" },
    backdrop: { type: [Boolean, String], default: !0 },
    keyboard: { type: Boolean, default: !0 },
    focus: { type: Boolean, default: !0 },
    disableOutsideClick: { type: Boolean, default: !1 },
    okOnly: { type: Boolean, default: !1 },
    size: { default: Co.STANDARD },
    btnSize: { default: Co.SMALL },
    visible: { type: Boolean, default: !1 },
    modal: { type: Boolean, default: !1 }
  },
  setup(e, { expose: t }) {
    const n = e, { backdrop: s, disableOutsideClick: o, modal: i, size: r, btnSize: a } = xe(n), l = () => document.querySelectorAll("dialog[open]").length, c = 1056, d = L(c), f = L(!1), p = L(!1), h = L(!1), m = L(), v = L(!1), g = I(() => Aa(r.value, "modal-")), _ = I(() => Aa(a.value, "btn-")), S = I(() => ({
      opening: f.value,
      closing: p.value,
      "no-backdrop": s.value === !1,
      static: v.value
    }));
    let b = null;
    const O = () => {
      const R = l();
      d.value = c + R;
    }, w = kS(), N = async () => (O(), w.removeStickyElements(), f.value = !0, m.value.addEventListener(
      "animationend",
      () => {
        f.value = !1, h.value = !0;
      },
      { once: !0 }
    ), i.value === !0 ? m.value.showModal() : m.value.show(), new Promise((R, V) => {
      b = R;
    })), C = async (R = !1) => {
      p.value = !0, m.value.addEventListener(
        "animationend",
        () => {
          m.value.close(), p.value = !1, h.value = !1, typeof b == "function" && b(R), b = null, w.restoreStickyElements();
        },
        { once: !0 }
      );
    }, k = async () => {
      h.value === !0 ? C() : N();
    }, x = () => {
      v.value = !0, setTimeout(() => {
        v.value = !1;
      }, 200);
    }, $ = () => {
      if (s.value === "static" || o.value === !0) {
        x();
        return;
      }
      C(!1);
    };
    if (i.value === !0) {
      let R = function(j) {
        if (s.value === "static" || o.value === !0) {
          x();
          return;
        }
        j.target === m.value && C(!1);
      };
      const V = new AbortController();
      Mt(() => {
        document.addEventListener("click", (j) => {
          R(j);
        }, { signal: V.signal });
      }), fr(() => {
        V.abort();
      });
    }
    const M = { show: N, hide: C, toggle: k, dialog: m };
    return t({
      show: N,
      hide: C,
      toggle: k
    }), (R, V) => (y(), E("div", {
      class: "dialog-wrapper",
      style: fs({ zIndex: d.value })
    }, [
      u("div", {
        class: "backdrop",
        onClick: $
      }),
      u("dialog", {
        ref_key: "dialog",
        ref: m,
        class: Te(S.value)
      }, [
        u("div", {
          class: Te(["content", g.value])
        }, [
          ye(R.$slots, "header", Ft(Ut({ ...M })), () => [
            u("div", gV, [
              u("div", yV, [
                ye(R.$slots, "title", Ft(Ut({ ...M })), () => [
                  se(H(R.title), 1)
                ], !0),
                ye(R.$slots, "header-close-button", {}, () => [
                  u("button", {
                    class: "ms-auto",
                    type: "button",
                    "data-btn-close": "",
                    "aria-label": "Close",
                    onClick: V[0] || (V[0] = (j) => C(!1))
                  })
                ], !0)
              ])
            ])
          ], !0),
          u("div", _V, [
            ye(R.$slots, "default", Ft(Ut({ ...M })), () => [
              se(H(R.body), 1)
            ], !0)
          ]),
          ye(R.$slots, "footer", Ft(Ut({ ...M })), () => [
            u("div", bV, [
              u("div", EV, [
                R.okOnly ? ae("", !0) : (y(), E("button", {
                  key: 0,
                  type: "button",
                  class: Te(["btn btn-secondary", _.value]),
                  onClick: V[1] || (V[1] = (j) => C(!1))
                }, [
                  ye(R.$slots, "textCancel", Ft(Ut({ ...M })), () => [
                    se(H(R.textCancel), 1)
                  ], !0)
                ], 2)),
                u("button", {
                  type: "button",
                  class: Te(["btn btn-primary", _.value]),
                  onClick: V[2] || (V[2] = (j) => C(!0))
                }, [
                  ye(R.$slots, "textOk", Ft(Ut({ ...M })), () => [
                    se(H(R.textOk), 1)
                  ], !0)
                ], 2)
              ])
            ])
          ], !0)
        ], 2)
      ], 2)
    ], 4));
  }
}), IS = /* @__PURE__ */ Do(SV, [["__scopeId", "data-v-0990c791"]]), wV = /* @__PURE__ */ Cn({
  __name: "DialogManager",
  setup(e, { expose: t }) {
    const n = L(void 0), s = L({});
    function o(r = {}) {
      var a;
      return r.okOnly = !1, s.value = r, (a = n.value) == null ? void 0 : a.show();
    }
    function i(r = {}) {
      var a;
      return r.okOnly = !0, s.value = r, (a = n.value) == null ? void 0 : a.show();
    }
    return t({ confirm: o, alert: i }), (r, a) => (y(), le(Ss, { to: "body" }, [
      F(IS, On({
        ref_key: "modalRef",
        ref: n
      }, { ...s.value }), null, 16)
    ]));
  }
}), NV = { "data-first": "" }, OV = ["disabled", "innerHTML"], xV = { "data-prev": "" }, CV = ["disabled", "innerHTML"], TV = { key: 0 }, $V = ["innerHTML"], kV = ["onClick"], DV = { "data-next": "" }, IV = ["disabled", "innerHTML"], RV = { "data-last": "" }, AV = ["disabled", "innerHTML"], MV = /* @__PURE__ */ Cn({
  __name: "Pagination",
  props: {
    modelValue: { default: 1 },
    perPage: { default: 5 },
    maxVisibleButtons: { default: 5 },
    totalItems: { default: 0 },
    hideEllipsis: { type: Boolean, default: !1 },
    hideGotoEndButtons: { type: Boolean, default: !1 },
    firstText: { default: "«" },
    prevText: { default: "‹" },
    nextText: { default: "›" },
    lastText: { default: "»" },
    ellipsisText: { default: "…" },
    size: { default: Co.STANDARD }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    function n(b, O = 0) {
      return [...Array(b).keys()].map((w) => w + O);
    }
    const s = t, o = e, { modelValue: i, maxVisibleButtons: r, hideEllipsis: a } = xe(o), l = Math.floor(r.value / 2), c = I(() => {
      let b = r.value, O = i.value <= l ? 1 : i.value - l;
      return i.value >= p.value - l && (O = p.value - b + 1), O < 1 && (O = 1), p.value < b && (b = p.value), n(b, O);
    }), d = I(() => i.value <= 1), f = I(() => i.value >= p.value), p = I(() => {
      const { perPage: b, totalItems: O } = o;
      return Math.ceil(O / b);
    });
    tn(() => {
      p.value > 0 && i.value > p.value && s("update:modelValue", p.value);
    });
    function h(b) {
      const O = r.value - 1;
      return !(a.value === !0 || b === 0 && i.value - l - 1 <= 0 || b === O && i.value + l >= p.value || b > 0 && b < O);
    }
    function m(b) {
      b < 1 && (b = 1), b > p.value && (b = p.value), s("update:modelValue", b);
    }
    function v() {
      s("update:modelValue", 1);
    }
    function g() {
      s("update:modelValue", p.value);
    }
    function _() {
      let b = i.value - 1;
      b < 1 && (b = 1), s("update:modelValue", b);
    }
    function S() {
      let b = i.value + 1;
      b > p.value && (b = p.value), s("update:modelValue", b);
    }
    return (b, O) => (y(), E("ul", {
      class: Te(["pagination", b.size])
    }, [
      u("li", NV, [
        u("button", {
          class: "",
          disabled: d.value,
          innerHTML: b.firstText,
          onClick: v
        }, null, 8, OV)
      ]),
      u("li", xV, [
        u("button", {
          class: "",
          disabled: d.value,
          innerHTML: b.prevText,
          onClick: _
        }, null, 8, CV)
      ]),
      (y(!0), E(J, null, Ee(c.value, (w, N) => (y(), E(J, null, [
        h(N) ? (y(), E("li", TV, [
          u("button", {
            disabled: "",
            class: "",
            innerHTML: b.ellipsisText
          }, null, 8, $V)
        ])) : (y(), E("li", {
          key: 1,
          "data-prev": "",
          class: Te({ active: b.modelValue === w })
        }, [
          u("button", {
            class: "",
            onClick: (C) => m(w)
          }, H(w), 9, kV)
        ], 2))
      ], 64))), 256)),
      u("li", DV, [
        u("button", {
          class: "",
          disabled: f.value,
          innerHTML: b.nextText,
          onClick: S
        }, null, 8, IV)
      ]),
      u("li", RV, [
        u("button", {
          class: "",
          disabled: f.value,
          innerHTML: b.lastText,
          onClick: g
        }, null, 8, AV)
      ])
    ], 2));
  }
}), PV = /* @__PURE__ */ Do(MV, [["__scopeId", "data-v-2bfd7085"]]), VV = { class: "d-inline" }, LV = { class: "fw-bold" }, FV = /* @__PURE__ */ Cn({
  __name: "PageSizeDropdown",
  props: {
    options: { default: () => [25, 50, 100] },
    modelValue: { default: 50 }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, s = t, { options: o } = xe(n), i = I({
      get: () => n.modelValue,
      set: (r) => s("update:modelValue", r)
    });
    return (r, a) => {
      const l = be("b-dropdown-item"), c = be("b-dropdown");
      return y(), le(c, On({
        variant: "outline-primary",
        size: "sm"
      }, { ...r.$attrs }), {
        button: K(() => [
          u("div", VV, [
            ye(r.$slots, "default", { selected: i.value }, () => [
              a[0] || (a[0] = u("span", null, "Per page: ", -1)),
              u("span", LV, H(i.value), 1)
            ])
          ])
        ]),
        default: K(() => [
          (y(!0), E(J, null, Ee(T(o), (d, f) => (y(), le(l, {
            key: d,
            onClick: (p) => i.value = d,
            active: d === r.modelValue
          }, {
            default: K(() => [
              se(H(d), 1)
            ]),
            _: 2
          }, 1032, ["onClick", "active"]))), 128))
        ]),
        _: 3
      }, 16);
    };
  }
}), UV = ["value"], jV = /* @__PURE__ */ Cn({
  __name: "PageSizeSelect",
  props: {
    options: { default: () => [25, 50, 100] },
    modelValue: { default: 50 }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, s = t, { options: o } = xe(n), i = I({
      get: () => n.modelValue,
      set: (r) => s("update:modelValue", r)
    });
    return (r, a) => P((y(), E("select", {
      "onUpdate:modelValue": a[0] || (a[0] = (l) => i.value = l)
    }, [
      (y(!0), E(J, null, Ee(T(o), (l, c) => (y(), E("option", {
        key: l,
        value: l
      }, H(l), 9, UV))), 128))
    ], 512)), [
      [Zt, i.value]
    ]);
  }
});
var ri = /* @__PURE__ */ ((e) => (e.ASC = "ASC", e.DESC = "DESC", e.IGNORE = "IGNORE", e))(ri || {});
class BV {
  constructor(t, n = "ASC", s) {
    eo(this, "key"), eo(this, "direction"), eo(this, "sortFn"), this.key = t, this.direction = n, this.sortFn = s;
  }
}
const g_ = (e, t) => {
  const n = (a, l) => {
    let c = typeof a, d = typeof l;
    return c == "number" && c == d;
  }, s = (a, l) => a - l, o = (a, l) => (a = a ?? "", l = l ?? "", a.localeCompare(l)), i = (a, l) => n(a, l) ? s : o, r = [...t];
  return r.sort((a, l) => {
    let c = 0;
    for (let d of e) {
      let { key: f, direction: p, sortFn: h } = d, m = p === "ASC" ? 1 : -1, v = a[f], g = l[f];
      if (h = typeof h == "function" ? h : i(v, g), c = h(v, g, a, l, t, d, m) * m, c !== 0) return c;
    }
    return c;
  }), r;
}, HV = ["onClick"], YV = { class: "th-wrapper" }, WV = {
  key: 0,
  "data-sort-indicator": ""
}, GV = { class: "sort-index" }, zV = { class: "sort-direction" }, KV = ["onMouseover"], XV = {
  key: 0,
  class: "p-5 text-muted font-italic"
}, qV = ["colspan"], JV = ["innerHTML"];
class Yp {
  constructor(t = "", n = "", s = !1, o) {
    eo(this, "key"), eo(this, "label"), eo(this, "sortable"), eo(this, "sortFn"), this.key = t, this.label = n, this.sortable = s, this.sortFn = o;
  }
}
const QV = /* @__PURE__ */ Cn({
  __name: "Table",
  props: {
    fields: { default: () => [] },
    items: { default: () => [] },
    striped: { type: Boolean, default: !1 },
    hover: { type: Boolean, default: !0 },
    externalSort: { type: Boolean, default: !1 },
    showEmpty: { type: Boolean, default: !1 },
    emptyText: { default: "nothing to display" }
  },
  emits: ["sort", "onMouseOverCell"],
  setup(e, { emit: t }) {
    const n = (v) => {
      let g = [];
      for (const _ of v)
        g = g.concat(Object.keys(_));
      return g = g.filter((_, S) => g.indexOf(_) == S), g;
    }, s = t, o = e, i = L([]), { fields: r, items: a } = xe(o), l = I(() => {
      if (o.externalSort || i.value.length == 0) return o.items;
      const v = [...o.items];
      return g_(i.value, v);
    }), c = I(() => {
      let v = r.value, g = [];
      return v.length === 0 && (v = n([...a.value])), v.reduce((_, S, b) => {
        if (typeof S == "string")
          _.push(new Yp(S, S));
        else if (S instanceof Yp)
          _.push(S);
        else if (typeof S == "object") {
          const { key: O, label: w, sortable: N, sortFn: C } = S;
          _.push(new Yp(O, w, N, C));
        }
        return _;
      }, g);
    });
    function d(v) {
      const g = i.value.findIndex((_) => _.key === v.key);
      return g < 0 ? "" : g + 1;
    }
    function f(v) {
      const g = i.value.findIndex((S) => S.key === v.key);
      if (g < 0) return "fas fa-sort";
      const _ = i.value[g];
      return _.direction === ri.ASC ? "fas fa-sort-up" : _.direction === ri.DESC ? "fas fa-sort-down" : "far fa-exclamation-triangle";
    }
    function p(v) {
      const { key: g } = v, _ = i.value.findIndex((S) => S.key === g);
      if (_ < 0) {
        const S = new BV(g, ri.ASC, v.sortFn);
        i.value.push(S);
      } else {
        const S = i.value[_], b = S.direction;
        b === ri.ASC ? S.direction = ri.DESC : b === ri.DESC && i.value.splice(_, 1);
      }
      s("sort", i.value, g_);
    }
    function h(v, g, _, S) {
      s("onMouseOverCell", v, g, _, S);
    }
    let m = L(null);
    return Mt(() => {
      m.value = un();
    }), (v, g) => (y(), E("table", On({ ...v.$attrs }, {
      class: { striped: v.striped, hover: v.hover }
    }), [
      u("thead", null, [
        (y(!0), E(J, null, Ee(c.value, (_) => (y(), E("th", {
          key: `thead-${_.key}`,
          class: Te({ sortable: _.sortable }),
          onClick: (S) => _.sortable && p(_)
        }, [
          u("span", YV, [
            ye(v.$slots, `head(${_.key})`, {
              field: _,
              data: T(m),
              value: _.label
            }, () => [
              se(H(_.label), 1)
            ], !0),
            _.sortable ? (y(), E("span", WV, [
              u("span", GV, H(d(_)), 1),
              u("span", zV, [
                u("i", {
                  class: Te(f(_))
                }, null, 2)
              ])
            ])) : ae("", !0)
          ])
        ], 10, HV))), 128))
      ]),
      u("tbody", null, [
        (y(!0), E(J, null, Ee(l.value, (_, S) => (y(), E(J, {
          key: `trow-${(_ == null ? void 0 : _.id) ?? S}`
        }, [
          ye(v.$slots, "row", {
            item: _,
            index: S,
            colspan: c.value.length
          }, void 0, !0),
          u("tr", null, [
            (y(!0), E(J, null, Ee(c.value, (b) => (y(), E("td", {
              key: `tcell-${b.key + ((_ == null ? void 0 : _.id) ?? S)}`,
              class: Te({ [`tcell-${b == null ? void 0 : b.key}`]: !0 }),
              onMouseover: (O) => h(O, _, S, b)
            }, [
              ye(v.$slots, `cell(${b == null ? void 0 : b.key})`, {
                data: T(m),
                item: _,
                field: b,
                value: _[b == null ? void 0 : b.key]
              }, () => [
                se(H(_[b == null ? void 0 : b.key]), 1)
              ], !0)
            ], 42, KV))), 128))
          ])
        ], 64))), 128))
      ]),
      u("tfoot", null, [
        ye(v.$slots, "footer", { data: T(m) }, void 0, !0)
      ]),
      v.showEmpty && l.value.length === 0 ? (y(), E("tr", XV, [
        u("td", {
          colspan: c.value.length
        }, [
          ye(v.$slots, "empty", {
            items: l.value,
            data: T(m),
            fields: c.value
          }, () => [
            u("span", { innerHTML: v.emptyText }, null, 8, JV)
          ], !0)
        ], 8, qV)
      ])) : ae("", !0)
    ], 16));
  }
}), ZV = /* @__PURE__ */ Do(QV, [["__scopeId", "data-v-b1e9b5de"]]);
var RS = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e.WARNING = "warning", e.DANGER = "danger", e.INFO = "info", e))(RS || {});
const eL = { class: "d-inline-block position-relative" }, tL = ["disabled"], y_ = "data-prevent-close", nL = /* @__PURE__ */ Cn({
  __name: "Dropdown",
  props: {
    text: { default: "" },
    variant: { default: RS.PRIMARY },
    right: { type: Boolean, default: !1 },
    top: { type: Boolean, default: !1 },
    centered: { type: Boolean },
    dropup: { type: Boolean },
    dropend: { type: Boolean },
    dropstart: { type: Boolean },
    menuEnd: { type: Boolean, default: !1 },
    size: { default: Co.STANDARD },
    disabled: { type: Boolean }
  },
  emits: ["open", "close", "toggle"],
  setup(e, { expose: t, emit: n }) {
    const s = L(), o = e, i = L(), r = L(!1), a = L(o.variant), l = L(o.centered), c = L(o.dropup), d = L(o.dropend), f = L(o.dropstart), p = L(o.menuEnd), h = n, m = I(() => {
      const k = [];
      return a != null && a.value && k.push(`btn-${a.value}`), o.size && k.push(`btn-${o.size}`), k;
    }), v = I(() => {
      const k = [];
      return l != null && l.value && k.push("dropdown-center"), c != null && c.value && k.push("dropup"), f != null && f.value && k.push("dropstart"), !(f != null && f.value) && d != null && d.value && k.push("dropend"), k.length === 0 && k.push("dropdown"), k.unshift("btn-group"), k;
    }), g = I(() => {
      const k = [];
      return r.value && k.push("show"), p.value && k.push("dropdown-menu-end"), k;
    }), _ = () => {
      if (!r.value) return;
      const k = i.value.getBoundingClientRect(), x = s.value.getBoundingClientRect(), $ = window.innerHeight - k.bottom, M = k.top, R = window.innerWidth - k.right, V = k.left;
      c.value = $ < x.height && M >= x.height, p.value = R < x.width && V >= x.width;
    };
    async function S() {
      r.value = !0, await rr(), _();
    }
    function b() {
      r.value = !1;
    }
    function O(k) {
      r.value ? b() : S();
    }
    function w(k) {
      const { target: x } = k;
      x != null && x.closest(`[${y_}],[${y_}=true]`) || b();
    }
    function N() {
      r.value && b();
    }
    ht(r, (k, x) => {
      typeof x > "u" || k !== x && (h("toggle", { show: k }), k === !0 ? h("open", { show: k }) : h("close", { show: k }));
    }, { immediate: !0 });
    const C = {
      show: r,
      disabled: o.disabled,
      buttonClasses: m,
      onButtonClicked: O,
      onMenuClicked: w,
      onClickOutside: N,
      open: S,
      close: b
    };
    return t({
      ...C
    }), (k, x) => {
      const $ = Bt("click-outside");
      return y(), E("div", {
        ref_key: "dropDownRef",
        ref: i,
        class: Te([v.value, "dropdown-wrapper"])
      }, [
        P((y(), E("div", eL, [
          ye(k.$slots, "header", Ft(Ut({ ...C })), () => [
            u("button", {
              class: Te(["btn dropdown-toggle", m.value]),
              type: "button",
              "aria-expanded": "false",
              onClick: O,
              disabled: k.disabled
            }, [
              ye(k.$slots, "button", Ft(Ut({ ...C })), () => [
                se(H(k.text), 1)
              ], !0)
            ], 10, tL)
          ], !0),
          u("ul", {
            ref_key: "dropDownMenuRef",
            ref: s,
            class: Te(["dropdown-menu", g.value]),
            onClick: w
          }, [
            ye(k.$slots, "default", Ft(Ut({ ...C })), void 0, !0)
          ], 2)
        ])), [
          [$, N]
        ])
      ], 2);
    };
  }
}), sL = /* @__PURE__ */ Do(nL, [["__scopeId", "data-v-4910c394"]]), oL = ["data-prevent-close"], rL = /* @__PURE__ */ Cn({
  __name: "DropdownItem",
  props: {
    active: { type: Boolean },
    preventClose: { type: Boolean }
  },
  setup(e) {
    const t = e, { preventClose: n } = xe(t);
    return (s, o) => (y(), E("li", {
      "data-prevent-close": T(n) ? "" : null
    }, [
      u("span", {
        class: Te(["dropdown-item", { active: s.active }]),
        role: "button",
        tabindex: "0"
      }, [
        ye(s.$slots, "default")
      ], 2)
    ], 8, oL));
  }
}), iL = {}, aL = { "data-prevent-close": "" }, lL = { class: "dropdown-header" };
function cL(e, t) {
  return y(), E("li", aL, [
    u("h6", lL, [
      ye(e.$slots, "default")
    ])
  ]);
}
const uL = /* @__PURE__ */ Do(iL, [["render", cL]]), dL = {};
function fL(e, t) {
  return y(), E("li", null, t[0] || (t[0] = [
    u("hr", { class: "dropdown-divider" }, null, -1)
  ]));
}
const pL = /* @__PURE__ */ Do(dL, [["render", fL]]), hL = {
  mounted(e, t, n, s) {
    new bootstrap.Tooltip(e, {
      title: t.value,
      placement: t.arg,
      trigger: "hover"
    });
  }
}, mL = (e, t) => {
  function n(i, r) {
    for (; i !== null; ) {
      if (i === r)
        return !0;
      i = i.parentNode;
    }
    return !1;
  }
  const s = new AbortController();
  function o(i, r) {
    document.addEventListener("click", function(a) {
      const l = a.target;
      i && (n(l, i) || r());
    }, { signal: s.signal });
  }
  return o(e, t), s;
}, vL = {
  mounted(e, t, n, s) {
    const o = t.value;
    mL(e, o);
  }
};
class cm {
  static add(t) {
    this.list.add(t), document.body.classList.add("drawer-open");
  }
  static delete(t) {
    this.list.delete(t), this.list.size === 0 && document.body.classList.remove("drawer-open");
  }
}
eo(cm, "list", /* @__PURE__ */ new Set());
const gL = { class: "drawer-content" }, yL = { class: "drawer-header" }, _L = ["innerHTML"], bL = { class: "drawer-body" }, EL = ["innerHTML"], SL = { class: "drawer-footer" }, wL = ["innerHTML"], NL = ["innerHTML"], OL = /* @__PURE__ */ Cn({
  __name: "Drawer",
  props: {
    title: { default: "" },
    body: { default: "" },
    textCancel: { default: "Cancel" },
    textOk: { type: [String, Boolean], default: "Ok" },
    backdrop: { type: [Boolean, String], default: "static" },
    keyboard: { type: Boolean, default: !0 },
    focus: { type: Boolean, default: !0 },
    disableOutsideClick: { type: Boolean },
    okOnly: { type: Boolean, default: !1 },
    size: { default: Co.STANDARD },
    btnSize: { default: Co.SMALL },
    lazy: { type: Boolean, default: !1 }
  },
  setup(e, { expose: t }) {
    const n = e, {
      backdrop: s,
      keyboard: o,
      focus: i,
      size: r,
      btnSize: a
    } = xe(n), l = I(() => Aa(r.value, "drawer-")), c = I(() => Aa(a.value, "btn-")), d = L(), f = L(!1), p = un();
    let h;
    async function m() {
      return f.value === !0 ? void 0 : new Promise((N, C) => {
        f.value = !0, h = N;
      });
    }
    function v(N = !0) {
      f.value = !1, typeof h == "function" && h(N);
    }
    function g() {
      f.value === !0 ? m() : v(!1);
    }
    function _(N) {
      (s == null ? void 0 : s.value) !== "static" && v(!1);
    }
    function S() {
      v(!1);
    }
    function b() {
      v(!1);
    }
    function O() {
      v(!0);
    }
    function w() {
      f.value === !0 ? cm.add(p) : cm.delete(p);
    }
    return t({
      show: m,
      hide: v,
      toggle: g
    }), (N, C) => (y(), le(TE, {
      onBeforeEnter: w,
      onAfterLeave: w
    }, {
      default: K(() => [
        f.value ? (y(), E("div", On({
          key: 0,
          ref_key: "drawerElement",
          ref: d,
          class: "drawer",
          tabindex: "-1"
        }, { ...N.$attrs }, {
          onClick: Vt(_, ["self"])
        }), [
          u("div", {
            class: Te(["drawer-dialog", l.value])
          }, [
            u("div", gL, [
              u("div", yL, [
                ye(N.$slots, "header", {}, () => [
                  u("h5", {
                    class: "drawer-title",
                    innerHTML: N.title
                  }, null, 8, _L)
                ], !0),
                u("button", {
                  type: "button",
                  class: "btn-close",
                  "aria-label": "Close",
                  onClick: S
                })
              ]),
              u("div", bL, [
                ye(N.$slots, "default", {}, () => [
                  u("span", { innerHTML: N.body }, null, 8, EL)
                ], !0)
              ]),
              u("div", SL, [
                ye(N.$slots, "footer", {}, () => [
                  N.okOnly ? ae("", !0) : (y(), E("button", {
                    key: 0,
                    type: "button",
                    class: Te(["ms-auto btn btn-secondary", c.value]),
                    onClick: b
                  }, [
                    ye(N.$slots, "button-cancel", {}, () => [
                      u("span", { innerHTML: N.textCancel }, null, 8, wL)
                    ], !0)
                  ], 2)),
                  u("button", {
                    type: "button",
                    class: Te(["btn btn-primary", c.value]),
                    onClick: O
                  }, [
                    ye(N.$slots, "button-ok", {}, () => [
                      u("span", { innerHTML: N.textOk }, null, 8, NL)
                    ], !0)
                  ], 2)
                ], !0)
              ])
            ])
          ], 2)
        ], 16)) : ae("", !0)
      ]),
      _: 3
    }));
  }
}), xL = /* @__PURE__ */ Do(OL, [["__scopeId", "data-v-2e49e8cb"]]), xs = "b", AS = "$toaster", MS = "$modalManager", PS = "$dialogManager";
class VS {
  static getComponent() {
    if (!this.component) {
      const t = document.createElement("div");
      document.body.appendChild(t);
      const n = xn(vV).mount(t);
      this.component = n;
    }
    return this.component;
  }
}
eo(VS, "component");
class LS {
  static getComponent() {
    if (!this.component) {
      const t = document.createElement("div");
      document.body.appendChild(t);
      const n = xn(wV).mount(t);
      this.component = n;
    }
    return this.component;
  }
}
eo(LS, "component");
class FS {
  static getComponent() {
    if (!this.component) {
      const t = document.createElement("div");
      document.body.appendChild(t);
      const n = xn(iV).mount(t);
      this.component = n;
    }
    return this.component;
  }
}
eo(FS, "component");
function Dn() {
  return Ie(AS);
}
function Ns() {
  return Ie(MS);
}
function CL() {
  return Ie(PS);
}
function TL(e) {
  e.component(`${xs}-drawer`, xL), e.component(`${xs}-modal`, DS), e.component(`${xs}-dialog`, IS), e.component(`${xs}-pagination`, PV), e.component(`${xs}-pagination-dropdown`, FV), e.component(`${xs}-pagination-select`, jV), e.component(`${xs}-dropdown`, sL), e.component(`${xs}-dropdown-item`, rL), e.component(`${xs}-dropdown-header`, uL), e.component(`${xs}-dropdown-divider`, pL), e.component(`${xs}-table`, ZV), e.component(`${xs}-toast`, $S);
}
function $L(e) {
  e.directive("tooltip", hL), e.directive("click-outside", vL);
}
const js = {
  install(e) {
    TL(e), $L(e);
    const t = FS.getComponent(), n = VS.getComponent(), s = LS.getComponent();
    e.provide(AS, t), e.provide(MS, n), e.provide(PS, s);
  }
}, Zoe = async (e) => {
  KP();
  const t = xn(nA);
  return t.use(zi()), t.use(js), t.use(lm), t.mount(e), t;
}, ere = async (e) => {
  const t = xn(uA);
  return t.use(zi()), t.use(js), t.mount(e), t;
};
function Za(e, t = 300) {
  let n;
  return function(...s) {
    n && clearTimeout(n);
    const o = this;
    n = setTimeout(() => {
      e.apply(o, s);
    }, t);
  };
}
function kL(e, t = 0, n = 100) {
  return Math.min(Math.max(e, t), n);
}
function lr(e, t) {
  if (Array.isArray(e) && Array.isArray(t)) {
    if (e.length !== t.length)
      return !1;
    for (let o = 0; o < e.length; o++)
      if (!lr(e[o], t[o]))
        return !1;
    return !0;
  }
  if (typeof e != "object" || typeof t != "object" || e == null || t == null)
    return e === t;
  const n = Object.keys(e), s = Object.keys(t);
  if (n.length !== s.length)
    return !1;
  for (const o of n)
    if (!s.includes(o) || !lr(e[o], t[o]))
      return !1;
  return !0;
}
const to = (e, t = /* @__PURE__ */ new WeakMap()) => {
  if (e === null || typeof e != "object")
    return e;
  if (t.has(e))
    return t.get(e);
  let n;
  if (Array.isArray(e))
    n = [], t.set(e, n), e.forEach((s, o) => {
      n[o] = to(s, t);
    });
  else {
    n = e.constructor ? new e.constructor() : /* @__PURE__ */ Object.create(null), t.set(e, n);
    for (const s in e)
      s in e && (n[s] = to(e[s], t));
  }
  return n;
}, jv = () => "10000000-1000-4000-8000-100000000000".replace(
  /[018]/g,
  (e) => (e ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> e / 4).toString(16)
), DL = (e) => {
  if (typeof e == "string") {
    const t = e.toLowerCase();
    if (t === "true")
      return !0;
    if (t === "false" || t === "0")
      return !1;
  } else if (typeof e == "number")
    return e !== 0;
  return !!e;
}, IL = (e) => {
  const t = e.getBoundingClientRect();
  return t.top >= 0 && t.left >= 0 && t.bottom <= (window.innerHeight || document.documentElement.clientHeight) && t.right <= (window.innerWidth || document.documentElement.clientWidth);
}, RL = (e) => {
  const t = document.createElement("div");
  return t.innerHTML = e, t.textContent || t.innerText || "";
}, us = Object.freeze({
  WAITING: "waiting",
  PROCESSING: "processing",
  COMPLETED: "completed",
  ERROR: "error",
  WARNING: "warning",
  CANCELED: "canceled"
});
var wc, qd, US;
class AL {
  constructor(t = "") {
    ol(this, qd);
    ol(this, wc);
    vp(this, wc, t);
  }
  get defaultConfig() {
    return {
      method: "GET",
      headers: {
        "Content-Type": "application/json",
        "X-Requested-With": "XMLHttpRequest"
      }
      // add an abort signal
      // signal: abortController.signal,
    };
  }
  getFullURL(t) {
    return new URL(t, Ji(this, wc));
  }
  makeRequest(t) {
    const n = this.getFullURL(t);
    return (o) => {
      let i = Mg(this, qd, US).call(this, n, this.defaultConfig, o);
      return new Promise((a, l) => {
        fetch(n, i).then(async (c) => {
          var p;
          const f = ((p = c.headers.get("content-type")) == null ? void 0 : p.includes("application/json")) ? await c.json() : null;
          if (!c.ok) {
            const h = f && f.message || c.status;
            return l(h);
          }
          a(f);
        }).catch((c) => {
          console.error("Error fetching data:", c), l(c);
        });
      });
    };
  }
  /**
   * use this function in a derived class to
   * override the global params
   * 
   * @param {Object} params 
   * @returns 
   */
  visitGlobalParams(t) {
    return t;
  }
  get globalQueryParams() {
    let t = new URLSearchParams(location.search), n = {};
    for (let [s, o] of t.entries())
      n[s] = o;
    return window.redcap_csrf_token && (n.redcap_csrf_token = window.redcap_csrf_token), n = this.visitGlobalParams(n), n;
  }
  async send(t, n) {
    return this.makeRequest(t)(n);
  }
}
wc = new WeakMap(), qd = new WeakSet(), US = function(t, n, s) {
  for (let [o, i] of Object.entries(s))
    switch (o) {
      case "data":
        if (i instanceof FormData) {
          let c = {};
          const d = i;
          for (let [f, p] of d.entries())
            f in c ? (Array.isArray(c[f]) || (c[f] = [c[f]]), c[f].push(p)) : c[f] = p;
          n.body = JSON.stringify(c);
        } else
          n.body = JSON.stringify(i);
        break;
      case "params":
        const a = { ...this.globalQueryParams, ...i }, l = t.searchParams;
        for (const [c, d] of Object.entries(a))
          l.set(c, d);
        break;
      default:
        n[o] = i;
        break;
    }
  return n;
};
var Jd;
class ML extends AL {
  constructor() {
    super(...arguments);
    ol(this, Jd, ["pid"]);
  }
  visitGlobalParams(n) {
    const s = {};
    for (const [o, i] of Object.entries(n))
      Ji(this, Jd).includes(o) || (s[o] = i);
    return s;
  }
}
Jd = new WeakMap();
let um = "";
window.app_path_webroot_full ? um = `${window.app_path_webroot_full}redcap_v${window.redcap_version}/` : um = `${location.protocol}//${location.host}/api`;
const Wp = new ML(um), jl = mt({
  loading: !1,
  data: [],
  metadata: {},
  list: [],
  //
  async fetchMessages(e = 0, t = 0, n = "") {
    try {
      this.loading = !0;
      const s = {
        route: "QueueController:getList",
        page: e,
        perPage: t,
        query: n
      }, o = await Wp.send("", { params: s, method: "GET" }), { data: i, metadata: r } = o;
      this.data = i, this.metadata = r;
    } catch (s) {
      console.log(s);
    } finally {
      this.loading = !1;
    }
  },
  async updatePriority(e, t) {
    try {
      const n = {
        route: "QueueController:setPriority"
      }, s = { ID: e, priority: t }, o = await Wp.send("", { method: "POST", params: n, data: s }), { data: i } = o;
      return !0;
    } catch {
      return !1;
    } finally {
    }
  },
  async deleteMessage(e) {
    try {
      const t = {
        route: "QueueController:deleteMessage"
      }, n = { ID: e }, s = await Wp.send("", { method: "DELETE", params: t, data: n }), { data: o } = s;
      return !0;
    } catch {
      return !1;
    } finally {
    }
  }
}), Cr = Object.freeze({
  ASC: "ASC",
  DESC: "DESC",
  IGNORE: "IGNORE"
});
class PL {
  constructor(t, n = Cr.ASC, s = null) {
    qe(this, "key");
    qe(this, "direction");
    qe(this, "sortFn");
    this.key = t, this.direction = n, this.sortFn = s;
  }
}
const __ = (e, t) => {
  const n = (a, l) => {
    let c = typeof a, d = typeof l;
    return c == "number" && c == d;
  }, s = (a, l) => a - l, o = (a, l) => (a = a ?? "", l = l ?? "", a.localeCompare(l)), i = (a, l) => n(a, l) ? s : o, r = [...t];
  return r.sort((a, l) => {
    let c = 0;
    for (let d of e) {
      let { key: f, direction: p, sortFn: h } = d, m = p === Cr.ASC ? 1 : -1, v = a[f], g = l[f];
      if (h = typeof h == "function" ? h : i(v, g), c = h(v, g, a, l, t, d, m) * m, c !== 0) return c;
    }
    return c;
  }), r;
};
class VL {
  constructor(t) {
    qe(this, "key", "");
    // age
    qe(this, "label", "");
    // Person age
    qe(this, "sortable", !1);
    // true
    /**
     * optional sorting logic for the field
     * a sort function accepts 2 parameters (a,b)
     * and follows the sorting rules
     */
    qe(this, "sortFn", null);
    typeof t == "string" ? (this.key = t, this.label = t) : (this.key = t == null ? void 0 : t.key, this.label = t == null ? void 0 : t.label, this.sortable = (t == null ? void 0 : t.sortable) || !1, this.sortFn = (t == null ? void 0 : t.sortFn) || null);
  }
}
const LL = (e) => {
  let t = [];
  for (const n of e)
    t = t.concat(Object.keys(n));
  return t = t.filter((n, s) => t.indexOf(n) == s), t;
}, FL = {
  emits: ["sort"],
  setup(e, t) {
    const n = L([]), s = I(() => {
      if (e.externalSort || n.value.length == 0) return e.items;
      const l = [...e.items];
      return __(n.value, l);
    }), o = I(() => {
      let l = e.fields;
      return l.length === 0 && (l = LL([...e.items])), l.map((c) => new VL(c));
    });
    function i(l) {
      const c = n.value.findIndex((d) => d.key === l.key);
      return c < 0 ? "" : c + 1;
    }
    function r(l) {
      const c = n.value.findIndex((f) => f.key === l.key);
      if (c < 0) return "fas fa-sort";
      const d = n.value[c];
      return d.direction === Cr.ASC ? "fas fa-sort-up" : d.direction === Cr.DESC ? "fas fa-sort-down" : "far fa-exclamation-triangle";
    }
    function a(l) {
      const { key: c } = l, d = n.value.findIndex((f) => f.key === c);
      if (d < 0) {
        const f = new PL(c, Cr.ASC, l.sortFn);
        n.value.push(f);
      } else {
        const f = n.value[d], p = f.direction;
        p === Cr.ASC ? f.direction = Cr.DESC : p === Cr.DESC && n.value.splice(d, 1);
      }
      t.emit("sort", n.value, __);
    }
    return {
      sorts: n,
      sortedItems: s,
      mapedFields: o,
      sortBy: a,
      sortIndex: i,
      sortIcon: r
    };
  },
  props: {
    fields: { type: Array, default: [] },
    items: { type: Array, default: [] },
    striped: { type: Boolean, default: !1 },
    hover: { type: Boolean, default: !0 },
    externalSort: { type: Boolean, default: !1 },
    // sort externally
    showEmpty: { type: Boolean, default: !1 },
    emptyText: { type: String, default: "nothing to display" }
  }
}, UL = ["onClick"], jL = { class: "th-wrapper" }, BL = {
  key: 0,
  "data-sort-indicator": ""
}, HL = { class: "sort-index" }, YL = { class: "sort-direction" }, WL = {
  key: 0,
  class: "p-5 text-muted font-italic"
}, GL = ["colspan"], zL = ["innerHTML"];
function KL(e, t, n, s, o, i) {
  return y(), E("table", On({ ...e.$attrs }, {
    class: { striped: n.striped, hover: n.hover }
  }), [
    u("thead", null, [
      (y(!0), E(J, null, Ee(s.mapedFields, (r) => (y(), E("th", {
        key: `thead-${r.key}`,
        class: Te({ sortable: r.sortable }),
        onClick: (a) => r.sortable && s.sortBy(r)
      }, [
        u("span", jL, [
          ye(e.$slots, `head(${r.key})`, {
            field: r,
            data: this,
            value: r.label
          }, () => [
            se(H(r.label), 1)
          ], !0),
          r.sortable ? (y(), E("span", BL, [
            u("span", HL, H(s.sortIndex(r)), 1),
            u("span", YL, [
              u("i", {
                class: Te(s.sortIcon(r))
              }, null, 2)
            ])
          ])) : ae("", !0)
        ])
      ], 10, UL))), 128))
    ]),
    u("tbody", null, [
      (y(!0), E(J, null, Ee(s.sortedItems, (r, a) => (y(), E(J, {
        key: `trow-${(r == null ? void 0 : r.id) ?? a}`
      }, [
        ye(e.$slots, "row", {
          item: r,
          index: a,
          colspan: s.mapedFields.length
        }, void 0, !0),
        u("tr", null, [
          (y(!0), E(J, null, Ee(s.mapedFields, (l) => (y(), E("td", {
            key: `tcell-${l.key + ((r == null ? void 0 : r.id) ?? a)}`,
            class: Te({ [`tcell-${l.key}`]: !0 })
          }, [
            ye(e.$slots, `cell(${l.key})`, {
              data: this,
              item: r,
              field: l,
              value: r[l.key]
            }, () => [
              se(H(r[l.key]), 1)
            ], !0)
          ], 2))), 128))
        ])
      ], 64))), 128))
    ]),
    u("tfoot", null, [
      ye(e.$slots, "footer", { data: this }, void 0, !0)
    ]),
    n.showEmpty && s.sortedItems.length === 0 ? (y(), E("tr", WL, [
      u("td", {
        colspan: s.mapedFields.length
      }, [
        ye(e.$slots, "empty", {
          items: s.sortedItems,
          data: this,
          fields: s.mapedFields
        }, () => [
          u("span", { innerHTML: n.emptyText }, null, 8, zL)
        ], !0)
      ], 8, GL)
    ])) : ae("", !0)
  ], 16);
}
const XL = /* @__PURE__ */ he(FL, [["render", KL], ["__scopeId", "data-v-c51981ff"]]);
var gi;
class qL {
  constructor() {
    qe(this, "previousStyle");
    ol(this, gi);
    vp(this, gi, document.querySelector("body"));
  }
  applyStyle(t) {
    this.backupStyle();
    for (const [n, s] of Object.entries(t))
      Ji(this, gi).style[n] = s;
  }
  backupStyle() {
    this.previousStyle = Ji(this, gi).style;
  }
  restoreStyle() {
    this.previousStyle && (Ji(this, gi).style = this.previousStyle);
  }
}
gi = new WeakMap();
const b_ = new qL(), ta = Object.freeze({
  OK: 1,
  CANCEL: 0,
  ERROR: -1
}), hl = Object.freeze({
  small: "300px",
  default: "500px",
  large: "800px",
  extra: "1140px"
});
let ml, fu;
var _o;
let E_ = (_o = class {
  constructor(t, n) {
    this.props = t, this.context = n;
  }
  setup() {
    const t = this, n = this.props, s = this.context, { visible: o, size: i, modelValue: r } = xe(n), a = L(null), l = L(!1), c = L({}), d = I({
      get() {
        return r.value;
      },
      set(O) {
        s.emit("update:modelValue", O);
      }
    });
    ht(
      o,
      function(O) {
        O === !0 ? f() : p();
      },
      { immediate: !0 }
    ), ht(
      i,
      function(O) {
        let w = (hl == null ? void 0 : hl[O]) ?? hl.Default;
        c.value["--modal-width"] = w;
      },
      { immediate: !0 }
    );
    async function f() {
      return l.value ? void 0 : (_o.openModals.size === 0 && b_.applyStyle({ overflow: "hidden" }), l.value = !0, await b(), _o.openModals.add(t), s.emit("show", s), new Promise((w, N) => {
        ml = w, fu = N;
      }));
    }
    async function p(O = ta.CANCEL) {
      if (await b(!1), !!l.value && (l.value = !1, s.emit("hide", s, O), _o.openModals.delete(t), _o.openModals.size === 0 && b_.restoreStyle(), !(!ml || !fu))) {
        switch (O) {
          case ta.OK:
            ml(!0);
            break;
          case ta.CANCEL:
            ml(!1);
            break;
          case ta.ERROR:
            fu(!0);
            break;
        }
        ml = fu = null;
      }
    }
    function h() {
      return l ? p() : f();
    }
    function m() {
      p(ta.CANCEL);
    }
    function v(O) {
      n.disableOutsideClick || m();
    }
    function g(O) {
      m();
    }
    function _(O) {
      m();
    }
    function S(O) {
      p(ta.OK);
    }
    function b(O = !0) {
      if (!a.value) return;
      const w = a.value, N = w.querySelector("[data-content]");
      let C = {
        duration: 300,
        fill: "forwards",
        easing: "ease-in-out",
        direction: O ? "normal" : "reverse"
        // iterations: Infinity
      };
      const k = (V) => {
        let j = [
          { opacity: "0" },
          { opacity: "1" }
        ];
        return V.animate(j, C);
      }, x = (V) => {
        let j = [
          { transform: "translate(0, -25%)" },
          { transform: "translate(0, 0)" }
        ];
        return V.animate(j, C);
      }, $ = k(w), M = x(N);
      return Promise.all([$.finished, M.finished]);
    }
    return {
      root: a,
      isVisible: l,
      style: c,
      prompt: d,
      onBackdropClicked: v,
      onCloseClicked: g,
      onCancelClicked: _,
      onOkClicked: S,
      toggle: h,
      show: f,
      hide: p,
      cancel: m
    };
  }
  /**
   * export the props
   * @param {Function} visit optional function that can modify the default props
   * @returns 
   */
  static props(t = null) {
    const n = {
      visible: { type: Boolean, default: !1 },
      backdrop: { type: Boolean, default: !1 },
      disableOutsideClick: { type: Boolean, default: !1 },
      okOnly: { type: Boolean, default: !1 },
      okText: { type: String, default: "Ok" },
      cancelText: { type: String, default: "Cancel" },
      closeText: { type: String, default: "&times;" },
      title: { type: String, default: "" },
      body: { type: String, default: "" },
      size: { type: String, default: hl.Default },
      showPrompt: { type: Boolean, default: !1 },
      modelValue: { type: String, default: "" }
    };
    return typeof t == "function" && t(n), n;
  }
}, // TODO: keep track of open Modals
qe(_o, "openModals", /* @__PURE__ */ new Set()), _o);
const JL = {
  emits: ["update:modelValue", "show", "hide"],
  setup(e, t) {
    return new E_(e, t).setup();
  },
  props: E_.props()
}, QL = { "data-dialog": "" }, ZL = { "data-content": "" }, eF = { "data-header": "" }, tF = ["innerHTML"], nF = { "data-body": "" }, sF = ["innerHTML"], oF = { "data-footer": "" }, rF = ["innerHTML"], iF = ["innerHTML"];
function aF(e, t, n, s, o, i) {
  return P((y(), E("div", {
    ref: "root",
    "data-modal": "",
    onClick: t[4] || (t[4] = Vt((...r) => e.onBackdropClicked && e.onBackdropClicked(...r), ["self"])),
    style: fs(e.style)
  }, [
    u("div", QL, [
      u("div", ZL, [
        u("div", eF, [
          e.isVisible ? ye(e.$slots, "header", { key: 0 }, () => [
            u("div", { innerHTML: e.title }, null, 8, tF)
          ], !0) : ae("", !0),
          u("div", null, [
            u("span", {
              "data-close": "",
              onClick: t[0] || (t[0] = (...r) => e.onCloseClicked && e.onCloseClicked(...r))
            }, "×")
          ])
        ]),
        u("div", nF, [
          e.isVisible ? ye(e.$slots, "default", {
            key: 0,
            onOkClicked: e.onOkClicked
          }, () => [
            u("div", { innerHTML: e.body }, null, 8, sF)
          ], !0) : ae("", !0),
          e.isVisible && e.showPrompt ? ye(e.$slots, "secondary-prompt", { key: 1 }, () => [
            P(u("input", {
              class: "form-control mt-2",
              type: "text",
              "onUpdate:modelValue": t[1] || (t[1] = (r) => e.prompt = r)
            }, null, 512), [
              [Ue, e.prompt]
            ])
          ], !0) : ae("", !0)
        ]),
        u("div", oF, [
          e.isVisible ? ye(e.$slots, "footer", { key: 0 }, () => [
            ye(e.$slots, "secondary-button", {}, () => [
              e.okOnly ? ae("", !0) : (y(), E("button", {
                key: 0,
                class: "btn btn-sm btn-secondary",
                type: "button",
                "data-button-cancel": "",
                onClick: t[2] || (t[2] = (...r) => e.onCancelClicked && e.onCancelClicked(...r)),
                innerHTML: e.cancelText
              }, null, 8, rF))
            ], !0),
            ye(e.$slots, "primary-button", {}, () => [
              u("button", {
                class: "btn btn-sm btn-primary",
                type: "button",
                "data-button-ok": "",
                onClick: t[3] || (t[3] = (...r) => e.onOkClicked && e.onOkClicked(...r)),
                innerHTML: e.okText
              }, null, 8, iF)
            ], !0)
          ], !0) : ae("", !0)
        ])
      ])
    ])
  ], 4)), [
    [Di, e.isVisible]
  ]);
}
const jS = /* @__PURE__ */ he(JL, [["render", aF], ["__scopeId", "data-v-8e97323f"]]), lF = { "data-button": "" }, cF = ["innerHTML"], uF = {
  key: 0,
  "data-menu": ""
}, dF = "prevent-close", fF = {
  __name: "DropDown",
  props: {
    text: { type: String, default: "" },
    variant: { type: String, default: "primary" },
    right: { type: Boolean, default: !1 },
    top: { type: Boolean, default: !1 }
  },
  setup(e) {
    let t;
    const n = L(!1);
    function s(a) {
      console.log("onSlotClicked");
    }
    function o() {
      n.value = !0;
    }
    function i() {
      n.value = !1;
    }
    function r(a) {
      t && t.abort();
      const { currentTarget: l } = a;
      t = new AbortController(), n.value ? i() : o(), setTimeout(() => {
        document.addEventListener(
          "click",
          (c) => {
            const { target: d } = c;
            d != null && d.closest(
              `[${dF}]`
            ) || d === l || (i(), t.abort());
          },
          { signal: t.signal }
        );
      }, null);
    }
    return (a, l) => (y(), E("div", On({ "data-dropdown": "" }, { ...a.$attrs }, {
      class: { right: e.right, top: e.top }
    }), [
      u("div", lF, [
        u("button", {
          class: Te(["btn btn-sm d-flex align-items-center", { [`btn-${e.variant}`]: !0 }]),
          type: "button",
          onClick: r
        }, [
          ye(a.$slots, "button", { dropdown: this }, () => [
            u("span", { innerHTML: e.text }, null, 8, cF)
          ], !0),
          ye(a.$slots, "caret", {}, () => [
            u("i", {
              class: Te(["ms-auto fas fa-caret-right fa-fw", { "fa-rotate-90": n.value }])
            }, null, 2)
          ], !0)
        ], 2)
      ]),
      n.value ? (y(), E("div", uF, [
        ye(a.$slots, "default", {
          onItemClick: s,
          dropdown: this
        }, void 0, !0)
      ])) : ae("", !0)
    ], 16));
  }
}, BS = /* @__PURE__ */ he(fF, [["__scopeId", "data-v-8e679820"]]), pF = {
  emits: ["click"],
  setup(e, t) {
    function n() {
      t.emit("click", this);
    }
    return {
      onClick: n
    };
  }
};
function hF(e, t, n, s, o, i) {
  return y(), E("div", {
    "data-dropdown-item": "",
    onClick: t[0] || (t[0] = (...r) => s.onClick && s.onClick(...r))
  }, [
    ye(e.$slots, "default", {}, void 0, !0)
  ]);
}
const dm = /* @__PURE__ */ he(pF, [["render", hF], ["__scopeId", "data-v-48525a0a"]]), mF = { "data-first": "" }, vF = ["disabled", "innerHTML"], gF = { "data-prev": "" }, yF = ["disabled", "innerHTML"], _F = { key: 0 }, bF = ["innerHTML"], EF = ["onClick"], SF = { "data-next": "" }, wF = ["disabled", "innerHTML"], NF = { "data-last": "" }, OF = ["disabled", "innerHTML"], xF = Object.freeze({
  SMALL: "sm",
  NORMAL: "",
  LARGE: "lg"
}), CF = {
  __name: "PageSelection",
  props: {
    modelValue: { type: Number, default: 1 },
    perPage: { type: Number, default: 5 },
    maxVisibleButtons: { type: Number, default: 5 },
    totalItems: { type: Number, default: 0 },
    hideEllipsis: { type: Boolean, default: !1 },
    hideGotoEndButtons: { type: Boolean, default: !1 },
    firstText: { type: String, default: "«" },
    prevText: { type: String, default: "‹" },
    nextText: { type: String, default: "›" },
    lastText: { type: String, default: "»" },
    ellipsisText: { type: String, default: "…" },
    size: {
      type: String,
      default: "",
      validator(e) {
        return Object.values(xF).includes(e);
      }
    }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, s = t;
    function o(b, O = 0) {
      return [...Array(b).keys()].map((w) => w + O);
    }
    const {
      modelValue: i,
      maxVisibleButtons: r,
      hideEllipsis: a
    } = xe(n), l = Math.floor(r.value / 2), c = I(() => {
      let b = r.value, O = i.value <= l ? 1 : i.value - l;
      return i.value >= p.value - l && (O = p.value - b + 1), O < 1 && (O = 1), p.value < b && (b = p.value), o(b, O);
    }), d = I(() => i.value <= 1), f = I(() => i.value >= p.value), p = I(() => {
      const { perPage: b, totalItems: O } = n;
      return Math.ceil(O / b);
    });
    function h(b) {
      const O = r.value - 1;
      return !(a.value === !0 || b === 0 && i.value - l - 1 <= 0 || b === O && i.value + l >= p.value || b > 0 && b < O);
    }
    function m(b) {
      b < 1 && (b = 1), b > p.value && (b = p.value), s("update:modelValue", b);
    }
    function v() {
      s("update:modelValue", 1);
    }
    function g() {
      s("update:modelValue", p.value);
    }
    function _() {
      let b = i.value - 1;
      b < 1 && (b = 1), s("update:modelValue", b);
    }
    function S() {
      let b = i.value + 1;
      b > p.value && (b = p.value), s("update:modelValue", b);
    }
    return (b, O) => (y(), E("ul", {
      class: Te(["pagination", e.size])
    }, [
      u("li", mF, [
        u("button", {
          class: "",
          disabled: d.value,
          innerHTML: e.firstText,
          onClick: v
        }, null, 8, vF)
      ]),
      u("li", gF, [
        u("button", {
          class: "",
          disabled: d.value,
          innerHTML: e.prevText,
          onClick: _
        }, null, 8, yF)
      ]),
      (y(!0), E(J, null, Ee(c.value, (w, N) => (y(), E(J, { key: w }, [
        h(N) ? (y(), E("li", _F, [
          u("button", {
            disabled: "",
            class: "",
            innerHTML: e.ellipsisText
          }, null, 8, bF)
        ])) : (y(), E("li", {
          key: 1,
          "data-prev": "",
          class: Te({ active: e.modelValue === w })
        }, [
          u("button", {
            class: "",
            onClick: (C) => m(w)
          }, H(w), 9, EF)
        ], 2))
      ], 64))), 128)),
      u("li", SF, [
        u("button", {
          class: "",
          disabled: f.value,
          innerHTML: e.nextText,
          onClick: S
        }, null, 8, wF)
      ]),
      u("li", NF, [
        u("button", {
          class: "",
          disabled: f.value,
          innerHTML: e.lastText,
          onClick: g
        }, null, 8, OF)
      ])
    ], 2));
  }
}, Id = /* @__PURE__ */ he(CF, [["__scopeId", "data-v-cf1b8518"]]), TF = "fas fa-refresh", $F = {
  emits: ["click"],
  props: {
    loading: { type: Boolean, default: !1 },
    icon: { type: String, default: TF },
    text: { type: String, default: "" },
    callback: { type: Function, default: null }
  },
  setup(e, t) {
    const { text: n, icon: s, loading: o } = xe(e);
    function i() {
      t.emit("click", this);
    }
    return {
      text: n,
      icon: s,
      loading: o,
      onButtonClicked: i
    };
  }
}, kF = ["disabled"], DF = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw"
}, IF = ["innerHTML"];
function RF(e, t, n, s, o, i) {
  return y(), E("div", null, [
    u("button", {
      disabled: s.loading,
      class: "btn btn-sm btn-primary",
      onClick: t[0] || (t[0] = (...r) => s.onButtonClicked && s.onButtonClicked(...r))
    }, [
      s.loading ? (y(), E("i", DF)) : (y(), E("i", {
        key: 1,
        class: Te([s.icon, "fa-fw"])
      }, null, 2)),
      s.text ? (y(), E("span", {
        key: 2,
        class: "ml-2",
        innerHTML: s.text
      }, null, 8, IF)) : ae("", !0)
    ], 8, kF)
  ]);
}
const S_ = /* @__PURE__ */ he($F, [["render", RF]]);
class Tr {
  static make(t) {
    const n = document.createElement("div");
    return document.body.appendChild(n), xn(jS, { ...t }).mount(n);
  }
  static async confirm(t) {
    const n = Tr.make(t);
    return Tr.show(n);
  }
  static async alert(t) {
    const n = Tr.make({ okOnly: !0, ...t });
    return Tr.show(n);
  }
  static async prompt(t) {
    const n = Tr.make({ showPrompt: !0, ...t });
    return Tr.show(n);
  }
  static async show(t) {
    const n = () => {
      const o = t.$el.parentNode;
      o.parentNode.removeChild(o);
    };
    return new Promise((o, i) => {
      setTimeout(async () => {
        const r = await t.show();
        o(r), n();
      }, 0);
    });
  }
}
const AF = ["disabled"], MF = ["disabled"], PF = ["onKeyup"], VF = {
  __name: "Toolbar",
  props: {
    list: { type: Array, default: () => [] }
  },
  emits: ["onDelete"],
  setup(e, { emit: t }) {
    const n = t, s = e, o = L(""), i = L(null), { list: r } = xe(s), a = I(() => r.value.filter(
      ({ status: h }) => h === us.WAITING
    ).length == 0);
    async function l() {
      var h, m;
      const p = r.value.length;
      o.value = p === 1 ? (m = (h = r.value) == null ? void 0 : h[0]) == null ? void 0 : m.priority : "", await i.value.show(), r.value.forEach((v) => {
        c(v);
      });
    }
    async function c(p) {
      if (p.status !== us.WAITING || !Number.isInteger(o.value)) return;
      const h = p.priority;
      let m = kL(o.value, 1, 100);
      if (isNaN(m)) return;
      p.priority = m;
      const v = await jl.updatePriority(p.id, m);
      return v || (p.priority = h), v;
    }
    const d = I(() => r.value.filter(
      ({ status: h }) => h !== us.PROCESSING
    ).length == 0);
    async function f() {
      const p = r.value.length === 1 ? "this item" : "these items";
      if (!await Tr.confirm({
        title: "Are you sure?",
        body: `Do you really want to delete ${p}? This action cannot be undone.`
      })) return;
      const m = r.value.filter(
        ({ status: g }) => g !== us.PROCESSING
      ), v = [];
      m.forEach(async (g) => {
        if (g.status === us.PROCESSING) return;
        const _ = jl.deleteMessage(g.id);
        v.push(_);
      }), await Promise.all(v), n("onDelete");
    }
    return (p, h) => {
      const m = be("b-dropdown-item"), v = be("b-dropdown"), g = be("b-modal");
      return y(), E(J, null, [
        F(v, {
          variant: "outline-secondary",
          size: "sm"
        }, {
          button: K(({ show: _ }) => [
            u("i", {
              class: Te(["fas fa-cog fa-fw", { "fa-rotate-90": _ }])
            }, null, 2),
            h[1] || (h[1] = u("span", { class: "ms-2" }, "actions", -1))
          ]),
          default: K(() => [
            F(m, null, {
              default: K(() => [
                u("button", {
                  class: "d-flex align-items-center justify-content-between",
                  disabled: a.value,
                  onClick: l
                }, h[2] || (h[2] = [
                  u("i", { class: "fas fa-pencil fa-fw" }, null, -1),
                  u("span", { class: "ms-2" }, "edit priority", -1)
                ]), 8, AF)
              ]),
              _: 1
            }),
            F(m, null, {
              default: K(() => [
                u("button", {
                  class: "",
                  disabled: d.value,
                  onClick: f
                }, h[3] || (h[3] = [
                  u("i", { class: "fas fa-trash fa-fw" }, null, -1),
                  u("span", { class: "ms-2" }, "delete", -1)
                ]), 8, MF)
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        F(g, {
          ref_key: "priorityModal",
          ref: i
        }, {
          header: K(() => h[4] || (h[4] = [
            se(" Modify priority ")
          ])),
          default: K(({ hide: _ }) => [
            h[5] || (h[5] = u("p", { class: "alert alert-info" }, " Please note that priority will only be updated for messages with a 'waiting' stutus. ", -1)),
            P(u("input", {
              class: "form-control form-control-sm",
              "onUpdate:modelValue": h[0] || (h[0] = (S) => o.value = S),
              type: "number",
              onKeyup: fv((S) => _(!0), ["enter"])
            }, null, 40, PF), [
              [Ue, o.value]
            ])
          ]),
          _: 1
        }, 512)
      ], 64);
    };
  }
}, LF = /* @__PURE__ */ he(VF, [["__scopeId", "data-v-f130de3e"]]), FF = { class: "my-2 d-flex justify-content-between align-items-center" }, UF = { class: "d-flex mb-2" }, jF = { class: "ms-auto me-2" }, BF = ["value"], HF = { class: "d-flex align-items-center justify-content-start" }, YF = ["id", "value"], WF = ["for"], GF = { class: "custom-control custom-switch" }, zF = ["checked", "indeterminate"], KF = ["innerHTML"], XF = ["title"], qF = ["value", "id"], JF = ["for"], QF = ["innerHTML"], ZF = { class: "" }, e4 = { class: "d-flex m-auto align-items-center" }, t4 = ["title"], n4 = {
  key: 0,
  class: "d-flex"
}, s4 = ["innerHTML"], o4 = { class: "d-flex align-items-center priority" }, r4 = ["innerHTML"], i4 = { class: "my-2 d-flex justify-content-between align-items-center" }, a4 = ["onKeyup"], l4 = {
  __name: "MessagesTable",
  setup(e) {
    const t = [
      { key: "id", label: "", sortable: !1 },
      // { key: 'data', label: 'data', sortable: true },
      { key: "key", label: "KEY", sortable: !0 },
      { key: "status", label: "STATUS", sortable: !0, sortFn: (M, R, V, j, U, A, G) => {
        const { status: X = "", priority: te = 0 } = V, { status: $e = "", priority: Ge = 0 } = j, Ye = X.localeCompare($e);
        return Ye === 0 ? te - Ge : Ye;
      } },
      { key: "description", label: "DESCRIPTION", sortable: !0 },
      // { key: 'priority', label: 'PRIORITY', sortable: true },
      { key: "message", label: "MESSAGE", sortable: !0 },
      { key: "created_at", label: "CREATED AT", sortable: !0 },
      { key: "started_at", label: "STARTED AT", sortable: !0 },
      { key: "completed_at", label: "COMPLETED AT", sortable: !0 }
    ], n = ["status", "key", "priority", "description", "message"];
    I(() => jl.metadata);
    const s = L(!1), o = L(1), i = [25, 50, 100, 500], r = L(i[1]), a = L(""), l = L(null), c = L(Object.values(us)), d = L([]), f = I(() => {
      const M = p.value.length, R = d.value.length;
      return R === 0 ? !1 : R !== M;
    }), p = I(() => _.value), h = I(() => {
      const M = d.value.length, R = p.value.length;
      return !(M === 0 || M < R);
    });
    function m() {
      d.value.length === 0 || f.value === !0 ? d.value = p.value : d.value = [];
    }
    const v = I(() => jl.data), g = L([]), _ = I(() => {
      d.value = [];
      let M = g.value;
      return M = M.filter((R) => c.value.includes(R.status)), a.value !== "" && (M = M.filter((R) => {
        for (const V of n)
          if (String(R == null ? void 0 : R[V]).match(a.value)) return !0;
        return !1;
      })), M;
    }), S = I(() => _.value.length), b = I(() => {
      const M = (o.value - 1) * r.value, R = M + r.value;
      return _.value.slice(M, R);
    });
    function O(M, R) {
      M.length === 0 ? g.value = [...v.value] : g.value = R(M, v.value);
    }
    const w = Za((M) => {
      o.value = 1;
      const { value: R } = M.target;
      a.value = R;
    }, 300);
    async function N() {
      await jl.fetchMessages();
    }
    function C(M) {
      let R = "";
      switch (M) {
        case us.WAITING:
          R = "fas fa-clock text-primary";
          break;
        case us.PROCESSING:
          R = "fas fa-spinner fa-spin text-muted";
          break;
        case us.COMPLETED:
          R = "fas fa-check-circle text-success";
          break;
        case us.WARNING:
          R = "fas fa-exclamation-triangle text-warning";
          break;
        case us.ERROR:
          R = "fas fa-times-circle text-danger";
          break;
        case us.CANCELED:
          R = "fas fa-ban text-secondary";
          break;
        default:
          R = "fas fa-check-circle text-secondary";
          break;
      }
      return R;
    }
    function k(M, R = 1, V = 100, j = 0.4) {
      return `hsl(${120 - (M - R) / (V - R) * 120} 100% 50% / ${j})`;
    }
    const x = L("");
    async function $() {
      try {
        return s.value = !0, await N(), o.value = 1, g.value = v.value, !0;
      } catch (M) {
        console.log(M);
      } finally {
        s.value = !1;
      }
    }
    return $(), (M, R) => {
      const V = be("b-dropdown-item"), j = be("b-dropdown");
      return y(), E(J, null, [
        u("div", null, [
          u("div", FF, [
            F(Id, {
              totalItems: S.value,
              modelValue: o.value,
              "onUpdate:modelValue": R[0] || (R[0] = (U) => o.value = U),
              perPage: r.value,
              size: "sm"
            }, null, 8, ["totalItems", "modelValue", "perPage"]),
            F(j, {
              class: "ms-auto",
              variant: "outline-primary",
              size: "sm"
            }, {
              button: K(() => [
                u("span", null, "Per page " + H(r.value), 1)
              ]),
              default: K(() => [
                (y(), E(J, null, Ee(i, (U, A) => F(V, {
                  key: A,
                  active: U === r.value,
                  onClick: (G) => r.value = U
                }, {
                  default: K(() => [
                    se(H(U), 1)
                  ]),
                  _: 2
                }, 1032, ["active", "onClick"])), 64))
              ]),
              _: 1
            }),
            F(S_, {
              class: "ms-2",
              onClick: $,
              loading: s.value
            }, null, 8, ["loading"])
          ]),
          u("div", UF, [
            u("div", null, [
              F(LF, {
                list: d.value,
                onOnDelete: $
              }, null, 8, ["list"])
            ]),
            u("div", jF, [
              u("input", {
                class: "form-control form-control-sm",
                type: "search",
                value: a.value,
                onInput: R[1] || (R[1] = (...U) => T(w) && T(w)(...U)),
                placeholder: "filter..."
              }, null, 40, BF)
            ]),
            F(j, {
              variant: "outline-secondary",
              size: "sm"
            }, {
              button: K(() => R[6] || (R[6] = [
                u("i", { class: "fas fa-list fa-fw" }, null, -1),
                u("span", { class: "ms-2" }, "visible statuses", -1)
              ])),
              default: K(() => [
                (y(!0), E(J, null, Ee(T(us), (U, A) => (y(), le(V, {
                  key: A,
                  "prevent-close": ""
                }, {
                  default: K(() => [
                    u("span", HF, [
                      u("span", null, [
                        P(u("input", {
                          class: "me-2",
                          type: "checkbox",
                          name: "",
                          id: `status-${U}`,
                          value: U,
                          "onUpdate:modelValue": R[2] || (R[2] = (G) => c.value = G)
                        }, null, 8, YF), [
                          [_n, c.value]
                        ])
                      ]),
                      u("span", null, [
                        u("label", {
                          for: `status-${U}`,
                          class: "m-0"
                        }, [
                          u("i", {
                            class: Te(C(U))
                          }, null, 2),
                          se(" " + H(U), 1)
                        ], 8, WF)
                      ])
                    ])
                  ]),
                  _: 2
                }, 1024))), 128))
              ]),
              _: 1
            })
          ]),
          F(XL, {
            id: "messages-table",
            fields: t,
            items: b.value,
            onSort: O,
            "show-empty": "",
            externalSort: ""
          }, {
            "head(id)": K(({ data: U, field: A, value: G }) => [
              R[8] || (R[8] = u("span", null, null, -1)),
              u("div", GF, [
                u("input", {
                  class: "custom-control-input",
                  type: "checkbox",
                  checked: h.value,
                  indeterminate: f.value,
                  onClickCapture: m,
                  id: "checkbox-select-all"
                }, null, 40, zF),
                R[7] || (R[7] = u("label", {
                  class: "custom-control-label",
                  for: "checkbox-select-all"
                }, null, -1))
              ])
            ]),
            "head(priority)": K(({ data: U, field: A, value: G }) => [
              u("span", { innerHTML: G }, null, 8, KF)
            ]),
            "cell(id)": K(({ data: U, item: A, field: G, value: X }) => [
              u("div", {
                class: "custom-control custom-switch",
                title: A.id
              }, [
                P(u("input", {
                  class: "custom-control-input",
                  type: "checkbox",
                  "onUpdate:modelValue": R[3] || (R[3] = (te) => d.value = te),
                  value: A,
                  id: `checkbox-${A.id}`
                }, null, 8, qF), [
                  [_n, d.value]
                ]),
                u("label", {
                  class: "custom-control-label",
                  for: `checkbox-${A.id}`
                }, null, 8, JF)
              ], 8, XF)
            ]),
            "cell(description)": K(({ data: U, item: A, field: G, value: X }) => [
              u("span", { innerHTML: X }, null, 8, QF)
            ]),
            "cell(status)": K(({ data: U, item: A, field: G, value: X }) => [
              u("span", ZF, [
                u("span", e4, [
                  u("i", {
                    title: X,
                    class: Te(["m-auto", C(X)])
                  }, null, 10, t4)
                ]),
                X == T(us).WAITING ? (y(), E("span", n4, [
                  u("span", {
                    class: "m-auto text-muted font-italic small text-nowrap",
                    innerHTML: `priority level ${A.priority}`
                  }, null, 8, s4)
                ])) : ae("", !0)
              ])
            ]),
            "cell(priority)": K(({ data: U, item: A, field: G, value: X }) => [
              u("span", o4, [
                u("span", {
                  style: fs({ backgroundColor: k(X) }),
                  class: "d-flex align-items-center justify-content-center p-1 mr-1 rounded"
                }, R[9] || (R[9] = [
                  u("i", { class: "fas fa-arrow-circle-up" }, null, -1)
                ]), 4),
                u("span", {
                  innerHTML: X
                }, null, 8, r4)
              ])
            ]),
            _: 1
          }, 8, ["items"]),
          u("div", i4, [
            F(Id, {
              totalItems: S.value,
              modelValue: o.value,
              "onUpdate:modelValue": R[4] || (R[4] = (U) => o.value = U),
              perPage: r.value,
              size: "sm"
            }, null, 8, ["totalItems", "modelValue", "perPage"]),
            F(S_, {
              class: "ms-auto",
              onClick: $,
              loading: s.value
            }, null, 8, ["loading"])
          ])
        ]),
        F(jS, {
          ref_key: "priorityModal",
          ref: l
        }, {
          header: K(() => R[10] || (R[10] = [
            se(" Modify priority ")
          ])),
          default: K(({ onOkClicked: U }) => [
            P(u("input", {
              class: "form-control form-control-sm",
              "onUpdate:modelValue": R[5] || (R[5] = (A) => x.value = A),
              type: "number",
              onKeyup: fv(U, ["enter"])
            }, null, 40, a4), [
              [Ue, x.value]
            ])
          ]),
          _: 1
        }, 512)
      ], 64);
    };
  }
}, c4 = /* @__PURE__ */ he(l4, [["__scopeId", "data-v-630723bc"]]), u4 = {
  components: { MessagesTable: c4 },
  setup() {
    return {};
  }
};
function d4(e, t, n, s, o, i) {
  const r = be("MessagesTable");
  return y(), le(r);
}
const f4 = /* @__PURE__ */ he(u4, [["render", d4]]), tre = (e) => {
  const t = xn(f4);
  return t.use(js), t.mount(e), t;
};
let p4 = mr();
const Jr = vr(p4, ["pid", "request_id"], { timeout: 0 }), h4 = async () => {
  const e = {
    params: {
      route: "DataMartController:getSettings"
    }
  };
  return Jr.get("", e);
}, m4 = async (e, t = 0, n = 10) => {
  if (typeof e != "string" && !(e instanceof String)) return;
  const s = {
    params: {
      route: "DataMartController:searchMrns",
      query: e,
      start: t,
      limit: n
    }
  };
  return Jr.get("", s);
}, v4 = async (e) => {
  var t = new FormData();
  t.append("files[]", e);
  const n = {
    headers: {
      "Content-Type": "multipart/form-data"
    },
    params: {
      route: "DataMartController:importRevision"
    }
  };
  return Jr.post("", t, n);
}, g4 = async (e) => {
  const t = {
    params: {
      route: "DataMartController:deleteRevision"
    },
    data: {
      revision_id: e
    }
  };
  return Jr.delete("", t);
}, HS = async (e, t, n = {}) => {
  n = {
    ...n,
    params: {
      route: "DataMartController:runRevision"
    }
  };
  const s = { revision_id: e, mrn: t };
  return Jr.post("", s, n);
}, y4 = async (e, t, n = !1) => {
  const s = {
    params: {
      route: "DataMartController:scheduleRevision"
    }
  }, o = { revision_id: e, mrn_list: t, send_feedback: n };
  return Jr.post("", o, s);
}, _4 = async (e, t, n, s, o = [], i = null) => {
  const r = {
    params: {
      route: "DataMartController:addRevision",
      request_id: i
    }
  }, a = {
    mrns: o,
    fields: e,
    date_min: t,
    date_max: n,
    date_range_categories: s,
    request_id: i
  };
  return Jr.post("", a, r);
}, b4 = async (e) => {
  const t = {
    params: {
      route: "DataMartController:approveRevision"
    }
  }, n = { revision_id: e };
  return Jr.post("", n, t);
}, E4 = () => new AbortController(), S4 = () => {
  const e = Vc(), t = Lc(), n = Io();
  return mt({
    ready: !1,
    // set to true after first time the settings are loaded
    loading: !1,
    error: null,
    async init() {
      try {
        this.loading = !0, await this.loadSettings(), this.ready = !0;
      } catch (o) {
        this.error = io(o);
      } finally {
        this.loading = !1;
      }
    },
    async loadSettings() {
      const o = (d, f) => {
        for (const [p, h] of Object.entries(d))
          p in f && (f[p] = h);
      }, i = await h4(), { app_settings: r, fhir_metadata: a, revisions: l, user: c } = i.data;
      o(r, t), t.fhirMetadata = a, o(c, e), n.setList(l);
    }
  });
}, w4 = () => mt({
  id: "",
  can_create_revision: !1,
  can_repeat_revision: !1,
  can_use_datamart: !1,
  can_use_mapping_helper: !1,
  has_valid_access_token: !1,
  super_user: !1,
  user_email: "",
  user_firstname: "",
  user_lastname: "",
  username: "",
  get canCreateRevision() {
    return !!this.can_create_revision;
  },
  get canRepeatRevision() {
    return !!this.can_repeat_revision;
  },
  get canUseDatamart() {
    return !!this.can_use_datamart;
  },
  get hasValidAccessToken() {
    return !!this.has_valid_access_token;
  },
  get isSuperUser() {
    return !!this.super_user;
  },
  canRunRevision(e) {
    const { metadata: t } = e;
    if (!t) return !1;
    const {
      approved: n = !1,
      date: s = "",
      executed: o = !1,
      executed_at: i = "",
      id: r = "",
      request_id: a = null,
      request_status: l = null,
      total_fetchable_mrns: c = 0,
      total_non_fetched_mrns: d = 0,
      total_project_mrns: f = 0
    } = t;
    return !(c <= 0 || !n || !this.canRepeatRevision && o);
  }
});
async function* N4(e, t, n, s) {
  var i;
  e.totalMRNs = n.length;
  const o = (i = t == null ? void 0 : t.metadata) == null ? void 0 : i.id;
  for (const r of n) {
    e.currentMRN = r;
    const a = await HS(o, e.currentMRN, {
      signal: s
    }), { data: l } = a;
    yield { data: l, mrn: e.currentMRN };
  }
}
async function* O4(e, t, n) {
  var o, i, r;
  if (e.totalMRNs = ((o = t == null ? void 0 : t.metadata) == null ? void 0 : o.total_fetchable_mrns) ?? 0, e.totalMRNs < 1) return;
  const s = (i = t == null ? void 0 : t.metadata) == null ? void 0 : i.id;
  do {
    const a = await HS(s, e.currentMRN, {
      signal: n
    }), { data: l } = a;
    yield { data: l, mrn: e.currentMRN }, e.currentMRN = (r = l == null ? void 0 : l.metadata) == null ? void 0 : r.next_mrn;
  } while (e.currentMRN);
}
const w_ = () => ({
  processing: !1,
  abortController: null,
  aborted: !1,
  currentMRN: null,
  totalMRNs: 0,
  success: [],
  // successfully processed MRNs
  errors: {},
  // errors accumulator (MRN => errors)
  results: [],
  // response accumulator
  stats: {}
  // stats accumulator (category => total)
}), x4 = () => mt({
  ...w_(),
  processing: !1,
  get totalProcessed() {
    return this.results.length;
  },
  reset() {
    const e = w_();
    for (const [t, n] of Object.entries(e))
      this[t] = n;
  },
  async run(e, t = []) {
    try {
      this.reset(), this.processing = !0, this.abortController = E4();
      const n = this.abortController.signal, s = (t == null ? void 0 : t.length) > 0 ? N4(this, e, t, n) : O4(this, e, n);
      for await (const { data: o, mrn: i } of s) {
        if (this.aborted) break;
        this.processResponse(i, o);
      }
    } catch (n) {
      return console.log(n), n;
    } finally {
      this.processing = !1;
    }
  },
  stop() {
    this.aborted = !0, this.abortController && this.abortController.abort();
  },
  async schedule(e, t = [], n = !1) {
    var o;
    const s = (o = e == null ? void 0 : e.metadata) == null ? void 0 : o.id;
    return y4(s, t, n);
  },
  /**
   * the first iteration of the datamart does not have an MRN
   * only process the response if we have an associated MRN
   */
  processResponse(e, t) {
    var o;
    if (!e) return;
    this.results.push(t);
    const n = ((o = t == null ? void 0 : t.metadata) == null ? void 0 : o.stats) ?? {};
    for (const [i, r] of Object.entries(n))
      i in this.stats || (this.stats[i] = 0), this.stats[i] += r;
    const s = (t == null ? void 0 : t.errors) ?? [];
    s.length > 0 ? this.errors[e] = s : this.success.push(this.currentMRN);
  }
}), C4 = () => mt({
  ehr_system_name: "",
  lang: {},
  mapping_helper_url: "",
  project_id: 0,
  // standalone_authentication_flow: '',
  // standalone_launch_enabled: true,
  standalone_launch_url: "",
  user: {
    id: "",
    username: "",
    user_email: "",
    user_firstname: ""
  },
  date_range_categories: [],
  fhirMetadata: {}
}), T4 = () => mt({
  list: [],
  selected: null,
  edited: null,
  get active() {
    return this.list.length === 0 ? null : this.list[0];
  },
  get approved() {
    return this.selected ? this.isApproved(this.selected) : !1;
  },
  setList(e) {
    const t = [...e].reverse();
    this.list = [...t], this.selected = this.list[0] ?? null;
  },
  getIndex(e) {
    var s;
    const t = this.list.indexOf(e);
    return (((s = this.list) == null ? void 0 : s.length) ?? 0) - t;
  },
  isApproved(e) {
    const t = e == null ? void 0 : e.metadata;
    return t == null || t.request_id, !!(t == null ? void 0 : t.approved);
  }
});
let $n = class {
  constructor(t = {}) {
    qe(this, "name");
    qe(this, "parent", null);
    qe(this, "metadata");
    qe(this, "selected", !1);
    this.name = t == null ? void 0 : t.field, this.metadata = t;
  }
  setParent(t) {
    this.parent = t;
  }
};
function* fm(e, t) {
  if (typeof t != "function") return;
  const n = t(e);
  for (const s of n)
    yield s, s instanceof Ri && (yield* fm(s, t));
}
let Ri = class Ts {
  constructor(t = "") {
    qe(this, "name");
    qe(this, "parent", null);
    qe(this, "children", []);
    qe(this, "query", "");
    qe(this, "_filtered", /* @__PURE__ */ new Set());
    qe(this, "_nodes", /* @__PURE__ */ new Set());
    // keep track of any node
    qe(this, "_containers", /* @__PURE__ */ new Set());
    // keep track of any container
    qe(this, "applyDateRange", !1);
    this.name = t;
  }
  get filtered() {
    return this.query === "" ? this.children : Array.from(this._filtered);
  }
  get totalFiltered() {
    let t = 0;
    for (const n of this.filtered)
      n instanceof $n ? t++ : t += n.totalFiltered;
    return t;
  }
  get totalFilteredSelected() {
    let t = 0;
    for (const n of this.filtered)
      n instanceof $n && n.selected ? t++ : n instanceof Ts && (t += n.totalFilteredSelected);
    return t;
  }
  get total() {
    let t = 0;
    for (const n of this.children)
      n instanceof $n ? t++ : t += n.total;
    return t;
  }
  get totalSelected() {
    let t = 0;
    for (const n of this.children)
      n instanceof $n && n.selected ? t++ : n instanceof Ts && (t += n.totalSelected);
    return t;
  }
  get nodes() {
    return Array.from(this._nodes);
  }
  get containers() {
    return Array.from(this._containers);
  }
  get filteredNodes() {
    let t = [];
    for (const n of this.filtered)
      n instanceof $n ? t.push(n) : n instanceof Ts && (t = [...t, ...n.nodes]);
    return t;
  }
  get selectedNodes() {
    let t = [];
    const n = fm(this, (s) => s.children);
    for (const s of n)
      s instanceof $n && s.selected && t.push(s);
    return t;
  }
  get filteredSelectedNodes() {
    let t = [];
    const n = fm(this, (s) => s.children);
    for (const s of n)
      s instanceof $n && s.selected && t.push(s);
    return t;
  }
  filter(t) {
    this.query = t;
    const n = new RegExp(t, "ig");
    let s = [];
    for (const o of this.children)
      if (o instanceof $n) {
        const i = /* @__PURE__ */ new Set([
          o.name,
          o.metadata.label,
          o.metadata.description
        ]);
        let r = !1;
        for (const a of Array.from(i))
          if (!(typeof a != "string" && !(a instanceof String)) && a.match(n) !== null) {
            r = !0;
            break;
          }
        if (!r) continue;
        s.push(o);
      } else o instanceof Ts && (o.filter(t), o.totalFiltered > 0 && s.push(o));
    this._filtered = /* @__PURE__ */ new Set([...s]);
  }
  /**
   * insert an object respecting some rules for proper position
   * @param {Array} array
   * @param {Node|Container} newItem
   * @returns {Array}
   */
  insertItem(t, n) {
    let s = 0;
    for (; s < t.length; ) {
      const o = t[s];
      if (n instanceof $n && o instanceof Ts)
        break;
      if (n instanceof Ts && o instanceof $n) {
        s++;
        continue;
      }
      if (n.name < o.name)
        break;
      s++;
    }
    return t.splice(s, 0, n), t;
  }
  /**
   * add a Node|Container to the children
   * @param {Node|Container} node
   */
  addNode(t) {
    t.setParent(this), this.addReferences(t);
    const n = this.insertItem([...this.children], t);
    this.children = n;
  }
  // add a reference to the node in the current instance and its parent container
  addReferences(t) {
    t instanceof $n ? this._nodes.add(t) : t instanceof Ts && this._containers.add(t), this.parent && this.parent.addReferences(t);
  }
  getNode(t) {
    return this.children.find((s) => s.name === t);
  }
  getContainer(t) {
    return this.children.find(
      (s) => s instanceof Ts && s.name === t
    );
  }
  setParent(t) {
    this.parent = t;
  }
  contains(t) {
    let n = !1;
    for (const s of this.children) {
      if (s instanceof $n && s.name === t)
        return n = !0, n;
      s instanceof Ts && (n = s.contains(t));
    }
    return n;
  }
  static fromList(t = [], n = {}, s = [], o = []) {
    const i = (a, l) => {
      let c = a.getContainer(l);
      return c || (c = new Ts(l), c.applyDateRange = o.includes(l), a.addNode(c), c);
    }, r = new Ts();
    for (const a of t) {
      const l = n[a];
      if (!l) continue;
      let c = r, { category: d = "", subcategory: f = "" } = l;
      d = d.trim(), f = f.trim(), d != "" && (c = i(
        c,
        d
      )), f != "" && (c = i(
        c,
        f
      ));
      const p = new $n({ ...l });
      p.selected = s.includes(p.name), c.addNode(p);
    }
    return r;
  }
};
const Rd = "YYYY-MM-DD", $4 = (e, t, n) => {
  const s = Object.keys(e);
  return s ? Object.keys(e).length === 0 ? [] : (t.includes("id") || t.unshift("id"), Ri.fromList(
    s,
    e,
    t,
    n
  )) : [];
};
function k4(e) {
  return [
    ...new Set(e.filter((t, n) => e.indexOf(t) !== n))
  ];
}
const Gp = (e, t) => {
  const n = (s) => JSON.stringify(s.sort());
  return !Array.isArray(e) || !Array.isArray(t) ? !1 : n(e) === n(t);
}, D4 = () => {
  const e = Lc(), t = mt({
    current: null,
    // reference to the current revision
    dateMin: "",
    dateMax: "",
    mrns: [],
    date_range_categories: [],
    node: null,
    setRevision(n) {
      const s = (n == null ? void 0 : n.fields) ?? [], o = de((n == null ? void 0 : n.dateMin) ?? null), i = de((n == null ? void 0 : n.dateMax) ?? null), r = o.isValid() ? o.format(Rd) : "", a = i.isValid() ? i.format(Rd) : "", l = Array.isArray(
        n == null ? void 0 : n.date_range_categories
      ) ? n.date_range_categories : [], c = (n == null ? void 0 : n.mrns) ?? [];
      this.current = {
        fields: s,
        dateMin: r,
        dateMax: a,
        mrns: c,
        date_range_categories: l
      };
    },
    get new() {
      var s, o, i, r, a, l, c;
      return {
        mrns: this.mrns,
        dateMin: this.dateMin,
        dateMax: this.dateMax,
        fields: (i = (o = (s = this.node) == null ? void 0 : s.nodes) == null ? void 0 : o.filter((d) => d.selected)) == null ? void 0 : i.map((d) => d.name),
        date_range_categories: (c = (l = (a = (r = this.node) == null ? void 0 : r.containers) == null ? void 0 : a.filter((d) => d.applyDateRange)) == null ? void 0 : l.filter((d) => d.totalSelected > 0)) == null ? void 0 : c.map((d) => d.name)
      };
    },
    get isUpdated() {
      const n = this.current, s = this.new, o = (n == null ? void 0 : n.fields) ?? [], i = (s == null ? void 0 : s.fields) ?? [], r = (s == null ? void 0 : s.mrns) ?? [], a = (s == null ? void 0 : s.mrns) ?? [];
      if (!Gp(o, i) || !Gp(r, a) || n.dateMin !== s.dateMin || n.dateMax !== s.dateMax) return !0;
      const l = n.date_range_categories ?? [], c = s.date_range_categories ?? [];
      return !Gp(
        l,
        c
      );
    },
    async submit() {
      try {
        const {
          dateMin: n,
          dateMax: s,
          fields: o,
          date_range_categories: i,
          mrns: r
        } = this.new;
        return await _4(
          o,
          n,
          s,
          i,
          r
        );
      } catch (n) {
        let s = "There was an error submitting the request";
        throw s += io(n), console.log(n, s), Error(s);
      }
    },
    validationErrors: [],
    validate() {
      var o, i;
      this.validationErrors = [];
      const n = this.new;
      (o = n == null ? void 0 : n.fields) != null && o.includes("id") || this.validationErrors.push(
        "the 'id' field must be included in every revision"
      ), ((i = n == null ? void 0 : n.fields) == null ? void 0 : i.length) < 2 && this.validationErrors.push(
        "please select at least 1 field beside 'id'"
      );
      const s = k4(n.mrns);
      return (s == null ? void 0 : s.length) > 0 && this.validationErrors.push(
        `duplicate MRNs found: ${s.join(", ")}`
      ), this.validationErrors;
    },
    get isValid() {
      var n;
      return ((n = this.validationErrors) == null ? void 0 : n.length) === 0;
    }
  });
  return tn(() => {
    const n = t == null ? void 0 : t.current, s = (n == null ? void 0 : n.fields) || [], o = (n == null ? void 0 : n.date_range_categories) || [], i = e == null ? void 0 : e.fhirMetadata;
    t.node = $4(i, s, o), t.dateMin = n == null ? void 0 : n.dateMin, t.dateMax = n == null ? void 0 : n.dateMax;
  }), t;
}, el = ms("app", S4), Vc = ms("user", w4), Bv = ms("process", x4), Lc = ms("settings", C4), Io = ms("revisions", T4), Fc = ms("revisionEditor", D4), I4 = () => {
  const e = el(), t = Vc(), n = Bv(), s = Lc(), o = Io(), i = Fc();
  return {
    app: e,
    user: t,
    process: n,
    settings: s,
    revisions: o,
    revisionEditor: i
  };
}, R4 = {
  key: 0,
  class: "alert alert-danger"
}, A4 = {
  key: 2,
  class: "alert alert-info my-2"
}, M4 = {
  __name: "App",
  setup(e) {
    const t = el(), n = L(), s = I(() => t == null ? void 0 : t.ready), o = I(() => t == null ? void 0 : t.loading), i = I(() => t == null ? void 0 : t.error);
    return Mt(() => {
      t.init();
    }), (r, a) => {
      const l = be("router-view"), c = be("b-modal");
      return y(), E(J, null, [
        i.value ? (y(), E("div", R4, [
          u("span", null, H(i.value), 1)
        ])) : ae("", !0),
        s.value ? (y(), le(l, { key: 1 })) : ae("", !0),
        o.value ? (y(), E("div", A4, a[0] || (a[0] = [
          u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" }, null, -1),
          u("span", null, "Loading...", -1)
        ]))) : ae("", !0),
        F(c, {
          ref_key: "loadingModalRef",
          ref: n,
          title: "Loading"
        }, {
          footer: K(() => a[1] || (a[1] = [])),
          default: K(() => [
            a[2] || (a[2] = u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" }, null, -1)),
            a[3] || (a[3] = u("span", null, "Please wait...", -1))
          ]),
          _: 1
        }, 512)
      ], 64);
    };
  }
}, P4 = {};
function V4(e, t) {
  const n = be("router-view");
  return y(), E("div", null, [
    F(n)
  ]);
}
const L4 = /* @__PURE__ */ he(P4, [["render", V4]]), F4 = { class: "d-block fw-bold" };
class pu {
  constructor(t, n) {
    qe(this, "title", "");
    qe(this, "description", "");
    this.title = t, this.description = n;
  }
}
const U4 = {
  __name: "RevisionWarning",
  props: {
    revision: { type: Object }
  },
  setup(e) {
    const t = Io(), n = Vc(), s = e, { revision: o } = xe(s), i = I(
      () => {
        var l, c;
        return ((c = (l = o.value) == null ? void 0 : l.metadata) == null ? void 0 : c.total_fetchable_mrns) ?? 0;
      }
    ), r = I(() => t.active), a = I(() => {
      var d;
      const l = o.value, c = [];
      if (((d = l == null ? void 0 : l.metadata) == null ? void 0 : d.approved) !== !0) {
        let f = new pu(
          "This revision was not approved",
          "An administrator must approve this revision before it can be run."
        );
        c.push(f);
      }
      if (l === r.value && !(n != null && n.can_repeat_revision) && (l != null && l.metadata.executed)) {
        let f = new pu(
          "This revision was already run",
          "You are allowed to run a revision only once."
        );
        c.push(f);
      }
      if (l !== r.value) {
        let f = new pu(
          "This is not the active revision",
          "Only the most recent revision can be run."
        );
        c.push(f);
      }
      if (i.value < 1) {
        let f = new pu(
          "No fetchable records in the project",
          "You can only run a revision if you have at least 1 fetchable record in your project."
        );
        c.push(f);
      }
      return c;
    });
    return (l, c) => (y(!0), E(J, null, Ee(a.value, (d, f) => (y(), E("div", {
      key: f,
      class: "alert alert-warning mt-2"
    }, [
      u("span", F4, [
        u("span", null, H(d.title), 1)
      ]),
      u("span", null, H(d.description), 1)
    ]))), 128));
  }
}, j4 = ["disabled"], B4 = {
  __name: "RequestChangeButton",
  props: {
    revision: { type: Object, default: null }
  },
  setup(e) {
    const t = Io(), n = co(), s = e, o = I(() => s.revision);
    function i() {
      t.edited = o.value.data, n.push({ name: "request-change" });
    }
    return (r, a) => (y(), E("div", null, [
      u("button", {
        class: "btn btn-sm btn-primary",
        onClick: i,
        disabled: !o.value
      }, a[0] || (a[0] = [
        u("i", { class: "fas fa-file-pen fa-fw me-1" }, null, -1),
        u("span", null, "Request a configuration change", -1)
      ]), 8, j4)
    ]));
  }
}, H4 = {
  __name: "DeleteRevisionButton",
  props: {
    revision: { type: Object, default: () => ({}) }
  },
  setup(e) {
    const t = el(), n = Dn(), s = e, o = L();
    async function i() {
      var a, l;
      if (await o.value.show())
        try {
          const c = (l = (a = s == null ? void 0 : s.revision) == null ? void 0 : a.metadata) == null ? void 0 : l.id, d = await g4(c);
          n.toast({
            title: "Success",
            body: "the revision was deleted successfully"
          });
        } catch {
          n.toast({
            title: "Success",
            body: "there was an error deleting the revision - ".error
          });
        } finally {
          t.init();
        }
    }
    return (r, a) => {
      const l = be("b-modal");
      return y(), E(J, null, [
        u("button", {
          class: "btn btn-sm btn-danger",
          onClick: i
        }, a[0] || (a[0] = [
          u("i", { class: "fas fa-trash fa-fw" }, null, -1),
          u("span", null, "Delete revision", -1)
        ])),
        F(l, {
          ref_key: "dialogRef",
          ref: o
        }, {
          header: K(() => a[1] || (a[1] = [
            se("Confirm delete")
          ])),
          default: K(() => [
            a[2] || (a[2] = u("span", null, "Are you sure you want to delete this item?", -1))
          ]),
          _: 1
        }, 512)
      ], 64);
    };
  }
}, Y4 = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, W4 = {
  key: 1,
  class: "fas fa-circle-check fa-fw me-1"
}, G4 = {
  __name: "ApproveRevisionButton",
  props: {
    revision: { type: Object, default: null }
  },
  setup(e) {
    const t = el(), n = e, s = Dn(), o = L(!1), i = I(() => n.revision);
    async function r() {
      var l, c;
      const a = (c = (l = i.value) == null ? void 0 : l.metadata) == null ? void 0 : c.id;
      if (a)
        try {
          o.value = !0;
          const d = await b4(a);
          s.toast({ title: "success", body: "the revision was approved" }), await t.init();
        } catch {
          s.toast({
            title: "error",
            body: "the revision was not approved - ".error
          });
        } finally {
          o.value = !1;
        }
    }
    return (a, l) => (y(), E("div", null, [
      u("button", {
        class: "btn btn-sm btn-success",
        onClick: r
      }, [
        o.value ? (y(), E("i", Y4)) : (y(), E("i", W4)),
        l[0] || (l[0] = u("span", null, "Approve", -1))
      ])
    ]));
  }
}, YS = {
  __name: "DisabledReasonButton",
  props: {
    node: { type: $n, default: null }
  },
  setup(e) {
    const t = Ns(), n = e;
    function s() {
      var a;
      const o = n.node;
      if (!o) return;
      const i = ((a = o == null ? void 0 : o.metadata) == null ? void 0 : a.disabled_reason) ?? "disabled";
      t.alert({ title: "Mapping disabled", body: i });
    }
    return (o, i) => (y(), E("button", {
      type: "button",
      class: "ms-2 btn btn-sm text-warning",
      onClick: s
    }, i[0] || (i[0] = [
      u("i", { class: "fas fa-question-circle fa-fw" }, null, -1)
    ])));
  }
}, z4 = ["data-disabled"], K4 = { class: "node-name fw-bold border-end pe-2 me-2" }, X4 = { class: "node-label" }, q4 = {
  key: 0,
  class: "ms-2 text-muted d-block"
}, J4 = { class: "w-100" }, Q4 = {
  key: 0,
  class: "text-muted"
}, Z4 = {
  __name: "MetadataNode",
  props: {
    node: { type: [Ri, $n], default: null }
  },
  setup(e) {
    const t = e, { node: n } = xe(t), s = L(!1);
    tn(() => {
      var l;
      ((l = n.value) == null ? void 0 : l.parent) === null && (s.value = !0);
    });
    function o(l) {
      return l instanceof $n;
    }
    function i(l) {
      return l instanceof Ri;
    }
    function r() {
      var l;
      ((l = n.value) == null ? void 0 : l.parent) !== null && (s.value = !s.value);
    }
    function a(l) {
      var c, d, f, p;
      return ((d = (c = l == null ? void 0 : l.metadata) == null ? void 0 : c.description) == null ? void 0 : d.toUpperCase()) !== ((p = (f = l == null ? void 0 : l.metadata) == null ? void 0 : f.label) == null ? void 0 : p.toUpperCase());
    }
    return (l, c) => {
      var d, f, p, h, m, v, g, _, S, b;
      return o(T(n)) ? (y(), E("div", {
        key: 0,
        class: "node",
        "data-disabled": (f = (d = T(n)) == null ? void 0 : d.metadata) == null ? void 0 : f.disabled
      }, [
        u("span", K4, H((h = (p = T(n)) == null ? void 0 : p.metadata) == null ? void 0 : h.field), 1),
        u("span", X4, H((v = (m = T(n)) == null ? void 0 : m.metadata) == null ? void 0 : v.label), 1),
        a(T(n)) ? (y(), E("small", q4, H((_ = (g = T(n)) == null ? void 0 : g.metadata) == null ? void 0 : _.description), 1)) : ae("", !0),
        (b = (S = T(n)) == null ? void 0 : S.metadata) != null && b.disabled ? (y(), le(YS, {
          key: 1,
          node: T(n)
        }, null, 8, ["node"])) : ae("", !0)
      ], 8, z4)) : i(T(n)) ? (y(), E("div", {
        key: 1,
        class: Te(["node-container d-flex p-2", { "border rounded": T(n).parent !== null }])
      }, [
        T(n).parent !== null ? (y(), E("div", {
          key: 0,
          onClick: Vt(r, ["stop"])
        }, [
          u("i", {
            class: Te(["node-open-status fas fa-circle-chevron-right fa-fw", { "fa-rotate-90": s.value }])
          }, null, 2)
        ])) : ae("", !0),
        u("div", J4, [
          u("div", null, [
            u("span", {
              class: "container-name d-block fw-bold",
              onClick: Vt(r, ["stop"])
            }, H(T(n).name), 1),
            T(n).parent !== null ? (y(), E("small", Q4, H(`${T(n).total} field${T(n).total === 1 ? "" : "s"} `), 1)) : ae("", !0)
          ]),
          s.value ? (y(!0), E(J, { key: 0 }, Ee(T(n).children, (O, w) => (y(), le(WS, {
            key: `${w} ${O == null ? void 0 : O.name}`,
            node: O
          }, {
            "container-end": K(({ node: N }) => [
              ye(l.$slots, "container-end", { node: N }, void 0, !0)
            ]),
            _: 2
          }, 1032, ["node"]))), 128)) : ae("", !0)
        ]),
        ye(l.$slots, "container-end", { node: T(n) }, void 0, !0)
      ], 2)) : ae("", !0);
    };
  }
}, WS = /* @__PURE__ */ he(Z4, [["__scopeId", "data-v-b9bc106c"]]), e5 = { key: 0 }, t5 = ["href"], n5 = { key: 0 }, s5 = {
  __name: "RevisionMetadata",
  props: {
    revision: { type: Object }
  },
  setup(e) {
    const t = e, { revision: n } = xe(t), s = I(() => {
      var a, l;
      return (l = (a = n.value) == null ? void 0 : a.metadata) == null ? void 0 : l.creator;
    }), o = I(
      () => {
        var a, l;
        return !!((l = (a = n.value) == null ? void 0 : a.metadata) != null && l.executed);
      }
    ), i = I(() => {
      var l, c;
      const a = de((c = (l = n.value) == null ? void 0 : l.metadata) == null ? void 0 : c.executed_at);
      return a.isValid ? a.format("YYYY-MM-DD hh:mm:ss") : !1;
    }), r = I(() => {
      var l, c;
      const a = (c = (l = n.value) == null ? void 0 : l.metadata) == null ? void 0 : c.date;
      return a ? de(a).fromNow() : "";
    });
    return (a, l) => (y(), E("div", Ft(Ut(a.$attrs)), [
      s.value ? (y(), E("div", e5, [
        l[0] || (l[0] = u("span", { class: "fw-bold" }, " Created by: ", -1)),
        u("a", {
          href: `mailto:${s.value.user_email}`
        }, H(`${s.value.user_firstname} ${s.value.user_lastname}`), 9, t5)
      ])) : ae("", !0),
      u("div", null, [
        l[1] || (l[1] = u("span", { class: "fw-bold" }, "Creation date: ", -1)),
        u("span", null, H(r.value), 1)
      ]),
      u("div", null, [
        l[2] || (l[2] = u("span", { class: "fw-bold" }, "Last executed: ", -1)),
        o.value && i.value ? (y(), E("span", n5, H(i.value), 1)) : (y(), E(J, { key: 1 }, [
          se(" never")
        ], 64))
      ])
    ], 16));
  }
}, o5 = { class: "card mt-2" }, r5 = { class: "card-header d-flex" }, i5 = { key: 1 }, a5 = { class: "card-body" }, l5 = {
  key: 0,
  class: "text-nowrap"
}, c5 = { class: "card-footer d-flex justify-content-end gap-2" }, u5 = {
  __name: "RevisionDetails",
  props: {
    revision: { type: Object }
  },
  setup(e) {
    const t = Lc(), n = e, { revision: s } = xe(n), o = I(() => t == null ? void 0 : t.fhirMetadata), i = I(() => {
      var f, p;
      const c = { min: null, max: null }, d = s.value;
      if (d) {
        let h = "MM-DD-YYYY", m = de((f = d == null ? void 0 : d.data) == null ? void 0 : f.dateMin), v = de((p = d == null ? void 0 : d.data) == null ? void 0 : p.dateMax);
        m.isValid() && (c.min = m.format(h)), v.isValid() && (c.max = v.format(h));
      }
      return c;
    }), r = I(() => {
      const { min: c, max: d } = i.value;
      if (!c && !d) return "no date range specified (get all available data)";
      let f = "";
      return f += `from ${c || "----"}`, f += ` to ${d || "----"}`, f;
    }), a = I(() => {
      var d, f;
      const c = (f = (d = s.value) == null ? void 0 : d.data) == null ? void 0 : f.fields;
      if (c && Object.keys(o.value).length !== 0)
        return Ri.fromList(c, o.value);
    });
    function l(c) {
      var m;
      const { min: d, max: f } = i.value;
      if (!d && !f) return !1;
      const p = s.value, h = ((m = p == null ? void 0 : p.data) == null ? void 0 : m.date_range_categories) ?? [];
      return Array.isArray(h) ? h.includes(c) : !1;
    }
    return (c, d) => (y(), E("div", null, [
      u("div", o5, [
        u("section", r5, [
          T(s) ? (y(), le(s5, {
            key: 0,
            class: "fs-6",
            revision: T(s)
          }, null, 8, ["revision"])) : (y(), E("span", i5, "No revision selected"))
        ]),
        u("section", a5, [
          ye(c.$slots, "body-start", {}, void 0, !0),
          u("div", null, [
            d[0] || (d[0] = u("span", { class: "fw-bold" }, "Date range: ", -1)),
            u("span", null, H(r.value), 1)
          ]),
          d[2] || (d[2] = u("span", { class: "fw-bold" }, "Fields in EHR for which to pull data:", -1)),
          F(WS, {
            node: a.value,
            class: "revision-fields border rounded"
          }, {
            "container-end": K(({ node: f }) => [
              l(f.name) ? (y(), E("div", l5, d[1] || (d[1] = [
                u("i", { class: "fas fa-clock fa-fw" }, null, -1),
                u("span", null, "date range is applied", -1)
              ]))) : ae("", !0)
            ]),
            _: 1
          }, 8, ["node"]),
          ye(c.$slots, "body-end", {}, void 0, !0)
        ]),
        u("section", c5, [
          ye(c.$slots, "footer", {}, void 0, !0)
        ])
      ])
    ]));
  }
}, GS = /* @__PURE__ */ he(u5, [["__scopeId", "data-v-0e138eec"]]), d5 = {
  __name: "SelectedRevisionDetails",
  setup(e) {
    const t = Io(), n = Vc(), s = I(() => t == null ? void 0 : t.selected);
    return (o, i) => (y(), le(GS, { revision: s.value }, {
      "body-start": K(() => [
        F(U4, { revision: s.value }, null, 8, ["revision"])
      ]),
      footer: K(() => [
        s.value && T(n).isSuperUser ? (y(), le(H4, {
          key: 0,
          revision: s.value
        }, null, 8, ["revision"])) : ae("", !0),
        T(t).isApproved(s.value) && (T(n).isSuperUser || T(n).can_create_revision) ? (y(), le(B4, {
          key: 1,
          revision: s.value
        }, null, 8, ["revision"])) : s.value && !T(t).isApproved(s.value) && T(n).isSuperUser ? (y(), le(G4, {
          key: 2,
          revision: s.value
        }, null, 8, ["revision"])) : ae("", !0)
      ]),
      _: 1
    }, 8, ["revision"]));
  }
}, f5 = /* @__PURE__ */ he(d5, [["__scopeId", "data-v-a917cb4d"]]), p5 = { class: "progress-stacked" }, h5 = ["aria-valuenow"], m5 = { class: "progress-bar progress-bar-animated text-bg-primary" }, v5 = ["aria-valuenow"], g5 = { class: "progress-bar progress-bar-animated text-bg-warning" }, y5 = ["aria-valuenow"], _5 = { class: "progress-bar progress-bar-animated text-bg-danger" }, b5 = {
  __name: "ProcessBar",
  props: {
    total: { type: Number, default: 0 },
    success: { type: Number, default: 0 },
    warnings: { type: Number, default: 0 },
    errors: { type: Number, default: 0 },
    text: { type: String, default: "" }
  },
  setup(e) {
    const t = e, { total: n, success: s, warnings: o, errors: i } = xe(t), r = I(() => n.value === 0 ? 0 : s.value / n.value * 100), a = I(() => n.value === 0 ? 0 : o.value / n.value * 100), l = I(() => n.value === 0 ? 0 : i.value / n.value * 100);
    return (c, d) => (y(), E("div", p5, [
      u("div", {
        class: "progress",
        role: "progressbar",
        "aria-valuenow": r.value,
        "aria-valuemin": "0",
        "aria-valuemax": "100",
        style: fs(`width: ${r.value}%`)
      }, [
        u("div", m5, H(T(s)), 1)
      ], 12, h5),
      u("div", {
        class: "progress",
        role: "progressbar",
        "aria-valuenow": a.value,
        "aria-valuemin": "0",
        "aria-valuemax": "100",
        style: fs(`width: ${a.value}%`)
      }, [
        u("div", g5, H(T(o)), 1)
      ], 12, v5),
      u("div", {
        class: "progress",
        role: "progressbar",
        "aria-valuenow": l.value,
        "aria-valuemin": "0",
        "aria-valuemax": "100",
        style: fs(`width: ${l.value}%`)
      }, [
        u("div", _5, H(T(i)), 1)
      ], 12, y5)
    ]));
  }
}, E5 = /* @__PURE__ */ he(b5, [["__scopeId", "data-v-4bf72be2"]]), zS = (e) => (n, s, o = 300) => new Promise((r) => {
  let a = null;
  function l(c) {
    a || (a = c);
    const d = c - a, f = Math.min(d / o, 1), p = (s - n) * f, h = n + p;
    if (e(h, {
      startTime: a,
      timestamp: c,
      progress: d,
      percentage: f
    }), f < 1) {
      requestAnimationFrame(l);
      return;
    }
    r(!0);
  }
  requestAnimationFrame(l);
}), KS = (e = [], { perPageOptions: t = null, limit: n = null, page: s = 1 }) => (t = t ?? [25, 50, 100, 250], {
  page: s ?? 1,
  limit: n ?? (t == null ? void 0 : t[0]) ?? 10,
  perPageOptions: [...t],
  get total() {
    return this.allItems.length ?? 0;
  },
  get totalPages() {
    var o;
    return this.limit === 0 ? 0 : Math.ceil(((o = this.allItems) == null ? void 0 : o.length) / this.limit);
  },
  get allItems() {
    return Array.isArray(e) ? [...e] : typeof e == "function" ? e() : [];
  },
  get items() {
    return this.allItems.slice(this.start, this.end);
  },
  get start() {
    const o = parseInt(this.page), i = parseInt(this.limit);
    return (o - 1) * i;
  },
  get end() {
    return this.limit * this.page;
  }
}), Uf = () => {
  var s;
  const e = (o) => {
    const i = document.createElement("textarea");
    i.value = o, document.body.appendChild(i), i.select();
    try {
      return document.execCommand("copy"), !0;
    } finally {
      document.body.removeChild(i);
    }
  }, t = (o) => navigator.clipboard.writeText(o);
  let n = (s = navigator == null ? void 0 : navigator.clipboard) != null && s.writeText ? t : e;
  return {
    copy: (o) => new Promise((r, a) => {
      try {
        const l = n(o);
        l instanceof Promise ? l.then(() => {
          console.log(
            "Text copied to clipboard ✌🏼:",
            o
          ), r(o);
        }).catch((c) => {
          console.error("Failed to copy text:", c), a(c);
        }) : l === !0 && (console.log("Text copied to clipboard ✌🏼:", o), r(o));
      } catch (l) {
        console.error("Failed to copy text:", l), a(l);
      }
    })
  };
}, S5 = {
  __name: "AnimatedCounter",
  props: {
    value: { type: Number, default: 0 },
    duration: { type: Number, default: 300 }
    //milliseconds
  },
  setup(e) {
    const t = e, n = L(!1), s = L(0), o = L(""), i = zS((r) => {
      o.value = r;
    });
    return tn(async () => {
      const r = s.value, a = t.value;
      s.value = a, n.value = !0, await i(r, a, t.duration), n.value = !1;
    }), (r, a) => ye(r.$slots, "default", {
      animating: n.value,
      text: o.value
    }, () => [
      u("span", {
        class: Te({ animating: n.value })
      }, H(o.value), 3)
    ]);
  }
}, w5 = { class: "table table-striped table-hover table-bordered table-sm" }, N5 = { class: "text-end" }, O5 = { key: 0 }, x5 = {
  __name: "StatsTable",
  props: {
    stats: { type: Object, default: () => ({}) }
  },
  setup(e) {
    const t = e, { stats: n } = xe(t), s = I(() => Object.keys(n.value).length === 0);
    return (o, i) => (y(), E("table", w5, [
      i[1] || (i[1] = u("thead", null, [
        u("tr", null, [
          u("th", null, "Category"),
          u("th", { class: "text-end" }, "Total")
        ])
      ], -1)),
      u("tbody", null, [
        (y(!0), E(J, null, Ee(T(n), (r, a) => (y(), E("tr", {
          key: `stat-${a}`
        }, [
          u("td", null, H(a), 1),
          u("td", N5, [
            F(S5, { value: r }, {
              default: K(({ animating: l, text: c }) => [
                u("span", {
                  class: Te(["counter", { animating: l }])
                }, H(parseInt(c)), 3)
              ]),
              _: 2
            }, 1032, ["value"])
          ])
        ]))), 128)),
        s.value ? (y(), E("tr", O5, i[0] || (i[0] = [
          u("td", {
            colspan: "2",
            class: "fst-italic"
          }, "No updates", -1)
        ]))) : ae("", !0)
      ])
    ]));
  }
}, C5 = /* @__PURE__ */ he(x5, [["__scopeId", "data-v-68605e0a"]]), T5 = { class: "my-2 table table-hover table-striped table-bordered" }, $5 = { key: 0 }, k5 = {
  __name: "ErrorsTable",
  props: {
    errors: { type: Array, default: () => [] }
  },
  setup(e) {
    const t = e, n = L(1), s = L(10), o = I(() => {
      const r = (n.value - 1) * s.value, a = r + s.value;
      return t.errors.slice(r, a);
    }), i = I(() => {
      var r;
      return ((r = t.errors) == null ? void 0 : r.length) === 0;
    });
    return (r, a) => {
      const l = be("b-pagination");
      return y(), E(J, null, [
        u("table", T5, [
          a[2] || (a[2] = u("thead", null, [
            u("tr", null, [
              u("th", null, "MRN"),
              u("th", null, "Error")
            ])
          ], -1)),
          u("tbody", null, [
            (y(!0), E(J, null, Ee(o.value, (c, d) => (y(), E("tr", {
              key: `${c.mrn}-error-${d}`
            }, [
              u("td", null, H(c.mrn), 1),
              u("td", null, H(c.error.message), 1)
            ]))), 128)),
            i.value ? (y(), E("tr", $5, a[1] || (a[1] = [
              u("td", {
                colspan: "2",
                class: "fst-italic"
              }, "No errors", -1)
            ]))) : ae("", !0)
          ])
        ]),
        F(l, {
          modelValue: n.value,
          "onUpdate:modelValue": a[0] || (a[0] = (c) => n.value = c),
          totalItems: e.errors.length,
          perPage: s.value,
          size: "sm"
        }, null, 8, ["modelValue", "totalItems", "perPage"])
      ], 64);
    };
  }
};
class D5 {
  constructor(t) {
    qe(this, "startTime", null);
    qe(this, "active", !1);
    qe(this, "elapsed", 0);
    qe(this, "callback", null);
    this.setCallback(t);
  }
  setCallback(t) {
    this.callback = t;
  }
  start() {
    this.active = !0, requestAnimationFrame(this.update.bind(this));
  }
  reset() {
    this.startTime = null, this.elapsed = 0;
  }
  update(t) {
    this.active != !1 && (this.startTime === null && (this.startTime = t), this.elapsed = t - this.startTime, typeof this.callback == "function" && this.callback(this.elapsed, this, { startTime: this.startTime }), requestAnimationFrame(this.update.bind(this)));
  }
  stop() {
    this.active = !1;
  }
}
const I5 = { class: "stopwatch" }, R5 = {
  __name: "StopWatchDisplay",
  props: {
    time: { type: Number, default: 0 }
  },
  setup(e) {
    const t = e, n = I(() => isNaN(t.time) ? void 0 : (t.time / 1e3).toFixed(2)), s = I(() => (de(), de(Date.now() + t.time).fromNow(!0)));
    return (o, i) => (y(), E("div", I5, [
      i[0] || (i[0] = u("i", { class: "fas fa-clock fa-fw me-1" }, null, -1)),
      u("span", null, "Elapsed time: " + H(n.value), 1),
      u("span", null, "(" + H(s.value) + ")", 1)
    ]));
  }
}, A5 = /* @__PURE__ */ he(R5, [["__scopeId", "data-v-078bbc19"]]), M5 = { class: "my-2" }, P5 = { class: "d-flex gap-2 justify-content-between" }, V5 = { key: 0 }, L5 = { class: "text-muted" }, F5 = { key: 1 }, U5 = { key: 0 }, j5 = { key: 1 }, B5 = { class: "ms-auto" }, H5 = {
  __name: "ProcessingDetails",
  setup(e) {
    const t = Bv(), n = L(), s = I(() => t.processing), o = I(() => t.aborted), i = I(() => t.stats), r = I(() => {
      const g = [];
      for (const [_, S] of Object.entries(t.errors))
        for (const b of S)
          g.push({ mrn: _, error: b });
      return g;
    }), a = I(() => Object.keys(t.errors).length), l = I(() => {
      var g;
      return (g = t.success) == null ? void 0 : g.length;
    }), c = I(() => t.currentMRN), d = I(() => t.totalMRNs), f = I(() => t.totalProcessed), p = L(0), h = new D5((g) => p.value = g);
    tn(() => {
      s.value === !0 ? (h.reset(), h.start(), n.value.show()) : h.stop();
    });
    function m() {
      t.stop();
    }
    function v() {
      n.value.hide();
    }
    return (g, _) => {
      const S = be("b-modal");
      return y(), le(S, {
        ref_key: "modalRef",
        ref: n,
        backdrop: "static",
        size: "lg"
      }, {
        title: K(() => _[0] || (_[0] = [
          u("span", null, "Fetching Data", -1)
        ])),
        footer: K(() => [
          u("div", B5, [
            s.value ? (y(), E("button", {
              key: 0,
              class: "btn btn-sm btn-secondary",
              onClick: m
            }, _[9] || (_[9] = [
              u("i", { class: "fas fa-ban me-1" }, null, -1),
              u("span", null, "Cancel", -1)
            ]))) : (y(), E("button", {
              key: 1,
              class: "btn btn-sm btn-secondary",
              onClick: v
            }, _[10] || (_[10] = [
              u("i", { class: "fas fa-times me-1" }, null, -1),
              u("span", null, "Close", -1)
            ])))
          ])
        ]),
        default: K(() => [
          u("div", null, [
            u("div", M5, [
              F(E5, {
                total: d.value,
                errors: a.value,
                success: l.value
              }, null, 8, ["total", "errors", "success"])
            ]),
            u("div", P5, [
              s.value ? (y(), E(J, { key: 0 }, [
                c.value ? (y(), E("div", V5, [
                  _[2] || (_[2] = u("span", null, [
                    u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" })
                  ], -1)),
                  u("span", null, [
                    _[1] || (_[1] = se("Processing ")),
                    u("strong", null, H(c.value), 1)
                  ]),
                  u("span", L5, " - " + H(f.value) + "/" + H(d.value), 1)
                ])) : (y(), E("div", F5, _[3] || (_[3] = [
                  u("span", null, [
                    u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" })
                  ], -1)
                ])))
              ], 64)) : (y(), E(J, { key: 1 }, [
                o.value ? (y(), E("div", U5, _[4] || (_[4] = [
                  u("i", { class: "fas fa-ban me-1 text-danger" }, null, -1),
                  u("span", null, "Cancelled", -1)
                ]))) : (y(), E("div", j5, _[5] || (_[5] = [
                  u("i", { class: "fas fa-check-circle me-1 text-success" }, null, -1),
                  u("span", null, "Completed", -1)
                ])))
              ], 64)),
              F(A5, {
                time: p.value,
                class: "text-muted fw-lighter fst-italic"
              }, null, 8, ["time"])
            ]),
            _[8] || (_[8] = u("hr", null, null, -1)),
            u("div", null, [
              _[6] || (_[6] = u("span", { class: "d-block fs-4 mb-2" }, "Stats:", -1)),
              F(C5, { stats: i.value }, null, 8, ["stats"]),
              _[7] || (_[7] = u("span", { class: "d-block fs-4 mb-2" }, "Errors:", -1)),
              F(k5, { errors: r.value }, null, 8, ["errors"])
            ])
          ])
        ]),
        _: 1
      }, 512);
    };
  }
}, XS = /* @__PURE__ */ he(H5, [["__scopeId", "data-v-054770fb"]]), Y5 = { class: "badge bg-primary" }, W5 = { class: "form-check" }, G5 = { class: "form-check" }, z5 = ["disabled"], K5 = {
  key: 1,
  class: "btn btn-sm btn-outline-primary",
  disabled: ""
}, qS = {
  __name: "FetchButton",
  props: {
    disabled: { type: Boolean, default: !1 },
    mrns: { type: Array, default: null }
  },
  emits: ["fetch-confirmed"],
  setup(e, { emit: t }) {
    const n = el(), s = Bv(), o = Io(), i = Vc(), r = Ns(), a = Dn(), l = t, c = e, { mrns: d, disabled: f } = xe(c), p = I(() => o.selected === o.active), h = I(() => {
      var w, N;
      return (N = (w = o == null ? void 0 : o.selected) == null ? void 0 : w.metadata) == null ? void 0 : N.approved;
    }), m = L(!1), v = L(!1), g = I(() => s.processing), _ = I(() => {
      var w, N;
      return ((N = (w = o == null ? void 0 : o.selected) == null ? void 0 : w.metadata) == null ? void 0 : N.total_fetchable_mrns) ?? 0;
    }), S = I(() => Array.isArray(d.value) ? d.value.length : _.value), b = I(() => f.value ? f.value : !p.value || !h.value || S.value === 0 || !i.canRunRevision(o.selected));
    tn(() => {
      m.value === !1 && (v.value = !1);
    });
    async function O() {
      var w, N, C;
      l("fetch-confirmed", {
        backgroundFetch: m.value,
        sendMessage: v.value
      });
      try {
        if (m.value) {
          const k = await s.schedule(o.selected, d.value, v.value), x = ((w = k == null ? void 0 : k.data) == null ? void 0 : w.message) ?? "the process was successfully scheduled";
          a.toast({ title: "Success", body: x });
        } else
          await s.run(o.selected, d.value);
      } catch (k) {
        let x = k;
        k instanceof QR && (x = ((C = (N = k == null ? void 0 : k.response) == null ? void 0 : N.data) == null ? void 0 : C.message) ?? "unexpected error"), r.alert({ title: "Error", body: x });
      } finally {
        n.init();
      }
    }
    return (w, N) => {
      const C = be("b-dropdown-item"), k = be("b-dropdown-divider"), x = be("b-dropdown");
      return g.value ? (y(), E("button", K5, N[7] || (N[7] = [
        u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" }, null, -1),
        u("span", null, "Processing", -1)
      ]))) : (y(), le(x, {
        key: 0,
        "menu-end": "",
        variant: "success",
        size: "sm",
        disabled: b.value
      }, {
        button: K(() => [
          N[2] || (N[2] = u("i", { class: "fa-solid fa-cloud-arrow-down fa-fw" }, null, -1)),
          N[3] || (N[3] = u("span", { class: "mx-1" }, "Fetch data", -1)),
          u("span", Y5, H(S.value) + " records", 1)
        ]),
        default: K(() => [
          F(C, { "data-prevent-close": "" }, {
            default: K(() => [
              u("div", W5, [
                P(u("input", {
                  class: "form-check-input",
                  type: "checkbox",
                  "onUpdate:modelValue": N[0] || (N[0] = ($) => m.value = $),
                  id: "fetch-background-checkbox"
                }, null, 512), [
                  [_n, m.value]
                ]),
                N[4] || (N[4] = u("label", {
                  class: "form-check-label",
                  for: "fetch-background-checkbox"
                }, [
                  u("i", { class: "fas fa-clock fa-fw me-1" }),
                  u("span", null, "Fetch in a background process")
                ], -1))
              ])
            ]),
            _: 1
          }),
          F(C, { "data-prevent-close": "" }, {
            default: K(() => [
              u("div", G5, [
                P(u("input", {
                  class: "form-check-input",
                  type: "checkbox",
                  "onUpdate:modelValue": N[1] || (N[1] = ($) => v.value = $),
                  id: "send-message-checkbox",
                  disabled: !m.value
                }, null, 8, z5), [
                  [_n, v.value]
                ]),
                N[5] || (N[5] = u("label", {
                  class: "form-check-label",
                  for: "send-message-checkbox"
                }, [
                  u("i", { class: "fas fa-envelope fa-fw me-1" }),
                  u("span", null, "Send me a message when completed")
                ], -1))
              ])
            ]),
            _: 1
          }),
          F(k),
          F(C, null, {
            default: K(() => [
              u("div", { onClick: O }, N[6] || (N[6] = [
                u("i", { class: "fas fa-check fa-fw me-1" }, null, -1),
                u("span", null, "Confirm", -1)
              ]))
            ]),
            _: 1
          })
        ]),
        _: 1
      }, 8, ["disabled"]));
    };
  }
}, X5 = {
  __name: "SearchButton",
  setup(e) {
    const t = co();
    function n() {
      t.push({ name: "search" });
    }
    return (s, o) => (y(), E("button", {
      class: "btn btn-sm btn-primary",
      onClick: n
    }, o[0] || (o[0] = [
      u("i", { class: "fa-solid fa-magnifying-glass fa-fw me-1" }, null, -1),
      u("span", null, "Select and fetch records...", -1)
    ])));
  }
}, q5 = ["title"], J5 = { class: "fw-bold" }, Q5 = { class: "border-start ps-2 ms-auto" }, Z5 = {
  key: 0,
  class: "fas fa-check-circle text-success"
}, e3 = {
  key: 1,
  class: "fas fa-ban text-danger"
}, t3 = {
  __name: "RevisionsDropdown",
  setup(e) {
    Ie("store");
    const t = Io(), n = I(() => t.selected), s = I(() => t.list ?? []);
    function o(i) {
      t.selected = i;
    }
    return (i, r) => (y(), le(BS, { variant: "outline-primary" }, {
      button: K(() => [
        u("span", null, [
          n.value ? (y(), E(J, { key: 0 }, [
            se(" Revision " + H(T(t).getIndex(n.value)), 1)
          ], 64)) : (y(), E(J, { key: 1 }, [
            se("-----")
          ], 64))
        ])
      ]),
      default: K(() => [
        (y(!0), E(J, null, Ee(s.value, (a, l) => (y(), le(dm, {
          key: l,
          active: a === n.value,
          onClick: (c) => o(a)
        }, {
          default: K(() => {
            var c, d;
            return [
              u("div", {
                class: "d-flex gap-2",
                title: (c = a == null ? void 0 : a.metadata) == null ? void 0 : c.id
              }, [
                u("div", null, [
                  u("span", J5, "#" + H(T(t).getIndex(a)), 1)
                ]),
                u("span", null, "Revision date: " + H((d = a == null ? void 0 : a.metadata) == null ? void 0 : d.date), 1),
                u("div", Q5, [
                  T(t).isApproved(a) ? (y(), E("i", Z5)) : (y(), E("i", e3))
                ])
              ], 8, q5)
            ];
          }),
          _: 2
        }, 1032, ["active", "onClick"]))), 128))
      ]),
      _: 1
    }));
  }
}, n3 = /* @__PURE__ */ he(t3, [["__scopeId", "data-v-3e305bc6"]]);
function s3(e, t = null) {
  const n = [], s = t || Object.keys(e[0]);
  n.push(s.join(","));
  for (const o of e) {
    const i = s.map((r) => `"${o[r] === null || o[r] === void 0 ? "" : String(o[r]).replace(/"/g, '""')}"`);
    n.push(i.join(","));
  }
  return n.join(`
`);
}
function pm(e, t, n = null) {
  const s = s3(e, n);
  jf(s, { fileName: t, fileType: "text/csv;charset=utf-8;" });
}
const jf = (e, { fileName: t = "download.txt", fileType: n = "text/plain" }) => {
  const s = new Blob([e], { type: n }), o = URL.createObjectURL(s), i = document.createElement("a");
  i.href = o, i.download = t, i.click(), URL.revokeObjectURL(o);
};
function N_(e, t = ",", n = '"') {
  const s = [];
  let o = "", i = !1;
  for (let r = 0; r < e.length; r++) {
    const a = e[r];
    a === n ? i && r + 1 < e.length && e[r + 1] === n ? (o += n, r++) : i = !i : a === t && !i ? (s.push(o), o = "") : o += a;
  }
  return s.push(o), s;
}
function o3(e, t = ",", n = '"') {
  const s = e.split(`
`).filter((r) => r.trim() !== ""), o = [], i = N_(s[0], t, n);
  for (let r = 1; r < s.length; r++) {
    const a = {}, l = N_(s[r], t, n);
    for (let c = 0; c < i.length; c++)
      a[i[c]] = l[c] !== void 0 ? l[c] : "";
    o.push(a);
  }
  return o;
}
function r3(e) {
  const t = [Object.keys(e[0])];
  for (const o of e) {
    const i = Object.values(o).map((r) => typeof r == "string" ? `"${r.replace(/"/g, '""')}"` : r);
    t.push(i);
  }
  const n = t.map((o) => o.join(",")).join(`
`);
  return `data:text/csv;charset=utf-8,${encodeURIComponent(n)}`;
}
function i3(e, t = "data-export") {
  const n = document.createElement("a");
  n.setAttribute("href", e), n.setAttribute("download", t), document.body.appendChild(n), n.click(), document.body.removeChild(n);
}
const a3 = {
  __name: "RevisionOptionsDropdown",
  setup(e) {
    const t = Io(), n = co(), s = L(), o = I(() => t.selected);
    function i() {
      var c, d, f;
      const l = (d = (c = o.value) == null ? void 0 : c.metadata) == null ? void 0 : d.id;
      pm([(f = o.value) == null ? void 0 : f.data], `revision-${l}.csv`);
    }
    function r() {
      s.value.click();
    }
    async function a() {
      const { files: l } = s.value;
      if (l.length === 0) return;
      const d = (await v4(l[0])).data;
      t.edited = d, n.push({ name: "request-change" });
    }
    return (l, c) => (y(), E("div", null, [
      F(BS, { variant: "outline-secondary" }, {
        button: K(() => c[0] || (c[0] = [
          u("span", null, [
            u("i", { class: "fas fa-cog fa-fw" })
          ], -1)
        ])),
        default: K(() => [
          F(dm, { onClick: i }, {
            default: K(() => c[1] || (c[1] = [
              u("i", { class: "fas fa-file-export fa-fw me-1" }, null, -1),
              u("span", null, "Export", -1)
            ])),
            _: 1
          }),
          F(dm, { onClick: r }, {
            default: K(() => c[2] || (c[2] = [
              u("i", { class: "fas fa-file-import fa-fw me-1" }, null, -1),
              u("span", null, "Import", -1)
            ])),
            _: 1
          })
        ]),
        _: 1
      }),
      u("input", {
        type: "file",
        class: "d-none",
        ref_key: "fileRef",
        ref: s,
        onChange: a
      }, null, 544)
    ]));
  }
}, l3 = /* @__PURE__ */ he(a3, [["__scopeId", "data-v-9afd39d7"]]), c3 = { class: "d-flex" }, u3 = { class: "d-flex gap-2" }, d3 = { class: "ms-auto d-flex gap-2" }, f3 = {
  __name: "HomePage",
  setup(e) {
    return (t, n) => (y(), E("div", null, [
      u("div", c3, [
        u("div", u3, [
          u("div", null, [
            F(n3)
          ]),
          u("div", null, [
            F(l3)
          ])
        ]),
        u("div", d3, [
          F(X5),
          F(qS)
        ])
      ]),
      F(f5, { class: "mt-2" }),
      F(XS)
    ]));
  }
}, p3 = {}, h3 = { class: "error-wrapper" }, m3 = { class: "mt-5" };
function v3(e, t) {
  const n = be("router-link");
  return y(), E("div", h3, [
    ye(e.$slots, "title", {}, () => [
      t[0] || (t[0] = u("span", { class: "error-title" }, "Error 404", -1))
    ], !0),
    ye(e.$slots, "description", {}, () => [
      t[1] || (t[1] = u("span", { class: "error-description" }, "Sorry, we couldn't find this page.", -1))
    ], !0),
    ye(e.$slots, "subdescription", {}, () => [
      t[2] || (t[2] = u("span", { class: "error-sub-description" }, "But dont worry, you can find plenty of other things on the homepage..", -1))
    ], !0),
    u("div", m3, [
      F(n, {
        to: "/",
        class: "btn btn-sm btn-primary"
      }, {
        default: K(() => t[3] || (t[3] = [
          u("i", { class: "fas fa-arrow-left fa-fw me-1" }, null, -1),
          u("span", null, "Back to Home", -1)
        ])),
        _: 1
      })
    ])
  ]);
}
const Uc = /* @__PURE__ */ he(p3, [["render", v3], ["__scopeId", "data-v-00842725"]]), g3 = { class: "d-flex gap-2 align-items-center mb-2" }, y3 = { key: 0 }, _3 = { class: "ms-auto" }, b3 = { class: "table table-bordered table-striped table-hover" }, E3 = {
  key: 0,
  class: "form-check form-switch"
}, S3 = ["id", "value"], w3 = ["for"], N3 = { key: 0 }, O3 = {
  __name: "MRNsResultsTable",
  props: {
    mrns: { type: Array, default: () => [] },
    selected: { type: Array, default: () => [] }
  },
  emits: ["update:mrns", "update:selected"],
  setup(e, { emit: t }) {
    const n = e, s = t, { mrns: o } = xe(n), i = L({
      page: 1,
      limit: 10,
      total: 0,
      get start() {
        const p = parseInt(this.page), h = parseInt(this.limit);
        return (p - 1) * h;
      }
    }), r = L(!1), a = I({
      get: () => n.selected,
      set: (p) => s("update:selected", p)
    });
    let l = L("");
    const c = I({
      get() {
        return l.value;
      },
      set(p) {
        i.value.page = 1, l.value = p, d(l.value);
      }
    });
    tn(() => {
      l.value === "" && s("update:mrns", []);
    }), ht(
      () => i.value.page,
      (p) => {
        d(l.value);
      },
      { deep: !0 }
    );
    const d = Za(async (p) => {
      await f(p);
    }, 300);
    async function f(p) {
      try {
        r.value = !0;
        const h = i.value;
        if (typeof p != "string" && !(p instanceof String)) return;
        if (p === "") {
          s("update:mrns", []), h.total = 0;
          return;
        }
        const m = await m4(p, h == null ? void 0 : h.start, h == null ? void 0 : h.limit), { data: v } = m;
        s("update:mrns", v.list), h.total = v.total;
      } catch (h) {
        console.log(h);
      } finally {
        r.value = !1;
      }
    }
    return (p, h) => {
      const m = be("b-pagination");
      return y(), E("div", null, [
        u("div", g3, [
          F(m, {
            modelValue: i.value.page,
            "onUpdate:modelValue": h[0] || (h[0] = (v) => i.value.page = v),
            totalItems: i.value.total,
            perPage: i.value.limit,
            size: "sm"
          }, null, 8, ["modelValue", "totalItems", "perPage"]),
          r.value ? (y(), E("div", y3, h[3] || (h[3] = [
            u("i", { class: "fas fa-spinner fa-spin fa-fw" }, null, -1)
          ]))) : ae("", !0),
          u("div", _3, [
            P(u("input", {
              class: "form-control form-control-sm",
              type: "search",
              placeholder: "search...",
              "onUpdate:modelValue": h[1] || (h[1] = (v) => c.value = v)
            }, null, 512), [
              [Ue, c.value]
            ])
          ])
        ]),
        u("table", b3, [
          h[5] || (h[5] = u("thead", null, [
            u("tr", null, [
              u("th", null, "MRN")
            ])
          ], -1)),
          u("tbody", null, [
            (y(!0), E(J, null, Ee(T(o), (v) => (y(), E("tr", {
              key: v == null ? void 0 : v.mrn
            }, [
              u("td", null, [
                v.mrn ? (y(), E("div", E3, [
                  P(u("input", {
                    class: "form-check-input",
                    type: "checkbox",
                    id: `mrn-${v.mrn}`,
                    "onUpdate:modelValue": h[2] || (h[2] = (g) => a.value = g),
                    value: v.mrn
                  }, null, 8, S3), [
                    [_n, a.value]
                  ]),
                  u("label", {
                    class: "form-check-label",
                    for: `mrn-${v.mrn}`
                  }, [
                    u("span", null, H(v.mrn), 1)
                  ], 8, w3)
                ])) : ae("", !0)
              ])
            ]))), 128)),
            T(o).length ? ae("", !0) : (y(), E("tr", N3, h[4] || (h[4] = [
              u("td", null, "nothing to show", -1)
            ])))
          ])
        ])
      ]);
    };
  }
}, x3 = { class: "d-flex flex-column gap-2" }, C3 = { class: "table table-bordered table-striped table-hover" }, T3 = { class: "d-flex align-items-center" }, $3 = { class: "ms-auto" }, k3 = ["onClick"], D3 = { key: 0 }, I3 = {
  __name: "SelectedMRNsTable",
  props: {
    mrns: { type: Array, default: () => [] }
  },
  emits: ["remove"],
  setup(e, { emit: t }) {
    const n = t, s = e, { mrns: o } = xe(s), i = L({});
    ht(o, () => {
      var c;
      let a = ((c = i.value) == null ? void 0 : c.page) ?? 1;
      i.value = KS(o.value, { perPageOptions: [10] });
      const { totalPages: l = 0 } = i.value;
      for (; l < a; )
        a--, i.value.page = a;
    });
    function r(a) {
      n("remove", a);
    }
    return (a, l) => {
      const c = be("b-pagination");
      return y(), E("div", x3, [
        F(c, {
          modelValue: i.value.page,
          "onUpdate:modelValue": l[0] || (l[0] = (d) => i.value.page = d),
          totalItems: i.value.total,
          "per-page": i.value.limit,
          size: "sm"
        }, null, 8, ["modelValue", "totalItems", "per-page"]),
        u("table", C3, [
          l[3] || (l[3] = u("thead", null, [
            u("tr", null, [
              u("th", null, "MRN")
            ])
          ], -1)),
          u("tbody", null, [
            (y(!0), E(J, null, Ee(i.value.items, (d) => (y(), E("tr", { key: d }, [
              u("td", null, [
                u("div", T3, [
                  u("span", null, H(d), 1),
                  u("div", $3, [
                    u("button", {
                      class: "btn btn-sm",
                      onClick: (f) => r(d)
                    }, l[1] || (l[1] = [
                      u("i", { class: "fas fa-trash fa-fw" }, null, -1)
                    ]), 8, k3)
                  ])
                ])
              ])
            ]))), 128)),
            T(o).length ? ae("", !0) : (y(), E("tr", D3, l[2] || (l[2] = [
              u("td", null, "nothing to show", -1)
            ])))
          ])
        ])
      ]);
    };
  }
}, R3 = { class: "d-flex gap-2 mb-2" }, A3 = { class: "ms-auto" }, M3 = { class: "card" }, P3 = { class: "card-body" }, V3 = { class: "mrn-results" }, L3 = { class: "selected-mrns border-top pt-2" }, F3 = { class: "d-flex" }, U3 = { class: "mb-2 ms-auto" }, j3 = { class: "d-flex align-items-center gap-2 ms-auto" }, B3 = {
  __name: "SearchPage",
  setup(e) {
    const t = co(), n = L([]), s = L([]);
    function o() {
      s.value = [];
    }
    function i() {
      t.push({ name: "home" });
    }
    function r() {
      o();
    }
    function a(l) {
      const c = s.value;
      if (!Array.isArray(c)) return;
      const d = c.indexOf(l);
      d < 0 || (c.splice(d, 1), s.value = c);
    }
    return (l, c) => (y(), E(J, null, [
      u("div", null, [
        u("div", R3, [
          u("div", null, [
            u("button", {
              class: "btn btn-sm btn-secondary",
              onClick: i
            }, c[3] || (c[3] = [
              u("i", { class: "fas fa-chevron-left fa-fw me-1" }, null, -1),
              u("span", null, "Back", -1)
            ]))
          ]),
          u("div", A3, [
            F(qS, { mrns: s.value }, null, 8, ["mrns"])
          ])
        ]),
        u("div", M3, [
          c[6] || (c[6] = u("div", { class: "card-header border-bottom mb-2" }, [
            u("span", { class: "fw-bold" }, "Select fetchable MRNs available in the project and fetch their data")
          ], -1)),
          u("section", P3, [
            u("section", V3, [
              F(O3, {
                mrns: n.value,
                "onUpdate:mrns": c[0] || (c[0] = (d) => n.value = d),
                selected: s.value,
                "onUpdate:selected": c[1] || (c[1] = (d) => s.value = d)
              }, null, 8, ["mrns", "selected"])
            ]),
            u("section", L3, [
              u("div", F3, [
                u("div", U3, [
                  u("div", j3, [
                    u("span", null, [
                      c[4] || (c[4] = se("Total MRNs selected: ")),
                      u("strong", null, H(s.value.length), 1)
                    ]),
                    u("button", {
                      class: "btn btn-sm btn-danger",
                      onClick: r
                    }, c[5] || (c[5] = [
                      u("i", { class: "fas fa-trash fa-fw me-1" }, null, -1),
                      u("span", null, "Clear selection", -1)
                    ]))
                  ])
                ])
              ]),
              F(I3, {
                mrns: s.value,
                "onUpdate:mrns": c[2] || (c[2] = (d) => s.value = d),
                onRemove: a
              }, null, 8, ["mrns"])
            ])
          ])
        ])
      ]),
      F(XS)
    ], 64));
  }
}, H3 = /* @__PURE__ */ he(B3, [["__scopeId", "data-v-9bc2f4b8"]]), Y3 = ["data-disabled"], W3 = { class: "form-check form-switch" }, G3 = ["id", "value", "disabled"], z3 = ["for", "title"], K3 = { class: "node-name fw-bold border-end me-2 pe-2" }, X3 = { class: "node-label" }, q3 = {
  key: 0,
  class: "text-muted d-block"
}, J3 = { class: "w-100" }, Q3 = { class: "d-flex align-items-start" }, Z3 = {
  key: 0,
  class: "text-muted"
}, eU = {
  key: 0,
  class: "border-end pe-1 me-1"
}, tU = { class: "ms-auto d-flex flex-column gap-2" }, nU = { class: "d-flex" }, sU = ["textContent"], oU = {
  key: 0,
  class: "form-check form-switch"
}, rU = ["id", "checked", "disabled"], iU = ["for"], aU = {
  __name: "MetadataSelectionNode",
  props: {
    node: { type: [Ri, $n], default: null },
    dateRange: { type: Object, default: null }
  },
  setup(e) {
    const t = Lc(), n = e, { node: s, dateRange: o } = xe(n), i = I({
      get: () => {
        var g, _, S;
        const v = (g = s.value) == null ? void 0 : g.parent;
        return v ? ((S = (_ = v == null ? void 0 : v.nodes) == null ? void 0 : _.filter((b) => b.selected)) == null ? void 0 : S.map((b) => b.name)) ?? [] : [];
      },
      set: (v) => {
        s.value.selected = !s.value.selected;
      }
    });
    function r(v) {
      var _;
      const g = (_ = v == null ? void 0 : v.target) == null ? void 0 : _.checked;
      s.value.applyDateRange = g;
    }
    const a = L(!1);
    tn(() => {
      var v;
      ((v = s.value) == null ? void 0 : v.parent) === null && (a.value = !0);
    });
    function l() {
      return s.value.totalFilteredSelected === s.value.totalFiltered;
    }
    function c() {
      return s.value instanceof $n;
    }
    function d() {
      return s.value instanceof Ri;
    }
    function f() {
      var v;
      ((v = s.value) == null ? void 0 : v.parent) !== null && (a.value = !a.value);
    }
    function p() {
      const v = s.value.filteredNodes, g = !l();
      for (const _ of v)
        _.selected = g;
    }
    function h() {
      var g, _, S, b;
      const v = s.value;
      return ((_ = (g = v == null ? void 0 : v.metadata) == null ? void 0 : g.description) == null ? void 0 : _.toUpperCase()) !== ((b = (S = v == null ? void 0 : v.metadata) == null ? void 0 : S.label) == null ? void 0 : b.toUpperCase());
    }
    function m() {
      var _;
      const v = s.value;
      return ((_ = t == null ? void 0 : t.date_range_categories) == null ? void 0 : _.find(
        (S) => S.name === v.name
      )) !== void 0;
    }
    return (v, g) => {
      var _, S, b, O, w, N, C, k, x, $, M, R, V, j;
      return c() ? (y(), E("div", {
        key: 0,
        class: "node d-flex gap-2",
        "data-disabled": (S = (_ = T(s)) == null ? void 0 : _.metadata) == null ? void 0 : S.disabled
      }, [
        u("div", W3, [
          P((y(), E("input", {
            class: "form-check-input",
            type: "checkbox",
            role: "switch",
            id: T(s).name,
            "onUpdate:modelValue": g[0] || (g[0] = (U) => i.value = U),
            value: (b = T(s)) == null ? void 0 : b.name,
            disabled: ((O = T(s)) == null ? void 0 : O.name) === "id",
            key: `node-${T(s).name}`
          }, null, 8, G3)), [
            [_n, i.value]
          ]),
          u("label", {
            class: "form-check-label",
            for: T(s).name,
            title: (N = (w = T(s)) == null ? void 0 : w.metadata) == null ? void 0 : N.description
          }, [
            u("span", K3, H((k = (C = T(s)) == null ? void 0 : C.metadata) == null ? void 0 : k.field), 1),
            u("span", X3, H(($ = (x = T(s)) == null ? void 0 : x.metadata) == null ? void 0 : $.label), 1),
            h() ? (y(), E("small", q3, H((R = (M = T(s)) == null ? void 0 : M.metadata) == null ? void 0 : R.description), 1)) : ae("", !0)
          ], 8, z3),
          (j = (V = T(s)) == null ? void 0 : V.metadata) != null && j.disabled ? (y(), le(YS, {
            key: 0,
            node: T(s)
          }, null, 8, ["node"])) : ae("", !0)
        ])
      ], 8, Y3)) : d() ? (y(), E("div", {
        key: 1,
        class: Te(["node-container d-flex p-2", { "border rounded": T(s).parent !== null }])
      }, [
        T(s).parent !== null ? (y(), E("div", {
          key: 0,
          onClick: Vt(f, ["stop"])
        }, [
          u("i", {
            class: Te(["node-open-status fas fa-circle-chevron-right fa-fw", { "fa-rotate-90": a.value }])
          }, null, 2)
        ])) : ae("", !0),
        u("div", J3, [
          u("div", null, [
            u("div", Q3, [
              u("div", null, [
                u("span", {
                  class: "container-name fw-bold d-block",
                  onClick: Vt(f, ["stop"])
                }, H(T(s).name), 1),
                T(s).parent !== null ? (y(), E("small", Z3, [
                  T(s).query ? (y(), E("span", eU, "showing " + H(T(s).totalFiltered) + "/" + H(T(s).total), 1)) : ae("", !0),
                  u("span", null, H(T(s).totalFilteredSelected) + "/" + H(T(s).totalFiltered) + " " + H(`field${T(s).totalSelected === 1 ? "" : "s"} selected`), 1)
                ])) : ae("", !0)
              ]),
              u("div", tU, [
                u("div", nU, [
                  T(s).parent !== null ? (y(), E("button", {
                    type: "button",
                    key: `toggle-${T(s).name}`,
                    class: Te(["btn btn-sm ms-auto", {
                      "btn-success": l(),
                      "btn-outline-secondary": !l()
                    }]),
                    onClick: p
                  }, [
                    u("span", {
                      textContent: H(
                        T(s).totalFilteredSelected === T(s).totalFiltered ? "deselect all" : "select all"
                      )
                    }, null, 8, sU)
                  ], 2)) : ae("", !0)
                ]),
                ye(v.$slots, "container-header-end", { node: T(s) }, void 0, !0),
                m() ? (y(), E("div", oU, [
                  u("input", {
                    class: "form-check-input",
                    type: "checkbox",
                    id: `${T(s).name}-apply-date-range`,
                    checked: T(s).applyDateRange,
                    onChange: r,
                    disabled: !Object.keys(T(o)).length || T(s).totalSelected === 0
                  }, null, 40, rU),
                  u("label", {
                    class: "form-check-label",
                    for: `${T(s).name}-apply-date-range`
                  }, g[1] || (g[1] = [
                    u("span", null, "apply date range", -1)
                  ]), 8, iU)
                ])) : ae("", !0)
              ])
            ])
          ]),
          a.value ? (y(!0), E(J, { key: 0 }, Ee(T(s).filtered, (U) => (y(), le(JS, {
            key: `${U == null ? void 0 : U.name}`,
            node: U,
            "date-range": T(o)
          }, null, 8, ["node", "date-range"]))), 128)) : ae("", !0)
        ])
      ], 2)) : ae("", !0);
    };
  }
}, JS = /* @__PURE__ */ he(aU, [["__scopeId", "data-v-04daeade"]]), lU = { class: "d-flex gap-2 align-items-center" }, cU = ["value", "max"], uU = ["value", "min"], O_ = "YYYY-MM-DD", dU = {
  __name: "DateRange",
  props: {
    min: { type: String, default: "" },
    max: { type: String, default: "" }
  },
  emits: ["update:min", "update:max"],
  setup(e, { emit: t }) {
    const n = e, s = t, o = L(), i = L();
    function r(d) {
      return d === "" ? !0 : !!de(d).isValid();
    }
    I(() => a(n.min, n.max));
    function a(d, f) {
      return !r(d) || !r(f) ? !1 : d === "" || f === "" ? !0 : !de(d).isAfter(de(f));
    }
    function l() {
      var h, m;
      let d = (h = o == null ? void 0 : o.value) == null ? void 0 : h.value;
      const f = de(d);
      if (!f.isValid()) {
        s("update:min", "");
        return;
      }
      d = f.format(O_), s("update:min", d);
      const p = de((m = i == null ? void 0 : i.value) == null ? void 0 : m.value);
      p.isValid() && p.isBefore(f) && s("update:max", d);
    }
    function c() {
      var h, m;
      let d = (h = i == null ? void 0 : i.value) == null ? void 0 : h.value;
      const f = de(d);
      if (!f.isValid()) {
        s("update:max", "");
        return;
      }
      d = f.format(O_), s("update:max", d);
      const p = de((m = o == null ? void 0 : o.value) == null ? void 0 : m.value);
      p.isValid() && p.isAfter(f) && s("update:min", d);
    }
    return (d, f) => (y(), E("div", lU, [
      f[0] || (f[0] = u("label", { for: "start-date" }, "from", -1)),
      u("input", {
        ref_key: "minRef",
        ref: o,
        type: "date",
        id: "start-date",
        class: "form-control",
        value: e.min,
        onChange: l,
        max: e.max
      }, null, 40, cU),
      f[1] || (f[1] = u("label", { for: "end-date" }, "to", -1)),
      u("input", {
        ref_key: "maxRef",
        ref: i,
        type: "date",
        id: "end-date",
        class: "form-control",
        value: e.max,
        onChange: c,
        min: e.min
      }, null, 40, uU)
    ]));
  }
}, fU = { class: "card" }, pU = { class: "card-header d-flex align-items-center" }, hU = { class: "ms-auto" }, mU = { class: "card-body" }, vU = { class: "border rounded p-2" }, gU = { class: "border rounded p-2 mt-2" }, yU = { class: "card-footer" }, _U = { class: "d-flex gap-2 justify-content-end" }, QS = {
  __name: "RevisionEditor",
  props: {
    revision: { type: Object, default: null }
  },
  setup(e) {
    const t = Fc(), n = e, { revision: s } = xe(n), o = I({
      get: () => (t == null ? void 0 : t.dateMin) || "",
      set: (d) => t.dateMin = d
    }), i = I({
      get: () => (t == null ? void 0 : t.dateMax) || "",
      set: (d) => t.dateMax = d
    }), r = I(() => t == null ? void 0 : t.node), a = Za((d) => {
      r.value.filter(d);
    }, 300), l = I(() => {
      const d = {}, f = de(o.value), p = de(i.value);
      return f.isValid() && (d.min = f.format(Rd)), p.isValid() && (d.max = p.format(Rd)), d;
    }), c = I({
      get: () => r.value.query,
      set: (d) => a(d)
    });
    return tn(() => {
      t.setRevision(s.value);
    }), (d, f) => (y(), E("div", fU, [
      u("div", pU, [
        f[3] || (f[3] = u("span", { class: "fs-5" }, "Source list", -1)),
        u("div", hU, [
          P(u("input", {
            class: "form-control",
            type: "search",
            "onUpdate:modelValue": f[0] || (f[0] = (p) => c.value = p),
            placeholder: "type to search..."
          }, null, 512), [
            [Ue, c.value]
          ])
        ])
      ]),
      u("div", mU, [
        u("div", vU, [
          f[4] || (f[4] = u("span", { class: "fw-bold d-block mb-2" }, "If pulling time-based data, select the range of time from which to pull data (optional)", -1)),
          F(dU, {
            min: o.value,
            "onUpdate:min": f[1] || (f[1] = (p) => o.value = p),
            max: i.value,
            "onUpdate:max": f[2] || (f[2] = (p) => i.value = p)
          }, null, 8, ["min", "max"])
        ]),
        u("div", gU, [
          F(JS, {
            node: r.value,
            "date-range": l.value
          }, null, 8, ["node", "date-range"])
        ])
      ]),
      u("div", yU, [
        u("div", _U, [
          ye(d.$slots, "buttons")
        ])
      ])
    ]));
  }
}, bU = ["disabled"], EU = {
  __name: "RequestChangePage",
  setup(e) {
    const t = Fc(), n = Io(), s = el(), o = co(), i = Dn(), r = I(() => {
      var f;
      return n.edited ?? ((f = n.selected) == null ? void 0 : f.data);
    }), a = I(() => t.isUpdated);
    function l() {
      o.push({ name: "home" });
    }
    function c() {
      l();
    }
    async function d() {
      try {
        const f = t.validate();
        if ((f == null ? void 0 : f.length) > 0) throw Error(f == null ? void 0 : f.join(`
`));
        const p = await t.submit();
        i.toast({ title: "Success", body: "Revision submitted" }), s.init(), l();
      } catch (f) {
        i.toast({
          title: "Error",
          body: f,
          autohide: !1
        });
      }
    }
    return (f, p) => (y(), E(J, null, [
      u("div", { class: "mb-2" }, [
        u("button", {
          class: "btn btn-sm btn-secondary",
          onClick: c
        }, p[0] || (p[0] = [
          u("i", { class: "fas fa-chevron-left fa-fw" }, null, -1),
          u("span", null, "Back", -1)
        ]))
      ]),
      F(QS, { revision: r.value }, {
        buttons: K(() => [
          u("button", {
            class: "btn btn-sm btn-secondary",
            onClick: c
          }, p[1] || (p[1] = [
            u("i", { class: "fas fa-times fa-fw" }, null, -1),
            u("span", null, "Cancel", -1)
          ])),
          u("button", {
            class: "btn btn-sm btn-primary",
            onClick: d,
            disabled: !a.value
          }, p[2] || (p[2] = [
            u("i", { class: "fas fa-check-circle fa-fw" }, null, -1),
            u("span", null, "Submit", -1)
          ]), 8, bU)
        ]),
        _: 1
      }, 8, ["revision"])
    ], 64));
  }
}, SU = ["value"], wU = ["value"], NU = ["value"], OU = ["value"], xU = ["value"], CU = ["value"], TU = ["value"], ZS = {
  __name: "RevisionForm",
  props: {
    revision: { type: Object },
    user_id: { type: String },
    request_id: { type: String }
  },
  setup(e) {
    const t = e, n = I(() => t == null ? void 0 : t.user_id), s = I(() => t == null ? void 0 : t.request_id), o = I(() => {
      var c;
      return (c = t == null ? void 0 : t.revision) == null ? void 0 : c.fields;
    }), i = I(() => {
      var c;
      return (c = t == null ? void 0 : t.revision) == null ? void 0 : c.dateMin;
    }), r = I(() => {
      var c;
      return (c = t == null ? void 0 : t.revision) == null ? void 0 : c.dateMax;
    }), a = I(
      () => {
        var c;
        return (c = t == null ? void 0 : t.revision) == null ? void 0 : c.date_range_categories;
      }
    ), l = I(() => {
      var c;
      return (c = t == null ? void 0 : t.revision) == null ? void 0 : c.mrns;
    });
    return (c, d) => (y(), E("div", null, [
      u("input", {
        type: "hidden",
        name: "datamart[user_id]",
        value: n.value
      }, null, 8, SU),
      u("input", {
        type: "hidden",
        name: "datamart[request_id]",
        value: s.value
      }, null, 8, wU),
      u("input", {
        type: "hidden",
        name: "datamart[daterange][min]",
        value: i.value
      }, null, 8, NU),
      u("input", {
        type: "hidden",
        name: "datamart[daterange][max]",
        value: r.value
      }, null, 8, OU),
      (y(!0), E(J, null, Ee(a.value, (f, p) => (y(), E("input", {
        key: p,
        type: "hidden",
        name: "datamart[date_range_categories][]",
        value: f
      }, null, 8, xU))), 128)),
      (y(!0), E(J, null, Ee(o.value, (f, p) => (y(), E("input", {
        key: p,
        type: "hidden",
        name: "datamart[fields][]",
        value: f
      }, null, 8, CU))), 128)),
      (y(!0), E(J, null, Ee(l.value, (f, p) => (y(), E("input", {
        key: p,
        type: "hidden",
        name: "datamart[mrns][]",
        value: f
      }, null, 8, TU))), 128))
    ]));
  }
}, $U = { class: "d-flex" }, kU = { class: "ms-auto text-muted" }, DU = {
  __name: "MrnListEditor",
  setup(e) {
    const t = Fc(), n = (a) => a.split(`
`).filter((l) => l.trim() !== ""), s = Za((a) => {
      o.value = a, t.mrns = n(a);
    }, 300), o = L(""), i = I({
      get: () => o.value,
      set: (a) => s(a)
    }), r = I(() => t.mrns.length);
    return (a, l) => (y(), E("div", null, [
      P(u("textarea", {
        class: "form-control",
        rows: "5",
        "onUpdate:modelValue": l[0] || (l[0] = (c) => i.value = c)
      }, null, 512), [
        [Ue, i.value]
      ]),
      u("div", $U, [
        u("div", kU, [
          l[1] || (l[1] = u("span", null, "Total MRNs: ", -1)),
          u("span", null, H(r.value), 1)
        ])
      ])
    ]));
  }
}, IU = { class: "card mt-2" }, RU = { class: "card-body" }, AU = { class: "card-footer" }, MU = {
  key: 0,
  class: "alert alert-danger"
}, PU = {
  __name: "CreateProjectPage",
  setup(e) {
    const t = Fc(), n = I(() => t.isValid), s = I(() => t.validationErrors);
    return ht(
      () => t == null ? void 0 : t.new,
      () => t.validate(),
      { immediate: !1, deep: !0 }
    ), (o, i) => {
      var r;
      return y(), E("div", null, [
        F(ZS, {
          revision: (r = T(t)) == null ? void 0 : r.new
        }, null, 8, ["revision"]),
        F(QS),
        u("div", IU, [
          i[1] || (i[1] = u("div", { class: "card-header" }, [
            u("span", { class: "fs-5" }, "Enter medical record numbers of patients to import from the EHR (one per line, optional)")
          ], -1)),
          u("div", RU, [
            F(DU)
          ]),
          u("div", AU, [
            n.value ? ae("", !0) : (y(), E("div", MU, [
              i[0] || (i[0] = u("span", null, "This revision is invalid", -1)),
              u("ul", null, [
                (y(!0), E(J, null, Ee(s.value, (a, l) => (y(), E("li", { key: l }, [
                  u("span", null, H(a), 1)
                ]))), 128))
              ])
            ]))
          ])
        ])
      ]);
    };
  }
}, VU = { class: "mrn-list border p-2 rounded" }, LU = { class: "d-flex d-none" }, FU = { class: "ms-auto text-muted" }, UU = {
  __name: "MrnList",
  props: {
    mrns: { type: Array, default: () => [] }
  },
  setup(e) {
    const t = e, n = I(() => {
      var s;
      return ((s = t == null ? void 0 : t.mrns) == null ? void 0 : s.length) ?? 0;
    });
    return (s, o) => (y(), E("div", VU, [
      u("details", null, [
        u("summary", null, [
          o[0] || (o[0] = u("span", null, "Total MRNs: ", -1)),
          u("span", null, H(n.value), 1)
        ]),
        u("ul", null, [
          (y(!0), E(J, null, Ee(e.mrns, (i, r) => (y(), E("li", {
            key: `${r}-${i}`
          }, H(i), 1))), 128))
        ])
      ]),
      u("div", LU, [
        u("div", FU, [
          o[1] || (o[1] = u("span", null, "Total MRNs: ", -1)),
          u("span", null, H(n.value), 1)
        ])
      ])
    ]));
  }
}, jU = /* @__PURE__ */ he(UU, [["__scopeId", "data-v-743f2c61"]]), BU = { class: "mt-2" }, HU = {
  __name: "ReviewProjectPage",
  setup(e) {
    const t = Io(), n = I(() => t == null ? void 0 : t.selected), s = I(() => {
      var i, r, a;
      return (a = (r = (i = n.value) == null ? void 0 : i.metadata) == null ? void 0 : r.creator) == null ? void 0 : a.id;
    }), o = I(() => {
      var i, r;
      return (r = (i = n.value) == null ? void 0 : i.metadata) == null ? void 0 : r.request_id;
    });
    return (i, r) => {
      var a;
      return y(), E("div", null, [
        F(ZS, {
          revision: (a = n.value) == null ? void 0 : a.data,
          user_id: s.value,
          request_id: o.value
        }, null, 8, ["revision", "user_id", "request_id"]),
        F(GS, { revision: n.value }, {
          "body-end": K(() => {
            var l, c;
            return [
              u("div", BU, [
                r[0] || (r[0] = u("span", { class: "fw-bold" }, "MRNs", -1)),
                F(jU, {
                  mrns: (c = (l = n.value) == null ? void 0 : l.data) == null ? void 0 : c.mrns
                }, null, 8, ["mrns"])
              ])
            ];
          }),
          _: 1
        }, 8, ["revision"])
      ]);
    };
  }
}, YU = { class: "folder" }, WU = {
  key: 0,
  class: "fas fa-chevron-down fa-fw"
}, GU = {
  key: 1,
  class: "fas fa-chevron-right fa-fw"
}, zU = { class: "children" }, KU = {
  __name: "FolderNode",
  props: {
    data: { type: Object }
  },
  setup(e) {
    const t = L(!0);
    function n() {
      t.value = !t.value;
    }
    return (s, o) => (y(), E("div", YU, [
      u("div", {
        class: "header",
        onClick: n
      }, [
        u("span", null, [
          t.value ? (y(), E("i", WU)) : (y(), E("i", GU))
        ]),
        u("span", null, H(e.data.name) + " (" + H(e.data.children.length) + ")", 1)
      ]),
      u("div", zU, [
        t.value ? ye(s.$slots, "default", { key: 0 }, void 0, !0) : ae("", !0)
      ])
    ]));
  }
}, XU = /* @__PURE__ */ he(KU, [["__scopeId", "data-v-61b4b6ce"]]), qU = { class: "file" }, JU = { class: "text-muted" }, QU = {
  __name: "FileNode",
  props: {
    data: { type: Object }
  },
  setup(e) {
    return (t, n) => (y(), E("div", qU, [
      u("small", JU, H(e.data.name) + " - " + H(e.data.size), 1)
    ]));
  }
}, ew = {
  __name: "FileExplorer",
  props: {
    data: { type: Object },
    parent: { type: Object, default: null }
  },
  setup(e) {
    return (t, n) => e.data.type === "folder" ? (y(), le(XU, {
      key: 0,
      data: e.data
    }, {
      default: K(() => [
        (y(!0), E(J, null, Ee(e.data.children, (s, o) => (y(), le(ew, {
          key: `${o}-${s == null ? void 0 : s.name}`,
          data: s,
          parent: e.data
        }, null, 8, ["data", "parent"]))), 128))
      ]),
      _: 1
    }, 8, ["data"])) : e.data.type === "file" ? (y(), le(QU, {
      key: 1,
      data: e.data
    }, null, 8, ["data"])) : ae("", !0);
  }
}, ZU = () => ({
  type: "folder",
  name: "/",
  children: [
    {
      type: "folder",
      name: "Folder1",
      children: [
        {
          type: "file",
          name: "File1.txt",
          size: "2KB"
        },
        {
          type: "file",
          name: "File2.txt",
          size: "3KB"
        }
      ]
    },
    {
      type: "folder",
      name: "Folder2",
      children: [
        {
          type: "folder",
          name: "SubFolder1",
          children: [
            {
              type: "file",
              name: "File3.txt",
              size: "4KB"
            }
          ]
        },
        {
          type: "file",
          name: "File4.txt",
          size: "1KB"
        }
      ]
    },
    {
      type: "file",
      name: "File5.txt",
      size: "5KB"
    }
  ]
}), e8 = { class: "p-5" }, t8 = {
  __name: "TestPage",
  setup(e) {
    return (t, n) => (y(), E("div", e8, [
      F(ew, {
        data: T(ZU)()
      }, null, 8, ["data"])
    ]));
  }
}, n8 = [
  {
    path: "/",
    component: L4,
    // redirect: '/inbox',
    children: [
      { path: "", name: "home", component: f3 },
      { path: "test", name: "test", component: t8 },
      {
        path: "request-change",
        name: "request-change",
        component: EU
      },
      {
        path: "create-project",
        name: "create-project",
        component: PU
      },
      {
        path: "review-project",
        name: "review-project",
        component: HU
      },
      { path: "search", name: "search", component: H3 },
      { path: "/:pathMatch(.*)*", component: Uc }
    ]
  }
];
let hu;
const s8 = () => hu || (hu = Qa({
  // Provide the history implementation to use. We are using the hash history for simplicity here.
  history: Ja(),
  routes: n8
}), hu), sre = (e) => {
  const t = xn(M4);
  t.use(js);
  const n = s8();
  t.use(n), t.use(zi()), t.mount(e);
  const s = t.runWithContext(() => I4());
  return { app: t, router: n, store: s };
}, o8 = mr(), tw = vr(o8, ["pid"]), r8 = (e = {}) => {
  const t = {
    route: "DataMartController:checkDesign",
    params: e
  };
  return tw.get("", { params: t });
}, nw = (e = {}) => {
  const t = {
    route: "DataMartController:fixDesign",
    params: e
  }, n = {};
  return tw.post("", n, { params: t });
}, vl = Object.freeze({
  READY: 0,
  PROCESSING: 2,
  PROCESSED: 3,
  ERROR: 4
});
class i8 {
  constructor(t = {}) {
    /* {
        params: {formName: "labs"}
        text: "Add this field to the `labs`instrument: \"labs_unit\""
        type: "ADD_FIELDS"
    } */
    qe(this, "_id", "");
    qe(this, "_description", "");
    qe(this, "_parameters", {});
    qe(this, "_status", vl.READY);
    qe(this, "_criticality", 0);
    qe(this, "_action_type", "");
    for (let [n, s] of Object.entries(t))
      `_${n}` in this && (this[n] = s);
  }
  get id() {
    return this._id;
  }
  set id(t) {
    this._id = t;
  }
  get description() {
    return this._description;
  }
  set description(t) {
    this._description = t;
  }
  get parameters() {
    return this._parameters;
  }
  set parameters(t) {
    this._parameters = t;
  }
  get action_type() {
    return this._action_type;
  }
  set action_type(t) {
    this._action_type = t;
  }
  get criticality() {
    return this._criticality;
  }
  set criticality(t) {
    this._criticality = parseInt(t);
  }
  get status() {
    return this._status;
  }
  set status(t) {
    t in Object.values(vl) ? this._status = t : this._status = vl.ERROR;
  }
  isReady() {
    return this.status === vl.READY;
  }
  resetStatus() {
    this.status = vl.READY;
  }
}
const zp = (e, t) => ({ message: e, variant: t }), a8 = () => mt({
  ready: !1,
  commands: [],
  privileges: {
    design: !1
  },
  project_metadata: {
    draft_mode: !1,
    can_be_modified: !1,
    status: null
  },
  error: null,
  async init() {
    try {
      this.ready = !1, await this.checkDesign();
    } catch (t) {
      this.error = t;
    } finally {
      this.ready = !0;
    }
  },
  async checkDesign() {
    var t, n;
    try {
      const s = await r8(), o = ((t = s == null ? void 0 : s.data) == null ? void 0 : t.commands) ?? [], i = ((n = s == null ? void 0 : s.data) == null ? void 0 : n.settings) ?? {};
      this.commands = o.map((r) => new i8(r)), this.privileges = (i == null ? void 0 : i.privileges) ?? {}, this.project_metadata = (i == null ? void 0 : i.project_metadata) ?? {};
    } catch (s) {
      this.error = s;
    } finally {
      this.ready = !0;
    }
  },
  async fixDesign() {
    try {
      return await nw();
    } catch (t) {
      this.error = t;
    }
  },
  get canBeModified() {
    var t;
    return ((t = this.project_metadata) == null ? void 0 : t.can_be_modified) === !0;
  },
  get isDraftMode() {
    var t;
    return ((t = this.project_metadata) == null ? void 0 : t.draft_mode) === !0;
  },
  get isProjectStatusDevelopment() {
    var t;
    return ((t = this.project_metadata) == null ? void 0 : t.status) === "development";
  },
  get hasDesignPrivileges() {
    var t;
    return ((t = this.privileges) == null ? void 0 : t.design) === !0;
  },
  get warnings() {
    const t = [];
    if (this.hasDesignPrivileges) {
      if (this.isDraftMode) {
        let n = zp(
          'Please remember that all changes made in "draft mode" must be committed',
          "warning"
        );
        t.push(n);
      }
      if (!this.isDraftMode && !this.isProjectStatusDevelopment) {
        let n = zp(
          'To fix the design of this project, please enter "draft mode" or move the project to "development" status, then return to this page',
          "info"
        );
        t.push(n);
      }
    } else {
      let n = zp(
        "To fix the design of this project, please ask your administrator to visit this page",
        "info"
      );
      t.push(n);
    }
    return t;
  }
}), l8 = () => mt({
  loading: !1,
  error: null,
  async fixDesign() {
    try {
      return this.loading = !0, await nw();
    } catch (t) {
      this.error = t;
    } finally {
      this.loading = !1;
    }
  }
}), Hv = ms("app", a8), c8 = ms("fix-design", l8), u8 = { class: "table-wrapper" }, d8 = { class: "table table-bordered table-striped table-hover" }, f8 = ["data-id"], p8 = { class: "description" }, h8 = { class: "text-center" }, m8 = { class: "text-center" }, v8 = {
  __name: "ActionsList",
  props: {
    commands: { type: Array, default: () => [] }
  },
  setup(e) {
    function t(s) {
      switch (s) {
        case 1:
          return "info";
        case 2:
          return "primary";
        case 3:
          return "warning";
        case 4:
          return "danger";
        default:
          return "secondary";
      }
    }
    function n(s) {
      switch (s) {
        case "automatic_action":
          return ["fa-wand-magic-sparkles"];
        case "manual_action":
          return ["fa-user"];
        default:
          return ["fa-question-circle"];
      }
    }
    return (s, o) => (y(), E("div", null, [
      o[1] || (o[1] = u("p", { class: "alert alert-warning" }, " Please be aware that you may need to run this tool multiple times, depending on the extent of modifications required for your project. ", -1)),
      o[2] || (o[2] = u("p", null, "The following actions should be performed:", -1)),
      u("div", u8, [
        u("table", d8, [
          o[0] || (o[0] = u("thead", null, [
            u("tr", null, [
              u("th", { scope: "col" }, "#"),
              u("th", { scope: "col" }, "description"),
              u("th", { scope: "col" }, "criticality"),
              u("th", { scope: "col" }, "action type")
            ])
          ], -1)),
          u("tbody", null, [
            (y(!0), E(J, null, Ee(e.commands, (i, r) => (y(), E("tr", {
              key: `${r}-${i == null ? void 0 : i.id}`,
              class: "command",
              "data-id": i.id
            }, [
              u("td", null, H(r + 1), 1),
              u("td", null, [
                u("span", p8, H(i.description), 1)
              ]),
              u("td", h8, [
                u("span", {
                  class: Te(["badge", `bg-${t(
                    i.criticality
                  )}`])
                }, H(i.criticality), 3)
              ]),
              u("td", m8, [
                u("i", {
                  class: Te([
                    "fas",
                    n(i.action_type)
                  ]),
                  "fixed-width": ""
                }, null, 2)
              ])
            ], 8, f8))), 128))
          ])
        ])
      ])
    ]));
  }
}, g8 = /* @__PURE__ */ he(v8, [["__scopeId", "data-v-66acddb0"]]), y8 = { key: 0 }, _8 = ["disabled"], b8 = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, E8 = {
  key: 1,
  class: "fas fa-wrench fa-fw me-1"
}, S8 = {
  __name: "ActionButton",
  emits: ["fix-success", "fix-error"],
  setup(e, { emit: t }) {
    const n = Hv(), s = c8(), o = t, i = I(() => (s == null ? void 0 : s.loading) ?? !1);
    async function r() {
      var l, c;
      let a = "";
      try {
        const d = await s.fixDesign(), f = ((l = d == null ? void 0 : d.data) == null ? void 0 : l.success) ?? !1;
        a = ((c = d == null ? void 0 : d.data) == null ? void 0 : c.message) ?? "", o(f === !0 ? "fix-success" : "fix-error", a);
      } catch (d) {
        a = io(d), o("fix-error", a);
      }
    }
    return (a, l) => {
      var c;
      return (c = T(n)) != null && c.canBeModified ? (y(), E("div", y8, [
        u("button", {
          class: "btn btn-sm btn-success",
          onClick: r,
          disabled: i.value
        }, [
          i.value ? (y(), E("i", b8)) : (y(), E("i", E8)),
          l[0] || (l[0] = u("span", null, "Fix design", -1))
        ], 8, _8)
      ])) : ae("", !0);
    };
  }
}, w8 = {
  class: "card",
  style: { width: "18rem" }
}, N8 = { class: "card-body" }, O8 = {
  __name: "CriticalityLevelsLegend",
  setup(e) {
    function t(n) {
      switch (n) {
        case 1:
          return "info";
        case 2:
          return "primary";
        case 3:
          return "warning";
        case 4:
          return "danger";
        default:
          return "secondary";
      }
    }
    return (n, s) => (y(), E("div", w8, [
      u("div", N8, [
        s[4] || (s[4] = u("h5", { class: "card-title" }, "Criticality levels", -1)),
        u("div", null, [
          u("section", null, [
            u("span", null, [
              u("span", {
                class: Te(["badge", `bg-${t(1)}`])
              }, "1", 2),
              s[0] || (s[0] = se(": low"))
            ])
          ]),
          u("section", null, [
            u("span", null, [
              u("span", {
                class: Te(["badge", `bg-${t(2)}`])
              }, "2", 2),
              s[1] || (s[1] = se(": medium"))
            ])
          ]),
          u("section", null, [
            u("span", null, [
              u("span", {
                class: Te(["badge", `bg-${t(3)}`])
              }, "3", 2),
              s[2] || (s[2] = se(": high"))
            ])
          ]),
          u("section", null, [
            u("span", null, [
              u("span", {
                class: Te(["badge", `bg-${t(4)}`])
              }, "4", 2),
              s[3] || (s[3] = se(": critical"))
            ])
          ])
        ])
      ])
    ]));
  }
}, x8 = {}, C8 = {
  class: "card",
  style: { width: "18rem" }
};
function T8(e, t) {
  return y(), E("div", C8, t[0] || (t[0] = [
    lv('<div class="card-body"><h5 class="card-title">Action Types</h5><div><section><div id="legend-action-automatic"><i class="fas fa-wand-magic-sparkles fa-fw"></i><span>: automatic</span></div></section><section><div id="legend-action-manual"><i class="fas fa-user fa-fw"></i><span>: manual</span></div></section></div></div>', 1)
  ]));
}
const $8 = /* @__PURE__ */ he(x8, [["render", T8]]), k8 = {
  __name: "WarningsList",
  setup(e) {
    const t = Hv(), n = I(() => t.warnings);
    return (s, o) => (y(), E("div", null, [
      (y(!0), E(J, null, Ee(n.value, (i, r) => (y(), E("div", {
        key: r,
        class: Te(["alert", `alert-${i == null ? void 0 : i.variant}`])
      }, [
        o[0] || (o[0] = u("i", { class: "fas fa-info-circle fa-fw me-1" }, null, -1)),
        u("span", null, H(i == null ? void 0 : i.message), 1)
      ], 2))), 128))
    ]));
  }
}, D8 = { key: 0 }, I8 = { class: "toast-container position-fixed top-0 end-0 p-3" }, R8 = { class: "mt-2 d-flex" }, A8 = ["onClick"], M8 = { class: "d-flex gap-2" }, P8 = ["onClick"], V8 = {
  __name: "App",
  setup(e) {
    const t = Hv(), n = Ns(), s = L(5e3), o = L(2e4), i = I(() => t == null ? void 0 : t.error), r = I(() => (t == null ? void 0 : t.ready) ?? !1), a = I(() => (t == null ? void 0 : t.commands) ?? []), l = L();
    function c() {
      var p;
      (p = l.value) == null || p.show();
    }
    async function d(p) {
      var h;
      (h = l.value) == null || h.hide(), await n.alert({ title: "Success", body: p }), t.init();
    }
    async function f(p) {
      var h;
      (h = l.value) == null || h.hide(), await n.alert({ title: "Error", body: p }), t.init();
    }
    return Mt(() => {
      t.init();
    }), (p, h) => {
      var g;
      const m = be("b-toast"), v = be("b-modal");
      return r.value ? (y(), E("div", D8, [
        u("div", I8, [
          i.value ? (y(), le(m, {
            key: 0,
            visible: "",
            autohide: !1,
            variant: "danger",
            title: "Design Health check error"
          }, {
            default: K(() => [
              se(H(i.value), 1)
            ]),
            _: 1
          })) : ((g = a.value) == null ? void 0 : g.length) === 0 ? (y(), le(m, {
            key: 1,
            visible: "",
            delay: s.value,
            variant: "success"
          }, {
            title: K(() => h[0] || (h[0] = [
              u("div", { class: "me-auto" }, [
                u("span", { class: "d-block" }, "Design Health check")
              ], -1)
            ])),
            default: K(() => [
              h[1] || (h[1] = u("i", { class: "fas fa-check-to-slot fa-fw me-1" }, null, -1)),
              h[2] || (h[2] = u("span", null, "All tests successful", -1))
            ]),
            _: 1
          }, 8, ["delay"])) : (y(), le(m, {
            key: 2,
            visible: "",
            delay: o.value,
            variant: "warning"
          }, {
            title: K(() => h[3] || (h[3] = [
              u("div", { class: "me-auto" }, [
                u("span", { class: "d-block" }, "Design mismatch")
              ], -1)
            ])),
            default: K(({ hide: _ }) => [
              h[5] || (h[5] = u("i", { class: "fas fa-circle-exclamation fa-fw me-1" }, null, -1)),
              h[6] || (h[6] = u("span", null, "The design of this project could prevent the Data Mart feature from working as intended.", -1)),
              u("div", R8, [
                u("button", {
                  class: "ms-auto btn btn-sm btn-secondary",
                  onClick: (S) => c(_())
                }, h[4] || (h[4] = [
                  u("i", { class: "fas fa-circle-info fa-fw me-1" }, null, -1),
                  u("span", null, "Learn more", -1)
                ]), 8, A8)
              ])
            ]),
            _: 1
          }, 8, ["delay"]))
        ]),
        F(v, {
          ref_key: "commandsModalRef",
          ref: l,
          size: "lg",
          title: "Design mismatch"
        }, {
          footer: K(({ hide: _ }) => [
            F(S8, {
              onFixSuccess: d,
              onFixError: f
            }),
            u("button", {
              class: "btn btn-sm btn-secondary",
              onClick: _
            }, h[7] || (h[7] = [
              u("i", { class: "fas fa-times fa-fw me-1" }, null, -1),
              u("span", null, "Close", -1)
            ]), 8, P8)
          ]),
          default: K(() => [
            u("div", null, [
              F(g8, { commands: a.value }, null, 8, ["commands"]),
              F(k8),
              u("div", M8, [
                F(O8),
                F($8)
              ])
            ])
          ]),
          _: 1
        }, 512)
      ])) : ae("", !0);
    };
  }
}, ore = (e) => {
  const t = xn(V8);
  return t.use(js), t.use(zi()), t.mount(e), { app: t };
}, sw = () => mt({
  counter: 123
}), L8 = ms("test", sw), F8 = ms("test", sw, !0), U8 = { class: "d-inline-block" }, Kp = {
  __name: "CounterViewer",
  props: {
    counter: { type: Number, default: 0 }
  },
  setup(e) {
    return (t, n) => (y(), E("div", U8, H(e.counter), 1));
  }
}, j8 = { class: "border rounded p-2 my-2" }, B8 = {
  __name: "App",
  setup(e) {
    const t = Ie("store"), n = L8(), s = F8();
    function o() {
      console.log(t, "sasas"), console.log(n == null ? void 0 : n.counter), t.test.counter++;
    }
    function i() {
      s.counter++;
    }
    function r() {
      n.counter++;
    }
    return (a, l) => (y(), E("div", j8, [
      u("button", { onClick: o }, "increment store"),
      u("button", { onClick: i }, "increment shared"),
      u("button", { onClick: r }, "increment use"),
      u("div", null, [
        l[0] || (l[0] = u("span", { class: "fw-bold" }, "Store: ", -1)),
        F(Kp, {
          counter: T(n).counter
        }, null, 8, ["counter"])
      ]),
      u("div", null, [
        l[1] || (l[1] = u("span", { class: "fw-bold" }, "Injected Store: ", -1)),
        F(Kp, {
          counter: T(t).test.counter
        }, null, 8, ["counter"])
      ]),
      u("div", null, [
        l[2] || (l[2] = u("span", { class: "fw-bold" }, "Shared Store: ", -1)),
        F(Kp, {
          counter: T(s).counter
        }, null, 8, ["counter"])
      ]),
      u("pre", null, H(a.$store), 1)
    ]));
  }
}, rre = (e) => {
  const t = xn(B8);
  return t.use(js), t.use(zi()), t.mount(e), { app: t };
}, H8 = mr(), Yv = vr(H8, ["pid"], { timeout: 0 }), Y8 = (e, t = null, n = {}) => {
  const s = {
    route: "FhirMappingHelperController:getResource",
    mrn: e,
    fhir_category: t,
    params: n
  };
  return Yv.get("", { params: s });
}, W8 = (e, t, n) => {
  const s = {
    route: "FhirMappingHelperController:getFhirRequest"
  }, o = {
    relative_url: t,
    options: n,
    method: e
  };
  return Yv.post("", o, { params: s });
}, G8 = (e = {}) => {
  const t = {
    route: "FhirMappingHelperController:getSettings",
    params: e
  };
  return Yv.get("", { params: t });
}, z8 = (e, t) => {
  const n = mt({
    category: e,
    loading: !0,
    error: null,
    data: null,
    get total() {
      var o, i;
      return ((i = (o = this.data) == null ? void 0 : o.data) == null ? void 0 : i.length) ?? 0;
    }
  });
  return (async () => {
    try {
      const o = await t();
      n.data = (o == null ? void 0 : o.data) ?? [];
    } catch (o) {
      n.error = io(o);
    } finally {
      n.loading = !1;
    }
  })(), n;
}, K8 = [25, 50, 100, 250], ow = (e, t) => {
  if (e === null)
    return !1;
  if (typeof e == "string" || typeof e == "number" || typeof e == "boolean") {
    const n = new RegExp(t, "i");
    return e.toString().match(n);
  }
  if (typeof e == "object") {
    for (const [n, s] of Object.entries(e))
      if (ow(s, t))
        return !0;
  }
  return !1;
}, X8 = (e, t, n = "") => {
  const s = e.visibleStatuses, o = [
    ({ data: r }) => ow(r, n),
    (r) => q8(r, s)
  ];
  return KS(((r) => {
    let a = [...r];
    return a = a.filter((l) => {
      e.queryError = null;
      try {
        for (const c of o)
          if (!c(l)) return !1;
        return !0;
      } catch (c) {
        return console.log(c), e.queryError = "Please use a valid regular expression", !1;
      }
    }), a;
  })(t), { perPageOptions: K8 });
}, q8 = (e, t) => {
  var s;
  if ((t == null ? void 0 : t.length) === 0) return !0;
  const n = (s = e == null ? void 0 : e.mapping_status) == null ? void 0 : s.status;
  return console.log(n), t.includes(n);
}, J8 = () => mt({
  mrn: null,
  dateFrom: null,
  dateTo: null,
  results: [],
  // all fetching processes
  rotate: !1,
  // rotate results
  active: null,
  pagination: null,
  query: "",
  queryError: null,
  visibleStatuses: [],
  get patient() {
    var n, s, o;
    const t = this.getProcessByCategory("Demographics");
    return (o = (s = (n = t == null ? void 0 : t.data) == null ? void 0 : n.data) == null ? void 0 : s[0]) == null ? void 0 : o.data;
  },
  get total() {
    let t = 0;
    for (const n of this.results)
      t += n.total;
    return t;
  },
  /**
   * overall loading state
   */
  get loading() {
    for (const t of this.results)
      if (t.loading) return !0;
    return !1;
  },
  /**
   * get a date range in a FHIR compatible format
   */
  get dateRange() {
    const t = (i) => {
      if (typeof i == "string" && i.trim() !== "" && (i = de(i), !!i.isValid()))
        return i.format("YYYY-MM-DD");
    }, n = [], s = t(this.dateFrom), o = t(this.dateTo);
    return s && n.push(`ge${s}`), o && n.push(`le${o}`), n;
  },
  getProcessByCategory(t) {
    return this.results.find((s) => s.category === t);
  },
  async fetchAll(t, n = {}) {
    var r;
    (() => {
      this.active = null, this.results = [];
    })();
    let o = null;
    ((r = this.dateRange) == null ? void 0 : r.length) > 0 && (n.date = this.dateRange);
    const i = [];
    for (const a of t) {
      o = a;
      try {
        let l = {};
        const d = z8(o, () => l = Y8(
          this.mrn,
          o,
          n
        ));
        this.results.push(d), i.push(l);
      } catch {
        console.log(`there was an error fetching ${o}`);
      }
    }
    return Promise.allSettled(i);
  },
  hasFilters() {
    var t, n;
    return ((t = this.query) == null ? void 0 : t.length) > 0 || ((n = this.visibleStatuses) == null ? void 0 : n.length) > 0;
  },
  removeFilters() {
    this.setQuery(""), this.queryError = null, this.setVisibleStatuses([]);
  },
  /**
   * set the active process
   * and update the pagination
   * @param {Object} process 
   */
  setActive(t) {
    this.active = t, this.removeFilters(), this.updatePagination();
  },
  /**
   * set the query
   * and update the pagination
   * @param {String} process 
   */
  setQuery(t) {
    this.query = t, this.updatePagination();
  },
  setVisibleStatuses(t) {
    this.visibleStatuses = t, this.updatePagination();
  },
  updatePagination() {
    var n, s;
    const t = ((s = (n = this.active) == null ? void 0 : n.data) == null ? void 0 : s.data) ?? [];
    this.pagination = mt(X8(this, t, this.query));
  }
}), Q8 = () => mt({
  categories: [],
  selectedCategories: [],
  async fetchCategories() {
    const e = await G8(), t = e == null ? void 0 : e.data, n = (t == null ? void 0 : t.available_categories) ?? [];
    return this.selectedCategories = this.categories = n, t;
  }
}), Z8 = (e) => typeof e == "string" || e instanceof String, x_ = ["GET", "POST", "PUT", "DELETE"], ej = () => mt({
  loading: !1,
  response: null,
  relativeURL: "",
  methods: [...x_],
  method: x_[0],
  parameters: [],
  addParameter() {
    const e = mt({
      key: "",
      value: "",
      enabled: !0
    });
    this.parameters.push(e);
  },
  removeParameter(e) {
    const t = this.parameters.findIndex((n) => n === e);
    return t < 0 ? !1 : (this.parameters.splice(t, 1), !0);
  },
  async fetch() {
    var e, t;
    try {
      this.loading = !0, this.response = null;
      const n = this.parameters.filter(
        (i) => i.enabled
      ), s = {};
      for (const i of n) {
        const { key: r, value: a } = i;
        Z8(r) && (Array.isArray(s[r]) || (s[r] = []), s[r].push(a));
      }
      const o = await W8(
        this.method,
        this.relativeURL,
        s
      );
      this.response = (t = (e = o == null ? void 0 : o.data) == null ? void 0 : e.metadata) == null ? void 0 : t.payload;
    } catch (n) {
      this.response = io(n);
    } finally {
      this.loading = !1;
    }
  }
}), Ro = ms("search", J8), jc = ms("customRequest", ej), rw = ms("settings", Q8), tj = {
  key: 0,
  class: "alert alert-danger m-2"
}, nj = { style: { "white-space": "pre" } }, sj = {
  __name: "App",
  setup(e) {
    const t = rw(), n = L(!1), s = L();
    return Mt(async () => {
      try {
        s.value = null, n.value = !0, await t.fetchCategories();
      } catch (o) {
        s.value = io(o), console.log("There was an error loading the settings.", o);
      } finally {
        n.value = !1;
      }
    }), (o, i) => {
      const r = be("router-view");
      return y(), E(J, null, [
        s.value ? (y(), E("div", tj, [
          u("span", nj, H(s.value), 1)
        ])) : ae("", !0),
        n.value ? (y(), E(J, { key: 1 }, [
          i[0] || (i[0] = u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" }, null, -1)),
          i[1] || (i[1] = u("span", null, "Loading...", -1))
        ], 64)) : s.value ? ae("", !0) : (y(), le(r, { key: 2 }))
      ], 64);
    };
  }
}, oj = { class: "nav nav-tabs" }, rj = {
  __name: "NavigationBar",
  setup(e) {
    const t = {
      props: { ...Ra.props },
      setup(s, { slots: o }) {
        const { href: i, isExactActive: r } = im(s);
        return () => yo(
          Ra,
          { ...s, custom: !0 },
          () => yo(
            n,
            { active: r.value, href: i.value },
            () => o.default()
          )
        );
      }
    }, n = {
      props: {
        active: { type: Boolean },
        href: { type: String }
      },
      setup(s, { slots: o }) {
        return () => yo(
          "li",
          {
            class: { "nav-item": !0 }
          },
          [
            yo(
              "a",
              {
                class: { active: s.active, "nav-link": !0 },
                href: s.href
              },
              o.default()
            )
          ]
        );
      }
    };
    return (s, o) => (y(), E("ul", oj, [
      F(t, { to: { name: "home" } }, {
        default: K(() => o[0] || (o[0] = [
          se("Home")
        ])),
        _: 1
      }),
      F(t, { to: { name: "custom-request" } }, {
        default: K(() => o[1] || (o[1] = [
          se("Custom request")
        ])),
        _: 1
      })
    ]));
  }
}, ij = /* @__PURE__ */ he(rj, [["__scopeId", "data-v-33b04e66"]]), aj = {
  __name: "MainLayout",
  setup(e) {
    return (t, n) => {
      const s = be("router-view");
      return y(), E("div", null, [
        F(ij, { class: "mb-2" }),
        F(s)
      ]);
    };
  }
}, lj = ["data-key"], cj = ["data-value", "innerHTML"], uj = {
  __name: "ValueViewer",
  props: {
    value: {}
  },
  setup(e) {
    const t = (n) => !isNaN(n);
    return (n, s) => e.value !== null && typeof e.value == "object" ? (y(!0), E(J, { key: 0 }, Ee(e.value, (o, i) => (y(), E("div", {
      key: i,
      class: "table-cell value-wrapper"
    }, [
      t(i) ? ae("", !0) : (y(), E("span", {
        key: 0,
        class: "cell-key text-muted me-2",
        "data-key": i
      }, H(`${i}:`), 9, lj)),
      F(hm, { value: o }, null, 8, ["value"])
    ]))), 128)) : (y(), E("span", {
      key: 1,
      class: "cell-value",
      "data-value": e.value,
      innerHTML: e.value
    }, null, 8, cj));
  }
}, hm = /* @__PURE__ */ he(uj, [["__scopeId", "data-v-29dbcf0d"]]), dj = {
  __name: "TextMarker",
  props: {
    query: { type: String }
  },
  setup(e) {
    const t = e, n = L(null), o = (() => {
      const r = "data-marker-id";
      let a = 1;
      const l = /* @__PURE__ */ new Map(), c = () => {
        if (l.size > 0)
          for (const [g, { marked: _, text: S }] of l)
            _ == null || _.replaceWith(S), l.delete(g);
      }, d = (g, _) => {
        a++, g.setAttribute(r, a), g.setAttribute("key", `${r}-${a}`), l.set(a, { marked: g, text: _ });
      }, f = (g, _, S) => {
        const b = document.createElement("span"), O = document.createTextNode(g), w = document.createElement("mark");
        w.textContent = _;
        const N = document.createTextNode(S);
        return b.appendChild(O), b.appendChild(w), b.appendChild(N), b;
      }, p = (g, _ = "") => {
        try {
          return new RegExp(g, _);
        } catch {
          return console.log("Invalid regular expression"), !1;
        }
      }, h = (g, _) => {
        var k, x, $;
        if (g.nodeValue === "") return;
        const S = p(
          `(?<before>.*?)(?<found>${_})(?<after>.*)`,
          "i"
        );
        if (!S) return;
        const b = g.nodeValue.match(S);
        if (!b || !b.groups || b.groups.found === "") return;
        const O = (k = b.groups) == null ? void 0 : k.before, w = (x = b.groups) == null ? void 0 : x.found, N = ($ = b.groups) == null ? void 0 : $.after, C = f(O, w, N);
        d(C, g), g.replaceWith(C);
      }, m = (g, _) => {
        for (let S of [...g.childNodes])
          S.nodeType === Node.TEXT_NODE ? h(S, _) : m(S, _);
      };
      return (g, _) => {
        c(), m(g, _);
      };
    })(n.value), i = L1();
    return tn(() => {
      i.default(), n.value && o(n.value, t.query);
    }), (r, a) => (y(), E("span", {
      ref_key: "rootEl",
      ref: n,
      key: `marker-${e.query}`
    }, [
      ye(r.$slots, "default", {}, void 0, !0)
    ]));
  }
}, C_ = /* @__PURE__ */ he(dj, [["__scopeId", "data-v-6d6d7426"]]), fj = {
  key: 0,
  class: "badge rounded-pill text-bg-primary"
}, pj = {
  key: 1,
  class: "badge rounded-pill text-bg-light"
}, hj = {
  __name: "MappingStatus",
  props: {
    mapped: {
      type: Boolean
    }
  },
  setup(e) {
    return (t, n) => (y(), E("div", null, [
      e.mapped ? (y(), E("span", fj, "Mapped")) : (y(), E("span", pj, "Not Mapped"))
    ]));
  }
}, mj = { "data-table-wrapper": "" }, vj = {
  key: 0,
  class: "rotated-entries border p-2"
}, gj = ["data-key"], yj = {
  key: 1,
  class: "table table-bordered table-striped table-hover"
}, _j = ["data-status"], bj = { class: "badge round-pill bg-primary" }, Ej = {
  key: 0,
  class: "text-muted fst-italic"
}, Sj = {
  __name: "ResourceEntriesTable",
  setup(e) {
    function t(c) {
      const d = /* @__PURE__ */ new Set();
      return c.forEach((f) => {
        Object.keys(f).forEach((p) => {
          d.add(p);
        });
      }), Array.from(d);
    }
    const n = Ro(), s = I(() => n.pagination.items), o = I(() => n.rotate), i = I(() => s.value.map(({ data: c }) => c)), r = I(
      () => s.value.map(({ mapping_status: c }) => c ?? [])
    );
    function a(c) {
      var d;
      return (d = r.value) == null ? void 0 : d[c];
    }
    const l = I(() => t(i.value));
    return (c, d) => (y(), E("div", mj, [
      o.value ? (y(), E("div", vj, [
        (y(!0), E(J, null, Ee(i.value, (f, p) => (y(), E("div", {
          key: `index-${p}`,
          class: "rotated-entry border mb-2"
        }, [
          (y(!0), E(J, null, Ee(l.value, (h) => (y(), E("div", {
            key: `key-${h}`,
            class: "value-wrapper border-bottom p-2"
          }, [
            u("span", {
              class: "fw-bold me-2",
              "data-key": h
            }, H(h) + ":", 9, gj),
            F(C_, {
              query: T(n).query
            }, {
              default: K(() => [
                F(hm, {
                  value: f[h]
                }, null, 8, ["value"])
              ]),
              _: 2
            }, 1032, ["query"])
          ]))), 128))
        ]))), 128))
      ])) : (y(), E("table", yj, [
        u("thead", null, [
          u("tr", null, [
            d[0] || (d[0] = u("th", null, [
              u("span", null, "Mapping status")
            ], -1)),
            (y(!0), E(J, null, Ee(l.value, (f, p) => (y(), E("th", {
              key: `key-${p}`
            }, [
              u("span", null, H(f), 1)
            ]))), 128))
          ])
        ]),
        u("tbody", null, [
          (y(!0), E(J, null, Ee(i.value, (f, p) => {
            var h, m, v;
            return y(), E("tr", {
              key: `index-${p}`
            }, [
              u("td", {
                "data-status": c.status = a(p)
              }, [
                u("span", bj, H((m = (h = c.status) == null ? void 0 : h.status) == null ? void 0 : m.toUpperCase()), 1),
                (v = c.status) != null && v.reason ? (y(), E("small", Ej, H(c.status.reason), 1)) : ae("", !0)
              ], 8, _j),
              (y(!0), E(J, null, Ee(l.value, (g, _) => {
                var S, b, O, w;
                return y(), E("td", {
                  key: `key-${_}-${g}`
                }, [
                  (b = (S = c.status) == null ? void 0 : S.mapped_fields) != null && b.length ? (y(), le(hj, {
                    key: 0,
                    mapped: (w = (O = c.status) == null ? void 0 : O.mapped_fields) == null ? void 0 : w.includes(g)
                  }, null, 8, ["mapped"])) : ae("", !0),
                  F(C_, {
                    query: T(n).query
                  }, {
                    default: K(() => [
                      F(hm, {
                        value: f[g]
                      }, null, 8, ["value"])
                    ]),
                    _: 2
                  }, 1032, ["query"])
                ]);
              }), 128))
            ]);
          }), 128))
        ])
      ]))
    ]));
  }
}, wj = /* @__PURE__ */ he(Sj, [["__scopeId", "data-v-362b77cd"]]), Nj = { key: 0 }, Oj = { class: "text-nowrap d-flex align-items-center" }, xj = { class: "me-2" }, Cj = { class: "ms-auto" }, Tj = { key: 0 }, $j = {
  key: 1,
  class: "badge bg-danger rounded-pill"
}, kj = {
  key: 2,
  class: "badge bg-primary rounded-pill"
}, Dj = { class: "d-flex align-items-center" }, Ij = { class: "ms-auto" }, Rj = { class: "badge bg-primary rounded-pill" }, Aj = ["innerHTML"], Mj = {
  __name: "ResultsDropdown",
  emits: ["result-selected"],
  setup(e, { emit: t }) {
    const n = Ro(), s = I(() => n.active), o = I(() => n.results), i = I(() => n.total), a = (() => {
      const c = L("errorModal"), d = L("");
      return { show: async (p) => {
        d.value = (p == null ? void 0 : p.message) || "there was an error fetching this resource", (typeof p == "string" || p instanceof String) && p.trim() !== "" && (d.value = p), c.value.show();
      }, ref: c, message: () => d.value };
    })();
    function l(c) {
      if (c != null && c.error) {
        a.show(c.error);
        return;
      }
      c != null && c.loading || n.setActive(c);
    }
    return (c, d) => {
      var v;
      const f = be("b-dropdown-item"), p = be("b-dropdown-divider"), h = be("b-dropdown"), m = be("b-modal");
      return y(), E(J, null, [
        F(h, { size: "sm" }, {
          button: K(() => [
            s.value ? (y(), E(J, { key: 1 }, [
              se(H(s.value.category), 1)
            ], 64)) : (y(), E("span", Nj, "Select a resource..."))
          ]),
          default: K(() => [
            (y(!0), E(J, null, Ee(o.value, (g, _) => (y(), le(f, {
              key: _,
              active: s.value == g,
              onClick: (S) => l(g),
              disabled: g.loading
            }, {
              default: K(() => {
                var S, b;
                return [
                  u("div", Oj, [
                    u("span", xj, H(g.category), 1),
                    u("span", Cj, [
                      g.loading ? (y(), E("span", Tj, d[0] || (d[0] = [
                        u("i", { class: "fas fa-spinner fa-spin fa-fw" }, null, -1)
                      ]))) : g != null && g.error ? (y(), E("span", $j, "error")) : (y(), E("span", kj, H((b = (S = g == null ? void 0 : g.data) == null ? void 0 : S.data) == null ? void 0 : b.length), 1))
                    ])
                  ])
                ];
              }),
              _: 2
            }, 1032, ["active", "onClick", "disabled"]))), 128)),
            F(p),
            F(f, null, {
              default: K(() => [
                u("span", Dj, [
                  d[1] || (d[1] = u("span", { class: "fw-bold" }, "Total", -1)),
                  u("span", Ij, [
                    u("span", Rj, H(i.value), 1)
                  ])
                ])
              ]),
              _: 1
            })
          ]),
          _: 1
        }),
        F(m, {
          ref: (v = T(a)) == null ? void 0 : v.ref,
          size: "xl",
          class: "modal-error",
          "ok-only": ""
        }, {
          title: K(() => d[2] || (d[2] = [
            se("Error")
          ])),
          default: K(() => {
            var g;
            return [
              u("div", {
                innerHTML: (g = T(a)) == null ? void 0 : g.message()
              }, null, 8, Aj)
            ];
          }),
          _: 1
        }, 512)
      ], 64);
    };
  }
}, Pj = /* @__PURE__ */ he(Mj, [["__scopeId", "data-v-10b35a9e"]]), Vj = {
  __name: "RotateResultsButton",
  setup(e) {
    const t = Ro();
    function n() {
      t.rotate = !t.rotate;
    }
    return (s, o) => (y(), E("div", null, [
      u("button", {
        class: "btn btn-sm btn-secondary",
        onClick: n
      }, [
        u("i", {
          class: Te(["fas fa-sync fa-fw me-1", { "fa-rotate-90": T(t).rotate }])
        }, null, 2),
        o[0] || (o[0] = u("span", null, "Rotate results", -1))
      ])
    ]));
  }
}, Lj = /* @__PURE__ */ he(Vj, [["__scopeId", "data-v-d9820123"]]), Fj = { class: "" }, Uj = { class: "fw-bold" }, jj = {
  key: 0,
  class: "fst-italic type-null"
}, Bj = {
  key: 1,
  class: "type-boolean"
}, Hj = {
  key: 2,
  class: "type-number"
}, Yj = {
  key: 3,
  class: "type-string"
}, Wj = {
  __name: "JsonTree",
  props: {
    json: { default: null },
    index: { type: Number, default: 0 }
  },
  setup(e) {
    const t = e, n = L(!1);
    function s(a) {
      return Array.isArray(a) ? "array" : typeof a == "object" && a !== null ? "object" : typeof a == "number" ? "number" : typeof a == "string" ? "string" : typeof a == "boolean" ? "boolean" : a === null ? "null" : "unknown";
    }
    const o = I(() => s(t.json)), i = I(() => {
      const a = {
        open: "",
        close: ""
      };
      return o.value === "array" ? (a.open = "[", a.close = "]") : o.value === "object" && (a.open = "{", a.close = "}"), a;
    });
    function r() {
      n.value = !n.value;
    }
    return (a, l) => (y(), E("span", {
      class: Te({ collapsed: n.value })
    }, [
      o.value === "object" || o.value === "array" ? (y(), E("span", {
        key: 0,
        class: "indicator me-1",
        onClick: Vt(r, ["stop"])
      })) : ae("", !0),
      u("span", null, H(i.value.open), 1),
      P(u("span", Fj, [
        (y(!0), E(J, null, Ee(e.json, (c, d) => (y(), E("div", {
          key: `${e.index}-el-${d}`,
          class: "ms-4"
        }, [
          u("span", Uj, H(d) + ": ", 1),
          Array.isArray(c) ? (y(), le(Ad, {
            key: 0,
            index: e.index + 1,
            json: c
          }, null, 8, ["index", "json"])) : typeof c == "object" && c !== null ? (y(), le(Ad, {
            key: 1,
            index: e.index + 1,
            json: c
          }, null, 8, ["index", "json"])) : (y(), E(J, { key: 2 }, [
            s(c) === "null" ? (y(), E("span", jj, "null")) : s(c) === "boolean" ? (y(), E("span", Bj, H(c), 1)) : s(c) === "number" ? (y(), E("span", Hj, H(c), 1)) : s(c) === "string" ? (y(), E("span", Yj, '"' + H(c) + '"', 1)) : ae("", !0),
            l[0] || (l[0] = u("span", null, ",", -1))
          ], 64))
        ]))), 128))
      ], 512), [
        [Di, !n.value]
      ]),
      u("span", null, H(i.value.close), 1)
    ], 2));
  }
}, Ad = /* @__PURE__ */ he(Wj, [["__scopeId", "data-v-01ff7aaf"]]), Gj = ["disabled"], zj = { class: "tree-wrapper" }, Kj = {
  __name: "ShowCodeButton",
  setup(e) {
    const t = Ro(), n = Dn(), s = Uf(), o = L(), i = I(() => {
      var l, c, d;
      return (d = (c = (l = t.active) == null ? void 0 : l.data) == null ? void 0 : c.metadata) == null ? void 0 : d.payload;
    });
    function r() {
      if (!i.value) return;
      const l = JSON.stringify(i.value, null, "	");
      jf(l, {});
    }
    async function a() {
      try {
        const l = JSON.stringify(i.value, null, 2);
        await s.copy(l), n.toast({ title: "Success", body: "Payload copied to clipboard" });
      } catch (l) {
        n.toast({
          title: "Error",
          body: `Payload NOT copied to clipboard - ${l}`
        });
      }
    }
    return (l, c) => {
      const d = be("b-modal");
      return y(), E(J, null, [
        u("div", null, [
          u("button", {
            class: "btn btn-sm btn-outline-secondary",
            onClick: c[0] || (c[0] = (f) => o.value.show()),
            disabled: !i.value
          }, c[2] || (c[2] = [
            u("i", { class: "fas fa-code fa-fw me-1" }, null, -1),
            u("span", null, "Show payload", -1)
          ]), 8, Gj)
        ]),
        F(d, {
          ref_key: "jsonModalRef",
          ref: o,
          size: "xl",
          "ok-only": "",
          title: "Payload"
        }, {
          footer: K(({}) => [
            u("div", { class: "d-flex gap-2" }, [
              u("button", {
                class: "btn btn-sm btn-outline-primary",
                onClick: a
              }, c[3] || (c[3] = [
                u("i", { class: "fas fa-copy fa-fw me-1" }, null, -1),
                u("span", null, "Copy", -1)
              ])),
              u("button", {
                class: "btn btn-sm btn-outline-primary",
                onClick: r
              }, c[4] || (c[4] = [
                u("i", { class: "fas fa-file-arrow-down fa-fw me-1" }, null, -1),
                u("span", null, "Download", -1)
              ]))
            ]),
            u("div", null, [
              u("button", {
                class: "btn btn-sm btn-secondary",
                onClick: c[1] || (c[1] = (f) => o.value.hide())
              }, c[5] || (c[5] = [
                u("span", null, "Close", -1)
              ]))
            ])
          ]),
          default: K(() => [
            u("div", zj, [
              F(Ad, { json: i.value }, null, 8, ["json"])
            ])
          ]),
          _: 1
        }, 512)
      ], 64);
    };
  }
}, Xj = /* @__PURE__ */ he(Kj, [["__scopeId", "data-v-57deab33"]]), qj = { class: "d-flex align-items-center gap-2" }, Jj = ["title"], Qj = {
  __name: "QueryInput",
  setup(e) {
    const t = Ro(), n = Za((i) => {
      t.setQuery(i);
    }, 300), s = I(() => t.queryError), o = I({
      get: () => t.query,
      set: (i) => n(i)
    });
    return (i, r) => (y(), E("div", qj, [
      P(u("input", {
        class: "form-control form-control-sm",
        type: "search",
        name: "query",
        placeholder: "search...",
        "onUpdate:modelValue": r[0] || (r[0] = (a) => o.value = a)
      }, null, 512), [
        [Ue, o.value]
      ]),
      s.value ? (y(), E("span", {
        key: 0,
        title: s.value,
        class: "text-danger"
      }, r[1] || (r[1] = [
        u("i", { class: "fas fa-info-circle fa-fw" }, null, -1)
      ]), 8, Jj)) : ae("", !0)
    ]));
  }
}, Zj = {
  "data-prevent-close": "",
  class: "p-2"
}, e6 = ["id", "value"], t6 = ["for"], n6 = {
  __name: "MappingStatusSelect",
  setup(e) {
    const t = Ro(), n = I(() => {
      var r, a;
      return ((a = (r = t.active) == null ? void 0 : r.data) == null ? void 0 : a.data) ?? [];
    }), s = I(
      () => n.value.map(({ mapping_status: r }) => r ?? [])
    ), o = I(() => {
      var a;
      const r = new Set(
        (a = s.value) == null ? void 0 : a.map(({ status: l }) => l)
      );
      return Array.from(r);
    }), i = I({
      get: () => t.visibleStatuses,
      set: (r) => {
        t.setVisibleStatuses([...r]);
      }
    });
    return (r, a) => {
      var c;
      const l = be("b-dropdown");
      return y(), le(l, {
        size: "sm",
        disabled: ((c = o.value) == null ? void 0 : c.length) === 0,
        variant: "outline-primary"
      }, {
        button: K(() => a[1] || (a[1] = [
          se("Mapping status")
        ])),
        default: K(() => [
          u("div", Zj, [
            (y(!0), E(J, null, Ee(o.value, (d, f) => (y(), E("div", {
              key: f,
              class: "form-check form-switch"
            }, [
              P(u("input", {
                class: "form-check-input",
                type: "checkbox",
                id: `status-${f}`,
                value: d,
                "onUpdate:modelValue": a[0] || (a[0] = (p) => i.value = p)
              }, null, 8, e6), [
                [_n, i.value]
              ]),
              u("label", {
                class: "form-check-label",
                for: `status-${f}`
              }, H(d), 9, t6)
            ]))), 128))
          ])
        ]),
        _: 1
      }, 8, ["disabled"]);
    };
  }
}, s6 = { class: "d-flex flex-column border rounded p-2 gap-2" }, o6 = { class: "d-flex gap-2" }, r6 = { class: "d-flex gap-2" }, i6 = { class: "ms-auto" }, a6 = { class: "d-flex" }, l6 = { class: "d-flex gap-2 ms-auto" }, c6 = {
  __name: "ResultsToolbar",
  setup(e) {
    const t = Ro(), n = I({
      get: () => {
        var r;
        return (r = t.pagination) == null ? void 0 : r.limit;
      },
      set: (r) => t.pagination.limit = r
    }), s = I({
      get: () => {
        var r;
        return (r = t.pagination) == null ? void 0 : r.page;
      },
      set: (r) => t.pagination.page = r
    }), o = I({
      get: () => {
        var r;
        return (r = t == null ? void 0 : t.pagination) == null ? void 0 : r.total;
      }
    }), i = I({
      get: () => {
        var r;
        return (r = t.pagination) == null ? void 0 : r.perPageOptions;
      }
    });
    return (r, a) => {
      const l = be("b-pagination"), c = be("b-pagination-dropdown");
      return y(), E("div", s6, [
        u("div", o6, [
          u("div", r6, [
            F(Lj),
            F(n6),
            F(Qj)
          ]),
          u("div", i6, [
            F(Xj)
          ])
        ]),
        u("div", a6, [
          F(Pj),
          u("div", l6, [
            F(l, {
              size: "sm",
              perPage: n.value,
              totalItems: o.value,
              modelValue: s.value,
              "onUpdate:modelValue": a[0] || (a[0] = (d) => s.value = d)
            }, null, 8, ["perPage", "totalItems", "modelValue"]),
            F(c, {
              options: i.value,
              modelValue: n.value,
              "onUpdate:modelValue": a[1] || (a[1] = (d) => n.value = d)
            }, null, 8, ["options", "modelValue"])
          ])
        ])
      ]);
    };
  }
}, u6 = { "data-prevent-close": "" }, d6 = { class: "line-item px-2 text-nowrap border-bottom mb-2" }, f6 = ["indeterminate"], p6 = ["value", "id"], h6 = ["for"], m6 = {
  __name: "CategoriesDropdown",
  props: {
    categories: { type: Array },
    selected: { type: Array },
    variant: { type: String, default: "light" }
  },
  emits: ["update:selected"],
  setup(e, { emit: t }) {
    const n = e, s = I(() => {
      var c, d;
      const a = ((c = n == null ? void 0 : n.selected) == null ? void 0 : c.length) ?? 0, l = ((d = n == null ? void 0 : n.categories) == null ? void 0 : d.length) ?? 0;
      return a === 0 ? !1 : a !== l;
    }), o = I({
      get() {
        var a, l;
        return ((a = n == null ? void 0 : n.selected) == null ? void 0 : a.length) === ((l = n == null ? void 0 : n.categories) == null ? void 0 : l.length);
      },
      set(a) {
        a ? i("update:selected", n.categories) : i("update:selected", []);
      }
    }), i = t, r = I({
      get: () => n.selected,
      set: (a) => {
        i("update:selected", a);
      }
    });
    return (a, l) => {
      const c = be("b-dropdown");
      return y(), le(c, {
        variant: e.variant,
        size: "sm"
      }, {
        default: K(() => [
          u("div", u6, [
            u("div", d6, [
              P(u("input", {
                class: "form-check-input",
                type: "checkbox",
                id: "checkbox-all",
                value: !0,
                "onUpdate:modelValue": l[0] || (l[0] = (d) => o.value = d),
                indeterminate: s.value
              }, null, 8, f6), [
                [_n, o.value]
              ]),
              l[2] || (l[2] = u("label", {
                class: "form-label ms-2",
                for: "checkbox-all"
              }, "All categories", -1))
            ]),
            (y(!0), E(J, null, Ee(e.categories, (d) => (y(), E("div", {
              key: `${d}`,
              class: "line-item px-2 text-nowrap"
            }, [
              P(u("input", {
                class: "form-check-input",
                type: "checkbox",
                value: d,
                id: `checkbox-${d}`,
                "onUpdate:modelValue": l[1] || (l[1] = (f) => r.value = f)
              }, null, 8, p6), [
                [_n, r.value]
              ]),
              u("label", {
                class: "form-label ms-2",
                for: `checkbox-${d}`
              }, H(d), 9, h6)
            ]))), 128))
          ])
        ]),
        _: 1
      }, 8, ["variant"]);
    };
  }
}, v6 = /* @__PURE__ */ he(m6, [["__scopeId", "data-v-89bd9d40"]]), g6 = { class: "d-flex" }, y6 = { class: "d-flex border p-2 rounded flex-column gap-2" }, _6 = { class: "d-flex align-items-center gap-2" }, b6 = { class: "d-flex" }, E6 = { class: "ms-auto" }, S6 = { class: "btn-group" }, w6 = ["disabled"], N6 = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, O6 = {
  key: 1,
  class: "fas fa-cloud-arrow-down fa-fw me-1"
}, x6 = { class: "mx-1 fw-bold" }, C6 = {
  __name: "SearchForm",
  setup(e) {
    const t = Ro(), n = rw(), s = I(() => n.categories), o = I({
      get: () => n.selectedCategories,
      set: (d) => n.selectedCategories = d
    }), i = I({
      get: () => t.mrn,
      set: (d) => t.mrn = d
    }), r = I({
      get: () => t.dateFrom,
      set: (d) => t.dateFrom = d
    }), a = I({
      get: () => t.dateTo,
      set: (d) => t.dateTo = d
    }), l = () => {
      var f;
      if ((((f = t == null ? void 0 : t.results) == null ? void 0 : f.length) ?? 0) !== 0) {
        for (const p of t.results)
          if (!(p.error || p.total === 0)) {
            t.setActive(p);
            break;
          }
      }
    };
    async function c() {
      t.setActive(null), await t.fetchAll(o.value), t.active === null && l();
    }
    return (d, f) => {
      var p, h, m;
      return y(), E("div", g6, [
        u("div", y6, [
          u("div", _6, [
            u("div", null, [
              f[4] || (f[4] = u("label", {
                class: "form-label",
                for: "mrn"
              }, "MRN", -1)),
              P(u("input", {
                class: "form-control form-control-sm",
                type: "text",
                id: "mrn",
                placeholder: "MRN",
                "onUpdate:modelValue": f[0] || (f[0] = (v) => i.value = v)
              }, null, 512), [
                [Ue, i.value]
              ])
            ]),
            u("div", null, [
              f[5] || (f[5] = u("label", {
                class: "form-label",
                for: "date-from"
              }, "Date from", -1)),
              P(u("input", {
                type: "date",
                class: "form-control form-control-sm",
                id: "date-from",
                placeholder: "date-from",
                "onUpdate:modelValue": f[1] || (f[1] = (v) => r.value = v)
              }, null, 512), [
                [Ue, r.value]
              ])
            ]),
            u("div", null, [
              f[6] || (f[6] = u("label", {
                class: "form-label",
                for: "date-to"
              }, "Date to", -1)),
              P(u("input", {
                type: "date",
                class: "form-control form-control-sm",
                id: "date-to",
                placeholder: "date-to",
                "onUpdate:modelValue": f[2] || (f[2] = (v) => a.value = v)
              }, null, 512), [
                [Ue, a.value]
              ])
            ])
          ]),
          u("div", b6, [
            u("div", E6, [
              u("div", S6, [
                u("button", {
                  class: "btn btn-sm btn-success",
                  onClick: c,
                  disabled: !i.value || T(t).loading || ((p = o.value) == null ? void 0 : p.length) === 0
                }, [
                  T(t).loading ? (y(), E("i", N6)) : (y(), E("i", O6)),
                  f[7] || (f[7] = u("span", null, "Fetch", -1)),
                  u("span", x6, H(((h = o.value) == null ? void 0 : h.length) ?? 0), 1),
                  u("span", null, "resource" + H(((m = o.value) == null ? void 0 : m.length) === 1 ? "" : "s"), 1)
                ], 8, w6),
                F(v6, {
                  categories: s.value,
                  selected: o.value,
                  "onUpdate:selected": f[3] || (f[3] = (v) => o.value = v),
                  variant: "success"
                }, null, 8, ["categories", "selected"])
              ])
            ])
          ])
        ])
      ]);
    };
  }
}, T6 = {
  __name: "AnimatedCounter",
  props: {
    value: { type: Number, default: 0 },
    duration: { type: Number, default: 300 }
    //milliseconds
  },
  setup(e) {
    const t = e, n = L(!1), s = L(0), o = L(""), i = zS((r) => {
      o.value = r;
    });
    return tn(async () => {
      const r = s.value, a = t.value;
      s.value = a, n.value = !0, await i(r, a, t.duration), n.value = !1;
    }), (r, a) => ye(r.$slots, "default", {
      animating: n.value,
      text: o.value
    }, () => [
      u("span", {
        class: Te({ animating: n.value })
      }, H(o.value), 3)
    ]);
  }
}, $6 = { class: "border rounded p-2" }, k6 = { class: "fw-bold fs-3" }, D6 = { class: "d-block text-muted fst-italic total-entries" }, I6 = { class: "d-flex align-items-center gap-2" }, R6 = { class: "text-muted fst-italic" }, A6 = ["disabled"], M6 = { key: 0 }, P6 = { class: "badge bg-warning" }, V6 = { class: "patient-details" }, L6 = {
  key: 1,
  style: { "max-width": "500px" }
}, F6 = {
  __name: "PatientPreview",
  setup(e) {
    const t = Ro(), n = Dn(), s = Uf();
    function o(l) {
      const c = /* @__PURE__ */ new Date(), d = new Date(l), f = c.getFullYear() - d.getFullYear();
      return c.getMonth() < d.getMonth() || c.getMonth() === d.getMonth() && c.getDate() < d.getDate() ? f - 1 : f;
    }
    const i = I(() => t.total), r = I(() => t.patient);
    async function a(l) {
      try {
        await s.copy(l), n.toast({ title: "Success", body: "FHIR ID copied to clipboard" });
      } catch (c) {
        n.toast({
          title: "Error",
          body: `FHIR ID NOT copied to clipboard - ${c}`
        });
      }
    }
    return (l, c) => {
      var d, f, p, h, m, v, g, _, S;
      return y(), E("div", $6, [
        r.value ? (y(), E(J, { key: 0 }, [
          u("span", k6, H(`${(d = r.value) == null ? void 0 : d["name-given"]} ${(f = r.value) == null ? void 0 : f["name-family"]}`), 1),
          u("small", D6, [
            c[1] || (c[1] = se(" Total entries: ")),
            F(T6, { value: i.value }, {
              default: K(({ animating: b, text: O }) => [
                u("span", {
                  class: Te(["counter", { animating: b }])
                }, H(parseInt(O)), 3)
              ]),
              _: 1
            }, 8, ["value"])
          ]),
          u("div", I6, [
            u("small", R6, [
              c[2] || (c[2] = u("span", { class: "fw-bold" }, "FHIR ID", -1)),
              se(": " + H((p = r.value) == null ? void 0 : p["fhir-id"]), 1)
            ]),
            u("button", {
              class: "btn btn-sm btn-outline-primary",
              onClick: c[0] || (c[0] = (b) => {
                var O;
                return a((O = r.value) == null ? void 0 : O["fhir-id"]);
              }),
              disabled: !((h = r.value) != null && h["fhir-id"])
            }, c[3] || (c[3] = [
              u("i", { class: "fas fa-copy fa-fw" }, null, -1)
            ]), 8, A6)
          ]),
          (m = r.value) != null && m.deceasedBoolean ? (y(), E("div", M6, [
            u("span", P6, [
              c[4] || (c[4] = u("span", { class: "fw-bold" }, "Deceased:", -1)),
              u("span", null, H(T(de)((v = r.value) == null ? void 0 : v.deceasedDateTime).format(
                "YYYY-MM-DD"
              )), 1)
            ])
          ])) : ae("", !0),
          u("div", V6, [
            u("div", null, [
              c[5] || (c[5] = u("span", { class: "fw-bold" }, "Gender", -1)),
              se(": " + H((g = r.value) == null ? void 0 : g.gender), 1)
            ]),
            u("div", null, [
              c[6] || (c[6] = u("span", { class: "fw-bold" }, "DOB", -1)),
              se(": " + H((_ = r.value) == null ? void 0 : _.birthDate), 1)
            ]),
            u("div", null, [
              c[7] || (c[7] = u("span", { class: "fw-bold" }, "Age", -1)),
              se(": " + H(o((S = r.value) == null ? void 0 : S.birthDate)), 1)
            ])
          ])
        ], 64)) : (y(), E("div", L6, c[8] || (c[8] = [
          u("span", { class: "fw-bold fs-5 d-block mb-2" }, "No preview available", -1),
          u("span", { class: "fst-italic text-muted" }, 'To display a preview of the patient, select "Demographics" from the dropdown menu and click "Fetch resources."', -1)
        ])))
      ]);
    };
  }
}, U6 = /* @__PURE__ */ he(F6, [["__scopeId", "data-v-1a101241"]]), j6 = { class: "d-flex gap-2" }, B6 = {
  "data-results": "",
  class: "my-2"
}, H6 = {
  key: 0,
  class: "alert alert-info"
}, Y6 = {
  key: 1,
  class: "border rounded p-2"
}, W6 = {
  __name: "HomePage",
  setup(e) {
    const t = Ro(), n = I(() => {
      var s;
      return ((s = t.pagination) == null ? void 0 : s.items) ?? [];
    });
    return (s, o) => {
      var r, a;
      const i = be("router-view");
      return y(), E("div", null, [
        u("div", j6, [
          F(C6),
          F(U6, { class: "flex-grow-1" })
        ]),
        (a = (r = T(t)) == null ? void 0 : r.results) != null && a.length ? (y(), le(c6, {
          key: 0,
          class: "my-2"
        })) : ae("", !0),
        u("div", B6, [
          T(t).hasFilters() > 0 ? (y(), E("div", H6, [
            o[2] || (o[2] = u("small", null, "A filter has been applied to the entries", -1)),
            u("button", {
              class: "btn btn-sm btn-outline-secondary ms-2",
              onClick: o[0] || (o[0] = (l) => T(t).removeFilters())
            }, o[1] || (o[1] = [
              u("i", { class: "fas fa-times fa-fw me-1" }, null, -1),
              u("span", null, "Remove filter", -1)
            ]))
          ])) : ae("", !0),
          n.value.length === 0 ? (y(), E("div", Y6, o[3] || (o[3] = [
            u("span", { class: "fst-italic" }, "no entries", -1)
          ]))) : (y(), le(wj, { key: 2 }))
        ]),
        F(i)
      ]);
    };
  }
}, G6 = { class: "btn-group" }, z6 = ["disabled"], K6 = ["onClick"], X6 = { class: "fst-italic p-2 text-muted" }, q6 = { key: 0 }, J6 = { class: "d-flex align-items-center" }, Q6 = { class: "me-2" }, Z6 = { class: "ms-auto" }, eB = ["onClick"], tB = ["disabled"], T_ = "__mapping_helper_requests", nB = {
  __name: "SavedRequestsDropdown",
  setup(e) {
    const t = jc(), n = L([]), s = L(""), o = L(), i = I(() => {
      var p, h;
      return !(((p = t == null ? void 0 : t.relativeURL) == null ? void 0 : p.trim()) !== "" || ((h = t == null ? void 0 : t.parameters) == null ? void 0 : h.length) > 0);
    });
    function r() {
      const p = localStorage.getItem(T_), h = JSON.parse(p) ?? [];
      n.value = h;
    }
    function a() {
      localStorage.setItem(T_, JSON.stringify(He(n.value)));
    }
    function l() {
      const p = {
        name: s.value,
        method: t.method,
        relativeURL: t.relativeURL,
        parameters: t.parameters
      };
      n.value.push(p), a(), o.value.hide();
    }
    function c(p) {
      var m;
      const h = (m = n.value) == null ? void 0 : m.findIndex((v) => v === p);
      h < 0 || (n.value.splice(h, 1), a());
    }
    function d() {
      s.value = "", o.value.show();
    }
    function f(p) {
      t.method = p == null ? void 0 : p.method, t.relativeURL = (p == null ? void 0 : p.relativeURL) ?? "", t.parameters = [...(p == null ? void 0 : p.parameters) ?? []];
    }
    return Mt(() => r()), (p, h) => {
      const m = be("b-dropdown-divider"), v = be("b-dropdown-item"), g = be("b-dropdown"), _ = be("b-modal");
      return y(), E("div", null, [
        F(g, {
          variant: "success",
          size: "sm"
        }, {
          header: K(({ onButtonClicked: S }) => [
            u("div", G6, [
              u("button", {
                class: "btn btn-outline-info btn-sm",
                onClick: d,
                disabled: i.value
              }, h[1] || (h[1] = [
                u("i", { class: "fas fa-floppy-disk fa-fw me-1" }, null, -1),
                u("span", null, "Save request...", -1)
              ]), 8, z6),
              u("button", {
                type: "button",
                class: "btn btn-sm btn-outline-info dropdown-toggle dropdown-toggle-split",
                onClick: S
              }, h[2] || (h[2] = [
                u("span", { class: "visually-hidden" }, "Toggle Dropdown", -1)
              ]), 8, K6)
            ])
          ]),
          default: K(() => {
            var S;
            return [
              u("div", X6, [
                ((S = n.value) == null ? void 0 : S.length) === 0 ? (y(), E("span", q6, "No saved requests")) : (y(), E(J, { key: 1 }, [
                  h[3] || (h[3] = u("span", null, "Restore a request", -1)),
                  F(m)
                ], 64))
              ]),
              (y(!0), E(J, null, Ee(n.value, (b, O) => (y(), le(v, {
                key: O,
                onClick: (w) => f(b)
              }, {
                default: K(() => [
                  u("div", J6, [
                    u("span", Q6, H(b.name), 1),
                    u("span", Z6, [
                      u("button", {
                        class: "btn btn-sm btn-outline-danger",
                        onClick: Vt((w) => c(b), ["stop"])
                      }, h[4] || (h[4] = [
                        u("i", { class: "fas fa-trash fa-fw" }, null, -1)
                      ]), 8, eB)
                    ])
                  ])
                ]),
                _: 2
              }, 1032, ["onClick"]))), 128))
            ];
          }),
          _: 1
        }),
        F(_, {
          ref_key: "saveRequestModalRef",
          ref: o
        }, {
          header: K(() => h[5] || (h[5] = [
            se("Save request")
          ])),
          footer: K(() => [
            u("div", null, [
              u("button", {
                class: "btn btn-sm btn-primary",
                disabled: !s.value,
                onClick: l
              }, h[6] || (h[6] = [
                u("i", { class: "fas fa-database fa-fw me-1" }, null, -1),
                u("span", null, "Save", -1)
              ]), 8, tB)
            ])
          ]),
          default: K(() => [
            u("div", null, [
              P(u("input", {
                class: "form-control form-control-sm",
                type: "text",
                id: "request-name",
                "onUpdate:modelValue": h[0] || (h[0] = (S) => s.value = S),
                placeholder: "Save as..."
              }, null, 512), [
                [Ue, s.value]
              ])
            ])
          ]),
          _: 1
        }, 512)
      ]);
    };
  }
}, sB = { class: "d-flex" }, oB = { class: "d-flex gap-2 align-items-center ms-auto" }, rB = ["disabled"], iB = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, aB = {
  key: 1,
  class: "fas fa-cloud-arrow-down fa-fw me-1"
}, lB = {
  __name: "RequestToolbar",
  setup(e) {
    const t = jc(), n = I(() => t.loading), s = I(() => t.relativeURL.trim() === "");
    function o() {
      t.fetch();
    }
    function i() {
      t.addParameter();
    }
    return (r, a) => (y(), E("div", sB, [
      u("div", null, [
        u("button", {
          class: "btn btn-sm btn-outline-success",
          onClick: i
        }, a[0] || (a[0] = [
          u("i", { class: "fas fa-circle-plus fa-fw me-1" }, null, -1),
          u("span", null, "Add query parameter", -1)
        ]))
      ]),
      u("div", oB, [
        F(nB),
        u("button", {
          class: "btn btn-sm btn-outline-primary",
          onClick: o,
          disabled: s.value
        }, [
          n.value ? (y(), E("i", iB)) : (y(), E("i", aB)),
          a[1] || (a[1] = u("span", null, "Fetch", -1))
        ], 8, rB)
      ])
    ]));
  }
}, cB = { class: "table table-bordered table-striped table-hover" }, uB = { key: 0 }, dB = { class: "d-flex" }, fB = ["onUpdate:modelValue"], pB = ["onUpdate:modelValue"], hB = ["onUpdate:modelValue"], mB = { class: "d-flex gap-2" }, vB = ["onClick"], gB = {
  __name: "ParametersList",
  setup(e) {
    const t = jc();
    function n(s) {
      t.removeParameter(s);
    }
    return (s, o) => {
      var i, r;
      return y(), E("table", cB, [
        o[2] || (o[2] = u("thead", null, [
          u("tr", null, [
            u("th", null, "Enabled"),
            u("th", null, "Key"),
            u("th", null, "Value"),
            u("th", null, "Actions")
          ])
        ], -1)),
        u("tbody", null, [
          ((r = (i = T(t)) == null ? void 0 : i.parameters) == null ? void 0 : r.length) === 0 ? (y(), E("tr", uB, o[0] || (o[0] = [
            u("td", { colspan: "4" }, [
              u("span", { class: "fst-italic" }, "no entries")
            ], -1)
          ]))) : (y(!0), E(J, { key: 1 }, Ee(T(t).parameters, (a, l) => (y(), E("tr", { key: l }, [
            u("td", null, [
              u("div", dB, [
                P(u("input", {
                  class: "form-check-input",
                  type: "checkbox",
                  "onUpdate:modelValue": (c) => a.enabled = c,
                  name: "request-enabled"
                }, null, 8, fB), [
                  [_n, a.enabled]
                ])
              ])
            ]),
            u("td", null, [
              P(u("input", {
                class: "form-control form-control-sm",
                type: "text",
                "onUpdate:modelValue": (c) => a.key = c,
                placeholder: "key",
                name: "request-key"
              }, null, 8, pB), [
                [Ue, a.key]
              ])
            ]),
            u("td", null, [
              P(u("input", {
                class: "form-control form-control-sm",
                type: "text",
                "onUpdate:modelValue": (c) => a.value = c,
                placeholder: "value",
                name: "request-value"
              }, null, 8, hB), [
                [Ue, a.value]
              ])
            ]),
            u("td", null, [
              u("div", mB, [
                u("button", {
                  class: "btn btn-sm btn-danger ms-auto",
                  onClick: (c) => n(a)
                }, o[1] || (o[1] = [
                  u("i", { class: "fas fa-trash fa-fw" }, null, -1)
                ]), 8, vB)
              ])
            ])
          ]))), 128))
        ])
      ]);
    };
  }
}, yB = {
  key: 0,
  class: "border rounded p-2"
}, _B = {
  __name: "ResponseViewer",
  setup(e) {
    const t = jc(), n = Dn(), s = Uf(), o = L(!0);
    function i() {
      const l = t == null ? void 0 : t.response;
      if (!l) return;
      const c = JSON.stringify(l, null, "	");
      jf(c, { fileName: "download.json" });
    }
    async function r() {
      try {
        const l = JSON.stringify(t == null ? void 0 : t.response, null, 2);
        await s.copy(l), n.toast({ title: "Success", body: "Payload copied to clipboard" });
      } catch (l) {
        n.toast({
          title: "Error",
          body: `Payload NOT copied to clipboard - ${l}`
        });
      }
    }
    const a = I(() => t.response);
    return (l, c) => (y(), E("div", null, [
      a.value ? (y(), E("div", yB, [
        c[2] || (c[2] = u("h3", null, "Response", -1)),
        u("div", { class: "d-flex gap-2" }, [
          u("button", {
            class: "btn btn-sm btn-outline-primary",
            onClick: r
          }, c[0] || (c[0] = [
            u("i", { class: "fas fa-copy fa-fw me-1" }, null, -1),
            u("span", null, "Copy", -1)
          ])),
          u("button", {
            class: "btn btn-sm btn-outline-primary",
            onClick: i
          }, c[1] || (c[1] = [
            u("i", { class: "fas fa-file-arrow-down fa-fw me-1" }, null, -1),
            u("span", null, "Download", -1)
          ]))
        ]),
        o.value ? (y(), le(Ad, {
          key: 0,
          json: a.value
        }, null, 8, ["json"])) : ae("", !0)
      ])) : ae("", !0)
    ]));
  }
}, bB = { class: "d-flex flex-column gap-2 border rounded p-2 mb-2" }, EB = { class: "d-flex gap-2 align-items-center" }, SB = { class: "input-group" }, wB = {
  __name: "RequestForm",
  setup(e) {
    const t = jc();
    return (n, s) => (y(), E("div", null, [
      u("div", bB, [
        u("div", EB, [
          u("div", SB, [
            s[1] || (s[1] = u("span", { class: "input-group-text" }, "FHIR endpoint", -1)),
            P(u("input", {
              class: "form-control form-control-sm",
              type: "text",
              placeholder: "e.g.: Patient",
              "onUpdate:modelValue": s[0] || (s[0] = (o) => T(t).relativeURL = o),
              name: "request-relative-url"
            }, null, 512), [
              [Ue, T(t).relativeURL]
            ])
          ])
        ]),
        F(lB)
      ]),
      F(gB),
      F(_B)
    ]));
  }
}, NB = {
  __name: "CustomRequestPage",
  setup(e) {
    return (t, n) => (y(), le(wB));
  }
}, OB = /* @__PURE__ */ he(NB, [["__scopeId", "data-v-c483f91d"]]), xB = [
  {
    path: "/",
    component: aj,
    // redirect: '/inbox',
    children: [
      { path: "", name: "home", component: W6 },
      {
        path: "custom-request",
        name: "custom-request",
        component: OB
      }
    ]
  },
  { path: "/:pathMatch(.*)*", component: Uc }
];
let mu;
const CB = () => mu || (mu = Qa({
  // Provide the history implementation to use. We are using the hash history for simplicity here.
  history: Ja(),
  routes: xB
}), mu), ire = (e) => {
  const t = xn(sj);
  t.use(js), t.use(zi());
  const n = CB();
  return t.use(n), t.mount(e), { app: t };
}, TB = {}, $B = {
  class: "position-fixed top-0 start-50 translate-middle-x",
  style: { "z-index": "1030" }
}, kB = { class: "mt-2" };
function DB(e, t) {
  const n = be("b-toast");
  return y(), E("div", $B, [
    u("div", kB, [
      F(n, {
        autohide: !1,
        visible: "",
        title: "Loading"
      }, {
        default: K(() => t[0] || (t[0] = [
          u("i", { class: "fas fa-spinner fa-spin fa-fw me-2" }, null, -1),
          u("span", null, "Please wait...", -1)
        ])),
        _: 1
      })
    ])
  ]);
}
const IB = /* @__PURE__ */ he(TB, [["render", DB]]);
function vu(e, t, n) {
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
}
function Xp(e, t) {
  if (Array.isArray(e)) {
    e.splice(t, 1);
    return;
  }
  delete e[t];
}
var vt = {};
let Ol;
const mc = (e) => Ol = e, iw = vt.NODE_ENV !== "production" ? Symbol("pinia") : (
  /* istanbul ignore next */
  Symbol()
);
function Ai(e) {
  return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
}
var Eo;
(function(e) {
  e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
})(Eo || (Eo = {}));
const Mr = typeof window < "u", $_ = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
function RB(e, { autoBom: t = !1 } = {}) {
  return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
}
function Wv(e, t, n) {
  const s = new XMLHttpRequest();
  s.open("GET", e), s.responseType = "blob", s.onload = function() {
    cw(s.response, t, n);
  }, s.onerror = function() {
    console.error("could not download file");
  }, s.send();
}
function aw(e) {
  const t = new XMLHttpRequest();
  t.open("HEAD", e, !1);
  try {
    t.send();
  } catch {
  }
  return t.status >= 200 && t.status <= 299;
}
function Wu(e) {
  try {
    e.dispatchEvent(new MouseEvent("click"));
  } catch {
    const n = document.createEvent("MouseEvents");
    n.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(n);
  }
}
const Gu = typeof navigator == "object" ? navigator : { userAgent: "" }, lw = /Macintosh/.test(Gu.userAgent) && /AppleWebKit/.test(Gu.userAgent) && !/Safari/.test(Gu.userAgent), cw = Mr ? (
  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
  typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !lw ? AB : (
    // Use msSaveOrOpenBlob as a second approach
    "msSaveOrOpenBlob" in Gu ? MB : (
      // Fallback to using FileReader and a popup
      PB
    )
  )
) : () => {
};
function AB(e, t = "download", n) {
  const s = document.createElement("a");
  s.download = t, s.rel = "noopener", typeof e == "string" ? (s.href = e, s.origin !== location.origin ? aw(s.href) ? Wv(e, t, n) : (s.target = "_blank", Wu(s)) : Wu(s)) : (s.href = URL.createObjectURL(e), setTimeout(function() {
    URL.revokeObjectURL(s.href);
  }, 4e4), setTimeout(function() {
    Wu(s);
  }, 0));
}
function MB(e, t = "download", n) {
  if (typeof e == "string")
    if (aw(e))
      Wv(e, t, n);
    else {
      const s = document.createElement("a");
      s.href = e, s.target = "_blank", setTimeout(function() {
        Wu(s);
      });
    }
  else
    navigator.msSaveOrOpenBlob(RB(e, n), t);
}
function PB(e, t, n, s) {
  if (s = s || open("", "_blank"), s && (s.document.title = s.document.body.innerText = "downloading..."), typeof e == "string")
    return Wv(e, t, n);
  const o = e.type === "application/octet-stream", i = /constructor/i.test(String($_.HTMLElement)) || "safari" in $_, r = /CriOS\/[\d]+/.test(navigator.userAgent);
  if ((r || o && i || lw) && typeof FileReader < "u") {
    const a = new FileReader();
    a.onloadend = function() {
      let l = a.result;
      if (typeof l != "string")
        throw s = null, new Error("Wrong reader.result type");
      l = r ? l : l.replace(/^data:[^;]*;/, "data:attachment/file;"), s ? s.location.href = l : location.assign(l), s = null;
    }, a.readAsDataURL(e);
  } else {
    const a = URL.createObjectURL(e);
    s ? s.location.assign(a) : location.href = a, s = null, setTimeout(function() {
      URL.revokeObjectURL(a);
    }, 4e4);
  }
}
function kn(e, t) {
  const n = "🍍 " + e;
  typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, t) : t === "error" ? console.error(n) : t === "warn" ? console.warn(n) : console.log(n);
}
function Gv(e) {
  return "_a" in e && "install" in e;
}
function uw() {
  if (!("clipboard" in navigator))
    return kn("Your browser doesn't support the Clipboard API", "error"), !0;
}
function dw(e) {
  return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (kn('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
}
async function VB(e) {
  if (!uw())
    try {
      await navigator.clipboard.writeText(JSON.stringify(e.state.value)), kn("Global state copied to clipboard.");
    } catch (t) {
      if (dw(t))
        return;
      kn("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
    }
}
async function LB(e) {
  if (!uw())
    try {
      fw(e, JSON.parse(await navigator.clipboard.readText())), kn("Global state pasted from clipboard.");
    } catch (t) {
      if (dw(t))
        return;
      kn("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
    }
}
async function FB(e) {
  try {
    cw(new Blob([JSON.stringify(e.state.value)], {
      type: "text/plain;charset=utf-8"
    }), "pinia-state.json");
  } catch (t) {
    kn("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
  }
}
let Lo;
function UB() {
  Lo || (Lo = document.createElement("input"), Lo.type = "file", Lo.accept = ".json");
  function e() {
    return new Promise((t, n) => {
      Lo.onchange = async () => {
        const s = Lo.files;
        if (!s)
          return t(null);
        const o = s.item(0);
        return t(o ? { text: await o.text(), file: o } : null);
      }, Lo.oncancel = () => t(null), Lo.onerror = n, Lo.click();
    });
  }
  return e;
}
async function jB(e) {
  try {
    const n = await UB()();
    if (!n)
      return;
    const { text: s, file: o } = n;
    fw(e, JSON.parse(s)), kn(`Global state imported from "${o.name}".`);
  } catch (t) {
    kn("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
  }
}
function fw(e, t) {
  for (const n in t) {
    const s = e.state.value[n];
    s ? Object.assign(s, t[n]) : e.state.value[n] = t[n];
  }
}
function Ws(e) {
  return {
    _custom: {
      display: e
    }
  };
}
const pw = "🍍 Pinia (root)", zu = "_root";
function BB(e) {
  return Gv(e) ? {
    id: zu,
    label: pw
  } : {
    id: e.$id,
    label: e.$id
  };
}
function HB(e) {
  if (Gv(e)) {
    const n = Array.from(e._s.keys()), s = e._s;
    return {
      state: n.map((i) => ({
        editable: !0,
        key: i,
        value: e.state.value[i]
      })),
      getters: n.filter((i) => s.get(i)._getters).map((i) => {
        const r = s.get(i);
        return {
          editable: !1,
          key: i,
          value: r._getters.reduce((a, l) => (a[l] = r[l], a), {})
        };
      })
    };
  }
  const t = {
    state: Object.keys(e.$state).map((n) => ({
      editable: !0,
      key: n,
      value: e.$state[n]
    }))
  };
  return e._getters && e._getters.length && (t.getters = e._getters.map((n) => ({
    editable: !1,
    key: n,
    value: e[n]
  }))), e._customProperties.size && (t.customProperties = Array.from(e._customProperties).map((n) => ({
    editable: !0,
    key: n,
    value: e[n]
  }))), t;
}
function YB(e) {
  return e ? Array.isArray(e) ? e.reduce((t, n) => (t.keys.push(n.key), t.operations.push(n.type), t.oldValue[n.key] = n.oldValue, t.newValue[n.key] = n.newValue, t), {
    oldValue: {},
    keys: [],
    operations: [],
    newValue: {}
  }) : {
    operation: Ws(e.type),
    key: Ws(e.key),
    oldValue: e.oldValue,
    newValue: e.newValue
  } : {};
}
function WB(e) {
  switch (e) {
    case Eo.direct:
      return "mutation";
    case Eo.patchFunction:
      return "$patch";
    case Eo.patchObject:
      return "$patch";
    default:
      return "unknown";
  }
}
let pa = !0;
const Ku = [], ii = "pinia:mutations", Ln = "pinia", { assign: GB } = Object, Md = (e) => "🍍 " + e;
function zB(e, t) {
  Lv({
    id: "dev.esm.pinia",
    label: "Pinia 🍍",
    logo: "https://pinia.vuejs.org/logo.svg",
    packageName: "pinia",
    homepage: "https://pinia.vuejs.org",
    componentStateTypes: Ku,
    app: e
  }, (n) => {
    typeof n.now != "function" && kn("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), n.addTimelineLayer({
      id: ii,
      label: "Pinia 🍍",
      color: 15064968
    }), n.addInspector({
      id: Ln,
      label: "Pinia 🍍",
      icon: "storage",
      treeFilterPlaceholder: "Search stores",
      actions: [
        {
          icon: "content_copy",
          action: () => {
            VB(t);
          },
          tooltip: "Serialize and copy the state"
        },
        {
          icon: "content_paste",
          action: async () => {
            await LB(t), n.sendInspectorTree(Ln), n.sendInspectorState(Ln);
          },
          tooltip: "Replace the state with the content of your clipboard"
        },
        {
          icon: "save",
          action: () => {
            FB(t);
          },
          tooltip: "Save the state as a JSON file"
        },
        {
          icon: "folder_open",
          action: async () => {
            await jB(t), n.sendInspectorTree(Ln), n.sendInspectorState(Ln);
          },
          tooltip: "Import the state from a JSON file"
        }
      ],
      nodeActions: [
        {
          icon: "restore",
          tooltip: 'Reset the state (with "$reset")',
          action: (s) => {
            const o = t._s.get(s);
            o ? typeof o.$reset != "function" ? kn(`Cannot reset "${s}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), kn(`Store "${s}" reset.`)) : kn(`Cannot reset "${s}" store because it wasn't found.`, "warn");
          }
        }
      ]
    }), n.on.inspectComponent((s, o) => {
      const i = s.componentInstance && s.componentInstance.proxy;
      if (i && i._pStores) {
        const r = s.componentInstance.proxy._pStores;
        Object.values(r).forEach((a) => {
          s.instanceData.state.push({
            type: Md(a.$id),
            key: "state",
            editable: !0,
            value: a._isOptionsAPI ? {
              _custom: {
                value: He(a.$state),
                actions: [
                  {
                    icon: "restore",
                    tooltip: "Reset the state of this store",
                    action: () => a.$reset()
                  }
                ]
              }
            } : (
              // NOTE: workaround to unwrap transferred refs
              Object.keys(a.$state).reduce((l, c) => (l[c] = a.$state[c], l), {})
            )
          }), a._getters && a._getters.length && s.instanceData.state.push({
            type: Md(a.$id),
            key: "getters",
            editable: !1,
            value: a._getters.reduce((l, c) => {
              try {
                l[c] = a[c];
              } catch (d) {
                l[c] = d;
              }
              return l;
            }, {})
          });
        });
      }
    }), n.on.getInspectorTree((s) => {
      if (s.app === e && s.inspectorId === Ln) {
        let o = [t];
        o = o.concat(Array.from(t._s.values())), s.rootNodes = (s.filter ? o.filter((i) => "$id" in i ? i.$id.toLowerCase().includes(s.filter.toLowerCase()) : pw.toLowerCase().includes(s.filter.toLowerCase())) : o).map(BB);
      }
    }), globalThis.$pinia = t, n.on.getInspectorState((s) => {
      if (s.app === e && s.inspectorId === Ln) {
        const o = s.nodeId === zu ? t : t._s.get(s.nodeId);
        if (!o)
          return;
        o && (s.nodeId !== zu && (globalThis.$store = He(o)), s.state = HB(o));
      }
    }), n.on.editInspectorState((s, o) => {
      if (s.app === e && s.inspectorId === Ln) {
        const i = s.nodeId === zu ? t : t._s.get(s.nodeId);
        if (!i)
          return kn(`store "${s.nodeId}" not found`, "error");
        const { path: r } = s;
        Gv(i) ? r.unshift("state") : (r.length !== 1 || !i._customProperties.has(r[0]) || r[0] in i.$state) && r.unshift("$state"), pa = !1, s.set(i, r, s.state.value), pa = !0;
      }
    }), n.on.editComponentState((s) => {
      if (s.type.startsWith("🍍")) {
        const o = s.type.replace(/^🍍\s*/, ""), i = t._s.get(o);
        if (!i)
          return kn(`store "${o}" not found`, "error");
        const { path: r } = s;
        if (r[0] !== "state")
          return kn(`Invalid path for store "${o}":
${r}
Only state can be modified.`);
        r[0] = "$state", pa = !1, s.set(i, r, s.state.value), pa = !0;
      }
    });
  });
}
function KB(e, t) {
  Ku.includes(Md(t.$id)) || Ku.push(Md(t.$id)), Lv({
    id: "dev.esm.pinia",
    label: "Pinia 🍍",
    logo: "https://pinia.vuejs.org/logo.svg",
    packageName: "pinia",
    homepage: "https://pinia.vuejs.org",
    componentStateTypes: Ku,
    app: e,
    settings: {
      logStoreChanges: {
        label: "Notify about new/deleted stores",
        type: "boolean",
        defaultValue: !0
      }
      // useEmojis: {
      //   label: 'Use emojis in messages ⚡️',
      //   type: 'boolean',
      //   defaultValue: true,
      // },
    }
  }, (n) => {
    const s = typeof n.now == "function" ? n.now.bind(n) : Date.now;
    t.$onAction(({ after: r, onError: a, name: l, args: c }) => {
      const d = hw++;
      n.addTimelineEvent({
        layerId: ii,
        event: {
          time: s(),
          title: "🛫 " + l,
          subtitle: "start",
          data: {
            store: Ws(t.$id),
            action: Ws(l),
            args: c
          },
          groupId: d
        }
      }), r((f) => {
        Pr = void 0, n.addTimelineEvent({
          layerId: ii,
          event: {
            time: s(),
            title: "🛬 " + l,
            subtitle: "end",
            data: {
              store: Ws(t.$id),
              action: Ws(l),
              args: c,
              result: f
            },
            groupId: d
          }
        });
      }), a((f) => {
        Pr = void 0, n.addTimelineEvent({
          layerId: ii,
          event: {
            time: s(),
            logType: "error",
            title: "💥 " + l,
            subtitle: "end",
            data: {
              store: Ws(t.$id),
              action: Ws(l),
              args: c,
              error: f
            },
            groupId: d
          }
        });
      });
    }, !0), t._customProperties.forEach((r) => {
      ht(() => T(t[r]), (a, l) => {
        n.notifyComponentUpdate(), n.sendInspectorState(Ln), pa && n.addTimelineEvent({
          layerId: ii,
          event: {
            time: s(),
            title: "Change",
            subtitle: r,
            data: {
              newValue: a,
              oldValue: l
            },
            groupId: Pr
          }
        });
      }, { deep: !0 });
    }), t.$subscribe(({ events: r, type: a }, l) => {
      if (n.notifyComponentUpdate(), n.sendInspectorState(Ln), !pa)
        return;
      const c = {
        time: s(),
        title: WB(a),
        data: GB({ store: Ws(t.$id) }, YB(r)),
        groupId: Pr
      };
      a === Eo.patchFunction ? c.subtitle = "⤵️" : a === Eo.patchObject ? c.subtitle = "🧩" : r && !Array.isArray(r) && (c.subtitle = r.type), r && (c.data["rawEvent(s)"] = {
        _custom: {
          display: "DebuggerEvent",
          type: "object",
          tooltip: "raw DebuggerEvent[]",
          value: r
        }
      }), n.addTimelineEvent({
        layerId: ii,
        event: c
      });
    }, { detached: !0, flush: "sync" });
    const o = t._hotUpdate;
    t._hotUpdate = Xo((r) => {
      o(r), n.addTimelineEvent({
        layerId: ii,
        event: {
          time: s(),
          title: "🔥 " + t.$id,
          subtitle: "HMR update",
          data: {
            store: Ws(t.$id),
            info: Ws("HMR update")
          }
        }
      }), n.notifyComponentUpdate(), n.sendInspectorTree(Ln), n.sendInspectorState(Ln);
    });
    const { $dispose: i } = t;
    t.$dispose = () => {
      i(), n.notifyComponentUpdate(), n.sendInspectorTree(Ln), n.sendInspectorState(Ln), n.getSettings().logStoreChanges && kn(`Disposed "${t.$id}" store 🗑`);
    }, n.notifyComponentUpdate(), n.sendInspectorTree(Ln), n.sendInspectorState(Ln), n.getSettings().logStoreChanges && kn(`"${t.$id}" store installed 🆕`);
  });
}
let hw = 0, Pr;
function k_(e, t, n) {
  const s = t.reduce((o, i) => (o[i] = He(e)[i], o), {});
  for (const o in s)
    e[o] = function() {
      const i = hw, r = n ? new Proxy(e, {
        get(...l) {
          return Pr = i, Reflect.get(...l);
        },
        set(...l) {
          return Pr = i, Reflect.set(...l);
        }
      }) : e;
      Pr = i;
      const a = s[o].apply(r, arguments);
      return Pr = void 0, a;
    };
}
function XB({ app: e, store: t, options: n }) {
  if (!t.$id.startsWith("__hot:")) {
    if (t._isOptionsAPI = !!n.state, !t._p._testing) {
      k_(t, Object.keys(n.actions), t._isOptionsAPI);
      const s = t._hotUpdate;
      He(t)._hotUpdate = function(o) {
        s.apply(this, arguments), k_(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
      };
    }
    KB(
      e,
      // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
      t
    );
  }
}
function Bc() {
  const e = Lm(!0), t = e.run(() => L({}));
  let n = [], s = [];
  const o = Xo({
    install(i) {
      mc(o), o._a = i, i.provide(iw, o), i.config.globalProperties.$pinia = o, vt.NODE_ENV !== "production" && vt.NODE_ENV !== "test" && Mr && zB(i, o), s.forEach((r) => n.push(r)), s = [];
    },
    use(i) {
      return this._a ? n.push(i) : s.push(i), this;
    },
    _p: n,
    // it's actually undefined here
    // @ts-expect-error
    _a: null,
    _e: e,
    _s: /* @__PURE__ */ new Map(),
    state: t
  });
  return vt.NODE_ENV !== "production" && vt.NODE_ENV !== "test" && Mr && typeof Proxy < "u" && o.use(XB), o;
}
function mw(e, t) {
  for (const n in t) {
    const s = t[n];
    if (!(n in e))
      continue;
    const o = e[n];
    Ai(o) && Ai(s) && !lt(s) && !Is(s) ? e[n] = mw(o, s) : e[n] = s;
  }
  return e;
}
const vw = () => {
};
function D_(e, t, n, s = vw) {
  e.push(t);
  const o = () => {
    const i = e.indexOf(t);
    i > -1 && (e.splice(i, 1), s());
  };
  return !n && Fm() && zb(o), o;
}
function na(e, ...t) {
  e.slice().forEach((n) => {
    n(...t);
  });
}
const qB = (e) => e(), I_ = Symbol(), qp = Symbol();
function mm(e, t) {
  e instanceof Map && t instanceof Map ? t.forEach((n, s) => e.set(s, n)) : e instanceof Set && t instanceof Set && t.forEach(e.add, e);
  for (const n in t) {
    if (!t.hasOwnProperty(n))
      continue;
    const s = t[n], o = e[n];
    Ai(o) && Ai(s) && e.hasOwnProperty(n) && !lt(s) && !Is(s) ? e[n] = mm(o, s) : e[n] = s;
  }
  return e;
}
const JB = vt.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
  /* istanbul ignore next */
  Symbol()
);
function QB(e) {
  return !Ai(e) || !e.hasOwnProperty(JB);
}
const { assign: $s } = Object;
function R_(e) {
  return !!(lt(e) && e.effect);
}
function A_(e, t, n, s) {
  const { state: o, actions: i, getters: r } = t, a = n.state.value[e];
  let l;
  function c() {
    !a && (vt.NODE_ENV === "production" || !s) && (n.state.value[e] = o ? o() : {});
    const d = vt.NODE_ENV !== "production" && s ? (
      // use ref() to unwrap refs inside state TODO: check if this is still necessary
      xe(L(o ? o() : {}).value)
    ) : xe(n.state.value[e]);
    return $s(d, i, Object.keys(r || {}).reduce((f, p) => (vt.NODE_ENV !== "production" && p in d && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`), f[p] = Xo(I(() => {
      mc(n);
      const h = n._s.get(e);
      return r[p].call(h, h);
    })), f), {}));
  }
  return l = vm(e, c, t, n, s, !0), l;
}
function vm(e, t, n = {}, s, o, i) {
  let r;
  const a = $s({ actions: {} }, n);
  if (vt.NODE_ENV !== "production" && !s._e.active)
    throw new Error("Pinia destroyed");
  const l = { deep: !0 };
  vt.NODE_ENV !== "production" && (l.onTrigger = ($) => {
    c ? h = $ : c == !1 && !C._hotUpdating && (Array.isArray(h) ? h.push($) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
  });
  let c, d, f = [], p = [], h;
  const m = s.state.value[e];
  !i && !m && (vt.NODE_ENV === "production" || !o) && (s.state.value[e] = {});
  const v = L({});
  let g;
  function _($) {
    let M;
    c = d = !1, vt.NODE_ENV !== "production" && (h = []), typeof $ == "function" ? ($(s.state.value[e]), M = {
      type: Eo.patchFunction,
      storeId: e,
      events: h
    }) : (mm(s.state.value[e], $), M = {
      type: Eo.patchObject,
      payload: $,
      storeId: e,
      events: h
    });
    const R = g = Symbol();
    rr().then(() => {
      g === R && (c = !0);
    }), d = !0, na(f, M, s.state.value[e]);
  }
  const S = i ? function() {
    const { state: M } = n, R = M ? M() : {};
    this.$patch((V) => {
      $s(V, R);
    });
  } : (
    /* istanbul ignore next */
    vt.NODE_ENV !== "production" ? () => {
      throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
    } : vw
  );
  function b() {
    r.stop(), f = [], p = [], s._s.delete(e);
  }
  const O = ($, M = "") => {
    if (I_ in $)
      return $[qp] = M, $;
    const R = function() {
      mc(s);
      const V = Array.from(arguments), j = [], U = [];
      function A(te) {
        j.push(te);
      }
      function G(te) {
        U.push(te);
      }
      na(p, {
        args: V,
        name: R[qp],
        store: C,
        after: A,
        onError: G
      });
      let X;
      try {
        X = $.apply(this && this.$id === e ? this : C, V);
      } catch (te) {
        throw na(U, te), te;
      }
      return X instanceof Promise ? X.then((te) => (na(j, te), te)).catch((te) => (na(U, te), Promise.reject(te))) : (na(j, X), X);
    };
    return R[I_] = !0, R[qp] = M, R;
  }, w = /* @__PURE__ */ Xo({
    actions: {},
    getters: {},
    state: [],
    hotState: v
  }), N = {
    _p: s,
    // _s: scope,
    $id: e,
    $onAction: D_.bind(null, p),
    $patch: _,
    $reset: S,
    $subscribe($, M = {}) {
      const R = D_(f, $, M.detached, () => V()), V = r.run(() => ht(() => s.state.value[e], (j) => {
        (M.flush === "sync" ? d : c) && $({
          storeId: e,
          type: Eo.direct,
          events: h
        }, j);
      }, $s({}, l, M)));
      return R;
    },
    $dispose: b
  }, C = mt(vt.NODE_ENV !== "production" || vt.NODE_ENV !== "production" && vt.NODE_ENV !== "test" && Mr ? $s(
    {
      _hmrPayload: w,
      _customProperties: Xo(/* @__PURE__ */ new Set())
      // devtools custom properties
    },
    N
    // must be added later
    // setupStore
  ) : N);
  s._s.set(e, C);
  const x = (s._a && s._a.runWithContext || qB)(() => s._e.run(() => (r = Lm()).run(() => t({ action: O }))));
  for (const $ in x) {
    const M = x[$];
    if (lt(M) && !R_(M) || Is(M))
      vt.NODE_ENV !== "production" && o ? vu(v.value, $, ma(x, $)) : i || (m && QB(M) && (lt(M) ? M.value = m[$] : mm(M, m[$])), s.state.value[e][$] = M), vt.NODE_ENV !== "production" && w.state.push($);
    else if (typeof M == "function") {
      const R = vt.NODE_ENV !== "production" && o ? M : O(M, $);
      x[$] = R, vt.NODE_ENV !== "production" && (w.actions[$] = M), a.actions[$] = M;
    } else vt.NODE_ENV !== "production" && R_(M) && (w.getters[$] = i ? (
      // @ts-expect-error
      n.getters[$]
    ) : M, Mr && (x._getters || // @ts-expect-error: same
    (x._getters = Xo([]))).push($));
  }
  if ($s(C, x), $s(He(C), x), Object.defineProperty(C, "$state", {
    get: () => vt.NODE_ENV !== "production" && o ? v.value : s.state.value[e],
    set: ($) => {
      if (vt.NODE_ENV !== "production" && o)
        throw new Error("cannot set hotState");
      _((M) => {
        $s(M, $);
      });
    }
  }), vt.NODE_ENV !== "production" && (C._hotUpdate = Xo(($) => {
    C._hotUpdating = !0, $._hmrPayload.state.forEach((M) => {
      if (M in C.$state) {
        const R = $.$state[M], V = C.$state[M];
        typeof R == "object" && Ai(R) && Ai(V) ? mw(R, V) : $.$state[M] = V;
      }
      vu(C, M, ma($.$state, M));
    }), Object.keys(C.$state).forEach((M) => {
      M in $.$state || Xp(C, M);
    }), c = !1, d = !1, s.state.value[e] = ma($._hmrPayload, "hotState"), d = !0, rr().then(() => {
      c = !0;
    });
    for (const M in $._hmrPayload.actions) {
      const R = $[M];
      vu(C, M, O(R, M));
    }
    for (const M in $._hmrPayload.getters) {
      const R = $._hmrPayload.getters[M], V = i ? (
        // special handling of options api
        I(() => (mc(s), R.call(C, C)))
      ) : R;
      vu(C, M, V);
    }
    Object.keys(C._hmrPayload.getters).forEach((M) => {
      M in $._hmrPayload.getters || Xp(C, M);
    }), Object.keys(C._hmrPayload.actions).forEach((M) => {
      M in $._hmrPayload.actions || Xp(C, M);
    }), C._hmrPayload = $._hmrPayload, C._getters = $._getters, C._hotUpdating = !1;
  })), vt.NODE_ENV !== "production" && vt.NODE_ENV !== "test" && Mr) {
    const $ = {
      writable: !0,
      configurable: !0,
      // avoid warning on devtools trying to display this property
      enumerable: !1
    };
    ["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((M) => {
      Object.defineProperty(C, M, $s({ value: C[M] }, $));
    });
  }
  return s._p.forEach(($) => {
    if (vt.NODE_ENV !== "production" && vt.NODE_ENV !== "test" && Mr) {
      const M = r.run(() => $({
        store: C,
        app: s._a,
        pinia: s,
        options: a
      }));
      Object.keys(M || {}).forEach((R) => C._customProperties.add(R)), $s(C, M);
    } else
      $s(C, r.run(() => $({
        store: C,
        app: s._a,
        pinia: s,
        options: a
      })));
  }), vt.NODE_ENV !== "production" && C.$state && typeof C.$state == "object" && typeof C.$state.constructor == "function" && !C.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
	state: () => new MyClass()
Found in store "${C.$id}".`), m && i && n.hydrate && n.hydrate(C.$state, m), c = !0, d = !0, C;
}
/*! #__NO_SIDE_EFFECTS__ */
// @__NO_SIDE_EFFECTS__
function vn(e, t, n) {
  let s, o;
  const i = typeof t == "function";
  if (typeof e == "string")
    s = e, o = i ? n : t;
  else if (o = e, s = e.id, vt.NODE_ENV !== "production" && typeof s != "string")
    throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
  function r(a, l) {
    const c = B1();
    if (a = // in test mode, ignore the argument provided as we can always retrieve a
    // pinia instance with getActivePinia()
    (vt.NODE_ENV === "test" && Ol && Ol._testing ? null : a) || (c ? Ie(iw, null) : null), a && mc(a), vt.NODE_ENV !== "production" && !Ol)
      throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
This will fail in production.`);
    a = Ol, a._s.has(s) || (i ? vm(s, t, o, a) : A_(s, o, a), vt.NODE_ENV !== "production" && (r._pinia = a));
    const d = a._s.get(s);
    if (vt.NODE_ENV !== "production" && l) {
      const f = "__hot:" + s, p = i ? vm(f, t, o, a, !0) : A_(f, $s({}, o), a, !0);
      l._hotUpdate(p), delete a.state.value[f], a._s.delete(f);
    }
    if (vt.NODE_ENV !== "production" && Mr) {
      const f = un();
      if (f && f.proxy && // avoid adding stores that are just built for hot module replacement
      !l) {
        const p = f.proxy, h = "_pStores" in p ? p._pStores : p._pStores = {};
        h[s] = d;
      }
    }
    return d;
  }
  return r.$id = s, r;
}
let Xu = {};
const Bf = (e) => Xu = e, es = (e) => {
  const t = Xu == null ? void 0 : Xu[e];
  return t ?? (console.error(`Translation error: could not find a translation for key ${e}`), !1);
}, ZB = (e, t = {}) => e.replace(/{{\s*(\w+)\s*}}/g, (n, s) => s in t ? t[s] : (console.warn(`Replacement warning: no replacement found for placeholder "${s}"`), n)), M_ = (e, t) => {
  const n = t.arg, s = t.value || {}, o = es(n);
  if (o) {
    const i = ZB(o, s);
    e.innerHTML = i;
  } else
    e.innerHTML = `-- translation not found for key "${n}" --`;
}, Hf = {
  // called before bound element's attributes
  // or event listeners are applied
  created(e, t, n, s) {
  },
  // called right before the element is inserted into the DOM.
  beforeMount(e, t, n, s) {
    M_(e, t);
  },
  // called when the bound element's parent component
  // and all its children are mounted.
  mounted(e, t, n, s) {
  },
  // called before the parent component is updated
  beforeUpdate(e, t, n, s) {
  },
  // called after the parent component and
  // all of its children have updated
  updated(e, t, n, s) {
    M_(e, t);
  },
  // called before the parent component is unmounted
  beforeUnmount(e, t, n, s) {
  },
  // called when the parent component is unmounted
  unmounted(e, t, n, s) {
  }
};
let eH = mr();
const Qr = vr(eH, [], { timeout: 0 }), tH = async () => {
  const e = {
    params: {
      route: "CdisController:getSettings"
    }
  };
  return Qr.get("", e);
}, nH = async (e) => {
  const t = {
    params: {
      route: "CdisController:saveSettings"
    }
  };
  return Qr.post("", { settings: e }, t);
}, sH = async (e) => {
  const t = {
    params: {
      route: "CdisController:saveCustomMapping"
    }
  };
  return Qr.post("", { customMapping: e }, t);
}, oH = async (e) => {
  const t = {
    params: {
      route: "CdisController:upsertFhirSettings"
    }
  };
  return Qr.post("", { settings: e }, t);
}, rH = async (e) => {
  const t = {
    params: {
      route: "CdisController:deleteFhirSystem",
      ehr_id: e
    }
  };
  return Qr.delete("", t);
}, iH = async (e) => {
  const t = {
    params: {
      route: "CdisController:updateFhirSystemsOrder"
    }
  };
  return Qr.post("", { order: e }, t);
}, aH = async () => {
  const e = {
    params: {
      route: "CdisController:getExpiredTokens"
    }
  };
  return Qr.get("", e);
}, lH = async (e) => {
  const t = {
    params: {
      route: "CdisController:deleteExpiredTokens",
      ehr_id: e
    }
  };
  return Qr.delete("", t);
}, cH = "app-settings", zv = /* @__PURE__ */ vn(cH, () => {
  const e = L(!1), t = L(), n = mt({}), s = L([]), o = L({}), i = L({}), r = L(""), a = I(() => !lr(o.value, i.value)), l = I({
    get: () => n.value,
    set: (f) => {
      Bf(f), n.value = f;
    }
  });
  function c() {
    i.value = { ...o.value };
  }
  async function d() {
    try {
      if (a.value)
        return e.value = !0, await nH(this.newConfig);
    } catch (f) {
      console.log(f), t.value = f;
    } finally {
      e.value = !1;
    }
  }
  return {
    loading: e,
    error: t,
    breakTheGlassUserTypes: s,
    redcapConfig: o,
    newConfig: i,
    redirectURL: r,
    isDirty: a,
    lang: l,
    reset: c,
    save: d
  };
});
let uH = -1;
const dH = "fhir-system", Kv = /* @__PURE__ */ vn(dH, () => {
  const e = L(!1), t = L(), n = L([]), s = L([]), o = L({}), i = L({}), r = I(() => !lr(o.value, i.value)), a = I(() => !lr(s.value, n.value)), l = I(() => {
    var N, C, k, x, $, M;
    if (((N = s.value) == null ? void 0 : N.length) !== ((C = n.value) == null ? void 0 : C.length)) return !0;
    for (const R in n.value) {
      const V = (x = (k = n.value) == null ? void 0 : k[R]) == null ? void 0 : x.ehr_id, j = (M = ($ = s.value) == null ? void 0 : $[R]) == null ? void 0 : M.ehr_id;
      if (V !== j) return !0;
    }
    return !1;
  }), c = I(() => s.value.map((N) => N.ehr_id));
  function d(N) {
    return s.value.find((k) => k.ehr_id === N);
  }
  function f(N) {
    o.value = N;
    const C = to(N);
    i.value = C;
  }
  function p(N) {
    const C = i.value;
    C.fhir_custom_auth_params = N, i.value = C;
  }
  function h() {
    s.value = to(n.value), s.value.length === 0 ? f(null) : f(s.value[0]);
  }
  function m(N) {
    var $;
    const C = [...s.value], k = C.findIndex(
      (M) => (M == null ? void 0 : M.ehr_id) === (N == null ? void 0 : N.ehr_id)
    );
    if (k < 0) return;
    const x = C[k];
    C.splice(k, 1), s.value = [...C], (($ = o.value) == null ? void 0 : $.ehr_id) === (x == null ? void 0 : x.ehr_id) && (s.value.length === 0 ? this.setCurrent(null) : f(s.value[0]));
  }
  function v() {
    var C;
    return {
      ehr_name: "new system",
      order: ((C = s.value) == null ? void 0 : C.length) + 1,
      ehr_id: "",
      client_id: "",
      client_secret: "",
      fhir_base_url: "",
      fhir_token_url: "",
      fhir_authorize_url: "",
      fhir_identity_provider: null,
      patient_identifier_string: "",
      fhir_custom_auth_params: []
    };
  }
  async function g(N) {
    N.ehr_id = uH--;
    const C = await S(N);
    if (!C)
      throw new Error("Could not add the new FHIR system");
    return console.log(`FHIR system added - ID: ${C}`), C;
  }
  function _(N) {
    var k;
    n.value = to(N), s.value = [...N];
    const C = (k = s.value) == null ? void 0 : k[0];
    f(C);
  }
  async function S(N) {
    try {
      return e.value = !0, await oH(N);
    } catch (C) {
      console.log(C), t.value = C;
    } finally {
      e.value = !1;
    }
  }
  async function b(N) {
    return await rH(N);
  }
  async function O() {
    if (l.value)
      try {
        return e.value = !0, await iH(c.value);
      } catch (N) {
        console.log(N), t.value = N;
      } finally {
        e.value = !1;
      }
  }
  async function w() {
    if (!r.value && !a.value) return;
    const N = await S(He(i.value));
    N == null || N.data, await O();
  }
  return {
    loading: e,
    error: t,
    originalList: n,
    list: s,
    current: o,
    form: i,
    isDirty: r,
    listChanged: a,
    orderChanged: l,
    order: c,
    setCurrent: f,
    findByEhrId: d,
    updateAuthParams: p,
    reset: h,
    remove: m,
    makeNewSystem: v,
    add: g,
    init: _,
    upsert: S,
    delete: b,
    updateOrder: O,
    save: w
  };
}), fH = () => {
  let e = {};
  return {
    addError(t, n) {
      const s = (n == null ? void 0 : n.message) ?? n;
      t in e || (e[t] = []), e[t].push(s);
    },
    hasErrors() {
      return !!Object.keys(e).find(
        (n) => (n == null ? void 0 : n.length) > 0
      );
    },
    errors: () => e
  };
}, Xv = (e) => (n) => {
  const s = fH();
  for (const [o, i] of Object.entries(e))
    for (const r of i) {
      if (typeof r != "function") {
        console.warn(
          `the provided rule ${r} is not a valid function`
        );
        continue;
      }
      try {
        const a = r(n == null ? void 0 : n[o]);
      } catch (a) {
        s.addError(o, a);
      }
    }
  return s;
}, Ks = (e) => {
  const t = (e == null ? void 0 : e.message) ?? "this value is required";
  return (n) => {
    if (typeof n == "string" && (n = n.trim(), n.length < 1))
      throw new Error(t);
    if (Array.isArray(n) && n.length === 0)
      throw new Error(t);
    if ((n instanceof Set || n instanceof Map) && n.size === 0)
      throw new Error(t);
    if (typeof n == "object" && n !== null && Object.keys(n).length === 0)
      throw new Error(t);
    if (!n) throw new Error(t);
  };
}, pH = (e = [], t) => {
  const n = `this value must be one of these: '${e.join(", ")}`;
  return (s) => {
    if (!e.includes(s)) throw new Error(n);
  };
}, hH = (e) => {
  const t = e == null ? void 0 : e.message;
  return (n) => {
    if (n !== !0) throw new Error(t);
  };
}, mH = (e) => {
  const t = e == null ? void 0 : e.message;
  return (n) => {
    if (n !== !1) throw new Error(t);
  };
}, vH = (e = []) => (t) => {
  for (const n of e)
    n(t);
}, gH = [
  "field",
  "temporal",
  "label",
  "description",
  "category",
  "subcategory",
  "identifier",
  "disabled",
  "disabled_reason"
], yH = () => [
  "field",
  "label",
  "description",
  "category",
  "subcategory",
  "temporal",
  "identifier",
  "disabled",
  "disabled_reason"
], _H = (e = []) => (t) => {
  if (!(!t || typeof t != "object")) {
    for (const [n, s] of Object.entries(t))
      e.includes(n) || delete t[n];
    return { ...t };
  }
}, bH = (e) => {
  const t = ["temporal", "identifier", "disabled"];
  for (const [n, s] of Object.entries(e))
    t.includes(n) && (e[n] = DL(s));
  return e;
}, P_ = _H(gH), EH = "custom-mappings", gw = /* @__PURE__ */ vn(EH, () => {
  const e = L(!1), t = L(), n = L([]), s = L([]), o = L([]), i = I(() => {
    if (s.value.length !== o.value.length) return !0;
    for (const m in s.value) {
      const v = s.value[m], g = o.value[m];
      if (!lr(v, g)) return !0;
    }
    return !1;
  });
  function r() {
    return {
      temporal: !0,
      identifier: !1,
      disabled: !1
    };
  }
  function a() {
    o.value = [];
    for (const m of s.value)
      o.value.push({ ...m });
  }
  function l(m) {
    const v = [...o.value], g = v.findIndex((_) => _ === m);
    g < 0 || (v[g], v.splice(g, 1), o.value = v);
  }
  function c(m) {
    o.value.push(m);
  }
  function d(m, v) {
    const g = o.value.findIndex((S) => S === m);
    if (g < 0) return;
    const _ = o.value[g];
    for (const [S, b] of Object.entries(v))
      _[S] = b;
    o.value[g] = _;
  }
  function f(m) {
    const v = (m == null ? void 0 : m.validCategories) ?? [];
    n.value = [...v];
    const g = (m == null ? void 0 : m.list) ?? [];
    s.value = [...g], a();
  }
  async function p() {
    try {
      return e.value = !0, await sH(o.value);
    } catch (m) {
      console.log(t), t.value = m;
    } finally {
      e.value = !1;
    }
  }
  function h(m) {
    const v = {
      field: [Ks()],
      category: [
        vH([Ks(), pH(n.value)])
      ],
      label: [Ks()],
      temporal: [
        hH({
          message: "the 'temporal' field must be set to 'true'"
        })
      ],
      identifier: [
        mH({
          message: "the 'identifier' field must be set to 'false'"
        })
      ]
    };
    return Xv(v)(m);
  }
  return {
    loading: e,
    error: t,
    validCategories: n,
    originalList: s,
    list: o,
    isDirty: i,
    useDefaultEntry: r,
    reset: a,
    remove: l,
    add: c,
    edit: d,
    init: f,
    save: p,
    validate: h
  };
}), SH = "main", Hc = /* @__PURE__ */ vn(SH, () => {
  const e = zv(), t = Kv(), n = gw(), s = L(!1), o = L(!1), i = L(), r = I(() => e.isDirty || t.isDirty || t.orderChanged || t.listChanged || n.isDirty);
  async function a() {
    try {
      o.value = !0, await l(), s.value = !0;
    } catch (f) {
      f.value = useError(f);
    } finally {
      o.value = !1;
    }
  }
  async function l() {
    const f = await tH(), {
      lang: p,
      redcapConfig: h,
      redirectURL: m,
      breakTheGlassUserTypes: v,
      fhirSystems: g,
      customMappingsData: _
    } = f.data;
    e.lang = p, e.redirectURL = m, e.redcapConfig = h, e.breakTheGlassUserTypes = v, e.newConfig = { ...h }, t.init(g), n.init(_);
  }
  function c() {
    e.reset(), t.reset(), n.reset();
  }
  async function d() {
    try {
      o.value = !0;
      let f = !1;
      e.isDirty && (await e.save(), f = !0), (t.isDirty || t.listChanged) && (await t.save(), f = !0), t.orderChanged && (await t.updateOrder(), f = !0), n.isDirty && (await n.save(), f = !0), f && await l();
    } catch (f) {
      console.log(f);
    } finally {
      o.value = !1;
    }
  }
  return {
    ready: s,
    loading: o,
    error: i,
    savePending: r,
    init: a,
    loadSettings: l,
    resetChanges: c,
    saveChanges: d
  };
}), wH = "tools", NH = /* @__PURE__ */ vn(wH, () => {
  const e = L(!1), t = L(), n = L([]);
  async function s() {
    var i;
    try {
      e.value = !0;
      const r = await aH();
      n.value = ((i = r == null ? void 0 : r.data) == null ? void 0 : i.expiredTokens) ?? [];
    } catch (r) {
      t.value = r;
    } finally {
      e.value = !1;
    }
  }
  async function o(i) {
    try {
      return e.value = !0, await lH(i);
    } catch (r) {
      t.value = r;
    } finally {
      e.value = !1;
    }
  }
  return {
    loading: e,
    error: t,
    expiredTokens: n,
    fetchExpiredTokens: s,
    clearExpiredTokens: o
  };
}), OH = {
  key: 0,
  class: "alert alert-danger"
}, xH = {
  __name: "App",
  setup(e) {
    const t = Hc(), n = I(() => t.loading), s = I(() => t.ready), o = I(() => t.error);
    return Mt(() => {
      t.init();
    }), (i, r) => {
      const a = be("router-view");
      return y(), E(J, null, [
        o.value ? (y(), E("div", OH, H(o.value), 1)) : ae("", !0),
        s.value ? (y(), le(a, { key: 1 })) : ae("", !0),
        n.value ? (y(), le(IB, { key: 2 })) : ae("", !0)
      ], 64);
    };
  }
}, CH = ["href"], TH = ["href", "onClick"], gu = {
  __name: "NavTabLink",
  props: {
    ...Ra.props,
    activeClass: { type: String, default: "active" },
    inactiveClass: { type: String, default: "" },
    disabled: { type: Boolean, default: !1 }
    // if this function returns false, then stop the navigation
  },
  setup(e) {
    const t = e, n = I(
      () => typeof t.to == "string" && t.to.startsWith("http")
    );
    function s(o) {
      t.disabled !== !0 && o();
    }
    return (o, i) => n.value ? (y(), E("a", On({ key: 0 }, o.$attrs, {
      href: o.to,
      target: "_blank",
      class: { disabled: e.disabled }
    }), [
      ye(o.$slots, "default")
    ], 16, CH)) : (y(), le(T(Ra), On({ key: 1 }, o.$props, { custom: "" }), {
      default: K(({ isExactActive: r, href: a, navigate: l }) => [
        u("a", On({ class: "nav-link" }, o.$attrs, {
          href: a,
          onClick: Vt((c) => s(l), ["prevent"]),
          class: {
            [r ? e.activeClass : e.inactiveClass]: !0,
            disabled: e.disabled
          }
        }), [
          ye(o.$slots, "default")
        ], 16, TH)
      ]),
      _: 3
    }, 16));
  }
}, $H = {
  class: "position-fixed top-0 start-50 translate-middle-x",
  style: { "z-index": "1030" }
}, kH = { class: "p-3 mb-2 d-flex justify-content-center" }, DH = {
  __name: "PendingSaveAlert",
  setup(e) {
    const t = Hc();
    function n() {
      t.resetChanges();
    }
    async function s() {
      await t.saveChanges();
    }
    return (o, i) => {
      const r = be("b-toast");
      return y(), E("div", $H, [
        u("div", kH, [
          F(r, {
            autohide: !1,
            visible: ""
          }, {
            title: K(() => i[0] || (i[0] = [
              u("div", { class: "me-auto" }, [
                u("i", { class: "fas fa-warning fa-fw me-2 text-warning" }),
                u("span", null, "Unsaved changes")
              ], -1)
            ])),
            default: K(() => [
              i[3] || (i[3] = u("span", null, "Careful - you have unsaved changes!", -1)),
              u("div", { class: "pt-2 d-flex justify-content-start gap-2" }, [
                u("button", {
                  type: "button",
                  class: "btn btn-sm btn-secondary",
                  onClick: n
                }, i[1] || (i[1] = [
                  u("i", { class: "fas fa-rotate-left fa-fw me-2" }, null, -1),
                  u("span", null, "Revert", -1)
                ])),
                u("button", {
                  type: "button",
                  class: "btn btn-sm btn-primary",
                  onClick: s
                }, i[2] || (i[2] = [
                  u("i", { class: "fas fa-save fa-fw me-2" }, null, -1),
                  u("span", null, "Save Changes", -1)
                ]))
              ])
            ]),
            _: 1
          })
        ])
      ]);
    };
  }
}, IH = /* @__PURE__ */ he(DH, [["__scopeId", "data-v-b6ef5d3b"]]), RH = { class: "nav nav-tabs" }, AH = { class: "nav-item" }, MH = { class: "nav-item" }, PH = { class: "nav-item" }, VH = { class: "nav-item" }, LH = {
  __name: "SettingsMenu",
  setup(e) {
    const t = Hc(), n = I(() => t.savePending), s = I(() => t.loading);
    return (o, i) => (y(), E("div", null, [
      u("ul", RH, [
        u("li", AH, [
          F(gu, {
            to: { name: "home" },
            disabled: n.value
          }, {
            default: K(() => i[0] || (i[0] = [
              se("Settings")
            ])),
            _: 1
          }, 8, ["disabled"])
        ]),
        u("li", MH, [
          F(gu, {
            to: { name: "fhir-systems" },
            disabled: n.value
          }, {
            default: K(() => i[1] || (i[1] = [
              se("FHIR Systems")
            ])),
            _: 1
          }, 8, ["disabled"])
        ]),
        u("li", PH, [
          F(gu, {
            to: { name: "custom-mappings" },
            disabled: n.value
          }, {
            default: K(() => i[2] || (i[2] = [
              se("Custom Mappings")
            ])),
            _: 1
          }, 8, ["disabled"])
        ]),
        u("li", VH, [
          F(gu, {
            to: { name: "tools" },
            disabled: n.value
          }, {
            default: K(() => i[3] || (i[3] = [
              se("Tools")
            ])),
            _: 1
          }, 8, ["disabled"])
        ])
      ]),
      !s.value && n.value ? (y(), le(IH, { key: 0 })) : ae("", !0)
    ]));
  }
}, FH = { class: "border rounded" }, UH = {
  __name: "MainLayout",
  setup(e) {
    return (t, n) => {
      const s = be("router-view");
      return y(), E("div", null, [
        F(LH, { class: "navigation-tabs" }),
        u("div", FH, [
          F(s)
        ])
      ]);
    };
  }
}, jH = /* @__PURE__ */ he(UH, [["__scopeId", "data-v-e3b52831"]]), BH = (e) => !!new RegExp(
  "^(https?:\\/\\/)?((([a-zA-Z\\d](([a-zA-Z\\d-]*[a-zA-Z\\d])?))\\.)+[a-zA-Z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-zA-Z\\d%_.~+]*)*(\\?[;&a-zA-Z\\d%_.~+=-]*)?(\\#[-a-zA-Z\\d_]*)?$",
  "i"
).test(e), HH = { class: "settings-container p-2" }, YH = { class: "section-title" }, WH = { class: "row" }, GH = { class: "col" }, zH = { class: "section-label" }, KH = { class: "col" }, XH = { value: "0" }, qH = { value: "1" }, JH = { class: "row mt-4" }, QH = { class: "col" }, ZH = { class: "section-label" }, e7 = { class: "col" }, t7 = { value: "0" }, n7 = { value: "1" }, s7 = { class: "text-danger" }, o7 = { class: "section-title" }, r7 = { class: "section-description" }, i7 = { class: "row mt-4" }, a7 = { class: "col" }, l7 = { class: "section-label" }, c7 = { class: "col" }, u7 = { value: "0" }, d7 = { value: "1" }, f7 = { class: "section-title" }, p7 = { class: "section-description" }, h7 = { class: "row mt-4" }, m7 = { class: "col" }, v7 = { class: "section-label" }, g7 = { class: "col" }, y7 = { value: "" }, _7 = { value: "enabled" }, b7 = { class: "row mt-4" }, E7 = { class: "col" }, S7 = { class: "section-label" }, w7 = { class: "col" }, N7 = ["value"], O7 = { class: "section-title" }, x7 = { class: "row mt-4" }, C7 = { class: "col" }, T7 = { class: "section-label" }, $7 = { class: "col" }, k7 = { class: "input-group mb-3" }, D7 = { class: "text-danger" }, I7 = { class: "row mt-4" }, R7 = { class: "col" }, A7 = { class: "section-label" }, M7 = { class: "col" }, P7 = { class: "text-danger" }, V7 = { class: "row mt-4" }, L7 = { class: "col" }, F7 = { class: "section-label" }, U7 = { class: "col" }, j7 = { value: "0" }, B7 = { value: "1" }, H7 = { class: "row mt-4" }, Y7 = { class: "col" }, W7 = { class: "section-label" }, G7 = { class: "text-danger" }, z7 = { class: "col" }, K7 = { value: "0" }, X7 = { value: "1" }, q7 = { class: "row mt-4" }, J7 = { class: "col" }, Q7 = { class: "section-label" }, Z7 = { class: "col" }, eY = { class: "d-flex align-items-center gap-2" }, tY = { class: "fw-bold" }, nY = { class: "fw-bold" }, sY = { class: "row mt-4" }, oY = { class: "col" }, rY = { class: "section-label" }, iY = { class: "col" }, aY = { class: "d-flex align-items-center gap-2" }, lY = { class: "fw-bold" }, cY = { class: "row mt-4" }, uY = { class: "col" }, dY = { class: "section-label" }, fY = { class: "col" }, pY = { value: "0" }, hY = { value: "1" }, mY = { class: "row mt-4" }, vY = { class: "col" }, gY = { class: "section-label" }, yY = { class: "col" }, _Y = { value: "0" }, bY = { value: "2" }, EY = { value: "1" }, SY = { class: "row mt-4" }, wY = { class: "col" }, NY = { class: "section-label" }, OY = { class: "col" }, xY = { value: "1" }, CY = { value: "0" }, TY = { class: "footer d-flex align-items-center justify-content-end border-top py-2" }, $Y = ["disabled"], kY = {
  __name: "HomePage",
  setup(e) {
    const t = zv(), n = Hc(), s = Ns(), {
      newConfig: o,
      breakTheGlassUserTypes: i,
      isDirty: r
    } = xe(t), a = I(() => n.loading);
    function l() {
      const d = event.target.value;
      BH(d) ? s.alert({ title: "<span>Success</span>", body: `The URL ${d} is valid` }) : s.alert({ title: "Error", body: `The URL ${d} is NOT valid` });
    }
    function c() {
      n.saveChanges();
    }
    return (d, f) => {
      const p = Bt("tt");
      return y(), E("div", HH, [
        u("section", null, [
          u("div", YH, [
            P(u("span", null, null, 512), [
              [p, void 0, "ws_267"]
            ])
          ]),
          u("div", WH, [
            u("div", GH, [
              u("div", zH, [
                f[15] || (f[15] = u("i", { class: "fas fa-database fa-fw me-1" }, null, -1)),
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_265"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_288"]
              ])
            ]),
            u("div", KH, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[0] || (f[0] = (h) => T(o).fhir_ddp_enabled = h)
              }, [
                P(u("option", XH, null, 512), [
                  [p, void 0, "global_23"]
                ]),
                P(u("option", qH, null, 512), [
                  [p, void 0, "system_config_27"]
                ])
              ], 512), [
                [Zt, T(o).fhir_ddp_enabled]
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_216"]
              ])
            ])
          ]),
          u("div", JH, [
            u("div", QH, [
              u("div", ZH, [
                f[16] || (f[16] = u("i", { class: "fas fa-shopping-cart fa-fw me-1" }, null, -1)),
                P(u("span", null, null, 512), [
                  [p, void 0, "global_155"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_295"]
              ])
            ]),
            u("div", e7, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[1] || (f[1] = (h) => T(o).fhir_data_mart_create_project = h)
              }, [
                P(u("option", t7, null, 512), [
                  [p, void 0, "global_23"]
                ]),
                P(u("option", n7, null, 512), [
                  [p, void 0, "system_config_27"]
                ])
              ], 512), [
                [Zt, T(o).fhir_data_mart_create_project]
              ]),
              P(u("span", s7, null, 512), [
                [p, void 0, "ws_243"]
              ])
            ])
          ])
        ]),
        f[20] || (f[20] = u("hr", null, null, -1)),
        u("section", null, [
          u("div", o7, [
            P(u("span", null, null, 512), [
              [p, void 0, "cc_cdp_auto_adjudication_title"]
            ])
          ]),
          u("div", r7, [
            P(u("span", null, null, 512), [
              [p, void 0, "cc_cdp_auto_adjudication_description"]
            ])
          ]),
          u("div", i7, [
            u("div", a7, [
              u("div", l7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "cc_cdp_auto_adjudication_label"]
                ])
              ])
            ]),
            u("div", c7, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[2] || (f[2] = (h) => T(o).fhir_cdp_allow_auto_adjudication = h)
              }, [
                P(u("option", u7, null, 512), [
                  [p, void 0, "global_23"]
                ]),
                P(u("option", d7, null, 512), [
                  [p, void 0, "system_config_27"]
                ])
              ], 512), [
                [Zt, T(o).fhir_cdp_allow_auto_adjudication]
              ])
            ])
          ])
        ]),
        f[21] || (f[21] = u("hr", null, null, -1)),
        u("section", null, [
          u("div", f7, [
            P(u("span", null, null, 512), [
              [p, void 0, "break_glass_003"]
            ])
          ]),
          u("div", p7, [
            P(u("span", null, null, 512), [
              [p, void 0, "break_glass_004"]
            ])
          ]),
          u("div", h7, [
            u("div", m7, [
              u("div", v7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "break_the_glass_settings_01"]
                ])
              ])
            ]),
            u("div", g7, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[3] || (f[3] = (h) => T(o).fhir_break_the_glass_enabled = h)
              }, [
                P(u("option", y7, null, 512), [
                  [p, void 0, "break_the_glass_disabled"]
                ]),
                P(u("option", _7, null, 512), [
                  [p, void 0, "break_the_glass_enabled"]
                ])
              ], 512), [
                [Zt, T(o).fhir_break_the_glass_enabled]
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "break_glass_description"]
              ])
            ])
          ]),
          u("div", b7, [
            u("div", E7, [
              u("div", S7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "break_glass_007"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "break_glass_ehr"]
              ])
            ]),
            u("div", w7, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[4] || (f[4] = (h) => T(o).fhir_break_the_glass_ehr_usertype = h)
              }, [
                (y(!0), E(J, null, Ee(T(i), (h, m) => (y(), E("option", {
                  key: m,
                  value: h
                }, H(h), 9, N7))), 128))
              ], 512), [
                [Zt, T(o).fhir_break_the_glass_ehr_usertype]
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "break_glass_usertype_ehr"]
              ])
            ])
          ])
        ]),
        f[22] || (f[22] = u("hr", null, null, -1)),
        u("section", null, [
          u("div", O7, [
            P(u("span", null, null, 512), [
              [p, void 0, "ws_233"]
            ])
          ]),
          f[17] || (f[17] = u("div", { class: "section-description" }, null, -1)),
          u("div", x7, [
            u("div", C7, [
              u("div", T7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_74"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_274"]
              ]),
              u("div", null, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_230"]
                ])
              ])
            ]),
            u("div", $7, [
              u("div", k7, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  placeholder: "URL...",
                  "onUpdate:modelValue": f[5] || (f[5] = (h) => T(o).fhir_url_user_access = h)
                }, null, 512), [
                  [Ue, T(o).fhir_url_user_access]
                ]),
                P(u("button", {
                  class: "btn btn-outline-secondary",
                  type: "button",
                  onClick: f[6] || (f[6] = (h) => l(T(o).fhir_url_user_access))
                }, null, 512), [
                  [p, void 0, "edit_project_138"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_94"]
              ]),
              u("div", D7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_97"]
                ])
              ])
            ])
          ]),
          u("div", I7, [
            u("div", R7, [
              u("div", A7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_69"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_269"]
              ])
            ]),
            u("div", M7, [
              P(u("textarea", {
                class: "form-control form-control-sm",
                "onUpdate:modelValue": f[7] || (f[7] = (h) => T(o).fhir_custom_text = h)
              }, null, 512), [
                [Ue, T(o).fhir_custom_text]
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "system_config_195"]
              ]),
              u("div", null, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_71"]
                ])
              ]),
              u("div", P7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_268"]
                ])
              ])
            ])
          ]),
          u("div", V7, [
            u("div", L7, [
              u("div", F7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_270"]
                ])
              ])
            ]),
            u("div", U7, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[8] || (f[8] = (h) => T(o).fhir_display_info_project_setup = h)
              }, [
                P(u("option", j7, null, 512), [
                  [p, void 0, "ws_272"]
                ]),
                P(u("option", B7, null, 512), [
                  [p, void 0, "ws_271"]
                ])
              ], 512), [
                [Zt, T(o).fhir_display_info_project_setup]
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_273"]
              ])
            ])
          ]),
          u("div", H7, [
            u("div", Y7, [
              u("div", W7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_275"]
                ])
              ]),
              u("div", G7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_99"]
                ])
              ])
            ]),
            u("div", z7, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[9] || (f[9] = (h) => T(o).fhir_user_rights_super_users_only = h)
              }, [
                P(u("option", K7, null, 512), [
                  [p, void 0, "ws_276"]
                ]),
                P(u("option", X7, null, 512), [
                  [p, void 0, "ws_277"]
                ])
              ], 512), [
                [Zt, T(o).fhir_user_rights_super_users_only]
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_278"]
              ])
            ])
          ]),
          u("div", q7, [
            u("div", J7, [
              u("div", Q7, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_84"]
                ])
              ])
            ]),
            u("div", Z7, [
              u("div", eY, [
                P(u("span", tY, null, 512), [
                  [p, void 0, "ws_91"]
                ]),
                P(u("input", {
                  class: "form-control form-control-sm",
                  type: "number",
                  min: "1",
                  max: "999",
                  step: "1",
                  style: { width: "4rem" },
                  "onUpdate:modelValue": f[10] || (f[10] = (h) => T(o).fhir_data_fetch_interval = h)
                }, null, 512), [
                  [Ue, T(o).fhir_data_fetch_interval]
                ]),
                P(u("span", nY, null, 512), [
                  [p, void 0, "control_center_406"]
                ]),
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_88"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_279"]
              ])
            ])
          ]),
          u("div", sY, [
            u("div", oY, [
              u("div", rY, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_85"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_87"]
              ])
            ]),
            u("div", iY, [
              u("div", aY, [
                P(u("input", {
                  class: "form-control form-control-sm",
                  type: "number",
                  min: "1",
                  max: "100",
                  step: "1",
                  style: { width: "4rem" },
                  "onUpdate:modelValue": f[11] || (f[11] = (h) => T(o).fhir_stop_fetch_inactivity_days = h)
                }, null, 512), [
                  [Ue, T(o).fhir_stop_fetch_inactivity_days]
                ]),
                P(u("span", lY, null, 512), [
                  [p, void 0, "scheduling_25"]
                ]),
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_89"]
                ])
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_280"]
              ])
            ])
          ]),
          u("div", cY, [
            u("div", uY, [
              u("div", dY, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_252"]
                ])
              ]),
              u("div", null, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_255"]
                ])
              ])
            ]),
            u("div", fY, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[12] || (f[12] = (h) => T(o).fhir_convert_timestamp_from_gmt = h)
              }, [
                P(u("option", pY, null, 512), [
                  [p, void 0, "ws_254"]
                ]),
                P(u("option", hY, null, 512), [
                  [p, void 0, "ws_253"]
                ])
              ], 512), [
                [Zt, T(o).fhir_convert_timestamp_from_gmt]
              ]),
              P(u("span", null, null, 512), [
                [p, void 0, "ws_256"]
              ])
            ])
          ]),
          u("div", mY, [
            u("div", vY, [
              u("div", gY, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_299"]
                ])
              ]),
              u("div", null, [
                P(u("span", null, null, 512), [
                  [p, void 0, "ws_339"]
                ])
              ])
            ]),
            u("div", yY, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[13] || (f[13] = (h) => T(o).fhir_include_email_address = h)
              }, [
                P(u("option", _Y, null, 512), [
                  [p, void 0, "ws_301"]
                ]),
                P(u("option", bY, null, 512), [
                  [p, void 0, "ws_300"]
                ]),
                P(u("option", EY, null, 512), [
                  [p, void 0, "ws_338"]
                ])
              ], 512), [
                [Zt, T(o).fhir_include_email_address]
              ])
            ])
          ]),
          u("div", SY, [
            u("div", wY, [
              u("div", NY, [
                P(u("span", null, null, 512), [
                  [p, void 0, "override_system_bundle_ca_title"]
                ])
              ]),
              u("div", null, [
                P(u("span", null, null, 512), [
                  [p, void 0, "override_system_bundle_ca_description"]
                ])
              ])
            ]),
            u("div", OY, [
              P(u("select", {
                class: "form-select form-select-sm",
                "onUpdate:modelValue": f[14] || (f[14] = (h) => T(o).override_system_bundle_ca = h)
              }, [
                P(u("option", xY, null, 512), [
                  [p, void 0, "override_system_bundle_ca_use_redcap"]
                ]),
                P(u("option", CY, null, 512), [
                  [p, void 0, "override_system_bundle_ca_use_system"]
                ])
              ], 512), [
                [Zt, T(o).override_system_bundle_ca]
              ])
            ])
          ])
        ]),
        u("div", TY, [
          a.value ? (y(), E("button", {
            key: 1,
            class: "btn btn-primary btn-sm",
            onClick: c,
            disabled: ""
          }, [
            f[19] || (f[19] = u("i", { class: "fas fa-spinner fa-spin fa-fw me-2" }, null, -1)),
            P(u("span", null, null, 512), [
              [p, void 0, "control_center_4876"]
            ])
          ])) : (y(), E("button", {
            key: 0,
            class: "btn btn-primary btn-sm",
            onClick: c,
            disabled: !T(r)
          }, [
            f[18] || (f[18] = u("i", { class: "fas fa-save fa-fw me-2" }, null, -1)),
            P(u("span", null, null, 512), [
              [p, void 0, "control_center_4876"]
            ])
          ], 8, $Y))
        ])
      ]);
    };
  }
}, DY = /* @__PURE__ */ he(kY, [["__scopeId", "data-v-daebc63e"]]);
function IY(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
function Yf(e) {
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
  var t = e.default;
  if (typeof t == "function") {
    var n = function s() {
      return this instanceof s ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
    };
    n.prototype = t.prototype;
  } else n = {};
  return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(s) {
    var o = Object.getOwnPropertyDescriptor(e, s);
    Object.defineProperty(n, s, o.get ? o : {
      enumerable: !0,
      get: function() {
        return e[s];
      }
    });
  }), n;
}
var qu = { exports: {} }, yu = { exports: {} }, Jp = {}, Oe = {};
const Ma = Symbol(Oe.NODE_ENV !== "production" ? "Fragment" : ""), Na = Symbol(Oe.NODE_ENV !== "production" ? "Teleport" : ""), Wf = Symbol(Oe.NODE_ENV !== "production" ? "Suspense" : ""), vc = Symbol(Oe.NODE_ENV !== "production" ? "KeepAlive" : ""), qv = Symbol(
  Oe.NODE_ENV !== "production" ? "BaseTransition" : ""
), Kr = Symbol(Oe.NODE_ENV !== "production" ? "openBlock" : ""), Jv = Symbol(Oe.NODE_ENV !== "production" ? "createBlock" : ""), Qv = Symbol(
  Oe.NODE_ENV !== "production" ? "createElementBlock" : ""
), Gf = Symbol(Oe.NODE_ENV !== "production" ? "createVNode" : ""), zf = Symbol(
  Oe.NODE_ENV !== "production" ? "createElementVNode" : ""
), tl = Symbol(
  Oe.NODE_ENV !== "production" ? "createCommentVNode" : ""
), Kf = Symbol(
  Oe.NODE_ENV !== "production" ? "createTextVNode" : ""
), Zv = Symbol(
  Oe.NODE_ENV !== "production" ? "createStaticVNode" : ""
), Xf = Symbol(
  Oe.NODE_ENV !== "production" ? "resolveComponent" : ""
), qf = Symbol(
  Oe.NODE_ENV !== "production" ? "resolveDynamicComponent" : ""
), Jf = Symbol(
  Oe.NODE_ENV !== "production" ? "resolveDirective" : ""
), Qf = Symbol(
  Oe.NODE_ENV !== "production" ? "resolveFilter" : ""
), Zf = Symbol(
  Oe.NODE_ENV !== "production" ? "withDirectives" : ""
), ep = Symbol(Oe.NODE_ENV !== "production" ? "renderList" : ""), eg = Symbol(Oe.NODE_ENV !== "production" ? "renderSlot" : ""), tg = Symbol(Oe.NODE_ENV !== "production" ? "createSlots" : ""), Yc = Symbol(
  Oe.NODE_ENV !== "production" ? "toDisplayString" : ""
), gc = Symbol(Oe.NODE_ENV !== "production" ? "mergeProps" : ""), tp = Symbol(
  Oe.NODE_ENV !== "production" ? "normalizeClass" : ""
), np = Symbol(
  Oe.NODE_ENV !== "production" ? "normalizeStyle" : ""
), Pa = Symbol(
  Oe.NODE_ENV !== "production" ? "normalizeProps" : ""
), nl = Symbol(
  Oe.NODE_ENV !== "production" ? "guardReactiveProps" : ""
), sp = Symbol(Oe.NODE_ENV !== "production" ? "toHandlers" : ""), Pd = Symbol(Oe.NODE_ENV !== "production" ? "camelize" : ""), yw = Symbol(Oe.NODE_ENV !== "production" ? "capitalize" : ""), Vd = Symbol(
  Oe.NODE_ENV !== "production" ? "toHandlerKey" : ""
), yc = Symbol(
  Oe.NODE_ENV !== "production" ? "setBlockTracking" : ""
), _w = Symbol(Oe.NODE_ENV !== "production" ? "pushScopeId" : ""), bw = Symbol(Oe.NODE_ENV !== "production" ? "popScopeId" : ""), op = Symbol(Oe.NODE_ENV !== "production" ? "withCtx" : ""), Ew = Symbol(Oe.NODE_ENV !== "production" ? "unref" : ""), Sw = Symbol(Oe.NODE_ENV !== "production" ? "isRef" : ""), rp = Symbol(Oe.NODE_ENV !== "production" ? "withMemo" : ""), ng = Symbol(Oe.NODE_ENV !== "production" ? "isMemoSame" : ""), Mi = {
  [Ma]: "Fragment",
  [Na]: "Teleport",
  [Wf]: "Suspense",
  [vc]: "KeepAlive",
  [qv]: "BaseTransition",
  [Kr]: "openBlock",
  [Jv]: "createBlock",
  [Qv]: "createElementBlock",
  [Gf]: "createVNode",
  [zf]: "createElementVNode",
  [tl]: "createCommentVNode",
  [Kf]: "createTextVNode",
  [Zv]: "createStaticVNode",
  [Xf]: "resolveComponent",
  [qf]: "resolveDynamicComponent",
  [Jf]: "resolveDirective",
  [Qf]: "resolveFilter",
  [Zf]: "withDirectives",
  [ep]: "renderList",
  [eg]: "renderSlot",
  [tg]: "createSlots",
  [Yc]: "toDisplayString",
  [gc]: "mergeProps",
  [tp]: "normalizeClass",
  [np]: "normalizeStyle",
  [Pa]: "normalizeProps",
  [nl]: "guardReactiveProps",
  [sp]: "toHandlers",
  [Pd]: "camelize",
  [yw]: "capitalize",
  [Vd]: "toHandlerKey",
  [yc]: "setBlockTracking",
  [_w]: "pushScopeId",
  [bw]: "popScopeId",
  [op]: "withCtx",
  [Ew]: "unref",
  [Sw]: "isRef",
  [rp]: "withMemo",
  [ng]: "isMemoSame"
};
function ww(e) {
  Object.getOwnPropertySymbols(e).forEach((t) => {
    Mi[t] = e[t];
  });
}
const RY = {
  HTML: 0,
  0: "HTML",
  SVG: 1,
  1: "SVG",
  MATH_ML: 2,
  2: "MATH_ML"
}, AY = {
  ROOT: 0,
  0: "ROOT",
  ELEMENT: 1,
  1: "ELEMENT",
  TEXT: 2,
  2: "TEXT",
  COMMENT: 3,
  3: "COMMENT",
  SIMPLE_EXPRESSION: 4,
  4: "SIMPLE_EXPRESSION",
  INTERPOLATION: 5,
  5: "INTERPOLATION",
  ATTRIBUTE: 6,
  6: "ATTRIBUTE",
  DIRECTIVE: 7,
  7: "DIRECTIVE",
  COMPOUND_EXPRESSION: 8,
  8: "COMPOUND_EXPRESSION",
  IF: 9,
  9: "IF",
  IF_BRANCH: 10,
  10: "IF_BRANCH",
  FOR: 11,
  11: "FOR",
  TEXT_CALL: 12,
  12: "TEXT_CALL",
  VNODE_CALL: 13,
  13: "VNODE_CALL",
  JS_CALL_EXPRESSION: 14,
  14: "JS_CALL_EXPRESSION",
  JS_OBJECT_EXPRESSION: 15,
  15: "JS_OBJECT_EXPRESSION",
  JS_PROPERTY: 16,
  16: "JS_PROPERTY",
  JS_ARRAY_EXPRESSION: 17,
  17: "JS_ARRAY_EXPRESSION",
  JS_FUNCTION_EXPRESSION: 18,
  18: "JS_FUNCTION_EXPRESSION",
  JS_CONDITIONAL_EXPRESSION: 19,
  19: "JS_CONDITIONAL_EXPRESSION",
  JS_CACHE_EXPRESSION: 20,
  20: "JS_CACHE_EXPRESSION",
  JS_BLOCK_STATEMENT: 21,
  21: "JS_BLOCK_STATEMENT",
  JS_TEMPLATE_LITERAL: 22,
  22: "JS_TEMPLATE_LITERAL",
  JS_IF_STATEMENT: 23,
  23: "JS_IF_STATEMENT",
  JS_ASSIGNMENT_EXPRESSION: 24,
  24: "JS_ASSIGNMENT_EXPRESSION",
  JS_SEQUENCE_EXPRESSION: 25,
  25: "JS_SEQUENCE_EXPRESSION",
  JS_RETURN_STATEMENT: 26,
  26: "JS_RETURN_STATEMENT"
}, MY = {
  ELEMENT: 0,
  0: "ELEMENT",
  COMPONENT: 1,
  1: "COMPONENT",
  SLOT: 2,
  2: "SLOT",
  TEMPLATE: 3,
  3: "TEMPLATE"
}, PY = {
  NOT_CONSTANT: 0,
  0: "NOT_CONSTANT",
  CAN_SKIP_PATCH: 1,
  1: "CAN_SKIP_PATCH",
  CAN_CACHE: 2,
  2: "CAN_CACHE",
  CAN_STRINGIFY: 3,
  3: "CAN_STRINGIFY"
}, Tn = {
  start: { line: 1, column: 1, offset: 0 },
  end: { line: 1, column: 1, offset: 0 },
  source: ""
};
function Nw(e, t = "") {
  return {
    type: 0,
    source: t,
    children: e,
    helpers: /* @__PURE__ */ new Set(),
    components: [],
    directives: [],
    hoists: [],
    imports: [],
    cached: [],
    temps: 0,
    codegenNode: void 0,
    loc: Tn
  };
}
function Va(e, t, n, s, o, i, r, a = !1, l = !1, c = !1, d = Tn) {
  return e && (a ? (e.helper(Kr), e.helper(Li(e.inSSR, c))) : e.helper(Vi(e.inSSR, c)), r && e.helper(Zf)), {
    type: 13,
    tag: t,
    props: n,
    children: s,
    patchFlag: o,
    dynamicProps: i,
    directives: r,
    isBlock: a,
    disableTracking: l,
    isComponent: c,
    loc: d
  };
}
function Br(e, t = Tn) {
  return {
    type: 17,
    loc: t,
    elements: e
  };
}
function _s(e, t = Tn) {
  return {
    type: 15,
    loc: t,
    properties: e
  };
}
function ln(e, t) {
  return {
    type: 16,
    loc: Tn,
    key: We(e) ? nt(e, !0) : e,
    value: t
  };
}
function nt(e, t = !1, n = Tn, s = 0) {
  return {
    type: 4,
    loc: n,
    content: e,
    isStatic: t,
    constType: t ? 3 : s
  };
}
function VY(e, t) {
  return {
    type: 5,
    loc: t,
    content: We(e) ? nt(e, !1, t) : e
  };
}
function As(e, t = Tn) {
  return {
    type: 8,
    loc: t,
    children: e
  };
}
function yn(e, t = [], n = Tn) {
  return {
    type: 14,
    loc: n,
    callee: e,
    arguments: t
  };
}
function Pi(e, t = void 0, n = !1, s = !1, o = Tn) {
  return {
    type: 18,
    params: e,
    returns: t,
    newline: n,
    isSlot: s,
    loc: o
  };
}
function Ld(e, t, n, s = !0) {
  return {
    type: 19,
    test: e,
    consequent: t,
    alternate: n,
    newline: s,
    loc: Tn
  };
}
function Ow(e, t, n = !1, s = !1) {
  return {
    type: 20,
    index: e,
    value: t,
    needPauseTracking: n,
    inVOnce: s,
    needArraySpread: !1,
    loc: Tn
  };
}
function xw(e) {
  return {
    type: 21,
    body: e,
    loc: Tn
  };
}
function LY(e) {
  return {
    type: 22,
    elements: e,
    loc: Tn
  };
}
function FY(e, t, n) {
  return {
    type: 23,
    test: e,
    consequent: t,
    alternate: n,
    loc: Tn
  };
}
function UY(e, t) {
  return {
    type: 24,
    left: e,
    right: t,
    loc: Tn
  };
}
function jY(e) {
  return {
    type: 25,
    expressions: e,
    loc: Tn
  };
}
function BY(e) {
  return {
    type: 26,
    returns: e,
    loc: Tn
  };
}
function Vi(e, t) {
  return e || t ? Gf : zf;
}
function Li(e, t) {
  return e || t ? Jv : Qv;
}
function ip(e, { helper: t, removeHelper: n, inSSR: s }) {
  e.isBlock || (e.isBlock = !0, n(Vi(s, e.isComponent)), t(Kr), t(Li(s, e.isComponent)));
}
const V_ = new Uint8Array([123, 123]), L_ = new Uint8Array([125, 125]);
function F_(e) {
  return e >= 97 && e <= 122 || e >= 65 && e <= 90;
}
function ys(e) {
  return e === 32 || e === 10 || e === 9 || e === 12 || e === 13;
}
function br(e) {
  return e === 47 || e === 62 || ys(e);
}
function Fd(e) {
  const t = new Uint8Array(e.length);
  for (let n = 0; n < e.length; n++)
    t[n] = e.charCodeAt(n);
  return t;
}
const In = {
  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
  // CDATA[
  CdataEnd: new Uint8Array([93, 93, 62]),
  // ]]>
  CommentEnd: new Uint8Array([45, 45, 62]),
  // `-->`
  ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
  // `<\/script`
  StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
  // `</style`
  TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]),
  // `</title`
  TextareaEnd: new Uint8Array([
    60,
    47,
    116,
    101,
    120,
    116,
    97,
    114,
    101,
    97
  ])
  // `</textarea
};
class HY {
  constructor(t, n) {
    this.stack = t, this.cbs = n, this.state = 1, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = 1, this.inRCDATA = !1, this.inXML = !1, this.inVPre = !1, this.newlines = [], this.mode = 0, this.delimiterOpen = V_, this.delimiterClose = L_, this.delimiterIndex = -1, this.currentSequence = void 0, this.sequenceIndex = 0;
  }
  get inSFCRoot() {
    return this.mode === 2 && this.stack.length === 0;
  }
  reset() {
    this.state = 1, this.mode = 0, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = 1, this.inRCDATA = !1, this.currentSequence = void 0, this.newlines.length = 0, this.delimiterOpen = V_, this.delimiterClose = L_;
  }
  /**
   * Generate Position object with line / column information using recorded
   * newline positions. We know the index is always going to be an already
   * processed index, so all the newlines up to this index should have been
   * recorded.
   */
  getPos(t) {
    let n = 1, s = t + 1;
    for (let o = this.newlines.length - 1; o >= 0; o--) {
      const i = this.newlines[o];
      if (t > i) {
        n = o + 2, s = t - i;
        break;
      }
    }
    return {
      column: s,
      line: n,
      offset: t
    };
  }
  peek() {
    return this.buffer.charCodeAt(this.index + 1);
  }
  stateText(t) {
    t === 60 ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = 5, this.sectionStart = this.index) : !this.inVPre && t === this.delimiterOpen[0] && (this.state = 2, this.delimiterIndex = 0, this.stateInterpolationOpen(t));
  }
  stateInterpolationOpen(t) {
    if (t === this.delimiterOpen[this.delimiterIndex])
      if (this.delimiterIndex === this.delimiterOpen.length - 1) {
        const n = this.index + 1 - this.delimiterOpen.length;
        n > this.sectionStart && this.cbs.ontext(this.sectionStart, n), this.state = 3, this.sectionStart = n;
      } else
        this.delimiterIndex++;
    else this.inRCDATA ? (this.state = 32, this.stateInRCDATA(t)) : (this.state = 1, this.stateText(t));
  }
  stateInterpolation(t) {
    t === this.delimiterClose[0] && (this.state = 4, this.delimiterIndex = 0, this.stateInterpolationClose(t));
  }
  stateInterpolationClose(t) {
    t === this.delimiterClose[this.delimiterIndex] ? this.delimiterIndex === this.delimiterClose.length - 1 ? (this.cbs.oninterpolation(this.sectionStart, this.index + 1), this.inRCDATA ? this.state = 32 : this.state = 1, this.sectionStart = this.index + 1) : this.delimiterIndex++ : (this.state = 3, this.stateInterpolation(t));
  }
  stateSpecialStartSequence(t) {
    const n = this.sequenceIndex === this.currentSequence.length;
    if (!(n ? (
      // If we are at the end of the sequence, make sure the tag name has ended
      br(t)
    ) : (
      // Otherwise, do a case-insensitive comparison
      (t | 32) === this.currentSequence[this.sequenceIndex]
    )))
      this.inRCDATA = !1;
    else if (!n) {
      this.sequenceIndex++;
      return;
    }
    this.sequenceIndex = 0, this.state = 6, this.stateInTagName(t);
  }
  /** Look for an end tag. For <title> and <textarea>, also decode entities. */
  stateInRCDATA(t) {
    if (this.sequenceIndex === this.currentSequence.length) {
      if (t === 62 || ys(t)) {
        const n = this.index - this.currentSequence.length;
        if (this.sectionStart < n) {
          const s = this.index;
          this.index = n, this.cbs.ontext(this.sectionStart, n), this.index = s;
        }
        this.sectionStart = n + 2, this.stateInClosingTagName(t), this.inRCDATA = !1;
        return;
      }
      this.sequenceIndex = 0;
    }
    (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === In.TitleEnd || this.currentSequence === In.TextareaEnd && !this.inSFCRoot ? !this.inVPre && t === this.delimiterOpen[0] && (this.state = 2, this.delimiterIndex = 0, this.stateInterpolationOpen(t)) : this.fastForwardTo(60) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === 60);
  }
  stateCDATASequence(t) {
    t === In.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === In.Cdata.length && (this.state = 28, this.currentSequence = In.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = 23, this.stateInDeclaration(t));
  }
  /**
   * When we wait for one specific character, we can speed things up
   * by skipping through the buffer until we find it.
   *
   * @returns Whether the character was found.
   */
  fastForwardTo(t) {
    for (; ++this.index < this.buffer.length; ) {
      const n = this.buffer.charCodeAt(this.index);
      if (n === 10 && this.newlines.push(this.index), n === t)
        return !0;
    }
    return this.index = this.buffer.length - 1, !1;
  }
  /**
   * Comments and CDATA end with `-->` and `]]>`.
   *
   * Their common qualities are:
   * - Their end sequences have a distinct character they start with.
   * - That character is then repeated, so we have to check multiple repeats.
   * - All characters but the start character of the sequence can be skipped.
   */
  stateInCommentLike(t) {
    t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === In.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index - 2) : this.cbs.oncomment(this.sectionStart, this.index - 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = 1) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
  }
  startSpecial(t, n) {
    this.enterRCDATA(t, n), this.state = 31;
  }
  enterRCDATA(t, n) {
    this.inRCDATA = !0, this.currentSequence = t, this.sequenceIndex = n;
  }
  stateBeforeTagName(t) {
    t === 33 ? (this.state = 22, this.sectionStart = this.index + 1) : t === 63 ? (this.state = 24, this.sectionStart = this.index + 1) : F_(t) ? (this.sectionStart = this.index, this.mode === 0 ? this.state = 6 : this.inSFCRoot ? this.state = 34 : this.inXML ? this.state = 6 : t === 116 ? this.state = 30 : this.state = t === 115 ? 29 : 6) : t === 47 ? this.state = 8 : (this.state = 1, this.stateText(t));
  }
  stateInTagName(t) {
    br(t) && this.handleTagName(t);
  }
  stateInSFCRootTagName(t) {
    if (br(t)) {
      const n = this.buffer.slice(this.sectionStart, this.index);
      n !== "template" && this.enterRCDATA(Fd("</" + n), 0), this.handleTagName(t);
    }
  }
  handleTagName(t) {
    this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = 11, this.stateBeforeAttrName(t);
  }
  stateBeforeClosingTagName(t) {
    ys(t) || (t === 62 ? (Oe.NODE_ENV !== "production" && this.cbs.onerr(14, this.index), this.state = 1, this.sectionStart = this.index + 1) : (this.state = F_(t) ? 9 : 27, this.sectionStart = this.index));
  }
  stateInClosingTagName(t) {
    (t === 62 || ys(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = 10, this.stateAfterClosingTagName(t));
  }
  stateAfterClosingTagName(t) {
    t === 62 && (this.state = 1, this.sectionStart = this.index + 1);
  }
  stateBeforeAttrName(t) {
    t === 62 ? (this.cbs.onopentagend(this.index), this.inRCDATA ? this.state = 32 : this.state = 1, this.sectionStart = this.index + 1) : t === 47 ? (this.state = 7, Oe.NODE_ENV !== "production" && this.peek() !== 62 && this.cbs.onerr(22, this.index)) : t === 60 && this.peek() === 47 ? (this.cbs.onopentagend(this.index), this.state = 5, this.sectionStart = this.index) : ys(t) || (Oe.NODE_ENV !== "production" && t === 61 && this.cbs.onerr(
      19,
      this.index
    ), this.handleAttrStart(t));
  }
  handleAttrStart(t) {
    t === 118 && this.peek() === 45 ? (this.state = 13, this.sectionStart = this.index) : t === 46 || t === 58 || t === 64 || t === 35 ? (this.cbs.ondirname(this.index, this.index + 1), this.state = 14, this.sectionStart = this.index + 1) : (this.state = 12, this.sectionStart = this.index);
  }
  stateInSelfClosingTag(t) {
    t === 62 ? (this.cbs.onselfclosingtag(this.index), this.state = 1, this.sectionStart = this.index + 1, this.inRCDATA = !1) : ys(t) || (this.state = 11, this.stateBeforeAttrName(t));
  }
  stateInAttrName(t) {
    t === 61 || br(t) ? (this.cbs.onattribname(this.sectionStart, this.index), this.handleAttrNameEnd(t)) : Oe.NODE_ENV !== "production" && (t === 34 || t === 39 || t === 60) && this.cbs.onerr(
      17,
      this.index
    );
  }
  stateInDirName(t) {
    t === 61 || br(t) ? (this.cbs.ondirname(this.sectionStart, this.index), this.handleAttrNameEnd(t)) : t === 58 ? (this.cbs.ondirname(this.sectionStart, this.index), this.state = 14, this.sectionStart = this.index + 1) : t === 46 && (this.cbs.ondirname(this.sectionStart, this.index), this.state = 16, this.sectionStart = this.index + 1);
  }
  stateInDirArg(t) {
    t === 61 || br(t) ? (this.cbs.ondirarg(this.sectionStart, this.index), this.handleAttrNameEnd(t)) : t === 91 ? this.state = 15 : t === 46 && (this.cbs.ondirarg(this.sectionStart, this.index), this.state = 16, this.sectionStart = this.index + 1);
  }
  stateInDynamicDirArg(t) {
    t === 93 ? this.state = 14 : (t === 61 || br(t)) && (this.cbs.ondirarg(this.sectionStart, this.index + 1), this.handleAttrNameEnd(t), Oe.NODE_ENV !== "production" && this.cbs.onerr(
      27,
      this.index
    ));
  }
  stateInDirModifier(t) {
    t === 61 || br(t) ? (this.cbs.ondirmodifier(this.sectionStart, this.index), this.handleAttrNameEnd(t)) : t === 46 && (this.cbs.ondirmodifier(this.sectionStart, this.index), this.sectionStart = this.index + 1);
  }
  handleAttrNameEnd(t) {
    this.sectionStart = this.index, this.state = 17, this.cbs.onattribnameend(this.index), this.stateAfterAttrName(t);
  }
  stateAfterAttrName(t) {
    t === 61 ? this.state = 18 : t === 47 || t === 62 ? (this.cbs.onattribend(0, this.sectionStart), this.sectionStart = -1, this.state = 11, this.stateBeforeAttrName(t)) : ys(t) || (this.cbs.onattribend(0, this.sectionStart), this.handleAttrStart(t));
  }
  stateBeforeAttrValue(t) {
    t === 34 ? (this.state = 19, this.sectionStart = this.index + 1) : t === 39 ? (this.state = 20, this.sectionStart = this.index + 1) : ys(t) || (this.sectionStart = this.index, this.state = 21, this.stateInAttrValueNoQuotes(t));
  }
  handleInAttrValue(t, n) {
    (t === n || this.fastForwardTo(n)) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(
      n === 34 ? 3 : 2,
      this.index + 1
    ), this.state = 11);
  }
  stateInAttrValueDoubleQuotes(t) {
    this.handleInAttrValue(t, 34);
  }
  stateInAttrValueSingleQuotes(t) {
    this.handleInAttrValue(t, 39);
  }
  stateInAttrValueNoQuotes(t) {
    ys(t) || t === 62 ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(1, this.index), this.state = 11, this.stateBeforeAttrName(t)) : (Oe.NODE_ENV !== "production" && t === 34 || t === 39 || t === 60 || t === 61 || t === 96) && this.cbs.onerr(
      18,
      this.index
    );
  }
  stateBeforeDeclaration(t) {
    t === 91 ? (this.state = 26, this.sequenceIndex = 0) : this.state = t === 45 ? 25 : 23;
  }
  stateInDeclaration(t) {
    (t === 62 || this.fastForwardTo(62)) && (this.state = 1, this.sectionStart = this.index + 1);
  }
  stateInProcessingInstruction(t) {
    (t === 62 || this.fastForwardTo(62)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = 1, this.sectionStart = this.index + 1);
  }
  stateBeforeComment(t) {
    t === 45 ? (this.state = 28, this.currentSequence = In.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = 23;
  }
  stateInSpecialComment(t) {
    (t === 62 || this.fastForwardTo(62)) && (this.cbs.oncomment(this.sectionStart, this.index), this.state = 1, this.sectionStart = this.index + 1);
  }
  stateBeforeSpecialS(t) {
    t === In.ScriptEnd[3] ? this.startSpecial(In.ScriptEnd, 4) : t === In.StyleEnd[3] ? this.startSpecial(In.StyleEnd, 4) : (this.state = 6, this.stateInTagName(t));
  }
  stateBeforeSpecialT(t) {
    t === In.TitleEnd[3] ? this.startSpecial(In.TitleEnd, 4) : t === In.TextareaEnd[3] ? this.startSpecial(In.TextareaEnd, 4) : (this.state = 6, this.stateInTagName(t));
  }
  startEntity() {
  }
  stateInEntity() {
  }
  /**
   * Iterates through the buffer, calling the function corresponding to the current state.
   *
   * States that are more likely to be hit are higher up, as a performance improvement.
   */
  parse(t) {
    for (this.buffer = t; this.index < this.buffer.length; ) {
      const n = this.buffer.charCodeAt(this.index);
      switch (n === 10 && this.newlines.push(this.index), this.state) {
        case 1: {
          this.stateText(n);
          break;
        }
        case 2: {
          this.stateInterpolationOpen(n);
          break;
        }
        case 3: {
          this.stateInterpolation(n);
          break;
        }
        case 4: {
          this.stateInterpolationClose(n);
          break;
        }
        case 31: {
          this.stateSpecialStartSequence(n);
          break;
        }
        case 32: {
          this.stateInRCDATA(n);
          break;
        }
        case 26: {
          this.stateCDATASequence(n);
          break;
        }
        case 19: {
          this.stateInAttrValueDoubleQuotes(n);
          break;
        }
        case 12: {
          this.stateInAttrName(n);
          break;
        }
        case 13: {
          this.stateInDirName(n);
          break;
        }
        case 14: {
          this.stateInDirArg(n);
          break;
        }
        case 15: {
          this.stateInDynamicDirArg(n);
          break;
        }
        case 16: {
          this.stateInDirModifier(n);
          break;
        }
        case 28: {
          this.stateInCommentLike(n);
          break;
        }
        case 27: {
          this.stateInSpecialComment(n);
          break;
        }
        case 11: {
          this.stateBeforeAttrName(n);
          break;
        }
        case 6: {
          this.stateInTagName(n);
          break;
        }
        case 34: {
          this.stateInSFCRootTagName(n);
          break;
        }
        case 9: {
          this.stateInClosingTagName(n);
          break;
        }
        case 5: {
          this.stateBeforeTagName(n);
          break;
        }
        case 17: {
          this.stateAfterAttrName(n);
          break;
        }
        case 20: {
          this.stateInAttrValueSingleQuotes(n);
          break;
        }
        case 18: {
          this.stateBeforeAttrValue(n);
          break;
        }
        case 8: {
          this.stateBeforeClosingTagName(n);
          break;
        }
        case 10: {
          this.stateAfterClosingTagName(n);
          break;
        }
        case 29: {
          this.stateBeforeSpecialS(n);
          break;
        }
        case 30: {
          this.stateBeforeSpecialT(n);
          break;
        }
        case 21: {
          this.stateInAttrValueNoQuotes(n);
          break;
        }
        case 7: {
          this.stateInSelfClosingTag(n);
          break;
        }
        case 23: {
          this.stateInDeclaration(n);
          break;
        }
        case 22: {
          this.stateBeforeDeclaration(n);
          break;
        }
        case 25: {
          this.stateBeforeComment(n);
          break;
        }
        case 24: {
          this.stateInProcessingInstruction(n);
          break;
        }
        case 33: {
          this.stateInEntity();
          break;
        }
      }
      this.index++;
    }
    this.cleanup(), this.finish();
  }
  /**
   * Remove data that has already been consumed from the buffer.
   */
  cleanup() {
    this.sectionStart !== this.index && (this.state === 1 || this.state === 32 && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === 19 || this.state === 20 || this.state === 21) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
  }
  finish() {
    this.handleTrailingData(), this.cbs.onend();
  }
  /** Handle any trailing data. */
  handleTrailingData() {
    const t = this.buffer.length;
    this.sectionStart >= t || (this.state === 28 ? this.currentSequence === In.CdataEnd ? this.cbs.oncdata(this.sectionStart, t) : this.cbs.oncomment(this.sectionStart, t) : this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9 || this.cbs.ontext(this.sectionStart, t));
  }
  emitCodePoint(t, n) {
  }
}
const YY = {
  COMPILER_IS_ON_ELEMENT: "COMPILER_IS_ON_ELEMENT",
  COMPILER_V_BIND_SYNC: "COMPILER_V_BIND_SYNC",
  COMPILER_V_BIND_OBJECT_ORDER: "COMPILER_V_BIND_OBJECT_ORDER",
  COMPILER_V_ON_NATIVE: "COMPILER_V_ON_NATIVE",
  COMPILER_V_IF_V_FOR_PRECEDENCE: "COMPILER_V_IF_V_FOR_PRECEDENCE",
  COMPILER_NATIVE_TEMPLATE: "COMPILER_NATIVE_TEMPLATE",
  COMPILER_INLINE_TEMPLATE: "COMPILER_INLINE_TEMPLATE",
  COMPILER_FILTERS: "COMPILER_FILTERS"
}, WY = {
  COMPILER_IS_ON_ELEMENT: {
    message: 'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',
    link: "https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"
  },
  COMPILER_V_BIND_SYNC: {
    message: (e) => `.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,
    link: "https://v3-migration.vuejs.org/breaking-changes/v-model.html"
  },
  COMPILER_V_BIND_OBJECT_ORDER: {
    message: 'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',
    link: "https://v3-migration.vuejs.org/breaking-changes/v-bind.html"
  },
  COMPILER_V_ON_NATIVE: {
    message: ".native modifier for v-on has been removed as is no longer necessary.",
    link: "https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"
  },
  COMPILER_V_IF_V_FOR_PRECEDENCE: {
    message: "v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",
    link: "https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"
  },
  COMPILER_NATIVE_TEMPLATE: {
    message: "<template> with no special directives will render as a native template element instead of its inner content in Vue 3."
  },
  COMPILER_INLINE_TEMPLATE: {
    message: '"inline-template" has been removed in Vue 3.',
    link: "https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"
  },
  COMPILER_FILTERS: {
    message: 'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',
    link: "https://v3-migration.vuejs.org/breaking-changes/filters.html"
  }
};
function gm(e, { compatConfig: t }) {
  const n = t && t[e];
  return e === "MODE" ? n || 3 : n;
}
function Hr(e, t) {
  const n = gm("MODE", t), s = gm(e, t);
  return n === 3 ? s === !0 : s !== !1;
}
function Fi(e, t, n, ...s) {
  const o = Hr(e, t);
  return Oe.NODE_ENV !== "production" && o && _c(e, t, n, ...s), o;
}
function _c(e, t, n, ...s) {
  if (gm(e, t) === "suppress-warning")
    return;
  const { message: i, link: r } = WY[e], a = `(deprecation ${e}) ${typeof i == "function" ? i(...s) : i}${r ? `
  Details: ${r}` : ""}`, l = new SyntaxError(a);
  l.code = e, n && (l.loc = n), t.onWarn(l);
}
function sg(e) {
  throw e;
}
function Cw(e) {
  Oe.NODE_ENV !== "production" && console.warn(`[Vue warn] ${e.message}`);
}
function At(e, t, n, s) {
  const o = Oe.NODE_ENV !== "production" ? (n || Tw)[e] + (s || "") : `https://vuejs.org/error-reference/#compiler-${e}`, i = new SyntaxError(String(o));
  return i.code = e, i.loc = t, i;
}
const GY = {
  ABRUPT_CLOSING_OF_EMPTY_COMMENT: 0,
  0: "ABRUPT_CLOSING_OF_EMPTY_COMMENT",
  CDATA_IN_HTML_CONTENT: 1,
  1: "CDATA_IN_HTML_CONTENT",
  DUPLICATE_ATTRIBUTE: 2,
  2: "DUPLICATE_ATTRIBUTE",
  END_TAG_WITH_ATTRIBUTES: 3,
  3: "END_TAG_WITH_ATTRIBUTES",
  END_TAG_WITH_TRAILING_SOLIDUS: 4,
  4: "END_TAG_WITH_TRAILING_SOLIDUS",
  EOF_BEFORE_TAG_NAME: 5,
  5: "EOF_BEFORE_TAG_NAME",
  EOF_IN_CDATA: 6,
  6: "EOF_IN_CDATA",
  EOF_IN_COMMENT: 7,
  7: "EOF_IN_COMMENT",
  EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT: 8,
  8: "EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT",
  EOF_IN_TAG: 9,
  9: "EOF_IN_TAG",
  INCORRECTLY_CLOSED_COMMENT: 10,
  10: "INCORRECTLY_CLOSED_COMMENT",
  INCORRECTLY_OPENED_COMMENT: 11,
  11: "INCORRECTLY_OPENED_COMMENT",
  INVALID_FIRST_CHARACTER_OF_TAG_NAME: 12,
  12: "INVALID_FIRST_CHARACTER_OF_TAG_NAME",
  MISSING_ATTRIBUTE_VALUE: 13,
  13: "MISSING_ATTRIBUTE_VALUE",
  MISSING_END_TAG_NAME: 14,
  14: "MISSING_END_TAG_NAME",
  MISSING_WHITESPACE_BETWEEN_ATTRIBUTES: 15,
  15: "MISSING_WHITESPACE_BETWEEN_ATTRIBUTES",
  NESTED_COMMENT: 16,
  16: "NESTED_COMMENT",
  UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME: 17,
  17: "UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME",
  UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE: 18,
  18: "UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE",
  UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME: 19,
  19: "UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME",
  UNEXPECTED_NULL_CHARACTER: 20,
  20: "UNEXPECTED_NULL_CHARACTER",
  UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME: 21,
  21: "UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME",
  UNEXPECTED_SOLIDUS_IN_TAG: 22,
  22: "UNEXPECTED_SOLIDUS_IN_TAG",
  X_INVALID_END_TAG: 23,
  23: "X_INVALID_END_TAG",
  X_MISSING_END_TAG: 24,
  24: "X_MISSING_END_TAG",
  X_MISSING_INTERPOLATION_END: 25,
  25: "X_MISSING_INTERPOLATION_END",
  X_MISSING_DIRECTIVE_NAME: 26,
  26: "X_MISSING_DIRECTIVE_NAME",
  X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END: 27,
  27: "X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END",
  X_V_IF_NO_EXPRESSION: 28,
  28: "X_V_IF_NO_EXPRESSION",
  X_V_IF_SAME_KEY: 29,
  29: "X_V_IF_SAME_KEY",
  X_V_ELSE_NO_ADJACENT_IF: 30,
  30: "X_V_ELSE_NO_ADJACENT_IF",
  X_V_FOR_NO_EXPRESSION: 31,
  31: "X_V_FOR_NO_EXPRESSION",
  X_V_FOR_MALFORMED_EXPRESSION: 32,
  32: "X_V_FOR_MALFORMED_EXPRESSION",
  X_V_FOR_TEMPLATE_KEY_PLACEMENT: 33,
  33: "X_V_FOR_TEMPLATE_KEY_PLACEMENT",
  X_V_BIND_NO_EXPRESSION: 34,
  34: "X_V_BIND_NO_EXPRESSION",
  X_V_ON_NO_EXPRESSION: 35,
  35: "X_V_ON_NO_EXPRESSION",
  X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET: 36,
  36: "X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET",
  X_V_SLOT_MIXED_SLOT_USAGE: 37,
  37: "X_V_SLOT_MIXED_SLOT_USAGE",
  X_V_SLOT_DUPLICATE_SLOT_NAMES: 38,
  38: "X_V_SLOT_DUPLICATE_SLOT_NAMES",
  X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN: 39,
  39: "X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN",
  X_V_SLOT_MISPLACED: 40,
  40: "X_V_SLOT_MISPLACED",
  X_V_MODEL_NO_EXPRESSION: 41,
  41: "X_V_MODEL_NO_EXPRESSION",
  X_V_MODEL_MALFORMED_EXPRESSION: 42,
  42: "X_V_MODEL_MALFORMED_EXPRESSION",
  X_V_MODEL_ON_SCOPE_VARIABLE: 43,
  43: "X_V_MODEL_ON_SCOPE_VARIABLE",
  X_V_MODEL_ON_PROPS: 44,
  44: "X_V_MODEL_ON_PROPS",
  X_INVALID_EXPRESSION: 45,
  45: "X_INVALID_EXPRESSION",
  X_KEEP_ALIVE_INVALID_CHILDREN: 46,
  46: "X_KEEP_ALIVE_INVALID_CHILDREN",
  X_PREFIX_ID_NOT_SUPPORTED: 47,
  47: "X_PREFIX_ID_NOT_SUPPORTED",
  X_MODULE_MODE_NOT_SUPPORTED: 48,
  48: "X_MODULE_MODE_NOT_SUPPORTED",
  X_CACHE_HANDLER_NOT_SUPPORTED: 49,
  49: "X_CACHE_HANDLER_NOT_SUPPORTED",
  X_SCOPE_ID_NOT_SUPPORTED: 50,
  50: "X_SCOPE_ID_NOT_SUPPORTED",
  X_VNODE_HOOKS: 51,
  51: "X_VNODE_HOOKS",
  X_V_BIND_INVALID_SAME_NAME_ARGUMENT: 52,
  52: "X_V_BIND_INVALID_SAME_NAME_ARGUMENT",
  __EXTEND_POINT__: 53,
  53: "__EXTEND_POINT__"
}, Tw = {
  // parse errors
  0: "Illegal comment.",
  1: "CDATA section is allowed only in XML context.",
  2: "Duplicate attribute.",
  3: "End tag cannot have attributes.",
  4: "Illegal '/' in tags.",
  5: "Unexpected EOF in tag.",
  6: "Unexpected EOF in CDATA section.",
  7: "Unexpected EOF in comment.",
  8: "Unexpected EOF in script.",
  9: "Unexpected EOF in tag.",
  10: "Incorrectly closed comment.",
  11: "Incorrectly opened comment.",
  12: "Illegal tag name. Use '&lt;' to print '<'.",
  13: "Attribute value was expected.",
  14: "End tag name was expected.",
  15: "Whitespace was expected.",
  16: "Unexpected '<!--' in comment.",
  17: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
  18: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
  19: "Attribute name cannot start with '='.",
  21: "'<?' is allowed only in XML context.",
  20: "Unexpected null character.",
  22: "Illegal '/' in tags.",
  // Vue-specific parse errors
  23: "Invalid end tag.",
  24: "Element is missing end tag.",
  25: "Interpolation end sign was not found.",
  27: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
  26: "Legal directive name was expected.",
  // transform errors
  28: "v-if/v-else-if is missing expression.",
  29: "v-if/else branches must use unique keys.",
  30: "v-else/v-else-if has no adjacent v-if or v-else-if.",
  31: "v-for is missing expression.",
  32: "v-for has invalid expression.",
  33: "<template v-for> key should be placed on the <template> tag.",
  34: "v-bind is missing expression.",
  52: "v-bind with same-name shorthand only allows static argument.",
  35: "v-on is missing expression.",
  36: "Unexpected custom directive on <slot> outlet.",
  37: "Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",
  38: "Duplicate slot names found. ",
  39: "Extraneous children found when component already has explicitly named default slot. These children will be ignored.",
  40: "v-slot can only be used on components or <template> tags.",
  41: "v-model is missing expression.",
  42: "v-model value must be a valid JavaScript member expression.",
  43: "v-model cannot be used on v-for or v-slot scope variables because they are not writable.",
  44: `v-model cannot be used on a prop, because local prop bindings are not writable.
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
  45: "Error parsing JavaScript expression: ",
  46: "<KeepAlive> expects exactly one child component.",
  51: "@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",
  // generic errors
  47: '"prefixIdentifiers" option is not supported in this build of compiler.',
  48: "ES module mode is not supported in this build of compiler.",
  49: '"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',
  50: '"scopeId" option is only supported in module mode.',
  // just to fulfill types
  53: ""
};
function zY(e, t, n = !1, s = [], o = /* @__PURE__ */ Object.create(null)) {
}
function KY(e, t, n) {
  return !1;
}
function XY(e, t) {
  if (e && (e.type === "ObjectProperty" || e.type === "ArrayPattern")) {
    let n = t.length;
    for (; n--; ) {
      const s = t[n];
      if (s.type === "AssignmentExpression")
        return !0;
      if (s.type !== "ObjectProperty" && !s.type.endsWith("Pattern"))
        break;
    }
  }
  return !1;
}
function qY(e) {
  let t = e.length;
  for (; t--; ) {
    const n = e[t];
    if (n.type === "NewExpression")
      return !0;
    if (n.type !== "MemberExpression")
      break;
  }
  return !1;
}
function JY(e, t) {
  for (const n of e.params)
    for (const s of Ko(n))
      t(s);
}
function QY(e, t) {
  for (const n of e.body)
    if (n.type === "VariableDeclaration") {
      if (n.declare) continue;
      for (const s of n.declarations)
        for (const o of Ko(s.id))
          t(o);
    } else if (n.type === "FunctionDeclaration" || n.type === "ClassDeclaration") {
      if (n.declare || !n.id) continue;
      t(n.id);
    } else ZY(n) && e9(n, !0, t);
}
function ZY(e) {
  return e.type === "ForOfStatement" || e.type === "ForInStatement" || e.type === "ForStatement";
}
function e9(e, t, n) {
  const s = e.type === "ForStatement" ? e.init : e.left;
  if (s && s.type === "VariableDeclaration" && (s.kind === "var" && t))
    for (const o of s.declarations)
      for (const i of Ko(o.id))
        n(i);
}
function Ko(e, t = []) {
  switch (e.type) {
    case "Identifier":
      t.push(e);
      break;
    case "MemberExpression":
      let n = e;
      for (; n.type === "MemberExpression"; )
        n = n.object;
      t.push(n);
      break;
    case "ObjectPattern":
      for (const s of e.properties)
        s.type === "RestElement" ? Ko(s.argument, t) : Ko(s.value, t);
      break;
    case "ArrayPattern":
      e.elements.forEach((s) => {
        s && Ko(s, t);
      });
      break;
    case "RestElement":
      Ko(e.argument, t);
      break;
    case "AssignmentPattern":
      Ko(e.left, t);
      break;
  }
  return t;
}
const t9 = (e) => /Function(?:Expression|Declaration)$|Method$/.test(e.type), $w = (e) => e && (e.type === "ObjectProperty" || e.type === "ObjectMethod") && !e.computed, n9 = (e, t) => $w(t) && t.key === e, kw = [
  "TSAsExpression",
  // foo as number
  "TSTypeAssertion",
  // (<number>foo)
  "TSNonNullExpression",
  // foo!
  "TSInstantiationExpression",
  // foo<string>
  "TSSatisfiesExpression"
  // foo satisfies T
];
function Dw(e) {
  return kw.includes(e.type) ? Dw(e.expression) : e;
}
const ts = (e) => e.type === 4 && e.isStatic;
function og(e) {
  switch (e) {
    case "Teleport":
    case "teleport":
      return Na;
    case "Suspense":
    case "suspense":
      return Wf;
    case "KeepAlive":
    case "keep-alive":
      return vc;
    case "BaseTransition":
    case "base-transition":
      return qv;
  }
}
const s9 = /^\d|[^\$\w\xA0-\uFFFF]/, Wc = (e) => !s9.test(e), o9 = /[A-Za-z_$\xA0-\uFFFF]/, r9 = /[\.\?\w$\xA0-\uFFFF]/, i9 = /\s+[.[]\s*|\s*[.[]\s+/g, Iw = (e) => e.type === 4 ? e.content : e.loc.source, Rw = (e) => {
  const t = Iw(e).trim().replace(i9, (a) => a.trim());
  let n = 0, s = [], o = 0, i = 0, r = null;
  for (let a = 0; a < t.length; a++) {
    const l = t.charAt(a);
    switch (n) {
      case 0:
        if (l === "[")
          s.push(n), n = 1, o++;
        else if (l === "(")
          s.push(n), n = 2, i++;
        else if (!(a === 0 ? o9 : r9).test(l))
          return !1;
        break;
      case 1:
        l === "'" || l === '"' || l === "`" ? (s.push(n), n = 3, r = l) : l === "[" ? o++ : l === "]" && (--o || (n = s.pop()));
        break;
      case 2:
        if (l === "'" || l === '"' || l === "`")
          s.push(n), n = 3, r = l;
        else if (l === "(")
          i++;
        else if (l === ")") {
          if (a === t.length - 1)
            return !1;
          --i || (n = s.pop());
        }
        break;
      case 3:
        l === r && (n = s.pop(), r = null);
        break;
    }
  }
  return !o && !i;
}, a9 = Gt, rg = Rw, l9 = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/, Aw = (e) => l9.test(Iw(e)), c9 = Gt, Mw = Aw;
function u9(e, t, n = t.length) {
  return Pw(
    {
      offset: e.offset,
      line: e.line,
      column: e.column
    },
    t,
    n
  );
}
function Pw(e, t, n = t.length) {
  let s = 0, o = -1;
  for (let i = 0; i < n; i++)
    t.charCodeAt(i) === 10 && (s++, o = i);
  return e.offset += n, e.line += s, e.column = o === -1 ? e.column + n : n - o, e;
}
function ym(e, t) {
  if (!e)
    throw new Error(t || "unexpected compiler condition");
}
function jn(e, t, n = !1) {
  for (let s = 0; s < e.props.length; s++) {
    const o = e.props[s];
    if (o.type === 7 && (n || o.exp) && (We(t) ? o.name === t : t.test(o.name)))
      return o;
  }
}
function La(e, t, n = !1, s = !1) {
  for (let o = 0; o < e.props.length; o++) {
    const i = e.props[o];
    if (i.type === 6) {
      if (n) continue;
      if (i.name === t && (i.value || s))
        return i;
    } else if (i.name === "bind" && (i.exp || s) && Qo(i.arg, t))
      return i;
  }
}
function Qo(e, t) {
  return !!(e && ts(e) && e.content === t);
}
function Vw(e) {
  return e.props.some(
    (t) => t.type === 7 && t.name === "bind" && (!t.arg || // v-bind="obj"
    t.arg.type !== 4 || // v-bind:[_ctx.foo]
    !t.arg.isStatic)
    // v-bind:[foo]
  );
}
function Ju(e) {
  return e.type === 5 || e.type === 2;
}
function ig(e) {
  return e.type === 7 && e.name === "slot";
}
function Fa(e) {
  return e.type === 1 && e.tagType === 3;
}
function bc(e) {
  return e.type === 1 && e.tagType === 2;
}
const d9 = /* @__PURE__ */ new Set([Pa, nl]);
function Lw(e, t = []) {
  if (e && !We(e) && e.type === 14) {
    const n = e.callee;
    if (!We(n) && d9.has(n))
      return Lw(
        e.arguments[0],
        t.concat(e)
      );
  }
  return [e, t];
}
function Ec(e, t, n) {
  let s, o = e.type === 13 ? e.props : e.arguments[2], i = [], r;
  if (o && !We(o) && o.type === 14) {
    const a = Lw(o);
    o = a[0], i = a[1], r = i[i.length - 1];
  }
  if (o == null || We(o))
    s = _s([t]);
  else if (o.type === 14) {
    const a = o.arguments[0];
    !We(a) && a.type === 15 ? U_(t, a) || a.properties.unshift(t) : o.callee === sp ? s = yn(n.helper(gc), [
      _s([t]),
      o
    ]) : o.arguments.unshift(_s([t])), !s && (s = o);
  } else o.type === 15 ? (U_(t, o) || o.properties.unshift(t), s = o) : (s = yn(n.helper(gc), [
    _s([t]),
    o
  ]), r && r.callee === nl && (r = i[i.length - 2]));
  e.type === 13 ? r ? r.arguments[0] = s : e.props = s : r ? r.arguments[0] = s : e.arguments[2] = s;
}
function U_(e, t) {
  let n = !1;
  if (e.key.type === 4) {
    const s = e.key.content;
    n = t.properties.some(
      (o) => o.key.type === 4 && o.key.content === s
    );
  }
  return n;
}
function Ua(e, t) {
  return `_${t}_${e.replace(/[^\w]/g, (n, s) => n === "-" ? "_" : e.charCodeAt(s).toString())}`;
}
function Ys(e, t) {
  if (!e || Object.keys(t).length === 0)
    return !1;
  switch (e.type) {
    case 1:
      for (let n = 0; n < e.props.length; n++) {
        const s = e.props[n];
        if (s.type === 7 && (Ys(s.arg, t) || Ys(s.exp, t)))
          return !0;
      }
      return e.children.some((n) => Ys(n, t));
    case 11:
      return Ys(e.source, t) ? !0 : e.children.some((n) => Ys(n, t));
    case 9:
      return e.branches.some((n) => Ys(n, t));
    case 10:
      return Ys(e.condition, t) ? !0 : e.children.some((n) => Ys(n, t));
    case 4:
      return !e.isStatic && Wc(e.content) && !!t[e.content];
    case 8:
      return e.children.some((n) => ft(n) && Ys(n, t));
    case 5:
    case 12:
      return Ys(e.content, t);
    case 2:
    case 3:
    case 20:
      return !1;
    default:
      return !1;
  }
}
function Fw(e) {
  return e.type === 14 && e.callee === rp ? e.arguments[1].returns : e;
}
const Uw = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/, jw = {
  parseMode: "base",
  ns: 0,
  delimiters: ["{{", "}}"],
  getNamespace: () => 0,
  isVoidTag: da,
  isPreTag: da,
  isIgnoreNewlineTag: da,
  isCustomElement: da,
  onError: sg,
  onWarn: Cw,
  comments: Oe.NODE_ENV !== "production",
  prefixIdentifiers: !1
};
let St = jw, Sc = null, nr = "", Vn = null, Nt = null, as = "", jo = -1, ai = -1, ag = 0, $r = !1, _m = null;
const Jt = [], Wt = new HY(Jt, {
  onerr: os,
  ontext(e, t) {
    _u(An(e, t), e, t);
  },
  ontextentity(e, t, n) {
    _u(e, t, n);
  },
  oninterpolation(e, t) {
    if ($r)
      return _u(An(e, t), e, t);
    let n = e + Wt.delimiterOpen.length, s = t - Wt.delimiterClose.length;
    for (; ys(nr.charCodeAt(n)); )
      n++;
    for (; ys(nr.charCodeAt(s - 1)); )
      s--;
    let o = An(n, s);
    o.includes("&") && (o = St.decodeEntities(o, !1)), bm({
      type: 5,
      content: Zu(o, !1, dn(n, s)),
      loc: dn(e, t)
    });
  },
  onopentagname(e, t) {
    const n = An(e, t);
    Vn = {
      type: 1,
      tag: n,
      ns: St.getNamespace(n, Jt[0], St.ns),
      tagType: 0,
      // will be refined on tag close
      props: [],
      children: [],
      loc: dn(e - 1, t),
      codegenNode: void 0
    };
  },
  onopentagend(e) {
    B_(e);
  },
  onclosetag(e, t) {
    const n = An(e, t);
    if (!St.isVoidTag(n)) {
      let s = !1;
      for (let o = 0; o < Jt.length; o++)
        if (Jt[o].tag.toLowerCase() === n.toLowerCase()) {
          s = !0, o > 0 && os(24, Jt[0].loc.start.offset);
          for (let r = 0; r <= o; r++) {
            const a = Jt.shift();
            Qu(a, t, r < o);
          }
          break;
        }
      s || os(23, Bw(e, 60));
    }
  },
  onselfclosingtag(e) {
    const t = Vn.tag;
    Vn.isSelfClosing = !0, B_(e), Jt[0] && Jt[0].tag === t && Qu(Jt.shift(), e);
  },
  onattribname(e, t) {
    Nt = {
      type: 6,
      name: An(e, t),
      nameLoc: dn(e, t),
      value: void 0,
      loc: dn(e)
    };
  },
  ondirname(e, t) {
    const n = An(e, t), s = n === "." || n === ":" ? "bind" : n === "@" ? "on" : n === "#" ? "slot" : n.slice(2);
    if (!$r && s === "" && os(26, e), $r || s === "")
      Nt = {
        type: 6,
        name: n,
        nameLoc: dn(e, t),
        value: void 0,
        loc: dn(e)
      };
    else if (Nt = {
      type: 7,
      name: s,
      rawName: n,
      exp: void 0,
      arg: void 0,
      modifiers: n === "." ? [nt("prop")] : [],
      loc: dn(e)
    }, s === "pre") {
      $r = Wt.inVPre = !0, _m = Vn;
      const o = Vn.props;
      for (let i = 0; i < o.length; i++)
        o[i].type === 7 && (o[i] = S9(o[i]));
    }
  },
  ondirarg(e, t) {
    if (e === t) return;
    const n = An(e, t);
    if ($r)
      Nt.name += n, pi(Nt.nameLoc, t);
    else {
      const s = n[0] !== "[";
      Nt.arg = Zu(
        s ? n : n.slice(1, -1),
        s,
        dn(e, t),
        s ? 3 : 0
      );
    }
  },
  ondirmodifier(e, t) {
    const n = An(e, t);
    if ($r)
      Nt.name += "." + n, pi(Nt.nameLoc, t);
    else if (Nt.name === "slot") {
      const s = Nt.arg;
      s && (s.content += "." + n, pi(s.loc, t));
    } else {
      const s = nt(n, !0, dn(e, t));
      Nt.modifiers.push(s);
    }
  },
  onattribdata(e, t) {
    as += An(e, t), jo < 0 && (jo = e), ai = t;
  },
  onattribentity(e, t, n) {
    as += e, jo < 0 && (jo = t), ai = n;
  },
  onattribnameend(e) {
    const t = Nt.loc.start.offset, n = An(t, e);
    Nt.type === 7 && (Nt.rawName = n), Vn.props.some(
      (s) => (s.type === 7 ? s.rawName : s.name) === n
    ) && os(2, t);
  },
  onattribend(e, t) {
    if (Vn && Nt) {
      if (pi(Nt.loc, t), e !== 0)
        if (as.includes("&") && (as = St.decodeEntities(
          as,
          !0
        )), Nt.type === 6)
          Nt.name === "class" && (as = Yw(as).trim()), e === 1 && !as && os(13, t), Nt.value = {
            type: 2,
            content: as,
            loc: e === 1 ? dn(jo, ai) : dn(jo - 1, ai + 1)
          }, Wt.inSFCRoot && Vn.tag === "template" && Nt.name === "lang" && as && as !== "html" && Wt.enterRCDATA(Fd("</template"), 0);
        else {
          let n = 0;
          Nt.exp = Zu(
            as,
            !1,
            dn(jo, ai),
            0,
            n
          ), Nt.name === "for" && (Nt.forParseResult = p9(Nt.exp));
          let s = -1;
          Nt.name === "bind" && (s = Nt.modifiers.findIndex(
            (o) => o.content === "sync"
          )) > -1 && Fi(
            "COMPILER_V_BIND_SYNC",
            St,
            Nt.loc,
            Nt.rawName
          ) && (Nt.name = "model", Nt.modifiers.splice(s, 1));
        }
      (Nt.type !== 7 || Nt.name !== "pre") && Vn.props.push(Nt);
    }
    as = "", jo = ai = -1;
  },
  oncomment(e, t) {
    St.comments && bm({
      type: 3,
      content: An(e, t),
      loc: dn(e - 4, t + 3)
    });
  },
  onend() {
    const e = nr.length;
    if (Oe.NODE_ENV !== "production" && Wt.state !== 1)
      switch (Wt.state) {
        case 5:
        case 8:
          os(5, e);
          break;
        case 3:
        case 4:
          os(
            25,
            Wt.sectionStart
          );
          break;
        case 28:
          Wt.currentSequence === In.CdataEnd ? os(6, e) : os(7, e);
          break;
        case 6:
        case 7:
        case 9:
        case 11:
        case 12:
        case 13:
        case 14:
        case 15:
        case 16:
        case 17:
        case 18:
        case 19:
        // "
        case 20:
        // '
        case 21:
          os(9, e);
          break;
      }
    for (let t = 0; t < Jt.length; t++)
      Qu(Jt[t], e - 1), os(24, Jt[t].loc.start.offset);
  },
  oncdata(e, t) {
    Jt[0].ns !== 0 ? _u(An(e, t), e, t) : os(1, e - 9);
  },
  onprocessinginstruction(e) {
    (Jt[0] ? Jt[0].ns : St.ns) === 0 && os(
      21,
      e - 1
    );
  }
}), j_ = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/, f9 = /^\(|\)$/g;
function p9(e) {
  const t = e.loc, n = e.content, s = n.match(Uw);
  if (!s) return;
  const [, o, i] = s, r = (f, p, h = !1) => {
    const m = t.start.offset + p, v = m + f.length;
    return Zu(
      f,
      !1,
      dn(m, v),
      0,
      h ? 1 : 0
      /* Normal */
    );
  }, a = {
    source: r(i.trim(), n.indexOf(i, o.length)),
    value: void 0,
    key: void 0,
    index: void 0,
    finalized: !1
  };
  let l = o.trim().replace(f9, "").trim();
  const c = o.indexOf(l), d = l.match(j_);
  if (d) {
    l = l.replace(j_, "").trim();
    const f = d[1].trim();
    let p;
    if (f && (p = n.indexOf(f, c + l.length), a.key = r(f, p, !0)), d[2]) {
      const h = d[2].trim();
      h && (a.index = r(
        h,
        n.indexOf(
          h,
          a.key ? p + f.length : c + l.length
        ),
        !0
      ));
    }
  }
  return l && (a.value = r(l, c, !0)), a;
}
function An(e, t) {
  return nr.slice(e, t);
}
function B_(e) {
  Wt.inSFCRoot && (Vn.innerLoc = dn(e + 1, e + 1)), bm(Vn);
  const { tag: t, ns: n } = Vn;
  n === 0 && St.isPreTag(t) && ag++, St.isVoidTag(t) ? Qu(Vn, e) : (Jt.unshift(Vn), (n === 1 || n === 2) && (Wt.inXML = !0)), Vn = null;
}
function _u(e, t, n) {
  {
    const i = Jt[0] && Jt[0].tag;
    i !== "script" && i !== "style" && e.includes("&") && (e = St.decodeEntities(e, !1));
  }
  const s = Jt[0] || Sc, o = s.children[s.children.length - 1];
  o && o.type === 2 ? (o.content += e, pi(o.loc, n)) : s.children.push({
    type: 2,
    content: e,
    loc: dn(t, n)
  });
}
function Qu(e, t, n = !1) {
  n ? pi(e.loc, Bw(t, 60)) : pi(e.loc, h9(t, 62) + 1), Wt.inSFCRoot && (e.children.length ? e.innerLoc.end = st({}, e.children[e.children.length - 1].loc.end) : e.innerLoc.end = st({}, e.innerLoc.start), e.innerLoc.source = An(
    e.innerLoc.start.offset,
    e.innerLoc.end.offset
  ));
  const { tag: s, ns: o, children: i } = e;
  if ($r || (s === "slot" ? e.tagType = 2 : H_(e) ? e.tagType = 3 : v9(e) && (e.tagType = 1)), Wt.inRCDATA || (e.children = Hw(i)), o === 0 && St.isIgnoreNewlineTag(s)) {
    const r = i[0];
    r && r.type === 2 && (r.content = r.content.replace(/^\r?\n/, ""));
  }
  o === 0 && St.isPreTag(s) && ag--, _m === e && ($r = Wt.inVPre = !1, _m = null), Wt.inXML && (Jt[0] ? Jt[0].ns : St.ns) === 0 && (Wt.inXML = !1);
  {
    const r = e.props;
    if (Oe.NODE_ENV !== "production" && Hr(
      "COMPILER_V_IF_V_FOR_PRECEDENCE",
      St
    )) {
      let l = !1, c = !1;
      for (let d = 0; d < r.length; d++) {
        const f = r[d];
        if (f.type === 7 && (f.name === "if" ? l = !0 : f.name === "for" && (c = !0)), l && c) {
          _c(
            "COMPILER_V_IF_V_FOR_PRECEDENCE",
            St,
            e.loc
          );
          break;
        }
      }
    }
    if (!Wt.inSFCRoot && Hr(
      "COMPILER_NATIVE_TEMPLATE",
      St
    ) && e.tag === "template" && !H_(e)) {
      Oe.NODE_ENV !== "production" && _c(
        "COMPILER_NATIVE_TEMPLATE",
        St,
        e.loc
      );
      const l = Jt[0] || Sc, c = l.children.indexOf(e);
      l.children.splice(c, 1, ...e.children);
    }
    const a = r.find(
      (l) => l.type === 6 && l.name === "inline-template"
    );
    a && Fi(
      "COMPILER_INLINE_TEMPLATE",
      St,
      a.loc
    ) && e.children.length && (a.value = {
      type: 2,
      content: An(
        e.children[0].loc.start.offset,
        e.children[e.children.length - 1].loc.end.offset
      ),
      loc: a.loc
    });
  }
}
function h9(e, t) {
  let n = e;
  for (; nr.charCodeAt(n) !== t && n < nr.length - 1; ) n++;
  return n;
}
function Bw(e, t) {
  let n = e;
  for (; nr.charCodeAt(n) !== t && n >= 0; ) n--;
  return n;
}
const m9 = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]);
function H_({ tag: e, props: t }) {
  if (e === "template") {
    for (let n = 0; n < t.length; n++)
      if (t[n].type === 7 && m9.has(t[n].name))
        return !0;
  }
  return !1;
}
function v9({ tag: e, props: t }) {
  if (St.isCustomElement(e))
    return !1;
  if (e === "component" || g9(e.charCodeAt(0)) || og(e) || St.isBuiltInComponent && St.isBuiltInComponent(e) || St.isNativeTag && !St.isNativeTag(e))
    return !0;
  for (let n = 0; n < t.length; n++) {
    const s = t[n];
    if (s.type === 6) {
      if (s.name === "is" && s.value) {
        if (s.value.content.startsWith("vue:"))
          return !0;
        if (Fi(
          "COMPILER_IS_ON_ELEMENT",
          St,
          s.loc
        ))
          return !0;
      }
    } else if (
      // :is on plain element - only treat as component in compat mode
      s.name === "bind" && Qo(s.arg, "is") && Fi(
        "COMPILER_IS_ON_ELEMENT",
        St,
        s.loc
      )
    )
      return !0;
  }
  return !1;
}
function g9(e) {
  return e > 64 && e < 91;
}
const y9 = /\r\n/g;
function Hw(e, t) {
  const n = St.whitespace !== "preserve";
  let s = !1;
  for (let o = 0; o < e.length; o++) {
    const i = e[o];
    if (i.type === 2)
      if (ag)
        i.content = i.content.replace(y9, `
`);
      else if (_9(i.content)) {
        const r = e[o - 1] && e[o - 1].type, a = e[o + 1] && e[o + 1].type;
        !r || !a || n && (r === 3 && (a === 3 || a === 1) || r === 1 && (a === 3 || a === 1 && b9(i.content))) ? (s = !0, e[o] = null) : i.content = " ";
      } else n && (i.content = Yw(i.content));
  }
  return s ? e.filter(Boolean) : e;
}
function _9(e) {
  for (let t = 0; t < e.length; t++)
    if (!ys(e.charCodeAt(t)))
      return !1;
  return !0;
}
function b9(e) {
  for (let t = 0; t < e.length; t++) {
    const n = e.charCodeAt(t);
    if (n === 10 || n === 13)
      return !0;
  }
  return !1;
}
function Yw(e) {
  let t = "", n = !1;
  for (let s = 0; s < e.length; s++)
    ys(e.charCodeAt(s)) ? n || (t += " ", n = !0) : (t += e[s], n = !1);
  return t;
}
function bm(e) {
  (Jt[0] || Sc).children.push(e);
}
function dn(e, t) {
  return {
    start: Wt.getPos(e),
    // @ts-expect-error allow late attachment
    end: t == null ? t : Wt.getPos(t),
    // @ts-expect-error allow late attachment
    source: t == null ? t : An(e, t)
  };
}
function E9(e) {
  return dn(e.start.offset, e.end.offset);
}
function pi(e, t) {
  e.end = Wt.getPos(t), e.source = An(e.start.offset, t);
}
function S9(e) {
  const t = {
    type: 6,
    name: e.rawName,
    nameLoc: dn(
      e.loc.start.offset,
      e.loc.start.offset + e.rawName.length
    ),
    value: void 0,
    loc: e.loc
  };
  if (e.exp) {
    const n = e.exp.loc;
    n.end.offset < e.loc.end.offset && (n.start.offset--, n.start.column--, n.end.offset++, n.end.column++), t.value = {
      type: 2,
      content: e.exp.content,
      loc: n
    };
  }
  return t;
}
function Zu(e, t = !1, n, s = 0, o = 0) {
  return nt(e, t, n, s);
}
function os(e, t, n) {
  St.onError(
    At(e, dn(t, t), void 0, n)
  );
}
function w9() {
  Wt.reset(), Vn = null, Nt = null, as = "", jo = -1, ai = -1, Jt.length = 0;
}
function lg(e, t) {
  if (w9(), nr = e, St = st({}, jw), t) {
    let o;
    for (o in t)
      t[o] != null && (St[o] = t[o]);
  }
  if (Oe.NODE_ENV !== "production" && !St.decodeEntities)
    throw new Error(
      "[@vue/compiler-core] decodeEntities option is required in browser builds."
    );
  Wt.mode = St.parseMode === "html" ? 1 : St.parseMode === "sfc" ? 2 : 0, Wt.inXML = St.ns === 1 || St.ns === 2;
  const n = t && t.delimiters;
  n && (Wt.delimiterOpen = Fd(n[0]), Wt.delimiterClose = Fd(n[1]));
  const s = Sc = Nw([], e);
  return Wt.parse(nr), s.loc = dn(0, e.length), s.children = Hw(s.children), Sc = null, s;
}
function N9(e, t) {
  ed(
    e,
    void 0,
    t,
    // Root node is unfortunately non-hoistable due to potential parent
    // fallthrough attributes.
    Ww(e, e.children[0])
  );
}
function Ww(e, t) {
  const { children: n } = e;
  return n.length === 1 && t.type === 1 && !bc(t);
}
function ed(e, t, n, s = !1, o = !1) {
  const { children: i } = e, r = [];
  for (let d = 0; d < i.length; d++) {
    const f = i[d];
    if (f.type === 1 && f.tagType === 0) {
      const p = s ? 0 : ds(f, n);
      if (p > 0) {
        if (p >= 2) {
          f.codegenNode.patchFlag = -1, r.push(f);
          continue;
        }
      } else {
        const h = f.codegenNode;
        if (h.type === 13) {
          const m = h.patchFlag;
          if ((m === void 0 || m === 512 || m === 1) && zw(f, n) >= 2) {
            const v = Kw(f);
            v && (h.props = n.hoist(v));
          }
          h.dynamicProps && (h.dynamicProps = n.hoist(h.dynamicProps));
        }
      }
    } else if (f.type === 12 && (s ? 0 : ds(f, n)) >= 2) {
      r.push(f);
      continue;
    }
    if (f.type === 1) {
      const p = f.tagType === 1;
      p && n.scopes.vSlot++, ed(f, e, n, !1, o), p && n.scopes.vSlot--;
    } else if (f.type === 11)
      ed(f, e, n, f.children.length === 1, !0);
    else if (f.type === 9)
      for (let p = 0; p < f.branches.length; p++)
        ed(
          f.branches[p],
          e,
          n,
          f.branches[p].children.length === 1,
          o
        );
  }
  let a = !1;
  if (r.length === i.length && e.type === 1) {
    if (e.tagType === 0 && e.codegenNode && e.codegenNode.type === 13 && Ne(e.codegenNode.children))
      e.codegenNode.children = l(
        Br(e.codegenNode.children)
      ), a = !0;
    else if (e.tagType === 1 && e.codegenNode && e.codegenNode.type === 13 && e.codegenNode.children && !Ne(e.codegenNode.children) && e.codegenNode.children.type === 15) {
      const d = c(e.codegenNode, "default");
      d && (d.returns = l(
        Br(d.returns)
      ), a = !0);
    } else if (e.tagType === 3 && t && t.type === 1 && t.tagType === 1 && t.codegenNode && t.codegenNode.type === 13 && t.codegenNode.children && !Ne(t.codegenNode.children) && t.codegenNode.children.type === 15) {
      const d = jn(e, "slot", !0), f = d && d.arg && c(t.codegenNode, d.arg);
      f && (f.returns = l(
        Br(f.returns)
      ), a = !0);
    }
  }
  if (!a)
    for (const d of r)
      d.codegenNode = n.cache(d.codegenNode);
  function l(d) {
    const f = n.cache(d);
    return o && n.hmr && (f.needArraySpread = !0), f;
  }
  function c(d, f) {
    if (d.children && !Ne(d.children) && d.children.type === 15) {
      const p = d.children.properties.find(
        (h) => h.key === f || h.key.content === f
      );
      return p && p.value;
    }
  }
  r.length && n.transformHoist && n.transformHoist(i, n, e);
}
function ds(e, t) {
  const { constantCache: n } = t;
  switch (e.type) {
    case 1:
      if (e.tagType !== 0)
        return 0;
      const s = n.get(e);
      if (s !== void 0)
        return s;
      const o = e.codegenNode;
      if (o.type !== 13 || o.isBlock && e.tag !== "svg" && e.tag !== "foreignObject" && e.tag !== "math")
        return 0;
      if (o.patchFlag === void 0) {
        let r = 3;
        const a = zw(e, t);
        if (a === 0)
          return n.set(e, 0), 0;
        a < r && (r = a);
        for (let l = 0; l < e.children.length; l++) {
          const c = ds(e.children[l], t);
          if (c === 0)
            return n.set(e, 0), 0;
          c < r && (r = c);
        }
        if (r > 1)
          for (let l = 0; l < e.props.length; l++) {
            const c = e.props[l];
            if (c.type === 7 && c.name === "bind" && c.exp) {
              const d = ds(c.exp, t);
              if (d === 0)
                return n.set(e, 0), 0;
              d < r && (r = d);
            }
          }
        if (o.isBlock) {
          for (let l = 0; l < e.props.length; l++)
            if (e.props[l].type === 7)
              return n.set(e, 0), 0;
          t.removeHelper(Kr), t.removeHelper(
            Li(t.inSSR, o.isComponent)
          ), o.isBlock = !1, t.helper(Vi(t.inSSR, o.isComponent));
        }
        return n.set(e, r), r;
      } else
        return n.set(e, 0), 0;
    case 2:
    case 3:
      return 3;
    case 9:
    case 11:
    case 10:
      return 0;
    case 5:
    case 12:
      return ds(e.content, t);
    case 4:
      return e.constType;
    case 8:
      let i = 3;
      for (let r = 0; r < e.children.length; r++) {
        const a = e.children[r];
        if (We(a) || ns(a))
          continue;
        const l = ds(a, t);
        if (l === 0)
          return 0;
        l < i && (i = l);
      }
      return i;
    case 20:
      return 2;
    default:
      return 0;
  }
}
const O9 = /* @__PURE__ */ new Set([
  tp,
  np,
  Pa,
  nl
]);
function Gw(e, t) {
  if (e.type === 14 && !We(e.callee) && O9.has(e.callee)) {
    const n = e.arguments[0];
    if (n.type === 4)
      return ds(n, t);
    if (n.type === 14)
      return Gw(n, t);
  }
  return 0;
}
function zw(e, t) {
  let n = 3;
  const s = Kw(e);
  if (s && s.type === 15) {
    const { properties: o } = s;
    for (let i = 0; i < o.length; i++) {
      const { key: r, value: a } = o[i], l = ds(r, t);
      if (l === 0)
        return l;
      l < n && (n = l);
      let c;
      if (a.type === 4 ? c = ds(a, t) : a.type === 14 ? c = Gw(a, t) : c = 0, c === 0)
        return c;
      c < n && (n = c);
    }
  }
  return n;
}
function Kw(e) {
  const t = e.codegenNode;
  if (t.type === 13)
    return t.props;
}
function Xw(e, {
  filename: t = "",
  prefixIdentifiers: n = !1,
  hoistStatic: s = !1,
  hmr: o = !1,
  cacheHandlers: i = !1,
  nodeTransforms: r = [],
  directiveTransforms: a = {},
  transformHoist: l = null,
  isBuiltInComponent: c = Gt,
  isCustomElement: d = Gt,
  expressionPlugins: f = [],
  scopeId: p = null,
  slotted: h = !0,
  ssr: m = !1,
  inSSR: v = !1,
  ssrCssVars: g = "",
  bindingMetadata: _ = ut,
  inline: S = !1,
  isTS: b = !1,
  onError: O = sg,
  onWarn: w = Cw,
  compatConfig: N
}) {
  const C = t.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/), k = {
    // options
    filename: t,
    selfName: C && so(Lt(C[1])),
    prefixIdentifiers: n,
    hoistStatic: s,
    hmr: o,
    cacheHandlers: i,
    nodeTransforms: r,
    directiveTransforms: a,
    transformHoist: l,
    isBuiltInComponent: c,
    isCustomElement: d,
    expressionPlugins: f,
    scopeId: p,
    slotted: h,
    ssr: m,
    inSSR: v,
    ssrCssVars: g,
    bindingMetadata: _,
    inline: S,
    isTS: b,
    onError: O,
    onWarn: w,
    compatConfig: N,
    // state
    root: e,
    helpers: /* @__PURE__ */ new Map(),
    components: /* @__PURE__ */ new Set(),
    directives: /* @__PURE__ */ new Set(),
    hoists: [],
    imports: [],
    cached: [],
    constantCache: /* @__PURE__ */ new WeakMap(),
    temps: 0,
    identifiers: /* @__PURE__ */ Object.create(null),
    scopes: {
      vFor: 0,
      vSlot: 0,
      vPre: 0,
      vOnce: 0
    },
    parent: null,
    grandParent: null,
    currentNode: e,
    childIndex: 0,
    inVOnce: !1,
    // methods
    helper(x) {
      const $ = k.helpers.get(x) || 0;
      return k.helpers.set(x, $ + 1), x;
    },
    removeHelper(x) {
      const $ = k.helpers.get(x);
      if ($) {
        const M = $ - 1;
        M ? k.helpers.set(x, M) : k.helpers.delete(x);
      }
    },
    helperString(x) {
      return `_${Mi[k.helper(x)]}`;
    },
    replaceNode(x) {
      if (Oe.NODE_ENV !== "production") {
        if (!k.currentNode)
          throw new Error("Node being replaced is already removed.");
        if (!k.parent)
          throw new Error("Cannot replace root node.");
      }
      k.parent.children[k.childIndex] = k.currentNode = x;
    },
    removeNode(x) {
      if (Oe.NODE_ENV !== "production" && !k.parent)
        throw new Error("Cannot remove root node.");
      const $ = k.parent.children, M = x ? $.indexOf(x) : k.currentNode ? k.childIndex : -1;
      if (Oe.NODE_ENV !== "production" && M < 0)
        throw new Error("node being removed is not a child of current parent");
      !x || x === k.currentNode ? (k.currentNode = null, k.onNodeRemoved()) : k.childIndex > M && (k.childIndex--, k.onNodeRemoved()), k.parent.children.splice(M, 1);
    },
    onNodeRemoved: Gt,
    addIdentifiers(x) {
    },
    removeIdentifiers(x) {
    },
    hoist(x) {
      We(x) && (x = nt(x)), k.hoists.push(x);
      const $ = nt(
        `_hoisted_${k.hoists.length}`,
        !1,
        x.loc,
        2
      );
      return $.hoisted = x, $;
    },
    cache(x, $ = !1, M = !1) {
      const R = Ow(
        k.cached.length,
        x,
        $,
        M
      );
      return k.cached.push(R), R;
    }
  };
  return k.filters = /* @__PURE__ */ new Set(), k;
}
function qw(e, t) {
  const n = Xw(e, t);
  Gc(e, n), t.hoistStatic && N9(e, n), t.ssr || x9(e, n), e.helpers = /* @__PURE__ */ new Set([...n.helpers.keys()]), e.components = [...n.components], e.directives = [...n.directives], e.imports = n.imports, e.hoists = n.hoists, e.temps = n.temps, e.cached = n.cached, e.transformed = !0, e.filters = [...n.filters];
}
function x9(e, t) {
  const { helper: n } = t, { children: s } = e;
  if (s.length === 1) {
    const o = s[0];
    if (Ww(e, o) && o.codegenNode) {
      const i = o.codegenNode;
      i.type === 13 && ip(i, t), e.codegenNode = i;
    } else
      e.codegenNode = o;
  } else if (s.length > 1) {
    let o = 64;
    Oe.NODE_ENV !== "production" && s.filter((i) => i.type !== 3).length === 1 && (o |= 2048), e.codegenNode = Va(
      t,
      n(Ma),
      void 0,
      e.children,
      o,
      void 0,
      void 0,
      !0,
      void 0,
      !1
    );
  }
}
function C9(e, t) {
  let n = 0;
  const s = () => {
    n--;
  };
  for (; n < e.children.length; n++) {
    const o = e.children[n];
    We(o) || (t.grandParent = t.parent, t.parent = e, t.childIndex = n, t.onNodeRemoved = s, Gc(o, t));
  }
}
function Gc(e, t) {
  t.currentNode = e;
  const { nodeTransforms: n } = t, s = [];
  for (let i = 0; i < n.length; i++) {
    const r = n[i](e, t);
    if (r && (Ne(r) ? s.push(...r) : s.push(r)), t.currentNode)
      e = t.currentNode;
    else
      return;
  }
  switch (e.type) {
    case 3:
      t.ssr || t.helper(tl);
      break;
    case 5:
      t.ssr || t.helper(Yc);
      break;
    // for container types, further traverse downwards
    case 9:
      for (let i = 0; i < e.branches.length; i++)
        Gc(e.branches[i], t);
      break;
    case 10:
    case 11:
    case 1:
    case 0:
      C9(e, t);
      break;
  }
  t.currentNode = e;
  let o = s.length;
  for (; o--; )
    s[o]();
}
function cg(e, t) {
  const n = We(e) ? (s) => s === e : (s) => e.test(s);
  return (s, o) => {
    if (s.type === 1) {
      const { props: i } = s;
      if (s.tagType === 3 && i.some(ig))
        return;
      const r = [];
      for (let a = 0; a < i.length; a++) {
        const l = i[a];
        if (l.type === 7 && n(l.name)) {
          i.splice(a, 1), a--;
          const c = t(s, l, o);
          c && r.push(c);
        }
      }
      return r;
    }
  };
}
const ap = "/*@__PURE__*/", Jw = (e) => `${Mi[e]}: _${Mi[e]}`;
function T9(e, {
  mode: t = "function",
  prefixIdentifiers: n = t === "module",
  sourceMap: s = !1,
  filename: o = "template.vue.html",
  scopeId: i = null,
  optimizeImports: r = !1,
  runtimeGlobalName: a = "Vue",
  runtimeModuleName: l = "vue",
  ssrRuntimeModuleName: c = "vue/server-renderer",
  ssr: d = !1,
  isTS: f = !1,
  inSSR: p = !1
}) {
  const h = {
    mode: t,
    prefixIdentifiers: n,
    sourceMap: s,
    filename: o,
    scopeId: i,
    optimizeImports: r,
    runtimeGlobalName: a,
    runtimeModuleName: l,
    ssrRuntimeModuleName: c,
    ssr: d,
    isTS: f,
    inSSR: p,
    source: e.source,
    code: "",
    column: 1,
    line: 1,
    offset: 0,
    indentLevel: 0,
    pure: !1,
    map: void 0,
    helper(v) {
      return `_${Mi[v]}`;
    },
    push(v, g = -2, _) {
      h.code += v;
    },
    indent() {
      m(++h.indentLevel);
    },
    deindent(v = !1) {
      v ? --h.indentLevel : m(--h.indentLevel);
    },
    newline() {
      m(h.indentLevel);
    }
  };
  function m(v) {
    h.push(
      `
` + "  ".repeat(v),
      0
      /* Start */
    );
  }
  return h;
}
function Qw(e, t = {}) {
  const n = T9(e, t);
  t.onContextCreated && t.onContextCreated(n);
  const {
    mode: s,
    push: o,
    prefixIdentifiers: i,
    indent: r,
    deindent: a,
    newline: l,
    scopeId: c,
    ssr: d
  } = n, f = Array.from(e.helpers), p = f.length > 0, h = !i && s !== "module";
  $9(e, n);
  const v = d ? "ssrRender" : "render", _ = (d ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]).join(", ");
  if (o(`function ${v}(${_}) {`), r(), h && (o("with (_ctx) {"), r(), p && (o(
    `const { ${f.map(Jw).join(", ")} } = _Vue
`,
    -1
    /* End */
  ), l())), e.components.length && (Qp(e.components, "component", n), (e.directives.length || e.temps > 0) && l()), e.directives.length && (Qp(e.directives, "directive", n), e.temps > 0 && l()), e.filters && e.filters.length && (l(), Qp(e.filters, "filter", n), l()), e.temps > 0) {
    o("let ");
    for (let S = 0; S < e.temps; S++)
      o(`${S > 0 ? ", " : ""}_temp${S}`);
  }
  return (e.components.length || e.directives.length || e.temps) && (o(
    `
`,
    0
    /* Start */
  ), l()), d || o("return "), e.codegenNode ? zn(e.codegenNode, n) : o("null"), h && (a(), o("}")), a(), o("}"), {
    ast: e,
    code: n.code,
    preamble: "",
    map: n.map ? n.map.toJSON() : void 0
  };
}
function $9(e, t) {
  const {
    ssr: n,
    prefixIdentifiers: s,
    push: o,
    newline: i,
    runtimeModuleName: r,
    runtimeGlobalName: a,
    ssrRuntimeModuleName: l
  } = t, c = a, d = Array.from(e.helpers);
  if (d.length > 0 && (o(
    `const _Vue = ${c}
`,
    -1
    /* End */
  ), e.hoists.length)) {
    const f = [
      Gf,
      zf,
      tl,
      Kf,
      Zv
    ].filter((p) => d.includes(p)).map(Jw).join(", ");
    o(
      `const { ${f} } = _Vue
`,
      -1
      /* End */
    );
  }
  k9(e.hoists, t), i(), o("return ");
}
function Qp(e, t, { helper: n, push: s, newline: o, isTS: i }) {
  const r = n(
    t === "filter" ? Qf : t === "component" ? Xf : Jf
  );
  for (let a = 0; a < e.length; a++) {
    let l = e[a];
    const c = l.endsWith("__self");
    c && (l = l.slice(0, -6)), s(
      `const ${Ua(l, t)} = ${r}(${JSON.stringify(l)}${c ? ", true" : ""})${i ? "!" : ""}`
    ), a < e.length - 1 && o();
  }
}
function k9(e, t) {
  if (!e.length)
    return;
  t.pure = !0;
  const { push: n, newline: s } = t;
  s();
  for (let o = 0; o < e.length; o++) {
    const i = e[o];
    i && (n(`const _hoisted_${o + 1} = `), zn(i, t), s());
  }
  t.pure = !1;
}
function D9(e) {
  return We(e) || e.type === 4 || e.type === 2 || e.type === 5 || e.type === 8;
}
function ug(e, t) {
  const n = e.length > 3 || Oe.NODE_ENV !== "production" && e.some((s) => Ne(s) || !D9(s));
  t.push("["), n && t.indent(), zc(e, t, n), n && t.deindent(), t.push("]");
}
function zc(e, t, n = !1, s = !0) {
  const { push: o, newline: i } = t;
  for (let r = 0; r < e.length; r++) {
    const a = e[r];
    We(a) ? o(
      a,
      -3
      /* Unknown */
    ) : Ne(a) ? ug(a, t) : zn(a, t), r < e.length - 1 && (n ? (s && o(","), i()) : s && o(", "));
  }
}
function zn(e, t) {
  if (We(e)) {
    t.push(
      e,
      -3
      /* Unknown */
    );
    return;
  }
  if (ns(e)) {
    t.push(t.helper(e));
    return;
  }
  switch (e.type) {
    case 1:
    case 9:
    case 11:
      Oe.NODE_ENV !== "production" && ym(
        e.codegenNode != null,
        "Codegen node is missing for element/if/for node. Apply appropriate transforms first."
      ), zn(e.codegenNode, t);
      break;
    case 2:
      I9(e, t);
      break;
    case 4:
      Zw(e, t);
      break;
    case 5:
      R9(e, t);
      break;
    case 12:
      zn(e.codegenNode, t);
      break;
    case 8:
      eN(e, t);
      break;
    case 3:
      M9(e, t);
      break;
    case 13:
      P9(e, t);
      break;
    case 14:
      L9(e, t);
      break;
    case 15:
      F9(e, t);
      break;
    case 17:
      U9(e, t);
      break;
    case 18:
      j9(e, t);
      break;
    case 19:
      B9(e, t);
      break;
    case 20:
      H9(e, t);
      break;
    case 21:
      zc(e.body, t, !0, !1);
      break;
    // SSR only types
    case 22:
      break;
    case 23:
      break;
    case 24:
      break;
    case 25:
      break;
    case 26:
      break;
    /* v8 ignore start */
    case 10:
      break;
    default:
      if (Oe.NODE_ENV !== "production")
        return ym(!1, `unhandled codegen node type: ${e.type}`), e;
  }
}
function I9(e, t) {
  t.push(JSON.stringify(e.content), -3, e);
}
function Zw(e, t) {
  const { content: n, isStatic: s } = e;
  t.push(
    s ? JSON.stringify(n) : n,
    -3,
    e
  );
}
function R9(e, t) {
  const { push: n, helper: s, pure: o } = t;
  o && n(ap), n(`${s(Yc)}(`), zn(e.content, t), n(")");
}
function eN(e, t) {
  for (let n = 0; n < e.children.length; n++) {
    const s = e.children[n];
    We(s) ? t.push(
      s,
      -3
      /* Unknown */
    ) : zn(s, t);
  }
}
function A9(e, t) {
  const { push: n } = t;
  if (e.type === 8)
    n("["), eN(e, t), n("]");
  else if (e.isStatic) {
    const s = Wc(e.content) ? e.content : JSON.stringify(e.content);
    n(s, -2, e);
  } else
    n(`[${e.content}]`, -3, e);
}
function M9(e, t) {
  const { push: n, helper: s, pure: o } = t;
  o && n(ap), n(
    `${s(tl)}(${JSON.stringify(e.content)})`,
    -3,
    e
  );
}
function P9(e, t) {
  const { push: n, helper: s, pure: o } = t, {
    tag: i,
    props: r,
    children: a,
    patchFlag: l,
    dynamicProps: c,
    directives: d,
    isBlock: f,
    disableTracking: p,
    isComponent: h
  } = e;
  let m;
  if (l)
    if (Oe.NODE_ENV !== "production")
      if (l < 0)
        m = l + ` /* ${kl[l]} */`;
      else {
        const g = Object.keys(kl).map(Number).filter((_) => _ > 0 && l & _).map((_) => kl[_]).join(", ");
        m = l + ` /* ${g} */`;
      }
    else
      m = String(l);
  d && n(s(Zf) + "("), f && n(`(${s(Kr)}(${p ? "true" : ""}), `), o && n(ap);
  const v = f ? Li(t.inSSR, h) : Vi(t.inSSR, h);
  n(s(v) + "(", -2, e), zc(
    V9([i, r, a, m, c]),
    t
  ), n(")"), f && n(")"), d && (n(", "), zn(d, t), n(")"));
}
function V9(e) {
  let t = e.length;
  for (; t-- && e[t] == null; )
    ;
  return e.slice(0, t + 1).map((n) => n || "null");
}
function L9(e, t) {
  const { push: n, helper: s, pure: o } = t, i = We(e.callee) ? e.callee : s(e.callee);
  o && n(ap), n(i + "(", -2, e), zc(e.arguments, t), n(")");
}
function F9(e, t) {
  const { push: n, indent: s, deindent: o, newline: i } = t, { properties: r } = e;
  if (!r.length) {
    n("{}", -2, e);
    return;
  }
  const a = r.length > 1 || Oe.NODE_ENV !== "production" && r.some((l) => l.value.type !== 4);
  n(a ? "{" : "{ "), a && s();
  for (let l = 0; l < r.length; l++) {
    const { key: c, value: d } = r[l];
    A9(c, t), n(": "), zn(d, t), l < r.length - 1 && (n(","), i());
  }
  a && o(), n(a ? "}" : " }");
}
function U9(e, t) {
  ug(e.elements, t);
}
function j9(e, t) {
  const { push: n, indent: s, deindent: o } = t, { params: i, returns: r, body: a, newline: l, isSlot: c } = e;
  c && n(`_${Mi[op]}(`), n("(", -2, e), Ne(i) ? zc(i, t) : i && zn(i, t), n(") => "), (l || a) && (n("{"), s()), r ? (l && n("return "), Ne(r) ? ug(r, t) : zn(r, t)) : a && zn(a, t), (l || a) && (o(), n("}")), c && (e.isNonScopedSlot && n(", undefined, true"), n(")"));
}
function B9(e, t) {
  const { test: n, consequent: s, alternate: o, newline: i } = e, { push: r, indent: a, deindent: l, newline: c } = t;
  if (n.type === 4) {
    const f = !Wc(n.content);
    f && r("("), Zw(n, t), f && r(")");
  } else
    r("("), zn(n, t), r(")");
  i && a(), t.indentLevel++, i || r(" "), r("? "), zn(s, t), t.indentLevel--, i && c(), i || r(" "), r(": ");
  const d = o.type === 19;
  d || t.indentLevel++, zn(o, t), d || t.indentLevel--, i && l(
    !0
    /* without newline */
  );
}
function H9(e, t) {
  const { push: n, helper: s, indent: o, deindent: i, newline: r } = t, { needPauseTracking: a, needArraySpread: l } = e;
  l && n("[...("), n(`_cache[${e.index}] || (`), a && (o(), n(`${s(yc)}(-1`), e.inVOnce && n(", true"), n("),"), r(), n("(")), n(`_cache[${e.index}] = `), zn(e.value, t), a && (n(`).cacheIndex = ${e.index},`), r(), n(`${s(yc)}(1),`), r(), n(`_cache[${e.index}]`), i()), n(")"), l && n(")]");
}
const Y9 = new RegExp(
  "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b"
), W9 = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
function hi(e, t, n = !1, s = !1) {
  const o = e.content;
  if (o.trim())
    try {
      new Function(
        s ? ` ${o} ` : `return ${n ? `(${o}) => {}` : `(${o})`}`
      );
    } catch (i) {
      let r = i.message;
      const a = o.replace(W9, "").match(Y9);
      a && (r = `avoid using JavaScript keyword as property name: "${a[0]}"`), t.onError(
        At(
          45,
          e.loc,
          void 0,
          r
        )
      );
    }
}
const tN = (e, t) => {
  if (e.type === 5)
    e.content = td(
      e.content,
      t
    );
  else if (e.type === 1) {
    const n = jn(e, "memo");
    for (let s = 0; s < e.props.length; s++) {
      const o = e.props[s];
      if (o.type === 7 && o.name !== "for") {
        const i = o.exp, r = o.arg;
        i && i.type === 4 && !(o.name === "on" && r) && // key has been processed in transformFor(vMemo + vFor)
        !(n && r && r.type === 4 && r.content === "key") && (o.exp = td(
          i,
          t,
          // slot args must be processed as function params
          o.name === "slot"
        )), r && r.type === 4 && !r.isStatic && (o.arg = td(r, t));
      }
    }
  }
};
function td(e, t, n = !1, s = !1, o = Object.create(t.identifiers)) {
  return Oe.NODE_ENV !== "production" && hi(e, t, n, s), e;
}
function nN(e) {
  return We(e) ? e : e.type === 4 ? e.content : e.children.map(nN).join("");
}
const G9 = cg(
  /^(if|else|else-if)$/,
  (e, t, n) => sN(e, t, n, (s, o, i) => {
    const r = n.parent.children;
    let a = r.indexOf(s), l = 0;
    for (; a-- >= 0; ) {
      const c = r[a];
      c && c.type === 9 && (l += c.branches.length);
    }
    return () => {
      if (i)
        s.codegenNode = W_(
          o,
          l,
          n
        );
      else {
        const c = K9(s.codegenNode);
        c.alternate = W_(
          o,
          l + s.branches.length - 1,
          n
        );
      }
    };
  })
);
function sN(e, t, n, s) {
  if (t.name !== "else" && (!t.exp || !t.exp.content.trim())) {
    const o = t.exp ? t.exp.loc : e.loc;
    n.onError(
      At(28, t.loc)
    ), t.exp = nt("true", !1, o);
  }
  if (Oe.NODE_ENV !== "production" && t.exp && hi(t.exp, n), t.name === "if") {
    const o = Y_(e, t), i = {
      type: 9,
      loc: E9(e.loc),
      branches: [o]
    };
    if (n.replaceNode(i), s)
      return s(i, o, !0);
  } else {
    const o = n.parent.children, i = [];
    let r = o.indexOf(e);
    for (; r-- >= -1; ) {
      const a = o[r];
      if (a && a.type === 3) {
        n.removeNode(a), Oe.NODE_ENV !== "production" && i.unshift(a);
        continue;
      }
      if (a && a.type === 2 && !a.content.trim().length) {
        n.removeNode(a);
        continue;
      }
      if (a && a.type === 9) {
        t.name === "else-if" && a.branches[a.branches.length - 1].condition === void 0 && n.onError(
          At(30, e.loc)
        ), n.removeNode();
        const l = Y_(e, t);
        if (Oe.NODE_ENV !== "production" && i.length && // #3619 ignore comments if the v-if is direct child of <transition>
        !(n.parent && n.parent.type === 1 && (n.parent.tag === "transition" || n.parent.tag === "Transition")) && (l.children = [...i, ...l.children]), Oe.NODE_ENV !== "production") {
          const d = l.userKey;
          d && a.branches.forEach(({ userKey: f }) => {
            z9(f, d) && n.onError(
              At(
                29,
                l.userKey.loc
              )
            );
          });
        }
        a.branches.push(l);
        const c = s && s(a, l, !1);
        Gc(l, n), c && c(), n.currentNode = null;
      } else
        n.onError(
          At(30, e.loc)
        );
      break;
    }
  }
}
function Y_(e, t) {
  const n = e.tagType === 3;
  return {
    type: 10,
    loc: e.loc,
    condition: t.name === "else" ? void 0 : t.exp,
    children: n && !jn(e, "for") ? e.children : [e],
    userKey: La(e, "key"),
    isTemplateIf: n
  };
}
function W_(e, t, n) {
  return e.condition ? Ld(
    e.condition,
    G_(e, t, n),
    // make sure to pass in asBlock: true so that the comment node call
    // closes the current block.
    yn(n.helper(tl), [
      Oe.NODE_ENV !== "production" ? '"v-if"' : '""',
      "true"
    ])
  ) : G_(e, t, n);
}
function G_(e, t, n) {
  const { helper: s } = n, o = ln(
    "key",
    nt(
      `${t}`,
      !1,
      Tn,
      2
    )
  ), { children: i } = e, r = i[0];
  if (i.length !== 1 || r.type !== 1)
    if (i.length === 1 && r.type === 11) {
      const l = r.codegenNode;
      return Ec(l, o, n), l;
    } else {
      let l = 64;
      return Oe.NODE_ENV !== "production" && !e.isTemplateIf && i.filter((c) => c.type !== 3).length === 1 && (l |= 2048), Va(
        n,
        s(Ma),
        _s([o]),
        i,
        l,
        void 0,
        void 0,
        !0,
        !1,
        !1,
        e.loc
      );
    }
  else {
    const l = r.codegenNode, c = Fw(l);
    return c.type === 13 && ip(c, n), Ec(c, o, n), l;
  }
}
function z9(e, t) {
  if (!e || e.type !== t.type)
    return !1;
  if (e.type === 6) {
    if (e.value.content !== t.value.content)
      return !1;
  } else {
    const n = e.exp, s = t.exp;
    if (n.type !== s.type || n.type !== 4 || n.isStatic !== s.isStatic || n.content !== s.content)
      return !1;
  }
  return !0;
}
function K9(e) {
  for (; ; )
    if (e.type === 19)
      if (e.alternate.type === 19)
        e = e.alternate;
      else
        return e;
    else e.type === 20 && (e = e.value);
}
const oN = (e, t, n) => {
  const { modifiers: s, loc: o } = e, i = e.arg;
  let { exp: r } = e;
  if (r && r.type === 4 && !r.content.trim() && (r = void 0), !r) {
    if (i.type !== 4 || !i.isStatic)
      return n.onError(
        At(
          52,
          i.loc
        )
      ), {
        props: [
          ln(i, nt("", !0, o))
        ]
      };
    rN(e), r = e.exp;
  }
  return i.type !== 4 ? (i.children.unshift("("), i.children.push(') || ""')) : i.isStatic || (i.content = `${i.content} || ""`), s.some((a) => a.content === "camel") && (i.type === 4 ? i.isStatic ? i.content = Lt(i.content) : i.content = `${n.helperString(Pd)}(${i.content})` : (i.children.unshift(`${n.helperString(Pd)}(`), i.children.push(")"))), n.inSSR || (s.some((a) => a.content === "prop") && z_(i, "."), s.some((a) => a.content === "attr") && z_(i, "^")), {
    props: [ln(i, r)]
  };
}, rN = (e, t) => {
  const n = e.arg, s = Lt(n.content);
  e.exp = nt(s, !1, n.loc);
}, z_ = (e, t) => {
  e.type === 4 ? e.isStatic ? e.content = t + e.content : e.content = `\`${t}\${${e.content}}\`` : (e.children.unshift(`'${t}' + (`), e.children.push(")"));
}, X9 = cg(
  "for",
  (e, t, n) => {
    const { helper: s, removeHelper: o } = n;
    return iN(e, t, n, (i) => {
      const r = yn(s(ep), [
        i.source
      ]), a = Fa(e), l = jn(e, "memo"), c = La(e, "key", !1, !0);
      c && c.type === 7 && !c.exp && rN(c);
      let f = c && (c.type === 6 ? c.value ? nt(c.value.content, !0) : void 0 : c.exp);
      const p = c && f ? ln("key", f) : null, h = i.source.type === 4 && i.source.constType > 0, m = h ? 64 : c ? 128 : 256;
      return i.codegenNode = Va(
        n,
        s(Ma),
        void 0,
        r,
        m,
        void 0,
        void 0,
        !0,
        !h,
        !1,
        e.loc
      ), () => {
        let v;
        const { children: g } = i;
        Oe.NODE_ENV !== "production" && a && e.children.some((b) => {
          if (b.type === 1) {
            const O = La(b, "key");
            if (O)
              return n.onError(
                At(
                  33,
                  O.loc
                )
              ), !0;
          }
        });
        const _ = g.length !== 1 || g[0].type !== 1, S = bc(e) ? e : a && e.children.length === 1 && bc(e.children[0]) ? e.children[0] : null;
        if (S ? (v = S.codegenNode, a && p && Ec(v, p, n)) : _ ? v = Va(
          n,
          s(Ma),
          p ? _s([p]) : void 0,
          e.children,
          64,
          void 0,
          void 0,
          !0,
          void 0,
          !1
        ) : (v = g[0].codegenNode, a && p && Ec(v, p, n), v.isBlock !== !h && (v.isBlock ? (o(Kr), o(
          Li(n.inSSR, v.isComponent)
        )) : o(
          Vi(n.inSSR, v.isComponent)
        )), v.isBlock = !h, v.isBlock ? (s(Kr), s(Li(n.inSSR, v.isComponent))) : s(Vi(n.inSSR, v.isComponent))), l) {
          const b = Pi(
            Ud(i.parseResult, [
              nt("_cached")
            ])
          );
          b.body = xw([
            As(["const _memo = (", l.exp, ")"]),
            As([
              "if (_cached",
              ...f ? [" && _cached.key === ", f] : [],
              ` && ${n.helperString(
                ng
              )}(_cached, _memo)) return _cached`
            ]),
            As(["const _item = ", v]),
            nt("_item.memo = _memo"),
            nt("return _item")
          ]), r.arguments.push(
            b,
            nt("_cache"),
            nt(String(n.cached.length))
          ), n.cached.push(null);
        } else
          r.arguments.push(
            Pi(
              Ud(i.parseResult),
              v,
              !0
            )
          );
      };
    });
  }
);
function iN(e, t, n, s) {
  if (!t.exp) {
    n.onError(
      At(31, t.loc)
    );
    return;
  }
  const o = t.forParseResult;
  if (!o) {
    n.onError(
      At(32, t.loc)
    );
    return;
  }
  dg(o, n);
  const { addIdentifiers: i, removeIdentifiers: r, scopes: a } = n, { source: l, value: c, key: d, index: f } = o, p = {
    type: 11,
    loc: t.loc,
    source: l,
    valueAlias: c,
    keyAlias: d,
    objectIndexAlias: f,
    parseResult: o,
    children: Fa(e) ? e.children : [e]
  };
  n.replaceNode(p), a.vFor++;
  const h = s && s(p);
  return () => {
    a.vFor--, h && h();
  };
}
function dg(e, t) {
  e.finalized || (Oe.NODE_ENV !== "production" && (hi(e.source, t), e.key && hi(
    e.key,
    t,
    !0
  ), e.index && hi(
    e.index,
    t,
    !0
  ), e.value && hi(
    e.value,
    t,
    !0
  )), e.finalized = !0);
}
function Ud({ value: e, key: t, index: n }, s = []) {
  return q9([e, t, n, ...s]);
}
function q9(e) {
  let t = e.length;
  for (; t-- && !e[t]; )
    ;
  return e.slice(0, t + 1).map((n, s) => n || nt("_".repeat(s + 1), !1));
}
const K_ = nt("undefined", !1), aN = (e, t) => {
  if (e.type === 1 && (e.tagType === 1 || e.tagType === 3)) {
    const n = jn(e, "slot");
    if (n)
      return n.exp, t.scopes.vSlot++, () => {
        t.scopes.vSlot--;
      };
  }
}, J9 = (e, t) => {
  let n;
  if (Fa(e) && e.props.some(ig) && (n = jn(e, "for"))) {
    const s = n.forParseResult;
    if (s) {
      dg(s, t);
      const { value: o, key: i, index: r } = s, { addIdentifiers: a, removeIdentifiers: l } = t;
      return o && a(o), i && a(i), r && a(r), () => {
        o && l(o), i && l(i), r && l(r);
      };
    }
  }
}, Q9 = (e, t, n, s) => Pi(
  e,
  n,
  !1,
  !0,
  n.length ? n[0].loc : s
);
function lN(e, t, n = Q9) {
  t.helper(op);
  const { children: s, loc: o } = e, i = [], r = [];
  let a = t.scopes.vSlot > 0 || t.scopes.vFor > 0;
  const l = jn(e, "slot", !0);
  if (l) {
    const { arg: g, exp: _ } = l;
    g && !ts(g) && (a = !0), i.push(
      ln(
        g || nt("default", !0),
        n(_, void 0, s, o)
      )
    );
  }
  let c = !1, d = !1;
  const f = [], p = /* @__PURE__ */ new Set();
  let h = 0;
  for (let g = 0; g < s.length; g++) {
    const _ = s[g];
    let S;
    if (!Fa(_) || !(S = jn(_, "slot", !0))) {
      _.type !== 3 && f.push(_);
      continue;
    }
    if (l) {
      t.onError(
        At(37, S.loc)
      );
      break;
    }
    c = !0;
    const { children: b, loc: O } = _, {
      arg: w = nt("default", !0),
      exp: N,
      loc: C
    } = S;
    let k;
    ts(w) ? k = w ? w.content : "default" : a = !0;
    const x = jn(_, "for"), $ = n(N, x, b, O);
    let M, R;
    if (M = jn(_, "if"))
      a = !0, r.push(
        Ld(
          M.exp,
          bu(w, $, h++),
          K_
        )
      );
    else if (R = jn(
      _,
      /^else(-if)?$/,
      !0
      /* allowEmpty */
    )) {
      let V = g, j;
      for (; V-- && (j = s[V], j.type === 3); )
        ;
      if (j && Fa(j) && jn(j, /^(else-)?if$/)) {
        let U = r[r.length - 1];
        for (; U.alternate.type === 19; )
          U = U.alternate;
        U.alternate = R.exp ? Ld(
          R.exp,
          bu(
            w,
            $,
            h++
          ),
          K_
        ) : bu(w, $, h++);
      } else
        t.onError(
          At(30, R.loc)
        );
    } else if (x) {
      a = !0;
      const V = x.forParseResult;
      V ? (dg(V, t), r.push(
        yn(t.helper(ep), [
          V.source,
          Pi(
            Ud(V),
            bu(w, $),
            !0
          )
        ])
      )) : t.onError(
        At(
          32,
          x.loc
        )
      );
    } else {
      if (k) {
        if (p.has(k)) {
          t.onError(
            At(
              38,
              C
            )
          );
          continue;
        }
        p.add(k), k === "default" && (d = !0);
      }
      i.push(ln(w, $));
    }
  }
  if (!l) {
    const g = (_, S) => {
      const b = n(_, void 0, S, o);
      return t.compatConfig && (b.isNonScopedSlot = !0), ln("default", b);
    };
    c ? f.length && // #3766
    // with whitespace: 'preserve', whitespaces between slots will end up in
    // implicitDefaultChildren. Ignore if all implicit children are whitespaces.
    f.some((_) => cN(_)) && (d ? t.onError(
      At(
        39,
        f[0].loc
      )
    ) : i.push(
      g(void 0, f)
    )) : i.push(g(void 0, s));
  }
  const m = a ? 2 : nd(e.children) ? 3 : 1;
  let v = _s(
    i.concat(
      ln(
        "_",
        // 2 = compiled but dynamic = can skip normalization, but must run diff
        // 1 = compiled and static = can skip normalization AND diff as optimized
        nt(
          m + (Oe.NODE_ENV !== "production" ? ` /* ${Ab[m]} */` : ""),
          !1
        )
      )
    ),
    o
  );
  return r.length && (v = yn(t.helper(tg), [
    v,
    Br(r)
  ])), {
    slots: v,
    hasDynamicSlots: a
  };
}
function bu(e, t, n) {
  const s = [
    ln("name", e),
    ln("fn", t)
  ];
  return n != null && s.push(
    ln("key", nt(String(n), !0))
  ), _s(s);
}
function nd(e) {
  for (let t = 0; t < e.length; t++) {
    const n = e[t];
    switch (n.type) {
      case 1:
        if (n.tagType === 2 || nd(n.children))
          return !0;
        break;
      case 9:
        if (nd(n.branches)) return !0;
        break;
      case 10:
      case 11:
        if (nd(n.children)) return !0;
        break;
    }
  }
  return !1;
}
function cN(e) {
  return e.type !== 2 && e.type !== 12 ? !0 : e.type === 2 ? !!e.content.trim() : cN(e.content);
}
const uN = /* @__PURE__ */ new WeakMap(), dN = (e, t) => function() {
  if (e = t.currentNode, !(e.type === 1 && (e.tagType === 0 || e.tagType === 1)))
    return;
  const { tag: s, props: o } = e, i = e.tagType === 1;
  let r = i ? fN(e, t) : `"${s}"`;
  const a = ft(r) && r.callee === qf;
  let l, c, d = 0, f, p, h, m = (
    // dynamic component may resolve to plain elements
    a || r === Na || r === Wf || !i && // <svg> and <foreignObject> must be forced into blocks so that block
    // updates inside get proper isSVG flag at runtime. (#639, #643)
    // This is technically web-specific, but splitting the logic out of core
    // leads to too much unnecessary complexity.
    (s === "svg" || s === "foreignObject" || s === "math")
  );
  if (o.length > 0) {
    const v = fg(
      e,
      t,
      void 0,
      i,
      a
    );
    l = v.props, d = v.patchFlag, p = v.dynamicPropNames;
    const g = v.directives;
    h = g && g.length ? Br(
      g.map((_) => pN(_, t))
    ) : void 0, v.shouldUseBlock && (m = !0);
  }
  if (e.children.length > 0)
    if (r === vc && (m = !0, d |= 1024, Oe.NODE_ENV !== "production" && e.children.length > 1 && t.onError(
      At(46, {
        start: e.children[0].loc.start,
        end: e.children[e.children.length - 1].loc.end,
        source: ""
      })
    )), i && // Teleport is not a real component and has dedicated runtime handling
    r !== Na && // explained above.
    r !== vc) {
      const { slots: g, hasDynamicSlots: _ } = lN(e, t);
      c = g, _ && (d |= 1024);
    } else if (e.children.length === 1 && r !== Na) {
      const g = e.children[0], _ = g.type, S = _ === 5 || _ === 8;
      S && ds(g, t) === 0 && (d |= 1), S || _ === 2 ? c = g : c = e.children;
    } else
      c = e.children;
  p && p.length && (f = eW(p)), e.codegenNode = Va(
    t,
    r,
    l,
    c,
    d === 0 ? void 0 : d,
    f,
    h,
    !!m,
    !1,
    i,
    e.loc
  );
};
function fN(e, t, n = !1) {
  let { tag: s } = e;
  const o = Em(s), i = La(
    e,
    "is",
    !1,
    !0
    /* allow empty */
  );
  if (i)
    if (o || Hr(
      "COMPILER_IS_ON_ELEMENT",
      t
    )) {
      let a;
      if (i.type === 6 ? a = i.value && nt(i.value.content, !0) : (a = i.exp, a || (a = nt("is", !1, i.arg.loc))), a)
        return yn(t.helper(qf), [
          a
        ]);
    } else i.type === 6 && i.value.content.startsWith("vue:") && (s = i.value.content.slice(4));
  const r = og(s) || t.isBuiltInComponent(s);
  return r ? (n || t.helper(r), r) : (t.helper(Xf), t.components.add(s), Ua(s, "component"));
}
function fg(e, t, n = e.props, s, o, i = !1) {
  const { tag: r, loc: a, children: l } = e;
  let c = [];
  const d = [], f = [], p = l.length > 0;
  let h = !1, m = 0, v = !1, g = !1, _ = !1, S = !1, b = !1, O = !1;
  const w = [], N = ($) => {
    c.length && (d.push(
      _s(X_(c), a)
    ), c = []), $ && d.push($);
  }, C = () => {
    t.scopes.vFor > 0 && c.push(
      ln(
        nt("ref_for", !0),
        nt("true")
      )
    );
  }, k = ({ key: $, value: M }) => {
    if (ts($)) {
      const R = $.content, V = wo(R);
      if (V && (!s || o) && // omit the flag for click handlers because hydration gives click
      // dedicated fast path.
      R.toLowerCase() !== "onclick" && // omit v-model handlers
      R !== "onUpdate:modelValue" && // omit onVnodeXXX hooks
      !Zo(R) && (S = !0), V && Zo(R) && (O = !0), V && M.type === 14 && (M = M.arguments[0]), M.type === 20 || (M.type === 4 || M.type === 8) && ds(M, t) > 0)
        return;
      R === "ref" ? v = !0 : R === "class" ? g = !0 : R === "style" ? _ = !0 : R !== "key" && !w.includes(R) && w.push(R), s && (R === "class" || R === "style") && !w.includes(R) && w.push(R);
    } else
      b = !0;
  };
  for (let $ = 0; $ < n.length; $++) {
    const M = n[$];
    if (M.type === 6) {
      const { loc: R, name: V, nameLoc: j, value: U } = M;
      let A = !0;
      if (V === "ref" && (v = !0, C()), V === "is" && (Em(r) || U && U.content.startsWith("vue:") || Hr(
        "COMPILER_IS_ON_ELEMENT",
        t
      )))
        continue;
      c.push(
        ln(
          nt(V, !0, j),
          nt(
            U ? U.content : "",
            A,
            U ? U.loc : R
          )
        )
      );
    } else {
      const { name: R, arg: V, exp: j, loc: U, modifiers: A } = M, G = R === "bind", X = R === "on";
      if (R === "slot") {
        s || t.onError(
          At(40, U)
        );
        continue;
      }
      if (R === "once" || R === "memo" || R === "is" || G && Qo(V, "is") && (Em(r) || Hr(
        "COMPILER_IS_ON_ELEMENT",
        t
      )) || X && i)
        continue;
      if (
        // #938: elements with dynamic keys should be forced into blocks
        (G && Qo(V, "key") || // inline before-update hooks need to force block so that it is invoked
        // before children
        X && p && Qo(V, "vue:before-update")) && (h = !0), G && Qo(V, "ref") && C(), !V && (G || X)
      ) {
        if (b = !0, j)
          if (G) {
            if (C(), N(), Oe.NODE_ENV !== "production" && d.some((Ge) => Ge.type === 15 ? Ge.properties.some(({ key: Ye }) => Ye.type !== 4 || !Ye.isStatic ? !0 : Ye.content !== "class" && Ye.content !== "style" && !wo(Ye.content)) : !0) && Fi(
              "COMPILER_V_BIND_OBJECT_ORDER",
              t,
              U
            ), Hr(
              "COMPILER_V_BIND_OBJECT_ORDER",
              t
            )) {
              d.unshift(j);
              continue;
            }
            d.push(j);
          } else
            N({
              type: 14,
              loc: U,
              callee: t.helper(sp),
              arguments: s ? [j] : [j, "true"]
            });
        else
          t.onError(
            At(
              G ? 34 : 35,
              U
            )
          );
        continue;
      }
      G && A.some(($e) => $e.content === "prop") && (m |= 32);
      const te = t.directiveTransforms[R];
      if (te) {
        const { props: $e, needRuntime: Ge } = te(M, e, t);
        !i && $e.forEach(k), X && V && !ts(V) ? N(_s($e, a)) : c.push(...$e), Ge && (f.push(M), ns(Ge) && uN.set(M, Ge));
      } else Dm(R) || (f.push(M), p && (h = !0));
    }
  }
  let x;
  if (d.length ? (N(), d.length > 1 ? x = yn(
    t.helper(gc),
    d,
    a
  ) : x = d[0]) : c.length && (x = _s(
    X_(c),
    a
  )), b ? m |= 16 : (g && !s && (m |= 2), _ && !s && (m |= 4), w.length && (m |= 8), S && (m |= 32)), !h && (m === 0 || m === 32) && (v || O || f.length > 0) && (m |= 512), !t.inSSR && x)
    switch (x.type) {
      case 15:
        let $ = -1, M = -1, R = !1;
        for (let U = 0; U < x.properties.length; U++) {
          const A = x.properties[U].key;
          ts(A) ? A.content === "class" ? $ = U : A.content === "style" && (M = U) : A.isHandlerKey || (R = !0);
        }
        const V = x.properties[$], j = x.properties[M];
        R ? x = yn(
          t.helper(Pa),
          [x]
        ) : (V && !ts(V.value) && (V.value = yn(
          t.helper(tp),
          [V.value]
        )), j && // the static style is compiled into an object,
        // so use `hasStyleBinding` to ensure that it is a dynamic style binding
        (_ || j.value.type === 4 && j.value.content.trim()[0] === "[" || // v-bind:style and style both exist,
        // v-bind:style with static literal object
        j.value.type === 17) && (j.value = yn(
          t.helper(np),
          [j.value]
        )));
        break;
      case 14:
        break;
      default:
        x = yn(
          t.helper(Pa),
          [
            yn(t.helper(nl), [
              x
            ])
          ]
        );
        break;
    }
  return {
    props: x,
    directives: f,
    patchFlag: m,
    dynamicPropNames: w,
    shouldUseBlock: h
  };
}
function X_(e) {
  const t = /* @__PURE__ */ new Map(), n = [];
  for (let s = 0; s < e.length; s++) {
    const o = e[s];
    if (o.key.type === 8 || !o.key.isStatic) {
      n.push(o);
      continue;
    }
    const i = o.key.content, r = t.get(i);
    r ? (i === "style" || i === "class" || wo(i)) && Z9(r, o) : (t.set(i, o), n.push(o));
  }
  return n;
}
function Z9(e, t) {
  e.value.type === 17 ? e.value.elements.push(t.value) : e.value = Br(
    [e.value, t.value],
    e.loc
  );
}
function pN(e, t) {
  const n = [], s = uN.get(e);
  s ? n.push(t.helperString(s)) : (t.helper(Jf), t.directives.add(e.name), n.push(Ua(e.name, "directive")));
  const { loc: o } = e;
  if (e.exp && n.push(e.exp), e.arg && (e.exp || n.push("void 0"), n.push(e.arg)), Object.keys(e.modifiers).length) {
    e.arg || (e.exp || n.push("void 0"), n.push("void 0"));
    const i = nt("true", !1, o);
    n.push(
      _s(
        e.modifiers.map(
          (r) => ln(r, i)
        ),
        o
      )
    );
  }
  return Br(n, e.loc);
}
function eW(e) {
  let t = "[";
  for (let n = 0, s = e.length; n < s; n++)
    t += JSON.stringify(e[n]), n < s - 1 && (t += ", ");
  return t + "]";
}
function Em(e) {
  return e === "component" || e === "Component";
}
const tW = (e, t) => {
  if (bc(e)) {
    const { children: n, loc: s } = e, { slotName: o, slotProps: i } = hN(e, t), r = [
      t.prefixIdentifiers ? "_ctx.$slots" : "$slots",
      o,
      "{}",
      "undefined",
      "true"
    ];
    let a = 2;
    i && (r[2] = i, a = 3), n.length && (r[3] = Pi([], n, !1, !1, s), a = 4), t.scopeId && !t.slotted && (a = 5), r.splice(a), e.codegenNode = yn(
      t.helper(eg),
      r,
      s
    );
  }
};
function hN(e, t) {
  let n = '"default"', s;
  const o = [];
  for (let i = 0; i < e.props.length; i++) {
    const r = e.props[i];
    if (r.type === 6)
      r.value && (r.name === "name" ? n = JSON.stringify(r.value.content) : (r.name = Lt(r.name), o.push(r)));
    else if (r.name === "bind" && Qo(r.arg, "name")) {
      if (r.exp)
        n = r.exp;
      else if (r.arg && r.arg.type === 4) {
        const a = Lt(r.arg.content);
        n = r.exp = nt(a, !1, r.arg.loc);
      }
    } else
      r.name === "bind" && r.arg && ts(r.arg) && (r.arg.content = Lt(r.arg.content)), o.push(r);
  }
  if (o.length > 0) {
    const { props: i, directives: r } = fg(
      e,
      t,
      o,
      !1,
      !1
    );
    s = i, r.length && t.onError(
      At(
        36,
        r[0].loc
      )
    );
  }
  return {
    slotName: n,
    slotProps: s
  };
}
const pg = (e, t, n, s) => {
  const { loc: o, modifiers: i, arg: r } = e;
  !e.exp && !i.length && n.onError(At(35, o));
  let a;
  if (r.type === 4)
    if (r.isStatic) {
      let f = r.content;
      Oe.NODE_ENV !== "production" && f.startsWith("vnode") && n.onError(At(51, r.loc)), f.startsWith("vue:") && (f = `vnode-${f.slice(4)}`);
      const p = t.tagType !== 0 || f.startsWith("vnode") || !/[A-Z]/.test(f) ? (
        // for non-element and vnode lifecycle event listeners, auto convert
        // it to camelCase. See issue #2249
        zs(Lt(f))
      ) : (
        // preserve case for plain element listeners that have uppercase
        // letters, as these may be custom elements' custom events
        `on:${f}`
      );
      a = nt(p, !0, r.loc);
    } else
      a = As([
        `${n.helperString(Vd)}(`,
        r,
        ")"
      ]);
  else
    a = r, a.children.unshift(`${n.helperString(Vd)}(`), a.children.push(")");
  let l = e.exp;
  l && !l.content.trim() && (l = void 0);
  let c = n.cacheHandlers && !l && !n.inVOnce;
  if (l) {
    const f = rg(l), p = !(f || Mw(l)), h = l.content.includes(";");
    Oe.NODE_ENV !== "production" && hi(
      l,
      n,
      !1,
      h
    ), (p || c && f) && (l = As([
      `${p ? "$event" : "(...args)"} => ${h ? "{" : "("}`,
      l,
      h ? "}" : ")"
    ]));
  }
  let d = {
    props: [
      ln(
        a,
        l || nt("() => {}", !1, o)
      )
    ]
  };
  return s && (d = s(d)), c && (d.props[0].value = n.cache(d.props[0].value)), d.props.forEach((f) => f.key.isHandlerKey = !0), d;
}, nW = (e, t) => {
  if (e.type === 0 || e.type === 1 || e.type === 11 || e.type === 10)
    return () => {
      const n = e.children;
      let s, o = !1;
      for (let i = 0; i < n.length; i++) {
        const r = n[i];
        if (Ju(r)) {
          o = !0;
          for (let a = i + 1; a < n.length; a++) {
            const l = n[a];
            if (Ju(l))
              s || (s = n[i] = As(
                [r],
                r.loc
              )), s.children.push(" + ", l), n.splice(a, 1), a--;
            else {
              s = void 0;
              break;
            }
          }
        }
      }
      if (!(!o || // if this is a plain element with a single text child, leave it
      // as-is since the runtime has dedicated fast path for this by directly
      // setting textContent of the element.
      // for component root it's always normalized anyway.
      n.length === 1 && (e.type === 0 || e.type === 1 && e.tagType === 0 && // #3756
      // custom directives can potentially add DOM elements arbitrarily,
      // we need to avoid setting textContent of the element at runtime
      // to avoid accidentally overwriting the DOM elements added
      // by the user through custom directives.
      !e.props.find(
        (i) => i.type === 7 && !t.directiveTransforms[i.name]
      ) && e.tag !== "template")))
        for (let i = 0; i < n.length; i++) {
          const r = n[i];
          if (Ju(r) || r.type === 8) {
            const a = [];
            (r.type !== 2 || r.content !== " ") && a.push(r), !t.ssr && ds(r, t) === 0 && a.push(
              1 + (Oe.NODE_ENV !== "production" ? ` /* ${kl[1]} */` : "")
            ), n[i] = {
              type: 12,
              content: r,
              loc: r.loc,
              codegenNode: yn(
                t.helper(Kf),
                a
              )
            };
          }
        }
    };
}, q_ = /* @__PURE__ */ new WeakSet(), sW = (e, t) => {
  if (e.type === 1 && jn(e, "once", !0))
    return q_.has(e) || t.inVOnce || t.inSSR ? void 0 : (q_.add(e), t.inVOnce = !0, t.helper(yc), () => {
      t.inVOnce = !1;
      const n = t.currentNode;
      n.codegenNode && (n.codegenNode = t.cache(
        n.codegenNode,
        !0,
        !0
      ));
    });
}, hg = (e, t, n) => {
  const { exp: s, arg: o } = e;
  if (!s)
    return n.onError(
      At(41, e.loc)
    ), Eu();
  const i = s.loc.source.trim(), r = s.type === 4 ? s.content : i, a = n.bindingMetadata[i];
  if (a === "props" || a === "props-aliased")
    return n.onError(At(44, s.loc)), Eu();
  if (!r.trim() || !rg(s))
    return n.onError(
      At(42, s.loc)
    ), Eu();
  const l = o || nt("modelValue", !0), c = o ? ts(o) ? `onUpdate:${Lt(o.content)}` : As(['"onUpdate:" + ', o]) : "onUpdate:modelValue";
  let d;
  const f = n.isTS ? "($event: any)" : "$event";
  d = As([
    `${f} => ((`,
    s,
    ") = $event)"
  ]);
  const p = [
    // modelValue: foo
    ln(l, e.exp),
    // "onUpdate:modelValue": $event => (foo = $event)
    ln(c, d)
  ];
  if (e.modifiers.length && t.tagType === 1) {
    const h = e.modifiers.map((v) => v.content).map((v) => (Wc(v) ? v : JSON.stringify(v)) + ": true").join(", "), m = o ? ts(o) ? `${o.content}Modifiers` : As([o, ' + "Modifiers"']) : "modelModifiers";
    p.push(
      ln(
        m,
        nt(
          `{ ${h} }`,
          !1,
          e.loc,
          2
        )
      )
    );
  }
  return Eu(p);
};
function Eu(e = []) {
  return { props: e };
}
const oW = /[\w).+\-_$\]]/, rW = (e, t) => {
  Hr("COMPILER_FILTERS", t) && (e.type === 5 ? jd(e.content, t) : e.type === 1 && e.props.forEach((n) => {
    n.type === 7 && n.name !== "for" && n.exp && jd(n.exp, t);
  }));
};
function jd(e, t) {
  if (e.type === 4)
    J_(e, t);
  else
    for (let n = 0; n < e.children.length; n++) {
      const s = e.children[n];
      typeof s == "object" && (s.type === 4 ? J_(s, t) : s.type === 8 ? jd(e, t) : s.type === 5 && jd(s.content, t));
    }
}
function J_(e, t) {
  const n = e.content;
  let s = !1, o = !1, i = !1, r = !1, a = 0, l = 0, c = 0, d = 0, f, p, h, m, v = [];
  for (h = 0; h < n.length; h++)
    if (p = f, f = n.charCodeAt(h), s)
      f === 39 && p !== 92 && (s = !1);
    else if (o)
      f === 34 && p !== 92 && (o = !1);
    else if (i)
      f === 96 && p !== 92 && (i = !1);
    else if (r)
      f === 47 && p !== 92 && (r = !1);
    else if (f === 124 && // pipe
    n.charCodeAt(h + 1) !== 124 && n.charCodeAt(h - 1) !== 124 && !a && !l && !c)
      m === void 0 ? (d = h + 1, m = n.slice(0, h).trim()) : g();
    else {
      switch (f) {
        case 34:
          o = !0;
          break;
        // "
        case 39:
          s = !0;
          break;
        // '
        case 96:
          i = !0;
          break;
        // `
        case 40:
          c++;
          break;
        // (
        case 41:
          c--;
          break;
        // )
        case 91:
          l++;
          break;
        // [
        case 93:
          l--;
          break;
        // ]
        case 123:
          a++;
          break;
        // {
        case 125:
          a--;
          break;
      }
      if (f === 47) {
        let _ = h - 1, S;
        for (; _ >= 0 && (S = n.charAt(_), S === " "); _--)
          ;
        (!S || !oW.test(S)) && (r = !0);
      }
    }
  m === void 0 ? m = n.slice(0, h).trim() : d !== 0 && g();
  function g() {
    v.push(n.slice(d, h).trim()), d = h + 1;
  }
  if (v.length) {
    for (Oe.NODE_ENV !== "production" && _c(
      "COMPILER_FILTERS",
      t,
      e.loc
    ), h = 0; h < v.length; h++)
      m = iW(m, v[h], t);
    e.content = m, e.ast = void 0;
  }
}
function iW(e, t, n) {
  n.helper(Qf);
  const s = t.indexOf("(");
  if (s < 0)
    return n.filters.add(t), `${Ua(t, "filter")}(${e})`;
  {
    const o = t.slice(0, s), i = t.slice(s + 1);
    return n.filters.add(o), `${Ua(o, "filter")}(${e}${i !== ")" ? "," + i : i}`;
  }
}
const Q_ = /* @__PURE__ */ new WeakSet(), aW = (e, t) => {
  if (e.type === 1) {
    const n = jn(e, "memo");
    return !n || Q_.has(e) ? void 0 : (Q_.add(e), () => {
      const s = e.codegenNode || t.currentNode.codegenNode;
      s && s.type === 13 && (e.tagType !== 1 && ip(s, t), e.codegenNode = yn(t.helper(rp), [
        n.exp,
        Pi(void 0, s),
        "_cache",
        String(t.cached.length)
      ]), t.cached.push(null));
    });
  }
};
function mN(e) {
  return [
    [
      sW,
      G9,
      aW,
      X9,
      rW,
      ...Oe.NODE_ENV !== "production" ? [tN] : [],
      tW,
      dN,
      aN,
      nW
    ],
    {
      on: pg,
      bind: oN,
      model: hg
    }
  ];
}
function vN(e, t = {}) {
  const n = t.onError || sg, s = t.mode === "module";
  t.prefixIdentifiers === !0 ? n(At(47)) : s && n(At(48));
  const o = !1;
  t.cacheHandlers && n(At(49)), t.scopeId && !s && n(At(50));
  const i = st({}, t, {
    prefixIdentifiers: o
  }), r = We(e) ? lg(e, i) : e, [a, l] = mN();
  return qw(
    r,
    st({}, i, {
      nodeTransforms: [
        ...a,
        ...t.nodeTransforms || []
        // user transforms
      ],
      directiveTransforms: st(
        {},
        l,
        t.directiveTransforms || {}
        // user transforms
      )
    })
  ), Qw(r, i);
}
const lW = {
  DATA: "data",
  PROPS: "props",
  PROPS_ALIASED: "props-aliased",
  SETUP_LET: "setup-let",
  SETUP_CONST: "setup-const",
  SETUP_REACTIVE_CONST: "setup-reactive-const",
  SETUP_MAYBE_REF: "setup-maybe-ref",
  SETUP_REF: "setup-ref",
  OPTIONS: "options",
  LITERAL_CONST: "literal-const"
}, gN = () => ({ props: [] });
var Kn = {};
const mg = Symbol(Kn.NODE_ENV !== "production" ? "vModelRadio" : ""), vg = Symbol(
  Kn.NODE_ENV !== "production" ? "vModelCheckbox" : ""
), gg = Symbol(Kn.NODE_ENV !== "production" ? "vModelText" : ""), yg = Symbol(
  Kn.NODE_ENV !== "production" ? "vModelSelect" : ""
), Bd = Symbol(
  Kn.NODE_ENV !== "production" ? "vModelDynamic" : ""
), _g = Symbol(
  Kn.NODE_ENV !== "production" ? "vOnModifiersGuard" : ""
), bg = Symbol(
  Kn.NODE_ENV !== "production" ? "vOnKeysGuard" : ""
), Eg = Symbol(Kn.NODE_ENV !== "production" ? "vShow" : ""), lp = Symbol(Kn.NODE_ENV !== "production" ? "Transition" : ""), Sg = Symbol(
  Kn.NODE_ENV !== "production" ? "TransitionGroup" : ""
);
ww({
  [mg]: "vModelRadio",
  [vg]: "vModelCheckbox",
  [gg]: "vModelText",
  [yg]: "vModelSelect",
  [Bd]: "vModelDynamic",
  [_g]: "withModifiers",
  [bg]: "withKeys",
  [Eg]: "vShow",
  [lp]: "Transition",
  [Sg]: "TransitionGroup"
});
let sa;
function cW(e, t = !1) {
  return sa || (sa = document.createElement("div")), t ? (sa.innerHTML = `<div foo="${e.replace(/"/g, "&quot;")}">`, sa.children[0].getAttribute("foo")) : (sa.innerHTML = e, sa.textContent);
}
const wg = {
  parseMode: "html",
  isVoidTag: Vb,
  isNativeTag: (e) => Am(e) || Mm(e) || Pm(e),
  isPreTag: (e) => e === "pre",
  isIgnoreNewlineTag: (e) => e === "pre" || e === "textarea",
  decodeEntities: cW,
  isBuiltInComponent: (e) => {
    if (e === "Transition" || e === "transition")
      return lp;
    if (e === "TransitionGroup" || e === "transition-group")
      return Sg;
  },
  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
  getNamespace(e, t, n) {
    let s = t ? t.ns : n;
    if (t && s === 2)
      if (t.tag === "annotation-xml") {
        if (e === "svg")
          return 1;
        t.props.some(
          (o) => o.type === 6 && o.name === "encoding" && o.value != null && (o.value.content === "text/html" || o.value.content === "application/xhtml+xml")
        ) && (s = 0);
      } else /^m(?:[ions]|text)$/.test(t.tag) && e !== "mglyph" && e !== "malignmark" && (s = 0);
    else t && s === 1 && (t.tag === "foreignObject" || t.tag === "desc" || t.tag === "title") && (s = 0);
    if (s === 0) {
      if (e === "svg")
        return 1;
      if (e === "math")
        return 2;
    }
    return s;
  }
}, yN = (e) => {
  e.type === 1 && e.props.forEach((t, n) => {
    t.type === 6 && t.name === "style" && t.value && (e.props[n] = {
      type: 7,
      name: "bind",
      arg: nt("style", !0, t.loc),
      exp: uW(t.value.content, t.loc),
      modifiers: [],
      loc: t.loc
    });
  });
}, uW = (e, t) => {
  const n = Rm(e);
  return nt(
    JSON.stringify(n),
    !1,
    t,
    3
  );
};
function Ds(e, t) {
  return At(
    e,
    t,
    Kn.NODE_ENV !== "production" ? _N : void 0
  );
}
const dW = {
  X_V_HTML_NO_EXPRESSION: 53,
  53: "X_V_HTML_NO_EXPRESSION",
  X_V_HTML_WITH_CHILDREN: 54,
  54: "X_V_HTML_WITH_CHILDREN",
  X_V_TEXT_NO_EXPRESSION: 55,
  55: "X_V_TEXT_NO_EXPRESSION",
  X_V_TEXT_WITH_CHILDREN: 56,
  56: "X_V_TEXT_WITH_CHILDREN",
  X_V_MODEL_ON_INVALID_ELEMENT: 57,
  57: "X_V_MODEL_ON_INVALID_ELEMENT",
  X_V_MODEL_ARG_ON_ELEMENT: 58,
  58: "X_V_MODEL_ARG_ON_ELEMENT",
  X_V_MODEL_ON_FILE_INPUT_ELEMENT: 59,
  59: "X_V_MODEL_ON_FILE_INPUT_ELEMENT",
  X_V_MODEL_UNNECESSARY_VALUE: 60,
  60: "X_V_MODEL_UNNECESSARY_VALUE",
  X_V_SHOW_NO_EXPRESSION: 61,
  61: "X_V_SHOW_NO_EXPRESSION",
  X_TRANSITION_INVALID_CHILDREN: 62,
  62: "X_TRANSITION_INVALID_CHILDREN",
  X_IGNORED_SIDE_EFFECT_TAG: 63,
  63: "X_IGNORED_SIDE_EFFECT_TAG",
  __EXTEND_POINT__: 64,
  64: "__EXTEND_POINT__"
}, _N = {
  53: "v-html is missing expression.",
  54: "v-html will override element children.",
  55: "v-text is missing expression.",
  56: "v-text will override element children.",
  57: "v-model can only be used on <input>, <textarea> and <select> elements.",
  58: "v-model argument is not supported on plain elements.",
  59: "v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",
  60: "Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",
  61: "v-show is missing expression.",
  62: "<Transition> expects exactly one child element or component.",
  63: "Tags with side effect (<script> and <style>) are ignored in client component templates."
}, fW = (e, t, n) => {
  const { exp: s, loc: o } = e;
  return s || n.onError(
    Ds(53, o)
  ), t.children.length && (n.onError(
    Ds(54, o)
  ), t.children.length = 0), {
    props: [
      ln(
        nt("innerHTML", !0, o),
        s || nt("", !0)
      )
    ]
  };
}, pW = (e, t, n) => {
  const { exp: s, loc: o } = e;
  return s || n.onError(
    Ds(55, o)
  ), t.children.length && (n.onError(
    Ds(56, o)
  ), t.children.length = 0), {
    props: [
      ln(
        nt("textContent", !0),
        s ? ds(s, n) > 0 ? s : yn(
          n.helperString(Yc),
          [s],
          o
        ) : nt("", !0)
      )
    ]
  };
}, hW = (e, t, n) => {
  const s = hg(e, t, n);
  if (!s.props.length || t.tagType === 1)
    return s;
  e.arg && n.onError(
    Ds(
      58,
      e.arg.loc
    )
  );
  function o() {
    const a = jn(t, "bind");
    a && Qo(a.arg, "value") && n.onError(
      Ds(
        60,
        a.loc
      )
    );
  }
  const { tag: i } = t, r = n.isCustomElement(i);
  if (i === "input" || i === "textarea" || i === "select" || r) {
    let a = gg, l = !1;
    if (i === "input" || r) {
      const c = La(t, "type");
      if (c) {
        if (c.type === 7)
          a = Bd;
        else if (c.value)
          switch (c.value.content) {
            case "radio":
              a = mg;
              break;
            case "checkbox":
              a = vg;
              break;
            case "file":
              l = !0, n.onError(
                Ds(
                  59,
                  e.loc
                )
              );
              break;
            default:
              Kn.NODE_ENV !== "production" && o();
              break;
          }
      } else Vw(t) ? a = Bd : Kn.NODE_ENV !== "production" && o();
    } else i === "select" ? a = yg : Kn.NODE_ENV !== "production" && o();
    l || (s.needRuntime = n.helper(a));
  } else
    n.onError(
      Ds(
        57,
        e.loc
      )
    );
  return s.props = s.props.filter(
    (a) => !(a.key.type === 4 && a.key.content === "modelValue")
  ), s;
}, mW = /* @__PURE__ */ bn("passive,once,capture"), vW = /* @__PURE__ */ bn(
  // event propagation management
  "stop,prevent,self,ctrl,shift,alt,meta,exact,middle"
), gW = /* @__PURE__ */ bn("left,right"), bN = /* @__PURE__ */ bn("onkeyup,onkeydown,onkeypress"), yW = (e, t, n, s) => {
  const o = [], i = [], r = [];
  for (let a = 0; a < t.length; a++) {
    const l = t[a].content;
    l === "native" && Fi(
      "COMPILER_V_ON_NATIVE",
      n,
      s
    ) || mW(l) ? r.push(l) : gW(l) ? ts(e) ? bN(e.content.toLowerCase()) ? o.push(l) : i.push(l) : (o.push(l), i.push(l)) : vW(l) ? i.push(l) : o.push(l);
  }
  return {
    keyModifiers: o,
    nonKeyModifiers: i,
    eventOptionModifiers: r
  };
}, Z_ = (e, t) => ts(e) && e.content.toLowerCase() === "onclick" ? nt(t, !0) : e.type !== 4 ? As([
  "(",
  e,
  `) === "onClick" ? "${t}" : (`,
  e,
  ")"
]) : e, _W = (e, t, n) => pg(e, t, n, (s) => {
  const { modifiers: o } = e;
  if (!o.length) return s;
  let { key: i, value: r } = s.props[0];
  const { keyModifiers: a, nonKeyModifiers: l, eventOptionModifiers: c } = yW(i, o, n, e.loc);
  if (l.includes("right") && (i = Z_(i, "onContextmenu")), l.includes("middle") && (i = Z_(i, "onMouseup")), l.length && (r = yn(n.helper(_g), [
    r,
    JSON.stringify(l)
  ])), a.length && // if event name is dynamic, always wrap with keys guard
  (!ts(i) || bN(i.content.toLowerCase())) && (r = yn(n.helper(bg), [
    r,
    JSON.stringify(a)
  ])), c.length) {
    const d = c.map(so).join("");
    i = ts(i) ? nt(`${i.content}${d}`, !0) : As(["(", i, `) + "${d}"`]);
  }
  return {
    props: [ln(i, r)]
  };
}), bW = (e, t, n) => {
  const { exp: s, loc: o } = e;
  return s || n.onError(
    Ds(61, o)
  ), {
    props: [],
    needRuntime: n.helper(Eg)
  };
}, EW = (e, t) => {
  if (e.type === 1 && e.tagType === 1 && t.isBuiltInComponent(e.tag) === lp)
    return () => {
      if (!e.children.length)
        return;
      EN(e) && t.onError(
        Ds(
          62,
          {
            start: e.children[0].loc.start,
            end: e.children[e.children.length - 1].loc.end,
            source: ""
          }
        )
      );
      const s = e.children[0];
      if (s.type === 1)
        for (const o of s.props)
          o.type === 7 && o.name === "show" && e.props.push({
            type: 6,
            name: "persisted",
            nameLoc: e.loc,
            value: void 0,
            loc: e.loc
          });
    };
};
function EN(e) {
  const t = e.children = e.children.filter(
    (s) => s.type !== 3 && !(s.type === 2 && !s.content.trim())
  ), n = t[0];
  return t.length !== 1 || n.type === 11 || n.type === 9 && n.branches.some(EN);
}
const SW = (e, t) => {
  e.type === 1 && e.tagType === 0 && (e.tag === "script" || e.tag === "style") && (Kn.NODE_ENV !== "production" && t.onError(
    Ds(
      63,
      e.loc
    )
  ), t.removeNode());
};
function wW(e, t) {
  return e in eb ? eb[e].has(t) : t in tb ? tb[t].has(e) : !(e in nb && nb[e].has(t) || t in sb && sb[t].has(e));
}
const oa = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "h6"]), li = /* @__PURE__ */ new Set([]), eb = {
  head: /* @__PURE__ */ new Set([
    "base",
    "basefront",
    "bgsound",
    "link",
    "meta",
    "title",
    "noscript",
    "noframes",
    "style",
    "script",
    "template"
  ]),
  optgroup: /* @__PURE__ */ new Set(["option"]),
  select: /* @__PURE__ */ new Set(["optgroup", "option", "hr"]),
  // table
  table: /* @__PURE__ */ new Set(["caption", "colgroup", "tbody", "tfoot", "thead"]),
  tr: /* @__PURE__ */ new Set(["td", "th"]),
  colgroup: /* @__PURE__ */ new Set(["col"]),
  tbody: /* @__PURE__ */ new Set(["tr"]),
  thead: /* @__PURE__ */ new Set(["tr"]),
  tfoot: /* @__PURE__ */ new Set(["tr"]),
  // these elements can not have any children elements
  script: li,
  iframe: li,
  option: li,
  textarea: li,
  style: li,
  title: li
}, tb = {
  // sections
  html: li,
  body: /* @__PURE__ */ new Set(["html"]),
  head: /* @__PURE__ */ new Set(["html"]),
  // table
  td: /* @__PURE__ */ new Set(["tr"]),
  colgroup: /* @__PURE__ */ new Set(["table"]),
  caption: /* @__PURE__ */ new Set(["table"]),
  tbody: /* @__PURE__ */ new Set(["table"]),
  tfoot: /* @__PURE__ */ new Set(["table"]),
  col: /* @__PURE__ */ new Set(["colgroup"]),
  th: /* @__PURE__ */ new Set(["tr"]),
  thead: /* @__PURE__ */ new Set(["table"]),
  tr: /* @__PURE__ */ new Set(["tbody", "thead", "tfoot"]),
  // data list
  dd: /* @__PURE__ */ new Set(["dl", "div"]),
  dt: /* @__PURE__ */ new Set(["dl", "div"]),
  // other
  figcaption: /* @__PURE__ */ new Set(["figure"]),
  // li: new Set(["ul", "ol"]),
  summary: /* @__PURE__ */ new Set(["details"]),
  area: /* @__PURE__ */ new Set(["map"])
}, nb = {
  p: /* @__PURE__ */ new Set([
    "address",
    "article",
    "aside",
    "blockquote",
    "center",
    "details",
    "dialog",
    "dir",
    "div",
    "dl",
    "fieldset",
    "figure",
    "footer",
    "form",
    "h1",
    "h2",
    "h3",
    "h4",
    "h5",
    "h6",
    "header",
    "hgroup",
    "hr",
    "li",
    "main",
    "nav",
    "menu",
    "ol",
    "p",
    "pre",
    "section",
    "table",
    "ul"
  ]),
  svg: /* @__PURE__ */ new Set([
    "b",
    "blockquote",
    "br",
    "code",
    "dd",
    "div",
    "dl",
    "dt",
    "em",
    "embed",
    "h1",
    "h2",
    "h3",
    "h4",
    "h5",
    "h6",
    "hr",
    "i",
    "img",
    "li",
    "menu",
    "meta",
    "ol",
    "p",
    "pre",
    "ruby",
    "s",
    "small",
    "span",
    "strong",
    "sub",
    "sup",
    "table",
    "u",
    "ul",
    "var"
  ])
}, sb = {
  a: /* @__PURE__ */ new Set(["a"]),
  button: /* @__PURE__ */ new Set(["button"]),
  dd: /* @__PURE__ */ new Set(["dd", "dt"]),
  dt: /* @__PURE__ */ new Set(["dd", "dt"]),
  form: /* @__PURE__ */ new Set(["form"]),
  li: /* @__PURE__ */ new Set(["li"]),
  h1: oa,
  h2: oa,
  h3: oa,
  h4: oa,
  h5: oa,
  h6: oa
}, NW = (e, t) => {
  if (e.type === 1 && e.tagType === 0 && t.parent && t.parent.type === 1 && t.parent.tagType === 0 && !wW(t.parent.tag, e.tag)) {
    const n = new SyntaxError(
      `<${e.tag}> cannot be child of <${t.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`
    );
    n.loc = e.loc, t.onWarn(n);
  }
}, SN = [
  yN,
  ...Kn.NODE_ENV !== "production" ? [EW, NW] : []
], wN = {
  cloak: gN,
  html: fW,
  text: pW,
  model: hW,
  // override compiler-core
  on: _W,
  // override compiler-core
  show: bW
};
function OW(e, t = {}) {
  return vN(
    e,
    st({}, wg, t, {
      nodeTransforms: [
        // ignore <script> and <tag>
        // this is not put inside DOMNodeTransforms because that list is used
        // by compiler-ssr to generate vnode fallback branches
        SW,
        ...SN,
        ...t.nodeTransforms || []
      ],
      directiveTransforms: st(
        {},
        wN,
        t.directiveTransforms || {}
      ),
      transformHoist: null
    })
  );
}
function xW(e, t = {}) {
  return lg(e, st({}, wg, t));
}
const CW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  BASE_TRANSITION: qv,
  BindingTypes: lW,
  CAMELIZE: Pd,
  CAPITALIZE: yw,
  CREATE_BLOCK: Jv,
  CREATE_COMMENT: tl,
  CREATE_ELEMENT_BLOCK: Qv,
  CREATE_ELEMENT_VNODE: zf,
  CREATE_SLOTS: tg,
  CREATE_STATIC: Zv,
  CREATE_TEXT: Kf,
  CREATE_VNODE: Gf,
  CompilerDeprecationTypes: YY,
  ConstantTypes: PY,
  DOMDirectiveTransforms: wN,
  DOMErrorCodes: dW,
  DOMErrorMessages: _N,
  DOMNodeTransforms: SN,
  ElementTypes: MY,
  ErrorCodes: GY,
  FRAGMENT: Ma,
  GUARD_REACTIVE_PROPS: nl,
  IS_MEMO_SAME: ng,
  IS_REF: Sw,
  KEEP_ALIVE: vc,
  MERGE_PROPS: gc,
  NORMALIZE_CLASS: tp,
  NORMALIZE_PROPS: Pa,
  NORMALIZE_STYLE: np,
  Namespaces: RY,
  NodeTypes: AY,
  OPEN_BLOCK: Kr,
  POP_SCOPE_ID: bw,
  PUSH_SCOPE_ID: _w,
  RENDER_LIST: ep,
  RENDER_SLOT: eg,
  RESOLVE_COMPONENT: Xf,
  RESOLVE_DIRECTIVE: Jf,
  RESOLVE_DYNAMIC_COMPONENT: qf,
  RESOLVE_FILTER: Qf,
  SET_BLOCK_TRACKING: yc,
  SUSPENSE: Wf,
  TELEPORT: Na,
  TO_DISPLAY_STRING: Yc,
  TO_HANDLERS: sp,
  TO_HANDLER_KEY: Vd,
  TRANSITION: lp,
  TRANSITION_GROUP: Sg,
  TS_NODE_TYPES: kw,
  UNREF: Ew,
  V_MODEL_CHECKBOX: vg,
  V_MODEL_DYNAMIC: Bd,
  V_MODEL_RADIO: mg,
  V_MODEL_SELECT: yg,
  V_MODEL_TEXT: gg,
  V_ON_WITH_KEYS: bg,
  V_ON_WITH_MODIFIERS: _g,
  V_SHOW: Eg,
  WITH_CTX: op,
  WITH_DIRECTIVES: Zf,
  WITH_MEMO: rp,
  advancePositionWithClone: u9,
  advancePositionWithMutation: Pw,
  assert: ym,
  baseCompile: vN,
  baseParse: lg,
  buildDirectiveArgs: pN,
  buildProps: fg,
  buildSlots: lN,
  checkCompatEnabled: Fi,
  compile: OW,
  convertToBlock: ip,
  createArrayExpression: Br,
  createAssignmentExpression: UY,
  createBlockStatement: xw,
  createCacheExpression: Ow,
  createCallExpression: yn,
  createCompilerError: At,
  createCompoundExpression: As,
  createConditionalExpression: Ld,
  createDOMCompilerError: Ds,
  createForLoopParams: Ud,
  createFunctionExpression: Pi,
  createIfStatement: FY,
  createInterpolation: VY,
  createObjectExpression: _s,
  createObjectProperty: ln,
  createReturnStatement: BY,
  createRoot: Nw,
  createSequenceExpression: jY,
  createSimpleExpression: nt,
  createStructuralDirectiveTransform: cg,
  createTemplateLiteral: LY,
  createTransformContext: Xw,
  createVNodeCall: Va,
  errorMessages: Tw,
  extractIdentifiers: Ko,
  findDir: jn,
  findProp: La,
  forAliasRE: Uw,
  generate: Qw,
  generateCodeFrame: Mb,
  getBaseTransformPreset: mN,
  getConstantType: ds,
  getMemoedVNodeCall: Fw,
  getVNodeBlockHelper: Li,
  getVNodeHelper: Vi,
  hasDynamicKeyVBind: Vw,
  hasScopeRef: Ys,
  helperNameMap: Mi,
  injectProp: Ec,
  isCoreComponent: og,
  isFnExpression: Mw,
  isFnExpressionBrowser: Aw,
  isFnExpressionNode: c9,
  isFunctionType: t9,
  isInDestructureAssignment: XY,
  isInNewExpression: qY,
  isMemberExpression: rg,
  isMemberExpressionBrowser: Rw,
  isMemberExpressionNode: a9,
  isReferencedIdentifier: KY,
  isSimpleIdentifier: Wc,
  isSlotOutlet: bc,
  isStaticArgOf: Qo,
  isStaticExp: ts,
  isStaticProperty: $w,
  isStaticPropertyKey: n9,
  isTemplateNode: Fa,
  isText: Ju,
  isVSlot: ig,
  locStub: Tn,
  noopDirectiveTransform: gN,
  parse: xW,
  parserOptions: wg,
  processExpression: td,
  processFor: iN,
  processIf: sN,
  processSlotOutlet: hN,
  registerRuntimeHelpers: ww,
  resolveComponentType: fN,
  stringifyExpression: nN,
  toValidAssetId: Ua,
  trackSlotScopes: aN,
  trackVForSlotScopes: J9,
  transform: qw,
  transformBind: oN,
  transformElement: dN,
  transformExpression: tN,
  transformModel: hg,
  transformOn: pg,
  transformStyle: yN,
  traverseNode: Gc,
  unwrapTSNode: Dw,
  walkBlockDeclarations: QY,
  walkFunctionParams: JY,
  walkIdentifiers: zY,
  warnDeprecation: _c
}, Symbol.toStringTag, { value: "Module" })), NN = /* @__PURE__ */ Yf(CW), ON = /* @__PURE__ */ Yf(g$), xN = /* @__PURE__ */ Yf(BO);
/**
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
var ob;
function TW() {
  return ob || (ob = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 });
    var t = NN, n = ON, s = xN;
    function o(l) {
      var c = /* @__PURE__ */ Object.create(null);
      if (l)
        for (var d in l)
          c[d] = l[d];
      return c.default = l, Object.freeze(c);
    }
    var i = /* @__PURE__ */ o(n);
    const r = /* @__PURE__ */ Object.create(null);
    function a(l, c) {
      if (!s.isString(l))
        if (l.nodeType)
          l = l.innerHTML;
        else
          return s.NOOP;
      const d = s.genCacheKey(l, c), f = r[d];
      if (f)
        return f;
      if (l[0] === "#") {
        const v = document.querySelector(l);
        l = v ? v.innerHTML : "";
      }
      const p = s.extend(
        {
          hoistStatic: !0,
          onError: void 0,
          onWarn: s.NOOP
        },
        c
      );
      !p.isCustomElement && typeof customElements < "u" && (p.isCustomElement = (v) => !!customElements.get(v));
      const { code: h } = t.compile(l, p), m = new Function("Vue", h)(i);
      return m._rc = !0, r[d] = m;
    }
    n.registerRuntimeCompiler(a), e.compile = a, Object.keys(n).forEach(function(l) {
      l !== "default" && !Object.prototype.hasOwnProperty.call(e, l) && (e[l] = n[l]);
    });
  }(Jp)), Jp;
}
var Zp = {};
/**
* vue v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/
var rb;
function $W() {
  return rb || (rb = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 });
    var t = NN, n = ON, s = xN;
    function o(l) {
      var c = /* @__PURE__ */ Object.create(null);
      if (l)
        for (var d in l)
          c[d] = l[d];
      return c.default = l, Object.freeze(c);
    }
    var i = /* @__PURE__ */ o(n);
    const r = /* @__PURE__ */ Object.create(null);
    function a(l, c) {
      if (!s.isString(l))
        if (l.nodeType)
          l = l.innerHTML;
        else
          return n.warn("invalid template option: ", l), s.NOOP;
      const d = s.genCacheKey(l, c), f = r[d];
      if (f)
        return f;
      if (l[0] === "#") {
        const g = document.querySelector(l);
        g || n.warn(`Template element not found or is empty: ${l}`), l = g ? g.innerHTML : "";
      }
      const p = s.extend(
        {
          hoistStatic: !0,
          onError: m,
          onWarn: (g) => m(g, !0)
        },
        c
      );
      !p.isCustomElement && typeof customElements < "u" && (p.isCustomElement = (g) => !!customElements.get(g));
      const { code: h } = t.compile(l, p);
      function m(g, _ = !1) {
        const S = _ ? g.message : `Template compilation error: ${g.message}`, b = g.loc && s.generateCodeFrame(
          l,
          g.loc.start.offset,
          g.loc.end.offset
        );
        n.warn(b ? `${S}
${b}` : S);
      }
      const v = new Function("Vue", h)(i);
      return v._rc = !0, r[d] = v;
    }
    n.registerRuntimeCompiler(a), e.compile = a, Object.keys(n).forEach(function(l) {
      l !== "default" && !Object.prototype.hasOwnProperty.call(e, l) && (e[l] = n[l]);
    });
  }(Zp)), Zp;
}
var ib;
function kW() {
  if (ib) return yu.exports;
  ib = 1;
  var e = {};
  return e.NODE_ENV === "production" ? yu.exports = TW() : yu.exports = $W(), yu.exports;
}
/**!
 * Sortable 1.14.0
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */
function ab(e, t) {
  var n = Object.keys(e);
  if (Object.getOwnPropertySymbols) {
    var s = Object.getOwnPropertySymbols(e);
    t && (s = s.filter(function(o) {
      return Object.getOwnPropertyDescriptor(e, o).enumerable;
    })), n.push.apply(n, s);
  }
  return n;
}
function To(e) {
  for (var t = 1; t < arguments.length; t++) {
    var n = arguments[t] != null ? arguments[t] : {};
    t % 2 ? ab(Object(n), !0).forEach(function(s) {
      DW(e, s, n[s]);
    }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ab(Object(n)).forEach(function(s) {
      Object.defineProperty(e, s, Object.getOwnPropertyDescriptor(n, s));
    });
  }
  return e;
}
function sd(e) {
  "@babel/helpers - typeof";
  return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? sd = function(t) {
    return typeof t;
  } : sd = function(t) {
    return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
  }, sd(e);
}
function DW(e, t, n) {
  return t in e ? Object.defineProperty(e, t, {
    value: n,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : e[t] = n, e;
}
function Ls() {
  return Ls = Object.assign || function(e) {
    for (var t = 1; t < arguments.length; t++) {
      var n = arguments[t];
      for (var s in n)
        Object.prototype.hasOwnProperty.call(n, s) && (e[s] = n[s]);
    }
    return e;
  }, Ls.apply(this, arguments);
}
function IW(e, t) {
  if (e == null) return {};
  var n = {}, s = Object.keys(e), o, i;
  for (i = 0; i < s.length; i++)
    o = s[i], !(t.indexOf(o) >= 0) && (n[o] = e[o]);
  return n;
}
function RW(e, t) {
  if (e == null) return {};
  var n = IW(e, t), s, o;
  if (Object.getOwnPropertySymbols) {
    var i = Object.getOwnPropertySymbols(e);
    for (o = 0; o < i.length; o++)
      s = i[o], !(t.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(e, s) && (n[s] = e[s]);
  }
  return n;
}
function AW(e) {
  return MW(e) || PW(e) || VW(e) || LW();
}
function MW(e) {
  if (Array.isArray(e)) return Sm(e);
}
function PW(e) {
  if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
}
function VW(e, t) {
  if (e) {
    if (typeof e == "string") return Sm(e, t);
    var n = Object.prototype.toString.call(e).slice(8, -1);
    if (n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set") return Array.from(e);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Sm(e, t);
  }
}
function Sm(e, t) {
  (t == null || t > e.length) && (t = e.length);
  for (var n = 0, s = new Array(t); n < t; n++) s[n] = e[n];
  return s;
}
function LW() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var FW = "1.14.0";
function sr(e) {
  if (typeof window < "u" && window.navigator)
    return !!/* @__PURE__ */ navigator.userAgent.match(e);
}
var gr = sr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Kc = sr(/Edge/i), lb = sr(/firefox/i), Bl = sr(/safari/i) && !sr(/chrome/i) && !sr(/android/i), CN = sr(/iP(ad|od|hone)/i), UW = sr(/chrome/i) && sr(/android/i), TN = {
  capture: !1,
  passive: !1
};
function gt(e, t, n) {
  e.addEventListener(t, n, !gr && TN);
}
function dt(e, t, n) {
  e.removeEventListener(t, n, !gr && TN);
}
function Hd(e, t) {
  if (t) {
    if (t[0] === ">" && (t = t.substring(1)), e)
      try {
        if (e.matches)
          return e.matches(t);
        if (e.msMatchesSelector)
          return e.msMatchesSelector(t);
        if (e.webkitMatchesSelector)
          return e.webkitMatchesSelector(t);
      } catch {
        return !1;
      }
    return !1;
  }
}
function jW(e) {
  return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
}
function Gs(e, t, n, s) {
  if (e) {
    n = n || document;
    do {
      if (t != null && (t[0] === ">" ? e.parentNode === n && Hd(e, t) : Hd(e, t)) || s && e === n)
        return e;
      if (e === n) break;
    } while (e = jW(e));
  }
  return null;
}
var cb = /\s+/g;
function nn(e, t, n) {
  if (e && t)
    if (e.classList)
      e.classList[n ? "add" : "remove"](t);
    else {
      var s = (" " + e.className + " ").replace(cb, " ").replace(" " + t + " ", " ");
      e.className = (s + (n ? " " + t : "")).replace(cb, " ");
    }
}
function Pe(e, t, n) {
  var s = e && e.style;
  if (s) {
    if (n === void 0)
      return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
    !(t in s) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), s[t] = n + (typeof n == "string" ? "" : "px");
  }
}
function xi(e, t) {
  var n = "";
  if (typeof e == "string")
    n = e;
  else
    do {
      var s = Pe(e, "transform");
      s && s !== "none" && (n = s + " " + n);
    } while (!t && (e = e.parentNode));
  var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
  return o && new o(n);
}
function $N(e, t, n) {
  if (e) {
    var s = e.getElementsByTagName(t), o = 0, i = s.length;
    if (n)
      for (; o < i; o++)
        n(s[o], o);
    return s;
  }
  return [];
}
function So() {
  var e = document.scrollingElement;
  return e || document.documentElement;
}
function en(e, t, n, s, o) {
  if (!(!e.getBoundingClientRect && e !== window)) {
    var i, r, a, l, c, d, f;
    if (e !== window && e.parentNode && e !== So() ? (i = e.getBoundingClientRect(), r = i.top, a = i.left, l = i.bottom, c = i.right, d = i.height, f = i.width) : (r = 0, a = 0, l = window.innerHeight, c = window.innerWidth, d = window.innerHeight, f = window.innerWidth), (t || n) && e !== window && (o = o || e.parentNode, !gr))
      do
        if (o && o.getBoundingClientRect && (Pe(o, "transform") !== "none" || n && Pe(o, "position") !== "static")) {
          var p = o.getBoundingClientRect();
          r -= p.top + parseInt(Pe(o, "border-top-width")), a -= p.left + parseInt(Pe(o, "border-left-width")), l = r + i.height, c = a + i.width;
          break;
        }
      while (o = o.parentNode);
    if (s && e !== window) {
      var h = xi(o || e), m = h && h.a, v = h && h.d;
      h && (r /= v, a /= m, f /= m, d /= v, l = r + d, c = a + f);
    }
    return {
      top: r,
      left: a,
      bottom: l,
      right: c,
      width: f,
      height: d
    };
  }
}
function ub(e, t, n) {
  for (var s = Vr(e, !0), o = en(e)[t]; s; ) {
    var i = en(s)[n], r = void 0;
    if (r = o >= i, !r) return s;
    if (s === So()) break;
    s = Vr(s, !1);
  }
  return !1;
}
function ja(e, t, n, s) {
  for (var o = 0, i = 0, r = e.children; i < r.length; ) {
    if (r[i].style.display !== "none" && r[i] !== Xe.ghost && (s || r[i] !== Xe.dragged) && Gs(r[i], n.draggable, e, !1)) {
      if (o === t)
        return r[i];
      o++;
    }
    i++;
  }
  return null;
}
function Ng(e, t) {
  for (var n = e.lastElementChild; n && (n === Xe.ghost || Pe(n, "display") === "none" || t && !Hd(n, t)); )
    n = n.previousElementSibling;
  return n || null;
}
function rn(e, t) {
  var n = 0;
  if (!e || !e.parentNode)
    return -1;
  for (; e = e.previousElementSibling; )
    e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Xe.clone && (!t || Hd(e, t)) && n++;
  return n;
}
function db(e) {
  var t = 0, n = 0, s = So();
  if (e)
    do {
      var o = xi(e), i = o.a, r = o.d;
      t += e.scrollLeft * i, n += e.scrollTop * r;
    } while (e !== s && (e = e.parentNode));
  return [t, n];
}
function BW(e, t) {
  for (var n in e)
    if (e.hasOwnProperty(n)) {
      for (var s in t)
        if (t.hasOwnProperty(s) && t[s] === e[n][s]) return Number(n);
    }
  return -1;
}
function Vr(e, t) {
  if (!e || !e.getBoundingClientRect) return So();
  var n = e, s = !1;
  do
    if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
      var o = Pe(n);
      if (n.clientWidth < n.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
        if (!n.getBoundingClientRect || n === document.body) return So();
        if (s || t) return n;
        s = !0;
      }
    }
  while (n = n.parentNode);
  return So();
}
function HW(e, t) {
  if (e && t)
    for (var n in t)
      t.hasOwnProperty(n) && (e[n] = t[n]);
  return e;
}
function eh(e, t) {
  return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
}
var Hl;
function kN(e, t) {
  return function() {
    if (!Hl) {
      var n = arguments, s = this;
      n.length === 1 ? e.call(s, n[0]) : e.apply(s, n), Hl = setTimeout(function() {
        Hl = void 0;
      }, t);
    }
  };
}
function YW() {
  clearTimeout(Hl), Hl = void 0;
}
function DN(e, t, n) {
  e.scrollLeft += t, e.scrollTop += n;
}
function Og(e) {
  var t = window.Polymer, n = window.jQuery || window.Zepto;
  return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
}
function fb(e, t) {
  Pe(e, "position", "absolute"), Pe(e, "top", t.top), Pe(e, "left", t.left), Pe(e, "width", t.width), Pe(e, "height", t.height);
}
function th(e) {
  Pe(e, "position", ""), Pe(e, "top", ""), Pe(e, "left", ""), Pe(e, "width", ""), Pe(e, "height", "");
}
var Hn = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
function WW() {
  var e = [], t;
  return {
    captureAnimationState: function() {
      if (e = [], !!this.options.animation) {
        var s = [].slice.call(this.el.children);
        s.forEach(function(o) {
          if (!(Pe(o, "display") === "none" || o === Xe.ghost)) {
            e.push({
              target: o,
              rect: en(o)
            });
            var i = To({}, e[e.length - 1].rect);
            if (o.thisAnimationDuration) {
              var r = xi(o, !0);
              r && (i.top -= r.f, i.left -= r.e);
            }
            o.fromRect = i;
          }
        });
      }
    },
    addAnimationState: function(s) {
      e.push(s);
    },
    removeAnimationState: function(s) {
      e.splice(BW(e, {
        target: s
      }), 1);
    },
    animateAll: function(s) {
      var o = this;
      if (!this.options.animation) {
        clearTimeout(t), typeof s == "function" && s();
        return;
      }
      var i = !1, r = 0;
      e.forEach(function(a) {
        var l = 0, c = a.target, d = c.fromRect, f = en(c), p = c.prevFromRect, h = c.prevToRect, m = a.rect, v = xi(c, !0);
        v && (f.top -= v.f, f.left -= v.e), c.toRect = f, c.thisAnimationDuration && eh(p, f) && !eh(d, f) && // Make sure animatingRect is on line between toRect & fromRect
        (m.top - f.top) / (m.left - f.left) === (d.top - f.top) / (d.left - f.left) && (l = zW(m, p, h, o.options)), eh(f, d) || (c.prevFromRect = d, c.prevToRect = f, l || (l = o.options.animation), o.animate(c, m, f, l)), l && (i = !0, r = Math.max(r, l), clearTimeout(c.animationResetTimer), c.animationResetTimer = setTimeout(function() {
          c.animationTime = 0, c.prevFromRect = null, c.fromRect = null, c.prevToRect = null, c.thisAnimationDuration = null;
        }, l), c.thisAnimationDuration = l);
      }), clearTimeout(t), i ? t = setTimeout(function() {
        typeof s == "function" && s();
      }, r) : typeof s == "function" && s(), e = [];
    },
    animate: function(s, o, i, r) {
      if (r) {
        Pe(s, "transition", ""), Pe(s, "transform", "");
        var a = xi(this.el), l = a && a.a, c = a && a.d, d = (o.left - i.left) / (l || 1), f = (o.top - i.top) / (c || 1);
        s.animatingX = !!d, s.animatingY = !!f, Pe(s, "transform", "translate3d(" + d + "px," + f + "px,0)"), this.forRepaintDummy = GW(s), Pe(s, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), Pe(s, "transform", "translate3d(0,0,0)"), typeof s.animated == "number" && clearTimeout(s.animated), s.animated = setTimeout(function() {
          Pe(s, "transition", ""), Pe(s, "transform", ""), s.animated = !1, s.animatingX = !1, s.animatingY = !1;
        }, r);
      }
    }
  };
}
function GW(e) {
  return e.offsetWidth;
}
function zW(e, t, n, s) {
  return Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) / Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) * s.animation;
}
var ra = [], nh = {
  initializeByDefault: !0
}, Xc = {
  mount: function(t) {
    for (var n in nh)
      nh.hasOwnProperty(n) && !(n in t) && (t[n] = nh[n]);
    ra.forEach(function(s) {
      if (s.pluginName === t.pluginName)
        throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
    }), ra.push(t);
  },
  pluginEvent: function(t, n, s) {
    var o = this;
    this.eventCanceled = !1, s.cancel = function() {
      o.eventCanceled = !0;
    };
    var i = t + "Global";
    ra.forEach(function(r) {
      n[r.pluginName] && (n[r.pluginName][i] && n[r.pluginName][i](To({
        sortable: n
      }, s)), n.options[r.pluginName] && n[r.pluginName][t] && n[r.pluginName][t](To({
        sortable: n
      }, s)));
    });
  },
  initializePlugins: function(t, n, s, o) {
    ra.forEach(function(a) {
      var l = a.pluginName;
      if (!(!t.options[l] && !a.initializeByDefault)) {
        var c = new a(t, n, t.options);
        c.sortable = t, c.options = t.options, t[l] = c, Ls(s, c.defaults);
      }
    });
    for (var i in t.options)
      if (t.options.hasOwnProperty(i)) {
        var r = this.modifyOption(t, i, t.options[i]);
        typeof r < "u" && (t.options[i] = r);
      }
  },
  getEventProperties: function(t, n) {
    var s = {};
    return ra.forEach(function(o) {
      typeof o.eventProperties == "function" && Ls(s, o.eventProperties.call(n[o.pluginName], t));
    }), s;
  },
  modifyOption: function(t, n, s) {
    var o;
    return ra.forEach(function(i) {
      t[i.pluginName] && i.optionListeners && typeof i.optionListeners[n] == "function" && (o = i.optionListeners[n].call(t[i.pluginName], s));
    }), o;
  }
};
function xl(e) {
  var t = e.sortable, n = e.rootEl, s = e.name, o = e.targetEl, i = e.cloneEl, r = e.toEl, a = e.fromEl, l = e.oldIndex, c = e.newIndex, d = e.oldDraggableIndex, f = e.newDraggableIndex, p = e.originalEvent, h = e.putSortable, m = e.extraEventProperties;
  if (t = t || n && n[Hn], !!t) {
    var v, g = t.options, _ = "on" + s.charAt(0).toUpperCase() + s.substr(1);
    window.CustomEvent && !gr && !Kc ? v = new CustomEvent(s, {
      bubbles: !0,
      cancelable: !0
    }) : (v = document.createEvent("Event"), v.initEvent(s, !0, !0)), v.to = r || n, v.from = a || n, v.item = o || n, v.clone = i, v.oldIndex = l, v.newIndex = c, v.oldDraggableIndex = d, v.newDraggableIndex = f, v.originalEvent = p, v.pullMode = h ? h.lastPutMode : void 0;
    var S = To(To({}, m), Xc.getEventProperties(s, t));
    for (var b in S)
      v[b] = S[b];
    n && n.dispatchEvent(v), g[_] && g[_].call(t, v);
  }
}
var KW = ["evt"], rs = function(t, n) {
  var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = s.evt, i = RW(s, KW);
  Xc.pluginEvent.bind(Xe)(t, n, To({
    dragEl: we,
    parentEl: sn,
    ghostEl: ot,
    rootEl: qt,
    nextEl: ci,
    lastDownEl: od,
    cloneEl: on,
    cloneHidden: Ir,
    dragStarted: Cl,
    putSortable: Rn,
    activeSortable: Xe.active,
    originalEvent: o,
    oldIndex: ha,
    oldDraggableIndex: Yl,
    newIndex: gs,
    newDraggableIndex: kr,
    hideGhostForTarget: MN,
    unhideGhostForTarget: PN,
    cloneNowHidden: function() {
      Ir = !0;
    },
    cloneNowShown: function() {
      Ir = !1;
    },
    dispatchSortableEvent: function(a) {
      qn({
        sortable: n,
        name: a,
        originalEvent: o
      });
    }
  }, i));
};
function qn(e) {
  xl(To({
    putSortable: Rn,
    cloneEl: on,
    targetEl: we,
    rootEl: qt,
    oldIndex: ha,
    oldDraggableIndex: Yl,
    newIndex: gs,
    newDraggableIndex: kr
  }, e));
}
var we, sn, ot, qt, ci, od, on, Ir, ha, gs, Yl, kr, Su, Rn, ua = !1, Yd = !1, Wd = [], si, Bs, sh, oh, pb, hb, Cl, ia, Wl, Gl = !1, wu = !1, rd, Pn, rh = [], wm = !1, Gd = [], cp = typeof document < "u", Nu = CN, mb = Kc || gr ? "cssFloat" : "float", XW = cp && !UW && !CN && "draggable" in document.createElement("div"), IN = function() {
  if (cp) {
    if (gr)
      return !1;
    var e = document.createElement("x");
    return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
  }
}(), RN = function(t, n) {
  var s = Pe(t), o = parseInt(s.width) - parseInt(s.paddingLeft) - parseInt(s.paddingRight) - parseInt(s.borderLeftWidth) - parseInt(s.borderRightWidth), i = ja(t, 0, n), r = ja(t, 1, n), a = i && Pe(i), l = r && Pe(r), c = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + en(i).width, d = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + en(r).width;
  if (s.display === "flex")
    return s.flexDirection === "column" || s.flexDirection === "column-reverse" ? "vertical" : "horizontal";
  if (s.display === "grid")
    return s.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
  if (i && a.float && a.float !== "none") {
    var f = a.float === "left" ? "left" : "right";
    return r && (l.clear === "both" || l.clear === f) ? "vertical" : "horizontal";
  }
  return i && (a.display === "block" || a.display === "flex" || a.display === "table" || a.display === "grid" || c >= o && s[mb] === "none" || r && s[mb] === "none" && c + d > o) ? "vertical" : "horizontal";
}, qW = function(t, n, s) {
  var o = s ? t.left : t.top, i = s ? t.right : t.bottom, r = s ? t.width : t.height, a = s ? n.left : n.top, l = s ? n.right : n.bottom, c = s ? n.width : n.height;
  return o === a || i === l || o + r / 2 === a + c / 2;
}, JW = function(t, n) {
  var s;
  return Wd.some(function(o) {
    var i = o[Hn].options.emptyInsertThreshold;
    if (!(!i || Ng(o))) {
      var r = en(o), a = t >= r.left - i && t <= r.right + i, l = n >= r.top - i && n <= r.bottom + i;
      if (a && l)
        return s = o;
    }
  }), s;
}, AN = function(t) {
  function n(i, r) {
    return function(a, l, c, d) {
      var f = a.options.group.name && l.options.group.name && a.options.group.name === l.options.group.name;
      if (i == null && (r || f))
        return !0;
      if (i == null || i === !1)
        return !1;
      if (r && i === "clone")
        return i;
      if (typeof i == "function")
        return n(i(a, l, c, d), r)(a, l, c, d);
      var p = (r ? a : l).options.group.name;
      return i === !0 || typeof i == "string" && i === p || i.join && i.indexOf(p) > -1;
    };
  }
  var s = {}, o = t.group;
  (!o || sd(o) != "object") && (o = {
    name: o
  }), s.name = o.name, s.checkPull = n(o.pull, !0), s.checkPut = n(o.put), s.revertClone = o.revertClone, t.group = s;
}, MN = function() {
  !IN && ot && Pe(ot, "display", "none");
}, PN = function() {
  !IN && ot && Pe(ot, "display", "");
};
cp && document.addEventListener("click", function(e) {
  if (Yd)
    return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Yd = !1, !1;
}, !0);
var oi = function(t) {
  if (we) {
    t = t.touches ? t.touches[0] : t;
    var n = JW(t.clientX, t.clientY);
    if (n) {
      var s = {};
      for (var o in t)
        t.hasOwnProperty(o) && (s[o] = t[o]);
      s.target = s.rootEl = n, s.preventDefault = void 0, s.stopPropagation = void 0, n[Hn]._onDragOver(s);
    }
  }
}, QW = function(t) {
  we && we.parentNode[Hn]._isOutsideThisEl(t.target);
};
function Xe(e, t) {
  if (!(e && e.nodeType && e.nodeType === 1))
    throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));
  this.el = e, this.options = t = Ls({}, t), e[Hn] = this;
  var n = {
    group: null,
    sort: !0,
    disabled: !1,
    store: null,
    handle: null,
    draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
    swapThreshold: 1,
    // percentage; 0 <= x <= 1
    invertSwap: !1,
    // invert always
    invertedSwapThreshold: null,
    // will be set to same as swapThreshold if default
    removeCloneOnHide: !0,
    direction: function() {
      return RN(e, this.options);
    },
    ghostClass: "sortable-ghost",
    chosenClass: "sortable-chosen",
    dragClass: "sortable-drag",
    ignore: "a, img",
    filter: null,
    preventOnFilter: !0,
    animation: 0,
    easing: null,
    setData: function(r, a) {
      r.setData("Text", a.textContent);
    },
    dropBubble: !1,
    dragoverBubble: !1,
    dataIdAttr: "data-id",
    delay: 0,
    delayOnTouchOnly: !1,
    touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
    forceFallback: !1,
    fallbackClass: "sortable-fallback",
    fallbackOnBody: !1,
    fallbackTolerance: 0,
    fallbackOffset: {
      x: 0,
      y: 0
    },
    supportPointer: Xe.supportPointer !== !1 && "PointerEvent" in window && !Bl,
    emptyInsertThreshold: 5
  };
  Xc.initializePlugins(this, e, n);
  for (var s in n)
    !(s in t) && (t[s] = n[s]);
  AN(t);
  for (var o in this)
    o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
  this.nativeDraggable = t.forceFallback ? !1 : XW, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? gt(e, "pointerdown", this._onTapStart) : (gt(e, "mousedown", this._onTapStart), gt(e, "touchstart", this._onTapStart)), this.nativeDraggable && (gt(e, "dragover", this), gt(e, "dragenter", this)), Wd.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ls(this, WW());
}
Xe.prototype = /** @lends Sortable.prototype */
{
  constructor: Xe,
  _isOutsideThisEl: function(t) {
    !this.el.contains(t) && t !== this.el && (ia = null);
  },
  _getDirection: function(t, n) {
    return typeof this.options.direction == "function" ? this.options.direction.call(this, t, n, we) : this.options.direction;
  },
  _onTapStart: function(t) {
    if (t.cancelable) {
      var n = this, s = this.el, o = this.options, i = o.preventOnFilter, r = t.type, a = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (a || t).target, c = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, d = o.filter;
      if (iG(s), !we && !(/mousedown|pointerdown/.test(r) && t.button !== 0 || o.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Bl && l && l.tagName.toUpperCase() === "SELECT") && (l = Gs(l, o.draggable, s, !1), !(l && l.animated) && od !== l)) {
        if (ha = rn(l), Yl = rn(l, o.draggable), typeof d == "function") {
          if (d.call(this, t, l, this)) {
            qn({
              sortable: n,
              rootEl: c,
              name: "filter",
              targetEl: l,
              toEl: s,
              fromEl: s
            }), rs("filter", n, {
              evt: t
            }), i && t.cancelable && t.preventDefault();
            return;
          }
        } else if (d && (d = d.split(",").some(function(f) {
          if (f = Gs(c, f.trim(), s, !1), f)
            return qn({
              sortable: n,
              rootEl: f,
              name: "filter",
              targetEl: l,
              fromEl: s,
              toEl: s
            }), rs("filter", n, {
              evt: t
            }), !0;
        }), d)) {
          i && t.cancelable && t.preventDefault();
          return;
        }
        o.handle && !Gs(c, o.handle, s, !1) || this._prepareDragStart(t, a, l);
      }
    }
  },
  _prepareDragStart: function(t, n, s) {
    var o = this, i = o.el, r = o.options, a = i.ownerDocument, l;
    if (s && !we && s.parentNode === i) {
      var c = en(s);
      if (qt = i, we = s, sn = we.parentNode, ci = we.nextSibling, od = s, Su = r.group, Xe.dragged = we, si = {
        target: we,
        clientX: (n || t).clientX,
        clientY: (n || t).clientY
      }, pb = si.clientX - c.left, hb = si.clientY - c.top, this._lastX = (n || t).clientX, this._lastY = (n || t).clientY, we.style["will-change"] = "all", l = function() {
        if (rs("delayEnded", o, {
          evt: t
        }), Xe.eventCanceled) {
          o._onDrop();
          return;
        }
        o._disableDelayedDragEvents(), !lb && o.nativeDraggable && (we.draggable = !0), o._triggerDragStart(t, n), qn({
          sortable: o,
          name: "choose",
          originalEvent: t
        }), nn(we, r.chosenClass, !0);
      }, r.ignore.split(",").forEach(function(d) {
        $N(we, d.trim(), ih);
      }), gt(a, "dragover", oi), gt(a, "mousemove", oi), gt(a, "touchmove", oi), gt(a, "mouseup", o._onDrop), gt(a, "touchend", o._onDrop), gt(a, "touchcancel", o._onDrop), lb && this.nativeDraggable && (this.options.touchStartThreshold = 4, we.draggable = !0), rs("delayStart", this, {
        evt: t
      }), r.delay && (!r.delayOnTouchOnly || n) && (!this.nativeDraggable || !(Kc || gr))) {
        if (Xe.eventCanceled) {
          this._onDrop();
          return;
        }
        gt(a, "mouseup", o._disableDelayedDrag), gt(a, "touchend", o._disableDelayedDrag), gt(a, "touchcancel", o._disableDelayedDrag), gt(a, "mousemove", o._delayedDragTouchMoveHandler), gt(a, "touchmove", o._delayedDragTouchMoveHandler), r.supportPointer && gt(a, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(l, r.delay);
      } else
        l();
    }
  },
  _delayedDragTouchMoveHandler: function(t) {
    var n = t.touches ? t.touches[0] : t;
    Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
  },
  _disableDelayedDrag: function() {
    we && ih(we), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
  },
  _disableDelayedDragEvents: function() {
    var t = this.el.ownerDocument;
    dt(t, "mouseup", this._disableDelayedDrag), dt(t, "touchend", this._disableDelayedDrag), dt(t, "touchcancel", this._disableDelayedDrag), dt(t, "mousemove", this._delayedDragTouchMoveHandler), dt(t, "touchmove", this._delayedDragTouchMoveHandler), dt(t, "pointermove", this._delayedDragTouchMoveHandler);
  },
  _triggerDragStart: function(t, n) {
    n = n || t.pointerType == "touch" && t, !this.nativeDraggable || n ? this.options.supportPointer ? gt(document, "pointermove", this._onTouchMove) : n ? gt(document, "touchmove", this._onTouchMove) : gt(document, "mousemove", this._onTouchMove) : (gt(we, "dragend", this), gt(qt, "dragstart", this._onDragStart));
    try {
      document.selection ? id(function() {
        document.selection.empty();
      }) : window.getSelection().removeAllRanges();
    } catch {
    }
  },
  _dragStarted: function(t, n) {
    if (ua = !1, qt && we) {
      rs("dragStarted", this, {
        evt: n
      }), this.nativeDraggable && gt(document, "dragover", QW);
      var s = this.options;
      !t && nn(we, s.dragClass, !1), nn(we, s.ghostClass, !0), Xe.active = this, t && this._appendGhost(), qn({
        sortable: this,
        name: "start",
        originalEvent: n
      });
    } else
      this._nulling();
  },
  _emulateDragOver: function() {
    if (Bs) {
      this._lastX = Bs.clientX, this._lastY = Bs.clientY, MN();
      for (var t = document.elementFromPoint(Bs.clientX, Bs.clientY), n = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(Bs.clientX, Bs.clientY), t !== n); )
        n = t;
      if (we.parentNode[Hn]._isOutsideThisEl(t), n)
        do {
          if (n[Hn]) {
            var s = void 0;
            if (s = n[Hn]._onDragOver({
              clientX: Bs.clientX,
              clientY: Bs.clientY,
              target: t,
              rootEl: n
            }), s && !this.options.dragoverBubble)
              break;
          }
          t = n;
        } while (n = n.parentNode);
      PN();
    }
  },
  _onTouchMove: function(t) {
    if (si) {
      var n = this.options, s = n.fallbackTolerance, o = n.fallbackOffset, i = t.touches ? t.touches[0] : t, r = ot && xi(ot, !0), a = ot && r && r.a, l = ot && r && r.d, c = Nu && Pn && db(Pn), d = (i.clientX - si.clientX + o.x) / (a || 1) + (c ? c[0] - rh[0] : 0) / (a || 1), f = (i.clientY - si.clientY + o.y) / (l || 1) + (c ? c[1] - rh[1] : 0) / (l || 1);
      if (!Xe.active && !ua) {
        if (s && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < s)
          return;
        this._onDragStart(t, !0);
      }
      if (ot) {
        r ? (r.e += d - (sh || 0), r.f += f - (oh || 0)) : r = {
          a: 1,
          b: 0,
          c: 0,
          d: 1,
          e: d,
          f
        };
        var p = "matrix(".concat(r.a, ",").concat(r.b, ",").concat(r.c, ",").concat(r.d, ",").concat(r.e, ",").concat(r.f, ")");
        Pe(ot, "webkitTransform", p), Pe(ot, "mozTransform", p), Pe(ot, "msTransform", p), Pe(ot, "transform", p), sh = d, oh = f, Bs = i;
      }
      t.cancelable && t.preventDefault();
    }
  },
  _appendGhost: function() {
    if (!ot) {
      var t = this.options.fallbackOnBody ? document.body : qt, n = en(we, !0, Nu, !0, t), s = this.options;
      if (Nu) {
        for (Pn = t; Pe(Pn, "position") === "static" && Pe(Pn, "transform") === "none" && Pn !== document; )
          Pn = Pn.parentNode;
        Pn !== document.body && Pn !== document.documentElement ? (Pn === document && (Pn = So()), n.top += Pn.scrollTop, n.left += Pn.scrollLeft) : Pn = So(), rh = db(Pn);
      }
      ot = we.cloneNode(!0), nn(ot, s.ghostClass, !1), nn(ot, s.fallbackClass, !0), nn(ot, s.dragClass, !0), Pe(ot, "transition", ""), Pe(ot, "transform", ""), Pe(ot, "box-sizing", "border-box"), Pe(ot, "margin", 0), Pe(ot, "top", n.top), Pe(ot, "left", n.left), Pe(ot, "width", n.width), Pe(ot, "height", n.height), Pe(ot, "opacity", "0.8"), Pe(ot, "position", Nu ? "absolute" : "fixed"), Pe(ot, "zIndex", "100000"), Pe(ot, "pointerEvents", "none"), Xe.ghost = ot, t.appendChild(ot), Pe(ot, "transform-origin", pb / parseInt(ot.style.width) * 100 + "% " + hb / parseInt(ot.style.height) * 100 + "%");
    }
  },
  _onDragStart: function(t, n) {
    var s = this, o = t.dataTransfer, i = s.options;
    if (rs("dragStart", this, {
      evt: t
    }), Xe.eventCanceled) {
      this._onDrop();
      return;
    }
    rs("setupClone", this), Xe.eventCanceled || (on = Og(we), on.draggable = !1, on.style["will-change"] = "", this._hideClone(), nn(on, this.options.chosenClass, !1), Xe.clone = on), s.cloneId = id(function() {
      rs("clone", s), !Xe.eventCanceled && (s.options.removeCloneOnHide || qt.insertBefore(on, we), s._hideClone(), qn({
        sortable: s,
        name: "clone"
      }));
    }), !n && nn(we, i.dragClass, !0), n ? (Yd = !0, s._loopId = setInterval(s._emulateDragOver, 50)) : (dt(document, "mouseup", s._onDrop), dt(document, "touchend", s._onDrop), dt(document, "touchcancel", s._onDrop), o && (o.effectAllowed = "move", i.setData && i.setData.call(s, o, we)), gt(document, "drop", s), Pe(we, "transform", "translateZ(0)")), ua = !0, s._dragStartId = id(s._dragStarted.bind(s, n, t)), gt(document, "selectstart", s), Cl = !0, Bl && Pe(document.body, "user-select", "none");
  },
  // Returns true - if no further action is needed (either inserted or another condition)
  _onDragOver: function(t) {
    var n = this.el, s = t.target, o, i, r, a = this.options, l = a.group, c = Xe.active, d = Su === l, f = a.sort, p = Rn || c, h, m = this, v = !1;
    if (wm) return;
    function g(X, te) {
      rs(X, m, To({
        evt: t,
        isOwner: d,
        axis: h ? "vertical" : "horizontal",
        revert: r,
        dragRect: o,
        targetRect: i,
        canSort: f,
        fromSortable: p,
        target: s,
        completed: S,
        onMove: function(Ge, Ye) {
          return Ou(qt, n, we, o, Ge, en(Ge), t, Ye);
        },
        changed: b
      }, te));
    }
    function _() {
      g("dragOverAnimationCapture"), m.captureAnimationState(), m !== p && p.captureAnimationState();
    }
    function S(X) {
      return g("dragOverCompleted", {
        insertion: X
      }), X && (d ? c._hideClone() : c._showClone(m), m !== p && (nn(we, Rn ? Rn.options.ghostClass : c.options.ghostClass, !1), nn(we, a.ghostClass, !0)), Rn !== m && m !== Xe.active ? Rn = m : m === Xe.active && Rn && (Rn = null), p === m && (m._ignoreWhileAnimating = s), m.animateAll(function() {
        g("dragOverAnimationComplete"), m._ignoreWhileAnimating = null;
      }), m !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (s === we && !we.animated || s === n && !s.animated) && (ia = null), !a.dragoverBubble && !t.rootEl && s !== document && (we.parentNode[Hn]._isOutsideThisEl(t.target), !X && oi(t)), !a.dragoverBubble && t.stopPropagation && t.stopPropagation(), v = !0;
    }
    function b() {
      gs = rn(we), kr = rn(we, a.draggable), qn({
        sortable: m,
        name: "change",
        toEl: n,
        newIndex: gs,
        newDraggableIndex: kr,
        originalEvent: t
      });
    }
    if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), s = Gs(s, a.draggable, n, !0), g("dragOver"), Xe.eventCanceled) return v;
    if (we.contains(t.target) || s.animated && s.animatingX && s.animatingY || m._ignoreWhileAnimating === s)
      return S(!1);
    if (Yd = !1, c && !a.disabled && (d ? f || (r = sn !== qt) : Rn === this || (this.lastPutMode = Su.checkPull(this, c, we, t)) && l.checkPut(this, c, we, t))) {
      if (h = this._getDirection(t, s) === "vertical", o = en(we), g("dragOverValid"), Xe.eventCanceled) return v;
      if (r)
        return sn = qt, _(), this._hideClone(), g("revert"), Xe.eventCanceled || (ci ? qt.insertBefore(we, ci) : qt.appendChild(we)), S(!0);
      var O = Ng(n, a.draggable);
      if (!O || nG(t, h, this) && !O.animated) {
        if (O === we)
          return S(!1);
        if (O && n === t.target && (s = O), s && (i = en(s)), Ou(qt, n, we, o, s, i, t, !!s) !== !1)
          return _(), n.appendChild(we), sn = n, b(), S(!0);
      } else if (O && tG(t, h, this)) {
        var w = ja(n, 0, a, !0);
        if (w === we)
          return S(!1);
        if (s = w, i = en(s), Ou(qt, n, we, o, s, i, t, !1) !== !1)
          return _(), n.insertBefore(we, w), sn = n, b(), S(!0);
      } else if (s.parentNode === n) {
        i = en(s);
        var N = 0, C, k = we.parentNode !== n, x = !qW(we.animated && we.toRect || o, s.animated && s.toRect || i, h), $ = h ? "top" : "left", M = ub(s, "top", "top") || ub(we, "top", "top"), R = M ? M.scrollTop : void 0;
        ia !== s && (C = i[$], Gl = !1, wu = !x && a.invertSwap || k), N = sG(t, s, i, h, x ? 1 : a.swapThreshold, a.invertedSwapThreshold == null ? a.swapThreshold : a.invertedSwapThreshold, wu, ia === s);
        var V;
        if (N !== 0) {
          var j = rn(we);
          do
            j -= N, V = sn.children[j];
          while (V && (Pe(V, "display") === "none" || V === ot));
        }
        if (N === 0 || V === s)
          return S(!1);
        ia = s, Wl = N;
        var U = s.nextElementSibling, A = !1;
        A = N === 1;
        var G = Ou(qt, n, we, o, s, i, t, A);
        if (G !== !1)
          return (G === 1 || G === -1) && (A = G === 1), wm = !0, setTimeout(eG, 30), _(), A && !U ? n.appendChild(we) : s.parentNode.insertBefore(we, A ? U : s), M && DN(M, 0, R - M.scrollTop), sn = we.parentNode, C !== void 0 && !wu && (rd = Math.abs(C - en(s)[$])), b(), S(!0);
      }
      if (n.contains(we))
        return S(!1);
    }
    return !1;
  },
  _ignoreWhileAnimating: null,
  _offMoveEvents: function() {
    dt(document, "mousemove", this._onTouchMove), dt(document, "touchmove", this._onTouchMove), dt(document, "pointermove", this._onTouchMove), dt(document, "dragover", oi), dt(document, "mousemove", oi), dt(document, "touchmove", oi);
  },
  _offUpEvents: function() {
    var t = this.el.ownerDocument;
    dt(t, "mouseup", this._onDrop), dt(t, "touchend", this._onDrop), dt(t, "pointerup", this._onDrop), dt(t, "touchcancel", this._onDrop), dt(document, "selectstart", this);
  },
  _onDrop: function(t) {
    var n = this.el, s = this.options;
    if (gs = rn(we), kr = rn(we, s.draggable), rs("drop", this, {
      evt: t
    }), sn = we && we.parentNode, gs = rn(we), kr = rn(we, s.draggable), Xe.eventCanceled) {
      this._nulling();
      return;
    }
    ua = !1, wu = !1, Gl = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Nm(this.cloneId), Nm(this._dragStartId), this.nativeDraggable && (dt(document, "drop", this), dt(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Bl && Pe(document.body, "user-select", ""), Pe(we, "transform", ""), t && (Cl && (t.cancelable && t.preventDefault(), !s.dropBubble && t.stopPropagation()), ot && ot.parentNode && ot.parentNode.removeChild(ot), (qt === sn || Rn && Rn.lastPutMode !== "clone") && on && on.parentNode && on.parentNode.removeChild(on), we && (this.nativeDraggable && dt(we, "dragend", this), ih(we), we.style["will-change"] = "", Cl && !ua && nn(we, Rn ? Rn.options.ghostClass : this.options.ghostClass, !1), nn(we, this.options.chosenClass, !1), qn({
      sortable: this,
      name: "unchoose",
      toEl: sn,
      newIndex: null,
      newDraggableIndex: null,
      originalEvent: t
    }), qt !== sn ? (gs >= 0 && (qn({
      rootEl: sn,
      name: "add",
      toEl: sn,
      fromEl: qt,
      originalEvent: t
    }), qn({
      sortable: this,
      name: "remove",
      toEl: sn,
      originalEvent: t
    }), qn({
      rootEl: sn,
      name: "sort",
      toEl: sn,
      fromEl: qt,
      originalEvent: t
    }), qn({
      sortable: this,
      name: "sort",
      toEl: sn,
      originalEvent: t
    })), Rn && Rn.save()) : gs !== ha && gs >= 0 && (qn({
      sortable: this,
      name: "update",
      toEl: sn,
      originalEvent: t
    }), qn({
      sortable: this,
      name: "sort",
      toEl: sn,
      originalEvent: t
    })), Xe.active && ((gs == null || gs === -1) && (gs = ha, kr = Yl), qn({
      sortable: this,
      name: "end",
      toEl: sn,
      originalEvent: t
    }), this.save()))), this._nulling();
  },
  _nulling: function() {
    rs("nulling", this), qt = we = sn = ot = ci = on = od = Ir = si = Bs = Cl = gs = kr = ha = Yl = ia = Wl = Rn = Su = Xe.dragged = Xe.ghost = Xe.clone = Xe.active = null, Gd.forEach(function(t) {
      t.checked = !0;
    }), Gd.length = sh = oh = 0;
  },
  handleEvent: function(t) {
    switch (t.type) {
      case "drop":
      case "dragend":
        this._onDrop(t);
        break;
      case "dragenter":
      case "dragover":
        we && (this._onDragOver(t), ZW(t));
        break;
      case "selectstart":
        t.preventDefault();
        break;
    }
  },
  /**
   * Serializes the item into an array of string.
   * @returns {String[]}
   */
  toArray: function() {
    for (var t = [], n, s = this.el.children, o = 0, i = s.length, r = this.options; o < i; o++)
      n = s[o], Gs(n, r.draggable, this.el, !1) && t.push(n.getAttribute(r.dataIdAttr) || rG(n));
    return t;
  },
  /**
   * Sorts the elements according to the array.
   * @param  {String[]}  order  order of the items
   */
  sort: function(t, n) {
    var s = {}, o = this.el;
    this.toArray().forEach(function(i, r) {
      var a = o.children[r];
      Gs(a, this.options.draggable, o, !1) && (s[i] = a);
    }, this), n && this.captureAnimationState(), t.forEach(function(i) {
      s[i] && (o.removeChild(s[i]), o.appendChild(s[i]));
    }), n && this.animateAll();
  },
  /**
   * Save the current sorting
   */
  save: function() {
    var t = this.options.store;
    t && t.set && t.set(this);
  },
  /**
   * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
   * @param   {HTMLElement}  el
   * @param   {String}       [selector]  default: `options.draggable`
   * @returns {HTMLElement|null}
   */
  closest: function(t, n) {
    return Gs(t, n || this.options.draggable, this.el, !1);
  },
  /**
   * Set/get option
   * @param   {string} name
   * @param   {*}      [value]
   * @returns {*}
   */
  option: function(t, n) {
    var s = this.options;
    if (n === void 0)
      return s[t];
    var o = Xc.modifyOption(this, t, n);
    typeof o < "u" ? s[t] = o : s[t] = n, t === "group" && AN(s);
  },
  /**
   * Destroy
   */
  destroy: function() {
    rs("destroy", this);
    var t = this.el;
    t[Hn] = null, dt(t, "mousedown", this._onTapStart), dt(t, "touchstart", this._onTapStart), dt(t, "pointerdown", this._onTapStart), this.nativeDraggable && (dt(t, "dragover", this), dt(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(n) {
      n.removeAttribute("draggable");
    }), this._onDrop(), this._disableDelayedDragEvents(), Wd.splice(Wd.indexOf(this.el), 1), this.el = t = null;
  },
  _hideClone: function() {
    if (!Ir) {
      if (rs("hideClone", this), Xe.eventCanceled) return;
      Pe(on, "display", "none"), this.options.removeCloneOnHide && on.parentNode && on.parentNode.removeChild(on), Ir = !0;
    }
  },
  _showClone: function(t) {
    if (t.lastPutMode !== "clone") {
      this._hideClone();
      return;
    }
    if (Ir) {
      if (rs("showClone", this), Xe.eventCanceled) return;
      we.parentNode == qt && !this.options.group.revertClone ? qt.insertBefore(on, we) : ci ? qt.insertBefore(on, ci) : qt.appendChild(on), this.options.group.revertClone && this.animate(we, on), Pe(on, "display", ""), Ir = !1;
    }
  }
};
function ZW(e) {
  e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
}
function Ou(e, t, n, s, o, i, r, a) {
  var l, c = e[Hn], d = c.options.onMove, f;
  return window.CustomEvent && !gr && !Kc ? l = new CustomEvent("move", {
    bubbles: !0,
    cancelable: !0
  }) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = e, l.dragged = n, l.draggedRect = s, l.related = o || t, l.relatedRect = i || en(t), l.willInsertAfter = a, l.originalEvent = r, e.dispatchEvent(l), d && (f = d.call(c, l, r)), f;
}
function ih(e) {
  e.draggable = !1;
}
function eG() {
  wm = !1;
}
function tG(e, t, n) {
  var s = en(ja(n.el, 0, n.options, !0)), o = 10;
  return t ? e.clientX < s.left - o || e.clientY < s.top && e.clientX < s.right : e.clientY < s.top - o || e.clientY < s.bottom && e.clientX < s.left;
}
function nG(e, t, n) {
  var s = en(Ng(n.el, n.options.draggable)), o = 10;
  return t ? e.clientX > s.right + o || e.clientX <= s.right && e.clientY > s.bottom && e.clientX >= s.left : e.clientX > s.right && e.clientY > s.top || e.clientX <= s.right && e.clientY > s.bottom + o;
}
function sG(e, t, n, s, o, i, r, a) {
  var l = s ? e.clientY : e.clientX, c = s ? n.height : n.width, d = s ? n.top : n.left, f = s ? n.bottom : n.right, p = !1;
  if (!r) {
    if (a && rd < c * o) {
      if (!Gl && (Wl === 1 ? l > d + c * i / 2 : l < f - c * i / 2) && (Gl = !0), Gl)
        p = !0;
      else if (Wl === 1 ? l < d + rd : l > f - rd)
        return -Wl;
    } else if (l > d + c * (1 - o) / 2 && l < f - c * (1 - o) / 2)
      return oG(t);
  }
  return p = p || r, p && (l < d + c * i / 2 || l > f - c * i / 2) ? l > d + c / 2 ? 1 : -1 : 0;
}
function oG(e) {
  return rn(we) < rn(e) ? 1 : -1;
}
function rG(e) {
  for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, s = 0; n--; )
    s += t.charCodeAt(n);
  return s.toString(36);
}
function iG(e) {
  Gd.length = 0;
  for (var t = e.getElementsByTagName("input"), n = t.length; n--; ) {
    var s = t[n];
    s.checked && Gd.push(s);
  }
}
function id(e) {
  return setTimeout(e, 0);
}
function Nm(e) {
  return clearTimeout(e);
}
cp && gt(document, "touchmove", function(e) {
  (Xe.active || ua) && e.cancelable && e.preventDefault();
});
Xe.utils = {
  on: gt,
  off: dt,
  css: Pe,
  find: $N,
  is: function(t, n) {
    return !!Gs(t, n, t, !1);
  },
  extend: HW,
  throttle: kN,
  closest: Gs,
  toggleClass: nn,
  clone: Og,
  index: rn,
  nextTick: id,
  cancelNextTick: Nm,
  detectDirection: RN,
  getChild: ja
};
Xe.get = function(e) {
  return e[Hn];
};
Xe.mount = function() {
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
    t[n] = arguments[n];
  t[0].constructor === Array && (t = t[0]), t.forEach(function(s) {
    if (!s.prototype || !s.prototype.constructor)
      throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(s));
    s.utils && (Xe.utils = To(To({}, Xe.utils), s.utils)), Xc.mount(s);
  });
};
Xe.create = function(e, t) {
  return new Xe(e, t);
};
Xe.version = FW;
var gn = [], Tl, Om, xm = !1, ah, lh, zd, $l;
function aG() {
  function e() {
    this.defaults = {
      scroll: !0,
      forceAutoScrollFallback: !1,
      scrollSensitivity: 30,
      scrollSpeed: 10,
      bubbleScroll: !0
    };
    for (var t in this)
      t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
  }
  return e.prototype = {
    dragStarted: function(n) {
      var s = n.originalEvent;
      this.sortable.nativeDraggable ? gt(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? gt(document, "pointermove", this._handleFallbackAutoScroll) : s.touches ? gt(document, "touchmove", this._handleFallbackAutoScroll) : gt(document, "mousemove", this._handleFallbackAutoScroll);
    },
    dragOverCompleted: function(n) {
      var s = n.originalEvent;
      !this.options.dragOverBubble && !s.rootEl && this._handleAutoScroll(s);
    },
    drop: function() {
      this.sortable.nativeDraggable ? dt(document, "dragover", this._handleAutoScroll) : (dt(document, "pointermove", this._handleFallbackAutoScroll), dt(document, "touchmove", this._handleFallbackAutoScroll), dt(document, "mousemove", this._handleFallbackAutoScroll)), vb(), ad(), YW();
    },
    nulling: function() {
      zd = Om = Tl = xm = $l = ah = lh = null, gn.length = 0;
    },
    _handleFallbackAutoScroll: function(n) {
      this._handleAutoScroll(n, !0);
    },
    _handleAutoScroll: function(n, s) {
      var o = this, i = (n.touches ? n.touches[0] : n).clientX, r = (n.touches ? n.touches[0] : n).clientY, a = document.elementFromPoint(i, r);
      if (zd = n, s || this.options.forceAutoScrollFallback || Kc || gr || Bl) {
        ch(n, this.options, a, s);
        var l = Vr(a, !0);
        xm && (!$l || i !== ah || r !== lh) && ($l && vb(), $l = setInterval(function() {
          var c = Vr(document.elementFromPoint(i, r), !0);
          c !== l && (l = c, ad()), ch(n, o.options, c, s);
        }, 10), ah = i, lh = r);
      } else {
        if (!this.options.bubbleScroll || Vr(a, !0) === So()) {
          ad();
          return;
        }
        ch(n, this.options, Vr(a, !1), !1);
      }
    }
  }, Ls(e, {
    pluginName: "scroll",
    initializeByDefault: !0
  });
}
function ad() {
  gn.forEach(function(e) {
    clearInterval(e.pid);
  }), gn = [];
}
function vb() {
  clearInterval($l);
}
var ch = kN(function(e, t, n, s) {
  if (t.scroll) {
    var o = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, r = t.scrollSensitivity, a = t.scrollSpeed, l = So(), c = !1, d;
    Om !== n && (Om = n, ad(), Tl = t.scroll, d = t.scrollFn, Tl === !0 && (Tl = Vr(n, !0)));
    var f = 0, p = Tl;
    do {
      var h = p, m = en(h), v = m.top, g = m.bottom, _ = m.left, S = m.right, b = m.width, O = m.height, w = void 0, N = void 0, C = h.scrollWidth, k = h.scrollHeight, x = Pe(h), $ = h.scrollLeft, M = h.scrollTop;
      h === l ? (w = b < C && (x.overflowX === "auto" || x.overflowX === "scroll" || x.overflowX === "visible"), N = O < k && (x.overflowY === "auto" || x.overflowY === "scroll" || x.overflowY === "visible")) : (w = b < C && (x.overflowX === "auto" || x.overflowX === "scroll"), N = O < k && (x.overflowY === "auto" || x.overflowY === "scroll"));
      var R = w && (Math.abs(S - o) <= r && $ + b < C) - (Math.abs(_ - o) <= r && !!$), V = N && (Math.abs(g - i) <= r && M + O < k) - (Math.abs(v - i) <= r && !!M);
      if (!gn[f])
        for (var j = 0; j <= f; j++)
          gn[j] || (gn[j] = {});
      (gn[f].vx != R || gn[f].vy != V || gn[f].el !== h) && (gn[f].el = h, gn[f].vx = R, gn[f].vy = V, clearInterval(gn[f].pid), (R != 0 || V != 0) && (c = !0, gn[f].pid = setInterval((function() {
        s && this.layer === 0 && Xe.active._onTouchMove(zd);
        var U = gn[this.layer].vy ? gn[this.layer].vy * a : 0, A = gn[this.layer].vx ? gn[this.layer].vx * a : 0;
        typeof d == "function" && d.call(Xe.dragged.parentNode[Hn], A, U, e, zd, gn[this.layer].el) !== "continue" || DN(gn[this.layer].el, A, U);
      }).bind({
        layer: f
      }), 24))), f++;
    } while (t.bubbleScroll && p !== l && (p = Vr(p, !1)));
    xm = c;
  }
}, 30), VN = function(t) {
  var n = t.originalEvent, s = t.putSortable, o = t.dragEl, i = t.activeSortable, r = t.dispatchSortableEvent, a = t.hideGhostForTarget, l = t.unhideGhostForTarget;
  if (n) {
    var c = s || i;
    a();
    var d = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, f = document.elementFromPoint(d.clientX, d.clientY);
    l(), c && !c.el.contains(f) && (r("spill"), this.onSpill({
      dragEl: o,
      putSortable: s
    }));
  }
};
function xg() {
}
xg.prototype = {
  startIndex: null,
  dragStart: function(t) {
    var n = t.oldDraggableIndex;
    this.startIndex = n;
  },
  onSpill: function(t) {
    var n = t.dragEl, s = t.putSortable;
    this.sortable.captureAnimationState(), s && s.captureAnimationState();
    var o = ja(this.sortable.el, this.startIndex, this.options);
    o ? this.sortable.el.insertBefore(n, o) : this.sortable.el.appendChild(n), this.sortable.animateAll(), s && s.animateAll();
  },
  drop: VN
};
Ls(xg, {
  pluginName: "revertOnSpill"
});
function Cg() {
}
Cg.prototype = {
  onSpill: function(t) {
    var n = t.dragEl, s = t.putSortable, o = s || this.sortable;
    o.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), o.animateAll();
  },
  drop: VN
};
Ls(Cg, {
  pluginName: "removeOnSpill"
});
var Cs;
function lG() {
  function e() {
    this.defaults = {
      swapClass: "sortable-swap-highlight"
    };
  }
  return e.prototype = {
    dragStart: function(n) {
      var s = n.dragEl;
      Cs = s;
    },
    dragOverValid: function(n) {
      var s = n.completed, o = n.target, i = n.onMove, r = n.activeSortable, a = n.changed, l = n.cancel;
      if (r.options.swap) {
        var c = this.sortable.el, d = this.options;
        if (o && o !== c) {
          var f = Cs;
          i(o) !== !1 ? (nn(o, d.swapClass, !0), Cs = o) : Cs = null, f && f !== Cs && nn(f, d.swapClass, !1);
        }
        a(), s(!0), l();
      }
    },
    drop: function(n) {
      var s = n.activeSortable, o = n.putSortable, i = n.dragEl, r = o || this.sortable, a = this.options;
      Cs && nn(Cs, a.swapClass, !1), Cs && (a.swap || o && o.options.swap) && i !== Cs && (r.captureAnimationState(), r !== s && s.captureAnimationState(), cG(i, Cs), r.animateAll(), r !== s && s.animateAll());
    },
    nulling: function() {
      Cs = null;
    }
  }, Ls(e, {
    pluginName: "swap",
    eventProperties: function() {
      return {
        swapItem: Cs
      };
    }
  });
}
function cG(e, t) {
  var n = e.parentNode, s = t.parentNode, o, i;
  !n || !s || n.isEqualNode(t) || s.isEqualNode(e) || (o = rn(e), i = rn(t), n.isEqualNode(s) && o < i && i++, n.insertBefore(t, n.children[o]), s.insertBefore(e, s.children[i]));
}
var tt = [], vs = [], gl, Hs, yl = !1, is = !1, aa = !1, Yt, _l, xu;
function uG() {
  function e(t) {
    for (var n in this)
      n.charAt(0) === "_" && typeof this[n] == "function" && (this[n] = this[n].bind(this));
    t.options.supportPointer ? gt(document, "pointerup", this._deselectMultiDrag) : (gt(document, "mouseup", this._deselectMultiDrag), gt(document, "touchend", this._deselectMultiDrag)), gt(document, "keydown", this._checkKeyDown), gt(document, "keyup", this._checkKeyUp), this.defaults = {
      selectedClass: "sortable-selected",
      multiDragKey: null,
      setData: function(o, i) {
        var r = "";
        tt.length && Hs === t ? tt.forEach(function(a, l) {
          r += (l ? ", " : "") + a.textContent;
        }) : r = i.textContent, o.setData("Text", r);
      }
    };
  }
  return e.prototype = {
    multiDragKeyDown: !1,
    isMultiDrag: !1,
    delayStartGlobal: function(n) {
      var s = n.dragEl;
      Yt = s;
    },
    delayEnded: function() {
      this.isMultiDrag = ~tt.indexOf(Yt);
    },
    setupClone: function(n) {
      var s = n.sortable, o = n.cancel;
      if (this.isMultiDrag) {
        for (var i = 0; i < tt.length; i++)
          vs.push(Og(tt[i])), vs[i].sortableIndex = tt[i].sortableIndex, vs[i].draggable = !1, vs[i].style["will-change"] = "", nn(vs[i], this.options.selectedClass, !1), tt[i] === Yt && nn(vs[i], this.options.chosenClass, !1);
        s._hideClone(), o();
      }
    },
    clone: function(n) {
      var s = n.sortable, o = n.rootEl, i = n.dispatchSortableEvent, r = n.cancel;
      this.isMultiDrag && (this.options.removeCloneOnHide || tt.length && Hs === s && (gb(!0, o), i("clone"), r()));
    },
    showClone: function(n) {
      var s = n.cloneNowShown, o = n.rootEl, i = n.cancel;
      this.isMultiDrag && (gb(!1, o), vs.forEach(function(r) {
        Pe(r, "display", "");
      }), s(), xu = !1, i());
    },
    hideClone: function(n) {
      var s = this;
      n.sortable;
      var o = n.cloneNowHidden, i = n.cancel;
      this.isMultiDrag && (vs.forEach(function(r) {
        Pe(r, "display", "none"), s.options.removeCloneOnHide && r.parentNode && r.parentNode.removeChild(r);
      }), o(), xu = !0, i());
    },
    dragStartGlobal: function(n) {
      n.sortable, !this.isMultiDrag && Hs && Hs.multiDrag._deselectMultiDrag(), tt.forEach(function(s) {
        s.sortableIndex = rn(s);
      }), tt = tt.sort(function(s, o) {
        return s.sortableIndex - o.sortableIndex;
      }), aa = !0;
    },
    dragStarted: function(n) {
      var s = this, o = n.sortable;
      if (this.isMultiDrag) {
        if (this.options.sort && (o.captureAnimationState(), this.options.animation)) {
          tt.forEach(function(r) {
            r !== Yt && Pe(r, "position", "absolute");
          });
          var i = en(Yt, !1, !0, !0);
          tt.forEach(function(r) {
            r !== Yt && fb(r, i);
          }), is = !0, yl = !0;
        }
        o.animateAll(function() {
          is = !1, yl = !1, s.options.animation && tt.forEach(function(r) {
            th(r);
          }), s.options.sort && Cu();
        });
      }
    },
    dragOver: function(n) {
      var s = n.target, o = n.completed, i = n.cancel;
      is && ~tt.indexOf(s) && (o(!1), i());
    },
    revert: function(n) {
      var s = n.fromSortable, o = n.rootEl, i = n.sortable, r = n.dragRect;
      tt.length > 1 && (tt.forEach(function(a) {
        i.addAnimationState({
          target: a,
          rect: is ? en(a) : r
        }), th(a), a.fromRect = r, s.removeAnimationState(a);
      }), is = !1, dG(!this.options.removeCloneOnHide, o));
    },
    dragOverCompleted: function(n) {
      var s = n.sortable, o = n.isOwner, i = n.insertion, r = n.activeSortable, a = n.parentEl, l = n.putSortable, c = this.options;
      if (i) {
        if (o && r._hideClone(), yl = !1, c.animation && tt.length > 1 && (is || !o && !r.options.sort && !l)) {
          var d = en(Yt, !1, !0, !0);
          tt.forEach(function(p) {
            p !== Yt && (fb(p, d), a.appendChild(p));
          }), is = !0;
        }
        if (!o)
          if (is || Cu(), tt.length > 1) {
            var f = xu;
            r._showClone(s), r.options.animation && !xu && f && vs.forEach(function(p) {
              r.addAnimationState({
                target: p,
                rect: _l
              }), p.fromRect = _l, p.thisAnimationDuration = null;
            });
          } else
            r._showClone(s);
      }
    },
    dragOverAnimationCapture: function(n) {
      var s = n.dragRect, o = n.isOwner, i = n.activeSortable;
      if (tt.forEach(function(a) {
        a.thisAnimationDuration = null;
      }), i.options.animation && !o && i.multiDrag.isMultiDrag) {
        _l = Ls({}, s);
        var r = xi(Yt, !0);
        _l.top -= r.f, _l.left -= r.e;
      }
    },
    dragOverAnimationComplete: function() {
      is && (is = !1, Cu());
    },
    drop: function(n) {
      var s = n.originalEvent, o = n.rootEl, i = n.parentEl, r = n.sortable, a = n.dispatchSortableEvent, l = n.oldIndex, c = n.putSortable, d = c || this.sortable;
      if (s) {
        var f = this.options, p = i.children;
        if (!aa)
          if (f.multiDragKey && !this.multiDragKeyDown && this._deselectMultiDrag(), nn(Yt, f.selectedClass, !~tt.indexOf(Yt)), ~tt.indexOf(Yt))
            tt.splice(tt.indexOf(Yt), 1), gl = null, xl({
              sortable: r,
              rootEl: o,
              name: "deselect",
              targetEl: Yt
            });
          else {
            if (tt.push(Yt), xl({
              sortable: r,
              rootEl: o,
              name: "select",
              targetEl: Yt
            }), s.shiftKey && gl && r.el.contains(gl)) {
              var h = rn(gl), m = rn(Yt);
              if (~h && ~m && h !== m) {
                var v, g;
                for (m > h ? (g = h, v = m) : (g = m, v = h + 1); g < v; g++)
                  ~tt.indexOf(p[g]) || (nn(p[g], f.selectedClass, !0), tt.push(p[g]), xl({
                    sortable: r,
                    rootEl: o,
                    name: "select",
                    targetEl: p[g]
                  }));
              }
            } else
              gl = Yt;
            Hs = d;
          }
        if (aa && this.isMultiDrag) {
          if (is = !1, (i[Hn].options.sort || i !== o) && tt.length > 1) {
            var _ = en(Yt), S = rn(Yt, ":not(." + this.options.selectedClass + ")");
            if (!yl && f.animation && (Yt.thisAnimationDuration = null), d.captureAnimationState(), !yl && (f.animation && (Yt.fromRect = _, tt.forEach(function(O) {
              if (O.thisAnimationDuration = null, O !== Yt) {
                var w = is ? en(O) : _;
                O.fromRect = w, d.addAnimationState({
                  target: O,
                  rect: w
                });
              }
            })), Cu(), tt.forEach(function(O) {
              p[S] ? i.insertBefore(O, p[S]) : i.appendChild(O), S++;
            }), l === rn(Yt))) {
              var b = !1;
              tt.forEach(function(O) {
                if (O.sortableIndex !== rn(O)) {
                  b = !0;
                  return;
                }
              }), b && a("update");
            }
            tt.forEach(function(O) {
              th(O);
            }), d.animateAll();
          }
          Hs = d;
        }
        (o === i || c && c.lastPutMode !== "clone") && vs.forEach(function(O) {
          O.parentNode && O.parentNode.removeChild(O);
        });
      }
    },
    nullingGlobal: function() {
      this.isMultiDrag = aa = !1, vs.length = 0;
    },
    destroyGlobal: function() {
      this._deselectMultiDrag(), dt(document, "pointerup", this._deselectMultiDrag), dt(document, "mouseup", this._deselectMultiDrag), dt(document, "touchend", this._deselectMultiDrag), dt(document, "keydown", this._checkKeyDown), dt(document, "keyup", this._checkKeyUp);
    },
    _deselectMultiDrag: function(n) {
      if (!(typeof aa < "u" && aa) && Hs === this.sortable && !(n && Gs(n.target, this.options.draggable, this.sortable.el, !1)) && !(n && n.button !== 0))
        for (; tt.length; ) {
          var s = tt[0];
          nn(s, this.options.selectedClass, !1), tt.shift(), xl({
            sortable: this.sortable,
            rootEl: this.sortable.el,
            name: "deselect",
            targetEl: s
          });
        }
    },
    _checkKeyDown: function(n) {
      n.key === this.options.multiDragKey && (this.multiDragKeyDown = !0);
    },
    _checkKeyUp: function(n) {
      n.key === this.options.multiDragKey && (this.multiDragKeyDown = !1);
    }
  }, Ls(e, {
    // Static methods & properties
    pluginName: "multiDrag",
    utils: {
      /**
       * Selects the provided multi-drag item
       * @param  {HTMLElement} el    The element to be selected
       */
      select: function(n) {
        var s = n.parentNode[Hn];
        !s || !s.options.multiDrag || ~tt.indexOf(n) || (Hs && Hs !== s && (Hs.multiDrag._deselectMultiDrag(), Hs = s), nn(n, s.options.selectedClass, !0), tt.push(n));
      },
      /**
       * Deselects the provided multi-drag item
       * @param  {HTMLElement} el    The element to be deselected
       */
      deselect: function(n) {
        var s = n.parentNode[Hn], o = tt.indexOf(n);
        !s || !s.options.multiDrag || !~o || (nn(n, s.options.selectedClass, !1), tt.splice(o, 1));
      }
    },
    eventProperties: function() {
      var n = this, s = [], o = [];
      return tt.forEach(function(i) {
        s.push({
          multiDragElement: i,
          index: i.sortableIndex
        });
        var r;
        is && i !== Yt ? r = -1 : is ? r = rn(i, ":not(." + n.options.selectedClass + ")") : r = rn(i), o.push({
          multiDragElement: i,
          index: r
        });
      }), {
        items: AW(tt),
        clones: [].concat(vs),
        oldIndicies: s,
        newIndicies: o
      };
    },
    optionListeners: {
      multiDragKey: function(n) {
        return n = n.toLowerCase(), n === "ctrl" ? n = "Control" : n.length > 1 && (n = n.charAt(0).toUpperCase() + n.substr(1)), n;
      }
    }
  });
}
function dG(e, t) {
  tt.forEach(function(n, s) {
    var o = t.children[n.sortableIndex + (e ? Number(s) : 0)];
    o ? t.insertBefore(n, o) : t.appendChild(n);
  });
}
function gb(e, t) {
  vs.forEach(function(n, s) {
    var o = t.children[n.sortableIndex + (e ? Number(s) : 0)];
    o ? t.insertBefore(n, o) : t.appendChild(n);
  });
}
function Cu() {
  tt.forEach(function(e) {
    e !== Yt && e.parentNode && e.parentNode.removeChild(e);
  });
}
Xe.mount(new aG());
Xe.mount(Cg, xg);
const fG = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  MultiDrag: uG,
  Sortable: Xe,
  Swap: lG,
  default: Xe
}, Symbol.toStringTag, { value: "Module" })), pG = /* @__PURE__ */ Yf(fG);
var hG = qu.exports, yb;
function mG() {
  return yb || (yb = 1, function(e, t) {
    (function(s, o) {
      e.exports = o(kW(), pG);
    })(typeof self < "u" ? self : hG, function(n, s) {
      return (
        /******/
        function(o) {
          var i = {};
          function r(a) {
            if (i[a])
              return i[a].exports;
            var l = i[a] = {
              /******/
              i: a,
              /******/
              l: !1,
              /******/
              exports: {}
              /******/
            };
            return o[a].call(l.exports, l, l.exports, r), l.l = !0, l.exports;
          }
          return r.m = o, r.c = i, r.d = function(a, l, c) {
            r.o(a, l) || Object.defineProperty(a, l, { enumerable: !0, get: c });
          }, r.r = function(a) {
            typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(a, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(a, "__esModule", { value: !0 });
          }, r.t = function(a, l) {
            if (l & 1 && (a = r(a)), l & 8 || l & 4 && typeof a == "object" && a && a.__esModule) return a;
            var c = /* @__PURE__ */ Object.create(null);
            if (r.r(c), Object.defineProperty(c, "default", { enumerable: !0, value: a }), l & 2 && typeof a != "string") for (var d in a) r.d(c, d, (function(f) {
              return a[f];
            }).bind(null, d));
            return c;
          }, r.n = function(a) {
            var l = a && a.__esModule ? (
              /******/
              function() {
                return a.default;
              }
            ) : (
              /******/
              function() {
                return a;
              }
            );
            return r.d(l, "a", l), l;
          }, r.o = function(a, l) {
            return Object.prototype.hasOwnProperty.call(a, l);
          }, r.p = "", r(r.s = "fb15");
        }({
          /***/
          "00ee": (
            /***/
            function(o, i, r) {
              var a = r("b622"), l = a("toStringTag"), c = {};
              c[l] = "z", o.exports = String(c) === "[object z]";
            }
          ),
          /***/
          "0366": (
            /***/
            function(o, i, r) {
              var a = r("1c0b");
              o.exports = function(l, c, d) {
                if (a(l), c === void 0) return l;
                switch (d) {
                  case 0:
                    return function() {
                      return l.call(c);
                    };
                  case 1:
                    return function(f) {
                      return l.call(c, f);
                    };
                  case 2:
                    return function(f, p) {
                      return l.call(c, f, p);
                    };
                  case 3:
                    return function(f, p, h) {
                      return l.call(c, f, p, h);
                    };
                }
                return function() {
                  return l.apply(c, arguments);
                };
              };
            }
          ),
          /***/
          "057f": (
            /***/
            function(o, i, r) {
              var a = r("fc6a"), l = r("241c").f, c = {}.toString, d = typeof window == "object" && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], f = function(p) {
                try {
                  return l(p);
                } catch {
                  return d.slice();
                }
              };
              o.exports.f = function(h) {
                return d && c.call(h) == "[object Window]" ? f(h) : l(a(h));
              };
            }
          ),
          /***/
          "06cf": (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("d1e7"), c = r("5c6c"), d = r("fc6a"), f = r("c04e"), p = r("5135"), h = r("0cfb"), m = Object.getOwnPropertyDescriptor;
              i.f = a ? m : function(g, _) {
                if (g = d(g), _ = f(_, !0), h) try {
                  return m(g, _);
                } catch {
                }
                if (p(g, _)) return c(!l.f.call(g, _), g[_]);
              };
            }
          ),
          /***/
          "0cfb": (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("d039"), c = r("cc12");
              o.exports = !a && !l(function() {
                return Object.defineProperty(c("div"), "a", {
                  get: function() {
                    return 7;
                  }
                }).a != 7;
              });
            }
          ),
          /***/
          "13d5": (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("d58f").left, c = r("a640"), d = r("ae40"), f = c("reduce"), p = d("reduce", { 1: 0 });
              a({ target: "Array", proto: !0, forced: !f || !p }, {
                reduce: function(m) {
                  return l(this, m, arguments.length, arguments.length > 1 ? arguments[1] : void 0);
                }
              });
            }
          ),
          /***/
          "14c3": (
            /***/
            function(o, i, r) {
              var a = r("c6b6"), l = r("9263");
              o.exports = function(c, d) {
                var f = c.exec;
                if (typeof f == "function") {
                  var p = f.call(c, d);
                  if (typeof p != "object")
                    throw TypeError("RegExp exec method returned something other than an Object or null");
                  return p;
                }
                if (a(c) !== "RegExp")
                  throw TypeError("RegExp#exec called on incompatible receiver");
                return l.call(c, d);
              };
            }
          ),
          /***/
          "159b": (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("fdbc"), c = r("17c2"), d = r("9112");
              for (var f in l) {
                var p = a[f], h = p && p.prototype;
                if (h && h.forEach !== c) try {
                  d(h, "forEach", c);
                } catch {
                  h.forEach = c;
                }
              }
            }
          ),
          /***/
          "17c2": (
            /***/
            function(o, i, r) {
              var a = r("b727").forEach, l = r("a640"), c = r("ae40"), d = l("forEach"), f = c("forEach");
              o.exports = !d || !f ? function(h) {
                return a(this, h, arguments.length > 1 ? arguments[1] : void 0);
              } : [].forEach;
            }
          ),
          /***/
          "1be4": (
            /***/
            function(o, i, r) {
              var a = r("d066");
              o.exports = a("document", "documentElement");
            }
          ),
          /***/
          "1c0b": (
            /***/
            function(o, i) {
              o.exports = function(r) {
                if (typeof r != "function")
                  throw TypeError(String(r) + " is not a function");
                return r;
              };
            }
          ),
          /***/
          "1c7e": (
            /***/
            function(o, i, r) {
              var a = r("b622"), l = a("iterator"), c = !1;
              try {
                var d = 0, f = {
                  next: function() {
                    return { done: !!d++ };
                  },
                  return: function() {
                    c = !0;
                  }
                };
                f[l] = function() {
                  return this;
                }, Array.from(f, function() {
                  throw 2;
                });
              } catch {
              }
              o.exports = function(p, h) {
                if (!h && !c) return !1;
                var m = !1;
                try {
                  var v = {};
                  v[l] = function() {
                    return {
                      next: function() {
                        return { done: m = !0 };
                      }
                    };
                  }, p(v);
                } catch {
                }
                return m;
              };
            }
          ),
          /***/
          "1d80": (
            /***/
            function(o, i) {
              o.exports = function(r) {
                if (r == null) throw TypeError("Can't call method on " + r);
                return r;
              };
            }
          ),
          /***/
          "1dde": (
            /***/
            function(o, i, r) {
              var a = r("d039"), l = r("b622"), c = r("2d00"), d = l("species");
              o.exports = function(f) {
                return c >= 51 || !a(function() {
                  var p = [], h = p.constructor = {};
                  return h[d] = function() {
                    return { foo: 1 };
                  }, p[f](Boolean).foo !== 1;
                });
              };
            }
          ),
          /***/
          "23cb": (
            /***/
            function(o, i, r) {
              var a = r("a691"), l = Math.max, c = Math.min;
              o.exports = function(d, f) {
                var p = a(d);
                return p < 0 ? l(p + f, 0) : c(p, f);
              };
            }
          ),
          /***/
          "23e7": (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("06cf").f, c = r("9112"), d = r("6eeb"), f = r("ce4e"), p = r("e893"), h = r("94ca");
              o.exports = function(m, v) {
                var g = m.target, _ = m.global, S = m.stat, b, O, w, N, C, k;
                if (_ ? O = a : S ? O = a[g] || f(g, {}) : O = (a[g] || {}).prototype, O) for (w in v) {
                  if (C = v[w], m.noTargetGet ? (k = l(O, w), N = k && k.value) : N = O[w], b = h(_ ? w : g + (S ? "." : "#") + w, m.forced), !b && N !== void 0) {
                    if (typeof C == typeof N) continue;
                    p(C, N);
                  }
                  (m.sham || N && N.sham) && c(C, "sham", !0), d(O, w, C, m);
                }
              };
            }
          ),
          /***/
          "241c": (
            /***/
            function(o, i, r) {
              var a = r("ca84"), l = r("7839"), c = l.concat("length", "prototype");
              i.f = Object.getOwnPropertyNames || function(f) {
                return a(f, c);
              };
            }
          ),
          /***/
          "25f0": (
            /***/
            function(o, i, r) {
              var a = r("6eeb"), l = r("825a"), c = r("d039"), d = r("ad6d"), f = "toString", p = RegExp.prototype, h = p[f], m = c(function() {
                return h.call({ source: "a", flags: "b" }) != "/a/b";
              }), v = h.name != f;
              (m || v) && a(RegExp.prototype, f, function() {
                var _ = l(this), S = String(_.source), b = _.flags, O = String(b === void 0 && _ instanceof RegExp && !("flags" in p) ? d.call(_) : b);
                return "/" + S + "/" + O;
              }, { unsafe: !0 });
            }
          ),
          /***/
          "2ca0": (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("06cf").f, c = r("50c4"), d = r("5a34"), f = r("1d80"), p = r("ab13"), h = r("c430"), m = "".startsWith, v = Math.min, g = p("startsWith"), _ = !h && !g && !!function() {
                var S = l(String.prototype, "startsWith");
                return S && !S.writable;
              }();
              a({ target: "String", proto: !0, forced: !_ && !g }, {
                startsWith: function(b) {
                  var O = String(f(this));
                  d(b);
                  var w = c(v(arguments.length > 1 ? arguments[1] : void 0, O.length)), N = String(b);
                  return m ? m.call(O, N, w) : O.slice(w, w + N.length) === N;
                }
              });
            }
          ),
          /***/
          "2d00": (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("342f"), c = a.process, d = c && c.versions, f = d && d.v8, p, h;
              f ? (p = f.split("."), h = p[0] + p[1]) : l && (p = l.match(/Edge\/(\d+)/), (!p || p[1] >= 74) && (p = l.match(/Chrome\/(\d+)/), p && (h = p[1]))), o.exports = h && +h;
            }
          ),
          /***/
          "342f": (
            /***/
            function(o, i, r) {
              var a = r("d066");
              o.exports = a("navigator", "userAgent") || "";
            }
          ),
          /***/
          "35a1": (
            /***/
            function(o, i, r) {
              var a = r("f5df"), l = r("3f8c"), c = r("b622"), d = c("iterator");
              o.exports = function(f) {
                if (f != null) return f[d] || f["@@iterator"] || l[a(f)];
              };
            }
          ),
          /***/
          "37e8": (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("9bf2"), c = r("825a"), d = r("df75");
              o.exports = a ? Object.defineProperties : function(p, h) {
                c(p);
                for (var m = d(h), v = m.length, g = 0, _; v > g; ) l.f(p, _ = m[g++], h[_]);
                return p;
              };
            }
          ),
          /***/
          "3bbe": (
            /***/
            function(o, i, r) {
              var a = r("861d");
              o.exports = function(l) {
                if (!a(l) && l !== null)
                  throw TypeError("Can't set " + String(l) + " as a prototype");
                return l;
              };
            }
          ),
          /***/
          "3ca3": (
            /***/
            function(o, i, r) {
              var a = r("6547").charAt, l = r("69f3"), c = r("7dd0"), d = "String Iterator", f = l.set, p = l.getterFor(d);
              c(String, "String", function(h) {
                f(this, {
                  type: d,
                  string: String(h),
                  index: 0
                });
              }, function() {
                var m = p(this), v = m.string, g = m.index, _;
                return g >= v.length ? { value: void 0, done: !0 } : (_ = a(v, g), m.index += _.length, { value: _, done: !1 });
              });
            }
          ),
          /***/
          "3f8c": (
            /***/
            function(o, i) {
              o.exports = {};
            }
          ),
          /***/
          4160: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("17c2");
              a({ target: "Array", proto: !0, forced: [].forEach != l }, {
                forEach: l
              });
            }
          ),
          /***/
          "428f": (
            /***/
            function(o, i, r) {
              var a = r("da84");
              o.exports = a;
            }
          ),
          /***/
          "44ad": (
            /***/
            function(o, i, r) {
              var a = r("d039"), l = r("c6b6"), c = "".split;
              o.exports = a(function() {
                return !Object("z").propertyIsEnumerable(0);
              }) ? function(d) {
                return l(d) == "String" ? c.call(d, "") : Object(d);
              } : Object;
            }
          ),
          /***/
          "44d2": (
            /***/
            function(o, i, r) {
              var a = r("b622"), l = r("7c73"), c = r("9bf2"), d = a("unscopables"), f = Array.prototype;
              f[d] == null && c.f(f, d, {
                configurable: !0,
                value: l(null)
              }), o.exports = function(p) {
                f[d][p] = !0;
              };
            }
          ),
          /***/
          "44e7": (
            /***/
            function(o, i, r) {
              var a = r("861d"), l = r("c6b6"), c = r("b622"), d = c("match");
              o.exports = function(f) {
                var p;
                return a(f) && ((p = f[d]) !== void 0 ? !!p : l(f) == "RegExp");
              };
            }
          ),
          /***/
          4930: (
            /***/
            function(o, i, r) {
              var a = r("d039");
              o.exports = !!Object.getOwnPropertySymbols && !a(function() {
                return !String(Symbol());
              });
            }
          ),
          /***/
          "4d64": (
            /***/
            function(o, i, r) {
              var a = r("fc6a"), l = r("50c4"), c = r("23cb"), d = function(f) {
                return function(p, h, m) {
                  var v = a(p), g = l(v.length), _ = c(m, g), S;
                  if (f && h != h) {
                    for (; g > _; )
                      if (S = v[_++], S != S) return !0;
                  } else for (; g > _; _++)
                    if ((f || _ in v) && v[_] === h) return f || _ || 0;
                  return !f && -1;
                };
              };
              o.exports = {
                // `Array.prototype.includes` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.includes
                includes: d(!0),
                // `Array.prototype.indexOf` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
                indexOf: d(!1)
              };
            }
          ),
          /***/
          "4de4": (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("b727").filter, c = r("1dde"), d = r("ae40"), f = c("filter"), p = d("filter");
              a({ target: "Array", proto: !0, forced: !f || !p }, {
                filter: function(m) {
                  return l(this, m, arguments.length > 1 ? arguments[1] : void 0);
                }
              });
            }
          ),
          /***/
          "4df4": (
            /***/
            function(o, i, r) {
              var a = r("0366"), l = r("7b0b"), c = r("9bdd"), d = r("e95a"), f = r("50c4"), p = r("8418"), h = r("35a1");
              o.exports = function(v) {
                var g = l(v), _ = typeof this == "function" ? this : Array, S = arguments.length, b = S > 1 ? arguments[1] : void 0, O = b !== void 0, w = h(g), N = 0, C, k, x, $, M, R;
                if (O && (b = a(b, S > 2 ? arguments[2] : void 0, 2)), w != null && !(_ == Array && d(w)))
                  for ($ = w.call(g), M = $.next, k = new _(); !(x = M.call($)).done; N++)
                    R = O ? c($, b, [x.value, N], !0) : x.value, p(k, N, R);
                else
                  for (C = f(g.length), k = new _(C); C > N; N++)
                    R = O ? b(g[N], N) : g[N], p(k, N, R);
                return k.length = N, k;
              };
            }
          ),
          /***/
          "4fad": (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("6f53").entries;
              a({ target: "Object", stat: !0 }, {
                entries: function(d) {
                  return l(d);
                }
              });
            }
          ),
          /***/
          "50c4": (
            /***/
            function(o, i, r) {
              var a = r("a691"), l = Math.min;
              o.exports = function(c) {
                return c > 0 ? l(a(c), 9007199254740991) : 0;
              };
            }
          ),
          /***/
          5135: (
            /***/
            function(o, i) {
              var r = {}.hasOwnProperty;
              o.exports = function(a, l) {
                return r.call(a, l);
              };
            }
          ),
          /***/
          5319: (
            /***/
            function(o, i, r) {
              var a = r("d784"), l = r("825a"), c = r("7b0b"), d = r("50c4"), f = r("a691"), p = r("1d80"), h = r("8aa5"), m = r("14c3"), v = Math.max, g = Math.min, _ = Math.floor, S = /\$([$&'`]|\d\d?|<[^>]*>)/g, b = /\$([$&'`]|\d\d?)/g, O = function(w) {
                return w === void 0 ? w : String(w);
              };
              a("replace", 2, function(w, N, C, k) {
                var x = k.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE, $ = k.REPLACE_KEEPS_$0, M = x ? "$" : "$0";
                return [
                  // `String.prototype.replace` method
                  // https://tc39.github.io/ecma262/#sec-string.prototype.replace
                  function(j, U) {
                    var A = p(this), G = j == null ? void 0 : j[w];
                    return G !== void 0 ? G.call(j, A, U) : N.call(String(A), j, U);
                  },
                  // `RegExp.prototype[@@replace]` method
                  // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
                  function(V, j) {
                    if (!x && $ || typeof j == "string" && j.indexOf(M) === -1) {
                      var U = C(N, V, this, j);
                      if (U.done) return U.value;
                    }
                    var A = l(V), G = String(this), X = typeof j == "function";
                    X || (j = String(j));
                    var te = A.global;
                    if (te) {
                      var $e = A.unicode;
                      A.lastIndex = 0;
                    }
                    for (var Ge = []; ; ) {
                      var Ye = m(A, G);
                      if (Ye === null || (Ge.push(Ye), !te)) break;
                      var et = String(Ye[0]);
                      et === "" && (A.lastIndex = h(G, d(A.lastIndex), $e));
                    }
                    for (var Dt = "", Pt = 0, _t = 0; _t < Ge.length; _t++) {
                      Ye = Ge[_t];
                      for (var q = String(Ye[0]), _e = v(g(f(Ye.index), G.length), 0), ge = [], ke = 1; ke < Ye.length; ke++) ge.push(O(Ye[ke]));
                      var Ze = Ye.groups;
                      if (X) {
                        var xt = [q].concat(ge, _e, G);
                        Ze !== void 0 && xt.push(Ze);
                        var Ve = String(j.apply(void 0, xt));
                      } else
                        Ve = R(q, G, _e, ge, Ze, j);
                      _e >= Pt && (Dt += G.slice(Pt, _e) + Ve, Pt = _e + q.length);
                    }
                    return Dt + G.slice(Pt);
                  }
                ];
                function R(V, j, U, A, G, X) {
                  var te = U + V.length, $e = A.length, Ge = b;
                  return G !== void 0 && (G = c(G), Ge = S), N.call(X, Ge, function(Ye, et) {
                    var Dt;
                    switch (et.charAt(0)) {
                      case "$":
                        return "$";
                      case "&":
                        return V;
                      case "`":
                        return j.slice(0, U);
                      case "'":
                        return j.slice(te);
                      case "<":
                        Dt = G[et.slice(1, -1)];
                        break;
                      default:
                        var Pt = +et;
                        if (Pt === 0) return Ye;
                        if (Pt > $e) {
                          var _t = _(Pt / 10);
                          return _t === 0 ? Ye : _t <= $e ? A[_t - 1] === void 0 ? et.charAt(1) : A[_t - 1] + et.charAt(1) : Ye;
                        }
                        Dt = A[Pt - 1];
                    }
                    return Dt === void 0 ? "" : Dt;
                  });
                }
              });
            }
          ),
          /***/
          5692: (
            /***/
            function(o, i, r) {
              var a = r("c430"), l = r("c6cd");
              (o.exports = function(c, d) {
                return l[c] || (l[c] = d !== void 0 ? d : {});
              })("versions", []).push({
                version: "3.6.5",
                mode: a ? "pure" : "global",
                copyright: "© 2020 Denis Pushkarev (zloirock.ru)"
              });
            }
          ),
          /***/
          "56ef": (
            /***/
            function(o, i, r) {
              var a = r("d066"), l = r("241c"), c = r("7418"), d = r("825a");
              o.exports = a("Reflect", "ownKeys") || function(p) {
                var h = l.f(d(p)), m = c.f;
                return m ? h.concat(m(p)) : h;
              };
            }
          ),
          /***/
          "5a34": (
            /***/
            function(o, i, r) {
              var a = r("44e7");
              o.exports = function(l) {
                if (a(l))
                  throw TypeError("The method doesn't accept regular expressions");
                return l;
              };
            }
          ),
          /***/
          "5c6c": (
            /***/
            function(o, i) {
              o.exports = function(r, a) {
                return {
                  enumerable: !(r & 1),
                  configurable: !(r & 2),
                  writable: !(r & 4),
                  value: a
                };
              };
            }
          ),
          /***/
          "5db7": (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("a2bf"), c = r("7b0b"), d = r("50c4"), f = r("1c0b"), p = r("65f0");
              a({ target: "Array", proto: !0 }, {
                flatMap: function(m) {
                  var v = c(this), g = d(v.length), _;
                  return f(m), _ = p(v, 0), _.length = l(_, v, v, g, 0, 1, m, arguments.length > 1 ? arguments[1] : void 0), _;
                }
              });
            }
          ),
          /***/
          6547: (
            /***/
            function(o, i, r) {
              var a = r("a691"), l = r("1d80"), c = function(d) {
                return function(f, p) {
                  var h = String(l(f)), m = a(p), v = h.length, g, _;
                  return m < 0 || m >= v ? d ? "" : void 0 : (g = h.charCodeAt(m), g < 55296 || g > 56319 || m + 1 === v || (_ = h.charCodeAt(m + 1)) < 56320 || _ > 57343 ? d ? h.charAt(m) : g : d ? h.slice(m, m + 2) : (g - 55296 << 10) + (_ - 56320) + 65536);
                };
              };
              o.exports = {
                // `String.prototype.codePointAt` method
                // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
                codeAt: c(!1),
                // `String.prototype.at` method
                // https://github.com/mathiasbynens/String.prototype.at
                charAt: c(!0)
              };
            }
          ),
          /***/
          "65f0": (
            /***/
            function(o, i, r) {
              var a = r("861d"), l = r("e8b5"), c = r("b622"), d = c("species");
              o.exports = function(f, p) {
                var h;
                return l(f) && (h = f.constructor, typeof h == "function" && (h === Array || l(h.prototype)) ? h = void 0 : a(h) && (h = h[d], h === null && (h = void 0))), new (h === void 0 ? Array : h)(p === 0 ? 0 : p);
              };
            }
          ),
          /***/
          "69f3": (
            /***/
            function(o, i, r) {
              var a = r("7f9a"), l = r("da84"), c = r("861d"), d = r("9112"), f = r("5135"), p = r("f772"), h = r("d012"), m = l.WeakMap, v, g, _, S = function(x) {
                return _(x) ? g(x) : v(x, {});
              }, b = function(x) {
                return function($) {
                  var M;
                  if (!c($) || (M = g($)).type !== x)
                    throw TypeError("Incompatible receiver, " + x + " required");
                  return M;
                };
              };
              if (a) {
                var O = new m(), w = O.get, N = O.has, C = O.set;
                v = function(x, $) {
                  return C.call(O, x, $), $;
                }, g = function(x) {
                  return w.call(O, x) || {};
                }, _ = function(x) {
                  return N.call(O, x);
                };
              } else {
                var k = p("state");
                h[k] = !0, v = function(x, $) {
                  return d(x, k, $), $;
                }, g = function(x) {
                  return f(x, k) ? x[k] : {};
                }, _ = function(x) {
                  return f(x, k);
                };
              }
              o.exports = {
                set: v,
                get: g,
                has: _,
                enforce: S,
                getterFor: b
              };
            }
          ),
          /***/
          "6eeb": (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("9112"), c = r("5135"), d = r("ce4e"), f = r("8925"), p = r("69f3"), h = p.get, m = p.enforce, v = String(String).split("String");
              (o.exports = function(g, _, S, b) {
                var O = b ? !!b.unsafe : !1, w = b ? !!b.enumerable : !1, N = b ? !!b.noTargetGet : !1;
                if (typeof S == "function" && (typeof _ == "string" && !c(S, "name") && l(S, "name", _), m(S).source = v.join(typeof _ == "string" ? _ : "")), g === a) {
                  w ? g[_] = S : d(_, S);
                  return;
                } else O ? !N && g[_] && (w = !0) : delete g[_];
                w ? g[_] = S : l(g, _, S);
              })(Function.prototype, "toString", function() {
                return typeof this == "function" && h(this).source || f(this);
              });
            }
          ),
          /***/
          "6f53": (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("df75"), c = r("fc6a"), d = r("d1e7").f, f = function(p) {
                return function(h) {
                  for (var m = c(h), v = l(m), g = v.length, _ = 0, S = [], b; g > _; )
                    b = v[_++], (!a || d.call(m, b)) && S.push(p ? [b, m[b]] : m[b]);
                  return S;
                };
              };
              o.exports = {
                // `Object.entries` method
                // https://tc39.github.io/ecma262/#sec-object.entries
                entries: f(!0),
                // `Object.values` method
                // https://tc39.github.io/ecma262/#sec-object.values
                values: f(!1)
              };
            }
          ),
          /***/
          "73d9": (
            /***/
            function(o, i, r) {
              var a = r("44d2");
              a("flatMap");
            }
          ),
          /***/
          7418: (
            /***/
            function(o, i) {
              i.f = Object.getOwnPropertySymbols;
            }
          ),
          /***/
          "746f": (
            /***/
            function(o, i, r) {
              var a = r("428f"), l = r("5135"), c = r("e538"), d = r("9bf2").f;
              o.exports = function(f) {
                var p = a.Symbol || (a.Symbol = {});
                l(p, f) || d(p, f, {
                  value: c.f(f)
                });
              };
            }
          ),
          /***/
          7839: (
            /***/
            function(o, i) {
              o.exports = [
                "constructor",
                "hasOwnProperty",
                "isPrototypeOf",
                "propertyIsEnumerable",
                "toLocaleString",
                "toString",
                "valueOf"
              ];
            }
          ),
          /***/
          "7b0b": (
            /***/
            function(o, i, r) {
              var a = r("1d80");
              o.exports = function(l) {
                return Object(a(l));
              };
            }
          ),
          /***/
          "7c73": (
            /***/
            function(o, i, r) {
              var a = r("825a"), l = r("37e8"), c = r("7839"), d = r("d012"), f = r("1be4"), p = r("cc12"), h = r("f772"), m = ">", v = "<", g = "prototype", _ = "script", S = h("IE_PROTO"), b = function() {
              }, O = function(x) {
                return v + _ + m + x + v + "/" + _ + m;
              }, w = function(x) {
                x.write(O("")), x.close();
                var $ = x.parentWindow.Object;
                return x = null, $;
              }, N = function() {
                var x = p("iframe"), $ = "java" + _ + ":", M;
                return x.style.display = "none", f.appendChild(x), x.src = String($), M = x.contentWindow.document, M.open(), M.write(O("document.F=Object")), M.close(), M.F;
              }, C, k = function() {
                try {
                  C = document.domain && new ActiveXObject("htmlfile");
                } catch {
                }
                k = C ? w(C) : N();
                for (var x = c.length; x--; ) delete k[g][c[x]];
                return k();
              };
              d[S] = !0, o.exports = Object.create || function($, M) {
                var R;
                return $ !== null ? (b[g] = a($), R = new b(), b[g] = null, R[S] = $) : R = k(), M === void 0 ? R : l(R, M);
              };
            }
          ),
          /***/
          "7dd0": (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("9ed3"), c = r("e163"), d = r("d2bb"), f = r("d44e"), p = r("9112"), h = r("6eeb"), m = r("b622"), v = r("c430"), g = r("3f8c"), _ = r("ae93"), S = _.IteratorPrototype, b = _.BUGGY_SAFARI_ITERATORS, O = m("iterator"), w = "keys", N = "values", C = "entries", k = function() {
                return this;
              };
              o.exports = function(x, $, M, R, V, j, U) {
                l(M, $, R);
                var A = function(_t) {
                  if (_t === V && Ge) return Ge;
                  if (!b && _t in te) return te[_t];
                  switch (_t) {
                    case w:
                      return function() {
                        return new M(this, _t);
                      };
                    case N:
                      return function() {
                        return new M(this, _t);
                      };
                    case C:
                      return function() {
                        return new M(this, _t);
                      };
                  }
                  return function() {
                    return new M(this);
                  };
                }, G = $ + " Iterator", X = !1, te = x.prototype, $e = te[O] || te["@@iterator"] || V && te[V], Ge = !b && $e || A(V), Ye = $ == "Array" && te.entries || $e, et, Dt, Pt;
                if (Ye && (et = c(Ye.call(new x())), S !== Object.prototype && et.next && (!v && c(et) !== S && (d ? d(et, S) : typeof et[O] != "function" && p(et, O, k)), f(et, G, !0, !0), v && (g[G] = k))), V == N && $e && $e.name !== N && (X = !0, Ge = function() {
                  return $e.call(this);
                }), (!v || U) && te[O] !== Ge && p(te, O, Ge), g[$] = Ge, V)
                  if (Dt = {
                    values: A(N),
                    keys: j ? Ge : A(w),
                    entries: A(C)
                  }, U) for (Pt in Dt)
                    (b || X || !(Pt in te)) && h(te, Pt, Dt[Pt]);
                  else a({ target: $, proto: !0, forced: b || X }, Dt);
                return Dt;
              };
            }
          ),
          /***/
          "7f9a": (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("8925"), c = a.WeakMap;
              o.exports = typeof c == "function" && /native code/.test(l(c));
            }
          ),
          /***/
          "825a": (
            /***/
            function(o, i, r) {
              var a = r("861d");
              o.exports = function(l) {
                if (!a(l))
                  throw TypeError(String(l) + " is not an object");
                return l;
              };
            }
          ),
          /***/
          "83ab": (
            /***/
            function(o, i, r) {
              var a = r("d039");
              o.exports = !a(function() {
                return Object.defineProperty({}, 1, { get: function() {
                  return 7;
                } })[1] != 7;
              });
            }
          ),
          /***/
          8418: (
            /***/
            function(o, i, r) {
              var a = r("c04e"), l = r("9bf2"), c = r("5c6c");
              o.exports = function(d, f, p) {
                var h = a(f);
                h in d ? l.f(d, h, c(0, p)) : d[h] = p;
              };
            }
          ),
          /***/
          "861d": (
            /***/
            function(o, i) {
              o.exports = function(r) {
                return typeof r == "object" ? r !== null : typeof r == "function";
              };
            }
          ),
          /***/
          8875: (
            /***/
            function(o, i, r) {
              var a, l, c;
              (function(d, f) {
                l = [], a = f, c = typeof a == "function" ? a.apply(i, l) : a, c !== void 0 && (o.exports = c);
              })(typeof self < "u" ? self : this, function() {
                function d() {
                  var f = Object.getOwnPropertyDescriptor(document, "currentScript");
                  if (!f && "currentScript" in document && document.currentScript || f && f.get !== d && document.currentScript)
                    return document.currentScript;
                  try {
                    throw new Error();
                  } catch (C) {
                    var p = /.*at [^(]*\((.*):(.+):(.+)\)$/ig, h = /@([^@]*):(\d+):(\d+)\s*$/ig, m = p.exec(C.stack) || h.exec(C.stack), v = m && m[1] || !1, g = m && m[2] || !1, _ = document.location.href.replace(document.location.hash, ""), S, b, O, w = document.getElementsByTagName("script");
                    v === _ && (S = document.documentElement.outerHTML, b = new RegExp("(?:[^\\n]+?\\n){0," + (g - 2) + "}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*", "i"), O = S.replace(b, "$1").trim());
                    for (var N = 0; N < w.length; N++)
                      if (w[N].readyState === "interactive" || w[N].src === v || v === _ && w[N].innerHTML && w[N].innerHTML.trim() === O)
                        return w[N];
                    return null;
                  }
                }
                return d;
              });
            }
          ),
          /***/
          8925: (
            /***/
            function(o, i, r) {
              var a = r("c6cd"), l = Function.toString;
              typeof a.inspectSource != "function" && (a.inspectSource = function(c) {
                return l.call(c);
              }), o.exports = a.inspectSource;
            }
          ),
          /***/
          "8aa5": (
            /***/
            function(o, i, r) {
              var a = r("6547").charAt;
              o.exports = function(l, c, d) {
                return c + (d ? a(l, c).length : 1);
              };
            }
          ),
          /***/
          "8bbf": (
            /***/
            function(o, i) {
              o.exports = n;
            }
          ),
          /***/
          "90e3": (
            /***/
            function(o, i) {
              var r = 0, a = Math.random();
              o.exports = function(l) {
                return "Symbol(" + String(l === void 0 ? "" : l) + ")_" + (++r + a).toString(36);
              };
            }
          ),
          /***/
          9112: (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("9bf2"), c = r("5c6c");
              o.exports = a ? function(d, f, p) {
                return l.f(d, f, c(1, p));
              } : function(d, f, p) {
                return d[f] = p, d;
              };
            }
          ),
          /***/
          9263: (
            /***/
            function(o, i, r) {
              var a = r("ad6d"), l = r("9f7f"), c = RegExp.prototype.exec, d = String.prototype.replace, f = c, p = function() {
                var g = /a/, _ = /b*/g;
                return c.call(g, "a"), c.call(_, "a"), g.lastIndex !== 0 || _.lastIndex !== 0;
              }(), h = l.UNSUPPORTED_Y || l.BROKEN_CARET, m = /()??/.exec("")[1] !== void 0, v = p || m || h;
              v && (f = function(_) {
                var S = this, b, O, w, N, C = h && S.sticky, k = a.call(S), x = S.source, $ = 0, M = _;
                return C && (k = k.replace("y", ""), k.indexOf("g") === -1 && (k += "g"), M = String(_).slice(S.lastIndex), S.lastIndex > 0 && (!S.multiline || S.multiline && _[S.lastIndex - 1] !== `
`) && (x = "(?: " + x + ")", M = " " + M, $++), O = new RegExp("^(?:" + x + ")", k)), m && (O = new RegExp("^" + x + "$(?!\\s)", k)), p && (b = S.lastIndex), w = c.call(C ? O : S, M), C ? w ? (w.input = w.input.slice($), w[0] = w[0].slice($), w.index = S.lastIndex, S.lastIndex += w[0].length) : S.lastIndex = 0 : p && w && (S.lastIndex = S.global ? w.index + w[0].length : b), m && w && w.length > 1 && d.call(w[0], O, function() {
                  for (N = 1; N < arguments.length - 2; N++)
                    arguments[N] === void 0 && (w[N] = void 0);
                }), w;
              }), o.exports = f;
            }
          ),
          /***/
          "94ca": (
            /***/
            function(o, i, r) {
              var a = r("d039"), l = /#|\.prototype\./, c = function(m, v) {
                var g = f[d(m)];
                return g == h ? !0 : g == p ? !1 : typeof v == "function" ? a(v) : !!v;
              }, d = c.normalize = function(m) {
                return String(m).replace(l, ".").toLowerCase();
              }, f = c.data = {}, p = c.NATIVE = "N", h = c.POLYFILL = "P";
              o.exports = c;
            }
          ),
          /***/
          "99af": (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("d039"), c = r("e8b5"), d = r("861d"), f = r("7b0b"), p = r("50c4"), h = r("8418"), m = r("65f0"), v = r("1dde"), g = r("b622"), _ = r("2d00"), S = g("isConcatSpreadable"), b = 9007199254740991, O = "Maximum allowed index exceeded", w = _ >= 51 || !l(function() {
                var x = [];
                return x[S] = !1, x.concat()[0] !== x;
              }), N = v("concat"), C = function(x) {
                if (!d(x)) return !1;
                var $ = x[S];
                return $ !== void 0 ? !!$ : c(x);
              }, k = !w || !N;
              a({ target: "Array", proto: !0, forced: k }, {
                concat: function($) {
                  var M = f(this), R = m(M, 0), V = 0, j, U, A, G, X;
                  for (j = -1, A = arguments.length; j < A; j++)
                    if (X = j === -1 ? M : arguments[j], C(X)) {
                      if (G = p(X.length), V + G > b) throw TypeError(O);
                      for (U = 0; U < G; U++, V++) U in X && h(R, V, X[U]);
                    } else {
                      if (V >= b) throw TypeError(O);
                      h(R, V++, X);
                    }
                  return R.length = V, R;
                }
              });
            }
          ),
          /***/
          "9bdd": (
            /***/
            function(o, i, r) {
              var a = r("825a");
              o.exports = function(l, c, d, f) {
                try {
                  return f ? c(a(d)[0], d[1]) : c(d);
                } catch (h) {
                  var p = l.return;
                  throw p !== void 0 && a(p.call(l)), h;
                }
              };
            }
          ),
          /***/
          "9bf2": (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("0cfb"), c = r("825a"), d = r("c04e"), f = Object.defineProperty;
              i.f = a ? f : function(h, m, v) {
                if (c(h), m = d(m, !0), c(v), l) try {
                  return f(h, m, v);
                } catch {
                }
                if ("get" in v || "set" in v) throw TypeError("Accessors not supported");
                return "value" in v && (h[m] = v.value), h;
              };
            }
          ),
          /***/
          "9ed3": (
            /***/
            function(o, i, r) {
              var a = r("ae93").IteratorPrototype, l = r("7c73"), c = r("5c6c"), d = r("d44e"), f = r("3f8c"), p = function() {
                return this;
              };
              o.exports = function(h, m, v) {
                var g = m + " Iterator";
                return h.prototype = l(a, { next: c(1, v) }), d(h, g, !1, !0), f[g] = p, h;
              };
            }
          ),
          /***/
          "9f7f": (
            /***/
            function(o, i, r) {
              var a = r("d039");
              function l(c, d) {
                return RegExp(c, d);
              }
              i.UNSUPPORTED_Y = a(function() {
                var c = l("a", "y");
                return c.lastIndex = 2, c.exec("abcd") != null;
              }), i.BROKEN_CARET = a(function() {
                var c = l("^r", "gy");
                return c.lastIndex = 2, c.exec("str") != null;
              });
            }
          ),
          /***/
          a2bf: (
            /***/
            function(o, i, r) {
              var a = r("e8b5"), l = r("50c4"), c = r("0366"), d = function(f, p, h, m, v, g, _, S) {
                for (var b = v, O = 0, w = _ ? c(_, S, 3) : !1, N; O < m; ) {
                  if (O in h) {
                    if (N = w ? w(h[O], O, p) : h[O], g > 0 && a(N))
                      b = d(f, p, N, l(N.length), b, g - 1) - 1;
                    else {
                      if (b >= 9007199254740991) throw TypeError("Exceed the acceptable array length");
                      f[b] = N;
                    }
                    b++;
                  }
                  O++;
                }
                return b;
              };
              o.exports = d;
            }
          ),
          /***/
          a352: (
            /***/
            function(o, i) {
              o.exports = s;
            }
          ),
          /***/
          a434: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("23cb"), c = r("a691"), d = r("50c4"), f = r("7b0b"), p = r("65f0"), h = r("8418"), m = r("1dde"), v = r("ae40"), g = m("splice"), _ = v("splice", { ACCESSORS: !0, 0: 0, 1: 2 }), S = Math.max, b = Math.min, O = 9007199254740991, w = "Maximum allowed length exceeded";
              a({ target: "Array", proto: !0, forced: !g || !_ }, {
                splice: function(C, k) {
                  var x = f(this), $ = d(x.length), M = l(C, $), R = arguments.length, V, j, U, A, G, X;
                  if (R === 0 ? V = j = 0 : R === 1 ? (V = 0, j = $ - M) : (V = R - 2, j = b(S(c(k), 0), $ - M)), $ + V - j > O)
                    throw TypeError(w);
                  for (U = p(x, j), A = 0; A < j; A++)
                    G = M + A, G in x && h(U, A, x[G]);
                  if (U.length = j, V < j) {
                    for (A = M; A < $ - j; A++)
                      G = A + j, X = A + V, G in x ? x[X] = x[G] : delete x[X];
                    for (A = $; A > $ - j + V; A--) delete x[A - 1];
                  } else if (V > j)
                    for (A = $ - j; A > M; A--)
                      G = A + j - 1, X = A + V - 1, G in x ? x[X] = x[G] : delete x[X];
                  for (A = 0; A < V; A++)
                    x[A + M] = arguments[A + 2];
                  return x.length = $ - j + V, U;
                }
              });
            }
          ),
          /***/
          a4d3: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("da84"), c = r("d066"), d = r("c430"), f = r("83ab"), p = r("4930"), h = r("fdbf"), m = r("d039"), v = r("5135"), g = r("e8b5"), _ = r("861d"), S = r("825a"), b = r("7b0b"), O = r("fc6a"), w = r("c04e"), N = r("5c6c"), C = r("7c73"), k = r("df75"), x = r("241c"), $ = r("057f"), M = r("7418"), R = r("06cf"), V = r("9bf2"), j = r("d1e7"), U = r("9112"), A = r("6eeb"), G = r("5692"), X = r("f772"), te = r("d012"), $e = r("90e3"), Ge = r("b622"), Ye = r("e538"), et = r("746f"), Dt = r("d44e"), Pt = r("69f3"), _t = r("b727").forEach, q = X("hidden"), _e = "Symbol", ge = "prototype", ke = Ge("toPrimitive"), Ze = Pt.set, xt = Pt.getterFor(_e), Ve = Object[ge], D = l.Symbol, B = c("JSON", "stringify"), Q = R.f, ne = V.f, ie = $.f, ce = j.f, ve = G("symbols"), fe = G("op-symbols"), pe = G("string-to-symbol-registry"), ue = G("symbol-to-string-registry"), je = G("wks"), Se = l.QObject, Re = !Se || !Se[ge] || !Se[ge].findChild, ze = f && m(function() {
                return C(ne({}, "a", {
                  get: function() {
                    return ne(this, "a", { value: 7 }).a;
                  }
                })).a != 7;
              }) ? function(Fe, Ae, Ke) {
                var bt = Q(Ve, Ae);
                bt && delete Ve[Ae], ne(Fe, Ae, Ke), bt && Fe !== Ve && ne(Ve, Ae, bt);
              } : ne, ct = function(Fe, Ae) {
                var Ke = ve[Fe] = C(D[ge]);
                return Ze(Ke, {
                  type: _e,
                  tag: Fe,
                  description: Ae
                }), f || (Ke.description = Ae), Ke;
              }, z = h ? function(Fe) {
                return typeof Fe == "symbol";
              } : function(Fe) {
                return Object(Fe) instanceof D;
              }, W = function(Ae, Ke, bt) {
                Ae === Ve && W(fe, Ke, bt), S(Ae);
                var Ct = w(Ke, !0);
                return S(bt), v(ve, Ct) ? (bt.enumerable ? (v(Ae, q) && Ae[q][Ct] && (Ae[q][Ct] = !1), bt = C(bt, { enumerable: N(0, !1) })) : (v(Ae, q) || ne(Ae, q, N(1, {})), Ae[q][Ct] = !0), ze(Ae, Ct, bt)) : ne(Ae, Ct, bt);
              }, Z = function(Ae, Ke) {
                S(Ae);
                var bt = O(Ke), Ct = k(bt).concat(wt(bt));
                return _t(Ct, function(ss) {
                  (!f || Ce.call(bt, ss)) && W(Ae, ss, bt[ss]);
                }), Ae;
              }, re = function(Ae, Ke) {
                return Ke === void 0 ? C(Ae) : Z(C(Ae), Ke);
              }, Ce = function(Ae) {
                var Ke = w(Ae, !0), bt = ce.call(this, Ke);
                return this === Ve && v(ve, Ke) && !v(fe, Ke) ? !1 : bt || !v(this, Ke) || !v(ve, Ke) || v(this, q) && this[q][Ke] ? bt : !0;
              }, Me = function(Ae, Ke) {
                var bt = O(Ae), Ct = w(Ke, !0);
                if (!(bt === Ve && v(ve, Ct) && !v(fe, Ct))) {
                  var ss = Q(bt, Ct);
                  return ss && v(ve, Ct) && !(v(bt, q) && bt[q][Ct]) && (ss.enumerable = !0), ss;
                }
              }, Qe = function(Ae) {
                var Ke = ie(O(Ae)), bt = [];
                return _t(Ke, function(Ct) {
                  !v(ve, Ct) && !v(te, Ct) && bt.push(Ct);
                }), bt;
              }, wt = function(Ae) {
                var Ke = Ae === Ve, bt = ie(Ke ? fe : O(Ae)), Ct = [];
                return _t(bt, function(ss) {
                  v(ve, ss) && (!Ke || v(Ve, ss)) && Ct.push(ve[ss]);
                }), Ct;
              };
              if (p || (D = function() {
                if (this instanceof D) throw TypeError("Symbol is not a constructor");
                var Ae = !arguments.length || arguments[0] === void 0 ? void 0 : String(arguments[0]), Ke = $e(Ae), bt = function(Ct) {
                  this === Ve && bt.call(fe, Ct), v(this, q) && v(this[q], Ke) && (this[q][Ke] = !1), ze(this, Ke, N(1, Ct));
                };
                return f && Re && ze(Ve, Ke, { configurable: !0, set: bt }), ct(Ke, Ae);
              }, A(D[ge], "toString", function() {
                return xt(this).tag;
              }), A(D, "withoutSetter", function(Fe) {
                return ct($e(Fe), Fe);
              }), j.f = Ce, V.f = W, R.f = Me, x.f = $.f = Qe, M.f = wt, Ye.f = function(Fe) {
                return ct(Ge(Fe), Fe);
              }, f && (ne(D[ge], "description", {
                configurable: !0,
                get: function() {
                  return xt(this).description;
                }
              }), d || A(Ve, "propertyIsEnumerable", Ce, { unsafe: !0 }))), a({ global: !0, wrap: !0, forced: !p, sham: !p }, {
                Symbol: D
              }), _t(k(je), function(Fe) {
                et(Fe);
              }), a({ target: _e, stat: !0, forced: !p }, {
                // `Symbol.for` method
                // https://tc39.github.io/ecma262/#sec-symbol.for
                for: function(Fe) {
                  var Ae = String(Fe);
                  if (v(pe, Ae)) return pe[Ae];
                  var Ke = D(Ae);
                  return pe[Ae] = Ke, ue[Ke] = Ae, Ke;
                },
                // `Symbol.keyFor` method
                // https://tc39.github.io/ecma262/#sec-symbol.keyfor
                keyFor: function(Ae) {
                  if (!z(Ae)) throw TypeError(Ae + " is not a symbol");
                  if (v(ue, Ae)) return ue[Ae];
                },
                useSetter: function() {
                  Re = !0;
                },
                useSimple: function() {
                  Re = !1;
                }
              }), a({ target: "Object", stat: !0, forced: !p, sham: !f }, {
                // `Object.create` method
                // https://tc39.github.io/ecma262/#sec-object.create
                create: re,
                // `Object.defineProperty` method
                // https://tc39.github.io/ecma262/#sec-object.defineproperty
                defineProperty: W,
                // `Object.defineProperties` method
                // https://tc39.github.io/ecma262/#sec-object.defineproperties
                defineProperties: Z,
                // `Object.getOwnPropertyDescriptor` method
                // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
                getOwnPropertyDescriptor: Me
              }), a({ target: "Object", stat: !0, forced: !p }, {
                // `Object.getOwnPropertyNames` method
                // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
                getOwnPropertyNames: Qe,
                // `Object.getOwnPropertySymbols` method
                // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
                getOwnPropertySymbols: wt
              }), a({ target: "Object", stat: !0, forced: m(function() {
                M.f(1);
              }) }, {
                getOwnPropertySymbols: function(Ae) {
                  return M.f(b(Ae));
                }
              }), B) {
                var pt = !p || m(function() {
                  var Fe = D();
                  return B([Fe]) != "[null]" || B({ a: Fe }) != "{}" || B(Object(Fe)) != "{}";
                });
                a({ target: "JSON", stat: !0, forced: pt }, {
                  // eslint-disable-next-line no-unused-vars
                  stringify: function(Ae, Ke, bt) {
                    for (var Ct = [Ae], ss = 1, hp; arguments.length > ss; ) Ct.push(arguments[ss++]);
                    if (hp = Ke, !(!_(Ke) && Ae === void 0 || z(Ae)))
                      return g(Ke) || (Ke = function(fO, eu) {
                        if (typeof hp == "function" && (eu = hp.call(this, fO, eu)), !z(eu)) return eu;
                      }), Ct[1] = Ke, B.apply(null, Ct);
                  }
                });
              }
              D[ge][ke] || U(D[ge], ke, D[ge].valueOf), Dt(D, _e), te[q] = !0;
            }
          ),
          /***/
          a630: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("4df4"), c = r("1c7e"), d = !c(function(f) {
                Array.from(f);
              });
              a({ target: "Array", stat: !0, forced: d }, {
                from: l
              });
            }
          ),
          /***/
          a640: (
            /***/
            function(o, i, r) {
              var a = r("d039");
              o.exports = function(l, c) {
                var d = [][l];
                return !!d && a(function() {
                  d.call(null, c || function() {
                    throw 1;
                  }, 1);
                });
              };
            }
          ),
          /***/
          a691: (
            /***/
            function(o, i) {
              var r = Math.ceil, a = Math.floor;
              o.exports = function(l) {
                return isNaN(l = +l) ? 0 : (l > 0 ? a : r)(l);
              };
            }
          ),
          /***/
          ab13: (
            /***/
            function(o, i, r) {
              var a = r("b622"), l = a("match");
              o.exports = function(c) {
                var d = /./;
                try {
                  "/./"[c](d);
                } catch {
                  try {
                    return d[l] = !1, "/./"[c](d);
                  } catch {
                  }
                }
                return !1;
              };
            }
          ),
          /***/
          ac1f: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("9263");
              a({ target: "RegExp", proto: !0, forced: /./.exec !== l }, {
                exec: l
              });
            }
          ),
          /***/
          ad6d: (
            /***/
            function(o, i, r) {
              var a = r("825a");
              o.exports = function() {
                var l = a(this), c = "";
                return l.global && (c += "g"), l.ignoreCase && (c += "i"), l.multiline && (c += "m"), l.dotAll && (c += "s"), l.unicode && (c += "u"), l.sticky && (c += "y"), c;
              };
            }
          ),
          /***/
          ae40: (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("d039"), c = r("5135"), d = Object.defineProperty, f = {}, p = function(h) {
                throw h;
              };
              o.exports = function(h, m) {
                if (c(f, h)) return f[h];
                m || (m = {});
                var v = [][h], g = c(m, "ACCESSORS") ? m.ACCESSORS : !1, _ = c(m, 0) ? m[0] : p, S = c(m, 1) ? m[1] : void 0;
                return f[h] = !!v && !l(function() {
                  if (g && !a) return !0;
                  var b = { length: -1 };
                  g ? d(b, 1, { enumerable: !0, get: p }) : b[1] = 1, v.call(b, _, S);
                });
              };
            }
          ),
          /***/
          ae93: (
            /***/
            function(o, i, r) {
              var a = r("e163"), l = r("9112"), c = r("5135"), d = r("b622"), f = r("c430"), p = d("iterator"), h = !1, m = function() {
                return this;
              }, v, g, _;
              [].keys && (_ = [].keys(), "next" in _ ? (g = a(a(_)), g !== Object.prototype && (v = g)) : h = !0), v == null && (v = {}), !f && !c(v, p) && l(v, p, m), o.exports = {
                IteratorPrototype: v,
                BUGGY_SAFARI_ITERATORS: h
              };
            }
          ),
          /***/
          b041: (
            /***/
            function(o, i, r) {
              var a = r("00ee"), l = r("f5df");
              o.exports = a ? {}.toString : function() {
                return "[object " + l(this) + "]";
              };
            }
          ),
          /***/
          b0c0: (
            /***/
            function(o, i, r) {
              var a = r("83ab"), l = r("9bf2").f, c = Function.prototype, d = c.toString, f = /^\s*function ([^ (]*)/, p = "name";
              a && !(p in c) && l(c, p, {
                configurable: !0,
                get: function() {
                  try {
                    return d.call(this).match(f)[1];
                  } catch {
                    return "";
                  }
                }
              });
            }
          ),
          /***/
          b622: (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("5692"), c = r("5135"), d = r("90e3"), f = r("4930"), p = r("fdbf"), h = l("wks"), m = a.Symbol, v = p ? m : m && m.withoutSetter || d;
              o.exports = function(g) {
                return c(h, g) || (f && c(m, g) ? h[g] = m[g] : h[g] = v("Symbol." + g)), h[g];
              };
            }
          ),
          /***/
          b64b: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("7b0b"), c = r("df75"), d = r("d039"), f = d(function() {
                c(1);
              });
              a({ target: "Object", stat: !0, forced: f }, {
                keys: function(h) {
                  return c(l(h));
                }
              });
            }
          ),
          /***/
          b727: (
            /***/
            function(o, i, r) {
              var a = r("0366"), l = r("44ad"), c = r("7b0b"), d = r("50c4"), f = r("65f0"), p = [].push, h = function(m) {
                var v = m == 1, g = m == 2, _ = m == 3, S = m == 4, b = m == 6, O = m == 5 || b;
                return function(w, N, C, k) {
                  for (var x = c(w), $ = l(x), M = a(N, C, 3), R = d($.length), V = 0, j = k || f, U = v ? j(w, R) : g ? j(w, 0) : void 0, A, G; R > V; V++) if ((O || V in $) && (A = $[V], G = M(A, V, x), m)) {
                    if (v) U[V] = G;
                    else if (G) switch (m) {
                      case 3:
                        return !0;
                      // some
                      case 5:
                        return A;
                      // find
                      case 6:
                        return V;
                      // findIndex
                      case 2:
                        p.call(U, A);
                    }
                    else if (S) return !1;
                  }
                  return b ? -1 : _ || S ? S : U;
                };
              };
              o.exports = {
                // `Array.prototype.forEach` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
                forEach: h(0),
                // `Array.prototype.map` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.map
                map: h(1),
                // `Array.prototype.filter` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.filter
                filter: h(2),
                // `Array.prototype.some` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.some
                some: h(3),
                // `Array.prototype.every` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.every
                every: h(4),
                // `Array.prototype.find` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.find
                find: h(5),
                // `Array.prototype.findIndex` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
                findIndex: h(6)
              };
            }
          ),
          /***/
          c04e: (
            /***/
            function(o, i, r) {
              var a = r("861d");
              o.exports = function(l, c) {
                if (!a(l)) return l;
                var d, f;
                if (c && typeof (d = l.toString) == "function" && !a(f = d.call(l)) || typeof (d = l.valueOf) == "function" && !a(f = d.call(l)) || !c && typeof (d = l.toString) == "function" && !a(f = d.call(l))) return f;
                throw TypeError("Can't convert object to primitive value");
              };
            }
          ),
          /***/
          c430: (
            /***/
            function(o, i) {
              o.exports = !1;
            }
          ),
          /***/
          c6b6: (
            /***/
            function(o, i) {
              var r = {}.toString;
              o.exports = function(a) {
                return r.call(a).slice(8, -1);
              };
            }
          ),
          /***/
          c6cd: (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("ce4e"), c = "__core-js_shared__", d = a[c] || l(c, {});
              o.exports = d;
            }
          ),
          /***/
          c740: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("b727").findIndex, c = r("44d2"), d = r("ae40"), f = "findIndex", p = !0, h = d(f);
              f in [] && Array(1)[f](function() {
                p = !1;
              }), a({ target: "Array", proto: !0, forced: p || !h }, {
                findIndex: function(v) {
                  return l(this, v, arguments.length > 1 ? arguments[1] : void 0);
                }
              }), c(f);
            }
          ),
          /***/
          c8ba: (
            /***/
            function(o, i) {
              var r;
              r = /* @__PURE__ */ function() {
                return this;
              }();
              try {
                r = r || new Function("return this")();
              } catch {
                typeof window == "object" && (r = window);
              }
              o.exports = r;
            }
          ),
          /***/
          c975: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("4d64").indexOf, c = r("a640"), d = r("ae40"), f = [].indexOf, p = !!f && 1 / [1].indexOf(1, -0) < 0, h = c("indexOf"), m = d("indexOf", { ACCESSORS: !0, 1: 0 });
              a({ target: "Array", proto: !0, forced: p || !h || !m }, {
                indexOf: function(g) {
                  return p ? f.apply(this, arguments) || 0 : l(this, g, arguments.length > 1 ? arguments[1] : void 0);
                }
              });
            }
          ),
          /***/
          ca84: (
            /***/
            function(o, i, r) {
              var a = r("5135"), l = r("fc6a"), c = r("4d64").indexOf, d = r("d012");
              o.exports = function(f, p) {
                var h = l(f), m = 0, v = [], g;
                for (g in h) !a(d, g) && a(h, g) && v.push(g);
                for (; p.length > m; ) a(h, g = p[m++]) && (~c(v, g) || v.push(g));
                return v;
              };
            }
          ),
          /***/
          caad: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("4d64").includes, c = r("44d2"), d = r("ae40"), f = d("indexOf", { ACCESSORS: !0, 1: 0 });
              a({ target: "Array", proto: !0, forced: !f }, {
                includes: function(h) {
                  return l(this, h, arguments.length > 1 ? arguments[1] : void 0);
                }
              }), c("includes");
            }
          ),
          /***/
          cc12: (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("861d"), c = a.document, d = l(c) && l(c.createElement);
              o.exports = function(f) {
                return d ? c.createElement(f) : {};
              };
            }
          ),
          /***/
          ce4e: (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("9112");
              o.exports = function(c, d) {
                try {
                  l(a, c, d);
                } catch {
                  a[c] = d;
                }
                return d;
              };
            }
          ),
          /***/
          d012: (
            /***/
            function(o, i) {
              o.exports = {};
            }
          ),
          /***/
          d039: (
            /***/
            function(o, i) {
              o.exports = function(r) {
                try {
                  return !!r();
                } catch {
                  return !0;
                }
              };
            }
          ),
          /***/
          d066: (
            /***/
            function(o, i, r) {
              var a = r("428f"), l = r("da84"), c = function(d) {
                return typeof d == "function" ? d : void 0;
              };
              o.exports = function(d, f) {
                return arguments.length < 2 ? c(a[d]) || c(l[d]) : a[d] && a[d][f] || l[d] && l[d][f];
              };
            }
          ),
          /***/
          d1e7: (
            /***/
            function(o, i, r) {
              var a = {}.propertyIsEnumerable, l = Object.getOwnPropertyDescriptor, c = l && !a.call({ 1: 2 }, 1);
              i.f = c ? function(f) {
                var p = l(this, f);
                return !!p && p.enumerable;
              } : a;
            }
          ),
          /***/
          d28b: (
            /***/
            function(o, i, r) {
              var a = r("746f");
              a("iterator");
            }
          ),
          /***/
          d2bb: (
            /***/
            function(o, i, r) {
              var a = r("825a"), l = r("3bbe");
              o.exports = Object.setPrototypeOf || ("__proto__" in {} ? function() {
                var c = !1, d = {}, f;
                try {
                  f = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set, f.call(d, []), c = d instanceof Array;
                } catch {
                }
                return function(h, m) {
                  return a(h), l(m), c ? f.call(h, m) : h.__proto__ = m, h;
                };
              }() : void 0);
            }
          ),
          /***/
          d3b7: (
            /***/
            function(o, i, r) {
              var a = r("00ee"), l = r("6eeb"), c = r("b041");
              a || l(Object.prototype, "toString", c, { unsafe: !0 });
            }
          ),
          /***/
          d44e: (
            /***/
            function(o, i, r) {
              var a = r("9bf2").f, l = r("5135"), c = r("b622"), d = c("toStringTag");
              o.exports = function(f, p, h) {
                f && !l(f = h ? f : f.prototype, d) && a(f, d, { configurable: !0, value: p });
              };
            }
          ),
          /***/
          d58f: (
            /***/
            function(o, i, r) {
              var a = r("1c0b"), l = r("7b0b"), c = r("44ad"), d = r("50c4"), f = function(p) {
                return function(h, m, v, g) {
                  a(m);
                  var _ = l(h), S = c(_), b = d(_.length), O = p ? b - 1 : 0, w = p ? -1 : 1;
                  if (v < 2) for (; ; ) {
                    if (O in S) {
                      g = S[O], O += w;
                      break;
                    }
                    if (O += w, p ? O < 0 : b <= O)
                      throw TypeError("Reduce of empty array with no initial value");
                  }
                  for (; p ? O >= 0 : b > O; O += w) O in S && (g = m(g, S[O], O, _));
                  return g;
                };
              };
              o.exports = {
                // `Array.prototype.reduce` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
                left: f(!1),
                // `Array.prototype.reduceRight` method
                // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
                right: f(!0)
              };
            }
          ),
          /***/
          d784: (
            /***/
            function(o, i, r) {
              r("ac1f");
              var a = r("6eeb"), l = r("d039"), c = r("b622"), d = r("9263"), f = r("9112"), p = c("species"), h = !l(function() {
                var S = /./;
                return S.exec = function() {
                  var b = [];
                  return b.groups = { a: "7" }, b;
                }, "".replace(S, "$<a>") !== "7";
              }), m = function() {
                return "a".replace(/./, "$0") === "$0";
              }(), v = c("replace"), g = function() {
                return /./[v] ? /./[v]("a", "$0") === "" : !1;
              }(), _ = !l(function() {
                var S = /(?:)/, b = S.exec;
                S.exec = function() {
                  return b.apply(this, arguments);
                };
                var O = "ab".split(S);
                return O.length !== 2 || O[0] !== "a" || O[1] !== "b";
              });
              o.exports = function(S, b, O, w) {
                var N = c(S), C = !l(function() {
                  var V = {};
                  return V[N] = function() {
                    return 7;
                  }, ""[S](V) != 7;
                }), k = C && !l(function() {
                  var V = !1, j = /a/;
                  return S === "split" && (j = {}, j.constructor = {}, j.constructor[p] = function() {
                    return j;
                  }, j.flags = "", j[N] = /./[N]), j.exec = function() {
                    return V = !0, null;
                  }, j[N](""), !V;
                });
                if (!C || !k || S === "replace" && !(h && m && !g) || S === "split" && !_) {
                  var x = /./[N], $ = O(N, ""[S], function(V, j, U, A, G) {
                    return j.exec === d ? C && !G ? { done: !0, value: x.call(j, U, A) } : { done: !0, value: V.call(U, j, A) } : { done: !1 };
                  }, {
                    REPLACE_KEEPS_$0: m,
                    REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: g
                  }), M = $[0], R = $[1];
                  a(String.prototype, S, M), a(
                    RegExp.prototype,
                    N,
                    b == 2 ? function(V, j) {
                      return R.call(V, this, j);
                    } : function(V) {
                      return R.call(V, this);
                    }
                  );
                }
                w && f(RegExp.prototype[N], "sham", !0);
              };
            }
          ),
          /***/
          d81d: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("b727").map, c = r("1dde"), d = r("ae40"), f = c("map"), p = d("map");
              a({ target: "Array", proto: !0, forced: !f || !p }, {
                map: function(m) {
                  return l(this, m, arguments.length > 1 ? arguments[1] : void 0);
                }
              });
            }
          ),
          /***/
          da84: (
            /***/
            function(o, i, r) {
              (function(a) {
                var l = function(c) {
                  return c && c.Math == Math && c;
                };
                o.exports = // eslint-disable-next-line no-undef
                l(typeof globalThis == "object" && globalThis) || l(typeof window == "object" && window) || l(typeof self == "object" && self) || l(typeof a == "object" && a) || // eslint-disable-next-line no-new-func
                Function("return this")();
              }).call(this, r("c8ba"));
            }
          ),
          /***/
          dbb4: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("83ab"), c = r("56ef"), d = r("fc6a"), f = r("06cf"), p = r("8418");
              a({ target: "Object", stat: !0, sham: !l }, {
                getOwnPropertyDescriptors: function(m) {
                  for (var v = d(m), g = f.f, _ = c(v), S = {}, b = 0, O, w; _.length > b; )
                    w = g(v, O = _[b++]), w !== void 0 && p(S, O, w);
                  return S;
                }
              });
            }
          ),
          /***/
          dbf1: (
            /***/
            function(o, i, r) {
              (function(a) {
                r.d(i, "a", function() {
                  return c;
                });
                function l() {
                  return typeof window < "u" ? window.console : a.console;
                }
                var c = l();
              }).call(this, r("c8ba"));
            }
          ),
          /***/
          ddb0: (
            /***/
            function(o, i, r) {
              var a = r("da84"), l = r("fdbc"), c = r("e260"), d = r("9112"), f = r("b622"), p = f("iterator"), h = f("toStringTag"), m = c.values;
              for (var v in l) {
                var g = a[v], _ = g && g.prototype;
                if (_) {
                  if (_[p] !== m) try {
                    d(_, p, m);
                  } catch {
                    _[p] = m;
                  }
                  if (_[h] || d(_, h, v), l[v]) {
                    for (var S in c)
                      if (_[S] !== c[S]) try {
                        d(_, S, c[S]);
                      } catch {
                        _[S] = c[S];
                      }
                  }
                }
              }
            }
          ),
          /***/
          df75: (
            /***/
            function(o, i, r) {
              var a = r("ca84"), l = r("7839");
              o.exports = Object.keys || function(d) {
                return a(d, l);
              };
            }
          ),
          /***/
          e01a: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("83ab"), c = r("da84"), d = r("5135"), f = r("861d"), p = r("9bf2").f, h = r("e893"), m = c.Symbol;
              if (l && typeof m == "function" && (!("description" in m.prototype) || // Safari 12 bug
              m().description !== void 0)) {
                var v = {}, g = function() {
                  var N = arguments.length < 1 || arguments[0] === void 0 ? void 0 : String(arguments[0]), C = this instanceof g ? new m(N) : N === void 0 ? m() : m(N);
                  return N === "" && (v[C] = !0), C;
                };
                h(g, m);
                var _ = g.prototype = m.prototype;
                _.constructor = g;
                var S = _.toString, b = String(m("test")) == "Symbol(test)", O = /^Symbol\((.*)\)[^)]+$/;
                p(_, "description", {
                  configurable: !0,
                  get: function() {
                    var N = f(this) ? this.valueOf() : this, C = S.call(N);
                    if (d(v, N)) return "";
                    var k = b ? C.slice(7, -1) : C.replace(O, "$1");
                    return k === "" ? void 0 : k;
                  }
                }), a({ global: !0, forced: !0 }, {
                  Symbol: g
                });
              }
            }
          ),
          /***/
          e163: (
            /***/
            function(o, i, r) {
              var a = r("5135"), l = r("7b0b"), c = r("f772"), d = r("e177"), f = c("IE_PROTO"), p = Object.prototype;
              o.exports = d ? Object.getPrototypeOf : function(h) {
                return h = l(h), a(h, f) ? h[f] : typeof h.constructor == "function" && h instanceof h.constructor ? h.constructor.prototype : h instanceof Object ? p : null;
              };
            }
          ),
          /***/
          e177: (
            /***/
            function(o, i, r) {
              var a = r("d039");
              o.exports = !a(function() {
                function l() {
                }
                return l.prototype.constructor = null, Object.getPrototypeOf(new l()) !== l.prototype;
              });
            }
          ),
          /***/
          e260: (
            /***/
            function(o, i, r) {
              var a = r("fc6a"), l = r("44d2"), c = r("3f8c"), d = r("69f3"), f = r("7dd0"), p = "Array Iterator", h = d.set, m = d.getterFor(p);
              o.exports = f(Array, "Array", function(v, g) {
                h(this, {
                  type: p,
                  target: a(v),
                  // target
                  index: 0,
                  // next index
                  kind: g
                  // kind
                });
              }, function() {
                var v = m(this), g = v.target, _ = v.kind, S = v.index++;
                return !g || S >= g.length ? (v.target = void 0, { value: void 0, done: !0 }) : _ == "keys" ? { value: S, done: !1 } : _ == "values" ? { value: g[S], done: !1 } : { value: [S, g[S]], done: !1 };
              }, "values"), c.Arguments = c.Array, l("keys"), l("values"), l("entries");
            }
          ),
          /***/
          e439: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("d039"), c = r("fc6a"), d = r("06cf").f, f = r("83ab"), p = l(function() {
                d(1);
              }), h = !f || p;
              a({ target: "Object", stat: !0, forced: h, sham: !f }, {
                getOwnPropertyDescriptor: function(v, g) {
                  return d(c(v), g);
                }
              });
            }
          ),
          /***/
          e538: (
            /***/
            function(o, i, r) {
              var a = r("b622");
              i.f = a;
            }
          ),
          /***/
          e893: (
            /***/
            function(o, i, r) {
              var a = r("5135"), l = r("56ef"), c = r("06cf"), d = r("9bf2");
              o.exports = function(f, p) {
                for (var h = l(p), m = d.f, v = c.f, g = 0; g < h.length; g++) {
                  var _ = h[g];
                  a(f, _) || m(f, _, v(p, _));
                }
              };
            }
          ),
          /***/
          e8b5: (
            /***/
            function(o, i, r) {
              var a = r("c6b6");
              o.exports = Array.isArray || function(c) {
                return a(c) == "Array";
              };
            }
          ),
          /***/
          e95a: (
            /***/
            function(o, i, r) {
              var a = r("b622"), l = r("3f8c"), c = a("iterator"), d = Array.prototype;
              o.exports = function(f) {
                return f !== void 0 && (l.Array === f || d[c] === f);
              };
            }
          ),
          /***/
          f5df: (
            /***/
            function(o, i, r) {
              var a = r("00ee"), l = r("c6b6"), c = r("b622"), d = c("toStringTag"), f = l(/* @__PURE__ */ function() {
                return arguments;
              }()) == "Arguments", p = function(h, m) {
                try {
                  return h[m];
                } catch {
                }
              };
              o.exports = a ? l : function(h) {
                var m, v, g;
                return h === void 0 ? "Undefined" : h === null ? "Null" : typeof (v = p(m = Object(h), d)) == "string" ? v : f ? l(m) : (g = l(m)) == "Object" && typeof m.callee == "function" ? "Arguments" : g;
              };
            }
          ),
          /***/
          f772: (
            /***/
            function(o, i, r) {
              var a = r("5692"), l = r("90e3"), c = a("keys");
              o.exports = function(d) {
                return c[d] || (c[d] = l(d));
              };
            }
          ),
          /***/
          fb15: (
            /***/
            function(o, i, r) {
              if (r.r(i), typeof window < "u") {
                var a = window.document.currentScript;
                {
                  var l = r("8875");
                  a = l(), "currentScript" in document || Object.defineProperty(document, "currentScript", { get: l });
                }
                var c = a && a.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);
                c && (r.p = c[1]);
              }
              r("99af"), r("4de4"), r("4160"), r("c975"), r("d81d"), r("a434"), r("159b"), r("a4d3"), r("e439"), r("dbb4"), r("b64b");
              function d(z, W, Z) {
                return W in z ? Object.defineProperty(z, W, {
                  value: Z,
                  enumerable: !0,
                  configurable: !0,
                  writable: !0
                }) : z[W] = Z, z;
              }
              function f(z, W) {
                var Z = Object.keys(z);
                if (Object.getOwnPropertySymbols) {
                  var re = Object.getOwnPropertySymbols(z);
                  W && (re = re.filter(function(Ce) {
                    return Object.getOwnPropertyDescriptor(z, Ce).enumerable;
                  })), Z.push.apply(Z, re);
                }
                return Z;
              }
              function p(z) {
                for (var W = 1; W < arguments.length; W++) {
                  var Z = arguments[W] != null ? arguments[W] : {};
                  W % 2 ? f(Object(Z), !0).forEach(function(re) {
                    d(z, re, Z[re]);
                  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(z, Object.getOwnPropertyDescriptors(Z)) : f(Object(Z)).forEach(function(re) {
                    Object.defineProperty(z, re, Object.getOwnPropertyDescriptor(Z, re));
                  });
                }
                return z;
              }
              function h(z) {
                if (Array.isArray(z)) return z;
              }
              r("e01a"), r("d28b"), r("e260"), r("d3b7"), r("3ca3"), r("ddb0");
              function m(z, W) {
                if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(z)))) {
                  var Z = [], re = !0, Ce = !1, Me = void 0;
                  try {
                    for (var Qe = z[Symbol.iterator](), wt; !(re = (wt = Qe.next()).done) && (Z.push(wt.value), !(W && Z.length === W)); re = !0)
                      ;
                  } catch (pt) {
                    Ce = !0, Me = pt;
                  } finally {
                    try {
                      !re && Qe.return != null && Qe.return();
                    } finally {
                      if (Ce) throw Me;
                    }
                  }
                  return Z;
                }
              }
              r("a630"), r("fb6a"), r("b0c0"), r("25f0");
              function v(z, W) {
                (W == null || W > z.length) && (W = z.length);
                for (var Z = 0, re = new Array(W); Z < W; Z++)
                  re[Z] = z[Z];
                return re;
              }
              function g(z, W) {
                if (z) {
                  if (typeof z == "string") return v(z, W);
                  var Z = Object.prototype.toString.call(z).slice(8, -1);
                  if (Z === "Object" && z.constructor && (Z = z.constructor.name), Z === "Map" || Z === "Set") return Array.from(z);
                  if (Z === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z)) return v(z, W);
                }
              }
              function _() {
                throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
              }
              function S(z, W) {
                return h(z) || m(z, W) || g(z, W) || _();
              }
              function b(z) {
                if (Array.isArray(z)) return v(z);
              }
              function O(z) {
                if (typeof Symbol < "u" && Symbol.iterator in Object(z)) return Array.from(z);
              }
              function w() {
                throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
              }
              function N(z) {
                return b(z) || O(z) || g(z) || w();
              }
              var C = r("a352"), k = /* @__PURE__ */ r.n(C);
              function x(z) {
                z.parentElement !== null && z.parentElement.removeChild(z);
              }
              function $(z, W, Z) {
                var re = Z === 0 ? z.children[0] : z.children[Z - 1].nextSibling;
                z.insertBefore(W, re);
              }
              var M = r("dbf1");
              r("13d5"), r("4fad"), r("ac1f"), r("5319");
              function R(z) {
                var W = /* @__PURE__ */ Object.create(null);
                return function(re) {
                  var Ce = W[re];
                  return Ce || (W[re] = z(re));
                };
              }
              var V = /-(\w)/g, j = R(function(z) {
                return z.replace(V, function(W, Z) {
                  return Z.toUpperCase();
                });
              });
              r("5db7"), r("73d9");
              var U = ["Start", "Add", "Remove", "Update", "End"], A = ["Choose", "Unchoose", "Sort", "Filter", "Clone"], G = ["Move"], X = [G, U, A].flatMap(function(z) {
                return z;
              }).map(function(z) {
                return "on".concat(z);
              }), te = {
                manage: G,
                manageAndEmit: U,
                emit: A
              };
              function $e(z) {
                return X.indexOf(z) !== -1;
              }
              r("caad"), r("2ca0");
              var Ge = ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "link", "main", "map", "mark", "math", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rb", "rp", "rt", "rtc", "ruby", "s", "samp", "script", "section", "select", "slot", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "svg", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "title", "tr", "track", "u", "ul", "var", "video", "wbr"];
              function Ye(z) {
                return Ge.includes(z);
              }
              function et(z) {
                return ["transition-group", "TransitionGroup"].includes(z);
              }
              function Dt(z) {
                return ["id", "class", "role", "style"].includes(z) || z.startsWith("data-") || z.startsWith("aria-") || z.startsWith("on");
              }
              function Pt(z) {
                return z.reduce(function(W, Z) {
                  var re = S(Z, 2), Ce = re[0], Me = re[1];
                  return W[Ce] = Me, W;
                }, {});
              }
              function _t(z) {
                var W = z.$attrs, Z = z.componentData, re = Z === void 0 ? {} : Z, Ce = Pt(Object.entries(W).filter(function(Me) {
                  var Qe = S(Me, 2), wt = Qe[0];
                  return Qe[1], Dt(wt);
                }));
                return p(p({}, Ce), re);
              }
              function q(z) {
                var W = z.$attrs, Z = z.callBackBuilder, re = Pt(_e(W));
                Object.entries(Z).forEach(function(Me) {
                  var Qe = S(Me, 2), wt = Qe[0], pt = Qe[1];
                  te[wt].forEach(function(Fe) {
                    re["on".concat(Fe)] = pt(Fe);
                  });
                });
                var Ce = "[data-draggable]".concat(re.draggable || "");
                return p(p({}, re), {}, {
                  draggable: Ce
                });
              }
              function _e(z) {
                return Object.entries(z).filter(function(W) {
                  var Z = S(W, 2), re = Z[0];
                  return Z[1], !Dt(re);
                }).map(function(W) {
                  var Z = S(W, 2), re = Z[0], Ce = Z[1];
                  return [j(re), Ce];
                }).filter(function(W) {
                  var Z = S(W, 2), re = Z[0];
                  return Z[1], !$e(re);
                });
              }
              r("c740");
              function ge(z, W) {
                if (!(z instanceof W))
                  throw new TypeError("Cannot call a class as a function");
              }
              function ke(z, W) {
                for (var Z = 0; Z < W.length; Z++) {
                  var re = W[Z];
                  re.enumerable = re.enumerable || !1, re.configurable = !0, "value" in re && (re.writable = !0), Object.defineProperty(z, re.key, re);
                }
              }
              function Ze(z, W, Z) {
                return W && ke(z.prototype, W), z;
              }
              var xt = function(W) {
                var Z = W.el;
                return Z;
              }, Ve = function(W, Z) {
                return W.__draggable_context = Z;
              }, D = function(W) {
                return W.__draggable_context;
              }, B = /* @__PURE__ */ function() {
                function z(W) {
                  var Z = W.nodes, re = Z.header, Ce = Z.default, Me = Z.footer, Qe = W.root, wt = W.realList;
                  ge(this, z), this.defaultNodes = Ce, this.children = [].concat(N(re), N(Ce), N(Me)), this.externalComponent = Qe.externalComponent, this.rootTransition = Qe.transition, this.tag = Qe.tag, this.realList = wt;
                }
                return Ze(z, [{
                  key: "render",
                  value: function(Z, re) {
                    var Ce = this.tag, Me = this.children, Qe = this._isRootComponent, wt = Qe ? {
                      default: function() {
                        return Me;
                      }
                    } : Me;
                    return Z(Ce, re, wt);
                  }
                }, {
                  key: "updated",
                  value: function() {
                    var Z = this.defaultNodes, re = this.realList;
                    Z.forEach(function(Ce, Me) {
                      Ve(xt(Ce), {
                        element: re[Me],
                        index: Me
                      });
                    });
                  }
                }, {
                  key: "getUnderlyingVm",
                  value: function(Z) {
                    return D(Z);
                  }
                }, {
                  key: "getVmIndexFromDomIndex",
                  value: function(Z, re) {
                    var Ce = this.defaultNodes, Me = Ce.length, Qe = re.children, wt = Qe.item(Z);
                    if (wt === null)
                      return Me;
                    var pt = D(wt);
                    if (pt)
                      return pt.index;
                    if (Me === 0)
                      return 0;
                    var Fe = xt(Ce[0]), Ae = N(Qe).findIndex(function(Ke) {
                      return Ke === Fe;
                    });
                    return Z < Ae ? 0 : Me;
                  }
                }, {
                  key: "_isRootComponent",
                  get: function() {
                    return this.externalComponent || this.rootTransition;
                  }
                }]), z;
              }(), Q = r("8bbf");
              function ne(z, W) {
                var Z = z[W];
                return Z ? Z() : [];
              }
              function ie(z) {
                var W = z.$slots, Z = z.realList, re = z.getKey, Ce = Z || [], Me = ["header", "footer"].map(function(Ke) {
                  return ne(W, Ke);
                }), Qe = S(Me, 2), wt = Qe[0], pt = Qe[1], Fe = W.item;
                if (!Fe)
                  throw new Error("draggable element must have an item slot");
                var Ae = Ce.flatMap(function(Ke, bt) {
                  return Fe({
                    element: Ke,
                    index: bt
                  }).map(function(Ct) {
                    return Ct.key = re(Ke), Ct.props = p(p({}, Ct.props || {}), {}, {
                      "data-draggable": !0
                    }), Ct;
                  });
                });
                if (Ae.length !== Ce.length)
                  throw new Error("Item slot must have only one child");
                return {
                  header: wt,
                  footer: pt,
                  default: Ae
                };
              }
              function ce(z) {
                var W = et(z), Z = !Ye(z) && !W;
                return {
                  transition: W,
                  externalComponent: Z,
                  tag: Z ? Object(Q.resolveComponent)(z) : W ? Q.TransitionGroup : z
                };
              }
              function ve(z) {
                var W = z.$slots, Z = z.tag, re = z.realList, Ce = z.getKey, Me = ie({
                  $slots: W,
                  realList: re,
                  getKey: Ce
                }), Qe = ce(Z);
                return new B({
                  nodes: Me,
                  root: Qe,
                  realList: re
                });
              }
              function fe(z, W) {
                var Z = this;
                Object(Q.nextTick)(function() {
                  return Z.$emit(z.toLowerCase(), W);
                });
              }
              function pe(z) {
                var W = this;
                return function(Z, re) {
                  if (W.realList !== null)
                    return W["onDrag".concat(z)](Z, re);
                };
              }
              function ue(z) {
                var W = this, Z = pe.call(this, z);
                return function(re, Ce) {
                  Z.call(W, re, Ce), fe.call(W, z, re);
                };
              }
              var je = null, Se = {
                list: {
                  type: Array,
                  required: !1,
                  default: null
                },
                modelValue: {
                  type: Array,
                  required: !1,
                  default: null
                },
                itemKey: {
                  type: [String, Function],
                  required: !0
                },
                clone: {
                  type: Function,
                  default: function(W) {
                    return W;
                  }
                },
                tag: {
                  type: String,
                  default: "div"
                },
                move: {
                  type: Function,
                  default: null
                },
                componentData: {
                  type: Object,
                  required: !1,
                  default: null
                }
              }, Re = ["update:modelValue", "change"].concat(N([].concat(N(te.manageAndEmit), N(te.emit)).map(function(z) {
                return z.toLowerCase();
              }))), ze = Object(Q.defineComponent)({
                name: "draggable",
                inheritAttrs: !1,
                props: Se,
                emits: Re,
                data: function() {
                  return {
                    error: !1
                  };
                },
                render: function() {
                  try {
                    this.error = !1;
                    var W = this.$slots, Z = this.$attrs, re = this.tag, Ce = this.componentData, Me = this.realList, Qe = this.getKey, wt = ve({
                      $slots: W,
                      tag: re,
                      realList: Me,
                      getKey: Qe
                    });
                    this.componentStructure = wt;
                    var pt = _t({
                      $attrs: Z,
                      componentData: Ce
                    });
                    return wt.render(Q.h, pt);
                  } catch (Fe) {
                    return this.error = !0, Object(Q.h)("pre", {
                      style: {
                        color: "red"
                      }
                    }, Fe.stack);
                  }
                },
                created: function() {
                  this.list !== null && this.modelValue !== null && M.a.error("modelValue and list props are mutually exclusive! Please set one or another.");
                },
                mounted: function() {
                  var W = this;
                  if (!this.error) {
                    var Z = this.$attrs, re = this.$el, Ce = this.componentStructure;
                    Ce.updated();
                    var Me = q({
                      $attrs: Z,
                      callBackBuilder: {
                        manageAndEmit: function(pt) {
                          return ue.call(W, pt);
                        },
                        emit: function(pt) {
                          return fe.bind(W, pt);
                        },
                        manage: function(pt) {
                          return pe.call(W, pt);
                        }
                      }
                    }), Qe = re.nodeType === 1 ? re : re.parentElement;
                    this._sortable = new k.a(Qe, Me), this.targetDomElement = Qe, Qe.__draggable_component__ = this;
                  }
                },
                updated: function() {
                  this.componentStructure.updated();
                },
                beforeUnmount: function() {
                  this._sortable !== void 0 && this._sortable.destroy();
                },
                computed: {
                  realList: function() {
                    var W = this.list;
                    return W || this.modelValue;
                  },
                  getKey: function() {
                    var W = this.itemKey;
                    return typeof W == "function" ? W : function(Z) {
                      return Z[W];
                    };
                  }
                },
                watch: {
                  $attrs: {
                    handler: function(W) {
                      var Z = this._sortable;
                      Z && _e(W).forEach(function(re) {
                        var Ce = S(re, 2), Me = Ce[0], Qe = Ce[1];
                        Z.option(Me, Qe);
                      });
                    },
                    deep: !0
                  }
                },
                methods: {
                  getUnderlyingVm: function(W) {
                    return this.componentStructure.getUnderlyingVm(W) || null;
                  },
                  getUnderlyingPotencialDraggableComponent: function(W) {
                    return W.__draggable_component__;
                  },
                  emitChanges: function(W) {
                    var Z = this;
                    Object(Q.nextTick)(function() {
                      return Z.$emit("change", W);
                    });
                  },
                  alterList: function(W) {
                    if (this.list) {
                      W(this.list);
                      return;
                    }
                    var Z = N(this.modelValue);
                    W(Z), this.$emit("update:modelValue", Z);
                  },
                  spliceList: function() {
                    var W = arguments, Z = function(Ce) {
                      return Ce.splice.apply(Ce, N(W));
                    };
                    this.alterList(Z);
                  },
                  updatePosition: function(W, Z) {
                    var re = function(Me) {
                      return Me.splice(Z, 0, Me.splice(W, 1)[0]);
                    };
                    this.alterList(re);
                  },
                  getRelatedContextFromMoveEvent: function(W) {
                    var Z = W.to, re = W.related, Ce = this.getUnderlyingPotencialDraggableComponent(Z);
                    if (!Ce)
                      return {
                        component: Ce
                      };
                    var Me = Ce.realList, Qe = {
                      list: Me,
                      component: Ce
                    };
                    if (Z !== re && Me) {
                      var wt = Ce.getUnderlyingVm(re) || {};
                      return p(p({}, wt), Qe);
                    }
                    return Qe;
                  },
                  getVmIndexFromDomIndex: function(W) {
                    return this.componentStructure.getVmIndexFromDomIndex(W, this.targetDomElement);
                  },
                  onDragStart: function(W) {
                    this.context = this.getUnderlyingVm(W.item), W.item._underlying_vm_ = this.clone(this.context.element), je = W.item;
                  },
                  onDragAdd: function(W) {
                    var Z = W.item._underlying_vm_;
                    if (Z !== void 0) {
                      x(W.item);
                      var re = this.getVmIndexFromDomIndex(W.newIndex);
                      this.spliceList(re, 0, Z);
                      var Ce = {
                        element: Z,
                        newIndex: re
                      };
                      this.emitChanges({
                        added: Ce
                      });
                    }
                  },
                  onDragRemove: function(W) {
                    if ($(this.$el, W.item, W.oldIndex), W.pullMode === "clone") {
                      x(W.clone);
                      return;
                    }
                    var Z = this.context, re = Z.index, Ce = Z.element;
                    this.spliceList(re, 1);
                    var Me = {
                      element: Ce,
                      oldIndex: re
                    };
                    this.emitChanges({
                      removed: Me
                    });
                  },
                  onDragUpdate: function(W) {
                    x(W.item), $(W.from, W.item, W.oldIndex);
                    var Z = this.context.index, re = this.getVmIndexFromDomIndex(W.newIndex);
                    this.updatePosition(Z, re);
                    var Ce = {
                      element: this.context.element,
                      oldIndex: Z,
                      newIndex: re
                    };
                    this.emitChanges({
                      moved: Ce
                    });
                  },
                  computeFutureIndex: function(W, Z) {
                    if (!W.element)
                      return 0;
                    var re = N(Z.to.children).filter(function(wt) {
                      return wt.style.display !== "none";
                    }), Ce = re.indexOf(Z.related), Me = W.component.getVmIndexFromDomIndex(Ce), Qe = re.indexOf(je) !== -1;
                    return Qe || !Z.willInsertAfter ? Me : Me + 1;
                  },
                  onDragMove: function(W, Z) {
                    var re = this.move, Ce = this.realList;
                    if (!re || !Ce)
                      return !0;
                    var Me = this.getRelatedContextFromMoveEvent(W), Qe = this.computeFutureIndex(Me, W), wt = p(p({}, this.context), {}, {
                      futureIndex: Qe
                    }), pt = p(p({}, W), {}, {
                      relatedContext: Me,
                      draggedContext: wt
                    });
                    return re(pt, Z);
                  },
                  onDragEnd: function() {
                    je = null;
                  }
                }
              }), ct = ze;
              i.default = ct;
            }
          ),
          /***/
          fb6a: (
            /***/
            function(o, i, r) {
              var a = r("23e7"), l = r("861d"), c = r("e8b5"), d = r("23cb"), f = r("50c4"), p = r("fc6a"), h = r("8418"), m = r("b622"), v = r("1dde"), g = r("ae40"), _ = v("slice"), S = g("slice", { ACCESSORS: !0, 0: 0, 1: 2 }), b = m("species"), O = [].slice, w = Math.max;
              a({ target: "Array", proto: !0, forced: !_ || !S }, {
                slice: function(C, k) {
                  var x = p(this), $ = f(x.length), M = d(C, $), R = d(k === void 0 ? $ : k, $), V, j, U;
                  if (c(x) && (V = x.constructor, typeof V == "function" && (V === Array || c(V.prototype)) ? V = void 0 : l(V) && (V = V[b], V === null && (V = void 0)), V === Array || V === void 0))
                    return O.call(x, M, R);
                  for (j = new (V === void 0 ? Array : V)(w(R - M, 0)), U = 0; M < R; M++, U++) M in x && h(j, U, x[M]);
                  return j.length = U, j;
                }
              });
            }
          ),
          /***/
          fc6a: (
            /***/
            function(o, i, r) {
              var a = r("44ad"), l = r("1d80");
              o.exports = function(c) {
                return a(l(c));
              };
            }
          ),
          /***/
          fdbc: (
            /***/
            function(o, i) {
              o.exports = {
                CSSRuleList: 0,
                CSSStyleDeclaration: 0,
                CSSValueList: 0,
                ClientRectList: 0,
                DOMRectList: 0,
                DOMStringList: 0,
                DOMTokenList: 1,
                DataTransferItemList: 0,
                FileList: 0,
                HTMLAllCollection: 0,
                HTMLCollection: 0,
                HTMLFormElement: 0,
                HTMLSelectElement: 0,
                MediaList: 0,
                MimeTypeArray: 0,
                NamedNodeMap: 0,
                NodeList: 1,
                PaintRequestList: 0,
                Plugin: 0,
                PluginArray: 0,
                SVGLengthList: 0,
                SVGNumberList: 0,
                SVGPathSegList: 0,
                SVGPointList: 0,
                SVGStringList: 0,
                SVGTransformList: 0,
                SourceBufferList: 0,
                StyleSheetList: 0,
                TextTrackCueList: 0,
                TextTrackList: 0,
                TouchList: 0
              };
            }
          ),
          /***/
          fdbf: (
            /***/
            function(o, i, r) {
              var a = r("4930");
              o.exports = a && !Symbol.sham && typeof Symbol.iterator == "symbol";
            }
          )
          /******/
        }).default
      );
    });
  }(qu)), qu.exports;
}
var vG = mG();
const gG = /* @__PURE__ */ IY(vG), yG = { class: "nav-item" }, _G = ["onClick"], bG = { class: "ellipsis" }, EG = {
  __name: "FhirSystemsTabs",
  props: {
    elements: { type: Array, default: () => [] },
    active: { type: Object, default: () => {
    } },
    loading: { type: Boolean, default: !1 }
  },
  emits: ["update:elements", "system-selected"],
  setup(e, { emit: t }) {
    const n = t, s = e, o = L("-- no name --"), i = I({
      get: () => s.elements,
      set: (a) => n("update:elements", a)
    });
    async function r(a, l) {
      n("system-selected", a, l);
    }
    return (a, l) => (y(), le(T(gG), {
      class: "nav nav-tabs",
      tag: "ul",
      modelValue: i.value,
      "onUpdate:modelValue": l[0] || (l[0] = (c) => i.value = c),
      handle: ".handle",
      "item-key": "ehr_id"
    }, {
      item: K(({ element: c, index: d }) => {
        var f;
        return [
          u("li", yG, [
            u("span", {
              class: Te(["nav-link", {
                active: (c == null ? void 0 : c.ehr_id) === ((f = e.active) == null ? void 0 : f.ehr_id)
              }]),
              "aria-current": "page"
            }, [
              u("button", {
                type: "button",
                class: "btn btn-sm",
                onClick: Vt((p) => r(c, d), ["prevent"])
              }, [
                u("span", bG, H(c.ehr_name ?? o.value), 1)
              ], 8, _G),
              l[1] || (l[1] = u("button", {
                type: "button",
                class: "handle btn btn-sm visible-hover",
                style: { cursor: "move" }
              }, [
                u("i", { class: "fa fa-align-justify" })
              ], -1))
            ], 2)
          ])
        ];
      }),
      _: 1
    }, 8, ["modelValue"]));
  }
}, SG = /* @__PURE__ */ he(EG, [["__scopeId", "data-v-d48fd07f"]]), wG = ["innerHTML"], ho = {
  __name: "ErrorList",
  props: {
    errors: { type: Array, default: () => [] }
  },
  setup(e) {
    return (t, n) => (y(), E("div", null, [
      (y(!0), E(J, null, Ee(e.errors, (s, o) => (y(), E("small", {
        key: o,
        class: "d-block text-danger",
        innerHTML: s
      }, null, 8, wG))), 128))
    ]));
  }
}, NG = { class: "d-flex gap-2" }, _b = {
  __name: "AuthenticationParameterEntry",
  props: {
    name: { type: String, default: "" },
    value: { type: String, default: "" },
    context: { type: String, default: "" }
  },
  emits: ["update:name", "update:value", "update:context"],
  setup(e, { expose: t, emit: n }) {
    const s = Xv({
      name: [Ks()],
      value: [Ks()]
    }), o = e, i = n, r = I(
      () => s({ name: l.value, value: c.value, context: d.value })
    ), a = I(() => r.value.errors()), l = I({
      get: () => o.name,
      set: (f) => i("update:name", f)
    }), c = I({
      get: () => o.value,
      set: (f) => i("update:value", f)
    }), d = I({
      get: () => o.context,
      set: (f) => i("update:context", f)
    });
    return t({ validation: r }), (f, p) => (y(), E("div", NG, [
      u("div", null, [
        P(u("input", {
          class: "form-control form-control-sm",
          type: "text",
          placeholder: "key...",
          "onUpdate:modelValue": p[0] || (p[0] = (h) => l.value = h)
        }, null, 512), [
          [Ue, l.value]
        ]),
        F(ho, {
          errors: a.value.name
        }, null, 8, ["errors"])
      ]),
      u("div", null, [
        P(u("input", {
          class: "form-control form-control-sm",
          type: "text",
          placeholder: "value...",
          "onUpdate:modelValue": p[1] || (p[1] = (h) => c.value = h)
        }, null, 512), [
          [Ue, c.value]
        ]),
        F(ho, {
          errors: a.value.value
        }, null, 8, ["errors"])
      ]),
      u("div", null, [
        P(u("select", {
          class: "form-select form-select-sm",
          "onUpdate:modelValue": p[2] || (p[2] = (h) => d.value = h)
        }, p[3] || (p[3] = [
          u("option", { value: "" }, "Always", -1),
          u("option", { value: "ehr" }, "ehr launch", -1),
          u("option", { value: "standalone" }, "standalone launch", -1)
        ]), 512), [
          [Zt, d.value]
        ])
      ]),
      ye(f.$slots, "default")
    ]));
  }
}, OG = { class: "my-2" }, xG = {
  key: 0,
  class: "fst-italic text-muted d-block"
}, CG = { class: "d-flex flex-column gap-2" }, TG = ["onClick"], $G = { class: "d-flex gap-2 justify-content-end" }, kG = ["onClick"], DG = ["onClick", "disabled"], IG = {
  __name: "AuthenticationParameterManager",
  props: { modelValue: { type: Array, default: () => [] } },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = () => ({ name: "", value: "", context: "" }), s = e, o = t, i = L(), r = L({}), a = L(), l = I(
      () => {
        var h, m;
        return !((m = (h = a.value) == null ? void 0 : h.validation) != null && m.hasErrors());
      }
    ), c = I({
      get: () => s.modelValue,
      set: (h) => o("update:modelValue", h)
    });
    function d(h) {
      const m = c.value;
      m.push(h), c.value = [...m];
    }
    async function f() {
      r.value = n(), await i.value.show() && d(r.value);
    }
    function p(h) {
      const m = c.value, v = m.find((g) => g === h);
      v < 0 || (m.splice(v, 1), c.value = [...m]);
    }
    return (h, m) => {
      var _;
      const v = be("b-modal"), g = Bt("tt");
      return y(), E(J, null, [
        u("div", OG, [
          u("button", {
            type: "button",
            class: "btn btn-primary btn-sm",
            onClick: f
          }, [
            m[3] || (m[3] = u("i", { class: "fas fa-plus fa-fw me-1" }, null, -1)),
            P(u("span", null, null, 512), [
              [g, void 0, "cdis_custom_auth_params_05"]
            ]),
            m[4] || (m[4] = u("span", null, "...", -1))
          ])
        ]),
        ((_ = c.value) == null ? void 0 : _.length) === 0 ? (y(), E("span", xG, "no params...")) : ae("", !0),
        u("div", CG, [
          (y(!0), E(J, null, Ee(c.value, (S, b) => (y(), le(_b, {
            key: `${b}`,
            name: S.name,
            "onUpdate:name": (O) => S.name = O,
            value: S.value,
            "onUpdate:value": (O) => S.value = O,
            context: S.context,
            "onUpdate:context": (O) => S.context = O
          }, {
            default: K(() => [
              u("div", null, [
                u("button", {
                  type: "button",
                  class: "btn btn-sm btn-danger",
                  onClick: (O) => p(S)
                }, m[5] || (m[5] = [
                  u("i", { class: "fas fa-trash fa-fw" }, null, -1)
                ]), 8, TG)
              ])
            ]),
            _: 2
          }, 1032, ["name", "onUpdate:name", "value", "onUpdate:value", "context", "onUpdate:context"]))), 128))
        ]),
        (y(), le(Ss, { to: "body" }, [
          F(v, {
            ref_key: "newParamModal",
            ref: i
          }, {
            title: K(() => m[6] || (m[6] = [
              se("New Authentication Parameter")
            ])),
            footer: K(({ hide: S }) => [
              u("div", $G, [
                u("button", {
                  class: "btn btn-sm btn-secondary",
                  type: "button",
                  onClick: (b) => S(!1)
                }, m[7] || (m[7] = [
                  u("i", { class: "fas fa-times fa-fw me-1" }, null, -1),
                  u("span", null, "Cancel", -1)
                ]), 8, kG),
                u("button", {
                  class: "btn btn-sm btn-primary",
                  type: "button",
                  onClick: (b) => S(!0),
                  disabled: !l.value
                }, m[8] || (m[8] = [
                  u("i", { class: "fas fa-check fa-fw me-1" }, null, -1),
                  u("span", null, "OK", -1)
                ]), 8, DG)
              ])
            ]),
            default: K(() => [
              F(_b, {
                ref_key: "newAuthParamRef",
                ref: a,
                name: r.value.name,
                "onUpdate:name": m[0] || (m[0] = (S) => r.value.name = S),
                value: r.value.value,
                "onUpdate:value": m[1] || (m[1] = (S) => r.value.value = S),
                context: r.value.context,
                "onUpdate:context": m[2] || (m[2] = (S) => r.value.context = S)
              }, null, 8, ["name", "value", "context"])
            ]),
            _: 1
          }, 512)
        ]))
      ], 64);
    };
  }
}, RG = { class: "input-group" }, AG = ["type"], MG = {
  __name: "SecretInput",
  props: {
    modelValue: { type: String, default: "" },
    showText: { type: String, default: "show" },
    hideText: { type: String, default: "hide" }
  },
  emits: ["update:modelValue"],
  setup(e, { emit: t }) {
    const n = e, s = t, o = I({
      get: () => n.modelValue,
      set: (l) => s("update:modelValue", l)
    }), i = I(() => r.value === "password" ? n.showText : n.hideText), r = L("password");
    function a() {
      r.value === "password" ? r.value = "text" : r.value = "password";
    }
    return (l, c) => (y(), E("div", RG, [
      P(u("input", On({
        type: r.value,
        class: "form-control form-control-sm",
        autocomplete: "one-time-code",
        "onUpdate:modelValue": c[0] || (c[0] = (d) => o.value = d)
      }, { ...l.$attrs }), null, 16, AG), [
        [dv, o.value]
      ]),
      u("button", {
        type: "button",
        class: "btn btn-sm btn-outline-secondary",
        onClick: a
      }, H(i.value), 1)
    ]));
  }
}, PG = { class: "d-flex gap-2" }, VG = ["onClick"], LG = { class: "d-block" }, FG = { class: "fst-italic text-break" }, UG = { class: "d-block" }, jG = { class: "fst-italic text-break" }, BG = {
  __name: "CapabilityStatementParser",
  emits: ["copy"],
  setup(e, { emit: t }) {
    const n = Ns(), s = t, o = L(!1), i = L(), r = L(), a = L(), l = L();
    async function c(p) {
      var m, v, g, _, S, b, O;
      if (typeof p != "string") return;
      const h = (w) => w.replace(/\/+$/, "") + "";
      r.value = `${h(p)}/metadata`;
      try {
        o.value = !0;
        const w = await cn.get(r.value, {
          headers: { accept: "Application/JSON" }
        }), N = (b = (S = (_ = (g = (v = (m = w == null ? void 0 : w.data) == null ? void 0 : m.rest) == null ? void 0 : v[0]) == null ? void 0 : g.security) == null ? void 0 : _.extension) == null ? void 0 : S[0]) == null ? void 0 : b.extension;
        a.value = null, l.value = null;
        for (const k of N)
          (k == null ? void 0 : k.url) === "authorize" ? a.value = k == null ? void 0 : k.valueUri : (k == null ? void 0 : k.url) === "token" && (l.value = k == null ? void 0 : k.valueUri);
        const C = [];
        return a.value || C.push("Could not find the autorize URL"), l.value || C.push("Could not find the token URL"), (C == null ? void 0 : C.length) === 0 ? (O = i.value) == null ? void 0 : O.show() : d(C.join(`
`));
      } catch (w) {
        d(w);
      } finally {
        o.value = !1;
      }
    }
    function d(p) {
      n.alert({
        title: "Error",
        body: `<pre>There was an error fetching the capability statement:
${p}</pre>`
      });
    }
    function f() {
      var p;
      s("copy", { authorizeURL: a.value, tokenURL: l.value }), (p = i.value) == null || p.hide();
    }
    return (p, h) => {
      const m = be("b-modal");
      return y(), E("div", null, [
        ye(p.$slots, "default", {
          parse: c,
          loading: o.value
        }),
        (y(), le(Ss, { to: "body" }, [
          F(m, {
            ref_key: "capabilityStatementModal",
            ref: i,
            size: "lg"
          }, {
            header: K(() => h[0] || (h[0] = [
              u("i", { class: "fas fa-circle-check fa-fw me-1 text-success" }, null, -1),
              u("span", null, "Success", -1)
            ])),
            footer: K(({ hide: v }) => [
              u("div", PG, [
                u("button", {
                  class: "btn btn-sm btn-secondary",
                  type: "button",
                  onClick: v
                }, h[1] || (h[1] = [
                  u("i", { class: "fas fa-times fa-fw me-1" }, null, -1),
                  u("span", null, "Close", -1)
                ]), 8, VG),
                u("button", {
                  class: "btn btn-sm btn-primary",
                  type: "button",
                  onClick: f
                }, h[2] || (h[2] = [
                  u("i", { class: "fas fa-copy fa-fw me-1" }, null, -1),
                  u("span", null, "Copy", -1)
                ]))
              ])
            ]),
            default: K(() => [
              u("div", null, [
                u("p", null, [
                  h[3] || (h[3] = se(" The FHIR URLs below for your Authorize endpoint and Token endpoint were found from the FHIR Capability Statement (")),
                  u("i", null, H(r.value), 1),
                  h[4] || (h[4] = se("). "))
                ]),
                h[7] || (h[7] = u("p", null, " You may copy these URLs into their corresponding text boxes on this page. ", -1)),
                u("div", LG, [
                  h[5] || (h[5] = u("span", { class: "fw-bold me-2 text-nowrap" }, "Authorize URL:", -1)),
                  u("span", FG, H(a.value), 1)
                ]),
                u("div", UG, [
                  h[6] || (h[6] = u("span", { class: "fw-bold me-2 text-nowrap" }, "Token URL:", -1)),
                  u("span", jG, H(l.value), 1)
                ])
              ])
            ]),
            _: 1
          }, 512)
        ]))
      ]);
    };
  }
}, HG = {
  __name: "CopyWrapper",
  setup(e) {
    const t = Uf(), n = Dn();
    function s(o, i = !0, r = {}) {
      t.copy(o), i && n.toast({
        title: "Success",
        body: "Text was copied to the clipboard",
        ...r
      });
    }
    return (o, i) => ye(o.$slots, "default", { copy: s });
  }
}, YG = { class: "container-fluid" }, WG = { action: "" }, GG = { class: "row d-none" }, zG = { class: "col" }, KG = ["for"], XG = { class: "col" }, qG = ["id"], JG = { class: "row" }, QG = { class: "col" }, ZG = ["for"], ez = { class: "col" }, tz = ["id"], nz = { class: "text-muted" }, sz = { class: "row" }, oz = { class: "col" }, rz = ["for"], iz = { class: "col" }, az = { class: "input-group" }, lz = ["id", "value"], cz = ["onClick"], uz = { class: "text-muted" }, dz = { class: "row" }, fz = { class: "col" }, pz = { class: "subsection-title" }, hz = { class: "d-block" }, mz = { class: "d-block" }, vz = { class: "col" }, gz = { class: "col" }, yz = ["for"], _z = { class: "col" }, bz = ["id"], Ez = { class: "col" }, Sz = ["for"], wz = { class: "col" }, Nz = { class: "row" }, Oz = { class: "col" }, xz = { class: "subsection-title" }, Cz = { class: "d-block" }, Tz = { class: "d-block" }, $z = { class: "d-block text-muted" }, kz = { class: "row ms-5 grid-auto-1fr" }, Dz = ["for"], Iz = ["id"], Rz = { class: "text-muted" }, Az = ["onClick", "disabled"], Mz = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, Pz = {
  key: 1,
  class: "fas fa-magnifying-glass fa-fw me-1"
}, Vz = ["for"], Lz = ["id"], Fz = ["for"], Uz = ["id"], jz = { class: "row" }, Bz = { class: "col" }, Hz = ["for"], Yz = { class: "d-block" }, Wz = { class: "col" }, Gz = ["id"], zz = { class: "text-muted" }, Kz = { class: "d-block" }, Xz = { class: "d-block" }, qz = { class: "row" }, Jz = { class: "col" }, Qz = ["for"], Zz = { class: "d-block" }, eK = { class: "col" }, tK = ["id"], nK = { class: "text-muted" }, sK = { class: "d-block" }, oK = { class: "text-primary" }, rK = { class: "d-block" }, iK = { class: "row" }, aK = { class: "subsection-title" }, lK = { class: "subsection-description" }, cK = {
  __name: "FhirSettingsForm",
  props: /* @__PURE__ */ bs({
    // data: { type: Object, default: () => ({}) },
    redirectUrl: { type: String, default: () => "" }
  }, {
    data: { default: () => ({}) },
    dataModifiers: {}
  }),
  emits: /* @__PURE__ */ bs(["update:data"], ["update:data"]),
  setup(e, { emit: t }) {
    const n = mn(e, "data"), s = L(jv());
    function o({ authorizeURL: i, tokenURL: r }) {
      n.value.fhir_authorize_url = i, n.value.fhir_token_url = r;
    }
    return (i, r) => {
      const a = Bt("tt");
      return y(), E("div", null, [
        u("section", YG, [
          u("form", WG, [
            u("div", GG, [
              u("div", zG, [
                u("label", {
                  for: `${s.value}-order`
                }, "order", 8, KG)
              ]),
              u("div", XG, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  id: `${s.value}-input-order`,
                  "onUpdate:modelValue": r[0] || (r[0] = (l) => n.value.order = l)
                }, null, 8, qG), [
                  [Ue, n.value.order]
                ])
              ])
            ]),
            u("div", JG, [
              u("div", QG, [
                P((y(), E("label", {
                  for: `${s.value}-input-ehr_name`
                }, r[10] || (r[10] = [
                  se("ehr_name")
                ]), 8, ZG)), [
                  [a, void 0, "ws_214"]
                ]),
                P(u("p", null, null, 512), [
                  [a, void 0, "ws_235"]
                ])
              ]),
              u("div", ez, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  id: `${s.value}-input-ehr_name`,
                  "onUpdate:modelValue": r[1] || (r[1] = (l) => n.value.ehr_name = l)
                }, null, 8, tz), [
                  [Ue, n.value.ehr_name]
                ]),
                u("small", nz, [
                  P(u("span", null, null, 512), [
                    [a, void 0, "control_center_4881"]
                  ])
                ])
              ])
            ]),
            u("div", sz, [
              u("div", oz, [
                P((y(), E("label", {
                  for: `${s.value}-input-redirect-url`
                }, r[11] || (r[11] = [
                  se("redirect URL")
                ]), 8, rz)), [
                  [a, void 0, "ws_237"]
                ]),
                P(u("p", null, null, 512), [
                  [a, void 0, "ws_238"]
                ])
              ]),
              u("div", iz, [
                u("div", az, [
                  u("input", {
                    type: "text",
                    class: "form-control form-control-sm",
                    id: `${s.value}-input-redirect-url`,
                    value: e.redirectUrl,
                    disabled: ""
                  }, null, 8, lz),
                  F(HG, null, {
                    default: K(({ copy: l }) => [
                      u("button", {
                        type: "button",
                        class: "btn btn-sm btn-outline-secondary",
                        onClick: Vt((c) => l(e.redirectUrl), ["prevent"])
                      }, r[12] || (r[12] = [
                        u("i", { class: "fas fa-copy fa-fw" }, null, -1)
                      ]), 8, cz)
                    ]),
                    _: 1
                  })
                ]),
                u("small", uz, [
                  P(u("span", null, null, 512), [
                    [a, void 0, "ws_239"]
                  ])
                ])
              ])
            ]),
            u("div", dz, [
              u("div", fz, [
                u("div", pz, [
                  P(u("span", hz, null, 512), [
                    [a, void 0, "ws_219"]
                  ])
                ]),
                P(u("span", mz, null, 512), [
                  [a, void 0, "ws_220"]
                ])
              ]),
              u("div", vz, [
                u("div", gz, [
                  P((y(), E("label", {
                    for: `${s.value}-input-client_id`
                  }, r[13] || (r[13] = [
                    se("client_id")
                  ]), 8, yz)), [
                    [a, void 0, "ws_221"]
                  ])
                ]),
                u("div", _z, [
                  P(u("input", {
                    type: "text",
                    class: "form-control form-control-sm",
                    id: `${s.value}-input-client_id`,
                    autocomplete: "one-time-code",
                    "onUpdate:modelValue": r[2] || (r[2] = (l) => n.value.client_id = l)
                  }, null, 8, bz), [
                    [Ue, n.value.client_id]
                  ])
                ]),
                u("div", Ez, [
                  P((y(), E("label", {
                    for: `${s.value}-client_secret`
                  }, r[14] || (r[14] = [
                    se("client_secret")
                  ]), 8, Sz)), [
                    [a, void 0, "ws_222"]
                  ])
                ]),
                u("div", wz, [
                  F(MG, {
                    id: `${s.value}-client_secret`,
                    modelValue: n.value.client_secret,
                    "onUpdate:modelValue": r[3] || (r[3] = (l) => n.value.client_secret = l),
                    "show-text": T(es)("ws_223")
                  }, null, 8, ["id", "modelValue", "show-text"])
                ])
              ])
            ]),
            u("div", Nz, [
              u("div", Oz, [
                u("div", xz, [
                  P(u("span", Cz, null, 512), [
                    [a, void 0, "ws_224"]
                  ])
                ]),
                P(u("span", Tz, null, 512), [
                  [a, void 0, "ws_225"]
                ]),
                u("small", $z, [
                  P(u("span", null, null, 512), [
                    [a, void 0, "ws_260"]
                  ])
                ])
              ])
            ]),
            u("div", kz, [
              u("div", null, [
                P((y(), E("label", {
                  for: `${s.value}-input-fhir_base_url`
                }, r[15] || (r[15] = [
                  se("fhir_base_url")
                ]), 8, Dz)), [
                  [a, void 0, "ws_228"]
                ])
              ]),
              u("div", null, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  id: `${s.value}-input-fhir_base_url`,
                  "onUpdate:modelValue": r[4] || (r[4] = (l) => n.value.fhir_base_url = l)
                }, null, 8, Iz), [
                  [Ue, n.value.fhir_base_url]
                ]),
                u("small", Rz, [
                  P(u("span", null, null, 512), [
                    [a, void 0, "ws_229"]
                  ])
                ]),
                F(BG, { onCopy: o }, {
                  default: K(({ parse: l, loading: c }) => [
                    u("button", {
                      type: "button",
                      class: "btn btn-sm btn-primary mt-2",
                      onClick: (d) => l(n.value.fhir_base_url),
                      disabled: c || !n.value.fhir_base_url
                    }, [
                      c ? (y(), E("i", Mz)) : (y(), E("i", Pz)),
                      P(u("span", null, null, 512), [
                        [a, void 0, "ws_231"]
                      ])
                    ], 8, Az)
                  ]),
                  _: 1
                })
              ]),
              u("div", null, [
                P((y(), E("label", {
                  for: `${s.value}-input-fhir_token_url`
                }, r[16] || (r[16] = [
                  se("fhir_token_url")
                ]), 8, Vz)), [
                  [a, void 0, "ws_226"]
                ])
              ]),
              u("div", null, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  id: `${s.value}-input-fhir_token_url`,
                  "onUpdate:modelValue": r[5] || (r[5] = (l) => n.value.fhir_token_url = l)
                }, null, 8, Lz), [
                  [Ue, n.value.fhir_token_url]
                ])
              ]),
              u("div", null, [
                P((y(), E("label", {
                  for: `${s.value}-input-fhir_authorize_url`
                }, r[17] || (r[17] = [
                  se("fhir_authorize_url")
                ]), 8, Fz)), [
                  [a, void 0, "ws_227"]
                ])
              ]),
              u("div", null, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  id: `${s.value}-input-fhir_authorize_url`,
                  "onUpdate:modelValue": r[6] || (r[6] = (l) => n.value.fhir_authorize_url = l)
                }, null, 8, Uz), [
                  [Ue, n.value.fhir_authorize_url]
                ])
              ])
            ]),
            u("div", jz, [
              u("div", Bz, [
                P((y(), E("label", {
                  for: `${s.value}-input-fhir_identity_provider`
                }, r[18] || (r[18] = [
                  se("fhir_identity_provider")
                ]), 8, Hz)), [
                  [a, void 0, "fhir_identity_provider_title"]
                ]),
                P(u("span", Yz, null, 512), [
                  [a, void 0, "fhir_identity_provider_subtitle"]
                ])
              ]),
              u("div", Wz, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  id: `${s.value}-input-fhir_identity_provider`,
                  "onUpdate:modelValue": r[7] || (r[7] = (l) => n.value.fhir_identity_provider = l)
                }, null, 8, Gz), [
                  [Ue, n.value.fhir_identity_provider]
                ]),
                u("small", zz, [
                  P(u("span", Kz, null, 512), [
                    [a, void 0, "fhir_identity_provider_description"]
                  ]),
                  P(u("span", Xz, null, 512), [
                    [a, void 0, "fhir_identity_provider_description2"]
                  ])
                ])
              ])
            ]),
            u("div", qz, [
              u("div", Jz, [
                P((y(), E("label", {
                  for: `${s.value}-input-patient_identifier_string`
                }, r[19] || (r[19] = [
                  se("patient_identifier_string")
                ]), 8, Qz)), [
                  [a, void 0, "ws_217"]
                ]),
                P(u("span", Zz, null, 512), [
                  [a, void 0, "ws_218"]
                ])
              ]),
              u("div", eK, [
                P(u("input", {
                  type: "text",
                  class: "form-control form-control-sm",
                  id: `${s.value}-input-patient_identifier_string`,
                  "onUpdate:modelValue": r[8] || (r[8] = (l) => n.value.patient_identifier_string = l)
                }, null, 8, tK), [
                  [Ue, n.value.patient_identifier_string]
                ]),
                u("small", nK, [
                  P(u("span", sK, null, 512), [
                    [a, void 0, "control_center_4882"]
                  ])
                ]),
                u("small", oK, [
                  P(u("span", rK, null, 512), [
                    [a, void 0, "control_center_4883"]
                  ])
                ])
              ])
            ]),
            u("div", iK, [
              u("div", aK, [
                P(u("span", null, null, 512), [
                  [a, void 0, "cdis_custom_auth_params_01"]
                ])
              ]),
              u("div", lK, [
                P(u("span", null, null, 512), [
                  [a, void 0, "cdis_custom_auth_params_02"]
                ]),
                P(u("span", null, null, 512), [
                  [a, void 0, "cdis_custom_auth_params_04"]
                ])
              ]),
              F(IG, {
                modelValue: n.value.fhir_custom_auth_params,
                "onUpdate:modelValue": r[9] || (r[9] = (l) => n.value.fhir_custom_auth_params = l)
              }, null, 8, ["modelValue"])
            ])
          ])
        ])
      ]);
    };
  }
}, bb = /* @__PURE__ */ he(cK, [["__scopeId", "data-v-19851c4f"]]);
class uK {
  constructor() {
    this.events = {};
  }
  on(t, n) {
    this.events[t] || (this.events[t] = []), this.events[t].push(n);
  }
  off(t, n) {
    this.events[t] && (this.events[t] = this.events[t].filter((s) => s !== n));
  }
  emit(t, ...n) {
    this.events[t] && this.events[t].forEach((s) => s(...n));
  }
}
const LN = ({ multiple: e = !1 } = {}) => {
  const t = new uK();
  function n(r) {
    return new Promise((l, c) => {
      r || c();
      var d = new FileReader();
      d.onload = (f) => {
        var p = f.target.result;
        l(p);
      }, d.readAsText(r);
    });
  }
  async function s(r) {
    const a = r.target, l = (a == null ? void 0 : a.files) ?? [];
    if (l.length === 0) return;
    const c = [];
    for (const d of l) {
      const f = await n(d);
      c.push(f);
    }
    t.emit("files-read", c);
  }
  const o = () => {
    const r = document.createElement("input");
    return r.setAttribute("type", "file"), e && r.setAttribute("multiple", !0), r.style.display = "none", r.addEventListener("change", s), document.body.appendChild(r), r;
  };
  let i = null;
  return {
    async select() {
      return new Promise((a, l) => {
        const c = (d) => {
          a(d), t.off("files-read", c), document.body.removeChild(i), i = null;
        };
        i || (i = o()), i.click(), t.on("files-read", c);
      });
    }
  };
}, dK = { class: "p-2 fhir-system-page" }, fK = { class: "d-flex gap-2 fhir-system-actions border-bottom py-2" }, pK = { class: "dropdown" }, hK = { class: "dropdown-menu" }, mK = { class: "p-2 border-top" }, vK = { class: "d-flex justify-content-end mt-2 footer py-2 border-top" }, gK = {
  key: 0,
  class: "btn btn-sm btn-primary",
  disabled: ""
}, yK = ["disabled"], _K = { class: "d-flex justify-content-end gap-2" }, bK = ["onClick"], EK = {
  __name: "FhirSystemsPage",
  setup(e) {
    const t = Kv(), n = Hc(), s = zv(), o = Ns(), i = Dn(), r = LN(), { loading: a, form: l, current: c } = xe(t), d = I(() => s.redirectURL), f = I(() => n.savePending), p = I({
      get: () => t.list,
      set: (C) => t.list = C
    }), h = L(), m = L({});
    async function v(C, k) {
      t.setCurrent(C);
    }
    async function g() {
      var C;
      try {
        const k = (C = c.value) == null ? void 0 : C.ehr_id, x = await t.save();
        await n.loadSettings();
        const $ = t.findByEhrId(k);
        if (!$) return;
        t.setCurrent($), i.toast({ title: "Success", body: "Settings saved" });
      } catch (k) {
        const x = io(k);
        i.toast({ title: "Error", body: x });
      }
    }
    function _() {
      var C;
      m.value = t.makeNewSystem(), (C = h.value) == null || C.show();
    }
    async function S() {
      var C;
      try {
        const k = await t.add(m.value);
        i.toast({ title: "Success", body: "New FHIR system created" }), await n.loadSettings();
      } catch (k) {
        const x = io(k);
        i.toast({ title: "Error", body: x });
      } finally {
        (C = h.value) == null || C.hide();
      }
    }
    async function b() {
      if (!await o.confirm({
        title: "Confirm delete",
        body: "Are you sure you want to delete this element?"
      })) return;
      const k = c.value, x = k == null ? void 0 : k.ehr_id;
      x < 0 ? t.remove(k) : (await t.delete(x), await n.loadSettings()), i.toast({
        title: "Success",
        body: "The settings were removed successfully."
      });
    }
    async function O() {
      const C = await r.select();
      w(C);
    }
    function w(C) {
      var x;
      if ((C == null ? void 0 : C.length) < 1) {
        console.error("no files selected");
        return;
      }
      const k = C == null ? void 0 : C[0];
      try {
        const $ = JSON.parse(k);
        m.value = $, (x = h.value) == null || x.show(), i.toast({
          title: "Import Successful",
          body: "The file was imported. Please review the data before saving."
        });
      } catch ($) {
        i.toast({
          title: "Import Error",
          body: "There was an error importing the file. Please make sure to select a valid JSON file."
        }), console.error($);
      }
    }
    function N() {
      const C = t.current;
      if (!C) return;
      const k = JSON.stringify(C), x = `${C.ehr_name}.json`;
      jf(k, {
        fileName: x
      }), i.toast({
        title: "Export Successful",
        body: `The setttings have been exported as '${x}'.`
      });
    }
    return Wi(() => {
    }), (C, k) => {
      const x = be("b-modal");
      return y(), E("div", dK, [
        k[13] || (k[13] = lv("<p data-v-cd3c99d0> This interface enables the connection of REDCap with multiple FHIR (Fast Healthcare Interoperability Resources) systems. FHIR is a standard for electronic healthcare information exchange, while SMART on FHIR provides specifications for integrating apps with Electronic Health Records using FHIR standards and OAuth2 security. </p><h6 data-v-cd3c99d0>Using This Page:</h6><ol data-v-cd3c99d0><li data-v-cd3c99d0><strong data-v-cd3c99d0>Navigation Tabs:</strong> Each tab corresponds to a different FHIR system. Select a tab to view or edit its settings. </li><li data-v-cd3c99d0><strong data-v-cd3c99d0>FHIR System Settings:</strong> In each tab, fill in the necessary information for connecting to a FHIR system. </li><li data-v-cd3c99d0><strong data-v-cd3c99d0>Adding a New FHIR System:</strong> Click the button next to the navigation tabs to add a new system. A new tab will appear for entering the new system&#39;s settings. </li><li data-v-cd3c99d0><strong data-v-cd3c99d0>Reorder the FHIR Systems:</strong> Drag and drop a tab to change the order of the FHIR systems. After changing the order, click the save icon to persist the change. The first one will be used as the default for projects where a specific FHIR system is not selected. </li></ol>", 3)),
        u("div", fK, [
          u("div", pK, [
            k[5] || (k[5] = u("button", {
              class: "btn btn-secondary dropdown-toggle",
              type: "button",
              id: "dropdownMenuButton1",
              "data-bs-toggle": "dropdown",
              "aria-expanded": "false"
            }, [
              u("i", { class: "fas fa-cog fa-fw" })
            ], -1)),
            u("ul", hK, [
              u("li", null, [
                u("a", {
                  class: "dropdown-item",
                  href: "#",
                  onClick: Vt(O, ["prevent"])
                }, k[3] || (k[3] = [
                  u("i", { class: "fas fa-file-import fa-fw me-1" }, null, -1),
                  u("span", null, "Import", -1)
                ]))
              ]),
              u("li", null, [
                u("a", {
                  class: "dropdown-item",
                  href: "#",
                  onClick: Vt(N, ["prevent"])
                }, k[4] || (k[4] = [
                  u("i", { class: "fas fa-file-export fa-fw me-1" }, null, -1),
                  u("span", null, "Export", -1)
                ]))
              ])
            ])
          ]),
          u("div", { class: "ms-auto d-flex gap-2" }, [
            u("button", {
              type: "button",
              class: "btn btn-sm btn-danger",
              onClick: b
            }, k[6] || (k[6] = [
              u("i", { class: "fas fa-trash fa-fw me-1" }, null, -1),
              u("span", null, "Delete", -1)
            ]))
          ]),
          u("button", {
            type: "button",
            class: "btn btn-sm btn-success",
            onClick: _
          }, k[7] || (k[7] = [
            u("i", { class: "fas fa-plus fa-fw me-1" }, null, -1),
            u("span", null, "Add", -1)
          ]))
        ]),
        u("div", null, [
          F(SG, {
            elements: p.value,
            "onUpdate:elements": k[0] || (k[0] = ($) => p.value = $),
            active: T(c),
            "save-pending": f.value,
            loading: T(a),
            onSystemSelected: v
          }, null, 8, ["elements", "active", "save-pending", "loading"]),
          u("div", mK, [
            F(bb, {
              data: T(l),
              "onUpdate:data": k[1] || (k[1] = ($) => lt(l) ? l.value = $ : null),
              "redirect-url": d.value
            }, null, 8, ["data", "redirect-url"]),
            u("div", vK, [
              T(a) ? (y(), E("button", gK, k[8] || (k[8] = [
                u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" }, null, -1),
                u("span", null, "Loading...", -1)
              ]))) : (y(), E("button", {
                key: 1,
                class: "btn btn-sm btn-primary",
                onClick: g,
                disabled: !f.value
              }, k[9] || (k[9] = [
                u("i", { class: "fas fa-save fa-fw me-1" }, null, -1),
                u("span", null, "Save", -1)
              ]), 8, yK))
            ])
          ])
        ]),
        F(x, {
          ref_key: "newSystemModal",
          ref: h,
          size: "xl"
        }, {
          title: K(() => k[10] || (k[10] = [
            se("New FHIR System")
          ])),
          footer: K(({ hide: $ }) => [
            u("div", _K, [
              u("button", {
                class: "btn btn-sm btn-secondary",
                type: "button",
                onClick: $
              }, k[11] || (k[11] = [
                u("i", { class: "fas fa-times fa-fw me-1" }, null, -1),
                u("span", null, "Cancel", -1)
              ]), 8, bK),
              u("button", {
                class: "btn btn-sm btn-primary",
                type: "button",
                onClick: S
              }, k[12] || (k[12] = [
                u("i", { class: "fas fa-save fa-fw me-1" }, null, -1),
                u("span", null, "Save", -1)
              ]))
            ])
          ]),
          default: K(() => [
            F(bb, {
              data: m.value,
              "onUpdate:data": k[2] || (k[2] = ($) => m.value = $),
              "redirect-url": d.value
            }, null, 8, ["data", "redirect-url"])
          ]),
          _: 1
        }, 512)
      ]);
    };
  }
}, SK = /* @__PURE__ */ he(EK, [["__scopeId", "data-v-cd3c99d0"]]), wK = { class: "table table-bordered table-hover table-striped" }, NK = ["onMouseenter", "onMouseleave", "onMouseover"], OK = { class: "text-center" }, xK = { class: "text-center" }, CK = { class: "text-center" }, TK = { class: "ellipsis" }, $K = {
  __name: "CustomMappingTable",
  props: {
    items: { type: Array, default: () => [] }
  },
  emits: ["mouseenter-row", "mouseleave-row", "mouseover-row"],
  setup(e, { emit: t }) {
    const n = t, s = {
      props: {
        value: { type: Boolean, default: !1 }
      },
      setup(a, { slots: l }) {
        return () => yo("i", {
          class: `fa-regular fa-fw ${(a == null ? void 0 : a.value) === !0 ? "fa-square-check" : "fa-square"}`,
          innerHTML: ""
        });
      }
    };
    function o(a, l, c) {
      n("mouseover-row", { event: a, item: l, index: c });
    }
    function i(a, l, c) {
      n("mouseenter-row", { event: a, item: l, index: c });
    }
    function r(a, l, c) {
      n("mouseleave-row", { event: a, item: l, index: c });
    }
    return (a, l) => (y(), E("div", null, [
      ye(a.$slots, "before-table", {}, void 0, !0),
      u("table", wK, [
        u("thead", null, [
          u("tr", null, [
            l[0] || (l[0] = u("th", null, "field", -1)),
            l[1] || (l[1] = u("th", null, "label", -1)),
            l[2] || (l[2] = u("th", null, "description", -1)),
            l[3] || (l[3] = u("th", null, "category", -1)),
            l[4] || (l[4] = u("th", null, "subcategory", -1)),
            l[5] || (l[5] = u("th", null, "temporal", -1)),
            l[6] || (l[6] = u("th", null, "identifier", -1)),
            l[7] || (l[7] = u("th", null, "disabled", -1)),
            l[8] || (l[8] = u("th", null, "disabled_reason", -1)),
            ye(a.$slots, "after-header-cell", { items: e.items }, void 0, !0)
          ])
        ]),
        u("tbody", null, [
          (y(!0), E(J, null, Ee(e.items, (c, d) => (y(), E("tr", {
            key: c == null ? void 0 : c.field,
            class: "position-relative",
            onMouseenter: (f) => i(f, c, d),
            onMouseleave: (f) => r(f, c, d),
            onMouseover: (f) => o(f, c, d)
          }, [
            u("td", null, H(c == null ? void 0 : c.field), 1),
            u("td", null, H(c == null ? void 0 : c.label), 1),
            u("td", null, H(c == null ? void 0 : c.description), 1),
            u("td", null, H(c == null ? void 0 : c.category), 1),
            u("td", null, H(c == null ? void 0 : c.subcategory), 1),
            u("td", OK, [
              F(s, {
                value: c == null ? void 0 : c.temporal
              }, null, 8, ["value"])
            ]),
            u("td", xK, [
              F(s, {
                value: c == null ? void 0 : c.identifier
              }, null, 8, ["value"])
            ]),
            u("td", CK, [
              F(s, {
                value: c == null ? void 0 : c.disabled
              }, null, 8, ["value"])
            ]),
            u("td", null, [
              u("div", TK, H(c == null ? void 0 : c.disabled_reason), 1)
            ])
          ], 40, NK))), 128))
        ])
      ]),
      ye(a.$slots, "default", {}, void 0, !0)
    ]));
  }
}, kK = /* @__PURE__ */ he($K, [["__scopeId", "data-v-dad9cf5c"]]), DK = { action: "" }, IK = { class: "mb-3" }, RK = { class: "mb-3" }, AK = { class: "mb-3" }, MK = { class: "mb-3" }, PK = ["value"], VK = { class: "mb-3" }, LK = { class: "mb-3" }, FK = { class: "d-flex gap-2" }, UK = { class: "form-check" }, jK = { class: "form-check" }, BK = { class: "form-check" }, HK = { class: "mb-3" }, YK = ["disabled", "placeholder"], WK = {
  __name: "CustomMappingForm",
  props: {
    data: { type: Object, default: () => ({}) },
    errors: { type: Object, default: () => ({}) },
    validCategories: { type: Array, default: () => [] }
  },
  emits: ["update:data"],
  setup(e, { emit: t }) {
    const n = e, s = t, o = I({
      get: () => n.data,
      set: (i) => s("update:data", i)
    });
    return (i, r) => {
      var a, l, c, d, f, p, h, m;
      return y(), E("form", DK, [
        u("div", IK, [
          r[9] || (r[9] = u("label", {
            class: "form-label",
            for: "input-field"
          }, "field", -1)),
          P(u("input", {
            class: "form-control form-control-sm",
            type: "text",
            "onUpdate:modelValue": r[0] || (r[0] = (v) => o.value.field = v),
            id: "input-field",
            required: "",
            placeholder: "Unique identifier..."
          }, null, 512), [
            [Ue, o.value.field]
          ]),
          F(ho, {
            errors: (a = e.errors) == null ? void 0 : a.field
          }, null, 8, ["errors"])
        ]),
        u("div", RK, [
          r[10] || (r[10] = u("label", {
            class: "form-label",
            for: "input-label"
          }, "label", -1)),
          P(u("input", {
            class: "form-control form-control-sm",
            type: "text",
            "onUpdate:modelValue": r[1] || (r[1] = (v) => o.value.label = v),
            id: "input-label",
            placeholder: "Short name..."
          }, null, 512), [
            [Ue, o.value.label]
          ]),
          F(ho, {
            errors: (l = e.errors) == null ? void 0 : l.label
          }, null, 8, ["errors"])
        ]),
        u("div", AK, [
          r[11] || (r[11] = u("label", {
            class: "form-label",
            for: "input-description"
          }, "description", -1)),
          P(u("input", {
            class: "form-control form-control-sm",
            type: "text",
            "onUpdate:modelValue": r[2] || (r[2] = (v) => o.value.description = v),
            id: "input-description",
            placeholder: "Fully-specified name..."
          }, null, 512), [
            [Ue, o.value.description]
          ]),
          F(ho, {
            errors: (c = e.errors) == null ? void 0 : c.description
          }, null, 8, ["errors"])
        ]),
        u("div", MK, [
          r[13] || (r[13] = u("label", {
            class: "form-label",
            for: "select-category"
          }, "category", -1)),
          P(u("select", {
            id: "select-category",
            class: "form-select form-select-sm",
            "onUpdate:modelValue": r[3] || (r[3] = (v) => o.value.category = v)
          }, [
            r[12] || (r[12] = u("option", {
              value: "",
              disabled: ""
            }, "Select a CDIS category...", -1)),
            (y(!0), E(J, null, Ee(e.validCategories, (v, g) => (y(), E("option", {
              key: g,
              value: v
            }, H(v), 9, PK))), 128))
          ], 512), [
            [Zt, o.value.category]
          ]),
          F(ho, {
            errors: (d = e.errors) == null ? void 0 : d.category
          }, null, 8, ["errors"])
        ]),
        u("div", VK, [
          r[14] || (r[14] = u("label", {
            class: "form-label",
            for: "input-subcategory"
          }, "subcategory", -1)),
          P(u("input", {
            class: "form-control form-control-sm",
            type: "text",
            "onUpdate:modelValue": r[4] || (r[4] = (v) => o.value.subcategory = v),
            id: "input-subcategory",
            placeholder: "CDIS sub-category..."
          }, null, 512), [
            [Ue, o.value.subcategory]
          ]),
          F(ho, {
            errors: (f = e.errors) == null ? void 0 : f.subcategory
          }, null, 8, ["errors"])
        ]),
        u("div", LK, [
          u("div", FK, [
            u("div", UK, [
              P(u("input", {
                class: "form-check-input",
                type: "checkbox",
                "onUpdate:modelValue": r[5] || (r[5] = (v) => o.value.temporal = v),
                id: "input-temporal"
              }, null, 512), [
                [_n, o.value.temporal]
              ]),
              r[15] || (r[15] = u("label", {
                class: "form-check-label",
                for: "input-temporal"
              }, "temporal", -1))
            ]),
            u("div", jK, [
              P(u("input", {
                class: "form-check-input",
                type: "checkbox",
                "onUpdate:modelValue": r[6] || (r[6] = (v) => o.value.identifier = v),
                id: "input-identifier"
              }, null, 512), [
                [_n, o.value.identifier]
              ]),
              r[16] || (r[16] = u("label", {
                class: "form-check-label",
                for: "input-identifier"
              }, "identifier", -1))
            ]),
            u("div", BK, [
              P(u("input", {
                class: "form-check-input",
                type: "checkbox",
                "onUpdate:modelValue": r[7] || (r[7] = (v) => o.value.disabled = v),
                id: "input-disabled"
              }, null, 512), [
                [_n, o.value.disabled]
              ]),
              r[17] || (r[17] = u("label", {
                class: "form-check-label",
                for: "input-disabled"
              }, "disabled", -1))
            ])
          ]),
          F(ho, {
            errors: (p = e.errors) == null ? void 0 : p.temporal
          }, null, 8, ["errors"]),
          F(ho, {
            errors: (h = e.errors) == null ? void 0 : h.identifier
          }, null, 8, ["errors"]),
          F(ho, {
            errors: (m = e.errors) == null ? void 0 : m.disabled
          }, null, 8, ["errors"])
        ]),
        u("div", HK, [
          r[18] || (r[18] = u("label", {
            class: "form-label",
            for: "input-disabled_reason"
          }, "disabled reason", -1)),
          P(u("textarea", {
            class: "form-control form-control-sm",
            rows: "3",
            "onUpdate:modelValue": r[8] || (r[8] = (v) => o.value.disabled_reason = v),
            id: "input-disabled_reason",
            disabled: !o.value.disabled,
            placeholder: `${o.value.disabled ? "Explain why this field is disabled..." : ""}`
          }, null, 8, YK), [
            [Ue, o.value.disabled_reason]
          ])
        ])
      ]);
    };
  }
}, GK = /* @__PURE__ */ he(WK, [["__scopeId", "data-v-251683a1"]]), zK = {
  "data-menu": "",
  class: ""
}, KK = {
  __name: "ItemMenu",
  props: {
    visible: { type: Boolean, default: !1 }
  },
  emits: ["edit", "remove"],
  setup(e, { emit: t }) {
    const n = t;
    function s() {
      n("remove");
    }
    function o(i) {
      n("edit");
    }
    return (i, r) => (y(), E("div", zK, [
      u("div", { class: "d-flex gap-2" }, [
        u("button", {
          class: "btn btn-sm btn-light",
          onClick: o
        }, r[0] || (r[0] = [
          u("i", { class: "fas fa-pencil fa-fw" }, null, -1)
        ])),
        u("button", {
          class: "btn btn-sm btn-light",
          onClick: s
        }, r[1] || (r[1] = [
          u("i", { class: "fas fa-trash fa-fw" }, null, -1)
        ]))
      ])
    ]));
  }
}, XK = /* @__PURE__ */ he(KK, [["__scopeId", "data-v-52fe97b4"]]), qK = { class: "p-2" }, JK = { class: "d-flex gap-2 my-2" }, QK = { class: "dropdown" }, ZK = { class: "dropdown-menu" }, eX = { class: "ms-auto" }, tX = ["disabled"], nX = {
  "data-menu": "",
  class: "position-absolute top-50 translate-middle-y end-0 me-2"
}, sX = { class: "d-flex gap-2" }, oX = ["onClick"], rX = ["onClick"], iX = { class: "d-flex gap-2 justify-content-end" }, aX = ["disabled"], lX = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-2"
}, cX = {
  key: 1,
  class: "fas fa-save fa-fw me-2"
}, uX = { style: { "max-height": "500px", "overflow-y": "auto" } }, dX = { class: "table table-sm table-striped table-hover table-bordered" }, fX = { class: "d-flex gap-2 p-2" }, pX = ["onClick"], hX = { class: "d-flex gap-2 p-2" }, mX = ["onClick"], vX = ["disabled"], gX = {
  __name: "CustomMappingsPage",
  setup(e) {
    const t = gw(), n = Ns(), s = Dn(), o = LN(), i = yH(), r = Object.freeze({
      CREATE: "create",
      EDIT: "edit"
    }), a = L(""), l = L(), c = L(), d = L({}), f = L(), p = L(), h = L(), m = L([]), v = I(() => {
      let U = "untitled";
      switch (a.value) {
        case r.CREATE:
          U = "New Item";
          break;
        case r.EDIT:
          U = "Edit Item";
          break;
        default:
          U = "untitled";
          break;
      }
      return U;
    }), g = I({
      get: () => t.list,
      set: (U) => t.list = U
    }), _ = I(() => t.loading), S = I(() => t.isDirty), b = I(() => t.validCategories), O = L();
    function w({ event: U, item: A, index: G }) {
      O.value = A, U.target.querySelector("td:last-child").appendChild(p.value), p.value.style.position = "absolute", p.value.style.pointerEvents = "all", p.value.style.opacity = 1, p.value.style.right = 0, p.value.style.top = "50%", p.value.style.transform = "translateY(-50%)";
    }
    function N({ event: U, item: A, index: G }) {
      O.value = null;
    }
    function C() {
      c.value = null, a.value = r.CREATE, d.value = t.useDefaultEntry(), l.value.show();
    }
    function k() {
      const U = (te, $e) => Array.from({ length: $e - te + 1 }, (Ge, Ye) => Ye + te), A = (te = 1) => {
        var Ye, et;
        const $e = ((Ye = b.value) == null ? void 0 : Ye.length) ?? 1;
        return {
          field: `example-${te}`,
          label: `Label ${te}`,
          description: `Description ${te}`,
          category: ((et = b.value) == null ? void 0 : et[te % $e]) ?? "",
          subcategory: "",
          temporal: !0,
          identifier: !1,
          disabled: !1
        };
      }, G = "custom mappings template.csv", X = U(0, 2).map((te) => A(te));
      pm(X, G, i);
    }
    function x() {
      c.value = O.value, a.value = r.EDIT, d.value = { ...O.value }, l.value.show();
    }
    async function $() {
      const U = O.value;
      await n.confirm({
        title: "Confirm delete",
        body: "Are you sure you want to delete this element?"
      }) && t.remove(U);
    }
    function M() {
      const U = P_(d.value);
      switch (a.value) {
        case r.CREATE:
          t.add(U);
          break;
        case r.EDIT:
          t.edit(c.value, U);
          break;
      }
      l.value.hide(), c.value = null, d.value = {};
    }
    async function R() {
      await t.save();
    }
    async function V() {
      try {
        m.value = [];
        const U = await o.select();
        if ((U == null ? void 0 : U.length) < 1) return;
        let A = o3(U == null ? void 0 : U[0]);
        if (!Array.isArray(A)) {
          const $e = "invalid format";
          throw new Error($e);
        }
        A = A.map(($e) => bH(P_($e)));
        const G = [], X = [];
        for (const [$e, Ge] of Object.entries(A)) {
          const Ye = t.validate(Ge);
          if (Ye.hasErrors()) {
            const et = Ye.errors();
            for (const [Dt, Pt] of Object.entries(et))
              for (const _t of Pt)
                G.push({ index: $e, field: Dt, message: _t });
          } else X.push(Ge);
        }
        const te = G.length;
        if (te > 0) {
          const $e = `${te} validation error${te === 1 ? " was" : "s were"} found. Please review your data.`, Ge = new Error($e);
          throw Ge.details = [...G], Ge;
        } else
          t.list = [], X.forEach(($e) => {
            t.add($e);
          });
        s.toast({
          title: "Import Successful",
          body: "The file was imported. Please review the data before saving."
        });
      } catch (U) {
        if (U.details) {
          const A = h.value;
          m.value = [...U.details], await A.show();
        } else
          s.toast({
            title: "Import Error",
            body: "There was an error importing the file. Please make sure to select a valid CSV file."
          });
      }
    }
    function j() {
      const U = g.value, A = "custom mappings.csv";
      pm(U, A, i), s.toast({
        title: "Export Successful",
        body: `The setttings have been exported as '${A}'.`
      });
    }
    return tn(() => {
      f.value = t.validate(d.value);
    }), (U, A) => {
      const G = be("b-modal"), X = Bt("tt");
      return y(), E("div", qK, [
        u("div", null, [
          P(u("p", null, null, 512), [
            [X, void 0, "cdis_custom_mapping_description"]
          ]),
          u("div", JK, [
            u("div", QK, [
              A[4] || (A[4] = u("button", {
                class: "btn btn-sm btn-secondary dropdown-toggle",
                type: "button",
                id: "dropdownMenuButton1",
                "data-bs-toggle": "dropdown",
                "aria-expanded": "false"
              }, [
                u("i", { class: "fas fa-cog fa-fw" })
              ], -1)),
              u("ul", ZK, [
                u("li", null, [
                  u("a", {
                    class: "dropdown-item",
                    href: "#",
                    onClick: Vt(V, ["prevent"])
                  }, A[2] || (A[2] = [
                    u("i", { class: "fas fa-file-import fa-fw me-1" }, null, -1),
                    u("span", null, "Import", -1)
                  ]))
                ]),
                u("li", null, [
                  u("a", {
                    class: "dropdown-item",
                    href: "#",
                    onClick: Vt(j, ["prevent"])
                  }, A[3] || (A[3] = [
                    u("i", { class: "fas fa-file-export fa-fw me-1" }, null, -1),
                    u("span", null, "Export", -1)
                  ]))
                ])
              ])
            ]),
            u("div", null, [
              u("button", {
                type: "button",
                class: "btn btn-sm btn-primary",
                onClick: k
              }, A[5] || (A[5] = [
                u("i", { class: "fas fa-download fa-fw me-1" }, null, -1),
                u("span", null, "CSV Template", -1)
              ]))
            ]),
            u("div", eX, [
              u("button", {
                class: "btn btn-sm btn-success",
                onClick: C,
                disabled: _.value
              }, A[6] || (A[6] = [
                u("i", { class: "fas fa-plus fa-fw" }, null, -1),
                u("span", null, "Add", -1)
              ]), 8, tX)
            ])
          ])
        ]),
        F(kK, {
          onMouseenterRow: w,
          onMouseleaveRow: N,
          id: "custom-mappings-table",
          items: g.value,
          "onUpdate:items": A[0] || (A[0] = (te) => g.value = te)
        }, {
          "after-cell": K(({ data: { item: te } }) => [
            u("div", nX, [
              u("div", sX, [
                u("button", {
                  class: "btn btn-sm btn-light",
                  onClick: ($e) => x(te)
                }, A[7] || (A[7] = [
                  u("i", { class: "fas fa-pencil fa-fw" }, null, -1)
                ]), 8, oX),
                u("button", {
                  class: "btn btn-sm btn-light",
                  onClick: ($e) => $(te)
                }, A[8] || (A[8] = [
                  u("i", { class: "fas fa-trash fa-fw" }, null, -1)
                ]), 8, rX)
              ])
            ])
          ]),
          _: 1
        }, 8, ["items"]),
        u("div", {
          ref_key: "itemMenu",
          ref: p,
          class: "me-2"
        }, [
          O.value ? (y(), le(XK, {
            key: 0,
            onEdit: x,
            onRemove: $
          })) : ae("", !0)
        ], 512),
        u("div", iX, [
          u("button", {
            type: "button",
            class: "btn btn-sm btn-primary",
            disabled: _.value || !S.value,
            onClick: R
          }, [
            _.value ? (y(), E("i", lX)) : (y(), E("i", cX)),
            A[9] || (A[9] = u("span", null, "Save", -1))
          ], 8, aX)
        ]),
        F(G, {
          ref_key: "errorsModal",
          ref: h
        }, {
          title: K(() => A[10] || (A[10] = [
            se("Import Error")
          ])),
          footer: K(({ hide: te }) => [
            u("div", fX, [
              u("button", {
                class: "btn btn-sm btn-secondary",
                onClick: te
              }, A[12] || (A[12] = [
                u("i", { class: "fas fa-times fa-fw me-1" }, null, -1),
                u("span", null, "Ok", -1)
              ]), 8, pX)
            ])
          ]),
          default: K(() => [
            u("div", uX, [
              u("table", dX, [
                A[11] || (A[11] = u("thead", null, [
                  u("tr", { style: { "text-transform": "capitalize" } }, [
                    u("th", null, "entry"),
                    u("th", null, "field"),
                    u("th", null, "message")
                  ])
                ], -1)),
                u("tbody", null, [
                  (y(!0), E(J, null, Ee(m.value, (te, $e) => (y(), E("tr", { key: $e }, [
                    u("td", null, H(te.index), 1),
                    u("td", null, H(te.field), 1),
                    u("td", null, H(te.message), 1)
                  ]))), 128))
                ])
              ])
            ])
          ]),
          _: 1
        }, 512),
        F(G, {
          ref_key: "upsertModal",
          ref: l
        }, {
          title: K(() => [
            se(H(v.value), 1)
          ]),
          footer: K(({ hide: te }) => {
            var $e;
            return [
              u("div", hX, [
                u("button", {
                  class: "btn btn-sm btn-secondary",
                  onClick: te
                }, A[13] || (A[13] = [
                  u("i", { class: "fas fa-times fa-fw me-1" }, null, -1),
                  u("span", null, "Cancel", -1)
                ]), 8, mX),
                u("button", {
                  class: "btn btn-sm btn-primary",
                  onClick: M,
                  disabled: ($e = f.value) == null ? void 0 : $e.hasErrors()
                }, A[14] || (A[14] = [
                  u("i", { class: "fas fa-check fa-fw me-1" }, null, -1),
                  u("span", null, "Accept", -1)
                ]), 8, vX)
              ])
            ];
          }),
          default: K(() => {
            var te;
            return [
              u("div", null, [
                F(GK, {
                  data: d.value,
                  "onUpdate:data": A[1] || (A[1] = ($e) => d.value = $e),
                  errors: (te = f.value) == null ? void 0 : te.errors(),
                  validCategories: b.value
                }, null, 8, ["data", "errors", "validCategories"])
              ])
            ];
          }),
          _: 1
        }, 512)
      ]);
    };
  }
}, yX = /* @__PURE__ */ he(gX, [["__scopeId", "data-v-b413a14e"]]), _X = { class: "d-flex align-items-center" }, bX = { class: "fs-4 me-2" }, EX = ["disabled"], SX = {
  key: 0,
  class: "text-secondary"
}, wX = {
  key: 1,
  class: "text-secondary"
}, NX = { class: "table table-sm table-bordered table-hover table-striped my-2" }, OX = ["title"], xX = ["disabled", "onClick"], CX = {
  __name: "ExpiredTokensTable",
  setup(e) {
    const t = Ns();
    Kv();
    const n = NH(), { loading: s, expiredTokens: o } = xe(n);
    async function i(l) {
      await t.confirm({
        title: "Confirm delete",
        body: es("cc_fhir_clear_expired_tokens_confirmation")
      }) && (await n.clearExpiredTokens(l), r());
    }
    async function r() {
      n.fetchExpiredTokens();
    }
    async function a() {
      r();
    }
    return Mt(() => {
      r();
    }), (l, c) => {
      const d = Bt("tt");
      return y(), E("div", null, [
        u("div", _X, [
          P(u("span", bX, null, 512), [
            [d, void 0, "cc_fhir_clear_expired_tokens_title"]
          ]),
          u("button", {
            type: "button",
            class: "btn btn-sm btn-light",
            disabled: T(s),
            onClick: a
          }, [
            T(s) ? (y(), E("span", SX, c[0] || (c[0] = [
              u("i", { class: "fas fa-spinner fa-spin fa-fw" }, null, -1)
            ]))) : (y(), E("span", wX, c[1] || (c[1] = [
              u("i", { class: "fas fa-refresh fa-fw" }, null, -1)
            ])))
          ], 8, EX)
        ]),
        P(u("span", null, null, 512), [
          [d, void 0, "cc_fhir_clear_expired_tokens_description"]
        ]),
        u("table", NX, [
          c[3] || (c[3] = u("thead", null, [
            u("tr", null, [
              u("th", null, "EHR"),
              u("th", null, "Expired Tokens"),
              u("th", null, "Actions")
            ])
          ], -1)),
          u("tbody", null, [
            (y(!0), E(J, null, Ee(T(o), (f, p) => (y(), E("tr", {
              title: `EHR ID: ${f.ehr_id}`
            }, [
              u("td", null, H(f.ehr_name ?? "-- no name --"), 1),
              u("td", null, H(f.expired_token_count ?? 0), 1),
              u("td", null, [
                u("button", {
                  type: "button",
                  class: "btn btn-sm btn-light",
                  disabled: f.expired_token_count === 0,
                  onClick: (h) => i(f.ehr_id)
                }, c[2] || (c[2] = [
                  u("span", { class: "text-danger" }, [
                    u("i", { class: "fas fa-trash fa-fw" })
                  ], -1)
                ]), 8, xX)
              ])
            ], 8, OX))), 256))
          ])
        ])
      ]);
    };
  }
}, TX = { class: "p-2" }, $X = {
  __name: "ToolsPage",
  setup(e) {
    return (t, n) => (y(), E("div", TX, [
      F(CX)
    ]));
  }
}, kX = {
  class: "p-5 bg-danger",
  ref: "subscriber"
}, DX = {
  class: "p-5 bg-success",
  ref: "moveTarget"
}, IX = {
  __name: "TestPage",
  setup(e) {
    function t(i, r) {
      if (Array.isArray(i) && Array.isArray(r)) {
        if (i.length !== r.length)
          return !1;
        for (let c = 0; c < i.length; c++)
          if (!t(i[c], r[c]))
            return !1;
        return !0;
      }
      if (typeof i != "object" || typeof r != "object" || i == null || r == null)
        return i === r;
      const a = Object.keys(i), l = Object.keys(r);
      if (a.length !== l.length)
        return !1;
      for (const c of a)
        if (!l.includes(c) || !t(i[c], r[c]))
          return !1;
      return !0;
    }
    const o = t([{ ehr_id: "5", order: "0", ehr_name: "Epic App Orchard", client_id: "8503bafc-8fe8-4631-a657-0b4a00019bf5", client_secret: "N2vo/GfFcsXoeCdxMXjHffyYNEu8K8DjAeY2gsdtePWr5XDa/GA2tW40NgD56iDXyYaKvCZXhiz0qDQ2t5Twyg==", fhir_base_url: "https://vendorservices.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/", fhir_token_url: "https://vendorservices.epic.com/interconnect-amcurprd-oauth/oauth2/token", fhir_authorize_url: "https://vendorservices.epic.com/interconnect-amcurprd-oauth/oauth2/authorize", fhir_identity_provider: null, patient_identifier_string: "urn:oid:1.2.840.114350.1.13.0.1.7.5.737384.14", fhir_custom_auth_params: [{ name: "sdf", value: "sdf" }, { value: "sdasdf", context: "standalone", name: "ss" }] }, { ehr_id: "3", order: "1", ehr_name: "Smart Health It", client_id: "something", client_secret: "this is secret", fhir_base_url: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir", fhir_token_url: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/auth/token", fhir_authorize_url: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/auth/authorize", fhir_identity_provider: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir", patient_identifier_string: "http://hospital.smarthealthit.org", fhir_custom_auth_params: [] }, { ehr_id: "2", order: "2", ehr_name: "Open Cerner", client_id: "96719634-18f7-47db-a015-739c8aff289b", client_secret: "", fhir_base_url: "https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d", fhir_token_url: "https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v1/token", fhir_authorize_url: "https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v1/personas/provider/authorize", fhir_identity_provider: "", patient_identifier_string: "", fhir_custom_auth_params: [] }], [{ ehr_id: "5", order: "0", ehr_name: "Epic App Orchard", client_id: "8503bafc-8fe8-4631-a657-0b4a00019bf5", client_secret: "N2vo/GfFcsXoeCdxMXjHffyYNEu8K8DjAeY2gsdtePWr5XDa/GA2tW40NgD56iDXyYaKvCZXhiz0qDQ2t5Twyg==", fhir_base_url: "https://vendorservices.epic.com/interconnect-amcurprd-oauth/api/FHIR/R4/", fhir_token_url: "https://vendorservices.epic.com/interconnect-amcurprd-oauth/oauth2/token", fhir_authorize_url: "https://vendorservices.epic.com/interconnect-amcurprd-oauth/oauth2/authorize", fhir_identity_provider: null, patient_identifier_string: "urn:oid:1.2.840.114350.1.13.0.1.7.5.737384.14", fhir_custom_auth_params: [{ name: "sdf", value: "sdf" }, { value: "sdasdf", context: "standalone", name: "ss" }] }, { ehr_id: "3", order: "1", ehr_name: "Smart Health It", client_id: "something", client_secret: "this is secret", fhir_base_url: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir", fhir_token_url: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/auth/token", fhir_authorize_url: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/auth/authorize", fhir_identity_provider: "https://launch.smarthealthit.org/v/r4/sim/WzIsIiIsIiIsIkFVVE8iLDAsMCwwLCIiLCIiLCIiLCIiLCIiLCIiLCIiLDAsMF0/fhir", patient_identifier_string: "http://hospital.smarthealthit.org", fhir_custom_auth_params: [] }, { ehr_id: "2", order: "2", ehr_name: "Open Cerner", client_id: "96719634-18f7-47db-a015-739c8aff289b", client_secret: "", fhir_base_url: "https://fhir-ehr-code.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d", fhir_token_url: "https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v1/token", fhir_authorize_url: "https://authorization.cerner.com/tenants/ec2458f2-1e24-41c8-b71b-0e701af7583d/protocols/oauth2/profiles/smart-v1/personas/provider/authorize", fhir_identity_provider: "", patient_identifier_string: "", fhir_custom_auth_params: [] }, { ehr_name: "new systems", order: 4, ehr_id: -4 }]);
    return (i, r) => (y(), E(J, null, [
      r[0] || (r[0] = u("div", { class: "p-5" }, "Test", -1)),
      u("div", kX, "Subscriber", 512),
      u("div", DX, "Move Here", 512),
      se(" " + H(T(o)), 1)
    ], 64));
  }
}, RX = [
  {
    path: "/",
    component: jH,
    // redirect: '/inbox',
    children: [
      { path: "", name: "home", component: DY },
      { path: "fhir-systems", name: "fhir-systems", component: SK },
      { path: "custom-mappings", name: "custom-mappings", component: yX },
      { path: "tools", name: "tools", component: $X },
      { path: "test", name: "test", component: IX },
      { path: "/:pathMatch(.*)*", component: Uc }
    ]
  }
];
let Tu;
const AX = () => Tu || (Tu = Qa({
  // Provide the history implementation to use. We are using the hash history for simplicity here.
  history: Ja(),
  routes: RX
}), Tu), MX = (e) => {
  const t = e.arg || "top", n = document.createElement("div");
  return n.className = `tooltip tooltip-${t}`, n.style.position = "absolute", n.style.padding = "5px 10px", n.style.backgroundColor = "rgba(0, 0, 0, 0.75)", n.style.color = "white", n.style.fontWeight = "200", n.style.borderRadius = "4px", n.style.whiteSpace = "nowrap", n.style.transition = "opacity 0.2s", n.style.opacity = "0", n.style.pointerEvents = "none", n.innerText = e.value, n;
}, PX = () => {
  const e = document.createElement("div");
  return e.className = "tooltip-caret", e.style.position = "absolute", e.style.width = "0", e.style.height = "0", e.style.borderStyle = "solid", e;
}, VX = (e, t) => {
  switch (e.style.top = "revert", e.style.right = "revert", e.style.bottom = "revert", e.style.left = "revert", t) {
    case "top":
      e.style.borderWidth = "5px 5px 0 5px", e.style.borderColor = "rgba(0, 0, 0, 0.75) transparent transparent transparent", e.style.bottom = "-5px", e.style.left = "50%", e.style.transform = "translateX(-50%)";
      break;
    case "bottom":
      e.style.borderWidth = "0 5px 5px 5px", e.style.borderColor = "transparent transparent rgba(0, 0, 0, 0.75) transparent", e.style.top = "-5px", e.style.left = "50%", e.style.transform = "translateX(-50%)";
      break;
    case "left":
      e.style.borderWidth = "5px 0 5px 5px", e.style.borderColor = "transparent transparent transparent rgba(0, 0, 0, 0.75)", e.style.top = "50%", e.style.right = "-5px", e.style.transform = "translateY(-50%)";
      break;
    case "right":
      e.style.borderWidth = "5px 5px 5px 0", e.style.borderColor = "transparent rgba(0, 0, 0, 0.75) transparent transparent", e.style.top = "50%", e.style.left = "-5px", e.style.transform = "translateY(-50%)";
      break;
    case "move":
      e.style.display = "none";
      break;
    case "auto":
    default:
      e.style.borderWidth = "0 5px 5px 5px", e.style.borderColor = "transparent transparent rgba(0, 0, 0, 0.75) transparent", e.style.top = "-5px", e.style.left = "50%", e.style.transform = "translateX(-50%)";
      break;
  }
}, Eb = (e, t, n, s, o) => {
  if (!n) return;
  const i = t.getBoundingClientRect(), r = n.getBoundingClientRect();
  let a, l;
  switch (o) {
    case "top":
      a = i.top + window.scrollY - r.height - 8, l = i.left + window.scrollX + (i.width - r.width) / 2;
      break;
    case "bottom":
      a = i.bottom + window.scrollY + 8, l = i.left + window.scrollX + (i.width - r.width) / 2;
      break;
    case "left":
      a = i.top + window.scrollY + (i.height - r.height) / 2, l = i.left + window.scrollX - r.width - 8;
      break;
    case "right":
      a = i.top + window.scrollY + (i.height - r.height) / 2, l = i.right + window.scrollX + 8;
      break;
    case "move":
      a = e.pageY + 10, l = e.pageX + 10;
      break;
    case "auto":
    default:
      a = i.bottom + window.scrollY + 8, l = i.left + window.scrollX + (i.width - r.width) / 2;
      break;
  }
  n.style.top = `${a}px`, n.style.left = `${l}px`, VX(s, o);
}, LX = (e, t) => {
  const n = t.arg || "top";
  let s, o;
  const i = L(!1), r = (d) => {
    s || (s = MX(t), o = PX(), s.appendChild(o), document.body.appendChild(s), e._tooltip = s), i.value = !0, s.style.opacity = "1", Eb(d, e, s, o, n);
  }, a = () => {
    s && (i.value = !1, s.style.opacity = "0", s.addEventListener(
      "transitionend",
      () => {
        const d = s == null ? void 0 : s.parentNode;
        !d || !d.contains(s) || (d.removeChild(s), e._tooltip = s = null);
      },
      { once: !0 }
    ));
  }, l = (d) => {
    i.value && Eb(d, e, s, o, n);
  }, c = new AbortController();
  e.addEventListener("mouseenter", r, { signal: c.signal }), e.addEventListener("mouseleave", a, { signal: c.signal }), e.addEventListener("mousemove", l, {
    signal: c.signal
  }), e._abortController = c;
}, FX = (e) => {
  e._abortController.abort(), e._tooltip && document.body.removeChild(e._tooltip);
}, Tg = {
  mounted(e, t) {
    LX(e, t);
  },
  beforeUnmount(e) {
    FX(e);
  }
}, UX = {
  mounted(e, t) {
    e.style.overflow = "hidden", e.style.resize = "none";
    const n = t.value && t.value > 0 ? t.value : 1 / 0, s = () => {
      e.style.height = "auto";
      const o = e.scrollHeight;
      if (n !== 1 / 0) {
        const r = (parseFloat(window.getComputedStyle(e).lineHeight) || 0) * n;
        if (o > r) {
          e.style.height = r + "px", e.style.overflowY = "auto";
          return;
        }
      }
      e.style.height = o + "px", e.style.overflowY = "hidden";
    };
    e.resizeTextareaEvent = s, e.addEventListener("input", e.resizeTextareaEvent), s();
  },
  beforeUnmount(e) {
    e.removeEventListener("input", e == null ? void 0 : e.resizeTextareaEvent);
  }
}, FN = {}, jX = ({ store: e }) => {
  FN[e.$id] = e;
}, BX = () => FN, $g = {}, Kd = L([]);
let Cm = !1;
const qc = ({ store: e }) => {
  $g[e.$id] = e, ht(
    () => e.error,
    (t) => {
      Cm || HX();
    },
    { immediate: !0 }
    // Run immediately to capture initial state
  );
};
function HX() {
  const e = Object.values($g).map((t) => t == null ? void 0 : t.error).filter((t) => t != null);
  JSON.stringify(e) !== JSON.stringify(Kd.value) && (Kd.value = e);
}
const kg = () => Kd, UN = () => {
  Cm = !0, Object.values($g).forEach((e) => {
    e.error !== void 0 && (e.error = null);
  }), Kd.value = [], Cm = !1;
}, are = (e) => {
  const t = xn(xH), n = Bc();
  n.use(qc), t.use(n);
  const s = AX();
  return t.directive("tt", Hf), t.use(s), t.use(zi()), t.use(js), t.mount(e), { app: t };
}, jN = 500;
let YX = mr();
const uh = vr(YX, ["pid"], { timeout: 0 }), Tm = {
  // balance
  getRecords(e = 1, t = jN) {
    const n = {
      route: "CdpController:getDdpRecordsDataStats",
      _page: e,
      _per_page: t
    };
    return uh.get("", { params: n });
  },
  processField(e) {
    const t = {
      route: "CdpController:processField"
    }, n = { ...e };
    return uh.post("", n, { params: t });
  },
  processCachedData(e, t) {
    const n = {
      route: "CdpController:processCachedData"
    }, s = { background: e, send_feedback: t };
    return uh.post("", s, { params: n });
  }
}, WX = "recordsMetadata", BN = /* @__PURE__ */ vn(WX, () => {
  const e = L(!1), t = L(), n = L([]), s = mt({}), o = I(() => (s == null ? void 0 : s.page) ?? 0), i = I(() => (s == null ? void 0 : s.total) ?? 0), r = I(() => (s == null ? void 0 : s.total_pages) ?? 0), a = I(() => (s == null ? void 0 : s.next_page) ?? 0), l = I(() => (s == null ? void 0 : s.per_page) ?? jN), c = I(() => (s == null ? void 0 : s.total_current_page) ?? 0), d = I(() => {
    let p = 0;
    for (const h of n.value)
      p += parseInt(h == null ? void 0 : h.total) ?? 0;
    return p;
  });
  async function f(p, h) {
    try {
      e.value = !0;
      const m = await Tm.getRecords(p, h), { data: v, metadata: g } = (m == null ? void 0 : m.data) ?? {};
      n.value = v, Object.assign(s, g);
    } catch (m) {
      t.value = m;
    } finally {
      e.value = !1;
    }
  }
  return {
    loading: e,
    error: t,
    data: n,
    metadata: s,
    page: o,
    total: i,
    total_pages: r,
    next_page: a,
    totalValues: d,
    per_page: l,
    total_current_page: c,
    getRecords: f
  };
}), GX = "adjudication", zX = /* @__PURE__ */ vn(GX, () => {
  const e = BN(), t = L(!1), n = L(!1), s = L(!1), o = L(!1), i = L(), r = L([]), a = L([]), l = L(0), c = L(0), d = L(!1), f = L(), p = mt({
    total_fields: 0,
    total_values: 0,
    processed_fields: 0,
    successful_fields: 0,
    errors: 0,
    adjudicated_values: 0,
    excluded_values: 0,
    unprocessed_values: 0
  }), h = (w, N) => {
    const C = N == null ? void 0 : N.error;
    C && a.value.push({
      label: `${w == null ? void 0 : w.record}-${w == null ? void 0 : w.event_id}-${w == null ? void 0 : w.field_name}`,
      field: w,
      error: C
    });
  }, m = (w, N) => {
    r.value.push({
      ...N,
      total_values: w.total ?? 0
    });
  }, v = () => {
    const w = [...(e == null ? void 0 : e.data) ?? []];
    p.total_fields = w.length ?? 0, p.total_values = 0, w.forEach((N) => {
      p.total_values += (N == null ? void 0 : N.total) ?? 0;
    }), p.processed_fields = 0, p.successful_fields = 0, p.errors = 0, p.adjudicated_values = 0, p.excluded_values = 0, p.unprocessed_values = 0;
  }, g = (w, N) => {
    const C = (N == null ? void 0 : N.error) ?? null;
    p.processed_fields += 1, p.successful_fields += C ? 0 : 1, p.errors += C ? 1 : 0, p.adjudicated_values += (N == null ? void 0 : N.adjudicated) ?? 0, p.excluded_values += (N == null ? void 0 : N.excluded) ?? 0, p.unprocessed_values += C ? (w == null ? void 0 : w.total) ?? 0 : 0;
  }, _ = () => {
    v(), d.value = !1, r.value = [], a.value = [], l.value = 0, c.value = 0;
  };
  return {
    processing: n,
    error: i,
    showProcessingModal: s,
    showSummaryModal: o,
    currentField: f,
    results: r,
    totalFields: l,
    totalValues: c,
    errors: a,
    stats: p,
    process: async () => {
      try {
        _(), o.value = !1, s.value = !0, n.value = !0;
        const w = e.data;
        l.value = w.length, c.value = e.totalValues;
        for (const N of w) {
          if (d.value) break;
          f.value = N;
          const k = (await Tm.processField(N)).data;
          h(N, k), m(N, k), g(N, k);
        }
        f.value = null;
      } catch (w) {
        console.log(w), i.value = w;
      } finally {
        n.value = !1, s.value = !1, o.value = !0;
      }
    },
    stopProcess: async () => {
      d.value = !0;
    },
    schedule: async (w = !1) => {
      try {
        return t.value = !0, (await Tm.processCachedData(!0, w)).data;
      } catch (N) {
        console.log(N), i.value = N;
      } finally {
        t.value = !1;
      }
    }
  };
}), KX = { class: "btn-group" }, XX = ["disabled"], qX = {
  "data-prevent-close": "",
  class: "px-2",
  style: { width: "400px" }
}, JX = { class: "form-check form-switch" }, QX = {
  __name: "ProcessButton",
  setup(e) {
    const t = Ie("records-store"), n = Ie("adjudication-store"), s = CL(), o = Dn(), i = L(!1), r = I(
      () => t.loading || n.loading
    ), a = async () => await s.confirm({
      title: "Please confirm",
      body: "You are about to initiate the adjudication process. Please note that existing data may be overwritten based on the 'preselect strategy' defined in your mapping configuration."
    });
    async function l() {
      await a() && (await n.process(), t.getRecords(1));
    }
    async function c() {
      if (!await a()) return;
      await n.schedule(i.value) && o.toast({
        title: "Success",
        body: "Auto-adjudication has been added to the background queue."
      });
    }
    return (d, f) => {
      const p = be("b-dropdown");
      return y(), E("div", KX, [
        u("button", {
          type: "button",
          class: "btn btn-sm btn-primary",
          onClick: l,
          disabled: r.value
        }, f[1] || (f[1] = [
          u("i", { class: "fas fa-circle-check fa-fw me-1" }, null, -1),
          u("span", null, "Process", -1)
        ]), 8, XX),
        F(p, {
          size: "sm",
          disabled: r.value
        }, {
          button: K(() => f[2] || (f[2] = [])),
          default: K(() => [
            u("div", qX, [
              f[5] || (f[5] = u("span", { class: "d-block fw-bold" }, "Background Processing Options", -1)),
              f[6] || (f[6] = u("div", { class: "small text-muted fw-lighter" }, " When a large number of values needs to be processed it is possible to start the process in background and get a message when completed. ", -1)),
              u("div", { class: "my-2" }, [
                u("button", {
                  type: "button",
                  class: "btn btn-sm btn-primary",
                  onClick: c
                }, f[3] || (f[3] = [
                  u("i", { class: "fas fa-circle-check fa-fw me-1" }, null, -1),
                  u("span", null, "Process in background", -1)
                ]))
              ]),
              u("div", JX, [
                P(u("input", {
                  type: "checkbox",
                  class: "form-check-input",
                  id: "send-message-checkbox",
                  "onUpdate:modelValue": f[0] || (f[0] = (h) => i.value = h)
                }, null, 512), [
                  [_n, i.value]
                ]),
                f[4] || (f[4] = u("label", {
                  class: "small form-check-label",
                  for: "send-message-checkbox"
                }, [
                  u("i", { class: "fas fa-envelope fa-fw me-1" }),
                  u("span", null, "Send me a message when completed")
                ], -1))
              ])
            ])
          ]),
          _: 1
        }, 8, ["disabled"])
      ]);
    };
  }
}, ZX = /* @__PURE__ */ he(QX, [["__scopeId", "data-v-ed0db6b2"]]), eq = { key: 0 }, tq = ["innerHTML"], nq = {
  __name: "AdjudicationPanel",
  setup(e) {
    const t = Ie("records-store"), { totalValues: n, page: s, total: o, total_pages: i, next_page: r } = xe(t);
    return (a, l) => (y(), E("div", null, [
      T(r) ? (y(), E("span", eq, " You are on page " + H(T(s)) + " of " + H(T(i)) + ". ", 1)) : ae("", !0),
      u("span", {
        innerHTML: `There ${T(o) === 1 ? "is" : "are"} <b>${T(o)}</b> field${T(o) === 1 ? "" : "s"} with
            <b>${T(n)}</b> value${T(n) === 1 ? "" : "s"} ready
            to be processed in this project.`
      }, null, 8, tq),
      l[0] || (l[0] = u("span", { class: "d-block" }, "Click the button below to start the instant adjudication process.", -1)),
      F(ZX, { class: "mt-2" })
    ]));
  }
}, sq = {}, oq = { class: "progress-stacked" };
function rq(e, t) {
  return y(), E("div", oq, [
    ye(e.$slots, "default", {}, void 0, !0)
  ]);
}
const HN = /* @__PURE__ */ he(sq, [["render", rq], ["__scopeId", "data-v-01613a89"]]), iq = ["aria-label", "aria-valuenow"], aq = { key: 0 }, lq = {
  __name: "ProgressBar",
  props: {
    label: { type: String, default: "Progress segment" },
    width: { type: Number, required: !0 },
    colorClass: { type: String, default: "" },
    animated: { type: Boolean, default: !1 },
    striped: { type: Boolean, default: !1 },
    showWidth: { type: Boolean, default: !1 }
  },
  setup(e) {
    return (t, n) => (y(), E("div", {
      class: "progress",
      role: "progressbar",
      "aria-label": e.label,
      "aria-valuenow": e.width,
      "aria-valuemin": "0",
      "aria-valuemax": "100",
      style: fs({ width: `${e.width}%` })
    }, [
      u("div", {
        class: Te(["progress-bar", {
          [e.colorClass]: !!e.colorClass,
          "progress-bar-animated": e.animated,
          "progress-bar-striped": e.striped
        }])
      }, [
        ye(t.$slots, "default", {}, () => [
          e.showWidth ? (y(), E("span", aq, H(`${e.width}%`), 1)) : ae("", !0)
        ], !0)
      ], 2)
    ], 12, iq));
  }
}, zl = /* @__PURE__ */ he(lq, [["__scopeId", "data-v-0079f4a1"]]), cq = { class: "small" }, uq = { class: "fw-bold" }, dq = { class: "small" }, fq = { class: "fw-bold" }, pq = {
  __name: "FieldsProgressBar",
  setup(e) {
    const t = Ie("adjudication-store"), n = I(() => t.stats), s = I(() => t.processing), o = (i, r) => r === 0 || i === 0 ? 0 : Math.round(r / i * 100);
    return (i, r) => (y(), E("div", null, [
      F(HN, null, {
        default: K(() => [
          F(zl, {
            label: "successful adjudications",
            width: o(n.value.total_fields, n.value.successful_fields),
            "color-class": "bg-success",
            showWidth: "",
            striped: "",
            animated: s.value
          }, null, 8, ["width", "animated"]),
          F(zl, {
            label: "errors",
            width: o(n.value.total_fields, n.value.errors),
            "color-class": "bg-danger",
            showWidth: "",
            striped: "",
            animated: s.value
          }, null, 8, ["width", "animated"])
        ]),
        _: 1
      }),
      u("div", cq, [
        u("small", null, [
          r[0] || (r[0] = u("span", null, "Successful adjudications: ", -1)),
          u("span", uq, H(n.value.successful_fields), 1)
        ])
      ]),
      u("div", dq, [
        u("small", null, [
          r[1] || (r[1] = u("span", null, "Errors: ", -1)),
          u("span", fq, H(n.value.errors), 1)
        ])
      ])
    ]));
  }
}, hq = { class: "small" }, mq = { class: "fw-bold" }, vq = { class: "small" }, gq = { class: "fw-bold" }, yq = { class: "small" }, _q = { class: "fw-bold" }, bq = {
  __name: "ValuesProgressBar",
  setup(e) {
    const t = Ie("adjudication-store"), n = I(() => t.stats), s = I(() => t.processing), o = (i, r) => r === 0 || i === 0 ? 0 : Math.round(r / i * 100);
    return (i, r) => (y(), E("div", null, [
      F(HN, null, {
        default: K(() => [
          F(zl, {
            label: "adjudicated",
            width: o(n.value.total_values, n.value.adjudicated_values),
            "color-class": "bg-success",
            showWidth: "",
            striped: "",
            animated: s.value
          }, null, 8, ["width", "animated"]),
          F(zl, {
            label: "excluded",
            width: o(n.value.total_values, n.value.excluded_values),
            "color-class": "bg-warning",
            showWidth: "",
            striped: "",
            animated: s.value
          }, null, 8, ["width", "animated"]),
          F(zl, {
            label: "errors",
            width: o(n.value.total_values, n.value.unprocessed_values),
            "color-class": "bg-danger",
            showWidth: "",
            striped: "",
            animated: s.value
          }, null, 8, ["width", "animated"])
        ]),
        _: 1
      }),
      u("div", hq, [
        u("small", null, [
          r[0] || (r[0] = u("span", null, "Adjudicated: ", -1)),
          u("span", mq, H(n.value.adjudicated_values), 1)
        ])
      ]),
      u("div", vq, [
        u("small", null, [
          r[1] || (r[1] = u("span", null, "Excluded: ", -1)),
          u("span", gq, H(n.value.excluded_values), 1)
        ])
      ]),
      u("div", yq, [
        u("small", null, [
          r[2] || (r[2] = u("span", null, "Errors: ", -1)),
          u("span", _q, H(n.value.unprocessed_values), 1)
        ])
      ])
    ]));
  }
}, Eq = { class: "table table-sm table-striped table-hover table-bordered my-2" }, Sq = { key: 0 }, wq = { class: "d-flex" }, $u = 5, YN = {
  __name: "ErrorsTable",
  setup(e) {
    const t = Ie("adjudication-store"), n = L(1), s = I(() => t.errors ?? []), o = I(() => {
      const i = (n.value - 1) * $u, r = i + $u;
      return [...s.value].slice(i, r);
    });
    return (i, r) => (y(), E("div", null, [
      F(Id, {
        modelValue: n.value,
        "onUpdate:modelValue": r[0] || (r[0] = (a) => n.value = a),
        "per-page": $u,
        totalItems: s.value.length,
        size: "sm"
      }, null, 8, ["modelValue", "totalItems"]),
      u("table", Eq, [
        s.value.length === 0 ? (y(), E("tbody", Sq, r[2] || (r[2] = [
          u("tr", null, [
            u("td", { class: "fst-italic" }, "No errors")
          ], -1)
        ]))) : (y(), E(J, { key: 1 }, [
          r[3] || (r[3] = u("thead", null, [
            u("tr", { class: "text-nowrap" }, [
              u("th", null, "Record ID"),
              u("th", null, "Event ID"),
              u("th", null, "Field Name"),
              u("th", null, "Error")
            ])
          ], -1)),
          u("tbody", null, [
            (y(!0), E(J, null, Ee(o.value, (a, l) => (y(), E("tr", {
              key: `${l}-${a == null ? void 0 : a.label}`
            }, [
              u("td", null, H(a.field.record), 1),
              u("td", null, H(a.field.event_id), 1),
              u("td", null, H(a.field.field_name), 1),
              u("td", null, H(a.error), 1)
            ]))), 128))
          ])
        ], 64))
      ]),
      u("div", wq, [
        F(Id, {
          modelValue: n.value,
          "onUpdate:modelValue": r[1] || (r[1] = (a) => n.value = a),
          "per-page": $u,
          totalItems: s.value.length,
          size: "sm"
        }, null, 8, ["modelValue", "totalItems"]),
        ye(i.$slots, "footer")
      ])
    ]));
  }
}, Nq = { class: "mt-2 d-flex flex-column gap-2" }, Oq = { class: "border rounded p-2" }, xq = { class: "border rounded p-2" }, Cq = {
  key: 0,
  class: "border rounded p-2"
}, Tq = {
  key: 1,
  class: "border rounded p-2"
}, $q = ["onClick"], kq = {
  __name: "AdjudicationModal",
  setup(e) {
    const t = L(), n = Ie("adjudication-store"), s = I(() => n.processing), o = I(
      () => n.showProcessingModal ?? !1
    ), i = I(() => n.currentField), r = I(() => n.errors);
    function a() {
      n.stopProcess();
    }
    return tn(() => {
      t.value && (o.value === !0 ? t.value.show() : t.value.hide());
    }), (l, c) => {
      const d = be("b-modal");
      return y(), le(d, {
        ref_key: "modalRef",
        ref: t,
        backdrop: "static",
        size: "xl"
      }, {
        title: K(() => c[0] || (c[0] = [
          u("span", { class: "fw-bold" }, "Adjudication", -1)
        ])),
        "header-close-button": K(() => c[1] || (c[1] = [
          u("span", null, null, -1)
        ])),
        footer: K(({ hide: f }) => [
          s.value ? (y(), E("button", {
            key: 0,
            type: "button",
            class: "btn btn-sm btn-primary",
            onClick: a
          }, c[10] || (c[10] = [
            u("i", { class: "fas fa-stop fa-fw me-1" }, null, -1),
            u("span", null, "Stop", -1)
          ]))) : (y(), E("button", {
            key: 1,
            type: "button",
            class: "btn btn-sm btn-primary",
            onClick: f
          }, c[11] || (c[11] = [
            u("i", { class: "fas fa-times-circle fa-fw me-1" }, null, -1),
            u("span", null, "Close", -1)
          ]), 8, $q))
        ]),
        default: K(() => [
          u("div", null, [
            c[9] || (c[9] = u("span", null, "REDCap is adjudicating the pending data stored in the database using the CDP mapping configuration.", -1)),
            u("div", Nq, [
              u("div", Oq, [
                c[2] || (c[2] = u("div", { class: "fw-bold text-left" }, "Values", -1)),
                F(bq)
              ]),
              u("div", xq, [
                c[3] || (c[3] = u("div", { class: "fw-bold text-left" }, "Fields", -1)),
                F(pq)
              ]),
              s.value && i.value ? (y(), E("div", Cq, [
                c[7] || (c[7] = u("span", { class: "fw-bold" }, "Processing", -1)),
                u("div", null, [
                  c[4] || (c[4] = u("span", null, "Record ID: ", -1)),
                  se(" " + H(i.value.record), 1)
                ]),
                u("div", null, [
                  c[5] || (c[5] = u("span", null, "Event ID: ", -1)),
                  se(" " + H(i.value.event_id), 1)
                ]),
                u("div", null, [
                  c[6] || (c[6] = u("span", null, "Field name: ", -1)),
                  se(" " + H(i.value.field_name), 1)
                ])
              ])) : ae("", !0),
              r.value ? (y(), E("div", Tq, [
                c[8] || (c[8] = u("span", { class: "fw-bold" }, "Errors", -1)),
                F(YN)
              ])) : ae("", !0)
            ])
          ])
        ]),
        _: 1
      }, 512);
    };
  }
}, Dq = {
  __name: "ExportErrorsButton",
  props: {
    errors: { type: Array, default: () => [] }
  },
  setup(e) {
    const t = e;
    function n() {
      const s = [];
      t.errors.forEach((i) => {
        var a, l, c;
        const r = {
          record: ((a = i == null ? void 0 : i.field) == null ? void 0 : a.record) ?? "",
          event_id: ((l = i == null ? void 0 : i.field) == null ? void 0 : l.event_id) ?? "",
          field_name: ((c = i == null ? void 0 : i.field) == null ? void 0 : c.field_name) ?? "",
          error: (i == null ? void 0 : i.error) ?? ""
        };
        s.push(r);
      });
      const o = r3(s);
      i3(o, "cdp-adjudication-errors");
    }
    return (s, o) => (y(), E("button", {
      type: "button",
      class: "btn btn-sm btn-outline-primary ms-auto",
      onClick: n
    }, o[0] || (o[0] = [
      u("i", { class: "fas fa-file-csv fa-fw" }, null, -1),
      u("span", null, "Download CSV", -1)
    ])));
  }
}, Iq = { class: "table table-bordered table-striped-table-hover table-sm" }, Rq = { class: "mt-2 d-flex flex-column gap-2" }, Aq = {
  key: 0,
  class: ""
}, Mq = ["onClick"], Pq = {
  __name: "SummaryModal",
  setup(e) {
    const t = L(), n = Ie("adjudication-store"), s = I(
      () => n.showSummaryModal ?? !1
    ), o = I(() => n.stats), i = I(() => n.errors), r = un(), a = () => {
      const l = {
        stats: He(o.value),
        errors: He(i.value),
        timestamp: Date.now()
      };
      r.proxy.$eventBus.emit("summary-closed", l);
    };
    return tn(async () => {
      t.value && (s.value === !0 ? (await t.value.show(), a()) : t.value.hide());
    }), (l, c) => {
      const d = be("b-modal");
      return y(), le(d, {
        ref_key: "modalRef",
        ref: t,
        size: "xl"
      }, {
        title: K(() => c[0] || (c[0] = [
          u("span", { class: "fw-bold" }, "Summary", -1)
        ])),
        footer: K(({ hide: f }) => [
          u("button", {
            type: "button",
            class: "btn btn-sm btn-primary",
            onClick: f
          }, c[4] || (c[4] = [
            u("i", { class: "fas fa-times-circle fa-fw me-1" }, null, -1),
            u("span", null, "Close", -1)
          ]), 8, Mq)
        ]),
        default: K(() => [
          u("div", null, [
            u("table", Iq, [
              c[1] || (c[1] = u("thead", null, [
                u("tr", null, [
                  u("th", null, "Total Fields"),
                  u("th", null, "Processed"),
                  u("th", null, "Successful"),
                  u("th", null, "Errors"),
                  u("th", null, "Adjudicated Values"),
                  u("th", null, [
                    se("Excluded Values "),
                    u("sup", { class: "" }, "1")
                  ]),
                  u("th", null, [
                    se("Unprocessed Values "),
                    u("sup", { class: "" }, "2")
                  ])
                ])
              ], -1)),
              u("tbody", null, [
                u("tr", null, [
                  u("th", null, H(o.value.total_fields), 1),
                  u("th", null, H(o.value.processed_fields), 1),
                  u("th", null, H(o.value.successful_fields), 1),
                  u("th", null, H(o.value.errors), 1),
                  u("th", null, H(o.value.adjudicated_values), 1),
                  u("th", null, H(o.value.excluded_values), 1),
                  u("th", null, H(o.value.unprocessed_values), 1)
                ])
              ])
            ]),
            c[3] || (c[3] = u("div", { class: "border rounded bg-light p-2" }, [
              u("sup", { class: "" }, "1"),
              u("span", null, "Values are excluded (not saved) in the adjudication process if:"),
              u("ul", null, [
                u("li", null, "empty"),
                u("li", null, "matching existing values"),
                u("li", null, " not the best option based on the 'preselect' mapping rule ")
              ]),
              u("sup", { class: "" }, "2"),
              u("span", null, "Unprocessed values have been skipped due to an error during the adjudication process")
            ], -1)),
            u("div", Rq, [
              i.value ? (y(), E("div", Aq, [
                c[2] || (c[2] = u("span", { class: "fw-bold" }, "Errors", -1)),
                F(YN, null, {
                  footer: K(() => [
                    F(Dq, { errors: i.value }, null, 8, ["errors"])
                  ]),
                  _: 1
                })
              ])) : ae("", !0)
            ])
          ])
        ]),
        _: 1
      }, 512);
    };
  }
}, Vq = { class: "border rounded p-2 d-inline-block" }, Lq = {
  __name: "App",
  setup(e) {
    const t = zX(), n = BN();
    return wn("adjudication-store", t), wn("records-store", n), Mt(() => {
      n.getRecords(1);
    }), (s, o) => (y(), E("div", Vq, [
      o[0] || (o[0] = u("div", null, [
        u("i", { class: "fas fa-check fa-fw text-success me-2" }),
        u("span", { class: "fw-bold" }, "Instant adjudication is enabled")
      ], -1)),
      F(nq),
      F(kq),
      F(Pq)
    ]));
  }
}, Ui = new EventTarget();
Ui.emit = (e, t = {}) => {
  Ui.dispatchEvent(
    new CustomEvent(e, {
      detail: {
        ...t,
        timestamp: Date.now()
      }
    })
  );
};
const Dg = () => ({
  install: (e) => {
    e.config.globalProperties.$eventBus = Ui, e.provide("eventBus", Ui);
  }
}), lre = (e) => {
  const t = xn(Lq), n = Bc();
  n.use(jX), n.use(qc), t.use(n), t.use(js), t.use(Dg()), t.mount(e);
  const s = t.runWithContext(() => BX());
  return { app: t, store: s, eventBus: Ui };
}, up = () => {
  const e = Pc();
  return I(() => {
    var o;
    const n = ((o = e.params) == null ? void 0 : o.arm_num) ?? 1;
    return n === "" || n == null ? 1 : n;
  });
}, Fq = "app", Uq = () => ({
  day_offset_max: 0,
  day_offset_min: 0,
  fhir_fields: {},
  fhir_source_name: "",
  mapping: [],
  mapping_helper_url: "",
  preview_fields: [],
  project: {},
  project_fields: [],
  project_id: 0,
  project_temporal_fields: [],
  translations: {}
}), Jc = /* @__PURE__ */ vn(Fq, () => {
  L(!1);
  const e = L(!1), t = L(), n = mt(Uq()), s = mt({});
  up();
  const o = I(() => {
    let i = (n == null ? void 0 : n.fhir_fields) ?? {};
    return Object.values(i).filter(
      (r) => r.identifier === !0
    );
  });
  return {
    loading: e,
    error: t,
    settings: n,
    arms: s,
    recordIdentifierFields: o
  };
});
let jq = mr();
const bl = vr(jq, ["pid"], { timeout: 0 }), Kl = {
  getSettings() {
    const e = {
      route: "CdpController:getSettings"
    };
    return bl.get("", { params: e });
  },
  setSettings(e) {
    const t = {
      route: "CdpController:setSettings"
    }, n = { settings: e };
    return bl.post("", n, { params: t });
  },
  setMappings(e) {
    const t = {
      route: "CdpController:setMappings"
    }, n = { mappings: e };
    return bl.post("", n, { params: t });
  },
  exportMappings() {
    const e = {
      route: "CdpController:exportMappings"
    }, t = {};
    return bl.post("", t, { params: e });
  },
  importMappings(e) {
    const t = {
      route: "CdpController:importMappings"
    }, n = new FormData();
    return n.append("file", e), bl.post("", n, { params: t });
  }
}, WN = 0.01, ji = 0.01, Bq = 15, Ig = 365, mi = Object.freeze({
  MANUAL: "manual",
  INSTANT: "instant",
  AUTO: "auto"
}), Hq = "settings", dp = /* @__PURE__ */ vn(Hq, () => {
  const e = L(!1), t = L(), n = mt({});
  up();
  const s = L([]), o = L(), i = L(ji), r = L();
  return {
    loading: e,
    error: t,
    arms: n,
    preview_fields: s,
    days_plus_minus: o,
    days: i,
    adjudication_method: r
  };
}), Yq = "mapping", GN = /* @__PURE__ */ vn(Yq, () => {
  const e = L(!1), t = L(), n = mt({});
  up();
  const s = L([]);
  return {
    loading: e,
    error: t,
    arms: n,
    list: s
  };
}), ku = L([]), Wq = {
  app: Jc,
  settings: dp,
  mapping: GN
}, Gq = () => ({
  ...Object.fromEntries(
    Object.entries(Wq).map(([t, n]) => [t, n()])
  )
}), dh = Object.freeze({
  STANDARD: "STANDARD",
  TEMPORAL: "TEMPORAL",
  IDENTIFIER: "IDENTIFIER"
}), zq = (e, t) => {
  const n = Jc(), s = t;
  return (/* @__PURE__ */ vn(e, () => {
    const i = L(e), r = L(!1), a = L(), l = L([]), c = mt(to(s)), d = () => {
      const U = to(s);
      return Object.assign(c, U), U;
    }, { fhir_fields: f, project_temporal_fields: p } = xe(n.settings ?? {}), {
      events: h,
      metadata: m,
      events_forms: v,
      arms: g,
      forms: _
    } = xe(n.settings.project), S = (U) => {
      const A = {
        external_source_field_name: c == null ? void 0 : c.external_source_field_name,
        event_id: c == null ? void 0 : c.event_id,
        field_name: c == null ? void 0 : c.field_name,
        temporal_field: c == null ? void 0 : c.temporal_field,
        preselect: c == null ? void 0 : c.preselect
      }, G = {
        external_source_field_name: U == null ? void 0 : U.external_source_field_name,
        event_id: U == null ? void 0 : U.event_id,
        field_name: U == null ? void 0 : U.field_name,
        temporal_field: U == null ? void 0 : U.temporal_field,
        preselect: U == null ? void 0 : U.preselect
      };
      return lr(A, G);
    }, b = I(() => !S(s)), O = I(() => (c == null ? void 0 : c._isNew) === !0), w = I(() => (c == null ? void 0 : c._isDeleted) ?? !1), N = (U = !0) => {
      c._isDeleted = U;
    }, C = I(() => l.value.length > 0), k = I(() => {
      var A, G;
      const U = c == null ? void 0 : c.external_source_field_name;
      return U ? ((G = (A = f.value) == null ? void 0 : A[U]) == null ? void 0 : G.temporal) ?? !1 : !1;
    }), x = I(() => {
      var te;
      const U = c.external_source_field_name, A = ((te = f.value) == null ? void 0 : te[U]) ?? {}, G = (A == null ? void 0 : A.label) ?? "", X = (A == null ? void 0 : A.description) ?? "";
      return {
        mapping_id: U,
        label: (A == null ? void 0 : A.label) ?? "",
        description: G != X ? X : null,
        metadata: A,
        type: Kq(A)
      };
    }), $ = I(() => Sb(m.value, c.field_name)), M = I(() => Sb(m.value, c.temporal_field)), R = (U) => {
      var X;
      const A = ["descriptive", "checkbox", "file"], G = to(U);
      for (const [te, $e] of Object.entries(G)) {
        const Ge = new RegExp(`^${te}_complete$`, "i");
        for (const Ye of Object.keys(($e == null ? void 0 : $e.fields) ?? {})) {
          const et = (X = m.value) == null ? void 0 : X[Ye], Dt = et == null ? void 0 : et.element_type, Pt = (et == null ? void 0 : et.field_name) ?? "";
          (A.includes(Dt) || Pt.match(Ge)) && delete G[te].fields[Ye];
        }
      }
      return G;
    }, V = I(() => {
      const U = (v == null ? void 0 : v.value) ?? {}, A = (_ == null ? void 0 : _.value) ?? {}, G = [...(U == null ? void 0 : U[c == null ? void 0 : c.event_id]) ?? []];
      let X = Xq(A, G);
      return R(X);
    }), j = I(() => {
      var G;
      const U = to(V.value), A = p.value.map(
        (X) => X.field_name
      );
      for (const [X, te] of Object.entries(
        U
      ))
        for (const [$e, Ge] of Object.entries(
          te == null ? void 0 : te.fields
        ))
          A.includes($e) || (G = te == null ? void 0 : te.fields) == null || delete G[$e];
      return R(U);
    });
    return ht(
      () => c == null ? void 0 : c.event_id,
      () => {
        var G, X;
        const U = Object.keys(
          V.value ?? []
        ), A = (X = (G = m == null ? void 0 : m.value) == null ? void 0 : G[c.field_name]) == null ? void 0 : X.form_name;
        U.includes(A) || (c.field_name = null);
      },
      { immediate: !0 }
    ), ht(
      () => c.external_source_field_name,
      () => {
        k.value || (c.temporal_field = null, c.preselect = null);
      },
      { immediate: !0 }
    ), {
      _id: i,
      error: a,
      loading: r,
      field: c,
      // the mapping entry
      duplicates: l,
      // helpers
      externalSourceFieldData: x,
      redcapFieldData: $,
      temporalFieldData: M,
      isDirty: b,
      isNew: O,
      isDeleted: w,
      isTemporal: k,
      isDuplicate: C,
      // read-only
      projectMetadata: m,
      temporal_fields: p,
      eventFields: V,
      eventFieldsTemporal: j,
      // methods
      equals: S,
      reset: d,
      markDeleted: N
    };
  }))();
}, Sb = (e, t) => {
  const n = e == null ? void 0 : e[t];
  return {
    name: n == null ? void 0 : n.field_name,
    label: RL((n == null ? void 0 : n.element_label) ?? ""),
    form: String((n == null ? void 0 : n.form_menu_description) ?? (n == null ? void 0 : n.form_name) ?? "")
  };
}, Kq = (e) => e != null && e.identifier ? dh.IDENTIFIER : e.temporal ? dh.TEMPORAL : dh.STANDARD;
function Xq(e, t) {
  return Object.keys(e).reduce((n, s) => (t.includes(s) && (n[s] = e[s]), to(n)), {});
}
function qq(e) {
  return (t, n) => {
    var a, l, c, d;
    const s = ((a = e[t.external_source_field_name]) == null ? void 0 : a.category) || "", o = ((l = e[n.external_source_field_name]) == null ? void 0 : l.category) || "", i = ((c = e[t.external_source_field_name]) == null ? void 0 : c.subcategory) || "", r = ((d = e[n.external_source_field_name]) == null ? void 0 : d.subcategory) || "";
    return s < o ? -1 : s > o ? 1 : i < r ? -1 : i > r ? 1 : t.external_source_field_name < n.external_source_field_name ? -1 : t.external_source_field_name > n.external_source_field_name ? 1 : 0;
  };
}
const wb = () => ({
  _isDeleted: !1,
  _isNew: !0,
  map_id: jv(),
  event_id: null,
  external_source_field_name: null,
  field_name: null,
  is_record_identifier: !1,
  preselect: null,
  project_id: null,
  temporal_field: null
}), Jq = () => {
  let e = 0;
  return () => ++e;
}, Qq = /* @__PURE__ */ vn("mapping-service", () => {
  const e = Ns(), t = Dn(), n = Jc(), s = dp(), o = zN(), { mapping: i, fhir_fields: r } = xe(n == null ? void 0 : n.settings), a = Jq(), l = L(), c = L(!1), d = L(), f = L([]), p = (V) => {
    const U = `mapping-service-${V._id = a()}`;
    return zq(U, V);
  }, h = (V, j = void 0) => {
    typeof j > "u" && (j = f.value.length);
    const U = p(V);
    f.value.splice(j, 0, U);
  }, m = () => {
    const V = wb();
    h(V);
  }, v = (V, j) => {
    const U = { ...V, _isDeleted: !1 };
    U.map_id = jv(), U._isNew = !0, h(U, j + 1);
  }, g = (V) => {
    var A;
    const j = f.value.findIndex(
      (G) => {
        var X;
        return ((X = G == null ? void 0 : G.field) == null ? void 0 : X.map_id) === (V == null ? void 0 : V.map_id);
      }
    ), U = (A = f.value) == null ? void 0 : A[j];
    U && (U.isNew ? (U.$dispose(), f.value.splice(j, 1)) : U.markDeleted());
  }, _ = (V) => {
    var A;
    const j = f.value.findIndex(
      (G) => {
        var X;
        return ((X = G == null ? void 0 : G.field) == null ? void 0 : X.map_id) === (V == null ? void 0 : V.map_id);
      }
    ), U = (A = f.value) == null ? void 0 : A[j];
    U && U.markDeleted(!1);
  };
  async function S() {
    var V;
    try {
      c.value = !0;
      const j = await Kl.exportMappings();
      return (V = j == null ? void 0 : j.data) == null ? void 0 : V.download_url;
    } catch (j) {
      d.value = j;
    } finally {
      c.value = !1;
    }
  }
  async function b(V) {
    var j;
    try {
      c.value = !0;
      const U = await Kl.importMappings(V), A = (j = U == null ? void 0 : U.data) == null ? void 0 : j.imported;
      return t.toast({
        title: "Success",
        body: `Total imported mappings: ${A == null ? void 0 : A.length}`
      }), await o.getSettings(), A;
    } catch (U) {
      d.value = U;
    } finally {
      c.value = !1;
    }
  }
  const O = (V, j) => {
    const U = qq(j);
    return V.sort(U);
  }, w = I(() => {
    const V = [];
    return l.value && V.push(l.value), V.push(...f.value), V;
  }), N = (V) => {
    const j = to(V), U = n.recordIdentifierFields.map((A) => A.field);
    return j.is_record_identifier = !0, j.temporal_field = null, U.includes(j.external_source_field_name) || (j.external_source_field_name = U == null ? void 0 : U[0]), p(j);
  }, C = () => {
    for (const [V, j] of w.value.entries())
      j.$dispose();
    l.value = N(wb()), f.value = [];
  }, k = I(() => {
    for (const [V, j] of w.value.entries())
      if (j.isDeleted || j.isDirty || j.isNew) return !0;
    return !1;
  }), x = I(() => {
    for (const V of f.value) {
      if (!V.isTemporal) continue;
      const j = (V == null ? void 0 : V.field) ?? {};
      if (!(j != null && j.preselect) || !(j != null && j.temporal_field)) return !1;
    }
    return !0;
  }), $ = I(() => {
    for (const [V, j] of w.value.entries())
      if (j.isDuplicate) return !0;
    return !1;
  });
  async function M() {
    var V;
    try {
      if ($.value) {
        e.alert({ title: "Error", body: "You must remove duplicate entries before you can save." });
        return;
      }
      if (c.value = !0, (s == null ? void 0 : s.adjudication_method) !== mi.MANUAL && !x.value)
        if (await e.confirm({
          title: es("incorrect_adjudication_strategy_warning_title"),
          body: es("incorrect_adjudication_strategy_warning_message"),
          textCancel: "Cancel",
          textOk: "Continue"
        }))
          s.adjudication_method = mi.MANUAL, await o.save();
        else
          return;
      const A = [(V = l.value) == null ? void 0 : V.field];
      for (const [X, te] of f.value.entries())
        A.push({ ...te.field });
      return await Kl.setMappings(A);
    } catch (j) {
      d.value = j;
    } finally {
      c.value = !1;
    }
  }
  async function R() {
    for (const [V, j] of w.value.entries())
      j.isDirty && j.reset(), j.isDeleted && j.reset(), j.isNew && g(j.field);
  }
  return ht(
    i,
    () => {
      try {
        C();
        const V = O(i.value, r.value);
        for (const j of V) {
          if ((j == null ? void 0 : j.is_record_identifier) == !0) {
            l.value = N(j);
            continue;
          }
          j._isNew = !1, j._isDeleted = !1;
          const U = p(j);
          f.value.push(U);
        }
      } catch (V) {
        console.log(V);
      }
    },
    { immediate: !0 }
  ), ht(
    () => f.value.map((V) => V.field),
    // Watch the 'field' property of each object
    () => {
      f.value.forEach((j) => j.duplicates = []);
      const V = /* @__PURE__ */ new Set();
      for (let j = 0; j < f.value.length; j++) {
        const U = f.value[j];
        if (!V.has(U)) {
          for (let A = j + 1; A < f.value.length; A++) {
            const G = f.value[A];
            U.equals(G.field) && (console.log("equales"), U.duplicates.push(G), G.duplicates.push(U), V.add(G));
          }
          V.add(U);
        }
      }
    },
    { deep: !0 }
  ), {
    loading: c,
    error: d,
    stores: f,
    recordIdentifierStore: l,
    fhir_fields: r,
    isDirty: k,
    hasDuplicates: $,
    allTemporalFieldsSetForInstantAdjudication: x,
    registerEntry: p,
    createEntry: m,
    removeEntry: g,
    restoreEntry: _,
    duplicateEntry: v,
    save: M,
    reset: R,
    exportMappings: S,
    importMappings: b
  };
}), zN = /* @__PURE__ */ vn("settings-service", () => {
  const e = L(!1), t = L();
  Ns(), Dn(), co(), Pc();
  const n = Jc(), s = dp(), o = GN();
  up();
  const i = mt({
    preview_fields: [],
    days: null,
    days_plus_minus: null,
    adjudication_method: null
  }), r = I(() => {
    var g, _, S, b, O, w, N;
    const m = { ...c.value }, v = {
      preview_fields: [...((g = n == null ? void 0 : n.settings) == null ? void 0 : g.preview_fields) || []],
      days: String(
        (S = (_ = n == null ? void 0 : n.settings) == null ? void 0 : _.project) == null ? void 0 : S.realtime_webservice_offset_days
      ),
      days_plus_minus: (O = (b = n == null ? void 0 : n.settings) == null ? void 0 : b.project) == null ? void 0 : O.realtime_webservice_offset_plusminus,
      adjudication_method: (N = (w = n == null ? void 0 : n.settings) == null ? void 0 : w.project) == null ? void 0 : N.adjudication_method
    };
    return !lr(m, v);
  }), a = (m, v) => {
    for (const [g, _] of Object.entries(v))
      delete m[g], m[g] = _;
  };
  async function l(m, v) {
    try {
      e.value = !0;
      const g = await Kl.getSettings(), _ = (g == null ? void 0 : g.data) ?? {};
      a(i, _), a(n.settings, i);
      const { translations: S = {} } = _;
      Bf(S);
    } catch (g) {
      n.error = g;
    } finally {
      e.value = !1;
    }
  }
  const c = I(() => ({
    preview_fields: [...s.preview_fields],
    days: String(s.days),
    days_plus_minus: s.days_plus_minus,
    adjudication_method: s.adjudication_method
  }));
  function d() {
    a(n.settings, i);
  }
  async function f() {
    try {
      return e.value = !0, await Kl.setSettings(c.value);
    } catch (m) {
      t.value = m;
    } finally {
      e.value = !1;
    }
  }
  const p = () => {
    var m, v, g, _, S, b, O;
    s.preview_fields = [...((m = n == null ? void 0 : n.settings) == null ? void 0 : m.preview_fields) ?? []], s.days = parseFloat(
      ((g = (v = n == null ? void 0 : n.settings) == null ? void 0 : v.project) == null ? void 0 : g.realtime_webservice_offset_days) ?? ji
    ), s.days_plus_minus = (S = (_ = n == null ? void 0 : n.settings) == null ? void 0 : _.project) == null ? void 0 : S.realtime_webservice_offset_plusminus, s.adjudication_method = ((O = (b = n == null ? void 0 : n.settings) == null ? void 0 : b.project) == null ? void 0 : O.adjudication_method) ?? mi.MANUAL;
  }, h = () => {
    var m;
    o.list = [...((m = n == null ? void 0 : n.settings) == null ? void 0 : m.mapping) ?? []];
  };
  return ht(
    () => n,
    (m, v) => {
      p(), h();
    },
    {
      immediate: !0,
      deep: !0
    }
  ), {
    loading: e,
    isDirty: r,
    getSettings: l,
    reset: d,
    save: f
  };
}), Zq = {
  key: 0,
  class: "alert alert-danger"
}, eJ = {
  __name: "ErrorsVisualizer",
  setup(e) {
    const t = L();
    return tn(async () => {
      var s, o;
      if ((s = ku.value) == null || s.length, ((o = ku.value) == null ? void 0 : o.length) === 0) return;
      const n = t.value;
      n && (await n.show(), ku.value = []);
    }), (n, s) => {
      const o = be("b-modal");
      return y(), le(o, {
        ref_key: "modalRef",
        ref: t,
        "ok-only": ""
      }, {
        header: K(() => s[0] || (s[0] = [
          u("span", null, "Error", -1)
        ])),
        default: K(() => [
          (y(!0), E(J, null, Ee(T(ku), (i, r) => (y(), E(J, { key: r }, [
            i ? (y(), E("div", Zq, H(T(io)(i)), 1)) : ae("", !0)
          ], 64))), 128))
        ]),
        _: 1
      }, 512);
    };
  }
}, tJ = {}, nJ = {
  "data-loader": "",
  class: "p-2 d-inline-block"
};
function sJ(e, t) {
  return y(), E("div", nJ, t[0] || (t[0] = [
    u("div", null, [
      u("i", { class: "fa fa-spinner fa-spin fa-fw me-2" }),
      u("span", null, "loading")
    ], -1)
  ]));
}
const oJ = /* @__PURE__ */ he(tJ, [["render", sJ], ["__scopeId", "data-v-17b2dbb4"]]), rJ = { "data-cdp-mapping": "" }, iJ = {
  __name: "App",
  setup(e) {
    const t = Jc(), n = dp(), s = Qq(), o = zN();
    wn("app-store", t), wn("settings-store", n), wn("mapping-service", s), wn("settings-manager-service", o);
    const i = L(!1);
    return Mt(async () => {
      await o.getSettings(), i.value = !0;
    }), (r, a) => {
      const l = be("router-view");
      return y(), E("div", rJ, [
        i.value ? (y(), le(l, { key: 0 })) : (y(), le(oJ, { key: 1 })),
        F(eJ)
      ]);
    };
  }
};
({
  ...Ra.props
});
const aJ = {
  __name: "MainLayout",
  setup(e) {
    return (t, n) => {
      const s = be("router-view");
      return y(), E("div", null, [
        F(s)
      ]);
    };
  }
}, lJ = {};
function cJ(e, t) {
  const n = Bt("tt");
  return P((y(), E("div", null, t[0] || (t[0] = [
    se("Preview Panel")
  ]))), [
    [n, void 0, "preview_fields_description"]
  ]);
}
const KN = /* @__PURE__ */ he(lJ, [["render", cJ]]), uJ = {
  class: "d-flex",
  "data-group": ""
}, dJ = { class: "me-auto" }, fJ = {
  class: "px-2",
  "data-prevent-close": ""
}, pJ = { style: { "max-height": "400px", "overflow-y": "auto" } }, hJ = { class: "text-muted" }, mJ = {
  __name: "PreviewField",
  props: {
    fields: { type: Object, default: () => ({}) },
    selected: { type: String, default: null },
    disabled: { type: Boolean, default: !1 }
  },
  emits: ["remove", "update:selected"],
  setup(e, { emit: t }) {
    const n = e, { selected: s } = xe(n), o = L(""), i = (d, f) => {
      try {
        if (d === "") return !0;
        const p = new RegExp(d, "i"), h = [
          "category",
          "subcategory",
          "description",
          "field",
          "label"
        ];
        for (const m of h)
          if ((f == null ? void 0 : f[m].match(p)) ?? !1) return !0;
        return !1;
      } catch {
        return !0;
      }
    }, r = I(() => {
      const d = {}, f = o.value;
      return Object.values(n.fields).forEach((p) => {
        const { category: h = void 0, temporal: m = !1 } = p;
        m || !h || i(f, p) && (h in d || (d[h] = []), d[h].push(p));
      }), d;
    }), a = t;
    function l() {
      a("remove", s.value);
    }
    function c(d) {
      a("update:selected", d);
    }
    return (d, f) => {
      const p = be("b-dropdown-header"), h = be("b-dropdown-item"), m = be("b-dropdown-divider"), v = be("b-dropdown");
      return y(), E("div", uJ, [
        F(v, {
          variant: "outline-secondary",
          size: "sm",
          disabled: e.disabled
        }, {
          button: K(() => [
            u("span", dJ, [
              T(s) ? (y(), E(J, { key: 0 }, [
                se(H(T(s)), 1)
              ], 64)) : (y(), E(J, { key: 1 }, [
                se("Select...")
              ], 64))
            ])
          ]),
          default: K(() => [
            u("div", null, [
              u("div", fJ, [
                P(u("input", {
                  class: "form-control form-control-sm",
                  type: "search",
                  "onUpdate:modelValue": f[0] || (f[0] = (g) => o.value = g)
                }, null, 512), [
                  [Ue, o.value]
                ])
              ]),
              u("div", pJ, [
                (y(!0), E(J, null, Ee(r.value, (g, _) => (y(), E(J, {
                  key: `${_}`
                }, [
                  F(p, null, {
                    default: K(() => [
                      u("span", hJ, H(_), 1)
                    ]),
                    _: 2
                  }, 1024),
                  (y(!0), E(J, null, Ee(g, (S, b) => (y(), le(h, {
                    key: `${b}-${S.field}`,
                    onClick: (O) => c(S.field),
                    active: T(s) == S.field
                  }, {
                    default: K(() => [
                      se(H(S.field), 1)
                    ]),
                    _: 2
                  }, 1032, ["onClick", "active"]))), 128)),
                  F(m)
                ], 64))), 128))
              ])
            ])
          ]),
          _: 1
        }, 8, ["disabled"]),
        u("button", {
          class: "btn btn-sm btn-outline-secondary",
          type: "button",
          onClick: l
        }, f[1] || (f[1] = [
          u("span", null, [
            u("i", { class: "fas fa-trash fa-fw text-danger" })
          ], -1)
        ]))
      ]);
    };
  }
}, Nb = /* @__PURE__ */ he(mJ, [["__scopeId", "data-v-93f797d0"]]), vJ = { class: "fst-italic mx-1" }, gJ = { class: "d-flex flex-column gap-2 my-2" }, Ob = 5, XN = {
  __name: "PreviewPanel",
  setup(e) {
    const t = Ie("app-store"), n = Ie("settings-store"), s = I({
      get: () => n.preview_fields ?? [],
      set: (c) => n.preview_fields = [...c]
    }), o = I(
      () => {
        var c;
        return ((c = t == null ? void 0 : t.settings) == null ? void 0 : c.fhir_source_name) ?? "unknown";
      }
    ), i = I(() => {
      var c;
      return ((c = t == null ? void 0 : t.settings) == null ? void 0 : c.fhir_fields) ?? [];
    });
    function r() {
      var c;
      ((c = s.value) == null ? void 0 : c.length) >= Ob || s.value.push(void 0);
    }
    function a(c) {
      const d = [...s.value];
      c < 0 || (d.splice(c, 1), s.value = [...d], console.log("removeisdfasd"));
    }
    function l(c, d) {
      const f = [...s.value];
      c < 0 || c >= f.length || (f[c] = d, s.value = [...f]);
    }
    return (c, d) => {
      const f = Bt("tt");
      return y(), E("div", null, [
        u("span", null, [
          P(u("span", null, null, 512), [
            [f, void 0, "preview_fields_select_label"]
          ]),
          u("span", vJ, H(o.value), 1),
          P(u("span", null, null, 512), [
            [f, void 0, "preview_fields_select_up_to"]
          ])
        ]),
        u("div", gJ, [
          (y(!0), E(J, null, Ee(s.value, (p, h) => (y(), le(Nb, {
            key: h,
            fields: i.value,
            selected: s.value[h],
            onRemove: (m) => a(h),
            "onUpdate:selected": (m) => l(h, m)
          }, null, 8, ["fields", "selected", "onRemove", "onUpdate:selected"]))), 128)),
          (y(!0), E(J, null, Ee(Ob - s.value.length, (p) => (y(), le(Nb, {
            key: p,
            fields: [],
            selected: null,
            disabled: "",
            style: { opacity: "0" }
          }))), 128))
        ]),
        u("div", null, [
          u("button", {
            class: "btn btn-sm btn-primary",
            onClick: r
          }, " Add field ")
        ])
      ]);
    };
  }
}, yJ = {}, _J = { class: "d-block text-muted fst-italic mt-2" };
function bJ(e, t) {
  const n = Bt("tt");
  return y(), E("div", null, [
    P((y(), E("span", null, t[0] || (t[0] = [
      se("Adjudication method")
    ]))), [
      [n, void 0, "adjudication_method_description"]
    ]),
    u("small", _J, [
      P((y(), E("span", null, t[1] || (t[1] = [
        se("Adjudication note")
      ]))), [
        [n, void 0, "adjudication_method_note"]
      ])
    ])
  ]);
}
const qN = /* @__PURE__ */ he(yJ, [["render", bJ]]), EJ = { class: "form-check" }, SJ = ["value"], wJ = {
  class: "form-check-label",
  for: "manual-method"
}, NJ = { class: "d-block text-muted fst-italic" }, OJ = { class: "form-check" }, xJ = ["value", "disabled"], CJ = {
  class: "form-check-label",
  for: "instant-method"
}, TJ = { class: "d-block text-muted fst-italic" }, $J = { class: "form-check" }, kJ = ["value", "disabled"], DJ = {
  class: "form-check-label",
  for: "auto-method"
}, IJ = { class: "d-block text-muted fst-italic" }, JN = {
  __name: "AdjudicationMethodPanel",
  setup(e) {
    const t = Ie("settings-store"), n = Ie("mapping-service"), { adjudication_method: s } = xe(t), {
      allTemporalFieldsSetForInstantAdjudication: o
    } = xe(n);
    return tn(() => {
      o.value || (s.value = mi.MANUAL);
    }), (i, r) => {
      const a = Bt("tt");
      return y(), E("div", null, [
        u("div", EJ, [
          P(u("input", {
            class: "form-check-input",
            type: "radio",
            id: "manual-method",
            value: T(mi).MANUAL,
            "onUpdate:modelValue": r[0] || (r[0] = (l) => lt(s) ? s.value = l : null)
          }, null, 8, SJ), [
            [ba, T(s)]
          ]),
          u("label", wJ, [
            r[3] || (r[3] = u("span", null, "Manual", -1)),
            u("small", NJ, [
              P(u("span", null, null, 512), [
                [a, void 0, "adjudication_metod_manual_description"]
              ])
            ])
          ])
        ]),
        u("div", OJ, [
          P(u("input", {
            class: "form-check-input",
            type: "radio",
            id: "instant-method",
            value: T(mi).INSTANT,
            "onUpdate:modelValue": r[1] || (r[1] = (l) => lt(s) ? s.value = l : null),
            disabled: !T(o)
          }, null, 8, xJ), [
            [ba, T(s)]
          ]),
          u("label", CJ, [
            r[4] || (r[4] = u("span", null, "Instant", -1)),
            u("small", TJ, [
              P(u("span", null, null, 512), [
                [a, void 0, "adjudication_metod_instant_description"]
              ])
            ])
          ])
        ]),
        u("div", $J, [
          P(u("input", {
            class: "form-check-input",
            type: "radio",
            id: "auto-method",
            value: T(mi).AUTO,
            "onUpdate:modelValue": r[2] || (r[2] = (l) => lt(s) ? s.value = l : null),
            disabled: !T(o)
          }, null, 8, kJ), [
            [ba, T(s)]
          ]),
          u("label", DJ, [
            r[5] || (r[5] = u("span", null, "Auto", -1)),
            u("small", IJ, [
              P(u("span", null, null, 512), [
                [a, void 0, "adjudication_metod_automatic_description"]
              ])
            ])
          ])
        ])
      ]);
    };
  }
}, RJ = {};
function AJ(e, t) {
  const n = Bt("tt");
  return P((y(), E("div", null, t[0] || (t[0] = [
    se("Offset days")
  ]))), [
    [n, void 0, "default_day_offset_description"]
  ]);
}
const QN = /* @__PURE__ */ he(RJ, [["render", AJ]]), MJ = {
  class: "d-inline-block",
  style: { width: "10px" }
}, xb = "±", PJ = {
  __name: "PlusMinusSelect",
  props: {
    selected: { default: null, required: !0 },
    selectedModifiers: {}
  },
  emits: ["update:selected"],
  setup(e) {
    const t = mn(e, "selected");
    function n(s = null) {
      t.value = s;
    }
    return (s, o) => {
      const i = be("b-dropdown-item"), r = be("b-dropdown");
      return y(), le(r, {
        variant: "outline-secondary",
        size: "sm"
      }, {
        button: K(() => [
          u("span", MJ, H(t.value || xb), 1)
        ]),
        default: K(() => [
          F(i, {
            onClick: o[0] || (o[0] = (a) => n("+-"))
          }, {
            default: K(() => [
              u("span", null, H(xb))
            ]),
            _: 1
          }),
          F(i, {
            onClick: o[1] || (o[1] = (a) => n("+"))
          }, {
            default: K(() => o[3] || (o[3] = [
              u("span", null, "+", -1)
            ])),
            _: 1
          }),
          F(i, {
            onClick: o[2] || (o[2] = (a) => n("-"))
          }, {
            default: K(() => o[4] || (o[4] = [
              u("span", null, "-", -1)
            ])),
            _: 1
          })
        ]),
        _: 1
      });
    };
  }
}, VJ = ["step", "min", "max"], LJ = {
  __name: "DaysInput",
  props: {
    days: { default: ji, required: !0 },
    daysModifiers: {}
  },
  emits: ["update:days"],
  setup(e) {
    const t = mn(e, "days");
    return (n, s) => (y(), E("div", null, [
      P(u("input", {
        class: "form-control form-control-sm",
        type: "number",
        step: T(WN),
        min: T(ji),
        max: T(Ig),
        "onUpdate:modelValue": s[0] || (s[0] = (o) => t.value = o)
      }, null, 8, VJ), [
        [Ue, t.value]
      ])
    ]));
  }
}, FJ = ["step", "min", "max"], UJ = {
  __name: "DaysRange",
  props: {
    days: { default: ji, required: !0 },
    daysModifiers: {}
  },
  emits: ["update:days"],
  setup(e) {
    const t = mn(e, "days");
    return (n, s) => (y(), E("div", null, [
      P(u("input", {
        class: "form-range form-range-sm",
        type: "range",
        step: T(WN),
        min: T(ji),
        max: T(Ig),
        "onUpdate:modelValue": s[0] || (s[0] = (o) => t.value = o)
      }, null, 8, FJ), [
        [Ue, t.value]
      ])
    ]));
  }
}, jJ = { class: "d-flex gap-2" }, BJ = { class: "text-muted fst-italic small" }, ZN = {
  __name: "OffsetDaysPanel",
  setup(e) {
    const t = Ie("settings-store"), n = I({
      get: () => t.days,
      set: (o) => t.days = parseFloat(o)
    }), s = I({
      get: () => t.days_plus_minus,
      set: (o) => t.days_plus_minus = o
    });
    return (o, i) => {
      const r = Bt("tt");
      return y(), E("div", null, [
        u("div", jJ, [
          F(PJ, {
            selected: s.value,
            "onUpdate:selected": i[0] || (i[0] = (a) => s.value = a)
          }, null, 8, ["selected"]),
          F(LJ, {
            days: n.value,
            "onUpdate:days": i[1] || (i[1] = (a) => n.value = a),
            class: "flex-fill"
          }, null, 8, ["days"])
        ]),
        F(UJ, {
          days: n.value,
          "onUpdate:days": i[2] || (i[2] = (a) => n.value = a)
        }, null, 8, ["days"]),
        P(u("span", BJ, null, 512), [
          [r, {
            min_minutes: T(Bq),
            min_days: T(ji),
            max_days: T(Ig)
          }, "min_max_days"]
        ])
      ]);
    };
  }
}, HJ = { class: "settings-panels" }, YJ = { class: "settings-row" }, WJ = { class: "fw-bold" }, GJ = { class: "settings-row" }, zJ = { class: "fw-bold" }, KJ = { class: "settings-row" }, XJ = { class: "fw-bold" }, qJ = {
  __name: "SettingsPanel",
  setup(e) {
    return (t, n) => {
      const s = Bt("tt");
      return y(), E("div", HJ, [
        u("div", YJ, [
          u("div", null, [
            P(u("span", WJ, null, 512), [
              [s, void 0, "preview_fields_title"]
            ]),
            F(KN)
          ]),
          F(XN)
        ]),
        u("div", GJ, [
          u("div", null, [
            P(u("span", zJ, null, 512), [
              [s, void 0, "default_day_offset_title"]
            ]),
            F(QN)
          ]),
          F(ZN)
        ]),
        u("div", KJ, [
          u("div", null, [
            P(u("span", XJ, null, 512), [
              [s, void 0, "adjudication_method_title"]
            ]),
            F(qN)
          ]),
          F(JN)
        ])
      ]);
    };
  }
}, JJ = /* @__PURE__ */ he(qJ, [["__scopeId", "data-v-7da95f72"]]);
class vi {
  constructor(t, n = null) {
    this.name = t, this.children = [];
  }
}
let ld = class {
  constructor(t, n = null) {
    this.data = t;
  }
};
function QJ(e, t = -1) {
  const n = new vi("", null), s = {};
  let o = 0;
  for (const i in e) {
    if (o++, t >= 0 && o >= t) break;
    const r = e[i], a = r.category && r.category.trim(), l = r.subcategory && r.subcategory.trim();
    if (a) {
      let c = s[a];
      if (c || (c = new vi(a, n), s[a] = c, n.children.push(c)), l) {
        let d = c.children.find(
          (p) => p instanceof vi && p.name === l
        );
        d || (d = new vi(l, c), c.children.push(d));
        const f = new ld(r, d);
        d.children.push(f);
      } else {
        const d = new ld(r, c);
        c.children.push(d);
      }
    } else {
      const c = new ld(r, n);
      n.children.push(c);
    }
  }
  return n;
}
const ZJ = { class: "fw-regular small fst-italic" }, eQ = {
  __name: "MappingProperty",
  props: {
    field: { type: String, default: "" },
    property: { type: String, default: "" }
  },
  setup(e) {
    const t = Ie("onElementSelected");
    return (n, s) => (y(), E("span", {
      onClick: s[0] || (s[0] = (o) => T(t)(`${e.field}:${e.property}`)),
      class: "mapping-property"
    }, [
      u("span", ZJ, "• " + H(e.property), 1)
    ]));
  }
}, tQ = /* @__PURE__ */ he(eQ, [["__scopeId", "data-v-50ad3be8"]]), nQ = { class: "mapping-element" }, sQ = { class: "fw-regular" }, oQ = { class: "ms-2 fst-italic" }, rQ = { key: 0 }, iQ = {
  __name: "MappingElement",
  props: {
    category: { type: String, default: "" },
    description: { type: String, default: "" },
    disabled: { type: Boolean, default: !1 },
    disabled_reason: { type: String, default: "" },
    field: { type: String, default: "" },
    identifier: { type: Boolean, default: !1 },
    label: { type: String, default: "" },
    properties: { type: Array, default: () => [] },
    subcategory: { type: String, default: "" },
    temporal: { type: Boolean, default: !1 }
  },
  setup(e) {
    const t = e, n = Ie("onElementSelected"), s = Ie("isActive"), o = I(() => s ? s(t) : !1), i = Ie("registerComponent");
    return Mt(() => {
      if (i) {
        const r = un();
        i(`Element-${t.field}`, r, t);
      }
    }), (r, a) => {
      var l;
      return y(), E("div", nQ, [
        u("span", {
          onClick: a[0] || (a[0] = (c) => T(n)(e.field)),
          class: Te([{ active: o.value }, "px-2 d-block mapping-label"])
        }, [
          u("span", sQ, "• " + H(e.field), 1),
          u("span", oQ, "(" + H(e.description) + ")", 1)
        ], 2),
        ((l = e.properties) == null ? void 0 : l.length) > 0 ? (y(), E("details", rQ, [
          a[1] || (a[1] = u("summary", { class: "small text-muted" }, "Select property...", -1)),
          (y(!0), E(J, null, Ee(e.properties, (c) => (y(), le(tQ, {
            key: c,
            field: e.field,
            property: c,
            class: "d-block ms-2"
          }, null, 8, ["field", "property"]))), 128))
        ])) : ae("", !0)
      ]);
    };
  }
}, aQ = /* @__PURE__ */ he(iQ, [["__scopeId", "data-v-6ab95af7"]]), lQ = { "data-container": "" }, cQ = ["open"], uQ = {
  __name: "SuperMappingContainer",
  props: /* @__PURE__ */ bs({
    // Accepting either a list to be grouped or an instance for recursive rendering
    list: { type: Object, default: null },
    instance: { type: vi, default: null }
  }, {
    open: { type: Boolean, default: !1 },
    openModifiers: {}
  }),
  emits: /* @__PURE__ */ bs(["onSelected"], ["update:open"]),
  setup(e, { emit: t }) {
    const n = L(), s = e, o = mn(e, "open"), i = I(() => s.instance ? s.instance : s.list ? QJ(s.list) : new vi("")), r = t, a = Ie("onElementSelected", null), l = (d) => {
      a ? a(d) : r("onSelected", d);
    };
    wn("onElementSelected", l);
    const c = new AbortController();
    return Mt(() => {
      s.instance || (o.value = !0), n.value.addEventListener(
        "toggle",
        (d) => {
          o.value = d.target.open;
        },
        { signal: c.signal }
      );
    }), fr(() => c.abort()), (d, f) => (y(), E("div", lQ, [
      u("details", {
        open: o.value,
        ref_key: "detailsRef",
        ref: n
      }, [
        u("summary", null, [
          u("span", null, H(i.value.name), 1)
        ]),
        o.value ? (y(!0), E(J, { key: 0 }, Ee(i.value.children, (p, h) => (y(), E(J, { key: h }, [
          p instanceof T(vi) ? (y(), le(eO, {
            key: 0,
            instance: p,
            class: "px-2"
          }, null, 8, ["instance"])) : p instanceof T(ld) ? (y(), le(aQ, On({
            key: 1,
            ref_for: !0
          }, { ...p.data }, {
            onClick: (m) => l(p)
          }), null, 16, ["onClick"])) : ae("", !0)
        ], 64))), 128)) : ae("", !0)
      ], 8, cQ)
    ]));
  }
}, eO = /* @__PURE__ */ he(uQ, [["__scopeId", "data-v-d7de867c"]]);
function dQ(e, t, n, { limit: s = 50 }) {
  const o = ma(n), i = I(() => {
    try {
      if (typeof t != "function") return e;
      const d = new RegExp(o.value, "i");
      let f = 0, p = Array.isArray(e) ? [] : {};
      if (Array.isArray(e))
        for (const h of e) {
          if (s >= 0 && f >= s) break;
          t(h, d) && (p.push(h), f++);
        }
      else if (typeof e == "object")
        for (const [h, m] of Object.entries(e)) {
          if (s >= 0 && f >= s) break;
          t(m, d, h) && (p[h] = m, f++);
        }
      return p;
    } catch {
      return e;
    }
  }), r = (d) => Array.isArray(d) ? d.length : typeof d == "object" ? Object.keys(d).length : 0, a = I(() => r(i.value));
  I(() => r(e));
  const l = I(() => a.value === 0), c = I(() => s < 0 ? !1 : a.value > s);
  return { query: o, filteredList: i, isEmpty: l, hasMore: c };
}
const tO = {
  __name: "RenderlessFilter",
  props: /* @__PURE__ */ bs({
    limit: { type: Number, default: -1 },
    filterCallback: { type: Function, default: null },
    list: { type: [Object, Array], default: () => [] }
  }, {
    query: { type: String, default: "" },
    queryModifiers: {}
  }),
  emits: ["update:query"],
  setup(e, { expose: t }) {
    const n = e, s = mn(e, "query"), { filteredList: o, isEmpty: i, hasMore: r } = dQ(
      n.list,
      n.filterCallback,
      s,
      { limit: n.limit }
    );
    return t({ query: s, filteredList: o, isEmpty: i, hasMore: r }), (a, l) => ye(a.$slots, "default", {
      filteredList: T(o),
      query: s.value,
      isEmpty: T(i),
      hasMore: T(r)
    });
  }
}, fQ = {}, pQ = { class: "fst-italic" };
function hQ(e, t) {
  return y(), E("span", pQ, "nothing selected");
}
const fp = /* @__PURE__ */ he(fQ, [["render", hQ]]), mQ = {
  key: 0,
  "data-prevent-close": "",
  class: "px-2 results-wrapper"
}, vQ = { class: "results" }, gQ = {
  key: 0,
  class: "d-block p-2 fst-italic"
}, yQ = {
  key: 0,
  class: "px-2 fst-italic text-muted"
}, _Q = {
  __name: "ListFilter",
  props: {
    limit: { type: Number, default: 50 },
    filterCallback: { type: Function, default: null },
    list: { type: [Object, Array], default: null }
  },
  setup(e, { expose: t }) {
    const n = L(), s = L(), o = L("");
    return t({ close: () => {
      n.value.close();
    } }), (r, a) => {
      const l = be("b-dropdown");
      return y(), le(l, {
        ref_key: "dropdownRef",
        ref: n,
        variant: "outline-secondary",
        size: "sm"
      }, {
        button: K(() => [
          ye(r.$slots, "header", {}, () => [
            F(fp)
          ], !0)
        ]),
        default: K(({ show: c }) => [
          F(tO, {
            query: o.value,
            "onUpdate:query": a[1] || (a[1] = (d) => o.value = d),
            ref_key: "renderlessRef",
            ref: s,
            limit: e.limit,
            list: e.list,
            filterCallback: e.filterCallback
          }, {
            default: K(({ filteredList: d, isEmpty: f, hasMore: p }) => [
              c.value ? (y(), E("div", mQ, [
                P(u("input", {
                  class: "form-control form-control-sm",
                  "onUpdate:modelValue": a[0] || (a[0] = (h) => o.value = h),
                  placeholder: "Filter...",
                  type: "search"
                }, null, 512), [
                  [Ue, o.value]
                ]),
                u("div", vQ, [
                  f ? (y(), E("span", gQ, "No data")) : ae("", !0),
                  ye(r.$slots, "default", { filteredList: d }, void 0, !0)
                ]),
                p ? (y(), E("span", yQ, "Refine your search for more results...")) : ae("", !0)
              ])) : ae("", !0)
            ]),
            _: 2
          }, 1032, ["query", "limit", "list", "filterCallback"])
        ]),
        _: 3
      }, 512);
    };
  }
}, bQ = /* @__PURE__ */ he(_Q, [["__scopeId", "data-v-6623cf79"]]), EQ = { class: "fhir-fields" }, SQ = {
  key: 0,
  class: "d-inline-block text-start"
}, wQ = { class: "d-block" }, NQ = { class: "d-block fw-bold" }, OQ = {
  key: 0,
  class: "d-block text-muted fst-italic"
}, xQ = {
  key: 0,
  class: "alert alert-warning d-block mt-2 small"
}, CQ = {
  __name: "FhirField",
  setup(e) {
    const t = L(), n = Ie("local-mapping-service"), s = Ie("app-store"), { external_source_field_name: o } = xe(n.value.field), { externalSourceFieldData: i } = xe(n.value), { fhir_fields: r } = xe(s.settings);
    s.settings;
    const a = I(() => Object.values(r.value ?? {}).filter(
      (m) => !m.identifier
    )), l = I(() => {
      var v;
      const { disabled: h, disabled_reason: m } = c((v = i.value) == null ? void 0 : v.mapping_id);
      if (h)
        return m;
    }), c = (h) => {
      var _;
      let m, v;
      const g = ((_ = r.value) == null ? void 0 : _[h]) ?? {};
      return m = (g == null ? void 0 : g.disabled) ?? !1, m && (v = (g == null ? void 0 : g.disabled_reason) ?? "disabled"), { disabled: m, disabled_reason: v };
    };
    function d(h) {
      o.value = h, t.value.close();
    }
    const f = (h, m) => h.field.match(m) || h.category.match(m) || h.subcategory.match(m) || h.label.match(m) || h.description.match(m);
    return wn("registerComponent", (h, m, v) => {
      var S;
      const { disabled: g, disabled_reason: _ } = c(v == null ? void 0 : v.field);
      if (g) {
        const b = (S = m == null ? void 0 : m.proxy) == null ? void 0 : S.$el;
        b.childNodes.forEach((w) => {
          w != null && w.style && (w.style.textDecoration = "line-through");
        });
        const O = document.createElement("span");
        O.classList.add("alert", "alert-warning", "mt-2"), O.style.display = "block", O.style.fontStyle = "italic", O.innerHTML = _, b.appendChild(O);
      }
    }), wn("isActive", (h) => i.value.mapping_id === h.field), (h, m) => (y(), E("div", EQ, [
      F(bQ, {
        ref_key: "filterRef",
        ref: t,
        list: a.value,
        limit: -1,
        filterCallback: f
      }, {
        header: K(() => [
          T(i).mapping_id ? (y(), E("div", SQ, [
            u("span", wQ, H(T(i).label), 1),
            u("span", NQ, H(T(i).mapping_id), 1),
            T(i).description ? (y(), E("span", OQ, "(" + H(T(i).description) + ")", 1)) : ae("", !0)
          ])) : ae("", !0)
        ]),
        default: K(({ filteredList: v }) => [
          F(eO, {
            list: v,
            onOnSelected: d
          }, null, 8, ["list"])
        ]),
        _: 1
      }, 8, ["list"]),
      l.value ? (y(), E("span", xQ, [
        u("small", null, H(l.value), 1)
      ])) : ae("", !0)
    ]));
  }
}, TQ = /* @__PURE__ */ he(CQ, [["__scopeId", "data-v-f2206647"]]), $Q = {
  key: 0,
  class: "d-inline-block text-start button-label"
}, kQ = { class: "d-block" }, DQ = { class: "d-block fw-bold" }, IQ = { class: "d-block fst-italic" }, RQ = {
  class: "p-2",
  "data-prevent-close": ""
}, AQ = { class: "results" }, MQ = { class: "fw-bold" }, PQ = { class: "d-block" }, VQ = { class: "d-block text-muted fst-italic" }, LQ = {
  key: 0,
  "data-prevent-close": "",
  class: "px-2"
}, FQ = {
  __name: "FieldsDropdown",
  props: /* @__PURE__ */ bs({
    label: { type: String, default: "" },
    form: { type: String, default: "" },
    eventFields: { type: Object, default: () => ({}) }
  }, {
    field_name: { type: String, default: "" },
    field_nameModifiers: {}
  }),
  emits: ["update:field_name"],
  setup(e) {
    const t = e, n = L([]), s = (d, f) => n.value[d] = f, o = I(() => n.value.every((d) => d));
    ht(
      () => t.eventFields,
      (d) => {
        n.value = new Array(d.length).fill(!1);
      },
      { immediate: !0 }
    );
    const i = mn(e, "field_name");
    function r(d) {
      i.value = d, l.value = "";
    }
    function a() {
    }
    const l = L("");
    function c(d, f, p) {
      return d.match(f) || p.match(f);
    }
    return (d, f) => {
      const p = be("b-dropdown-item"), h = be("b-dropdown-header"), m = be("b-dropdown");
      return y(), le(m, {
        class: "fields-dropdown",
        variant: "outline-secondary",
        size: "sm",
        onClose: a
      }, {
        button: K(() => [
          i.value ? (y(), E("span", $Q, [
            u("span", kQ, H(e.label), 1),
            u("span", DQ, H(i.value), 1),
            u("span", IQ, "(" + H(e.form) + ")", 1)
          ])) : (y(), le(fp, { key: 1 }))
        ]),
        default: K(() => [
          u("div", null, [
            u("div", RQ, [
              P(u("input", {
                class: "form-control form-control-sm",
                "onUpdate:modelValue": f[0] || (f[0] = (v) => l.value = v),
                placeholder: "Filter...",
                type: "search"
              }, null, 512), [
                [Ue, l.value]
              ])
            ]),
            u("div", AQ, [
              F(p, {
                active: !i.value,
                onClick: f[1] || (f[1] = (v) => r(null))
              }, {
                default: K(() => f[3] || (f[3] = [
                  se("-- none --")
                ])),
                _: 1
              }, 8, ["active"]),
              (y(!0), E(J, null, Ee(e.eventFields, (v, g, _) => (y(), le(tO, {
                key: g,
                query: l.value,
                "onUpdate:query": f[2] || (f[2] = (S) => l.value = S),
                limit: 50,
                list: v.fields,
                filterCallback: c
              }, {
                default: K(({ filteredList: S, isEmpty: b, hasMore: O }) => [
                  u("template", null, [
                    se(H(s(_, b)), 1)
                  ]),
                  b ? ae("", !0) : (y(), E(J, { key: 0 }, [
                    F(h, { class: "bg-light" }, {
                      default: K(() => [
                        u("span", MQ, H(g), 1)
                      ]),
                      _: 2
                    }, 1024),
                    (y(!0), E(J, null, Ee(S, (w, N) => (y(), le(p, {
                      key: `field-${N}`,
                      active: N === i.value,
                      onClick: (C) => r(N)
                    }, {
                      default: K(() => [
                        u("span", PQ, H(w), 1),
                        u("span", VQ, H(N), 1)
                      ]),
                      _: 2
                    }, 1032, ["active", "onClick"]))), 128))
                  ], 64)),
                  O ? (y(), E(J, { key: 1 }, [
                    se("...")
                  ], 64)) : ae("", !0)
                ]),
                _: 2
              }, 1032, ["query", "list"]))), 128)),
              o.value ? (y(), E("div", LQ, f[4] || (f[4] = [
                u("span", { class: "fst-italic text-muted" }, "No results...", -1)
              ]))) : ae("", !0)
            ])
          ])
        ]),
        _: 1
      });
    };
  }
}, nO = /* @__PURE__ */ he(FQ, [["__scopeId", "data-v-dc4e0640"]]), UQ = {
  __name: "TemporalField",
  setup(e) {
    const t = Ie("local-mapping-service"), { temporalFieldData: n, eventFieldsTemporal: s } = xe(t.value), { temporal_field: o } = xe(t.value.field);
    return (i, r) => (y(), le(nO, {
      field_name: T(o),
      "onUpdate:field_name": r[0] || (r[0] = (a) => lt(o) ? o.value = a : null),
      label: T(n).label,
      form: T(n).form,
      eventFields: T(s)
    }, null, 8, ["field_name", "label", "form", "eventFields"]));
  }
}, jQ = { class: "button-label" }, BQ = { key: 0 }, HQ = { key: 1 }, YQ = { class: "results" }, WQ = {
  class: "p-2 bg-light",
  "data-prevent-close": ""
}, GQ = {
  __name: "EventDropdown",
  setup(e) {
    const t = Ie("app-store"), { events: n, arms: s } = xe(t.settings.project), o = Ie("local-mapping-service"), { event_id: i } = xe(o.value.field), r = (c) => {
      var d;
      return ((d = n.value) == null ? void 0 : d[c]) ?? {};
    }, a = I(() => r(i.value));
    function l(c) {
      i.value = c;
    }
    return (c, d) => {
      const f = be("b-dropdown-item"), p = be("b-dropdown-divider"), h = be("b-dropdown");
      return y(), le(h, {
        variant: "outline-secondary",
        size: "sm",
        class: "events-dropdown"
      }, {
        button: K(() => [
          u("div", jQ, [
            a.value.name_ext ? (y(), E("span", BQ, H(`${a.value.name_ext}`), 1)) : (y(), E("span", HQ, [
              F(fp)
            ]))
          ])
        ]),
        default: K(() => [
          u("div", YQ, [
            (y(!0), E(J, null, Ee(T(s), (m, v) => (y(), E(J, {
              key: `arm-${m.id}`
            }, [
              u("div", WQ, " Arm " + H(v) + ": " + H(m.name), 1),
              F(f, {
                active: !T(i),
                onClick: d[0] || (d[0] = (g) => l(null))
              }, {
                default: K(() => d[1] || (d[1] = [
                  u("span", null, "-- none --", -1)
                ])),
                _: 1
              }, 8, ["active"]),
              (y(!0), E(J, null, Ee(m.events, (g, _) => (y(), le(f, {
                key: `event-${_}`,
                class: "d-block",
                onClick: (S) => l(_),
                active: _ === T(i)
              }, {
                default: K(() => {
                  var S;
                  return [
                    se(H((S = r(_)) == null ? void 0 : S.name_ext), 1)
                  ];
                }),
                _: 2
              }, 1032, ["onClick", "active"]))), 128)),
              F(p)
            ], 64))), 128))
          ])
        ]),
        _: 1
      });
    };
  }
}, sO = /* @__PURE__ */ he(GQ, [["__scopeId", "data-v-dd3b7830"]]), oO = {
  __name: "REDCapField",
  setup(e) {
    const t = Ie("local-mapping-service"), { field_name: n } = xe(t.value.field), { redcapFieldData: s, eventFields: o } = xe(t.value);
    return (i, r) => (y(), le(nO, {
      field_name: T(n),
      "onUpdate:field_name": r[0] || (r[0] = (a) => lt(n) ? n.value = a : null),
      label: T(s).label,
      form: T(s).form,
      eventFields: T(o)
    }, null, 8, ["field_name", "label", "form", "eventFields"]));
  }
}, Cb = Object.freeze({
  MIN: { value: "MIN", label: "Lowest numerical value" },
  MAX: { value: "MAX", label: "Highest numerical value" },
  FIRST: { value: "FIRST", label: "Earliest value (based on timestamp)" },
  LAST: { value: "LAST", label: "Latest value (based on timestamp)" },
  NEAR: { value: "NEAR", label: "Nearest value (based on timestamp)" }
}), zQ = { key: 0 }, KQ = {
  __name: "PreselectStrategyDropdown",
  setup(e) {
    const t = Ie("local-mapping-service"), { preselect: n } = xe(t.value.field), s = I(() => {
      for (const [i, r] of Object.entries(Cb))
        if (r.value === n.value) return r.label;
      return null;
    });
    function o(i) {
      n.value = i;
    }
    return (i, r) => {
      const a = be("b-dropdown-item"), l = be("b-dropdown");
      return y(), le(l, {
        variant: "outline-secondary",
        size: "sm"
      }, {
        button: K(() => [
          s.value ? (y(), E("span", zQ, H(s.value), 1)) : (y(), le(fp, { key: 1 }))
        ]),
        default: K(() => [
          F(a, {
            active: !T(n),
            onClick: r[0] || (r[0] = (c) => o(i.strategy))
          }, {
            default: K(() => r[1] || (r[1] = [
              u("span", null, "-- none --", -1)
            ])),
            _: 1
          }, 8, ["active"]),
          (y(!0), E(J, null, Ee(T(Cb), (c, d) => (y(), le(a, {
            key: d,
            active: c.value === T(n),
            onClick: (f) => o(c.value)
          }, {
            default: K(() => [
              se(H(c.label), 1)
            ]),
            _: 2
          }, 1032, ["active", "onClick"]))), 128))
        ]),
        _: 1
      });
    };
  }
}, XQ = { class: "status-indicator d-flex gap-2" }, qQ = { key: 0 }, JQ = { key: 0 }, QQ = { key: 1 }, ZQ = { key: 2 }, eZ = { class: "d-flex flex-column gap-2" }, tZ = { style: { "vertical-align": "middle" } }, nZ = { class: "p-2" }, sZ = { class: "action-buttons d-flex gap-2" }, oZ = {
  __name: "MappingRow",
  props: {
    store: { type: Object, default: () => ({}) },
    index: { type: Number }
  },
  setup(e) {
    const t = e, n = L(), { store: s, index: o } = xe(t), i = Ie("mapping-service");
    wn("local-mapping-service", s);
    const { isNew: r, isDirty: a, isDeleted: l, isDuplicate: c, isTemporal: d, field: f } = xe(
      s.value
    );
    function p() {
      i.removeEntry(f.value);
    }
    function h() {
      i.restoreEntry(f.value);
    }
    function m() {
      i.duplicateEntry(f.value, o.value);
    }
    const v = () => {
      if (IL(n.value) || !r.value) return;
      const _ = 40, S = n.value.getBoundingClientRect().top, b = window.scrollY + S - _;
      window.scrollTo({
        top: b,
        behavior: "smooth"
      });
    };
    return Mt(() => v()), (g, _) => {
      const S = Bt("mytooltip");
      return y(), E("tr", {
        ref_key: "rowRef",
        ref: n,
        class: Te(["mapping-row", { dirty: T(a), deleted: T(l) }])
      }, [
        u("td", null, [
          u("div", XQ, [
            T(l) ? P((y(), E("div", qQ, _[0] || (_[0] = [
              u("i", { class: "fas fa-trash fa-fw" }, null, -1)
            ]))), [
              [S, "deleted entry", "left"]
            ]) : (y(), E(J, { key: 1 }, [
              T(c) ? P((y(), E("div", JQ, _[1] || (_[1] = [
                u("i", { class: "fas fa-copy fa-fw text-danger" }, null, -1)
              ]))), [
                [S, "this is a duplicate entry", "left"]
              ]) : ae("", !0),
              T(a) ? P((y(), E("div", QQ, _[2] || (_[2] = [
                u("i", { class: "fas fa-edit fa-fw" }, null, -1)
              ]))), [
                [S, "modified entry", "left"]
              ]) : ae("", !0),
              T(r) ? P((y(), E("div", ZQ, _[3] || (_[3] = [
                u("i", { class: "fas fa-circle-plus fa-fw" }, null, -1)
              ]))), [
                [S, "new entry", "left"]
              ]) : ae("", !0)
            ], 64))
          ]),
          F(TQ)
        ]),
        u("td", null, [
          u("div", eZ, [
            F(sO),
            F(oO)
          ])
        ]),
        u("td", null, [
          P(F(UQ, {
            disabled: !T(d)
          }, null, 8, ["disabled"]), [
            [Di, T(d)]
          ])
        ]),
        u("td", null, [
          P(F(KQ, {
            disabled: !T(d)
          }, null, 8, ["disabled"]), [
            [Di, T(d)]
          ])
        ]),
        u("td", tZ, [
          u("div", nZ, [
            u("div", sZ, [
              T(l) ? P((y(), E("button", {
                key: 0,
                type: "button",
                class: "btn btn-outline-success btn-xs",
                onClick: h
              }, _[4] || (_[4] = [
                u("i", { class: "fas fa-refresh fa-fw" }, null, -1)
              ]))), [
                [S, "restore entry", "left"]
              ]) : (y(), E(J, { key: 1 }, [
                P((y(), E("button", {
                  type: "button",
                  class: "btn btn-outline-danger btn-xs",
                  onClick: p
                }, _[5] || (_[5] = [
                  u("i", { class: "fas fa-trash fa-fw" }, null, -1)
                ]))), [
                  [S, "remove entry", "left"]
                ]),
                P((y(), E("button", {
                  type: "button",
                  class: "btn btn-outline-secondary btn-xs",
                  onClick: m
                }, _[6] || (_[6] = [
                  u("i", { class: "fas fa-copy fa-fw" }, null, -1)
                ]))), [
                  [S, "duplicate entry", "left"]
                ])
              ], 64))
            ])
          ])
        ])
      ], 2);
    };
  }
}, rZ = /* @__PURE__ */ he(oZ, [["__scopeId", "data-v-1f453bb2"]]), iZ = { class: "d-flex gap-2 align-items-center" }, aZ = { class: "fw-bold" }, lZ = { class: "ms-auto d-flex gap-2" }, cZ = {
  class: "btn-group ms-auto",
  role: "group",
  "aria-label": "Basic example"
}, uZ = { class: "d-none" }, dZ = { class: "py-2 fw-medium" }, fZ = { class: "d-flex flex-column justify-content-center align-items-center text-center" }, pZ = { class: "text-muted fst-italic" }, hZ = ["href"], mZ = {
  __name: "MappingButtons",
  setup(e) {
    const t = Ie("mapping-service"), n = L(), s = L(), o = L();
    async function i(c) {
      const d = c.target.files, f = d == null ? void 0 : d[0];
      f && (await t.importMappings(f), c.target.value = "");
    }
    const r = () => t.createEntry(), a = async () => {
      o.value = null;
      const c = await t.exportMappings();
      o.value = c, o.value && n.value.show();
    }, l = () => s.value.click();
    return (c, d) => {
      const f = be("b-dialog"), p = Bt("tt");
      return y(), E(J, null, [
        u("div", iZ, [
          P(u("span", aZ, null, 512), [
            [p, void 0, "mapping_table_title"]
          ]),
          u("div", lZ, [
            u("div", cZ, [
              u("button", {
                type: "button",
                class: "btn btn-sm btn-outline-secondary",
                onClick: a
              }, [
                d[1] || (d[1] = u("i", { class: "fas fa-download fa-fw me-1" }, null, -1)),
                P((y(), E("span", null, d[0] || (d[0] = [
                  se("export")
                ]))), [
                  [p, void 0, "export"]
                ])
              ]),
              u("button", {
                type: "button",
                class: "btn btn-sm btn-outline-secondary",
                onClick: l
              }, [
                d[3] || (d[3] = u("i", { class: "fas fa-upload fa-fw me-1" }, null, -1)),
                P((y(), E("span", null, d[2] || (d[2] = [
                  se("import")
                ]))), [
                  [p, void 0, "import"]
                ])
              ])
            ]),
            u("button", {
              type: "button",
              class: "btn btn-sm btn-success",
              onClick: r
            }, [
              d[5] || (d[5] = u("i", { class: "fas fa-list fa-fw me-1" }, null, -1)),
              P((y(), E("span", null, d[4] || (d[4] = [
                se("Add new entry")
              ]))), [
                [p, void 0, "find_more_sources_fields_to_map"]
              ])
            ])
          ])
        ]),
        u("div", uZ, [
          u("input", {
            type: "file",
            ref_key: "uploadRef",
            ref: s,
            onChange: i
          }, null, 544)
        ]),
        (y(), le(Ss, { to: "body" }, [
          F(f, {
            ref_key: "modalRef",
            ref: n,
            "ok-only": "",
            "text-ok": "Close"
          }, {
            title: K(() => [
              P((y(), E("span", dZ, d[6] || (d[6] = [
                se("Mapping Export")
              ]))), [
                [p, void 0, "mappings_export_title"]
              ])
            ]),
            default: K(() => [
              u("div", fZ, [
                P((y(), E("span", null, d[7] || (d[7] = [
                  se("Your data is ready to be downloaded")
                ]))), [
                  [p, void 0, "mappings_export_description"]
                ]),
                P((y(), E("span", pZ, d[8] || (d[8] = [
                  se("record ID and other mapped fields")
                ]))), [
                  [p, void 0, "mappings_export_note"]
                ]),
                u("a", {
                  href: o.value,
                  target: "_blank",
                  class: "d-flex btn btn-outline-secondary flex-column justify-content-center align-items-center"
                }, [
                  d[10] || (d[10] = u("i", { class: "fas fa-file-csv fa-fw fa-5x" }, null, -1)),
                  P((y(), E("span", null, d[9] || (d[9] = [
                    se("download")
                  ]))), [
                    [p, void 0, "mappings_export_download_link"]
                  ])
                ], 8, hZ)
              ])
            ]),
            _: 1
          }, 512)
        ]))
      ], 64);
    };
  }
}, vZ = {
  __name: "UniqueLabelProvider",
  props: {
    label: { type: String, required: !0 },
    index: { type: Number, required: !0 },
    labels: { type: Array, required: !0 }
  },
  setup(e) {
    const t = e, n = I(() => {
      if (t.index === 0)
        return !0;
      const s = t.labels[t.index - 1];
      return t.label !== s;
    });
    return (s, o) => ye(s.$slots, "default", {
      text: n.value ? e.label : null
    });
  }
}, gZ = {
  key: 0,
  class: "px-2 fw-bold"
}, yZ = {
  colspan: "6",
  style: { "background-color": "var(--bs-gray-400)" }
}, _Z = {
  __name: "CategoryHeader",
  props: {
    text: { type: String }
  },
  setup(e) {
    return (t, n) => e.text ? (y(), E("tr", gZ, [
      u("td", yZ, [
        u("span", null, H(e.text), 1)
      ])
    ])) : ae("", !0);
  }
}, bZ = { class: "sticky-top bg-light buttons-wrapper border-top border-start border-end p-2" }, EZ = { class: "table-wrapper" }, SZ = { class: "table table-sm table-bordered table-hover mb-2" }, wZ = {
  __name: "MappingTable",
  setup(e) {
    const t = Ie("mapping-service"), { stores: n } = xe(t), s = (i) => {
      var a, l, c, d;
      const r = ((l = (a = i == null ? void 0 : i.externalSourceFieldData) == null ? void 0 : a.metadata) == null ? void 0 : l.category) ?? "";
      return (d = (c = i == null ? void 0 : i.externalSourceFieldData) == null ? void 0 : c.metadata) == null || d.subcategory, `${r}`;
    }, o = (i) => i.map((r) => s(r));
    return (i, r) => {
      const a = Bt("tt");
      return y(), E("div", null, [
        u("div", bZ, [
          F(mZ)
        ]),
        u("div", EZ, [
          u("table", SZ, [
            u("thead", null, [
              u("tr", null, [
                P(u("th", null, null, 512), [
                  [a, void 0, "mapping_table_header_external_source"]
                ]),
                u("th", null, [
                  P(u("span", null, null, 512), [
                    [a, void 0, "mapping_table_header_event"]
                  ]),
                  r[0] || (r[0] = u("span", null, "/", -1)),
                  P(u("span", null, null, 512), [
                    [a, void 0, "mapping_table_header_field"]
                  ])
                ]),
                P(u("th", null, null, 512), [
                  [a, void 0, "mapping_table_header_date"]
                ]),
                P(u("th", null, null, 512), [
                  [a, void 0, "mapping_table_header_preselect_strategy"]
                ]),
                P(u("th", null, null, 512), [
                  [a, void 0, "mapping_table_header_actions"]
                ])
              ])
            ]),
            u("tbody", null, [
              (y(!0), E(J, null, Ee(T(n), (l, c) => (y(), E(J, {
                key: l._id
              }, [
                F(vZ, {
                  label: s(l),
                  index: c,
                  labels: o(T(n))
                }, {
                  default: K(({ text: d }) => [
                    F(_Z, { text: d }, null, 8, ["text"])
                  ]),
                  _: 2
                }, 1032, ["label", "index", "labels"]),
                F(rZ, {
                  store: l,
                  index: c
                }, null, 8, ["store", "index"])
              ], 64))), 128))
            ])
          ])
        ])
      ]);
    };
  }
}, rO = /* @__PURE__ */ he(wZ, [["__scopeId", "data-v-0423b767"]]), NZ = { class: "record-identifier-panel" }, OZ = { class: "p-2" }, xZ = { class: "fw-bold" }, CZ = { class: "d-block text-muted fst-italic mt-2" }, TZ = { class: "p-2 record-identifier-settings" }, $Z = {
  class: "fw-bold",
  for: "record-identifier-event"
}, kZ = {
  class: "fw-bold",
  for: "record-identifier-field"
}, DZ = {
  __name: "RecordIdentifierPanel",
  setup(e) {
    const t = Ie("mapping-service"), n = I(() => t.recordIdentifierStore);
    return wn("local-mapping-service", n), ht(
      () => n.value.field,
      () => {
        console.log(n.value.field);
      },
      { deep: !0 }
    ), (s, o) => {
      const i = Bt("tt");
      return y(), E("div", NZ, [
        u("div", OZ, [
          P((y(), E("span", xZ, o[0] || (o[0] = [
            se("Record Identifier Field (Required):")
          ]))), [
            [i, void 0, "record_identifier_section_title"]
          ]),
          u("div", null, [
            P(u("span", null, null, 512), [
              [i, void 0, "record_identifier_description"]
            ]),
            u("small", CZ, [
              P((y(), E("span", null, o[1] || (o[1] = [
                se("Adjudication note")
              ]))), [
                [i, void 0, "record_identifier_note"]
              ])
            ])
          ])
        ]),
        u("div", TZ, [
          u("div", null, [
            P(u("label", $Z, null, 512), [
              [i, void 0, "record_identifier_redcap_event_label"]
            ]),
            F(sO)
          ]),
          u("div", null, [
            P(u("label", kZ, null, 512), [
              [i, void 0, "record_identifier_redcap_field_label"]
            ]),
            F(oO)
          ])
        ])
      ]);
    };
  }
}, iO = /* @__PURE__ */ he(DZ, [["__scopeId", "data-v-c070b5b4"]]), IZ = { class: "my-2 rounded border" }, RZ = {
  __name: "MappingPanel",
  setup(e) {
    return (t, n) => (y(), E(J, null, [
      u("div", IZ, [
        F(iO)
      ]),
      F(rO)
    ], 64));
  }
}, AZ = { class: "d-flex justify-content-end gap-2" }, MZ = ["disabled"], PZ = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, VZ = {
  key: 1,
  class: "fas fa-save fa-fw me-2"
}, LZ = ["disabled"], FZ = ["disabled"], Rg = {
  __name: "UnsavedChangesGuard",
  props: {
    checkFn: { type: Function },
    saveFn: { type: Function },
    discardFn: { type: Function }
  },
  setup(e) {
    const t = e, n = L(!1), s = L();
    gM(async (a, l) => t.checkFn() ? await s.value.show() : !0);
    async function o() {
      try {
        return n.value = !0, await t.saveFn(), s.value.hide(!0);
      } finally {
        n.value = !1;
      }
    }
    async function i() {
      return await t.discardFn(), s.value.hide(!0);
    }
    function r() {
      return s.value.hide(!1);
    }
    return (a, l) => {
      const c = be("b-modal"), d = Bt("tt");
      return y(), le(c, {
        ref_key: "confirmDialogRef",
        ref: s
      }, {
        title: K(() => [
          P(u("span", null, null, 512), [
            [d, void 0, "unsaved_changes_warning_title"]
          ])
        ]),
        footer: K(() => [
          u("div", AZ, [
            u("button", {
              type: "button",
              class: "btn btn-primary btn-sm",
              onClick: o,
              disabled: n.value
            }, [
              n.value ? (y(), E("i", PZ)) : (y(), E("i", VZ)),
              P(u("span", null, null, 512), [
                [d, void 0, "unsaved_changes_warning_save_button"]
              ])
            ], 8, MZ),
            u("button", {
              type: "button",
              class: "btn btn-danger btn-sm",
              onClick: i,
              disabled: n.value
            }, [
              l[0] || (l[0] = u("i", { class: "fas fa-trash fa-fw me-2" }, null, -1)),
              P(u("span", null, null, 512), [
                [d, void 0, "unsaved_changes_warning_discard_button"]
              ])
            ], 8, LZ),
            u("button", {
              type: "button",
              class: "btn btn-secondary btn-sm",
              onClick: r,
              disabled: n.value
            }, [
              l[1] || (l[1] = u("i", { class: "fas fa-times-circle fa-fw me-2" }, null, -1)),
              P(u("span", null, null, 512), [
                [d, void 0, "unsaved_changes_warning_cancel_button"]
              ])
            ], 8, FZ)
          ])
        ]),
        default: K(() => [
          u("div", null, [
            P(u("span", null, null, 512), [
              [d, void 0, "unsaved_changes_warning_description"]
            ])
          ])
        ]),
        _: 1
      }, 512);
    };
  }
}, UZ = { open: "" }, jZ = { open: "" }, BZ = { class: "sticky-bottom bg-white p-2 border-top" }, HZ = { class: "d-flex gap-2 justify-content-end" }, YZ = ["disabled"], WZ = ["disabled"], GZ = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, zZ = {
  key: 1,
  class: "fas fa-save fa-fw me-1"
}, KZ = {
  __name: "HomePage",
  setup(e) {
    const t = Dn(), n = Ie("settings-manager-service"), s = Ie("mapping-service"), { isDirty: o, loading: i } = xe(s), { isDirty: r, loading: a } = xe(
      n
    ), l = I(() => i.value || a.value), c = I(() => o.value || r.value), d = async () => {
      const _ = await n.save(), S = await s.save();
      _ && S && (await n.getSettings(), t.toast({ title: "Success", body: "Data saved" }));
    }, f = () => {
      s.reset(), n.reset();
    }, p = d, h = () => c.value, m = () => d(), v = () => f(), g = f;
    return (_, S) => (y(), E(J, null, [
      u("details", UZ, [
        S[2] || (S[2] = u("summary", null, [
          u("span", { class: "fw-bold" }, "Settings")
        ], -1)),
        F(JJ, { class: "my-2" })
      ]),
      u("details", jZ, [
        S[3] || (S[3] = u("summary", null, [
          u("span", { class: "fw-bold" }, "Mappings")
        ], -1)),
        F(RZ)
      ]),
      u("div", BZ, [
        u("div", HZ, [
          u("button", {
            class: "btn btn-sm btn-outline-secondary",
            onClick: S[0] || (S[0] = (...b) => T(g) && T(g)(...b)),
            disabled: !c.value || l.value
          }, S[4] || (S[4] = [
            u("i", { class: "fas fa-refresh fa-fw me-1" }, null, -1),
            u("span", null, "Reset", -1)
          ]), 8, YZ),
          u("button", {
            class: "btn btn-sm btn-primary",
            type: "button",
            disabled: !c.value || l.value,
            onClick: S[1] || (S[1] = (...b) => T(p) && T(p)(...b))
          }, [
            l.value ? (y(), E("i", GZ)) : (y(), E("i", zZ)),
            S[5] || (S[5] = u("span", null, "Save", -1))
          ], 8, WZ)
        ])
      ]),
      F(Rg, {
        checkFn: h,
        saveFn: m,
        discardFn: v
      })
    ], 64));
  }
}, XZ = /* @__PURE__ */ he(KZ, [["__scopeId", "data-v-8e463a15"]]), qZ = { class: "settings-panels" }, JZ = { class: "settings-row" }, QZ = { class: "fw-bold" }, ZZ = { class: "settings-row" }, eee = { class: "fw-bold" }, tee = { class: "settings-row" }, nee = { class: "fw-bold" }, see = { class: "d-flex gap-2 justify-content-end mt-2" }, oee = ["disabled"], ree = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, iee = {
  key: 1,
  class: "fas fa-refresh fa-fw me-1"
}, aee = ["disabled"], lee = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, cee = {
  key: 1,
  class: "fas fa-save fa-fw me-1"
}, uee = {
  __name: "SettingsPage",
  setup(e) {
    const t = Ie("settings-manager-service"), n = I(() => t.isDirty), s = I(() => t.loading), o = () => {
      t.reset();
    }, i = async () => {
      await t.save() && await t.getSettings();
    }, r = i, a = () => n.value, l = i, c = () => t.reset();
    return (d, f) => {
      const p = Bt("tt");
      return y(), E("div", null, [
        u("div", qZ, [
          u("div", JZ, [
            u("div", null, [
              P(u("span", QZ, null, 512), [
                [p, void 0, "preview_fields_title"]
              ]),
              F(KN)
            ]),
            F(XN)
          ]),
          u("div", ZZ, [
            u("div", null, [
              P(u("span", eee, null, 512), [
                [p, void 0, "default_day_offset_title"]
              ]),
              F(QN)
            ]),
            F(ZN)
          ]),
          u("div", tee, [
            u("div", null, [
              P(u("span", nee, null, 512), [
                [p, void 0, "adjudication_method_title"]
              ]),
              F(qN)
            ]),
            F(JN)
          ])
        ]),
        u("div", see, [
          u("button", {
            class: "btn btn-sm btn-outline-secondary",
            onClick: o,
            disabled: s.value || !n.value
          }, [
            s.value ? (y(), E("i", ree)) : (y(), E("i", iee)),
            f[1] || (f[1] = u("span", null, "Reset", -1))
          ], 8, oee),
          u("button", {
            class: "btn btn-sm btn-primary",
            type: "button",
            disabled: s.value || !n.value,
            onClick: f[0] || (f[0] = (...h) => T(r) && T(r)(...h))
          }, [
            s.value ? (y(), E("i", lee)) : (y(), E("i", cee)),
            f[2] || (f[2] = u("span", null, "Save", -1))
          ], 8, aee)
        ]),
        F(Rg, {
          checkFn: a,
          saveFn: T(l),
          discardFn: c
        }, null, 8, ["saveFn"])
      ]);
    };
  }
}, dee = /* @__PURE__ */ he(uee, [["__scopeId", "data-v-27c6691a"]]), fee = { class: "my-2 rounded border" }, pee = { class: "d-flex gap-2 justify-content-end mt-2" }, hee = ["disabled"], mee = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, vee = {
  key: 1,
  class: "fas fa-refresh fa-fw me-1"
}, gee = ["disabled"], yee = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw me-1"
}, _ee = {
  key: 1,
  class: "fas fa-save fa-fw me-1"
}, bee = {
  __name: "MappingPage",
  setup(e) {
    const t = Ie("settings-manager-service"), n = Ie("mapping-service"), { isDirty: s, loading: o } = xe(n), i = async () => {
      await n.save() && await t.getSettings();
    }, r = i, a = () => s.value, l = () => i, c = () => n.reset();
    return (d, f) => (y(), E(J, null, [
      u("div", fee, [
        F(iO)
      ]),
      F(rO),
      f[4] || (f[4] = u("hr", null, null, -1)),
      u("div", pee, [
        u("button", {
          class: "btn btn-sm btn-outline-secondary",
          onClick: f[0] || (f[0] = (...p) => d.onResetClicked && d.onResetClicked(...p)),
          disabled: !T(s) || T(o)
        }, [
          T(o) ? (y(), E("i", mee)) : (y(), E("i", vee)),
          f[2] || (f[2] = u("span", null, "Reset", -1))
        ], 8, hee),
        u("button", {
          class: "btn btn-sm btn-primary",
          type: "button",
          disabled: !T(s) || T(o),
          onClick: f[1] || (f[1] = (...p) => T(r) && T(r)(...p))
        }, [
          T(o) ? (y(), E("i", yee)) : (y(), E("i", _ee)),
          f[3] || (f[3] = u("span", null, "Save", -1))
        ], 8, gee)
      ]),
      F(Rg, {
        checkFn: a,
        saveFn: l,
        discardFn: c
      })
    ], 64));
  }
}, Eee = [
  {
    path: "/",
    component: aJ,
    children: [
      {
        path: "",
        name: "home",
        component: XZ
      },
      {
        path: "settings",
        name: "settings",
        component: dee
      },
      {
        path: "mapping",
        name: "mapping",
        component: bee
      },
      { path: "/:pathMatch(.*)*", component: Uc }
    ]
  }
];
let Du;
const See = () => Du || (Du = Qa({
  // Provide the history implementation to use. We are using the hash history for simplicity here.
  history: Ja(),
  routes: Eee
}), Du), ure = (e) => {
  const t = xn(iJ), n = Bc();
  n.use(qc), t.use(n), t.use(js);
  const s = See();
  t.use(s), t.directive("tt", Hf), t.directive("mytooltip", Tg), t.mount(e);
  const o = t.runWithContext(() => Gq());
  return { app: t, router: s, store: o };
};
let wee = mr();
const Iu = vr(wee, ["pid"], { timeout: 0 }), Xd = {
  getSettings() {
    const e = {
      route: "GlassBreakerController:getSettings"
    };
    return Iu.get("", { params: e });
  },
  getProtectedMrnList() {
    const e = {
      route: "GlassBreakerController:getProtectedMrnList"
    };
    return Iu.get("", { params: e });
  },
  breakTheGlass(e) {
    const t = {
      route: "GlassBreakerController:breakTheGlass"
    }, n = { ...e };
    return Iu.post("", n, { params: t });
  },
  removeMrn(e) {
    const t = {
      route: "GlassBreakerController:removeMrn"
    }, n = { mrn: e };
    return Iu.post("", n, { params: t });
  }
}, Nee = "settings", Oee = "The patient file you are attempting to access is restricted. If you have a clinical/business need to access the patient's file, please enter a reason and password and you may proceed.", pp = /* @__PURE__ */ vn(Nee, () => {
  const e = L(!1), t = L(), n = mt({});
  async function s() {
    try {
      e.value = !0;
      const d = await Xd.getSettings(), f = (d == null ? void 0 : d.data) ?? {}, { translations: p = {} } = f;
      Bf(p), Object.assign(n, f);
    } catch (d) {
      t.value = d;
    } finally {
      e.value = !1;
    }
  }
  const o = I(() => (n == null ? void 0 : n.initialize) ?? null), i = I(
    () => {
      var d;
      return ((d = n == null ? void 0 : n.initialize) == null ? void 0 : d.LegalMessage) ?? Oee;
    }
  ), r = I(() => {
    var d;
    return ((d = n == null ? void 0 : n.initialize) == null ? void 0 : d.Reasons) ?? [];
  }), a = I(() => n.ehrUser), l = I(() => n.userType), c = I(
    () => Array.isArray(n.userTypes) ? n.userTypes : []
  );
  return {
    loading: e,
    error: t,
    settings: n,
    ehrUser: a,
    preferredUserType: l,
    userTypes: c,
    LegalMessage: i,
    Reasons: r,
    initialize: o,
    getSettings: s
  };
}), xee = "patients", Qc = /* @__PURE__ */ vn(xee, () => {
  const e = L(!1), t = L(), n = L([]), s = L([]);
  async function o() {
    try {
      e.value = !0;
      const l = await Xd.getProtectedMrnList(), c = (l == null ? void 0 : l.data) ?? {}, d = (c == null ? void 0 : c.data) ?? [];
      n.value = d;
    } catch (l) {
      t.value = l;
    } finally {
      e.value = !1;
    }
  }
  async function i(l) {
    try {
      e.value = !0;
      const c = await Xd.removeMrn(l);
      return n.value = n.value.filter((d) => d !== l), s.value = s.value.filter((d) => d !== l), c;
    } catch (c) {
      t.value = c;
    } finally {
      e.value = !1;
    }
  }
  function r() {
    s.value = [];
  }
  function a(l) {
    s.value.includes(l) ? s.value = s.value.filter((c) => c !== l) : s.value.push(l);
  }
  return {
    loading: e,
    error: t,
    patients: n,
    selected: s,
    resetSelection: r,
    fetchProtectedPatients: o,
    removeMrn: i,
    toggleSelectMrn: a
  };
}), Cee = "form", aO = /* @__PURE__ */ vn(Cee, () => {
  const e = Qc(), t = Xv({
    mrns: [Ks({ message: "provide at leat one MRN" })],
    password: [Ks({ message: "'password' is required" })],
    UserID: [Ks({ message: "'UserID' is required" })],
    UserIDType: [Ks({ message: "'UserIDType' is required" })],
    Reason: [Ks({ message: "'Reason' is required" })],
    Explanation: [Ks({ message: "'Explanation' is required" })]
  }), n = L(), s = L(!0), o = L(!1), i = L(), r = L([]), a = mt({
    mrns: e.selected,
    password: void 0,
    // BTG specific params matching AcceptDTO
    UserID: void 0,
    UserIDType: void 0,
    Reason: void 0,
    Explanation: void 0
  }), l = async () => {
    try {
      if (r.value = [], o.value = !0, n.value = t(a), n.value.hasErrors()) return;
      const p = await Xd.breakTheGlass({ ...a });
      r.value = p.data, e.resetSelection();
    } catch (p) {
      return i.value = p, i;
    } finally {
      o.value = !1;
    }
  }, c = (p, h) => {
    s.value = !1, p in a ? a[p] = h : console.warn(`Invalid property key: ${p}`), rr(() => {
      s.value = !0;
    });
  }, d = () => n.value = t(a);
  d();
  const f = Za(d, 300);
  return ht(
    a,
    (p, h) => {
      s.value && f();
    },
    { immediate: !0 }
  ), ht(
    () => e.selected,
    (p) => {
      a.mrns = p;
    },
    { immediate: !0 }
  ), {
    loading: o,
    error: i,
    validation: n,
    formData: a,
    results: r,
    runValidation: d,
    updatePropertyWithoutValidation: c,
    submit: l
  };
}), Tee = {
  settings: pp,
  patients: Qc,
  form: aO
}, $ee = () => ({
  ...Object.fromEntries(
    Object.entries(Tee).map(([t, n]) => [t, n()])
  )
}), kee = { class: "table table-bordered table-striped table-hover table-sm" }, Dee = ["checked", "indeterminate", "disabled"], Iee = { class: "d-flex" }, Ree = { class: "ms-auto" }, Aee = ["disabled"], Mee = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw"
}, Pee = {
  key: 1,
  class: "fas fa-refresh fa-fw"
}, Vee = { class: "form-check" }, Lee = ["id", "value"], Fee = { style: { width: "100%" } }, Uee = { class: "d-flex" }, jee = ["for"], Bee = { class: "ms-auto" }, Hee = ["onClick"], Yee = { key: 0 }, Wee = {
  __name: "PatientsList",
  setup(e) {
    const t = Ns(), n = Qc(), { patients: s, selected: o, loading: i } = xe(n), { fetchProtectedPatients: r, toggleSelectMrn: a, removeMrn: l } = n, c = I(() => s.value.length > 0 && o.value.length === s.value.length), d = I(() => o.value.length > 0 && o.value.length < s.value.length), f = () => {
      c.value ? o.value = [] : o.value = [...s.value];
    };
    async function p() {
      await r();
    }
    async function h(m) {
      await t.confirm({
        title: "Confirm Delete",
        body: `Are you sure you want to delete MRN: ${m}?`
      }) && await l(m);
    }
    return Mt(() => {
      r();
    }), (m, v) => (y(), E("table", kee, [
      u("thead", null, [
        u("tr", null, [
          u("th", null, [
            u("input", {
              class: "form-check-input",
              type: "checkbox",
              id: "all-patients",
              checked: c.value,
              indeterminate: d.value,
              disabled: T(s).length === 0,
              onChange: f
            }, null, 40, Dee)
          ]),
          u("th", null, [
            u("div", Iee, [
              v[1] || (v[1] = u("span", null, "MRN", -1)),
              u("div", Ree, [
                u("button", {
                  type: "button",
                  class: "btn btn-sm btn-outline-secondary",
                  onClick: p,
                  disabled: T(i)
                }, [
                  T(i) ? (y(), E("i", Mee)) : (y(), E("i", Pee))
                ], 8, Aee)
              ])
            ])
          ])
        ])
      ]),
      u("tbody", null, [
        (y(!0), E(J, null, Ee(T(s), (g) => (y(), E("tr", { key: g }, [
          u("td", null, [
            u("div", Vee, [
              P(u("input", {
                class: "form-check-input",
                type: "checkbox",
                id: `patient-${g}`,
                value: g,
                "onUpdate:modelValue": v[0] || (v[0] = (_) => lt(o) ? o.value = _ : null)
              }, null, 8, Lee), [
                [_n, T(o)]
              ])
            ])
          ]),
          u("td", Fee, [
            u("div", Uee, [
              u("label", {
                class: "form-check-label",
                for: `patient-${g}`
              }, H(g), 9, jee),
              u("div", Bee, [
                u("button", {
                  type: "button",
                  class: "btn btn-sm btn-outline-danger",
                  onClick: (_) => h(g)
                }, v[2] || (v[2] = [
                  u("i", { class: "fas fa-trash fa-fw" }, null, -1)
                ]), 8, Hee)
              ])
            ])
          ])
        ]))), 128)),
        T(s).length === 0 ? (y(), E("tr", Yee, v[3] || (v[3] = [
          u("td", { colspan: "2" }, "No MRNs", -1)
        ]))) : ae("", !0)
      ])
    ]));
  }
}, Gee = { class: "d-flex flex-column gap-2" }, zee = {
  for: "patients-list",
  class: "form-label"
}, Kee = {
  for: "select-reason",
  class: "form-label"
}, Xee = ["value"], qee = {
  for: "text-explanation",
  class: "form-label"
}, Jee = {
  for: "input-ehr-user",
  class: "form-label"
}, Qee = {
  for: "select-user-type",
  class: "form-label"
}, Zee = ["value"], ete = {
  for: "input-redcap-password",
  class: "form-label"
}, tte = { class: "d-flex justify-content-end mt-2" }, nte = ["disabled"], ste = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw"
}, ote = {
  key: 1,
  class: "fas fa-hammer fa-fw"
}, rte = { class: "table table-sm table-bordered table-hover table-striped" }, ite = {
  __name: "BtgForm",
  setup(e) {
    const t = pp(), n = Qc(), s = aO(), o = L(), { LegalMessage: i, Reasons: r, userTypes: a, ehrUser: l, preferredUserType: c } = xe(t), { formData: d, loading: f, validation: p, results: h } = xe(s), { submit: m, updatePropertyWithoutValidation: v, runValidation: g } = s;
    async function _() {
      await m(), n.fetchProtectedPatients();
    }
    return tn(async () => {
      if (h.value.length === 0) return;
      await o.value.show(), h.value = [];
    }), Mt(() => {
      v("UserID", l.value), v("UserIDType", c.value), g();
    }), (S, b) => {
      const O = be("b-modal"), w = Bt("tt");
      return y(), E("div", null, [
        u("div", Gee, [
          u("div", null, [
            P(u("label", zee, null, 512), [
              [w, void 0, "break_glass_field_patients"]
            ]),
            F(Wee, { id: "patients-list" })
          ]),
          u("div", null, [
            P(u("label", Kee, null, 512), [
              [w, void 0, "break_glass_field_reason"]
            ]),
            P(u("select", {
              class: "form-select form-select-sm",
              "onUpdate:modelValue": b[0] || (b[0] = (N) => T(d).Reason = N),
              id: "select-reason"
            }, [
              b[5] || (b[5] = u("option", { disabled: "" }, "Please select a reason", -1)),
              (y(!0), E(J, null, Ee(T(r), (N) => (y(), E("option", {
                key: N,
                value: N
              }, H(N), 9, Xee))), 128))
            ], 512), [
              [Zt, T(d).Reason]
            ])
          ]),
          u("div", null, [
            P(u("label", qee, null, 512), [
              [w, void 0, "break_glass_field_explanation"]
            ]),
            P(u("textarea", {
              class: "form-control form-control-sm",
              id: "text-explanation",
              rows: "3",
              "onUpdate:modelValue": b[1] || (b[1] = (N) => T(d).Explanation = N)
            }, null, 512), [
              [Ue, T(d).Explanation]
            ])
          ]),
          u("div", null, [
            P(u("label", Jee, null, 512), [
              [w, void 0, "break_glass_field_user"]
            ]),
            P(u("input", {
              type: "text",
              class: "form-control form-control-sm",
              id: "input-ehr-user",
              readonly: "",
              disabled: "",
              "onUpdate:modelValue": b[2] || (b[2] = (N) => T(d).UserID = N)
            }, null, 512), [
              [Ue, T(d).UserID]
            ])
          ]),
          u("div", null, [
            P(u("label", Qee, null, 512), [
              [w, void 0, "break_glass_field_user_type"]
            ]),
            P(u("select", {
              class: "form-select form-select-sm",
              "onUpdate:modelValue": b[3] || (b[3] = (N) => T(d).UserIDType = N),
              id: "select-user-type"
            }, [
              b[6] || (b[6] = u("option", { disabled: "" }, "Please select a user type", -1)),
              (y(!0), E(J, null, Ee(T(a), (N) => (y(), E("option", {
                key: N,
                value: N
              }, H(N), 9, Zee))), 128))
            ], 512), [
              [Zt, T(d).UserIDType]
            ])
          ]),
          u("div", null, [
            P(u("label", ete, null, 512), [
              [w, void 0, "break_glass_field_password"]
            ]),
            P(u("input", {
              type: "password",
              class: "form-control form-control-sm",
              id: "input-redcap-password",
              "onUpdate:modelValue": b[4] || (b[4] = (N) => T(d).password = N)
            }, null, 512), [
              [Ue, T(d).password]
            ])
          ])
        ]),
        u("div", tte, [
          u("button", {
            type: "button",
            class: "btn btn-sm btn-primary",
            onClick: _,
            disabled: T(f) || T(p).hasErrors()
          }, [
            T(f) ? (y(), E("i", ste)) : (y(), E("i", ote)),
            b[7] || (b[7] = u("span", { class: "ms-2" }, "Break The Glass", -1))
          ], 8, nte)
        ]),
        (y(), le(Ss, { to: "body" }, [
          F(O, {
            ref_key: "resultsRef",
            ref: o,
            "ok-only": "",
            size: "xl"
          }, {
            title: K(() => b[8] || (b[8] = [
              se("Response")
            ])),
            default: K(() => [
              u("div", null, [
                u("table", rte, [
                  b[9] || (b[9] = u("thead", null, [
                    u("tr", null, [
                      u("th", null, "MRN"),
                      u("th", null, "Status"),
                      u("th", null, "Details")
                    ])
                  ], -1)),
                  u("tbody", null, [
                    (y(!0), E(J, null, Ee(T(h), (N, C) => (y(), E("tr", { key: C }, [
                      u("td", null, [
                        u("span", null, H(N.mrn), 1)
                      ]),
                      u("td", null, [
                        u("span", null, H(N.status), 1)
                      ]),
                      u("td", null, [
                        u("span", null, H(N.details), 1)
                      ])
                    ]))), 128))
                  ])
                ])
              ])
            ]),
            _: 1
          }, 512)
        ]))
      ]);
    };
  }
}, ate = /* @__PURE__ */ he(ite, [["__scopeId", "data-v-88695837"]]), lte = {
  key: 0,
  class: "alert alert-danger"
}, cte = {
  key: 1,
  class: "alert alert-danger"
}, ute = {
  __name: "InitializeCheck",
  setup(e) {
    const t = pp(), { initialize: n, ehrUser: s } = xe(t);
    return (o, i) => T(n) ? T(s) ? ye(o.$slots, "default", { key: 2 }) : (y(), E("div", cte, i[1] || (i[1] = [
      u("span", { class: "d-block" }, "No EHR user is maped to your REDCap user.", -1),
      u("span", { class: "d-block" }, "Please perform a launch from EHR.", -1)
    ]))) : (y(), E("div", lte, i[0] || (i[0] = [
      u("span", { class: "d-block" }, "There was an error initializing the Break the Glass feature.", -1),
      u("span", { class: "d-block" }, "Please make sure to have a valid access to your EHR system.", -1)
    ])));
  }
}, dte = {
  key: 0,
  class: "alert alert-danger"
}, fte = {
  __name: "ErrorsVisualizer",
  setup(e) {
    const t = L(), n = kg();
    return tn(async () => {
      var o, i;
      if ((o = n.value) == null || o.length, ((i = n.value) == null ? void 0 : i.length) === 0) return;
      const s = t.value;
      s && (await s.show(), UN());
    }), (s, o) => {
      const i = be("b-modal");
      return y(), le(i, {
        ref_key: "modalRef",
        ref: t,
        "ok-only": ""
      }, {
        title: K(() => o[0] || (o[0] = [
          u("span", null, "Error", -1)
        ])),
        default: K(() => [
          (y(!0), E(J, null, Ee(T(n), (r, a) => (y(), E(J, { key: a }, [
            r ? (y(), E("div", dte, H(T(io)(r)), 1)) : ae("", !0)
          ], 64))), 128))
        ]),
        _: 1
      }, 512);
    };
  }
}, pte = { key: 0 }, hte = { key: 1 }, mte = {
  __name: "App",
  setup(e) {
    const t = L(!1), n = pp(), s = Qc(), o = Ie("eventBus");
    return ht(
      () => s.patients,
      () => {
        const i = {
          patients: He(s.patients)
        };
        o.emit("patients-loaded", i);
      },
      { immediate: !0 }
    ), Mt(async () => {
      t.value = !0, await n.getSettings(), t.value = !1;
    }), (i, r) => (y(), E("div", null, [
      t.value ? (y(), E("div", pte, r[0] || (r[0] = [
        u("i", { class: "fas fa-spinner fa-spin fa-fw me-2" }, null, -1),
        u("span", null, "Loading...", -1)
      ]))) : (y(), E("div", hte, [
        F(ute, null, {
          default: K(() => [
            F(ate)
          ]),
          _: 1
        })
      ])),
      (y(), le(Ss, { to: "body" }, [
        F(fte)
      ]))
    ]));
  }
}, dre = (e) => {
  const t = xn(mte), n = Bc();
  n.use(qc), t.use(n), t.use(js), t.use(Dg()), t.directive("tt", Hf), t.directive("mytooltip", Tg), t.mount(e);
  const s = t.runWithContext(() => $ee());
  return { app: t, store: s, eventBus: Ui };
};
let vte = mr();
const Ao = vr(vte, [], { timeout: 0 }), gte = async () => {
  const e = {
    params: {
      route: "EmailUsersController:getSettings"
    }
  };
  return Ao.get("", e);
}, yte = async () => {
  const e = {
    params: {
      route: "EmailUsersController:getQueries"
    }
  };
  return Ao.get("", e);
}, _te = async ({ id: e, query: t, name: n, description: s }) => {
  const o = {
    params: {
      route: "EmailUsersController:saveQuery"
    }
  }, i = { id: e, query: t, name: n, description: s };
  return Ao.post("", i, o);
}, bte = async (e) => {
  const t = {
    params: {
      route: "EmailUsersController:deleteQuery",
      id: e
    }
  };
  return Ao.delete("", t);
}, Ete = async (e, t = 1, n = 50) => {
  const s = {
    params: {
      route: "EmailUsersController:testQuery",
      _page: t,
      _per_page: n
    }
  }, o = { query: e };
  return Ao.post("", o, s);
}, Ste = async (e) => {
  const t = {
    params: {
      route: "EmailUsersController:generateCSV"
    }
  }, n = { query: e };
  return Ao.post("", n, t);
}, wte = async (e = { from, subject, body, query, fromName, cc, bcc }) => {
  const t = {
    params: {
      route: "EmailUsersController:sendEmails"
    }
  };
  return Ao.post("", e, t);
}, Nte = (e, t, n) => {
  const s = {
    params: {
      route: "EmailUsersController:previewMessage"
    }
  }, o = { subject: e, body: t, email: n };
  return Ao.post("", o, s);
}, Ote = async (e = 1, t = 50) => {
  const n = {
    params: {
      route: "EmailUsersController:getMessages",
      _page: e,
      _per_page: t
    }
  };
  return Ao.get("", n);
}, xte = async (e) => {
  const t = {
    params: {
      route: "EmailUsersController:deleteMessage",
      id: e
    }
  };
  return Ao.delete("", t);
}, Cte = "app", Zc = /* @__PURE__ */ vn(Cte, () => {
  const e = L(!1), t = L(!1), n = L(), s = L(), o = L(), i = L(), r = L(), a = L();
  async function l() {
    var c;
    try {
      t.value = !0;
      const d = await gte(), f = (c = d == null ? void 0 : d.data) == null ? void 0 : c.data, {
        lang: p = {},
        user: h = {},
        variables: m = {},
        fieldsConfig: v = []
      } = f;
      s.value = f, o.value = p, i.value = h, r.value = m, a.value = v, Bf(o.value), e.value = !0;
    } catch (d) {
      n.value = d;
    } finally {
      t.value = !1;
    }
  }
  return {
    ready: e,
    loading: t,
    error: n,
    settings: s,
    lang: o,
    user: i,
    variables: r,
    fieldsConfig: a,
    init: l
  };
}), Tte = "email", Xi = /* @__PURE__ */ vn(Tte, () => {
  const e = L(!1), t = L(!1), n = L(), s = L(""), o = L(""), i = L(""), r = L(null), a = L(null), l = L(null), c = I(() => {
    var f, p;
    return !!((f = o.value) != null && f.trim() || (p = i.value) != null && p.trim());
  });
  return {
    ready: e,
    loading: t,
    error: n,
    from: s,
    fromName: r,
    subject: o,
    body: i,
    cc: a,
    bcc: l,
    previewAvailable: c,
    send: async (f) => {
      try {
        return t.value = !0, (await wte({
          from: s.value,
          subject: o.value,
          body: i.value,
          query: f,
          fromName: r.value,
          cc: a.value,
          bcc: l.value
        })).data;
      } catch (p) {
        return n.value = p, !1;
      } finally {
        t.value = !1;
      }
    }
  };
}), $te = "queries", qi = /* @__PURE__ */ vn($te, () => {
  const e = L(!1), t = L(), n = L([]), s = L();
  async function o() {
    var d;
    try {
      e.value = !0;
      const f = await yte(), p = (d = f == null ? void 0 : f.data) == null ? void 0 : d.data;
      n.value = p;
    } catch (f) {
      n.value = [], t.value = f;
    } finally {
      i(), e.value = !1;
    }
  }
  function i() {
    var p;
    if (!((p = s.value) != null && p.id)) return;
    const d = s.value.id, f = n.value.find((h) => h.id == d);
    s.value = f;
  }
  async function r(d) {
    try {
      e.value = !0, await _te(d);
    } catch (f) {
      console.log(f), t.value = f;
    } finally {
      e.value = !1;
    }
  }
  async function a(d) {
    try {
      e.value = !0, await bte(d);
    } catch (f) {
      t.value = f;
    } finally {
      e.value = !1;
    }
  }
  function l(d) {
    return n.value.find((f) => (f == null ? void 0 : f.id) == d);
  }
  function c(d) {
    s.value = d;
  }
  return {
    loading: e,
    error: t,
    list: n,
    selected: s,
    load: o,
    save: r,
    remove: a,
    selectQuery: c,
    getQuery: l
  };
}), kte = "messages", sl = /* @__PURE__ */ vn(kte, () => {
  const e = L(!1), t = L(), n = L([]), s = L(1), o = L(10), i = L(), r = mt({}), a = I(() => (r == null ? void 0 : r.total) ?? 0);
  async function l() {
    var p, h;
    try {
      e.value = !0;
      const m = await Ote(s.value, o.value), v = (p = m == null ? void 0 : m.data) == null ? void 0 : p.data;
      Object.assign(r, ((h = m == null ? void 0 : m.data) == null ? void 0 : h.metadata) ?? {}), n.value = v;
    } catch (m) {
      n.value = [], t.value = m;
    } finally {
      d(), e.value = !1;
    }
  }
  async function c(p) {
    try {
      e.value = !0, await xte(p);
    } catch (h) {
      t.value = h;
    } finally {
      e.value = !1;
    }
  }
  function d() {
    var m;
    if (!((m = i.value) != null && m.id)) return;
    const p = i.value.id, h = n.value.find((v) => v.id == p);
    i.value = h;
  }
  function f(p) {
    i.value = p;
  }
  return {
    loading: e,
    error: t,
    list: n,
    selected: i,
    metadata: r,
    page: s,
    perPage: o,
    total: a,
    load: l,
    remove: c,
    selectMessage: f
  };
}), Dte = "test-query", lO = /* @__PURE__ */ vn(Dte, () => {
  const e = L(!1), t = L(), n = L([]), s = mt({}), o = L(1), i = L(50), r = I(() => (s == null ? void 0 : s.total) ?? 0);
  async function a(c) {
    var d, f;
    try {
      e.value = !0;
      const p = await Ete(c, o.value, i.value);
      return n.value = (d = p == null ? void 0 : p.data) == null ? void 0 : d.data, Object.assign(s, ((f = p == null ? void 0 : p.data) == null ? void 0 : f.metadata) ?? {}), !0;
    } catch (p) {
      return l(), t.value = p, !1;
    } finally {
      e.value = !1;
    }
  }
  function l() {
    o.value = 1, n.value = [], Object.assign(s, {});
  }
  return {
    loading: e,
    error: t,
    list: n,
    metadata: s,
    page: o,
    perPage: i,
    totalUsers: r,
    test: a,
    reset: l
  };
}), Ite = {
  app: Zc,
  email: Xi,
  queries: qi,
  messages: sl,
  testQuery: lO
}, Rte = () => ({
  ...Object.fromEntries(
    Object.entries(Ite).map(([t, n]) => [t, n()])
  )
}), Ate = {
  key: 0,
  class: "alert alert-danger"
}, Mte = {
  __name: "ErrorsVisualizer",
  setup(e) {
    const t = L(), n = kg();
    return tn(async () => {
      var i;
      if ((((i = n.value) == null ? void 0 : i.length) ?? 0) === 0) return;
      const o = t.value;
      o && (await o.show(), UN());
    }), (s, o) => {
      const i = be("b-modal");
      return y(), le(i, {
        ref_key: "modalRef",
        ref: t,
        "ok-only": ""
      }, {
        title: K(() => o[0] || (o[0] = [
          u("span", null, "Error", -1)
        ])),
        default: K(() => [
          (y(!0), E(J, null, Ee(T(n), (r, a) => (y(), E(J, { key: a }, [
            r ? (y(), E("div", Ate, H(T(io)(r)), 1)) : ae("", !0)
          ], 64))), 128))
        ]),
        _: 1
      }, 512);
    };
  }
}, Pte = {
  key: 0,
  class: "p-2"
}, Vte = {
  __name: "App",
  setup(e) {
    const t = Zc(), n = Xi(), s = qi(), o = sl(), i = L(!1), { user: r } = xe(t);
    return Mt(async () => {
      var a, l;
      i.value = !0, await t.init(), n.from = ((l = (a = r.value) == null ? void 0 : a.emails) == null ? void 0 : l.at(0)) ?? "", await s.load(), await o.load(), i.value = !1;
    }), (a, l) => {
      const c = be("router-view");
      return y(), E("div", null, [
        i.value ? (y(), E("div", Pte, l[0] || (l[0] = [
          u("i", { class: "fas fa-spinner fa-spin fa-fw" }, null, -1),
          u("span", { class: "ms-1" }, "Loading", -1)
        ]))) : (y(), le(c, { key: 1 })),
        (y(), le(Ss, { to: "body" }, [
          F(Mte)
        ]))
      ]);
    };
  }
}, Lte = /* @__PURE__ */ he(Vte, [["__scopeId", "data-v-02d82a46"]]), Fte = { class: "nav nav-tabs w-100 border-bottom mb-3" }, Ute = {
  __name: "MainMenu",
  setup(e) {
    const t = L([
      {
        label: "Compose Message",
        route: "/",
        icon: "fas fa-envelope fa-fw"
      },
      {
        label: "Message History",
        route: "/messages",
        icon: "fas fa-clock-rotate-left fa-fw"
      }
    ]), n = Pc(), s = (o) => typeof o == "string" ? n.path === o : o.name ? n.name === o.name : o.path ? n.path === o.path : !1;
    return (o, i) => {
      const r = be("router-link");
      return y(), E("ul", Fte, [
        (y(!0), E(J, null, Ee(t.value, (a) => (y(), E("li", {
          key: a.route,
          class: "nav-item"
        }, [
          F(r, {
            to: a.route,
            class: Te(["nav-link", { active: s(a.route) }]),
            "exact-active-class": "active",
            "aria-current": "page"
          }, {
            default: K(() => [
              a.icon ? (y(), E("i", {
                key: 0,
                class: Te([a.icon, "me-1"])
              }, null, 2)) : ae("", !0),
              se(" " + H(a.label), 1)
            ]),
            _: 2
          }, 1032, ["to", "class"])
        ]))), 128))
      ]);
    };
  }
}, jte = {
  key: 1,
  class: "overlay-container"
}, Bte = { class: "overlay-page" }, Hte = { key: 2 }, Yte = {
  __name: "MainLayout",
  setup(e) {
    const t = Pc();
    return (n, s) => {
      const o = be("RouterView"), i = be("router-view");
      return y(), E("div", null, [
        T(t).meta.hideMenu ? ae("", !0) : (y(), le(Ute, {
          key: 0,
          class: "mt-2"
        })),
        T(t).meta.overlay ? (y(), E("div", jte, [
          u("div", Bte, [
            F(o)
          ])
        ])) : (y(), E("div", Hte, [
          F(i)
        ]))
      ]);
    };
  }
}, Wte = /* @__PURE__ */ he(Yte, [["__scopeId", "data-v-92ef9ea4"]]), Gte = ["value"], zte = ["value"], Kte = {
  __name: "QuerySelect",
  setup(e) {
    const t = L(Symbol()), n = qi(), { list: s, selected: o } = xe(n), i = I({
      get: () => {
        var r;
        return ((r = o.value) == null ? void 0 : r.id) || t.value;
      },
      set: (r) => {
        if (r === t.value) {
          o.value = null;
          return;
        }
        const a = n.getQuery(r);
        o.value = a;
      }
    });
    return (r, a) => P((y(), E("select", {
      class: "form-select form-select-sm",
      "onUpdate:modelValue": a[0] || (a[0] = (l) => i.value = l)
    }, [
      u("option", { value: t.value }, "[" + H(T(es)("email_users_156") ?? "All users...") + "]", 9, Gte),
      (y(!0), E(J, null, Ee(T(s), ({ id: l, name: c }, d) => (y(), E("option", {
        key: `${l}-${c}`,
        value: l
      }, H(c), 9, zte))), 128))
    ], 512)), [
      [Zt, i.value]
    ]);
  }
}, Xte = { class: "table table-sm table-striped table-hover table-bordered" }, qte = { key: 0 }, Jte = { class: "d-flex gap-2 align-items-center" }, Qte = { key: 0 }, Zte = { class: "d-flex" }, ene = ["onClick", "disabled"], tne = { class: "fw-bold" }, nne = { class: "fw-bold" }, sne = { class: "fw-bold" }, one = ["innerHTML"], rne = ["innerHTML"], ine = {
  __name: "UsersTable",
  props: {
    users: { type: Array, default: () => [] }
  },
  setup(e) {
    const t = Xi(), { subject: n, body: s, from: o, fromName: i, previewAvailable: r } = xe(t), a = Wr("preview-modal"), l = L(), c = L(""), d = L(""), f = () => {
      l.value = "", c.value = "", d.value = "";
    };
    async function p(h) {
      var m, v;
      try {
        l.value = h;
        const g = await Nte(n.value, s.value, h);
        d.value = ((m = g == null ? void 0 : g.data) == null ? void 0 : m.body) ?? "", c.value = ((v = g == null ? void 0 : g.data) == null ? void 0 : v.subject) ?? "", await a.value.show(), f();
      } catch (g) {
        console.log(g);
      }
    }
    return (h, m) => {
      const v = be("b-modal"), g = Bt("tt");
      return y(), E("table", Xte, [
        m[10] || (m[10] = u("thead", null, [
          u("tr", null, [
            u("th", null, "Username"),
            u("th", null, "First Name"),
            u("th", null, "Last Name"),
            u("th", null, "Email")
          ])
        ], -1)),
        u("tbody", null, [
          e.users.length === 0 ? (y(), E("tr", qte, m[0] || (m[0] = [
            u("td", { colspan: "4" }, [
              u("span", { class: "fst-italic" }, "No Users")
            ], -1)
          ]))) : ae("", !0),
          (y(!0), E(J, null, Ee(e.users, (_, S) => (y(), E("tr", {
            key: `${S}-${_ == null ? void 0 : _.ui_id}`,
            class: Te({ suspended: _.is_suspended })
          }, [
            u("td", null, [
              u("div", Jte, [
                u("span", null, H(_ == null ? void 0 : _.username), 1),
                _.is_suspended ? (y(), E("span", Qte, m[1] || (m[1] = [
                  u("span", null, "(suspended)", -1)
                ]))) : ae("", !0)
              ])
            ]),
            u("td", null, H(_ == null ? void 0 : _.user_firstname), 1),
            u("td", null, H(_ == null ? void 0 : _.user_lastname), 1),
            u("td", null, [
              u("div", Zte, [
                u("span", null, H(_ == null ? void 0 : _.user_email), 1),
                u("button", {
                  type: "text",
                  class: "btn btn-sm btn-light ms-auto",
                  onClick: (b) => p(_ == null ? void 0 : _.user_email),
                  disabled: !T(r)
                }, m[2] || (m[2] = [
                  u("i", { class: "fas fa-file-lines fa-fw text-info" }, null, -1)
                ]), 8, ene)
              ])
            ])
          ], 2))), 128))
        ]),
        (y(), le(Ss, { to: "body" }, [
          F(v, {
            ref: "preview-modal",
            "ok-only": "",
            size: "xl"
          }, {
            title: K(() => [
              P((y(), E("span", null, m[3] || (m[3] = [
                se("Message Preview")
              ]))), [
                [g, void 0, "email_users_157"]
              ])
            ]),
            default: K(() => [
              u("div", null, [
                P(u("span", tne, null, 512), [
                  [g, void 0, "email_users_108"]
                ]),
                m[4] || (m[4] = se(": ")),
                u("span", null, H(T(i) ? `${T(i)} <${T(o)}>` : T(o)), 1)
              ]),
              u("div", null, [
                P((y(), E("span", nne, m[5] || (m[5] = [
                  se("To")
                ]))), [
                  [g, void 0, "email_users_109"]
                ]),
                m[6] || (m[6] = se(": ")),
                u("span", null, H(l.value), 1)
              ]),
              u("div", null, [
                P((y(), E("span", sne, m[7] || (m[7] = [
                  se("Subject")
                ]))), [
                  [g, void 0, "email_users_10"]
                ]),
                m[8] || (m[8] = se(": ")),
                u("span", { innerHTML: c.value }, null, 8, one)
              ]),
              m[9] || (m[9] = u("hr", null, null, -1)),
              u("div", null, [
                u("div", { innerHTML: d.value }, null, 8, rne)
              ])
            ]),
            _: 1
          }, 512)
        ]))
      ]);
    };
  }
}, ane = /* @__PURE__ */ he(ine, [["__scopeId", "data-v-d11c1b05"]]), lne = {
  __name: "CsvDownloadButton",
  props: {
    query: { type: Object }
  },
  setup(e) {
    const t = e, { query: n } = xe(t), s = L(!1), o = L(), i = Dn(), r = async () => {
      try {
        s.value = !0, o.value = null;
        const l = await Ste(n.value), { data: c } = l;
        o.value = c == null ? void 0 : c.url, i.toast({ title: "Success", body: "CSV file ready. Click download." });
      } catch (l) {
        console.log(l);
      } finally {
        s.value = !1;
      }
    }, a = async () => {
      location.href = o.value, o.value = null;
    };
    return (l, c) => s.value ? (y(), E("button", {
      key: 0,
      type: "button",
      class: "btn btn-sm btn-secondary",
      onClick: a
    }, c[0] || (c[0] = [
      u("i", { class: "fas fa-spinner fa-spin fa-fw me-1" }, null, -1),
      u("span", null, "Loading...", -1)
    ]))) : (y(), E(J, { key: 1 }, [
      o.value ? (y(), E("button", {
        key: 0,
        type: "button",
        class: "btn btn-sm btn-success",
        onClick: a
      }, c[1] || (c[1] = [
        u("i", { class: "fas fa-file-csv fa-fw me-1" }, null, -1),
        u("span", null, "Download", -1)
      ]))) : (y(), E("button", {
        key: 1,
        type: "button",
        class: "btn btn-sm btn-secondary",
        onClick: r
      }, c[2] || (c[2] = [
        u("i", { class: "fas fa-gears fa-fw me-1" }, null, -1),
        u("span", null, "Generate CSV...", -1)
      ])))
    ], 64));
  }
}, cne = ["disabled"], une = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw"
}, dne = {
  key: 1,
  class: "fas fa-vial fa-fw"
}, fne = { class: "users-table" }, pne = {
  key: 0,
  class: "alert alert-warning mt-2 m-0"
}, hne = { class: "my-modal-footer d-flex gap-2 align-items-end w-100" }, mne = { class: "text-muted small" }, vne = { class: "ms-auto d-flex gap-2" }, gne = ["onClick"], yne = {
  __name: "TestQueryButton",
  props: {
    query: { type: Object }
  },
  setup(e) {
    const t = lO(), n = Xi(), s = Wr("users-modal"), o = e, { query: i } = xe(o), { previewAvailable: r } = xe(n), { loading: a, list: l, page: c, perPage: d, metadata: f, totalUsers: p } = xe(t), h = async () => await t.test(i.value), m = async () => {
      t.reset(), await h() && await s.value.show();
    };
    return ht(c, () => {
      h();
    }), (v, g) => {
      const _ = be("b-pagination"), S = be("b-modal"), b = Bt("tt");
      return y(), E("button", On({
        type: "button",
        class: "btn btn-sm btn-outline-success",
        disabled: T(a),
        onClick: m
      }, { ...v.$attrs }), [
        T(a) ? (y(), E("i", une)) : (y(), E("i", dne)),
        ye(v.$slots, "default", {}, void 0, !0),
        (y(), le(Ss, { to: "body" }, [
          F(S, {
            ref: "users-modal",
            size: "xl",
            "ok-only": ""
          }, {
            title: K(() => [
              P(u("span", null, null, 512), [
                [b, void 0, "email_users_144"]
              ])
            ]),
            footer: K(({ hide: O }) => {
              var w;
              return [
                u("div", hne, [
                  u("div", null, [
                    u("div", mne, [
                      P(u("span", null, null, 512), [
                        [b, void 0, "email_users_145"]
                      ]),
                      u("span", null, ": " + H(((w = T(f)) == null ? void 0 : w.total) ?? 0), 1)
                    ]),
                    F(_, {
                      modelValue: T(c),
                      "onUpdate:modelValue": g[0] || (g[0] = (N) => lt(c) ? c.value = N : null),
                      totalItems: T(p),
                      perPage: T(d),
                      size: "sm"
                    }, null, 8, ["modelValue", "totalItems", "perPage"])
                  ]),
                  u("div", vne, [
                    F(lne, { query: T(i) }, null, 8, ["query"]),
                    u("button", {
                      type: "button",
                      class: "btn btn-sm btn-primary",
                      onClick: O
                    }, "OK", 8, gne)
                  ])
                ])
              ];
            }),
            default: K(() => [
              u("div", fne, [
                F(ane, { users: T(l) }, null, 8, ["users"])
              ]),
              T(r) ? ae("", !0) : (y(), E("div", pne, g[1] || (g[1] = [
                u("span", { class: "fw-bold" }, "Please note:", -1),
                se(" preview is only available when "),
                u("span", { class: "fst-italic" }, "subject", -1),
                se(" or "),
                u("span", { class: "fst-italic" }, "body", -1),
                se(" are defined ")
              ])))
            ]),
            _: 1
          }, 512)
        ]))
      ], 16, cne);
    };
  }
}, cO = /* @__PURE__ */ he(yne, [["__scopeId", "data-v-260653a6"]]), _ne = { class: "d-flex gap-2" }, bne = { class: "input-group input-group-sm" }, Ene = { class: "input-group-text" }, Sne = ["disabled", "title"], wne = ["title"], Nne = {
  __name: "QueryToolbar",
  setup(e) {
    const t = co(), n = qi(), { selected: s } = xe(n), o = () => {
      t.push({ name: "filter-new" });
    }, i = () => {
      var r;
      t.push({ name: "filter-edit", params: { id: (r = s.value) == null ? void 0 : r.id } });
    };
    return (r, a) => {
      var c;
      const l = Bt("tt");
      return y(), E("div", _ne, [
        u("div", bne, [
          u("span", Ene, [
            ye(r.$slots, "label", {}, () => [
              P((y(), E("span", null, a[0] || (a[0] = [
                se("query")
              ]))), [
                [l, void 0, "email_users_143"]
              ])
            ])
          ]),
          F(Kte),
          u("button", {
            type: "button",
            class: "btn btn-sm btn-outline-secondary",
            disabled: !T(s),
            onClick: i,
            title: T(es)("email_users_138")
          }, a[1] || (a[1] = [
            u("i", { class: "fas fa-edit fa-fw" }, null, -1)
          ]), 8, Sne),
          F(cO, {
            query: (c = T(s)) == null ? void 0 : c.query,
            title: T(es)("email_users_140")
          }, null, 8, ["query", "title"]),
          u("button", {
            type: "button",
            class: "btn btn-sm btn-outline-primary",
            onClick: o,
            title: T(es)("email_users_139")
          }, a[2] || (a[2] = [
            u("i", { class: "fas fa-plus fa-fw" }, null, -1)
          ]), 8, wne)
        ])
      ]);
    };
  }
};
function uO(e, t, n) {
  return n < 0 ? t + e : n > e.length ? e + t : e.slice(0, n) + t + e.slice(n);
}
const One = {
  __name: "BodyTextarea",
  props: {
    modelValue: { type: String, default: "" },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(e, { expose: t }) {
    const n = Ie("eventBus"), s = mn(e, "modelValue"), o = Wr("body-textarea"), i = L(0);
    function r() {
      var d;
      i.value = ((d = o.value) == null ? void 0 : d.selectionStart) ?? 0;
    }
    function a(d) {
      var p;
      const f = (p = d == null ? void 0 : d.target) == null ? void 0 : p.value;
      if (f == null) throw new Error("Error getting the message value");
      s.value = f;
    }
    const l = () => {
      var f;
      return (f = window == null ? void 0 : window.tinymce) == null ? void 0 : f.activeEditor;
    };
    function c(d) {
      const f = `[${d}]`, p = l();
      if (p) {
        p == null || p.insertContent(f);
        const h = p.getContent();
        s.value = h;
      } else {
        const h = i.value, m = (s == null ? void 0 : s.value) ?? "", v = uO(
          m,
          f,
          h
        );
        s.value = v;
      }
    }
    return Mt(() => {
      try {
        typeof window.initTinyMCEglobal == "function" && window.initTinyMCEglobal("vue-mceditor", !1);
      } catch (d) {
        console.log(d);
      }
      n.emit("body-textarea-ready", { element: o.value });
    }), t({ insertDynamicVariable: c }), (d, f) => P((y(), E("textarea", On({
      "onUpdate:modelValue": f[0] || (f[0] = (p) => s.value = p),
      ref: "body-textarea",
      class: "vue-mceditor",
      rows: "10",
      onInput: a,
      onBlur: r
    }, d.$attrs, { required: "" }), null, 16)), [
      [Ue, s.value]
    ]);
  }
}, xne = ["id"], Cne = ["aria-labelledby"], Tne = {
  __name: "DropdownMenu",
  props: {
    label: {
      type: String,
      default: "Dropdown"
    },
    buttonVariant: {
      type: String,
      default: "primary"
    },
    buttonClass: {
      type: String,
      default: ""
    },
    alignRight: {
      type: Boolean,
      default: !1
    },
    id: {
      type: String,
      default: () => `dropdown-${Math.random().toString(36).substring(2, 9)}`
    }
  },
  setup(e, { expose: t }) {
    const n = L(!1), s = L(null), o = L(null), i = Ie("parentDropdown", null);
    wn("parentDropdown", {
      closeDropdown: () => {
        n.value = !1;
      }
    });
    const r = (c) => {
      n.value = !n.value, n.value && i && i.closeDropdown();
    }, a = (c) => {
      var d, f;
      !((d = o.value) != null && d.contains(c.target)) && !((f = s.value) != null && f.contains(c.target)) && n.value && (n.value = !1);
    };
    Mt(() => {
      document.addEventListener("click", a);
    }), Wi(() => {
      document.removeEventListener("click", a);
    });
    const l = {
      closeDropdown: a,
      toggleDropdown: r,
      parentDropdown: i,
      isOpen: n,
      close: () => n.value = !1
    };
    return t(l), (c, d) => (y(), E("div", {
      class: Te(["dropdown", { show: n.value }])
    }, [
      u("button", {
        class: Te(["btn dropdown-toggle", [
          e.buttonVariant ? `btn-${e.buttonVariant}` : "btn-primary",
          e.buttonClass
        ]]),
        type: "button",
        onClick: r,
        id: e.id,
        "aria-expanded": "false",
        ref_key: "toggleButton",
        ref: s
      }, [
        ye(c.$slots, "toggle", {}, () => [
          se(H(e.label), 1)
        ], !0)
      ], 10, xne),
      u("div", {
        class: Te(["dropdown-menu", { show: n.value, "dropdown-menu-end": e.alignRight }]),
        "aria-labelledby": e.id,
        ref_key: "dropdownMenu",
        ref: o
      }, [
        ye(c.$slots, "default", Ft(Ut({ ...l })), void 0, !0)
      ], 10, Cne)
    ], 2));
  }
}, $ne = /* @__PURE__ */ he(Tne, [["__scopeId", "data-v-575b9e21"]]), kne = ["disabled"], Dne = {
  key: 1,
  class: "dropdown-submenu"
}, Ine = {
  __name: "DropdownItem",
  props: {
    label: {
      type: String,
      default: ""
    },
    isSubmenu: {
      type: Boolean,
      default: !1
    },
    active: {
      type: Boolean,
      default: !1
    },
    disabled: {
      type: Boolean,
      default: !1
    },
    alignRight: {
      type: Boolean,
      default: !1
    }
  },
  emits: ["click"],
  setup(e, { expose: t, emit: n }) {
    const s = e, o = n, i = L(!1), r = L(null), a = L(null), l = Ie("parentDropdown", null), c = (h) => {
      s.disabled || (o("click", h), l && l.closeDropdown());
    }, d = (h) => {
      i.value = !i.value;
    }, f = (h) => {
      var m, v;
      !((m = a.value) != null && m.contains(h.target)) && !((v = r.value) != null && v.contains(h.target)) && i.value && (i.value = !1);
    };
    Mt(() => {
      s.isSubmenu && document.addEventListener("click", f);
    }), Wi(() => {
      s.isSubmenu && document.removeEventListener("click", f);
    });
    const p = {
      parentDropdown: l,
      toggleSubmenu: d,
      closeSubmenu: f,
      closeDropdown: (l == null ? void 0 : l.closeDropdown) ?? (() => ({})),
      close: () => i.value = !i.value
    };
    return t(p), (h, m) => e.isSubmenu ? (y(), E("div", Dne, [
      u("button", {
        class: Te(["dropdown-item dropdown-toggle", { active: e.active, disabled: e.disabled }]),
        onClick: d,
        ref_key: "submenuToggle",
        ref: r
      }, [
        ye(h.$slots, "toggle", Ft(Ut({ ...p })), () => [
          se(H(e.label), 1)
        ], !0)
      ], 2),
      u("div", {
        class: Te(["dropdown-menu", { show: i.value, "dropdown-menu-end": e.alignRight }]),
        ref_key: "submenuContent",
        ref: a
      }, [
        ye(h.$slots, "default", Ft(Ut({ ...p })), void 0, !0)
      ], 2)
    ])) : (y(), E("button", {
      key: 0,
      class: Te(["dropdown-item", { active: e.active, disabled: e.disabled }]),
      disabled: e.disabled,
      onClick: c
    }, [
      ye(h.$slots, "default", Ft(Ut({ ...p })), void 0, !0)
    ], 10, kne));
  }
}, Tb = /* @__PURE__ */ he(Ine, [["__scopeId", "data-v-1c9fcb56"]]), $b = {
  __name: "DynamicVariables",
  emits: ["click"],
  setup(e, { emit: t }) {
    const n = Zc(), { variables: s } = xe(n), o = t;
    function i(r) {
      o("click", r);
    }
    return (r, a) => (y(), le($ne, {
      label: "Dynamic Variables",
      buttonVariant: "outline-primary",
      buttonClass: "btn-xs"
    }, {
      default: K(() => [
        (y(!0), E(J, null, Ee(T(s), (l, c) => (y(), le(Tb, {
          key: c,
          label: c,
          isSubmenu: ""
        }, {
          default: K(() => [
            (y(!0), E(J, null, Ee(l, (d, f) => (y(), le(Tb, {
              onClick: (p) => i(d)
            }, {
              default: K(() => [
                se(H(f), 1)
              ]),
              _: 2
            }, 1032, ["onClick"]))), 256))
          ]),
          _: 2
        }, 1032, ["label"]))), 128))
      ]),
      _: 1
    }));
  }
}, Rne = {
  __name: "SubjectInput",
  props: {
    modelValue: { type: String },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(e, { expose: t }) {
    const n = mn(e, "modelValue"), s = L(0);
    function o(r) {
      var a;
      s.value = ((a = r.target) == null ? void 0 : a.selectionStart) ?? 0;
    }
    function i(r) {
      n.value = uO(n.value, `[${r}]`, s.value);
    }
    return t({ insertDynamicVariable: i }), (r, a) => P((y(), E("input", {
      type: "text",
      class: "form-control form-control-sm",
      "onUpdate:modelValue": a[0] || (a[0] = (l) => n.value = l),
      onBlur: o,
      required: ""
    }, null, 544)), [
      [Ue, n.value]
    ]);
  }
}, Ane = { class: "email-properties d-flex flex-column gap-2" }, Mne = { class: "mb-2" }, Pne = {
  for: "email-from",
  class: "form-label"
}, Vne = { class: "d-flex gap-2" }, Lne = ["placeholder"], Fne = ["value"], Une = { class: "mb-2" }, jne = { class: "d-flex gap-2 align-items-center" }, Bne = {
  for: "email-to",
  class: "form-label"
}, Hne = { class: "small text-muted" }, Yne = { class: "mb-2" }, Wne = { class: "d-flex gap-2" }, Gne = {
  for: "email-subject",
  class: "form-label"
}, zne = { class: "d-flex gap-2" }, Kne = {
  for: "email-body",
  class: "form-label"
}, Xne = {
  __name: "EmailPanel",
  setup(e) {
    const t = Xi(), n = Zc(), { from: s, subject: o, body: i, fromName: r } = xe(t), { user: a } = xe(n), l = I(() => {
      var h;
      return ((h = a.value) == null ? void 0 : h.emails) ?? [];
    }), c = Wr("body-textarea");
    function d(h) {
      c.value && typeof c.value.insertDynamicVariable == "function" && c.value.insertDynamicVariable(h);
    }
    const f = Wr("subject-input");
    function p(h) {
      f.value && typeof f.value.insertDynamicVariable == "function" && f.value.insertDynamicVariable(h);
    }
    return (h, m) => {
      const v = Bt("tt");
      return y(), E("div", Ane, [
        u("div", Mne, [
          P((y(), E("label", Pne, m[4] || (m[4] = [
            se("From")
          ]))), [
            [v, void 0, "email_users_108"]
          ]),
          u("div", Vne, [
            P(u("input", {
              type: "text",
              id: "display-name",
              class: "form-control form-control-sm",
              placeholder: T(es)("email_users_151"),
              "onUpdate:modelValue": m[0] || (m[0] = (g) => lt(r) ? r.value = g : null)
            }, null, 8, Lne), [
              [Ue, T(r)]
            ]),
            P(u("select", {
              class: "form-select form-select-sm flex-grow-1",
              "onUpdate:modelValue": m[1] || (m[1] = (g) => lt(s) ? s.value = g : null)
            }, [
              (y(!0), E(J, null, Ee(l.value, (g, _) => (y(), E("option", { value: g }, H(g), 9, Fne))), 256))
            ], 512), [
              [Zt, T(s)]
            ])
          ])
        ]),
        u("div", Une, [
          u("div", jne, [
            P((y(), E("label", Bne, m[5] || (m[5] = [
              se("To")
            ]))), [
              [v, void 0, "email_users_109"]
            ]),
            u("span", Hne, [
              m[6] || (m[6] = se("[")),
              P(u("span", null, null, 512), [
                [v, void 0, "email_users_137"]
              ]),
              m[7] || (m[7] = se("]"))
            ])
          ]),
          F(Nne)
        ]),
        u("div", Yne, [
          u("div", Wne, [
            P((y(), E("label", Gne, m[8] || (m[8] = [
              se("Subject")
            ]))), [
              [v, void 0, "email_users_10"]
            ]),
            F($b, { onClick: p })
          ]),
          F(Rne, {
            ref: "subject-input",
            modelValue: T(o),
            "onUpdate:modelValue": m[2] || (m[2] = (g) => lt(o) ? o.value = g : null)
          }, null, 8, ["modelValue"])
        ]),
        u("div", null, [
          u("div", zne, [
            P(u("label", Kne, null, 512), [
              [v, void 0, "email_users_114"]
            ]),
            F($b, { onClick: d })
          ]),
          F(One, {
            class: "form-control",
            modelValue: T(i),
            "onUpdate:modelValue": m[3] || (m[3] = (g) => lt(i) ? i.value = g : null),
            ref: "body-textarea"
          }, null, 8, ["modelValue"])
        ])
      ]);
    };
  }
}, qne = /* @__PURE__ */ he(Xne, [["__scopeId", "data-v-bbf29bb4"]]), Jne = ["disabled"], Qne = {
  key: 0,
  class: "fas fa-spin fa-spinner fa-fw"
}, Zne = {
  key: 1,
  class: "fas fa-envelope fa-fw"
}, ese = { class: "ms-1" }, tse = { class: "d-flex flex-column gap-2 confirmation-data" }, nse = { for: "from" }, sse = ["value"], ose = { key: 0 }, rse = { for: "fromName" }, ise = ["value"], ase = { for: "subject" }, lse = ["value"], cse = { for: "body" }, use = {
  class: "form-control form-control-sm",
  readonly: ""
}, dse = {
  __name: "SendButton",
  setup(e) {
    const t = Dn(), n = qi(), s = Xi(), o = sl(), i = L(!1), r = Wr("confirmation-modal"), { selected: a } = xe(n), { from: l, subject: c, body: d, fromName: f } = xe(s), p = (g) => window.filter_tags ? window.filter_tags(g) : g, h = I(() => {
      var S, b;
      const g = p(((S = c.value) == null ? void 0 : S.trim()) ?? null), _ = p(((b = d.value) == null ? void 0 : b.trim()) ?? null);
      return a.value, g && _;
    }), m = async () => {
      var g;
      try {
        i.value = !0;
        const _ = (g = a.value) == null ? void 0 : g.query;
        await s.send(_), t.toast({ title: "Success", body: "Scheduled" });
      } finally {
        i.value = !1;
      }
    }, v = async () => {
      await r.value.show() && (await m(), await o.load());
    };
    return (g, _) => {
      const S = be("b-modal"), b = Bt("tt");
      return y(), E(J, null, [
        u("button", {
          type: "button",
          class: "btn btn-sm btn-primary",
          disabled: !h.value,
          onClick: v
        }, [
          i.value ? (y(), E("i", Qne)) : (y(), E("i", Zne)),
          P((y(), E("span", ese, _[0] || (_[0] = [
            se("Send")
          ]))), [
            [b, void 0, "email_users_158"]
          ])
        ], 8, Jne),
        (y(), le(Ss, { to: "body" }, [
          F(S, { ref: "confirmation-modal" }, {
            title: K(() => [
              P((y(), E("span", null, _[1] || (_[1] = [
                se("Please aaconfirm before sending")
              ]))), [
                [b, void 0, "email_users_131"]
              ])
            ]),
            default: K(() => {
              var O;
              return [
                u("div", tse, [
                  u("div", null, [
                    P((y(), E("label", nse, _[2] || (_[2] = [
                      se("From")
                    ]))), [
                      [b, void 0, "email_users_108"]
                    ]),
                    u("input", {
                      class: "form-control form-control-sm",
                      type: "text",
                      value: T(l),
                      readonly: ""
                    }, null, 8, sse)
                  ]),
                  (O = T(f)) != null && O.trim() ? (y(), E("div", ose, [
                    P((y(), E("label", rse, _[3] || (_[3] = [
                      se("From Name")
                    ]))), [
                      [b, void 0, "email_users_152"]
                    ]),
                    u("input", {
                      class: "form-control form-control-sm",
                      type: "text",
                      value: T(f),
                      readonly: ""
                    }, null, 8, ise)
                  ])) : ae("", !0),
                  u("div", null, [
                    P((y(), E("label", ase, _[4] || (_[4] = [
                      se("Subject")
                    ]))), [
                      [b, void 0, "email_users_10"]
                    ]),
                    u("input", {
                      class: "form-control form-control-sm",
                      type: "text",
                      value: T(c),
                      readonly: ""
                    }, null, 8, lse)
                  ]),
                  u("div", null, [
                    P((y(), E("label", cse, _[5] || (_[5] = [
                      se("Message")
                    ]))), [
                      [b, void 0, "email_users_114"]
                    ]),
                    u("textarea", use, H(T(d)), 1)
                  ])
                ])
              ];
            }),
            _: 1
          }, 512)
        ]))
      ], 64);
    };
  }
}, fse = /* @__PURE__ */ he(dse, [["__scopeId", "data-v-195bbd0e"]]), pse = { class: "p-2 d-flex flex-column gap-2" }, hse = { class: "d-flex gap-2 align-items-center justify-content-end" }, mse = {
  __name: "HomePage",
  setup(e) {
    return (t, n) => {
      const s = be("router-view");
      return y(), E("div", pse, [
        F(qne),
        u("div", hse, [
          F(fse)
        ]),
        F(s)
      ]);
    };
  }
}, $m = Object.freeze({
  AND: "AND",
  AND_NOT: "AND NOT",
  OR: "OR",
  OR_NOT: "OR NOT"
}), dO = Object.freeze({
  EQUAL: { label: "=", value: "EQUAL", query: (e) => `= ${e}` },
  NOT_EQUAL: { label: "!=", value: "NOT_EQUAL", query: (e) => `!= ${e}` },
  LESS_THAN: { label: "<", value: "LESS_THAN", query: (e) => `< ${e}` },
  LESS_THAN_EQUAL: { label: "<=", value: "LESS_THAN_EQUAL", query: (e) => `<= ${e}` },
  GREATER_THAN: { label: ">", value: "GREATER_THAN", query: (e) => `> ${e}` },
  GREATER_THAN_EQUAL: { label: ">=", value: "GREATER_THAN_EQUAL", query: (e) => `>= ${e}` },
  CONTAINS: { label: "contains", value: "CONTAINS", query: (e) => `LIKE '%${e}%'` },
  DOES_NOT_CONTAIN: { label: "does not contain", value: "DOES_NOT_CONTAIN", query: (e) => `NOT LIKE '%${e}%'` },
  BEGINS_WITH: { label: "begins with", value: "BEGINS_WITH", query: (e) => `LIKE '${e}%'` },
  DOES_NOT_BEGIN_WITH: { label: "does not begin with", value: "DOES_NOT_BEGIN_WITH", query: (e) => `NOT LIKE '${e}%'` },
  ENDS_WITH: { label: "ends with", value: "ENDS_WITH", query: (e) => "LIKE '%value'" },
  DOES_NOT_ND_WITH: { label: "does not end with", value: "DOES_NOT_ND_WITH", query: (e) => `NOT LIKE '%${e}'` },
  IS_NULL: { label: "is null", value: "IS_NULL", query: () => "IS NULL" },
  IS_NOT_NULL: { label: "is not null", value: "IS_NOT_NULL", query: () => "IS NOT NULL" },
  IS_EMPTY: { label: "is empty", value: "IS_EMPTY", query: () => "= ''" },
  //(often implies a non-NULL empty string),
  IS_NOT_EMPTY: { label: "is not empty", value: "IS_NOT_EMPTY", query: () => "<> ''" },
  //(and optionally also `IS NOT NULL`, depending on your logic),
  IS_BETWEEN: { label: "is between", value: "IS_BETWEEN", query: (e, t) => `BETWEEN ${e} AND ${t}` },
  IS_NOT_BETWEEN: { label: "is not between", value: "IS_NOT_BETWEEN", query: (e, t) => `NOT BETWEEN ${e} AND ${t}` },
  IS_IN_LIST: { label: "is in list", value: "IS_IN_LIST", query: (e) => `IN (${{ ...e }})` },
  IS_NOT_IN_LIST: { label: "is not in list", value: "IS_NOT_IN_LIST", query: (e) => `NOT IN (${{ ...e }})` }
});
class Yr {
  constructor(t = null, n = null, s = []) {
    this.field = t, this.condition = n, this.values = s, this.type = "rule";
  }
  toJSON() {
    return {
      type: this.type,
      field: this.field,
      condition: this.condition,
      values: this.values
    };
  }
  static fromJSON(t) {
    return new Yr(t == null ? void 0 : t.field, t == null ? void 0 : t.condition, t == null ? void 0 : t.values);
  }
}
class Ba {
  constructor() {
    this.children = [], this.type = "group";
  }
  addChild(t, n = null) {
    this.children.push({ operator: n, node: t });
  }
  removeChild(t) {
    this.children.splice(t, 1);
  }
  toJSON() {
    return {
      type: this.type,
      children: this.children.map((t, n) => ({
        operator: t.operator,
        node: t.node.toJSON()
      }))
    };
  }
  static fromJSON(t) {
    const n = new Ba();
    return t.children.forEach((s) => {
      s.node.type === "rule" ? n.addChild(
        Yr.fromJSON(s.node),
        s.operator
      ) : s.node.type === "group" && n.addChild(
        Ba.fromJSON(s.node),
        s.operator
      );
    }), n;
  }
}
class vse {
  constructor(t) {
    this.qb = t;
  }
  moveNode(t, n, s = null) {
    let o;
    if (n.type === "group")
      o = n;
    else if (o = this.qb.parentMap.get(n), !o)
      throw new Error("Target node is not in any group.");
    if (t === o) return;
    const i = this.qb.parentMap.get(t);
    if (!i)
      throw new Error(
        "Cannot move the root node or a node without a parent."
      );
    const r = i.children.findIndex(
      (l) => l.node === t
    );
    if (r === -1)
      throw new Error("Node not found in its parent's children list.");
    const { operator: a } = i.children[r];
    i.removeChild(r), s === null || s < 0 || s > o.children.length ? o.children.push({ operator: a, node: t }) : o.children.splice(s, 0, { operator: a, node: t }), this.qb.parentMap.set(t, o);
  }
  canBePromoted(t) {
    const n = this.qb.parentMap.get(t);
    return !(!n || !this.qb.parentMap.get(n));
  }
  // move a node to the grandparent if possible
  promoteNode(t) {
    if (!this.canBePromoted(t)) return;
    const n = this.qb.parentMap.get(t), s = this.qb.parentMap.get(n), o = s.children.findIndex(
      (r) => r.node === n
    );
    if (o === -1) {
      console.warn("Parent not found in grandparent's children list.");
      return;
    }
    const i = o;
    this.moveNode(t, s, i);
  }
  canMoveUp(t) {
    const n = this.qb.parentMap.get(t);
    if (!n)
      return !1;
    const o = n.children.findIndex((i) => i.node === t);
    return o === -1 ? !1 : o > 0;
  }
  canMoveDown(t) {
    const n = this.qb.parentMap.get(t);
    if (!n)
      return !1;
    const s = n.children, o = s.findIndex((i) => i.node === t);
    return o === -1 ? !1 : o < s.length - 1;
  }
  moveUp(t) {
    const n = this.qb.parentMap.get(t);
    if (!n) {
      console.warn("Node has no parent (possibly root). Cannot move up.");
      return;
    }
    const o = n.children.findIndex((i) => i.node === t);
    if (o <= 0) {
      console.warn(
        "Node is already at the top or not found. Cannot move up."
      );
      return;
    }
    this.moveNode(t, n, o - 1);
  }
  moveDown(t) {
    const n = this.qb.parentMap.get(t);
    if (!n) {
      console.warn(
        "Node has no parent (possibly root). Cannot move down."
      );
      return;
    }
    const s = n.children, o = s.findIndex((i) => i.node === t);
    if (o === -1 || o === s.length - 1) {
      console.warn(
        "Node is already at the bottom or not found. Cannot move down."
      );
      return;
    }
    this.moveNode(t, n, o + 1);
  }
}
class Bi {
  // key: node (Rule|Group), value: node (parent)
  constructor() {
    qe(this, "autoIncrement", 0);
    // Instead of storing node.id directly, we store them in Maps
    qe(this, "nodeById", /* @__PURE__ */ new Map());
    // key: string ID, value: node (Rule|Group)
    qe(this, "idByNode", /* @__PURE__ */ new Map());
    // key: node (Rule|Group), value: string ID
    qe(this, "parentMap", /* @__PURE__ */ new Map());
    this.root = new Ba(), this.registerNode(this.root, null), this.nodeMover = new vse(this);
  }
  registerNode(t, n) {
    const s = String(++this.autoIncrement);
    this.nodeById.set(s, t), this.idByNode.set(t, s), this.parentMap.set(t, n);
  }
  getNodeId(t) {
    return this.idByNode.get(t) ?? null;
  }
  getNodeById(t) {
    return this.nodeById.get(String(t)) ?? null;
  }
  getNodeParent(t, n = 1) {
    for (; n-- > 0; )
      t = this.parentMap.get(t);
    return t;
  }
  /**
   * Now when you add children, just register them with the parent `Group`.
   */
  addGroup(t = null, n = null) {
    const s = new Ba(), o = n ?? this.root;
    return o.addChild(s, t), this.registerNode(s, o), this.addRule(new Yr(), "AND", s), s;
  }
  addRule({ field: t, condition: n, values: s }, o = null, i = null) {
    const r = new Yr(t, n, s), a = i ?? this.root;
    return a.addChild(r, o), this.registerNode(r, a), r;
  }
  removeNode(t, n = null) {
    n || (n = this.root);
    const s = n.children.findIndex(
      (o) => o.node === t
    );
    if (s !== -1) {
      const o = n.children[s].node;
      if (o.type === "group")
        for (; o.children.length > 0; )
          this.removeNode(o.children[0].node, o);
      n.removeChild(s);
      const i = this.getNodeId(o);
      return this.nodeById.delete(i), this.idByNode.delete(o), this.parentMap.delete(o), o;
    }
    for (const o of n.children)
      if (o.node.type === "group") {
        const i = this.removeNode(t, o.node);
        if (i) return i;
      }
    return null;
  }
  // Delegate moving methods to NodeMover.
  moveNode(t, n, s = null) {
    this.nodeMover.moveNode(t, n, s);
  }
  canBePromoted(t) {
    return this.nodeMover.canBePromoted(t);
  }
  promoteNode(t) {
    this.nodeMover.promoteNode(t);
  }
  canMoveUp(t) {
    return this.nodeMover.canMoveUp(t);
  }
  moveUp(t) {
    this.nodeMover.moveUp(t);
  }
  canMoveDown(t) {
    return this.nodeMover.canMoveDown(t);
  }
  moveDown(t) {
    this.nodeMover.moveDown(t);
  }
  toJSON() {
    return this.root.toJSON();
  }
  static fromJSON(t) {
    const n = new Bi();
    n.root.children = [];
    function s(o, i, r) {
      if (o.type === "rule") {
        const { field: a, condition: l, values: c } = o, d = new Yr(a, l, c);
        n.addRule(d, r, i);
      } else if (o.type === "group") {
        let a;
        i ? a = n.addGroup(r, i) : a = n.root, o.children.forEach((l) => {
          s(l.node, a, l.operator);
        });
      } else
        throw new Error(`Unknown node type: ${o.type}`);
    }
    if (t.type !== "group")
      throw new Error("Top-level JSON must describe a 'group'.");
    return t.children.forEach((o) => {
      s(
        o.node,
        /* parentGroup= */
        null,
        o.operator
      );
    }), n;
  }
}
const gse = { class: "rounded border" }, yse = {
  __name: "TestPage",
  setup(e) {
    const t = {
      type: "group",
      children: [
        {
          operator: "AND",
          node: {
            type: "rule",
            field: "user_email",
            condition: "is not equal",
            value: "past_3_months"
          }
        },
        {
          operator: "AND_NOT",
          node: {
            type: "rule",
            field: "user_expiration_date_TANGE",
            condition: "is between",
            value: null
          }
        }
      ]
    }, n = L(Bi.fromJSON(t));
    return (s, o) => {
      const i = be("router-view");
      return y(), E("div", gse, [
        se(H(n.value) + " ", 1),
        F(i)
      ]);
    };
  }
}, _se = { class: "messages-table table table-sm table-hover table striped table-bordered" }, bse = { key: 0 }, Ese = { class: "d-flex gap-2 align-items-center" }, Sse = ["onClick"], wse = {
  __name: "MessagesTable",
  emits: ["use-message"],
  setup(e, { emit: t }) {
    const n = co();
    Ns();
    const s = Dn(), o = sl(), i = Xi();
    L(!1);
    const { list: r } = xe(o), a = t, l = I(() => r.value || []), c = (p) => p ? p.length > 50 ? p.substring(0, 47) + "..." : p : "", d = (p) => p ? p.replace(/<[^>]*>/g, "") : "", f = (p) => {
      var h, m;
      i.subject = p.subject ?? "", i.body = p.body ?? "", (m = (h = window == null ? void 0 : window.tinymce) == null ? void 0 : h.activeEditor) == null || m.setContent(p.body), a("use-message", p), s.toast({ title: "Success", body: "Message loaded" }), n.push({ name: "home" });
    };
    return (p, h) => (y(), E("table", _se, [
      h[2] || (h[2] = u("thead", null, [
        u("tr", null, [
          u("th", null, "Subject"),
          u("th", null, "Body (truncated)"),
          u("th", null, "Sent By"),
          u("th", null, "Sent At"),
          u("th", null, "Action")
        ])
      ], -1)),
      u("tbody", null, [
        l.value.length === 0 ? (y(), E("tr", bse, h[0] || (h[0] = [
          u("td", { colspan: "5" }, [
            u("span", { class: "fst-italic" }, "No items")
          ], -1)
        ]))) : ae("", !0),
        (y(!0), E(J, null, Ee(l.value, (m) => (y(), E("tr", {
          key: m.id
        }, [
          u("td", null, H(m.subject), 1),
          u("td", null, H(c(d(m.body))), 1),
          u("td", null, H(m.sent_by_username), 1),
          u("td", null, H(m.created_at), 1),
          u("td", null, [
            u("div", Ese, [
              u("button", {
                class: "btn btn-xs btn-light",
                onClick: (v) => f(m)
              }, h[1] || (h[1] = [
                u("i", { class: "fas fa-file-import fa-fw" }, null, -1),
                se(" Re-use ")
              ]), 8, Sse)
            ])
          ])
        ]))), 128))
      ])
    ]));
  }
}, Nse = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw"
}, Ose = {
  key: 1,
  class: "fas fa-refresh fa-fw"
}, xse = {
  __name: "LoadMessagesButton",
  setup(e) {
    const t = sl(), { list: n, loading: s } = xe(t), { load: o } = t;
    return (i, r) => T(n).length > 0 ? (y(), E("button", {
      key: 0,
      class: "btn btn-sm btn-primary",
      onClick: r[0] || (r[0] = (...a) => T(o) && T(o)(...a))
    }, [
      T(s) ? (y(), E("i", Nse)) : (y(), E("i", Ose))
    ])) : ae("", !0);
  }
}, Cse = { class: "p-2" }, Tse = { class: "d-flex gap-2" }, $se = {
  __name: "MessagesPage",
  setup(e) {
    const t = sl(), { page: n, perPage: s, total: o } = xe(t), { load: i } = t;
    return ht(n, () => {
      i();
    }), (r, a) => {
      const l = be("b-pagination");
      return y(), E("div", Cse, [
        u("div", Tse, [
          u("div", null, [
            F(xse)
          ]),
          F(l, {
            modelValue: T(n),
            "onUpdate:modelValue": a[0] || (a[0] = (c) => lt(n) ? n.value = c : null),
            totalItems: T(o),
            perPage: T(s),
            size: "sm",
            class: "mb-2"
          }, null, 8, ["modelValue", "totalItems", "perPage"])
        ]),
        F(wse)
      ]);
    };
  }
}, kse = ["value"], Dse = {
  __name: "SelectValueInput",
  props: /* @__PURE__ */ bs({
    config: { type: Object }
  }, {
    modelValue: { type: Array },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue"), n = I({
      get: () => t.value.at(0) ?? null,
      set: (s) => t.value = [s]
    });
    return (s, o) => {
      var i;
      return P((y(), E("select", {
        class: "form-select form-select-sm",
        "onUpdate:modelValue": o[0] || (o[0] = (r) => n.value = r)
      }, [
        o[1] || (o[1] = u("option", {
          value: "",
          disabled: ""
        }, "Select...", -1)),
        (y(!0), E(J, null, Ee(((i = e.config) == null ? void 0 : i.options) ?? [], (r, a) => (y(), E("option", {
          key: a,
          value: a
        }, H(r), 9, kse))), 128))
      ], 512)), [
        [Zt, n.value]
      ]);
    };
  }
}, Ise = {
  __name: "DateValueInput",
  props: /* @__PURE__ */ bs({
    config: { type: Object }
  }, {
    modelValue: { type: Array },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue"), n = I({
      get: () => t.value.at(0),
      set: (s) => t.value = [s]
    });
    return (s, o) => P((y(), E("input", {
      class: "form-control form-control-sm",
      type: "date",
      "onUpdate:modelValue": o[0] || (o[0] = (i) => n.value = i)
    }, null, 512)), [
      [Ue, n.value]
    ]);
  }
}, Rse = { class: "d-flex gap-2" }, Ase = {
  __name: "DateRangeValueInput",
  props: /* @__PURE__ */ bs({
    config: { type: Object }
  }, {
    modelValue: { type: Array },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue"), n = L(), s = L();
    return ht(t, (o) => {
      const [i, r] = o;
      n.value = i || "", s.value = r || "";
    }, { immediate: !0 }), ht([n, s], () => {
      let o = [];
      n.value && o.push(n.value), s.value && o.push(s.value), t.value = o;
    }), (o, i) => (y(), E("div", Rse, [
      P(u("input", {
        class: "form-control form-control-sm",
        type: "date",
        "onUpdate:modelValue": i[0] || (i[0] = (r) => n.value = r)
      }, null, 512), [
        [Ue, n.value]
      ]),
      P(u("input", {
        class: "form-control form-control-sm",
        type: "date",
        "onUpdate:modelValue": i[1] || (i[1] = (r) => s.value = r)
      }, null, 512), [
        [Ue, s.value]
      ])
    ]));
  }
}, Mse = {
  __name: "StringValueInput",
  props: /* @__PURE__ */ bs({
    config: { type: Object }
  }, {
    modelValue: { type: Array },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue"), n = I({
      get: () => String(t.value ?? ""),
      set: (s) => t.value = [s]
    });
    return (s, o) => P((y(), E("input", {
      class: "form-control form-control-sm",
      type: "search",
      "onUpdate:modelValue": o[0] || (o[0] = (i) => n.value = i)
    }, null, 512)), [
      [Ue, n.value]
    ]);
  }
}, Pse = {
  class: "form-control form-control-sm",
  type: "search",
  disabled: ""
}, Vse = {
  __name: "NullValueInput",
  props: /* @__PURE__ */ bs({
    config: { type: Object }
  }, {
    modelValue: { type: Array },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue");
    return I({
      get: () => null,
      set: (n) => t.value = []
      // always set to empty
    }), (n, s) => (y(), E("input", Pse));
  }
}, Lse = ["value"], Fse = ["disabled"], Use = ["value"], jse = {
  key: 0,
  class: "form-control form-control-sm",
  type: "text",
  disabled: ""
}, Bse = { class: "ms-auto actions d-flex gap-2" }, Hse = ["disabled"], Yse = ["disabled"], Wse = ["disabled"], Gse = {
  __name: "PredefinedRule",
  props: /* @__PURE__ */ bs({
    config: {
      type: Array,
      required: !0
    }
  }, {
    modelValue: {
      type: Object,
      required: !0
    },
    modelModifiers: {}
  }),
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue"), n = e, s = Ie("queryBuilder"), o = I(() => n.config.find((l) => l.name === t.value.field)), i = I(() => o.value ? o.value.conditions || [] : []), r = I(() => {
      var d, f;
      const l = (d = t.value) == null ? void 0 : d.condition;
      return ((f = i.value) == null ? void 0 : f[l]) ?? null;
    });
    ht(
      t,
      () => {
        const l = i.value;
        (!l || !Object.keys(l).includes(t.value.condition)) && (t.value.condition = "");
      },
      { deep: !0 }
    ), ht(
      () => t.value.field,
      (l, c) => {
        t.value.values = [], t.value.condition = null;
      }
    ), ht(
      r,
      (l, c) => {
        (l == null ? void 0 : l.inputType) !== (c == null ? void 0 : c.inputType) && (t.value.values = []);
      }
    );
    function a() {
      s.removeNode(t.value);
    }
    return (l, c) => {
      var d, f, p, h;
      return y(), E("div", {
        class: "rule d-flex gap-2 align-items-end border-start border-2 ps-2",
        key: T(s).getNodeId(t.value)
      }, [
        u("div", null, [
          c[11] || (c[11] = u("label", {
            class: "form-label",
            for: "field"
          }, "Field:", -1)),
          P(u("select", {
            class: "form-select form-select-sm",
            id: "field",
            "onUpdate:modelValue": c[0] || (c[0] = (m) => t.value.field = m)
          }, [
            c[10] || (c[10] = u("option", {
              value: "",
              disabled: ""
            }, "Select...", -1)),
            (y(!0), E(J, null, Ee(e.config, (m) => (y(), E("option", {
              key: m.name,
              value: m.name
            }, H(m.label), 9, Lse))), 128))
          ], 512), [
            [Zt, t.value.field]
          ])
        ]),
        u("div", null, [
          c[13] || (c[13] = u("label", {
            class: "form-label",
            for: "condition"
          }, "Condition:", -1)),
          P(u("select", {
            class: "form-select form-select-sm",
            id: "condition",
            "onUpdate:modelValue": c[1] || (c[1] = (m) => t.value.condition = m),
            disabled: !t.value.field
          }, [
            c[12] || (c[12] = u("option", {
              value: "",
              disabled: ""
            }, "Select...", -1)),
            (y(!0), E(J, null, Ee(i.value, (m, v) => (y(), E("option", {
              key: v,
              value: v
            }, H(v), 9, Use))), 128))
          ], 8, Fse), [
            [Zt, t.value.condition]
          ])
        ]),
        u("div", null, [
          c[14] || (c[14] = u("label", { class: "form-label" }, "Value:", -1)),
          r.value ? ((d = r.value) == null ? void 0 : d.inputType) === "select" ? (y(), le(Dse, {
            key: 1,
            modelValue: t.value.values,
            "onUpdate:modelValue": c[2] || (c[2] = (m) => t.value.values = m),
            config: r.value
          }, null, 8, ["modelValue", "config"])) : ((f = r.value) == null ? void 0 : f.inputType) === "date" ? (y(), le(Ise, {
            key: 2,
            modelValue: t.value.values,
            "onUpdate:modelValue": c[3] || (c[3] = (m) => t.value.values = m),
            config: r.value
          }, null, 8, ["modelValue", "config"])) : ((p = r.value) == null ? void 0 : p.inputType) === "date_range" ? (y(), le(Ase, {
            key: 3,
            modelValue: t.value.values,
            "onUpdate:modelValue": c[4] || (c[4] = (m) => t.value.values = m),
            config: r.value
          }, null, 8, ["modelValue", "config"])) : ((h = r.value) == null ? void 0 : h.inputType) === "null" ? (y(), le(Vse, {
            key: 4,
            modelValue: t.value.values,
            "onUpdate:modelValue": c[5] || (c[5] = (m) => t.value.values = m),
            config: r.value
          }, null, 8, ["modelValue", "config"])) : (y(), le(Mse, {
            key: 5,
            modelValue: t.value.values,
            "onUpdate:modelValue": c[6] || (c[6] = (m) => t.value.values = m),
            config: r.value
          }, null, 8, ["modelValue", "config"])) : (y(), E("input", jse))
        ]),
        u("div", Bse, [
          u("button", {
            onClick: c[7] || (c[7] = (m) => T(s).moveUp(t.value)),
            class: "btn btn-xs btn-light",
            disabled: !T(s).canMoveUp(t.value)
          }, c[15] || (c[15] = [
            u("i", { class: "fas fa-chevron-up fa-fw text-primary" }, null, -1)
          ]), 8, Hse),
          u("button", {
            onClick: c[8] || (c[8] = (m) => T(s).moveDown(t.value)),
            class: "btn btn-xs btn-light",
            disabled: !T(s).canMoveDown(t.value)
          }, c[16] || (c[16] = [
            u("i", { class: "fas fa-chevron-down fa-fw text-primary" }, null, -1)
          ]), 8, Yse),
          u("button", {
            onClick: c[9] || (c[9] = (m) => T(s).promoteNode(t.value)),
            class: "btn btn-xs btn-light",
            disabled: !T(s).canBePromoted(t.value)
          }, c[17] || (c[17] = [
            u("i", { class: "fas fa-arrow-up-from-bracket fa-fw text-primary" }, null, -1)
          ]), 8, Wse),
          u("button", {
            class: "btn btn-xs btn-light",
            type: "button",
            onClick: a
          }, c[18] || (c[18] = [
            u("i", { class: "fas fa-trash fa-fw text-danger" }, null, -1)
          ]))
        ])
      ]);
    };
  }
}, zse = /* @__PURE__ */ he(Gse, [["__scopeId", "data-v-e852c10f"]]), Kse = ["disabled"], Xse = {
  key: 0,
  class: "fas fa-spinner fa-spin fa-fw"
}, qse = {
  key: 1,
  class: "fas fa-save fa-fw"
}, Jse = { class: "ms-1" }, Qse = {
  __name: "SaveQueryButton",
  props: {
    id: { type: String },
    query: { type: Object, required: !0 },
    queryName: { type: String, required: !0 },
    queryDescription: { type: String, required: !0 }
  },
  emits: ["saved"],
  setup(e, { expose: t, emit: n }) {
    const s = e, o = n, i = qi(), r = kg(), a = L(!1), { id: l, query: c, queryName: d, queryDescription: f } = xe(s), p = mt({
      query: { ...c.value },
      name: d.value,
      description: f.value
    }), h = I(() => {
      const g = {
        query: c.value,
        name: d.value,
        description: f.value
      };
      return !lr(p, g);
    }), m = I(
      () => Object.keys(c.value).length > 0 ? h.value && !a.value && d.value.trim() !== "" : !1
    ), v = async () => {
      try {
        a.value = !0;
        const g = {
          id: l.value,
          name: d.value,
          description: f.value,
          query: c.value
        };
        if (await i.save(g), r.value.length > 0) return;
        await i.load(), p.query = g.query, p.name = g.name, p.description = g.description, o("saved", g);
      } finally {
        a.value = !1;
      }
    };
    return t({ isDirty: h }), (g, _) => {
      const S = Bt("tt");
      return y(), E("button", {
        type: "button",
        class: "btn btn-sm btn-primary",
        onClick: v,
        disabled: !m.value
      }, [
        a.value ? (y(), E("i", Xse)) : (y(), E("i", qse)),
        P(u("span", Jse, null, 512), [
          [S, void 0, "email_users_147"]
        ])
      ], 8, Kse);
    };
  }
}, Zse = { class: "d-flex flex-column px-2 gap-0 border rounded" }, eoe = { class: "draggable-group d-flex flex-column" }, toe = ["draggable", "onDragstart", "onDragover", "onDragend", "onDrop"], noe = {
  key: 0,
  class: "operator"
}, soe = { class: "d-flex align-items-center gap-2" }, ooe = { class: "d-flex gap-2 my-2" }, roe = ["disabled"], ioe = ["disabled"], aoe = ["disabled"], loe = {
  __name: "GroupComponent",
  props: {
    modelValue: { type: Object, required: !0 },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(e) {
    const t = L(!1), n = mn(e, "modelValue"), s = Ie("queryBuilder"), o = Ie("componentsRegistry"), i = () => {
      const v = {
        field: null,
        condition: dO.EQUAL.value
      }, g = $m.AND;
      s.addRule(v, g, n.value);
    }, r = () => {
      const v = n.value.children.length > 0 ? $m.AND : null;
      s.addGroup(v, n.value);
    }, a = () => {
      s.removeNode(n.value);
    }, l = (v, g, _) => {
      s.draggedNode = v;
    }, c = (v, g, _) => {
    }, d = (v, g, _) => {
      s.moveNode(s.draggedNode, v, g), s.draggedNode = null;
    }, f = (v, g, _) => {
      const S = s.getNodeParent(v);
      S && (s.moveNode(s.draggedNode, S, g), s.draggedNode = null);
    }, p = (v, g, _) => {
      t.value = !1;
    }, h = () => t.value = !0, m = () => t.value = !1;
    return (v, g) => (y(), E("div", Zse, [
      u("div", eoe, [
        (y(!0), E(J, null, Ee(n.value.children, (_, S) => (y(), E("div", {
          key: T(s).getNodeId(_ == null ? void 0 : _.node),
          class: "child d-flex flex-column gap-2 border-dashed border-2",
          draggable: t.value,
          onDragstart: Vt((b) => l(_.node), ["self"]),
          onDragover: Vt((b) => c(_.node), ["prevent"]),
          onDragend: (b) => p(_.node),
          onDrop: Vt((b) => f(_.node, S), ["stop"])
        }, [
          _.operator && S > 0 ? (y(), E("div", noe, [
            (y(), le(oc(T(o).operatorSelect), {
              modelValue: _.operator,
              "onUpdate:modelValue": (b) => _.operator = b,
              class: "w-auto"
            }, null, 8, ["modelValue", "onUpdate:modelValue"]))
          ])) : ae("", !0),
          u("div", soe, [
            u("span", {
              class: "drag-handle",
              onMousedown: Vt(h, ["stop"]),
              onMouseup: Vt(m, ["stop"])
            }, g[3] || (g[3] = [
              u("i", { class: "fa-solid fa-grip-lines" }, null, -1)
            ]), 32),
            (y(), le(oc(T(o).queryNode), {
              modelValue: _.node,
              "onUpdate:modelValue": (b) => _.node = b,
              onDrop: Vt((b) => d(_.node, S), ["stop"]),
              class: "flex-grow-1 my-2"
            }, null, 40, ["modelValue", "onUpdate:modelValue", "onDrop"]))
          ])
        ], 40, toe))), 128))
      ]),
      u("div", ooe, [
        u("button", {
          class: "btn btn-xs btn-light",
          onClick: i
        }, g[4] || (g[4] = [
          u("i", { class: "fas fa-circle-plus fa-fw text-success" }, null, -1)
        ])),
        u("button", {
          class: "btn btn-xs btn-light",
          onClick: r
        }, g[5] || (g[5] = [
          u("i", { class: "fas fa-folder-plus fa-fw text-success" }, null, -1)
        ])),
        T(s).root !== n.value ? (y(), E(J, { key: 0 }, [
          u("button", {
            onClick: g[0] || (g[0] = (_) => T(s).moveUp(n.value)),
            class: "btn btn-xs btn-light",
            disabled: !T(s).canMoveUp(n.value)
          }, g[6] || (g[6] = [
            u("i", { class: "fas fa-chevron-up fa-fw text-primary" }, null, -1)
          ]), 8, roe),
          u("button", {
            onClick: g[1] || (g[1] = (_) => T(s).moveDown(n.value)),
            class: "btn btn-xs btn-light",
            disabled: !T(s).canMoveDown(n.value)
          }, g[7] || (g[7] = [
            u("i", { class: "fas fa-chevron-down fa-fw text-primary" }, null, -1)
          ]), 8, ioe),
          u("button", {
            onClick: g[2] || (g[2] = (_) => T(s).promoteNode(n.value)),
            class: "btn btn-xs btn-light",
            disabled: !T(s).canBePromoted(n.value)
          }, g[8] || (g[8] = [
            u("i", { class: "fas fa-arrow-up-from-bracket fa-fw text-primary" }, null, -1)
          ]), 8, aoe),
          u("button", {
            class: "btn btn-xs btn-light",
            onClick: a
          }, g[9] || (g[9] = [
            u("i", { class: "fas fa-trash fa-fw text-danger" }, null, -1)
          ]))
        ], 64)) : ae("", !0)
      ])
    ]));
  }
}, coe = /* @__PURE__ */ he(loe, [["__scopeId", "data-v-18617858"]]), uoe = { value: "key" }, doe = {
  __name: "ConditionSelect",
  props: {
    modelValue: { type: String },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue");
    return (n, s) => P((y(), E("select", {
      class: "form-select form-select-sm",
      id: "condition",
      "onUpdate:modelValue": s[0] || (s[0] = (o) => t.value = o)
    }, [
      (y(!0), E(J, null, Ee(T(dO), ({ label: o, value: i }, r) => (y(), E("option", uoe, H(o), 1))), 256))
    ], 512)), [
      [Zt, t.value]
    ]);
  }
}, foe = { class: "border rounded p-2 my-2 d-flex gap-2 align-items-end" }, poe = {
  __name: "RuleComponent",
  props: {
    modelValue: { type: Object },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue"), n = Ie("queryBuilder"), s = () => {
      n.removeNode(t.value);
    };
    return (o, i) => (y(), E("div", foe, [
      u("div", null, [
        i[3] || (i[3] = u("label", {
          class: "form-label",
          for: "field"
        }, "Field:", -1)),
        P(u("input", {
          class: "form-control form-control-sm",
          type: "text",
          id: "field",
          "onUpdate:modelValue": i[0] || (i[0] = (r) => t.value.field = r)
        }, null, 512), [
          [Ue, t.value.field]
        ])
      ]),
      u("div", null, [
        i[4] || (i[4] = u("label", {
          class: "form-label",
          for: "condition"
        }, "Condition:", -1)),
        F(doe, {
          modelValue: t.value.condition,
          "onUpdate:modelValue": i[1] || (i[1] = (r) => t.value.condition = r)
        }, null, 8, ["modelValue"])
      ]),
      u("div", null, [
        i[5] || (i[5] = u("label", {
          class: "form-label",
          for: "value"
        }, "Value:", -1)),
        P(u("input", {
          class: "form-control form-control-sm",
          type: "text",
          id: "value",
          "onUpdate:modelValue": i[2] || (i[2] = (r) => t.value.value = r)
        }, null, 512), [
          [Ue, t.value.value]
        ])
      ]),
      u("div", null, [
        u("button", {
          class: "btn btn-sm btn-danger",
          type: "button",
          onClick: s
        }, i[6] || (i[6] = [
          u("i", { class: "fas fa-trash fa-fw" }, null, -1)
        ]))
      ])
    ]));
  }
}, hoe = /* @__PURE__ */ he(poe, [["__scopeId", "data-v-b0f124ba"]]), moe = {
  __name: "QueryNode",
  props: {
    modelValue: {
      type: Object,
      required: !0
    },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(e) {
    const t = Ie("componentsRegistry"), n = mn(e, "modelValue"), s = I(() => n.value instanceof Yr ? t.rule : n.value instanceof Ba ? t.group : null);
    return (o, i) => (y(), le(oc(s.value), {
      modelValue: n.value,
      "onUpdate:modelValue": i[0] || (i[0] = (r) => n.value = r)
    }, null, 8, ["modelValue"]));
  }
}, voe = ["value"], goe = {
  __name: "OperatorSelect",
  props: {
    modelValue: { type: String, default: "AND" },
    modelModifiers: {}
  },
  emits: ["update:modelValue"],
  setup(e) {
    const t = mn(e, "modelValue");
    return (n, s) => P((y(), E("select", On({
      class: "form-select form-select-sm",
      "onUpdate:modelValue": s[0] || (s[0] = (o) => t.value = o)
    }, n.$attrs), [
      (y(!0), E(J, null, Ee(T($m), (o, i) => (y(), E("option", { value: i }, H(o), 9, voe))), 256))
    ], 16)), [
      [Zt, t.value]
    ]);
  }
}, yoe = { class: "query-builder" }, _oe = {
  __name: "QueryBuilderComponent",
  props: {
    groupComponent: {
      type: Object,
      default: coe
    },
    ruleComponent: {
      type: Object,
      default: hoe
    },
    queryNodeComponent: {
      type: Object,
      default: moe
    },
    operatorSelectionComponent: {
      type: Object,
      default: goe
    },
    queryBuilder: {
      type: Bi,
      default: () => new Bi()
    }
  },
  setup(e) {
    const t = e, n = ma(t.queryBuilder), s = {
      group: t.groupComponent,
      rule: t.ruleComponent,
      queryNode: t.queryNodeComponent,
      operatorSelect: t.operatorSelectionComponent
    };
    return wn("queryBuilder", n.value), wn("componentsRegistry", s), (o, i) => (y(), E("div", yoe, [
      (y(), le(oc(s.group), {
        modelValue: n.value.root,
        "onUpdate:modelValue": i[0] || (i[0] = (r) => n.value.root = r)
      }, null, 8, ["modelValue"]))
    ]));
  }
}, kb = L(null);
function boe() {
  return { beforeCloseRef: kb, setBeforeClose: (t) => {
    kb.value = t;
  } };
}
const Eoe = { class: "d-block" }, Soe = { class: "fw-bold p-2 border-bottom rounded-top bg-light w-100" }, woe = { key: 0 }, Noe = { key: 1 }, Ooe = { class: "px-2 d-flex flex-column gap-2" }, xoe = { class: "form-wrapper" }, Coe = {
  class: "query-properties",
  style: { display: "contents" }
}, Toe = ["placeholder"], $oe = ["placeholder"], koe = { class: "my-2 d-flex gap-2 justify-content-end actions" }, Doe = ["title", "disabled"], Ioe = {
  __name: "QueryManagerPage",
  setup(e) {
    const { setBeforeClose: t } = boe(), n = Zc(), s = qi(), { fieldsConfig: o } = xe(n), i = Wr("save-query-button-reference"), r = Ns(), a = Dn(), l = co(), c = Pc(), d = L(!1), f = L(""), p = L(""), h = I(() => c.params.id ?? null), m = I(() => h.value === null), v = L(C()), g = I(() => {
      var x;
      return ((x = v.value) == null ? void 0 : x.toJSON()) ?? null;
    }), _ = /* @__PURE__ */ Cn({
      name: "PredefinedRuleWrapper",
      inheritAttrs: !1,
      // if you don't want to automatically pass attributes
      setup(x, { attrs: $, slots: M }) {
        return () => yo(zse, {
          ...$,
          // forward any attributes/props
          config: o.value
          // preset our fieldsConfig
        });
      }
    }), S = () => l.push({ name: "home" }), b = () => {
      a.toast({ title: "Success", body: "Query saved" }), S();
    }, O = async () => {
      try {
        d.value = !0;
        const x = h.value;
        x && (await s.remove(x), await s.load()), S();
      } finally {
        d.value = !1;
      }
    }, w = async () => {
      await r.confirm({ title: "Confirm", body: "Are you sure you want to delete this item?" }) && (O(), S());
    };
    function N() {
      f.value = "", p.value = "";
      const x = new Bi();
      return x.addRule(new Yr(), "AND"), x;
    }
    function C() {
      const x = h.value;
      if (!x) return N();
      const $ = s.getQuery(x);
      return $ ? (f.value = $.name, p.value = $.description, Bi.fromJSON($.query)) : N();
    }
    const k = async () => {
      var $;
      return (($ = i.value) == null ? void 0 : $.isDirty) ?? !1 ? await r.confirm({ title: "Confirm", body: "Unsaved changes detected. Are you sure you want to close?" }) : !0;
    };
    return Mt(() => {
      t(k);
    }), fr(() => {
      t(null);
    }), (x, $) => {
      const M = Bt("auto-expand");
      return y(), E("div", Eoe, [
        u("div", Soe, [
          h.value ? (y(), E("span", woe, "Filter " + H(h.value), 1)) : (y(), E("span", Noe, "New Filter"))
        ]),
        u("div", Ooe, [
          u("div", xoe, [
            u("div", Coe, [
              u("div", null, [
                $[2] || ($[2] = u("label", { for: "query-name" }, "Name", -1)),
                P(u("input", {
                  id: "query-name",
                  class: "form-control form-control-sm",
                  type: "text",
                  "onUpdate:modelValue": $[0] || ($[0] = (R) => f.value = R),
                  placeholder: T(es)("email_users_query_name_placeholder")
                }, null, 8, Toe), [
                  [Ue, f.value]
                ])
              ]),
              u("div", null, [
                $[3] || ($[3] = u("label", { for: "query-description" }, "Description", -1)),
                P(u("textarea", {
                  id: "query-description",
                  class: "form-control form-control-sm",
                  "onUpdate:modelValue": $[1] || ($[1] = (R) => p.value = R),
                  placeholder: T(es)("email_users_query_description_placeholder")
                }, null, 8, $oe), [
                  [M, 10],
                  [Ue, p.value]
                ])
              ])
            ]),
            u("div", null, [
              $[4] || ($[4] = u("label", { for: "query-rules" }, "User Filter", -1)),
              F(_oe, {
                id: "query-rules",
                "rule-component": T(_),
                queryBuilder: v.value
              }, null, 8, ["rule-component", "queryBuilder"])
            ])
          ]),
          u("div", koe, [
            m.value ? ae("", !0) : (y(), E("button", {
              key: 0,
              title: T(es)("email_users_142"),
              type: "button",
              class: "btn btn-sm btn-outline-danger",
              onClick: w,
              disabled: d.value
            }, $[5] || ($[5] = [
              u("i", { class: "fas fa-trash fa-fw" }, null, -1),
              u("span", null, "Delete", -1)
            ]), 8, Doe)),
            F(cO, {
              query: g.value,
              title: T(es)("email_users_140")
            }, {
              default: K(() => $[6] || ($[6] = [
                u("span", { class: "ms-1" }, "Test", -1)
              ])),
              _: 1
            }, 8, ["query", "title"]),
            $[8] || ($[8] = u("div", { class: "me-auto" }, null, -1)),
            u("button", {
              type: "button",
              class: "btn btn-sm btn-secondary",
              onClick: S
            }, $[7] || ($[7] = [
              u("i", { class: "fas fa-times fa-fw" }, null, -1),
              u("span", null, "Close", -1)
            ])),
            F(Qse, {
              ref: "save-query-button-reference",
              title: T(es)("email_users_141"),
              id: h.value,
              query: g.value,
              queryName: f.value,
              queryDescription: p.value,
              onSaved: b
            }, null, 8, ["title", "id", "query", "queryName", "queryDescription"])
          ])
        ])
      ]);
    };
  }
}, Db = /* @__PURE__ */ he(Ioe, [["__scopeId", "data-v-5ceaf976"]]), Roe = [
  {
    path: "/",
    component: Wte,
    // redirect: '/inbox',
    children: [
      { path: "", name: "home", component: mse, meta: { breadcrumb: "Compose Message" } },
      // { path: 'query', name: 'query-manager', component: QueryManagerPage },
      {
        path: "filter",
        // component: EmptyComponent,
        children: [
          { path: "", redirect: "new" },
          {
            // Route for creating a new query
            path: "new",
            name: "filter-new",
            component: Db,
            meta: { title: "New Filter", overlay: !0, hideMenu: !0 },
            props: { isNew: !0 }
            // Optional: pass a prop to help distinguish the mode
          },
          {
            // Route for editing an existing query
            path: ":id",
            name: "filter-edit",
            component: Db,
            meta: {
              title: (e) => `Filter ${e.params.id}`,
              overlay: !0,
              hideMenu: !0
            },
            props: !0
            // This passes the route param as a prop, so you can use `props.id` in the component
          }
        ]
      },
      {
        path: "messages",
        name: "messages",
        component: $se,
        meta: { breadcrumb: "Messages" }
      },
      { path: "test", name: "test", component: yse, meta: { breadcrumb: "Test" } }
    ]
  },
  { path: "/:pathMatch(.*)*", component: Uc }
];
let Ru;
const Aoe = () => Ru || (Ru = Qa({
  // Provide the history implementation to use. We are using the hash history for simplicity here.
  history: Ja(),
  routes: Roe
}), Ru), fre = (e) => {
  const t = xn(Lte), n = Aoe(), s = Bc();
  s.use(qc), t.use(s), t.use(js), t.use(Dg()), t.use(n), t.directive("tt", Hf), t.directive("mytooltip", Tg), t.directive("auto-expand", UX), t.mount(e);
  const o = t.runWithContext(() => Rte());
  return { app: t, router: n, store: o, eventBus: Ui };
};
export {
  dre as BreakTheGlass,
  are as CdisSettings,
  lre as CdpAutoAdjudicate,
  ure as CdpMapping,
  sre as Datamart,
  ore as DatamartDesignChecker,
  fre as EmailUsers,
  ire as MappingHelper,
  Zoe as Parcel,
  ere as ParcelBadge,
  tre as QueueMonitor,
  rre as StoreTest
};
//# sourceMappingURL=lib.es.js.map
