@rainte/ant 0.0.53 → 0.0.54

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-Od5Wmvam.js";
1
+ import { c as R, g as z } from "./index-B4XnsEEp.js";
2
2
  function $(w, d) {
3
3
  for (var b = 0; b < d.length; b++) {
4
4
  const y = d[b];
@@ -8159,17 +8159,20 @@ S.register({
8159
8159
  function xm(r) {
8160
8160
  const { value: t, style: e, ...n } = r, s = gu(null);
8161
8161
  return pu(() => {
8162
- const i = s.current, a = i.ownerDocument.createElement("div");
8163
- Object.entries(e).forEach(([c, d]) => {
8164
- a.style[c] = d;
8165
- });
8166
- const l = i.appendChild(a), u = new S(l, { theme: "snow", ...n });
8167
- return t && (u.root.innerHTML = t), u.on("text-change", () => {
8168
- var c;
8169
- (c = n.onChange) == null || c.call(n, u.root.innerHTML || "");
8170
- }), () => {
8171
- i.innerHTML = "";
8172
- };
8162
+ const i = s.current;
8163
+ if (i) {
8164
+ const a = i.ownerDocument.createElement("div");
8165
+ Object.entries(e).forEach(([c, d]) => {
8166
+ a.style[c] = d;
8167
+ });
8168
+ const l = i.appendChild(a), u = new S(l, { theme: "snow", ...n });
8169
+ return t && (u.root.innerHTML = t), u.on("text-change", () => {
8170
+ var c;
8171
+ (c = n.onChange) == null || c.call(n, u.root.innerHTML || "");
8172
+ }), () => {
8173
+ i.innerHTML = "";
8174
+ };
8175
+ }
8173
8176
  }, [s]), /* @__PURE__ */ Et.jsx("div", { ref: s, style: { height: "100%" } });
8174
8177
  }
8175
8178
  var Jl = {
@@ -9851,7 +9854,7 @@ typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObje
9851
9854
  typeof tn != "function" && (tn = void 0);
9852
9855
  if (!tn && !$r && !Ts)
9853
9856
  try {
9854
- import("./browser-ponyfill-BYpaSRmp.js").then((r) => r.b).then(function(r) {
9857
+ import("./browser-ponyfill-CJAw0HMN.js").then((r) => r.b).then(function(r) {
9855
9858
  tn = r.default;
9856
9859
  }).catch(function() {
9857
9860
  });
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as o, F as i, M as r, P as d, T as e, U as m, d as l, i as n, m as p } from "./index-Od5Wmvam.js";
1
+ import { E as o, F as i, M as r, P as d, T as e, U as m, d as l, i as n, m as p } from "./index-B4XnsEEp.js";
2
2
  export {
3
3
  o as Editor,
4
4
  i as Form,
@@ -75,5 +75,5 @@ ${as(this.code(e,t))}
75
75
  `,{[je.blotName]:t}),s.insert(i)),new M);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(je.className),r.innerHTML=dp(this.options.hljs,t,e),Li(this.quill.scroll,r,[(s,i)=>{const o=On.value(s);return o?i.compose(new M().retain(i.length(),{[Pt.blotName]:o})):i}],[(s,i)=>s.data.split(`
76
76
  `).reduce((o,a,u)=>(u!==0&&o.insert(`
77
77
  `,{[je.blotName]:t}),o.insert(a)),i)],new WeakMap)}}gl.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 Pn=class Pn extends Ie{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",$i()),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===Pn.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()}};$(Pn,"blotName","table"),$(Pn,"tagName","TD");let at=Pn;class jt extends hr{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===t.table&&e.table===r.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const r=t.formats(),s=t.next.formats();if(r.table!==s.table){const i=this.splitAfter(t);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}$(jt,"blotName","table-row"),$(jt,"tagName","TR");class wt extends hr{}$(wt,"blotName","table-body"),$(wt,"tagName","TBODY");class Ur extends hr{balanceCells(){const e=this.descendants(jt),t=e.reduce((r,s)=>Math.max(s.children.length,r),0);e.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let s;r.children.head!=null&&(s=at.formats(r.children.head.domNode));const i=this.scroll.create(at.blotName,s);r.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(wt);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e);s!=null&&s.remove()})}insertColumn(e){const[t]=this.descendant(wt);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e),i=at.formats(r.children.head.domNode),o=this.scroll.create(at.blotName,i);r.insertBefore(o,s)})}insertRow(e){const[t]=this.descendant(wt);if(t==null||t.children.head==null)return;const r=$i(),s=this.scroll.create(jt.blotName);t.children.head.children.forEach(()=>{const o=this.scroll.create(at.blotName,r);s.appendChild(o)});const i=t.children.at(e);t.insertBefore(s,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}$(Ur,"blotName","table-container"),$(Ur,"tagName","TABLE"),Ur.allowedChildren=[wt],wt.requiredContainer=Ur,wt.allowedChildren=[jt],jt.requiredContainer=wt,jt.allowedChildren=[at],at.requiredContainer=jt;function $i(){return`row-${Math.random().toString(36).slice(2,6)}`}let gp=class extends it{static register(){L.register(at),L.register(jt),L.register(wt),L.register(Ur)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Ur).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(L.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(L.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(L.sources.USER),this.quill.setSelection(t,L.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,r]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==at.blotName)return[null,null,null,-1];const s=t.parent;return[s.parent.parent,s,t,r]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[r,s,i]=this.getTable(t);if(i==null)return;const o=i.cellOffset();r.insertColumn(o+e),this.quill.update(L.sources.USER);let a=s.rowOffset();e===0&&(a+=1),this.quill.setSelection(t.index+a,t.length,L.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[r,s,i]=this.getTable(t);if(i==null)return;const o=s.rowOffset();r.insertRow(o+e),this.quill.update(L.sources.USER),e>0?this.quill.setSelection(t,L.sources.SILENT):this.quill.setSelection(t.index+s.children.length,t.length,L.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const r=this.quill.getSelection();if(r==null)return;const s=new Array(e).fill(0).reduce(i=>{const o=new Array(t).fill(`
78
- `).join("");return i.insert(o,{table:$i()})},new M().retain(r.index));this.quill.updateContents(s,L.sources.USER),this.quill.setSelection(r.index,L.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(L.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(L.events.TEXT_CHANGE,(r,s,i)=>{i===L.sources.USER&&this.balanceTables()}),!0):!1)})}};const pl=It("quill:toolbar");class Bi extends it{constructor(e,t){var r,s;if(super(e,t),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),pp(i,this.options.container),(s=(r=e.container)==null?void 0:r.parentNode)==null||s.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){pl.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(i=>{var a;const o=(a=this.options.handlers)==null?void 0:a[i];o&&this.addHandler(i,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(L.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.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){pl.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ke){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new M().retain(o.index).delete(o.length).insert({[t]:i}),L.sources.USER)}else this.quill.format(t,i,L.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[s,i]=r;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[s]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[s])){let a=t[s];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[s],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[s]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}Bi.DEFAULTS={};function ml(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function pp(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")ml(r,s);else{const i=Object.keys(s)[0],o=s[i];Array.isArray(o)?mp(r,i,o):ml(r,i,o)}}),n.appendChild(r)})}function mp(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),r.appendChild(i)}),n.appendChild(r)}Bi.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,U.INLINE)!=null&&this.quill.format(t,!1,L.sources.USER)})}else this.quill.removeFormat(n.index,n.length,L.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",L.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,L.sources.USER),this.quill.format("direction",n,L.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let s=n==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,L.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,L.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,L.sources.USER):this.quill.format("list","unchecked",L.sources.USER):this.quill.format("list",n,L.sources.USER)}}};const bp='<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>',yp='<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>',vp='<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>',wp='<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>',Ep='<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>',xp='<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>',Ap='<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>',Tp='<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>',bl='<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>',Nn={align:{"":bp,center:yp,right:vp,justify:wp},background:Ep,blockquote:xp,bold:Ap,clean:Tp,code:bl,"code-block":bl,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>'},Op='<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 yl=0;function vl(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class ms{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"),vl(this.label,"aria-expanded"),vl(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 r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Op,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-${yl}`,yl+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),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 r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.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 r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class wl extends ms{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(r=>{r.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 r=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class El extends ms{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const Sp=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class xl{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Sp(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,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>s.right&&(o=s.right-i.right,this.root.style.left=`${t+o}px`),i.left<s.left&&(o=s.left-i.left,this.root.style.left=`${t+o}px`),i.bottom>s.bottom){const a=i.bottom-i.top,u=e.bottom-e.top+a;this.root.style.top=`${r-u}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Np=[!1,"center","right","justify"],Lp=["#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"],Cp=[!1,"serif","monospace"],_p=["1","2","3",!1],Rp=["small",!1,"large","huge"];class Ln extends $r{constructor(e,t){super(e,t);const r=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),t[i]!=null))if(i==="direction")r.innerHTML=t[i][""]+t[i].rtl;else if(typeof t[i]=="string")r.innerHTML=t[i];else{const o=r.value||"";o!=null&&t[i][o]&&(r.innerHTML=t[i][o])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&Cn(s,Np),typeof t.align=="object"))return new El(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&Cn(s,Lp,i==="background"?"#ffffff":"#000000"),new wl(s,t[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?Cn(s,Cp):s.classList.contains("ql-header")?Cn(s,_p):s.classList.contains("ql-size")&&Cn(s,Rp)),new ms(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(B.events.EDITOR_CHANGE,r)}}Ln.DEFAULTS=Gt({},$r.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Al extends xl{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 r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),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,B.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,B.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=qp(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,B.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",B.sources.USER),this.quill.setSelection(r+2,B.sources.USER)}break}}this.textbox.value="",this.hide()}}function qp(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function Cn(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const s=document.createElement("option");r===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),n.appendChild(s)})}const Ip=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Tl extends Al{constructor(e,t){super(e,t),this.quill.on(B.events.EDITOR_CHANGE,(r,s,i,o)=>{if(r===B.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&o===B.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(s.index,s.length);if(a.length===1){const u=this.quill.getBounds(s);u!=null&&this.position(u)}else{const u=a[a.length-1],c=this.quill.getIndex(u),d=Math.min(u.length()-1,s.index+s.length-c),g=this.quill.getBounds(new fr(c,d));g!=null&&this.position(g)}}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(B.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),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}$(Tl,"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 Ol extends Ln{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Ip),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Tl(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Nn),this.buildPickers(e.container.querySelectorAll("select"),Nn))}}Ol.DEFAULTS=Gt({},Ln.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,L.sources.USER)}}}}});const kp=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Sl extends Al{constructor(){super(...arguments);$(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 r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,B.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(B.events.SELECTION_CHANGE,(t,r,s)=>{if(t!=null){if(t.length===0&&s===B.sources.USER){const[i,o]=this.quill.scroll.descendant(Xt,t.index);if(i!=null){this.linkRange=new fr(t.index-o,i.length());const a=Xt.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const u=this.quill.getBounds(this.linkRange);u!=null&&this.position(u);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}$(Sl,"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 Nl extends Ln{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=kp),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"),Nn),this.buildPickers(e.container.querySelectorAll("select"),Nn),this.tooltip=new Sl(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}Nl.DEFAULTS=Gt({},Ln.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){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:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,L.sources.USER)}}}}}),L.register({"attributors/attribute/direction":Ga,"attributors/class/align":za,"attributors/class/background":xg,"attributors/class/color":Eg,"attributors/class/direction":Wa,"attributors/class/font":Ya,"attributors/class/size":Qa,"attributors/style/align":Va,"attributors/style/background":Ai,"attributors/style/color":xi,"attributors/style/direction":Za,"attributors/style/font":Ja,"attributors/style/size":el},!0),L.register({"formats/align":za,"formats/direction":Wa,"formats/indent":hp,"formats/background":Ai,"formats/color":xi,"formats/font":Ya,"formats/size":Qa,"formats/blockquote":Ri,"formats/code-block":je,"formats/header":qi,"formats/list":An,"formats/bold":Tn,"formats/code":Ti,"formats/italic":Ii,"formats/link":Xt,"formats/script":ki,"formats/strike":Pi,"formats/underline":ji,"formats/formula":gs,"formats/image":Di,"formats/video":ps,"modules/syntax":gl,"modules/table":gp,"modules/toolbar":Bi,"themes/bubble":Ol,"themes/snow":Nl,"ui/icons":Nn,"ui/picker":ms,"ui/icon-picker":El,"ui/color-picker":wl,"ui/tooltip":xl},!0);function Ll(n){const{value:e,style:t,...r}=n,s=Te.useRef(null);return Te.useEffect(()=>{const i=s.current,o=i.ownerDocument.createElement("div");Object.entries(t).forEach(([c,d])=>{o.style[c]=d});const a=i.appendChild(o),u=new L(a,{theme:"snow",...r});return e&&(u.root.innerHTML=e),u.on("text-change",()=>{var c;(c=r.onChange)==null||c.call(r,u.root.innerHTML||"")}),()=>{i.innerHTML=""}},[s]),Oe.jsx("div",{ref:s,style:{height:"100%"}})}var Cl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},_l=Te.createContext&&Te.createContext(Cl),Pp=["attr","size","title"];function jp(n,e){if(n==null)return{};var t=Dp(n,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function Dp(n,e){if(n==null)return{};var t={};for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(e.indexOf(r)>=0)continue;t[r]=n[r]}return t}function bs(){return bs=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},bs.apply(this,arguments)}function Rl(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function ys(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Rl(Object(t),!0).forEach(function(r){$p(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Rl(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function $p(n,e,t){return e=Bp(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Bp(n){var e=Mp(n,"string");return typeof e=="symbol"?e:e+""}function Mp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ql(n){return n&&n.map((e,t)=>Te.createElement(e.tag,ys({key:t},e.attr),ql(e.child)))}function Up(n){return e=>Te.createElement(Fp,bs({attr:ys({},n.attr)},e),ql(n.child))}function Fp(n){var e=t=>{var{attr:r,size:s,title:i}=n,o=jp(n,Pp),a=s||t.size||"1em",u;return t.className&&(u=t.className),n.className&&(u=(u?u+" ":"")+n.className),Te.createElement("svg",bs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,o,{className:u,style:ys(ys({color:n.color||t.color},t.style),n.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&Te.createElement("title",null,i),n.children)};return _l!==void 0?Te.createElement(_l.Consumer,null,t=>e(t)):e(Cl)}function Il(n){return Up({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:[]}]})(n)}const Hp=n=>Array.isArray(n)?n:n&&n.fileList;function kl(n){var a;const{value:e,...t}=n,r=Hp(e),s=Array.isArray(r)?r.length:0,i=t.maxCount??1;let o;return s<i&&((a=t.listType)!=null&&a.startsWith("picture-")?o=Oe.jsx(Il,{}):o=Oe.jsx(ze.Button,{icon:Oe.jsx(Il,{}),children:" 上传"})),Oe.jsx(ze.Upload,{maxCount:1,multiple:!0,showUploadList:!0,...t,fileList:r,onChange:u=>{var c;return(c=t.onChange)==null?void 0:c.call(t,u.fileList)},children:s<i&&o})}const zp={upload:{renderFormItem:(n,e)=>Oe.jsx(kl,{...e.fieldProps})},editor:{renderFormItem:(n,e)=>Oe.jsx(Ll,{...e.fieldProps})}};function Mi({children:n}){return Oe.jsx(zt.ProConfigProvider,{valueTypeMap:zp,children:n})}const Vp=()=>ze.Form.useForm().pop(),Pl=n=>Oe.jsx(Mi,{children:Oe.jsx(zt.BetaSchemaForm,{layout:"horizontal",colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(e,t)=>Oe.jsx(ze.Form.Item,{wrapperCol:{offset:4,span:8},children:Oe.jsx(ze.Space,{children:t})})},...n})});Pl.useForm=Vp;function Kp(n){const{items:e,...t}={...n},r=$s.useNavigate(),i=$s.useLocation().pathname.split("/").filter(Boolean).pop(),o=e==null?void 0:e.find(u=>(u==null?void 0:u.key)==i),a=[(o==null?void 0:o.key)??""];return Oe.jsxs(ze.Layout,{style:{height:"100vh"},children:[Oe.jsxs(ze.Layout.Sider,{children:[Oe.jsx(ze.Typography.Title,{style:{color:"white",textAlign:"center"},children:"Rainte"}),Oe.jsx(ze.Menu,{mode:"inline",theme:"dark",items:e,defaultSelectedKeys:a,onClick:u=>r(u.key),...t})]}),Oe.jsx(ze.Layout,{style:{overflow:"auto"},children:Oe.jsx(ze.Layout.Content,{style:{minHeight:"fit-content",padding:"1rem"},children:Oe.jsx(ze.Layout.Content,{style:{height:"100%",padding:"1rem",backgroundColor:"white"},children:Oe.jsx($s.Outlet,{})})})})]})}function Gp(n){return Oe.jsx(Mi,{children:Oe.jsx(zt.ProTable,{rowKey:"id",pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:e})=>Oe.jsxs(ze.Space,{children:["已选 ",e.length," 项"]}),...n})})}let vs,jl,Ui;const Dl=()=>{const n=ze.App.useApp();return vs=n.message,Ui=n.modal,jl=n.notification,null},Wp=Object.freeze(Object.defineProperty({__proto__:null,default:Dl,get message(){return vs},get modal(){return Ui},get notification(){return jl},popup:{confirm:n=>Ui.confirm({title:"提示",content:"确认操作?",...n}),success:(n,e)=>(n=n||"操作成功",vs.success(n,e)),error:(n,e)=>{n=n||"操作失败",vs.error(n,e),mo.system.fail(n)},ask:function(n,e){return this.confirm({onOk:n,...e})}},useDialog:Dl},Symbol.toStringTag,{value:"Module"})),Y=n=>typeof n=="string",_n=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},$l=n=>n==null?"":""+n,Zp=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},Xp=/###/g,Bl=n=>n&&n.indexOf("###")>-1?n.replace(Xp,"."):n,Ml=n=>!n||Y(n),Rn=(n,e,t)=>{const r=Y(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Ml(n))return{};const i=Bl(r[s]);!n[i]&&t&&(n[i]=new t),Object.prototype.hasOwnProperty.call(n,i)?n=n[i]:n={},++s}return Ml(n)?{}:{obj:n,k:Bl(r[s])}},Ul=(n,e,t)=>{const{obj:r,k:s}=Rn(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=Rn(n,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Rn(n,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},Yp=(n,e,t,r)=>{const{obj:s,k:i}=Rn(n,e,Object);s[i]=s[i]||[],s[i].push(t)},ws=(n,e)=>{const{obj:t,k:r}=Rn(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},Jp=(n,e,t)=>{const r=ws(n,t);return r!==void 0?r:ws(e,t)},Fl=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?Y(n[r])||n[r]instanceof String||Y(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):Fl(n[r],e[r],t):n[r]=e[r]);return n},Fr=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Qp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const em=n=>Y(n)?n.replace(/[&<>"'\/]/g,e=>Qp[e]):n;class tm{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 r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const rm=[" ",",","?","!",";"],nm=new tm(20),sm=(n,e,t)=>{e=e||"",t=t||"";const r=rm.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(r.length===0)return!0;const s=nm.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(n);if(!i){const o=n.indexOf(t);o>0&&!s.test(n.substring(0,o))&&(i=!0)}return i},Fi=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=t),a+=r[u],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<r.length-1)continue;i+=u-i+1;break}s=o}return s},Es=n=>n==null?void 0:n.replace("_","-"),im={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class xs{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||im,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,s){return s&&!this.debug?null:(Y(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new xs(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xs(this.logger,e)}}var Et=new xs;class As{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+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,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a.apply(a,[e,...r])})}}class Hl extends As{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,r){var c,d;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):Y(r)&&i?a.push(...r.split(i)):a.push(r)));const u=ws(this.data,a);return!u&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),u||!o||!Y(r)?u:Fi((d=(c=this.data)==null?void 0:c[e])==null?void 0:d[t],r,i)}addResource(e,t,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),Ul(this.data,a,s),i.silent||this.emit("added",e,t,r,s)}addResources(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(Y(r[i])||Array.isArray(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=t,t=a[1]),this.addNamespaces(t);let u=ws(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Fl(u,r,i):u={...u,...r},Ul(this.data,a,u),o.silent||this.emit("added",e,t,r)}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(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var zl={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(i=>{var o;e=((o=this.processors[i])==null?void 0:o.process(e,t,r,s))??e}),e}};const Vl={},Kl=n=>!Y(n)&&typeof n!="boolean"&&typeof n!="number";class Ts extends As{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Zp(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Et.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 r=this.resolve(e,t);return(r==null?void 0:r.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!sm(e,r,s);if(o&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:Y(i)?[i]:i};const c=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(s)}return{key:e,namespaces:Y(i)?[i]:i}}translate(e,t,r){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 s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),u=a[a.length-1],c=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(d){const b=t.nsSeparator||this.options.nsSeparator;return s?{res:`${u}${b}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${b}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:o}const g=this.resolve(e,t);let f=g==null?void 0:g.res;const p=(g==null?void 0:g.usedKey)||o,w=(g==null?void 0:g.exactUsedKey)||o,x=["[object Number]","[object Function]","[object RegExp]"],T=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,k=t.count!==void 0&&!Y(t.count),j=Ts.hasDefaultValue(t),H=k?this.pluralResolver.getSuffix(c,t.count,t):"",F=t.ordinal&&k?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",ie=k&&!t.ordinal&&t.count===0,te=ie&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${H}`]||t[`defaultValue${F}`]||t.defaultValue;let oe=f;C&&!f&&j&&(oe=te);const be=Kl(oe),xe=Object.prototype.toString.apply(oe);if(C&&oe&&be&&x.indexOf(xe)<0&&!(Y(T)&&Array.isArray(oe))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,oe,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(g.res=b,g.usedParams=this.getUsedParamsDetails(t),g):b}if(i){const b=Array.isArray(oe),N=b?[]:{},A=b?w:p;for(const R in oe)if(Object.prototype.hasOwnProperty.call(oe,R)){const m=`${A}${i}${R}`;j&&!f?N[R]=this.translate(m,{...t,defaultValue:Kl(te)?te[R]:void 0,joinArrays:!1,ns:a}):N[R]=this.translate(m,{...t,joinArrays:!1,ns:a}),N[R]===m&&(N[R]=oe[R])}f=N}}else if(C&&Y(T)&&Array.isArray(f))f=f.join(T),f&&(f=this.extendTranslation(f,e,t,r));else{let b=!1,N=!1;!this.isValidLookup(f)&&j&&(b=!0,f=te),this.isValidLookup(f)||(N=!0,f=o);const R=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:f,m=j&&te!==f&&this.options.updateMissing;if(N||b||m){if(this.logger.log(m?"updateKey":"missingKey",c,u,o,m?te:f),i){const I=this.resolve(o,{...t,keySeparator:!1});I&&I.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 E=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let I=0;I<O.length;I++)E.push(O[I]);else this.options.saveMissingTo==="all"?E=this.languageUtils.toResolveHierarchy(t.lng||this.language):E.push(t.lng||this.language);const P=(I,_,K)=>{var z;const W=j&&K!==f?K:R;this.options.missingKeyHandler?this.options.missingKeyHandler(I,u,_,W,m,t):(z=this.backendConnector)!=null&&z.saveMissing&&this.backendConnector.saveMissing(I,u,_,W,m,t),this.emit("missingKey",I,u,_,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?E.forEach(I=>{const _=this.pluralResolver.getSuffixes(I,t);ie&&t[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(K=>{P([I],o+K,t[`defaultValue${K}`]||te)})}):P(E,o,te))}f=this.extendTranslation(f,e,t,g,r),N&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${u}:${o}`),(N||b)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,b?f:void 0))}return s?(g.res=f,g.usedParams=this.getUsedParamsDetails(t),g):f}extendTranslation(e,t,r,s,i){var c,d;var o=this;if((c=this.i18nFormat)!=null&&c.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=Y(e)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(g){const w=e.match(this.interpolator.nestingRegexp);f=w&&w.length}let p=r.replace&&!Y(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,r.lng||this.language||s.usedLng,r),g){const w=e.match(this.interpolator.nestingRegexp),x=w&&w.length;f<x&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var w=arguments.length,x=new Array(w),T=0;T<w;T++)x[T]=arguments[T];return(i==null?void 0:i[0])===x[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${t[0]}`),null):o.translate(...x,t)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,u=Y(a)?[a]:a;return e!=null&&(u!=null&&u.length)&&r.applyPostProcessor!==!1&&(e=zl.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return Y(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,t),d=c.key;s=d;let g=c.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const f=t.count!==void 0&&!Y(t.count),p=f&&!t.ordinal&&t.count===0,w=t.context!==void 0&&(Y(t.context)||typeof t.context=="number")&&t.context!=="",x=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);g.forEach(T=>{var C,k;this.isValidLookup(r)||(a=T,!Vl[`${x[0]}-${T}`]&&((C=this.utils)!=null&&C.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(a))&&(Vl[`${x[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),x.forEach(j=>{var ie;if(this.isValidLookup(r))return;o=j;const H=[d];if((ie=this.i18nFormat)!=null&&ie.addLookupKeys)this.i18nFormat.addLookupKeys(H,d,j,T,t);else{let te;f&&(te=this.pluralResolver.getSuffix(j,t.count,t));const oe=`${this.options.pluralSeparator}zero`,be=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(H.push(d+te),t.ordinal&&te.indexOf(be)===0&&H.push(d+te.replace(be,this.options.pluralSeparator)),p&&H.push(d+oe)),w){const xe=`${d}${this.options.contextSeparator}${t.context}`;H.push(xe),f&&(H.push(xe+te),t.ordinal&&te.indexOf(be)===0&&H.push(xe+te.replace(be,this.options.pluralSeparator)),p&&H.push(xe+oe))}}let F;for(;F=H.pop();)this.isValidLookup(r)||(i=F,r=this.getResource(j,T,F,t))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){var i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}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"],r=e.replace&&!Y(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of t)delete s[i]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class Gl{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Et.create("languageUtils")}getScriptPartFromCode(e){if(e=Es(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=Es(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Y(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(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),Y(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Y(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):Y(e)&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Wl={zero:0,one:1,two:2,few:3,many:4,other:5},Zl={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class om{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Et.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 r=Es(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Zl;if(!e.match(/-|_/))return Zl;const u=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(u,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Wl[s]-Wl[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const Xl=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=Jp(n,e,t);return!i&&s&&Y(t)&&(i=Fi(n,t,r),i===void 0&&(i=Fi(e,t,r))),i},Hi=n=>n.replace(/\$/g,"$$$$");class am{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Et.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),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:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:d,unescapePrefix:g,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:w,nestingSuffixEscaped:x,nestingOptionsSeparator:T,maxReplaces:C,alwaysFormat:k}=e.interpolation;this.escape=t!==void 0?t:em,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Fr(i):o||"{{",this.suffix=a?Fr(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?Fr(f):p||Fr("$t("),this.nestingSuffix=w?Fr(w):x||Fr(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=C||1e3,this.alwaysFormat=k!==void 0?k:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"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,r,s){var p;let i,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=w=>{if(w.indexOf(this.formatSeparator)<0){const k=Xl(t,u,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,r,{...s,...t,interpolationkey:w}):k}const x=w.split(this.formatSeparator),T=x.shift().trim(),C=x.join(this.formatSeparator).trim();return this.format(Xl(t,u,T,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...t,interpolationkey:T})};this.resetRegExp();const d=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,g=((p=s==null?void 0:s.interpolation)==null?void 0:p.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>Hi(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?Hi(this.escape(w)):Hi(w)}].forEach(w=>{for(a=0;i=w.regex.exec(e);){const x=i[1].trim();if(o=c(x),o===void 0)if(typeof d=="function"){const C=d(e,i,s);o=Y(C)?C:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))o="";else if(g){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`),o="";else!Y(o)&&!this.useRawValueToEscape&&(o=$l(o));const T=w.safeValue(o);if(e=e.replace(i[0],T),g?(w.regex.lastIndex+=o.length,w.regex.lastIndex-=i[0].length):w.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;const a=(u,c)=>{const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const g=u.split(new RegExp(`${d}[ ]*{`));let f=`{${g[1]}`;u=g[0],f=this.interpolate(f,o);const p=f.match(/'/g),w=f.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!w||w.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),c&&(o={...c,...o})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,x),`${u}${d}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];o={...r},o=o.replace&&!Y(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=d.shift(),u=d,c=!0}if(i=t(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!Y(i))return i;Y(i)||(i=$l(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),c&&(i=u.reduce((d,g)=>this.format(d,g,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const lm=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...u]=o.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();t[d]||(t[d]=c),c==="false"&&(t[d]=!1),c==="true"&&(t[d]=!0),isNaN(c)||(t[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Hr=n=>{const e={};return(t,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=e[o];return a||(a=n(Es(r),s),e[o]=a),a(t)}};class um{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Et.create("formatter"),this.options=e,this.formats={number:Hr((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return i=>s.format(i)}),currency:Hr((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return i=>s.format(i)}),datetime:Hr((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return i=>s.format(i)}),relativetime:Hr((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return i=>s.format(i,r.range||"day")}),list:Hr((t,r)=>{const s=new Intl.ListFormat(t,{...r});return i=>s.format(i)})},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()]=Hr(t)}format(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(u=>u.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,u)=>{var g;const{formatName:c,formatOptions:d}=lm(u);if(this.formats[c]){let f=a;try{const p=((g=s==null?void 0:s.formatParams)==null?void 0:g[s.interpolationkey])||{},w=p.locale||p.lng||s.locale||s.lng||r;f=this.formats[c](a,w,{...d,...s,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}const cm=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class fm extends As{constructor(e,t,r){var i,o;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Et.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(e,t,r,s){const i={},o={},a={},u={};return e.forEach(c=>{let d=!0;t.forEach(g=>{const f=`${c}|${g}`;!r.reload&&this.store.hasResourceBundle(c,g)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,d=!1,o[f]===void 0&&(o[f]=!0),i[f]===void 0&&(i[f]=!0),u[g]===void 0&&(u[g]=!0)))}),d||(a[c]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,r){const s=e.split("|"),i=s[0],o=s[1];t&&this.emit("failedLoading",i,o,t),!t&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(u=>{Yp(u.loaded,[i],o),cm(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const d=u.loaded[c];d.length&&d.forEach(g=>{a[c][g]===void 0&&(a[c][g]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(c&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,i*2,o)},i);return}o(c,d)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(e,t);c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}return}return u(e,t,a)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=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."),s&&s();Y(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Y(t)&&(t=[t]);const i=this.queueLoad(e,t,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,t,r,s,i){var u,c,d,g,f;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(u=this.services)==null?void 0:u.utils)!=null&&c.hasLoadedNamespace&&!((g=(d=this.services)==null?void 0:d.utils)!=null&&g.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" 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(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const p={...o,isUpdate:i},w=this.backend.create.bind(this.backend);if(w.length<6)try{let x;w.length===5?x=w(e,t,r,s,p):x=w(e,t,r,s),x&&typeof x.then=="function"?x.then(T=>a(null,T)).catch(a):a(null,x)}catch(x){a(x)}else w(e,t,r,s,a,p)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const Yl=()=>({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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),Y(n[1])&&(e.defaultValue=n[1]),Y(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Jl=n=>{var e,t;return Y(n.ns)&&(n.ns=[n.ns]),Y(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Y(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Os=()=>{},hm=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class qn extends As{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Jl(e),this.services={},this.logger=Et,this.modules={external:[]},hm(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]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Y(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=Yl();this.options={...s,...this.options,...Jl(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Et.init(i(this.modules.logger),this.options):Et.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=um;const g=new Gl(this.options);this.store=new Hl(this.options.resources,this.options);const f=this.services;f.logger=Et,f.resourceStore=this.store,f.languageUtils=g,f.pluralResolver=new om(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=i(d),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new am(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new fm(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var w=arguments.length,x=new Array(w>1?w-1:0),T=1;T<w;T++)x[T-1]=arguments[T];e.emit(p,...x)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Ts(this.services,this.options),this.translator.on("*",function(p){for(var w=arguments.length,x=new Array(w>1?w-1:0),T=1;T<w;T++)x[T-1]=arguments[T];e.emit(p,...x)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Os),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const u=_n(),c=()=>{const d=(g,f)=>{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),u.resolve(f),r(g,f)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),u}loadResources(e){var i,o;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Os;const s=Y(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],u=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(g=>{g!=="cimode"&&a.indexOf(g)<0&&a.push(g)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>u(d)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,c=>u(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,t,r){const s=_n();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Os),this.services.backendConnector.reload(e,t,i=>{s.resolve(),r(i)}),s}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"&&zl.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 r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const s=_n();this.emit("languageChanging",e);const i=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),t&&t(u,function(){return r.t(...arguments)})},a=u=>{var d,g;!e&&!u&&this.services.languageDetector&&(u=[]);const c=Y(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(g=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||g.call(d,c)),this.loadResources(c,f=>{o(f,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,t,r){var s=this;const i=function(o,a){let u;if(typeof a!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),g=2;g<c;g++)d[g-2]=arguments[g];u=s.options.overloadTranslationOptionHandler([o,a].concat(d))}else u={...a};u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||i.keyPrefix);const f=s.options.keySeparator||".";let p;return u.keyPrefix&&Array.isArray(o)?p=o.map(w=>`${u.keyPrefix}${f}${w}`):p=u.keyPrefix?`${u.keyPrefix}${f}${o}`:o,s.t(p,u)};return Y(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}t(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...t)}exists(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.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 r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,t){const r=_n();return this.options.ns?(Y(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=_n();Y(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),t&&t(o)}),r):(t&&t(),Promise.resolve())}dir(e){var s,i;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.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"],r=((i=this.services)==null?void 0:i.languageUtils)||new Gl(Yl());return t.indexOf(r.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 qn(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Os;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new qn(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},Object.keys(u[c]).reduce((d,g)=>(d[g]={...u[c][g]},d),{})),{});i.store=new Hl(a,s),i.services.resourceStore=i.store}return i.translator=new Ts(i.services,s),i.translator.on("*",function(a){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];i.emit(a,...c)}),i.init(s,t),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const De=qn.createInstance();De.createInstance=qn.createInstance;const dm=De.createInstance,gm=De.dir,pm=De.init,mm=De.loadResources,bm=De.reloadResources,ym=De.use,vm=De.changeLanguage,wm=De.getFixedT,Em=De.t,xm=De.exists,Am=De.setDefaultNamespace,Tm=De.hasLoadedNamespace,Om=De.loadNamespaces,Sm=De.loadLanguages;function zi(n){"@babel/helpers - typeof";return zi=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},zi(n)}function Ql(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":zi(XMLHttpRequest))==="object"}function Nm(n){return!!n&&typeof n.then=="function"}function Lm(n){return Nm(n)?n:Promise.resolve(n)}function eu(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function tu(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(t),!0).forEach(function(r){Cm(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):eu(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Cm(n,e,t){return(e=_m(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function _m(n){var e=Rm(n,"string");return pr(e)=="symbol"?e:e+""}function Rm(n,e){if(pr(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(pr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function pr(n){"@babel/helpers - typeof";return pr=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},pr(n)}var Yt=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Yt=global.fetch:typeof window<"u"&&window.fetch&&(Yt=window.fetch);var In;Ql()&&(typeof global<"u"&&global.XMLHttpRequest?In=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(In=window.XMLHttpRequest));var Ss;if(typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Ss=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Ss=window.ActiveXObject)),typeof Yt!="function"&&(Yt=void 0),!Yt&&!In&&!Ss)try{Promise.resolve().then(()=>r1).then(function(n){Yt=n.default}).catch(function(){})}catch{}var Vi=function(e,t){if(t&&pr(t)==="object"){var r="";for(var s in t)r+="&"+encodeURIComponent(s)+"="+encodeURIComponent(t[s]);if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},ru=function(e,t,r,s){var i=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(c){r(null,{status:u.status,data:c})}).catch(r)};if(s){var o=s(e,t);if(o instanceof Promise){o.then(i).catch(r);return}}typeof fetch=="function"?fetch(e,t).then(i).catch(r):Yt(e,t).then(i).catch(r)},nu=!1,qm=function(e,t,r,s){e.queryStringParams&&(t=Vi(t,e.queryStringParams));var i=tu({},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&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,a=tu({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:i},nu?{}:o),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ru(t,a,s,u)}catch(c){if(!o||Object.keys(o).length===0||!c.message||c.message.indexOf("not implemented")<0)return s(c);try{Object.keys(o).forEach(function(d){delete a[d]}),ru(t,a,s,u),nu=!0}catch(d){s(d)}}},Im=function(e,t,r,s){r&&pr(r)==="object"&&(r=Vi("",r).slice(1)),e.queryStringParams&&(t=Vi(t,e.queryStringParams));try{var i=In?new In:new Ss("MSXML2.XMLHTTP.3.0");i.open(r?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)i.setRequestHeader(a,o[a]);i.onreadystatechange=function(){i.readyState>3&&s(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(u){console&&console.log(u)}},km=function(e,t,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},Yt&&t.indexOf("file:")!==0)return qm(e,t,r,s);if(Ql()||typeof ActiveXObject=="function")return Im(e,t,r,s);s(new Error("No fetch and no xhr implementation found!"))};function zr(n){"@babel/helpers - typeof";return zr=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},zr(n)}function su(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function Ki(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?su(Object(t),!0).forEach(function(r){iu(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):su(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Pm(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function jm(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ou(r.key),r)}}function Dm(n,e,t){return e&&jm(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function iu(n,e,t){return(e=ou(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ou(n){var e=$m(n,"string");return zr(e)=="symbol"?e:e+""}function $m(n,e){if(zr(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(zr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}var Bm=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,r,s){return iu({},r,s||"")},parseLoadPayload:function(t,r){},request:km,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},au=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Pm(this,n),this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}return Dm(n,[{key:"init",value:function(t){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=Ki(Ki(Ki({},Bm()),this.options||{}),s),this.allOptions=i,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);zr(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(t,r,s){this._readAny(t,t,r,r,s)}},{key:"read",value:function(t,r,s){this._readAny([t],t,[r],r,s)}},{key:"_readAny",value:function(t,r,s,i,o){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(t,s)),u=Lm(u),u.then(function(c){if(!c)return o(null,{});var d=a.services.interpolator.interpolate(c,{lng:t.join("+"),ns:s.join("+")});a.loadUrl(d,o,r,i)})}},{key:"loadUrl",value:function(t,r,s,i){var o=this,a=typeof s=="string"?[s]:s,u=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(a,u);this.options.request(this.options,t,c,function(d,g){if(g&&(g.status>=500&&g.status<600||!g.status))return r("failed loading "+t+"; status code: "+g.status,!0);if(g&&g.status>=400&&g.status<500)return r("failed loading "+t+"; status code: "+g.status,!1);if(!g&&d&&d.message){var f=d.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(T){return f.indexOf(T)>-1});if(p)return r("failed loading "+t+": "+d.message,!0)}if(d)return r(d,!1);var w,x;try{typeof g.data=="string"?w=o.options.parse(g.data,s,i):w=g.data}catch{x="failed parsing "+t+" to json"}if(x)return r(x,!1);r(null,w)})}},{key:"create",value:function(t,r,s,i,o){var a=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var u=this.options.parsePayload(r,s,i),c=0,d=[],g=[];t.forEach(function(f){var p=a.options.addPath;typeof a.options.addPath=="function"&&(p=a.options.addPath(f,r));var w=a.services.interpolator.interpolate(p,{lng:f,ns:r});a.options.request(a.options,w,u,function(x,T){c+=1,d.push(x),g.push(T),c===t.length&&typeof o=="function"&&o(d,g)})})}}},{key:"reload",value:function(){var t=this,r=this.services,s=r.backendConnector,i=r.languageUtils,o=r.logger,a=s.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(g){var f=i.toResolveHierarchy(g);f.forEach(function(p){u.indexOf(p)<0&&u.push(p)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return c(d)}),u.forEach(function(d){t.allOptions.ns.forEach(function(g){s.read(d,g,"read",null,null,function(f,p){f&&o.warn("loading namespace ".concat(g," for language ").concat(d," failed"),f),!f&&p&&o.log("loaded namespace ".concat(g," for language ").concat(d),p),s.loaded("".concat(d,"|").concat(g),f,p)})})})}}}])}();au.type="backend";const{slice:Mm,forEach:Um}=[];function Fm(n){return Um.call(Mm.call(arguments,1),e=>{if(e)for(const t in e)n[t]===void 0&&(n[t]=e[t])}),n}const lu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Hm=function(n,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let i=`${n}=${s}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!lu.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!lu.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},uu={create(n,e,t,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+t*60*1e3)),r&&(s.domain=r),document.cookie=Hm(n,encodeURIComponent(e),s)},read(n){const e=`${n}=`,t=document.cookie.split(";");for(let r=0;r<t.length;r++){let s=t[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(n){this.create(n,"",-1)}};var zm={name:"cookie",lookup(n){let{lookupCookie:e}=n;if(e&&typeof document<"u")return uu.read(e)||void 0},cacheUserLanguage(n,e){let{lookupCookie:t,cookieMinutes:r,cookieDomain:s,cookieOptions:i}=e;t&&typeof document<"u"&&uu.create(t,n,r,s,i)}},Vm={name:"querystring",lookup(n){var r;let{lookupQuerystring:e}=n,t;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(t=o[a].substring(u+1))}}return t}};let Vr=null;const cu=()=>{if(Vr!==null)return Vr;try{if(Vr=typeof window<"u"&&window.localStorage!==null,!Vr)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{Vr=!1}return Vr};var Km={name:"localStorage",lookup(n){let{lookupLocalStorage:e}=n;if(e&&cu())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupLocalStorage:t}=e;t&&cu()&&window.localStorage.setItem(t,n)}};let Kr=null;const fu=()=>{if(Kr!==null)return Kr;try{if(Kr=typeof window<"u"&&window.sessionStorage!==null,!Kr)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Kr=!1}return Kr};var Gm={name:"sessionStorage",lookup(n){let{lookupSessionStorage:e}=n;if(e&&fu())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupSessionStorage:t}=e;t&&fu()&&window.sessionStorage.setItem(t,n)}},Wm={name:"navigator",lookup(n){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:r,language:s}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},Zm={name:"htmlTag",lookup(n){let{htmlTag:e}=n,t;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(t=r.getAttribute("lang")),t}},Xm={name:"path",lookup(n){var s;let{lookupFromPathIndex:e}=n;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(s=t[typeof e=="number"?e:0])==null?void 0:s.replace("/",""):void 0}},Ym={name:"subdomain",lookup(n){var s,i;let{lookupFromSubdomainIndex:e}=n;const t=typeof e=="number"?e+1:1,r=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[t]}};let hu=!1;try{document.cookie,hu=!0}catch{}const du=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];hu||du.splice(1,1);const Jm=()=>({order:du,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class gu{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]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Fm(t,this.options||{},Jm()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(zm),this.addDetector(Vm),this.addDetector(Km),this.addDetector(Gm),this.addDetector(Wm),this.addDetector(Zm),this.addDetector(Xm),this.addDetector(Ym)}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(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(t=t.concat(s))}}),t=t.map(r=>this.options.convertDetectedLanguage(r)),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(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}gu.type="languageDetector";const pu="i18nextLng",Gi="zh";De.use(au).use(gu).init({lng:mo.storage.local.getRaw(pu,Gi),fallbackLng:Gi,backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},interpolation:{escapeValue:!1}});const Qm=Object.freeze(Object.defineProperty({__proto__:null,KEY:pu,LNG_ZH:Gi,changeLanguage:vm,createInstance:dm,dir:gm,exists:xm,getFixedT:wm,hasLoadedNamespace:Tm,init:pm,loadLanguages:Sm,loadNamespaces:Om,loadResources:mm,reloadResources:bm,setDefaultNamespace:Am,t:Em,use:ym},Symbol.toStringTag,{value:"Module"})),e1=Object.freeze(Object.defineProperty({__proto__:null,onUpload:async n=>{const{file:e,onProgress:t,onSuccess:r}=n;let s=0;const i=setInterval(()=>{s+=Math.floor(Math.random()*10),s>=100&&(s=99),t({percent:s})},100);e.url=URL.createObjectURL(e),r==null||r({url:e.url}),clearInterval(i)}},Symbol.toStringTag,{value:"Module"}));var Ns={exports:{}},mu;function t1(){return mu||(mu=1,function(n,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof pt<"u"&&pt,r=function(){function i(){this.fetch=!1,this.DOMException=t.DOMException}return i.prototype=t,new i}();(function(i){(function(o){var a=typeof i<"u"&&i||typeof self<"u"&&self||typeof a<"u"&&a,u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(m){return m&&DataView.prototype.isPrototypeOf(m)}if(u.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=ArrayBuffer.isView||function(m){return m&&d.indexOf(Object.prototype.toString.call(m))>-1};function f(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(m)||m==="")throw new TypeError('Invalid character in header field name: "'+m+'"');return m.toLowerCase()}function p(m){return typeof m!="string"&&(m=String(m)),m}function w(m){var E={next:function(){var O=m.shift();return{done:O===void 0,value:O}}};return u.iterable&&(E[Symbol.iterator]=function(){return E}),E}function x(m){this.map={},m instanceof x?m.forEach(function(E,O){this.append(O,E)},this):Array.isArray(m)?m.forEach(function(E){this.append(E[0],E[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(E){this.append(E,m[E])},this)}x.prototype.append=function(m,E){m=f(m),E=p(E);var O=this.map[m];this.map[m]=O?O+", "+E:E},x.prototype.delete=function(m){delete this.map[f(m)]},x.prototype.get=function(m){return m=f(m),this.has(m)?this.map[m]:null},x.prototype.has=function(m){return this.map.hasOwnProperty(f(m))},x.prototype.set=function(m,E){this.map[f(m)]=p(E)},x.prototype.forEach=function(m,E){for(var O in this.map)this.map.hasOwnProperty(O)&&m.call(E,this.map[O],O,this)},x.prototype.keys=function(){var m=[];return this.forEach(function(E,O){m.push(O)}),w(m)},x.prototype.values=function(){var m=[];return this.forEach(function(E){m.push(E)}),w(m)},x.prototype.entries=function(){var m=[];return this.forEach(function(E,O){m.push([O,E])}),w(m)},u.iterable&&(x.prototype[Symbol.iterator]=x.prototype.entries);function T(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function C(m){return new Promise(function(E,O){m.onload=function(){E(m.result)},m.onerror=function(){O(m.error)}})}function k(m){var E=new FileReader,O=C(E);return E.readAsArrayBuffer(m),O}function j(m){var E=new FileReader,O=C(E);return E.readAsText(m),O}function H(m){for(var E=new Uint8Array(m),O=new Array(E.length),P=0;P<E.length;P++)O[P]=String.fromCharCode(E[P]);return O.join("")}function F(m){if(m.slice)return m.slice(0);var E=new Uint8Array(m.byteLength);return E.set(new Uint8Array(m)),E.buffer}function ie(){return this.bodyUsed=!1,this._initBody=function(m){this.bodyUsed=this.bodyUsed,this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:u.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:u.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():u.arrayBuffer&&u.blob&&c(m)?(this._bodyArrayBuffer=F(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||g(m))?this._bodyArrayBuffer=F(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var m=T(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var m=T(this);return m||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(k)}),this.text=function(){var m=T(this);if(m)return m;if(this._bodyBlob)return j(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(H(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(xe)}),this.json=function(){return this.text().then(JSON.parse)},this}var te=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function oe(m){var E=m.toUpperCase();return te.indexOf(E)>-1?E:m}function be(m,E){if(!(this instanceof be))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');E=E||{};var O=E.body;if(m instanceof be){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,E.headers||(this.headers=new x(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!O&&m._bodyInit!=null&&(O=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new x(E.headers)),this.method=oe(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&O)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(O),(this.method==="GET"||this.method==="HEAD")&&(E.cache==="no-store"||E.cache==="no-cache")){var P=/([?&])_=[^&]*/;if(P.test(this.url))this.url=this.url.replace(P,"$1_="+new Date().getTime());else{var I=/\?/;this.url+=(I.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}be.prototype.clone=function(){return new be(this,{body:this._bodyInit})};function xe(m){var E=new FormData;return m.trim().split("&").forEach(function(O){if(O){var P=O.split("="),I=P.shift().replace(/\+/g," "),_=P.join("=").replace(/\+/g," ");E.append(decodeURIComponent(I),decodeURIComponent(_))}}),E}function b(m){var E=new x,O=m.replace(/\r?\n[\t ]+/g," ");return O.split("\r").map(function(P){return P.indexOf(`
78
+ `).join("");return i.insert(o,{table:$i()})},new M().retain(r.index));this.quill.updateContents(s,L.sources.USER),this.quill.setSelection(r.index,L.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(L.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(L.events.TEXT_CHANGE,(r,s,i)=>{i===L.sources.USER&&this.balanceTables()}),!0):!1)})}};const pl=It("quill:toolbar");class Bi extends it{constructor(e,t){var r,s;if(super(e,t),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),pp(i,this.options.container),(s=(r=e.container)==null?void 0:r.parentNode)==null||s.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){pl.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(i=>{var a;const o=(a=this.options.handlers)==null?void 0:a[i];o&&this.addHandler(i,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(L.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.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){pl.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ke){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new M().retain(o.index).delete(o.length).insert({[t]:i}),L.sources.USER)}else this.quill.format(t,i,L.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[s,i]=r;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[s]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[s])){let a=t[s];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[s],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[s]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}Bi.DEFAULTS={};function ml(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function pp(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")ml(r,s);else{const i=Object.keys(s)[0],o=s[i];Array.isArray(o)?mp(r,i,o):ml(r,i,o)}}),n.appendChild(r)})}function mp(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),r.appendChild(i)}),n.appendChild(r)}Bi.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,U.INLINE)!=null&&this.quill.format(t,!1,L.sources.USER)})}else this.quill.removeFormat(n.index,n.length,L.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",L.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,L.sources.USER),this.quill.format("direction",n,L.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let s=n==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,L.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,L.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,L.sources.USER):this.quill.format("list","unchecked",L.sources.USER):this.quill.format("list",n,L.sources.USER)}}};const bp='<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>',yp='<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>',vp='<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>',wp='<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>',Ep='<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>',xp='<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>',Ap='<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>',Tp='<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>',bl='<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>',Nn={align:{"":bp,center:yp,right:vp,justify:wp},background:Ep,blockquote:xp,bold:Ap,clean:Tp,code:bl,"code-block":bl,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>'},Op='<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 yl=0;function vl(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class ms{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"),vl(this.label,"aria-expanded"),vl(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 r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Op,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-${yl}`,yl+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),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 r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.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 r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class wl extends ms{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(r=>{r.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 r=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class El extends ms{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const Sp=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class xl{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,Sp(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,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>s.right&&(o=s.right-i.right,this.root.style.left=`${t+o}px`),i.left<s.left&&(o=s.left-i.left,this.root.style.left=`${t+o}px`),i.bottom>s.bottom){const a=i.bottom-i.top,u=e.bottom-e.top+a;this.root.style.top=`${r-u}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const Np=[!1,"center","right","justify"],Lp=["#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"],Cp=[!1,"serif","monospace"],_p=["1","2","3",!1],Rp=["small",!1,"large","huge"];class Ln extends $r{constructor(e,t){super(e,t);const r=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),t[i]!=null))if(i==="direction")r.innerHTML=t[i][""]+t[i].rtl;else if(typeof t[i]=="string")r.innerHTML=t[i];else{const o=r.value||"";o!=null&&t[i][o]&&(r.innerHTML=t[i][o])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&Cn(s,Np),typeof t.align=="object"))return new El(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&Cn(s,Lp,i==="background"?"#ffffff":"#000000"),new wl(s,t[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?Cn(s,Cp):s.classList.contains("ql-header")?Cn(s,_p):s.classList.contains("ql-size")&&Cn(s,Rp)),new ms(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on(B.events.EDITOR_CHANGE,r)}}Ln.DEFAULTS=Gt({},$r.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Al extends xl{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 r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),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,B.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,B.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=qp(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,B.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",B.sources.USER),this.quill.setSelection(r+2,B.sources.USER)}break}}this.textbox.value="",this.hide()}}function qp(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function Cn(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const s=document.createElement("option");r===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),n.appendChild(s)})}const Ip=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Tl extends Al{constructor(e,t){super(e,t),this.quill.on(B.events.EDITOR_CHANGE,(r,s,i,o)=>{if(r===B.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&o===B.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(s.index,s.length);if(a.length===1){const u=this.quill.getBounds(s);u!=null&&this.position(u)}else{const u=a[a.length-1],c=this.quill.getIndex(u),d=Math.min(u.length()-1,s.index+s.length-c),g=this.quill.getBounds(new fr(c,d));g!=null&&this.position(g)}}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(B.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),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}$(Tl,"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 Ol extends Ln{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Ip),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Tl(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Nn),this.buildPickers(e.container.querySelectorAll("select"),Nn))}}Ol.DEFAULTS=Gt({},Ln.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,L.sources.USER)}}}}});const kp=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Sl extends Al{constructor(){super(...arguments);$(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 r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,B.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on(B.events.SELECTION_CHANGE,(t,r,s)=>{if(t!=null){if(t.length===0&&s===B.sources.USER){const[i,o]=this.quill.scroll.descendant(Xt,t.index);if(i!=null){this.linkRange=new fr(t.index-o,i.length());const a=Xt.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const u=this.quill.getBounds(this.linkRange);u!=null&&this.position(u);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}$(Sl,"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 Nl extends Ln{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=kp),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"),Nn),this.buildPickers(e.container.querySelectorAll("select"),Nn),this.tooltip=new Sl(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}Nl.DEFAULTS=Gt({},Ln.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){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:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,L.sources.USER)}}}}}),L.register({"attributors/attribute/direction":Ga,"attributors/class/align":za,"attributors/class/background":xg,"attributors/class/color":Eg,"attributors/class/direction":Wa,"attributors/class/font":Ya,"attributors/class/size":Qa,"attributors/style/align":Va,"attributors/style/background":Ai,"attributors/style/color":xi,"attributors/style/direction":Za,"attributors/style/font":Ja,"attributors/style/size":el},!0),L.register({"formats/align":za,"formats/direction":Wa,"formats/indent":hp,"formats/background":Ai,"formats/color":xi,"formats/font":Ya,"formats/size":Qa,"formats/blockquote":Ri,"formats/code-block":je,"formats/header":qi,"formats/list":An,"formats/bold":Tn,"formats/code":Ti,"formats/italic":Ii,"formats/link":Xt,"formats/script":ki,"formats/strike":Pi,"formats/underline":ji,"formats/formula":gs,"formats/image":Di,"formats/video":ps,"modules/syntax":gl,"modules/table":gp,"modules/toolbar":Bi,"themes/bubble":Ol,"themes/snow":Nl,"ui/icons":Nn,"ui/picker":ms,"ui/icon-picker":El,"ui/color-picker":wl,"ui/tooltip":xl},!0);function Ll(n){const{value:e,style:t,...r}=n,s=Te.useRef(null);return Te.useEffect(()=>{const i=s.current;if(i){const o=i.ownerDocument.createElement("div");Object.entries(t).forEach(([c,d])=>{o.style[c]=d});const a=i.appendChild(o),u=new L(a,{theme:"snow",...r});return e&&(u.root.innerHTML=e),u.on("text-change",()=>{var c;(c=r.onChange)==null||c.call(r,u.root.innerHTML||"")}),()=>{i.innerHTML=""}}},[s]),Oe.jsx("div",{ref:s,style:{height:"100%"}})}var Cl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},_l=Te.createContext&&Te.createContext(Cl),Pp=["attr","size","title"];function jp(n,e){if(n==null)return{};var t=Dp(n,e),r,s;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(s=0;s<i.length;s++)r=i[s],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(n,r)&&(t[r]=n[r])}return t}function Dp(n,e){if(n==null)return{};var t={};for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(e.indexOf(r)>=0)continue;t[r]=n[r]}return t}function bs(){return bs=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},bs.apply(this,arguments)}function Rl(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function ys(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Rl(Object(t),!0).forEach(function(r){$p(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):Rl(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function $p(n,e,t){return e=Bp(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Bp(n){var e=Mp(n,"string");return typeof e=="symbol"?e:e+""}function Mp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function ql(n){return n&&n.map((e,t)=>Te.createElement(e.tag,ys({key:t},e.attr),ql(e.child)))}function Up(n){return e=>Te.createElement(Fp,bs({attr:ys({},n.attr)},e),ql(n.child))}function Fp(n){var e=t=>{var{attr:r,size:s,title:i}=n,o=jp(n,Pp),a=s||t.size||"1em",u;return t.className&&(u=t.className),n.className&&(u=(u?u+" ":"")+n.className),Te.createElement("svg",bs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,o,{className:u,style:ys(ys({color:n.color||t.color},t.style),n.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&Te.createElement("title",null,i),n.children)};return _l!==void 0?Te.createElement(_l.Consumer,null,t=>e(t)):e(Cl)}function Il(n){return Up({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:[]}]})(n)}const Hp=n=>Array.isArray(n)?n:n&&n.fileList;function kl(n){var a;const{value:e,...t}=n,r=Hp(e),s=Array.isArray(r)?r.length:0,i=t.maxCount??1;let o;return s<i&&((a=t.listType)!=null&&a.startsWith("picture-")?o=Oe.jsx(Il,{}):o=Oe.jsx(ze.Button,{icon:Oe.jsx(Il,{}),children:" 上传"})),Oe.jsx(ze.Upload,{maxCount:1,multiple:!0,showUploadList:!0,...t,fileList:r,onChange:u=>{var c;return(c=t.onChange)==null?void 0:c.call(t,u.fileList)},children:s<i&&o})}const zp={upload:{renderFormItem:(n,e)=>Oe.jsx(kl,{...e.fieldProps})},editor:{renderFormItem:(n,e)=>Oe.jsx(Ll,{...e.fieldProps})}};function Mi({children:n}){return Oe.jsx(zt.ProConfigProvider,{valueTypeMap:zp,children:n})}const Vp=()=>ze.Form.useForm().pop(),Pl=n=>Oe.jsx(Mi,{children:Oe.jsx(zt.BetaSchemaForm,{layout:"horizontal",colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(e,t)=>Oe.jsx(ze.Form.Item,{wrapperCol:{offset:4,span:8},children:Oe.jsx(ze.Space,{children:t})})},...n})});Pl.useForm=Vp;function Kp(n){const{items:e,...t}={...n},r=$s.useNavigate(),i=$s.useLocation().pathname.split("/").filter(Boolean).pop(),o=e==null?void 0:e.find(u=>(u==null?void 0:u.key)==i),a=[(o==null?void 0:o.key)??""];return Oe.jsxs(ze.Layout,{style:{height:"100vh"},children:[Oe.jsxs(ze.Layout.Sider,{children:[Oe.jsx(ze.Typography.Title,{style:{color:"white",textAlign:"center"},children:"Rainte"}),Oe.jsx(ze.Menu,{mode:"inline",theme:"dark",items:e,defaultSelectedKeys:a,onClick:u=>r(u.key),...t})]}),Oe.jsx(ze.Layout,{style:{overflow:"auto"},children:Oe.jsx(ze.Layout.Content,{style:{minHeight:"fit-content",padding:"1rem"},children:Oe.jsx(ze.Layout.Content,{style:{height:"100%",padding:"1rem",backgroundColor:"white"},children:Oe.jsx($s.Outlet,{})})})})]})}function Gp(n){return Oe.jsx(Mi,{children:Oe.jsx(zt.ProTable,{rowKey:"id",pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:e})=>Oe.jsxs(ze.Space,{children:["已选 ",e.length," 项"]}),...n})})}let vs,jl,Ui;const Dl=()=>{const n=ze.App.useApp();return vs=n.message,Ui=n.modal,jl=n.notification,null},Wp=Object.freeze(Object.defineProperty({__proto__:null,default:Dl,get message(){return vs},get modal(){return Ui},get notification(){return jl},popup:{confirm:n=>Ui.confirm({title:"提示",content:"确认操作?",...n}),success:(n,e)=>(n=n||"操作成功",vs.success(n,e)),error:(n,e)=>{n=n||"操作失败",vs.error(n,e),mo.system.fail(n)},ask:function(n,e){return this.confirm({onOk:n,...e})}},useDialog:Dl},Symbol.toStringTag,{value:"Module"})),Y=n=>typeof n=="string",_n=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},$l=n=>n==null?"":""+n,Zp=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},Xp=/###/g,Bl=n=>n&&n.indexOf("###")>-1?n.replace(Xp,"."):n,Ml=n=>!n||Y(n),Rn=(n,e,t)=>{const r=Y(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Ml(n))return{};const i=Bl(r[s]);!n[i]&&t&&(n[i]=new t),Object.prototype.hasOwnProperty.call(n,i)?n=n[i]:n={},++s}return Ml(n)?{}:{obj:n,k:Bl(r[s])}},Ul=(n,e,t)=>{const{obj:r,k:s}=Rn(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=Rn(n,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Rn(n,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},Yp=(n,e,t,r)=>{const{obj:s,k:i}=Rn(n,e,Object);s[i]=s[i]||[],s[i].push(t)},ws=(n,e)=>{const{obj:t,k:r}=Rn(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},Jp=(n,e,t)=>{const r=ws(n,t);return r!==void 0?r:ws(e,t)},Fl=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?Y(n[r])||n[r]instanceof String||Y(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):Fl(n[r],e[r],t):n[r]=e[r]);return n},Fr=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Qp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const em=n=>Y(n)?n.replace(/[&<>"'\/]/g,e=>Qp[e]):n;class tm{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 r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const rm=[" ",",","?","!",";"],nm=new tm(20),sm=(n,e,t)=>{e=e||"",t=t||"";const r=rm.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(r.length===0)return!0;const s=nm.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(n);if(!i){const o=n.indexOf(t);o>0&&!s.test(n.substring(0,o))&&(i=!0)}return i},Fi=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=t),a+=r[u],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<r.length-1)continue;i+=u-i+1;break}s=o}return s},Es=n=>n==null?void 0:n.replace("_","-"),im={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class xs{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||im,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,s){return s&&!this.debug?null:(Y(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new xs(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xs(this.logger,e)}}var Et=new xs;class As{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+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,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a.apply(a,[e,...r])})}}class Hl extends As{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,r){var c,d;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):Y(r)&&i?a.push(...r.split(i)):a.push(r)));const u=ws(this.data,a);return!u&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),u||!o||!Y(r)?u:Fi((d=(c=this.data)==null?void 0:c[e])==null?void 0:d[t],r,i)}addResource(e,t,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),Ul(this.data,a,s),i.silent||this.emit("added",e,t,r,s)}addResources(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(Y(r[i])||Array.isArray(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=t,t=a[1]),this.addNamespaces(t);let u=ws(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Fl(u,r,i):u={...u,...r},Ul(this.data,a,u),o.silent||this.emit("added",e,t,r)}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(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var zl={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(i=>{var o;e=((o=this.processors[i])==null?void 0:o.process(e,t,r,s))??e}),e}};const Vl={},Kl=n=>!Y(n)&&typeof n!="boolean"&&typeof n!="number";class Ts extends As{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Zp(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Et.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 r=this.resolve(e,t);return(r==null?void 0:r.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!sm(e,r,s);if(o&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:Y(i)?[i]:i};const c=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(s)}return{key:e,namespaces:Y(i)?[i]:i}}translate(e,t,r){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 s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),u=a[a.length-1],c=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(d){const b=t.nsSeparator||this.options.nsSeparator;return s?{res:`${u}${b}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${b}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:o}const g=this.resolve(e,t);let f=g==null?void 0:g.res;const p=(g==null?void 0:g.usedKey)||o,w=(g==null?void 0:g.exactUsedKey)||o,x=["[object Number]","[object Function]","[object RegExp]"],T=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,k=t.count!==void 0&&!Y(t.count),j=Ts.hasDefaultValue(t),H=k?this.pluralResolver.getSuffix(c,t.count,t):"",F=t.ordinal&&k?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",ie=k&&!t.ordinal&&t.count===0,te=ie&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${H}`]||t[`defaultValue${F}`]||t.defaultValue;let oe=f;C&&!f&&j&&(oe=te);const be=Kl(oe),xe=Object.prototype.toString.apply(oe);if(C&&oe&&be&&x.indexOf(xe)<0&&!(Y(T)&&Array.isArray(oe))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,oe,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(g.res=b,g.usedParams=this.getUsedParamsDetails(t),g):b}if(i){const b=Array.isArray(oe),N=b?[]:{},A=b?w:p;for(const R in oe)if(Object.prototype.hasOwnProperty.call(oe,R)){const m=`${A}${i}${R}`;j&&!f?N[R]=this.translate(m,{...t,defaultValue:Kl(te)?te[R]:void 0,joinArrays:!1,ns:a}):N[R]=this.translate(m,{...t,joinArrays:!1,ns:a}),N[R]===m&&(N[R]=oe[R])}f=N}}else if(C&&Y(T)&&Array.isArray(f))f=f.join(T),f&&(f=this.extendTranslation(f,e,t,r));else{let b=!1,N=!1;!this.isValidLookup(f)&&j&&(b=!0,f=te),this.isValidLookup(f)||(N=!0,f=o);const R=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:f,m=j&&te!==f&&this.options.updateMissing;if(N||b||m){if(this.logger.log(m?"updateKey":"missingKey",c,u,o,m?te:f),i){const I=this.resolve(o,{...t,keySeparator:!1});I&&I.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 E=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let I=0;I<O.length;I++)E.push(O[I]);else this.options.saveMissingTo==="all"?E=this.languageUtils.toResolveHierarchy(t.lng||this.language):E.push(t.lng||this.language);const P=(I,_,K)=>{var z;const W=j&&K!==f?K:R;this.options.missingKeyHandler?this.options.missingKeyHandler(I,u,_,W,m,t):(z=this.backendConnector)!=null&&z.saveMissing&&this.backendConnector.saveMissing(I,u,_,W,m,t),this.emit("missingKey",I,u,_,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?E.forEach(I=>{const _=this.pluralResolver.getSuffixes(I,t);ie&&t[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(K=>{P([I],o+K,t[`defaultValue${K}`]||te)})}):P(E,o,te))}f=this.extendTranslation(f,e,t,g,r),N&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${u}:${o}`),(N||b)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,b?f:void 0))}return s?(g.res=f,g.usedParams=this.getUsedParamsDetails(t),g):f}extendTranslation(e,t,r,s,i){var c,d;var o=this;if((c=this.i18nFormat)!=null&&c.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=Y(e)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(g){const w=e.match(this.interpolator.nestingRegexp);f=w&&w.length}let p=r.replace&&!Y(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,r.lng||this.language||s.usedLng,r),g){const w=e.match(this.interpolator.nestingRegexp),x=w&&w.length;f<x&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var w=arguments.length,x=new Array(w),T=0;T<w;T++)x[T]=arguments[T];return(i==null?void 0:i[0])===x[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${t[0]}`),null):o.translate(...x,t)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,u=Y(a)?[a]:a;return e!=null&&(u!=null&&u.length)&&r.applyPostProcessor!==!1&&(e=zl.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return Y(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,t),d=c.key;s=d;let g=c.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const f=t.count!==void 0&&!Y(t.count),p=f&&!t.ordinal&&t.count===0,w=t.context!==void 0&&(Y(t.context)||typeof t.context=="number")&&t.context!=="",x=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);g.forEach(T=>{var C,k;this.isValidLookup(r)||(a=T,!Vl[`${x[0]}-${T}`]&&((C=this.utils)!=null&&C.hasLoadedNamespace)&&!((k=this.utils)!=null&&k.hasLoadedNamespace(a))&&(Vl[`${x[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${a}" 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!!!")),x.forEach(j=>{var ie;if(this.isValidLookup(r))return;o=j;const H=[d];if((ie=this.i18nFormat)!=null&&ie.addLookupKeys)this.i18nFormat.addLookupKeys(H,d,j,T,t);else{let te;f&&(te=this.pluralResolver.getSuffix(j,t.count,t));const oe=`${this.options.pluralSeparator}zero`,be=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(H.push(d+te),t.ordinal&&te.indexOf(be)===0&&H.push(d+te.replace(be,this.options.pluralSeparator)),p&&H.push(d+oe)),w){const xe=`${d}${this.options.contextSeparator}${t.context}`;H.push(xe),f&&(H.push(xe+te),t.ordinal&&te.indexOf(be)===0&&H.push(xe+te.replace(be,this.options.pluralSeparator)),p&&H.push(xe+oe))}}let F;for(;F=H.pop();)this.isValidLookup(r)||(i=F,r=this.getResource(j,T,F,t))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){var i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}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"],r=e.replace&&!Y(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of t)delete s[i]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class Gl{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Et.create("languageUtils")}getScriptPartFromCode(e){if(e=Es(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=Es(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(Y(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(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),Y(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return Y(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):Y(e)&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Wl={zero:0,one:1,two:2,few:3,many:4,other:5},Zl={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class om{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Et.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 r=Es(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Zl;if(!e.match(/-|_/))return Zl;const u=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(u,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Wl[s]-Wl[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const Xl=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=Jp(n,e,t);return!i&&s&&Y(t)&&(i=Fi(n,t,r),i===void 0&&(i=Fi(e,t,r))),i},Hi=n=>n.replace(/\$/g,"$$$$");class am{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Et.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),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:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:d,unescapePrefix:g,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:w,nestingSuffixEscaped:x,nestingOptionsSeparator:T,maxReplaces:C,alwaysFormat:k}=e.interpolation;this.escape=t!==void 0?t:em,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Fr(i):o||"{{",this.suffix=a?Fr(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?Fr(f):p||Fr("$t("),this.nestingSuffix=w?Fr(w):x||Fr(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=C||1e3,this.alwaysFormat=k!==void 0?k:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"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,r,s){var p;let i,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=w=>{if(w.indexOf(this.formatSeparator)<0){const k=Xl(t,u,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(k,void 0,r,{...s,...t,interpolationkey:w}):k}const x=w.split(this.formatSeparator),T=x.shift().trim(),C=x.join(this.formatSeparator).trim();return this.format(Xl(t,u,T,this.options.keySeparator,this.options.ignoreJSONStructure),C,r,{...s,...t,interpolationkey:T})};this.resetRegExp();const d=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,g=((p=s==null?void 0:s.interpolation)==null?void 0:p.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>Hi(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?Hi(this.escape(w)):Hi(w)}].forEach(w=>{for(a=0;i=w.regex.exec(e);){const x=i[1].trim();if(o=c(x),o===void 0)if(typeof d=="function"){const C=d(e,i,s);o=Y(C)?C:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))o="";else if(g){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`),o="";else!Y(o)&&!this.useRawValueToEscape&&(o=$l(o));const T=w.safeValue(o);if(e=e.replace(i[0],T),g?(w.regex.lastIndex+=o.length,w.regex.lastIndex-=i[0].length):w.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;const a=(u,c)=>{const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const g=u.split(new RegExp(`${d}[ ]*{`));let f=`{${g[1]}`;u=g[0],f=this.interpolate(f,o);const p=f.match(/'/g),w=f.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!w||w.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),c&&(o={...c,...o})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,x),`${u}${d}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];o={...r},o=o.replace&&!Y(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=d.shift(),u=d,c=!0}if(i=t(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!Y(i))return i;Y(i)||(i=$l(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),c&&(i=u.reduce((d,g)=>this.format(d,g,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const lm=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...u]=o.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();t[d]||(t[d]=c),c==="false"&&(t[d]=!1),c==="true"&&(t[d]=!0),isNaN(c)||(t[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Hr=n=>{const e={};return(t,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=e[o];return a||(a=n(Es(r),s),e[o]=a),a(t)}};class um{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Et.create("formatter"),this.options=e,this.formats={number:Hr((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return i=>s.format(i)}),currency:Hr((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return i=>s.format(i)}),datetime:Hr((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return i=>s.format(i)}),relativetime:Hr((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return i=>s.format(i,r.range||"day")}),list:Hr((t,r)=>{const s=new Intl.ListFormat(t,{...r});return i=>s.format(i)})},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()]=Hr(t)}format(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(u=>u.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,u)=>{var g;const{formatName:c,formatOptions:d}=lm(u);if(this.formats[c]){let f=a;try{const p=((g=s==null?void 0:s.formatParams)==null?void 0:g[s.interpolationkey])||{},w=p.locale||p.lng||s.locale||s.lng||r;f=this.formats[c](a,w,{...d,...s,...p})}catch(p){this.logger.warn(p)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}const cm=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class fm extends As{constructor(e,t,r){var i,o;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Et.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(e,t,r,s){const i={},o={},a={},u={};return e.forEach(c=>{let d=!0;t.forEach(g=>{const f=`${c}|${g}`;!r.reload&&this.store.hasResourceBundle(c,g)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,d=!1,o[f]===void 0&&(o[f]=!0),i[f]===void 0&&(i[f]=!0),u[g]===void 0&&(u[g]=!0)))}),d||(a[c]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,r){const s=e.split("|"),i=s[0],o=s[1];t&&this.emit("failedLoading",i,o,t),!t&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(u=>{Yp(u.loaded,[i],o),cm(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const d=u.loaded[c];d.length&&d.forEach(g=>{a[c][g]===void 0&&(a[c][g]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(c&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,i*2,o)},i);return}o(c,d)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(e,t);c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}return}return u(e,t,a)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=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."),s&&s();Y(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Y(t)&&(t=[t]);const i=this.queueLoad(e,t,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,t,r,s,i){var u,c,d,g,f;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(u=this.services)==null?void 0:u.utils)!=null&&c.hasLoadedNamespace&&!((g=(d=this.services)==null?void 0:d.utils)!=null&&g.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" 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(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const p={...o,isUpdate:i},w=this.backend.create.bind(this.backend);if(w.length<6)try{let x;w.length===5?x=w(e,t,r,s,p):x=w(e,t,r,s),x&&typeof x.then=="function"?x.then(T=>a(null,T)).catch(a):a(null,x)}catch(x){a(x)}else w(e,t,r,s,a,p)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const Yl=()=>({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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),Y(n[1])&&(e.defaultValue=n[1]),Y(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Jl=n=>{var e,t;return Y(n.ns)&&(n.ns=[n.ns]),Y(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Y(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Os=()=>{},hm=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class qn extends As{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Jl(e),this.services={},this.logger=Et,this.modules={external:[]},hm(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]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(Y(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=Yl();this.options={...s,...this.options,...Jl(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Et.init(i(this.modules.logger),this.options):Et.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=um;const g=new Gl(this.options);this.store=new Hl(this.options.resources,this.options);const f=this.services;f.logger=Et,f.resourceStore=this.store,f.languageUtils=g,f.pluralResolver=new om(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=i(d),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new am(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new fm(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var w=arguments.length,x=new Array(w>1?w-1:0),T=1;T<w;T++)x[T-1]=arguments[T];e.emit(p,...x)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Ts(this.services,this.options),this.translator.on("*",function(p){for(var w=arguments.length,x=new Array(w>1?w-1:0),T=1;T<w;T++)x[T-1]=arguments[T];e.emit(p,...x)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Os),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const u=_n(),c=()=>{const d=(g,f)=>{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),u.resolve(f),r(g,f)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),u}loadResources(e){var i,o;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Os;const s=Y(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],u=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(g=>{g!=="cimode"&&a.indexOf(g)<0&&a.push(g)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>u(d)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,c=>u(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,t,r){const s=_n();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Os),this.services.backendConnector.reload(e,t,i=>{s.resolve(),r(i)}),s}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"&&zl.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 r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const s=_n();this.emit("languageChanging",e);const i=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),t&&t(u,function(){return r.t(...arguments)})},a=u=>{var d,g;!e&&!u&&this.services.languageDetector&&(u=[]);const c=Y(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(g=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||g.call(d,c)),this.loadResources(c,f=>{o(f,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,t,r){var s=this;const i=function(o,a){let u;if(typeof a!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),g=2;g<c;g++)d[g-2]=arguments[g];u=s.options.overloadTranslationOptionHandler([o,a].concat(d))}else u={...a};u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||i.keyPrefix);const f=s.options.keySeparator||".";let p;return u.keyPrefix&&Array.isArray(o)?p=o.map(w=>`${u.keyPrefix}${f}${w}`):p=u.keyPrefix?`${u.keyPrefix}${f}${o}`:o,s.t(p,u)};return Y(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}t(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...t)}exists(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.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 r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,t){const r=_n();return this.options.ns?(Y(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=_n();Y(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),t&&t(o)}),r):(t&&t(),Promise.resolve())}dir(e){var s,i;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.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"],r=((i=this.services)==null?void 0:i.languageUtils)||new Gl(Yl());return t.indexOf(r.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 qn(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Os;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new qn(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},Object.keys(u[c]).reduce((d,g)=>(d[g]={...u[c][g]},d),{})),{});i.store=new Hl(a,s),i.services.resourceStore=i.store}return i.translator=new Ts(i.services,s),i.translator.on("*",function(a){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];i.emit(a,...c)}),i.init(s,t),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const De=qn.createInstance();De.createInstance=qn.createInstance;const dm=De.createInstance,gm=De.dir,pm=De.init,mm=De.loadResources,bm=De.reloadResources,ym=De.use,vm=De.changeLanguage,wm=De.getFixedT,Em=De.t,xm=De.exists,Am=De.setDefaultNamespace,Tm=De.hasLoadedNamespace,Om=De.loadNamespaces,Sm=De.loadLanguages;function zi(n){"@babel/helpers - typeof";return zi=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},zi(n)}function Ql(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":zi(XMLHttpRequest))==="object"}function Nm(n){return!!n&&typeof n.then=="function"}function Lm(n){return Nm(n)?n:Promise.resolve(n)}function eu(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function tu(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?eu(Object(t),!0).forEach(function(r){Cm(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):eu(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Cm(n,e,t){return(e=_m(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function _m(n){var e=Rm(n,"string");return pr(e)=="symbol"?e:e+""}function Rm(n,e){if(pr(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(pr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function pr(n){"@babel/helpers - typeof";return pr=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},pr(n)}var Yt=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Yt=global.fetch:typeof window<"u"&&window.fetch&&(Yt=window.fetch);var In;Ql()&&(typeof global<"u"&&global.XMLHttpRequest?In=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(In=window.XMLHttpRequest));var Ss;if(typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Ss=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Ss=window.ActiveXObject)),typeof Yt!="function"&&(Yt=void 0),!Yt&&!In&&!Ss)try{Promise.resolve().then(()=>r1).then(function(n){Yt=n.default}).catch(function(){})}catch{}var Vi=function(e,t){if(t&&pr(t)==="object"){var r="";for(var s in t)r+="&"+encodeURIComponent(s)+"="+encodeURIComponent(t[s]);if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},ru=function(e,t,r,s){var i=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(c){r(null,{status:u.status,data:c})}).catch(r)};if(s){var o=s(e,t);if(o instanceof Promise){o.then(i).catch(r);return}}typeof fetch=="function"?fetch(e,t).then(i).catch(r):Yt(e,t).then(i).catch(r)},nu=!1,qm=function(e,t,r,s){e.queryStringParams&&(t=Vi(t,e.queryStringParams));var i=tu({},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&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,a=tu({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:i},nu?{}:o),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{ru(t,a,s,u)}catch(c){if(!o||Object.keys(o).length===0||!c.message||c.message.indexOf("not implemented")<0)return s(c);try{Object.keys(o).forEach(function(d){delete a[d]}),ru(t,a,s,u),nu=!0}catch(d){s(d)}}},Im=function(e,t,r,s){r&&pr(r)==="object"&&(r=Vi("",r).slice(1)),e.queryStringParams&&(t=Vi(t,e.queryStringParams));try{var i=In?new In:new Ss("MSXML2.XMLHTTP.3.0");i.open(r?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)i.setRequestHeader(a,o[a]);i.onreadystatechange=function(){i.readyState>3&&s(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(u){console&&console.log(u)}},km=function(e,t,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},Yt&&t.indexOf("file:")!==0)return qm(e,t,r,s);if(Ql()||typeof ActiveXObject=="function")return Im(e,t,r,s);s(new Error("No fetch and no xhr implementation found!"))};function zr(n){"@babel/helpers - typeof";return zr=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},zr(n)}function su(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function Ki(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?su(Object(t),!0).forEach(function(r){iu(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):su(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Pm(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function jm(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,ou(r.key),r)}}function Dm(n,e,t){return e&&jm(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function iu(n,e,t){return(e=ou(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ou(n){var e=$m(n,"string");return zr(e)=="symbol"?e:e+""}function $m(n,e){if(zr(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(zr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}var Bm=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,r,s){return iu({},r,s||"")},parseLoadPayload:function(t,r){},request:km,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},au=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Pm(this,n),this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}return Dm(n,[{key:"init",value:function(t){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=Ki(Ki(Ki({},Bm()),this.options||{}),s),this.allOptions=i,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);zr(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(t,r,s){this._readAny(t,t,r,r,s)}},{key:"read",value:function(t,r,s){this._readAny([t],t,[r],r,s)}},{key:"_readAny",value:function(t,r,s,i,o){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(t,s)),u=Lm(u),u.then(function(c){if(!c)return o(null,{});var d=a.services.interpolator.interpolate(c,{lng:t.join("+"),ns:s.join("+")});a.loadUrl(d,o,r,i)})}},{key:"loadUrl",value:function(t,r,s,i){var o=this,a=typeof s=="string"?[s]:s,u=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(a,u);this.options.request(this.options,t,c,function(d,g){if(g&&(g.status>=500&&g.status<600||!g.status))return r("failed loading "+t+"; status code: "+g.status,!0);if(g&&g.status>=400&&g.status<500)return r("failed loading "+t+"; status code: "+g.status,!1);if(!g&&d&&d.message){var f=d.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(T){return f.indexOf(T)>-1});if(p)return r("failed loading "+t+": "+d.message,!0)}if(d)return r(d,!1);var w,x;try{typeof g.data=="string"?w=o.options.parse(g.data,s,i):w=g.data}catch{x="failed parsing "+t+" to json"}if(x)return r(x,!1);r(null,w)})}},{key:"create",value:function(t,r,s,i,o){var a=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var u=this.options.parsePayload(r,s,i),c=0,d=[],g=[];t.forEach(function(f){var p=a.options.addPath;typeof a.options.addPath=="function"&&(p=a.options.addPath(f,r));var w=a.services.interpolator.interpolate(p,{lng:f,ns:r});a.options.request(a.options,w,u,function(x,T){c+=1,d.push(x),g.push(T),c===t.length&&typeof o=="function"&&o(d,g)})})}}},{key:"reload",value:function(){var t=this,r=this.services,s=r.backendConnector,i=r.languageUtils,o=r.logger,a=s.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(g){var f=i.toResolveHierarchy(g);f.forEach(function(p){u.indexOf(p)<0&&u.push(p)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return c(d)}),u.forEach(function(d){t.allOptions.ns.forEach(function(g){s.read(d,g,"read",null,null,function(f,p){f&&o.warn("loading namespace ".concat(g," for language ").concat(d," failed"),f),!f&&p&&o.log("loaded namespace ".concat(g," for language ").concat(d),p),s.loaded("".concat(d,"|").concat(g),f,p)})})})}}}])}();au.type="backend";const{slice:Mm,forEach:Um}=[];function Fm(n){return Um.call(Mm.call(arguments,1),e=>{if(e)for(const t in e)n[t]===void 0&&(n[t]=e[t])}),n}const lu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Hm=function(n,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let i=`${n}=${s}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!lu.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!lu.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},uu={create(n,e,t,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+t*60*1e3)),r&&(s.domain=r),document.cookie=Hm(n,encodeURIComponent(e),s)},read(n){const e=`${n}=`,t=document.cookie.split(";");for(let r=0;r<t.length;r++){let s=t[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(n){this.create(n,"",-1)}};var zm={name:"cookie",lookup(n){let{lookupCookie:e}=n;if(e&&typeof document<"u")return uu.read(e)||void 0},cacheUserLanguage(n,e){let{lookupCookie:t,cookieMinutes:r,cookieDomain:s,cookieOptions:i}=e;t&&typeof document<"u"&&uu.create(t,n,r,s,i)}},Vm={name:"querystring",lookup(n){var r;let{lookupQuerystring:e}=n,t;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(t=o[a].substring(u+1))}}return t}};let Vr=null;const cu=()=>{if(Vr!==null)return Vr;try{if(Vr=typeof window<"u"&&window.localStorage!==null,!Vr)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{Vr=!1}return Vr};var Km={name:"localStorage",lookup(n){let{lookupLocalStorage:e}=n;if(e&&cu())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupLocalStorage:t}=e;t&&cu()&&window.localStorage.setItem(t,n)}};let Kr=null;const fu=()=>{if(Kr!==null)return Kr;try{if(Kr=typeof window<"u"&&window.sessionStorage!==null,!Kr)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Kr=!1}return Kr};var Gm={name:"sessionStorage",lookup(n){let{lookupSessionStorage:e}=n;if(e&&fu())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupSessionStorage:t}=e;t&&fu()&&window.sessionStorage.setItem(t,n)}},Wm={name:"navigator",lookup(n){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:r,language:s}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},Zm={name:"htmlTag",lookup(n){let{htmlTag:e}=n,t;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(t=r.getAttribute("lang")),t}},Xm={name:"path",lookup(n){var s;let{lookupFromPathIndex:e}=n;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(s=t[typeof e=="number"?e:0])==null?void 0:s.replace("/",""):void 0}},Ym={name:"subdomain",lookup(n){var s,i;let{lookupFromSubdomainIndex:e}=n;const t=typeof e=="number"?e+1:1,r=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[t]}};let hu=!1;try{document.cookie,hu=!0}catch{}const du=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];hu||du.splice(1,1);const Jm=()=>({order:du,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class gu{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]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Fm(t,this.options||{},Jm()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(zm),this.addDetector(Vm),this.addDetector(Km),this.addDetector(Gm),this.addDetector(Wm),this.addDetector(Zm),this.addDetector(Xm),this.addDetector(Ym)}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(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(t=t.concat(s))}}),t=t.map(r=>this.options.convertDetectedLanguage(r)),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(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}gu.type="languageDetector";const pu="i18nextLng",Gi="zh";De.use(au).use(gu).init({lng:mo.storage.local.getRaw(pu,Gi),fallbackLng:Gi,backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},interpolation:{escapeValue:!1}});const Qm=Object.freeze(Object.defineProperty({__proto__:null,KEY:pu,LNG_ZH:Gi,changeLanguage:vm,createInstance:dm,dir:gm,exists:xm,getFixedT:wm,hasLoadedNamespace:Tm,init:pm,loadLanguages:Sm,loadNamespaces:Om,loadResources:mm,reloadResources:bm,setDefaultNamespace:Am,t:Em,use:ym},Symbol.toStringTag,{value:"Module"})),e1=Object.freeze(Object.defineProperty({__proto__:null,onUpload:async n=>{const{file:e,onProgress:t,onSuccess:r}=n;let s=0;const i=setInterval(()=>{s+=Math.floor(Math.random()*10),s>=100&&(s=99),t({percent:s})},100);e.url=URL.createObjectURL(e),r==null||r({url:e.url}),clearInterval(i)}},Symbol.toStringTag,{value:"Module"}));var Ns={exports:{}},mu;function t1(){return mu||(mu=1,function(n,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof pt<"u"&&pt,r=function(){function i(){this.fetch=!1,this.DOMException=t.DOMException}return i.prototype=t,new i}();(function(i){(function(o){var a=typeof i<"u"&&i||typeof self<"u"&&self||typeof a<"u"&&a,u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(m){return m&&DataView.prototype.isPrototypeOf(m)}if(u.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=ArrayBuffer.isView||function(m){return m&&d.indexOf(Object.prototype.toString.call(m))>-1};function f(m){if(typeof m!="string"&&(m=String(m)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(m)||m==="")throw new TypeError('Invalid character in header field name: "'+m+'"');return m.toLowerCase()}function p(m){return typeof m!="string"&&(m=String(m)),m}function w(m){var E={next:function(){var O=m.shift();return{done:O===void 0,value:O}}};return u.iterable&&(E[Symbol.iterator]=function(){return E}),E}function x(m){this.map={},m instanceof x?m.forEach(function(E,O){this.append(O,E)},this):Array.isArray(m)?m.forEach(function(E){this.append(E[0],E[1])},this):m&&Object.getOwnPropertyNames(m).forEach(function(E){this.append(E,m[E])},this)}x.prototype.append=function(m,E){m=f(m),E=p(E);var O=this.map[m];this.map[m]=O?O+", "+E:E},x.prototype.delete=function(m){delete this.map[f(m)]},x.prototype.get=function(m){return m=f(m),this.has(m)?this.map[m]:null},x.prototype.has=function(m){return this.map.hasOwnProperty(f(m))},x.prototype.set=function(m,E){this.map[f(m)]=p(E)},x.prototype.forEach=function(m,E){for(var O in this.map)this.map.hasOwnProperty(O)&&m.call(E,this.map[O],O,this)},x.prototype.keys=function(){var m=[];return this.forEach(function(E,O){m.push(O)}),w(m)},x.prototype.values=function(){var m=[];return this.forEach(function(E){m.push(E)}),w(m)},x.prototype.entries=function(){var m=[];return this.forEach(function(E,O){m.push([O,E])}),w(m)},u.iterable&&(x.prototype[Symbol.iterator]=x.prototype.entries);function T(m){if(m.bodyUsed)return Promise.reject(new TypeError("Already read"));m.bodyUsed=!0}function C(m){return new Promise(function(E,O){m.onload=function(){E(m.result)},m.onerror=function(){O(m.error)}})}function k(m){var E=new FileReader,O=C(E);return E.readAsArrayBuffer(m),O}function j(m){var E=new FileReader,O=C(E);return E.readAsText(m),O}function H(m){for(var E=new Uint8Array(m),O=new Array(E.length),P=0;P<E.length;P++)O[P]=String.fromCharCode(E[P]);return O.join("")}function F(m){if(m.slice)return m.slice(0);var E=new Uint8Array(m.byteLength);return E.set(new Uint8Array(m)),E.buffer}function ie(){return this.bodyUsed=!1,this._initBody=function(m){this.bodyUsed=this.bodyUsed,this._bodyInit=m,m?typeof m=="string"?this._bodyText=m:u.blob&&Blob.prototype.isPrototypeOf(m)?this._bodyBlob=m:u.formData&&FormData.prototype.isPrototypeOf(m)?this._bodyFormData=m:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)?this._bodyText=m.toString():u.arrayBuffer&&u.blob&&c(m)?(this._bodyArrayBuffer=F(m.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(m)||g(m))?this._bodyArrayBuffer=F(m):this._bodyText=m=Object.prototype.toString.call(m):this._bodyText="",this.headers.get("content-type")||(typeof m=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(m)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var m=T(this);if(m)return m;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var m=T(this);return m||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(k)}),this.text=function(){var m=T(this);if(m)return m;if(this._bodyBlob)return j(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(H(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(xe)}),this.json=function(){return this.text().then(JSON.parse)},this}var te=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function oe(m){var E=m.toUpperCase();return te.indexOf(E)>-1?E:m}function be(m,E){if(!(this instanceof be))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');E=E||{};var O=E.body;if(m instanceof be){if(m.bodyUsed)throw new TypeError("Already read");this.url=m.url,this.credentials=m.credentials,E.headers||(this.headers=new x(m.headers)),this.method=m.method,this.mode=m.mode,this.signal=m.signal,!O&&m._bodyInit!=null&&(O=m._bodyInit,m.bodyUsed=!0)}else this.url=String(m);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new x(E.headers)),this.method=oe(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&O)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(O),(this.method==="GET"||this.method==="HEAD")&&(E.cache==="no-store"||E.cache==="no-cache")){var P=/([?&])_=[^&]*/;if(P.test(this.url))this.url=this.url.replace(P,"$1_="+new Date().getTime());else{var I=/\?/;this.url+=(I.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}be.prototype.clone=function(){return new be(this,{body:this._bodyInit})};function xe(m){var E=new FormData;return m.trim().split("&").forEach(function(O){if(O){var P=O.split("="),I=P.shift().replace(/\+/g," "),_=P.join("=").replace(/\+/g," ");E.append(decodeURIComponent(I),decodeURIComponent(_))}}),E}function b(m){var E=new x,O=m.replace(/\r?\n[\t ]+/g," ");return O.split("\r").map(function(P){return P.indexOf(`
79
79
  `)===0?P.substr(1,P.length):P}).forEach(function(P){var I=P.split(":"),_=I.shift().trim();if(_){var K=I.join(":").trim();E.append(_,K)}}),E}ie.call(be.prototype);function N(m,E){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.ok=this.status>=200&&this.status<300,this.statusText=E.statusText===void 0?"":""+E.statusText,this.headers=new x(E.headers),this.url=E.url||"",this._initBody(m)}ie.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new x(this.headers),url:this.url})},N.error=function(){var m=new N(null,{status:0,statusText:""});return m.type="error",m};var A=[301,302,303,307,308];N.redirect=function(m,E){if(A.indexOf(E)===-1)throw new RangeError("Invalid status code");return new N(null,{status:E,headers:{location:m}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(E,O){this.message=E,this.name=O;var P=Error(E);this.stack=P.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function R(m,E){return new Promise(function(O,P){var I=new be(m,E);if(I.signal&&I.signal.aborted)return P(new o.DOMException("Aborted","AbortError"));var _=new XMLHttpRequest;function K(){_.abort()}_.onload=function(){var z={status:_.status,statusText:_.statusText,headers:b(_.getAllResponseHeaders()||"")};z.url="responseURL"in _?_.responseURL:z.headers.get("X-Request-URL");var J="response"in _?_.response:_.responseText;setTimeout(function(){O(new N(J,z))},0)},_.onerror=function(){setTimeout(function(){P(new TypeError("Network request failed"))},0)},_.ontimeout=function(){setTimeout(function(){P(new TypeError("Network request failed"))},0)},_.onabort=function(){setTimeout(function(){P(new o.DOMException("Aborted","AbortError"))},0)};function W(z){try{return z===""&&a.location.href?a.location.href:z}catch{return z}}_.open(I.method,W(I.url),!0),I.credentials==="include"?_.withCredentials=!0:I.credentials==="omit"&&(_.withCredentials=!1),"responseType"in _&&(u.blob?_.responseType="blob":u.arrayBuffer&&I.headers.get("Content-Type")&&I.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(_.responseType="arraybuffer")),E&&typeof E.headers=="object"&&!(E.headers instanceof x)?Object.getOwnPropertyNames(E.headers).forEach(function(z){_.setRequestHeader(z,p(E.headers[z]))}):I.headers.forEach(function(z,J){_.setRequestHeader(J,z)}),I.signal&&(I.signal.addEventListener("abort",K),_.onreadystatechange=function(){_.readyState===4&&I.signal.removeEventListener("abort",K)}),_.send(typeof I._bodyInit>"u"?null:I._bodyInit)})}return R.polyfill=!0,a.fetch||(a.fetch=R,a.Headers=x,a.Request=be,a.Response=N),o.Headers=x,o.Request=be,o.Response=N,o.fetch=R,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var s=t.fetch?t:r;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,n.exports=e}(Ns,Ns.exports)),Ns.exports}var bu=t1();const r1=wu({__proto__:null,default:Bs(bu)},[bu]);se.Editor=Ll,se.Form=Pl,se.Menu=Kp,se.Provider=Mi,se.Table=Gp,se.Upload=kl,se.dialog=Wp,se.i18n=Qm,se.misc=e1,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainte/ant",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"