remons-render-markdown 1.0.28-beta.13 → 1.0.28-beta.14

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.
@@ -18,6 +18,11 @@ interface UseIncrementalRenderOptions {
18
18
  * 用于清理挂在被移除节点上的 React Root、监听器等状态。
19
19
  */
20
20
  onNodeDiscarded?: (el: HTMLElement) => void;
21
+ /**
22
+ * 每次 DOM patch 完成后同步触发(浏览器绘制前)。
23
+ * 用于恢复被 diff 丢弃的运行时标记(如代码块工具栏的动态 class / 语言标签)。
24
+ */
25
+ onPatched?: () => void;
21
26
  }
22
27
  /**
23
28
  * 增量渲染 hook,使用 morphdom 进行部分 DOM 更新。
@@ -30,7 +35,7 @@ interface UseIncrementalRenderOptions {
30
35
  * - 保留节点上 JS 添加的 data-* 属性(初始化守卫位),避免 patch 后被重复初始化
31
36
  * - 返回 inner 内容 <div> 的 ref 回调
32
37
  */
33
- export declare function useIncrementalRender({ content, codeType, customRenderers, throttleMs, onNodeDiscarded, }: UseIncrementalRenderOptions): {
38
+ export declare function useIncrementalRender({ content, codeType, customRenderers, throttleMs, onNodeDiscarded, onPatched, }: UseIncrementalRenderOptions): {
34
39
  anchors: AnchorItem[];
35
40
  hasContent: boolean;
36
41
  setInnerRef: (node: HTMLDivElement | null) => void;
package/dist/index.mjs CHANGED
@@ -1,18 +1,18 @@
1
- import e,{createContext as t,forwardRef as n,useCallback as i,useContext as r,useEffect as o,useMemo as a,useRef as s,useState as l}from"react";import{CaretDownOutlined as c,CaretRightOutlined as d,CheckCircleOutlined as u,CloseCircleOutlined as h,CloseOutlined as p,CodeOutlined as m,CopyFilled as f,DownOutlined as v,DownloadOutlined as g,DragOutlined as w,ExportOutlined as b,FullscreenExitOutlined as y,FullscreenOutlined as k,ImportOutlined as x,InfoCircleOutlined as S,LoadingOutlined as C,MinusOutlined as _,PlusOutlined as E,ReloadOutlined as T,RightOutlined as A,SearchOutlined as M,UnorderedListOutlined as O,UpOutlined as L,WarningOutlined as I}from"@ant-design/icons";import{createRoot as N}from"react-dom/client";import{Fragment as P,jsx as z,jsxs as $}from"react/jsx-runtime";import j from"markdown-it";import D from"highlight.js/lib/core";import R from"highlight.js/lib/languages/javascript";import B from"highlight.js/lib/languages/typescript";import H from"highlight.js/lib/languages/css";import F from"highlight.js/lib/languages/json";import q from"highlight.js/lib/languages/bash";import W from"highlight.js/lib/languages/xml";import X from"highlight.js/lib/languages/plaintext";import{createPortal as Y}from"react-dom";var U=Object.defineProperty,V=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),G=(e,t)=>{let n={};for(var i in e)U(n,i,{get:e[i],enumerable:!0});return t||U(n,Symbol.toStringTag,{value:"Module"}),n},Z={exports:{}};!function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,n.call(this,r)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return this&&this[n]||n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var o in n)e.call(n,o)&&n[o]&&(r=i(r,this&&this[o]||o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}void 0!==Z&&Z.exports?(t.default=t,Z.exports=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return t}):window.classNames=t}();var K=(null==Z.exports?{}:Z.exports).default||Z.exports,J={container:"_container_1a6ji_4",item:"_item_1a6ji_16",toast:"_toast_1a6ji_19",fadeIn:"_fadeIn_1a6ji_1","toast-warning":"_toast-warning_1a6ji_31","toast-info":"_toast-info_1a6ji_34","toast-error":"_toast-error_1a6ji_37","toast-success":"_toast-success_1a6ji_40"},Q=K.bind(J),ee={warning:/* @__PURE__ */z(I,{style:{color:"#faad14",fontSize:"16px"}}),info:/* @__PURE__ */z(S,{style:{color:"#1890ff",fontSize:"16px"}}),error:/* @__PURE__ */z(h,{style:{color:"#ff4d4f",fontSize:"16px"}}),success:/* @__PURE__ */z(u,{style:{color:"#52c41a",fontSize:"16px"}})},te=({config:e})=>/* @__PURE__ */$("div",{className:Q("toast",`toast-${e.type}`),children:[ee[e.type],/* @__PURE__ */z("span",{children:e.content})]}),ne=()=>{const[e,t]=l([]),n=s(/* @__PURE__ */new Map);return o(()=>{const e=e=>{const{type:i,content:r,duration:o=3e3}=e.detail,a=`message-${Date.now()}-${Math.random()}`,s={key:a,content:r,type:i,duration:o};t(e=>[...e,s]);const l=window.setTimeout(()=>{(e=>{t(t=>t.filter(t=>t.key!==e));const i=n.current.get(e);i&&(clearTimeout(i),n.current.delete(e))})(a)},o);n.current.set(a,l)},i=()=>{t([]),n.current.forEach(e=>clearTimeout(e)),n.current.clear()};return window.addEventListener("custom-message",e),window.addEventListener("custom-message-clear",i),()=>{window.removeEventListener("custom-message",e),window.removeEventListener("custom-message-clear",i),n.current.forEach(e=>clearTimeout(e))}},[]),/* @__PURE__ */z("div",{className:Q("container"),children:e.map(e=>/* @__PURE__ */z("div",{className:Q("item"),children:/* @__PURE__ */z(te,{config:e})},e.key))})},ie=!1,re={dispatch:(e,t,n)=>{(()=>{if(ie)return;ie=!0;const e=document.createElement("div");e.id="custom-message-container",document.body.appendChild(e),N(e).render(/* @__PURE__ */z(ne,{}))})(),requestAnimationFrame(()=>{window.dispatchEvent(new CustomEvent("custom-message",{detail:{type:e,content:t,duration:n}}))})},warning:(e,t)=>re.dispatch("warning",e,t),info:(e,t)=>re.dispatch("info",e,t),error:(e,t)=>re.dispatch("error",e,t),success:(e,t)=>re.dispatch("success",e,t),destroy:()=>{window.dispatchEvent(new Event("custom-message-clear"))}},oe=K.bind({"back-top":"_back-top_gdg5d_4"});function ae(e){return e.current||window}var se=({target:e,visibilityHeight:t=300})=>{const[n,i]=l(!1),r=s(null);o(()=>{if(e)try{r.current=e()}catch{r.current=null}},[e]),o(()=>{const e=ae(r),n=()=>{i(function(e){return e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop}(e)>t)};return e.addEventListener("scroll",n,{passive:!0}),n(),()=>{e.removeEventListener("scroll",n)}},[t]);return n?/* @__PURE__ */z("div",{className:`${oe("back-top")} remons-markdown-circle`,onClick:()=>{ae(r).scrollTo({top:0,behavior:"smooth"})},children:/* @__PURE__ */z(L,{})}):null},le="_empty_container_1qt26_1",ce="_description_1qt26_10";function de({description:e="暂无数据"}){/* @__PURE__ */
2
- return $("div",{className:le,children:[/* @__PURE__ */$("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",children:[
3
- /* @__PURE__ */z("rect",{x:"8",y:"16",width:"48",height:"36",rx:"4",stroke:"#d9d9d9",strokeWidth:"2"}),
4
- /* @__PURE__ */z("line",{x1:"16",y1:"28",x2:"48",y2:"28",stroke:"#d9d9d9",strokeWidth:"2"}),
5
- /* @__PURE__ */z("line",{x1:"16",y1:"36",x2:"40",y2:"36",stroke:"#d9d9d9",strokeWidth:"2"}),
6
- /* @__PURE__ */z("line",{x1:"16",y1:"44",x2:"32",y2:"44",stroke:"#d9d9d9",strokeWidth:"2"})]}),/* @__PURE__ */z("span",{className:ce,children:e})]})}var ue={exports:{}};!function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,n(r)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var o in n)e.call(n,o)&&n[o]&&(r=i(r,o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}void 0!==ue&&ue.exports?(t.default=t,ue.exports=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return t}):window.classNames=t}();var he=(null==ue.exports?{}:ue.exports).default||ue.exports,pe={tocSidebar:"_tocSidebar_ygxtc_1",tocHeader:"_tocHeader_ygxtc_17",tocTitle:"_tocTitle_ygxtc_24",tocActions:"_tocActions_ygxtc_29",tocSearchBar:"_tocSearchBar_ygxtc_38",tocSearchInput:"_tocSearchInput_ygxtc_45",tocSearchClear:"_tocSearchClear_ygxtc_63",tocSearchExit:"_tocSearchExit_ygxtc_75",tocBody:"_tocBody_ygxtc_88",tocItem:"_tocItem_ygxtc_94",tocItemTitle:"_tocItemTitle_ygxtc_94",active:"_active_ygxtc_104",tocLink:"_tocLink_ygxtc_107",tocExpandIcon:"_tocExpandIcon_ygxtc_111",tocChildren:"_tocChildren_ygxtc_138",highlight:"_highlight_ygxtc_141",tocEmpty:"_tocEmpty_ygxtc_145"};function me({item:e,depth:t=0,activeId:n,searchText:i}){const[r,a]=l(!0),c=e.children&&e.children.length>0,d=e.href===n,u=s(null),h=c?ve(e.children,i):[];if(i&&!h.length&&!fe(e.title,i))return null;o(()=>{n&&c&&e.children.some(e=>e.href===n)&&a(!0)},[n,c,e.children]);/* @__PURE__ */
7
- return $("div",{className:pe.tocItem,ref:u,style:{paddingLeft:14},children:[/* @__PURE__ */$("div",{className:`${pe.tocItemTitle}${d?` ${pe.active}`:""}`,children:[c&&/* @__PURE__ */z("span",{className:pe.tocExpandIcon,onClick:e=>{e.stopPropagation(),a(!r)},children:/* @__PURE__ */z(r?v:A,{})}),/* @__PURE__ */z("a",{className:pe.tocLink,href:`#${e.href}`,onClick:t=>{t.preventDefault();const n=e.href,i=document.getElementById(n);i&&(history.pushState(null,"",`#${n}`),i.scrollIntoView({behavior:"smooth",block:"start"}))},children:(e=>{if(!i)return e;const t=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(i),n=new RegExp(`(${t})`,"gi");return e.split(n).map((e,t)=>e.toLowerCase().includes(i.toLowerCase())?/* @__PURE__ */z("span",{className:pe.highlight,children:e},t):e)})(e.title)})]}),c&&r&&/* @__PURE__ */z("div",{className:pe.tocChildren,children:i?h.map((e,r)=>/* @__PURE__ */z(me,{item:e,depth:t+1,activeId:n,searchText:i},e.href||r)):e.children.map((e,r)=>/* @__PURE__ */z(me,{item:e,depth:t+1,activeId:n,searchText:i},e.href||r))})]})}function fe(e,t){return!t||e.toLowerCase().includes(t.toLowerCase())}function ve(e,t){return t?e.map(e=>{const n=ve(e.children,t),i=fe(e.title,t);return i||n.length>0?{...e,children:i?e.children:n}:null}).filter(Boolean):e}function ge({anchors:e,activeId:t,visible:n,onClose:i}){const r=s(null),a=s(null),c=s(null),[d,u]=l(""),[h,m]=l(!1);o(()=>{if(!t||!r.current||!n)return;const e=r.current.querySelector(`.${pe.active}`);e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})},[t,n]),o(()=>{if(!h)return;const e=e=>{c.current&&!c.current.contains(e.target)&&(m(!1),u(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);const f=()=>{u(""),m(!1)},v=ve(e,d);return e&&0!==e.length&&n?/* @__PURE__ */$("div",{className:he(pe.tocSidebar,"md-toc-sidebar"),children:[
8
- /* @__PURE__ */$("div",{className:pe.tocHeader,children:[/* @__PURE__ */z("span",{className:pe.tocTitle,children:"目录"}),/* @__PURE__ */$("div",{className:pe.tocActions,children:[!h&&/* @__PURE__ */z("span",{className:"remons-markdown-circle",onClick:()=>{m(!0),setTimeout(()=>a.current?.focus(),50)},title:"搜索",children:/* @__PURE__ */z(M,{})}),/* @__PURE__ */z("span",{className:he("remons-markdown-circle",pe.tocClose),onClick:i,children:/* @__PURE__ */z(p,{})})]})]}),h&&/* @__PURE__ */$("div",{ref:c,className:pe.tocSearchBar,children:[
9
- /* @__PURE__ */z("input",{ref:a,className:pe.tocSearchInput,type:"text",placeholder:"搜索目录…",value:d,onChange:e=>{u(e.target.value)}}),d&&/* @__PURE__ */z("span",{className:pe.tocSearchClear,onClick:f,children:/* @__PURE__ */z(p,{})}),
10
- /* @__PURE__ */z("span",{className:pe.tocSearchExit,onClick:f,title:"退出搜索",children:"×"})]}),
11
- /* @__PURE__ */z("div",{className:pe.tocBody,ref:r,children:v.length>0?v.map((e,n)=>/* @__PURE__ */z(me,{item:e,activeId:t,searchText:d},e.href||n)):d&&/* @__PURE__ */z("div",{className:pe.tocEmpty,children:"未找到匹配项"})})]}):null}var we=/* @__PURE__ */V((e,t)=>{!function(n,i){"object"==typeof e&&void 0!==t?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((n="undefined"!=typeof globalThis?globalThis:n||self).MethodsR={})}(e,function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.IsPC=function(){for(var e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],n=!0,i=0;i<t.length;i++)if(e.indexOf(t[i])>0){n=!1;break}return n},e.SUM=function(e,t){var n;return e.forEach(function(t,i){"number"!=typeof t&&"string"!=typeof t||(n="number",e[i]=Number(t))}),"number"===n?e.reduce(function(e,t){return e+t}):e.reduce(function(e,n){return e+n[t]},0)},e.arrGroup=function(e,n){if("number"==typeof n){if(e instanceof Array){for(var i=[],r=0,o=e.length;r<o;r+=n)i.push(e.slice(r,r+n));return i}var a=t(e);return console.error("The expected array, get"+a),e}console.error("The second parameter should be a number")},e.compareVersion=function(e,t){for(var n=e.split("."),i=t.split("."),r=Math.max(n.length,i.length),o=0;o<r;o++){var a=+n[o],s=+i[o];if(a>s)return e;if(a<s)return t}return!1},e.copy=function(e){if("object"===t(e)){if(document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(e),n.select()}else if(window.getSelection){var i=window.getSelection(),r=document.createRange();r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r)}document.execCommand("Copy","false",null),window.getSelection().empty()}else{var o=document.createElement("textarea"),a=document.querySelector("body");o.value=e,o.setAttribute("style","z-index:-1"),a.appendChild(o),o.select(),document.execCommand("copy"),a.removeChild(o)}},e.dateFormat=function(e,t){function n(e){return e<10?"0"+e:e}var i,r=(i=e&&"number"==typeof e?new Date(e):e&&"string"==typeof e?new Date(parseInt(e)):/* @__PURE__ */new Date).getFullYear(),o=n(i.getMonth()+1),a=n(i.getDate()),s=n(i.getHours()),l=n(i.getMinutes()),c=n(i.getSeconds()),d="".concat(r,"-").concat(o,"-").concat(a," ").concat(s,":").concat(l,":").concat(c);return"yyyy/MM/dd HH:mm:ss"==t?d="".concat(r,"/").concat(o,"/").concat(a," ").concat(s,":").concat(l,":").concat(c):"yyyy/MM/dd"==t?d="".concat(r,"/").concat(o,"/").concat(a):"yyyy-MM-dd"==t?d="".concat(r,"-").concat(o,"-").concat(a):"HH:mm:ss"==t?d="".concat(s,":").concat(l,":").concat(c):"yyyy年MM月dd日 HH时mm分ss秒"==t&&(d="".concat(r,"年").concat(o,"月").concat(a,"日 ").concat(s,"时").concat(l,"分").concat(c,"秒")),d},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(n){var i=n;clearTimeout(e.id),e.id=setTimeout(function(){e.call(void 0,i)},t)}},e.deepClone=function e(t){var n=function(e){return Object.prototype.toString.call(e).slice(8,-1)};if(["Null","String","Boolean","Number","Undefined","Function"].includes(n(t)))return t;if("RegExp"===n(t))return new RegExp(t);if("Date"===n(t))return new Date(t);var i="Array"===n(t)?[]:{};for(var r in t)i[r]=e(t[r]);return i},e.download=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=document.createElement("a");if(i.setAttribute("download",n),i.setAttribute("href",e),navigator.msSaveBlob){var r=Blob([e],{type:t});return navigator.msSaveBlob(r,n)}i.click()},e.getSearchParams=function(e){var t=new URLSearchParams(decodeURI(window.location.search)),i={};return n(t.keys()).forEach(function(e){i[e]=t.get(e)}),e?t.get(e):i},e.openApp=function(e){var t=e.url,n=e.params;if(t){var i=new URLSearchParams(n);window.location=i.toString()?"".concat(t,"?").concat(i.toString()):t}else console.error("url 错误")},e.removeArrRepeat=function(e,i){if(e.length&&t("object"!==e[0]))return n(new Set(e));var r={};return e.reduce(function(e,t){return!r[t[i]]&&(r[t[i]]=e.push(t)),e},[])},e.viewImg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;if("IMG"===e.target.nodeName&&e.target.currentSrc){var t=document.createElement("div"),n=document.createElement("img");t.setAttribute("style","position: fixed;\n z-index: 2001;\n display: flex;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n background: rgb(0 0 0 / 33%);\n height: 100%;\n top: 0;"),t.setAttribute("id","remons-view-box"),n.setAttribute("src",e.target.currentSrc),n.setAttribute("style","max-height: 100%; max-weight: 100%"),n.setAttribute("id","remons-view-img"),document.body.appendChild(t),document.querySelector("#remons-view-box").appendChild(n);var i=document.querySelector("#remons-view-box");i&&i.addEventListener("click",function(){document.body.removeChild(i)})}},e.watchScroll=function(e,t){t||(t=1e3);(arguments.length>2&&void 0!==arguments[2]?arguments[2]:window).onscroll=function(e,t){var n=null;return function(){n&&clearTimeout(n),n=setTimeout(e,t)}}(e,t)},Object.defineProperty(e,"__esModule",{value:!0})})}),be=we(),ye=!1,ke={false:"push",true:"unshift",after:"push",before:"unshift"},xe={isPermalinkSymbol:!0};function Se(e,t,n,i){var r;if(!ye){var o="Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks";"object"==typeof process&&process&&process.emitWarning?process.emitWarning(o):console.warn(o),ye=!0}var a=[Object.assign(new n.Token("link_open","a",1),{attrs:[].concat(t.permalinkClass?[["class",t.permalinkClass]]:[],[["href",t.permalinkHref(e,n)]],Object.entries(t.permalinkAttrs(e,n)))}),Object.assign(new n.Token("html_block","",0),{content:t.permalinkSymbol,meta:xe}),new n.Token("link_close","a",-1)];t.permalinkSpace&&n.tokens[i+1].children[ke[t.permalinkBefore]](Object.assign(new n.Token("text","",0),{content:" "})),(r=n.tokens[i+1].children)[ke[t.permalinkBefore]].apply(r,a)}function Ce(e){return"#"+e}function _e(e){return{}}var Ee={class:"header-anchor",symbol:"#",renderHref:Ce,renderAttrs:_e};function Te(e){function t(n){return n=Object.assign({},t.defaults,n),function(t,i,r,o){return e(t,n,i,r,o)}}return t.defaults=Object.assign({},Ee),t.renderPermalinkImpl=e,t}function Ae(e){var t=[],n=e.filter(function(e){if("class"!==e[0])return!0;t.push(e[1])});return t.length>0&&n.unshift(["class",t.join(" ")]),n}var Me=Te(function(e,t,n,i,r){var o,a=[Object.assign(new i.Token("link_open","a",1),{attrs:Ae([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],t.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(t.renderAttrs(e,i))))}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:xe}),new i.Token("link_close","a",-1)];if(t.space){var s="string"==typeof t.space?t.space:" ";i.tokens[r+1].children[ke[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:s}))}(o=i.tokens[r+1].children)[ke[t.placement]].apply(o,a)});Object.assign(Me.defaults,{space:!0,placement:"after",ariaHidden:!1});var Oe=Te(Me.renderPermalinkImpl);Oe.defaults=Object.assign({},Me.defaults,{ariaHidden:!0});var Le=Te(function(e,t,n,i,r){var o=[Object.assign(new i.Token("link_open","a",1),{attrs:Ae([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],Object.entries(t.renderAttrs(e,i))))})].concat(t.safariReaderFix?[new i.Token("span_open","span",1)]:[],i.tokens[r+1].children,t.safariReaderFix?[new i.Token("span_close","span",-1)]:[],[new i.Token("link_close","a",-1)]);i.tokens[r+1].children=o});Object.assign(Le.defaults,{safariReaderFix:!1});var Ie=Te(function(e,t,n,i,r){var o;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(t.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+t.style+"`");if(!["aria-describedby","aria-labelledby"].includes(t.style)&&!t.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+t.style+"` style");if("visually-hidden"===t.style&&!t.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var a=i.tokens[r+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s=[],l=[];if(t.class&&l.push(["class",t.class]),l.push(["href",t.renderHref(e,i)]),l.push.apply(l,Object.entries(t.renderAttrs(e,i))),"visually-hidden"===t.style){if(s.push(Object.assign(new i.Token("span_open","span",1),{attrs:[["class",t.visuallyHiddenClass]]}),Object.assign(new i.Token("text","",0),{content:t.assistiveText(a)}),new i.Token("span_close","span",-1)),t.space){var c="string"==typeof t.space?t.space:" ";s[ke[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:c}))}s[ke[t.placement]](Object.assign(new i.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:xe}),new i.Token("span_close","span",-1))}else s.push(Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:xe}));"aria-label"===t.style?l.push(["aria-label",t.assistiveText(a)]):["aria-describedby","aria-labelledby"].includes(t.style)&&l.push([t.style,e]);var d=[Object.assign(new i.Token("link_open","a",1),{attrs:Ae(l)})].concat(s,[new i.Token("link_close","a",-1)]);(o=i.tokens).splice.apply(o,[r+3,0].concat(d)),t.wrapper&&(i.tokens.splice(r,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[0]+"\n"})),i.tokens.splice(r+3+d.length+1,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[1]+"\n"})))});function Ne(e,t,n,i){var r=e,o=i;if(n&&Object.prototype.hasOwnProperty.call(t,r))throw new Error("User defined `id` attribute `"+e+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(t,r);)r=e+"-"+o,o+=1;return t[r]=!0,r}function Pe(e,t){t=Object.assign({},Pe.defaults,t),e.core.ruler.push("anchor",function(e){for(var n,i={},r=e.tokens,o=Array.isArray(t.level)?(n=t.level,function(e){return n.includes(e)}):function(e){return function(t){return t>=e}}(t.level),a=0;a<r.length;a++){var s=r[a];if("heading_open"===s.type&&o(Number(s.tag.substr(1)))){var l=t.getTokensText(r[a+1].children),c=s.attrGet("id");c=null==c?Ne(c=t.slugifyWithState?t.slugifyWithState(l,e):t.slugify(l),i,!1,t.uniqueSlugStartIndex):Ne(c,i,!0,t.uniqueSlugStartIndex),s.attrSet("id",c),!1!==t.tabIndex&&s.attrSet("tabindex",""+t.tabIndex),"function"==typeof t.permalink?t.permalink(c,t,e,a):(t.permalink||t.renderPermalink&&t.renderPermalink!==Se)&&t.renderPermalink(c,t,e,a),a=r.indexOf(s),t.callback&&t.callback(s,{slug:c,title:l})}}})}function ze(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))}function $e(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function je(e,t){var n;t=Object.assign({},{placeholder:"(\\$\\{toc\\}|\\[\\[?_?toc_?\\]?\\]|\\$\\<toc(\\{[^}]*\\})\\>)",slugify:ze,uniqueSlugStartIndex:1,containerClass:"table-of-contents",containerId:void 0,listClass:void 0,itemClass:void 0,linkClass:void 0,level:1,listType:"ol",format:void 0,callback:void 0},t);var i=new RegExp("^"+t.placeholder+"$","i");e.renderer.rules.tocOpen=function(e,n){var i=Object.assign({},t);return e&&n>=0&&(i=Object.assign(i,e[n].inlineOptions)),"<nav"+(i.containerId?' id="'+$e(i.containerId)+'"':"")+' class="'+$e(i.containerClass)+'">'},e.renderer.rules.tocClose=function(){return"</nav>"},e.renderer.rules.tocBody=function(e,i){var r=Object.assign({},t);e&&i>=0&&(r=Object.assign(r,e[i].inlineOptions));var o,a={},s=Array.isArray(r.level)?(o=r.level,function(e){return o.includes(e)}):function(e){return function(t){return t>=e}}(r.level);return function e(n){var i=r.listClass?' class="'+$e(r.listClass)+'"':"",o=r.itemClass?' class="'+$e(r.itemClass)+'"':"",l=r.linkClass?' class="'+$e(r.linkClass)+'"':"";if(0===n.c.length)return"";var c="";return(0===n.l||s(n.l))&&(c+="<"+($e(r.listType)+i)+">"),n.c.forEach(function(n){s(n.l)?c+="<li"+o+"><a"+l+' href="#'+function(e){for(var t=e,n=r.uniqueSlugStartIndex;Object.prototype.hasOwnProperty.call(a,t);)t=e+"-"+n++;return a[t]=!0,t}(t.slugify(n.n))+'">'+("function"==typeof r.format?r.format(n.n,$e):$e(n.n))+"</a>"+e(n)+"</li>":c+=e(n)}),(0===n.l||s(n.l))&&(c+="</"+$e(r.listType)+">"),c}(n)},e.core.ruler.push("generateTocAst",function(i){n=function(e){for(var t={l:0,n:"",c:[]},n=[t],i=0,r=e.length;i<r;i++){var o=e[i];if("heading_open"===o.type){var a=e[i+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s={l:parseInt(o.tag.substr(1),10),n:a,c:[]};if(s.l>n[0].l)n[0].c.push(s),n.unshift(s);else if(s.l===n[0].l)n[1].c.push(s),n[0]=s;else{for(;s.l<=n[0].l;)n.shift();n[0].c.push(s),n.unshift(s)}}}return t}(i.tokens),"function"==typeof t.callback&&t.callback(e.renderer.rules.tocOpen()+e.renderer.rules.tocBody()+e.renderer.rules.tocClose(),n)}),e.block.ruler.before("heading","toc",function(e,t,n,r){var o,a=e.src.slice(e.bMarks[t]+e.tShift[t],e.eMarks[t]).split(" ")[0];if(!i.test(a))return!1;if(r)return!0;var s=i.exec(a),l={};if(null!==s&&3===s.length)try{l=JSON.parse(s[2])}catch(e){}return e.line=t+1,(o=e.push("tocOpen","nav",1)).markup="",o.map=[t,e.line],o.inlineOptions=l,(o=e.push("tocBody","",0)).markup="",o.map=[t,e.line],o.inlineOptions=l,o.children=[],(o=e.push("tocClose","nav",-1)).markup="",!0},{alt:["paragraph","reference","blockquote"]})}Object.assign(Ie.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),Pe.permalink={__proto__:null,legacy:Se,renderHref:Ce,renderAttrs:_e,makePermalink:Te,linkInsideHeader:Me,ariaHidden:Oe,headerLink:Le,linkAfterHeader:Ie},Pe.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(e){return e.filter(function(e){return["text","code_inline"].includes(e.type)}).map(function(e){return e.content}).join("")},permalink:!1,renderPermalink:Se,permalinkClass:Oe.defaults.class,permalinkSpace:Oe.defaults.space,permalinkSymbol:"¶",permalinkBefore:"before"===Oe.defaults.placement,permalinkHref:Oe.defaults.renderHref,permalinkAttrs:Oe.defaults.renderAttrs},Pe.default=Pe;var De={exports:{}};function Re(e,t){t=t?Array.isArray(t)?t:[t]:[],Object.freeze(t);var n=e.renderer.rules.link_open||this.defaultRender;e.renderer.rules.link_open=function(e,i,r,o,a){var s=function(e,t){var n,i,r=e.attrs[e.attrIndex("href")][1];for(n=0;n<t.length;++n){if("function"!=typeof(i=t[n]).matcher)return i;if(i.matcher(r,i))return i}}(e[i],t),l=s&&s.attrs;return l&&function(e,t,n){Object.keys(n).forEach(function(i){var r,o=n[i];"className"===i&&(i="class"),(r=t[e].attrIndex(i))<0?t[e].attrPush([i,o]):t[e].attrs[r][1]=o})}(i,e,l),n(e,i,r,o,a)}}Re.defaultRender=function(e,t,n,i,r){return r.renderToken(e,t,n)},De.exports=Re;var Be=(null==De.exports?{}:De.exports).default||De.exports,He={exports:{}},Fe=He.exports,qe="__lodash_hash_undefined__",We=9007199254740991,Xe="[object Arguments]",Ye="[object Boolean]",Ue="[object Date]",Ve="[object Function]",Ge="[object GeneratorFunction]",Ze="[object Map]",Ke="[object Number]",Je="[object Object]",Qe="[object Promise]",et="[object RegExp]",tt="[object Set]",nt="[object String]",it="[object Symbol]",rt="[object WeakMap]",ot="[object ArrayBuffer]",at="[object DataView]",st="[object Float32Array]",lt="[object Float64Array]",ct="[object Int8Array]",dt="[object Int16Array]",ut="[object Int32Array]",ht="[object Uint8Array]",pt="[object Uint8ClampedArray]",mt="[object Uint16Array]",ft="[object Uint32Array]",vt=/\w*$/,gt=/^\[object .+?Constructor\]$/,wt=/^(?:0|[1-9]\d*)$/,bt={};bt[Xe]=bt["[object Array]"]=bt[ot]=bt[at]=bt[Ye]=bt[Ue]=bt[st]=bt[lt]=bt[ct]=bt[dt]=bt[ut]=bt[Ze]=bt[Ke]=bt[Je]=bt[et]=bt[tt]=bt[nt]=bt[it]=bt[ht]=bt[pt]=bt[mt]=bt[ft]=!0,bt["[object Error]"]=bt[Ve]=bt[rt]=!1;var yt="object"==typeof global&&global&&global.Object===Object&&global||"object"==typeof self&&self&&self.Object===Object&&self||Function("return this")(),kt="object"==typeof Fe&&Fe&&!Fe.nodeType&&Fe,xt=kt&&"object"==typeof He&&He&&!He.nodeType&&He,St=xt&&xt.exports===kt;function Ct(e,t){return e.set(t[0],t[1]),e}function _t(e,t){return e.add(t),e}function Et(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function Tt(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(Xr){}return t}function At(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function Mt(e,t){return function(n){return e(t(n))}}function Ot(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Lt,It=Array.prototype,Nt=Function.prototype,Pt=Object.prototype,zt=yt["__core-js_shared__"],$t=(Lt=/[^.]+$/.exec(zt&&zt.keys&&zt.keys.IE_PROTO||""))?"Symbol(src)_1."+Lt:"",jt=Nt.toString,Dt=Pt.hasOwnProperty,Rt=Pt.toString,Bt=RegExp("^"+jt.call(Dt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=St?yt.Buffer:void 0,Ft=yt.Symbol,qt=yt.Uint8Array,Wt=Mt(Object.getPrototypeOf,Object),Xt=Object.create,Yt=Pt.propertyIsEnumerable,Ut=It.splice,Vt=Object.getOwnPropertySymbols,Gt=Ht?Ht.isBuffer:void 0,Zt=Mt(Object.keys,Object),Kt=Sn(yt,"DataView"),Jt=Sn(yt,"Map"),Qt=Sn(yt,"Promise"),en=Sn(yt,"Set"),tn=Sn(yt,"WeakMap"),nn=Sn(Object,"create"),rn=An(Kt),on=An(Jt),an=An(Qt),sn=An(en),ln=An(tn),cn=Ft?Ft.prototype:void 0,dn=cn?cn.valueOf:void 0;function un(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function hn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function pn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function mn(e){this.__data__=new hn(e)}function fn(e,t){var n=On(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ln(e)}(e)&&Dt.call(e,"callee")&&(!Yt.call(e,"callee")||Rt.call(e)==Xe)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var o in e)!t&&!Dt.call(e,o)||r&&("length"==o||En(o,i))||n.push(o);return n}function vn(e,t,n){var i=e[t];Dt.call(e,t)&&Mn(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function gn(e,t){for(var n=e.length;n--;)if(Mn(e[n][0],t))return n;return-1}function wn(e,t,n,i,r,o,a){var s;if(i&&(s=o?i(e,r,o,a):i(e)),void 0!==s)return s;if(!Pn(e))return e;var l=On(e);if(l){if(s=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&Dt.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,s)}else{var c=_n(e),d=c==Ve||c==Ge;if(In(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(c==Je||c==Xe||d&&!o){if(Tt(e))return o?e:{};if(s=function(e){return"function"!=typeof e.constructor||Tn(e)?{}:(t=Wt(e),Pn(t)?Xt(t):{});var t}(d?{}:e),!t)return function(e,t){return kn(e,Cn(e),t)}(e,function(e,t){return e&&kn(t,zn(t),e)}(s,e))}else{if(!bt[c])return o?e:{};s=function(e,t,n,i){var r=e.constructor;switch(t){case ot:return yn(e);case Ye:case Ue:return new r(+e);case at:return function(e,t){var n=t?yn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case st:case lt:case ct:case dt:case ut:case ht:case pt:case mt:case ft:return function(e,t){var n=t?yn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case Ze:return function(e,t,n){return Et(t?n(At(e),!0):At(e),Ct,new e.constructor)}(e,i,n);case Ke:case nt:return new r(e);case et:return function(e){var t=new e.constructor(e.source,vt.exec(e));return t.lastIndex=e.lastIndex,t}(e);case tt:return function(e,t,n){return Et(t?n(Ot(e),!0):Ot(e),_t,new e.constructor)}(e,i,n);case it:return o=e,dn?Object(dn.call(o)):{}}var o}(e,c,wn,t)}}a||(a=new mn);var u=a.get(e);if(u)return u;if(a.set(e,s),!l)var h=n?function(e){return function(e,t,n){var i=t(e);return On(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,zn,Cn)}(e):zn(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(h||e,function(r,o){h&&(r=e[o=r]),vn(s,o,wn(r,t,n,i,o,e,a))}),s}function bn(e){return!(!Pn(e)||(t=e,$t&&$t in t))&&(Nn(e)||Tt(e)?Bt:gt).test(An(e));var t}function yn(e){var t=new e.constructor(e.byteLength);return new qt(t).set(new qt(e)),t}function kn(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;vn(n,a,void 0===s?e[a]:s)}return n}function xn(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function Sn(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return bn(n)?n:void 0}un.prototype.clear=function(){this.__data__=nn?nn(null):{}},un.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},un.prototype.get=function(e){var t=this.__data__;if(nn){var n=t[e];return n===qe?void 0:n}return Dt.call(t,e)?t[e]:void 0},un.prototype.has=function(e){var t=this.__data__;return nn?void 0!==t[e]:Dt.call(t,e)},un.prototype.set=function(e,t){return this.__data__[e]=nn&&void 0===t?qe:t,this},hn.prototype.clear=function(){this.__data__=[]},hn.prototype.delete=function(e){var t=this.__data__,n=gn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Ut.call(t,n,1),!0)},hn.prototype.get=function(e){var t=this.__data__,n=gn(t,e);return n<0?void 0:t[n][1]},hn.prototype.has=function(e){return gn(this.__data__,e)>-1},hn.prototype.set=function(e,t){var n=this.__data__,i=gn(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},pn.prototype.clear=function(){this.__data__={hash:new un,map:new(Jt||hn),string:new un}},pn.prototype.delete=function(e){return xn(this,e).delete(e)},pn.prototype.get=function(e){return xn(this,e).get(e)},pn.prototype.has=function(e){return xn(this,e).has(e)},pn.prototype.set=function(e,t){return xn(this,e).set(e,t),this},mn.prototype.clear=function(){this.__data__=new hn},mn.prototype.delete=function(e){return this.__data__.delete(e)},mn.prototype.get=function(e){return this.__data__.get(e)},mn.prototype.has=function(e){return this.__data__.has(e)},mn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof hn){var i=n.__data__;if(!Jt||i.length<199)return i.push([e,t]),this;n=this.__data__=new pn(i)}return n.set(e,t),this};var Cn=Vt?Mt(Vt,Object):function(){return[]},_n=function(e){return Rt.call(e)};function En(e,t){return!!(t=null==t?We:t)&&("number"==typeof e||wt.test(e))&&e>-1&&e%1==0&&e<t}function Tn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pt)}function An(e){if(null!=e){try{return jt.call(e)}catch(Xr){}try{return e+""}catch(Xr){}}return""}function Mn(e,t){return e===t||e!=e&&t!=t}(Kt&&_n(new Kt(/* @__PURE__ */new ArrayBuffer(1)))!=at||Jt&&_n(new Jt)!=Ze||Qt&&_n(Qt.resolve())!=Qe||en&&_n(new en)!=tt||tn&&_n(new tn)!=rt)&&(_n=function(e){var t=Rt.call(e),n=t==Je?e.constructor:void 0,i=n?An(n):void 0;if(i)switch(i){case rn:return at;case on:return Ze;case an:return Qe;case sn:return tt;case ln:return rt}return t});var On=Array.isArray;function Ln(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=We}(e.length)&&!Nn(e)}var In=Gt||function(){return!1};function Nn(e){var t=Pn(e)?Rt.call(e):"";return t==Ve||t==Ge}function Pn(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function zn(e){return Ln(e)?fn(e):function(e){if(!Tn(e))return Zt(e);var t=[];for(var n in Object(e))Dt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}He.exports=function(e){return wn(e,!0,!0)};var $n=(null==He.exports?{}:He.exports).default||He.exports,jn=(String.raw`\$&`,e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")),Dn="@tab",Rn=`${Dn}:active`,Bn=Rn.length,Hn=Symbol("tab:name"),Fn=Symbol("tab:level"),qn=(e,t,n)=>{if(64!==e.src.charCodeAt(t))return!1;let i=1;for(;i<Bn&&Rn.charCodeAt(i)===e.src.charCodeAt(t+i);i++);let r=i===Bn;if(!r&&4!==i)return!1;let o=t+i,a=e.skipSpaces(o);return a>o&&a<n&&{isActive:r,pos:a}},Wn=(e,t)=>{let{name:n="tabs",openRenderer:i=t=>{let{active:i,data:r,id:o}=t,a=r.map(({title:t,id:r},o)=>`<button type="button" class="${n}-tab-button${i===o?" active":""}" data-tab="${o}"${r?` data-id="${jn(r)}"`:""}${i===o?" data-active":""}>${e.renderInline(t)}</button>`);return`<div class="${n}-tabs-wrapper"${o?` data-id="${e.utils.escapeHtml(o)}"`:""}>\n <div class="${n}-tabs-header">\n ${a.join("\n ")}\n </div>\n <div class="${n}-tabs-container">\n`},closeRenderer:r=()=>" </div>\n</div>\n",tabOpenRenderer:o=t=>{let{index:i,id:r,isActive:o}=t;return`<div class="${n}-tab-content${o?" active":""}" data-index="${i}"${r?` data-id="${e.utils.escapeHtml(r)}"`:""}${o?' data-active=""':""}>\n`},tabCloseRenderer:a=()=>"</div>\n"}=t??{},s=(e=>t=>{let n=t.tokens;for(let i=0;i<n.length;i++){let t=n[i];if(t.type!==`${e}_tabs_open`)continue;let r=[],o=-1,a=!1,s=0,{level:l}=t;for(let d=i+1;d<n.length;d++){let t=n[d],i=t.meta,c=t.type;if(c!==`${e}_tabs_open`)if(c!==`${e}_tabs_close`)t.level>l+1||s>0?a||(t.type=`${e}_tabs_empty`,t.hidden=!0):c!==`${e}_tab_open`?c!==`${e}_tab_close`&&(t.type=`${e}_tabs_empty`,t.hidden=!0):(a=!0,i.index=r.length,i.active&&(-1===o?o=r.length:i.active=!1),r.push({title:t.info,index:r.length,id:i.id,isActive:i.active}));else{if(t.level===l)break;s--}else s++}let c=t.meta;c.tabsData={active:o,data:r,id:c.id}}})(n);e.block.ruler.before("fence",`${n}_tabs`,(e=>(t,n,i,r)=>{let o=t.bMarks[n]+t.tShift[n];if(58!==t.src.charCodeAt(o))return!1;let a=t.eMarks[n],s=o+1;for(;s<=a&&58===t.src.charCodeAt(s);)s++;let l=s-o;if(l<3)return!1;s=t.skipSpaces(s);for(let S=0;S<e.length;S++){if(t.src.charCodeAt(s)!==e.charCodeAt(S))return!1;s++}let c,d=0;for(;s!==a;){if(c=t.src.charCodeAt(s++),35===c){d=s;break}if(!t.md.utils.isSpace(c))return!1}if(r)return!0;let u=t.sCount[n],h=n+1,p=!1;for(;h<i;h++){let e=t.bMarks[h]+t.tShift[h],n=t.eMarks[h];if(e<n&&t.sCount[h]<u)break;if(t.sCount[h]===u&&58===t.src.charCodeAt(e)){for(s=e+1;s<=n&&58===t.src.charCodeAt(s);s++);if(s-e>=l&&(s=t.skipSpaces(s),s>=n)){p=!0;break}}}let m=t.parentType,f=t.lineMax,v=t.blkIndent,g=t.env[Hn],w=t.env[Fn];t.parentType=`${e}_tabs`,t.lineMax=h-+!!p,t.blkIndent=u;let b=":".repeat(l),y="";if(d){d=t.skipSpaces(d);let e=t.skipSpacesBack(a,d);d<e&&(y=t.src.slice(d,e))}let k=t.push(`${e}_tabs_open`,"",1);k.markup=b,k.block=!0,k.info=e,k.meta=y?{id:y}:{},k.map=[n,h-+!!p],t.env[Hn]=e,t.env[Fn]=t.level,t.md.block.tokenize(t,n+1,h-+!!p),t.env[Hn]=g,t.env[Fn]=w;let x=t.push(`${e}_tabs_close`,"",-1);return x.markup=b,x.block=!0,t.parentType=m,t.lineMax=f,t.blkIndent=v,t.line=h+ +!!p,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph",`${n}_tab`,(e=>(t,n,i,r)=>{if(t.env[Hn]!==e||t.level!==t.env[Fn])return!1;let o=t.bMarks[n]+t.tShift[n],a=t.eMarks[n],s=qn(t,o,a);if(!1===s)return!1;if(r)return!0;let l=t.sCount[n],c=n+1,d=!1;for(;c<i;c++){let e=t.bMarks[c]+t.tShift[c];if(t.sCount[c]===l&&"@"===t.src[e]&&qn(t,e,t.eMarks[c])){d=!0;break}}let u=t.parentType,h=t.lineMax,p=t.blkIndent;t.parentType="tab",t.lineMax=c-+!!d,t.blkIndent=l;let m,f=t.push(`${e}_tab_open`,"",1),v=s.pos,g=t.skipSpacesBack(a,v),w=g;for(;w>v;){if(35===t.src.charCodeAt(w)){for(m=w-1;92===t.src.charCodeAt(m);)m--;if((w-m)%2==1)break}w--}let b,y="";w===v?b=t.src.slice(v,g):(y=t.src.slice(t.skipSpaces(w+1),g),b=t.src.slice(v,t.skipSpacesBack(w,v))),f.block=!0,f.markup=Dn,f.info=b,f.meta={active:s.isActive},y&&(f.meta.id=y),f.map=[n,c-+!!d],t.md.block.tokenize(t,n+1,c+ +!d);let k=t.push(`${e}_tab_close`,"",-1);return k.block=!0,k.markup="",t.parentType=u,t.lineMax=h,t.blkIndent=p,t.line=c+ +!d,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.core.ruler.push(`${n}_tabs_core`,s),e.renderer.rules[`${n}_tabs_open`]=(e,t,n,r,o)=>{let a=e[t].meta;return i(a.tabsData??{active:-1,data:[],id:a.id},e,t,n,r,o)},e.renderer.rules[`${n}_tabs_close`]=r,e.renderer.rules[`${n}_tab_open`]=(e,t,n,i,r)=>{let a=((e,t)=>{let n=e[t],i=n.meta;return{title:n.info,index:i.index,id:i.id,isActive:i.active}})(e,t);return o(a,e,t,n,i,r)},e.renderer.rules[`${n}_tab_close`]=a},Xn={note:'<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>',tip:'<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>',important:'<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',warning:'<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',caution:'<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},Yn=(e,t={})=>{const{markers:n=["TIP","NOTE","IMPORTANT","WARNING","CAUTION"],icons:i=Xn,matchCaseSensitive:r=!1,titles:o={},classPrefix:a="markdown-alert"}=t,s="*"===n?"\\w+":n.join("|"),l=new RegExp(`^\\\\?\\[\\!(${s})\\]([^\\n\\r]*)`,r?"":"i");e.core.ruler.after("block","github-alerts",e=>{const t=e.tokens;for(let n=0;n<t.length;n++)if("blockquote_open"===t[n].type){const e=t[n],r=n;for(;"blockquote_close"!==t[n]?.type&&n<=t.length;)n+=1;const a=t[n],s=t.slice(r,n+1).find(e=>"inline"===e.type);if(!s)continue;const c=s.content.match(l);if(!c)continue;const d=c[1].toLowerCase(),u=c[2].trim()||(o[d]??Un(d)),h=i[d]??"";s.content=s.content.slice(c[0].length).trimStart(),e.type="alert_open",e.tag="div",e.meta={title:u,type:d,icon:h},a.type="alert_close",a.tag="div"}}),e.renderer.rules.alert_open=function(e,t){const{title:n,type:i,icon:r}=e[t].meta;return`<div class="${a} ${a}-${i}"><p class="${a}-title">${r}${n}</p>`}};function Un(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Vn={exports:{}},Gn=!0,Zn=!1,Kn=!1;function Jn(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function Qn(e,t){for(var n=e[t].level-1,i=t-1;i>=0;i--)if(e[i].level===n)return i;return-1}function ei(e,t){return"inline"===e[t].type&&function(e){return"paragraph_open"===e.type}(e[t-1])&&function(e){return"list_item_open"===e.type}(e[t-2])&&function(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}(e[t])}function ti(e,t){if(e.children.unshift(function(e,t){var n=new t("html_inline","",0),i=Gn?' disabled="" ':"";0===e.content.indexOf("[ ] ")?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':0!==e.content.indexOf("[x] ")&&0!==e.content.indexOf("[X] ")||(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">');return n}(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),Zn)if(Kn){e.children.pop();var n="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(function(e,t,n){var i=new n("html_inline","",0);return i.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",i.attrs=[{for:t}],i}(e.content,n,t))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="<label>",t}(t)),e.children.push(function(e){var t=new e("html_inline","",0);return t.content="</label>",t}(t))}Vn.exports=function(e,t){t&&(Gn=!t.enabled,Zn=!!t.label,Kn=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var t=e.tokens,n=2;n<t.length;n++)ei(t,n)&&(ti(t[n],e.Token),Jn(t[n-2],"class","task-list-item"+(Gn?"":" enabled")),Jn(t[Qn(t,n-2)],"class","contains-task-list"))})};var ni=(null==Vn.exports?{}:Vn.exports).default||Vn.exports,ii=/* @__PURE__ */new Set(["[ ]","[x]","[X]"]);function ri(e){e.core.ruler.after("inline","github-task-lists-empty",e=>{const t=e.tokens;for(let n=0;n<t.length;n++){const e=t[n];if("inline"!==e.type)continue;const i=e.content;if(!ii.has(i))continue;let r=n-1;if(r>=0&&"paragraph_open"===t[r].type&&(r-=1),r<0||"list_item_open"!==t[r].type)continue;oi(t[r],"task-list-item");for(let n=r-1;n>=0;n--)if("bullet_list_open"===t[n].type||"ordered_list_open"===t[n].type){oi(t[n],"contains-task-list");break}const o=new e.constructor("html_inline","",0);o.content="[ ]"===i?'<input class="task-list-item-checkbox" disabled="" type="checkbox">':'<input class="task-list-item-checkbox" checked="" disabled="" type="checkbox">',e.children=[o],e.content=""}})}function oi(e,t){const n=(e.attrGet("class")||"").split(/\s+/).filter(Boolean);n.includes(t)||e.attrSet("class",[...n,t].join(" "))}var ai={note:"注",tip:"提示",important:"重要",warning:"注意",caution:"警告"},si={note:'<i class="iconfont icon-note"></i>',tip:'<i class="iconfont icon-tip"></i>',important:'<i class="iconfont icon-important"></i>',warning:'<i class="iconfont icon-warning"></i>',caution:'<i class="iconfont icon-caution"></i>'};function li(e){return e.replace(/[\u{1F000}-\u{1FFFF}\u{200D}\u{FE0F}\u{2600}-\u{27BF}\u{2300}-\u{23FF}\u{2700}-\u{27BF}]/gu,"").trim()}var ci="markdown-tabs",di=null,ui=null;function hi(){document.querySelectorAll(`.${ci}-tabs-wrapper`).forEach(e=>{const t=e.querySelector(`.${ci}-tabs-header`),n=e.querySelector(`.${ci}-tabs-container`);if(!t||!n)return;if(t.dataset.clickInited)return;t.dataset.clickInited="true";const i=document.querySelector(".markdown");t.addEventListener("click",e=>{const r=e.target.closest(`.${ci}-tab-button`);if(!r||!t.contains(r))return;const o=t.querySelectorAll(`.${ci}-tab-button`),a=Array.from(o).indexOf(r),s=n.querySelectorAll(`.${ci}-tab-content`);o.forEach(e=>e.classList.remove("active")),s.forEach(e=>e.classList.remove("active")),r.classList.add("active"),s[a]&&s[a].classList.add("active");const l=r.offsetParent;l&&i?.scrollTop&&l.offsetTop&&i?.scrollTop>l.offsetTop&&i?.scrollTo({top:l.offsetTop,behavior:"smooth"})})}),function(){const e=document.querySelector(".markdown");e&&!e.dataset.scrollListenInited&&(e.dataset.scrollListenInited="true",e?.addEventListener("wheel",e=>{const t=e,n=e.target?.closest(`.${ci}-tabs-header`);n&&0!==Math.abs(t.deltaY)&&n.scrollWidth>n.clientWidth&&(e.preventDefault(),n.scrollLeft+=t.deltaY)},{passive:!1}))}(),function(){const e=document.querySelector(".markdown");function t(e){if(e.dataset.maskInited)return;e.parentElement.dataset.maskInited="true";const t=()=>{const{scrollLeft:t,scrollWidth:n,clientWidth:i}=e,r=t>1,o=t+i<n-1;e.parentElement.classList.remove("has-left-mask","has-right-mask","has-both-masks"),r&&o?e.parentElement.classList.add("has-both-masks"):r?e.parentElement.classList.add("has-left-mask"):o&&e.parentElement.classList.add("has-right-mask")};e.addEventListener("scroll",t),t()}document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e)),di&&(di.disconnect(),di=null),di=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(1!==e.nodeType)return;const n=e;n.classList.contains("markdown-tabs-tabs-header")&&t(n),n.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e))})})}),e&&di.observe(e,{childList:!0,subtree:!0}),ui&&window.removeEventListener("resize",ui),ui=()=>{document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>{e.dispatchEvent(new Event("scroll"))})},window.addEventListener("resize",ui)}()}var pi="0.18.1",mi=`https://registry.npmmirror.com/katex/${pi}/files/dist/katex.min.css`,fi=`https://registry.npmmirror.com/katex/${pi}/files/dist/katex.min.js`,vi=null;function gi(e,t={}){const n={throwOnError:!1,errorColor:"#cc0000",...t};function i(e,t){try{return function(){if(!window.katex)throw new Error("[katex-loader] KaTeX not loaded. Call ensureKatexLoaded() first.");return window.katex}().renderToString(e,{...n,displayMode:t})}catch(Xr){const i=Xr instanceof Error?Xr.message:String(Xr);return`<span style="color:${n.errorColor}" title="${r(i)}">${r(e)}</span>`}}function r(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}"undefined"!=typeof window&&window.katex||console.warn("[markdown-it-katex] KaTeX is not loaded yet. Call `await ensureKatexLoaded()` before using this plugin, or use `renderWithKatex()` helper instead."),e.inline.ruler.before("emphasis","katex_inline",(e,t)=>{if(36!==e.src.charCodeAt(e.pos))return!1;if(36===e.src.charCodeAt(e.pos+1))return!1;if(e.pos>0&&92===e.src.charCodeAt(e.pos-1))return!1;const n=e.pos+1;if(n>=e.posMax)return!1;if(/\s/.test(e.src[n]))return!1;let i=n;for(;i<e.posMax&&(36!==e.src.charCodeAt(i)||92===e.src.charCodeAt(i-1));)i++;if(i>=e.posMax)return!1;if(i===n)return!1;if(/\s/.test(e.src[i-1]))return!1;if(!t){const t=e.push("katex_inline","math",0);t.markup="$",t.content=e.src.slice(n,i)}return e.pos=i+1,!0}),e.block.ruler.after("blockquote","katex_block",(e,t,n,i)=>{const r=e.bMarks[t]+e.tShift[t];if(r+2>e.eMarks[t]||"$$"!==e.src.slice(r,r+2))return!1;if(i)return!0;let o=t+1,a=!1;for(;o<n;){const t=e.bMarks[o]+e.tShift[o];if("$$"===e.src.slice(t,e.eMarks[o]).trim()){a=!0;break}o++}const s=e.bMarks[t+1],l=a?e.bMarks[o]:e.eMarks[n-1];e.line=o+(a?1:0);const c=e.push("katex_block","math",0);return c.block=!0,c.markup="$$",c.content=e.src.slice(s,l).trim(),c.map=[t,e.line],!0}),e.renderer.rules.katex_inline=(e,t)=>i(e[t].content,!1),e.renderer.rules.katex_block=(e,t)=>`<div class="katex-block">${i(e[t].content,!0)}</div>\n`}function wi(e){return"string"!=typeof e?"":e.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"").replace(/-+/g,"-")}function bi(e){return e?e.map(e=>({href:wi(e.n.trim()),title:e.n.trim(),children:bi(e.c||[]),nodeName:`H${e.l}`,nodeTitle:`<h${e.l}>${e.n.trim()}</h${e.l}>`})):[]}async function yi(e,t){await function(e=15e3){return vi||("undefined"==typeof document||"undefined"==typeof window?Promise.reject(/* @__PURE__ */new Error("[katex-loader] Requires a browser environment.")):window.katex?Promise.resolve():vi=new Promise((t,n)=>{const i=setTimeout(()=>{vi=null,n(/* @__PURE__ */new Error(`[katex-loader] KaTeX CDN timeout after ${e}ms.`))},e);if(!document.querySelector(`link[href="${mi}"]`)){const e=document.createElement("link");e.rel="stylesheet",e.href=mi,document.head.appendChild(e)}const r=document.createElement("script");r.src=fi,r.onload=()=>{clearTimeout(i),t()},r.onerror=()=>{clearTimeout(i),vi=null,r.remove(),n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${fi}`))},document.head.appendChild(r)}))}();let n=[];const i=new j({langPrefix:"language-",html:!0,highlight:function(e,t){if(t&&D.getLanguage(t))try{return D.highlight(e,{language:t}).value}catch(oo){}return""}}).use(Wn,{name:ci}).use(Pe,{permalink:!0,permalinkBefore:!1,permalinkSymbol:"#",slugify:wi}).use(je,{callback:(e,t)=>{!n.length&&t.c&&(n=t.c)}}).use(Be,{matcher:e=>e.match(/^https?:\/\//),attrs:{target:"_blank",rel:"noopener"}}).use(Yn,{titles:ai,icons:si}).use(gi,{strict:!1,throwOnError:!1}).use(ni).use(ri);t&&t.forEach(e=>i.use(e));const r=i.render(e).replace(/class="markdown-alert markdown-alert-(\w+)"[\s\S]*?class="markdown-alert-title"[^>]*>([\s\S]*?)<\/p>/g,(e,t,n)=>{const i=ai[t];if(!i)return e;const r=li(n.replace(/<[^>]*>/g,""));if(r.toLowerCase()===t.toLowerCase()){const t=n.lastIndexOf(">");if(-1!==t){const o=n.substring(0,t+1)+li(n.substring(t+1)).replace(r,i);return e.replace(n,o)}}return e});return setTimeout(()=>{requestAnimationFrame(()=>hi())},0),{anchor:bi($n(n)),info:r}}function ki(e){e&&"object"==typeof e?Object.entries(e).forEach(([e,t])=>{D.getLanguage(e)||D.registerLanguage(e,t)}):console.warn("[render-markdown] initHighlighter 需要传入一个语言包对象")}var xi={exports:{}},Si=xi.exports;!function(e,t){"object"==typeof Si&&void 0!==xi?xi.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Viewer=t()}(void 0,function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function t(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function i(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?n(Object(r),!0).forEach(function(n){t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a={backdrop:!0,button:!0,navbar:!0,navigation:!1,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,autoplay:!0,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,preload:!0,minWidth:200,minHeight:100,movable:!0,magnifier:!1,rotatable:!0,rotateOnGesture:!0,rotateOnTouch:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnGesture:!0,zoomOnWheel:!0,slideOnTouch:!0,slideOnWheel:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,playing:null,stop:null},s="undefined"!=typeof window&&void 0!==window.document,l=s?window:{},c=!(!s||!l.document.documentElement)&&"ontouchstart"in l.document.documentElement,d=!!s&&"PointerEvent"in l,u="viewer",h="move",p="rotate",m="switch",f="transform",v="zoom",g="".concat(u,"-active"),w="".concat(u,"-close"),b="".concat(u,"-fade"),y="".concat(u,"-fixed"),k="".concat(u,"-fullscreen"),x="".concat(u,"-fullscreen-exit"),S="".concat(u,"-hide"),C="".concat(u,"-hide-md-down"),_="".concat(u,"-hide-sm-down"),E="".concat(u,"-hide-xs-down"),T="".concat(u,"-in"),A="".concat(u,"-invisible"),M="".concat(u,"-loading"),O="".concat(u,"-move"),L="".concat(u,"-open"),I="".concat(u,"-show"),N="".concat(u,"-transition"),P="click",z="dblclick",$="dragstart",j="focusin",D="keydown",R="load",B="error",H=d?"pointerdown":c?"touchstart":"mousedown",F=d?"pointerenter":"mouseenter",q=d?"pointerleave":"mouseleave",W=d?"pointermove":c?"touchmove":"mousemove",X=d?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",Y="resize",U="transitionend",V="wheel",G="gesturestart gesturechange gestureend",Z="ready",K="show",J="shown",Q="hide",ee="hidden",te="view",ne="viewed",ie="move",re="moved",oe="rotate",ae="rotated",se="scale",le="scaled",ce="zoom",de="zoomed",ue="play",he="playing",pe="stop",me="".concat(u,"Action"),fe=/\s+/,ve=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ge(e){return"string"==typeof e}var we={ctrl:"ctrlKey",shift:"shiftKey",alt:"altKey",meta:"metaKey"};function be(e,t){return!!e&&(!0===e||ge(e)&&e.split("+").every(function(e){return t[we[e.trim().toLowerCase()]]}))}var ye=Number.isNaN||l.isNaN;function ke(e){return"number"==typeof e&&!ye(e)}function xe(e){return void 0===e}function Se(e){return"object"===o(e)&&null!==e}var Ce=Object.prototype.hasOwnProperty;function _e(e){if(!Se(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&Ce.call(n,"isPrototypeOf")}catch(i){return!1}}function Ee(e){return"function"==typeof e}function Te(e,t){if(e&&Ee(t))if(Array.isArray(e)||ke(e.length))for(var n=e.length,i=0;i<n&&!1!==t.call(e,e[i],i,e);i+=1);else Se(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)});return e}function Ae(e,t,n){Te(n,function(n){var i=t.getAttribute(n);null!==i&&e.setAttribute(n,i)})}function Me(e,t){var n=e.transition;return n&&!1!==n[t]}var Oe=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Se(e)&&n.length>0&&n.forEach(function(t){Se(t)&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},Le=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Ie(e,t){var n=e.style;Te(t,function(e,t){Le.test(t)&&ke(e)&&(e+="px"),n[t]=e})}function Ne(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.split(fe).indexOf(t)>-1)}function Pe(e,t){if(e&&t)if(ke(e.length))Te(e,function(e){Pe(e,t)});else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function ze(e,t){if(e&&t)if(ke(e.length))Te(e,function(e){ze(e,t)});else if(e.classList)e.classList.remove(t);else{var n=e.className;n&&n.indexOf(t)>=0&&(e.className=n.split(fe).filter(function(e){return e&&e!==t}).join(" "))}}function $e(e,t,n){t&&(ke(e.length)?Te(e,function(e){$e(e,t,n)}):n?Pe(e,t):ze(e,t))}var je=/([a-z\d])([A-Z])/g;function De(e){return e.replace(je,"$1-$2").toLowerCase()}function Re(e,t){return Se(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(De(t)))}function Be(e,t,n){Se(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(De(t)),n)}var He=function(){var e=!1;if(s){var t=!1,n=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});l.addEventListener("test",n,i),l.removeEventListener("test",n,i)}return e}();function Fe(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(fe).forEach(function(t){if(!He){var o=e.listeners;o&&o[t]&&o[t][n]&&(r=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,r,i)})}function qe(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(fe).forEach(function(t){if(i.once&&!He){var o=e.listeners,a=void 0===o?{}:o;r=function(){delete a[t][n],e.removeEventListener(t,r,i);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],i),a[t][n]=r,e.listeners=a}e.addEventListener(t,r,i)})}function We(e,t,n,r){var o;return Ee(Event)&&Ee(CustomEvent)?o=new CustomEvent(t,i({bubbles:!0,cancelable:!0,detail:n},r)):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(o)}function Xe(e){var t=e.rotate,n=e.scaleX,i=e.scaleY,r=e.translateX,o=e.translateY,a=[];ke(r)&&0!==r&&a.push("translateX(".concat(r,"px)")),ke(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),ke(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),ke(n)&&ke(i)&&(1!==n||1!==i)&&(a.push("scaleX(".concat(n,")")),a.push("scaleY(".concat(i,")")));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}var Ye=l.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(l.navigator.userAgent);function Ue(e,t,n){var i=document.createElement("img");if(e.naturalWidth&&!Ye)return n(e.naturalWidth,e.naturalHeight),i;var r=document.body||document.documentElement;return i.onload=function(){n(i.width,i.height),Ye||r.removeChild(i)},Ae(i,e,t.inheritedAttributes),i.src=e.src,Ye||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(i)),i}function Ve(e){switch(e){case 2:return E;case 3:return _;case 4:return C;default:return""}}function Ge(e){var t=i({},e),n=[];return Te(e,function(e,i){delete t[i],Te(t,function(t){var i=Math.abs(e.startX-t.startX),r=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(i*i+r*r),l=(Math.sqrt(o*o+a*a)-s)/s;n.push(l)})}),n.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),n[0]}function Ze(e){var t=i({},e),n=[];return Te(e,function(e,i){delete t[i],Te(t,function(t){var i=Math.atan2(t.startY-e.startY,t.startX-e.startX),r=Math.atan2(t.endY-e.endY,t.endX-e.endX)-i;r>Math.PI?r-=2*Math.PI:r<-Math.PI&&(r+=2*Math.PI),n.push(180*r/Math.PI)})}),n.sort(function(e,t){return Math.abs(t)-Math.abs(e)}),n[0]||0}function Ke(e,t){var n=e.pageX,r=e.pageY,o={endX:n,endY:r};return t?o:i({timeStamp:Date.now(),startX:n,startY:r},o)}var Je,Qe={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,n=this.parent;t.inline&&(e={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=Oe({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&Ie(this.viewer,this.viewerData)},initList:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,n=this.element,i=this.options,r=this.list,o=[],a=_e(i.navbar)?i.navbar:{},s=document.createElement("li");this.containerData||this.initContainer(),r.appendChild(s);var l=s.offsetWidth+parseInt(window.getComputedStyle(s).marginLeft,10);r.removeChild(s);var c=ke(a.visibleItemCount)?Math.floor(a.visibleItemCount):Math.floor(this.containerData.width/l),d=(c=Math.min(c,this.length))>0?Math.min(Math.max(0,t-Math.floor(c/2)),Math.max(0,this.length-c)):0,u=c>0?Math.min(this.length,d+c):this.length;if(r.innerHTML="",Te(this.images,function(t,n){if(!(c>0&&(n<d||n>=u))){var a=t.src,s=t.alt||function(e){return ge(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}(a),l=e.getImageURL(t);if(a||l){var h=document.createElement("li"),p=document.createElement("img");Ae(p,t,i.inheritedAttributes),i.navbar&&(p.src=a||l),p.alt=s,p.setAttribute("data-original-url",l||a),h.setAttribute("data-index",n),h.setAttribute("data-viewer-action","view"),h.setAttribute("role","button"),i.keyboard&&h.setAttribute("tabindex",0),h.appendChild(p),r.appendChild(h),o.push(h)}}}),this.items=o,this.viewed){var h=this.getItem(this.index);h&&(Pe(h,g),h.setAttribute("aria-selected",!0))}Te(o,function(t){var n,r,o=t.firstElementChild;Be(o,"filled",!0),i.loading&&Pe(t,M),qe(o,R,n=function(n){Fe(o,B,r),i.loading&&ze(t,M),e.loadImage(n)},{once:!0}),qe(o,B,r=function(){Fe(o,R,n),i.loading&&ze(t,M)},{once:!0})}),Me(i,"view")&&qe(n,ne,function(){Pe(r,N)},{once:!0})},getItem:function(e){var t;return Te(this.items,function(n){return Number(Re(n,"index"))!==e||(t=n,!1)}),t},renderList:function(){var e=this.index,t=this.getItem(e);if(t){var n=t.nextElementSibling,i=parseInt(window.getComputedStyle(n||t).marginLeft,10),r=t.offsetWidth,o=r+i;Ie(this.list,Oe({width:o*this.items.length-i},Xe({translateX:(this.viewerData.width-r)/2-t.offsetLeft})))}},resetList:function(){var e=this.list;e.innerHTML="",ze(e,N),Ie(e,Oe({width:0},Xe({translateX:0})))},initImage:function(e){var t,n=this,i=this.options,r=this.image,o=this.viewerData,a=this.footer.offsetHeight,s=o.width,l=Math.max(o.height-a,a),c=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=Ue(r,i,function(t,r){var o=t/r,a=Math.max(0,Math.min(1,i.initialCoverage)),d=s,u=l;n.imageInitializing=!1,l*o>s?u=s/o:d=l*o,a=ke(a)?a:.9,d=Math.min(d*a,t),u=Math.min(u*a,r);var h=(s-d)/2,p=(l-u)/2,m={left:h,top:p,x:h,y:p,width:d,height:u,oldRatio:1,ratio:d/t,aspectRatio:o,naturalWidth:t,naturalHeight:r},f=Oe({},m);i.rotatable&&(m.rotate=c.rotate||0,f.rotate=0),i.scalable&&(m.scaleX=c.scaleX||1,m.scaleY=c.scaleY||1,f.scaleX=1,f.scaleY=1),n.imageData=m,n.initialImageData=f,e&&e()})},renderImage:function(e){var t=this,n=this.image,i=this.imageData;if(Ie(n,Oe({width:i.width,height:i.height,marginLeft:i.x,marginTop:i.y},Xe(i))),this.magnifierPoint&&this.renderMagnifier(),e){var r=!1;if(this.viewing?r="view":this.moving?r="move":this.rotating?r="rotate":this.scaling?r="scale":this.zooming&&(r="zoom"),r&&Me(this.options,r)&&Ne(n,N)){var o=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){Fe(n,U,o)}},qe(n,U,o,{once:!0})}else e()}},resetImage:function(){var e=this.image;e&&(this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null,this.title.innerHTML="")}},et={bind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.ownerDocument;qe(t,P,this.onClick=this.click.bind(this)),qe(t,$,this.onDragStart=this.dragstart.bind(this)),qe(t,F,this.onMagnifyEnter=this.magnify.bind(this)),qe(t,W,this.onMagnify=this.magnify.bind(this)),qe(t,q,this.onMagnifierLeave=this.hideMagnifier.bind(this)),qe(n,H,this.onPointerDown=this.pointerdown.bind(this)),qe(i,W,this.onPointerMove=this.pointermove.bind(this)),qe(i,X,this.onPointerUp=this.pointerup.bind(this)),qe(i,D,this.onKeyDown=this.keydown.bind(this)),qe(window,Y,this.onResize=this.resize.bind(this)),(e.zoomable&&e.zoomOnWheel||e.slideOnWheel)&&qe(t,V,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),(e.zoomable&&e.zoomOnGesture||e.rotatable&&e.rotateOnGesture)&&qe(t,G,this.onGesture=this.gesture.bind(this),{passive:!1}),e.toggleOnDblclick&&qe(n,z,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.ownerDocument;Fe(t,P,this.onClick),Fe(t,$,this.onDragStart),Fe(t,F,this.onMagnifyEnter),Fe(t,W,this.onMagnify),Fe(t,q,this.onMagnifierLeave),Fe(n,H,this.onPointerDown),Fe(i,W,this.onPointerMove),Fe(i,X,this.onPointerUp),Fe(i,D,this.onKeyDown),Fe(window,Y,this.onResize),(e.zoomable&&e.zoomOnWheel||e.slideOnWheel)&&Fe(t,V,this.onWheel,{passive:!1,capture:!0}),(e.zoomable&&e.zoomOnGesture||e.rotatable&&e.rotateOnGesture)&&Fe(t,G,this.onGesture,{passive:!1}),e.toggleOnDblclick&&Fe(n,z,this.onDblclick)}},tt={click:function(e){var t=this.options,n=this.imageData,i=e.target,r=Re(i,me);switch(r||"img"!==i.localName||"li"!==i.parentElement.localName||(r=Re(i=i.parentElement,me)),c&&e.isTrusted&&i===this.canvas&&clearTimeout(this.clickCanvasTimeout),this.actionEvent=e,r){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Re(i,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(c&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.actionEvent=e.isTrusted?e:e.detail&&e.detail.originalEvent,this.toggle())},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,n=this.options,i=this.image,r=this.index,o=this.viewerData;ze(i,A),n.loading&&ze(this.canvas,M),i.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){$e(i,O,n.movable),$e(i,N,Me(n,"view")),e.renderImage(function(){e.viewed=!0,e.viewing=!1,setTimeout(function(){$e(i,N,n.transition)},300),Ee(n.viewed)&&qe(t,ne,n.viewed,{once:!0}),We(t,ne,{originalImage:e.images[r],index:r,image:i,originalEvent:e.viewOriginalEvent||null},{cancelable:!1}),e.viewOriginalEvent=null})})},loadImage:function(e){var t=e.target,n=t.parentNode,i=n.offsetWidth||30,r=n.offsetHeight||50,o=!!Re(t,"filled");Ue(t,this.options,function(e,n){var a=e/n,s=i,l=r;r*a>i?o?s=r*a:l=i/a:o?l=i/a:s=r*a,Ie(t,Oe({width:s,height:l},Xe({translateX:(i-s)/2,translateY:(r-l)/2})))})},keydown:function(e){var t=this.options;if(t.keyboard){var n=e.keyCode||e.which||e.charCode;if(this.actionEvent=e,13===n)this.viewer.contains(e.target)&&this.click(e);if(this.fulled)switch(n){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},magnify:function(e){e.changedTouches||e.pointerType&&"mouse"!==e.pointerType?this.hideMagnifier():(this.magnifierPoint={clientX:e.clientX,clientY:e.clientY},this.renderMagnifier())},renderMagnifier:function(){var e=this.options,t=this.imageData,n=this.magnifier,i=this.magnifierImage,r=this.viewer,o=_e(e.magnifier)?e.magnifier:{},a=this.magnifierPoint;if(e.magnifier&&this.fulled&&this.viewed&&n&&i&&a){var s=Math.max(1,Number(o.size)||100),l=Math.max(1,Number(o.zoomRatio)||2),c=Number(o.opacity),d=r.getBoundingClientRect(),u=a.clientX-d.left,h=a.clientY-d.top,p=this.image.currentSrc||this.image.src,m=this.image.getBoundingClientRect();if(a.clientX<m.left||a.clientX>m.right||a.clientY<m.top||a.clientY>m.bottom)this.hideMagnifier();else{var f=ke(t.scaleX)?t.scaleX:1,v=ke(t.scaleY)?t.scaleY:1,g=(t.rotate||0)*Math.PI/180,w=Math.cos(g),b=Math.sin(g),y=w*f,k=b*f,x=-b*v,S=w*v,C=f*v;if(0!==C){var _=t.x+t.width/2,E=t.y+t.height/2,T=(-k*(u-_)+y*(h-E))/C,A=(S*(u-_)-x*(h-E))/C+t.width/2,M=T+t.height/2,O=t.width*l,L=t.height*l,I=y*(A*l-O/2)+x*(M*l-L/2),N=k*(A*l-O/2)+S*(M*l-L/2);this.magnifierSourcePoint={x:A,y:M},n.style.width="".concat(s,"px"),n.style.height="".concat(s,"px"),n.style.opacity="".concat(Math.max(0,Math.min(1,ke(c)?c:1))),i.src=p,i.style.width="".concat(O,"px"),i.style.height="".concat(L,"px"),i.style.left="".concat(s/2-O/2-I,"px"),i.style.top="".concat(s/2-L/2-N,"px"),i.style.transform="rotate(".concat(t.rotate||0,"deg) scaleX(").concat(f,") scaleY(").concat(v,")"),n.removeAttribute("aria-hidden"),Pe(n,"viewer-show")}else this.hideMagnifier()}}else this.hideMagnifier()},hideMagnifier:function(){this.magnifier&&(ze(this.magnifier,"viewer-show"),this.magnifier.setAttribute("aria-hidden",!0),this.magnifierPoint=null)},pointerdown:function(e){var t=this.options,n=this.pointers,i=e.buttons,r=e.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(ke(i)&&1!==i||ke(r)&&0!==r||e.ctrlKey))){e.preventDefault(),e.changedTouches?Te(e.changedTouches,function(e){n[e.identifier]=Ke(e)}):n[e.pointerId||0]=Ke(e);var o=!!t.movable&&h;(t.zoomable&&t.zoomOnTouch||t.rotatable&&t.rotateOnTouch)&&Object.keys(n).length>1?o=f:t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o=m),o!==h&&o!==v&&o!==p&&o!==f||ze(this.image,N),this.action=o}},pointermove:function(e){var t=this.pointers,n=this.action;this.viewed&&n&&(e.preventDefault(),e.changedTouches?Te(e.changedTouches,function(e){Oe(t[e.identifier]||{},Ke(e,!0))}):Oe(t[e.pointerId||0]||{},Ke(e,!0)),this.change(e))},pointerup:function(e){var t,n=this,i=this.options,r=this.action,o=this.pointers;if(e.changedTouches?Te(e.changedTouches,function(e){t=o[e.identifier],delete o[e.identifier]}):(t=o[e.pointerId||0],delete o[e.pointerId||0]),r){if(e.preventDefault(),r===h||r===v||r===p||r===f){var a=r===f?Me(i,v)||Me(i,p):Me(i,r);$e(this.image,N,a)}this.action=!1,c&&r!==v&&r!==f&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),i.toggleOnDblclick&&this.viewed&&e.target===this.image?this.pointerMoved?this.imageClicked=!1:this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){We(n.image,z,{originalEvent:e})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,i.backdrop&&"static"!==i.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){We(n.canvas,P,{originalEvent:e})},50))))}},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),xe((_e(this.options.navbar)?this.options.navbar:{}).visibleItemCount)&&this.initList(this.index),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();Te(this.player.getElementsByTagName("img"),function(t){qe(t,R,e.loadImage.bind(e),{once:!0}),We(t,R)})}},wheel:function(e){var t=this,n=this.options,i=this.navbar;if(this.viewed&&(e.preventDefault(),!this.gesturing&&!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var r=1;if(e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),(!i||!i.contains(e.target))&&n.zoomable&&be(n.zoomOnWheel,e)){var o=Number(n.zoomRatio)||.1;return this.actionEvent=e,void this.zoom(-r*o,!0)}be(n.slideOnWheel,e)&&(this.actionEvent=e,r>0?this.next(n.loop):r<0&&this.prev(n.loop))}},gesture:function(e){var t=this.options;if(this.viewed&&(t.zoomOnGesture||t.rotateOnGesture))switch(e.preventDefault(),e.type){case"gesturestart":this.gesturing=!0,this.gestureScale=e.scale||1,this.gestureRotation=e.rotation||0;break;case"gesturechange":var n=e.scale||1,i=n/(this.gestureScale||1),r=Number(e.rotation),o=r-(this.gestureRotation||0);this.gestureScale=n,t.zoomable&&t.zoomOnGesture&&1!==i&&(this.actionEvent=e,this.zoom(i>=1?i-1:1-1/i)),t.rotatable&&t.rotateOnGesture&&ke(r)&&(this.gestureRotation=r,0!==o&&(this.actionEvent=e,this.rotate(o)));break;case"gestureend":this.gesturing=!1,this.gestureScale=1,this.gestureRotation=0}}},nt={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;var i=this.actionEvent||this.showOriginalEvent||this.viewOriginalEvent||null;if(this.actionEvent=null,this.showOriginalEvent=i,Ee(n.show)&&qe(t,K,n.show,{once:!0}),!1===We(t,K,{originalEvent:i})||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var r=this.viewer;if(ze(r,S),r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",this.title.id),r.setAttribute("aria-modal",!0),r.removeAttribute("aria-hidden"),Me(n,"show")&&!e){var o=this.shown.bind(this);this.transitioning={abort:function(){Fe(r,U,o),ze(r,T)}},Pe(r,N),r.initialOffsetWidth=r.offsetWidth,qe(r,U,o,{once:!0}),Pe(r,T)}else Pe(r,T),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.element,i=this.options;if(i.inline||this.hiding||!this.isShown&&!this.showing)return this;var r=this.actionEvent||this.hideOriginalEvent||null;if(this.actionEvent=null,this.hideOriginalEvent=r,Ee(i.hide)&&qe(n,Q,i.hide,{once:!0}),!1===We(n,Q,{originalEvent:r})||this.destroyed)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var o=this.viewer,a=this.image,s=function(){ze(o,T),e.hidden()};if(Me(i,"hide")&&!t){var l=function(t){t&&t.target===o&&(Fe(o,U,l),e.hidden())},c=function(){Ne(o,N)?(qe(o,U,l),ze(o,T)):s()};this.transitioning={abort:function(){e.viewed&&Ne(a,N)?Fe(a,U,c):Ne(o,N)&&Fe(o,U,l)}},this.viewed&&Ne(a,N)?(qe(a,U,c,{once:!0}),this.zoomTo(0,!1,null,!0)):c()}else s();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex,n=this.index;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===n)return this;var i=this.actionEvent||this.viewOriginalEvent||null;if(this.actionEvent=null,this.viewOriginalEvent=i,!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var r=this.element,o=this.options,a=this.title,s=this.canvas,l=this.getItem(t);l||(this.initList(t),l=this.getItem(t));var c=l.querySelector("img"),d=Re(c,"originalUrl"),u=c.getAttribute("alt"),h=document.createElement("img");if(Ae(h,c,o.inheritedAttributes),h.src=d,h.alt=u,Ee(o.view)&&qe(r,te,o.view,{once:!0}),!1===We(r,te,{originalImage:this.images[t],index:t,image:h,originalEvent:i})||!this.isShown||this.hiding||this.played)return this;this.hideMagnifier();var p=this.getItem(n);p&&(ze(p,g),p.removeAttribute("aria-selected")),Pe(l,g),l.setAttribute("aria-selected",!0),o.focus&&l.focus(),this.image=h,this.viewed=!1,this.index=t,this.imageData={},Pe(h,A),o.loading&&Pe(s,M),s.innerHTML="",s.appendChild(h),this.renderList(),a.innerHTML="";var m=function(){var i,r=e.imageData,s=Array.isArray(o.title)?o.title[1]:o.title;if(a.innerHTML=ge(i=Ee(s)?s.call(e,h,r):"".concat(u," (").concat(r.naturalWidth," × ").concat(r.naturalHeight,")"))?i.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):i,o.preload){var l=t<n?-1:1,c=t+l;if((c<0||c>=e.length)&&(c=o.loop?l>0?0:e.length-1:-1),c!==t){var d=e.images[c],p=document.createElement("img");Ae(p,d,o.inheritedAttributes),p.src=e.getImageURL(d)||d.src}}};qe(r,ne,m,{once:!0});var f=function(){var t,n,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=function(){Fe(h,R,t),Fe(h,B,n),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1)};e.viewing={abort:function(){Fe(r,ne,m),h.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(h.src="",a())}},h.complete?e.load():(qe(h,R,t=function(){a(),e.load()},{once:!0}),qe(h,B,n=function(){if(a(),!i){var t=c.src;if(t&&t!==h.src)return h.src=t,void f(!0)}ze(h,A),o.loading&&ze(e.canvas,M)},{once:!0}),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(function(){ze(h,A),e.timeout=!1},1e3))};return f(),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,n=this.index+1;return n>t&&(n=e?0:t),this.view(n),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;return this.moveTo(xe(e)?e:n.x+Number(e),xe(t)?t:n.y+Number(t)),this},moveTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.element,r=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&r.movable){var a=o.x,s=o.y,l=!1;if(ke(e)?l=!0:e=a,ke(n)?l=!0:n=s,l){var c=this.actionEvent||null;if(this.actionEvent=null,Ee(r.move)&&qe(i,ie,r.move,{once:!0}),!1===We(i,ie,{x:e,y:n,oldX:a,oldY:s,originalEvent:c}))return this;o.x=e,o.y=n,o.left=e,o.top=n,$e(this.image,N,Me(r,"move")),this.moving=!0,this.renderImage(function(){t.moving=!1,Ee(r.moved)&&qe(i,re,r.moved,{once:!0}),We(i,re,{x:e,y:n,oldX:a,oldY:s,originalEvent:c},{cancelable:!1})})}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,n=this.element,i=this.options,r=this.imageData;if(ke(e=Number(e))&&this.viewed&&!this.played&&i.rotatable){var o=r.rotate,a=this.actionEvent||null;if(this.actionEvent=null,Ee(i.rotate)&&qe(n,oe,i.rotate,{once:!0}),!1===We(n,oe,{degree:e,oldDegree:o,originalEvent:a}))return this;r.rotate=e,$e(this.image,N,Me(i,"rotate")),this.rotating=!0,this.renderImage(function(){t.rotating=!1,Ee(i.rotated)&&qe(n,ae,i.rotated,{once:!0}),We(n,ae,{degree:e,oldDegree:o,originalEvent:a},{cancelable:!1})})}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.element,r=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&r.scalable){var a=o.scaleX,s=o.scaleY,l=!1;if(ke(e)?l=!0:e=a,ke(n)?l=!0:n=s,l){var c=this.actionEvent||null;if(this.actionEvent=null,Ee(r.scale)&&qe(i,se,r.scale,{once:!0}),!1===We(i,se,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s,originalEvent:c}))return this;o.scaleX=e,o.scaleY=n,$e(this.image,N,Me(r,"scale")),this.scaling=!0,this.renderImage(function(){t.scaling=!1,Ee(r.scaled)&&qe(i,le,r.scaled,{once:!0}),We(i,le,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s,originalEvent:c},{cancelable:!1})})}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,t,n),this},zoomTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.element,a=this.options,s=this.pointers,l=this.imageData,c=l.x,d=l.y,u=l.width,h=l.height,p=l.naturalWidth,m=l.naturalHeight;if(ke(e=Math.max(0,e))&&this.viewed&&!this.played&&(r||a.zoomable)){if(!r){var f=Math.max(.01,Ee(a.minZoomRatio)?a.minZoomRatio.call(this,this.image,l):a.minZoomRatio),v=Math.min(100,Ee(a.maxZoomRatio)?a.maxZoomRatio.call(this,this.image,l):a.maxZoomRatio);e=Math.min(Math.max(e,f),v)}var g=this.actionEvent||null;if(this.actionEvent=null,g&&g.type!==P)switch(g.type){case"wheel":a.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var w=p*e,b=m*e,y=w-u,k=b-h,x=l.ratio;if(Ee(a.zoom)&&qe(o,ce,a.zoom,{once:!0}),!1===We(o,ce,{ratio:e,oldRatio:x,originalEvent:g}))return this;if(this.zooming=!0,g&&g.type!==P){var S=function(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}(this.viewer),C=s&&Object.keys(s).length>0?function(e){var t=0,n=0,i=0;return Te(e,function(e){var r=e.startX,o=e.startY;t+=r,n+=o,i+=1}),{pageX:t/=i,pageY:n/=i}}(s):{pageX:g.pageX,pageY:g.pageY};l.x-=y*((C.pageX-S.left-c)/u),l.y-=k*((C.pageY-S.top-d)/h)}else _e(i)&&ke(i.x)&&ke(i.y)?(l.x-=y*((i.x-c)/u),l.y-=k*((i.y-d)/h)):(l.x-=y/2,l.y-=k/2);l.left=l.x,l.top=l.y,l.width=w,l.height=b,l.oldRatio=x,l.ratio=e,$e(this.image,N,Me(a,"zoom")),this.renderImage(function(){t.zooming=!1,Ee(a.zoomed)&&qe(o,de,a.zoomed,{once:!0}),We(o,de,{ratio:e,oldRatio:x,originalEvent:g},{cancelable:!1})}),n&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var n=this.element,i=this.options,r=this.actionEvent||null;if(this.actionEvent=null,Ee(i.play)&&qe(n,ue,i.play,{once:!0}),!1===We(n,ue,{originalEvent:r}))return this;var o=this.player,a=this.loadImage.bind(this),s=[],l=0,c=0;if(this.played=!0,this.onLoadWhenPlay=a,t&&this.requestFullscreen(t),Pe(o,I),o.removeAttribute("aria-hidden"),Te(this.images,function(t,n){var r=document.createElement("img");r.src=e.getImageURL(t)||t.src,r.alt=t.alt||"",r.referrerPolicy=t.referrerPolicy,l+=1,Pe(r,b),$e(r,N,Me(i,"play")),n===e.index&&(Pe(r,T),c=n),s.push(r),qe(r,R,a,{once:!0}),o.appendChild(r)}),ke(i.interval)&&i.interval>0){var d=function(){clearTimeout(e.playing.timeout);var t=e.actionEvent||null;e.actionEvent=null;var r=c-1;r=r>=0?r:l-1,Ee(i.playing)&&qe(n,he,i.playing,{once:!0}),!1!==We(n,he,{originalImage:e.images[r],index:r,image:s[r],originalEvent:t})?(ze(s[c],T),Pe(s[c=r],T),e.playing.timeout=i.autoplay?setTimeout(d,i.interval):null):e.playing.timeout=i.autoplay?setTimeout(d,i.interval):null},u=function(){clearTimeout(e.playing.timeout);var t=e.actionEvent||null;e.actionEvent=null;var r=c+1;r=r<l?r:0,Ee(i.playing)&&qe(n,he,i.playing,{once:!0}),!1!==We(n,he,{originalImage:e.images[r],index:r,image:s[r],originalEvent:t})?(ze(s[c],T),Pe(s[c=r],T),e.playing.timeout=i.autoplay?setTimeout(u,i.interval):null):e.playing.timeout=i.autoplay?setTimeout(u,i.interval):null};l>1&&(this.playing={prev:d,next:u,timeout:i.autoplay?setTimeout(u,i.interval):null})}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,n=this.options,i=this.actionEvent||null;if(this.actionEvent=null,Ee(n.stop)&&qe(t,pe,n.stop,{once:!0}),!1===We(t,pe,{originalEvent:i}))return this;var r=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,Te(r.getElementsByTagName("img"),function(t){Fe(t,R,e.onLoadWhenPlay)}),ze(r,I),r.setAttribute("aria-hidden",!0),r.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),Pe(this.button,x),ze(r,N),this.viewed&&ze(i,N),Pe(n,y),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("style"),Ie(n,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=Oe({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()})),this},exit:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),ze(this.button,x),ze(r,N),this.viewed&&ze(i,N),t.focus&&this.clearEnforceFocus(),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),ze(n,y),Ie(n,{zIndex:t.zIndexInline}),this.viewerData=Oe({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this):this},tooltip:function(){var e=this,t=this.options,n=this.tooltipBox,i=this.imageData;return this.viewed&&!this.played&&t.tooltip?(n.textContent="".concat(Math.round(100*i.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):Me(t,"tooltip")?(this.fading&&We(n,U),Pe(n,I),Pe(n,b),Pe(n,N),n.removeAttribute("aria-hidden"),n.initialOffsetWidth=n.offsetWidth,Pe(n,T)):(Pe(n,I),n.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){Me(t,"tooltip")?(qe(n,U,function(){ze(n,I),ze(n,b),ze(n,N),n.setAttribute("aria-hidden",!0),e.fading=!1},{once:!0}),ze(n,T),e.fading=!0):(ze(n,I),n.setAttribute("aria-hidden",!0)),e.tooltipping=!1},1e3),this):this},toggle:function(){return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0):this.zoomTo(1,!0),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=Oe({},this.initialImageData),this.renderImage()),this},update:function(e){var t=this,n=this.element,i=this.options,r=this.isImg;if(_e(e)&&Oe(i,e),r&&!n.parentNode)return this.destroy();var o=[];if(Te(r?[n]:n.querySelectorAll("img"),function(e){Ee(i.filter)?i.filter.call(t,e)&&o.push(e):t.getImageURL(e)&&o.push(e)}),!o.length)return this;if(this.images=o,this.length=o.length,this.ready){var a=[];if(Te(this.items,function(e){var t=e.querySelector("img"),n=Number(Re(e,"index")),i=o[n];i&&t&&i.src===t.src&&i.alt===t.alt||a.push(n)}),Ie(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=a.indexOf(this.index);if(s>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-s,this.length-1),0));else{var l=this.getItem(this.index);Pe(l,g),l.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[u]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||(Fe(e,P,this.onElementClick),Fe(e,D,this.onElementKeyDown)),e[u]=void 0,this):this}},it={getImageURL:function(e){var t=this.options.url;return t=ge(t)?e.getAttribute(t):Ee(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),qe(document,j,this.onFocusin=function(t){var n=e.viewer,i=t.target;if(i!==document&&i!==n&&!n.contains(i)){for(;i;){if(null!==i.getAttribute("tabindex")||"true"===i.getAttribute("aria-modal"))return;i=i.parentElement}n.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(Fe(document,j,this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;Pe(e,L),this.scrollbarWidth>0&&(e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var e=this.body;ze(e,L),this.scrollbarWidth>0&&(e.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var e=this.element,t=this.options,n=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(n.focus(),this.enforceFocus()),Ee(t.shown)&&qe(e,J,t.shown,{once:!0}),!1!==We(e,J,{originalEvent:this.showOriginalEvent||null})&&(this.showOriginalEvent=null,this.ready&&this.isShown&&!this.hiding&&this.view(this.index))},hidden:function(){var e=this.element,t=this.options,n=this.viewer,i=n.ownerDocument.activeElement;i&&n.contains(i)&&Ee(i.blur)&&i.blur(),t.focus&&this.clearEnforceFocus(),this.close(),this.unbind(),Pe(n,S),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),n.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(Ee(t.hidden)&&qe(e,ee,t.hidden,{once:!0}),We(e,ee,{originalEvent:this.hideOriginalEvent||null},{cancelable:!1}),this.hideOriginalEvent=null)},requestFullscreen:function(e){var t=this.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var n=t.documentElement;n.requestFullscreen?_e(e)?n.requestFullscreen(e):n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()}},exitFullscreen:function(){var e=this.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,n=this.pointers,i=n[Object.keys(n)[0]];if(i){var r=i.endX-i.startX,o=i.endY-i.startY;switch(this.action){case h:0===r&&0===o||(this.pointerMoved=!0,this.actionEvent=e,this.move(r,o));break;case v:if(t.zoomable&&t.zoomOnTouch){var a=Ge(n);0!==a&&(this.actionEvent=e,this.zoom(a))}break;case p:if(t.rotatable&&t.rotateOnTouch){var s=Ze(n);0!==s&&(this.actionEvent=e,this.rotate(s))}break;case f:if(t.zoomable&&t.zoomOnTouch){var l=Ge(n);0!==l&&(this.actionEvent=e,this.zoom(l))}if(t.rotatable&&t.rotateOnTouch){var c=Ze(n);0!==c&&(this.actionEvent=e,this.rotate(c))}break;case m:this.action="switched";var d=Math.abs(r);d>1&&d>Math.abs(o)&&(this.pointers={},this.actionEvent=e,r>1?this.prev(t.loop):r<-1&&this.next(t.loop))}Te(n,function(e){e.startX=e.endX,e.startY=e.endY})}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},rt=l.Viewer,ot=(Je=-1,function(){return Je+=1}),at=/*#__PURE__*/function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!e||1!==e.nodeType&&11!==e.nodeType)throw new Error("The first argument is required and must be an element.");this.element=e,this.ownerDocument=e.ownerDocument||e.host.ownerDocument,this.options=Oe({},a,_e(n)&&n),this.action=!1,this.actionEvent=null,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=ot(),this.init()}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"init",value:function(){var e=this,t=this.element,n=this.options;if(!t[u]){t[u]=this,n.focus&&!n.keyboard&&(n.focus=!1);var i="img"===t.localName,r=[];if(Te(i?[t]:t.querySelectorAll("img"),function(t){Ee(n.filter)?n.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)}),this.isImg=i,this.length=r.length,this.images=r,this.initBody(),xe(this.ownerDocument.createElement(u).style.transition)&&(n.transition=!1),n.inline){var o=0,a=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout(function(){e.delaying=!1,e.build()},0))};this.initializing={abort:function(){Te(r,function(e){e.complete||(Fe(e,R,a),Fe(e,B,a))})}},Te(r,function(e){var t,n;e.complete?a():(qe(e,R,t=function(){Fe(e,B,n),a()},{once:!0}),qe(e,B,n=function(){Fe(e,R,t),a()},{once:!0}))})}else qe(t,P,this.onElementClick=function(t){var i=t.target;"img"!==i.localName||Ee(n.filter)&&!n.filter.call(e,i)||(e.actionEvent=t,e.view(e.images.indexOf(i)))}),qe(t,D,this.onElementKeyDown=function(t){var i=t.target,r=t.key;"img"!==i.localName||"Enter"!==r&&" "!==r||(t.preventDefault(),Ee(n.filter)&&!n.filter.call(e,i)||(e.actionEvent=t,e.view(e.images.indexOf(i))))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,n=e.parentNode,i=document.createElement("div");i.innerHTML='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-magnifier" aria-hidden="true"><img class="viewer-magnifier-image" alt=""></div><div class="viewer-navigation" aria-hidden="true"><div class="viewer-prev" data-viewer-action="prev" role="button" aria-label="Previous"></div><div class="viewer-next" data-viewer-action="next" role="button" aria-label="Next"></div></div><div class="viewer-footer" aria-hidden="true"><div class="viewer-title" aria-hidden="true"></div><div class="viewer-toolbar" aria-hidden="true"></div><div class="viewer-navbar" aria-hidden="true"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button" aria-hidden="true"></div><div class="viewer-player" aria-hidden="true"></div></div>';var r=i.querySelector(".".concat(u,"-container")),o=r.querySelector(".".concat(u,"-title")),a=r.querySelector(".".concat(u,"-toolbar")),s=r.querySelector(".".concat(u,"-navbar")),l=r.querySelector(".".concat(u,"-navigation")),c=r.querySelector(".".concat(u,"-button")),d=r.querySelector(".".concat(u,"-canvas"));this.parent=n,this.viewer=r,this.title=o,this.toolbar=a,this.navbar=s,this.navigation=l,this.button=c,this.canvas=d,this.footer=r.querySelector(".".concat(u,"-footer")),this.magnifier=r.querySelector(".".concat(u,"-magnifier")),this.magnifierImage=r.querySelector(".".concat(u,"-magnifier-image")),this.tooltipBox=r.querySelector(".".concat(u,"-tooltip")),this.player=r.querySelector(".".concat(u,"-player")),this.list=r.querySelector(".".concat(u,"-list")),r.id="".concat(u).concat(this.id),o.id="".concat(u,"Title").concat(this.id),Pe(o,t.title?Ve(Array.isArray(t.title)?t.title[0]:t.title):S),t.title&&o.removeAttribute("aria-hidden");var h=_e(t.navbar)?t.navbar:{},p=t.navbar,m=xe(h.size)?t.navbar:h.size;if(_e(t.navbar)&&(p=!!xe(h.show)||h.show),Pe(s,p?Ve(p):S),p&&s.removeAttribute("aria-hidden"),-1!==["small","medium","large"].indexOf(m)&&Pe(s,"".concat(u,"-").concat(m)),_e(t.navigation)?Te(l.querySelectorAll('[role="button"]'),function(e){var n=Re(e,me),i=t.navigation[n],r=_e(i),o=r&&!xe(i.show)?i.show:i,a=r&&!xe(i.size)?i.size:i;$e(e,S,!o),ke(o)&&Pe(e,Ve(o)),-1!==["small","large"].indexOf(a)&&Pe(e,"".concat(u,"-").concat(a))}):Pe(l,t.navigation?Ve(t.navigation):S),t.navigation&&l.removeAttribute("aria-hidden"),$e(c,S,!t.button),t.button&&c.removeAttribute("aria-hidden"),t.keyboard&&(c.setAttribute("tabindex",0),Te(l.querySelectorAll('[role="button"]'),function(e){e.setAttribute("tabindex",0)})),t.backdrop&&(Pe(r,"".concat(u,"-backdrop")),t.inline||"static"===t.backdrop||Be(d,me,"hide")),ge(t.className)&&t.className&&t.className.split(fe).forEach(function(e){Pe(r,e)}),t.toolbar){var f=document.createElement("ul"),v=_e(t.toolbar),g=ve.slice(0,3),x=ve.slice(7,9),C=ve.slice(9);v||Pe(a,Ve(t.toolbar)),a.removeAttribute("aria-hidden"),Te(v?t.toolbar:ve,function(e,n){var i=v&&_e(e),r=v?De(n):e,o=i&&!xe(e.show)?e.show:e;if(o&&(t.zoomable||-1===g.indexOf(r))&&(t.rotatable||-1===x.indexOf(r))&&(t.scalable||-1===C.indexOf(r))){var a=i&&!xe(e.size)?e.size:e,s=i&&!xe(e.click)?e.click:e,l=document.createElement("li");t.keyboard&&l.setAttribute("tabindex",0),l.setAttribute("role","button"),Pe(l,"".concat(u,"-").concat(r)),Ee(s)||Be(l,me,r),ke(o)&&Pe(l,Ve(o)),-1!==["small","large"].indexOf(a)?Pe(l,"".concat(u,"-").concat(a)):"play"===r&&Pe(l,"".concat(u,"-large")),Ee(s)&&qe(l,P,s),f.appendChild(l)}}),a.appendChild(f)}else Pe(a,S);if(t.title||p||t.toolbar?this.footer.removeAttribute("aria-hidden"):Pe(this.footer,S),!t.rotatable){var _=a.querySelectorAll('li[class*="rotate"]');Pe(_,A),Te(_,function(e){a.appendChild(e)})}if(t.inline)Pe(c,k),Ie(r,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(n).position&&Ie(n,{position:"relative"}),n.insertBefore(r,e.nextSibling);else{Pe(c,w),Pe(r,y),Pe(r,b),Pe(r,S),Ie(r,{zIndex:t.zIndex});var E=t.container;ge(E)&&(E=this.ownerDocument.querySelector(E)),E||(E=this.body),E.appendChild(r)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,Ee(t.ready)&&qe(e,Z,t.ready,{once:!0}),!1!==We(e,Z)?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}],[{key:"create",value:function(e,n){return new t(e,n)}},{key:"setDefaults",value:function(e){Oe(a,_e(e)&&e)}},{key:"noConflict",value:function(){return window.Viewer=rt,t}}])}();return Oe(at.prototype,Qe,et,tt,nt,it),at});var Ci=(null==xi.exports?{}:xi.exports).default||xi.exports,_i="_image-preview-wrapper_1ox80_1",Ei=/* @__PURE__ */new Map,Ti=["pre"];function Ai(e){(Array.isArray(e)?e:[e]).forEach(e=>{Ti.includes(e)||Ti.push(e)})}var Mi=e=>{const t=e.target;"IMG"===t.tagName&&Ti.some(e=>null!==t.closest(e))&&e.stopImmediatePropagation()},Oi=e=>{const t=e.target;if("IMG"!==t.tagName)return;if(Ti.some(e=>null!==t.closest(e)))return;const n=Ei.get(t);n&&n.show()},Li=!1;function Ii(e,t){const n=e.current;if(!n)return;Li||(n.addEventListener("click",Mi,!0),n.addEventListener("click",Oi),Li=!0);const i=n.querySelectorAll("img");i.forEach(e=>{e.onclick=null}),i.forEach(n=>{const i=n;if(t)return i.style.maxHeight="none",i.style.width="auto",void(i.style.display="block");if(i.parentElement?.querySelector(".image-toolbar"))return;if(Ti.some(e=>null!==i.closest(e)))return;const r=document.createElement("div");r.className=_i,i.parentNode?.insertBefore(r,i),r.appendChild(i),((e,t)=>{const n=t.current;if(!n)return;const i=new Ci(n,{toolbar:!0,navbar:!0,title:!1,tooltip:!0,zoomable:!0,rotatable:!1,scalable:!1,transition:!0,fullscreen:!0,keyboard:!0});Ei.set(e,i)})(i,e),i.style.maxHeight="100px",i.style.width="auto",i.style.display="block",i.style.overflow="hidden"})}var Ni;var Pi="undefined"==typeof document?void 0:document,zi=!!Pi&&"content"in Pi.createElement("template"),$i=!!Pi&&Pi.createRange&&"createContextualFragment"in Pi.createRange();function ji(e){return e=e.trim(),zi?function(e){var t=Pi.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):$i?function(e){return Ni||(Ni=Pi.createRange()).selectNode(Pi.body),Ni.createContextualFragment(e).childNodes[0]}(e):function(e){var t=Pi.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function Di(e,t){var n,i,r=e.nodeName,o=t.nodeName;return r===o||(n=r.charCodeAt(0),i=o.charCodeAt(0),n<=90&&i>=97?r===o.toUpperCase():i<=90&&n>=97&&o===r.toUpperCase())}function Ri(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Bi={OPTION:function(e,t){var n=e.parentNode;if(n){var i=n.nodeName.toUpperCase();"OPTGROUP"===i&&(i=(n=n.parentNode)&&n.nodeName.toUpperCase()),"SELECT"!==i||n.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}Ri(e,t,"selected")},INPUT:function(e,t){Ri(e,t,"checked"),Ri(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var i=e.firstChild;if(i){var r=i.nodeValue;if(r==n||!n&&r==e.placeholder)return;i.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n,i,r=-1,o=0,a=e.firstChild;a;)if("OPTGROUP"===(i=a.nodeName&&a.nodeName.toUpperCase()))(a=(n=a).firstChild)||(a=n.nextSibling,n=null);else{if("OPTION"===i){if(a.hasAttribute("selected")){r=o;break}o++}!(a=a.nextSibling)&&n&&(a=n.nextSibling,n=null)}e.selectedIndex=r}}};function Hi(){}function Fi(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var qi=function(e){return function(t,n,i){if(i||(i={}),"string"==typeof n)if("#document"===t.nodeName||"HTML"===t.nodeName){var r=n;(n=Pi.createElement("html")).innerHTML=r}else if("BODY"===t.nodeName){var o=n;(n=Pi.createElement("html")).innerHTML=o;var a=n.querySelector("body");a&&(n=a)}else n=ji(n);else 11===n.nodeType&&(n=n.firstElementChild);var s=i.getNodeKey||Fi,l=i.onBeforeNodeAdded||Hi,c=i.onNodeAdded||Hi,d=i.onBeforeElUpdated||Hi,u=i.onElUpdated||Hi,h=i.onBeforeNodeDiscarded||Hi,p=i.onNodeDiscarded||Hi,m=i.onBeforeElChildrenUpdated||Hi,f=i.skipFromChildren||Hi,v=i.addChild||function(e,t){return e.appendChild(t)},g=!0===i.childrenOnly,w=Object.create(null),b=[];function y(e){b.push(e)}function k(e,t){if(1===e.nodeType)for(var n=e.firstChild;n;){var i=void 0;t&&(i=s(n))?y(i):(p(n),n.firstChild&&k(n,t)),n=n.nextSibling}}function x(e,t,n){!1!==h(e)&&(t&&t.removeChild(e),p(e),k(e,n))}function S(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var n=s(t);n&&(w[n]=t),S(t),t=t.nextSibling}}function C(e){c(e);for(var t=e.firstChild;t;){var n=t.nextSibling,i=s(t);if(i){var r=w[i];r&&Di(t,r)?(t.parentNode.replaceChild(r,t),_(r,t)):C(t)}else C(t);t=n}}function _(t,n,i){var r=s(n);if(r&&delete w[r],!i){var o=d(t,n);if(!1===o)return;if(o instanceof HTMLElement&&S(t=o),e(t,n),u(t),!1===m(t,n))return}"TEXTAREA"!==t.nodeName?function(e,t){var n,i,r,o,a,c=f(e,t),d=t.firstChild,u=e.firstChild;e:for(;d;){for(o=d.nextSibling,n=s(d);!c&&u;){if(r=u.nextSibling,d.isSameNode&&d.isSameNode(u)){d=o,u=r;continue e}i=s(u);var h=u.nodeType,p=void 0;if(h===d.nodeType&&(1===h?(n?n!==i&&((a=w[n])?r===a?p=!1:(e.insertBefore(a,u),i?y(i):x(u,e,!0),i=s(u=a)):p=!1):i&&(p=!1),(p=!1!==p&&Di(u,d))&&_(u,d)):3!==h&&8!=h||(p=!0,u.nodeValue!==d.nodeValue&&(u.nodeValue=d.nodeValue))),p){d=o,u=r;continue e}i?y(i):x(u,e,!0),u=r}if(n&&(a=w[n])&&Di(a,d))c||v(e,a),_(a,d);else{var m=l(d);!1!==m&&(m&&(d=m),d.actualize&&(d=d.actualize(e.ownerDocument||Pi)),v(e,d),C(d))}d=o,u=r}!function(e,t,n){for(;t;){var i=t.nextSibling;(n=s(t))?y(n):x(t,e,!0),t=i}}(e,u,i);var g=Bi[e.nodeName];g&&g(e,t)}(t,n):Bi.TEXTAREA(t,n)}S(t);var E,T,A=t,M=A.nodeType,O=n.nodeType;if(!g)if(1===M)1===O?Di(t,n)||(p(t),A=function(e,t){for(var n=e.firstChild;n;){var i=n.nextSibling;t.appendChild(n),n=i}return t}(t,(E=n.nodeName,(T=n.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==T?Pi.createElementNS(T,E):Pi.createElement(E)))):A=n;else if(3===M||8===M){if(O===M)return A.nodeValue!==n.nodeValue&&(A.nodeValue=n.nodeValue),A;A=n}if(A===n)p(t);else{if(n.isSameNode&&n.isSameNode(A))return;if(_(A,n,g),b)for(var L=0,I=b.length;L<I;L++){var N=w[b[L]];N&&x(N,N.parentNode,!1)}}return!g&&A!==t&&t.parentNode&&(A.actualize&&(A=A.actualize(t.ownerDocument||Pi)),t.parentNode.replaceChild(A,t)),A}}(function(e,t){var n,i,r,o,a=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var s=a.length-1;s>=0;s--)i=(n=a[s]).name,r=n.namespaceURI,o=n.value,r?(i=n.localName||i,e.getAttributeNS(r,i)!==o&&("xmlns"===n.prefix&&(i=n.name),e.setAttributeNS(r,i,o))):e.getAttribute(i)!==o&&e.setAttribute(i,o);for(var l=e.attributes,c=l.length-1;c>=0;c--)i=(n=l[c]).name,(r=n.namespaceURI)?(i=n.localName||i,t.hasAttributeNS(r,i)||e.removeAttributeNS(r,i)):t.hasAttribute(i)||e.removeAttribute(i)}}),Wi="data-md-persist",Xi=/* @__PURE__ */new Set(["mermaid-render-noCode","code-collapsed","has-left-mask","has-right-mask","has-both-masks","active"]);function Yi({content:e,codeType:t,customRenderers:n,throttleMs:r=16,onNodeDiscarded:a}){const[c,d]=l([]),[u,h]=l(!1),p=s(""),m=s(""),f=s(null),v=s(null),g=s(null),w=s(!0),b=s(0),y=s(void 0);y.current=a;const k=i(async(e,i)=>{const r=t&&"md"!==t?.toLocaleLowerCase()?"```"+t+"\n"+e+"\n```":e,o=await yi(r,n);if(!o||i!==b.current)return;const a=o.info;if(!a)return;const s=()=>{if(i!==b.current)return;const e=f.current;if(!e)return void setTimeout(s,0);if(d(o.anchor||[]),m.current=a,w.current)return e.innerHTML=a,w.current=!1,void(p.current=r);const t=document.createElement("div");t.innerHTML=a;const n=/* @__PURE__ */new WeakMap;qi(e,t,{childrenOnly:!0,getNodeKey:e=>function(e){if(1!==e.nodeType)return null;const t=e,n=t.getAttribute("id");if(n)return`id:${n}`;const i=("string"==typeof t.className?t.className:"").split(/\s+/).filter(e=>e&&!e.startsWith("copy-")&&!Xi.has(e)).join(" ");return i?`${t.tagName.toLowerCase()}#${i}`:null}(e),onBeforeElUpdated(e,t){const i=/* @__PURE__ */new Map;for(const n of Array.from(e.attributes))n.name.startsWith("data-")&&!t.hasAttribute(n.name)&&i.set(n.name,n.value);return i.size&&n.set(e,i),!0},onElUpdated(e){const t=n.get(e);t&&(t.forEach((t,n)=>e.setAttribute(n,t)),n.delete(e))},onBeforeNodeAdded:e=>(1!==e.nodeType||!e.classList.contains("pre-handle"))&&e,onBeforeNodeDiscarded:e=>1!==e.nodeType||!e.hasAttribute("data-md-persist"),onNodeDiscarded(e){1===e.nodeType&&y.current&&y.current(e)}}),p.current=r};s()},[t,n]),x=i((e,t)=>{g.current={content:e,seq:t},null!=v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{const e=g.current;g.current=null,e&&k(e.content,e.seq)},r)},[r,k]);return o(()=>{if(!e)return b.current+=1,w.current=!0,h(!1),p.current="",void(m.current="");const n=t&&"md"!==t?.toLocaleLowerCase()?"```"+t+"\n"+e+"\n```":e;if(p.current===n)return;b.current+=1;const i=b.current;if(h(!0),!w.current)return x(e,i),()=>{null!=v.current&&clearTimeout(v.current)};k(e,i)},[e,t,x,k]),o(()=>()=>{b.current+=1,null!=v.current&&clearTimeout(v.current)},[]),{anchors:c,hasContent:u,setInnerRef:i(e=>{f.current=e},[])}}var Ui="_tocToggle_gf6l6_1",Vi=/* @__PURE__ */new Map;function Gi({preNode:e}){const[t,n]=l(!0);/* @__PURE__ */
12
- return z("span",{className:"code-toggle",onClick:()=>{n(!t),e.classList.toggle("code-collapsed",t)},children:/* @__PURE__ */z(t?c:d,{})})}function Zi(e){const{content:t,showBackTop:n,showToc:r,footer:a,backTopTarget:c=document.body,mermaidDebounce:d,useIncremental:u=!1,incrementalThrottleMs:h}=e,[p,m]=l(""),[v,g]=l([]),[w,b]=l(""),[y,k]=l(!1),x=s(null),S=s(e);S.current=e;const C=i(e=>{const t=[];e.classList?.contains("pre-handle")&&t.push(e),e.querySelectorAll(".pre-handle").forEach(e=>t.push(e)),t.forEach(e=>{const t=Vi.get(e);t&&(t.unmount(),Vi.delete(e))})},[]),{anchors:_,hasContent:E,setInnerRef:T}=Yi({content:t,codeType:e.codeType,customRenderers:e.customRenderers,throttleMs:h,onNodeDiscarded:C}),A=u?_:v,M=u?E:!!p;o(()=>{let e=null,n=!1;return(async()=>{if(!u){const{codeType:e}=S.current;let i="";i=e&&"md"!==e?.toLocaleLowerCase()?"```"+e+"\n"+t+"\n```":t;const r=await yi(i,S.current.customRenderers);if(n)return;m(r?.info),g(r?.anchor||[])}e=setTimeout(async()=>{if(n)return;(e=>{const{isSlotMermaid:t=!0,isShowCollapsed:n=!0}=e;document.querySelectorAll('.markdown-html code[class*="language-"]').forEach(e=>{const i=e.className.replace("language-","").trim(),r=t&&"mermaid"===i?"mermaid-render-noCode":"",o=`copy-${crypto.randomUUID()}`,a=e.parentNode;if(a?.querySelector(".pre-handle"))return;const s=document.createElement("div");s.className="pre-handle";const l=a?.querySelector("code");l?.classList.add(o),r&&l?.classList.add(r),a?.insertBefore(s,a.querySelector("code"));const c=/* @__PURE__ */$(P,{children:[/* @__PURE__ */z("img",{src:"https://remons.cn:3008/upload/md_assets/code_icon.png",alt:""}),/* @__PURE__ */z("span",{children:i})]}),d=/* @__PURE__ */z("span",{className:"copy",onClick:()=>{const e=document.querySelector(`.${o}`);e&&((0,be.copy)(e),re.success("复制成功"))},children:/* @__PURE__ */z(f,{})}),u=N(s);Vi.set(s,u),u.render(/* @__PURE__ */$(P,{children:[/* @__PURE__ */z("span",{children:c}),/* @__PURE__ */$("span",{className:"code-handle",children:[d,n&&/* @__PURE__ */z(Gi,{preNode:a})]})]}))})})(S.current);const{isPrintPreview:e,excludedSelectors:t}=S.current;t&&Ai(t),Ii(x,e);const{isSlotMermaid:i,showDriverGuide:r,chartConfig:o,defaultCollapsed:a,cdn:s}=S.current;if(i){const{renderMermaidWithControls:t}=await Promise.resolve().then(()=>Po);await t({showDriverGuide:r,isPrintPreview:e,chartConfig:o,defaultCollapsed:a,cdn:s})}},d??10)})(),()=>{n=!0,e&&clearTimeout(e),u||(Vi.forEach((e,t)=>{e.unmount(),t.remove()}),Vi.clear(),function(){const e=document.querySelector(".markdown-html");e&&Li&&(e.removeEventListener("click",Mi,!0),e.removeEventListener("click",Oi),Li=!1),Ei.forEach(e=>{e.destroy()}),Ei.clear()}())}},[t]);const L=s(null);return L.current=x.current,o(()=>()=>{if(!S.current.useIncremental)return;const e=L.current;e&&e.querySelectorAll(".pre-handle").forEach(e=>{const t=e,n=Vi.get(t);n&&(n.unmount(),Vi.delete(t))})},[]),o(()=>{if(0===A.length)return;const e=[],t=n=>{n.forEach(n=>{e.push(n.href),n.children?.length&&t(n.children)})};t(A);const n=e.map(e=>document.getElementById(e)).filter(Boolean);if(0===n.length)return;const i=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting);if(0===t.length)return;const n=t.reduce((e,t)=>t.boundingClientRect.top<e.boundingClientRect.top?t:e);b(n.target.id)},{rootMargin:"0px 0px -90% 0px",threshold:0});return n.forEach(e=>i.observe(e)),()=>i.disconnect()},[A]),o(()=>{const e=()=>{const e=window.location.hash.slice(1);if(!e)return;const t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),b(e))},t=setTimeout(e,100),n=()=>e();return window.addEventListener("hashchange",n),()=>{clearTimeout(t),window.removeEventListener("hashchange",n)}},[A]),/* @__PURE__ */$("div",{className:"markdown",children:[M?/* @__PURE__ */$("div",{className:"markdown-html",ref:x,children:[/* @__PURE__ */z("div",{style:{width:"100%"},...u?{ref:T}:{dangerouslySetInnerHTML:{__html:p}}}),a&&/* @__PURE__ */z("div",{className:"markdown-footer",children:a})]}):/* @__PURE__ */z(de,{}),n&&/* @__PURE__ */z(se,{target:()=>c}),r&&A.length>0&&/* @__PURE__ */z("div",{className:he(Ui,"md-toc-toggle","remons-markdown-circle"),onClick:()=>k(!y),children:/* @__PURE__ */z(O,{})}),r&&/* @__PURE__ */z(ge,{anchors:A,activeId:w,visible:y,onClose:()=>k(!1)})]})}var Ki={javascript:R,typescript:B,css:H,json:F,bash:q,xml:W,plaintext:X};function Ji(e,t){let n;if(e instanceof Blob)n=URL.createObjectURL(e);else{if("string"!=typeof e)return void re.error("不支持的下载格式");n=e}const i=document.createElement("a");i.href=n,i.download=t,i.click(),URL.revokeObjectURL(n),re.success(`${t} 已下载`)}function Qi(e,t="image",n=2){const{w:i,h:r}=function(e){const t=e.match(/viewBox=["']?([^"']+)["']/i);let n=0,i=0;if(t){const e=t[1].split(/[\s,]+/).map(Number);4===e.length&&(n=e[2],i=e[3])}const r=e.match(/width=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*["']/i),o=e.match(/height=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*/i),a=r?parseFloat(r[1]):0,s=o?parseFloat(o[1]):0;return n&&i?{w:n,h:i}:{w:a||n||800,h:s||i||600}}(e),o=function(e){return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`}(e),a=new Image;a.crossOrigin="anonymous",a.src=o,a.onload=()=>{const e=document.createElement("canvas");e.width=Math.max(1,Math.round(i*n)),e.height=Math.max(1,Math.round(r*n));const o=e.getContext("2d");o.fillStyle="#ffffff",o.fillRect(0,0,e.width,e.height),o.scale(n,n),o.drawImage(a,0,0,i,r),e.toBlob(e=>{e?Ji(e,`${t}.png`):re.error("PNG 生成失败")},"image/png")},a.onerror=()=>{re.error("PNG 生成失败:图片加载失败")}}var er="app-theme-mode",tr="light",nr="dark";function ir(){try{const e=localStorage.getItem(er);if("light"===e||"dark"===e||"system"===e)return e}catch{}return"system"}function rr(e){return"system"===e?"undefined"==typeof window?tr:window.matchMedia("(prefers-color-scheme: dark)").matches?nr:tr:e}function or(e){"undefined"!=typeof document&&(document.documentElement.dataset.theme=e)}"undefined"!=typeof window&&or(rr(ir()));var ar=t(null);function sr({children:t}){const[n,r]=l(()=>ir()),[s,c]=l(()=>rr(n)),d=i(e=>{r(e);try{localStorage.setItem(er,e),window.dispatchEvent(new Event("storage"))}catch{}},[]);o(()=>{const e=rr(n);c(e),or(e)},[n]),o(()=>{if("system"!==n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{const t=e.matches?nr:tr;c(t),or(t)};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[n]),o(()=>{const e=()=>{const e=ir();e!==n&&r(e)};window.addEventListener("storage",e);const t=new MutationObserver(()=>{const e=document.documentElement.dataset.theme;if(e&&e!==s){c(e);const t=ir();t!==n&&r(t)}});return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>{window.removeEventListener("storage",e),t.disconnect()}},[n,s]);const u=s===nr,h=a(()=>({theme:s,mode:n,isDark:u,setMode:d}),[s,n,u,d]);return e.createElement(ar.Provider,{value:h},t)}var lr={"modal-mask":"_modal-mask_dzv9e_4","modal-mask-visible":"_modal-mask-visible_dzv9e_18",modal:"_modal_dzv9e_4","modal-header":"_modal-header_dzv9e_34","modal-title":"_modal-title_dzv9e_41","modal-close":"_modal-close_dzv9e_46","modal-body":"_modal-body_dzv9e_62","modal-footer":"_modal-footer_dzv9e_67"},cr=K.bind(lr),dr=({open:e,title:t,width:n=520,onCancel:i,footer:r,className:a="",children:s})=>{const l=()=>{i?.()};if(o(()=>{if(!e)return;const t=e=>{"Escape"===e.key&&l()};return document.addEventListener("keydown",t),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[e]),!e)return null;const c=/* @__PURE__ */z("div",{className:cr("modal-mask","modal-mask-visible"),onClick:e=>{e.target===e.currentTarget&&l()},children:/* @__PURE__ */$("div",{className:cr("modal",a),style:{width:n},onClick:e=>{e.stopPropagation()},children:[
13
- /* @__PURE__ */$("div",{className:cr("modal-header"),children:[/* @__PURE__ */z("span",{className:cr("modal-title"),children:t}),/* @__PURE__ */z("div",{className:cr("modal-close"),onClick:l,children:"×"})]}),
14
- /* @__PURE__ */z("div",{className:cr("modal-body"),children:s}),null!=r&&/* @__PURE__ */z("div",{className:cr("modal-footer"),children:r})]})});return Y(c,document.body)},ur={mermaid:"https://registry.npmmirror.com/mermaid/11.17.2/files/dist/mermaid.min.js"};var hr=null;function pr(e){return hr||(hr=new Promise((t,n)=>{if(window.mermaid)return void t(window.mermaid);const i=document.createElement("script");i.src=function(e,t){return t?.[e]??ur[e]??""}("mermaid",e),i.onload=()=>t(window.mermaid),i.onerror=()=>n(/* @__PURE__ */new Error("Mermaid 脚本加载失败")),document.head.appendChild(i)})),hr}var mr=0;function fr({source:e,debounceMs:t=300,isDark:n,chartConfig:i,cdn:r}){const{mermaid:a,loading:c}=function(e){const[t,n]=l(null),[i,r]=l(!0),[a,s]=l(null);return o(()=>{let t=!1;return pr(e).then(e=>{t||(n(()=>e),r(!1))}).catch(e=>{t||(s(e),r(!1))}),()=>{t=!0}},[]),{mermaid:t,loading:i,error:a}}(r),[d,u]=l(""),[h,p]=l(""),m=s(0);return o(()=>{a&&a.initialize({startOnLoad:!1,theme:n?"dark":"default",securityLevel:"loose"})},[a,n]),o(()=>{if(!a)return;const n=(e||"").trim();if(!n)return u(""),void p("");p("");const r=++m.current,o=setTimeout(async()=>{const e="mermaid-render-"+mr++;try{const{svg:t}=await a.render(e,i?i(n):n);if(r!==m.current)return;u(t),p("")}catch(t){if(r!==m.current)return;console.error("Mermaid render error:",t);const e=t instanceof Error?t.message:String(t);p(e?.split("\n")[0]||e)}finally{const t=document.getElementById(e)||document.getElementById(`d${e}`);t&&t.parentNode&&t.parentNode.removeChild(t)}},t);return()=>clearTimeout(o)},[e,n,a,t,i]),{svg:d,error:h,loading:c}}"undefined"!=typeof window&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}));var vr,gr="undefined"!=typeof document&&!!document.documentMode;function wr(){return vr||(vr=document.createElement("div").style)}var br=["webkit","moz","ms"],yr={};function kr(e){if(yr[e])return yr[e];const t=wr();if(e in t)return yr[e]=e;const n=e[0].toUpperCase()+e.slice(1);let i=br.length;for(;i--;){const r=`${br[i]}${n}`;if(r in t)return yr[e]=r}}function xr(e,t){return parseFloat(t[kr(e)])||0}function Sr(e,t,n=window.getComputedStyle(e)){const i="border"===t?"Width":"";return{left:xr(`${t}Left${i}`,n),right:xr(`${t}Right${i}`,n),top:xr(`${t}Top${i}`,n),bottom:xr(`${t}Bottom${i}`,n)}}function Cr(e,t,n){e.style[kr(t)]=n}function _r(e){let t=e.parentNode;t&&1===t.nodeType||(t=document.documentElement);const n=window.getComputedStyle(e),i=window.getComputedStyle(t),r=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:n,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:Sr(e,"margin",n),border:Sr(e,"border",n)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:Sr(t,"padding",i),border:Sr(t,"border",i)}}}var Er={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};function Tr(e,t,n,i){Er[e].split(" ").forEach(e=>{t.addEventListener(e,n,i)})}function Ar(e,t,n){Er[e].split(" ").forEach(e=>{t.removeEventListener(e,n)})}function Mr(e,t){let n=e.length;for(;n--;)if(e[n].pointerId===t.pointerId)return n;return-1}function Or(e,t){let n;if(t.touches){n=0;for(const i of t.touches)i.pointerId=n++,Or(e,i)}else n=Mr(e,t),n>-1&&e.splice(n,1),e.push(t)}function Lr(e){let t,n=(e=e.slice(0)).pop();for(;t=e.pop();)n={clientX:(t.clientX-n.clientX)/2+n.clientX,clientY:(t.clientY-n.clientY)/2+n.clientY};return n}function Ir(e){if(e.length<2)return 0;const t=e[0],n=e[1];return Math.sqrt(Math.pow(Math.abs(n.clientX-t.clientX),2)+Math.pow(Math.abs(n.clientY-t.clientY),2))}function Nr(e,t){return 1===e.nodeType&&` ${function(e){return(e.getAttribute("class")||"").trim()}(e)} `.indexOf(` ${t} `)>-1}"undefined"!=typeof window&&("function"==typeof window.PointerEvent?Er={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:"function"==typeof window.TouchEvent&&(Er={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));var Pr=/^http:[\w\.\/]+svg$/;var zr={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:function(e,{x:t,y:n,scale:i,isSVG:r},o){if(Cr(e,"transform",`scale(${i}) translate(${t}px, ${n}px)`),r&&gr){const t=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",t)}},startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function $r(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(1!==e.nodeType)throw new Error("Panzoom requires an element with a nodeType of 1");if(!function(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...zr,...t};const n=function(e){return Pr.test(e.namespaceURI)&&"svg"!==e.nodeName.toLowerCase()}(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,Cr(e,"transformOrigin","string"==typeof t.origin?t.origin:n?"0 0":"50% 50%");let r,o,a,s,l,c,d=0,u=0,h=1,p=!1;function m(t,n,i){if(i.silent)return;const r=new CustomEvent(t,{detail:n});e.dispatchEvent(r)}function f(t,i,r){const o={x:d,y:u,scale:h,isSVG:n,originalEvent:r};return requestAnimationFrame(()=>{"boolean"==typeof i.animate&&(i.animate?function(e,t){Cr(e,"transition",`${kr("transform")} ${t.duration}ms ${t.easing}`)}(e,i):Cr(e,"transition","none")),i.setTransform(e,o,i),m(t,o,i),m("panzoomchange",o,i)}),o}function v(n,i,r,o){const a={...t,...o},s={x:d,y:u,opts:a};if(!o?.force&&(a.disablePan||a.panOnlyWhenZoomed&&h===a.startScale))return s;if(n=parseFloat(n),i=parseFloat(i),a.disableXAxis||(s.x=(a.relative?d:0)+n),a.disableYAxis||(s.y=(a.relative?u:0)+i),a.contain){const t=_r(e),n=t.elem.width/h,i=t.elem.height/h,o=n*r,l=i*r,c=(o-n)/2,d=(l-i)/2;if("inside"===a.contain){const e=(-t.elem.margin.left-t.parent.padding.left+c)/r,n=(t.parent.width-o-t.parent.padding.left-t.elem.margin.left-t.parent.border.left-t.parent.border.right+c)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-t.elem.margin.top-t.parent.padding.top+d)/r,a=(t.parent.height-l-t.parent.padding.top-t.elem.margin.top-t.parent.border.top-t.parent.border.bottom+d)/r;s.y=Math.max(Math.min(s.y,a),i)}else if("outside"===a.contain){const e=(-(o-t.parent.width)-t.parent.padding.left-t.parent.border.left-t.parent.border.right+c)/r,n=(c-t.parent.padding.left)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-(l-t.parent.height)-t.parent.padding.top-t.parent.border.top-t.parent.border.bottom+d)/r,a=(d-t.parent.padding.top)/r;s.y=Math.max(Math.min(s.y,a),i)}}return a.roundPixels&&(s.x=Math.round(s.x),s.y=Math.round(s.y)),s}function g(n,i){const r={...t,...i},o={scale:h,opts:r};if(!i?.force&&r.disableZoom)return o;let a=t.minScale,s=t.maxScale;if(r.contain){const n=_r(e),i=n.elem.width/h,r=n.elem.height/h;if(i>1&&r>1){const e=(n.parent.width-n.parent.border.left-n.parent.border.right)/i,o=(n.parent.height-n.parent.border.top-n.parent.border.bottom)/r;"inside"===t.contain?s=Math.min(s,e,o):"outside"===t.contain&&(a=Math.max(a,e,o))}}return o.scale=Math.min(Math.max(n,a),s),o}function w(e,t,i,r){const o=v(e,t,h,i);return d!==o.x||u!==o.y?(d=o.x,u=o.y,f("panzoompan",o.opts,r)):{x:d,y:u,scale:h,isSVG:n,originalEvent:r}}function b(e,t,n){const i=g(e,t),r=i.opts;if(!t?.force&&r.disableZoom)return;e=i.scale;let o=d,a=u;if(r.focal){const t=r.focal;o=(t.x/e-t.x/h+d*e)/e,a=(t.y/e-t.y/h+u*e)/e}const s=v(o,a,e,{relative:!1,force:!0});return d=s.x,u=s.y,h=e,f("panzoomzoom",r,n)}function y(e,n){const i={...t,animate:!0,...n};return b(h*Math.exp((e?1:-1)*i.step),i)}function k(t,i,r,o){const a=_r(e),s=a.parent.width-a.parent.padding.left-a.parent.padding.right-a.parent.border.left-a.parent.border.right,l=a.parent.height-a.parent.padding.top-a.parent.padding.bottom-a.parent.border.top-a.parent.border.bottom;let c=i.clientX-a.parent.left-a.parent.padding.left-a.parent.border.left-a.elem.margin.left,d=i.clientY-a.parent.top-a.parent.padding.top-a.parent.border.top-a.elem.margin.top;n||(c-=a.elem.width/h/2,d-=a.elem.height/h/2);return b(t,{...r,animate:!1,focal:{x:c/s*(s*t),y:d/l*(l*t)}},o)}b(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{w(t.startX,t.startY,{animate:!1,force:!0})});const x=[];function S(e){if(function(e,t){for(let n=e;null!=n;n=n.parentNode)if(Nr(n,t.excludeClass)||t.exclude.indexOf(n)>-1)return!0;return!1}(e.target,t))return;Or(x,e),p=!0,t.handleStartEvent(e),r=d,o=u,m("panzoomstart",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t);const i=Lr(x);a=i.clientX,s=i.clientY,l=h,c=Ir(x)}function C(e){if(!p||void 0===r||void 0===o||void 0===a||void 0===s)return;Or(x,e);const n=Lr(x),i=x.length>1;let d=h;i&&(0===c&&(c=Ir(x)),d=g((Ir(x)-c)*t.step/80+l).scale,k(d,n,{animate:!1},e)),i&&!t.pinchAndPan||w(r+(n.clientX-a)/d,o+(n.clientY-s)/d,{animate:!1},e)}function _(e){1===x.length&&m("panzoomend",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t),function(e,t){if(t.touches){for(;e.length;)e.pop();return}const n=Mr(e,t);n>-1&&e.splice(n,1)}(x,e),p&&(p=!1,r=o=a=s=void 0)}let E=!1;function T(){E||(E=!0,Tr("down",t.canvas?i:e,S),Tr("move",document,C,{passive:!0}),Tr("up",document,_,{passive:!0}))}return t.noBind||T(),{bind:T,destroy:function(){E=!1,Ar("down",t.canvas?i:e,S),Ar("move",document,C),Ar("up",document,_)},eventNames:Er,getPan:()=>({x:d,y:u}),getScale:()=>h,getOptions:()=>function(e){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(t),handleDown:S,handleMove:C,handleUp:_,pan:w,reset:function(e){const n={...t,animate:!0,force:!0,...e};h=g(n.startScale,n).scale;const i=v(n.startX,n.startY,h,n);return d=i.x,u=i.y,f("panzoomreset",n)},resetStyle:function(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",Cr(e,"transformOrigin","")},setOptions:function(n={}){for(const e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);(n.hasOwnProperty("cursor")||n.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),n.hasOwnProperty("overflow")&&(i.style.overflow=n.overflow),n.hasOwnProperty("touchAction")&&(i.style.touchAction=n.touchAction,e.style.touchAction=n.touchAction)},setStyle:(t,n)=>Cr(e,t,n),zoom:b,zoomIn:function(e){return y(!0,e)},zoomOut:function(e){return y(!1,e)},zoomToPoint:k,zoomWithWheel:function(e,n){e.preventDefault();const i={...t,...n,animate:!1};return k(g(h*Math.exp(((0===e.deltaY&&e.deltaX?e.deltaX:e.deltaY)<0?1:-1)*i.step/3),i).scale,e,i,e)}}}$r.defaultOptions=zr;var jr={tooltip:"_tooltip_1kuma_4","tooltip-trigger":"_tooltip-trigger_1kuma_7","tooltip-inner":"_tooltip-inner_1kuma_11","tooltip-inner-visible":"_tooltip-inner-visible_1kuma_27","tooltip-content":"_tooltip-content_1kuma_30","tooltip-arrow":"_tooltip-arrow_1kuma_36"},Dr=K.bind(jr),Rr=({title:e,children:t,visible:n,onVisibleChange:i})=>{const[r,a]=l(!1),c=s(null),d=s(null),[u,h]=l({top:0,left:0}),p=void 0!==n?n:r,m=()=>{if(d.current){const e=d.current.getBoundingClientRect();h({top:e.top-8,left:e.left+e.width/2})}};o(()=>{if(!p)return;const e=()=>m(),t=()=>m();return window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),m(),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[p]),o(()=>()=>{c.current&&window.clearTimeout(c.current)},[]);const f=p&&e?Y(/* @__PURE__ */$("div",{className:Dr("tooltip-inner","tooltip-inner-visible"),style:{top:u.top,left:u.left},children:[/* @__PURE__ */z("span",{className:Dr("tooltip-content"),children:e}),/* @__PURE__ */z("span",{className:Dr("tooltip-arrow")})]}),document.body):null;/* @__PURE__ */
15
- return $("div",{ref:d,className:Dr("tooltip"),onMouseEnter:()=>{c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{m(),a(!0),i?.(!0)},150)},onMouseLeave:()=>{c.current&&(window.clearTimeout(c.current),c.current=null),a(!1),i?.(!1)},children:[/* @__PURE__ */z("div",{className:Dr("tooltip-trigger"),children:t}),f]})},Br={dropdown:"_dropdown_13j0u_4","dropdown-trigger":"_dropdown-trigger_13j0u_8","dropdown-menu":"_dropdown-menu_13j0u_12","dropdown-menu-visible":"_dropdown-menu-visible_13j0u_26","dropdown-item":"_dropdown-item_13j0u_30"},Hr=K.bind(Br),Fr=({items:e,children:t,onClick:n,className:i=""})=>{const[r,a]=l(!1),c=s(null),d=()=>{a(!1)};return o(()=>{const e=e=>{c.current&&!c.current.contains(e.target)&&d()};return r&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),/* @__PURE__ */$("div",{ref:c,className:Hr("dropdown",i),children:[/* @__PURE__ */z("div",{className:Hr("dropdown-trigger"),onClick:()=>{a(e=>!e)},children:t}),r&&/* @__PURE__ */z("div",{className:Hr("dropdown-menu","dropdown-menu-visible"),children:e.map(e=>/* @__PURE__ */z("div",{className:Hr("dropdown-item"),onClick:()=>(e=>{n({key:e.key}),d()})(e),children:e.label},e.key))})]})};function qr({showSourceView:e,showCollapse:t,showDownload:n,isFullscreen:i,isCollapsed:r,isMinimize:o,isPanzoomActive:a,isPanzoomAvailable:s,isPanzoomEnabled:l,setIsPanzoomEnabled:c,setIsMinimize:d,setIsCollapsed:u,setShowSource:h,toggleFullscreen:p,downloadMenu:f,panzoomRef:S}){/* @__PURE__ */
16
- return z("div",{className:"mermaid-toolbar",children:[{isShow:e&&r&&!i,icon:/* @__PURE__ */z(o?b:x,{}),tooltip:o?"缩略图":"最小化",onClick:()=>d(e=>!e),className:"mermaid-minimize-btn"},{isShow:s,icon:/* @__PURE__ */z(w,{}),tooltip:l?"取消拖拽":"启用拖拽",onClick:()=>c(e=>!e),className:l?"mermaid-panzoom-btn active":"mermaid-panzoom-btn"},{isShow:a,icon:/* @__PURE__ */z(E,{}),tooltip:"放大",onClick:()=>S.current?.zoomIn()},{isShow:a,icon:/* @__PURE__ */z(_,{}),tooltip:"缩小",onClick:()=>S.current?.zoomOut()},{isShow:a,icon:/* @__PURE__ */z(T,{}),tooltip:"重置",onClick:()=>S.current?.reset()},{isShow:n&&a,icon:/* @__PURE__ */z(g,{}),tooltip:"下载",dropdown:f},{isShow:!0,icon:/* @__PURE__ */z(i?y:k,{}),tooltip:i?"退出全屏":"全屏",onClick:p,className:"mermaid-fullscreen-btn"},{isShow:e&&!i,icon:/* @__PURE__ */z(m,{}),tooltip:"查看源码",onClick:()=>h(!0),className:"mermaid-showcode-btn"},{isShow:t&&!i,icon:/* @__PURE__ */z(r?v:L,{}),tooltip:r?"展开":"收起",onClick:()=>u(e=>!e),className:"mermaid-collapsed-btn"}].map(e=>{if(!1===e.isShow)return null;const t=e.className||e.tooltip,n=e.dropdown?/* @__PURE__ */z(Fr,{items:e.dropdown.items,onClick:e.dropdown.onClick,children:/* @__PURE__ */z("div",{className:`remons-markdown-circle ${e.className||""}`,children:e.icon})},t):/* @__PURE__ */z("div",{className:`remons-markdown-circle ${e.className||""}`,onClick:e.onClick,children:e.icon},t);return e.tooltip&&(0,be.IsPC)()?/* @__PURE__ */z(Rr,{title:e.tooltip,children:n},`${t}-tooltip`):n})})}var Wr={previewArea:"_previewArea_1v061_2",previewAreaDisabled:"_previewAreaDisabled_1v061_25",previewContent:"_previewContent_1v061_31",errorTip:"_errorTip_1v061_47",emptyTip:"_emptyTip_1v061_59"},Xr=["pointerdown","mousedown","pointerup","mouseup","click"],Yr=/* @__PURE__ */new WeakMap;function Ur(e,t,n){Vr(e);let i=i=>{let r=i.target;e.contains(r)&&((!n||n(r))&&(i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()),"click"===i.type&&t?.(i))};for(let r of Xr)document.addEventListener(r,i,!0);Yr.set(e,i)}function Vr(e){let t=Yr.get(e);if(t){for(let e of Xr)document.removeEventListener(e,t,!0);Yr.delete(e)}}function Gr(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-i.realHeight-o.width),o.width):"end"===e?Math.max(Math.min(n.top-i?.realHeight+n.height+r,window.innerHeight-i?.realHeight-o.width),o.width):"center"===e?Math.max(Math.min(n.top+n.height/2-i?.realHeight/2,window.innerHeight-i?.realHeight-o.width),o.width):0}function Zr(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-i.realWidth-o.width),o.width):"end"===e?Math.max(Math.min(n.left-i?.realWidth+n.width+r,window.innerWidth-i?.realWidth-o.width),o.width):"center"===e?Math.max(Math.min(n.left+n.width/2-i?.realWidth/2,window.innerWidth-i?.realWidth-o.width),o.width):0}function Kr(e,t,n){let{align:i,side:r}=n,o=n.centered?"over":r,a=n.padding,s=function(e,t){let n=e.wrapper.getBoundingClientRect();return{width:n.width+t,height:n.height+t,realWidth:n.width,realHeight:n.height}}(e,n.offset),l=e.arrow.getBoundingClientRect(),c=t.getBoundingClientRect(),d=c.top-s.height,u=d>=0,h=window.innerHeight-(c.bottom+s.height),p=h>=0,m=c.left-s.width,f=m>=0,v=window.innerWidth-(c.right+s.width),g=v>=0,w=!(u||p||f||g),b=o;if("top"===o&&u?g=f=p=!1:"bottom"===o&&p?g=f=u=!1:"left"===o&&f?g=u=p=!1:"right"===o&&g&&(f=u=p=!1),"over"===o){let t=window.innerWidth/2-s.realWidth/2,n=window.innerHeight/2-s.realHeight/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto"}else if(w){let t=window.innerWidth/2-s?.realWidth/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.bottom="10px",e.wrapper.style.top="auto"}else if(f){let t=Math.min(m,window.innerWidth-s?.realWidth-l.width),n=Gr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="left"}else if(g){let t=Math.min(v,window.innerWidth-s?.realWidth-l.width),n=Gr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.right=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.left="auto",b="right"}else if(u){let t=Math.min(d,window.innerHeight-s.realHeight-l.width),n=Zr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.top=`${t}px`,e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="top"}else if(p){let t=Math.min(h,window.innerHeight-s?.realHeight-l.width),n=Zr(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom=`${t}px`,e.wrapper.style.top="auto",e.wrapper.style.right="auto",b="bottom"}eo(e,w?"over":b,i,t),[...e.wrapper.classList].filter(e=>e.startsWith("driver-popover-side-")||e.startsWith("driver-popover-align-")).forEach(t=>e.wrapper.classList.remove(t)),e.wrapper.classList.add(`driver-popover-side-${b}`),e.wrapper.classList.add(`driver-popover-align-${i}`)}function Jr(e,t,n,i,r,o=10){let a=i-n;return e<=n&&t>=i?"start"===r?15+o/2:"end"===r?a-15-o/2:a/2:(Math.min(Math.max(e,n),i)+Math.min(Math.max(t,n),i))/2-n}function Qr(e,t,n=10){let i=t-15-n;if(i<15)return Math.max(0,(t-n)/2);let r=e-n/2;return Math.min(Math.max(r,15),i)}function eo(e,t,n,i){let r=e.arrow;if(r.className="driver-popover-arrow",r.style.top="",r.style.right="",r.style.bottom="",r.style.left="","over"===t)return void r.classList.add("driver-popover-arrow-none");let o=i.getBoundingClientRect(),a=e.wrapper.getBoundingClientRect(),s=function(e,t,n){return"left"===e||"right"===e?t.bottom>n.top&&t.top<n.bottom?e:t.bottom<=n.top?"bottom":"top":t.right>n.left&&t.left<n.right?e:t.right<=n.left?"right":"left"}(t,o,a);r.classList.add(`driver-popover-arrow-side-${s}`);let l=r.getBoundingClientRect().width||10;if("left"===s||"right"===s){let e=Jr(o.top,o.bottom,a.top,a.bottom,n,l);r.style.top=`${Qr(e,a.height,l)}px`}else{let e=Jr(o.left,o.right,a.left,a.right,n,l);r.style.left=`${Qr(e,a.width,l)}px`}}function to(e){return"function"==typeof e?e():"string"==typeof e?document.querySelector(e):e}function no(e,t,n,i){return(e/=i/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function io(e){let t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(e=>{let n=e.matches(t),i=Array.from(e.querySelectorAll(t));return[...n?[e]:[],...i]}).filter(e=>"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e))}function ro(e,t){if(!e||function(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e))return;let n=e.offsetHeight>window.innerHeight;e.scrollIntoView({behavior:!t||oo(e)?"auto":"smooth",inline:"center",block:n?"start":"center"})}function oo(e){if(!e||!e.parentElement)return;let t=e.parentElement;return t.scrollHeight>t.clientHeight}function ao(e,t){let n=function(){let e=document.createElement("div");e.classList.add("driver-popover");let t=document.createElement("div");t.classList.add("driver-popover-arrow");let n=document.createElement("header");n.id="driver-popover-title",n.classList.add("driver-popover-title"),n.style.display="none",n.innerText="Popover Title";let i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";let r=document.createElement("button");r.type="button",r.classList.add("driver-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="&times;";let o=document.createElement("footer");o.classList.add("driver-popover-footer");let a=document.createElement("span");a.classList.add("driver-popover-progress-text"),a.innerText="";let s=document.createElement("span");s.classList.add("driver-popover-navigation-btns");let l=document.createElement("button");l.type="button",l.classList.add("driver-popover-prev-btn","driver-popover-footer-btn"),l.innerHTML="Previous";let c=document.createElement("button");return c.type="button",c.classList.add("driver-popover-next-btn","driver-popover-footer-btn"),c.innerHTML="Next",s.appendChild(l),s.appendChild(c),o.appendChild(a),o.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(i),e.appendChild(o),{wrapper:e,arrow:t,title:n,description:i,footer:o,previousButton:l,nextButton:c,closeButton:r,footerButtons:s,progress:a}}();document.body.appendChild(n.wrapper);let{title:i,description:r,showButtons:o,disableButtons:a,showProgress:s,nextBtnText:l,prevBtnText:c,progressText:d}=t;n.nextButton.innerHTML=l,n.previousButton.innerHTML=c,n.progress.innerHTML=d,t.doneButton&&n.nextButton.classList.add("driver-popover-done-btn"),i?(n.title.innerHTML=i,n.title.style.display="block"):n.title.style.display="none",r?(n.description.innerHTML=r,n.description.style.display="block"):n.description.style.display="none";let u=o.includes("next")||o.includes("previous")||s;n.closeButton.style.display=o.includes("close")?"block":"none",u?(n.footer.style.display="flex",n.progress.style.display=s?"block":"none",n.nextButton.style.display=o.includes("next")?"block":"none",n.previousButton.style.display=o.includes("previous")?"block":"none"):n.footer.style.display="none",a.includes("next")&&(n.nextButton.disabled=!0,n.nextButton.classList.add("driver-popover-btn-disabled")),a.includes("previous")&&(n.previousButton.disabled=!0,n.previousButton.classList.add("driver-popover-btn-disabled")),a.includes("close")&&(n.closeButton.disabled=!0,n.closeButton.classList.add("driver-popover-btn-disabled"));let h=n.wrapper;h.style.display="block",h.style.left="",h.style.top="",h.style.bottom="",h.style.right="",h.id="driver-popover-content",h.setAttribute("role","dialog"),h.setAttribute("aria-labelledby","driver-popover-title"),h.setAttribute("aria-describedby","driver-popover-description"),n.arrow.className="driver-popover-arrow",h.className=`driver-popover ${t.popoverClass||""}`.trim(),Ur(n.wrapper,e=>{let n=e.target;return n.closest(".driver-popover-next-btn")?t.onNextClick?.():n.closest(".driver-popover-prev-btn")?t.onPrevClick?.():n.closest(".driver-popover-close-btn")?t.onCloseClick?.():void 0},e=>!n.description.contains(e)&&!n.title.contains(e)&&!!e.closest(".driver-popover-prev-btn, .driver-popover-next-btn, .driver-popover-close-btn")),t.onRender?.(n),Kr(n,e,t.position),function(e,t,n){e.wrapper.querySelectorAll("img").forEach(i=>{if(i.complete)return;let r=()=>Kr(e,t,n);i.addEventListener("load",r,{once:!0}),i.addEventListener("error",r,{once:!0})})}(n,e,t.position),ro(h,t.smoothScroll);let p=io([h,e]);return p.length>0&&p[0].focus(),n}function so(e){e&&(Vr(e.wrapper),e.wrapper.parentElement?.removeChild(e.wrapper))}function lo(e,t){let n=window.innerWidth,i=window.innerHeight,r=t.padding,o=t.radius,a=e.width+2*r,s=e.height+2*r,l=Math.min(o,a/2,s/2),c=Math.floor(Math.max(l,0)),d=a-2*c,u=s-2*c;return`M${n},0L0,0L0,${i}L${n},${i}L${n},0Z\n M${e.x-r+c},${e.y-r} h${d} a${c},${c} 0 0 1 ${c},${c} v${u} a${c},${c} 0 0 1 -${c},${c} h-${d} a${c},${c} 0 0 1 -${c},-${c} v-${u} a${c},${c} 0 0 1 ${c},-${c} z`}function co(e,t,n,i,r){let o=e.getState("__activeStagePosition"),a=o||i.getBoundingClientRect(),s=r.getBoundingClientRect();o={x:no(t,a.x,s.x-a.x,n),y:no(t,a.y,s.y-a.y,n),width:no(t,a.width,s.width-a.width,n),height:no(t,a.height,s.height-a.height,n)},po(e,o),e.setState("__activeStagePosition",o)}function uo(e,t){if(!t)return;let n=t.getBoundingClientRect(),i={x:n.x,y:n.y,width:n.width,height:n.height};e.setState("__activeStagePosition",i),po(e,i)}function ho(e,t){let n=function(e,t){let n=window.innerWidth,i=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("driver-overlay","driver-overlay-animated"),r.setAttribute("viewBox",`0 0 ${n} ${i}`),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",lo(t,mo(e))),o.style.fill=e.getConfig("overlayColor")||"rgb(0,0,0)",o.style.opacity=`${e.getConfig("overlayOpacity")}`,o.style.pointerEvents="auto",o.style.cursor="auto",r.appendChild(o),r}(e,t);document.body.appendChild(n),Ur(n,t=>{"path"===t.target.tagName&&e.emit("overlayClick")}),e.setState("__overlaySvg",n)}function po(e,t){let n=e.getState("__overlaySvg");if(!n)return void ho(e,t);let i=n.firstElementChild;if("path"!==i?.tagName)throw Error("no path element found in stage svg");i.setAttribute("d",lo(t,mo(e)))}function mo(e){return{padding:e.getConfig("stagePadding")||0,radius:e.getConfig("stageRadius")||0}}function fo(e){let t=e.getState("__overlaySvg");t&&(Vr(t),t.remove())}var vo="{{current}} of {{total}}";function go(e,t){return!(!(t.skipMissingElement??e.getConfig("skipMissingElement"))||!t.element)&&!to(t.element)}function wo(e,t,n){let i=e.getConfig("steps")||[];for(let r=t;r>=0&&r<i.length;r+=n)if(!go(e,i[r]))return r}function bo(e,t){let n=e.getState("activeIndex"),i=void 0!==n&&void 0===wo(e,n+1,1),r=t?.popover?.onDoneClick||e.getConfig("onDoneClick");return i&&r?r:t?.popover?.onNextClick||e.getConfig("onNextClick")}function yo(e,t){return t?.popover?.onPrevClick||e.getConfig("onPrevClick")}function ko(e,t,n){let i=e.getConfig("stagePadding")||0;return{side:n.popover?.side||"bottom",align:n.popover?.align||"start",offset:i+(e.getConfig("popoverOffset")||0),padding:i,centered:"driver-dummy-element"===t.id}}function xo(e,t,n){so(e.getState("popover")),ao(t,function(e,t,n){let i=n.popover||{},r=e.getState("activeIndex"),o=void 0!==r&&void 0===wo(e,r+1,1);return{title:i.title,description:i.description,showButtons:i.showButtons||e.getConfig("showButtons"),disableButtons:i.disableButtons||e.getConfig("disableButtons")||[],showProgress:i.showProgress||e.getConfig("showProgress")||!1,progressText:i.progressText??(e.getConfig("progressText")||vo),nextBtnText:i.nextBtnText??(e.getConfig("nextBtnText")||"Next"),prevBtnText:i.prevBtnText??(e.getConfig("prevBtnText")||"Previous"),doneButton:o,popoverClass:i.popoverClass||e.getConfig("popoverClass")||"",smoothScroll:e.getConfig("smoothScroll"),onNextClick:()=>{let i=bo(e,n);return i?i(t,n,e.getHookOpts()):e.emit("nextClick")},onPrevClick:()=>{let i=yo(e,n);return i?i(t,n,e.getHookOpts()):e.emit("prevClick")},onCloseClick:()=>{let i=function(e,t){return t?.popover?.onCloseClick||e.getConfig("onCloseClick")}(e,n);return i?i(t,n,e.getHookOpts()):e.emit("closeClick")},onRender:t=>{e.setState("popover",t),(i.onPopoverRender||e.getConfig("onPopoverRender"))?.(t,e.getHookOpts())},position:ko(e,t,n)}}(e,t,n))}function So(e,t){let n=to(t.element);n||(n=function(){let e=document.getElementById("driver-dummy-element");if(e)return e;let t=document.createElement("div");return t.id="driver-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t,n){let i=e.getConfig("duration")||400,r=Date.now(),o=e.getState("__activeStep"),a=e.getState("__activeElement")||t,s=!a||a===t,l="driver-dummy-element"===t.id,c="driver-dummy-element"===a.id,d=e.getConfig("animate"),u=n.onHighlightStarted||e.getConfig("onHighlightStarted"),h=n?.onHighlighted||e.getConfig("onHighlighted"),p=o?.onDeselected||e.getConfig("onDeselected"),m=e.getHookOpts();!s&&p&&p(c?void 0:a,o,m),u&&u(l?void 0:t,n,m);let f=!s&&d,v=!1;(function(e){e&&(e.wrapper.style.display="none")})(e.getState("popover")),e.setState("previousStep",o),e.setState("previousElement",a),e.setState("activeStep",n),e.setState("activeElement",t);let g=()=>{if(e.getState("__transitionCallback")!==g)return;let s=Date.now()-r,c=i-s<=i/2;n.popover&&c&&!v&&f&&(xo(e,t,n),v=!0),e.getConfig("animate")&&s<i?co(e,s,i,a,t):(uo(e,t),h&&h(l?void 0:t,n,e.getHookOpts()),e.setState("__transitionCallback",void 0),e.setState("__previousStep",o),e.setState("__previousElement",a),e.setState("__activeStep",n),e.setState("__activeElement",t)),window.requestAnimationFrame(g)};e.setState("__transitionCallback",g),window.requestAnimationFrame(g),ro(t,e.getConfig("smoothScroll")),!f&&n.popover&&xo(e,t,n),document.querySelectorAll(".driver-active-element-parent").forEach(e=>{e.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll")}),a.classList.remove("driver-active-element","driver-no-interaction"),a.removeAttribute("aria-haspopup"),a.removeAttribute("aria-expanded"),a.removeAttribute("aria-controls"),(n.disableActiveInteraction??e.getConfig("disableActiveInteraction"))&&t.classList.add("driver-no-interaction");let w=t.parentElement;w&&w!==document.body&&(w.classList.add("driver-active-element-parent"),function(e){let t=window.getComputedStyle(e);return[t.overflow,t.overflowX,t.overflowY].some(e=>"auto"===e||"scroll"===e)}(w)&&w.classList.add("driver-active-element-parent-no-scroll")),t.classList.add("driver-active-element"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","true"),t.setAttribute("aria-controls","driver-popover-content")}(e,n,t)}function Co(e){let t=e.getState("__activeElement"),n=e.getState("__activeStep");t&&(uo(e,t),function(e){let t=e.getState("__activeStagePosition"),n=e.getState("__overlaySvg");t&&(n?n.setAttribute("viewBox",`0 0 ${window.innerWidth} ${window.innerHeight}`):console.warn("No stage svg found."))}(e),function(e,t,n){let i=e.getState("popover");i&&Kr(i,t,ko(e,t,n))}(e,t,n))}function _o(e){let t=e.getState("__resizeTimeout");t&&window.cancelAnimationFrame(t),e.setState("__resizeTimeout",window.requestAnimationFrame(()=>Co(e)))}function Eo(e){let t=t=>function(e,t){(e.getConfig("allowKeyboardControl")??!0)&&("Escape"===t.key?e.emit("escapePress"):"ArrowRight"===t.key?e.emit("arrowRightPress"):"ArrowLeft"===t.key&&e.emit("arrowLeftPress"))}(e,t),n=t=>function(e,t){if(!e.getState("isInitialized")||"Tab"!==t.key&&9!==t.keyCode)return;let n=e.getState("__activeElement"),i=e.getState("popover")?.wrapper,r=io([...i?[i]:[],...n?[n]:[]]),o=r[0],a=r[r.length-1];t.preventDefault(),t.shiftKey?(r[r.indexOf(document.activeElement)-1]||a)?.focus():(r[r.indexOf(document.activeElement)+1]||o)?.focus()}(e,t),i=()=>_o(e),r=()=>_o(e),o=t=>function(e,t){let n=e.getState("__activeElement"),i=t.target;!n||!i||!n.contains(i)||e.emit("activeElementClick")}(e,t);e.setState("__events",{onKeyup:t,onKeydown:n,onResize:i,onScroll:r,onClick:o}),window.addEventListener("keyup",t,!1),window.addEventListener("keydown",n,!1),window.addEventListener("resize",i),window.addEventListener("scroll",r),document.addEventListener("click",o,!1)}function To(e={}){let t=function(e={}){let t=function(){let e={};function t(t={}){e={animate:!0,duration:400,allowClose:!0,allowScroll:!0,overlayClickBehavior:"close",overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,advanceOnClick:!1,skipMissingElement:!1,waitForElement:0,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000",...t}}return t(),{getConfig:t=>t?e[t]:e,configure:t}}();t.configure(e);let n,i=function(){let e={};return{getState:t=>t?e[t]:e,setState:(t,n)=>{e[t]=n},resetState:function(){e={}}}}(),r=function(){let e={};return{listen:function(t,n){e[t]=n},emit:function(t){e[t]?.()},reset:function(){e={}}}}();return{getConfig:t.getConfig,setConfig:t.configure,getState:i.getState,setState:i.setState,resetState:i.resetState,listen:r.listen,emit:r.emit,resetEmitter:r.reset,getDriver:()=>n,setDriver:e=>{n=e},getHookOpts:e=>{let r=e||i.getState();return{config:t.getConfig(),state:r,driver:n,index:r.activeIndex}}}}(e);function n(){t.getConfig("allowClose")&&h()}function i(){let e=t.getConfig("overlayClickBehavior");if(t.getConfig("allowClose")&&"close"===e)h();else{if("function"==typeof e){let n=t.getState("__activeStep");return void e(t.getState("__activeElement"),n,t.getHookOpts())}if("nextStep"===e){let e=t.getState("activeStep"),n=t.getState("activeElement"),i=bo(t,e);if(i)return void i(n,e,t.getHookOpts());r()}}}function r(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e+1;n[i]?u(i):h()}function o(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e-1;n[i]?u(i):h()}function a(){if(t.getState("__transitionCallback"))return;let e=t.getState("__activeStep");if(!e||!(e.advanceOnClick??t.getConfig("advanceOnClick")))return;let n=t.getState("__activeElement"),i=bo(t,e);i?i(n,e,t.getHookOpts()):r()}function s(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n||!(t.getConfig("steps")||[])[e-1])return;let r=yo(t,n);if(r)return r(i,n,t.getHookOpts());o()}function l(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n)return;let o=bo(t,n);if(o)return o(i,n,t.getHookOpts());r()}function c(){t.getState("isInitialized")||(t.setState("isInitialized",!0),document.body.classList.add("driver-active",t.getConfig("animate")?"driver-fade":"driver-simple"),t.getConfig("allowScroll")||document.body.classList.add("driver-no-scroll"),document.body.style.setProperty("--driver-animation-duration",`${t.getConfig("duration")||400}ms`),Eo(t),t.listen("overlayClick",i),t.listen("activeElementClick",a),t.listen("escapePress",n),t.listen("closeClick",n),t.listen("arrowLeftPress",s),t.listen("arrowRightPress",l))}function d(){let e=t.getState("__pendingWaitCancel");e&&(t.setState("__pendingWaitCancel",void 0),e())}function u(e=0,n=!1){d();let i=t.getConfig("steps");if(!i)return console.error("No steps to drive through"),void h();if(!i[e])return void h();let r=i[e],o=r.waitForElement??t.getConfig("waitForElement")??0;if(!n&&o>0&&r.element&&!to(r.element))return void function(e,n,i){let r=()=>{o.disconnect(),window.clearTimeout(a),t.setState("__pendingWaitCancel",void 0),i()},o=new MutationObserver(()=>{to(e.element)&&r()}),a=window.setTimeout(r,n);t.setState("__pendingWaitCancel",()=>{o.disconnect(),window.clearTimeout(a)}),o.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})}(r,o,()=>u(e,!0));if(go(t,r)){let n=t.getState("activeIndex"),r="number"==typeof n&&e<n?-1:1;return void(i[e+r]?u(e+r):1===r&&h())}t.setState("__activeOnDestroyed",document.activeElement),t.setState("activeIndex",e);let a=i[e+1];So(t,function(e,t,n){let i=e.getConfig("steps")||[],r=i[t],o=r.popover||{},a=void 0!==wo(e,t+1,1),s=void 0!==wo(e,t-1,-1),l=o.doneBtnText||e.getConfig("doneBtnText")||"Done",c=e.getConfig("allowClose"),d=void 0===o.showProgress?e.getConfig("showProgress"):o.showProgress,u=(o.progressText||e.getConfig("progressText")||vo).replace("{{current}}",`${t+1}`).replace("{{total}}",`${i.length}`),h=o.showButtons||e.getConfig("showButtons"),p=["next","previous",...c?["close"]:[]].filter(e=>!h?.length||h.includes(e)),m=o.onNextClick||e.getConfig("onNextClick"),f=o.onPrevClick||e.getConfig("onPrevClick"),v=o.onCloseClick||e.getConfig("onCloseClick");return{...r,popover:{showButtons:p,nextBtnText:a?void 0:l,disableButtons:[...s?[]:["previous"]],showProgress:d,onNextClick:m||n.onNextClick,onPrevClick:f||n.onPrevClick,onCloseClick:v||n.onCloseClick,...o,progressText:u}}}(t,e,{onNextClick:()=>{a?u(e+1):h()},onPrevClick:()=>{u(e-1)},onCloseClick:()=>{h()}}))}function h(e=!0){let n=t.getState("__activeElement"),i=t.getState("__activeStep"),r=t.getState("__activeOnDestroyed"),o=t.getConfig("onDestroyStarted");if(e&&o)return void o(n&&"driver-dummy-element"!==n?.id?n:void 0,i,t.getHookOpts());let a=i?.onDeselected||t.getConfig("onDeselected"),s=t.getConfig("onDestroyed");document.body.classList.remove("driver-active","driver-fade","driver-simple","driver-no-scroll"),document.body.style.removeProperty("--driver-animation-duration"),d(),function(e){let t=e.getState("__events");t&&(window.removeEventListener("keyup",t.onKeyup),window.removeEventListener("keydown",t.onKeydown),window.removeEventListener("resize",t.onResize),window.removeEventListener("scroll",t.onScroll),document.removeEventListener("click",t.onClick,!1))}(t),so(t.getState("popover")),document.getElementById("driver-dummy-element")?.remove(),document.querySelectorAll(".driver-active-element").forEach(e=>{let t=e.parentElement;t&&t!==document.body&&t.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll"),e.classList.remove("driver-active-element","driver-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}),fo(t),t.resetEmitter();let l=t.getState();if(t.resetState(),n&&i){let e="driver-dummy-element"===n.id;a&&a(e?void 0:n,i,t.getHookOpts(l)),s&&s(e?void 0:n,i,t.getHookOpts(l))}r&&r.focus()}let p={isActive:()=>t.getState("isInitialized")||!1,refresh:()=>_o(t),drive:(e=0)=>{c(),u(e)},setConfig:t.setConfig,setSteps:e=>{d(),t.resetState(),t.setConfig({...t.getConfig(),steps:e})},getConfig:t.getConfig,getState:t.getState,getActiveIndex:()=>t.getState("activeIndex"),isFirstStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===wo(t,e-1,-1)},isLastStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===wo(t,e+1,1)},getActiveStep:()=>t.getState("activeStep"),getActiveElement:()=>t.getState("activeElement"),getPreviousElement:()=>t.getState("previousElement"),getPreviousStep:()=>t.getState("previousStep"),getNextStep:()=>{let e=t.getConfig("steps")||[],n=t.getState("activeIndex");if(void 0===n)return;let i=wo(t,n+1,1);return void 0===i?void 0:e[i]},moveNext:r,movePrevious:o,moveTo:function(e){(t.getConfig("steps")||[])[e]?u(e):h()},hasNextStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==wo(t,e+1,1)},hasPreviousStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==wo(t,e-1,-1)},highlight:e=>{c(),So(t,{...e,popover:e.popover?{showButtons:[],showProgress:!1,progressText:"",...e.popover}:void 0})},destroy:()=>{h(!1)}};return t.setDriver(p),p}var Ao=null,Mo=[];var Oo="docList-mermaid-driver",Lo="docList-menu-driver",Io="docList-pc-menu-driver";async function No(t){const n=document.querySelectorAll("code.language-mermaid"),{showDriverGuide:i,isPrintPreview:r=!1,chartConfig:o,defaultCollapsed:a=!0,cdn:s}=t||{};for(const l of n){const t=l.parentElement;if(!t)continue;const n=l.textContent.trim(),c=document.createElement("div");c.className="mermaid-react-root",t.replaceWith(c),N(c).render(/* @__PURE__ */z(e.StrictMode,{children:/* @__PURE__ */z(sr,{children:/* @__PURE__ */z(zo,{source:n,enablePanzoom:!0,showDownload:!0,showSourceView:!0,showCollapse:!0,chartConfig:o,defaultCollapsed:a,isPrintPreview:r,minHeight:200,showDriverGuide:i,cdn:s})})}))}}var Po=/* @__PURE__ */G({default:()=>zo,renderMermaid:()=>$o,renderMermaidWithControls:()=>No}),zo=n(function({source:e,debounceMs:t=300,enablePanzoom:n=!0,showDownload:c=!0,showSourceView:d=!1,showCollapse:u=!1,defaultCollapsed:h=!0,className:p="",minHeight:m=200,showDriverGuide:f,isPrintPreview:v=!1,chartConfig:g,cdn:w}){const{isDark:b}=function(){const e=r(ar);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}(),{svg:y,error:k,loading:x}=fr({source:e,debounceMs:t,isDark:b,chartConfig:g,cdn:w}),S=s(null),_=s(null),{isFullscreen:E,isCollapsed:T,setIsCollapsed:A,showSource:M,setShowSource:O,isMinimize:L,setIsMinimize:I,isPanzoomEnabled:N,setIsPanzoomEnabled:j,toggleFullscreen:D}=function({showCollapse:e,showSourceView:t,defaultCollapsed:n,isPrintPreview:r,svg:a,error:s,loading:c,wrapperRef:d}){const[u,h]=l(!1),[p,m]=l(n),[f,v]=l(!1),[g,w]=l(t),[b,y]=l(!1);return o(()=>{r&&a&&!s&&!c&&m(!1)},[r,a,s,c]),o(()=>{const t=()=>{h(!!document.fullscreenElement),!document.fullscreenElement&&e&&m(!0)};return r||document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[e,r]),{isFullscreen:u,setIsFullscreen:h,isCollapsed:p,setIsCollapsed:m,showSource:f,setShowSource:v,isMinimize:g,setIsMinimize:w,isPanzoomEnabled:b,setIsPanzoomEnabled:y,toggleFullscreen:i(()=>{document.fullscreenElement?document.exitFullscreen():d.current?.requestFullscreen?.()},[d])}}({showCollapse:u,showSourceView:d,defaultCollapsed:h,isPrintPreview:v,svg:y,error:k,loading:x,wrapperRef:S}),R=n&&(E||!T||!u),B=R&&N,H=function({contentRef:e,wrapperRef:t,enabled:n,svg:i,isFullscreen:r}){const a=s(null);return o(()=>{if(!n||!e.current||!i)return void(a.current&&(a.current.destroy(),a.current=null));a.current&&(a.current.destroy(),a.current=null);const r=$r(e.current,{maxScale:5,minScale:.1,startScale:1,contain:"outside"});a.current={destroy:()=>r.destroy(),zoomWithWheel:r.zoomWithWheel,zoomIn:()=>r.zoomIn(),zoomOut:()=>r.zoomOut(),reset:()=>r.reset()};const o=t.current,s=a.current.zoomWithWheel;return o?.addEventListener("wheel",s),()=>{o?.removeEventListener("wheel",s),a.current&&(a.current.destroy(),a.current=null)}},[i,r,n,e,t]),a}({contentRef:_,wrapperRef:S,enabled:B&&!!y&&!v,svg:y,isFullscreen:E});o(()=>{f&&!v&&function(e){if(Mo=e,Ao)return;const t=e=>{const n=Mo;if(e>=n.length)return void(Ao=null);const i=n[e];if(i.condition&&!i.condition())return void t(e+1);i?.onOpen?.();const r=To({nextBtnText:"下一步",prevBtnText:"上一步",doneBtnText:"我知道了",showProgress:!0,allowClose:!1,progressText:"第 {{current}} 步,共 {{total}} 步",onDestroyed:()=>{Ao=null,t(e+1)},steps:i.steps.filter(e=>!1!==e.isShow)||[]});Ao=r,r.drive()};t(0)}(function(e,t){return[{id:Lo,condition:()=>!localStorage[Lo]&&e&&!(0,be.IsPC)()&&"true"!==localStorage.docListMenuVisible,onOpen:()=>{localStorage[Lo]="1"},steps:[{element:".docList-menu-list",popover:{title:"列表",description:"点击此处您可查看当前分类下文章列表"}},{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}}]},{id:Io,condition:()=>!localStorage[Io]&&(0,be.IsPC)()&&e,onOpen:()=>{localStorage[Io]="1"},steps:[{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}},{element:".docList-menu-mermaid-collapse",popover:{title:"展开收起mermaid",description:"点击此处按钮可一键展开收起mermaid图表"},isShow:t}]},{id:Oo,condition:()=>!(!t||localStorage[Oo]||!e),onOpen:()=>{localStorage[Oo]="1"},steps:[{element:".mermaid-react-root",popover:{title:"mermaid",description:"恭喜您解锁 Mermaid 渲染图表"}},{element:".mermaid-react-root .mermaid-minimize-btn",popover:{title:"缩略图",description:"点击此处按钮可查看缩略图"}},{element:".mermaid-react-root .mermaid-fullscreen-btn",popover:{title:"全屏",description:"点击此处按钮可切换为全屏展示"}},{element:".mermaid-react-root .mermaid-showcode-btn",popover:{title:"源码",description:"点击此处按钮查看源码弹窗"}},{element:".mermaid-react-root .mermaid-collapsed-btn",popover:{title:"展开",description:"点击此处按钮展开大图"}}]}]}(d,!!y))},[y,f,v,d]);const F=function(e){const t=e.match(/---\s*\n\s*title:\s*(.+)\s*\n\s*---/);return t?t[1].trim():"mermaid 图表"}(e),q=i(()=>{y?function(e,t="image"){Ji(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),`${t}.svg`)}(y,F):re.warning("暂无图表")},[y,F]),W=i(()=>{y?Qi(y,F,2):re.warning("暂无图表")},[y,F]),X=a(()=>({items:[{key:"svg",label:"下载 SVG"},{key:"png",label:"下载 PNG"}],onClick:({key:e})=>"svg"===e?q():W()}),[q,W]),Y=!!y;/* @__PURE__ */
17
- return $("div",{ref:S,className:K.bind(Wr)(E?"mermaid-wrapper-fullscreen":"",u?"mermaid-wrapper":"",T&&u&&!L?"mermaid-collapsed":"",p,L&&T&&!E?"mermaid-mini":"",v?"print-preview":""),style:{minHeight:L?0:m,position:"relative",height:"100%"},children:[!v&&/* @__PURE__ */$(P,{children:[d&&/* @__PURE__ */$("div",{className:"mermaid-title",children:[/* @__PURE__ */$("span",{className:"mermaid-title-tag",children:[/* @__PURE__ */z("img",{src:"data:image/svg+xml,%3csvg%20t='1784097187016'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5199'%20width='200'%20height='200'%3e%3cpath%20d='M0%200m125.754386%200l772.491228%200q125.754386%200%20125.754386%20125.754386l0%20772.491228q0%20125.754386-125.754386%20125.754386l-772.491228%200q-125.754386%200-125.754386-125.754386l0-772.491228q0-125.754386%20125.754386-125.754386Z'%20fill='%23FC366E'%20p-id='5200'%3e%3c/path%3e%3cpath%20d='M921.150877%20174.547088a417.091368%20417.091368%200%200%200-409.168842%20274.198456%20417.235088%20417.235088%200%200%200-409.150877-274.198456%20417.360842%20417.360842%200%200%200%20181.625263%20361.992982%20223.914667%20223.914667%200%200%201%2097.010526%20185.038597v128.143719h261.084071v-128.07186a223.914667%20223.914667%200%200%201%2097.010526-185.038596%20417.181193%20417.181193%200%200%200%20181.553403-361.921123z'%20fill='%23FFFFFF'%20p-id='5201'%3e%3c/path%3e%3c/svg%3e",alt:""}),/* @__PURE__ */z("span",{className:"mermaid-title-text",children:"Mermaid"})]}),F]}),!Y&&/* @__PURE__ */$("div",{className:"mermaid-toolbar-loading",children:[/* @__PURE__ */z(C,{})," "]}),Y&&/* @__PURE__ */z(qr,{showSourceView:d,showCollapse:u,showDownload:c,isFullscreen:E,isCollapsed:T,isMinimize:L,isPanzoomActive:B,isPanzoomAvailable:R,isPanzoomEnabled:N,setIsPanzoomEnabled:j,setIsMinimize:I,setIsCollapsed:A,setShowSource:O,toggleFullscreen:()=>{H.current?.reset(),D()},downloadMenu:X,panzoomRef:H})]}),k&&/* @__PURE__ */$("div",{className:Wr.errorTip,children:["⚠️ ",k]}),
18
- /* @__PURE__ */$("div",{className:`${Wr.previewArea} ${B?"":Wr.previewAreaDisabled}`,style:{minHeight:Y?"auto":m},children:[/* @__PURE__ */z("div",{ref:_,className:Wr.previewContent,dangerouslySetInnerHTML:{__html:y||""}}),(!Y&&!k||x)&&/* @__PURE__ */z("div",{className:Wr.emptyTip,children:e?.trim()?"渲染中...":"← 输入 Mermaid 源码"})]}),d&&/* @__PURE__ */z(dr,{open:M,title:"Mermaid 源码",className:"mermaid-code-modal",width:(0,be.IsPC)()?800:"calc(100% - 20px)",onCancel:()=>O(!1),footer:null,children:/* @__PURE__ */z(Zi,{isShowCollapsed:!1,isSlotMermaid:!1,codeType:"mermaid",content:e})})]})}),$o=e=>/* @__PURE__ */z(sr,{children:/* @__PURE__ */z(zo,{...e})}),jo=Zi;export{Wi as MD_PERSIST_ATTR,jo as default,ki as initHighlighter,Ki as languagesCommon,yi as markdownFormat,$o as renderMermaid,Yi as useIncrementalRender};
1
+ import e,{createContext as t,forwardRef as n,useCallback as i,useContext as r,useEffect as o,useLayoutEffect as a,useMemo as s,useRef as l,useState as c}from"react";import{CaretDownOutlined as d,CaretRightOutlined as u,CheckCircleOutlined as h,CloseCircleOutlined as p,CloseOutlined as m,CodeOutlined as f,CopyFilled as v,DownOutlined as g,DownloadOutlined as w,DragOutlined as b,ExportOutlined as y,FullscreenExitOutlined as k,FullscreenOutlined as x,ImportOutlined as S,InfoCircleOutlined as C,LoadingOutlined as _,MinusOutlined as E,PlusOutlined as A,ReloadOutlined as T,RightOutlined as M,SearchOutlined as O,UnorderedListOutlined as L,UpOutlined as I,WarningOutlined as N}from"@ant-design/icons";import{createRoot as P}from"react-dom/client";import{Fragment as z,jsx as $,jsxs as j}from"react/jsx-runtime";import D from"markdown-it";import R from"highlight.js/lib/core";import B from"highlight.js/lib/languages/javascript";import H from"highlight.js/lib/languages/typescript";import q from"highlight.js/lib/languages/css";import F from"highlight.js/lib/languages/json";import W from"highlight.js/lib/languages/bash";import X from"highlight.js/lib/languages/xml";import Y from"highlight.js/lib/languages/plaintext";import{createPortal as U}from"react-dom";var V=Object.defineProperty,G=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),Z=(e,t)=>{let n={};for(var i in e)V(n,i,{get:e[i],enumerable:!0});return t||V(n,Symbol.toStringTag,{value:"Module"}),n},K={exports:{}};!function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,n.call(this,r)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return this&&this[n]||n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var o in n)e.call(n,o)&&n[o]&&(r=i(r,this&&this[o]||o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}void 0!==K&&K.exports?(t.default=t,K.exports=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return t}):window.classNames=t}();var J=(null==K.exports?{}:K.exports).default||K.exports,Q={container:"_container_1a6ji_4",item:"_item_1a6ji_16",toast:"_toast_1a6ji_19",fadeIn:"_fadeIn_1a6ji_1","toast-warning":"_toast-warning_1a6ji_31","toast-info":"_toast-info_1a6ji_34","toast-error":"_toast-error_1a6ji_37","toast-success":"_toast-success_1a6ji_40"},ee=J.bind(Q),te={warning:/* @__PURE__ */$(N,{style:{color:"#faad14",fontSize:"16px"}}),info:/* @__PURE__ */$(C,{style:{color:"#1890ff",fontSize:"16px"}}),error:/* @__PURE__ */$(p,{style:{color:"#ff4d4f",fontSize:"16px"}}),success:/* @__PURE__ */$(h,{style:{color:"#52c41a",fontSize:"16px"}})},ne=({config:e})=>/* @__PURE__ */j("div",{className:ee("toast",`toast-${e.type}`),children:[te[e.type],/* @__PURE__ */$("span",{children:e.content})]}),ie=()=>{const[e,t]=c([]),n=l(/* @__PURE__ */new Map);return o(()=>{const e=e=>{const{type:i,content:r,duration:o=3e3}=e.detail,a=`message-${Date.now()}-${Math.random()}`,s={key:a,content:r,type:i,duration:o};t(e=>[...e,s]);const l=window.setTimeout(()=>{(e=>{t(t=>t.filter(t=>t.key!==e));const i=n.current.get(e);i&&(clearTimeout(i),n.current.delete(e))})(a)},o);n.current.set(a,l)},i=()=>{t([]),n.current.forEach(e=>clearTimeout(e)),n.current.clear()};return window.addEventListener("custom-message",e),window.addEventListener("custom-message-clear",i),()=>{window.removeEventListener("custom-message",e),window.removeEventListener("custom-message-clear",i),n.current.forEach(e=>clearTimeout(e))}},[]),/* @__PURE__ */$("div",{className:ee("container"),children:e.map(e=>/* @__PURE__ */$("div",{className:ee("item"),children:/* @__PURE__ */$(ne,{config:e})},e.key))})},re=!1,oe={dispatch:(e,t,n)=>{(()=>{if(re)return;re=!0;const e=document.createElement("div");e.id="custom-message-container",document.body.appendChild(e),P(e).render(/* @__PURE__ */$(ie,{}))})(),requestAnimationFrame(()=>{window.dispatchEvent(new CustomEvent("custom-message",{detail:{type:e,content:t,duration:n}}))})},warning:(e,t)=>oe.dispatch("warning",e,t),info:(e,t)=>oe.dispatch("info",e,t),error:(e,t)=>oe.dispatch("error",e,t),success:(e,t)=>oe.dispatch("success",e,t),destroy:()=>{window.dispatchEvent(new Event("custom-message-clear"))}},ae=J.bind({"back-top":"_back-top_gdg5d_4"});function se(e){return e.current||window}var le=({target:e,visibilityHeight:t=300})=>{const[n,i]=c(!1),r=l(null);o(()=>{if(e)try{r.current=e()}catch{r.current=null}},[e]),o(()=>{const e=se(r),n=()=>{i(function(e){return e===window?window.scrollY||document.documentElement.scrollTop:e.scrollTop}(e)>t)};return e.addEventListener("scroll",n,{passive:!0}),n(),()=>{e.removeEventListener("scroll",n)}},[t]);return n?/* @__PURE__ */$("div",{className:`${ae("back-top")} remons-markdown-circle`,onClick:()=>{se(r).scrollTo({top:0,behavior:"smooth"})},children:/* @__PURE__ */$(I,{})}):null},ce="_empty_container_1qt26_1",de="_description_1qt26_10";function ue({description:e="暂无数据"}){/* @__PURE__ */
2
+ return j("div",{className:ce,children:[/* @__PURE__ */j("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",children:[
3
+ /* @__PURE__ */$("rect",{x:"8",y:"16",width:"48",height:"36",rx:"4",stroke:"#d9d9d9",strokeWidth:"2"}),
4
+ /* @__PURE__ */$("line",{x1:"16",y1:"28",x2:"48",y2:"28",stroke:"#d9d9d9",strokeWidth:"2"}),
5
+ /* @__PURE__ */$("line",{x1:"16",y1:"36",x2:"40",y2:"36",stroke:"#d9d9d9",strokeWidth:"2"}),
6
+ /* @__PURE__ */$("line",{x1:"16",y1:"44",x2:"32",y2:"44",stroke:"#d9d9d9",strokeWidth:"2"})]}),/* @__PURE__ */$("span",{className:de,children:e})]})}var he={exports:{}};!function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,n(r)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var r="";for(var o in n)e.call(n,o)&&n[o]&&(r=i(r,o));return r}function i(e,t){return t?e?e+" "+t:e+t:e}void 0!==he&&he.exports?(t.default=t,he.exports=t):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return t}):window.classNames=t}();var pe=(null==he.exports?{}:he.exports).default||he.exports,me={tocSidebar:"_tocSidebar_ygxtc_1",tocHeader:"_tocHeader_ygxtc_17",tocTitle:"_tocTitle_ygxtc_24",tocActions:"_tocActions_ygxtc_29",tocSearchBar:"_tocSearchBar_ygxtc_38",tocSearchInput:"_tocSearchInput_ygxtc_45",tocSearchClear:"_tocSearchClear_ygxtc_63",tocSearchExit:"_tocSearchExit_ygxtc_75",tocBody:"_tocBody_ygxtc_88",tocItem:"_tocItem_ygxtc_94",tocItemTitle:"_tocItemTitle_ygxtc_94",active:"_active_ygxtc_104",tocLink:"_tocLink_ygxtc_107",tocExpandIcon:"_tocExpandIcon_ygxtc_111",tocChildren:"_tocChildren_ygxtc_138",highlight:"_highlight_ygxtc_141",tocEmpty:"_tocEmpty_ygxtc_145"};function fe({item:e,depth:t=0,activeId:n,searchText:i}){const[r,a]=c(!0),s=e.children&&e.children.length>0,d=e.href===n,u=l(null),h=s?ge(e.children,i):[];if(i&&!h.length&&!ve(e.title,i))return null;o(()=>{n&&s&&e.children.some(e=>e.href===n)&&a(!0)},[n,s,e.children]);/* @__PURE__ */
7
+ return j("div",{className:me.tocItem,ref:u,style:{paddingLeft:14},children:[/* @__PURE__ */j("div",{className:`${me.tocItemTitle}${d?` ${me.active}`:""}`,children:[s&&/* @__PURE__ */$("span",{className:me.tocExpandIcon,onClick:e=>{e.stopPropagation(),a(!r)},children:/* @__PURE__ */$(r?g:M,{})}),/* @__PURE__ */$("a",{className:me.tocLink,href:`#${e.href}`,onClick:t=>{t.preventDefault();const n=e.href,i=document.getElementById(n);i&&(history.pushState(null,"",`#${n}`),i.scrollIntoView({behavior:"smooth",block:"start"}))},children:(e=>{if(!i)return e;const t=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(i),n=new RegExp(`(${t})`,"gi");return e.split(n).map((e,t)=>e.toLowerCase().includes(i.toLowerCase())?/* @__PURE__ */$("span",{className:me.highlight,children:e},t):e)})(e.title)})]}),s&&r&&/* @__PURE__ */$("div",{className:me.tocChildren,children:i?h.map((e,r)=>/* @__PURE__ */$(fe,{item:e,depth:t+1,activeId:n,searchText:i},e.href||r)):e.children.map((e,r)=>/* @__PURE__ */$(fe,{item:e,depth:t+1,activeId:n,searchText:i},e.href||r))})]})}function ve(e,t){return!t||e.toLowerCase().includes(t.toLowerCase())}function ge(e,t){return t?e.map(e=>{const n=ge(e.children,t),i=ve(e.title,t);return i||n.length>0?{...e,children:i?e.children:n}:null}).filter(Boolean):e}function we({anchors:e,activeId:t,visible:n,onClose:i}){const r=l(null),a=l(null),s=l(null),[d,u]=c(""),[h,p]=c(!1);o(()=>{if(!t||!r.current||!n)return;const e=r.current.querySelector(`.${me.active}`);e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})},[t,n]),o(()=>{if(!h)return;const e=e=>{s.current&&!s.current.contains(e.target)&&(p(!1),u(""))};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);const f=()=>{u(""),p(!1)},v=ge(e,d);return e&&0!==e.length&&n?/* @__PURE__ */j("div",{className:pe(me.tocSidebar,"md-toc-sidebar"),children:[
8
+ /* @__PURE__ */j("div",{className:me.tocHeader,children:[/* @__PURE__ */$("span",{className:me.tocTitle,children:"目录"}),/* @__PURE__ */j("div",{className:me.tocActions,children:[!h&&/* @__PURE__ */$("span",{className:"remons-markdown-circle",onClick:()=>{p(!0),setTimeout(()=>a.current?.focus(),50)},title:"搜索",children:/* @__PURE__ */$(O,{})}),/* @__PURE__ */$("span",{className:pe("remons-markdown-circle",me.tocClose),onClick:i,children:/* @__PURE__ */$(m,{})})]})]}),h&&/* @__PURE__ */j("div",{ref:s,className:me.tocSearchBar,children:[
9
+ /* @__PURE__ */$("input",{ref:a,className:me.tocSearchInput,type:"text",placeholder:"搜索目录…",value:d,onChange:e=>{u(e.target.value)}}),d&&/* @__PURE__ */$("span",{className:me.tocSearchClear,onClick:f,children:/* @__PURE__ */$(m,{})}),
10
+ /* @__PURE__ */$("span",{className:me.tocSearchExit,onClick:f,title:"退出搜索",children:"×"})]}),
11
+ /* @__PURE__ */$("div",{className:me.tocBody,ref:r,children:v.length>0?v.map((e,n)=>/* @__PURE__ */$(fe,{item:e,activeId:t,searchText:d},e.href||n)):d&&/* @__PURE__ */$("div",{className:me.tocEmpty,children:"未找到匹配项"})})]}):null}var be=/* @__PURE__ */G((e,t)=>{!function(n,i){"object"==typeof e&&void 0!==t?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((n="undefined"!=typeof globalThis?globalThis:n||self).MethodsR={})}(e,function(e){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.IsPC=function(){for(var e=navigator.userAgent,t=["Android","iPhone","SymbianOS","Windows Phone","iPad","iPod"],n=!0,i=0;i<t.length;i++)if(e.indexOf(t[i])>0){n=!1;break}return n},e.SUM=function(e,t){var n;return e.forEach(function(t,i){"number"!=typeof t&&"string"!=typeof t||(n="number",e[i]=Number(t))}),"number"===n?e.reduce(function(e,t){return e+t}):e.reduce(function(e,n){return e+n[t]},0)},e.arrGroup=function(e,n){if("number"==typeof n){if(e instanceof Array){for(var i=[],r=0,o=e.length;r<o;r+=n)i.push(e.slice(r,r+n));return i}var a=t(e);return console.error("The expected array, get"+a),e}console.error("The second parameter should be a number")},e.compareVersion=function(e,t){for(var n=e.split("."),i=t.split("."),r=Math.max(n.length,i.length),o=0;o<r;o++){var a=+n[o],s=+i[o];if(a>s)return e;if(a<s)return t}return!1},e.copy=function(e){if("object"===t(e)){if(document.body.createTextRange){var n=document.body.createTextRange();n.moveToElementText(e),n.select()}else if(window.getSelection){var i=window.getSelection(),r=document.createRange();r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r)}document.execCommand("Copy","false",null),window.getSelection().empty()}else{var o=document.createElement("textarea"),a=document.querySelector("body");o.value=e,o.setAttribute("style","z-index:-1"),a.appendChild(o),o.select(),document.execCommand("copy"),a.removeChild(o)}},e.dateFormat=function(e,t){function n(e){return e<10?"0"+e:e}var i,r=(i=e&&"number"==typeof e?new Date(e):e&&"string"==typeof e?new Date(parseInt(e)):/* @__PURE__ */new Date).getFullYear(),o=n(i.getMonth()+1),a=n(i.getDate()),s=n(i.getHours()),l=n(i.getMinutes()),c=n(i.getSeconds()),d="".concat(r,"-").concat(o,"-").concat(a," ").concat(s,":").concat(l,":").concat(c);return"yyyy/MM/dd HH:mm:ss"==t?d="".concat(r,"/").concat(o,"/").concat(a," ").concat(s,":").concat(l,":").concat(c):"yyyy/MM/dd"==t?d="".concat(r,"/").concat(o,"/").concat(a):"yyyy-MM-dd"==t?d="".concat(r,"-").concat(o,"-").concat(a):"HH:mm:ss"==t?d="".concat(s,":").concat(l,":").concat(c):"yyyy年MM月dd日 HH时mm分ss秒"==t&&(d="".concat(r,"年").concat(o,"月").concat(a,"日 ").concat(s,"时").concat(l,"分").concat(c,"秒")),d},e.debounce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;return function(n){var i=n;clearTimeout(e.id),e.id=setTimeout(function(){e.call(void 0,i)},t)}},e.deepClone=function e(t){var n=function(e){return Object.prototype.toString.call(e).slice(8,-1)};if(["Null","String","Boolean","Number","Undefined","Function"].includes(n(t)))return t;if("RegExp"===n(t))return new RegExp(t);if("Date"===n(t))return new Date(t);var i="Array"===n(t)?[]:{};for(var r in t)i[r]=e(t[r]);return i},e.download=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=document.createElement("a");if(i.setAttribute("download",n),i.setAttribute("href",e),navigator.msSaveBlob){var r=Blob([e],{type:t});return navigator.msSaveBlob(r,n)}i.click()},e.getSearchParams=function(e){var t=new URLSearchParams(decodeURI(window.location.search)),i={};return n(t.keys()).forEach(function(e){i[e]=t.get(e)}),e?t.get(e):i},e.openApp=function(e){var t=e.url,n=e.params;if(t){var i=new URLSearchParams(n);window.location=i.toString()?"".concat(t,"?").concat(i.toString()):t}else console.error("url 错误")},e.removeArrRepeat=function(e,i){if(e.length&&t("object"!==e[0]))return n(new Set(e));var r={};return e.reduce(function(e,t){return!r[t[i]]&&(r[t[i]]=e.push(t)),e},[])},e.viewImg=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;if("IMG"===e.target.nodeName&&e.target.currentSrc){var t=document.createElement("div"),n=document.createElement("img");t.setAttribute("style","position: fixed;\n z-index: 2001;\n display: flex;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n background: rgb(0 0 0 / 33%);\n height: 100%;\n top: 0;"),t.setAttribute("id","remons-view-box"),n.setAttribute("src",e.target.currentSrc),n.setAttribute("style","max-height: 100%; max-weight: 100%"),n.setAttribute("id","remons-view-img"),document.body.appendChild(t),document.querySelector("#remons-view-box").appendChild(n);var i=document.querySelector("#remons-view-box");i&&i.addEventListener("click",function(){document.body.removeChild(i)})}},e.watchScroll=function(e,t){t||(t=1e3);(arguments.length>2&&void 0!==arguments[2]?arguments[2]:window).onscroll=function(e,t){var n=null;return function(){n&&clearTimeout(n),n=setTimeout(e,t)}}(e,t)},Object.defineProperty(e,"__esModule",{value:!0})})}),ye=be(),ke=!1,xe={false:"push",true:"unshift",after:"push",before:"unshift"},Se={isPermalinkSymbol:!0};function Ce(e,t,n,i){var r;if(!ke){var o="Using deprecated markdown-it-anchor permalink option, see https://github.com/valeriangalliat/markdown-it-anchor#permalinks";"object"==typeof process&&process&&process.emitWarning?process.emitWarning(o):console.warn(o),ke=!0}var a=[Object.assign(new n.Token("link_open","a",1),{attrs:[].concat(t.permalinkClass?[["class",t.permalinkClass]]:[],[["href",t.permalinkHref(e,n)]],Object.entries(t.permalinkAttrs(e,n)))}),Object.assign(new n.Token("html_block","",0),{content:t.permalinkSymbol,meta:Se}),new n.Token("link_close","a",-1)];t.permalinkSpace&&n.tokens[i+1].children[xe[t.permalinkBefore]](Object.assign(new n.Token("text","",0),{content:" "})),(r=n.tokens[i+1].children)[xe[t.permalinkBefore]].apply(r,a)}function _e(e){return"#"+e}function Ee(e){return{}}var Ae={class:"header-anchor",symbol:"#",renderHref:_e,renderAttrs:Ee};function Te(e){function t(n){return n=Object.assign({},t.defaults,n),function(t,i,r,o){return e(t,n,i,r,o)}}return t.defaults=Object.assign({},Ae),t.renderPermalinkImpl=e,t}function Me(e){var t=[],n=e.filter(function(e){if("class"!==e[0])return!0;t.push(e[1])});return t.length>0&&n.unshift(["class",t.join(" ")]),n}var Oe=Te(function(e,t,n,i,r){var o,a=[Object.assign(new i.Token("link_open","a",1),{attrs:Me([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],t.ariaHidden?[["aria-hidden","true"]]:[],Object.entries(t.renderAttrs(e,i))))}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:Se}),new i.Token("link_close","a",-1)];if(t.space){var s="string"==typeof t.space?t.space:" ";i.tokens[r+1].children[xe[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:s}))}(o=i.tokens[r+1].children)[xe[t.placement]].apply(o,a)});Object.assign(Oe.defaults,{space:!0,placement:"after",ariaHidden:!1});var Le=Te(Oe.renderPermalinkImpl);Le.defaults=Object.assign({},Oe.defaults,{ariaHidden:!0});var Ie=Te(function(e,t,n,i,r){var o=[Object.assign(new i.Token("link_open","a",1),{attrs:Me([].concat(t.class?[["class",t.class]]:[],[["href",t.renderHref(e,i)]],Object.entries(t.renderAttrs(e,i))))})].concat(t.safariReaderFix?[new i.Token("span_open","span",1)]:[],i.tokens[r+1].children,t.safariReaderFix?[new i.Token("span_close","span",-1)]:[],[new i.Token("link_close","a",-1)]);i.tokens[r+1].children=o});Object.assign(Ie.defaults,{safariReaderFix:!1});var Ne=Te(function(e,t,n,i,r){var o;if(!["visually-hidden","aria-label","aria-describedby","aria-labelledby"].includes(t.style))throw new Error("`permalink.linkAfterHeader` called with unknown style option `"+t.style+"`");if(!["aria-describedby","aria-labelledby"].includes(t.style)&&!t.assistiveText)throw new Error("`permalink.linkAfterHeader` called without the `assistiveText` option in `"+t.style+"` style");if("visually-hidden"===t.style&&!t.visuallyHiddenClass)throw new Error("`permalink.linkAfterHeader` called without the `visuallyHiddenClass` option in `visually-hidden` style");var a=i.tokens[r+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s=[],l=[];if(t.class&&l.push(["class",t.class]),l.push(["href",t.renderHref(e,i)]),l.push.apply(l,Object.entries(t.renderAttrs(e,i))),"visually-hidden"===t.style){if(s.push(Object.assign(new i.Token("span_open","span",1),{attrs:[["class",t.visuallyHiddenClass]]}),Object.assign(new i.Token("text","",0),{content:t.assistiveText(a)}),new i.Token("span_close","span",-1)),t.space){var c="string"==typeof t.space?t.space:" ";s[xe[t.placement]](Object.assign(new i.Token("string"==typeof t.space?"html_inline":"text","",0),{content:c}))}s[xe[t.placement]](Object.assign(new i.Token("span_open","span",1),{attrs:[["aria-hidden","true"]]}),Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:Se}),new i.Token("span_close","span",-1))}else s.push(Object.assign(new i.Token("html_inline","",0),{content:t.symbol,meta:Se}));"aria-label"===t.style?l.push(["aria-label",t.assistiveText(a)]):["aria-describedby","aria-labelledby"].includes(t.style)&&l.push([t.style,e]);var d=[Object.assign(new i.Token("link_open","a",1),{attrs:Me(l)})].concat(s,[new i.Token("link_close","a",-1)]);(o=i.tokens).splice.apply(o,[r+3,0].concat(d)),t.wrapper&&(i.tokens.splice(r,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[0]+"\n"})),i.tokens.splice(r+3+d.length+1,0,Object.assign(new i.Token("html_block","",0),{content:t.wrapper[1]+"\n"})))});function Pe(e,t,n,i){var r=e,o=i;if(n&&Object.prototype.hasOwnProperty.call(t,r))throw new Error("User defined `id` attribute `"+e+"` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(t,r);)r=e+"-"+o,o+=1;return t[r]=!0,r}function ze(e,t){t=Object.assign({},ze.defaults,t),e.core.ruler.push("anchor",function(e){for(var n,i={},r=e.tokens,o=Array.isArray(t.level)?(n=t.level,function(e){return n.includes(e)}):function(e){return function(t){return t>=e}}(t.level),a=0;a<r.length;a++){var s=r[a];if("heading_open"===s.type&&o(Number(s.tag.substr(1)))){var l=t.getTokensText(r[a+1].children),c=s.attrGet("id");c=null==c?Pe(c=t.slugifyWithState?t.slugifyWithState(l,e):t.slugify(l),i,!1,t.uniqueSlugStartIndex):Pe(c,i,!0,t.uniqueSlugStartIndex),s.attrSet("id",c),!1!==t.tabIndex&&s.attrSet("tabindex",""+t.tabIndex),"function"==typeof t.permalink?t.permalink(c,t,e,a):(t.permalink||t.renderPermalink&&t.renderPermalink!==Ce)&&t.renderPermalink(c,t,e,a),a=r.indexOf(s),t.callback&&t.callback(s,{slug:c,title:l})}}})}function $e(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))}function je(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function De(e,t){var n;t=Object.assign({},{placeholder:"(\\$\\{toc\\}|\\[\\[?_?toc_?\\]?\\]|\\$\\<toc(\\{[^}]*\\})\\>)",slugify:$e,uniqueSlugStartIndex:1,containerClass:"table-of-contents",containerId:void 0,listClass:void 0,itemClass:void 0,linkClass:void 0,level:1,listType:"ol",format:void 0,callback:void 0},t);var i=new RegExp("^"+t.placeholder+"$","i");e.renderer.rules.tocOpen=function(e,n){var i=Object.assign({},t);return e&&n>=0&&(i=Object.assign(i,e[n].inlineOptions)),"<nav"+(i.containerId?' id="'+je(i.containerId)+'"':"")+' class="'+je(i.containerClass)+'">'},e.renderer.rules.tocClose=function(){return"</nav>"},e.renderer.rules.tocBody=function(e,i){var r=Object.assign({},t);e&&i>=0&&(r=Object.assign(r,e[i].inlineOptions));var o,a={},s=Array.isArray(r.level)?(o=r.level,function(e){return o.includes(e)}):function(e){return function(t){return t>=e}}(r.level);return function e(n){var i=r.listClass?' class="'+je(r.listClass)+'"':"",o=r.itemClass?' class="'+je(r.itemClass)+'"':"",l=r.linkClass?' class="'+je(r.linkClass)+'"':"";if(0===n.c.length)return"";var c="";return(0===n.l||s(n.l))&&(c+="<"+(je(r.listType)+i)+">"),n.c.forEach(function(n){s(n.l)?c+="<li"+o+"><a"+l+' href="#'+function(e){for(var t=e,n=r.uniqueSlugStartIndex;Object.prototype.hasOwnProperty.call(a,t);)t=e+"-"+n++;return a[t]=!0,t}(t.slugify(n.n))+'">'+("function"==typeof r.format?r.format(n.n,je):je(n.n))+"</a>"+e(n)+"</li>":c+=e(n)}),(0===n.l||s(n.l))&&(c+="</"+je(r.listType)+">"),c}(n)},e.core.ruler.push("generateTocAst",function(i){n=function(e){for(var t={l:0,n:"",c:[]},n=[t],i=0,r=e.length;i<r;i++){var o=e[i];if("heading_open"===o.type){var a=e[i+1].children.filter(function(e){return"text"===e.type||"code_inline"===e.type}).reduce(function(e,t){return e+t.content},""),s={l:parseInt(o.tag.substr(1),10),n:a,c:[]};if(s.l>n[0].l)n[0].c.push(s),n.unshift(s);else if(s.l===n[0].l)n[1].c.push(s),n[0]=s;else{for(;s.l<=n[0].l;)n.shift();n[0].c.push(s),n.unshift(s)}}}return t}(i.tokens),"function"==typeof t.callback&&t.callback(e.renderer.rules.tocOpen()+e.renderer.rules.tocBody()+e.renderer.rules.tocClose(),n)}),e.block.ruler.before("heading","toc",function(e,t,n,r){var o,a=e.src.slice(e.bMarks[t]+e.tShift[t],e.eMarks[t]).split(" ")[0];if(!i.test(a))return!1;if(r)return!0;var s=i.exec(a),l={};if(null!==s&&3===s.length)try{l=JSON.parse(s[2])}catch(e){}return e.line=t+1,(o=e.push("tocOpen","nav",1)).markup="",o.map=[t,e.line],o.inlineOptions=l,(o=e.push("tocBody","",0)).markup="",o.map=[t,e.line],o.inlineOptions=l,o.children=[],(o=e.push("tocClose","nav",-1)).markup="",!0},{alt:["paragraph","reference","blockquote"]})}Object.assign(Ne.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),ze.permalink={__proto__:null,legacy:Ce,renderHref:_e,renderAttrs:Ee,makePermalink:Te,linkInsideHeader:Oe,ariaHidden:Le,headerLink:Ie,linkAfterHeader:Ne},ze.defaults={level:1,slugify:function(e){return encodeURIComponent(String(e).trim().toLowerCase().replace(/\s+/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(e){return e.filter(function(e){return["text","code_inline"].includes(e.type)}).map(function(e){return e.content}).join("")},permalink:!1,renderPermalink:Ce,permalinkClass:Le.defaults.class,permalinkSpace:Le.defaults.space,permalinkSymbol:"¶",permalinkBefore:"before"===Le.defaults.placement,permalinkHref:Le.defaults.renderHref,permalinkAttrs:Le.defaults.renderAttrs},ze.default=ze;var Re={exports:{}};function Be(e,t){t=t?Array.isArray(t)?t:[t]:[],Object.freeze(t);var n=e.renderer.rules.link_open||this.defaultRender;e.renderer.rules.link_open=function(e,i,r,o,a){var s=function(e,t){var n,i,r=e.attrs[e.attrIndex("href")][1];for(n=0;n<t.length;++n){if("function"!=typeof(i=t[n]).matcher)return i;if(i.matcher(r,i))return i}}(e[i],t),l=s&&s.attrs;return l&&function(e,t,n){Object.keys(n).forEach(function(i){var r,o=n[i];"className"===i&&(i="class"),(r=t[e].attrIndex(i))<0?t[e].attrPush([i,o]):t[e].attrs[r][1]=o})}(i,e,l),n(e,i,r,o,a)}}Be.defaultRender=function(e,t,n,i,r){return r.renderToken(e,t,n)},Re.exports=Be;var He=(null==Re.exports?{}:Re.exports).default||Re.exports,qe={exports:{}},Fe=qe.exports,We="__lodash_hash_undefined__",Xe=9007199254740991,Ye="[object Arguments]",Ue="[object Boolean]",Ve="[object Date]",Ge="[object Function]",Ze="[object GeneratorFunction]",Ke="[object Map]",Je="[object Number]",Qe="[object Object]",et="[object Promise]",tt="[object RegExp]",nt="[object Set]",it="[object String]",rt="[object Symbol]",ot="[object WeakMap]",at="[object ArrayBuffer]",st="[object DataView]",lt="[object Float32Array]",ct="[object Float64Array]",dt="[object Int8Array]",ut="[object Int16Array]",ht="[object Int32Array]",pt="[object Uint8Array]",mt="[object Uint8ClampedArray]",ft="[object Uint16Array]",vt="[object Uint32Array]",gt=/\w*$/,wt=/^\[object .+?Constructor\]$/,bt=/^(?:0|[1-9]\d*)$/,yt={};yt[Ye]=yt["[object Array]"]=yt[at]=yt[st]=yt[Ue]=yt[Ve]=yt[lt]=yt[ct]=yt[dt]=yt[ut]=yt[ht]=yt[Ke]=yt[Je]=yt[Qe]=yt[tt]=yt[nt]=yt[it]=yt[rt]=yt[pt]=yt[mt]=yt[ft]=yt[vt]=!0,yt["[object Error]"]=yt[Ge]=yt[ot]=!1;var kt="object"==typeof global&&global&&global.Object===Object&&global||"object"==typeof self&&self&&self.Object===Object&&self||Function("return this")(),xt="object"==typeof Fe&&Fe&&!Fe.nodeType&&Fe,St=xt&&"object"==typeof qe&&qe&&!qe.nodeType&&qe,Ct=St&&St.exports===xt;function _t(e,t){return e.set(t[0],t[1]),e}function Et(e,t){return e.add(t),e}function At(e,t,n,i){var r=-1,o=e?e.length:0;for(i&&o&&(n=e[++r]);++r<o;)n=t(n,e[r],r,e);return n}function Tt(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(Jr){}return t}function Mt(e){var t=-1,n=Array(e.size);return e.forEach(function(e,i){n[++t]=[i,e]}),n}function Ot(e,t){return function(n){return e(t(n))}}function Lt(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var It,Nt=Array.prototype,Pt=Function.prototype,zt=Object.prototype,$t=kt["__core-js_shared__"],jt=(It=/[^.]+$/.exec($t&&$t.keys&&$t.keys.IE_PROTO||""))?"Symbol(src)_1."+It:"",Dt=Pt.toString,Rt=zt.hasOwnProperty,Bt=zt.toString,Ht=RegExp("^"+Dt.call(Rt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qt=Ct?kt.Buffer:void 0,Ft=kt.Symbol,Wt=kt.Uint8Array,Xt=Ot(Object.getPrototypeOf,Object),Yt=Object.create,Ut=zt.propertyIsEnumerable,Vt=Nt.splice,Gt=Object.getOwnPropertySymbols,Zt=qt?qt.isBuffer:void 0,Kt=Ot(Object.keys,Object),Jt=Cn(kt,"DataView"),Qt=Cn(kt,"Map"),en=Cn(kt,"Promise"),tn=Cn(kt,"Set"),nn=Cn(kt,"WeakMap"),rn=Cn(Object,"create"),on=Mn(Jt),an=Mn(Qt),sn=Mn(en),ln=Mn(tn),cn=Mn(nn),dn=Ft?Ft.prototype:void 0,un=dn?dn.valueOf:void 0;function hn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function pn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function mn(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}function fn(e){this.__data__=new pn(e)}function vn(e,t){var n=Ln(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&In(e)}(e)&&Rt.call(e,"callee")&&(!Ut.call(e,"callee")||Bt.call(e)==Ye)}(e)?function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}(e.length,String):[],i=n.length,r=!!i;for(var o in e)!t&&!Rt.call(e,o)||r&&("length"==o||An(o,i))||n.push(o);return n}function gn(e,t,n){var i=e[t];Rt.call(e,t)&&On(i,n)&&(void 0!==n||t in e)||(e[t]=n)}function wn(e,t){for(var n=e.length;n--;)if(On(e[n][0],t))return n;return-1}function bn(e,t,n,i,r,o,a){var s;if(i&&(s=o?i(e,r,o,a):i(e)),void 0!==s)return s;if(!zn(e))return e;var l=Ln(e);if(l){if(s=function(e){var t=e.length,n=e.constructor(t);t&&"string"==typeof e[0]&&Rt.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!t)return function(e,t){var n=-1,i=e.length;t||(t=Array(i));for(;++n<i;)t[n]=e[n];return t}(e,s)}else{var c=En(e),d=c==Ge||c==Ze;if(Nn(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(c==Qe||c==Ye||d&&!o){if(Tt(e))return o?e:{};if(s=function(e){return"function"!=typeof e.constructor||Tn(e)?{}:(t=Xt(e),zn(t)?Yt(t):{});var t}(d?{}:e),!t)return function(e,t){return xn(e,_n(e),t)}(e,function(e,t){return e&&xn(t,$n(t),e)}(s,e))}else{if(!yt[c])return o?e:{};s=function(e,t,n,i){var r=e.constructor;switch(t){case at:return kn(e);case Ue:case Ve:return new r(+e);case st:return function(e,t){var n=t?kn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,i);case lt:case ct:case dt:case ut:case ht:case pt:case mt:case ft:case vt:return function(e,t){var n=t?kn(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,i);case Ke:return function(e,t,n){return At(t?n(Mt(e),!0):Mt(e),_t,new e.constructor)}(e,i,n);case Je:case it:return new r(e);case tt:return function(e){var t=new e.constructor(e.source,gt.exec(e));return t.lastIndex=e.lastIndex,t}(e);case nt:return function(e,t,n){return At(t?n(Lt(e),!0):Lt(e),Et,new e.constructor)}(e,i,n);case rt:return o=e,un?Object(un.call(o)):{}}var o}(e,c,bn,t)}}a||(a=new fn);var u=a.get(e);if(u)return u;if(a.set(e,s),!l)var h=n?function(e){return function(e,t,n){var i=t(e);return Ln(e)?i:function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}(i,n(e))}(e,$n,_n)}(e):$n(e);return function(e,t){for(var n=-1,i=e?e.length:0;++n<i&&!1!==t(e[n],n,e););}(h||e,function(r,o){h&&(r=e[o=r]),gn(s,o,bn(r,t,n,i,o,e,a))}),s}function yn(e){return!(!zn(e)||(t=e,jt&&jt in t))&&(Pn(e)||Tt(e)?Ht:wt).test(Mn(e));var t}function kn(e){var t=new e.constructor(e.byteLength);return new Wt(t).set(new Wt(e)),t}function xn(e,t,n,i){n||(n={});for(var r=-1,o=t.length;++r<o;){var a=t[r],s=i?i(n[a],e[a],a,n,e):void 0;gn(n,a,void 0===s?e[a]:s)}return n}function Sn(e,t){var n,i,r=e.__data__;return("string"==(i=typeof(n=t))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof t?"string":"hash"]:r.map}function Cn(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return yn(n)?n:void 0}hn.prototype.clear=function(){this.__data__=rn?rn(null):{}},hn.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},hn.prototype.get=function(e){var t=this.__data__;if(rn){var n=t[e];return n===We?void 0:n}return Rt.call(t,e)?t[e]:void 0},hn.prototype.has=function(e){var t=this.__data__;return rn?void 0!==t[e]:Rt.call(t,e)},hn.prototype.set=function(e,t){return this.__data__[e]=rn&&void 0===t?We:t,this},pn.prototype.clear=function(){this.__data__=[]},pn.prototype.delete=function(e){var t=this.__data__,n=wn(t,e);return!(n<0)&&(n==t.length-1?t.pop():Vt.call(t,n,1),!0)},pn.prototype.get=function(e){var t=this.__data__,n=wn(t,e);return n<0?void 0:t[n][1]},pn.prototype.has=function(e){return wn(this.__data__,e)>-1},pn.prototype.set=function(e,t){var n=this.__data__,i=wn(n,e);return i<0?n.push([e,t]):n[i][1]=t,this},mn.prototype.clear=function(){this.__data__={hash:new hn,map:new(Qt||pn),string:new hn}},mn.prototype.delete=function(e){return Sn(this,e).delete(e)},mn.prototype.get=function(e){return Sn(this,e).get(e)},mn.prototype.has=function(e){return Sn(this,e).has(e)},mn.prototype.set=function(e,t){return Sn(this,e).set(e,t),this},fn.prototype.clear=function(){this.__data__=new pn},fn.prototype.delete=function(e){return this.__data__.delete(e)},fn.prototype.get=function(e){return this.__data__.get(e)},fn.prototype.has=function(e){return this.__data__.has(e)},fn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof pn){var i=n.__data__;if(!Qt||i.length<199)return i.push([e,t]),this;n=this.__data__=new mn(i)}return n.set(e,t),this};var _n=Gt?Ot(Gt,Object):function(){return[]},En=function(e){return Bt.call(e)};function An(e,t){return!!(t=null==t?Xe:t)&&("number"==typeof e||bt.test(e))&&e>-1&&e%1==0&&e<t}function Tn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||zt)}function Mn(e){if(null!=e){try{return Dt.call(e)}catch(Jr){}try{return e+""}catch(Jr){}}return""}function On(e,t){return e===t||e!=e&&t!=t}(Jt&&En(new Jt(/* @__PURE__ */new ArrayBuffer(1)))!=st||Qt&&En(new Qt)!=Ke||en&&En(en.resolve())!=et||tn&&En(new tn)!=nt||nn&&En(new nn)!=ot)&&(En=function(e){var t=Bt.call(e),n=t==Qe?e.constructor:void 0,i=n?Mn(n):void 0;if(i)switch(i){case on:return st;case an:return Ke;case sn:return et;case ln:return nt;case cn:return ot}return t});var Ln=Array.isArray;function In(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Xe}(e.length)&&!Pn(e)}var Nn=Zt||function(){return!1};function Pn(e){var t=zn(e)?Bt.call(e):"";return t==Ge||t==Ze}function zn(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function $n(e){return In(e)?vn(e):function(e){if(!Tn(e))return Kt(e);var t=[];for(var n in Object(e))Rt.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}qe.exports=function(e){return bn(e,!0,!0)};var jn=(null==qe.exports?{}:qe.exports).default||qe.exports,Dn=(String.raw`\$&`,e=>e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")),Rn="@tab",Bn=`${Rn}:active`,Hn=Bn.length,qn=Symbol("tab:name"),Fn=Symbol("tab:level"),Wn=(e,t,n)=>{if(64!==e.src.charCodeAt(t))return!1;let i=1;for(;i<Hn&&Bn.charCodeAt(i)===e.src.charCodeAt(t+i);i++);let r=i===Hn;if(!r&&4!==i)return!1;let o=t+i,a=e.skipSpaces(o);return a>o&&a<n&&{isActive:r,pos:a}},Xn=(e,t)=>{let{name:n="tabs",openRenderer:i=t=>{let{active:i,data:r,id:o}=t,a=r.map(({title:t,id:r},o)=>`<button type="button" class="${n}-tab-button${i===o?" active":""}" data-tab="${o}"${r?` data-id="${Dn(r)}"`:""}${i===o?" data-active":""}>${e.renderInline(t)}</button>`);return`<div class="${n}-tabs-wrapper"${o?` data-id="${e.utils.escapeHtml(o)}"`:""}>\n <div class="${n}-tabs-header">\n ${a.join("\n ")}\n </div>\n <div class="${n}-tabs-container">\n`},closeRenderer:r=()=>" </div>\n</div>\n",tabOpenRenderer:o=t=>{let{index:i,id:r,isActive:o}=t;return`<div class="${n}-tab-content${o?" active":""}" data-index="${i}"${r?` data-id="${e.utils.escapeHtml(r)}"`:""}${o?' data-active=""':""}>\n`},tabCloseRenderer:a=()=>"</div>\n"}=t??{},s=(e=>t=>{let n=t.tokens;for(let i=0;i<n.length;i++){let t=n[i];if(t.type!==`${e}_tabs_open`)continue;let r=[],o=-1,a=!1,s=0,{level:l}=t;for(let d=i+1;d<n.length;d++){let t=n[d],i=t.meta,c=t.type;if(c!==`${e}_tabs_open`)if(c!==`${e}_tabs_close`)t.level>l+1||s>0?a||(t.type=`${e}_tabs_empty`,t.hidden=!0):c!==`${e}_tab_open`?c!==`${e}_tab_close`&&(t.type=`${e}_tabs_empty`,t.hidden=!0):(a=!0,i.index=r.length,i.active&&(-1===o?o=r.length:i.active=!1),r.push({title:t.info,index:r.length,id:i.id,isActive:i.active}));else{if(t.level===l)break;s--}else s++}let c=t.meta;c.tabsData={active:o,data:r,id:c.id}}})(n);e.block.ruler.before("fence",`${n}_tabs`,(e=>(t,n,i,r)=>{let o=t.bMarks[n]+t.tShift[n];if(58!==t.src.charCodeAt(o))return!1;let a=t.eMarks[n],s=o+1;for(;s<=a&&58===t.src.charCodeAt(s);)s++;let l=s-o;if(l<3)return!1;s=t.skipSpaces(s);for(let S=0;S<e.length;S++){if(t.src.charCodeAt(s)!==e.charCodeAt(S))return!1;s++}let c,d=0;for(;s!==a;){if(c=t.src.charCodeAt(s++),35===c){d=s;break}if(!t.md.utils.isSpace(c))return!1}if(r)return!0;let u=t.sCount[n],h=n+1,p=!1;for(;h<i;h++){let e=t.bMarks[h]+t.tShift[h],n=t.eMarks[h];if(e<n&&t.sCount[h]<u)break;if(t.sCount[h]===u&&58===t.src.charCodeAt(e)){for(s=e+1;s<=n&&58===t.src.charCodeAt(s);s++);if(s-e>=l&&(s=t.skipSpaces(s),s>=n)){p=!0;break}}}let m=t.parentType,f=t.lineMax,v=t.blkIndent,g=t.env[qn],w=t.env[Fn];t.parentType=`${e}_tabs`,t.lineMax=h-+!!p,t.blkIndent=u;let b=":".repeat(l),y="";if(d){d=t.skipSpaces(d);let e=t.skipSpacesBack(a,d);d<e&&(y=t.src.slice(d,e))}let k=t.push(`${e}_tabs_open`,"",1);k.markup=b,k.block=!0,k.info=e,k.meta=y?{id:y}:{},k.map=[n,h-+!!p],t.env[qn]=e,t.env[Fn]=t.level,t.md.block.tokenize(t,n+1,h-+!!p),t.env[qn]=g,t.env[Fn]=w;let x=t.push(`${e}_tabs_close`,"",-1);return x.markup=b,x.block=!0,t.parentType=m,t.lineMax=f,t.blkIndent=v,t.line=h+ +!!p,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.block.ruler.before("paragraph",`${n}_tab`,(e=>(t,n,i,r)=>{if(t.env[qn]!==e||t.level!==t.env[Fn])return!1;let o=t.bMarks[n]+t.tShift[n],a=t.eMarks[n],s=Wn(t,o,a);if(!1===s)return!1;if(r)return!0;let l=t.sCount[n],c=n+1,d=!1;for(;c<i;c++){let e=t.bMarks[c]+t.tShift[c];if(t.sCount[c]===l&&"@"===t.src[e]&&Wn(t,e,t.eMarks[c])){d=!0;break}}let u=t.parentType,h=t.lineMax,p=t.blkIndent;t.parentType="tab",t.lineMax=c-+!!d,t.blkIndent=l;let m,f=t.push(`${e}_tab_open`,"",1),v=s.pos,g=t.skipSpacesBack(a,v),w=g;for(;w>v;){if(35===t.src.charCodeAt(w)){for(m=w-1;92===t.src.charCodeAt(m);)m--;if((w-m)%2==1)break}w--}let b,y="";w===v?b=t.src.slice(v,g):(y=t.src.slice(t.skipSpaces(w+1),g),b=t.src.slice(v,t.skipSpacesBack(w,v))),f.block=!0,f.markup=Rn,f.info=b,f.meta={active:s.isActive},y&&(f.meta.id=y),f.map=[n,c-+!!d],t.md.block.tokenize(t,n+1,c+ +!d);let k=t.push(`${e}_tab_close`,"",-1);return k.block=!0,k.markup="",t.parentType=u,t.lineMax=h,t.blkIndent=p,t.line=c+ +!d,!0})(n),{alt:["paragraph","reference","blockquote","list"]}),e.core.ruler.push(`${n}_tabs_core`,s),e.renderer.rules[`${n}_tabs_open`]=(e,t,n,r,o)=>{let a=e[t].meta;return i(a.tabsData??{active:-1,data:[],id:a.id},e,t,n,r,o)},e.renderer.rules[`${n}_tabs_close`]=r,e.renderer.rules[`${n}_tab_open`]=(e,t,n,i,r)=>{let a=((e,t)=>{let n=e[t],i=n.meta;return{title:n.info,index:i.index,id:i.id,isActive:i.active}})(e,t);return o(a,e,t,n,i,r)},e.renderer.rules[`${n}_tab_close`]=a},Yn={note:'<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>',tip:'<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>',important:'<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',warning:'<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>',caution:'<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>'},Un=(e,t={})=>{const{markers:n=["TIP","NOTE","IMPORTANT","WARNING","CAUTION"],icons:i=Yn,matchCaseSensitive:r=!1,titles:o={},classPrefix:a="markdown-alert"}=t,s="*"===n?"\\w+":n.join("|"),l=new RegExp(`^\\\\?\\[\\!(${s})\\]([^\\n\\r]*)`,r?"":"i");e.core.ruler.after("block","github-alerts",e=>{const t=e.tokens;for(let n=0;n<t.length;n++)if("blockquote_open"===t[n].type){const e=t[n],r=n;for(;"blockquote_close"!==t[n]?.type&&n<=t.length;)n+=1;const a=t[n],s=t.slice(r,n+1).find(e=>"inline"===e.type);if(!s)continue;const c=s.content.match(l);if(!c)continue;const d=c[1].toLowerCase(),u=c[2].trim()||(o[d]??Vn(d)),h=i[d]??"";s.content=s.content.slice(c[0].length).trimStart(),e.type="alert_open",e.tag="div",e.meta={title:u,type:d,icon:h},a.type="alert_close",a.tag="div"}}),e.renderer.rules.alert_open=function(e,t){const{title:n,type:i,icon:r}=e[t].meta;return`<div class="${a} ${a}-${i}"><p class="${a}-title">${r}${n}</p>`}};function Vn(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Gn={exports:{}},Zn=!0,Kn=!1,Jn=!1;function Qn(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function ei(e,t){for(var n=e[t].level-1,i=t-1;i>=0;i--)if(e[i].level===n)return i;return-1}function ti(e,t){return"inline"===e[t].type&&function(e){return"paragraph_open"===e.type}(e[t-1])&&function(e){return"list_item_open"===e.type}(e[t-2])&&function(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}(e[t])}function ni(e,t){if(e.children.unshift(function(e,t){var n=new t("html_inline","",0),i=Zn?' disabled="" ':"";0===e.content.indexOf("[ ] ")?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':0!==e.content.indexOf("[x] ")&&0!==e.content.indexOf("[X] ")||(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">');return n}(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),Kn)if(Jn){e.children.pop();var n="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(function(e,t,n){var i=new n("html_inline","",0);return i.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",i.attrs=[{for:t}],i}(e.content,n,t))}else e.children.unshift(function(e){var t=new e("html_inline","",0);return t.content="<label>",t}(t)),e.children.push(function(e){var t=new e("html_inline","",0);return t.content="</label>",t}(t))}Gn.exports=function(e,t){t&&(Zn=!t.enabled,Kn=!!t.label,Jn=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var t=e.tokens,n=2;n<t.length;n++)ti(t,n)&&(ni(t[n],e.Token),Qn(t[n-2],"class","task-list-item"+(Zn?"":" enabled")),Qn(t[ei(t,n-2)],"class","contains-task-list"))})};var ii=(null==Gn.exports?{}:Gn.exports).default||Gn.exports,ri=/* @__PURE__ */new Set(["[ ]","[x]","[X]"]);function oi(e){e.core.ruler.after("inline","github-task-lists-empty",e=>{const t=e.tokens;for(let n=0;n<t.length;n++){const e=t[n];if("inline"!==e.type)continue;const i=e.content;if(!ri.has(i))continue;let r=n-1;if(r>=0&&"paragraph_open"===t[r].type&&(r-=1),r<0||"list_item_open"!==t[r].type)continue;ai(t[r],"task-list-item");for(let n=r-1;n>=0;n--)if("bullet_list_open"===t[n].type||"ordered_list_open"===t[n].type){ai(t[n],"contains-task-list");break}const o=new e.constructor("html_inline","",0);o.content="[ ]"===i?'<input class="task-list-item-checkbox" disabled="" type="checkbox">':'<input class="task-list-item-checkbox" checked="" disabled="" type="checkbox">',e.children=[o],e.content=""}})}function ai(e,t){const n=(e.attrGet("class")||"").split(/\s+/).filter(Boolean);n.includes(t)||e.attrSet("class",[...n,t].join(" "))}var si={note:"注",tip:"提示",important:"重要",warning:"注意",caution:"警告"},li={note:'<i class="iconfont icon-note"></i>',tip:'<i class="iconfont icon-tip"></i>',important:'<i class="iconfont icon-important"></i>',warning:'<i class="iconfont icon-warning"></i>',caution:'<i class="iconfont icon-caution"></i>'};function ci(e){return e.replace(/[\u{1F000}-\u{1FFFF}\u{200D}\u{FE0F}\u{2600}-\u{27BF}\u{2300}-\u{23FF}\u{2700}-\u{27BF}]/gu,"").trim()}var di="markdown-tabs",ui=null,hi=null;function pi(){document.querySelectorAll(`.${di}-tabs-wrapper`).forEach(e=>{const t=e.querySelector(`.${di}-tabs-header`),n=e.querySelector(`.${di}-tabs-container`);if(!t||!n)return;if(t.dataset.clickInited)return;t.dataset.clickInited="true";const i=document.querySelector(".markdown");t.addEventListener("click",e=>{const r=e.target.closest(`.${di}-tab-button`);if(!r||!t.contains(r))return;const o=t.querySelectorAll(`.${di}-tab-button`),a=Array.from(o).indexOf(r),s=n.querySelectorAll(`.${di}-tab-content`);o.forEach(e=>e.classList.remove("active")),s.forEach(e=>e.classList.remove("active")),r.classList.add("active"),s[a]&&s[a].classList.add("active");const l=r.offsetParent;l&&i?.scrollTop&&l.offsetTop&&i?.scrollTop>l.offsetTop&&i?.scrollTo({top:l.offsetTop,behavior:"smooth"})})}),function(){const e=document.querySelector(".markdown");e&&!e.dataset.scrollListenInited&&(e.dataset.scrollListenInited="true",e?.addEventListener("wheel",e=>{const t=e,n=e.target?.closest(`.${di}-tabs-header`);n&&0!==Math.abs(t.deltaY)&&n.scrollWidth>n.clientWidth&&(e.preventDefault(),n.scrollLeft+=t.deltaY)},{passive:!1}))}(),function(){const e=document.querySelector(".markdown");function t(e){if(e.dataset.maskInited)return;e.parentElement.dataset.maskInited="true";const t=()=>{const{scrollLeft:t,scrollWidth:n,clientWidth:i}=e,r=t>1,o=t+i<n-1;e.parentElement.classList.remove("has-left-mask","has-right-mask","has-both-masks"),r&&o?e.parentElement.classList.add("has-both-masks"):r?e.parentElement.classList.add("has-left-mask"):o&&e.parentElement.classList.add("has-right-mask")};e.addEventListener("scroll",t),t()}document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e)),ui&&(ui.disconnect(),ui=null),ui=new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if(1!==e.nodeType)return;const n=e;n.classList.contains("markdown-tabs-tabs-header")&&t(n),n.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>t(e))})})}),e&&ui.observe(e,{childList:!0,subtree:!0}),hi&&window.removeEventListener("resize",hi),hi=()=>{document.querySelectorAll(".markdown-tabs-tabs-header").forEach(e=>{e.dispatchEvent(new Event("scroll"))})},window.addEventListener("resize",hi)}()}var mi="0.18.1",fi=`https://registry.npmmirror.com/katex/${mi}/files/dist/katex.min.css`,vi=`https://registry.npmmirror.com/katex/${mi}/files/dist/katex.min.js`,gi=null;function wi(e,t={}){const n={throwOnError:!1,errorColor:"#cc0000",...t};function i(e,t){try{return function(){if(!window.katex)throw new Error("[katex-loader] KaTeX not loaded. Call ensureKatexLoaded() first.");return window.katex}().renderToString(e,{...n,displayMode:t})}catch(Jr){const i=Jr instanceof Error?Jr.message:String(Jr);return`<span style="color:${n.errorColor}" title="${r(i)}">${r(e)}</span>`}}function r(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}"undefined"!=typeof window&&window.katex||console.warn("[markdown-it-katex] KaTeX is not loaded yet. Call `await ensureKatexLoaded()` before using this plugin, or use `renderWithKatex()` helper instead."),e.inline.ruler.before("emphasis","katex_inline",(e,t)=>{if(36!==e.src.charCodeAt(e.pos))return!1;if(36===e.src.charCodeAt(e.pos+1))return!1;if(e.pos>0&&92===e.src.charCodeAt(e.pos-1))return!1;const n=e.pos+1;if(n>=e.posMax)return!1;if(/\s/.test(e.src[n]))return!1;let i=n;for(;i<e.posMax&&(36!==e.src.charCodeAt(i)||92===e.src.charCodeAt(i-1));)i++;if(i>=e.posMax)return!1;if(i===n)return!1;if(/\s/.test(e.src[i-1]))return!1;if(!t){const t=e.push("katex_inline","math",0);t.markup="$",t.content=e.src.slice(n,i)}return e.pos=i+1,!0}),e.block.ruler.after("blockquote","katex_block",(e,t,n,i)=>{const r=e.bMarks[t]+e.tShift[t];if(r+2>e.eMarks[t]||"$$"!==e.src.slice(r,r+2))return!1;if(i)return!0;let o=t+1,a=!1;for(;o<n;){const t=e.bMarks[o]+e.tShift[o];if("$$"===e.src.slice(t,e.eMarks[o]).trim()){a=!0;break}o++}const s=e.bMarks[t+1],l=a?e.bMarks[o]:e.eMarks[n-1];e.line=o+(a?1:0);const c=e.push("katex_block","math",0);return c.block=!0,c.markup="$$",c.content=e.src.slice(s,l).trim(),c.map=[t,e.line],!0}),e.renderer.rules.katex_inline=(e,t)=>i(e[t].content,!1),e.renderer.rules.katex_block=(e,t)=>`<div class="katex-block">${i(e[t].content,!0)}</div>\n`}function bi(e){return"string"!=typeof e?"":e.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"").replace(/-+/g,"-")}function yi(e){return e?e.map(e=>({href:bi(e.n.trim()),title:e.n.trim(),children:yi(e.c||[]),nodeName:`H${e.l}`,nodeTitle:`<h${e.l}>${e.n.trim()}</h${e.l}>`})):[]}async function ki(e,t){await function(e=15e3){return gi||("undefined"==typeof document||"undefined"==typeof window?Promise.reject(/* @__PURE__ */new Error("[katex-loader] Requires a browser environment.")):window.katex?Promise.resolve():gi=new Promise((t,n)=>{const i=setTimeout(()=>{gi=null,n(/* @__PURE__ */new Error(`[katex-loader] KaTeX CDN timeout after ${e}ms.`))},e);if(!document.querySelector(`link[href="${fi}"]`)){const e=document.createElement("link");e.rel="stylesheet",e.href=fi,document.head.appendChild(e)}const r=document.createElement("script");r.src=vi,r.onload=()=>{clearTimeout(i),t()},r.onerror=()=>{clearTimeout(i),gi=null,r.remove(),n(/* @__PURE__ */new Error(`[katex-loader] Failed to load ${vi}`))},document.head.appendChild(r)}))}();let n=[];const i=new D({langPrefix:"language-",html:!0,highlight:function(e,t){if(t&&R.getLanguage(t))try{return R.highlight(e,{language:t}).value}catch(po){}return""}}).use(Xn,{name:di}).use(ze,{permalink:!0,permalinkBefore:!1,permalinkSymbol:"#",slugify:bi}).use(De,{callback:(e,t)=>{!n.length&&t.c&&(n=t.c)}}).use(He,{matcher:e=>e.match(/^https?:\/\//),attrs:{target:"_blank",rel:"noopener"}}).use(Un,{titles:si,icons:li}).use(wi,{strict:!1,throwOnError:!1}).use(ii).use(oi);t&&t.forEach(e=>i.use(e));const r=i.render(e).replace(/class="markdown-alert markdown-alert-(\w+)"[\s\S]*?class="markdown-alert-title"[^>]*>([\s\S]*?)<\/p>/g,(e,t,n)=>{const i=si[t];if(!i)return e;const r=ci(n.replace(/<[^>]*>/g,""));if(r.toLowerCase()===t.toLowerCase()){const t=n.lastIndexOf(">");if(-1!==t){const o=n.substring(0,t+1)+ci(n.substring(t+1)).replace(r,i);return e.replace(n,o)}}return e});return setTimeout(()=>{requestAnimationFrame(()=>pi())},0),{anchor:yi(jn(n)),info:r}}function xi(e){e&&"object"==typeof e?Object.entries(e).forEach(([e,t])=>{R.getLanguage(e)||R.registerLanguage(e,t)}):console.warn("[render-markdown] initHighlighter 需要传入一个语言包对象")}var Si={exports:{}},Ci=Si.exports;!function(e,t){"object"==typeof Ci&&void 0!==Si?Si.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Viewer=t()}(void 0,function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function t(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function i(e){for(var i=1;i<arguments.length;i++){var r=null!=arguments[i]?arguments[i]:{};i%2?n(Object(r),!0).forEach(function(n){t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a={backdrop:!0,button:!0,navbar:!0,navigation:!1,title:!0,toolbar:!0,className:"",container:"body",filter:null,fullscreen:!0,inheritedAttributes:["crossOrigin","decoding","isMap","loading","referrerPolicy","sizes","srcset","useMap"],initialCoverage:.9,initialViewIndex:0,inline:!1,autoplay:!0,interval:5e3,keyboard:!0,focus:!0,loading:!0,loop:!0,preload:!0,minWidth:200,minHeight:100,movable:!0,magnifier:!1,rotatable:!0,rotateOnGesture:!0,rotateOnTouch:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnGesture:!0,zoomOnWheel:!0,slideOnTouch:!0,slideOnWheel:!0,toggleOnDblclick:!0,tooltip:!0,transition:!0,zIndex:2015,zIndexInline:0,zoomRatio:.1,minZoomRatio:.01,maxZoomRatio:100,url:"src",ready:null,show:null,shown:null,hide:null,hidden:null,view:null,viewed:null,move:null,moved:null,rotate:null,rotated:null,scale:null,scaled:null,zoom:null,zoomed:null,play:null,playing:null,stop:null},s="undefined"!=typeof window&&void 0!==window.document,l=s?window:{},c=!(!s||!l.document.documentElement)&&"ontouchstart"in l.document.documentElement,d=!!s&&"PointerEvent"in l,u="viewer",h="move",p="rotate",m="switch",f="transform",v="zoom",g="".concat(u,"-active"),w="".concat(u,"-close"),b="".concat(u,"-fade"),y="".concat(u,"-fixed"),k="".concat(u,"-fullscreen"),x="".concat(u,"-fullscreen-exit"),S="".concat(u,"-hide"),C="".concat(u,"-hide-md-down"),_="".concat(u,"-hide-sm-down"),E="".concat(u,"-hide-xs-down"),A="".concat(u,"-in"),T="".concat(u,"-invisible"),M="".concat(u,"-loading"),O="".concat(u,"-move"),L="".concat(u,"-open"),I="".concat(u,"-show"),N="".concat(u,"-transition"),P="click",z="dblclick",$="dragstart",j="focusin",D="keydown",R="load",B="error",H=d?"pointerdown":c?"touchstart":"mousedown",q=d?"pointerenter":"mouseenter",F=d?"pointerleave":"mouseleave",W=d?"pointermove":c?"touchmove":"mousemove",X=d?"pointerup pointercancel":c?"touchend touchcancel":"mouseup",Y="resize",U="transitionend",V="wheel",G="gesturestart gesturechange gestureend",Z="ready",K="show",J="shown",Q="hide",ee="hidden",te="view",ne="viewed",ie="move",re="moved",oe="rotate",ae="rotated",se="scale",le="scaled",ce="zoom",de="zoomed",ue="play",he="playing",pe="stop",me="".concat(u,"Action"),fe=/\s+/,ve=["zoom-in","zoom-out","one-to-one","reset","prev","play","next","rotate-left","rotate-right","flip-horizontal","flip-vertical"];function ge(e){return"string"==typeof e}var we={ctrl:"ctrlKey",shift:"shiftKey",alt:"altKey",meta:"metaKey"};function be(e,t){return!!e&&(!0===e||ge(e)&&e.split("+").every(function(e){return t[we[e.trim().toLowerCase()]]}))}var ye=Number.isNaN||l.isNaN;function ke(e){return"number"==typeof e&&!ye(e)}function xe(e){return void 0===e}function Se(e){return"object"===o(e)&&null!==e}var Ce=Object.prototype.hasOwnProperty;function _e(e){if(!Se(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&Ce.call(n,"isPrototypeOf")}catch(i){return!1}}function Ee(e){return"function"==typeof e}function Ae(e,t){if(e&&Ee(t))if(Array.isArray(e)||ke(e.length))for(var n=e.length,i=0;i<n&&!1!==t.call(e,e[i],i,e);i+=1);else Se(e)&&Object.keys(e).forEach(function(n){t.call(e,e[n],n,e)});return e}function Te(e,t,n){Ae(n,function(n){var i=t.getAttribute(n);null!==i&&e.setAttribute(n,i)})}function Me(e,t){var n=e.transition;return n&&!1!==n[t]}var Oe=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Se(e)&&n.length>0&&n.forEach(function(t){Se(t)&&Object.keys(t).forEach(function(n){e[n]=t[n]})}),e},Le=/^(?:width|height|left|top|marginLeft|marginTop)$/;function Ie(e,t){var n=e.style;Ae(t,function(e,t){Le.test(t)&&ke(e)&&(e+="px"),n[t]=e})}function Ne(e,t){return!(!e||!t)&&(e.classList?e.classList.contains(t):e.className.split(fe).indexOf(t)>-1)}function Pe(e,t){if(e&&t)if(ke(e.length))Ae(e,function(e){Pe(e,t)});else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function ze(e,t){if(e&&t)if(ke(e.length))Ae(e,function(e){ze(e,t)});else if(e.classList)e.classList.remove(t);else{var n=e.className;n&&n.indexOf(t)>=0&&(e.className=n.split(fe).filter(function(e){return e&&e!==t}).join(" "))}}function $e(e,t,n){t&&(ke(e.length)?Ae(e,function(e){$e(e,t,n)}):n?Pe(e,t):ze(e,t))}var je=/([a-z\d])([A-Z])/g;function De(e){return e.replace(je,"$1-$2").toLowerCase()}function Re(e,t){return Se(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(De(t)))}function Be(e,t,n){Se(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(De(t)),n)}var He=function(){var e=!1;if(s){var t=!1,n=function(){},i=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});l.addEventListener("test",n,i),l.removeEventListener("test",n,i)}return e}();function qe(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(fe).forEach(function(t){if(!He){var o=e.listeners;o&&o[t]&&o[t][n]&&(r=o[t][n],delete o[t][n],0===Object.keys(o[t]).length&&delete o[t],0===Object.keys(o).length&&delete e.listeners)}e.removeEventListener(t,r,i)})}function Fe(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n;t.trim().split(fe).forEach(function(t){if(i.once&&!He){var o=e.listeners,a=void 0===o?{}:o;r=function(){delete a[t][n],e.removeEventListener(t,r,i);for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];n.apply(e,s)},a[t]||(a[t]={}),a[t][n]&&e.removeEventListener(t,a[t][n],i),a[t][n]=r,e.listeners=a}e.addEventListener(t,r,i)})}function We(e,t,n,r){var o;return Ee(Event)&&Ee(CustomEvent)?o=new CustomEvent(t,i({bubbles:!0,cancelable:!0,detail:n},r)):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,n),e.dispatchEvent(o)}function Xe(e){var t=e.rotate,n=e.scaleX,i=e.scaleY,r=e.translateX,o=e.translateY,a=[];ke(r)&&0!==r&&a.push("translateX(".concat(r,"px)")),ke(o)&&0!==o&&a.push("translateY(".concat(o,"px)")),ke(t)&&0!==t&&a.push("rotate(".concat(t,"deg)")),ke(n)&&ke(i)&&(1!==n||1!==i)&&(a.push("scaleX(".concat(n,")")),a.push("scaleY(".concat(i,")")));var s=a.length?a.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}var Ye=l.navigator&&/Version\/\d+(\.\d+)+?\s+Safari/i.test(l.navigator.userAgent);function Ue(e,t,n){var i=document.createElement("img");if(e.naturalWidth&&!Ye)return n(e.naturalWidth,e.naturalHeight),i;var r=document.body||document.documentElement;return i.onload=function(){n(i.width,i.height),Ye||r.removeChild(i)},Te(i,e,t.inheritedAttributes),i.src=e.src,Ye||(i.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(i)),i}function Ve(e){switch(e){case 2:return E;case 3:return _;case 4:return C;default:return""}}function Ge(e){var t=i({},e),n=[];return Ae(e,function(e,i){delete t[i],Ae(t,function(t){var i=Math.abs(e.startX-t.startX),r=Math.abs(e.startY-t.startY),o=Math.abs(e.endX-t.endX),a=Math.abs(e.endY-t.endY),s=Math.sqrt(i*i+r*r),l=(Math.sqrt(o*o+a*a)-s)/s;n.push(l)})}),n.sort(function(e,t){return Math.abs(e)<Math.abs(t)}),n[0]}function Ze(e){var t=i({},e),n=[];return Ae(e,function(e,i){delete t[i],Ae(t,function(t){var i=Math.atan2(t.startY-e.startY,t.startX-e.startX),r=Math.atan2(t.endY-e.endY,t.endX-e.endX)-i;r>Math.PI?r-=2*Math.PI:r<-Math.PI&&(r+=2*Math.PI),n.push(180*r/Math.PI)})}),n.sort(function(e,t){return Math.abs(t)-Math.abs(e)}),n[0]||0}function Ke(e,t){var n=e.pageX,r=e.pageY,o={endX:n,endY:r};return t?o:i({timeStamp:Date.now(),startX:n,startY:r},o)}var Je,Qe={render:function(){this.initContainer(),this.initViewer(),this.initList(),this.renderViewer()},initBody:function(){var e=this.ownerDocument,t=e.body||e.documentElement;this.body=t,this.scrollbarWidth=window.innerWidth-e.documentElement.clientWidth,this.initialBodyPaddingRight=t.style.paddingRight,this.initialBodyComputedPaddingRight=window.getComputedStyle(t).paddingRight},initContainer:function(){this.containerData={width:window.innerWidth,height:window.innerHeight}},initViewer:function(){var e,t=this.options,n=this.parent;t.inline&&(e={width:Math.max(n.offsetWidth,t.minWidth),height:Math.max(n.offsetHeight,t.minHeight)},this.parentData=e),!this.fulled&&e||(e=this.containerData),this.viewerData=Oe({},e)},renderViewer:function(){this.options.inline&&!this.fulled&&Ie(this.viewer,this.viewerData)},initList:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.index,n=this.element,i=this.options,r=this.list,o=[],a=_e(i.navbar)?i.navbar:{},s=document.createElement("li");this.containerData||this.initContainer(),r.appendChild(s);var l=s.offsetWidth+parseInt(window.getComputedStyle(s).marginLeft,10);r.removeChild(s);var c=ke(a.visibleItemCount)?Math.floor(a.visibleItemCount):Math.floor(this.containerData.width/l),d=(c=Math.min(c,this.length))>0?Math.min(Math.max(0,t-Math.floor(c/2)),Math.max(0,this.length-c)):0,u=c>0?Math.min(this.length,d+c):this.length;if(r.innerHTML="",Ae(this.images,function(t,n){if(!(c>0&&(n<d||n>=u))){var a=t.src,s=t.alt||function(e){return ge(e)?decodeURIComponent(e.replace(/^.*\//,"").replace(/[?&#].*$/,"")):""}(a),l=e.getImageURL(t);if(a||l){var h=document.createElement("li"),p=document.createElement("img");Te(p,t,i.inheritedAttributes),i.navbar&&(p.src=a||l),p.alt=s,p.setAttribute("data-original-url",l||a),h.setAttribute("data-index",n),h.setAttribute("data-viewer-action","view"),h.setAttribute("role","button"),i.keyboard&&h.setAttribute("tabindex",0),h.appendChild(p),r.appendChild(h),o.push(h)}}}),this.items=o,this.viewed){var h=this.getItem(this.index);h&&(Pe(h,g),h.setAttribute("aria-selected",!0))}Ae(o,function(t){var n,r,o=t.firstElementChild;Be(o,"filled",!0),i.loading&&Pe(t,M),Fe(o,R,n=function(n){qe(o,B,r),i.loading&&ze(t,M),e.loadImage(n)},{once:!0}),Fe(o,B,r=function(){qe(o,R,n),i.loading&&ze(t,M)},{once:!0})}),Me(i,"view")&&Fe(n,ne,function(){Pe(r,N)},{once:!0})},getItem:function(e){var t;return Ae(this.items,function(n){return Number(Re(n,"index"))!==e||(t=n,!1)}),t},renderList:function(){var e=this.index,t=this.getItem(e);if(t){var n=t.nextElementSibling,i=parseInt(window.getComputedStyle(n||t).marginLeft,10),r=t.offsetWidth,o=r+i;Ie(this.list,Oe({width:o*this.items.length-i},Xe({translateX:(this.viewerData.width-r)/2-t.offsetLeft})))}},resetList:function(){var e=this.list;e.innerHTML="",ze(e,N),Ie(e,Oe({width:0},Xe({translateX:0})))},initImage:function(e){var t,n=this,i=this.options,r=this.image,o=this.viewerData,a=this.footer.offsetHeight,s=o.width,l=Math.max(o.height-a,a),c=this.imageData||{};this.imageInitializing={abort:function(){t.onload=null}},t=Ue(r,i,function(t,r){var o=t/r,a=Math.max(0,Math.min(1,i.initialCoverage)),d=s,u=l;n.imageInitializing=!1,l*o>s?u=s/o:d=l*o,a=ke(a)?a:.9,d=Math.min(d*a,t),u=Math.min(u*a,r);var h=(s-d)/2,p=(l-u)/2,m={left:h,top:p,x:h,y:p,width:d,height:u,oldRatio:1,ratio:d/t,aspectRatio:o,naturalWidth:t,naturalHeight:r},f=Oe({},m);i.rotatable&&(m.rotate=c.rotate||0,f.rotate=0),i.scalable&&(m.scaleX=c.scaleX||1,m.scaleY=c.scaleY||1,f.scaleX=1,f.scaleY=1),n.imageData=m,n.initialImageData=f,e&&e()})},renderImage:function(e){var t=this,n=this.image,i=this.imageData;if(Ie(n,Oe({width:i.width,height:i.height,marginLeft:i.x,marginTop:i.y},Xe(i))),this.magnifierPoint&&this.renderMagnifier(),e){var r=!1;if(this.viewing?r="view":this.moving?r="move":this.rotating?r="rotate":this.scaling?r="scale":this.zooming&&(r="zoom"),r&&Me(this.options,r)&&Ne(n,N)){var o=function(){t.imageRendering=!1,e()};this.imageRendering={abort:function(){qe(n,U,o)}},Fe(n,U,o,{once:!0})}else e()}},resetImage:function(){var e=this.image;e&&(this.viewing&&this.viewing.abort(),e.parentNode.removeChild(e),this.image=null,this.title.innerHTML="")}},et={bind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.ownerDocument;Fe(t,P,this.onClick=this.click.bind(this)),Fe(t,$,this.onDragStart=this.dragstart.bind(this)),Fe(t,q,this.onMagnifyEnter=this.magnify.bind(this)),Fe(t,W,this.onMagnify=this.magnify.bind(this)),Fe(t,F,this.onMagnifierLeave=this.hideMagnifier.bind(this)),Fe(n,H,this.onPointerDown=this.pointerdown.bind(this)),Fe(i,W,this.onPointerMove=this.pointermove.bind(this)),Fe(i,X,this.onPointerUp=this.pointerup.bind(this)),Fe(i,D,this.onKeyDown=this.keydown.bind(this)),Fe(window,Y,this.onResize=this.resize.bind(this)),(e.zoomable&&e.zoomOnWheel||e.slideOnWheel)&&Fe(t,V,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),(e.zoomable&&e.zoomOnGesture||e.rotatable&&e.rotateOnGesture)&&Fe(t,G,this.onGesture=this.gesture.bind(this),{passive:!1}),e.toggleOnDblclick&&Fe(n,z,this.onDblclick=this.dblclick.bind(this))},unbind:function(){var e=this.options,t=this.viewer,n=this.canvas,i=this.ownerDocument;qe(t,P,this.onClick),qe(t,$,this.onDragStart),qe(t,q,this.onMagnifyEnter),qe(t,W,this.onMagnify),qe(t,F,this.onMagnifierLeave),qe(n,H,this.onPointerDown),qe(i,W,this.onPointerMove),qe(i,X,this.onPointerUp),qe(i,D,this.onKeyDown),qe(window,Y,this.onResize),(e.zoomable&&e.zoomOnWheel||e.slideOnWheel)&&qe(t,V,this.onWheel,{passive:!1,capture:!0}),(e.zoomable&&e.zoomOnGesture||e.rotatable&&e.rotateOnGesture)&&qe(t,G,this.onGesture,{passive:!1}),e.toggleOnDblclick&&qe(n,z,this.onDblclick)}},tt={click:function(e){var t=this.options,n=this.imageData,i=e.target,r=Re(i,me);switch(r||"img"!==i.localName||"li"!==i.parentElement.localName||(r=Re(i=i.parentElement,me)),c&&e.isTrusted&&i===this.canvas&&clearTimeout(this.clickCanvasTimeout),this.actionEvent=e,r){case"mix":this.played?this.stop():t.inline?this.fulled?this.exit():this.full():this.hide();break;case"hide":this.pointerMoved||this.hide();break;case"view":this.view(Re(i,"index"));break;case"zoom-in":this.zoom(.1,!0);break;case"zoom-out":this.zoom(-.1,!0);break;case"one-to-one":this.toggle();break;case"reset":this.reset();break;case"prev":this.prev(t.loop);break;case"play":this.play(t.fullscreen);break;case"next":this.next(t.loop);break;case"rotate-left":this.rotate(-90);break;case"rotate-right":this.rotate(90);break;case"flip-horizontal":this.scaleX(-n.scaleX||-1);break;case"flip-vertical":this.scaleY(-n.scaleY||-1);break;default:this.played&&this.stop()}},dblclick:function(e){e.preventDefault(),this.viewed&&e.target===this.image&&(c&&e.isTrusted&&clearTimeout(this.doubleClickImageTimeout),this.actionEvent=e.isTrusted?e:e.detail&&e.detail.originalEvent,this.toggle())},load:function(){var e=this;this.timeout&&(clearTimeout(this.timeout),this.timeout=!1);var t=this.element,n=this.options,i=this.image,r=this.index,o=this.viewerData;ze(i,T),n.loading&&ze(this.canvas,M),i.style.cssText="height:0;"+"margin-left:".concat(o.width/2,"px;")+"margin-top:".concat(o.height/2,"px;")+"max-width:none!important;position:relative;width:0;",this.initImage(function(){$e(i,O,n.movable),$e(i,N,Me(n,"view")),e.renderImage(function(){e.viewed=!0,e.viewing=!1,setTimeout(function(){$e(i,N,n.transition)},300),Ee(n.viewed)&&Fe(t,ne,n.viewed,{once:!0}),We(t,ne,{originalImage:e.images[r],index:r,image:i,originalEvent:e.viewOriginalEvent||null},{cancelable:!1}),e.viewOriginalEvent=null})})},loadImage:function(e){var t=e.target,n=t.parentNode,i=n.offsetWidth||30,r=n.offsetHeight||50,o=!!Re(t,"filled");Ue(t,this.options,function(e,n){var a=e/n,s=i,l=r;r*a>i?o?s=r*a:l=i/a:o?l=i/a:s=r*a,Ie(t,Oe({width:s,height:l},Xe({translateX:(i-s)/2,translateY:(r-l)/2})))})},keydown:function(e){var t=this.options;if(t.keyboard){var n=e.keyCode||e.which||e.charCode;if(this.actionEvent=e,13===n)this.viewer.contains(e.target)&&this.click(e);if(this.fulled)switch(n){case 27:this.played?this.stop():t.inline?this.fulled&&this.exit():this.hide();break;case 32:this.played&&this.stop();break;case 37:this.played&&this.playing?this.playing.prev():this.prev(t.loop);break;case 38:e.preventDefault(),this.zoom(t.zoomRatio,!0);break;case 39:this.played&&this.playing?this.playing.next():this.next(t.loop);break;case 40:e.preventDefault(),this.zoom(-t.zoomRatio,!0);break;case 48:case 49:e.ctrlKey&&(e.preventDefault(),this.toggle())}}},dragstart:function(e){"img"===e.target.localName&&e.preventDefault()},magnify:function(e){e.changedTouches||e.pointerType&&"mouse"!==e.pointerType?this.hideMagnifier():(this.magnifierPoint={clientX:e.clientX,clientY:e.clientY},this.renderMagnifier())},renderMagnifier:function(){var e=this.options,t=this.imageData,n=this.magnifier,i=this.magnifierImage,r=this.viewer,o=_e(e.magnifier)?e.magnifier:{},a=this.magnifierPoint;if(e.magnifier&&this.fulled&&this.viewed&&n&&i&&a){var s=Math.max(1,Number(o.size)||100),l=Math.max(1,Number(o.zoomRatio)||2),c=Number(o.opacity),d=r.getBoundingClientRect(),u=a.clientX-d.left,h=a.clientY-d.top,p=this.image.currentSrc||this.image.src,m=this.image.getBoundingClientRect();if(a.clientX<m.left||a.clientX>m.right||a.clientY<m.top||a.clientY>m.bottom)this.hideMagnifier();else{var f=ke(t.scaleX)?t.scaleX:1,v=ke(t.scaleY)?t.scaleY:1,g=(t.rotate||0)*Math.PI/180,w=Math.cos(g),b=Math.sin(g),y=w*f,k=b*f,x=-b*v,S=w*v,C=f*v;if(0!==C){var _=t.x+t.width/2,E=t.y+t.height/2,A=(-k*(u-_)+y*(h-E))/C,T=(S*(u-_)-x*(h-E))/C+t.width/2,M=A+t.height/2,O=t.width*l,L=t.height*l,I=y*(T*l-O/2)+x*(M*l-L/2),N=k*(T*l-O/2)+S*(M*l-L/2);this.magnifierSourcePoint={x:T,y:M},n.style.width="".concat(s,"px"),n.style.height="".concat(s,"px"),n.style.opacity="".concat(Math.max(0,Math.min(1,ke(c)?c:1))),i.src=p,i.style.width="".concat(O,"px"),i.style.height="".concat(L,"px"),i.style.left="".concat(s/2-O/2-I,"px"),i.style.top="".concat(s/2-L/2-N,"px"),i.style.transform="rotate(".concat(t.rotate||0,"deg) scaleX(").concat(f,") scaleY(").concat(v,")"),n.removeAttribute("aria-hidden"),Pe(n,"viewer-show")}else this.hideMagnifier()}}else this.hideMagnifier()},hideMagnifier:function(){this.magnifier&&(ze(this.magnifier,"viewer-show"),this.magnifier.setAttribute("aria-hidden",!0),this.magnifierPoint=null)},pointerdown:function(e){var t=this.options,n=this.pointers,i=e.buttons,r=e.button;if(this.pointerMoved=!1,!(!this.viewed||this.showing||this.viewing||this.hiding||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(ke(i)&&1!==i||ke(r)&&0!==r||e.ctrlKey))){e.preventDefault(),e.changedTouches?Ae(e.changedTouches,function(e){n[e.identifier]=Ke(e)}):n[e.pointerId||0]=Ke(e);var o=!!t.movable&&h;(t.zoomable&&t.zoomOnTouch||t.rotatable&&t.rotateOnTouch)&&Object.keys(n).length>1?o=f:t.slideOnTouch&&("touch"===e.pointerType||"touchstart"===e.type)&&this.isSwitchable()&&(o=m),o!==h&&o!==v&&o!==p&&o!==f||ze(this.image,N),this.action=o}},pointermove:function(e){var t=this.pointers,n=this.action;this.viewed&&n&&(e.preventDefault(),e.changedTouches?Ae(e.changedTouches,function(e){Oe(t[e.identifier]||{},Ke(e,!0))}):Oe(t[e.pointerId||0]||{},Ke(e,!0)),this.change(e))},pointerup:function(e){var t,n=this,i=this.options,r=this.action,o=this.pointers;if(e.changedTouches?Ae(e.changedTouches,function(e){t=o[e.identifier],delete o[e.identifier]}):(t=o[e.pointerId||0],delete o[e.pointerId||0]),r){if(e.preventDefault(),r===h||r===v||r===p||r===f){var a=r===f?Me(i,v)||Me(i,p):Me(i,r);$e(this.image,N,a)}this.action=!1,c&&r!==v&&r!==f&&t&&Date.now()-t.timeStamp<500&&(clearTimeout(this.clickCanvasTimeout),clearTimeout(this.doubleClickImageTimeout),i.toggleOnDblclick&&this.viewed&&e.target===this.image?this.pointerMoved?this.imageClicked=!1:this.imageClicked?(this.imageClicked=!1,this.doubleClickImageTimeout=setTimeout(function(){We(n.image,z,{originalEvent:e})},50)):(this.imageClicked=!0,this.doubleClickImageTimeout=setTimeout(function(){n.imageClicked=!1},500)):(this.imageClicked=!1,i.backdrop&&"static"!==i.backdrop&&e.target===this.canvas&&(this.clickCanvasTimeout=setTimeout(function(){We(n.canvas,P,{originalEvent:e})},50))))}},resize:function(){var e=this;if(this.isShown&&!this.hiding&&(this.fulled&&(this.close(),this.initBody(),this.open()),this.initContainer(),this.initViewer(),this.renderViewer(),xe((_e(this.options.navbar)?this.options.navbar:{}).visibleItemCount)&&this.initList(this.index),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this.played)){if(this.options.fullscreen&&this.fulled&&!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement))return void this.stop();Ae(this.player.getElementsByTagName("img"),function(t){Fe(t,R,e.loadImage.bind(e),{once:!0}),We(t,R)})}},wheel:function(e){var t=this,n=this.options,i=this.navbar;if(this.viewed&&(e.preventDefault(),!this.gesturing&&!this.wheeling)){this.wheeling=!0,setTimeout(function(){t.wheeling=!1},50);var r=1;if(e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),(!i||!i.contains(e.target))&&n.zoomable&&be(n.zoomOnWheel,e)){var o=Number(n.zoomRatio)||.1;return this.actionEvent=e,void this.zoom(-r*o,!0)}be(n.slideOnWheel,e)&&(this.actionEvent=e,r>0?this.next(n.loop):r<0&&this.prev(n.loop))}},gesture:function(e){var t=this.options;if(this.viewed&&(t.zoomOnGesture||t.rotateOnGesture))switch(e.preventDefault(),e.type){case"gesturestart":this.gesturing=!0,this.gestureScale=e.scale||1,this.gestureRotation=e.rotation||0;break;case"gesturechange":var n=e.scale||1,i=n/(this.gestureScale||1),r=Number(e.rotation),o=r-(this.gestureRotation||0);this.gestureScale=n,t.zoomable&&t.zoomOnGesture&&1!==i&&(this.actionEvent=e,this.zoom(i>=1?i-1:1-1/i)),t.rotatable&&t.rotateOnGesture&&ke(r)&&(this.gestureRotation=r,0!==o&&(this.actionEvent=e,this.rotate(o)));break;case"gestureend":this.gesturing=!1,this.gestureScale=1,this.gestureRotation=0}}},nt={show:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.element,n=this.options;if(n.inline||this.showing||this.isShown||this.showing)return this;if(!this.ready)return this.build(),this.ready&&this.show(e),this;var i=this.actionEvent||this.showOriginalEvent||this.viewOriginalEvent||null;if(this.actionEvent=null,this.showOriginalEvent=i,Ee(n.show)&&Fe(t,K,n.show,{once:!0}),!1===We(t,K,{originalEvent:i})||!this.ready)return this;this.hiding&&this.transitioning.abort(),this.showing=!0,this.open();var r=this.viewer;if(ze(r,S),r.setAttribute("role","dialog"),r.setAttribute("aria-labelledby",this.title.id),r.setAttribute("aria-modal",!0),r.removeAttribute("aria-hidden"),Me(n,"show")&&!e){var o=this.shown.bind(this);this.transitioning={abort:function(){qe(r,U,o),ze(r,A)}},Pe(r,N),r.initialOffsetWidth=r.offsetWidth,Fe(r,U,o,{once:!0}),Pe(r,A)}else Pe(r,A),this.shown();return this},hide:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.element,i=this.options;if(i.inline||this.hiding||!this.isShown&&!this.showing)return this;var r=this.actionEvent||this.hideOriginalEvent||null;if(this.actionEvent=null,this.hideOriginalEvent=r,Ee(i.hide)&&Fe(n,Q,i.hide,{once:!0}),!1===We(n,Q,{originalEvent:r})||this.destroyed)return this;this.showing&&this.transitioning.abort(),this.hiding=!0,this.played?this.stop():this.viewing&&this.viewing.abort();var o=this.viewer,a=this.image,s=function(){ze(o,A),e.hidden()};if(Me(i,"hide")&&!t){var l=function(t){t&&t.target===o&&(qe(o,U,l),e.hidden())},c=function(){Ne(o,N)?(Fe(o,U,l),ze(o,A)):s()};this.transitioning={abort:function(){e.viewed&&Ne(a,N)?qe(a,U,c):Ne(o,N)&&qe(o,U,l)}},this.viewed&&Ne(a,N)?(Fe(a,U,c,{once:!0}),this.zoomTo(0,!1,null,!0)):c()}else s();return this},view:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.options.initialViewIndex,n=this.index;if(t=Number(t)||0,this.hiding||this.played||t<0||t>=this.length||this.viewed&&t===n)return this;var i=this.actionEvent||this.viewOriginalEvent||null;if(this.actionEvent=null,this.viewOriginalEvent=i,!this.isShown)return this.index=t,this.show();this.viewing&&this.viewing.abort();var r=this.element,o=this.options,a=this.title,s=this.canvas,l=this.getItem(t);l||(this.initList(t),l=this.getItem(t));var c=l.querySelector("img"),d=Re(c,"originalUrl"),u=c.getAttribute("alt"),h=document.createElement("img");if(Te(h,c,o.inheritedAttributes),h.src=d,h.alt=u,Ee(o.view)&&Fe(r,te,o.view,{once:!0}),!1===We(r,te,{originalImage:this.images[t],index:t,image:h,originalEvent:i})||!this.isShown||this.hiding||this.played)return this;this.hideMagnifier();var p=this.getItem(n);p&&(ze(p,g),p.removeAttribute("aria-selected")),Pe(l,g),l.setAttribute("aria-selected",!0),o.focus&&l.focus(),this.image=h,this.viewed=!1,this.index=t,this.imageData={},Pe(h,T),o.loading&&Pe(s,M),s.innerHTML="",s.appendChild(h),this.renderList(),a.innerHTML="";var m=function(){var i,r=e.imageData,s=Array.isArray(o.title)?o.title[1]:o.title;if(a.innerHTML=ge(i=Ee(s)?s.call(e,h,r):"".concat(u," (").concat(r.naturalWidth," × ").concat(r.naturalHeight,")"))?i.replace(/&(?!amp;|quot;|#39;|lt;|gt;)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):i,o.preload){var l=t<n?-1:1,c=t+l;if((c<0||c>=e.length)&&(c=o.loop?l>0?0:e.length-1:-1),c!==t){var d=e.images[c],p=document.createElement("img");Te(p,d,o.inheritedAttributes),p.src=e.getImageURL(d)||d.src}}};Fe(r,ne,m,{once:!0});var f=function(){var t,n,i=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=function(){qe(h,R,t),qe(h,B,n),e.timeout&&(clearTimeout(e.timeout),e.timeout=!1)};e.viewing={abort:function(){qe(r,ne,m),h.complete?e.imageRendering?e.imageRendering.abort():e.imageInitializing&&e.imageInitializing.abort():(h.src="",a())}},h.complete?e.load():(Fe(h,R,t=function(){a(),e.load()},{once:!0}),Fe(h,B,n=function(){if(a(),!i){var t=c.src;if(t&&t!==h.src)return h.src=t,void f(!0)}ze(h,T),o.loading&&ze(e.canvas,M)},{once:!0}),e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(function(){ze(h,T),e.timeout=!1},1e3))};return f(),this},prev:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.index-1;return t<0&&(t=e?this.length-1:0),this.view(t),this},next:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.length-1,n=this.index+1;return n>t&&(n=e?0:t),this.view(n),this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData;return this.moveTo(xe(e)?e:n.x+Number(e),xe(t)?t:n.y+Number(t)),this},moveTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.element,r=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&r.movable){var a=o.x,s=o.y,l=!1;if(ke(e)?l=!0:e=a,ke(n)?l=!0:n=s,l){var c=this.actionEvent||null;if(this.actionEvent=null,Ee(r.move)&&Fe(i,ie,r.move,{once:!0}),!1===We(i,ie,{x:e,y:n,oldX:a,oldY:s,originalEvent:c}))return this;o.x=e,o.y=n,o.left=e,o.top=n,$e(this.image,N,Me(r,"move")),this.moving=!0,this.renderImage(function(){t.moving=!1,Ee(r.moved)&&Fe(i,re,r.moved,{once:!0}),We(i,re,{x:e,y:n,oldX:a,oldY:s,originalEvent:c},{cancelable:!1})})}}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e)),this},rotateTo:function(e){var t=this,n=this.element,i=this.options,r=this.imageData;if(ke(e=Number(e))&&this.viewed&&!this.played&&i.rotatable){var o=r.rotate,a=this.actionEvent||null;if(this.actionEvent=null,Ee(i.rotate)&&Fe(n,oe,i.rotate,{once:!0}),!1===We(n,oe,{degree:e,oldDegree:o,originalEvent:a}))return this;r.rotate=e,$e(this.image,N,Me(i,"rotate")),this.rotating=!0,this.renderImage(function(){t.rotating=!1,Ee(i.rotated)&&Fe(n,ae,i.rotated,{once:!0}),We(n,ae,{degree:e,oldDegree:o,originalEvent:a},{cancelable:!1})})}return this},scaleX:function(e){return this.scale(e,this.imageData.scaleY),this},scaleY:function(e){return this.scale(this.imageData.scaleX,e),this},scale:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,i=this.element,r=this.options,o=this.imageData;if(e=Number(e),n=Number(n),this.viewed&&!this.played&&r.scalable){var a=o.scaleX,s=o.scaleY,l=!1;if(ke(e)?l=!0:e=a,ke(n)?l=!0:n=s,l){var c=this.actionEvent||null;if(this.actionEvent=null,Ee(r.scale)&&Fe(i,se,r.scale,{once:!0}),!1===We(i,se,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s,originalEvent:c}))return this;o.scaleX=e,o.scaleY=n,$e(this.image,N,Me(r,"scale")),this.scaling=!0,this.renderImage(function(){t.scaling=!1,Ee(r.scaled)&&Fe(i,le,r.scaled,{once:!0}),We(i,le,{scaleX:e,scaleY:n,oldScaleX:a,oldScaleY:s,originalEvent:c},{cancelable:!1})})}}return this},zoom:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.imageData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(i.width*e/i.naturalWidth,t,n),this},zoomTo:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.element,a=this.options,s=this.pointers,l=this.imageData,c=l.x,d=l.y,u=l.width,h=l.height,p=l.naturalWidth,m=l.naturalHeight;if(ke(e=Math.max(0,e))&&this.viewed&&!this.played&&(r||a.zoomable)){if(!r){var f=Math.max(.01,Ee(a.minZoomRatio)?a.minZoomRatio.call(this,this.image,l):a.minZoomRatio),v=Math.min(100,Ee(a.maxZoomRatio)?a.maxZoomRatio.call(this,this.image,l):a.maxZoomRatio);e=Math.min(Math.max(e,f),v)}var g=this.actionEvent||null;if(this.actionEvent=null,g&&g.type!==P)switch(g.type){case"wheel":a.zoomRatio>=.055&&e>.95&&e<1.05&&(e=1);break;case"pointermove":case"touchmove":case"mousemove":e>.99&&e<1.01&&(e=1)}var w=p*e,b=m*e,y=w-u,k=b-h,x=l.ratio;if(Ee(a.zoom)&&Fe(o,ce,a.zoom,{once:!0}),!1===We(o,ce,{ratio:e,oldRatio:x,originalEvent:g}))return this;if(this.zooming=!0,g&&g.type!==P){var S=function(e){var t=e.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}(this.viewer),C=s&&Object.keys(s).length>0?function(e){var t=0,n=0,i=0;return Ae(e,function(e){var r=e.startX,o=e.startY;t+=r,n+=o,i+=1}),{pageX:t/=i,pageY:n/=i}}(s):{pageX:g.pageX,pageY:g.pageY};l.x-=y*((C.pageX-S.left-c)/u),l.y-=k*((C.pageY-S.top-d)/h)}else _e(i)&&ke(i.x)&&ke(i.y)?(l.x-=y*((i.x-c)/u),l.y-=k*((i.y-d)/h)):(l.x-=y/2,l.y-=k/2);l.left=l.x,l.top=l.y,l.width=w,l.height=b,l.oldRatio=x,l.ratio=e,$e(this.image,N,Me(a,"zoom")),this.renderImage(function(){t.zooming=!1,Ee(a.zoomed)&&Fe(o,de,a.zoomed,{once:!0}),We(o,de,{ratio:e,oldRatio:x,originalEvent:g},{cancelable:!1})}),n&&this.tooltip()}return this},play:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.isShown||this.played)return this;var n=this.element,i=this.options,r=this.actionEvent||null;if(this.actionEvent=null,Ee(i.play)&&Fe(n,ue,i.play,{once:!0}),!1===We(n,ue,{originalEvent:r}))return this;var o=this.player,a=this.loadImage.bind(this),s=[],l=0,c=0;if(this.played=!0,this.onLoadWhenPlay=a,t&&this.requestFullscreen(t),Pe(o,I),o.removeAttribute("aria-hidden"),Ae(this.images,function(t,n){var r=document.createElement("img");r.src=e.getImageURL(t)||t.src,r.alt=t.alt||"",r.referrerPolicy=t.referrerPolicy,l+=1,Pe(r,b),$e(r,N,Me(i,"play")),n===e.index&&(Pe(r,A),c=n),s.push(r),Fe(r,R,a,{once:!0}),o.appendChild(r)}),ke(i.interval)&&i.interval>0){var d=function(){clearTimeout(e.playing.timeout);var t=e.actionEvent||null;e.actionEvent=null;var r=c-1;r=r>=0?r:l-1,Ee(i.playing)&&Fe(n,he,i.playing,{once:!0}),!1!==We(n,he,{originalImage:e.images[r],index:r,image:s[r],originalEvent:t})?(ze(s[c],A),Pe(s[c=r],A),e.playing.timeout=i.autoplay?setTimeout(d,i.interval):null):e.playing.timeout=i.autoplay?setTimeout(d,i.interval):null},u=function(){clearTimeout(e.playing.timeout);var t=e.actionEvent||null;e.actionEvent=null;var r=c+1;r=r<l?r:0,Ee(i.playing)&&Fe(n,he,i.playing,{once:!0}),!1!==We(n,he,{originalImage:e.images[r],index:r,image:s[r],originalEvent:t})?(ze(s[c],A),Pe(s[c=r],A),e.playing.timeout=i.autoplay?setTimeout(u,i.interval):null):e.playing.timeout=i.autoplay?setTimeout(u,i.interval):null};l>1&&(this.playing={prev:d,next:u,timeout:i.autoplay?setTimeout(u,i.interval):null})}return this},stop:function(){var e=this;if(!this.played)return this;var t=this.element,n=this.options,i=this.actionEvent||null;if(this.actionEvent=null,Ee(n.stop)&&Fe(t,pe,n.stop,{once:!0}),!1===We(t,pe,{originalEvent:i}))return this;var r=this.player;return clearTimeout(this.playing.timeout),this.playing=!1,this.played=!1,Ae(r.getElementsByTagName("img"),function(t){qe(t,R,e.onLoadWhenPlay)}),ze(r,I),r.setAttribute("aria-hidden",!0),r.innerHTML="",this.exitFullscreen(),this},full:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return!this.isShown||this.played||this.fulled||!t.inline||(this.fulled=!0,this.open(),Pe(this.button,x),ze(r,N),this.viewed&&ze(i,N),Pe(n,y),n.setAttribute("role","dialog"),n.setAttribute("aria-labelledby",this.title.id),n.setAttribute("aria-modal",!0),n.removeAttribute("style"),Ie(n,{zIndex:t.zIndex}),t.focus&&this.enforceFocus(),this.initContainer(),this.viewerData=Oe({},this.containerData),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()})),this},exit:function(){var e=this,t=this.options,n=this.viewer,i=this.image,r=this.list;return this.isShown&&!this.played&&this.fulled&&t.inline?(this.fulled=!1,this.close(),ze(this.button,x),ze(r,N),this.viewed&&ze(i,N),t.focus&&this.clearEnforceFocus(),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),ze(n,y),Ie(n,{zIndex:t.zIndexInline}),this.viewerData=Oe({},this.parentData),this.renderViewer(),this.renderList(),this.viewed&&this.initImage(function(){e.renderImage()}),this):this},tooltip:function(){var e=this,t=this.options,n=this.tooltipBox,i=this.imageData;return this.viewed&&!this.played&&t.tooltip?(n.textContent="".concat(Math.round(100*i.ratio),"%"),this.tooltipping?clearTimeout(this.tooltipping):Me(t,"tooltip")?(this.fading&&We(n,U),Pe(n,I),Pe(n,b),Pe(n,N),n.removeAttribute("aria-hidden"),n.initialOffsetWidth=n.offsetWidth,Pe(n,A)):(Pe(n,I),n.removeAttribute("aria-hidden")),this.tooltipping=setTimeout(function(){Me(t,"tooltip")?(Fe(n,U,function(){ze(n,I),ze(n,b),ze(n,N),n.setAttribute("aria-hidden",!0),e.fading=!1},{once:!0}),ze(n,A),e.fading=!0):(ze(n,I),n.setAttribute("aria-hidden",!0)),e.tooltipping=!1},1e3),this):this},toggle:function(){return 1===this.imageData.ratio?this.zoomTo(this.imageData.oldRatio,!0):this.zoomTo(1,!0),this},reset:function(){return this.viewed&&!this.played&&(this.imageData=Oe({},this.initialImageData),this.renderImage()),this},update:function(e){var t=this,n=this.element,i=this.options,r=this.isImg;if(_e(e)&&Oe(i,e),r&&!n.parentNode)return this.destroy();var o=[];if(Ae(r?[n]:n.querySelectorAll("img"),function(e){Ee(i.filter)?i.filter.call(t,e)&&o.push(e):t.getImageURL(e)&&o.push(e)}),!o.length)return this;if(this.images=o,this.length=o.length,this.ready){var a=[];if(Ae(this.items,function(e){var t=e.querySelector("img"),n=Number(Re(e,"index")),i=o[n];i&&t&&i.src===t.src&&i.alt===t.alt||a.push(n)}),Ie(this.list,{width:"auto"}),this.initList(),this.isShown)if(this.length){if(this.viewed){var s=a.indexOf(this.index);if(s>=0)this.viewed=!1,this.view(Math.max(Math.min(this.index-s,this.length-1),0));else{var l=this.getItem(this.index);Pe(l,g),l.setAttribute("aria-selected",!0)}}}else this.image=null,this.viewed=!1,this.index=0,this.imageData={},this.canvas.innerHTML="",this.title.innerHTML=""}else this.build();return this},destroy:function(){var e=this.element,t=this.options;return e[u]?(this.destroyed=!0,this.ready?(this.played&&this.stop(),t.inline?(this.fulled&&this.exit(),this.unbind()):this.isShown?(this.viewing&&(this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort()),this.hiding&&this.transitioning.abort(),this.hidden()):this.showing&&(this.transitioning.abort(),this.hidden()),this.ready=!1,this.viewer.parentNode.removeChild(this.viewer)):t.inline&&(this.delaying?this.delaying.abort():this.initializing&&this.initializing.abort()),t.inline||(qe(e,P,this.onElementClick),qe(e,D,this.onElementKeyDown)),e[u]=void 0,this):this}},it={getImageURL:function(e){var t=this.options.url;return t=ge(t)?e.getAttribute(t):Ee(t)?t.call(this,e):""},enforceFocus:function(){var e=this;this.clearEnforceFocus(),Fe(document,j,this.onFocusin=function(t){var n=e.viewer,i=t.target;if(i!==document&&i!==n&&!n.contains(i)){for(;i;){if(null!==i.getAttribute("tabindex")||"true"===i.getAttribute("aria-modal"))return;i=i.parentElement}n.focus()}})},clearEnforceFocus:function(){this.onFocusin&&(qe(document,j,this.onFocusin),this.onFocusin=null)},open:function(){var e=this.body;Pe(e,L),this.scrollbarWidth>0&&(e.style.paddingRight="".concat(this.scrollbarWidth+(parseFloat(this.initialBodyComputedPaddingRight)||0),"px"))},close:function(){var e=this.body;ze(e,L),this.scrollbarWidth>0&&(e.style.paddingRight=this.initialBodyPaddingRight)},shown:function(){var e=this.element,t=this.options,n=this.viewer;this.fulled=!0,this.isShown=!0,this.render(),this.bind(),this.showing=!1,t.focus&&(n.focus(),this.enforceFocus()),Ee(t.shown)&&Fe(e,J,t.shown,{once:!0}),!1!==We(e,J,{originalEvent:this.showOriginalEvent||null})&&(this.showOriginalEvent=null,this.ready&&this.isShown&&!this.hiding&&this.view(this.index))},hidden:function(){var e=this.element,t=this.options,n=this.viewer,i=n.ownerDocument.activeElement;i&&n.contains(i)&&Ee(i.blur)&&i.blur(),t.focus&&this.clearEnforceFocus(),this.close(),this.unbind(),Pe(n,S),n.removeAttribute("role"),n.removeAttribute("aria-labelledby"),n.removeAttribute("aria-modal"),n.setAttribute("aria-hidden",!0),this.resetList(),this.resetImage(),this.fulled=!1,this.viewed=!1,this.isShown=!1,this.hiding=!1,this.destroyed||(Ee(t.hidden)&&Fe(e,ee,t.hidden,{once:!0}),We(e,ee,{originalEvent:this.hideOriginalEvent||null},{cancelable:!1}),this.hideOriginalEvent=null)},requestFullscreen:function(e){var t=this.ownerDocument;if(this.fulled&&!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement||t.msFullscreenElement)){var n=t.documentElement;n.requestFullscreen?_e(e)?n.requestFullscreen(e):n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT):n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen()}},exitFullscreen:function(){var e=this.ownerDocument;this.fulled&&(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},change:function(e){var t=this.options,n=this.pointers,i=n[Object.keys(n)[0]];if(i){var r=i.endX-i.startX,o=i.endY-i.startY;switch(this.action){case h:0===r&&0===o||(this.pointerMoved=!0,this.actionEvent=e,this.move(r,o));break;case v:if(t.zoomable&&t.zoomOnTouch){var a=Ge(n);0!==a&&(this.actionEvent=e,this.zoom(a))}break;case p:if(t.rotatable&&t.rotateOnTouch){var s=Ze(n);0!==s&&(this.actionEvent=e,this.rotate(s))}break;case f:if(t.zoomable&&t.zoomOnTouch){var l=Ge(n);0!==l&&(this.actionEvent=e,this.zoom(l))}if(t.rotatable&&t.rotateOnTouch){var c=Ze(n);0!==c&&(this.actionEvent=e,this.rotate(c))}break;case m:this.action="switched";var d=Math.abs(r);d>1&&d>Math.abs(o)&&(this.pointers={},this.actionEvent=e,r>1?this.prev(t.loop):r<-1&&this.next(t.loop))}Ae(n,function(e){e.startX=e.endX,e.startY=e.endY})}},isSwitchable:function(){var e=this.imageData,t=this.viewerData;return this.length>1&&e.x>=0&&e.y>=0&&e.width<=t.width&&e.height<=t.height}},rt=l.Viewer,ot=(Je=-1,function(){return Je+=1}),at=/*#__PURE__*/function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!e||1!==e.nodeType&&11!==e.nodeType)throw new Error("The first argument is required and must be an element.");this.element=e,this.ownerDocument=e.ownerDocument||e.host.ownerDocument,this.options=Oe({},a,_e(n)&&n),this.action=!1,this.actionEvent=null,this.fading=!1,this.fulled=!1,this.hiding=!1,this.imageClicked=!1,this.imageData={},this.index=this.options.initialViewIndex,this.isImg=!1,this.isShown=!1,this.length=0,this.moving=!1,this.played=!1,this.playing=!1,this.pointers={},this.ready=!1,this.rotating=!1,this.scaling=!1,this.showing=!1,this.timeout=!1,this.tooltipping=!1,this.viewed=!1,this.viewing=!1,this.wheeling=!1,this.zooming=!1,this.pointerMoved=!1,this.id=ot(),this.init()}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}(t,[{key:"init",value:function(){var e=this,t=this.element,n=this.options;if(!t[u]){t[u]=this,n.focus&&!n.keyboard&&(n.focus=!1);var i="img"===t.localName,r=[];if(Ae(i?[t]:t.querySelectorAll("img"),function(t){Ee(n.filter)?n.filter.call(e,t)&&r.push(t):e.getImageURL(t)&&r.push(t)}),this.isImg=i,this.length=r.length,this.images=r,this.initBody(),xe(this.ownerDocument.createElement(u).style.transition)&&(n.transition=!1),n.inline){var o=0,a=function(){var t;(o+=1)===e.length&&(e.initializing=!1,e.delaying={abort:function(){clearTimeout(t)}},t=setTimeout(function(){e.delaying=!1,e.build()},0))};this.initializing={abort:function(){Ae(r,function(e){e.complete||(qe(e,R,a),qe(e,B,a))})}},Ae(r,function(e){var t,n;e.complete?a():(Fe(e,R,t=function(){qe(e,B,n),a()},{once:!0}),Fe(e,B,n=function(){qe(e,R,t),a()},{once:!0}))})}else Fe(t,P,this.onElementClick=function(t){var i=t.target;"img"!==i.localName||Ee(n.filter)&&!n.filter.call(e,i)||(e.actionEvent=t,e.view(e.images.indexOf(i)))}),Fe(t,D,this.onElementKeyDown=function(t){var i=t.target,r=t.key;"img"!==i.localName||"Enter"!==r&&" "!==r||(t.preventDefault(),Ee(n.filter)&&!n.filter.call(e,i)||(e.actionEvent=t,e.view(e.images.indexOf(i))))})}}},{key:"build",value:function(){if(!this.ready){var e=this.element,t=this.options,n=e.parentNode,i=document.createElement("div");i.innerHTML='<div class="viewer-container" tabindex="-1" touch-action="none"><div class="viewer-canvas"></div><div class="viewer-magnifier" aria-hidden="true"><img class="viewer-magnifier-image" alt=""></div><div class="viewer-navigation" aria-hidden="true"><div class="viewer-prev" data-viewer-action="prev" role="button" aria-label="Previous"></div><div class="viewer-next" data-viewer-action="next" role="button" aria-label="Next"></div></div><div class="viewer-footer" aria-hidden="true"><div class="viewer-title" aria-hidden="true"></div><div class="viewer-toolbar" aria-hidden="true"></div><div class="viewer-navbar" aria-hidden="true"><ul class="viewer-list" role="navigation"></ul></div></div><div class="viewer-tooltip" role="alert" aria-hidden="true"></div><div class="viewer-button" data-viewer-action="mix" role="button" aria-hidden="true"></div><div class="viewer-player" aria-hidden="true"></div></div>';var r=i.querySelector(".".concat(u,"-container")),o=r.querySelector(".".concat(u,"-title")),a=r.querySelector(".".concat(u,"-toolbar")),s=r.querySelector(".".concat(u,"-navbar")),l=r.querySelector(".".concat(u,"-navigation")),c=r.querySelector(".".concat(u,"-button")),d=r.querySelector(".".concat(u,"-canvas"));this.parent=n,this.viewer=r,this.title=o,this.toolbar=a,this.navbar=s,this.navigation=l,this.button=c,this.canvas=d,this.footer=r.querySelector(".".concat(u,"-footer")),this.magnifier=r.querySelector(".".concat(u,"-magnifier")),this.magnifierImage=r.querySelector(".".concat(u,"-magnifier-image")),this.tooltipBox=r.querySelector(".".concat(u,"-tooltip")),this.player=r.querySelector(".".concat(u,"-player")),this.list=r.querySelector(".".concat(u,"-list")),r.id="".concat(u).concat(this.id),o.id="".concat(u,"Title").concat(this.id),Pe(o,t.title?Ve(Array.isArray(t.title)?t.title[0]:t.title):S),t.title&&o.removeAttribute("aria-hidden");var h=_e(t.navbar)?t.navbar:{},p=t.navbar,m=xe(h.size)?t.navbar:h.size;if(_e(t.navbar)&&(p=!!xe(h.show)||h.show),Pe(s,p?Ve(p):S),p&&s.removeAttribute("aria-hidden"),-1!==["small","medium","large"].indexOf(m)&&Pe(s,"".concat(u,"-").concat(m)),_e(t.navigation)?Ae(l.querySelectorAll('[role="button"]'),function(e){var n=Re(e,me),i=t.navigation[n],r=_e(i),o=r&&!xe(i.show)?i.show:i,a=r&&!xe(i.size)?i.size:i;$e(e,S,!o),ke(o)&&Pe(e,Ve(o)),-1!==["small","large"].indexOf(a)&&Pe(e,"".concat(u,"-").concat(a))}):Pe(l,t.navigation?Ve(t.navigation):S),t.navigation&&l.removeAttribute("aria-hidden"),$e(c,S,!t.button),t.button&&c.removeAttribute("aria-hidden"),t.keyboard&&(c.setAttribute("tabindex",0),Ae(l.querySelectorAll('[role="button"]'),function(e){e.setAttribute("tabindex",0)})),t.backdrop&&(Pe(r,"".concat(u,"-backdrop")),t.inline||"static"===t.backdrop||Be(d,me,"hide")),ge(t.className)&&t.className&&t.className.split(fe).forEach(function(e){Pe(r,e)}),t.toolbar){var f=document.createElement("ul"),v=_e(t.toolbar),g=ve.slice(0,3),x=ve.slice(7,9),C=ve.slice(9);v||Pe(a,Ve(t.toolbar)),a.removeAttribute("aria-hidden"),Ae(v?t.toolbar:ve,function(e,n){var i=v&&_e(e),r=v?De(n):e,o=i&&!xe(e.show)?e.show:e;if(o&&(t.zoomable||-1===g.indexOf(r))&&(t.rotatable||-1===x.indexOf(r))&&(t.scalable||-1===C.indexOf(r))){var a=i&&!xe(e.size)?e.size:e,s=i&&!xe(e.click)?e.click:e,l=document.createElement("li");t.keyboard&&l.setAttribute("tabindex",0),l.setAttribute("role","button"),Pe(l,"".concat(u,"-").concat(r)),Ee(s)||Be(l,me,r),ke(o)&&Pe(l,Ve(o)),-1!==["small","large"].indexOf(a)?Pe(l,"".concat(u,"-").concat(a)):"play"===r&&Pe(l,"".concat(u,"-large")),Ee(s)&&Fe(l,P,s),f.appendChild(l)}}),a.appendChild(f)}else Pe(a,S);if(t.title||p||t.toolbar?this.footer.removeAttribute("aria-hidden"):Pe(this.footer,S),!t.rotatable){var _=a.querySelectorAll('li[class*="rotate"]');Pe(_,T),Ae(_,function(e){a.appendChild(e)})}if(t.inline)Pe(c,k),Ie(r,{zIndex:t.zIndexInline}),"static"===window.getComputedStyle(n).position&&Ie(n,{position:"relative"}),n.insertBefore(r,e.nextSibling);else{Pe(c,w),Pe(r,y),Pe(r,b),Pe(r,S),Ie(r,{zIndex:t.zIndex});var E=t.container;ge(E)&&(E=this.ownerDocument.querySelector(E)),E||(E=this.body),E.appendChild(r)}t.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,Ee(t.ready)&&Fe(e,Z,t.ready,{once:!0}),!1!==We(e,Z)?this.ready&&t.inline&&this.view(this.index):this.ready=!1}}}],[{key:"create",value:function(e,n){return new t(e,n)}},{key:"setDefaults",value:function(e){Oe(a,_e(e)&&e)}},{key:"noConflict",value:function(){return window.Viewer=rt,t}}])}();return Oe(at.prototype,Qe,et,tt,nt,it),at});var _i=(null==Si.exports?{}:Si.exports).default||Si.exports,Ei="_image-preview-wrapper_1ox80_1",Ai=/* @__PURE__ */new Map,Ti=["pre"];function Mi(e){(Array.isArray(e)?e:[e]).forEach(e=>{Ti.includes(e)||Ti.push(e)})}var Oi=e=>{const t=e.target;"IMG"===t.tagName&&Ti.some(e=>null!==t.closest(e))&&e.stopImmediatePropagation()},Li=e=>{const t=e.target;if("IMG"!==t.tagName)return;if(Ti.some(e=>null!==t.closest(e)))return;const n=Ai.get(t);n&&n.show()},Ii=!1;function Ni(e,t){const n=e.current;if(!n)return;Ii||(n.addEventListener("click",Oi,!0),n.addEventListener("click",Li),Ii=!0);const i=n.querySelectorAll("img");i.forEach(e=>{e.onclick=null}),i.forEach(n=>{const i=n;if(t)return i.style.maxHeight="none",i.style.width="auto",void(i.style.display="block");if(i.parentElement?.querySelector(".image-toolbar"))return;if(Ti.some(e=>null!==i.closest(e)))return;const r=document.createElement("div");r.className=Ei,i.parentNode?.insertBefore(r,i),r.appendChild(i),((e,t)=>{const n=t.current;if(!n)return;const i=new _i(n,{toolbar:!0,navbar:!0,title:!1,tooltip:!0,zoomable:!0,rotatable:!1,scalable:!1,transition:!0,fullscreen:!0,keyboard:!0});Ai.set(e,i)})(i,e),i.style.maxHeight="100px",i.style.width="auto",i.style.display="block",i.style.overflow="hidden"})}var Pi;var zi="undefined"==typeof document?void 0:document,$i=!!zi&&"content"in zi.createElement("template"),ji=!!zi&&zi.createRange&&"createContextualFragment"in zi.createRange();function Di(e){return e=e.trim(),$i?function(e){var t=zi.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):ji?function(e){return Pi||(Pi=zi.createRange()).selectNode(zi.body),Pi.createContextualFragment(e).childNodes[0]}(e):function(e){var t=zi.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function Ri(e,t){var n,i,r=e.nodeName,o=t.nodeName;return r===o||(n=r.charCodeAt(0),i=o.charCodeAt(0),n<=90&&i>=97?r===o.toUpperCase():i<=90&&n>=97&&o===r.toUpperCase())}function Bi(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var Hi={OPTION:function(e,t){var n=e.parentNode;if(n){var i=n.nodeName.toUpperCase();"OPTGROUP"===i&&(i=(n=n.parentNode)&&n.nodeName.toUpperCase()),"SELECT"!==i||n.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}Bi(e,t,"selected")},INPUT:function(e,t){Bi(e,t,"checked"),Bi(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var i=e.firstChild;if(i){var r=i.nodeValue;if(r==n||!n&&r==e.placeholder)return;i.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n,i,r=-1,o=0,a=e.firstChild;a;)if("OPTGROUP"===(i=a.nodeName&&a.nodeName.toUpperCase()))(a=(n=a).firstChild)||(a=n.nextSibling,n=null);else{if("OPTION"===i){if(a.hasAttribute("selected")){r=o;break}o++}!(a=a.nextSibling)&&n&&(a=n.nextSibling,n=null)}e.selectedIndex=r}}};function qi(){}function Fi(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var Wi=function(e){return function(t,n,i){if(i||(i={}),"string"==typeof n)if("#document"===t.nodeName||"HTML"===t.nodeName){var r=n;(n=zi.createElement("html")).innerHTML=r}else if("BODY"===t.nodeName){var o=n;(n=zi.createElement("html")).innerHTML=o;var a=n.querySelector("body");a&&(n=a)}else n=Di(n);else 11===n.nodeType&&(n=n.firstElementChild);var s=i.getNodeKey||Fi,l=i.onBeforeNodeAdded||qi,c=i.onNodeAdded||qi,d=i.onBeforeElUpdated||qi,u=i.onElUpdated||qi,h=i.onBeforeNodeDiscarded||qi,p=i.onNodeDiscarded||qi,m=i.onBeforeElChildrenUpdated||qi,f=i.skipFromChildren||qi,v=i.addChild||function(e,t){return e.appendChild(t)},g=!0===i.childrenOnly,w=Object.create(null),b=[];function y(e){b.push(e)}function k(e,t){if(1===e.nodeType)for(var n=e.firstChild;n;){var i=void 0;t&&(i=s(n))?y(i):(p(n),n.firstChild&&k(n,t)),n=n.nextSibling}}function x(e,t,n){!1!==h(e)&&(t&&t.removeChild(e),p(e),k(e,n))}function S(e){if(1===e.nodeType||11===e.nodeType)for(var t=e.firstChild;t;){var n=s(t);n&&(w[n]=t),S(t),t=t.nextSibling}}function C(e){c(e);for(var t=e.firstChild;t;){var n=t.nextSibling,i=s(t);if(i){var r=w[i];r&&Ri(t,r)?(t.parentNode.replaceChild(r,t),_(r,t)):C(t)}else C(t);t=n}}function _(t,n,i){var r=s(n);if(r&&delete w[r],!i){var o=d(t,n);if(!1===o)return;if(o instanceof HTMLElement&&S(t=o),e(t,n),u(t),!1===m(t,n))return}"TEXTAREA"!==t.nodeName?function(e,t){var n,i,r,o,a,c=f(e,t),d=t.firstChild,u=e.firstChild;e:for(;d;){for(o=d.nextSibling,n=s(d);!c&&u;){if(r=u.nextSibling,d.isSameNode&&d.isSameNode(u)){d=o,u=r;continue e}i=s(u);var h=u.nodeType,p=void 0;if(h===d.nodeType&&(1===h?(n?n!==i&&((a=w[n])?r===a?p=!1:(e.insertBefore(a,u),i?y(i):x(u,e,!0),i=s(u=a)):p=!1):i&&(p=!1),(p=!1!==p&&Ri(u,d))&&_(u,d)):3!==h&&8!=h||(p=!0,u.nodeValue!==d.nodeValue&&(u.nodeValue=d.nodeValue))),p){d=o,u=r;continue e}i?y(i):x(u,e,!0),u=r}if(n&&(a=w[n])&&Ri(a,d))c||v(e,a),_(a,d);else{var m=l(d);!1!==m&&(m&&(d=m),d.actualize&&(d=d.actualize(e.ownerDocument||zi)),v(e,d),C(d))}d=o,u=r}!function(e,t,n){for(;t;){var i=t.nextSibling;(n=s(t))?y(n):x(t,e,!0),t=i}}(e,u,i);var g=Hi[e.nodeName];g&&g(e,t)}(t,n):Hi.TEXTAREA(t,n)}S(t);var E,A,T=t,M=T.nodeType,O=n.nodeType;if(!g)if(1===M)1===O?Ri(t,n)||(p(t),T=function(e,t){for(var n=e.firstChild;n;){var i=n.nextSibling;t.appendChild(n),n=i}return t}(t,(E=n.nodeName,(A=n.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==A?zi.createElementNS(A,E):zi.createElement(E)))):T=n;else if(3===M||8===M){if(O===M)return T.nodeValue!==n.nodeValue&&(T.nodeValue=n.nodeValue),T;T=n}if(T===n)p(t);else{if(n.isSameNode&&n.isSameNode(T))return;if(_(T,n,g),b)for(var L=0,I=b.length;L<I;L++){var N=w[b[L]];N&&x(N,N.parentNode,!1)}}return!g&&T!==t&&t.parentNode&&(T.actualize&&(T=T.actualize(t.ownerDocument||zi)),t.parentNode.replaceChild(T,t)),T}}(function(e,t){var n,i,r,o,a=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var s=a.length-1;s>=0;s--)i=(n=a[s]).name,r=n.namespaceURI,o=n.value,r?(i=n.localName||i,e.getAttributeNS(r,i)!==o&&("xmlns"===n.prefix&&(i=n.name),e.setAttributeNS(r,i,o))):e.getAttribute(i)!==o&&e.setAttribute(i,o);for(var l=e.attributes,c=l.length-1;c>=0;c--)i=(n=l[c]).name,(r=n.namespaceURI)?(i=n.localName||i,t.hasAttributeNS(r,i)||e.removeAttributeNS(r,i)):t.hasAttribute(i)||e.removeAttribute(i)}}),Xi="data-md-persist",Yi=/* @__PURE__ */new Set(["mermaid-render-noCode","code-collapsed","has-left-mask","has-right-mask","has-both-masks","active"]);var Ui="data-md-key",Vi=e=>{const t=e.getAttribute(Ui);return`${e.tagName.toLowerCase()}#${t??(e=>("string"==typeof e.className?e.className:"").split(/\s+/).filter(e=>e&&!e.startsWith("copy-")&&!Yi.has(e)).join(" "))(e)}`},Gi=e=>{const t={};for(const n of Array.from(e.attributes))n.name.startsWith("data-")&&"data-md-persist"!==n.name&&n.name!==Ui&&(n.name.endsWith("-placeholder")||(t[n.name]=n.value));return t},Zi=(e,t)=>{if(0===t.length)return;const n=/* @__PURE__ */new Set;Array.from(e.querySelectorAll("*")).filter(e=>Array.from(e.attributes).some(e=>e.name.endsWith("-placeholder"))).forEach(e=>{const i=Vi(e),r=t.find(t=>t.key===i&&!n.has(t.el)&&((e,t)=>{const n=Gi(t),i=Gi(e);return Object.keys(n).every(e=>i[e]===n[e])})(t.el,e));r&&(n.add(r.el),e.replaceWith(r.el))})};function Ki({content:e,codeType:t,customRenderers:n,throttleMs:r=16,onNodeDiscarded:a,onPatched:s}){const[d,u]=c([]),[h,p]=c(!1),m=l(""),f=l(""),v=l(null),g=l(null),w=l(null),b=l(!0),y=l(0),k=l(void 0);k.current=a;const x=l(void 0);x.current=s;const S=i(async(e,i)=>{const r=t&&"md"!==t?.toLocaleLowerCase()?"```"+t+"\n"+e+"\n```":e,o=await ki(r,n);if(!o||i!==y.current)return;const a=o.info;if(!a)return;const s=()=>{if(i!==y.current)return;const e=v.current;if(!e)return void setTimeout(s,0);if(u(o.anchor||[]),f.current=a,b.current)return e.innerHTML=a,b.current=!1,void(m.current=r);const t=document.createElement("div");t.innerHTML=a;const n=(e=>{const t=[];return e.querySelectorAll(`[${Xi}]`).forEach(e=>{const n=e;n.classList.contains("pre-handle")||n.parentElement?.closest("[data-md-persist]")||(t.push({el:n,key:Vi(n)}),n.remove())}),t})(e),l=/* @__PURE__ */new WeakMap;Wi(e,t,{childrenOnly:!0,getNodeKey:e=>function(e){if(1!==e.nodeType)return null;const t=e,n=t.getAttribute("id");if(n)return`id:${n}`;const i=("string"==typeof t.className?t.className:"").split(/\s+/).filter(e=>e&&!e.startsWith("copy-")&&!Yi.has(e)).join(" ");return i?`${t.tagName.toLowerCase()}#${i}`:null}(e),onBeforeElUpdated(e,t){const n=/* @__PURE__ */new Map;for(const i of Array.from(e.attributes))i.name.startsWith("data-")&&!t.hasAttribute(i.name)&&n.set(i.name,i.value);return n.size&&l.set(e,n),!0},onElUpdated(e){const t=l.get(e);t&&(t.forEach((t,n)=>e.setAttribute(n,t)),l.delete(e))},onBeforeNodeAdded:e=>(1!==e.nodeType||!e.classList.contains("pre-handle"))&&e,onBeforeNodeDiscarded:e=>1!==e.nodeType||!e.hasAttribute("data-md-persist"),onNodeDiscarded(e){1===e.nodeType&&k.current&&k.current(e)}}),Zi(e,n),m.current=r,x.current?.()};s()},[t,n]),C=i((e,t)=>{w.current={content:e,seq:t},null!=g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{const e=w.current;w.current=null,e&&S(e.content,e.seq)},r)},[r,S]);return o(()=>{if(!e)return y.current+=1,b.current=!0,p(!1),m.current="",void(f.current="");const n=t&&"md"!==t?.toLocaleLowerCase()?"```"+t+"\n"+e+"\n```":e;if(m.current===n)return;y.current+=1;const i=y.current;if(p(!0),!b.current)return C(e,i),()=>{null!=g.current&&clearTimeout(g.current)};S(e,i)},[e,t,C,S]),o(()=>()=>{y.current+=1,null!=g.current&&clearTimeout(g.current)},[]),{anchors:d,hasContent:h,setInnerRef:i(e=>{v.current=e},[])}}var Ji="_tocToggle_gf6l6_1",Qi=/* @__PURE__ */new Map,er=e=>{const t=e.querySelector("code");return t?(t.className.match(/language-([^\s]+)/)?.[1]??"")+"\0"+(t.textContent??""):null};function tr({preNode:e}){const[t,n]=c(!0);/* @__PURE__ */
12
+ return $("span",{className:"code-toggle",onClick:()=>{n(!t),e.classList.toggle("code-collapsed",t)},children:/* @__PURE__ */$(t?d:u,{})})}var nr=e=>{const{isSlotMermaid:t=!0,isShowCollapsed:n=!0}=e;document.querySelectorAll('.markdown-html code[class*="language-"]').forEach(e=>{const i=e,r=(e=>e.className.match(/language-([^\s]+)/)?.[1]??"")(i),o=t&&"mermaid"===r?"mermaid-render-noCode":"",a=i.parentNode;if(!a)return;const s=a.querySelector(".pre-handle");if(s){const e=s.getAttribute("data-md-copy-id");e&&!i.classList.contains(e)&&i.classList.add(e),o?i.classList.add(o):i.classList.remove("mermaid-render-noCode");const t=s.querySelector("[data-md-lang]");if(t&&t.textContent!==r&&(t.textContent=r),s.getAttribute("data-md-show-collapsed")===String(n))return;Qi.get(s)?.unmount(),Qi.delete(s),s.remove()}const l=`copy-${crypto.randomUUID()}`;i.classList.add(l),o&&i.classList.add(o);const c=document.createElement("div");c.className="pre-handle",c.setAttribute(Xi,""),c.setAttribute("data-md-copy-id",l),c.setAttribute("data-md-show-collapsed",String(n)),a.insertBefore(c,i);const d=/* @__PURE__ */j(z,{children:[/* @__PURE__ */$("img",{src:"https://remons.cn:3008/upload/md_assets/code_icon.png",alt:""}),/* @__PURE__ */$("span",{"data-md-lang":!0,children:r})]}),u=/* @__PURE__ */$("span",{className:"copy",onClick:()=>{const e=document.querySelector(`.${l}`);e&&((0,ye.copy)(e),oe.success("复制成功"))},children:/* @__PURE__ */$(v,{})}),h=P(c);Qi.set(c,h),h.render(/* @__PURE__ */j(z,{children:[/* @__PURE__ */$("span",{children:d}),/* @__PURE__ */j("span",{className:"code-handle",children:[u,n&&/* @__PURE__ */$(tr,{preNode:a})]})]}))})};function ir(e){const{content:t,showBackTop:n,showToc:r,footer:s,backTopTarget:d=document.body,mermaidDebounce:u,useIncremental:h=!1,incrementalThrottleMs:p}=e,[m,f]=c(""),[v,g]=c([]),[w,b]=c(""),[y,k]=c(!1),x=l(null),S=l(null),C=l(null),_=l(e);_.current=e;const E=i(e=>{const t=[];e.classList?.contains("pre-handle")&&t.push(e),e.querySelectorAll(".pre-handle").forEach(e=>t.push(e)),t.forEach(e=>{const t=Qi.get(e);t&&(t.unmount(),Qi.delete(e))})},[]),A=i(()=>{nr(_.current)},[]),{anchors:T,hasContent:M,setInnerRef:O}=Ki({content:t,codeType:e.codeType,customRenderers:e.customRenderers,throttleMs:p,onNodeDiscarded:E,onPatched:A}),I=h?T:v,N=h?M:!!m;o(()=>{let e=null,n=!1;return(async()=>{if(!h){C.current=(e=>{const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map;return e?.querySelectorAll("pre").forEach(e=>{const i=e,r=i.querySelector("code");if(!r)return;const o=er(i);if(o){const e=t.get(o);e?e.push(i):t.set(o,[i])}const a=r.className.match(/language-([^\s]+)/)?.[1]??"",s=n.get(a);s?s.push(i):n.set(a,[i])}),{exact:t,byLanguage:n}})(x.current);const{codeType:e}=_.current;let i="";i=e&&"md"!==e?.toLocaleLowerCase()?"```"+e+"\n"+t+"\n```":t;const r=await ki(i,_.current.customRenderers);if(n)return;f(r?.info),g(r?.anchor||[])}e=setTimeout(async()=>{if(n)return;nr(_.current);const{isPrintPreview:e,excludedSelectors:t}=_.current;t&&Mi(t),Ni(x,e);const{isSlotMermaid:i,showDriverGuide:r,chartConfig:o,defaultCollapsed:a,cdn:s}=_.current;if(i){const{renderMermaidWithControls:t}=await Promise.resolve().then(()=>Ho);await t({showDriverGuide:r,isPrintPreview:e,chartConfig:o,defaultCollapsed:a,cdn:s})}},u??10)})(),()=>{n=!0,e&&clearTimeout(e),h||function(){const e=document.querySelector(".markdown-html");e&&Ii&&(e.removeEventListener("click",Oi,!0),e.removeEventListener("click",Li),Ii=!1),Ai.forEach(e=>{e.destroy()}),Ai.clear()}()}},[t]),a(()=>{!h&&m&&(((e,t)=>{if(!e||!t)return;const n=Array.from(e.querySelectorAll("pre")),i=/* @__PURE__ */new Set;n.forEach(e=>{const n=er(e);if(!n)return;const r=t.exact.get(n)?.shift();r&&r!==e&&(i.add(r),e.replaceWith(r))}),n.forEach(e=>{if(!e.isConnected)return;const n=e.querySelector("code");if(!n)return;const r=n.className.match(/language-([^\s]+)/)?.[1]??"",o=t.byLanguage.get(r);if(!o?.length)return;let a;for(;o.length;){const t=o.shift();if(t!==e&&!i.has(t)){a=t;break}}if(!a)return;i.add(a);const s=a.querySelector("code");s&&(s.innerHTML=n.innerHTML),e.replaceWith(a)})})(S.current,C.current),C.current=null,Qi.forEach((e,t)=>{t.isConnected||(e.unmount(),Qi.delete(t))}))},[m,h]);const P=l(null);return P.current=x.current,o(()=>()=>{const e=P.current;e&&e.querySelectorAll(".pre-handle").forEach(e=>{const t=e,n=Qi.get(t);n&&(n.unmount(),Qi.delete(t))})},[]),o(()=>{if(0===I.length)return;const e=[],t=n=>{n.forEach(n=>{e.push(n.href),n.children?.length&&t(n.children)})};t(I);const n=e.map(e=>document.getElementById(e)).filter(Boolean);if(0===n.length)return;const i=new IntersectionObserver(e=>{const t=e.filter(e=>e.isIntersecting);if(0===t.length)return;const n=t.reduce((e,t)=>t.boundingClientRect.top<e.boundingClientRect.top?t:e);b(n.target.id)},{rootMargin:"0px 0px -90% 0px",threshold:0});return n.forEach(e=>i.observe(e)),()=>i.disconnect()},[I]),o(()=>{const e=()=>{const e=window.location.hash.slice(1);if(!e)return;const t=document.getElementById(e);t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),b(e))},t=setTimeout(e,100),n=()=>e();return window.addEventListener("hashchange",n),()=>{clearTimeout(t),window.removeEventListener("hashchange",n)}},[I]),/* @__PURE__ */j("div",{className:"markdown",children:[N?/* @__PURE__ */j("div",{className:"markdown-html",ref:x,children:[/* @__PURE__ */$("div",{style:{width:"100%"},...h?{ref:O}:{ref:S,dangerouslySetInnerHTML:{__html:m}}}),s&&/* @__PURE__ */$("div",{className:"markdown-footer",children:s})]}):/* @__PURE__ */$(ue,{}),n&&/* @__PURE__ */$(le,{target:()=>d}),r&&I.length>0&&/* @__PURE__ */$("div",{className:pe(Ji,"md-toc-toggle","remons-markdown-circle"),onClick:()=>k(!y),children:/* @__PURE__ */$(L,{})}),r&&/* @__PURE__ */$(we,{anchors:I,activeId:w,visible:y,onClose:()=>k(!1)})]})}var rr={javascript:B,typescript:H,css:q,json:F,bash:W,xml:X,plaintext:Y};function or(e,t){let n;if(e instanceof Blob)n=URL.createObjectURL(e);else{if("string"!=typeof e)return void oe.error("不支持的下载格式");n=e}const i=document.createElement("a");i.href=n,i.download=t,i.click(),URL.revokeObjectURL(n),oe.success(`${t} 已下载`)}function ar(e,t="image",n=2){const{w:i,h:r}=function(e){const t=e.match(/viewBox=["']?([^"']+)["']/i);let n=0,i=0;if(t){const e=t[1].split(/[\s,]+/).map(Number);4===e.length&&(n=e[2],i=e[3])}const r=e.match(/width=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*["']/i),o=e.match(/height=["']?\s*([\d.]+)\s*(?:px|pt|cm|mm|in|%)*/i),a=r?parseFloat(r[1]):0,s=o?parseFloat(o[1]):0;return n&&i?{w:n,h:i}:{w:a||n||800,h:s||i||600}}(e),o=function(e){return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`}(e),a=new Image;a.crossOrigin="anonymous",a.src=o,a.onload=()=>{const e=document.createElement("canvas");e.width=Math.max(1,Math.round(i*n)),e.height=Math.max(1,Math.round(r*n));const o=e.getContext("2d");o.fillStyle="#ffffff",o.fillRect(0,0,e.width,e.height),o.scale(n,n),o.drawImage(a,0,0,i,r),e.toBlob(e=>{e?or(e,`${t}.png`):oe.error("PNG 生成失败")},"image/png")},a.onerror=()=>{oe.error("PNG 生成失败:图片加载失败")}}var sr="app-theme-mode",lr="light",cr="dark";function dr(){try{const e=localStorage.getItem(sr);if("light"===e||"dark"===e||"system"===e)return e}catch{}return"system"}function ur(e){return"system"===e?"undefined"==typeof window?lr:window.matchMedia("(prefers-color-scheme: dark)").matches?cr:lr:e}function hr(e){"undefined"!=typeof document&&(document.documentElement.dataset.theme=e)}"undefined"!=typeof window&&hr(ur(dr()));var pr=t(null);function mr({children:t}){const[n,r]=c(()=>dr()),[a,l]=c(()=>ur(n)),d=i(e=>{r(e);try{localStorage.setItem(sr,e),window.dispatchEvent(new Event("storage"))}catch{}},[]);o(()=>{const e=ur(n);l(e),hr(e)},[n]),o(()=>{if("system"!==n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),t=e=>{const t=e.matches?cr:lr;l(t),hr(t)};return e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[n]),o(()=>{const e=()=>{const e=dr();e!==n&&r(e)};window.addEventListener("storage",e);const t=new MutationObserver(()=>{const e=document.documentElement.dataset.theme;if(e&&e!==a){l(e);const t=dr();t!==n&&r(t)}});return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>{window.removeEventListener("storage",e),t.disconnect()}},[n,a]);const u=a===cr,h=s(()=>({theme:a,mode:n,isDark:u,setMode:d}),[a,n,u,d]);return e.createElement(pr.Provider,{value:h},t)}var fr={"modal-mask":"_modal-mask_dzv9e_4","modal-mask-visible":"_modal-mask-visible_dzv9e_18",modal:"_modal_dzv9e_4","modal-header":"_modal-header_dzv9e_34","modal-title":"_modal-title_dzv9e_41","modal-close":"_modal-close_dzv9e_46","modal-body":"_modal-body_dzv9e_62","modal-footer":"_modal-footer_dzv9e_67"},vr=J.bind(fr),gr=({open:e,title:t,width:n=520,onCancel:i,footer:r,className:a="",children:s})=>{const l=()=>{i?.()};if(o(()=>{if(!e)return;const t=e=>{"Escape"===e.key&&l()};return document.addEventListener("keydown",t),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",t),document.body.style.overflow=""}},[e]),!e)return null;const c=/* @__PURE__ */$("div",{className:vr("modal-mask","modal-mask-visible"),onClick:e=>{e.target===e.currentTarget&&l()},children:/* @__PURE__ */j("div",{className:vr("modal",a),style:{width:n},onClick:e=>{e.stopPropagation()},children:[
13
+ /* @__PURE__ */j("div",{className:vr("modal-header"),children:[/* @__PURE__ */$("span",{className:vr("modal-title"),children:t}),/* @__PURE__ */$("div",{className:vr("modal-close"),onClick:l,children:"×"})]}),
14
+ /* @__PURE__ */$("div",{className:vr("modal-body"),children:s}),null!=r&&/* @__PURE__ */$("div",{className:vr("modal-footer"),children:r})]})});return U(c,document.body)},wr={mermaid:"https://registry.npmmirror.com/mermaid/11.17.2/files/dist/mermaid.min.js"};var br=null;function yr(e){return br||(br=new Promise((t,n)=>{if(window.mermaid)return void t(window.mermaid);const i=document.createElement("script");i.src=function(e,t){return t?.[e]??wr[e]??""}("mermaid",e),i.onload=()=>t(window.mermaid),i.onerror=()=>n(/* @__PURE__ */new Error("Mermaid 脚本加载失败")),document.head.appendChild(i)})),br}var kr=0;function xr({source:e,debounceMs:t=300,isDark:n,chartConfig:i,cdn:r}){const{mermaid:a,loading:s}=function(e){const[t,n]=c(null),[i,r]=c(!0),[a,s]=c(null);return o(()=>{let t=!1;return yr(e).then(e=>{t||(n(()=>e),r(!1))}).catch(e=>{t||(s(e),r(!1))}),()=>{t=!0}},[]),{mermaid:t,loading:i,error:a}}(r),[d,u]=c(""),[h,p]=c(""),m=l(0);return o(()=>{a&&a.initialize({startOnLoad:!1,theme:n?"dark":"default",securityLevel:"loose"})},[a,n]),o(()=>{if(!a)return;const n=(e||"").trim();if(!n)return u(""),void p("");p("");const r=++m.current,o=setTimeout(async()=>{const e="mermaid-render-"+kr++;try{const{svg:t}=await a.render(e,i?i(n):n);if(r!==m.current)return;u(t),p("")}catch(t){if(r!==m.current)return;console.error("Mermaid render error:",t);const e=t instanceof Error?t.message:String(t);p(e?.split("\n")[0]||e)}finally{const t=document.getElementById(e)||document.getElementById(`d${e}`);t&&t.parentNode&&t.parentNode.removeChild(t)}},t);return()=>clearTimeout(o)},[e,n,a,t,i]),{svg:d,error:h,loading:s}}"undefined"!=typeof window&&(window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}));var Sr,Cr="undefined"!=typeof document&&!!document.documentMode;function _r(){return Sr||(Sr=document.createElement("div").style)}var Er=["webkit","moz","ms"],Ar={};function Tr(e){if(Ar[e])return Ar[e];const t=_r();if(e in t)return Ar[e]=e;const n=e[0].toUpperCase()+e.slice(1);let i=Er.length;for(;i--;){const r=`${Er[i]}${n}`;if(r in t)return Ar[e]=r}}function Mr(e,t){return parseFloat(t[Tr(e)])||0}function Or(e,t,n=window.getComputedStyle(e)){const i="border"===t?"Width":"";return{left:Mr(`${t}Left${i}`,n),right:Mr(`${t}Right${i}`,n),top:Mr(`${t}Top${i}`,n),bottom:Mr(`${t}Bottom${i}`,n)}}function Lr(e,t,n){e.style[Tr(t)]=n}function Ir(e){let t=e.parentNode;t&&1===t.nodeType||(t=document.documentElement);const n=window.getComputedStyle(e),i=window.getComputedStyle(t),r=e.getBoundingClientRect(),o=t.getBoundingClientRect();return{elem:{style:n,width:r.width,height:r.height,top:r.top,bottom:r.bottom,left:r.left,right:r.right,margin:Or(e,"margin",n),border:Or(e,"border",n)},parent:{style:i,width:o.width,height:o.height,top:o.top,bottom:o.bottom,left:o.left,right:o.right,padding:Or(t,"padding",i),border:Or(t,"border",i)}}}var Nr={down:"mousedown",move:"mousemove",up:"mouseup mouseleave"};function Pr(e,t,n,i){Nr[e].split(" ").forEach(e=>{t.addEventListener(e,n,i)})}function zr(e,t,n){Nr[e].split(" ").forEach(e=>{t.removeEventListener(e,n)})}function $r(e,t){let n=e.length;for(;n--;)if(e[n].pointerId===t.pointerId)return n;return-1}function jr(e,t){let n;if(t.touches){n=0;for(const i of t.touches)i.pointerId=n++,jr(e,i)}else n=$r(e,t),n>-1&&e.splice(n,1),e.push(t)}function Dr(e){let t,n=(e=e.slice(0)).pop();for(;t=e.pop();)n={clientX:(t.clientX-n.clientX)/2+n.clientX,clientY:(t.clientY-n.clientY)/2+n.clientY};return n}function Rr(e){if(e.length<2)return 0;const t=e[0],n=e[1];return Math.sqrt(Math.pow(Math.abs(n.clientX-t.clientX),2)+Math.pow(Math.abs(n.clientY-t.clientY),2))}function Br(e,t){return 1===e.nodeType&&` ${function(e){return(e.getAttribute("class")||"").trim()}(e)} `.indexOf(` ${t} `)>-1}"undefined"!=typeof window&&("function"==typeof window.PointerEvent?Nr={down:"pointerdown",move:"pointermove",up:"pointerup pointerleave pointercancel"}:"function"==typeof window.TouchEvent&&(Nr={down:"touchstart",move:"touchmove",up:"touchend touchcancel"}));var Hr=/^http:[\w\.\/]+svg$/;var qr={animate:!1,canvas:!1,cursor:"move",disablePan:!1,disableZoom:!1,disableXAxis:!1,disableYAxis:!1,duration:200,easing:"ease-in-out",exclude:[],excludeClass:"panzoom-exclude",handleStartEvent:e=>{e.preventDefault(),e.stopPropagation()},maxScale:4,minScale:.125,overflow:"hidden",panOnlyWhenZoomed:!1,pinchAndPan:!1,relative:!1,setTransform:function(e,{x:t,y:n,scale:i,isSVG:r},o){if(Lr(e,"transform",`scale(${i}) translate(${t}px, ${n}px)`),r&&Cr){const t=window.getComputedStyle(e).getPropertyValue("transform");e.setAttribute("transform",t)}},startX:0,startY:0,startScale:1,step:.3,touchAction:"none"};function Fr(e,t){if(!e)throw new Error("Panzoom requires an element as an argument");if(1!==e.nodeType)throw new Error("Panzoom requires an element with a nodeType of 1");if(!function(e){let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1}(e))throw new Error("Panzoom should be called on elements that have been attached to the DOM");t={...qr,...t};const n=function(e){return Hr.test(e.namespaceURI)&&"svg"!==e.nodeName.toLowerCase()}(e),i=e.parentNode;i.style.overflow=t.overflow,i.style.userSelect="none",i.style.touchAction=t.touchAction,(t.canvas?i:e).style.cursor=t.cursor,e.style.userSelect="none",e.style.touchAction=t.touchAction,Lr(e,"transformOrigin","string"==typeof t.origin?t.origin:n?"0 0":"50% 50%");let r,o,a,s,l,c,d=0,u=0,h=1,p=!1;function m(t,n,i){if(i.silent)return;const r=new CustomEvent(t,{detail:n});e.dispatchEvent(r)}function f(t,i,r){const o={x:d,y:u,scale:h,isSVG:n,originalEvent:r};return requestAnimationFrame(()=>{"boolean"==typeof i.animate&&(i.animate?function(e,t){Lr(e,"transition",`${Tr("transform")} ${t.duration}ms ${t.easing}`)}(e,i):Lr(e,"transition","none")),i.setTransform(e,o,i),m(t,o,i),m("panzoomchange",o,i)}),o}function v(n,i,r,o){const a={...t,...o},s={x:d,y:u,opts:a};if(!o?.force&&(a.disablePan||a.panOnlyWhenZoomed&&h===a.startScale))return s;if(n=parseFloat(n),i=parseFloat(i),a.disableXAxis||(s.x=(a.relative?d:0)+n),a.disableYAxis||(s.y=(a.relative?u:0)+i),a.contain){const t=Ir(e),n=t.elem.width/h,i=t.elem.height/h,o=n*r,l=i*r,c=(o-n)/2,d=(l-i)/2;if("inside"===a.contain){const e=(-t.elem.margin.left-t.parent.padding.left+c)/r,n=(t.parent.width-o-t.parent.padding.left-t.elem.margin.left-t.parent.border.left-t.parent.border.right+c)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-t.elem.margin.top-t.parent.padding.top+d)/r,a=(t.parent.height-l-t.parent.padding.top-t.elem.margin.top-t.parent.border.top-t.parent.border.bottom+d)/r;s.y=Math.max(Math.min(s.y,a),i)}else if("outside"===a.contain){const e=(-(o-t.parent.width)-t.parent.padding.left-t.parent.border.left-t.parent.border.right+c)/r,n=(c-t.parent.padding.left)/r;s.x=Math.max(Math.min(s.x,n),e);const i=(-(l-t.parent.height)-t.parent.padding.top-t.parent.border.top-t.parent.border.bottom+d)/r,a=(d-t.parent.padding.top)/r;s.y=Math.max(Math.min(s.y,a),i)}}return a.roundPixels&&(s.x=Math.round(s.x),s.y=Math.round(s.y)),s}function g(n,i){const r={...t,...i},o={scale:h,opts:r};if(!i?.force&&r.disableZoom)return o;let a=t.minScale,s=t.maxScale;if(r.contain){const n=Ir(e),i=n.elem.width/h,r=n.elem.height/h;if(i>1&&r>1){const e=(n.parent.width-n.parent.border.left-n.parent.border.right)/i,o=(n.parent.height-n.parent.border.top-n.parent.border.bottom)/r;"inside"===t.contain?s=Math.min(s,e,o):"outside"===t.contain&&(a=Math.max(a,e,o))}}return o.scale=Math.min(Math.max(n,a),s),o}function w(e,t,i,r){const o=v(e,t,h,i);return d!==o.x||u!==o.y?(d=o.x,u=o.y,f("panzoompan",o.opts,r)):{x:d,y:u,scale:h,isSVG:n,originalEvent:r}}function b(e,t,n){const i=g(e,t),r=i.opts;if(!t?.force&&r.disableZoom)return;e=i.scale;let o=d,a=u;if(r.focal){const t=r.focal;o=(t.x/e-t.x/h+d*e)/e,a=(t.y/e-t.y/h+u*e)/e}const s=v(o,a,e,{relative:!1,force:!0});return d=s.x,u=s.y,h=e,f("panzoomzoom",r,n)}function y(e,n){const i={...t,animate:!0,...n};return b(h*Math.exp((e?1:-1)*i.step),i)}function k(t,i,r,o){const a=Ir(e),s=a.parent.width-a.parent.padding.left-a.parent.padding.right-a.parent.border.left-a.parent.border.right,l=a.parent.height-a.parent.padding.top-a.parent.padding.bottom-a.parent.border.top-a.parent.border.bottom;let c=i.clientX-a.parent.left-a.parent.padding.left-a.parent.border.left-a.elem.margin.left,d=i.clientY-a.parent.top-a.parent.padding.top-a.parent.border.top-a.elem.margin.top;n||(c-=a.elem.width/h/2,d-=a.elem.height/h/2);return b(t,{...r,animate:!1,focal:{x:c/s*(s*t),y:d/l*(l*t)}},o)}b(t.startScale,{animate:!1,force:!0}),setTimeout(()=>{w(t.startX,t.startY,{animate:!1,force:!0})});const x=[];function S(e){if(function(e,t){for(let n=e;null!=n;n=n.parentNode)if(Br(n,t.excludeClass)||t.exclude.indexOf(n)>-1)return!0;return!1}(e.target,t))return;jr(x,e),p=!0,t.handleStartEvent(e),r=d,o=u,m("panzoomstart",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t);const i=Dr(x);a=i.clientX,s=i.clientY,l=h,c=Rr(x)}function C(e){if(!p||void 0===r||void 0===o||void 0===a||void 0===s)return;jr(x,e);const n=Dr(x),i=x.length>1;let d=h;i&&(0===c&&(c=Rr(x)),d=g((Rr(x)-c)*t.step/80+l).scale,k(d,n,{animate:!1},e)),i&&!t.pinchAndPan||w(r+(n.clientX-a)/d,o+(n.clientY-s)/d,{animate:!1},e)}function _(e){1===x.length&&m("panzoomend",{x:d,y:u,scale:h,isSVG:n,originalEvent:e},t),function(e,t){if(t.touches){for(;e.length;)e.pop();return}const n=$r(e,t);n>-1&&e.splice(n,1)}(x,e),p&&(p=!1,r=o=a=s=void 0)}let E=!1;function A(){E||(E=!0,Pr("down",t.canvas?i:e,S),Pr("move",document,C,{passive:!0}),Pr("up",document,_,{passive:!0}))}return t.noBind||A(),{bind:A,destroy:function(){E=!1,zr("down",t.canvas?i:e,S),zr("move",document,C),zr("up",document,_)},eventNames:Nr,getPan:()=>({x:d,y:u}),getScale:()=>h,getOptions:()=>function(e){const t={};for(const n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(t),handleDown:S,handleMove:C,handleUp:_,pan:w,reset:function(e){const n={...t,animate:!0,force:!0,...e};h=g(n.startScale,n).scale;const i=v(n.startX,n.startY,h,n);return d=i.x,u=i.y,f("panzoomreset",n)},resetStyle:function(){i.style.overflow="",i.style.userSelect="",i.style.touchAction="",i.style.cursor="",e.style.cursor="",e.style.userSelect="",e.style.touchAction="",Lr(e,"transformOrigin","")},setOptions:function(n={}){for(const e in n)n.hasOwnProperty(e)&&(t[e]=n[e]);(n.hasOwnProperty("cursor")||n.hasOwnProperty("canvas"))&&(i.style.cursor=e.style.cursor="",(t.canvas?i:e).style.cursor=t.cursor),n.hasOwnProperty("overflow")&&(i.style.overflow=n.overflow),n.hasOwnProperty("touchAction")&&(i.style.touchAction=n.touchAction,e.style.touchAction=n.touchAction)},setStyle:(t,n)=>Lr(e,t,n),zoom:b,zoomIn:function(e){return y(!0,e)},zoomOut:function(e){return y(!1,e)},zoomToPoint:k,zoomWithWheel:function(e,n){e.preventDefault();const i={...t,...n,animate:!1};return k(g(h*Math.exp(((0===e.deltaY&&e.deltaX?e.deltaX:e.deltaY)<0?1:-1)*i.step/3),i).scale,e,i,e)}}}Fr.defaultOptions=qr;var Wr={tooltip:"_tooltip_1kuma_4","tooltip-trigger":"_tooltip-trigger_1kuma_7","tooltip-inner":"_tooltip-inner_1kuma_11","tooltip-inner-visible":"_tooltip-inner-visible_1kuma_27","tooltip-content":"_tooltip-content_1kuma_30","tooltip-arrow":"_tooltip-arrow_1kuma_36"},Xr=J.bind(Wr),Yr=({title:e,children:t,visible:n,onVisibleChange:i})=>{const[r,a]=c(!1),s=l(null),d=l(null),[u,h]=c({top:0,left:0}),p=void 0!==n?n:r,m=()=>{if(d.current){const e=d.current.getBoundingClientRect();h({top:e.top-8,left:e.left+e.width/2})}};o(()=>{if(!p)return;const e=()=>m(),t=()=>m();return window.addEventListener("resize",e,{passive:!0}),window.addEventListener("scroll",t,{passive:!0}),m(),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",t)}},[p]),o(()=>()=>{s.current&&window.clearTimeout(s.current)},[]);const f=p&&e?U(/* @__PURE__ */j("div",{className:Xr("tooltip-inner","tooltip-inner-visible"),style:{top:u.top,left:u.left},children:[/* @__PURE__ */$("span",{className:Xr("tooltip-content"),children:e}),/* @__PURE__ */$("span",{className:Xr("tooltip-arrow")})]}),document.body):null;/* @__PURE__ */
15
+ return j("div",{ref:d,className:Xr("tooltip"),onMouseEnter:()=>{s.current&&window.clearTimeout(s.current),s.current=window.setTimeout(()=>{m(),a(!0),i?.(!0)},150)},onMouseLeave:()=>{s.current&&(window.clearTimeout(s.current),s.current=null),a(!1),i?.(!1)},children:[/* @__PURE__ */$("div",{className:Xr("tooltip-trigger"),children:t}),f]})},Ur={dropdown:"_dropdown_13j0u_4","dropdown-trigger":"_dropdown-trigger_13j0u_8","dropdown-menu":"_dropdown-menu_13j0u_12","dropdown-menu-visible":"_dropdown-menu-visible_13j0u_26","dropdown-item":"_dropdown-item_13j0u_30"},Vr=J.bind(Ur),Gr=({items:e,children:t,onClick:n,className:i=""})=>{const[r,a]=c(!1),s=l(null),d=()=>{a(!1)};return o(()=>{const e=e=>{s.current&&!s.current.contains(e.target)&&d()};return r&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[r]),/* @__PURE__ */j("div",{ref:s,className:Vr("dropdown",i),children:[/* @__PURE__ */$("div",{className:Vr("dropdown-trigger"),onClick:()=>{a(e=>!e)},children:t}),r&&/* @__PURE__ */$("div",{className:Vr("dropdown-menu","dropdown-menu-visible"),children:e.map(e=>/* @__PURE__ */$("div",{className:Vr("dropdown-item"),onClick:()=>(e=>{n({key:e.key}),d()})(e),children:e.label},e.key))})]})};function Zr({showSourceView:e,showCollapse:t,showDownload:n,isFullscreen:i,isCollapsed:r,isMinimize:o,isPanzoomActive:a,isPanzoomAvailable:s,isPanzoomEnabled:l,setIsPanzoomEnabled:c,setIsMinimize:d,setIsCollapsed:u,setShowSource:h,toggleFullscreen:p,downloadMenu:m,panzoomRef:v}){/* @__PURE__ */
16
+ return $("div",{className:"mermaid-toolbar",children:[{isShow:e&&r&&!i,icon:/* @__PURE__ */$(o?y:S,{}),tooltip:o?"缩略图":"最小化",onClick:()=>d(e=>!e),className:"mermaid-minimize-btn"},{isShow:s,icon:/* @__PURE__ */$(b,{}),tooltip:l?"取消拖拽":"启用拖拽",onClick:()=>c(e=>!e),className:l?"mermaid-panzoom-btn active":"mermaid-panzoom-btn"},{isShow:a,icon:/* @__PURE__ */$(A,{}),tooltip:"放大",onClick:()=>v.current?.zoomIn()},{isShow:a,icon:/* @__PURE__ */$(E,{}),tooltip:"缩小",onClick:()=>v.current?.zoomOut()},{isShow:a,icon:/* @__PURE__ */$(T,{}),tooltip:"重置",onClick:()=>v.current?.reset()},{isShow:n&&a,icon:/* @__PURE__ */$(w,{}),tooltip:"下载",dropdown:m},{isShow:!0,icon:/* @__PURE__ */$(i?k:x,{}),tooltip:i?"退出全屏":"全屏",onClick:p,className:"mermaid-fullscreen-btn"},{isShow:e&&!i,icon:/* @__PURE__ */$(f,{}),tooltip:"查看源码",onClick:()=>h(!0),className:"mermaid-showcode-btn"},{isShow:t&&!i,icon:/* @__PURE__ */$(r?g:I,{}),tooltip:r?"展开":"收起",onClick:()=>u(e=>!e),className:"mermaid-collapsed-btn"}].map(e=>{if(!1===e.isShow)return null;const t=e.className||e.tooltip,n=e.dropdown?/* @__PURE__ */$(Gr,{items:e.dropdown.items,onClick:e.dropdown.onClick,children:/* @__PURE__ */$("div",{className:`remons-markdown-circle ${e.className||""}`,children:e.icon})},t):/* @__PURE__ */$("div",{className:`remons-markdown-circle ${e.className||""}`,onClick:e.onClick,children:e.icon},t);return e.tooltip&&(0,ye.IsPC)()?/* @__PURE__ */$(Yr,{title:e.tooltip,children:n},`${t}-tooltip`):n})})}var Kr={previewArea:"_previewArea_1v061_2",previewAreaDisabled:"_previewAreaDisabled_1v061_25",previewContent:"_previewContent_1v061_31",errorTip:"_errorTip_1v061_47",emptyTip:"_emptyTip_1v061_59"},Jr=["pointerdown","mousedown","pointerup","mouseup","click"],Qr=/* @__PURE__ */new WeakMap;function eo(e,t,n){to(e);let i=i=>{let r=i.target;e.contains(r)&&((!n||n(r))&&(i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation()),"click"===i.type&&t?.(i))};for(let r of Jr)document.addEventListener(r,i,!0);Qr.set(e,i)}function to(e){let t=Qr.get(e);if(t){for(let e of Jr)document.removeEventListener(e,t,!0);Qr.delete(e)}}function no(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.top-r,window.innerHeight-i.realHeight-o.width),o.width):"end"===e?Math.max(Math.min(n.top-i?.realHeight+n.height+r,window.innerHeight-i?.realHeight-o.width),o.width):"center"===e?Math.max(Math.min(n.top+n.height/2-i?.realHeight/2,window.innerHeight-i?.realHeight-o.width),o.width):0}function io(e,t){let{elementDimensions:n,popoverDimensions:i,popoverPadding:r,popoverArrowDimensions:o}=t;return"start"===e?Math.max(Math.min(n.left-r,window.innerWidth-i.realWidth-o.width),o.width):"end"===e?Math.max(Math.min(n.left-i?.realWidth+n.width+r,window.innerWidth-i?.realWidth-o.width),o.width):"center"===e?Math.max(Math.min(n.left+n.width/2-i?.realWidth/2,window.innerWidth-i?.realWidth-o.width),o.width):0}function ro(e,t,n){let{align:i,side:r}=n,o=n.centered?"over":r,a=n.padding,s=function(e,t){let n=e.wrapper.getBoundingClientRect();return{width:n.width+t,height:n.height+t,realWidth:n.width,realHeight:n.height}}(e,n.offset),l=e.arrow.getBoundingClientRect(),c=t.getBoundingClientRect(),d=c.top-s.height,u=d>=0,h=window.innerHeight-(c.bottom+s.height),p=h>=0,m=c.left-s.width,f=m>=0,v=window.innerWidth-(c.right+s.width),g=v>=0,w=!(u||p||f||g),b=o;if("top"===o&&u?g=f=p=!1:"bottom"===o&&p?g=f=u=!1:"left"===o&&f?g=u=p=!1:"right"===o&&g&&(f=u=p=!1),"over"===o){let t=window.innerWidth/2-s.realWidth/2,n=window.innerHeight/2-s.realHeight/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto"}else if(w){let t=window.innerWidth/2-s?.realWidth/2;e.wrapper.style.left=`${t}px`,e.wrapper.style.right="auto",e.wrapper.style.bottom="10px",e.wrapper.style.top="auto"}else if(f){let t=Math.min(m,window.innerWidth-s?.realWidth-l.width),n=no(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="left"}else if(g){let t=Math.min(v,window.innerWidth-s?.realWidth-l.width),n=no(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.right=`${t}px`,e.wrapper.style.top=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.left="auto",b="right"}else if(u){let t=Math.min(d,window.innerHeight-s.realHeight-l.width),n=io(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.top=`${t}px`,e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom="auto",e.wrapper.style.right="auto",b="top"}else if(p){let t=Math.min(h,window.innerHeight-s?.realHeight-l.width),n=io(i,{elementDimensions:c,popoverDimensions:s,popoverPadding:a,popoverArrowDimensions:l});e.wrapper.style.left=`${n}px`,e.wrapper.style.bottom=`${t}px`,e.wrapper.style.top="auto",e.wrapper.style.right="auto",b="bottom"}so(e,w?"over":b,i,t),[...e.wrapper.classList].filter(e=>e.startsWith("driver-popover-side-")||e.startsWith("driver-popover-align-")).forEach(t=>e.wrapper.classList.remove(t)),e.wrapper.classList.add(`driver-popover-side-${b}`),e.wrapper.classList.add(`driver-popover-align-${i}`)}function oo(e,t,n,i,r,o=10){let a=i-n;return e<=n&&t>=i?"start"===r?15+o/2:"end"===r?a-15-o/2:a/2:(Math.min(Math.max(e,n),i)+Math.min(Math.max(t,n),i))/2-n}function ao(e,t,n=10){let i=t-15-n;if(i<15)return Math.max(0,(t-n)/2);let r=e-n/2;return Math.min(Math.max(r,15),i)}function so(e,t,n,i){let r=e.arrow;if(r.className="driver-popover-arrow",r.style.top="",r.style.right="",r.style.bottom="",r.style.left="","over"===t)return void r.classList.add("driver-popover-arrow-none");let o=i.getBoundingClientRect(),a=e.wrapper.getBoundingClientRect(),s=function(e,t,n){return"left"===e||"right"===e?t.bottom>n.top&&t.top<n.bottom?e:t.bottom<=n.top?"bottom":"top":t.right>n.left&&t.left<n.right?e:t.right<=n.left?"right":"left"}(t,o,a);r.classList.add(`driver-popover-arrow-side-${s}`);let l=r.getBoundingClientRect().width||10;if("left"===s||"right"===s){let e=oo(o.top,o.bottom,a.top,a.bottom,n,l);r.style.top=`${ao(e,a.height,l)}px`}else{let e=oo(o.left,o.right,a.left,a.right,n,l);r.style.left=`${ao(e,a.width,l)}px`}}function lo(e){return"function"==typeof e?e():"string"==typeof e?document.querySelector(e):e}function co(e,t,n,i){return(e/=i/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t}function uo(e){let t='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return e.flatMap(e=>{let n=e.matches(t),i=Array.from(e.querySelectorAll(t));return[...n?[e]:[],...i]}).filter(e=>"none"!==getComputedStyle(e).pointerEvents&&function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}(e))}function ho(e,t){if(!e||function(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}(e))return;let n=e.offsetHeight>window.innerHeight;e.scrollIntoView({behavior:!t||po(e)?"auto":"smooth",inline:"center",block:n?"start":"center"})}function po(e){if(!e||!e.parentElement)return;let t=e.parentElement;return t.scrollHeight>t.clientHeight}function mo(e,t){let n=function(){let e=document.createElement("div");e.classList.add("driver-popover");let t=document.createElement("div");t.classList.add("driver-popover-arrow");let n=document.createElement("header");n.id="driver-popover-title",n.classList.add("driver-popover-title"),n.style.display="none",n.innerText="Popover Title";let i=document.createElement("div");i.id="driver-popover-description",i.classList.add("driver-popover-description"),i.style.display="none",i.innerText="Popover description is here";let r=document.createElement("button");r.type="button",r.classList.add("driver-popover-close-btn"),r.setAttribute("aria-label","Close"),r.innerHTML="&times;";let o=document.createElement("footer");o.classList.add("driver-popover-footer");let a=document.createElement("span");a.classList.add("driver-popover-progress-text"),a.innerText="";let s=document.createElement("span");s.classList.add("driver-popover-navigation-btns");let l=document.createElement("button");l.type="button",l.classList.add("driver-popover-prev-btn","driver-popover-footer-btn"),l.innerHTML="Previous";let c=document.createElement("button");return c.type="button",c.classList.add("driver-popover-next-btn","driver-popover-footer-btn"),c.innerHTML="Next",s.appendChild(l),s.appendChild(c),o.appendChild(a),o.appendChild(s),e.appendChild(r),e.appendChild(t),e.appendChild(n),e.appendChild(i),e.appendChild(o),{wrapper:e,arrow:t,title:n,description:i,footer:o,previousButton:l,nextButton:c,closeButton:r,footerButtons:s,progress:a}}();document.body.appendChild(n.wrapper);let{title:i,description:r,showButtons:o,disableButtons:a,showProgress:s,nextBtnText:l,prevBtnText:c,progressText:d}=t;n.nextButton.innerHTML=l,n.previousButton.innerHTML=c,n.progress.innerHTML=d,t.doneButton&&n.nextButton.classList.add("driver-popover-done-btn"),i?(n.title.innerHTML=i,n.title.style.display="block"):n.title.style.display="none",r?(n.description.innerHTML=r,n.description.style.display="block"):n.description.style.display="none";let u=o.includes("next")||o.includes("previous")||s;n.closeButton.style.display=o.includes("close")?"block":"none",u?(n.footer.style.display="flex",n.progress.style.display=s?"block":"none",n.nextButton.style.display=o.includes("next")?"block":"none",n.previousButton.style.display=o.includes("previous")?"block":"none"):n.footer.style.display="none",a.includes("next")&&(n.nextButton.disabled=!0,n.nextButton.classList.add("driver-popover-btn-disabled")),a.includes("previous")&&(n.previousButton.disabled=!0,n.previousButton.classList.add("driver-popover-btn-disabled")),a.includes("close")&&(n.closeButton.disabled=!0,n.closeButton.classList.add("driver-popover-btn-disabled"));let h=n.wrapper;h.style.display="block",h.style.left="",h.style.top="",h.style.bottom="",h.style.right="",h.id="driver-popover-content",h.setAttribute("role","dialog"),h.setAttribute("aria-labelledby","driver-popover-title"),h.setAttribute("aria-describedby","driver-popover-description"),n.arrow.className="driver-popover-arrow",h.className=`driver-popover ${t.popoverClass||""}`.trim(),eo(n.wrapper,e=>{let n=e.target;return n.closest(".driver-popover-next-btn")?t.onNextClick?.():n.closest(".driver-popover-prev-btn")?t.onPrevClick?.():n.closest(".driver-popover-close-btn")?t.onCloseClick?.():void 0},e=>!n.description.contains(e)&&!n.title.contains(e)&&!!e.closest(".driver-popover-prev-btn, .driver-popover-next-btn, .driver-popover-close-btn")),t.onRender?.(n),ro(n,e,t.position),function(e,t,n){e.wrapper.querySelectorAll("img").forEach(i=>{if(i.complete)return;let r=()=>ro(e,t,n);i.addEventListener("load",r,{once:!0}),i.addEventListener("error",r,{once:!0})})}(n,e,t.position),ho(h,t.smoothScroll);let p=uo([h,e]);return p.length>0&&p[0].focus(),n}function fo(e){e&&(to(e.wrapper),e.wrapper.parentElement?.removeChild(e.wrapper))}function vo(e,t){let n=window.innerWidth,i=window.innerHeight,r=t.padding,o=t.radius,a=e.width+2*r,s=e.height+2*r,l=Math.min(o,a/2,s/2),c=Math.floor(Math.max(l,0)),d=a-2*c,u=s-2*c;return`M${n},0L0,0L0,${i}L${n},${i}L${n},0Z\n M${e.x-r+c},${e.y-r} h${d} a${c},${c} 0 0 1 ${c},${c} v${u} a${c},${c} 0 0 1 -${c},${c} h-${d} a${c},${c} 0 0 1 -${c},-${c} v-${u} a${c},${c} 0 0 1 ${c},-${c} z`}function go(e,t,n,i,r){let o=e.getState("__activeStagePosition"),a=o||i.getBoundingClientRect(),s=r.getBoundingClientRect();o={x:co(t,a.x,s.x-a.x,n),y:co(t,a.y,s.y-a.y,n),width:co(t,a.width,s.width-a.width,n),height:co(t,a.height,s.height-a.height,n)},yo(e,o),e.setState("__activeStagePosition",o)}function wo(e,t){if(!t)return;let n=t.getBoundingClientRect(),i={x:n.x,y:n.y,width:n.width,height:n.height};e.setState("__activeStagePosition",i),yo(e,i)}function bo(e,t){let n=function(e,t){let n=window.innerWidth,i=window.innerHeight,r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("driver-overlay","driver-overlay-animated"),r.setAttribute("viewBox",`0 0 ${n} ${i}`),r.setAttribute("xmlSpace","preserve"),r.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("preserveAspectRatio","xMinYMin slice"),r.style.fillRule="evenodd",r.style.clipRule="evenodd",r.style.strokeLinejoin="round",r.style.strokeMiterlimit="2",r.style.zIndex="10000",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%";let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",vo(t,ko(e))),o.style.fill=e.getConfig("overlayColor")||"rgb(0,0,0)",o.style.opacity=`${e.getConfig("overlayOpacity")}`,o.style.pointerEvents="auto",o.style.cursor="auto",r.appendChild(o),r}(e,t);document.body.appendChild(n),eo(n,t=>{"path"===t.target.tagName&&e.emit("overlayClick")}),e.setState("__overlaySvg",n)}function yo(e,t){let n=e.getState("__overlaySvg");if(!n)return void bo(e,t);let i=n.firstElementChild;if("path"!==i?.tagName)throw Error("no path element found in stage svg");i.setAttribute("d",vo(t,ko(e)))}function ko(e){return{padding:e.getConfig("stagePadding")||0,radius:e.getConfig("stageRadius")||0}}function xo(e){let t=e.getState("__overlaySvg");t&&(to(t),t.remove())}var So="{{current}} of {{total}}";function Co(e,t){return!(!(t.skipMissingElement??e.getConfig("skipMissingElement"))||!t.element)&&!lo(t.element)}function _o(e,t,n){let i=e.getConfig("steps")||[];for(let r=t;r>=0&&r<i.length;r+=n)if(!Co(e,i[r]))return r}function Eo(e,t){let n=e.getState("activeIndex"),i=void 0!==n&&void 0===_o(e,n+1,1),r=t?.popover?.onDoneClick||e.getConfig("onDoneClick");return i&&r?r:t?.popover?.onNextClick||e.getConfig("onNextClick")}function Ao(e,t){return t?.popover?.onPrevClick||e.getConfig("onPrevClick")}function To(e,t,n){let i=e.getConfig("stagePadding")||0;return{side:n.popover?.side||"bottom",align:n.popover?.align||"start",offset:i+(e.getConfig("popoverOffset")||0),padding:i,centered:"driver-dummy-element"===t.id}}function Mo(e,t,n){fo(e.getState("popover")),mo(t,function(e,t,n){let i=n.popover||{},r=e.getState("activeIndex"),o=void 0!==r&&void 0===_o(e,r+1,1);return{title:i.title,description:i.description,showButtons:i.showButtons||e.getConfig("showButtons"),disableButtons:i.disableButtons||e.getConfig("disableButtons")||[],showProgress:i.showProgress||e.getConfig("showProgress")||!1,progressText:i.progressText??(e.getConfig("progressText")||So),nextBtnText:i.nextBtnText??(e.getConfig("nextBtnText")||"Next"),prevBtnText:i.prevBtnText??(e.getConfig("prevBtnText")||"Previous"),doneButton:o,popoverClass:i.popoverClass||e.getConfig("popoverClass")||"",smoothScroll:e.getConfig("smoothScroll"),onNextClick:()=>{let i=Eo(e,n);return i?i(t,n,e.getHookOpts()):e.emit("nextClick")},onPrevClick:()=>{let i=Ao(e,n);return i?i(t,n,e.getHookOpts()):e.emit("prevClick")},onCloseClick:()=>{let i=function(e,t){return t?.popover?.onCloseClick||e.getConfig("onCloseClick")}(e,n);return i?i(t,n,e.getHookOpts()):e.emit("closeClick")},onRender:t=>{e.setState("popover",t),(i.onPopoverRender||e.getConfig("onPopoverRender"))?.(t,e.getHookOpts())},position:To(e,t,n)}}(e,t,n))}function Oo(e,t){let n=lo(t.element);n||(n=function(){let e=document.getElementById("driver-dummy-element");if(e)return e;let t=document.createElement("div");return t.id="driver-dummy-element",t.style.width="0",t.style.height="0",t.style.pointerEvents="none",t.style.opacity="0",t.style.position="fixed",t.style.top="50%",t.style.left="50%",document.body.appendChild(t),t}()),function(e,t,n){let i=e.getConfig("duration")||400,r=Date.now(),o=e.getState("__activeStep"),a=e.getState("__activeElement")||t,s=!a||a===t,l="driver-dummy-element"===t.id,c="driver-dummy-element"===a.id,d=e.getConfig("animate"),u=n.onHighlightStarted||e.getConfig("onHighlightStarted"),h=n?.onHighlighted||e.getConfig("onHighlighted"),p=o?.onDeselected||e.getConfig("onDeselected"),m=e.getHookOpts();!s&&p&&p(c?void 0:a,o,m),u&&u(l?void 0:t,n,m);let f=!s&&d,v=!1;(function(e){e&&(e.wrapper.style.display="none")})(e.getState("popover")),e.setState("previousStep",o),e.setState("previousElement",a),e.setState("activeStep",n),e.setState("activeElement",t);let g=()=>{if(e.getState("__transitionCallback")!==g)return;let s=Date.now()-r,c=i-s<=i/2;n.popover&&c&&!v&&f&&(Mo(e,t,n),v=!0),e.getConfig("animate")&&s<i?go(e,s,i,a,t):(wo(e,t),h&&h(l?void 0:t,n,e.getHookOpts()),e.setState("__transitionCallback",void 0),e.setState("__previousStep",o),e.setState("__previousElement",a),e.setState("__activeStep",n),e.setState("__activeElement",t)),window.requestAnimationFrame(g)};e.setState("__transitionCallback",g),window.requestAnimationFrame(g),ho(t,e.getConfig("smoothScroll")),!f&&n.popover&&Mo(e,t,n),document.querySelectorAll(".driver-active-element-parent").forEach(e=>{e.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll")}),a.classList.remove("driver-active-element","driver-no-interaction"),a.removeAttribute("aria-haspopup"),a.removeAttribute("aria-expanded"),a.removeAttribute("aria-controls"),(n.disableActiveInteraction??e.getConfig("disableActiveInteraction"))&&t.classList.add("driver-no-interaction");let w=t.parentElement;w&&w!==document.body&&(w.classList.add("driver-active-element-parent"),function(e){let t=window.getComputedStyle(e);return[t.overflow,t.overflowX,t.overflowY].some(e=>"auto"===e||"scroll"===e)}(w)&&w.classList.add("driver-active-element-parent-no-scroll")),t.classList.add("driver-active-element"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","true"),t.setAttribute("aria-controls","driver-popover-content")}(e,n,t)}function Lo(e){let t=e.getState("__activeElement"),n=e.getState("__activeStep");t&&(wo(e,t),function(e){let t=e.getState("__activeStagePosition"),n=e.getState("__overlaySvg");t&&(n?n.setAttribute("viewBox",`0 0 ${window.innerWidth} ${window.innerHeight}`):console.warn("No stage svg found."))}(e),function(e,t,n){let i=e.getState("popover");i&&ro(i,t,To(e,t,n))}(e,t,n))}function Io(e){let t=e.getState("__resizeTimeout");t&&window.cancelAnimationFrame(t),e.setState("__resizeTimeout",window.requestAnimationFrame(()=>Lo(e)))}function No(e){let t=t=>function(e,t){(e.getConfig("allowKeyboardControl")??!0)&&("Escape"===t.key?e.emit("escapePress"):"ArrowRight"===t.key?e.emit("arrowRightPress"):"ArrowLeft"===t.key&&e.emit("arrowLeftPress"))}(e,t),n=t=>function(e,t){if(!e.getState("isInitialized")||"Tab"!==t.key&&9!==t.keyCode)return;let n=e.getState("__activeElement"),i=e.getState("popover")?.wrapper,r=uo([...i?[i]:[],...n?[n]:[]]),o=r[0],a=r[r.length-1];t.preventDefault(),t.shiftKey?(r[r.indexOf(document.activeElement)-1]||a)?.focus():(r[r.indexOf(document.activeElement)+1]||o)?.focus()}(e,t),i=()=>Io(e),r=()=>Io(e),o=t=>function(e,t){let n=e.getState("__activeElement"),i=t.target;!n||!i||!n.contains(i)||e.emit("activeElementClick")}(e,t);e.setState("__events",{onKeyup:t,onKeydown:n,onResize:i,onScroll:r,onClick:o}),window.addEventListener("keyup",t,!1),window.addEventListener("keydown",n,!1),window.addEventListener("resize",i),window.addEventListener("scroll",r),document.addEventListener("click",o,!1)}function Po(e={}){let t=function(e={}){let t=function(){let e={};function t(t={}){e={animate:!0,duration:400,allowClose:!0,allowScroll:!0,overlayClickBehavior:"close",overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,advanceOnClick:!1,skipMissingElement:!1,waitForElement:0,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000",...t}}return t(),{getConfig:t=>t?e[t]:e,configure:t}}();t.configure(e);let n,i=function(){let e={};return{getState:t=>t?e[t]:e,setState:(t,n)=>{e[t]=n},resetState:function(){e={}}}}(),r=function(){let e={};return{listen:function(t,n){e[t]=n},emit:function(t){e[t]?.()},reset:function(){e={}}}}();return{getConfig:t.getConfig,setConfig:t.configure,getState:i.getState,setState:i.setState,resetState:i.resetState,listen:r.listen,emit:r.emit,resetEmitter:r.reset,getDriver:()=>n,setDriver:e=>{n=e},getHookOpts:e=>{let r=e||i.getState();return{config:t.getConfig(),state:r,driver:n,index:r.activeIndex}}}}(e);function n(){t.getConfig("allowClose")&&h()}function i(){let e=t.getConfig("overlayClickBehavior");if(t.getConfig("allowClose")&&"close"===e)h();else{if("function"==typeof e){let n=t.getState("__activeStep");return void e(t.getState("__activeElement"),n,t.getHookOpts())}if("nextStep"===e){let e=t.getState("activeStep"),n=t.getState("activeElement"),i=Eo(t,e);if(i)return void i(n,e,t.getHookOpts());r()}}}function r(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e+1;n[i]?u(i):h()}function o(){let e=t.getState("activeIndex"),n=t.getConfig("steps")||[];if(void 0===e)return;let i=e-1;n[i]?u(i):h()}function a(){if(t.getState("__transitionCallback"))return;let e=t.getState("__activeStep");if(!e||!(e.advanceOnClick??t.getConfig("advanceOnClick")))return;let n=t.getState("__activeElement"),i=Eo(t,e);i?i(n,e,t.getHookOpts()):r()}function s(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n||!(t.getConfig("steps")||[])[e-1])return;let r=Ao(t,n);if(r)return r(i,n,t.getHookOpts());o()}function l(){if(t.getState("__transitionCallback"))return;let e=t.getState("activeIndex"),n=t.getState("__activeStep"),i=t.getState("__activeElement");if(void 0===e||void 0===n)return;let o=Eo(t,n);if(o)return o(i,n,t.getHookOpts());r()}function c(){t.getState("isInitialized")||(t.setState("isInitialized",!0),document.body.classList.add("driver-active",t.getConfig("animate")?"driver-fade":"driver-simple"),t.getConfig("allowScroll")||document.body.classList.add("driver-no-scroll"),document.body.style.setProperty("--driver-animation-duration",`${t.getConfig("duration")||400}ms`),No(t),t.listen("overlayClick",i),t.listen("activeElementClick",a),t.listen("escapePress",n),t.listen("closeClick",n),t.listen("arrowLeftPress",s),t.listen("arrowRightPress",l))}function d(){let e=t.getState("__pendingWaitCancel");e&&(t.setState("__pendingWaitCancel",void 0),e())}function u(e=0,n=!1){d();let i=t.getConfig("steps");if(!i)return console.error("No steps to drive through"),void h();if(!i[e])return void h();let r=i[e],o=r.waitForElement??t.getConfig("waitForElement")??0;if(!n&&o>0&&r.element&&!lo(r.element))return void function(e,n,i){let r=()=>{o.disconnect(),window.clearTimeout(a),t.setState("__pendingWaitCancel",void 0),i()},o=new MutationObserver(()=>{lo(e.element)&&r()}),a=window.setTimeout(r,n);t.setState("__pendingWaitCancel",()=>{o.disconnect(),window.clearTimeout(a)}),o.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0})}(r,o,()=>u(e,!0));if(Co(t,r)){let n=t.getState("activeIndex"),r="number"==typeof n&&e<n?-1:1;return void(i[e+r]?u(e+r):1===r&&h())}t.setState("__activeOnDestroyed",document.activeElement),t.setState("activeIndex",e);let a=i[e+1];Oo(t,function(e,t,n){let i=e.getConfig("steps")||[],r=i[t],o=r.popover||{},a=void 0!==_o(e,t+1,1),s=void 0!==_o(e,t-1,-1),l=o.doneBtnText||e.getConfig("doneBtnText")||"Done",c=e.getConfig("allowClose"),d=void 0===o.showProgress?e.getConfig("showProgress"):o.showProgress,u=(o.progressText||e.getConfig("progressText")||So).replace("{{current}}",`${t+1}`).replace("{{total}}",`${i.length}`),h=o.showButtons||e.getConfig("showButtons"),p=["next","previous",...c?["close"]:[]].filter(e=>!h?.length||h.includes(e)),m=o.onNextClick||e.getConfig("onNextClick"),f=o.onPrevClick||e.getConfig("onPrevClick"),v=o.onCloseClick||e.getConfig("onCloseClick");return{...r,popover:{showButtons:p,nextBtnText:a?void 0:l,disableButtons:[...s?[]:["previous"]],showProgress:d,onNextClick:m||n.onNextClick,onPrevClick:f||n.onPrevClick,onCloseClick:v||n.onCloseClick,...o,progressText:u}}}(t,e,{onNextClick:()=>{a?u(e+1):h()},onPrevClick:()=>{u(e-1)},onCloseClick:()=>{h()}}))}function h(e=!0){let n=t.getState("__activeElement"),i=t.getState("__activeStep"),r=t.getState("__activeOnDestroyed"),o=t.getConfig("onDestroyStarted");if(e&&o)return void o(n&&"driver-dummy-element"!==n?.id?n:void 0,i,t.getHookOpts());let a=i?.onDeselected||t.getConfig("onDeselected"),s=t.getConfig("onDestroyed");document.body.classList.remove("driver-active","driver-fade","driver-simple","driver-no-scroll"),document.body.style.removeProperty("--driver-animation-duration"),d(),function(e){let t=e.getState("__events");t&&(window.removeEventListener("keyup",t.onKeyup),window.removeEventListener("keydown",t.onKeydown),window.removeEventListener("resize",t.onResize),window.removeEventListener("scroll",t.onScroll),document.removeEventListener("click",t.onClick,!1))}(t),fo(t.getState("popover")),document.getElementById("driver-dummy-element")?.remove(),document.querySelectorAll(".driver-active-element").forEach(e=>{let t=e.parentElement;t&&t!==document.body&&t.classList.remove("driver-active-element-parent","driver-active-element-parent-no-scroll"),e.classList.remove("driver-active-element","driver-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")}),xo(t),t.resetEmitter();let l=t.getState();if(t.resetState(),n&&i){let e="driver-dummy-element"===n.id;a&&a(e?void 0:n,i,t.getHookOpts(l)),s&&s(e?void 0:n,i,t.getHookOpts(l))}r&&r.focus()}let p={isActive:()=>t.getState("isInitialized")||!1,refresh:()=>Io(t),drive:(e=0)=>{c(),u(e)},setConfig:t.setConfig,setSteps:e=>{d(),t.resetState(),t.setConfig({...t.getConfig(),steps:e})},getConfig:t.getConfig,getState:t.getState,getActiveIndex:()=>t.getState("activeIndex"),isFirstStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===_o(t,e-1,-1)},isLastStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0===_o(t,e+1,1)},getActiveStep:()=>t.getState("activeStep"),getActiveElement:()=>t.getState("activeElement"),getPreviousElement:()=>t.getState("previousElement"),getPreviousStep:()=>t.getState("previousStep"),getNextStep:()=>{let e=t.getConfig("steps")||[],n=t.getState("activeIndex");if(void 0===n)return;let i=_o(t,n+1,1);return void 0===i?void 0:e[i]},moveNext:r,movePrevious:o,moveTo:function(e){(t.getConfig("steps")||[])[e]?u(e):h()},hasNextStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==_o(t,e+1,1)},hasPreviousStep:()=>{let e=t.getState("activeIndex");return void 0!==e&&void 0!==_o(t,e-1,-1)},highlight:e=>{c(),Oo(t,{...e,popover:e.popover?{showButtons:[],showProgress:!1,progressText:"",...e.popover}:void 0})},destroy:()=>{h(!1)}};return t.setDriver(p),p}var zo=null,$o=[];var jo="docList-mermaid-driver",Do="docList-menu-driver",Ro="docList-pc-menu-driver";async function Bo(t){const n=document.querySelectorAll("code.language-mermaid"),{showDriverGuide:i,isPrintPreview:r=!1,chartConfig:o,defaultCollapsed:a=!0,cdn:s}=t||{};for(const l of n){const t=l.parentElement;if(!t)continue;const n=l.textContent.trim(),c=document.createElement("div");c.className="mermaid-react-root",t.replaceWith(c),P(c).render(/* @__PURE__ */$(e.StrictMode,{children:/* @__PURE__ */$(mr,{children:/* @__PURE__ */$(qo,{source:n,enablePanzoom:!0,showDownload:!0,showSourceView:!0,showCollapse:!0,chartConfig:o,defaultCollapsed:a,isPrintPreview:r,minHeight:200,showDriverGuide:i,cdn:s})})}))}}var Ho=/* @__PURE__ */Z({default:()=>qo,renderMermaid:()=>Fo,renderMermaidWithControls:()=>Bo}),qo=n(function({source:e,debounceMs:t=300,enablePanzoom:n=!0,showDownload:a=!0,showSourceView:d=!1,showCollapse:u=!1,defaultCollapsed:h=!0,className:p="",minHeight:m=200,showDriverGuide:f,isPrintPreview:v=!1,chartConfig:g,cdn:w}){const{isDark:b}=function(){const e=r(pr);if(!e)throw new Error("useTheme must be used within a ThemeProvider");return e}(),{svg:y,error:k,loading:x}=xr({source:e,debounceMs:t,isDark:b,chartConfig:g,cdn:w}),S=l(null),C=l(null),{isFullscreen:E,isCollapsed:A,setIsCollapsed:T,showSource:M,setShowSource:O,isMinimize:L,setIsMinimize:I,isPanzoomEnabled:N,setIsPanzoomEnabled:P,toggleFullscreen:D}=function({showCollapse:e,showSourceView:t,defaultCollapsed:n,isPrintPreview:r,svg:a,error:s,loading:l,wrapperRef:d}){const[u,h]=c(!1),[p,m]=c(n),[f,v]=c(!1),[g,w]=c(t),[b,y]=c(!1);return o(()=>{r&&a&&!s&&!l&&m(!1)},[r,a,s,l]),o(()=>{const t=()=>{h(!!document.fullscreenElement),!document.fullscreenElement&&e&&m(!0)};return r||document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)},[e,r]),{isFullscreen:u,setIsFullscreen:h,isCollapsed:p,setIsCollapsed:m,showSource:f,setShowSource:v,isMinimize:g,setIsMinimize:w,isPanzoomEnabled:b,setIsPanzoomEnabled:y,toggleFullscreen:i(()=>{document.fullscreenElement?document.exitFullscreen():d.current?.requestFullscreen?.()},[d])}}({showCollapse:u,showSourceView:d,defaultCollapsed:h,isPrintPreview:v,svg:y,error:k,loading:x,wrapperRef:S}),R=n&&(E||!A||!u),B=R&&N,H=function({contentRef:e,wrapperRef:t,enabled:n,svg:i,isFullscreen:r}){const a=l(null);return o(()=>{if(!n||!e.current||!i)return void(a.current&&(a.current.destroy(),a.current=null));a.current&&(a.current.destroy(),a.current=null);const r=Fr(e.current,{maxScale:5,minScale:.1,startScale:1,contain:"outside"});a.current={destroy:()=>r.destroy(),zoomWithWheel:r.zoomWithWheel,zoomIn:()=>r.zoomIn(),zoomOut:()=>r.zoomOut(),reset:()=>r.reset()};const o=t.current,s=a.current.zoomWithWheel;return o?.addEventListener("wheel",s),()=>{o?.removeEventListener("wheel",s),a.current&&(a.current.destroy(),a.current=null)}},[i,r,n,e,t]),a}({contentRef:C,wrapperRef:S,enabled:B&&!!y&&!v,svg:y,isFullscreen:E});o(()=>{f&&!v&&function(e){if($o=e,zo)return;const t=e=>{const n=$o;if(e>=n.length)return void(zo=null);const i=n[e];if(i.condition&&!i.condition())return void t(e+1);i?.onOpen?.();const r=Po({nextBtnText:"下一步",prevBtnText:"上一步",doneBtnText:"我知道了",showProgress:!0,allowClose:!1,progressText:"第 {{current}} 步,共 {{total}} 步",onDestroyed:()=>{zo=null,t(e+1)},steps:i.steps.filter(e=>!1!==e.isShow)||[]});zo=r,r.drive()};t(0)}(function(e,t){return[{id:Do,condition:()=>!localStorage[Do]&&e&&!(0,ye.IsPC)()&&"true"!==localStorage.docListMenuVisible,onOpen:()=>{localStorage[Do]="1"},steps:[{element:".docList-menu-list",popover:{title:"列表",description:"点击此处您可查看当前分类下文章列表"}},{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}}]},{id:Ro,condition:()=>!localStorage[Ro]&&(0,ye.IsPC)()&&e,onOpen:()=>{localStorage[Ro]="1"},steps:[{element:".docList-menu-copyHtml",popover:{title:"复制",description:"点击此处您可复制 HTML 渲染的格式内容"}},{element:".docList-menu-copyMarkdown",popover:{title:"复制",description:"点击此处您可复制 markdown 源码"}},{element:".docList-menu-print",popover:{title:"打印",description:"点击此处您可跳转至打印页面,输出为PDF"}},{element:".docList-menu-mermaid-collapse",popover:{title:"展开收起mermaid",description:"点击此处按钮可一键展开收起mermaid图表"},isShow:t}]},{id:jo,condition:()=>!(!t||localStorage[jo]||!e),onOpen:()=>{localStorage[jo]="1"},steps:[{element:".mermaid-react-root",popover:{title:"mermaid",description:"恭喜您解锁 Mermaid 渲染图表"}},{element:".mermaid-react-root .mermaid-minimize-btn",popover:{title:"缩略图",description:"点击此处按钮可查看缩略图"}},{element:".mermaid-react-root .mermaid-fullscreen-btn",popover:{title:"全屏",description:"点击此处按钮可切换为全屏展示"}},{element:".mermaid-react-root .mermaid-showcode-btn",popover:{title:"源码",description:"点击此处按钮查看源码弹窗"}},{element:".mermaid-react-root .mermaid-collapsed-btn",popover:{title:"展开",description:"点击此处按钮展开大图"}}]}]}(d,!!y))},[y,f,v,d]);const q=function(e){const t=e.match(/---\s*\n\s*title:\s*(.+)\s*\n\s*---/);return t?t[1].trim():"mermaid 图表"}(e),F=i(()=>{y?function(e,t="image"){or(new Blob([e],{type:"image/svg+xml;charset=utf-8"}),`${t}.svg`)}(y,q):oe.warning("暂无图表")},[y,q]),W=i(()=>{y?ar(y,q,2):oe.warning("暂无图表")},[y,q]),X=s(()=>({items:[{key:"svg",label:"下载 SVG"},{key:"png",label:"下载 PNG"}],onClick:({key:e})=>"svg"===e?F():W()}),[F,W]),Y=!!y;/* @__PURE__ */
17
+ return j("div",{ref:S,className:J.bind(Kr)(E?"mermaid-wrapper-fullscreen":"",u?"mermaid-wrapper":"",A&&u&&!L?"mermaid-collapsed":"",p,L&&A&&!E?"mermaid-mini":"",v?"print-preview":""),style:{minHeight:L?0:m,position:"relative",height:"100%"},children:[!v&&/* @__PURE__ */j(z,{children:[d&&/* @__PURE__ */j("div",{className:"mermaid-title",children:[/* @__PURE__ */j("span",{className:"mermaid-title-tag",children:[/* @__PURE__ */$("img",{src:"data:image/svg+xml,%3csvg%20t='1784097187016'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='5199'%20width='200'%20height='200'%3e%3cpath%20d='M0%200m125.754386%200l772.491228%200q125.754386%200%20125.754386%20125.754386l0%20772.491228q0%20125.754386-125.754386%20125.754386l-772.491228%200q-125.754386%200-125.754386-125.754386l0-772.491228q0-125.754386%20125.754386-125.754386Z'%20fill='%23FC366E'%20p-id='5200'%3e%3c/path%3e%3cpath%20d='M921.150877%20174.547088a417.091368%20417.091368%200%200%200-409.168842%20274.198456%20417.235088%20417.235088%200%200%200-409.150877-274.198456%20417.360842%20417.360842%200%200%200%20181.625263%20361.992982%20223.914667%20223.914667%200%200%201%2097.010526%20185.038597v128.143719h261.084071v-128.07186a223.914667%20223.914667%200%200%201%2097.010526-185.038596%20417.181193%20417.181193%200%200%200%20181.553403-361.921123z'%20fill='%23FFFFFF'%20p-id='5201'%3e%3c/path%3e%3c/svg%3e",alt:""}),/* @__PURE__ */$("span",{className:"mermaid-title-text",children:"Mermaid"})]}),q]}),!Y&&/* @__PURE__ */j("div",{className:"mermaid-toolbar-loading",children:[/* @__PURE__ */$(_,{})," "]}),Y&&/* @__PURE__ */$(Zr,{showSourceView:d,showCollapse:u,showDownload:a,isFullscreen:E,isCollapsed:A,isMinimize:L,isPanzoomActive:B,isPanzoomAvailable:R,isPanzoomEnabled:N,setIsPanzoomEnabled:P,setIsMinimize:I,setIsCollapsed:T,setShowSource:O,toggleFullscreen:()=>{H.current?.reset(),D()},downloadMenu:X,panzoomRef:H})]}),k&&/* @__PURE__ */j("div",{className:Kr.errorTip,children:["⚠️ ",k]}),
18
+ /* @__PURE__ */j("div",{className:`${Kr.previewArea} ${B?"":Kr.previewAreaDisabled}`,style:{minHeight:Y?"auto":m},children:[/* @__PURE__ */$("div",{ref:C,className:Kr.previewContent,dangerouslySetInnerHTML:{__html:y||""}}),(!Y&&!k||x)&&/* @__PURE__ */$("div",{className:Kr.emptyTip,children:e?.trim()?"渲染中...":"← 输入 Mermaid 源码"})]}),d&&/* @__PURE__ */$(gr,{open:M,title:"Mermaid 源码",className:"mermaid-code-modal",width:(0,ye.IsPC)()?800:"calc(100% - 20px)",onCancel:()=>O(!1),footer:null,children:/* @__PURE__ */$(ir,{isShowCollapsed:!1,isSlotMermaid:!1,codeType:"mermaid",content:e})})]})}),Fo=e=>/* @__PURE__ */$(mr,{children:/* @__PURE__ */$(qo,{...e})}),Wo=ir;export{Xi as MD_PERSIST_ATTR,Wo as default,xi as initHighlighter,rr as languagesCommon,ki as markdownFormat,Fo as renderMermaid,Ki as useIncrementalRender};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remons-render-markdown",
3
- "version": "1.0.28-beta.13",
3
+ "version": "1.0.28-beta.14",
4
4
  "description": "一个基于 React 的 Markdown 渲染组件,支持 GFM(GitHub Flavored Markdown)、代码高亮、Mermaid 图表、Tabs 渲染等功能。",
5
5
  "type": "module",
6
6
  "main": "./dist/index.mjs",