@rainte/ant 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { c as R, g as z } from "./index-CmiX7DCw.js";
1
+ import { c as R, g as z } from "./index-S3oUtRj8.js";
2
2
  function $(w, d) {
3
3
  for (var b = 0; b < d.length; b++) {
4
4
  const y = d[b];
@@ -8330,13 +8330,7 @@ const a1 = () => jc.useForm().pop(), l1 = (r) => /* @__PURE__ */ mt.jsx(Wf, { ch
8330
8330
  ) });
8331
8331
  l1.useForm = a1;
8332
8332
  function qx(r) {
8333
- const { items: e, ...t } = { ...r }, n = Qh(), i = ed(), s = {
8334
- onSelectedKeys: () => {
8335
- const a = i.pathname.split("/").filter(Boolean).pop(), u = e == null ? void 0 : e.find((f) => (f == null ? void 0 : f.key) == a);
8336
- return [(u == null ? void 0 : u.key) ?? ""];
8337
- },
8338
- ...t
8339
- };
8333
+ const { items: e, ...t } = { ...r }, n = Qh(), s = ed().pathname.split("/").filter(Boolean).pop(), a = e == null ? void 0 : e.find((f) => (f == null ? void 0 : f.key) == s), u = [(a == null ? void 0 : a.key) ?? ""];
8340
8334
  return /* @__PURE__ */ mt.jsxs(Xi, { style: { height: "100vh" }, children: [
8341
8335
  /* @__PURE__ */ mt.jsxs(Xi.Sider, { children: [
8342
8336
  /* @__PURE__ */ mt.jsx(Zh.Title, { style: { color: "white", textAlign: "center" }, children: "Rainte" }),
@@ -8346,11 +8340,10 @@ function qx(r) {
8346
8340
  mode: "inline",
8347
8341
  theme: "dark",
8348
8342
  items: e,
8349
- defaultSelectedKeys: s.onSelectedKeys(),
8350
- onClick: (a) => n(a.key),
8351
- ...s
8352
- },
8353
- i.pathname
8343
+ defaultSelectedKeys: u,
8344
+ onClick: (f) => n(f.key),
8345
+ ...t
8346
+ }
8354
8347
  )
8355
8348
  ] }),
8356
8349
  /* @__PURE__ */ mt.jsx(Xi, { style: { overflow: "auto" }, children: /* @__PURE__ */ mt.jsx(Xi.Content, { style: { minHeight: "fit-content", padding: "1rem" }, children: /* @__PURE__ */ mt.jsx(
@@ -9830,7 +9823,7 @@ typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObje
9830
9823
  typeof Yr != "function" && (Yr = void 0);
9831
9824
  if (!Yr && !Es && !go)
9832
9825
  try {
9833
- import("./browser-ponyfill-D8EOwrEX.js").then((r) => r.b).then(function(r) {
9826
+ import("./browser-ponyfill-DBE0uybM.js").then((r) => r.b).then(function(r) {
9834
9827
  Yr = r.default;
9835
9828
  }).catch(function() {
9836
9829
  });
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as o, F as r, M as e, P as i, T as d, U as n, a as t, i as l } from "./index-CmiX7DCw.js";
1
+ import { E as o, F as r, M as e, P as i, T as d, U as n, a as t, i as l } from "./index-S3oUtRj8.js";
2
2
  export {
3
3
  o as Editor,
4
4
  r as Form,
@@ -75,7 +75,7 @@ ${Ys(this.code(e,t))}
75
75
  `,{[Ft.blotName]:t}),i.insert(s)),new Re);const n=this.quill.root.ownerDocument.createElement("div");return n.classList.add(Ft.className),n.innerHTML=kb(this.options.hljs,t,e),_a(this.quill.scroll,n,[(i,s)=>{const a=ps.value(i);return a?s.compose(new Re().retain(s.length(),{[_r.blotName]:a})):s}],[(i,s)=>i.data.split(`
76
76
  `).reduce((a,u,f)=>(f!==0&&a.insert(`
77
77
  `,{[Ft.blotName]:t}),a.insert(u)),s)],new WeakMap)}}Sc.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Cs=class Cs extends $t{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",$a()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Cs.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};Ae(Cs,"blotName","table"),Ae(Cs,"tagName","TD");let Yn=Cs;class Nr extends oi{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),n=this.next.children.head.formats(),i=this.next.children.tail.formats();return e.table===t.table&&e.table===n.table&&e.table===i.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const n=t.formats(),i=t.next.formats();if(n.table!==i.table){const s=this.splitAfter(t);s&&s.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}Ae(Nr,"blotName","table-row"),Ae(Nr,"tagName","TR");class lr extends oi{}Ae(lr,"blotName","table-body"),Ae(lr,"tagName","TBODY");class qi extends oi{balanceCells(){const e=this.descendants(Nr),t=e.reduce((n,i)=>Math.max(i.children.length,n),0);e.forEach(n=>{new Array(t-n.children.length).fill(0).forEach(()=>{let i;n.children.head!=null&&(i=Yn.formats(n.children.head.domNode));const s=this.scroll.create(Yn.blotName,i);n.appendChild(s),s.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(lr);t==null||t.children.head==null||t.children.forEach(n=>{const i=n.children.at(e);i!=null&&i.remove()})}insertColumn(e){const[t]=this.descendant(lr);t==null||t.children.head==null||t.children.forEach(n=>{const i=n.children.at(e),s=Yn.formats(n.children.head.domNode),a=this.scroll.create(Yn.blotName,s);n.insertBefore(a,i)})}insertRow(e){const[t]=this.descendant(lr);if(t==null||t.children.head==null)return;const n=$a(),i=this.scroll.create(Nr.blotName);t.children.head.children.forEach(()=>{const a=this.scroll.create(Yn.blotName,n);i.appendChild(a)});const s=t.children.at(e);t.insertBefore(i,s)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}Ae(qi,"blotName","table-container"),Ae(qi,"tagName","TABLE"),qi.allowedChildren=[lr],lr.requiredContainer=qi,lr.allowedChildren=[Nr],Nr.requiredContainer=lr,Nr.allowedChildren=[Yn],Yn.requiredContainer=Nr;function $a(){return`row-${Math.random().toString(36).slice(2,6)}`}let Pb=class extends Wn{static register(){se.register(Yn),se.register(Nr),se.register(lr),se.register(qi)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(qi).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(se.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(se.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(se.sources.USER),this.quill.setSelection(t,se.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,n]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==Yn.blotName)return[null,null,null,-1];const i=t.parent;return[i.parent.parent,i,t,n]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[n,i,s]=this.getTable(t);if(s==null)return;const a=s.cellOffset();n.insertColumn(a+e),this.quill.update(se.sources.USER);let u=i.rowOffset();e===0&&(u+=1),this.quill.setSelection(t.index+u,t.length,se.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[n,i,s]=this.getTable(t);if(s==null)return;const a=i.rowOffset();n.insertRow(a+e),this.quill.update(se.sources.USER),e>0?this.quill.setSelection(t,se.sources.SILENT):this.quill.setSelection(t.index+i.children.length,t.length,se.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const n=this.quill.getSelection();if(n==null)return;const i=new Array(e).fill(0).reduce(s=>{const a=new Array(t).fill(`
78
- `).join("");return s.insert(a,{table:$a()})},new Re().retain(n.index));this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(n.index,se.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(se.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(se.events.TEXT_CHANGE,(n,i,s)=>{s===se.sources.USER&&this.balanceTables()}),!0):!1)})}};const Ac=Ar("quill:toolbar");class Da extends Wn{constructor(e,t){var n,i;if(super(e,t),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),qb(s,this.options.container),(i=(n=e.container)==null?void 0:n.parentNode)==null||i.insertBefore(s,e.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Ac.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var u;const a=(u=this.options.handlers)==null?void 0:u[s];a&&this.addHandler(s,a)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(se.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(i=>i.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Ac.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,i=>{let s;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const u=e.options[e.selectedIndex];u.hasAttribute("selected")?s=!1:s=u.value||!1}else e.classList.contains("ql-active")?s=!1:s=e.value||!e.hasAttribute("value"),i.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,s);else if(this.quill.scroll.query(t).prototype instanceof pn){if(s=prompt(`Enter ${t}`),!s)return;this.quill.updateContents(new Re().retain(a.index).delete(a.length).insert({[t]:s}),se.sources.USER)}else this.quill.format(t,s,se.sources.USER);this.update(a)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[i,s]=n;if(s.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(t[i]==null)a=s.querySelector("option[selected]");else if(!Array.isArray(t[i])){let u=t[i];typeof u=="string"&&(u=u.replace(/"/g,'\\"')),a=s.querySelector(`option[value="${u}"]`)}a==null?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(e==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const a=t[i],u=a===s.getAttribute("value")||a!=null&&a.toString()===s.getAttribute("value")||a==null&&!s.getAttribute("value");s.classList.toggle("ql-active",u),s.setAttribute("aria-pressed",u.toString())}else{const a=t[i]!=null;s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}})}}Da.DEFAULTS={};function Tc(r,e,t){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),t!=null?(n.value=t,n.setAttribute("aria-label",`${e}: ${t}`)):n.setAttribute("aria-label",e),r.appendChild(n)}function qb(r,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(i=>{if(typeof i=="string")Tc(n,i);else{const s=Object.keys(i)[0],a=i[s];Array.isArray(a)?jb(n,s,a):Tc(n,s,a)}}),r.appendChild(n)})}function jb(r,e,t){const n=document.createElement("select");n.classList.add(`ql-${e}`),t.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),n.appendChild(s)}),r.appendChild(n)}Da.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Pe.INLINE)!=null&&this.quill.format(t,!1,se.sources.USER)})}else this.quill.removeFormat(r.index,r.length,se.sources.USER)},direction(r){const{align:e}=this.quill.getFormat();r==="rtl"&&e==null?this.quill.format("align","right",se.sources.USER):!r&&e==="right"&&this.quill.format("align",!1,se.sources.USER),this.quill.format("direction",r,se.sources.USER)},indent(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e),n=parseInt(t.indent||0,10);if(r==="+1"||r==="-1"){let i=r==="+1"?1:-1;t.direction==="rtl"&&(i*=-1),this.quill.format("indent",n+i,se.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,se.sources.USER)},list(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e);r==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,se.sources.USER):this.quill.format("list","unchecked",se.sources.USER):this.quill.format("list",r,se.sources.USER)}}};const Ib='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$b='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Db='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Mb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Bb='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Ub='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Fb='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Kb='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',_c='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',ms={align:{"":Ib,center:$b,right:Db,justify:Mb},background:Bb,blockquote:Ub,bold:Fb,clean:Kb,code:_c,"code-block":_c,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},Hb='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Nc=0;function Cc(r,e){r.setAttribute(e,`${r.getAttribute(e)!=="true"}`)}class io{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Cc(this.label,"aria-expanded"),Cc(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(t,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Hb,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Nc}`,Nc+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n!=null&&n.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class Lc extends io{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=i:n.style.fill=i)}}class Rc extends io{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=t[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const zb=r=>{const{overflowY:e}=getComputedStyle(r,null);return e!=="visible"&&e!=="clip"};class kc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,zb(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let a=0;if(s.right>i.right&&(a=i.right-s.right,this.root.style.left=`${t+a}px`),s.left<i.left&&(a=i.left-s.left,this.root.style.left=`${t+a}px`),s.bottom>i.bottom){const u=s.bottom-s.top,f=e.bottom-e.top+u;this.root.style.top=`${n-f}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Vb=[!1,"center","right","justify"],Wb=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Gb=[!1,"serif","monospace"],Yb=["1","2","3",!1],Jb=["small",!1,"large","huge"];class ys extends Ri{constructor(e,t){super(e,t);const n=i=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),t[s]!=null))if(s==="direction")n.innerHTML=t[s][""]+t[s].rtl;else if(typeof t[s]=="string")n.innerHTML=t[s];else{const a=n.value||"";a!=null&&t[s][a]&&(n.innerHTML=t[s][a])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&bs(i,Vb),typeof t.align=="object"))return new Rc(i,t.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&bs(i,Wb,s==="background"?"#ffffff":"#000000"),new Lc(i,t[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?bs(i,Gb):i.classList.contains("ql-header")?bs(i,Yb):i.classList.contains("ql-size")&&bs(i,Jb)),new io(i)});const n=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Ce.events.EDITOR_CHANGE,n)}}ys.DEFAULTS=Dr({},Ri.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Pc extends kc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,Ce.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,Ce.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=Zb(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,Ce.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",Ce.sources.USER),this.quill.setSelection(n+2,Ce.sources.USER)}break}}this.textbox.value="",this.hide()}}function Zb(r){let e=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:r}function bs(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const i=document.createElement("option");n===t?i.setAttribute("selected","selected"):i.setAttribute("value",String(n)),r.appendChild(i)})}const Xb=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class qc extends Pc{constructor(e,t){super(e,t),this.quill.on(Ce.events.EDITOR_CHANGE,(n,i,s,a)=>{if(n===Ce.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===Ce.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const u=this.quill.getLines(i.index,i.length);if(u.length===1){const f=this.quill.getBounds(i);f!=null&&this.position(f)}else{const f=u[u.length-1],d=this.quill.getIndex(f),m=Math.min(f.length()-1,i.index+i.length-d),v=this.quill.getBounds(new si(d,m));v!=null&&this.position(v)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Ce.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}}Ae(qc,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class jc extends ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Xb),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new qc(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),ms),this.buildPickers(e.container.querySelectorAll("select"),ms))}}jc.DEFAULTS=Dr({},ys.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,se.sources.USER)}}}}});const Qb=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ic extends Pc{constructor(){super(...arguments);Ae(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,Ce.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Ce.events.SELECTION_CHANGE,(t,n,i)=>{if(t!=null){if(t.length===0&&i===Ce.sources.USER){const[s,a]=this.quill.scroll.descendant(Ur,t.index);if(s!=null){this.linkRange=new si(t.index-a,s.length());const u=Ur.formats(s.domNode);this.preview.textContent=u,this.preview.setAttribute("href",u),this.show();const f=this.quill.getBounds(this.linkRange);f!=null&&this.position(f);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Ae(Ic,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class $c extends ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Qb),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),ms),this.buildPickers(e.container.querySelectorAll("select"),ms),this.tooltip=new Ic(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}$c.DEFAULTS=Dr({},ys.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,se.sources.USER)}}}}}),se.register({"attributors/attribute/direction":rc,"attributors/class/align":ec,"attributors/class/background":Uy,"attributors/class/color":By,"attributors/class/direction":ic,"attributors/class/font":ac,"attributors/class/size":uc,"attributors/style/align":tc,"attributors/style/background":Ea,"attributors/style/color":xa,"attributors/style/direction":sc,"attributors/style/font":lc,"attributors/style/size":cc},!0),se.register({"formats/align":ec,"formats/direction":ic,"formats/indent":Rb,"formats/background":Ea,"formats/color":xa,"formats/font":ac,"formats/size":uc,"formats/blockquote":La,"formats/code-block":Ft,"formats/header":Ra,"formats/list":hs,"formats/bold":ds,"formats/code":Oa,"formats/italic":ka,"formats/link":Ur,"formats/script":Pa,"formats/strike":qa,"formats/underline":ja,"formats/formula":no,"formats/image":Ia,"formats/video":ro,"modules/syntax":Sc,"modules/table":Pb,"modules/toolbar":Da,"themes/bubble":jc,"themes/snow":$c,"ui/icons":ms,"ui/picker":io,"ui/icon-picker":Rc,"ui/color-picker":Lc,"ui/tooltip":kc},!0);function Dc(r){const{value:e,style:t,...n}=r,i=mt.useRef(null);return mt.useEffect(()=>{const s=i.current,a=s.ownerDocument.createElement("div");Object.entries(t).forEach(([d,m])=>{a.style[d]=m});const u=s.appendChild(a),f=new se(u,{theme:"snow",...n});return e&&(f.root.innerHTML=e),f.on("text-change",()=>{var d;(d=n.onChange)==null||d.call(n,f.root.innerHTML||"")}),()=>{s.innerHTML=""}},[i]),yt.jsx("div",{ref:i,style:{height:"100%"}})}var Mc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Bc=mt.createContext&&mt.createContext(Mc),ev=["attr","size","title"];function tv(r,e){if(r==null)return{};var t=nv(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function nv(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function so(){return so=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},so.apply(this,arguments)}function Uc(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function oo(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Uc(Object(t),!0).forEach(function(n){rv(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Uc(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function rv(r,e,t){return e=iv(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function iv(r){var e=sv(r,"string");return typeof e=="symbol"?e:e+""}function sv(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Fc(r){return r&&r.map((e,t)=>mt.createElement(e.tag,oo({key:t},e.attr),Fc(e.child)))}function ov(r){return e=>mt.createElement(av,so({attr:oo({},r.attr)},e),Fc(r.child))}function av(r){var e=t=>{var{attr:n,size:i,title:s}=r,a=tv(r,ev),u=i||t.size||"1em",f;return t.className&&(f=t.className),r.className&&(f=(f?f+" ":"")+r.className),mt.createElement("svg",so({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:f,style:oo(oo({color:r.color||t.color},t.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),s&&mt.createElement("title",null,s),r.children)};return Bc!==void 0?mt.createElement(Bc.Consumer,null,t=>e(t)):e(Mc)}function Kc(r){return ov({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"},child:[]}]})(r)}const lv=r=>Array.isArray(r)?r:r&&r.fileList;function Hc(r){var u;const{value:e,...t}=r,n=lv(e),i=Array.isArray(n)?n.length:0,s=t.maxCount??1;let a;return i<s&&((u=t.listType)!=null&&u.startsWith("picture-")?a=yt.jsx(Kc,{}):a=yt.jsx(dn.Button,{icon:yt.jsx(Kc,{}),children:" 上传"})),yt.jsx(dn.Upload,{maxCount:1,multiple:!0,showUploadList:!0,...t,fileList:n,onChange:f=>{var d;return(d=t.onChange)==null?void 0:d.call(t,f.fileList)},children:i<s&&a})}const uv={upload:{renderFormItem:(r,e)=>yt.jsx(Hc,{...e.fieldProps})},editor:{renderFormItem:(r,e)=>yt.jsx(Dc,{...e.fieldProps})}};function Ma({children:r}){return yt.jsx(jr.ProConfigProvider,{valueTypeMap:uv,children:r})}const cv=()=>dn.Form.useForm().pop(),zc=r=>yt.jsx(Ma,{children:yt.jsx(jr.BetaSchemaForm,{layout:"horizontal",colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(e,t)=>yt.jsx(dn.Form.Item,{wrapperCol:{offset:4,span:8},children:yt.jsx(dn.Space,{children:t})})},...r})});zc.useForm=cv;function fv(r){const{items:e,...t}={...r},n=$o.useNavigate(),i=$o.useLocation(),s={onSelectedKeys:()=>{const a=i.pathname.split("/").filter(Boolean).pop(),u=e==null?void 0:e.find(f=>(f==null?void 0:f.key)==a);return[(u==null?void 0:u.key)??""]},...t};return yt.jsxs(dn.Layout,{style:{height:"100vh"},children:[yt.jsxs(dn.Layout.Sider,{children:[yt.jsx(dn.Typography.Title,{style:{color:"white",textAlign:"center"},children:"Rainte"}),yt.jsx(dn.Menu,{mode:"inline",theme:"dark",items:e,defaultSelectedKeys:s.onSelectedKeys(),onClick:a=>n(a.key),...s},i.pathname)]}),yt.jsx(dn.Layout,{style:{overflow:"auto"},children:yt.jsx(dn.Layout.Content,{style:{minHeight:"fit-content",padding:"1rem"},children:yt.jsx(dn.Layout.Content,{style:{height:"100%",padding:"1rem",backgroundColor:"white"},children:yt.jsx($o.Outlet,{})})})})]})}function hv(r){return yt.jsx(Ma,{children:yt.jsx(jr.ProTable,{rowKey:"id",pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:e})=>yt.jsxs(dn.Space,{children:["已选 ",e.length," 项"]}),...r})})}const Fe=r=>typeof r=="string",vs=()=>{let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t},Vc=r=>r==null?"":""+r,dv=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},pv=/###/g,Wc=r=>r&&r.indexOf("###")>-1?r.replace(pv,"."):r,Gc=r=>!r||Fe(r),ws=(r,e,t)=>{const n=Fe(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Gc(r))return{};const s=Wc(n[i]);!r[s]&&t&&(r[s]=new t),Object.prototype.hasOwnProperty.call(r,s)?r=r[s]:r={},++i}return Gc(r)?{}:{obj:r,k:Wc(n[i])}},Yc=(r,e,t)=>{const{obj:n,k:i}=ws(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let s=e[e.length-1],a=e.slice(0,e.length-1),u=ws(r,a,Object);for(;u.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),u=ws(r,a,Object),u!=null&&u.obj&&typeof u.obj[`${u.k}.${s}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${s}`]=t},gv=(r,e,t,n)=>{const{obj:i,k:s}=ws(r,e,Object);i[s]=i[s]||[],i[s].push(t)},ao=(r,e)=>{const{obj:t,k:n}=ws(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},mv=(r,e,t)=>{const n=ao(r,t);return n!==void 0?n:ao(e,t)},Jc=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?Fe(r[n])||r[n]instanceof String||Fe(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Jc(r[n],e[n],t):r[n]=e[n]);return r},ji=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var yv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const bv=r=>Fe(r)?r.replace(/[&<>"'\/]/g,e=>yv[e]):r;class vv{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const wv=[" ",",","?","!",";"],xv=new vv(20),Ev=(r,e,t)=>{e=e||"",t=t||"";const n=wv.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return!0;const i=xv.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(r);if(!s){const a=r.indexOf(t);a>0&&!i.test(r.substring(0,a))&&(s=!0)}return s},Ba=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let i=r;for(let s=0;s<n.length;){if(!i||typeof i!="object")return;let a,u="";for(let f=s;f<n.length;++f)if(f!==s&&(u+=t),u+=n[f],a=i[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&f<n.length-1)continue;s+=f-s+1;break}i=a}return i},lo=r=>r==null?void 0:r.replace("_","-"),Ov={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class uo{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ov,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(Fe(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new uo(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new uo(this.logger,e)}}var ur=new uo;class co{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u.apply(u,[e,...n])})}}class Zc extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var d,m;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,t],n&&(Array.isArray(n)?u.push(...n):Fe(n)&&s?u.push(...n.split(s)):u.push(n)));const f=ao(this.data,u);return!f&&!t&&!n&&e.indexOf(".")>-1&&(e=u[0],t=u[1],n=u.slice(2).join(".")),f||!a||!Fe(n)?f:Ba((m=(d=this.data)==null?void 0:d[e])==null?void 0:m[t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let u=[e,t];n&&(u=u.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(u=e.split("."),i=t,t=u[1]),this.addNamespaces(t),Yc(this.data,u,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(Fe(n[s])||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,t];e.indexOf(".")>-1&&(u=e.split("."),i=n,n=t,t=u[1]),this.addNamespaces(t);let f=ao(this.data,u)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Jc(f,n,s):f={...f,...n},Yc(this.data,u,f),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Xc={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(s=>{var a;e=((a=this.processors[s])==null?void 0:a.process(e,t,n,i))??e}),e}};const Qc={},ef=r=>!Fe(r)&&typeof r!="boolean"&&typeof r!="number";class fo extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),dv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ur.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return(n==null?void 0:n.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,u=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ev(e,n,i);if(a&&!u){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:Fe(s)?[s]:s};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(s=d.shift()),e=d.join(i)}return{key:e,namespaces:Fe(s)?[s]:s}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],t),f=u[u.length-1],d=t.lng||this.language,m=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode"){if(m){const S=t.nsSeparator||this.options.nsSeparator;return i?{res:`${f}${S}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:`${f}${S}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:a}const v=this.resolve(e,t);let y=v==null?void 0:v.res;const x=(v==null?void 0:v.usedKey)||a,A=(v==null?void 0:v.exactUsedKey)||a,O=["[object Number]","[object Function]","[object RegExp]"],N=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,W=t.count!==void 0&&!Fe(t.count),Z=fo.hasDefaultValue(t),de=W?this.pluralResolver.getSuffix(d,t.count,t):"",ue=t.ordinal&&W?this.pluralResolver.getSuffix(d,t.count,{ordinal:!1}):"",ce=W&&!t.ordinal&&t.count===0,ne=ce&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${de}`]||t[`defaultValue${ue}`]||t.defaultValue;let re=y;M&&!y&&Z&&(re=ne);const xe=ef(re),Se=Object.prototype.toString.apply(re);if(M&&re&&xe&&O.indexOf(Se)<0&&!(Fe(N)&&Array.isArray(re))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,re,{...t,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(v.res=S,v.usedParams=this.getUsedParamsDetails(t),v):S}if(s){const S=Array.isArray(re),G=S?[]:{},P=S?A:x;for(const V in re)if(Object.prototype.hasOwnProperty.call(re,V)){const E=`${P}${s}${V}`;Z&&!y?G[V]=this.translate(E,{...t,defaultValue:ef(ne)?ne[V]:void 0,joinArrays:!1,ns:u}):G[V]=this.translate(E,{...t,joinArrays:!1,ns:u}),G[V]===E&&(G[V]=re[V])}y=G}}else if(M&&Fe(N)&&Array.isArray(y))y=y.join(N),y&&(y=this.extendTranslation(y,e,t,n));else{let S=!1,G=!1;!this.isValidLookup(y)&&Z&&(S=!0,y=ne),this.isValidLookup(y)||(G=!0,y=a);const V=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&G?void 0:y,E=Z&&ne!==y&&this.options.updateMissing;if(G||S||E){if(this.logger.log(E?"updateKey":"missingKey",d,f,a,E?ne:y),s){const J=this.resolve(a,{...t,keySeparator:!1});J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let J=0;J<$.length;J++)T.push($[J]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(t.lng||this.language):T.push(t.lng||this.language);const U=(J,z,le)=>{var pe;const ve=Z&&le!==y?le:V;this.options.missingKeyHandler?this.options.missingKeyHandler(J,f,z,ve,E,t):(pe=this.backendConnector)!=null&&pe.saveMissing&&this.backendConnector.saveMissing(J,f,z,ve,E,t),this.emit("missingKey",J,f,z,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&W?T.forEach(J=>{const z=this.pluralResolver.getSuffixes(J,t);ce&&t[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(le=>{U([J],a+le,t[`defaultValue${le}`]||ne)})}):U(T,a,ne))}y=this.extendTranslation(y,e,t,v,n),G&&y===a&&this.options.appendNamespaceToMissingKey&&(y=`${f}:${a}`),(G||S)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${a}`:a,S?y:void 0))}return i?(v.res=y,v.usedParams=this.getUsedParamsDetails(t),v):y}extendTranslation(e,t,n,i,s){var d,m;var a=this;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const v=Fe(e)&&(((m=n==null?void 0:n.interpolation)==null?void 0:m.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(v){const A=e.match(this.interpolator.nestingRegexp);y=A&&A.length}let x=n.replace&&!Fe(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),e=this.interpolator.interpolate(e,x,n.lng||this.language||i.usedLng,n),v){const A=e.match(this.interpolator.nestingRegexp),O=A&&A.length;y<O&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var A=arguments.length,O=new Array(A),N=0;N<A;N++)O[N]=arguments[N];return(s==null?void 0:s[0])===O[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${t[0]}`),null):a.translate(...O,t)},n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,f=Fe(u)?[u]:u;return e!=null&&(f!=null&&f.length)&&n.applyPostProcessor!==!1&&(e=Xc.handle(f,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,a,u;return Fe(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(f,t),m=d.key;i=m;let v=d.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const y=t.count!==void 0&&!Fe(t.count),x=y&&!t.ordinal&&t.count===0,A=t.context!==void 0&&(Fe(t.context)||typeof t.context=="number")&&t.context!=="",O=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);v.forEach(N=>{var M,W;this.isValidLookup(n)||(u=N,!Qc[`${O[0]}-${N}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((W=this.utils)!=null&&W.hasLoadedNamespace(u))&&(Qc[`${O[0]}-${N}`]=!0,this.logger.warn(`key "${i}" for languages "${O.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),O.forEach(Z=>{var ce;if(this.isValidLookup(n))return;a=Z;const de=[m];if((ce=this.i18nFormat)!=null&&ce.addLookupKeys)this.i18nFormat.addLookupKeys(de,m,Z,N,t);else{let ne;y&&(ne=this.pluralResolver.getSuffix(Z,t.count,t));const re=`${this.options.pluralSeparator}zero`,xe=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(de.push(m+ne),t.ordinal&&ne.indexOf(xe)===0&&de.push(m+ne.replace(xe,this.options.pluralSeparator)),x&&de.push(m+re)),A){const Se=`${m}${this.options.contextSeparator}${t.context}`;de.push(Se),y&&(de.push(Se+ne),t.ordinal&&ne.indexOf(xe)===0&&de.push(Se+ne.replace(xe,this.options.pluralSeparator)),x&&de.push(Se+re))}}let ue;for(;ue=de.pop();)this.isValidLookup(n)||(s=ue,n=this.getResource(Z,N,ue,t))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Fe(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of t)delete i[s]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class tf{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ur.create("languageUtils")}getScriptPartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Fe(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),Fe(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Fe(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):Fe(e)&&s(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}}const nf={zero:0,one:1,two:2,few:3,many:4,other:5},rf={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sv{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=ur.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=lo(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rf;if(!e.match(/-|_/))return rf;const f=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(f,t)}return this.pluralRulesCache[s]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,s)=>nf[i]-nf[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const sf=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=mv(r,e,t);return!s&&i&&Fe(t)&&(s=Ba(r,t,n),s===void 0&&(s=Ba(e,t,n))),s},Ua=r=>r.replace(/\$/g,"$$$$");class Av{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ur.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:u,suffixEscaped:f,formatSeparator:d,unescapeSuffix:m,unescapePrefix:v,nestingPrefix:y,nestingPrefixEscaped:x,nestingSuffix:A,nestingSuffixEscaped:O,nestingOptionsSeparator:N,maxReplaces:M,alwaysFormat:W}=e.interpolation;this.escape=t!==void 0?t:bv,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?ji(s):a||"{{",this.suffix=u?ji(u):f||"}}",this.formatSeparator=d||",",this.unescapePrefix=m?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=y?ji(y):x||ji("$t("),this.nestingSuffix=A?ji(A):O||ji(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=M||1e3,this.alwaysFormat=W!==void 0?W:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var x;let s,a,u;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=A=>{if(A.indexOf(this.formatSeparator)<0){const W=sf(t,f,A,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,{...i,...t,interpolationkey:A}):W}const O=A.split(this.formatSeparator),N=O.shift().trim(),M=O.join(this.formatSeparator).trim();return this.format(sf(t,f,N,this.options.keySeparator,this.options.ignoreJSONStructure),M,n,{...i,...t,interpolationkey:N})};this.resetRegExp();const m=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((x=i==null?void 0:i.interpolation)==null?void 0:x.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:A=>Ua(A)},{regex:this.regexp,safeValue:A=>this.escapeValue?Ua(this.escape(A)):Ua(A)}].forEach(A=>{for(u=0;s=A.regex.exec(e);){const O=s[1].trim();if(a=d(O),a===void 0)if(typeof m=="function"){const M=m(e,s,i);a=Fe(M)?M:""}else if(i&&Object.prototype.hasOwnProperty.call(i,O))a="";else if(v){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${e}`),a="";else!Fe(a)&&!this.useRawValueToEscape&&(a=Vc(a));const N=A.safeValue(a);if(e=e.replace(s[0],N),v?(A.regex.lastIndex+=a.length,A.regex.lastIndex-=s[0].length):A.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a;const u=(f,d)=>{const m=this.nestingOptionsSeparator;if(f.indexOf(m)<0)return f;const v=f.split(new RegExp(`${m}[ ]*{`));let y=`{${v[1]}`;f=v[0],y=this.interpolate(y,a);const x=y.match(/'/g),A=y.match(/"/g);(((x==null?void 0:x.length)??0)%2===0&&!A||A.length%2!==0)&&(y=y.replace(/'/g,'"'));try{a=JSON.parse(y),d&&(a={...d,...a})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,O),`${f}${m}${y}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,f};for(;i=this.nestingRegexp.exec(e);){let f=[];a={...n},a=a.replace&&!Fe(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const m=i[1].split(this.formatSeparator).map(v=>v.trim());i[1]=m.shift(),f=m,d=!0}if(s=t(u.call(this,i[1].trim(),a),a),s&&i[0]===e&&!Fe(s))return s;Fe(s)||(s=Vc(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),d&&(s=f.reduce((m,v)=>this.format(m,v,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const Tv=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[u,...f]=a.split(":"),d=f.join(":").trim().replace(/^'+|'+$/g,""),m=u.trim();t[m]||(t[m]=d),d==="false"&&(t[m]=!1),d==="true"&&(t[m]=!0),isNaN(d)||(t[m]=parseInt(d,10))}})}return{formatName:e,formatOptions:t}},Ii=r=>{const e={};return(t,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=n+JSON.stringify(s);let u=e[a];return u||(u=r(lo(n),i),e[a]=u),u(t)}};class _v{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ur.create("formatter"),this.options=e,this.formats={number:Ii((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return s=>i.format(s)}),currency:Ii((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return s=>i.format(s)}),datetime:Ii((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return s=>i.format(s)}),relativetime:Ii((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return s=>i.format(s,n.range||"day")}),list:Ii((t,n)=>{const i=new Intl.ListFormat(t,{...n});return s=>i.format(s)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ii(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(u=>u.indexOf(")")>-1)){const u=s.findIndex(f=>f.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,u)].join(this.formatSeparator)}return s.reduce((u,f)=>{var v;const{formatName:d,formatOptions:m}=Tv(f);if(this.formats[d]){let y=u;try{const x=((v=i==null?void 0:i.formatParams)==null?void 0:v[i.interpolationkey])||{},A=x.locale||x.lng||i.locale||i.lng||n;y=this.formats[d](u,A,{...m,...i,...x})}catch(x){this.logger.warn(x)}return y}else this.logger.warn(`there was no format function for ${d}`);return u},e)}}const Nv=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Cv extends co{constructor(e,t,n){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ur.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,n,i.backend,i)}queueLoad(e,t,n,i){const s={},a={},u={},f={};return e.forEach(d=>{let m=!0;t.forEach(v=>{const y=`${d}|${v}`;!n.reload&&this.store.hasResourceBundle(d,v)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?a[y]===void 0&&(a[y]=!0):(this.state[y]=1,m=!1,a[y]===void 0&&(a[y]=!0),s[y]===void 0&&(s[y]=!0),f[v]===void 0&&(f[v]=!0)))}),m||(u[d]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(f)}}loaded(e,t,n){const i=e.split("|"),s=i[0],a=i[1];t&&this.emit("failedLoading",s,a,t),!t&&n&&this.store.addResourceBundle(s,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const u={};this.queue.forEach(f=>{gv(f.loaded,[s],a),Nv(f,e),t&&f.errors.push(t),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(d=>{u[d]||(u[d]={});const m=f.loaded[d];m.length&&m.forEach(v=>{u[d][v]===void 0&&(u[d][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(f=>!f.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:s,callback:a});return}this.readingCalls++;const u=(d,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(d&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,s*2,a)},s);return}a(d,m)},f=this.backend[n].bind(this.backend);if(f.length===2){try{const d=f(e,t);d&&typeof d.then=="function"?d.then(m=>u(null,m)).catch(u):u(null,d)}catch(d){u(d)}return}return f(e,t,u)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Fe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Fe(t)&&(t=[t]);const s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,a),!a&&u&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,u),this.loaded(e,a,u)})}saveMissing(e,t,n,i,s){var f,d,m,v,y;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace&&!((v=(m=this.services)==null?void 0:m.utils)!=null&&v.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((y=this.backend)!=null&&y.create){const x={...a,isUpdate:s},A=this.backend.create.bind(this.backend);if(A.length<6)try{let O;A.length===5?O=A(e,t,n,i,x):O=A(e,t,n,i),O&&typeof O.then=="function"?O.then(N=>u(null,N)).catch(u):u(null,O)}catch(O){u(O)}else A(e,t,n,i,u,x)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const of=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),Fe(r[1])&&(e.defaultValue=r[1]),Fe(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),af=r=>{var e,t;return Fe(r.ns)&&(r.ns=[r.ns]),Fe(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),Fe(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},ho=()=>{},Lv=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class xs extends co{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=af(e),this.services={},this.logger=ur,this.modules={external:[]},Lv(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Fe(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=of();this.options={...i,...this.options,...af(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?ur.init(s(this.modules.logger),this.options):ur.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=_v;const v=new tf(this.options);this.store=new Zc(this.options.resources,this.options);const y=this.services;y.logger=ur,y.resourceStore=this.store,y.languageUtils=v,y.pluralResolver=new Sv(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(y.formatter=s(m),y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new Av(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new Cv(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",function(x){for(var A=arguments.length,O=new Array(A>1?A-1:0),N=1;N<A;N++)O[N-1]=arguments[N];e.emit(x,...O)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new fo(this.services,this.options),this.translator.on("*",function(x){for(var A=arguments.length,O=new Array(A>1?A-1:0),N=1;N<A;N++)O[N-1]=arguments[N];e.emit(x,...O)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ho),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const f=vs(),d=()=>{const m=(v,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),n(v,y)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),f}loadResources(e){var s,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const i=Fe(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const u=[],f=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(v=>{v!=="cimode"&&u.indexOf(v)<0&&u.push(v)})};i?f(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>f(m)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,d=>f(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(d)})}else n(null)}reloadResources(e,t,n){const i=vs();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ho),this.services.backendConnector.reload(e,t,s=>{i.resolve(),n(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Xc.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=vs();this.emit("languageChanging",e);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},a=(f,d)=>{d?(s(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(f,function(){return n.t(...arguments)})},u=f=>{var m,v;!e&&!f&&this.services.languageDetector&&(f=[]);const d=Fe(f)?f:this.services.languageUtils.getBestMatchFromCodes(f);d&&(this.language||s(d),this.translator.language||this.translator.changeLanguage(d),(v=(m=this.services.languageDetector)==null?void 0:m.cacheUserLanguage)==null||v.call(m,d)),this.loadResources(d,y=>{a(y,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),i}getFixedT(e,t,n){var i=this;const s=function(a,u){let f;if(typeof u!="object"){for(var d=arguments.length,m=new Array(d>2?d-2:0),v=2;v<d;v++)m[v-2]=arguments[v];f=i.options.overloadTranslationOptionHandler([a,u].concat(m))}else f={...u};f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||n||s.keyPrefix);const y=i.options.keySeparator||".";let x;return f.keyPrefix&&Array.isArray(a)?x=a.map(A=>`${f.keyPrefix}${y}${A}`):x=f.keyPrefix?`${f.keyPrefix}${y}${a}`:a,i.t(x,f)};return Fe(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.translate(...t)}exists(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(u,f)=>{const d=this.services.backendConnector.state[`${u}|${f}`];return d===-1||d===0||d===2};if(t.precheck){const u=t.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(s,e)))}loadNamespaces(e,t){const n=vs();return this.options.ns?(Fe(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=vs();Fe(e)&&(e=[e]);const i=this.options.preload||[],s=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{n.resolve(),t&&t(a)}),n):(t&&t(),Promise.resolve())}dir(e){var i,s;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new tf(of());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new xs(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new xs(i);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(u=>{s[u]=this[u]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const u=Object.keys(this.store.data).reduce((f,d)=>(f[d]={...this.store.data[d]},Object.keys(f[d]).reduce((m,v)=>(m[v]={...f[d][v]},m),{})),{});s.store=new Zc(u,i),s.services.resourceStore=s.store}return s.translator=new fo(s.services,i),s.translator.on("*",function(u){for(var f=arguments.length,d=new Array(f>1?f-1:0),m=1;m<f;m++)d[m-1]=arguments[m];s.emit(u,...d)}),s.init(i,t),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=xs.createInstance();Kt.createInstance=xs.createInstance;const Rv=Kt.createInstance,kv=Kt.dir,Pv=Kt.init,qv=Kt.loadResources,jv=Kt.reloadResources,Iv=Kt.use,$v=Kt.changeLanguage,Dv=Kt.getFixedT,Mv=Kt.t,Bv=Kt.exists,Uv=Kt.setDefaultNamespace,Fv=Kt.hasLoadedNamespace,Kv=Kt.loadNamespaces,Hv=Kt.loadLanguages;function Fa(r){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fa(r)}function lf(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Fa(XMLHttpRequest))==="object"}function zv(r){return!!r&&typeof r.then=="function"}function Vv(r){return zv(r)?r:Promise.resolve(r)}function uf(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function cf(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(t),!0).forEach(function(n){Wv(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):uf(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Wv(r,e,t){return(e=Gv(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Gv(r){var e=Yv(r,"string");return ui(e)=="symbol"?e:e+""}function Yv(r,e){if(ui(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ui(r){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ui(r)}var Fr=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Fr=global.fetch:typeof window<"u"&&window.fetch&&(Fr=window.fetch);var Es;lf()&&(typeof global<"u"&&global.XMLHttpRequest?Es=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Es=window.XMLHttpRequest));var po;if(typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?po=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(po=window.ActiveXObject)),typeof Fr!="function"&&(Fr=void 0),!Fr&&!Es&&!po)try{Promise.resolve().then(()=>Nw).then(function(r){Fr=r.default}).catch(function(){})}catch{}var Ka=function(e,t){if(t&&ui(t)==="object"){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},ff=function(e,t,n,i){var s=function(f){if(!f.ok)return n(f.statusText||"Error",{status:f.status});f.text().then(function(d){n(null,{status:f.status,data:d})}).catch(n)};if(i){var a=i(e,t);if(a instanceof Promise){a.then(s).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(s).catch(n):Fr(e,t).then(s).catch(n)},hf=!1,Jv=function(e,t,n,i){e.queryStringParams&&(t=Ka(t,e.queryStringParams));var s=cf({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(s["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,u=cf({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},hf?{}:a),f=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ff(t,u,i,f)}catch(d){if(!a||Object.keys(a).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(a).forEach(function(m){delete u[m]}),ff(t,u,i,f),hf=!0}catch(m){i(m)}}},Zv=function(e,t,n,i){n&&ui(n)==="object"&&(n=Ka("",n).slice(1)),e.queryStringParams&&(t=Ka(t,e.queryStringParams));try{var s=Es?new Es:new po("MSXML2.XMLHTTP.3.0");s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u in a)s.setRequestHeader(u,a[u]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(f){console&&console.log(f)}},Xv=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},Fr&&t.indexOf("file:")!==0)return Jv(e,t,n,i);if(lf()||typeof ActiveXObject=="function")return Zv(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function $i(r){"@babel/helpers - typeof";return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$i(r)}function df(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ha(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?df(Object(t),!0).forEach(function(n){pf(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):df(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Qv(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function e1(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,gf(n.key),n)}}function t1(r,e,t){return e&&e1(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function pf(r,e,t){return(e=gf(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gf(r){var e=n1(r,"string");return $i(e)=="symbol"?e:e+""}function n1(r,e){if($i(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if($i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var r1=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){return pf({},n,i||"")},parseLoadPayload:function(t,n){},request:Xv,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},mf=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Qv(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return t1(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=Ha(Ha(Ha({},r1()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var a=setInterval(function(){return n.reload()},this.options.reloadInterval);$i(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,s,a){var u=this,f=this.options.loadPath;typeof this.options.loadPath=="function"&&(f=this.options.loadPath(t,i)),f=Vv(f),f.then(function(d){if(!d)return a(null,{});var m=u.services.interpolator.interpolate(d,{lng:t.join("+"),ns:i.join("+")});u.loadUrl(m,a,n,s)})}},{key:"loadUrl",value:function(t,n,i,s){var a=this,u=typeof i=="string"?[i]:i,f=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(u,f);this.options.request(this.options,t,d,function(m,v){if(v&&(v.status>=500&&v.status<600||!v.status))return n("failed loading "+t+"; status code: "+v.status,!0);if(v&&v.status>=400&&v.status<500)return n("failed loading "+t+"; status code: "+v.status,!1);if(!v&&m&&m.message){var y=m.message.toLowerCase(),x=["failed","fetch","network","load"].find(function(N){return y.indexOf(N)>-1});if(x)return n("failed loading "+t+": "+m.message,!0)}if(m)return n(m,!1);var A,O;try{typeof v.data=="string"?A=a.options.parse(v.data,i,s):A=v.data}catch{O="failed parsing "+t+" to json"}if(O)return n(O,!1);n(null,A)})}},{key:"create",value:function(t,n,i,s,a){var u=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var f=this.options.parsePayload(n,i,s),d=0,m=[],v=[];t.forEach(function(y){var x=u.options.addPath;typeof u.options.addPath=="function"&&(x=u.options.addPath(y,n));var A=u.services.interpolator.interpolate(x,{lng:y,ns:n});u.options.request(u.options,A,f,function(O,N){d+=1,m.push(O),v.push(N),d===t.length&&typeof a=="function"&&a(m,v)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,s=n.languageUtils,a=n.logger,u=i.language;if(!(u&&u.toLowerCase()==="cimode")){var f=[],d=function(v){var y=s.toResolveHierarchy(v);y.forEach(function(x){f.indexOf(x)<0&&f.push(x)})};d(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(m){return d(m)}),f.forEach(function(m){t.allOptions.ns.forEach(function(v){i.read(m,v,"read",null,null,function(y,x){y&&a.warn("loading namespace ".concat(v," for language ").concat(m," failed"),y),!y&&x&&a.log("loaded namespace ".concat(v," for language ").concat(m),x),i.loaded("".concat(m,"|").concat(v),y,x)})})})}}}])}();mf.type="backend";const{slice:i1,forEach:s1}=[];function o1(r){return s1.call(i1.call(arguments,1),e=>{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const yf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,a1=function(r,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let s=`${r}=${i}`;if(n.maxAge>0){const a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(n.domain){if(!yf.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!yf.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},bf={create(r,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=a1(r,encodeURIComponent(e),i)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(r){this.create(r,"",-1)}};var l1={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return bf.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:s}=e;t&&typeof document<"u"&&bf.create(t,r,n,i,s)}},u1={name:"querystring",lookup(r){var n;let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let u=0;u<a.length;u++){const f=a[u].indexOf("=");f>0&&a[u].substring(0,f)===e&&(t=a[u].substring(f+1))}}return t}};let Di=null;const vf=()=>{if(Di!==null)return Di;try{if(Di=typeof window<"u"&&window.localStorage!==null,!Di)return!1;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{Di=!1}return Di};var c1={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&vf())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&vf()&&window.localStorage.setItem(t,r)}};let Mi=null;const wf=()=>{if(Mi!==null)return Mi;try{if(Mi=typeof window<"u"&&window.sessionStorage!==null,!Mi)return!1;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{Mi=!1}return Mi};var f1={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&wf())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&wf()&&window.sessionStorage.setItem(t,r)}},h1={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let s=0;s<t.length;s++)e.push(t[s]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},d1={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},p1={name:"path",lookup(r){var i;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},g1={name:"subdomain",lookup(r){var i,s;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};let xf=!1;try{document.cookie,xf=!0}catch{}const Ef=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];xf||Ef.splice(1,1);const m1=()=>({order:Ef,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r});class Of{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=o1(t,this.options||{},m1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(l1),this.addDetector(u1),this.addDetector(c1),this.addDetector(f1),this.addDetector(h1),this.addDetector(d1),this.addDetector(p1),this.addDetector(g1)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}Of.type="languageDetector";var y1=Object.defineProperty,b1=(r,e,t)=>e in r?y1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Sf=(r,e,t)=>b1(r,typeof e!="symbol"?e+"":e,t),v1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var za={exports:{}},w1=za.exports,Af;function x1(){return Af||(Af=1,function(r,e){(function(t,n){r.exports=n()})(w1,function(){var t=function(o,l){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(c[g]=p[g])})(o,l)},n=function(){return(n=Object.assign||function(o){for(var l,c=1,p=arguments.length;c<p;c++)for(var g in l=arguments[c])Object.prototype.hasOwnProperty.call(l,g)&&(o[g]=l[g]);return o}).apply(this,arguments)};function i(o,l,c){for(var p,g=0,b=l.length;g<b;g++)!p&&g in l||((p=p||Array.prototype.slice.call(l,0,g))[g]=l[g]);return o.concat(p||Array.prototype.slice.call(l))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:v1,a=Object.keys,u=Array.isArray;function f(o,l){return typeof l!="object"||a(l).forEach(function(c){o[c]=l[c]}),o}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var d=Object.getPrototypeOf,m={}.hasOwnProperty;function v(o,l){return m.call(o,l)}function y(o,l){typeof l=="function"&&(l=l(d(o))),(typeof Reflect>"u"?a:Reflect.ownKeys)(l).forEach(function(c){A(o,c,l[c])})}var x=Object.defineProperty;function A(o,l,c,p){x(o,l,f(c&&v(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},p))}function O(o){return{from:function(l){return o.prototype=Object.create(l.prototype),A(o.prototype,"constructor",o),{extend:y.bind(null,o.prototype)}}}}var N=Object.getOwnPropertyDescriptor,M=[].slice;function W(o,l,c){return M.call(o,l,c)}function Z(o,l){return l(o)}function de(o){if(!o)throw new Error("Assertion Failed")}function ue(o){s.setImmediate?setImmediate(o):setTimeout(o,0)}function ce(o,l){if(typeof l=="string"&&v(o,l))return o[l];if(!l)return o;if(typeof l!="string"){for(var c=[],p=0,g=l.length;p<g;++p){var b=ce(o,l[p]);c.push(b)}return c}var _=l.indexOf(".");if(_!==-1){var C=o[l.substr(0,_)];return C==null?void 0:ce(C,l.substr(_+1))}}function ne(o,l,c){if(o&&l!==void 0&&!("isFrozen"in Object&&Object.isFrozen(o)))if(typeof l!="string"&&"length"in l){de(typeof c!="string"&&"length"in c);for(var p=0,g=l.length;p<g;++p)ne(o,l[p],c[p])}else{var b,_,C=l.indexOf(".");C!==-1?(b=l.substr(0,C),(_=l.substr(C+1))===""?c===void 0?u(o)&&!isNaN(parseInt(b))?o.splice(b,1):delete o[b]:o[b]=c:ne(C=!(C=o[b])||!v(o,b)?o[b]={}:C,_,c)):c===void 0?u(o)&&!isNaN(parseInt(l))?o.splice(l,1):delete o[l]:o[l]=c}}function re(o){var l,c={};for(l in o)v(o,l)&&(c[l]=o[l]);return c}var xe=[].concat;function Se(o){return xe.apply([],o)}var an="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Se([8,16,32,64].map(function(o){return["Int","Uint","Float"].map(function(l){return l+o+"Array"})}))).filter(function(o){return s[o]}),S=new Set(an.map(function(o){return s[o]})),G=null;function P(o){return G=new WeakMap,o=function l(c){if(!c||typeof c!="object")return c;var p=G.get(c);if(p)return p;if(u(c)){p=[],G.set(c,p);for(var g=0,b=c.length;g<b;++g)p.push(l(c[g]))}else if(S.has(c.constructor))p=c;else{var _,C=d(c);for(_ in p=C===Object.prototype?{}:Object.create(C),G.set(c,p),c)v(c,_)&&(p[_]=l(c[_]))}return p}(o),G=null,o}var V={}.toString;function E(o){return V.call(o).slice(8,-1)}var T=typeof Symbol<"u"?Symbol.iterator:"@@iterator",$=typeof T=="symbol"?function(o){var l;return o!=null&&(l=o[T])&&l.apply(o)}:function(){return null};function U(o,l){return l=o.indexOf(l),0<=l&&o.splice(l,1),0<=l}var J={};function z(o){var l,c,p,g;if(arguments.length===1){if(u(o))return o.slice();if(this===J&&typeof o=="string")return[o];if(g=$(o)){for(c=[];!(p=g.next()).done;)c.push(p.value);return c}if(o==null)return[o];if(typeof(l=o.length)!="number")return[o];for(c=new Array(l);l--;)c[l]=o[l];return c}for(l=arguments.length,c=new Array(l);l--;)c[l]=arguments[l];return c}var le=typeof Symbol<"u"?function(o){return o[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},on=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Un=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(on),ve={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function pe(o,l){this.name=o,this.message=l}function Ne(o,l){return o+". Errors: "+Object.keys(l).map(function(c){return l[c].toString()}).filter(function(c,p,g){return g.indexOf(c)===p}).join(`
78
+ `).join("");return s.insert(a,{table:$a()})},new Re().retain(n.index));this.quill.updateContents(i,se.sources.USER),this.quill.setSelection(n.index,se.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(se.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(se.events.TEXT_CHANGE,(n,i,s)=>{s===se.sources.USER&&this.balanceTables()}),!0):!1)})}};const Ac=Ar("quill:toolbar");class Da extends Wn{constructor(e,t){var n,i;if(super(e,t),Array.isArray(this.options.container)){const s=document.createElement("div");s.setAttribute("role","toolbar"),qb(s,this.options.container),(i=(n=e.container)==null?void 0:n.parentNode)==null||i.insertBefore(s,e.container),this.container=s}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){Ac.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(s=>{var u;const a=(u=this.options.handlers)==null?void 0:u[s];a&&this.addHandler(s,a)}),Array.from(this.container.querySelectorAll("button, select")).forEach(s=>{this.attach(s)}),this.quill.on(se.events.EDITOR_CHANGE,()=>{const[s]=this.quill.selection.getRange();this.update(s)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(i=>i.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){Ac.warn("ignoring attaching to nonexistent format",t,e);return}const n=e.tagName==="SELECT"?"change":"click";e.addEventListener(n,i=>{let s;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const u=e.options[e.selectedIndex];u.hasAttribute("selected")?s=!1:s=u.value||!1}else e.classList.contains("ql-active")?s=!1:s=e.value||!e.hasAttribute("value"),i.preventDefault();this.quill.focus();const[a]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,s);else if(this.quill.scroll.query(t).prototype instanceof pn){if(s=prompt(`Enter ${t}`),!s)return;this.quill.updateContents(new Re().retain(a.index).delete(a.length).insert({[t]:s}),se.sources.USER)}else this.quill.format(t,s,se.sources.USER);this.update(a)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(n=>{const[i,s]=n;if(s.tagName==="SELECT"){let a=null;if(e==null)a=null;else if(t[i]==null)a=s.querySelector("option[selected]");else if(!Array.isArray(t[i])){let u=t[i];typeof u=="string"&&(u=u.replace(/"/g,'\\"')),a=s.querySelector(`option[value="${u}"]`)}a==null?(s.value="",s.selectedIndex=-1):a.selected=!0}else if(e==null)s.classList.remove("ql-active"),s.setAttribute("aria-pressed","false");else if(s.hasAttribute("value")){const a=t[i],u=a===s.getAttribute("value")||a!=null&&a.toString()===s.getAttribute("value")||a==null&&!s.getAttribute("value");s.classList.toggle("ql-active",u),s.setAttribute("aria-pressed",u.toString())}else{const a=t[i]!=null;s.classList.toggle("ql-active",a),s.setAttribute("aria-pressed",a.toString())}})}}Da.DEFAULTS={};function Tc(r,e,t){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add(`ql-${e}`),n.setAttribute("aria-pressed","false"),t!=null?(n.value=t,n.setAttribute("aria-label",`${e}: ${t}`)):n.setAttribute("aria-label",e),r.appendChild(n)}function qb(r,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const n=document.createElement("span");n.classList.add("ql-formats"),t.forEach(i=>{if(typeof i=="string")Tc(n,i);else{const s=Object.keys(i)[0],a=i[s];Array.isArray(a)?jb(n,s,a):Tc(n,s,a)}}),r.appendChild(n)})}function jb(r,e,t){const n=document.createElement("select");n.classList.add(`ql-${e}`),t.forEach(i=>{const s=document.createElement("option");i!==!1?s.setAttribute("value",String(i)):s.setAttribute("selected","selected"),n.appendChild(s)}),r.appendChild(n)}Da.DEFAULTS={container:null,handlers:{clean(){const r=this.quill.getSelection();if(r!=null)if(r.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,Pe.INLINE)!=null&&this.quill.format(t,!1,se.sources.USER)})}else this.quill.removeFormat(r.index,r.length,se.sources.USER)},direction(r){const{align:e}=this.quill.getFormat();r==="rtl"&&e==null?this.quill.format("align","right",se.sources.USER):!r&&e==="right"&&this.quill.format("align",!1,se.sources.USER),this.quill.format("direction",r,se.sources.USER)},indent(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e),n=parseInt(t.indent||0,10);if(r==="+1"||r==="-1"){let i=r==="+1"?1:-1;t.direction==="rtl"&&(i*=-1),this.quill.format("indent",n+i,se.sources.USER)}},link(r){r===!0&&(r=prompt("Enter link URL:")),this.quill.format("link",r,se.sources.USER)},list(r){const e=this.quill.getSelection(),t=this.quill.getFormat(e);r==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,se.sources.USER):this.quill.format("list","unchecked",se.sources.USER):this.quill.format("list",r,se.sources.USER)}}};const Ib='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',$b='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Db='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Mb='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Bb='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Ub='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',Fb='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Kb='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',_c='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',ms={align:{"":Ib,center:$b,right:Db,justify:Mb},background:Bb,blockquote:Ub,bold:Fb,clean:Kb,code:_c,"code-block":_c,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},Hb='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let Nc=0;function Cc(r,e){r.setAttribute(e,`${r.getAttribute(e)!=="true"}`)}class io{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),Cc(this.label,"aria-expanded"),Cc(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const n=e.getAttribute("value");return n&&t.setAttribute("data-value",n),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",i=>{switch(i.key){case"Enter":this.selectItem(t,!0),i.preventDefault();break;case"Escape":this.escape(),i.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Hb,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${Nc}`,Nc+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const n=this.buildItem(t);e.appendChild(n),t.selected===!0&&this.selectItem(n)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.container.querySelector(".ql-selected");e!==n&&(n!=null&&n.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const n=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(n)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class Lc extends io{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(n=>{n.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const n=this.label.querySelector(".ql-color-label"),i=e&&e.getAttribute("data-value")||"";n&&(n.tagName==="line"?n.style.stroke=i:n.style.fill=i)}}class Rc extends io{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(n=>{n.innerHTML=t[n.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const n=e||this.defaultItem;if(n!=null){if(this.label.innerHTML===n.innerHTML)return;this.label.innerHTML=n.innerHTML}}}const zb=r=>{const{overflowY:e}=getComputedStyle(r,null);return e!=="visible"&&e!=="clip"};class kc{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,zb(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,n=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${n}px`,this.root.classList.remove("ql-flip");const i=this.boundsContainer.getBoundingClientRect(),s=this.root.getBoundingClientRect();let a=0;if(s.right>i.right&&(a=i.right-s.right,this.root.style.left=`${t+a}px`),s.left<i.left&&(a=i.left-s.left,this.root.style.left=`${t+a}px`),s.bottom>i.bottom){const u=s.bottom-s.top,f=e.bottom-e.top+u;this.root.style.top=`${n-f}px`,this.root.classList.add("ql-flip")}return a}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Vb=[!1,"center","right","justify"],Wb=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Gb=[!1,"serif","monospace"],Yb=["1","2","3",!1],Jb=["small",!1,"large","huge"];class ys extends Ri{constructor(e,t){super(e,t);const n=i=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",n);return}this.tooltip!=null&&!this.tooltip.root.contains(i.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(s=>{s.container.contains(i.target)||s.close()})};e.emitter.listenDOM("click",document.body,n)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(n=>{(n.getAttribute("class")||"").split(/\s+/).forEach(s=>{if(s.startsWith("ql-")&&(s=s.slice(3),t[s]!=null))if(s==="direction")n.innerHTML=t[s][""]+t[s].rtl;else if(typeof t[s]=="string")n.innerHTML=t[s];else{const a=n.value||"";a!=null&&t[s][a]&&(n.innerHTML=t[s][a])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(i=>{if(i.classList.contains("ql-align")&&(i.querySelector("option")==null&&bs(i,Vb),typeof t.align=="object"))return new Rc(i,t.align);if(i.classList.contains("ql-background")||i.classList.contains("ql-color")){const s=i.classList.contains("ql-background")?"background":"color";return i.querySelector("option")==null&&bs(i,Wb,s==="background"?"#ffffff":"#000000"),new Lc(i,t[s])}return i.querySelector("option")==null&&(i.classList.contains("ql-font")?bs(i,Gb):i.classList.contains("ql-header")?bs(i,Yb):i.classList.contains("ql-size")&&bs(i,Jb)),new io(i)});const n=()=>{this.pickers.forEach(i=>{i.update()})};this.quill.on(Ce.events.EDITOR_CHANGE,n)}}ys.DEFAULTS=Dr({},Ri.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let r=this.container.querySelector("input.ql-image[type=file]");r==null&&(r=document.createElement("input"),r.setAttribute("type","file"),r.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),r.classList.add("ql-image"),r.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,r.files),r.value=""}),this.container.appendChild(r)),r.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Pc extends kc{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const n=this.quill.getBounds(this.quill.selection.savedRange);n!=null&&this.position(n),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,Ce.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,Ce.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=Zb(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const n=t.index+t.length;this.quill.insertEmbed(n,this.root.getAttribute("data-mode"),e,Ce.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(n+1," ",Ce.sources.USER),this.quill.setSelection(n+2,Ce.sources.USER)}break}}this.textbox.value="",this.hide()}}function Zb(r){let e=r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||r.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=r.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:r}function bs(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(n=>{const i=document.createElement("option");n===t?i.setAttribute("selected","selected"):i.setAttribute("value",String(n)),r.appendChild(i)})}const Xb=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class qc extends Pc{constructor(e,t){super(e,t),this.quill.on(Ce.events.EDITOR_CHANGE,(n,i,s,a)=>{if(n===Ce.events.SELECTION_CHANGE)if(i!=null&&i.length>0&&a===Ce.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const u=this.quill.getLines(i.index,i.length);if(u.length===1){const f=this.quill.getBounds(i);f!=null&&this.position(f)}else{const f=u[u.length-1],d=this.quill.getIndex(f),m=Math.min(f.length()-1,i.index+i.length-d),v=this.quill.getBounds(new si(d,m));v!=null&&this.position(v)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on(Ce.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),n=this.root.querySelector(".ql-tooltip-arrow");return n.style.marginLeft="",t!==0&&(n.style.marginLeft=`${-1*t-n.offsetWidth/2}px`),t}}Ae(qc,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class jc extends ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Xb),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new qc(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),ms),this.buildPickers(e.container.querySelectorAll("select"),ms))}}jc.DEFAULTS=Dr({},ys.DEFAULTS,{modules:{toolbar:{handlers:{link(r){r?this.quill.theme.tooltip.edit():this.quill.format("link",!1,se.sources.USER)}}}}});const Qb=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Ic extends Pc{constructor(){super(...arguments);Ae(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const n=this.linkRange;this.restoreFocus(),this.quill.formatText(n,"link",!1,Ce.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(Ce.events.SELECTION_CHANGE,(t,n,i)=>{if(t!=null){if(t.length===0&&i===Ce.sources.USER){const[s,a]=this.quill.scroll.descendant(Ur,t.index);if(s!=null){this.linkRange=new si(t.index-a,s.length());const u=Ur.formats(s.domNode);this.preview.textContent=u,this.preview.setAttribute("href",u),this.show();const f=this.quill.getBounds(this.linkRange);f!=null&&this.position(f);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}Ae(Ic,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class $c extends ys{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Qb),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),ms),this.buildPickers(e.container.querySelectorAll("select"),ms),this.tooltip=new Ic(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,n)=>{e.handlers.link.call(e,!n.format.link)}))}}$c.DEFAULTS=Dr({},ys.DEFAULTS,{modules:{toolbar:{handlers:{link(r){if(r){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:n}=this.quill.theme;n.edit("link",t)}else this.quill.format("link",!1,se.sources.USER)}}}}}),se.register({"attributors/attribute/direction":rc,"attributors/class/align":ec,"attributors/class/background":Uy,"attributors/class/color":By,"attributors/class/direction":ic,"attributors/class/font":ac,"attributors/class/size":uc,"attributors/style/align":tc,"attributors/style/background":Ea,"attributors/style/color":xa,"attributors/style/direction":sc,"attributors/style/font":lc,"attributors/style/size":cc},!0),se.register({"formats/align":ec,"formats/direction":ic,"formats/indent":Rb,"formats/background":Ea,"formats/color":xa,"formats/font":ac,"formats/size":uc,"formats/blockquote":La,"formats/code-block":Ft,"formats/header":Ra,"formats/list":hs,"formats/bold":ds,"formats/code":Oa,"formats/italic":ka,"formats/link":Ur,"formats/script":Pa,"formats/strike":qa,"formats/underline":ja,"formats/formula":no,"formats/image":Ia,"formats/video":ro,"modules/syntax":Sc,"modules/table":Pb,"modules/toolbar":Da,"themes/bubble":jc,"themes/snow":$c,"ui/icons":ms,"ui/picker":io,"ui/icon-picker":Rc,"ui/color-picker":Lc,"ui/tooltip":kc},!0);function Dc(r){const{value:e,style:t,...n}=r,i=mt.useRef(null);return mt.useEffect(()=>{const s=i.current,a=s.ownerDocument.createElement("div");Object.entries(t).forEach(([d,m])=>{a.style[d]=m});const u=s.appendChild(a),f=new se(u,{theme:"snow",...n});return e&&(f.root.innerHTML=e),f.on("text-change",()=>{var d;(d=n.onChange)==null||d.call(n,f.root.innerHTML||"")}),()=>{s.innerHTML=""}},[i]),yt.jsx("div",{ref:i,style:{height:"100%"}})}var Mc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Bc=mt.createContext&&mt.createContext(Mc),ev=["attr","size","title"];function tv(r,e){if(r==null)return{};var t=nv(r,e),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);for(i=0;i<s.length;i++)n=s[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}function nv(r,e){if(r==null)return{};var t={};for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){if(e.indexOf(n)>=0)continue;t[n]=r[n]}return t}function so(){return so=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},so.apply(this,arguments)}function Uc(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function oo(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Uc(Object(t),!0).forEach(function(n){rv(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Uc(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function rv(r,e,t){return e=iv(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function iv(r){var e=sv(r,"string");return typeof e=="symbol"?e:e+""}function sv(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Fc(r){return r&&r.map((e,t)=>mt.createElement(e.tag,oo({key:t},e.attr),Fc(e.child)))}function ov(r){return e=>mt.createElement(av,so({attr:oo({},r.attr)},e),Fc(r.child))}function av(r){var e=t=>{var{attr:n,size:i,title:s}=r,a=tv(r,ev),u=i||t.size||"1em",f;return t.className&&(f=t.className),r.className&&(f=(f?f+" ":"")+r.className),mt.createElement("svg",so({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,a,{className:f,style:oo(oo({color:r.color||t.color},t.style),r.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),s&&mt.createElement("title",null,s),r.children)};return Bc!==void 0?mt.createElement(Bc.Consumer,null,t=>e(t)):e(Mc)}function Kc(r){return ov({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"},child:[]}]})(r)}const lv=r=>Array.isArray(r)?r:r&&r.fileList;function Hc(r){var u;const{value:e,...t}=r,n=lv(e),i=Array.isArray(n)?n.length:0,s=t.maxCount??1;let a;return i<s&&((u=t.listType)!=null&&u.startsWith("picture-")?a=yt.jsx(Kc,{}):a=yt.jsx(dn.Button,{icon:yt.jsx(Kc,{}),children:" 上传"})),yt.jsx(dn.Upload,{maxCount:1,multiple:!0,showUploadList:!0,...t,fileList:n,onChange:f=>{var d;return(d=t.onChange)==null?void 0:d.call(t,f.fileList)},children:i<s&&a})}const uv={upload:{renderFormItem:(r,e)=>yt.jsx(Hc,{...e.fieldProps})},editor:{renderFormItem:(r,e)=>yt.jsx(Dc,{...e.fieldProps})}};function Ma({children:r}){return yt.jsx(jr.ProConfigProvider,{valueTypeMap:uv,children:r})}const cv=()=>dn.Form.useForm().pop(),zc=r=>yt.jsx(Ma,{children:yt.jsx(jr.BetaSchemaForm,{layout:"horizontal",colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(e,t)=>yt.jsx(dn.Form.Item,{wrapperCol:{offset:4,span:8},children:yt.jsx(dn.Space,{children:t})})},...r})});zc.useForm=cv;function fv(r){const{items:e,...t}={...r},n=$o.useNavigate(),s=$o.useLocation().pathname.split("/").filter(Boolean).pop(),a=e==null?void 0:e.find(f=>(f==null?void 0:f.key)==s),u=[(a==null?void 0:a.key)??""];return yt.jsxs(dn.Layout,{style:{height:"100vh"},children:[yt.jsxs(dn.Layout.Sider,{children:[yt.jsx(dn.Typography.Title,{style:{color:"white",textAlign:"center"},children:"Rainte"}),yt.jsx(dn.Menu,{mode:"inline",theme:"dark",items:e,defaultSelectedKeys:u,onClick:f=>n(f.key),...t})]}),yt.jsx(dn.Layout,{style:{overflow:"auto"},children:yt.jsx(dn.Layout.Content,{style:{minHeight:"fit-content",padding:"1rem"},children:yt.jsx(dn.Layout.Content,{style:{height:"100%",padding:"1rem",backgroundColor:"white"},children:yt.jsx($o.Outlet,{})})})})]})}function hv(r){return yt.jsx(Ma,{children:yt.jsx(jr.ProTable,{rowKey:"id",pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:e})=>yt.jsxs(dn.Space,{children:["已选 ",e.length," 项"]}),...r})})}const Fe=r=>typeof r=="string",vs=()=>{let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t},Vc=r=>r==null?"":""+r,dv=(r,e,t)=>{r.forEach(n=>{e[n]&&(t[n]=e[n])})},pv=/###/g,Wc=r=>r&&r.indexOf("###")>-1?r.replace(pv,"."):r,Gc=r=>!r||Fe(r),ws=(r,e,t)=>{const n=Fe(e)?e.split("."):e;let i=0;for(;i<n.length-1;){if(Gc(r))return{};const s=Wc(n[i]);!r[s]&&t&&(r[s]=new t),Object.prototype.hasOwnProperty.call(r,s)?r=r[s]:r={},++i}return Gc(r)?{}:{obj:r,k:Wc(n[i])}},Yc=(r,e,t)=>{const{obj:n,k:i}=ws(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let s=e[e.length-1],a=e.slice(0,e.length-1),u=ws(r,a,Object);for(;u.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),u=ws(r,a,Object),u!=null&&u.obj&&typeof u.obj[`${u.k}.${s}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${s}`]=t},gv=(r,e,t,n)=>{const{obj:i,k:s}=ws(r,e,Object);i[s]=i[s]||[],i[s].push(t)},ao=(r,e)=>{const{obj:t,k:n}=ws(r,e);if(t&&Object.prototype.hasOwnProperty.call(t,n))return t[n]},mv=(r,e,t)=>{const n=ao(r,t);return n!==void 0?n:ao(e,t)},Jc=(r,e,t)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?Fe(r[n])||r[n]instanceof String||Fe(e[n])||e[n]instanceof String?t&&(r[n]=e[n]):Jc(r[n],e[n],t):r[n]=e[n]);return r},ji=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var yv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const bv=r=>Fe(r)?r.replace(/[&<>"'\/]/g,e=>yv[e]):r;class vv{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const wv=[" ",",","?","!",";"],xv=new vv(20),Ev=(r,e,t)=>{e=e||"",t=t||"";const n=wv.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(n.length===0)return!0;const i=xv.getRegExp(`(${n.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(r);if(!s){const a=r.indexOf(t);a>0&&!i.test(r.substring(0,a))&&(s=!0)}return s},Ba=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;const n=e.split(t);let i=r;for(let s=0;s<n.length;){if(!i||typeof i!="object")return;let a,u="";for(let f=s;f<n.length;++f)if(f!==s&&(u+=t),u+=n[f],a=i[u],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&f<n.length-1)continue;s+=f-s+1;break}i=a}return i},lo=r=>r==null?void 0:r.replace("_","-"),Ov={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){var t,n;(n=(t=console==null?void 0:console[r])==null?void 0:t.apply)==null||n.call(t,console,e)}};class uo{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ov,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(Fe(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new uo(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new uo(this.logger,e)}}var ur=new uo;class co{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[u,f]=a;for(let d=0;d<f;d++)u.apply(u,[e,...n])})}}class Zc extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){var d,m;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;e.indexOf(".")>-1?u=e.split("."):(u=[e,t],n&&(Array.isArray(n)?u.push(...n):Fe(n)&&s?u.push(...n.split(s)):u.push(n)));const f=ao(this.data,u);return!f&&!t&&!n&&e.indexOf(".")>-1&&(e=u[0],t=u[1],n=u.slice(2).join(".")),f||!a||!Fe(n)?f:Ba((m=(d=this.data)==null?void 0:d[e])==null?void 0:m[t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let u=[e,t];n&&(u=u.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(u=e.split("."),i=t,t=u[1]),this.addNamespaces(t),Yc(this.data,u,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(Fe(n[s])||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[e,t];e.indexOf(".")>-1&&(u=e.split("."),i=n,n=t,t=u[1]),this.addNamespaces(t);let f=ao(this.data,u)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?Jc(f,n,s):f={...f,...n},Yc(this.data,u,f),a.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Xc={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(s=>{var a;e=((a=this.processors[s])==null?void 0:a.process(e,t,n,i))??e}),e}};const Qc={},ef=r=>!Fe(r)&&typeof r!="boolean"&&typeof r!="number";class fo extends co{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),dv(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ur.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const n=this.resolve(e,t);return(n==null?void 0:n.res)!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const a=n&&e.indexOf(n)>-1,u=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ev(e,n,i);if(a&&!u){const f=e.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:e,namespaces:Fe(s)?[s]:s};const d=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(d[0])>-1)&&(s=d.shift()),e=d.join(i)}return{key:e,namespaces:Fe(s)?[s]:s}}translate(e,t,n){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:u}=this.extractFromKey(e[e.length-1],t),f=u[u.length-1],d=t.lng||this.language,m=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode"){if(m){const S=t.nsSeparator||this.options.nsSeparator;return i?{res:`${f}${S}${a}`,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:`${f}${S}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:d,usedNS:f,usedParams:this.getUsedParamsDetails(t)}:a}const v=this.resolve(e,t);let y=v==null?void 0:v.res;const x=(v==null?void 0:v.usedKey)||a,A=(v==null?void 0:v.exactUsedKey)||a,O=["[object Number]","[object Function]","[object RegExp]"],N=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,M=!this.i18nFormat||this.i18nFormat.handleAsObject,W=t.count!==void 0&&!Fe(t.count),Z=fo.hasDefaultValue(t),de=W?this.pluralResolver.getSuffix(d,t.count,t):"",ue=t.ordinal&&W?this.pluralResolver.getSuffix(d,t.count,{ordinal:!1}):"",ce=W&&!t.ordinal&&t.count===0,ne=ce&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${de}`]||t[`defaultValue${ue}`]||t.defaultValue;let re=y;M&&!y&&Z&&(re=ne);const xe=ef(re),Se=Object.prototype.toString.apply(re);if(M&&re&&xe&&O.indexOf(Se)<0&&!(Fe(N)&&Array.isArray(re))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const S=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,re,{...t,ns:u}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(v.res=S,v.usedParams=this.getUsedParamsDetails(t),v):S}if(s){const S=Array.isArray(re),G=S?[]:{},P=S?A:x;for(const V in re)if(Object.prototype.hasOwnProperty.call(re,V)){const E=`${P}${s}${V}`;Z&&!y?G[V]=this.translate(E,{...t,defaultValue:ef(ne)?ne[V]:void 0,joinArrays:!1,ns:u}):G[V]=this.translate(E,{...t,joinArrays:!1,ns:u}),G[V]===E&&(G[V]=re[V])}y=G}}else if(M&&Fe(N)&&Array.isArray(y))y=y.join(N),y&&(y=this.extendTranslation(y,e,t,n));else{let S=!1,G=!1;!this.isValidLookup(y)&&Z&&(S=!0,y=ne),this.isValidLookup(y)||(G=!0,y=a);const V=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&G?void 0:y,E=Z&&ne!==y&&this.options.updateMissing;if(G||S||E){if(this.logger.log(E?"updateKey":"missingKey",d,f,a,E?ne:y),s){const J=this.resolve(a,{...t,keySeparator:!1});J&&J.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const $=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&$&&$[0])for(let J=0;J<$.length;J++)T.push($[J]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(t.lng||this.language):T.push(t.lng||this.language);const U=(J,z,le)=>{var pe;const ve=Z&&le!==y?le:V;this.options.missingKeyHandler?this.options.missingKeyHandler(J,f,z,ve,E,t):(pe=this.backendConnector)!=null&&pe.saveMissing&&this.backendConnector.saveMissing(J,f,z,ve,E,t),this.emit("missingKey",J,f,z,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&W?T.forEach(J=>{const z=this.pluralResolver.getSuffixes(J,t);ce&&t[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(le=>{U([J],a+le,t[`defaultValue${le}`]||ne)})}):U(T,a,ne))}y=this.extendTranslation(y,e,t,v,n),G&&y===a&&this.options.appendNamespaceToMissingKey&&(y=`${f}:${a}`),(G||S)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${a}`:a,S?y:void 0))}return i?(v.res=y,v.usedParams=this.getUsedParamsDetails(t),v):y}extendTranslation(e,t,n,i,s){var d,m;var a=this;if((d=this.i18nFormat)!=null&&d.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const v=Fe(e)&&(((m=n==null?void 0:n.interpolation)==null?void 0:m.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(v){const A=e.match(this.interpolator.nestingRegexp);y=A&&A.length}let x=n.replace&&!Fe(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),e=this.interpolator.interpolate(e,x,n.lng||this.language||i.usedLng,n),v){const A=e.match(this.interpolator.nestingRegexp),O=A&&A.length;y<O&&(n.nest=!1)}!n.lng&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var A=arguments.length,O=new Array(A),N=0;N<A;N++)O[N]=arguments[N];return(s==null?void 0:s[0])===O[0]&&!n.context?(a.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${t[0]}`),null):a.translate(...O,t)},n)),n.interpolation&&this.interpolator.reset()}const u=n.postProcess||this.options.postProcess,f=Fe(u)?[u]:u;return e!=null&&(f!=null&&f.length)&&n.applyPostProcessor!==!1&&(e=Xc.handle(f,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,a,u;return Fe(e)&&(e=[e]),e.forEach(f=>{if(this.isValidLookup(n))return;const d=this.extractFromKey(f,t),m=d.key;i=m;let v=d.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const y=t.count!==void 0&&!Fe(t.count),x=y&&!t.ordinal&&t.count===0,A=t.context!==void 0&&(Fe(t.context)||typeof t.context=="number")&&t.context!=="",O=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);v.forEach(N=>{var M,W;this.isValidLookup(n)||(u=N,!Qc[`${O[0]}-${N}`]&&((M=this.utils)!=null&&M.hasLoadedNamespace)&&!((W=this.utils)!=null&&W.hasLoadedNamespace(u))&&(Qc[`${O[0]}-${N}`]=!0,this.logger.warn(`key "${i}" for languages "${O.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),O.forEach(Z=>{var ce;if(this.isValidLookup(n))return;a=Z;const de=[m];if((ce=this.i18nFormat)!=null&&ce.addLookupKeys)this.i18nFormat.addLookupKeys(de,m,Z,N,t);else{let ne;y&&(ne=this.pluralResolver.getSuffix(Z,t.count,t));const re=`${this.options.pluralSeparator}zero`,xe=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(y&&(de.push(m+ne),t.ordinal&&ne.indexOf(xe)===0&&de.push(m+ne.replace(xe,this.options.pluralSeparator)),x&&de.push(m+re)),A){const Se=`${m}${this.options.contextSeparator}${t.context}`;de.push(Se),y&&(de.push(Se+ne),t.ordinal&&ne.indexOf(xe)===0&&de.push(Se+ne.replace(xe,this.options.pluralSeparator)),x&&de.push(Se+re))}}let ue;for(;ue=de.pop();)this.isValidLookup(n)||(s=ue,n=this.getResource(Z,N,ue,t))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:u}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){var s;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,i)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!Fe(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of t)delete i[s]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}class tf{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ur.create("languageUtils")}getScriptPartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=lo(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Fe(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),Fe(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Fe(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):Fe(e)&&s(this.formatLanguageCode(e)),n.forEach(a=>{i.indexOf(a)<0&&s(this.formatLanguageCode(a))}),i}}const nf={zero:0,one:1,two:2,few:3,many:4,other:5},rf={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class Sv{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=ur.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=lo(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:n,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(n,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),rf;if(!e.match(/-|_/))return rf;const f=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(f,t)}return this.pluralRulesCache[s]=a,a}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,n).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?n.resolvedOptions().pluralCategories.sort((i,s)=>nf[i]-nf[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}const sf=function(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=mv(r,e,t);return!s&&i&&Fe(t)&&(s=Ba(r,t,n),s===void 0&&(s=Ba(e,t,n))),s},Ua=r=>r.replace(/\$/g,"$$$$");class Av{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ur.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:u,suffixEscaped:f,formatSeparator:d,unescapeSuffix:m,unescapePrefix:v,nestingPrefix:y,nestingPrefixEscaped:x,nestingSuffix:A,nestingSuffixEscaped:O,nestingOptionsSeparator:N,maxReplaces:M,alwaysFormat:W}=e.interpolation;this.escape=t!==void 0?t:bv,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?ji(s):a||"{{",this.suffix=u?ji(u):f||"}}",this.formatSeparator=d||",",this.unescapePrefix=m?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=y?ji(y):x||ji("$t("),this.nestingSuffix=A?ji(A):O||ji(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=M||1e3,this.alwaysFormat=W!==void 0?W:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>(t==null?void 0:t.source)===n?(t.lastIndex=0,t):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,i){var x;let s,a,u;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},d=A=>{if(A.indexOf(this.formatSeparator)<0){const W=sf(t,f,A,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(W,void 0,n,{...i,...t,interpolationkey:A}):W}const O=A.split(this.formatSeparator),N=O.shift().trim(),M=O.join(this.formatSeparator).trim();return this.format(sf(t,f,N,this.options.keySeparator,this.options.ignoreJSONStructure),M,n,{...i,...t,interpolationkey:N})};this.resetRegExp();const m=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((x=i==null?void 0:i.interpolation)==null?void 0:x.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:A=>Ua(A)},{regex:this.regexp,safeValue:A=>this.escapeValue?Ua(this.escape(A)):Ua(A)}].forEach(A=>{for(u=0;s=A.regex.exec(e);){const O=s[1].trim();if(a=d(O),a===void 0)if(typeof m=="function"){const M=m(e,s,i);a=Fe(M)?M:""}else if(i&&Object.prototype.hasOwnProperty.call(i,O))a="";else if(v){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${O} for interpolating ${e}`),a="";else!Fe(a)&&!this.useRawValueToEscape&&(a=Vc(a));const N=A.safeValue(a);if(e=e.replace(s[0],N),v?(A.regex.lastIndex+=a.length,A.regex.lastIndex-=s[0].length):A.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,a;const u=(f,d)=>{const m=this.nestingOptionsSeparator;if(f.indexOf(m)<0)return f;const v=f.split(new RegExp(`${m}[ ]*{`));let y=`{${v[1]}`;f=v[0],y=this.interpolate(y,a);const x=y.match(/'/g),A=y.match(/"/g);(((x==null?void 0:x.length)??0)%2===0&&!A||A.length%2!==0)&&(y=y.replace(/'/g,'"'));try{a=JSON.parse(y),d&&(a={...d,...a})}catch(O){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,O),`${f}${m}${y}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,f};for(;i=this.nestingRegexp.exec(e);){let f=[];a={...n},a=a.replace&&!Fe(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const m=i[1].split(this.formatSeparator).map(v=>v.trim());i[1]=m.shift(),f=m,d=!0}if(s=t(u.call(this,i[1].trim(),a),a),s&&i[0]===e&&!Fe(s))return s;Fe(s)||(s=Vc(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),d&&(s=f.reduce((m,v)=>this.format(m,v,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const Tv=r=>{let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[1].length-1);e==="currency"&&i.indexOf(":")<0?t.currency||(t.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?t.range||(t.range=i.trim()):i.split(";").forEach(a=>{if(a){const[u,...f]=a.split(":"),d=f.join(":").trim().replace(/^'+|'+$/g,""),m=u.trim();t[m]||(t[m]=d),d==="false"&&(t[m]=!1),d==="true"&&(t[m]=!0),isNaN(d)||(t[m]=parseInt(d,10))}})}return{formatName:e,formatOptions:t}},Ii=r=>{const e={};return(t,n,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=n+JSON.stringify(s);let u=e[a];return u||(u=r(lo(n),i),e[a]=u),u(t)}};class _v{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ur.create("formatter"),this.options=e,this.formats={number:Ii((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return s=>i.format(s)}),currency:Ii((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return s=>i.format(s)}),datetime:Ii((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return s=>i.format(s)}),relativetime:Ii((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return s=>i.format(s,n.range||"day")}),list:Ii((t,n)=>{const i=new Intl.ListFormat(t,{...n});return s=>i.format(s)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Ii(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=t.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(u=>u.indexOf(")")>-1)){const u=s.findIndex(f=>f.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,u)].join(this.formatSeparator)}return s.reduce((u,f)=>{var v;const{formatName:d,formatOptions:m}=Tv(f);if(this.formats[d]){let y=u;try{const x=((v=i==null?void 0:i.formatParams)==null?void 0:v[i.interpolationkey])||{},A=x.locale||x.lng||i.locale||i.lng||n;y=this.formats[d](u,A,{...m,...i,...x})}catch(x){this.logger.warn(x)}return y}else this.logger.warn(`there was no format function for ${d}`);return u},e)}}const Nv=(r,e)=>{r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)};class Cv extends co{constructor(e,t,n){var s,a;let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=ur.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,n,i.backend,i)}queueLoad(e,t,n,i){const s={},a={},u={},f={};return e.forEach(d=>{let m=!0;t.forEach(v=>{const y=`${d}|${v}`;!n.reload&&this.store.hasResourceBundle(d,v)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?a[y]===void 0&&(a[y]=!0):(this.state[y]=1,m=!1,a[y]===void 0&&(a[y]=!0),s[y]===void 0&&(s[y]=!0),f[v]===void 0&&(f[v]=!0)))}),m||(u[d]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(f)}}loaded(e,t,n){const i=e.split("|"),s=i[0],a=i[1];t&&this.emit("failedLoading",s,a,t),!t&&n&&this.store.addResourceBundle(s,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const u={};this.queue.forEach(f=>{gv(f.loaded,[s],a),Nv(f,e),t&&f.errors.push(t),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(d=>{u[d]||(u[d]={});const m=f.loaded[d];m.length&&m.forEach(v=>{u[d][v]===void 0&&(u[d][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(f=>!f.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:s,callback:a});return}this.readingCalls++;const u=(d,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(d&&m&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,s*2,a)},s);return}a(d,m)},f=this.backend[n].bind(this.backend);if(f.length===2){try{const d=f(e,t);d&&typeof d.then=="function"?d.then(m=>u(null,m)).catch(u):u(null,d)}catch(d){u(d)}return}return f(e,t,u)}prepareLoading(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Fe(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Fe(t)&&(t=[t]);const s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(a,u)=>{a&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,a),!a&&u&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,u),this.loaded(e,a,u)})}saveMissing(e,t,n,i,s){var f,d,m,v,y;let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((d=(f=this.services)==null?void 0:f.utils)!=null&&d.hasLoadedNamespace&&!((v=(m=this.services)==null?void 0:m.utils)!=null&&v.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((y=this.backend)!=null&&y.create){const x={...a,isUpdate:s},A=this.backend.create.bind(this.backend);if(A.length<6)try{let O;A.length===5?O=A(e,t,n,i,x):O=A(e,t,n,i),O&&typeof O.then=="function"?O.then(N=>u(null,N)).catch(u):u(null,O)}catch(O){u(O)}else A(e,t,n,i,u,x)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}const of=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let e={};if(typeof r[1]=="object"&&(e=r[1]),Fe(r[1])&&(e.defaultValue=r[1]),Fe(r[2])&&(e.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const t=r[3]||r[2];Object.keys(t).forEach(n=>{e[n]=t[n]})}return e},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),af=r=>{var e,t;return Fe(r.ns)&&(r.ns=[r.ns]),Fe(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),Fe(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),((t=(e=r.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r},ho=()=>{},Lv=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})};class xs extends co{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=af(e),this.services={},this.logger=ur,this.modules={external:[]},Lv(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Fe(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=of();this.options={...i,...this.options,...af(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?ur.init(s(this.modules.logger),this.options):ur.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=_v;const v=new tf(this.options);this.store=new Zc(this.options.resources,this.options);const y=this.services;y.logger=ur,y.resourceStore=this.store,y.languageUtils=v,y.pluralResolver=new Sv(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(y.formatter=s(m),y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new Av(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new Cv(s(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",function(x){for(var A=arguments.length,O=new Array(A>1?A-1:0),N=1;N<A;N++)O[N-1]=arguments[N];e.emit(x,...O)}),this.modules.languageDetector&&(y.languageDetector=s(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=s(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new fo(this.services,this.options),this.translator.on("*",function(x){for(var A=arguments.length,O=new Array(A>1?A-1:0),N=1;N<A;N++)O[N-1]=arguments[N];e.emit(x,...O)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,n||(n=ho),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const f=vs(),d=()=>{const m=(v,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(y),n(v,y)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?d():setTimeout(d,0),f}loadResources(e){var s,a;let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const i=Fe(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const u=[],f=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(v=>{v!=="cimode"&&u.indexOf(v)<0&&u.push(v)})};i?f(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(m=>f(m)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,d=>f(d)),this.services.backendConnector.load(u,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(d)})}else n(null)}reloadResources(e,t,n){const i=vs();return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=ho),this.services.backendConnector.reload(e,t,s=>{i.resolve(),n(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Xc.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=vs();this.emit("languageChanging",e);const s=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},a=(f,d)=>{d?(s(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(f,function(){return n.t(...arguments)})},u=f=>{var m,v;!e&&!f&&this.services.languageDetector&&(f=[]);const d=Fe(f)?f:this.services.languageUtils.getBestMatchFromCodes(f);d&&(this.language||s(d),this.translator.language||this.translator.changeLanguage(d),(v=(m=this.services.languageDetector)==null?void 0:m.cacheUserLanguage)==null||v.call(m,d)),this.loadResources(d,y=>{a(y,d)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),i}getFixedT(e,t,n){var i=this;const s=function(a,u){let f;if(typeof u!="object"){for(var d=arguments.length,m=new Array(d>2?d-2:0),v=2;v<d;v++)m[v-2]=arguments[v];f=i.options.overloadTranslationOptionHandler([a,u].concat(m))}else f={...u};f.lng=f.lng||s.lng,f.lngs=f.lngs||s.lngs,f.ns=f.ns||s.ns,f.keyPrefix!==""&&(f.keyPrefix=f.keyPrefix||n||s.keyPrefix);const y=i.options.keySeparator||".";let x;return f.keyPrefix&&Array.isArray(a)?x=a.map(A=>`${f.keyPrefix}${y}${A}`):x=f.keyPrefix?`${f.keyPrefix}${y}${a}`:a,i.t(x,f)};return Fe(e)?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}t(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.translate(...t)}exists(){var i;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(i=this.translator)==null?void 0:i.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const a=(u,f)=>{const d=this.services.backendConnector.state[`${u}|${f}`];return d===-1||d===0||d===2};if(t.precheck){const u=t.precheck(this,a);if(u!==void 0)return u}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!i||a(s,e)))}loadNamespaces(e,t){const n=vs();return this.options.ns?(Fe(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=vs();Fe(e)&&(e=[e]);const i=this.options.preload||[],s=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{n.resolve(),t&&t(a)}),n):(t&&t(),Promise.resolve())}dir(e){var i,s;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((s=this.services)==null?void 0:s.languageUtils)||new tf(of());return t.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new xs(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ho;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new xs(i);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(u=>{s[u]=this[u]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n){const u=Object.keys(this.store.data).reduce((f,d)=>(f[d]={...this.store.data[d]},Object.keys(f[d]).reduce((m,v)=>(m[v]={...f[d][v]},m),{})),{});s.store=new Zc(u,i),s.services.resourceStore=s.store}return s.translator=new fo(s.services,i),s.translator.on("*",function(u){for(var f=arguments.length,d=new Array(f>1?f-1:0),m=1;m<f;m++)d[m-1]=arguments[m];s.emit(u,...d)}),s.init(i,t),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Kt=xs.createInstance();Kt.createInstance=xs.createInstance;const Rv=Kt.createInstance,kv=Kt.dir,Pv=Kt.init,qv=Kt.loadResources,jv=Kt.reloadResources,Iv=Kt.use,$v=Kt.changeLanguage,Dv=Kt.getFixedT,Mv=Kt.t,Bv=Kt.exists,Uv=Kt.setDefaultNamespace,Fv=Kt.hasLoadedNamespace,Kv=Kt.loadNamespaces,Hv=Kt.loadLanguages;function Fa(r){"@babel/helpers - typeof";return Fa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fa(r)}function lf(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Fa(XMLHttpRequest))==="object"}function zv(r){return!!r&&typeof r.then=="function"}function Vv(r){return zv(r)?r:Promise.resolve(r)}function uf(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function cf(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?uf(Object(t),!0).forEach(function(n){Wv(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):uf(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Wv(r,e,t){return(e=Gv(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Gv(r){var e=Yv(r,"string");return ui(e)=="symbol"?e:e+""}function Yv(r,e){if(ui(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(ui(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ui(r){"@babel/helpers - typeof";return ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ui(r)}var Fr=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Fr=global.fetch:typeof window<"u"&&window.fetch&&(Fr=window.fetch);var Es;lf()&&(typeof global<"u"&&global.XMLHttpRequest?Es=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Es=window.XMLHttpRequest));var po;if(typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?po=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(po=window.ActiveXObject)),typeof Fr!="function"&&(Fr=void 0),!Fr&&!Es&&!po)try{Promise.resolve().then(()=>Nw).then(function(r){Fr=r.default}).catch(function(){})}catch{}var Ka=function(e,t){if(t&&ui(t)==="object"){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},ff=function(e,t,n,i){var s=function(f){if(!f.ok)return n(f.statusText||"Error",{status:f.status});f.text().then(function(d){n(null,{status:f.status,data:d})}).catch(n)};if(i){var a=i(e,t);if(a instanceof Promise){a.then(s).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(s).catch(n):Fr(e,t).then(s).catch(n)},hf=!1,Jv=function(e,t,n,i){e.queryStringParams&&(t=Ka(t,e.queryStringParams));var s=cf({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(s["Content-Type"]="application/json");var a=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,u=cf({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},hf?{}:a),f=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ff(t,u,i,f)}catch(d){if(!a||Object.keys(a).length===0||!d.message||d.message.indexOf("not implemented")<0)return i(d);try{Object.keys(a).forEach(function(m){delete u[m]}),ff(t,u,i,f),hf=!0}catch(m){i(m)}}},Zv=function(e,t,n,i){n&&ui(n)==="object"&&(n=Ka("",n).slice(1)),e.queryStringParams&&(t=Ka(t,e.queryStringParams));try{var s=Es?new Es:new po("MSXML2.XMLHTTP.3.0");s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var a=e.customHeaders;if(a=typeof a=="function"?a():a,a)for(var u in a)s.setRequestHeader(u,a[u]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(f){console&&console.log(f)}},Xv=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},Fr&&t.indexOf("file:")!==0)return Jv(e,t,n,i);if(lf()||typeof ActiveXObject=="function")return Zv(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function $i(r){"@babel/helpers - typeof";return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$i(r)}function df(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ha(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?df(Object(t),!0).forEach(function(n){pf(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):df(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Qv(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function e1(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,gf(n.key),n)}}function t1(r,e,t){return e&&e1(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function pf(r,e,t){return(e=gf(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function gf(r){var e=n1(r,"string");return $i(e)=="symbol"?e:e+""}function n1(r,e){if($i(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if($i(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}var r1=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){return pf({},n,i||"")},parseLoadPayload:function(t,n){},request:Xv,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},mf=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Qv(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return t1(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=Ha(Ha(Ha({},r1()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var a=setInterval(function(){return n.reload()},this.options.reloadInterval);$i(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,s,a){var u=this,f=this.options.loadPath;typeof this.options.loadPath=="function"&&(f=this.options.loadPath(t,i)),f=Vv(f),f.then(function(d){if(!d)return a(null,{});var m=u.services.interpolator.interpolate(d,{lng:t.join("+"),ns:i.join("+")});u.loadUrl(m,a,n,s)})}},{key:"loadUrl",value:function(t,n,i,s){var a=this,u=typeof i=="string"?[i]:i,f=typeof s=="string"?[s]:s,d=this.options.parseLoadPayload(u,f);this.options.request(this.options,t,d,function(m,v){if(v&&(v.status>=500&&v.status<600||!v.status))return n("failed loading "+t+"; status code: "+v.status,!0);if(v&&v.status>=400&&v.status<500)return n("failed loading "+t+"; status code: "+v.status,!1);if(!v&&m&&m.message){var y=m.message.toLowerCase(),x=["failed","fetch","network","load"].find(function(N){return y.indexOf(N)>-1});if(x)return n("failed loading "+t+": "+m.message,!0)}if(m)return n(m,!1);var A,O;try{typeof v.data=="string"?A=a.options.parse(v.data,i,s):A=v.data}catch{O="failed parsing "+t+" to json"}if(O)return n(O,!1);n(null,A)})}},{key:"create",value:function(t,n,i,s,a){var u=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var f=this.options.parsePayload(n,i,s),d=0,m=[],v=[];t.forEach(function(y){var x=u.options.addPath;typeof u.options.addPath=="function"&&(x=u.options.addPath(y,n));var A=u.services.interpolator.interpolate(x,{lng:y,ns:n});u.options.request(u.options,A,f,function(O,N){d+=1,m.push(O),v.push(N),d===t.length&&typeof a=="function"&&a(m,v)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,s=n.languageUtils,a=n.logger,u=i.language;if(!(u&&u.toLowerCase()==="cimode")){var f=[],d=function(v){var y=s.toResolveHierarchy(v);y.forEach(function(x){f.indexOf(x)<0&&f.push(x)})};d(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(m){return d(m)}),f.forEach(function(m){t.allOptions.ns.forEach(function(v){i.read(m,v,"read",null,null,function(y,x){y&&a.warn("loading namespace ".concat(v," for language ").concat(m," failed"),y),!y&&x&&a.log("loaded namespace ".concat(v," for language ").concat(m),x),i.loaded("".concat(m,"|").concat(v),y,x)})})})}}}])}();mf.type="backend";const{slice:i1,forEach:s1}=[];function o1(r){return s1.call(i1.call(arguments,1),e=>{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const yf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,a1=function(r,e){const n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let s=`${r}=${i}`;if(n.maxAge>0){const a=n.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(n.domain){if(!yf.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!yf.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},bf={create(r,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=a1(r,encodeURIComponent(e),i)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(r){this.create(r,"",-1)}};var l1={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return bf.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:s}=e;t&&typeof document<"u"&&bf.create(t,r,n,i,s)}},u1={name:"querystring",lookup(r){var n;let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let u=0;u<a.length;u++){const f=a[u].indexOf("=");f>0&&a[u].substring(0,f)===e&&(t=a[u].substring(f+1))}}return t}};let Di=null;const vf=()=>{if(Di!==null)return Di;try{if(Di=typeof window<"u"&&window.localStorage!==null,!Di)return!1;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{Di=!1}return Di};var c1={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&vf())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&vf()&&window.localStorage.setItem(t,r)}};let Mi=null;const wf=()=>{if(Mi!==null)return Mi;try{if(Mi=typeof window<"u"&&window.sessionStorage!==null,!Mi)return!1;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{Mi=!1}return Mi};var f1={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&wf())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&wf()&&window.sessionStorage.setItem(t,r)}},h1={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let s=0;s<t.length;s++)e.push(t[s]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},d1={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},p1={name:"path",lookup(r){var i;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},g1={name:"subdomain",lookup(r){var i,s;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};let xf=!1;try{document.cookie,xf=!0}catch{}const Ef=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];xf||Ef.splice(1,1);const m1=()=>({order:Ef,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r});class Of{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=o1(t,this.options||{},m1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(l1),this.addDetector(u1),this.addDetector(c1),this.addDetector(f1),this.addDetector(h1),this.addDetector(d1),this.addDetector(p1),this.addDetector(g1)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(n=>this.options.convertDetectedLanguage(n)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}Of.type="languageDetector";var y1=Object.defineProperty,b1=(r,e,t)=>e in r?y1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Sf=(r,e,t)=>b1(r,typeof e!="symbol"?e+"":e,t),v1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bi(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var za={exports:{}},w1=za.exports,Af;function x1(){return Af||(Af=1,function(r,e){(function(t,n){r.exports=n()})(w1,function(){var t=function(o,l){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,p){c.__proto__=p}||function(c,p){for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(c[g]=p[g])})(o,l)},n=function(){return(n=Object.assign||function(o){for(var l,c=1,p=arguments.length;c<p;c++)for(var g in l=arguments[c])Object.prototype.hasOwnProperty.call(l,g)&&(o[g]=l[g]);return o}).apply(this,arguments)};function i(o,l,c){for(var p,g=0,b=l.length;g<b;g++)!p&&g in l||((p=p||Array.prototype.slice.call(l,0,g))[g]=l[g]);return o.concat(p||Array.prototype.slice.call(l))}var s=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:v1,a=Object.keys,u=Array.isArray;function f(o,l){return typeof l!="object"||a(l).forEach(function(c){o[c]=l[c]}),o}typeof Promise>"u"||s.Promise||(s.Promise=Promise);var d=Object.getPrototypeOf,m={}.hasOwnProperty;function v(o,l){return m.call(o,l)}function y(o,l){typeof l=="function"&&(l=l(d(o))),(typeof Reflect>"u"?a:Reflect.ownKeys)(l).forEach(function(c){A(o,c,l[c])})}var x=Object.defineProperty;function A(o,l,c,p){x(o,l,f(c&&v(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},p))}function O(o){return{from:function(l){return o.prototype=Object.create(l.prototype),A(o.prototype,"constructor",o),{extend:y.bind(null,o.prototype)}}}}var N=Object.getOwnPropertyDescriptor,M=[].slice;function W(o,l,c){return M.call(o,l,c)}function Z(o,l){return l(o)}function de(o){if(!o)throw new Error("Assertion Failed")}function ue(o){s.setImmediate?setImmediate(o):setTimeout(o,0)}function ce(o,l){if(typeof l=="string"&&v(o,l))return o[l];if(!l)return o;if(typeof l!="string"){for(var c=[],p=0,g=l.length;p<g;++p){var b=ce(o,l[p]);c.push(b)}return c}var _=l.indexOf(".");if(_!==-1){var C=o[l.substr(0,_)];return C==null?void 0:ce(C,l.substr(_+1))}}function ne(o,l,c){if(o&&l!==void 0&&!("isFrozen"in Object&&Object.isFrozen(o)))if(typeof l!="string"&&"length"in l){de(typeof c!="string"&&"length"in c);for(var p=0,g=l.length;p<g;++p)ne(o,l[p],c[p])}else{var b,_,C=l.indexOf(".");C!==-1?(b=l.substr(0,C),(_=l.substr(C+1))===""?c===void 0?u(o)&&!isNaN(parseInt(b))?o.splice(b,1):delete o[b]:o[b]=c:ne(C=!(C=o[b])||!v(o,b)?o[b]={}:C,_,c)):c===void 0?u(o)&&!isNaN(parseInt(l))?o.splice(l,1):delete o[l]:o[l]=c}}function re(o){var l,c={};for(l in o)v(o,l)&&(c[l]=o[l]);return c}var xe=[].concat;function Se(o){return xe.apply([],o)}var an="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Se([8,16,32,64].map(function(o){return["Int","Uint","Float"].map(function(l){return l+o+"Array"})}))).filter(function(o){return s[o]}),S=new Set(an.map(function(o){return s[o]})),G=null;function P(o){return G=new WeakMap,o=function l(c){if(!c||typeof c!="object")return c;var p=G.get(c);if(p)return p;if(u(c)){p=[],G.set(c,p);for(var g=0,b=c.length;g<b;++g)p.push(l(c[g]))}else if(S.has(c.constructor))p=c;else{var _,C=d(c);for(_ in p=C===Object.prototype?{}:Object.create(C),G.set(c,p),c)v(c,_)&&(p[_]=l(c[_]))}return p}(o),G=null,o}var V={}.toString;function E(o){return V.call(o).slice(8,-1)}var T=typeof Symbol<"u"?Symbol.iterator:"@@iterator",$=typeof T=="symbol"?function(o){var l;return o!=null&&(l=o[T])&&l.apply(o)}:function(){return null};function U(o,l){return l=o.indexOf(l),0<=l&&o.splice(l,1),0<=l}var J={};function z(o){var l,c,p,g;if(arguments.length===1){if(u(o))return o.slice();if(this===J&&typeof o=="string")return[o];if(g=$(o)){for(c=[];!(p=g.next()).done;)c.push(p.value);return c}if(o==null)return[o];if(typeof(l=o.length)!="number")return[o];for(c=new Array(l);l--;)c[l]=o[l];return c}for(l=arguments.length,c=new Array(l);l--;)c[l]=arguments[l];return c}var le=typeof Symbol<"u"?function(o){return o[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},on=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Un=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(on),ve={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function pe(o,l){this.name=o,this.message=l}function Ne(o,l){return o+". Errors: "+Object.keys(l).map(function(c){return l[c].toString()}).filter(function(c,p,g){return g.indexOf(c)===p}).join(`
79
79
  `)}function Oe(o,l,c,p){this.failures=l,this.failedKeys=p,this.successCount=c,this.message=Ne(o,l)}function Ke(o,l){this.name="BulkError",this.failures=Object.keys(l).map(function(c){return l[c]}),this.failuresByPos=l,this.message=Ne(o,this.failures)}O(pe).from(Error).extend({toString:function(){return this.name+": "+this.message}}),O(Oe).from(pe),O(Ke).from(pe);var We=Un.reduce(function(o,l){return o[l]=l+"Error",o},{}),Ie=pe,ae=Un.reduce(function(o,l){var c=l+"Error";function p(g,b){this.name=c,g?typeof g=="string"?(this.message="".concat(g).concat(b?`
80
80
  `+b:""),this.inner=b||null):typeof g=="object"&&(this.message="".concat(g.name," ").concat(g.message),this.inner=g):(this.message=ve[l]||c,this.inner=null)}return O(p).from(Ie),o[l]=p,o},{});ae.Syntax=SyntaxError,ae.Type=TypeError,ae.Range=RangeError;var je=on.reduce(function(o,l){return o[l+"Error"]=ae[l],o},{}),$e=Un.reduce(function(o,l){return["Syntax","Type","Range"].indexOf(l)===-1&&(o[l+"Error"]=ae[l]),o},{});function Te(){}function Ue(o){return o}function ut(o,l){return o==null||o===Ue?l:function(c){return l(o(c))}}function ot(o,l){return function(){o.apply(this,arguments),l.apply(this,arguments)}}function zt(o,l){return o===Te?l:function(){var c=o.apply(this,arguments);c!==void 0&&(arguments[0]=c);var p=this.onsuccess,g=this.onerror;this.onsuccess=null,this.onerror=null;var b=l.apply(this,arguments);return p&&(this.onsuccess=this.onsuccess?ot(p,this.onsuccess):p),g&&(this.onerror=this.onerror?ot(g,this.onerror):g),b!==void 0?b:c}}function Vt(o,l){return o===Te?l:function(){o.apply(this,arguments);var c=this.onsuccess,p=this.onerror;this.onsuccess=this.onerror=null,l.apply(this,arguments),c&&(this.onsuccess=this.onsuccess?ot(c,this.onsuccess):c),p&&(this.onerror=this.onerror?ot(p,this.onerror):p)}}function kn(o,l){return o===Te?l:function(c){var p=o.apply(this,arguments);f(c,p);var g=this.onsuccess,b=this.onerror;return this.onsuccess=null,this.onerror=null,c=l.apply(this,arguments),g&&(this.onsuccess=this.onsuccess?ot(g,this.onsuccess):g),b&&(this.onerror=this.onerror?ot(b,this.onerror):b),p===void 0?c===void 0?void 0:c:f(p,c)}}function Pn(o,l){return o===Te?l:function(){return l.apply(this,arguments)!==!1&&o.apply(this,arguments)}}function Xt(o,l){return o===Te?l:function(){var c=o.apply(this,arguments);if(c&&typeof c.then=="function"){for(var p=this,g=arguments.length,b=new Array(g);g--;)b[g]=arguments[g];return c.then(function(){return l.apply(p,b)})}return l.apply(this,arguments)}}$e.ModifyError=Oe,$e.DexieError=pe,$e.BulkError=Ke;var Lt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Cr(o){Lt=o}var sn={},Qt=100,an=typeof Promise>"u"?[]:function(){var o=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[o,d(o),o];var l=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[l,d(l),o]}(),on=an[0],Un=an[1],an=an[2],Un=Un&&Un.then,Rt=on&&on.constructor,mn=!!an,yn=function(o,l){un.push([o,l]),qn&&(queueMicrotask(Lr),qn=!1)},Ct=!0,qn=!0,ln=[],hr=[],Xn=Ue,Dt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Te,pgp:!1,env:{},finalize:Te},Le=Dt,un=[],Mt=0,_t=[];function me(o){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var l=this._PSD=Le;if(typeof o!="function"){if(o!==sn)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&bn(this,this._value))}this._state=null,this._value=null,++l.ref,function c(p,g){try{g(function(b){if(p._state===null){if(b===p)throw new TypeError("A promise cannot be resolved with itself.");var _=p._lib&&kt();b&&typeof b.then=="function"?c(p,function(C,q){b instanceof me?b._then(C,q):b.then(C,q)}):(p._state=!0,p._value=b,vn(p)),_&&fn()}},bn.bind(null,p))}catch(b){bn(p,b)}}(this,o)}var Wt={get:function(){var o=Le,l=gr;function c(p,g){var b=this,_=!o.global&&(o!==Le||l!==gr),C=_&&!qe(),q=new me(function(I,F){Qn(b,new cn(ct(p,o,_,C),ct(g,o,_,C),I,F,o))});return this._consoleTask&&(q._consoleTask=this._consoleTask),q}return c.prototype=sn,c},set:function(o){A(this,"then",o&&o.prototype===sn?Wt:{get:function(){return o},set:Wt.set})}};function cn(o,l,c,p,g){this.onFulfilled=typeof o=="function"?o:null,this.onRejected=typeof l=="function"?l:null,this.resolve=c,this.reject=p,this.psd=g}function bn(o,l){var c,p;hr.push(l),o._state===null&&(c=o._lib&&kt(),l=Xn(l),o._state=!1,o._value=l,p=o,ln.some(function(g){return g._value===p._value})||ln.push(p),vn(o),c&&fn())}function vn(o){var l=o._listeners;o._listeners=[];for(var c=0,p=l.length;c<p;++c)Qn(o,l[c]);var g=o._PSD;--g.ref||g.finalize(),Mt===0&&(++Mt,yn(function(){--Mt==0&&en()},[]))}function Qn(o,l){if(o._state!==null){var c=o._state?l.onFulfilled:l.onRejected;if(c===null)return(o._state?l.resolve:l.reject)(o._value);++l.psd.ref,++Mt,yn(dr,[c,o,l])}else o._listeners.push(l)}function dr(o,l,c){try{var p,g=l._value;!l._state&&hr.length&&(hr=[]),p=Lt&&l._consoleTask?l._consoleTask.run(function(){return o(g)}):o(g),l._state||hr.indexOf(g)!==-1||function(b){for(var _=ln.length;_;)if(ln[--_]._value===b._value)return ln.splice(_,1)}(l),c.resolve(p)}catch(b){c.reject(b)}finally{--Mt==0&&en(),--c.psd.ref||c.psd.finalize()}}function Lr(){ft(Dt,function(){kt()&&fn()})}function kt(){var o=Ct;return qn=Ct=!1,o}function fn(){var o,l,c;do for(;0<un.length;)for(o=un,un=[],c=o.length,l=0;l<c;++l){var p=o[l];p[0].apply(null,p[1])}while(0<un.length);qn=Ct=!0}function en(){var o=ln;ln=[],o.forEach(function(p){p._PSD.onunhandled.call(null,p._value,p)});for(var l=_t.slice(0),c=l.length;c;)l[--c]()}function pr(o){return new me(sn,!1,o)}function at(o,l){var c=Le;return function(){var p=kt(),g=Le;try{return Be(c,!0),o.apply(this,arguments)}catch(b){l&&l(b)}finally{Be(g,!1),p&&fn()}}}y(me.prototype,{then:Wt,_then:function(o,l){Qn(this,new cn(null,null,o,l,Le))},catch:function(o){if(arguments.length===1)return this.then(null,o);var l=o,c=arguments[1];return typeof l=="function"?this.then(null,function(p){return(p instanceof l?c:pr)(p)}):this.then(null,function(p){return(p&&p.name===l?c:pr)(p)})},finally:function(o){return this.then(function(l){return me.resolve(o()).then(function(){return l})},function(l){return me.resolve(o()).then(function(){return pr(l)})})},timeout:function(o,l){var c=this;return o<1/0?new me(function(p,g){var b=setTimeout(function(){return g(new ae.Timeout(l))},o);c.then(p,g).finally(clearTimeout.bind(null,b))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&A(me.prototype,Symbol.toStringTag,"Dexie.Promise"),Dt.env=He(),y(me,{all:function(){var o=z.apply(null,arguments).map(De);return new me(function(l,c){o.length===0&&l([]);var p=o.length;o.forEach(function(g,b){return me.resolve(g).then(function(_){o[b]=_,--p||l(o)},c)})})},resolve:function(o){return o instanceof me?o:o&&typeof o.then=="function"?new me(function(l,c){o.then(l,c)}):new me(sn,!0,o)},reject:pr,race:function(){var o=z.apply(null,arguments).map(De);return new me(function(l,c){o.map(function(p){return me.resolve(p).then(l,c)})})},PSD:{get:function(){return Le},set:function(o){return Le=o}},totalEchoes:{get:function(){return gr}},newPSD:oe,usePSD:ft,scheduler:{get:function(){return yn},set:function(o){yn=o}},rejectionMapper:{get:function(){return Xn},set:function(o){Xn=o}},follow:function(o,l){return new me(function(c,p){return oe(function(g,b){var _=Le;_.unhandleds=[],_.onunhandled=b,_.finalize=ot(function(){var C,q=this;C=function(){q.unhandleds.length===0?g():b(q.unhandleds[0])},_t.push(function I(){C(),_t.splice(_t.indexOf(I),1)}),++Mt,yn(function(){--Mt==0&&en()},[])},_.finalize),o()},l,c,p)})}}),Rt&&(Rt.allSettled&&A(me,"allSettled",function(){var o=z.apply(null,arguments).map(De);return new me(function(l){o.length===0&&l([]);var c=o.length,p=new Array(c);o.forEach(function(g,b){return me.resolve(g).then(function(_){return p[b]={status:"fulfilled",value:_}},function(_){return p[b]={status:"rejected",reason:_}}).then(function(){return--c||l(p)})})})}),Rt.any&&typeof AggregateError<"u"&&A(me,"any",function(){var o=z.apply(null,arguments).map(De);return new me(function(l,c){o.length===0&&c(new AggregateError([]));var p=o.length,g=new Array(p);o.forEach(function(b,_){return me.resolve(b).then(function(C){return l(C)},function(C){g[_]=C,--p||c(new AggregateError(g))})})})}),Rt.withResolvers&&(me.withResolvers=Rt.withResolvers));var pt={awaits:0,echoes:0,id:0},Kr=0,jn=[],gt=0,gr=0,L=0;function oe(o,l,c,p){var g=Le,b=Object.create(g);return b.parent=g,b.ref=0,b.global=!1,b.id=++L,Dt.env,b.env=mn?{Promise:me,PromiseProp:{value:me,configurable:!0,writable:!0},all:me.all,race:me.race,allSettled:me.allSettled,any:me.any,resolve:me.resolve,reject:me.reject}:{},l&&f(b,l),++g.ref,b.finalize=function(){--this.parent.ref||this.parent.finalize()},p=ft(b,o,c,p),b.ref===0&&b.finalize(),p}function we(){return pt.id||(pt.id=++Kr),++pt.awaits,pt.echoes+=Qt,pt.id}function qe(){return!!pt.awaits&&(--pt.awaits==0&&(pt.id=0),pt.echoes=pt.awaits*Qt,!0)}function De(o){return pt.echoes&&o&&o.constructor===Rt?(we(),o.then(function(l){return qe(),l},function(l){return qe(),Xe(l)})):o}function it(){var o=jn[jn.length-1];jn.pop(),Be(o,!1)}function Be(o,l){var c,p=Le;(l?!pt.echoes||gt++&&o===Le:!gt||--gt&&o===Le)||queueMicrotask(l?(function(g){++gr,pt.echoes&&--pt.echoes!=0||(pt.echoes=pt.awaits=pt.id=0),jn.push(Le),Be(g,!0)}).bind(null,o):it),o!==Le&&(Le=o,p===Dt&&(Dt.env=He()),mn&&(c=Dt.env.Promise,l=o.env,(p.global||o.global)&&(Object.defineProperty(s,"Promise",l.PromiseProp),c.all=l.all,c.race=l.race,c.resolve=l.resolve,c.reject=l.reject,l.allSettled&&(c.allSettled=l.allSettled),l.any&&(c.any=l.any))))}function He(){var o=s.Promise;return mn?{Promise:o,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:o.all,race:o.race,allSettled:o.allSettled,any:o.any,resolve:o.resolve,reject:o.reject}:{}}function ft(o,l,c,p,g){var b=Le;try{return Be(o,!0),l(c,p,g)}finally{Be(b,!1)}}function ct(o,l,c,p){return typeof o!="function"?o:function(){var g=Le;c&&we(),Be(l,!0);try{return o.apply(this,arguments)}finally{Be(g,!1),p&&queueMicrotask(qe)}}}function Je(o){Promise===Rt&&pt.echoes===0?gt===0?o():enqueueNativeMicroTask(o):setTimeout(o,0)}(""+Un).indexOf("[native code]")===-1&&(we=qe=Te);var Xe=me.reject,Pt="￿",Ot="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",St="String expected.",hn=[],wn="__dbnames",mr="readonly",yr="readwrite";function qt(o,l){return o?l?function(){return o.apply(this,arguments)&&l.apply(this,arguments)}:o:l}var Hr={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function zr(o){return typeof o!="string"||/\./.test(o)?function(l){return l}:function(l){return l[o]===void 0&&o in l&&delete(l=P(l))[o],l}}function Ki(){throw ae.Type()}function Ze(o,l){try{var c=Hi(o),p=Hi(l);if(c!==p)return c==="Array"?1:p==="Array"?-1:c==="binary"?1:p==="binary"?-1:c==="string"?1:p==="string"?-1:c==="Date"?1:p!=="Date"?NaN:-1;switch(c){case"number":case"Date":case"string":return l<o?1:o<l?-1:0;case"binary":return function(g,b){for(var _=g.length,C=b.length,q=_<C?_:C,I=0;I<q;++I)if(g[I]!==b[I])return g[I]<b[I]?-1:1;return _===C?0:_<C?-1:1}(zi(o),zi(l));case"Array":return function(g,b){for(var _=g.length,C=b.length,q=_<C?_:C,I=0;I<q;++I){var F=Ze(g[I],b[I]);if(F!==0)return F}return _===C?0:_<C?-1:1}(o,l)}}catch{}return NaN}function Hi(o){var l=typeof o;return l!="object"?l:ArrayBuffer.isView(o)?"binary":(o=E(o),o==="ArrayBuffer"?"binary":o)}function zi(o){return o instanceof Uint8Array?o:ArrayBuffer.isView(o)?new Uint8Array(o.buffer,o.byteOffset,o.byteLength):new Uint8Array(o)}var Rr=(lt.prototype._trans=function(o,l,c){var p=this._tx||Le.trans,g=this.name,b=Lt&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(o==="readonly"?"read":"write"," ").concat(this.name));function _(I,F,R){if(!R.schema[g])throw new ae.NotFound("Table "+g+" not part of transaction");return l(R.idbtrans,R)}var C=kt();try{var q=p&&p.db._novip===this.db._novip?p===Le.trans?p._promise(o,_,c):oe(function(){return p._promise(o,_,c)},{trans:p,transless:Le.transless||Le}):function I(F,R,H,j){if(F.idbdb&&(F._state.openComplete||Le.letThrough||F._vip)){var B=F._createTransaction(R,H,F._dbSchema);try{B.create(),F._state.PR1398_maxLoop=3}catch(K){return K.name===We.InvalidState&&F.isOpen()&&0<--F._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),F.close({disableAutoOpen:!1}),F.open().then(function(){return I(F,R,H,j)})):Xe(K)}return B._promise(R,function(K,D){return oe(function(){return Le.trans=B,j(K,D,B)})}).then(function(K){if(R==="readwrite")try{B.idbtrans.commit()}catch{}return R==="readonly"?K:B._completion.then(function(){return K})})}if(F._state.openComplete)return Xe(new ae.DatabaseClosed(F._state.dbOpenError));if(!F._state.isBeingOpened){if(!F._state.autoOpen)return Xe(new ae.DatabaseClosed);F.open().catch(Te)}return F._state.dbReadyPromise.then(function(){return I(F,R,H,j)})}(this.db,o,[this.name],_);return b&&(q._consoleTask=b,q=q.catch(function(I){return console.trace(I),Xe(I)})),q}finally{C&&fn()}},lt.prototype.get=function(o,l){var c=this;return o&&o.constructor===Object?this.where(o).first(l):o==null?Xe(new ae.Type("Invalid argument to Table.get()")):this._trans("readonly",function(p){return c.core.get({trans:p,key:o}).then(function(g){return c.hook.reading.fire(g)})}).then(l)},lt.prototype.where=function(o){if(typeof o=="string")return new this.db.WhereClause(this,o);if(u(o))return new this.db.WhereClause(this,"[".concat(o.join("+"),"]"));var l=a(o);if(l.length===1)return this.where(l[0]).equals(o[l[0]]);var c=this.schema.indexes.concat(this.schema.primKey).filter(function(C){if(C.compound&&l.every(function(I){return 0<=C.keyPath.indexOf(I)})){for(var q=0;q<l.length;++q)if(l.indexOf(C.keyPath[q])===-1)return!1;return!0}return!1}).sort(function(C,q){return C.keyPath.length-q.keyPath.length})[0];if(c&&this.db._maxKey!==Pt){var b=c.keyPath.slice(0,l.length);return this.where(b).equals(b.map(function(q){return o[q]}))}!c&&Lt&&console.warn("The query ".concat(JSON.stringify(o)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(l.join("+"),"]"));var p=this.schema.idxByName;function g(C,q){return Ze(C,q)===0}var _=l.reduce(function(R,q){var I=R[0],F=R[1],R=p[q],H=o[q];return[I||R,I||!R?qt(F,R&&R.multi?function(j){return j=ce(j,q),u(j)&&j.some(function(B){return g(H,B)})}:function(j){return g(H,ce(j,q))}):F]},[null,null]),b=_[0],_=_[1];return b?this.where(b.name).equals(o[b.keyPath]).filter(_):c?this.filter(_):this.where(l).equals("")},lt.prototype.filter=function(o){return this.toCollection().and(o)},lt.prototype.count=function(o){return this.toCollection().count(o)},lt.prototype.offset=function(o){return this.toCollection().offset(o)},lt.prototype.limit=function(o){return this.toCollection().limit(o)},lt.prototype.each=function(o){return this.toCollection().each(o)},lt.prototype.toArray=function(o){return this.toCollection().toArray(o)},lt.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},lt.prototype.orderBy=function(o){return new this.db.Collection(new this.db.WhereClause(this,u(o)?"[".concat(o.join("+"),"]"):o))},lt.prototype.reverse=function(){return this.toCollection().reverse()},lt.prototype.mapToClass=function(o){var l,c=this.db,p=this.name;function g(){return l!==null&&l.apply(this,arguments)||this}(this.schema.mappedClass=o).prototype instanceof Ki&&(function(q,I){if(typeof I!="function"&&I!==null)throw new TypeError("Class extends value "+String(I)+" is not a constructor or null");function F(){this.constructor=q}t(q,I),q.prototype=I===null?Object.create(I):(F.prototype=I.prototype,new F)}(g,l=o),Object.defineProperty(g.prototype,"db",{get:function(){return c},enumerable:!1,configurable:!0}),g.prototype.table=function(){return p},o=g);for(var b=new Set,_=o.prototype;_;_=d(_))Object.getOwnPropertyNames(_).forEach(function(q){return b.add(q)});function C(q){if(!q)return q;var I,F=Object.create(o.prototype);for(I in q)if(!b.has(I))try{F[I]=q[I]}catch{}return F}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=C,this.hook("reading",C),o},lt.prototype.defineClass=function(){return this.mapToClass(function(o){f(this,o)})},lt.prototype.add=function(o,l){var c=this,p=this.schema.primKey,g=p.auto,b=p.keyPath,_=o;return b&&g&&(_=zr(b)(o)),this._trans("readwrite",function(C){return c.core.mutate({trans:C,type:"add",keys:l!=null?[l]:null,values:[_]})}).then(function(C){return C.numFailures?me.reject(C.failures[0]):C.lastResult}).then(function(C){if(b)try{ne(o,b,C)}catch{}return C})},lt.prototype.update=function(o,l){return typeof o!="object"||u(o)?this.where(":id").equals(o).modify(l):(o=ce(o,this.schema.primKey.keyPath),o===void 0?Xe(new ae.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(o).modify(l))},lt.prototype.put=function(o,l){var c=this,p=this.schema.primKey,g=p.auto,b=p.keyPath,_=o;return b&&g&&(_=zr(b)(o)),this._trans("readwrite",function(C){return c.core.mutate({trans:C,type:"put",values:[_],keys:l!=null?[l]:null})}).then(function(C){return C.numFailures?me.reject(C.failures[0]):C.lastResult}).then(function(C){if(b)try{ne(o,b,C)}catch{}return C})},lt.prototype.delete=function(o){var l=this;return this._trans("readwrite",function(c){return l.core.mutate({trans:c,type:"delete",keys:[o]})}).then(function(c){return c.numFailures?me.reject(c.failures[0]):void 0})},lt.prototype.clear=function(){var o=this;return this._trans("readwrite",function(l){return o.core.mutate({trans:l,type:"deleteRange",range:Hr})}).then(function(l){return l.numFailures?me.reject(l.failures[0]):void 0})},lt.prototype.bulkGet=function(o){var l=this;return this._trans("readonly",function(c){return l.core.getMany({keys:o,trans:c}).then(function(p){return p.map(function(g){return l.hook.reading.fire(g)})})})},lt.prototype.bulkAdd=function(o,l,c){var p=this,g=Array.isArray(l)?l:void 0,b=(c=c||(g?void 0:l))?c.allKeys:void 0;return this._trans("readwrite",function(_){var I=p.schema.primKey,C=I.auto,I=I.keyPath;if(I&&g)throw new ae.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(g&&g.length!==o.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var q=o.length,I=I&&C?o.map(zr(I)):o;return p.core.mutate({trans:_,type:"add",keys:g,values:I,wantResults:b}).then(function(B){var R=B.numFailures,H=B.results,j=B.lastResult,B=B.failures;if(R===0)return b?H:j;throw new Ke("".concat(p.name,".bulkAdd(): ").concat(R," of ").concat(q," operations failed"),B)})})},lt.prototype.bulkPut=function(o,l,c){var p=this,g=Array.isArray(l)?l:void 0,b=(c=c||(g?void 0:l))?c.allKeys:void 0;return this._trans("readwrite",function(_){var I=p.schema.primKey,C=I.auto,I=I.keyPath;if(I&&g)throw new ae.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(g&&g.length!==o.length)throw new ae.InvalidArgument("Arguments objects and keys must have the same length");var q=o.length,I=I&&C?o.map(zr(I)):o;return p.core.mutate({trans:_,type:"put",keys:g,values:I,wantResults:b}).then(function(B){var R=B.numFailures,H=B.results,j=B.lastResult,B=B.failures;if(R===0)return b?H:j;throw new Ke("".concat(p.name,".bulkPut(): ").concat(R," of ").concat(q," operations failed"),B)})})},lt.prototype.bulkUpdate=function(o){var l=this,c=this.core,p=o.map(function(_){return _.key}),g=o.map(function(_){return _.changes}),b=[];return this._trans("readwrite",function(_){return c.getMany({trans:_,keys:p,cache:"clone"}).then(function(C){var q=[],I=[];o.forEach(function(R,H){var j=R.key,B=R.changes,K=C[H];if(K){for(var D=0,Y=Object.keys(B);D<Y.length;D++){var X=Y[D],Q=B[X];if(X===l.schema.primKey.keyPath){if(Ze(Q,j)!==0)throw new ae.Constraint("Cannot update primary key in bulkUpdate()")}else ne(K,X,Q)}b.push(H),q.push(j),I.push(K)}});var F=q.length;return c.mutate({trans:_,type:"put",keys:q,values:I,updates:{keys:p,changeSpecs:g}}).then(function(R){var H=R.numFailures,j=R.failures;if(H===0)return F;for(var B=0,K=Object.keys(j);B<K.length;B++){var D,Y=K[B],X=b[Number(Y)];X!=null&&(D=j[Y],delete j[Y],j[X]=D)}throw new Ke("".concat(l.name,".bulkUpdate(): ").concat(H," of ").concat(F," operations failed"),j)})})})},lt.prototype.bulkDelete=function(o){var l=this,c=o.length;return this._trans("readwrite",function(p){return l.core.mutate({trans:p,type:"delete",keys:o})}).then(function(_){var g=_.numFailures,b=_.lastResult,_=_.failures;if(g===0)return b;throw new Ke("".concat(l.name,".bulkDelete(): ").concat(g," of ").concat(c," operations failed"),_)})},lt);function lt(){}function xn(o){function l(_,C){if(C){for(var q=arguments.length,I=new Array(q-1);--q;)I[q-1]=arguments[q];return c[_].subscribe.apply(null,I),o}if(typeof _=="string")return c[_]}var c={};l.addEventType=b;for(var p=1,g=arguments.length;p<g;++p)b(arguments[p]);return l;function b(_,C,q){if(typeof _!="object"){var I;C=C||Pn;var F={subscribers:[],fire:q=q||Te,subscribe:function(R){F.subscribers.indexOf(R)===-1&&(F.subscribers.push(R),F.fire=C(F.fire,R))},unsubscribe:function(R){F.subscribers=F.subscribers.filter(function(H){return H!==R}),F.fire=F.subscribers.reduce(C,q)}};return c[_]=l[_]=F}a(I=_).forEach(function(R){var H=I[R];if(u(H))b(R,I[R][0],I[R][1]);else{if(H!=="asap")throw new ae.InvalidArgument("Invalid event config");var j=b(R,Ue,function(){for(var B=arguments.length,K=new Array(B);B--;)K[B]=arguments[B];j.subscribers.forEach(function(D){ue(function(){D.apply(null,K)})})})}})}}function br(o,l){return O(l).from({prototype:o}),l}function er(o,l){return!(o.filter||o.algorithm||o.or)&&(l?o.justLimit:!o.replayFilter)}function di(o,l){o.filter=qt(o.filter,l)}function pi(o,l,c){var p=o.replayFilter;o.replayFilter=p?function(){return qt(p(),l())}:l,o.justLimit=c&&!p}function Vr(o,l){if(o.isPrimKey)return l.primaryKey;var c=l.getIndexByKeyPath(o.index);if(!c)throw new ae.Schema("KeyPath "+o.index+" on object store "+l.name+" is not indexed");return c}function Vi(o,l,c){var p=Vr(o,l.schema);return l.openCursor({trans:c,values:!o.keysOnly,reverse:o.dir==="prev",unique:!!o.unique,query:{index:p,range:o.range}})}function vr(o,l,c,p){var g=o.replayFilter?qt(o.filter,o.replayFilter()):o.filter;if(o.or){var b={},_=function(C,q,I){var F,R;g&&!g(q,I,function(H){return q.stop(H)},function(H){return q.fail(H)})||((R=""+(F=q.primaryKey))=="[object ArrayBuffer]"&&(R=""+new Uint8Array(F)),v(b,R)||(b[R]=!0,l(C,q,I)))};return Promise.all([o.or._iterate(_,c),Wi(Vi(o,p,c),o.algorithm,_,!o.keysOnly&&o.valueMapper)])}return Wi(Vi(o,p,c),qt(o.algorithm,g),l,!o.keysOnly&&o.valueMapper)}function Wi(o,l,c,p){var g=at(p?function(b,_,C){return c(p(b),_,C)}:c);return o.then(function(b){if(b)return b.start(function(){var _=function(){return b.continue()};l&&!l(b,function(C){return _=C},function(C){b.stop(C),_=Te},function(C){b.fail(C),_=Te})||g(b.value,b,function(C){return _=C}),_()})})}var kr=(wr.prototype.execute=function(o){var l=this["@@propmod"];if(l.add!==void 0){var c=l.add;if(u(c))return i(i([],u(o)?o:[],!0),c).sort();if(typeof c=="number")return(Number(o)||0)+c;if(typeof c=="bigint")try{return BigInt(o)+c}catch{return BigInt(0)+c}throw new TypeError("Invalid term ".concat(c))}if(l.remove!==void 0){var p=l.remove;if(u(p))return u(o)?o.filter(function(g){return!p.includes(g)}).sort():[];if(typeof p=="number")return Number(o)-p;if(typeof p=="bigint")try{return BigInt(o)-p}catch{return BigInt(0)-p}throw new TypeError("Invalid subtrahend ".concat(p))}return c=(c=l.replacePrefix)===null||c===void 0?void 0:c[0],c&&typeof o=="string"&&o.startsWith(c)?l.replacePrefix[1]+o.substring(c.length):o},wr);function wr(o){this["@@propmod"]=o}var En=(Ge.prototype._read=function(o,l){var c=this._ctx;return c.error?c.table._trans(null,Xe.bind(null,c.error)):c.table._trans("readonly",o).then(l)},Ge.prototype._write=function(o){var l=this._ctx;return l.error?l.table._trans(null,Xe.bind(null,l.error)):l.table._trans("readwrite",o,"locked")},Ge.prototype._addAlgorithm=function(o){var l=this._ctx;l.algorithm=qt(l.algorithm,o)},Ge.prototype._iterate=function(o,l){return vr(this._ctx,o,l,this._ctx.table.core)},Ge.prototype.clone=function(o){var l=Object.create(this.constructor.prototype),c=Object.create(this._ctx);return o&&f(c,o),l._ctx=c,l},Ge.prototype.raw=function(){return this._ctx.valueMapper=null,this},Ge.prototype.each=function(o){var l=this._ctx;return this._read(function(c){return vr(l,o,c,l.table.core)})},Ge.prototype.count=function(o){var l=this;return this._read(function(c){var p=l._ctx,g=p.table.core;if(er(p,!0))return g.count({trans:c,query:{index:Vr(p,g.schema),range:p.range}}).then(function(_){return Math.min(_,p.limit)});var b=0;return vr(p,function(){return++b,!1},c,g).then(function(){return b})}).then(o)},Ge.prototype.sortBy=function(o,l){var c=o.split(".").reverse(),p=c[0],g=c.length-1;function b(q,I){return I?b(q[c[I]],I-1):q[p]}var _=this._ctx.dir==="next"?1:-1;function C(q,I){return Ze(b(q,g),b(I,g))*_}return this.toArray(function(q){return q.sort(C)}).then(l)},Ge.prototype.toArray=function(o){var l=this;return this._read(function(c){var p=l._ctx;if(p.dir==="next"&&er(p,!0)&&0<p.limit){var g=p.valueMapper,b=Vr(p,p.table.core.schema);return p.table.core.query({trans:c,limit:p.limit,values:!0,query:{index:b,range:p.range}}).then(function(C){return C=C.result,g?C.map(g):C})}var _=[];return vr(p,function(C){return _.push(C)},c,p.table.core).then(function(){return _})},o)},Ge.prototype.offset=function(o){var l=this._ctx;return o<=0||(l.offset+=o,er(l)?pi(l,function(){var c=o;return function(p,g){return c===0||(c===1?--c:g(function(){p.advance(c),c=0}),!1)}}):pi(l,function(){var c=o;return function(){return--c<0}})),this},Ge.prototype.limit=function(o){return this._ctx.limit=Math.min(this._ctx.limit,o),pi(this._ctx,function(){var l=o;return function(c,p,g){return--l<=0&&p(g),0<=l}},!0),this},Ge.prototype.until=function(o,l){return di(this._ctx,function(c,p,g){return!o(c.value)||(p(g),l)}),this},Ge.prototype.first=function(o){return this.limit(1).toArray(function(l){return l[0]}).then(o)},Ge.prototype.last=function(o){return this.reverse().first(o)},Ge.prototype.filter=function(o){var l;return di(this._ctx,function(c){return o(c.value)}),(l=this._ctx).isMatch=qt(l.isMatch,o),this},Ge.prototype.and=function(o){return this.filter(o)},Ge.prototype.or=function(o){return new this.db.WhereClause(this._ctx.table,o,this)},Ge.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Ge.prototype.desc=function(){return this.reverse()},Ge.prototype.eachKey=function(o){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(c,p){o(p.key,p)})},Ge.prototype.eachUniqueKey=function(o){return this._ctx.unique="unique",this.eachKey(o)},Ge.prototype.eachPrimaryKey=function(o){var l=this._ctx;return l.keysOnly=!l.isMatch,this.each(function(c,p){o(p.primaryKey,p)})},Ge.prototype.keys=function(o){var l=this._ctx;l.keysOnly=!l.isMatch;var c=[];return this.each(function(p,g){c.push(g.key)}).then(function(){return c}).then(o)},Ge.prototype.primaryKeys=function(o){var l=this._ctx;if(l.dir==="next"&&er(l,!0)&&0<l.limit)return this._read(function(p){var g=Vr(l,l.table.core.schema);return l.table.core.query({trans:p,values:!1,limit:l.limit,query:{index:g,range:l.range}})}).then(function(p){return p.result}).then(o);l.keysOnly=!l.isMatch;var c=[];return this.each(function(p,g){c.push(g.primaryKey)}).then(function(){return c}).then(o)},Ge.prototype.uniqueKeys=function(o){return this._ctx.unique="unique",this.keys(o)},Ge.prototype.firstKey=function(o){return this.limit(1).keys(function(l){return l[0]}).then(o)},Ge.prototype.lastKey=function(o){return this.reverse().firstKey(o)},Ge.prototype.distinct=function(){var o=this._ctx,o=o.index&&o.table.schema.idxByName[o.index];if(!o||!o.multi)return this;var l={};return di(this._ctx,function(g){var p=g.primaryKey.toString(),g=v(l,p);return l[p]=!0,!g}),this},Ge.prototype.modify=function(o){var l=this,c=this._ctx;return this._write(function(p){var g,b,_;_=typeof o=="function"?o:(g=a(o),b=g.length,function(D){for(var Y=!1,X=0;X<b;++X){var Q=g[X],ie=o[Q],fe=ce(D,Q);ie instanceof kr?(ne(D,Q,ie.execute(fe)),Y=!0):fe!==ie&&(ne(D,Q,ie),Y=!0)}return Y});var C=c.table.core,R=C.schema.primaryKey,q=R.outbound,I=R.extractKey,F=200,R=l.db._options.modifyChunkSize;R&&(F=typeof R=="object"?R[C.name]||R["*"]||200:R);function H(D,Q){var X=Q.failures,Q=Q.numFailures;B+=D-Q;for(var ie=0,fe=a(X);ie<fe.length;ie++){var be=fe[ie];j.push(X[be])}}var j=[],B=0,K=[];return l.clone().primaryKeys().then(function(D){function Y(Q){var ie=Math.min(F,D.length-Q);return C.getMany({trans:p,keys:D.slice(Q,Q+ie),cache:"immutable"}).then(function(fe){for(var be=[],he=[],ge=q?[]:null,Ee=[],ye=0;ye<ie;++ye){var _e=fe[ye],Ye={value:P(_e),primKey:D[Q+ye]};_.call(Ye,Ye.value,Ye)!==!1&&(Ye.value==null?Ee.push(D[Q+ye]):q||Ze(I(_e),I(Ye.value))===0?(he.push(Ye.value),q&&ge.push(D[Q+ye])):(Ee.push(D[Q+ye]),be.push(Ye.value)))}return Promise.resolve(0<be.length&&C.mutate({trans:p,type:"add",values:be}).then(function(Qe){for(var et in Qe.failures)Ee.splice(parseInt(et),1);H(be.length,Qe)})).then(function(){return(0<he.length||X&&typeof o=="object")&&C.mutate({trans:p,type:"put",keys:ge,values:he,criteria:X,changeSpec:typeof o!="function"&&o,isAdditionalChunk:0<Q}).then(function(Qe){return H(he.length,Qe)})}).then(function(){return(0<Ee.length||X&&o===On)&&C.mutate({trans:p,type:"delete",keys:Ee,criteria:X,isAdditionalChunk:0<Q}).then(function(Qe){return H(Ee.length,Qe)})}).then(function(){return D.length>Q+ie&&Y(Q+F)})})}var X=er(c)&&c.limit===1/0&&(typeof o!="function"||o===On)&&{index:c.index,range:c.range};return Y(0).then(function(){if(0<j.length)throw new Oe("Error modifying one or more objects",j,B,K);return D.length})})})},Ge.prototype.delete=function(){var o=this._ctx,l=o.range;return er(o)&&(o.isPrimKey||l.type===3)?this._write(function(c){var p=o.table.core.schema.primaryKey,g=l;return o.table.core.count({trans:c,query:{index:p,range:g}}).then(function(b){return o.table.core.mutate({trans:c,type:"deleteRange",range:g}).then(function(_){var C=_.failures;if(_.lastResult,_.results,_=_.numFailures,_)throw new Oe("Could not delete some values",Object.keys(C).map(function(q){return C[q]}),b-_);return b-_})})}):this.modify(On)},Ge);function Ge(){}var On=function(o,l){return l.value=null};function Ls(o,l){return o<l?-1:o===l?0:1}function In(o,l){return l<o?-1:o===l?0:1}function Bt(o,l,c){return o=o instanceof jt?new o.Collection(o):o,o._ctx.error=new(c||TypeError)(l),o}function xr(o){return new o.Collection(o,function(){return gi("")}).limit(0)}function Wr(o,l,c,p){var g,b,_,C,q,I,F,R=c.length;if(!c.every(function(B){return typeof B=="string"}))return Bt(o,St);function H(B){g=B==="next"?function(D){return D.toUpperCase()}:function(D){return D.toLowerCase()},b=B==="next"?function(D){return D.toLowerCase()}:function(D){return D.toUpperCase()},_=B==="next"?Ls:In;var K=c.map(function(D){return{lower:b(D),upper:g(D)}}).sort(function(D,Y){return _(D.lower,Y.lower)});C=K.map(function(D){return D.upper}),q=K.map(function(D){return D.lower}),F=(I=B)==="next"?"":p}H("next"),o=new o.Collection(o,function(){return $n(C[0],q[R-1]+p)}),o._ondirectionchange=function(B){H(B)};var j=0;return o._addAlgorithm(function(B,K,D){var Y=B.key;if(typeof Y!="string")return!1;var X=b(Y);if(l(X,q,j))return!0;for(var Q=null,ie=j;ie<R;++ie){var fe=function(be,he,ge,Ee,ye,_e){for(var Ye=Math.min(be.length,Ee.length),Qe=-1,et=0;et<Ye;++et){var Tn=he[et];if(Tn!==Ee[et])return ye(be[et],ge[et])<0?be.substr(0,et)+ge[et]+ge.substr(et+1):ye(be[et],Ee[et])<0?be.substr(0,et)+Ee[et]+ge.substr(et+1):0<=Qe?be.substr(0,Qe)+he[Qe]+ge.substr(Qe+1):null;ye(be[et],Tn)<0&&(Qe=et)}return Ye<Ee.length&&_e==="next"?be+ge.substr(be.length):Ye<be.length&&_e==="prev"?be.substr(0,ge.length):Qe<0?null:be.substr(0,Qe)+Ee[Qe]+ge.substr(Qe+1)}(Y,X,C[ie],q[ie],_,I);fe===null&&Q===null?j=ie+1:(Q===null||0<_(Q,fe))&&(Q=fe)}return K(Q!==null?function(){B.continue(Q+F)}:D),!1}),o}function $n(o,l,c,p){return{type:2,lower:o,upper:l,lowerOpen:c,upperOpen:p}}function gi(o){return{type:1,lower:o,upper:o}}var jt=(Object.defineProperty(bt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),bt.prototype.between=function(o,l,c,p){c=c!==!1,p=p===!0;try{return 0<this._cmp(o,l)||this._cmp(o,l)===0&&(c||p)&&(!c||!p)?xr(this):new this.Collection(this,function(){return $n(o,l,!c,!p)})}catch{return Bt(this,Ot)}},bt.prototype.equals=function(o){return o==null?Bt(this,Ot):new this.Collection(this,function(){return gi(o)})},bt.prototype.above=function(o){return o==null?Bt(this,Ot):new this.Collection(this,function(){return $n(o,void 0,!0)})},bt.prototype.aboveOrEqual=function(o){return o==null?Bt(this,Ot):new this.Collection(this,function(){return $n(o,void 0,!1)})},bt.prototype.below=function(o){return o==null?Bt(this,Ot):new this.Collection(this,function(){return $n(void 0,o,!1,!0)})},bt.prototype.belowOrEqual=function(o){return o==null?Bt(this,Ot):new this.Collection(this,function(){return $n(void 0,o)})},bt.prototype.startsWith=function(o){return typeof o!="string"?Bt(this,St):this.between(o,o+Pt,!0,!0)},bt.prototype.startsWithIgnoreCase=function(o){return o===""?this.startsWith(o):Wr(this,function(l,c){return l.indexOf(c[0])===0},[o],Pt)},bt.prototype.equalsIgnoreCase=function(o){return Wr(this,function(l,c){return l===c[0]},[o],"")},bt.prototype.anyOfIgnoreCase=function(){var o=z.apply(J,arguments);return o.length===0?xr(this):Wr(this,function(l,c){return c.indexOf(l)!==-1},o,"")},bt.prototype.startsWithAnyOfIgnoreCase=function(){var o=z.apply(J,arguments);return o.length===0?xr(this):Wr(this,function(l,c){return c.some(function(p){return l.indexOf(p)===0})},o,Pt)},bt.prototype.anyOf=function(){var o=this,l=z.apply(J,arguments),c=this._cmp;try{l.sort(c)}catch{return Bt(this,Ot)}if(l.length===0)return xr(this);var p=new this.Collection(this,function(){return $n(l[0],l[l.length-1])});p._ondirectionchange=function(b){c=b==="next"?o._ascending:o._descending,l.sort(c)};var g=0;return p._addAlgorithm(function(b,_,C){for(var q=b.key;0<c(q,l[g]);)if(++g===l.length)return _(C),!1;return c(q,l[g])===0||(_(function(){b.continue(l[g])}),!1)}),p},bt.prototype.notEqual=function(o){return this.inAnyRange([[-1/0,o],[o,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},bt.prototype.noneOf=function(){var o=z.apply(J,arguments);if(o.length===0)return new this.Collection(this);try{o.sort(this._ascending)}catch{return Bt(this,Ot)}var l=o.reduce(function(c,p){return c?c.concat([[c[c.length-1][1],p]]):[[-1/0,p]]},null);return l.push([o[o.length-1],this.db._maxKey]),this.inAnyRange(l,{includeLowers:!1,includeUppers:!1})},bt.prototype.inAnyRange=function(Y,l){var c=this,p=this._cmp,g=this._ascending,b=this._descending,_=this._min,C=this._max;if(Y.length===0)return xr(this);if(!Y.every(function(X){return X[0]!==void 0&&X[1]!==void 0&&g(X[0],X[1])<=0}))return Bt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ae.InvalidArgument);var q=!l||l.includeLowers!==!1,I=l&&l.includeUppers===!0,F,R=g;function H(X,Q){return R(X[0],Q[0])}try{(F=Y.reduce(function(X,Q){for(var ie=0,fe=X.length;ie<fe;++ie){var be=X[ie];if(p(Q[0],be[1])<0&&0<p(Q[1],be[0])){be[0]=_(be[0],Q[0]),be[1]=C(be[1],Q[1]);break}}return ie===fe&&X.push(Q),X},[])).sort(H)}catch{return Bt(this,Ot)}var j=0,B=I?function(X){return 0<g(X,F[j][1])}:function(X){return 0<=g(X,F[j][1])},K=q?function(X){return 0<b(X,F[j][0])}:function(X){return 0<=b(X,F[j][0])},D=B,Y=new this.Collection(this,function(){return $n(F[0][0],F[F.length-1][1],!q,!I)});return Y._ondirectionchange=function(X){R=X==="next"?(D=B,g):(D=K,b),F.sort(H)},Y._addAlgorithm(function(X,Q,ie){for(var fe,be=X.key;D(be);)if(++j===F.length)return Q(ie),!1;return!B(fe=be)&&!K(fe)||(c._cmp(be,F[j][1])===0||c._cmp(be,F[j][0])===0||Q(function(){R===g?X.continue(F[j][0]):X.continue(F[j][1])}),!1)}),Y},bt.prototype.startsWithAnyOf=function(){var o=z.apply(J,arguments);return o.every(function(l){return typeof l=="string"})?o.length===0?xr(this):this.inAnyRange(o.map(function(l){return[l,l+Pt]})):Bt(this,"startsWithAnyOf() only works with strings")},bt);function bt(){}function tn(o){return at(function(l){return Dn(l),o(l.target.error),!1})}function Dn(o){o.stopPropagation&&o.stopPropagation(),o.preventDefault&&o.preventDefault()}var tr="storagemutated",Er="x-storagemutated-1",Mn=xn(null,tr),Gi=(Gt.prototype._lock=function(){return de(!Le.global),++this._reculock,this._reculock!==1||Le.global||(Le.lockOwnerFor=this),this},Gt.prototype._unlock=function(){if(de(!Le.global),--this._reculock==0)for(Le.global||(Le.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var o=this._blockedFuncs.shift();try{ft(o[1],o[0])}catch{}}return this},Gt.prototype._locked=function(){return this._reculock&&Le.lockOwnerFor!==this},Gt.prototype.create=function(o){var l=this;if(!this.mode)return this;var c=this.db.idbdb,p=this.db._state.dbOpenError;if(de(!this.idbtrans),!o&&!c)switch(p&&p.name){case"DatabaseClosedError":throw new ae.DatabaseClosed(p);case"MissingAPIError":throw new ae.MissingAPI(p.message,p);default:throw new ae.OpenFailed(p)}if(!this.active)throw new ae.TransactionInactive;return de(this._completion._state===null),(o=this.idbtrans=o||(this.db.core||c).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=at(function(g){Dn(g),l._reject(o.error)}),o.onabort=at(function(g){Dn(g),l.active&&l._reject(new ae.Abort(o.error)),l.active=!1,l.on("abort").fire(g)}),o.oncomplete=at(function(){l.active=!1,l._resolve(),"mutatedParts"in o&&Mn.storagemutated.fire(o.mutatedParts)}),this},Gt.prototype._promise=function(o,l,c){var p=this;if(o==="readwrite"&&this.mode!=="readwrite")return Xe(new ae.ReadOnly("Transaction is readonly"));if(!this.active)return Xe(new ae.TransactionInactive);if(this._locked())return new me(function(b,_){p._blockedFuncs.push([function(){p._promise(o,l,c).then(b,_)},Le])});if(c)return oe(function(){var b=new me(function(_,C){p._lock();var q=l(_,C,p);q&&q.then&&q.then(_,C)});return b.finally(function(){return p._unlock()}),b._lib=!0,b});var g=new me(function(b,_){var C=l(b,_,p);C&&C.then&&C.then(b,_)});return g._lib=!0,g},Gt.prototype._root=function(){return this.parent?this.parent._root():this},Gt.prototype.waitFor=function(o){var l,c=this._root(),p=me.resolve(o);c._waitingFor?c._waitingFor=c._waitingFor.then(function(){return p}):(c._waitingFor=p,c._waitingQueue=[],l=c.idbtrans.objectStore(c.storeNames[0]),function b(){for(++c._spinCount;c._waitingQueue.length;)c._waitingQueue.shift()();c._waitingFor&&(l.get(-1/0).onsuccess=b)}());var g=c._waitingFor;return new me(function(b,_){p.then(function(C){return c._waitingQueue.push(at(b.bind(null,C)))},function(C){return c._waitingQueue.push(at(_.bind(null,C)))}).finally(function(){c._waitingFor===g&&(c._waitingFor=null)})})},Gt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ae.Abort))},Gt.prototype.table=function(o){var l=this._memoizedTables||(this._memoizedTables={});if(v(l,o))return l[o];var c=this.schema[o];if(!c)throw new ae.NotFound("Table "+o+" not part of transaction");return c=new this.db.Table(o,c,this),c.core=this.db.core.table(o),l[o]=c},Gt);function Gt(){}function Gr(o,l,c,p,g,b,_){return{name:o,keyPath:l,unique:c,multi:p,auto:g,compound:b,src:(c&&!_?"&":"")+(p?"*":"")+(g?"++":"")+Sn(l)}}function Sn(o){return typeof o=="string"?o:o?"["+[].join.call(o,"+")+"]":""}function Yr(o,l,c){return{name:o,primKey:l,indexes:c,mappedClass:null,idxByName:(p=function(g){return[g.name,g]},c.reduce(function(g,b,_){return _=p(b,_),_&&(g[_[0]]=_[1]),g},{}))};var p}var nr=function(o){try{return o.only([[]]),nr=function(){return[[]]},[[]]}catch{return nr=function(){return Pt},Pt}};function mi(o){return o==null?function(){}:typeof o=="string"?(l=o).split(".").length===1?function(c){return c[l]}:function(c){return ce(c,l)}:function(c){return ce(c,o)};var l}function Yi(o){return[].slice.call(o)}var h=0;function w(o){return o==null?":id":typeof o=="string"?o:"[".concat(o.join("+"),"]")}function k(o,l,q){function p(D){if(D.type===3)return null;if(D.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var j=D.lower,B=D.upper,K=D.lowerOpen,D=D.upperOpen;return j===void 0?B===void 0?null:l.upperBound(B,!!D):B===void 0?l.lowerBound(j,!!K):l.bound(j,B,!!K,!!D)}function g(H){var j,B=H.name;return{name:B,schema:H,mutate:function(K){var D=K.trans,Y=K.type,X=K.keys,Q=K.values,ie=K.range;return new Promise(function(fe,be){fe=at(fe);var he=D.objectStore(B),ge=he.keyPath==null,Ee=Y==="put"||Y==="add";if(!Ee&&Y!=="delete"&&Y!=="deleteRange")throw new Error("Invalid operation type: "+Y);var ye,_e=(X||Q||{length:1}).length;if(X&&Q&&X.length!==Q.length)throw new Error("Given keys array must have same length as given values array.");if(_e===0)return fe({numFailures:0,failures:{},results:[],lastResult:void 0});function Ye(nn){++Tn,Dn(nn)}var Qe=[],et=[],Tn=0;if(Y==="deleteRange"){if(ie.type===4)return fe({numFailures:Tn,failures:et,results:[],lastResult:void 0});ie.type===3?Qe.push(ye=he.clear()):Qe.push(ye=he.delete(p(ie)))}else{var ge=Ee?ge?[Q,X]:[Q,null]:[X,null],ze=ge[0],Jt=ge[1];if(Ee)for(var Zt=0;Zt<_e;++Zt)Qe.push(ye=Jt&&Jt[Zt]!==void 0?he[Y](ze[Zt],Jt[Zt]):he[Y](ze[Zt])),ye.onerror=Ye;else for(Zt=0;Zt<_e;++Zt)Qe.push(ye=he[Y](ze[Zt])),ye.onerror=Ye}function Io(nn){nn=nn.target.result,Qe.forEach(function(wi,Sl){return wi.error!=null&&(et[Sl]=wi.error)}),fe({numFailures:Tn,failures:et,results:Y==="delete"?X:Qe.map(function(wi){return wi.result}),lastResult:nn})}ye.onerror=function(nn){Ye(nn),Io(nn)},ye.onsuccess=Io})},getMany:function(K){var D=K.trans,Y=K.keys;return new Promise(function(X,Q){X=at(X);for(var ie,fe=D.objectStore(B),be=Y.length,he=new Array(be),ge=0,Ee=0,ye=function(Qe){Qe=Qe.target,he[Qe._pos]=Qe.result,++Ee===ge&&X(he)},_e=tn(Q),Ye=0;Ye<be;++Ye)Y[Ye]!=null&&((ie=fe.get(Y[Ye]))._pos=Ye,ie.onsuccess=ye,ie.onerror=_e,++ge);ge===0&&X(he)})},get:function(K){var D=K.trans,Y=K.key;return new Promise(function(X,Q){X=at(X);var ie=D.objectStore(B).get(Y);ie.onsuccess=function(fe){return X(fe.target.result)},ie.onerror=tn(Q)})},query:(j=I,function(K){return new Promise(function(D,Y){D=at(D);var X,Q,ie,ge=K.trans,fe=K.values,be=K.limit,ye=K.query,he=be===1/0?void 0:be,Ee=ye.index,ye=ye.range,ge=ge.objectStore(B),Ee=Ee.isPrimaryKey?ge:ge.index(Ee.name),ye=p(ye);if(be===0)return D({result:[]});j?((he=fe?Ee.getAll(ye,he):Ee.getAllKeys(ye,he)).onsuccess=function(_e){return D({result:_e.target.result})},he.onerror=tn(Y)):(X=0,Q=!fe&&"openKeyCursor"in Ee?Ee.openKeyCursor(ye):Ee.openCursor(ye),ie=[],Q.onsuccess=function(_e){var Ye=Q.result;return Ye?(ie.push(fe?Ye.value:Ye.primaryKey),++X===be?D({result:ie}):void Ye.continue()):D({result:ie})},Q.onerror=tn(Y))})}),openCursor:function(K){var D=K.trans,Y=K.values,X=K.query,Q=K.reverse,ie=K.unique;return new Promise(function(fe,be){fe=at(fe);var Ee=X.index,he=X.range,ge=D.objectStore(B),ge=Ee.isPrimaryKey?ge:ge.index(Ee.name),Ee=Q?ie?"prevunique":"prev":ie?"nextunique":"next",ye=!Y&&"openKeyCursor"in ge?ge.openKeyCursor(p(he),Ee):ge.openCursor(p(he),Ee);ye.onerror=tn(be),ye.onsuccess=at(function(_e){var Ye,Qe,et,Tn,ze=ye.result;ze?(ze.___id=++h,ze.done=!1,Ye=ze.continue.bind(ze),Qe=(Qe=ze.continuePrimaryKey)&&Qe.bind(ze),et=ze.advance.bind(ze),Tn=function(){throw new Error("Cursor not stopped")},ze.trans=D,ze.stop=ze.continue=ze.continuePrimaryKey=ze.advance=function(){throw new Error("Cursor not started")},ze.fail=at(be),ze.next=function(){var Jt=this,Zt=1;return this.start(function(){return Zt--?Jt.continue():Jt.stop()}).then(function(){return Jt})},ze.start=function(Jt){function Zt(){if(ye.result)try{Jt()}catch(nn){ze.fail(nn)}else ze.done=!0,ze.start=function(){throw new Error("Cursor behind last entry")},ze.stop()}var Io=new Promise(function(nn,wi){nn=at(nn),ye.onerror=tn(wi),ze.fail=wi,ze.stop=function(Sl){ze.stop=ze.continue=ze.continuePrimaryKey=ze.advance=Tn,nn(Sl)}});return ye.onsuccess=at(function(nn){ye.onsuccess=Zt,Zt()}),ze.continue=Ye,ze.continuePrimaryKey=Qe,ze.advance=et,Zt(),Io},fe(ze)):fe(null)},be)})},count:function(K){var D=K.query,Y=K.trans,X=D.index,Q=D.range;return new Promise(function(ie,fe){var be=Y.objectStore(B),he=X.isPrimaryKey?be:be.index(X.name),be=p(Q),he=be?he.count(be):he.count();he.onsuccess=at(function(ge){return ie(ge.target.result)}),he.onerror=tn(fe)})}}}var b,_,C,F=(_=q,C=Yi((b=o).objectStoreNames),{schema:{name:b.name,tables:C.map(function(H){return _.objectStore(H)}).map(function(H){var j=H.keyPath,D=H.autoIncrement,B=u(j),K={},D={name:H.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:j==null,compound:B,keyPath:j,autoIncrement:D,unique:!0,extractKey:mi(j)},indexes:Yi(H.indexNames).map(function(Y){return H.index(Y)}).map(function(ie){var X=ie.name,Q=ie.unique,fe=ie.multiEntry,ie=ie.keyPath,fe={name:X,compound:u(ie),keyPath:ie,unique:Q,multiEntry:fe,extractKey:mi(ie)};return K[w(ie)]=fe}),getIndexByKeyPath:function(Y){return K[w(Y)]}};return K[":id"]=D.primaryKey,j!=null&&(K[w(j)]=D.primaryKey),D})},hasGetAll:0<C.length&&"getAll"in _.objectStore(C[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),q=F.schema,I=F.hasGetAll,F=q.tables.map(g),R={};return F.forEach(function(H){return R[H.name]=H}),{stack:"dbcore",transaction:o.transaction.bind(o),table:function(H){if(!R[H])throw new Error("Table '".concat(H,"' not found"));return R[H]},MIN_KEY:-1/0,MAX_KEY:nr(l),schema:q}}function te(o,l,c,p){var g=c.IDBKeyRange;return c.indexedDB,{dbcore:(p=k(l,g,p),o.dbcore.reduce(function(b,_){return _=_.create,n(n({},b),_(b))},p))}}function Me(o,p){var c=p.db,p=te(o._middlewares,c,o._deps,p);o.core=p.dbcore,o.tables.forEach(function(g){var b=g.name;o.core.schema.tables.some(function(_){return _.name===b})&&(g.core=o.core.table(b),o[b]instanceof o.Table&&(o[b].core=g.core))})}function ke(o,l,c,p){c.forEach(function(g){var b=p[g];l.forEach(function(_){var C=function q(I,F){return N(I,F)||(I=d(I))&&q(I,F)}(_,g);(!C||"value"in C&&C.value===void 0)&&(_===o.Transaction.prototype||_ instanceof o.Transaction?A(_,g,{get:function(){return this.table(g)},set:function(q){x(this,g,{value:q,writable:!0,configurable:!0,enumerable:!0})}}):_[g]=new o.Table(g,b))})})}function tt(o,l){l.forEach(function(c){for(var p in c)c[p]instanceof o.Table&&delete c[p]})}function rt(o,l){return o._cfg.version-l._cfg.version}function vt(o,l,c,p){var g=o._dbSchema;c.objectStoreNames.contains("$meta")&&!g.$meta&&(g.$meta=Yr("$meta",Bn("")[0],[]),o._storeNames.push("$meta"));var b=o._createTransaction("readwrite",o._storeNames,g);b.create(c),b._completion.catch(p);var _=b._reject.bind(b),C=Le.transless||Le;oe(function(){return Le.trans=b,Le.transless=C,l!==0?(Me(o,c),I=l,((q=b).storeNames.includes("$meta")?q.table("$meta").get("version").then(function(F){return F??I}):me.resolve(I)).then(function(F){return H=F,j=b,B=c,K=[],F=(R=o)._versions,D=R._dbSchema=xt(0,R.idbdb,B),(F=F.filter(function(Y){return Y._cfg.version>=H})).length!==0?(F.forEach(function(Y){K.push(function(){var X=D,Q=Y._cfg.dbschema;An(R,X,B),An(R,Q,B),D=R._dbSchema=Q;var ie=Nt(X,Q);ie.add.forEach(function(Ee){It(B,Ee[0],Ee[1].primKey,Ee[1].indexes)}),ie.change.forEach(function(Ee){if(Ee.recreate)throw new ae.Upgrade("Not yet support for changing primary key");var ye=B.objectStore(Ee.name);Ee.add.forEach(function(_e){return At(ye,_e)}),Ee.change.forEach(function(_e){ye.deleteIndex(_e.name),At(ye,_e)}),Ee.del.forEach(function(_e){return ye.deleteIndex(_e)})});var fe=Y._cfg.contentUpgrade;if(fe&&Y._cfg.version>H){Me(R,B),j._memoizedTables={};var be=re(Q);ie.del.forEach(function(Ee){be[Ee]=X[Ee]}),tt(R,[R.Transaction.prototype]),ke(R,[R.Transaction.prototype],a(be),be),j.schema=be;var he,ge=le(fe);return ge&&we(),ie=me.follow(function(){var Ee;(he=fe(j))&&ge&&(Ee=qe.bind(null,null),he.then(Ee,Ee))}),he&&typeof he.then=="function"?me.resolve(he):ie.then(function(){return he})}}),K.push(function(X){var Q,ie,fe=Y._cfg.dbschema;Q=fe,ie=X,[].slice.call(ie.db.objectStoreNames).forEach(function(be){return Q[be]==null&&ie.db.deleteObjectStore(be)}),tt(R,[R.Transaction.prototype]),ke(R,[R.Transaction.prototype],R._storeNames,R._dbSchema),j.schema=R._dbSchema}),K.push(function(X){R.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(R.idbdb.version/10)===Y._cfg.version?(R.idbdb.deleteObjectStore("$meta"),delete R._dbSchema.$meta,R._storeNames=R._storeNames.filter(function(Q){return Q!=="$meta"})):X.objectStore("$meta").put(Y._cfg.version,"version"))})}),function Y(){return K.length?me.resolve(K.shift()(j.idbtrans)).then(Y):me.resolve()}().then(function(){wt(D,B)})):me.resolve();var R,H,j,B,K,D}).catch(_)):(a(g).forEach(function(F){It(c,F,g[F].primKey,g[F].indexes)}),Me(o,c),void me.follow(function(){return o.on.populate.fire(b)}).catch(_));var q,I})}function st(o,l){wt(o._dbSchema,l),l.db.version%10!=0||l.objectStoreNames.contains("$meta")||l.db.createObjectStore("$meta").add(Math.ceil(l.db.version/10-1),"version");var c=xt(0,o.idbdb,l);An(o,o._dbSchema,l);for(var p=0,g=Nt(c,o._dbSchema).change;p<g.length;p++){var b=function(_){if(_.change.length||_.recreate)return console.warn("Unable to patch indexes of table ".concat(_.name," because it has changes on the type of index or primary key.")),{value:void 0};var C=l.objectStore(_.name);_.add.forEach(function(q){Lt&&console.debug("Dexie upgrade patch: Creating missing index ".concat(_.name,".").concat(q.src)),At(C,q)})}(g[p]);if(typeof b=="object")return b.value}}function Nt(o,l){var c,p={del:[],add:[],change:[]};for(c in o)l[c]||p.del.push(c);for(c in l){var g=o[c],b=l[c];if(g){var _={name:c,def:b,recreate:!1,del:[],add:[],change:[]};if(""+(g.primKey.keyPath||"")!=""+(b.primKey.keyPath||"")||g.primKey.auto!==b.primKey.auto)_.recreate=!0,p.change.push(_);else{var C=g.idxByName,q=b.idxByName,I=void 0;for(I in C)q[I]||_.del.push(I);for(I in q){var F=C[I],R=q[I];F?F.src!==R.src&&_.change.push(R):_.add.push(R)}(0<_.del.length||0<_.add.length||0<_.change.length)&&p.change.push(_)}}else p.add.push([c,b])}return p}function It(o,l,c,p){var g=o.db.createObjectStore(l,c.keyPath?{keyPath:c.keyPath,autoIncrement:c.auto}:{autoIncrement:c.auto});return p.forEach(function(b){return At(g,b)}),g}function wt(o,l){a(o).forEach(function(c){l.db.objectStoreNames.contains(c)||(Lt&&console.debug("Dexie: Creating missing table",c),It(l,c,o[c].primKey,o[c].indexes))})}function At(o,l){o.createIndex(l.name,l.keyPath,{unique:l.unique,multiEntry:l.multi})}function xt(o,l,c){var p={};return W(l.objectStoreNames,0).forEach(function(g){for(var b=c.objectStore(g),_=Gr(Sn(I=b.keyPath),I||"",!0,!1,!!b.autoIncrement,I&&typeof I!="string",!0),C=[],q=0;q<b.indexNames.length;++q){var F=b.index(b.indexNames[q]),I=F.keyPath,F=Gr(F.name,I,!!F.unique,!!F.multiEntry,!1,I&&typeof I!="string",!1);C.push(F)}p[g]=Yr(g,_,C)}),p}function An(o,l,c){for(var p=c.db.objectStoreNames,g=0;g<p.length;++g){var b=p[g],_=c.objectStore(b);o._hasGetAll="getAll"in _;for(var C=0;C<_.indexNames.length;++C){var q=_.indexNames[C],I=_.index(q).keyPath,F=typeof I=="string"?I:"["+W(I).join("+")+"]";!l[b]||(I=l[b].idxByName[F])&&(I.name=q,delete l[b].idxByName[F],l[b].idxByName[q]=I)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(o._hasGetAll=!1)}function Bn(o){return o.split(",").map(function(l,c){var p=(l=l.trim()).replace(/([&*]|\+\+)/g,""),g=/^\[/.test(p)?p.match(/^\[(.*)\]$/)[1].split("+"):p;return Gr(p,g||null,/\&/.test(l),/\*/.test(l),/\+\+/.test(l),u(g),c===0)})}var Pr=(yi.prototype._parseStoresSpec=function(o,l){a(o).forEach(function(c){if(o[c]!==null){var p=Bn(o[c]),g=p.shift();if(g.unique=!0,g.multi)throw new ae.Schema("Primary key cannot be multi-valued");p.forEach(function(b){if(b.auto)throw new ae.Schema("Only primary key can be marked as autoIncrement (++)");if(!b.keyPath)throw new ae.Schema("Index must have a name and cannot be an empty string")}),l[c]=Yr(c,g,p)}})},yi.prototype.stores=function(c){var l=this.db;this._cfg.storesSource=this._cfg.storesSource?f(this._cfg.storesSource,c):c;var c=l._versions,p={},g={};return c.forEach(function(b){f(p,b._cfg.storesSource),g=b._cfg.dbschema={},b._parseStoresSpec(p,g)}),l._dbSchema=g,tt(l,[l._allTables,l,l.Transaction.prototype]),ke(l,[l._allTables,l,l.Transaction.prototype,this._cfg.tables],a(g),g),l._storeNames=a(g),this},yi.prototype.upgrade=function(o){return this._cfg.contentUpgrade=Xt(this._cfg.contentUpgrade||Te,o),this},yi);function yi(){}function Jr(o,l){var c=o._dbNamesDB;return c||(c=o._dbNamesDB=new qr(wn,{addons:[],indexedDB:o,IDBKeyRange:l})).version(1).stores({dbnames:"name"}),c.table("dbnames")}function Zr(o){return o&&typeof o.databases=="function"}function hl(o){return oe(function(){return Le.letThrough=!0,o()})}function dl(o){return!("from"in o)}var Yt=function(o,l){if(!this){var c=new Yt;return o&&"d"in o&&f(c,o),c}f(this,arguments.length?{d:1,from:o,to:1<arguments.length?l:o}:{d:0})};function Rs(o,l,c){var p=Ze(l,c);if(!isNaN(p)){if(0<p)throw RangeError();if(dl(o))return f(o,{from:l,to:c,d:1});var g=o.l,p=o.r;if(Ze(c,o.from)<0)return g?Rs(g,l,c):o.l={from:l,to:c,d:1,l:null,r:null},_h(o);if(0<Ze(l,o.to))return p?Rs(p,l,c):o.r={from:l,to:c,d:1,l:null,r:null},_h(o);Ze(l,o.from)<0&&(o.from=l,o.l=null,o.d=p?p.d+1:1),0<Ze(c,o.to)&&(o.to=c,o.r=null,o.d=o.l?o.l.d+1:1),c=!o.r,g&&!o.l&&ks(o,g),p&&c&&ks(o,p)}}function ks(o,l){dl(l)||function c(p,q){var b=q.from,_=q.to,C=q.l,q=q.r;Rs(p,b,_),C&&c(p,C),q&&c(p,q)}(o,l)}function Th(o,l){var c=Lo(l),p=c.next();if(p.done)return!1;for(var g=p.value,b=Lo(o),_=b.next(g.from),C=_.value;!p.done&&!_.done;){if(Ze(C.from,g.to)<=0&&0<=Ze(C.to,g.from))return!0;Ze(g.from,C.from)<0?g=(p=c.next(C.from)).value:C=(_=b.next(g.from)).value}return!1}function Lo(o){var l=dl(o)?null:{s:0,n:o};return{next:function(c){for(var p=0<arguments.length;l;)switch(l.s){case 0:if(l.s=1,p)for(;l.n.l&&Ze(c,l.n.from)<0;)l={up:l,n:l.n.l,s:1};else for(;l.n.l;)l={up:l,n:l.n.l,s:1};case 1:if(l.s=2,!p||Ze(c,l.n.to)<=0)return{value:l.n,done:!1};case 2:if(l.n.r){l.s=3,l={up:l,n:l.n.r,s:0};continue}case 3:l=l.up}return{done:!0}}}}function _h(o){var l,c,p=(((l=o.r)===null||l===void 0?void 0:l.d)||0)-(((c=o.l)===null||c===void 0?void 0:c.d)||0),g=1<p?"r":p<-1?"l":"";g&&(l=g=="r"?"l":"r",c=n({},o),p=o[g],o.from=p.from,o.to=p.to,o[g]=p[g],c[g]=p[l],(o[l]=c).d=Nh(c)),o.d=Nh(o)}function Nh(c){var l=c.r,c=c.l;return(l?c?Math.max(l.d,c.d):l.d:c?c.d:0)+1}function Ro(o,l){return a(l).forEach(function(c){o[c]?ks(o[c],l[c]):o[c]=function p(g){var b,_,C={};for(b in g)v(g,b)&&(_=g[b],C[b]=!_||typeof _!="object"||S.has(_.constructor)?_:p(_));return C}(l[c])}),o}function pl(o,l){return o.all||l.all||Object.keys(o).some(function(c){return l[c]&&Th(l[c],o[c])})}y(Yt.prototype,((Un={add:function(o){return ks(this,o),this},addKey:function(o){return Rs(this,o,o),this},addKeys:function(o){var l=this;return o.forEach(function(c){return Rs(l,c,c)}),this},hasKey:function(o){var l=Lo(this).next(o).value;return l&&Ze(l.from,o)<=0&&0<=Ze(l.to,o)}})[T]=function(){return Lo(this)},Un));var bi={},gl={},ml=!1;function ko(o){Ro(gl,o),ml||(ml=!0,setTimeout(function(){ml=!1,yl(gl,!(gl={}))},0))}function yl(o,l){l===void 0&&(l=!1);var c=new Set;if(o.all)for(var p=0,g=Object.values(bi);p<g.length;p++)Ch(_=g[p],o,c,l);else for(var b in o){var _,C=/^idb\:\/\/(.*)\/(.*)\//.exec(b);C&&(b=C[1],C=C[2],(_=bi["idb://".concat(b,"/").concat(C)])&&Ch(_,o,c,l))}c.forEach(function(q){return q()})}function Ch(o,l,c,p){for(var g=[],b=0,_=Object.entries(o.queries.query);b<_.length;b++){for(var C=_[b],q=C[0],I=[],F=0,R=C[1];F<R.length;F++){var H=R[F];pl(l,H.obsSet)?H.subscribers.forEach(function(D){return c.add(D)}):p&&I.push(H)}p&&g.push([q,I])}if(p)for(var j=0,B=g;j<B.length;j++){var K=B[j],q=K[0],I=K[1];o.queries.query[q]=I}}function Cw(o){var l=o._state,c=o._deps.indexedDB;if(l.isBeingOpened||o.idbdb)return l.dbReadyPromise.then(function(){return l.dbOpenError?Xe(l.dbOpenError):o});l.isBeingOpened=!0,l.dbOpenError=null,l.openComplete=!1;var p=l.openCanceller,g=Math.round(10*o.verno),b=!1;function _(){if(l.openCanceller!==p)throw new ae.DatabaseClosed("db.open() was cancelled")}function C(){return new me(function(H,j){if(_(),!c)throw new ae.MissingAPI;var B=o.name,K=l.autoSchema||!g?c.open(B):c.open(B,g);if(!K)throw new ae.MissingAPI;K.onerror=tn(j),K.onblocked=at(o._fireOnBlocked),K.onupgradeneeded=at(function(D){var Y;F=K.transaction,l.autoSchema&&!o._options.allowEmptyDB?(K.onerror=Dn,F.abort(),K.result.close(),(Y=c.deleteDatabase(B)).onsuccess=Y.onerror=at(function(){j(new ae.NoSuchDatabase("Database ".concat(B," doesnt exist")))})):(F.onerror=tn(j),D=D.oldVersion>Math.pow(2,62)?0:D.oldVersion,R=D<1,o.idbdb=K.result,b&&st(o,F),vt(o,D/10,F,j))},j),K.onsuccess=at(function(){F=null;var D,Y,X,Q,ie,fe=o.idbdb=K.result,be=W(fe.objectStoreNames);if(0<be.length)try{var he=fe.transaction((Q=be).length===1?Q[0]:Q,"readonly");if(l.autoSchema)Y=fe,X=he,(D=o).verno=Y.version/10,X=D._dbSchema=xt(0,Y,X),D._storeNames=W(Y.objectStoreNames,0),ke(D,[D._allTables],a(X),X);else if(An(o,o._dbSchema,he),((ie=Nt(xt(0,(ie=o).idbdb,he),ie._dbSchema)).add.length||ie.change.some(function(ge){return ge.add.length||ge.change.length}))&&!b)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),fe.close(),g=fe.version+1,b=!0,H(C());Me(o,he)}catch{}hn.push(o),fe.onversionchange=at(function(ge){l.vcFired=!0,o.on("versionchange").fire(ge)}),fe.onclose=at(function(ge){o.on("close").fire(ge)}),R&&(ie=o._deps,he=B,fe=ie.indexedDB,ie=ie.IDBKeyRange,Zr(fe)||he===wn||Jr(fe,ie).put({name:he}).catch(Te)),H()},j)}).catch(function(H){switch(H==null?void 0:H.name){case"UnknownError":if(0<l.PR1398_maxLoop)return l.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),C();break;case"VersionError":if(0<g)return g=0,C()}return me.reject(H)})}var q,I=l.dbReadyResolve,F=null,R=!1;return me.race([p,(typeof navigator>"u"?me.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(H){function j(){return indexedDB.databases().finally(H)}q=setInterval(j,100),j()}).finally(function(){return clearInterval(q)}):Promise.resolve()).then(C)]).then(function(){return _(),l.onReadyBeingFired=[],me.resolve(hl(function(){return o.on.ready.fire(o.vip)})).then(function H(){if(0<l.onReadyBeingFired.length){var j=l.onReadyBeingFired.reduce(Xt,Te);return l.onReadyBeingFired=[],me.resolve(hl(function(){return j(o.vip)})).then(H)}})}).finally(function(){l.openCanceller===p&&(l.onReadyBeingFired=null,l.isBeingOpened=!1)}).catch(function(H){l.dbOpenError=H;try{F&&F.abort()}catch{}return p===l.openCanceller&&o._close(),Xe(H)}).finally(function(){l.openComplete=!0,I()}).then(function(){var H;return R&&(H={},o.tables.forEach(function(j){j.schema.indexes.forEach(function(B){B.name&&(H["idb://".concat(o.name,"/").concat(j.name,"/").concat(B.name)]=new Yt(-1/0,[[[]]]))}),H["idb://".concat(o.name,"/").concat(j.name,"/")]=H["idb://".concat(o.name,"/").concat(j.name,"/:dels")]=new Yt(-1/0,[[[]]])}),Mn(tr).fire(H),yl(H,!0)),o})}function bl(o){function l(b){return o.next(b)}var c=g(l),p=g(function(b){return o.throw(b)});function g(b){return function(q){var C=b(q),q=C.value;return C.done?q:q&&typeof q.then=="function"?q.then(c,p):u(q)?Promise.all(q).then(c,p):c(q)}}return g(l)()}function Po(o,l,c){for(var p=u(o)?o.slice():[o],g=0;g<c;++g)p.push(l);return p}var Lw={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(o){return n(n({},o),{table:function(l){var c=o.table(l),p=c.schema,g={},b=[];function _(R,H,j){var B=w(R),K=g[B]=g[B]||[],D=R==null?0:typeof R=="string"?1:R.length,Y=0<H,Y=n(n({},j),{name:Y?"".concat(B,"(virtual-from:").concat(j.name,")"):j.name,lowLevelIndex:j,isVirtual:Y,keyTail:H,keyLength:D,extractKey:mi(R),unique:!Y&&j.unique});return K.push(Y),Y.isPrimaryKey||b.push(Y),1<D&&_(D===2?R[0]:R.slice(0,D-1),H+1,j),K.sort(function(X,Q){return X.keyTail-Q.keyTail}),Y}l=_(p.primaryKey.keyPath,0,p.primaryKey),g[":id"]=[l];for(var C=0,q=p.indexes;C<q.length;C++){var I=q[C];_(I.keyPath,0,I)}function F(R){var H,j=R.query.index;return j.isVirtual?n(n({},R),{query:{index:j.lowLevelIndex,range:(H=R.query.range,j=j.keyTail,{type:H.type===1?2:H.type,lower:Po(H.lower,H.lowerOpen?o.MAX_KEY:o.MIN_KEY,j),lowerOpen:!0,upper:Po(H.upper,H.upperOpen?o.MIN_KEY:o.MAX_KEY,j),upperOpen:!0})}}):R}return n(n({},c),{schema:n(n({},p),{primaryKey:l,indexes:b,getIndexByKeyPath:function(R){return(R=g[w(R)])&&R[0]}}),count:function(R){return c.count(F(R))},query:function(R){return c.query(F(R))},openCursor:function(R){var H=R.query.index,j=H.keyTail,B=H.isVirtual,K=H.keyLength;return B?c.openCursor(F(R)).then(function(Y){return Y&&D(Y)}):c.openCursor(R);function D(Y){return Object.create(Y,{continue:{value:function(X){X!=null?Y.continue(Po(X,R.reverse?o.MAX_KEY:o.MIN_KEY,j)):R.unique?Y.continue(Y.key.slice(0,K).concat(R.reverse?o.MIN_KEY:o.MAX_KEY,j)):Y.continue()}},continuePrimaryKey:{value:function(X,Q){Y.continuePrimaryKey(Po(X,o.MAX_KEY,j),Q)}},primaryKey:{get:function(){return Y.primaryKey}},key:{get:function(){var X=Y.key;return K===1?X[0]:X.slice(0,K)}},value:{get:function(){return Y.value}}})}}})}})}};function vl(o,l,c,p){return c=c||{},p=p||"",a(o).forEach(function(g){var b,_,C;v(l,g)?(b=o[g],_=l[g],typeof b=="object"&&typeof _=="object"&&b&&_?(C=E(b))!==E(_)?c[p+g]=l[g]:C==="Object"?vl(b,_,c,p+g+"."):b!==_&&(c[p+g]=l[g]):b!==_&&(c[p+g]=l[g])):c[p+g]=void 0}),a(l).forEach(function(g){v(o,g)||(c[p+g]=l[g])}),c}function wl(o,l){return l.type==="delete"?l.keys:l.keys||l.values.map(o.extractKey)}var Rw={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(o){return n(n({},o),{table:function(l){var c=o.table(l),p=c.schema.primaryKey;return n(n({},c),{mutate:function(g){var b=Le.trans,_=b.table(l).hook,C=_.deleting,q=_.creating,I=_.updating;switch(g.type){case"add":if(q.fire===Te)break;return b._promise("readwrite",function(){return F(g)},!0);case"put":if(q.fire===Te&&I.fire===Te)break;return b._promise("readwrite",function(){return F(g)},!0);case"delete":if(C.fire===Te)break;return b._promise("readwrite",function(){return F(g)},!0);case"deleteRange":if(C.fire===Te)break;return b._promise("readwrite",function(){return function R(H,j,B){return c.query({trans:H,values:!1,query:{index:p,range:j},limit:B}).then(function(K){var D=K.result;return F({type:"delete",keys:D,trans:H}).then(function(Y){return 0<Y.numFailures?Promise.reject(Y.failures[0]):D.length<B?{failures:[],numFailures:0,lastResult:void 0}:R(H,n(n({},j),{lower:D[D.length-1],lowerOpen:!0}),B)})})}(g.trans,g.range,1e4)},!0)}return c.mutate(g);function F(R){var H,j,B,K=Le.trans,D=R.keys||wl(p,R);if(!D)throw new Error("Keys missing");return(R=R.type==="add"||R.type==="put"?n(n({},R),{keys:D}):n({},R)).type!=="delete"&&(R.values=i([],R.values)),R.keys&&(R.keys=i([],R.keys)),H=c,B=D,((j=R).type==="add"?Promise.resolve([]):H.getMany({trans:j.trans,keys:B,cache:"immutable"})).then(function(Y){var X=D.map(function(Q,ie){var fe,be,he,ge=Y[ie],Ee={onerror:null,onsuccess:null};return R.type==="delete"?C.fire.call(Ee,Q,ge,K):R.type==="add"||ge===void 0?(fe=q.fire.call(Ee,Q,R.values[ie],K),Q==null&&fe!=null&&(R.keys[ie]=Q=fe,p.outbound||ne(R.values[ie],p.keyPath,Q))):(fe=vl(ge,R.values[ie]),(be=I.fire.call(Ee,fe,Q,ge,K))&&(he=R.values[ie],Object.keys(be).forEach(function(ye){v(he,ye)?he[ye]=be[ye]:ne(he,ye,be[ye])}))),Ee});return c.mutate(R).then(function(Q){for(var ie=Q.failures,fe=Q.results,be=Q.numFailures,Q=Q.lastResult,he=0;he<D.length;++he){var ge=(fe||D)[he],Ee=X[he];ge==null?Ee.onerror&&Ee.onerror(ie[he]):Ee.onsuccess&&Ee.onsuccess(R.type==="put"&&Y[he]?R.values[he]:ge)}return{failures:ie,results:fe,numFailures:be,lastResult:Q}}).catch(function(Q){return X.forEach(function(ie){return ie.onerror&&ie.onerror(Q)}),Promise.reject(Q)})})}}})}})}};function Lh(o,l,c){try{if(!l||l.keys.length<o.length)return null;for(var p=[],g=0,b=0;g<l.keys.length&&b<o.length;++g)Ze(l.keys[g],o[b])===0&&(p.push(c?P(l.values[g]):l.values[g]),++b);return p.length===o.length?p:null}catch{return null}}var kw={stack:"dbcore",level:-1,create:function(o){return{table:function(l){var c=o.table(l);return n(n({},c),{getMany:function(p){if(!p.cache)return c.getMany(p);var g=Lh(p.keys,p.trans._cache,p.cache==="clone");return g?me.resolve(g):c.getMany(p).then(function(b){return p.trans._cache={keys:p.keys,values:p.cache==="clone"?P(b):b},b})},mutate:function(p){return p.type!=="add"&&(p.trans._cache=null),c.mutate(p)}})}}}};function Rh(o,l){return o.trans.mode==="readonly"&&!!o.subscr&&!o.trans.explicit&&o.trans.db._options.cache!=="disabled"&&!l.schema.primaryKey.outbound}function kh(o,l){switch(o){case"query":return l.values&&!l.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Pw={stack:"dbcore",level:0,name:"Observability",create:function(o){var l=o.schema.name,c=new Yt(o.MIN_KEY,o.MAX_KEY);return n(n({},o),{transaction:function(p,g,b){if(Le.subscr&&g!=="readonly")throw new ae.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Le.querier));return o.transaction(p,g,b)},table:function(p){var g=o.table(p),b=g.schema,_=b.primaryKey,R=b.indexes,C=_.extractKey,q=_.outbound,I=_.autoIncrement&&R.filter(function(j){return j.compound&&j.keyPath.includes(_.keyPath)}),F=n(n({},g),{mutate:function(j){function B(ye){return ye="idb://".concat(l,"/").concat(p,"/").concat(ye),Q[ye]||(Q[ye]=new Yt)}var K,D,Y,X=j.trans,Q=j.mutatedParts||(j.mutatedParts={}),ie=B(""),fe=B(":dels"),be=j.type,Ee=j.type==="deleteRange"?[j.range]:j.type==="delete"?[j.keys]:j.values.length<50?[wl(_,j).filter(function(ye){return ye}),j.values]:[],he=Ee[0],ge=Ee[1],Ee=j.trans._cache;return u(he)?(ie.addKeys(he),(Ee=be==="delete"||he.length===ge.length?Lh(he,Ee):null)||fe.addKeys(he),(Ee||ge)&&(K=B,D=Ee,Y=ge,b.indexes.forEach(function(ye){var _e=K(ye.name||"");function Ye(et){return et!=null?ye.extractKey(et):null}function Qe(et){return ye.multiEntry&&u(et)?et.forEach(function(Tn){return _e.addKey(Tn)}):_e.addKey(et)}(D||Y).forEach(function(et,Jt){var ze=D&&Ye(D[Jt]),Jt=Y&&Ye(Y[Jt]);Ze(ze,Jt)!==0&&(ze!=null&&Qe(ze),Jt!=null&&Qe(Jt))})}))):he?(ge={from:(ge=he.lower)!==null&&ge!==void 0?ge:o.MIN_KEY,to:(ge=he.upper)!==null&&ge!==void 0?ge:o.MAX_KEY},fe.add(ge),ie.add(ge)):(ie.add(c),fe.add(c),b.indexes.forEach(function(ye){return B(ye.name).add(c)})),g.mutate(j).then(function(ye){return!he||j.type!=="add"&&j.type!=="put"||(ie.addKeys(ye.results),I&&I.forEach(function(_e){for(var Ye=j.values.map(function(ze){return _e.extractKey(ze)}),Qe=_e.keyPath.findIndex(function(ze){return ze===_.keyPath}),et=0,Tn=ye.results.length;et<Tn;++et)Ye[et][Qe]=ye.results[et];B(_e.name).addKeys(Ye)})),X.mutatedParts=Ro(X.mutatedParts||{},Q),ye})}}),R=function(B){var K=B.query,B=K.index,K=K.range;return[B,new Yt((B=K.lower)!==null&&B!==void 0?B:o.MIN_KEY,(K=K.upper)!==null&&K!==void 0?K:o.MAX_KEY)]},H={get:function(j){return[_,new Yt(j.key)]},getMany:function(j){return[_,new Yt().addKeys(j.keys)]},count:R,query:R,openCursor:R};return a(H).forEach(function(j){F[j]=function(B){var K=Le.subscr,D=!!K,Y=Rh(Le,g)&&kh(j,B)?B.obsSet={}:K;if(D){var X=function(ge){return ge="idb://".concat(l,"/").concat(p,"/").concat(ge),Y[ge]||(Y[ge]=new Yt)},Q=X(""),ie=X(":dels"),K=H[j](B),D=K[0],K=K[1];if((j==="query"&&D.isPrimaryKey&&!B.values?ie:X(D.name||"")).add(K),!D.isPrimaryKey){if(j!=="count"){var fe=j==="query"&&q&&B.values&&g.query(n(n({},B),{values:!1}));return g[j].apply(this,arguments).then(function(ge){if(j==="query"){if(q&&B.values)return fe.then(function(Ye){return Ye=Ye.result,Q.addKeys(Ye),ge});var Ee=B.values?ge.result.map(C):ge.result;(B.values?Q:ie).addKeys(Ee)}else if(j==="openCursor"){var ye=ge,_e=B.values;return ye&&Object.create(ye,{key:{get:function(){return ie.addKey(ye.primaryKey),ye.key}},primaryKey:{get:function(){var Ye=ye.primaryKey;return ie.addKey(Ye),Ye}},value:{get:function(){return _e&&Q.addKey(ye.primaryKey),ye.value}}})}return ge})}ie.add(c)}}return g[j].apply(this,arguments)}}),F}})}};function Ph(o,l,c){if(c.numFailures===0)return l;if(l.type==="deleteRange")return null;var p=l.keys?l.keys.length:"values"in l&&l.values?l.values.length:1;return c.numFailures===p?null:(l=n({},l),u(l.keys)&&(l.keys=l.keys.filter(function(g,b){return!(b in c.failures)})),"values"in l&&u(l.values)&&(l.values=l.values.filter(function(g,b){return!(b in c.failures)})),l)}function xl(o,l){return c=o,((p=l).lower===void 0||(p.lowerOpen?0<Ze(c,p.lower):0<=Ze(c,p.lower)))&&(o=o,(l=l).upper===void 0||(l.upperOpen?Ze(o,l.upper)<0:Ze(o,l.upper)<=0));var c,p}function qh(o,l,H,p,g,b){if(!H||H.length===0)return o;var _=l.query.index,C=_.multiEntry,q=l.query.range,I=p.schema.primaryKey.extractKey,F=_.extractKey,R=(_.lowLevelIndex||_).extractKey,H=H.reduce(function(j,B){var K=j,D=[];if(B.type==="add"||B.type==="put")for(var Y=new Yt,X=B.values.length-1;0<=X;--X){var Q,ie=B.values[X],fe=I(ie);Y.hasKey(fe)||(Q=F(ie),(C&&u(Q)?Q.some(function(ye){return xl(ye,q)}):xl(Q,q))&&(Y.addKey(fe),D.push(ie)))}switch(B.type){case"add":var be=new Yt().addKeys(l.values?j.map(function(_e){return I(_e)}):j),K=j.concat(l.values?D.filter(function(_e){return _e=I(_e),!be.hasKey(_e)&&(be.addKey(_e),!0)}):D.map(function(_e){return I(_e)}).filter(function(_e){return!be.hasKey(_e)&&(be.addKey(_e),!0)}));break;case"put":var he=new Yt().addKeys(B.values.map(function(_e){return I(_e)}));K=j.filter(function(_e){return!he.hasKey(l.values?I(_e):_e)}).concat(l.values?D:D.map(function(_e){return I(_e)}));break;case"delete":var ge=new Yt().addKeys(B.keys);K=j.filter(function(_e){return!ge.hasKey(l.values?I(_e):_e)});break;case"deleteRange":var Ee=B.range;K=j.filter(function(_e){return!xl(I(_e),Ee)})}return K},o);return H===o?o:(H.sort(function(j,B){return Ze(R(j),R(B))||Ze(I(j),I(B))}),l.limit&&l.limit<1/0&&(H.length>l.limit?H.length=l.limit:o.length===l.limit&&H.length<l.limit&&(g.dirty=!0)),b?Object.freeze(H):H)}function jh(o,l){return Ze(o.lower,l.lower)===0&&Ze(o.upper,l.upper)===0&&!!o.lowerOpen==!!l.lowerOpen&&!!o.upperOpen==!!l.upperOpen}function qw(o,l){return function(c,p,g,b){if(c===void 0)return p!==void 0?-1:0;if(p===void 0)return 1;if((p=Ze(c,p))===0){if(g&&b)return 0;if(g)return 1;if(b)return-1}return p}(o.lower,l.lower,o.lowerOpen,l.lowerOpen)<=0&&0<=function(c,p,g,b){if(c===void 0)return p!==void 0?1:0;if(p===void 0)return-1;if((p=Ze(c,p))===0){if(g&&b)return 0;if(g)return-1;if(b)return 1}return p}(o.upper,l.upper,o.upperOpen,l.upperOpen)}function jw(o,l,c,p){o.subscribers.add(c),p.addEventListener("abort",function(){var g,b;o.subscribers.delete(c),o.subscribers.size===0&&(g=o,b=l,setTimeout(function(){g.subscribers.size===0&&U(b,g)},3e3))})}var Iw={stack:"dbcore",level:0,name:"Cache",create:function(o){var l=o.schema.name;return n(n({},o),{transaction:function(c,p,g){var b,_,C=o.transaction(c,p,g);return p==="readwrite"&&(_=(b=new AbortController).signal,g=function(q){return function(){if(b.abort(),p==="readwrite"){for(var I=new Set,F=0,R=c;F<R.length;F++){var H=R[F],j=bi["idb://".concat(l,"/").concat(H)];if(j){var B=o.table(H),K=j.optimisticOps.filter(function(_e){return _e.trans===C});if(C._explicit&&q&&C.mutatedParts)for(var D=0,Y=Object.values(j.queries.query);D<Y.length;D++)for(var X=0,Q=(be=Y[D]).slice();X<Q.length;X++)pl((he=Q[X]).obsSet,C.mutatedParts)&&(U(be,he),he.subscribers.forEach(function(_e){return I.add(_e)}));else if(0<K.length){j.optimisticOps=j.optimisticOps.filter(function(_e){return _e.trans!==C});for(var ie=0,fe=Object.values(j.queries.query);ie<fe.length;ie++)for(var be,he,ge,Ee=0,ye=(be=fe[ie]).slice();Ee<ye.length;Ee++)(he=ye[Ee]).res!=null&&C.mutatedParts&&(q&&!he.dirty?(ge=Object.isFrozen(he.res),ge=qh(he.res,he.req,K,B,he,ge),he.dirty?(U(be,he),he.subscribers.forEach(function(_e){return I.add(_e)})):ge!==he.res&&(he.res=ge,he.promise=me.resolve({result:ge}))):(he.dirty&&U(be,he),he.subscribers.forEach(function(_e){return I.add(_e)})))}}}I.forEach(function(_e){return _e()})}}},C.addEventListener("abort",g(!1),{signal:_}),C.addEventListener("error",g(!1),{signal:_}),C.addEventListener("complete",g(!0),{signal:_})),C},table:function(c){var p=o.table(c),g=p.schema.primaryKey;return n(n({},p),{mutate:function(b){var _=Le.trans;if(g.outbound||_.db._options.cache==="disabled"||_.explicit||_.idbtrans.mode!=="readwrite")return p.mutate(b);var C=bi["idb://".concat(l,"/").concat(c)];return C?(_=p.mutate(b),b.type!=="add"&&b.type!=="put"||!(50<=b.values.length||wl(g,b).some(function(q){return q==null}))?(C.optimisticOps.push(b),b.mutatedParts&&ko(b.mutatedParts),_.then(function(q){0<q.numFailures&&(U(C.optimisticOps,b),(q=Ph(0,b,q))&&C.optimisticOps.push(q),b.mutatedParts&&ko(b.mutatedParts))}),_.catch(function(){U(C.optimisticOps,b),b.mutatedParts&&ko(b.mutatedParts)})):_.then(function(q){var I=Ph(0,n(n({},b),{values:b.values.map(function(F,R){var H;return q.failures[R]||(F=(H=g.keyPath)!==null&&H!==void 0&&H.includes(".")?P(F):n({},F),ne(F,g.keyPath,q.results[R])),F})}),q);C.optimisticOps.push(I),queueMicrotask(function(){return b.mutatedParts&&ko(b.mutatedParts)})}),_):p.mutate(b)},query:function(b){if(!Rh(Le,p)||!kh("query",b))return p.query(b);var _=((I=Le.trans)===null||I===void 0?void 0:I.db._options.cache)==="immutable",R=Le,C=R.requery,q=R.signal,I=function(B,K,D,Y){var X=bi["idb://".concat(B,"/").concat(K)];if(!X)return[];if(!(K=X.queries[D]))return[null,!1,X,null];var Q=K[(Y.query?Y.query.index.name:null)||""];if(!Q)return[null,!1,X,null];switch(D){case"query":var ie=Q.find(function(fe){return fe.req.limit===Y.limit&&fe.req.values===Y.values&&jh(fe.req.query.range,Y.query.range)});return ie?[ie,!0,X,Q]:[Q.find(function(fe){return("limit"in fe.req?fe.req.limit:1/0)>=Y.limit&&(!Y.values||fe.req.values)&&qw(fe.req.query.range,Y.query.range)}),!1,X,Q];case"count":return ie=Q.find(function(fe){return jh(fe.req.query.range,Y.query.range)}),[ie,!!ie,X,Q]}}(l,c,"query",b),F=I[0],R=I[1],H=I[2],j=I[3];return F&&R?F.obsSet=b.obsSet:(R=p.query(b).then(function(B){var K=B.result;if(F&&(F.res=K),_){for(var D=0,Y=K.length;D<Y;++D)Object.freeze(K[D]);Object.freeze(K)}else B.result=P(K);return B}).catch(function(B){return j&&F&&U(j,F),Promise.reject(B)}),F={obsSet:b.obsSet,promise:R,subscribers:new Set,type:"query",req:b,dirty:!1},j?j.push(F):(j=[F],(H=H||(bi["idb://".concat(l,"/").concat(c)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[b.query.index.name||""]=j)),jw(F,j,C,q),F.promise.then(function(B){return{result:qh(B.result,b,H==null?void 0:H.optimisticOps,p,F,_)}})}})}})}};function qo(o,l){return new Proxy(o,{get:function(c,p,g){return p==="db"?l:Reflect.get(c,p,g)}})}var qr=(Tt.prototype.version=function(o){if(isNaN(o)||o<.1)throw new ae.Type("Given version is not a positive number");if(o=Math.round(10*o)/10,this.idbdb||this._state.isBeingOpened)throw new ae.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,o);var l=this._versions,c=l.filter(function(p){return p._cfg.version===o})[0];return c||(c=new this.Version(o),l.push(c),l.sort(rt),c.stores({}),this._state.autoSchema=!1,c)},Tt.prototype._whenReady=function(o){var l=this;return this.idbdb&&(this._state.openComplete||Le.letThrough||this._vip)?o():new me(function(c,p){if(l._state.openComplete)return p(new ae.DatabaseClosed(l._state.dbOpenError));if(!l._state.isBeingOpened){if(!l._state.autoOpen)return void p(new ae.DatabaseClosed);l.open().catch(Te)}l._state.dbReadyPromise.then(c,p)}).then(o)},Tt.prototype.use=function(o){var l=o.stack,c=o.create,p=o.level,g=o.name;return g&&this.unuse({stack:l,name:g}),o=this._middlewares[l]||(this._middlewares[l]=[]),o.push({stack:l,create:c,level:p??10,name:g}),o.sort(function(b,_){return b.level-_.level}),this},Tt.prototype.unuse=function(o){var l=o.stack,c=o.name,p=o.create;return l&&this._middlewares[l]&&(this._middlewares[l]=this._middlewares[l].filter(function(g){return p?g.create!==p:!!c&&g.name!==c})),this},Tt.prototype.open=function(){var o=this;return ft(Dt,function(){return Cw(o)})},Tt.prototype._close=function(){var o=this._state,l=hn.indexOf(this);if(0<=l&&hn.splice(l,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}o.isBeingOpened||(o.dbReadyPromise=new me(function(c){o.dbReadyResolve=c}),o.openCanceller=new me(function(c,p){o.cancelOpen=p}))},Tt.prototype.close=function(c){var l=(c===void 0?{disableAutoOpen:!0}:c).disableAutoOpen,c=this._state;l?(c.isBeingOpened&&c.cancelOpen(new ae.DatabaseClosed),this._close(),c.autoOpen=!1,c.dbOpenError=new ae.DatabaseClosed):(this._close(),c.autoOpen=this._options.autoOpen||c.isBeingOpened,c.openComplete=!1,c.dbOpenError=null)},Tt.prototype.delete=function(o){var l=this;o===void 0&&(o={disableAutoOpen:!0});var c=0<arguments.length&&typeof arguments[0]!="object",p=this._state;return new me(function(g,b){function _(){l.close(o);var C=l._deps.indexedDB.deleteDatabase(l.name);C.onsuccess=at(function(){var q,I,F;q=l._deps,I=l.name,F=q.indexedDB,q=q.IDBKeyRange,Zr(F)||I===wn||Jr(F,q).delete(I).catch(Te),g()}),C.onerror=tn(b),C.onblocked=l._fireOnBlocked}if(c)throw new ae.InvalidArgument("Invalid closeOptions argument to db.delete()");p.isBeingOpened?p.dbReadyPromise.then(_):_()})},Tt.prototype.backendDB=function(){return this.idbdb},Tt.prototype.isOpen=function(){return this.idbdb!==null},Tt.prototype.hasBeenClosed=function(){var o=this._state.dbOpenError;return o&&o.name==="DatabaseClosed"},Tt.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Tt.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Tt.prototype,"tables",{get:function(){var o=this;return a(this._allTables).map(function(l){return o._allTables[l]})},enumerable:!1,configurable:!0}),Tt.prototype.transaction=function(){var o=(function(l,c,p){var g=arguments.length;if(g<2)throw new ae.InvalidArgument("Too few arguments");for(var b=new Array(g-1);--g;)b[g-1]=arguments[g];return p=b.pop(),[l,Se(b),p]}).apply(this,arguments);return this._transaction.apply(this,o)},Tt.prototype._transaction=function(o,l,c){var p=this,g=Le.trans;g&&g.db===this&&o.indexOf("!")===-1||(g=null);var b,_,C=o.indexOf("?")!==-1;o=o.replace("!","").replace("?","");try{if(_=l.map(function(I){if(I=I instanceof p.Table?I.name:I,typeof I!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return I}),o=="r"||o===mr)b=mr;else{if(o!="rw"&&o!=yr)throw new ae.InvalidArgument("Invalid transaction mode: "+o);b=yr}if(g){if(g.mode===mr&&b===yr){if(!C)throw new ae.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");g=null}g&&_.forEach(function(I){if(g&&g.storeNames.indexOf(I)===-1){if(!C)throw new ae.SubTransaction("Table "+I+" not included in parent transaction.");g=null}}),C&&g&&!g.active&&(g=null)}}catch(I){return g?g._promise(null,function(F,R){R(I)}):Xe(I)}var q=(function I(F,R,H,j,B){return me.resolve().then(function(){var K=Le.transless||Le,D=F._createTransaction(R,H,F._dbSchema,j);if(D.explicit=!0,K={trans:D,transless:K},j)D.idbtrans=j.idbtrans;else try{D.create(),D.idbtrans._explicit=!0,F._state.PR1398_maxLoop=3}catch(Q){return Q.name===We.InvalidState&&F.isOpen()&&0<--F._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),F.close({disableAutoOpen:!1}),F.open().then(function(){return I(F,R,H,null,B)})):Xe(Q)}var Y,X=le(B);return X&&we(),K=me.follow(function(){var Q;(Y=B.call(D,D))&&(X?(Q=qe.bind(null,null),Y.then(Q,Q)):typeof Y.next=="function"&&typeof Y.throw=="function"&&(Y=bl(Y)))},K),(Y&&typeof Y.then=="function"?me.resolve(Y).then(function(Q){return D.active?Q:Xe(new ae.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):K.then(function(){return Y})).then(function(Q){return j&&D._resolve(),D._completion.then(function(){return Q})}).catch(function(Q){return D._reject(Q),Xe(Q)})})}).bind(null,this,b,_,g,c);return g?g._promise(b,q,"lock"):Le.trans?ft(Le.transless,function(){return p._whenReady(q)}):this._whenReady(q)},Tt.prototype.table=function(o){if(!v(this._allTables,o))throw new ae.InvalidTable("Table ".concat(o," does not exist"));return this._allTables[o]},Tt);function Tt(o,l){var c=this;this._middlewares={},this.verno=0;var p=Tt.dependencies;this._options=l=n({addons:Tt.addons,autoOpen:!0,indexedDB:p.indexedDB,IDBKeyRange:p.IDBKeyRange,cache:"cloned"},l),this._deps={indexedDB:l.indexedDB,IDBKeyRange:l.IDBKeyRange},p=l.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var g,b,_,C,q,I={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Te,dbReadyPromise:null,cancelOpen:Te,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:l.autoOpen};I.dbReadyPromise=new me(function(R){I.dbReadyResolve=R}),I.openCanceller=new me(function(R,H){I.cancelOpen=H}),this._state=I,this.name=o,this.on=xn(this,"populate","blocked","versionchange","close",{ready:[Xt,Te]}),this.on.ready.subscribe=Z(this.on.ready.subscribe,function(R){return function(H,j){Tt.vip(function(){var B,K=c._state;K.openComplete?(K.dbOpenError||me.resolve().then(H),j&&R(H)):K.onReadyBeingFired?(K.onReadyBeingFired.push(H),j&&R(H)):(R(H),B=c,j||R(function D(){B.on.ready.unsubscribe(H),B.on.ready.unsubscribe(D)}))})}}),this.Collection=(g=this,br(En.prototype,function(Y,D){this.db=g;var j=Hr,B=null;if(D)try{j=D()}catch(X){B=X}var K=Y._ctx,D=K.table,Y=D.hook.reading.fire;this._ctx={table:D,index:K.index,isPrimKey:!K.index||D.schema.primKey.keyPath&&K.index===D.schema.primKey.name,range:j,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:B,or:K.or,valueMapper:Y!==Ue?Y:null}})),this.Table=(b=this,br(Rr.prototype,function(R,H,j){this.db=b,this._tx=j,this.name=R,this.schema=H,this.hook=b._allTables[R]?b._allTables[R].hook:xn(null,{creating:[zt,Te],reading:[ut,Ue],updating:[kn,Te],deleting:[Vt,Te]})})),this.Transaction=(_=this,br(Gi.prototype,function(R,H,j,B,K){var D=this;this.db=_,this.mode=R,this.storeNames=H,this.schema=j,this.chromeTransactionDurability=B,this.idbtrans=null,this.on=xn(this,"complete","error","abort"),this.parent=K||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new me(function(Y,X){D._resolve=Y,D._reject=X}),this._completion.then(function(){D.active=!1,D.on.complete.fire()},function(Y){var X=D.active;return D.active=!1,D.on.error.fire(Y),D.parent?D.parent._reject(Y):X&&D.idbtrans&&D.idbtrans.abort(),Xe(Y)})})),this.Version=(C=this,br(Pr.prototype,function(R){this.db=C,this._cfg={version:R,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(q=this,br(jt.prototype,function(R,H,j){if(this.db=q,this._ctx={table:R,index:H===":id"?null:H,or:j},this._cmp=this._ascending=Ze,this._descending=function(B,K){return Ze(K,B)},this._max=function(B,K){return 0<Ze(B,K)?B:K},this._min=function(B,K){return Ze(B,K)<0?B:K},this._IDBKeyRange=q._deps.IDBKeyRange,!this._IDBKeyRange)throw new ae.MissingAPI})),this.on("versionchange",function(R){0<R.newVersion?console.warn("Another connection wants to upgrade database '".concat(c.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(c.name,"'. Closing db now to resume the delete request.")),c.close({disableAutoOpen:!1})}),this.on("blocked",function(R){!R.newVersion||R.newVersion<R.oldVersion?console.warn("Dexie.delete('".concat(c.name,"') was blocked")):console.warn("Upgrade '".concat(c.name,"' blocked by other connection holding version ").concat(R.oldVersion/10))}),this._maxKey=nr(l.IDBKeyRange),this._createTransaction=function(R,H,j,B){return new c.Transaction(R,H,j,c._options.chromeTransactionDurability,B)},this._fireOnBlocked=function(R){c.on("blocked").fire(R),hn.filter(function(H){return H.name===c.name&&H!==c&&!H._state.vcFired}).map(function(H){return H.on("versionchange").fire(R)})},this.use(kw),this.use(Iw),this.use(Pw),this.use(Lw),this.use(Rw);var F=new Proxy(this,{get:function(R,H,j){if(H==="_vip")return!0;if(H==="table")return function(K){return qo(c.table(K),F)};var B=Reflect.get(R,H,j);return B instanceof Rr?qo(B,F):H==="tables"?B.map(function(K){return qo(K,F)}):H==="_createTransaction"?function(){return qo(B.apply(this,arguments),F)}:B}});this.vip=F,p.forEach(function(R){return R(c)})}var jo,Un=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",$w=(El.prototype.subscribe=function(o,l,c){return this._subscribe(o&&typeof o!="function"?o:{next:o,error:l,complete:c})},El.prototype[Un]=function(){return this},El);function El(o){this._subscribe=o}try{jo={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{jo={indexedDB:null,IDBKeyRange:null}}function Ih(o){var l,c=!1,p=new $w(function(g){var b=le(o),_,C=!1,q={},I={},F={get closed(){return C},unsubscribe:function(){C||(C=!0,_&&_.abort(),R&&Mn.storagemutated.unsubscribe(j))}};g.start&&g.start(F);var R=!1,H=function(){return Je(B)},j=function(K){Ro(q,K),pl(I,q)&&H()},B=function(){var K,D,Y;!C&&jo.indexedDB&&(q={},K={},_&&_.abort(),_=new AbortController,Y=function(X){var Q=kt();try{b&&we();var ie=oe(o,X);return ie=b?ie.finally(qe):ie}finally{Q&&fn()}}(D={subscr:K,signal:_.signal,requery:H,querier:o,trans:null}),Promise.resolve(Y).then(function(X){c=!0,l=X,C||D.signal.aborted||(q={},function(Q){for(var ie in Q)if(v(Q,ie))return;return 1}(I=K)||R||(Mn(tr,j),R=!0),Je(function(){return!C&&g.next&&g.next(X)}))},function(X){c=!1,["DatabaseClosedError","AbortError"].includes(X==null?void 0:X.name)||C||Je(function(){C||g.error&&g.error(X)})}))};return setTimeout(H,0),F});return p.hasValue=function(){return c},p.getValue=function(){return l},p}var vi=qr;function Ol(o){var l=Xr;try{Xr=!0,Mn.storagemutated.fire(o),yl(o,!0)}finally{Xr=l}}y(vi,n(n({},$e),{delete:function(o){return new vi(o,{addons:[]}).delete()},exists:function(o){return new vi(o,{addons:[]}).open().then(function(l){return l.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(o){try{return l=vi.dependencies,c=l.indexedDB,l=l.IDBKeyRange,(Zr(c)?Promise.resolve(c.databases()).then(function(p){return p.map(function(g){return g.name}).filter(function(g){return g!==wn})}):Jr(c,l).toCollection().primaryKeys()).then(o)}catch{return Xe(new ae.MissingAPI)}var l,c},defineClass:function(){return function(o){f(this,o)}},ignoreTransaction:function(o){return Le.trans?ft(Le.transless,o):o()},vip:hl,async:function(o){return function(){try{var l=bl(o.apply(this,arguments));return l&&typeof l.then=="function"?l:me.resolve(l)}catch(c){return Xe(c)}}},spawn:function(o,l,c){try{var p=bl(o.apply(c,l||[]));return p&&typeof p.then=="function"?p:me.resolve(p)}catch(g){return Xe(g)}},currentTransaction:{get:function(){return Le.trans||null}},waitFor:function(o,l){return l=me.resolve(typeof o=="function"?vi.ignoreTransaction(o):o).timeout(l||6e4),Le.trans?Le.trans.waitFor(l):l},Promise:me,debug:{get:function(){return Lt},set:function(o){Cr(o)}},derive:O,extend:f,props:y,override:Z,Events:xn,on:Mn,liveQuery:Ih,extendObservabilitySet:Ro,getByKeyPath:ce,setByKeyPath:ne,delByKeyPath:function(o,l){typeof l=="string"?ne(o,l,void 0):"length"in l&&[].map.call(l,function(c){ne(o,c,void 0)})},shallowClone:re,deepClone:P,getObjectDiff:vl,cmp:Ze,asap:ue,minKey:-1/0,addons:[],connections:hn,errnames:We,dependencies:jo,cache:bi,semVer:"4.0.11",version:"4.0.11".split(".").map(function(o){return parseInt(o)}).reduce(function(o,l,c){return o+l/Math.pow(10,2*c)})})),vi.maxKey=nr(vi.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Mn(tr,function(o){Xr||(o=new CustomEvent(Er,{detail:o}),Xr=!0,dispatchEvent(o),Xr=!1)}),addEventListener(Er,function(o){o=o.detail,Xr||Ol(o)}));var Ji,Xr=!1,$h=function(){};return typeof BroadcastChannel<"u"&&(($h=function(){(Ji=new BroadcastChannel(Er)).onmessage=function(o){return o.data&&Ol(o.data)}})(),typeof Ji.unref=="function"&&Ji.unref(),Mn(tr,function(o){Xr||Ji.postMessage(o)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(o){if(!qr.disableBfCache&&o.persisted){Lt&&console.debug("Dexie: handling persisted pagehide"),Ji!=null&&Ji.close();for(var l=0,c=hn;l<c.length;l++)c[l].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(o){!qr.disableBfCache&&o.persisted&&(Lt&&console.debug("Dexie: handling persisted pageshow"),$h(),Ol({all:new Yt(-1/0,[[]])}))})),me.rejectionMapper=function(o,l){return!o||o instanceof pe||o instanceof TypeError||o instanceof SyntaxError||!o.name||!je[o.name]?o:(l=new je[o.name](l||o.message,o),"stack"in o&&A(l,"stack",{get:function(){return this.inner.stack}}),l)},Cr(Lt),n(qr,Object.freeze({__proto__:null,Dexie:qr,liveQuery:Ih,Entity:Ki,cmp:Ze,PropModification:kr,replacePrefix:function(o,l){return new kr({replacePrefix:[o,l]})},add:function(o){return new kr({add:o})},remove:function(o){return new kr({remove:o})},default:qr,RangeSet:Yt,mergeRanges:ks,rangesOverlap:Th}),{default:qr}),qr})}(za)),za.exports}var E1=x1();const Va=Bi(E1),Tf=Symbol.for("Dexie"),go=globalThis[Tf]||(globalThis[Tf]=Va);if(Va.semVer!==go.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Va.semVer} and ${go.semVer}`);const{liveQuery:wx,mergeRanges:xx,rangesOverlap:Ex,RangeSet:Ox,cmp:Sx,Entity:Ax,PropModification:Tx,replacePrefix:_x,add:Nx,remove:Cx}=go;class O1 extends go{constructor(){super("db"),Sf(this,"rows"),this.version(1).stores({rows:"++id, key"})}}new O1;var Wa={exports:{}},S1=Wa.exports,_f;function A1(){return _f||(_f=1,function(r,e){(function(t,n){r.exports=n()})(S1,function(){var t=1e3,n=6e4,i=36e5,s="millisecond",a="second",u="minute",f="hour",d="day",m="week",v="month",y="quarter",x="year",A="date",O="Invalid Date",N=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,M=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,W={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var E=["th","st","nd","rd"],T=V%100;return"["+V+(E[(T-20)%10]||E[T]||E[0])+"]"}},Z=function(V,E,T){var $=String(V);return!$||$.length>=E?V:""+Array(E+1-$.length).join(T)+V},de={s:Z,z:function(V){var E=-V.utcOffset(),T=Math.abs(E),$=Math.floor(T/60),U=T%60;return(E<=0?"+":"-")+Z($,2,"0")+":"+Z(U,2,"0")},m:function V(E,T){if(E.date()<T.date())return-V(T,E);var $=12*(T.year()-E.year())+(T.month()-E.month()),U=E.clone().add($,v),J=T-U<0,z=E.clone().add($+(J?-1:1),v);return+(-($+(T-U)/(J?U-z:z-U))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:v,y:x,w:m,d,D:A,h:f,m:u,s:a,ms:s,Q:y}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},ue="en",ce={};ce[ue]=W;var ne="$isDayjsObject",re=function(V){return V instanceof G||!(!V||!V[ne])},xe=function V(E,T,$){var U;if(!E)return ue;if(typeof E=="string"){var J=E.toLowerCase();ce[J]&&(U=J),T&&(ce[J]=T,U=J);var z=E.split("-");if(!U&&z.length>1)return V(z[0])}else{var le=E.name;ce[le]=E,U=le}return!$&&U&&(ue=U),U||!$&&ue},Se=function(V,E){if(re(V))return V.clone();var T=typeof E=="object"?E:{};return T.date=V,T.args=arguments,new G(T)},S=de;S.l=xe,S.i=re,S.w=function(V,E){return Se(V,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var G=function(){function V(T){this.$L=xe(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[ne]=!0}var E=V.prototype;return E.parse=function(T){this.$d=function($){var U=$.date,J=$.utc;if(U===null)return new Date(NaN);if(S.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var z=U.match(N);if(z){var le=z[2]-1||0,ve=(z[7]||"0").substring(0,3);return J?new Date(Date.UTC(z[1],le,z[3]||1,z[4]||0,z[5]||0,z[6]||0,ve)):new Date(z[1],le,z[3]||1,z[4]||0,z[5]||0,z[6]||0,ve)}}return new Date(U)}(T),this.init()},E.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},E.$utils=function(){return S},E.isValid=function(){return this.$d.toString()!==O},E.isSame=function(T,$){var U=Se(T);return this.startOf($)<=U&&U<=this.endOf($)},E.isAfter=function(T,$){return Se(T)<this.startOf($)},E.isBefore=function(T,$){return this.endOf($)<Se(T)},E.$g=function(T,$,U){return S.u(T)?this[$]:this.set(U,T)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(T,$){var U=this,J=!!S.u($)||$,z=S.p(T),le=function(ae,je){var $e=S.w(U.$u?Date.UTC(U.$y,je,ae):new Date(U.$y,je,ae),U);return J?$e:$e.endOf(d)},ve=function(ae,je){return S.w(U.toDate()[ae].apply(U.toDate("s"),(J?[0,0,0,0]:[23,59,59,999]).slice(je)),U)},pe=this.$W,Ne=this.$M,Oe=this.$D,Ke="set"+(this.$u?"UTC":"");switch(z){case x:return J?le(1,0):le(31,11);case v:return J?le(1,Ne):le(0,Ne+1);case m:var We=this.$locale().weekStart||0,Ie=(pe<We?pe+7:pe)-We;return le(J?Oe-Ie:Oe+(6-Ie),Ne);case d:case A:return ve(Ke+"Hours",0);case f:return ve(Ke+"Minutes",1);case u:return ve(Ke+"Seconds",2);case a:return ve(Ke+"Milliseconds",3);default:return this.clone()}},E.endOf=function(T){return this.startOf(T,!1)},E.$set=function(T,$){var U,J=S.p(T),z="set"+(this.$u?"UTC":""),le=(U={},U[d]=z+"Date",U[A]=z+"Date",U[v]=z+"Month",U[x]=z+"FullYear",U[f]=z+"Hours",U[u]=z+"Minutes",U[a]=z+"Seconds",U[s]=z+"Milliseconds",U)[J],ve=J===d?this.$D+($-this.$W):$;if(J===v||J===x){var pe=this.clone().set(A,1);pe.$d[le](ve),pe.init(),this.$d=pe.set(A,Math.min(this.$D,pe.daysInMonth())).$d}else le&&this.$d[le](ve);return this.init(),this},E.set=function(T,$){return this.clone().$set(T,$)},E.get=function(T){return this[S.p(T)]()},E.add=function(T,$){var U,J=this;T=Number(T);var z=S.p($),le=function(Ne){var Oe=Se(J);return S.w(Oe.date(Oe.date()+Math.round(Ne*T)),J)};if(z===v)return this.set(v,this.$M+T);if(z===x)return this.set(x,this.$y+T);if(z===d)return le(1);if(z===m)return le(7);var ve=(U={},U[u]=n,U[f]=i,U[a]=t,U)[z]||1,pe=this.$d.getTime()+T*ve;return S.w(pe,this)},E.subtract=function(T,$){return this.add(-1*T,$)},E.format=function(T){var $=this,U=this.$locale();if(!this.isValid())return U.invalidDate||O;var J=T||"YYYY-MM-DDTHH:mm:ssZ",z=S.z(this),le=this.$H,ve=this.$m,pe=this.$M,Ne=U.weekdays,Oe=U.months,Ke=U.meridiem,We=function(je,$e,Te,Ue){return je&&(je[$e]||je($,J))||Te[$e].slice(0,Ue)},Ie=function(je){return S.s(le%12||12,je,"0")},ae=Ke||function(je,$e,Te){var Ue=je<12?"AM":"PM";return Te?Ue.toLowerCase():Ue};return J.replace(M,function(je,$e){return $e||function(Te){switch(Te){case"YY":return String($.$y).slice(-2);case"YYYY":return S.s($.$y,4,"0");case"M":return pe+1;case"MM":return S.s(pe+1,2,"0");case"MMM":return We(U.monthsShort,pe,Oe,3);case"MMMM":return We(Oe,pe);case"D":return $.$D;case"DD":return S.s($.$D,2,"0");case"d":return String($.$W);case"dd":return We(U.weekdaysMin,$.$W,Ne,2);case"ddd":return We(U.weekdaysShort,$.$W,Ne,3);case"dddd":return Ne[$.$W];case"H":return String(le);case"HH":return S.s(le,2,"0");case"h":return Ie(1);case"hh":return Ie(2);case"a":return ae(le,ve,!0);case"A":return ae(le,ve,!1);case"m":return String(ve);case"mm":return S.s(ve,2,"0");case"s":return String($.$s);case"ss":return S.s($.$s,2,"0");case"SSS":return S.s($.$ms,3,"0");case"Z":return z}return null}(je)||z.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(T,$,U){var J,z=this,le=S.p($),ve=Se(T),pe=(ve.utcOffset()-this.utcOffset())*n,Ne=this-ve,Oe=function(){return S.m(z,ve)};switch(le){case x:J=Oe()/12;break;case v:J=Oe();break;case y:J=Oe()/3;break;case m:J=(Ne-pe)/6048e5;break;case d:J=(Ne-pe)/864e5;break;case f:J=Ne/i;break;case u:J=Ne/n;break;case a:J=Ne/t;break;default:J=Ne}return U?J:S.a(J)},E.daysInMonth=function(){return this.endOf(v).$D},E.$locale=function(){return ce[this.$L]},E.locale=function(T,$){if(!T)return this.$L;var U=this.clone(),J=xe(T,$,!0);return J&&(U.$L=J),U},E.clone=function(){return S.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},V}(),P=G.prototype;return Se.prototype=P,[["$ms",s],["$s",a],["$m",u],["$H",f],["$W",d],["$M",v],["$y",x],["$D",A]].forEach(function(V){P[V[1]]=function(E){return this.$g(E,V[0],V[1])}}),Se.extend=function(V,E){return V.$i||(V(E,G,Se),V.$i=!0),Se},Se.locale=xe,Se.isDayjs=re,Se.unix=function(V){return Se(1e3*V)},Se.en=ce[ue],Se.Ls=ce,Se.p={},Se})}(Wa)),Wa.exports}var T1=A1();const Ga=Bi(T1);var Ya={exports:{}},_1=Ya.exports,Nf;function N1(){return Nf||(Nf=1,function(r,e){(function(t,n){r.exports=n()})(_1,function(){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"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,f={},d=function(N){return(N=+N)+(N>68?1900:2e3)},m=function(N){return function(M){this[N]=+M}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(N){(this.zone||(this.zone={})).offset=function(M){if(!M||M==="Z")return 0;var W=M.match(/([+-]|\d\d)/g),Z=60*W[1]+(+W[2]||0);return Z===0?0:W[0]==="+"?-Z:Z}(N)}],y=function(N){var M=f[N];return M&&(M.indexOf?M:M.s.concat(M.f))},x=function(N,M){var W,Z=f.meridiem;if(Z){for(var de=1;de<=24;de+=1)if(N.indexOf(Z(de,0,M))>-1){W=de>12;break}}else W=N===(M?"pm":"PM");return W},A={A:[u,function(N){this.afternoon=x(N,!1)}],a:[u,function(N){this.afternoon=x(N,!0)}],Q:[i,function(N){this.month=3*(N-1)+1}],S:[i,function(N){this.milliseconds=100*+N}],SS:[s,function(N){this.milliseconds=10*+N}],SSS:[/\d{3}/,function(N){this.milliseconds=+N}],s:[a,m("seconds")],ss:[a,m("seconds")],m:[a,m("minutes")],mm:[a,m("minutes")],H:[a,m("hours")],h:[a,m("hours")],HH:[a,m("hours")],hh:[a,m("hours")],D:[a,m("day")],DD:[s,m("day")],Do:[u,function(N){var M=f.ordinal,W=N.match(/\d+/);if(this.day=W[0],M)for(var Z=1;Z<=31;Z+=1)M(Z).replace(/\[|\]/g,"")===N&&(this.day=Z)}],w:[a,m("week")],ww:[s,m("week")],M:[a,m("month")],MM:[s,m("month")],MMM:[u,function(N){var M=y("months"),W=(y("monthsShort")||M.map(function(Z){return Z.slice(0,3)})).indexOf(N)+1;if(W<1)throw new Error;this.month=W%12||W}],MMMM:[u,function(N){var M=y("months").indexOf(N)+1;if(M<1)throw new Error;this.month=M%12||M}],Y:[/[+-]?\d+/,m("year")],YY:[s,function(N){this.year=d(N)}],YYYY:[/\d{4}/,m("year")],Z:v,ZZ:v};function O(N){var M,W;M=N,W=f&&f.formats;for(var Z=(N=M.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Se,S,G){var P=G&&G.toUpperCase();return S||W[G]||t[G]||W[P].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,E,T){return E||T.slice(1)})})).match(n),de=Z.length,ue=0;ue<de;ue+=1){var ce=Z[ue],ne=A[ce],re=ne&&ne[0],xe=ne&&ne[1];Z[ue]=xe?{regex:re,parser:xe}:ce.replace(/^\[|\]$/g,"")}return function(Se){for(var S={},G=0,P=0;G<de;G+=1){var V=Z[G];if(typeof V=="string")P+=V.length;else{var E=V.regex,T=V.parser,$=Se.slice(P),U=E.exec($)[0];T.call(S,U),Se=Se.replace(U,"")}}return function(J){var z=J.afternoon;if(z!==void 0){var le=J.hours;z?le<12&&(J.hours+=12):le===12&&(J.hours=0),delete J.afternoon}}(S),S}}return function(N,M,W){W.p.customParseFormat=!0,N&&N.parseTwoDigitYear&&(d=N.parseTwoDigitYear);var Z=M.prototype,de=Z.parse;Z.parse=function(ue){var ce=ue.date,ne=ue.utc,re=ue.args;this.$u=ne;var xe=re[1];if(typeof xe=="string"){var Se=re[2]===!0,S=re[3]===!0,G=Se||S,P=re[2];S&&(P=re[2]),f=this.$locale(),!Se&&P&&(f=W.Ls[P]),this.$d=function($,U,J,z){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*$);var le=O(U)($),ve=le.year,pe=le.month,Ne=le.day,Oe=le.hours,Ke=le.minutes,We=le.seconds,Ie=le.milliseconds,ae=le.zone,je=le.week,$e=new Date,Te=Ne||(ve||pe?1:$e.getDate()),Ue=ve||$e.getFullYear(),ut=0;ve&&!pe||(ut=pe>0?pe-1:$e.getMonth());var ot,zt=Oe||0,Vt=Ke||0,kn=We||0,Pn=Ie||0;return ae?new Date(Date.UTC(Ue,ut,Te,zt,Vt,kn,Pn+60*ae.offset*1e3)):J?new Date(Date.UTC(Ue,ut,Te,zt,Vt,kn,Pn)):(ot=new Date(Ue,ut,Te,zt,Vt,kn,Pn),je&&(ot=z(ot).week(je).toDate()),ot)}catch{return new Date("")}}(ce,xe,ne,W),this.init(),P&&P!==!0&&(this.$L=this.locale(P).$L),G&&ce!=this.format(xe)&&(this.$d=new Date("")),f={}}else if(xe instanceof Array)for(var V=xe.length,E=1;E<=V;E+=1){re[1]=xe[E-1];var T=W.apply(this,re);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}E===V&&(this.$d=new Date(""))}else de.call(this,ue)}}})}(Ya)),Ya.exports}var C1=N1();const L1=Bi(C1);var Ja={exports:{}},R1=Ja.exports,Cf;function k1(){return Cf||(Cf=1,function(r,e){(function(t,n){r.exports=n()})(R1,function(){var t,n,i=1e3,s=6e4,a=36e5,u=864e5,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=31536e6,m=2628e6,v=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,y={years:d,months:m,days:u,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},x=function(ce){return ce instanceof de},A=function(ce,ne,re){return new de(ce,re,ne.$l)},O=function(ce){return n.p(ce)+"s"},N=function(ce){return ce<0},M=function(ce){return N(ce)?Math.ceil(ce):Math.floor(ce)},W=function(ce){return Math.abs(ce)},Z=function(ce,ne){return ce?N(ce)?{negative:!0,format:""+W(ce)+ne}:{negative:!1,format:""+ce+ne}:{negative:!1,format:""}},de=function(){function ce(re,xe,Se){var S=this;if(this.$d={},this.$l=Se,re===void 0&&(this.$ms=0,this.parseFromMilliseconds()),xe)return A(re*y[O(xe)],this);if(typeof re=="number")return this.$ms=re,this.parseFromMilliseconds(),this;if(typeof re=="object")return Object.keys(re).forEach(function(V){S.$d[O(V)]=re[V]}),this.calMilliseconds(),this;if(typeof re=="string"){var G=re.match(v);if(G){var P=G.slice(2).map(function(V){return V!=null?Number(V):0});return this.$d.years=P[0],this.$d.months=P[1],this.$d.weeks=P[2],this.$d.days=P[3],this.$d.hours=P[4],this.$d.minutes=P[5],this.$d.seconds=P[6],this.calMilliseconds(),this}}return this}var ne=ce.prototype;return ne.calMilliseconds=function(){var re=this;this.$ms=Object.keys(this.$d).reduce(function(xe,Se){return xe+(re.$d[Se]||0)*y[Se]},0)},ne.parseFromMilliseconds=function(){var re=this.$ms;this.$d.years=M(re/d),re%=d,this.$d.months=M(re/m),re%=m,this.$d.days=M(re/u),re%=u,this.$d.hours=M(re/a),re%=a,this.$d.minutes=M(re/s),re%=s,this.$d.seconds=M(re/i),re%=i,this.$d.milliseconds=re},ne.toISOString=function(){var re=Z(this.$d.years,"Y"),xe=Z(this.$d.months,"M"),Se=+this.$d.days||0;this.$d.weeks&&(Se+=7*this.$d.weeks);var S=Z(Se,"D"),G=Z(this.$d.hours,"H"),P=Z(this.$d.minutes,"M"),V=this.$d.seconds||0;this.$d.milliseconds&&(V+=this.$d.milliseconds/1e3,V=Math.round(1e3*V)/1e3);var E=Z(V,"S"),T=re.negative||xe.negative||S.negative||G.negative||P.negative||E.negative,$=G.format||P.format||E.format?"T":"",U=(T?"-":"")+"P"+re.format+xe.format+S.format+$+G.format+P.format+E.format;return U==="P"||U==="-P"?"P0D":U},ne.toJSON=function(){return this.toISOString()},ne.format=function(re){var xe=re||"YYYY-MM-DDTHH:mm:ss",Se={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return xe.replace(f,function(S,G){return G||String(Se[S])})},ne.as=function(re){return this.$ms/y[O(re)]},ne.get=function(re){var xe=this.$ms,Se=O(re);return Se==="milliseconds"?xe%=1e3:xe=Se==="weeks"?M(xe/y[Se]):this.$d[Se],xe||0},ne.add=function(re,xe,Se){var S;return S=xe?re*y[O(xe)]:x(re)?re.$ms:A(re,this).$ms,A(this.$ms+S*(Se?-1:1),this)},ne.subtract=function(re,xe){return this.add(re,xe,!0)},ne.locale=function(re){var xe=this.clone();return xe.$l=re,xe},ne.clone=function(){return A(this.$ms,this)},ne.humanize=function(re){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!re)},ne.valueOf=function(){return this.asMilliseconds()},ne.milliseconds=function(){return this.get("milliseconds")},ne.asMilliseconds=function(){return this.as("milliseconds")},ne.seconds=function(){return this.get("seconds")},ne.asSeconds=function(){return this.as("seconds")},ne.minutes=function(){return this.get("minutes")},ne.asMinutes=function(){return this.as("minutes")},ne.hours=function(){return this.get("hours")},ne.asHours=function(){return this.as("hours")},ne.days=function(){return this.get("days")},ne.asDays=function(){return this.as("days")},ne.weeks=function(){return this.get("weeks")},ne.asWeeks=function(){return this.as("weeks")},ne.months=function(){return this.get("months")},ne.asMonths=function(){return this.as("months")},ne.years=function(){return this.get("years")},ne.asYears=function(){return this.as("years")},ce}(),ue=function(ce,ne,re){return ce.add(ne.years()*re,"y").add(ne.months()*re,"M").add(ne.days()*re,"d").add(ne.hours()*re,"h").add(ne.minutes()*re,"m").add(ne.seconds()*re,"s").add(ne.milliseconds()*re,"ms")};return function(ce,ne,re){t=re,n=re().$utils(),re.duration=function(S,G){var P=re.locale();return A(S,{$l:P},G)},re.isDuration=x;var xe=ne.prototype.add,Se=ne.prototype.subtract;ne.prototype.add=function(S,G){return x(S)?ue(this,S,1):xe.bind(this)(S,G)},ne.prototype.subtract=function(S,G){return x(S)?ue(this,S,-1):Se.bind(this)(S,G)}}})}(Ja)),Ja.exports}var P1=k1();const q1=Bi(P1);var Za={exports:{}},j1=Za.exports,Lf;function I1(){return Lf||(Lf=1,function(r,e){(function(t,n){r.exports=n()})(j1,function(){var t="minute",n=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(s,a,u){var f=a.prototype;u.utc=function(O){var N={date:O,utc:!0,args:arguments};return new a(N)},f.utc=function(O){var N=u(this.toDate(),{locale:this.$L,utc:!0});return O?N.add(this.utcOffset(),t):N},f.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var d=f.parse;f.parse=function(O){O.utc&&(this.$u=!0),this.$utils().u(O.$offset)||(this.$offset=O.$offset),d.call(this,O)};var m=f.init;f.init=function(){if(this.$u){var O=this.$d;this.$y=O.getUTCFullYear(),this.$M=O.getUTCMonth(),this.$D=O.getUTCDate(),this.$W=O.getUTCDay(),this.$H=O.getUTCHours(),this.$m=O.getUTCMinutes(),this.$s=O.getUTCSeconds(),this.$ms=O.getUTCMilliseconds()}else m.call(this)};var v=f.utcOffset;f.utcOffset=function(O,N){var M=this.$utils().u;if(M(O))return this.$u?0:M(this.$offset)?v.call(this):this.$offset;if(typeof O=="string"&&(O=function(ue){ue===void 0&&(ue="");var ce=ue.match(n);if(!ce)return null;var ne=(""+ce[0]).match(i)||["-",0,0],re=ne[0],xe=60*+ne[1]+ +ne[2];return xe===0?0:re==="+"?xe:-xe}(O),O===null))return this;var W=Math.abs(O)<=16?60*O:O,Z=this;if(N)return Z.$offset=W,Z.$u=O===0,Z;if(O!==0){var de=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(Z=this.local().add(W+de,t)).$offset=W,Z.$x.$localOffset=de}else Z=this.utc();return Z};var y=f.format;f.format=function(O){var N=O||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,N)},f.valueOf=function(){var O=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*O},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var x=f.toDate;f.toDate=function(O){return O==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():x.call(this)};var A=f.diff;f.diff=function(O,N,M){if(O&&this.$u===O.$u)return A.call(this,O,N,M);var W=this.local(),Z=u(O).local();return A.call(W,Z,N,M)}}})}(Za)),Za.exports}var $1=I1();const D1=Bi($1);Ga.extend(L1),Ga.extend(q1),Ga.extend(D1);var mo={},yo={},Xa,Rf;function kf(){if(Rf)return Xa;Rf=1,Xa=r;function r(t,n){if(n!=="$")for(var i=e(n),s=0;s<i.length;s++)n=i[s].toString().replace(/\\"/g,'"'),!(typeof t[n]>"u"&&s!==i.length-1)&&(t=t[n]);return t}function e(t){for(var n=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,i=[],s;s=n.exec(t);)i.push(s[1]||s[2]||s[3]);return i}return Xa}var Os={},Pf;function M1(){if(Pf)return Os;Pf=1;var r=kf(),e=If();return Os.getRegexFlags=function(t){var n="";return t.ignoreCase&&(n+="i"),t.global&&(n+="g"),t.multiline&&(n+="m"),n},Os.stringifyFunction=function(t,n){if(typeof n=="function")return n(t);var i=t.toString(),s=i.match(/^[^{]*{|^[^=]*=>/),a=s?s[0]:"<function> ",u=i[i.length-1]==="}"?"}":"";return a.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+u},Os.restore=function(t,n){var i=t[0],s=t.slice(1);switch(i){case"$":return r(n,t);case"r":var a=s.indexOf(","),u=s.slice(0,a),f=s.slice(a+1);return RegExp(f,u);case"d":return new Date(+s);case"f":var d=function(){throw new Error("can't run jsan parsed function")};return d.toString=function(){return s},d;case"u":return;case"e":var m=new Error(s);return m.stack="Stack is unavailable for jsan parsed errors",m;case"s":return Symbol(s);case"g":return Symbol.for(s);case"m":return new Map(e.parse(s));case"l":return new Set(e.parse(s));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",t),t}},Os}var qf;function B1(){if(qf)return yo;qf=1,kf();var r=M1(),e=typeof WeakMap<"u"?WeakMap:function(){var t=[],n=[];return{set:function(i,s){t.push(i),n.push(s)},get:function(i){for(var s=0;s<t.length;s++)if(t[s]===i)return n[s]}}};return yo.decycle=function t(n,i,s,a){a=a||new e;var u=!Object.prototype.hasOwnProperty.call(i,"circular"),f=i.refs!==!1;return function d(m,v,y){var x,A,O,N=typeof s=="function"?s(y||"",m):m;if(i.date&&N instanceof Date)return{$jsan:"d"+N.getTime()};if(i.regex&&N instanceof RegExp)return{$jsan:"r"+r.getRegexFlags(N)+","+N.source};if(i.function&&typeof N=="function")return{$jsan:"f"+r.stringifyFunction(N,i.function)};if(i.nan&&typeof N=="number"&&isNaN(N))return{$jsan:"n"};if(i.infinity){if(Number.POSITIVE_INFINITY===N)return{$jsan:"i"};if(Number.NEGATIVE_INFINITY===N)return{$jsan:"y"}}if(i.undefined&&N===void 0)return{$jsan:"u"};if(i.error&&N instanceof Error)return{$jsan:"e"+N.message};if(i.symbol&&typeof N=="symbol"){var M=Symbol.keyFor(N);return M!==void 0?{$jsan:"g"+M}:{$jsan:"s"+N.toString().slice(7,-1)}}if(i.map&&typeof Map=="function"&&N instanceof Map&&typeof Array.from=="function")return{$jsan:"m"+JSON.stringify(t(Array.from(N),i,s,a))};if(i.set&&typeof Set=="function"&&N instanceof Set&&typeof Array.from=="function")return{$jsan:"l"+JSON.stringify(t(Array.from(N),i,s,a))};if(N&&typeof N.toJSON=="function")try{N=N.toJSON(y)}catch{var W=y||"$";return"toJSON failed for '"+(a.get(N)||W)+"'"}if(typeof N=="object"&&N!==null&&!(N instanceof Boolean)&&!(N instanceof Date)&&!(N instanceof Number)&&!(N instanceof RegExp)&&!(N instanceof String)&&typeof N!="symbol"&&!(N instanceof Error)){if(typeof N=="object"){var Z=a.get(N);if(Z){if(u&&f)return{$jsan:Z};var de=v.split(".").slice(0,-1).join(".");if(de.indexOf(Z)===0)return u?{$jsan:Z}:typeof i.circular=="function"?i.circular(N,v,Z):i.circular;if(f)return{$jsan:Z}}a.set(N,v)}if(Object.prototype.toString.apply(N)==="[object Array]")for(O=[],x=0;x<N.length;x+=1)O[x]=d(N[x],v+"["+x+"]",x);else{O={};for(A in N)if(Object.prototype.hasOwnProperty.call(N,A)){var ue=/^\w+$/.test(A)?"."+A:"["+JSON.stringify(A)+"]";O[A]=A==="$jsan"?[d(N[A],v+ue)]:d(N[A],v+ue,A)}}return O}return N}(n,"$")},yo.retrocycle=function(t){return function n(i){var s,a,u;if(i&&typeof i=="object")if(Object.prototype.toString.apply(i)==="[object Array]")for(s=0;s<i.length;s+=1)a=i[s],a&&typeof a=="object"&&(a.$jsan?i[s]=r.restore(a.$jsan,t):n(a));else for(u in i){if(typeof i[u]=="string"&&u==="$jsan")return r.restore(i.$jsan,t);u==="$jsan"&&(i[u]=i[u][0]),typeof i[u]=="object"&&(a=i[u],a&&typeof a=="object"&&(a.$jsan?i[u]=r.restore(a.$jsan,t):n(a)))}return i}(t)},yo}var jf;function If(){if(jf)return mo;jf=1;var r=B1();return mo.stringify=function(e,t,n,i){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(e):JSON.stringify.apply(JSON,arguments)}catch{}var s=i||!1;typeof s=="boolean"&&(s={date:s,function:s,regex:s,undefined:s,error:s,symbol:s,map:s,set:s,nan:s,infinity:s});var a=r.decycle(e,s,t);return arguments.length===1?JSON.stringify(a):JSON.stringify(a,Array.isArray(t)?t:null,n)},mo.parse=function(e,t){var n=/"\$jsan"/.test(e),i;return arguments.length===1?i=JSON.parse(e):i=JSON.parse(e,t),n&&(i=r.retrocycle(i)),i},mo}var $f,Df;function U1(){return Df||(Df=1,$f=If()),$f}var F1=U1();const Mf=Bi(F1),K1=(r=null,e,t,n=!0)=>Mf.stringify(r,e,t,n),H1=(r,e)=>Mf.parse(r,e);function Bf(r,e){return function(){return r.apply(e,arguments)}}const{toString:z1}=Object.prototype,{getPrototypeOf:Qa}=Object,bo=(r=>e=>{const t=z1.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),Jn=r=>(r=r.toLowerCase(),e=>bo(e)===r),vo=r=>e=>typeof e===r,{isArray:Ui}=Array,Ss=vo("undefined");function V1(r){return r!==null&&!Ss(r)&&r.constructor!==null&&!Ss(r.constructor)&&gn(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Uf=Jn("ArrayBuffer");function W1(r){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&Uf(r.buffer),e}const G1=vo("string"),gn=vo("function"),Ff=vo("number"),wo=r=>r!==null&&typeof r=="object",Y1=r=>r===!0||r===!1,xo=r=>{if(bo(r)!=="object")return!1;const e=Qa(r);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},J1=Jn("Date"),Z1=Jn("File"),X1=Jn("Blob"),Q1=Jn("FileList"),e0=r=>wo(r)&&gn(r.pipe),t0=r=>{let e;return r&&(typeof FormData=="function"&&r instanceof FormData||gn(r.append)&&((e=bo(r))==="formdata"||e==="object"&&gn(r.toString)&&r.toString()==="[object FormData]"))},n0=Jn("URLSearchParams"),[r0,i0,s0,o0]=["ReadableStream","Request","Response","Headers"].map(Jn),a0=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function As(r,e,{allOwnKeys:t=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),Ui(r))for(n=0,i=r.length;n<i;n++)e.call(null,r[n],n,r);else{const s=t?Object.getOwnPropertyNames(r):Object.keys(r),a=s.length;let u;for(n=0;n<a;n++)u=s[n],e.call(null,r[u],u,r)}}function Kf(r,e){e=e.toLowerCase();const t=Object.keys(r);let n=t.length,i;for(;n-- >0;)if(i=t[n],e===i.toLowerCase())return i;return null}const ci=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Hf=r=>!Ss(r)&&r!==ci;function el(){const{caseless:r}=Hf(this)&&this||{},e={},t=(n,i)=>{const s=r&&Kf(e,i)||i;xo(e[s])&&xo(n)?e[s]=el(e[s],n):xo(n)?e[s]=el({},n):Ui(n)?e[s]=n.slice():e[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&As(arguments[n],t);return e}const l0=(r,e,t,{allOwnKeys:n}={})=>(As(e,(i,s)=>{t&&gn(i)?r[s]=Bf(i,t):r[s]=i},{allOwnKeys:n}),r),u0=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),c0=(r,e,t,n)=>{r.prototype=Object.create(e.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:e.prototype}),t&&Object.assign(r.prototype,t)},f0=(r,e,t,n)=>{let i,s,a;const u={};if(e=e||{},r==null)return e;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)a=i[s],(!n||n(a,r,e))&&!u[a]&&(e[a]=r[a],u[a]=!0);r=t!==!1&&Qa(r)}while(r&&(!t||t(r,e))&&r!==Object.prototype);return e},h0=(r,e,t)=>{r=String(r),(t===void 0||t>r.length)&&(t=r.length),t-=e.length;const n=r.indexOf(e,t);return n!==-1&&n===t},d0=r=>{if(!r)return null;if(Ui(r))return r;let e=r.length;if(!Ff(e))return null;const t=new Array(e);for(;e-- >0;)t[e]=r[e];return t},p0=(r=>e=>r&&e instanceof r)(typeof Uint8Array<"u"&&Qa(Uint8Array)),g0=(r,e)=>{const t=(r&&r[Symbol.iterator]).call(r);let n;for(;(n=t.next())&&!n.done;){const i=n.value;e.call(r,i[0],i[1])}},m0=(r,e)=>{let t;const n=[];for(;(t=r.exec(e))!==null;)n.push(t);return n},y0=Jn("HTMLFormElement"),b0=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),zf=(({hasOwnProperty:r})=>(e,t)=>r.call(e,t))(Object.prototype),v0=Jn("RegExp"),Vf=(r,e)=>{const t=Object.getOwnPropertyDescriptors(r),n={};As(t,(i,s)=>{let a;(a=e(i,s,r))!==!1&&(n[s]=a||i)}),Object.defineProperties(r,n)},w0=r=>{Vf(r,(e,t)=>{if(gn(r)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const n=r[t];if(gn(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},x0=(r,e)=>{const t={},n=i=>{i.forEach(s=>{t[s]=!0})};return Ui(r)?n(r):n(String(r).split(e)),t},E0=()=>{},O0=(r,e)=>r!=null&&Number.isFinite(r=+r)?r:e;function S0(r){return!!(r&&gn(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const A0=r=>{const e=new Array(10),t=(n,i)=>{if(wo(n)){if(e.indexOf(n)>=0)return;if(!("toJSON"in n)){e[i]=n;const s=Ui(n)?[]:{};return As(n,(a,u)=>{const f=t(a,i+1);!Ss(f)&&(s[u]=f)}),e[i]=void 0,s}}return n};return t(r,0)},T0=Jn("AsyncFunction"),_0=r=>r&&(wo(r)||gn(r))&&gn(r.then)&&gn(r.catch),Wf=((r,e)=>r?setImmediate:e?((t,n)=>(ci.addEventListener("message",({source:i,data:s})=>{i===ci&&s===t&&n.length&&n.shift()()},!1),i=>{n.push(i),ci.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))(typeof setImmediate=="function",gn(ci.postMessage)),N0=typeof queueMicrotask<"u"?queueMicrotask.bind(ci):typeof process<"u"&&process.nextTick||Wf,ee={isArray:Ui,isArrayBuffer:Uf,isBuffer:V1,isFormData:t0,isArrayBufferView:W1,isString:G1,isNumber:Ff,isBoolean:Y1,isObject:wo,isPlainObject:xo,isReadableStream:r0,isRequest:i0,isResponse:s0,isHeaders:o0,isUndefined:Ss,isDate:J1,isFile:Z1,isBlob:X1,isRegExp:v0,isFunction:gn,isStream:e0,isURLSearchParams:n0,isTypedArray:p0,isFileList:Q1,forEach:As,merge:el,extend:l0,trim:a0,stripBOM:u0,inherits:c0,toFlatObject:f0,kindOf:bo,kindOfTest:Jn,endsWith:h0,toArray:d0,forEachEntry:g0,matchAll:m0,isHTMLForm:y0,hasOwnProperty:zf,hasOwnProp:zf,reduceDescriptors:Vf,freezeMethods:w0,toObjectSet:x0,toCamelCase:b0,noop:E0,toFiniteNumber:O0,findKey:Kf,global:ci,isContextDefined:Hf,isSpecCompliantForm:S0,toJSONObject:A0,isAsyncFn:T0,isThenable:_0,setImmediate:Wf,asap:N0};function Ve(r,e,t,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",e&&(this.code=e),t&&(this.config=t),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ee.inherits(Ve,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const Gf=Ve.prototype,Yf={};["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"].forEach(r=>{Yf[r]={value:r}}),Object.defineProperties(Ve,Yf),Object.defineProperty(Gf,"isAxiosError",{value:!0}),Ve.from=(r,e,t,n,i,s)=>{const a=Object.create(Gf);return ee.toFlatObject(r,a,function(u){return u!==Error.prototype},u=>u!=="isAxiosError"),Ve.call(a,r.message,e,t,n,i),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};const C0=null;function tl(r){return ee.isPlainObject(r)||ee.isArray(r)}function Jf(r){return ee.endsWith(r,"[]")?r.slice(0,-2):r}function Zf(r,e,t){return r?r.concat(e).map(function(n,i){return n=Jf(n),!t&&i?"["+n+"]":n}).join(t?".":""):e}function L0(r){return ee.isArray(r)&&!r.some(tl)}const R0=ee.toFlatObject(ee,{},null,function(r){return/^is[A-Z]/.test(r)});function Eo(r,e,t){if(!ee.isObject(r))throw new TypeError("target must be an object");e=e||new FormData,t=ee.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,A){return!ee.isUndefined(A[x])});const n=t.metaTokens,i=t.visitor||d,s=t.dots,a=t.indexes,u=(t.Blob||typeof Blob<"u"&&Blob)&&ee.isSpecCompliantForm(e);if(!ee.isFunction(i))throw new TypeError("visitor must be a function");function f(x){if(x===null)return"";if(ee.isDate(x))return x.toISOString();if(!u&&ee.isBlob(x))throw new Ve("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(x)||ee.isTypedArray(x)?u&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function d(x,A,O){let N=x;if(x&&!O&&typeof x=="object"){if(ee.endsWith(A,"{}"))A=n?A:A.slice(0,-2),x=JSON.stringify(x);else if(ee.isArray(x)&&L0(x)||(ee.isFileList(x)||ee.endsWith(A,"[]"))&&(N=ee.toArray(x)))return A=Jf(A),N.forEach(function(M,W){!(ee.isUndefined(M)||M===null)&&e.append(a===!0?Zf([A],W,s):a===null?A:A+"[]",f(M))}),!1}return tl(x)?!0:(e.append(Zf(O,A,s),f(x)),!1)}const m=[],v=Object.assign(R0,{defaultVisitor:d,convertValue:f,isVisitable:tl});function y(x,A){if(!ee.isUndefined(x)){if(m.indexOf(x)!==-1)throw Error("Circular reference detected in "+A.join("."));m.push(x),ee.forEach(x,function(O,N){(!(ee.isUndefined(O)||O===null)&&i.call(e,O,ee.isString(N)?N.trim():N,A,v))===!0&&y(O,A?A.concat(N):[N])}),m.pop()}}if(!ee.isObject(r))throw new TypeError("data must be an object");return y(r),e}function Xf(r){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function nl(r,e){this._pairs=[],r&&Eo(r,this,e)}const Qf=nl.prototype;Qf.append=function(r,e){this._pairs.push([r,e])},Qf.toString=function(r){const e=r?function(t){return r.call(this,t,Xf)}:Xf;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};function k0(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eh(r,e,t){if(!e)return r;const n=t&&t.encode||k0;ee.isFunction(t)&&(t={serialize:t});const i=t&&t.serialize;let s;if(i?s=i(e,t):s=ee.isURLSearchParams(e)?e.toString():new nl(e,t).toString(n),s){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class th{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(t){t!==null&&e(t)})}}const nh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},P0=typeof URLSearchParams<"u"?URLSearchParams:nl,q0=typeof FormData<"u"?FormData:null,j0=typeof Blob<"u"?Blob:null,I0={isBrowser:!0,classes:{URLSearchParams:P0,FormData:q0,Blob:j0},protocols:["http","https","file","blob","url","data"]},rl=typeof window<"u"&&typeof document<"u",il=typeof navigator=="object"&&navigator||void 0,$0=rl&&(!il||["ReactNative","NativeScript","NS"].indexOf(il.product)<0),D0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",M0=rl&&window.location.href||"http://localhost",B0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rl,hasStandardBrowserEnv:$0,hasStandardBrowserWebWorkerEnv:D0,navigator:il,origin:M0},Symbol.toStringTag,{value:"Module"})),Ht={...B0,...I0};function U0(r,e){return Eo(r,new Ht.classes.URLSearchParams,Object.assign({visitor:function(t,n,i,s){return Ht.isNode&&ee.isBuffer(t)?(this.append(n,t.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function F0(r){return ee.matchAll(/\w+|\[(\w*)]/g,r).map(e=>e[0]==="[]"?"":e[1]||e[0])}function K0(r){const e={},t=Object.keys(r);let n;const i=t.length;let s;for(n=0;n<i;n++)s=t[n],e[s]=r[s];return e}function rh(r){function e(t,n,i,s){let a=t[s++];if(a==="__proto__")return!0;const u=Number.isFinite(+a),f=s>=t.length;return a=!a&&ee.isArray(i)?i.length:a,f?(ee.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!u):((!i[a]||!ee.isObject(i[a]))&&(i[a]=[]),e(t,n,i[a],s)&&ee.isArray(i[a])&&(i[a]=K0(i[a])),!u)}if(ee.isFormData(r)&&ee.isFunction(r.entries)){const t={};return ee.forEachEntry(r,(n,i)=>{e(F0(n),i,t,0)}),t}return null}function H0(r,e,t){if(ee.isString(r))try{return(e||JSON.parse)(r),ee.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}const Ts={transitional:nh,adapter:["xhr","http","fetch"],transformRequest:[function(r,e){const t=e.getContentType()||"",n=t.indexOf("application/json")>-1,i=ee.isObject(r);if(i&&ee.isHTMLForm(r)&&(r=new FormData(r)),ee.isFormData(r))return n?JSON.stringify(rh(r)):r;if(ee.isArrayBuffer(r)||ee.isBuffer(r)||ee.isStream(r)||ee.isFile(r)||ee.isBlob(r)||ee.isReadableStream(r))return r;if(ee.isArrayBufferView(r))return r.buffer;if(ee.isURLSearchParams(r))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let s;if(i){if(t.indexOf("application/x-www-form-urlencoded")>-1)return U0(r,this.formSerializer).toString();if((s=ee.isFileList(r))||t.indexOf("multipart/form-data")>-1){const a=this.env&&this.env.FormData;return Eo(s?{"files[]":r}:r,a&&new a,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),H0(r)):r}],transformResponse:[function(r){const e=this.transitional||Ts.transitional,t=e&&e.forcedJSONParsing,n=this.responseType==="json";if(ee.isResponse(r)||ee.isReadableStream(r))return r;if(r&&ee.isString(r)&&(t&&!this.responseType||n)){const i=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(r)}catch(s){if(i)throw s.name==="SyntaxError"?Ve.from(s,Ve.ERR_BAD_RESPONSE,this,null,this.response):s}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],r=>{Ts.headers[r]={}});const z0=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"]),V0=r=>{const e={};let t,n,i;return r&&r.split(`
81
81
  `).forEach(function(s){i=s.indexOf(":"),t=s.substring(0,i).trim().toLowerCase(),n=s.substring(i+1).trim(),!(!t||e[t]&&z0[t])&&(t==="set-cookie"?e[t]?e[t].push(n):e[t]=[n]:e[t]=e[t]?e[t]+", "+n:n)}),e},ih=Symbol("internals");function _s(r){return r&&String(r).trim().toLowerCase()}function Oo(r){return r===!1||r==null?r:ee.isArray(r)?r.map(Oo):String(r)}function W0(r){const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=t.exec(r);)e[n[1]]=n[2];return e}const G0=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function sl(r,e,t,n,i){if(ee.isFunction(n))return n.call(this,e,t);if(i&&(e=t),!!ee.isString(e)){if(ee.isString(n))return e.indexOf(n)!==-1;if(ee.isRegExp(n))return n.test(e)}}function Y0(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function J0(r,e){const t=ee.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+t,{value:function(i,s,a){return this[n].call(this,e,i,s,a)},configurable:!0})})}let rn=class{constructor(r){r&&this.set(r)}set(r,e,t){const n=this;function i(a,u,f){const d=_s(u);if(!d)throw new Error("header name must be a non-empty string");const m=ee.findKey(n,d);(!m||n[m]===void 0||f===!0||f===void 0&&n[m]!==!1)&&(n[m||u]=Oo(a))}const s=(a,u)=>ee.forEach(a,(f,d)=>i(f,d,u));if(ee.isPlainObject(r)||r instanceof this.constructor)s(r,e);else if(ee.isString(r)&&(r=r.trim())&&!G0(r))s(V0(r),e);else if(ee.isHeaders(r))for(const[a,u]of r.entries())i(u,a,t);else r!=null&&i(e,r,t);return this}get(r,e){if(r=_s(r),r){const t=ee.findKey(this,r);if(t){const n=this[t];if(!e)return n;if(e===!0)return W0(n);if(ee.isFunction(e))return e.call(this,n,t);if(ee.isRegExp(e))return e.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,e){if(r=_s(r),r){const t=ee.findKey(this,r);return!!(t&&this[t]!==void 0&&(!e||sl(this,this[t],t,e)))}return!1}delete(r,e){const t=this;let n=!1;function i(s){if(s=_s(s),s){const a=ee.findKey(t,s);a&&(!e||sl(t,t[a],a,e))&&(delete t[a],n=!0)}}return ee.isArray(r)?r.forEach(i):i(r),n}clear(r){const e=Object.keys(this);let t=e.length,n=!1;for(;t--;){const i=e[t];(!r||sl(this,this[i],i,r,!0))&&(delete this[i],n=!0)}return n}normalize(r){const e=this,t={};return ee.forEach(this,(n,i)=>{const s=ee.findKey(t,i);if(s){e[s]=Oo(n),delete e[i];return}const a=r?Y0(i):String(i).trim();a!==i&&delete e[i],e[a]=Oo(n),t[a]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const e=Object.create(null);return ee.forEach(this,(t,n)=>{t!=null&&t!==!1&&(e[n]=r&&ee.isArray(t)?t.join(", "):t)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,e])=>r+": "+e).join(`
@@ -1,5 +1,3 @@
1
1
  import { MenuProps as AntMenuProps } from 'antd';
2
- export type MenuProps = AntMenuProps & {
3
- onSelectedKeys?: () => string[];
4
- };
2
+ export type MenuProps = AntMenuProps;
5
3
  export default function Menu(props: MenuProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainte/ant",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@ant-design/pro-components": "^2.8.6",
25
- "@rainte/js": "^0.0.38",
25
+ "@rainte/js": "^0.0.40",
26
26
  "antd": "^5.24.5",
27
27
  "i18next": "^24.2.3",
28
28
  "i18next-browser-languagedetector": "^8.0.4",