vendor: 4,501 bytes, lines 1-4
1var Nt=Object.defineProperty;var Ft=(a,e,t)=>e in a?Nt(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var Re=(a,e,t)=>Ft(a,typeof e!="symbol"?e+"":e,t);import{V as Ot,a6 as Ct,a7 as Rt,b2 as $e,D as le,h as ge,q as je,d as At,b3 as tt,p as he,b4 as Mt,b5 as Lt,s as Dt,b6 as Pt,v as Ae,P as fe,O as _e,b7 as zt,b8 as Vt,W as $t,R as jt,$ as Bt,b as Wt,o as H,j as _,a0 as Kt,ag as Jt,k as L,aE as Ut,a9 as qt,c as Z,e as Se,n as st,B as nt,F as rt,a as pe,t as ve,ao as Gt,aG as it,aN as Ht,aU as Qt,aZ as Yt,b9 as Zt,_ as Xt}from"./framework.DYu0XweL.js";import{u as es,c as ts}from"./theme.w4DtOjQb.js";const ss={root:()=>Ot(()=>import("./@localSearchIndexroot.YMj_Xzju.js"),[])};function ns(a){return Ct()?(Rt(a),!0):!1}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const rs=a=>a!=null;function is(a){return Array.isArray(a)?a:[a]}function as(a){var e;const t=$e(a);return(e=t==null?void 0:t.$el)!=null?e:t}/*! 2* tabbable 6.2.0 3* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE 4*/var vt=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ke=vt.join(","),mt=typeof Element>"u",ie=mt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ne=!mt&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a==null?void 0:a.ownerDocument},Fe=function a(e,t){var s;t===void 0&&(t=!0);var n=e==null||(s=e.getAttribute)===null||s===void 0?void 0:s.call(e,"inert"),i=n===""||n==="true",r=i||t&&e&&a(e.parentNode);return r},os=function(e){var t,s=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return s===""||s==="true"},gt=function(e,t,s){if(Fe(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(ke));return t&&ie.call(e,ke)&&n.unshift(e),n=n.filter(s),n},bt=function a(e,t,s){for(var n=[],i=Array.from(e);i.length;){var r=i.shift();if(!Fe(r,!1))if(r.tagName==="SLOT"){var o=r.assignedElements(),l=o.length?o:r.children,c=a(l,!0,s);s.flatten?n.push.apply(n,c):n.push({scopeParent:r,candidates:c})}else{var h=ie.call(r,ke);h&&s.filter(r)&&(t||!e.includes(r))&&n.push(r);var m=r.shadowRoot||typeof s.getShadowRoot=="function"&&s.getShadowRoot(r),f=!Fe(m,!1)&&(!s.shadowRootFilter||s.shadowRootFilter(r));if(m&&f){var b=a(m===!0?r.children:m.children,!0,s);s.flatten?n.push.apply(n,b):n.push({scopeParent:r,candidates:b})}else i.unshift.apply(i,r.children)}}return n},yt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},re=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||os(e))&&!yt(e)?0:e.tabIndex},ls=function(e,t){var s=re(e);return s<0&&t&&!yt(e)?0:s},cs=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},wt=function(e){return e.tagName==="INPUT"},us=function(e){return wt(e)&&e.type==="hidden"},ds=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(s){return s.tagName==="SUMMARY"});return t},hs=function(e,t){for(var s=0;s<e.length;s++)if(e[s].checked&&e[s].form===t)return e[s]},fs=function(e){if(!e.name)return!0;var t=e.form||Ne(e),s=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},n;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")n=s(window.CSS.escape(e.name));else try{n=s(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var i=hs(n,e.form);return!i||i===e},ps=function(e){return wt(e)&&e.type==="radio"},vs=function(e){return ps(e)&&!fs(e)},ms=function(e){var t,s=e&&Ne(e),n=(t=s)===null||t===void 0?void 0:t.host,i=!1;if(s&&s!==e){var r,o,l;for(i=!!((r=n)!==null&&r!==void 0&&(o=r.ownerDocument)!==null&&o!==void 0&&o.contains(n)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!i&&n;){var c,h,m;s=Ne(n),n=(c=s)===null||c===void 0?void 0:c.host,i=!!((h=n)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(n))}}return i}
vendor: 6,278 bytes, lines 4-8
4,at=function(e){var t=e.getBoundingClientRect(),s=t.width,n=t.height;return s===0&&n===0},gs=function(e,t){var s=t.displayCheck,n=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=ie.call(e,"details>summary:first-of-type"),r=i?e.parentElement:e;if(ie.call(r,"details:not([open]) *"))return!0;if(!s||s==="full"||s==="legacy-full"){if(typeof n=="function"){for(var o=e;e;){var l=e.parentElement,c=Ne(e);if(l&&!l.shadowRoot&&n(l)===!0)return at(e);e.assignedSlot?e=e.assignedSlot:!l&&c!==e.ownerDocument?e=c.host:e=l}e=o}if(ms(e))return!e.getClientRects().length;if(s!=="legacy-full")return!0}else if(s==="non-zero-area")return at(e);return!1},bs=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var s=0;s<t.children.length;s++){var n=t.children.item(s);if(n.tagName==="LEGEND")return ie.call(t,"fieldset[disabled] *")?!0:!n.contains(e)}return!0}t=t.parentElement}return!1},Oe=function(e,t){return!(t.disabled||Fe(t)||us(t)||gs(t,e)||ds(t)||bs(t))},Be=function(e,t){return!(vs(t)||re(t)<0||!Oe(e,t))},ys=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ws=function a(e){var t=[],s=[];return e.forEach(function(n,i){var r=!!n.scopeParent,o=r?n.scopeParent:n,l=ls(o,r),c=r?a(n.candidates):o;l===0?r?t.push.apply(t,c):t.push(o):s.push({documentOrder:i,tabIndex:l,item:n,isScope:r,content:c})}),s.sort(cs).reduce(function(n,i){return i.isScope?n.push.apply(n,i.content):n.push(i.content),n},[]).concat(t)},xs=function(e,t){t=t||{};var s;return t.getShadowRoot?s=bt([e],t.includeContainer,{filter:Be.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ys}):s=gt(e,t.includeContainer,Be.bind(null,t)),ws(s)},_s=function(e,t){t=t||{};var s;return t.getShadowRoot?s=bt([e],t.includeContainer,{filter:Oe.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s=gt(e,t.includeContainer,Oe.bind(null,t)),s},ae=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ie.call(e,ke)===!1?!1:Be(t,e)},Ss=vt.concat("iframe").join(","),Me=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ie.call(e,Ss)===!1?!1:Oe(t,e)};/*! 5* focus-trap 7.6.5 6* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE 7*/function We(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,s=Array(e);t<e;t++)s[t]=a[t];return s}function Es(a){if(Array.isArray(a))return We(a)}function Ts(a,e,t){return(e=Os(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function Is(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function ks(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 8In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ot(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(a);e&&(s=s.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,s)}return t}function lt(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ot(Object(t),!0).forEach(function(s){Ts(a,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ot(Object(t)).forEach(function(s){Object.defineProperty(a,s,Object.getOwnPropertyDescriptor(t,s))})}return a}function Ns(a){return Es(a)||Is(a)||Cs(a)||ks()}function Fs(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var s=t.call(a,e);if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function Os(a){var e=Fs(a,"string");return typeof e=="symbol"?e:e+""}function Cs(a,e){if(a){if(typeof a=="string")return We(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?We(a,e):void 0}}var ct={activateTrap:function(e,t){if(e.length>0){var s=e[e.length-1];s!==t&&s._setPausedState(!0)}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var s=e.indexOf(t);s!==-1&&e.splice(s,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Rs=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},As=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},be=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Ms=function(e){return be(e)&&!e.shiftKey},Ls=function(e){return be(e)&&e.shiftKey},ut=function(e){return setTimeout(e,0)},me=function(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),n=1;n<t;n++)s[n-1]=arguments[n];return typeof e=="function"?e.apply(void 0,s):e},Ee=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Ds=[],Ps=function(e,t){var s=(t==null?void 0:t.document)||document,n=(t==null?void 0:t.trapStack)||Ds,i=lt({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Ms,isKeyBackward:Ls},t),r={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},o,l=function(u,d,g){return u&&u[d]!==void 0?u[d]:i[g||d]},c=function(u,d){var g=typeof(d==null?void 0:d.composedPath)=="function"?d.composedPath():void 0;return r.containerGroups.findIndex(function(E){var T=E.container,F=E.tabbableNodes;return T.contains(u)||(g==null?void 0:g.includes(T))||F.find(function(S){return S===u})})},h=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=d.hasFallback,E=g===void 0?!1:g,T=d.params,F=T===void 0?[]:T,S=i[u];if(typeof S=="function"&&(S=S.apply(void 0,Ns(F))),S===!0&&(S=void 0),!S){if(S===void 0||S===!1)return S;throw new Error("`".concat(u,"` was specified but was not a node, or did not return a node"))}var C=S;if(typeof S=="string"){try{C=s.querySelector(S)}catch(v){throw new Error("`".concat(u,'` appears to be an invali
8d selector; error="').concat(v.message,'"'))}if(!C&&!E)throw new Error("`".concat(u,"` as selector refers to no known node"))}return C},m=function(){var u=h("initialFocus",{hasFallback:!0});if(u===!1)return!1;if(u===void 0||u&&!Me(u,i.tabbableOptions))if(c(s.activeElement)>=0)u=s.activeElement;else{var d=r.tabbableGroups[0],g=d&&d.firstTabbableNode;u=g||h("fallbackFocus")}else u===null&&(u=h("fallbackFocus"));if(!u)throw new Error("Your focus-trap needs to have at least one focusable element");return u},f=function(){if(r.containerGroups=r.containers.map(function(u){var d=xs(u,i.tabbableOptions),g=_s(u,i.tabbableOptions),E=d.length>0?d[0]:void 0,T=d.length>0?d[d.length-1]:void 0,F=g.find(function(v){return ae(v)}),S=g.slice().reverse().find(function(v){return ae(v)}),C=!!d.find(function(v){return re(v)>0});return{container:u,tabbableNodes:d,focusableNodes:g,posTabIndexesFound:C,firstTabbableNode:E,lastTabbableNode:T,firstDomTabbableNode:F,lastDomTabbableNode:S,nextTabbableNode:function(p){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,O=d.indexOf(p);return O<0?I?g.slice(g.indexOf(p)+1).find(function(P){return ae(P)}):g.slice(0,g.indexOf(p)).reverse().find(function(P){return ae(P)}):d[O+(I?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(u){return u.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!h("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(u){return u.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},b=function(u){var d=u.activeElement;if(d)return d.shadowRoot&&d.shadowRoot.activeElement!==null?b(d.shadowRoot):d},y=function(u){if(u!==!1&&u!==b(document)){if(!u||!u.focus){y(m());return}u.focus({preventScroll:!!i.preventScroll}),r.mostRecentlyFocusedNode=u,Rs(u)&&u.select()}},x=function(u){var d=h("setReturnFocus",{params:[u]});return d||(d===!1?!1:u)},w=function(u){var d=u.target,g=u.event,E=u.isBackward,T=E===void 0?!1:E;d=d||Ee(g),f();var F=null;if(r.tabbableGroups.length>0){var S=c(d,g),C=S>=0?r.containerGroups[S]:void 0;if(S<0)T?F=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:F=r.tabbableGroups[0].firstTabbableNode;else if(T){var v=r.tabbableGroups.findIndex(function(V){var k=V.firstTabbableNode;return d===k});if(v<0&&(C.container===d||Me(d,i.tabbableOptions)&&!ae(d,i.tabbableOptions)&&!C.nextTabbableNode(d,!1))&&(v=S),v>=0){var p=v===0?r.tabbableGroups.length-1:v-1,I=r.tabbableGroups[p];F=re(d)>=0?I.lastTabbableNode:I.lastDomTabbableNode}else be(g)||(F=C.nextTabbableNode(d,!1))}else{var O=r.tabbableGroups.findIndex(function(V){var k=V.lastTabbableNode;return d===k});if(O<0&&(C.container===d||Me(d,i.tabbableOptions)&&!ae(d,i.tabbableOptions)&&!C.nextTabbableNode(d))&&(O=S),O>=0){var P=O===r.tabbableGroups.length-1?0:O+1,z=r.tabbableGroups[P];F=re(d)>=0?z.firstTabbableNode:z.firstDomTabbableNode}else be(g)||(F=C.nextTabbableNode(d))}}else F=h("fallbackFocus");return F},R=function(u){var d=Ee(u);if(!(c(d,u)>=0)){if(me(i.clickOutsideDeactivates,u)){o.deactivate({returnFocus:i.returnFocusOnDeactivate});return}me(i.allowOutsideClick,u)||u.preventDefault()}},A=function(u){var d=Ee(u),g=c(d,u)>=0;if(g||d instanceof Document)g&&(r.mostRecentlyFocusedNode=d);else{u.stopImmediatePropagation();var E,T=!0;if(r.mostRecentlyFocusedNode)if(re(r.mostRecentlyFocusedNode)>0){var F=c(r.mostRecentlyFocusedNode),S=r.containerGroups[F].tabbableNodes;if(S.length>0){var C=S.findIndex(function(v){return v===r.mostRecentlyFocusedNode});C>=0&&(i.isKeyForward(r.recentNavEvent)?C+1<S.length&&(E=S[C+1],T=!1):C-1>=0&&(E=S[C-1],T=!1))}}else r.containerGroups.some(function(v){return v.tabbableNodes.some(function(p){return re(p)>0})})||(T=!1);else T=!1;T&&(E=w({target:r.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(r.recentNavEvent)})),y(E||r.mostRecentlyFocusedNode||m())}r.recentNavEvent=void 0},J=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=u;var g=w({event:u,isBackward:d});g&&(be(u)&&u.preventDefault(),y(g))},Q=function(u){(i.isKeyForward(u)||i.isKeyBackward(u))&&J(u,i.isKeyBackward(u))},W=function(u){As(u)&&me(i.escapeDeactivates,u)!==!1&&(u.preventDefault(),o.deactivate())},$=function(u){var d=Ee(u);c(d,u)>=0||me(i.clickOutsideDeactivates,u)||me(i.allowOutsideClick,u)||(u.preventDefault(),u.stopImmediatePropagation())},j=function(){if(r.active)return ct.activateTrap(n,o),r.delayInitialFocusTimer=i.delayInitialFocus?ut(function(){y(m())}):y(m()),s.addEventListener("focusin",A,!0),s.addEventListener("mousedown",R,{capture:!0,passive:!1}),s.addEventListener("touchstart",R,{capture:!0,passive:!1}),s.addEventListener("click",$,{capture:!0,passive:!1}),s.addEventListener("keydown",Q,{capture:!0,passive:!1}),s.addEventListener("keydown",W),o},ye=function(){if(r.active)return s.removeEventListener("focusin",A,!0),s.removeEventListener("mousedown",R,!0),s.removeEventListener("touchstart",R,!0),s.removeEventListener("click",$,!0),s.removeEventListener("keydown",Q,!0),s.removeEventListener("keydown",W),o},M=function(u){var d=u.some(function(g){var E=Array.from(g.removedNodes
8);return E.some(function(T){return T===r.mostRecentlyFocusedNode})});d&&y(m())},U=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(M):void 0,q=function(){U&&(U.disconnect(),r.active&&!r.paused&&r.containers.map(function(u){U.observe(u,{subtree:!0,childList:!0})}))};return o={get active(){return r.active},get paused(){return r.paused},activate:function(u){if(r.active)return this;var d=l(u,"onActivate"),g=l(u,"onPostActivate"),E=l(u,"checkCanFocusTrap");E||f(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=b(s),d==null||d();var T=function(){E&&f(),j(),q(),g==null||g()};return E?(E(r.containers.concat()).then(T,T),this):(T(),this)},deactivate:function(u){if(!r.active)return this;var d=lt({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},u);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,ye(),r.active=!1,r.paused=!1,q(),ct.deactivateTrap(n,o);var g=l(d,"onDeactivate"),E=l(d,"onPostDeactivate"),T=l(d,"checkCanReturnFocus"),F=l(d,"returnFocus","returnFocusOnDeactivate");g==null||g();var S=function(){ut(function(){F&&y(x(r.nodeFocusedBeforeActivation)),E==null||E()})};return F&&T?(T(x(r.nodeFocusedBeforeActivation)).then(S,S),this):(S(),this)},pause:function(u){return r.active?(r.manuallyPaused=!0,this._setPausedState(!0,u)):this},unpause:function(u){return r.active?(r.manuallyPaused=!1,n[n.length-1]!==this?this:this._setPausedState(!1,u)):this},updateContainerElements:function(u){var d=[].concat(u).filter(Boolean);return r.containers=d.map(function(g){return typeof g=="string"?s.querySelector(g):g}),r.active&&f(),q(),this}},Object.defineProperties(o,{_isManuallyPaused:{value:function(){return r.manuallyPaused}},_setPausedState:{value:function(u,d){if(r.paused===u)return this;if(r.paused=u,u){var g=l(d,"onPause"),E=l(d,"onPostPause");g==null||g(),ye(),q(),E==null||E()}else{var T=l(d,"onUnpause"),F=l(d,"onPostUnpause");T==null||T(),f(),j(),q(),F==null||F()}return this}}}),o.updateContainerElements(e),o};function zs(a,e={}){let t;const{immediate:s,...n}=e,i=le(!1),r=le(!1),o=f=>t&&t.activate(f),l=f=>t&&t.deactivate(f),c=()=>{t&&(t.pause(),r.value=!0)},h=()=>{t&&(t.unpause(),r.value=!1)},m=ge(()=>{const f=$e(a);return is(f).map(b=>{const y=$e(b);return typeof y=="string"?y:as(y)}).filter(rs)});return je(m,f=>{f.length&&(t=Ps(f,{...n,onActivate(){i.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){i.value=!1,e.onDeactivate&&e.onDeactivate()}}),s&&o())},{flush:"post"}),ns(()=>l()),{hasFocus:i,isPaused:r,activate:o,deactivate:l,pause:c,unpause:h}}class ce{constructor(e,t=!0,s=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=s,this.iframesTimeout=n}static matches(e,t){const s=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let i=!1;return s.every(r=>n.call(e,r)?(i=!0,!1):!0),i}else return!1}getContexts(){let e,t=[];return typeof this.ctx>"u"||!this.ctx?e=[]:NodeList.prototype.isPrototypeOf(this.ctx)?e=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?e=this.ctx:typeof this.ctx=="string"?e=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):e=[this.ctx],e.forEach(s=>{const n=t.filter(i=>i.contains(s)).length>0;t.indexOf(s)===-1&&!n&&t.push(s)}),t}getIframeContents(e,t,s=()=>{}){let n;try{const i=e.contentWindow;if(n=i.document,!i||!n)throw new Error("iframe inaccessible")}catch{s()}n&&t(n)}isIframeBlank(e){const t="about:blank",s=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&s!==t&&s}observeIframeLoad(e,t,s){let n=!1,i=null;const r=()=>{if(!n){n=!0,clearTimeout(i);try{this.isIframeBlank(e)||(e.removeEventListener("load",r),this.getIframeContents(e,t,s))}catch{s()}}};e.addEventListener("load",r),i=setTimeout(r,this.iframesTimeout)}onIframeReady(e,t,s){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,s):this.getIframeContents(e,t,s):this.observeIframeLoad(e,t,s)}catch{s()}}waitForIframes(e,t){let s=0;this.forEachIframe(e,()=>!0,n=>
vendor: 12,157 bytes, line 8
8{s++,this.waitForIframes(n.querySelector("html"),()=>{--s||t()})},n=>{n||t()})}forEachIframe(e,t,s,n=()=>{}){let i=e.querySelectorAll("iframe"),r=i.length,o=0;i=Array.prototype.slice.call(i);const l=()=>{--r<=0&&n(o)};r||l(),i.forEach(c=>{ce.matches(c,this.exclude)?l():this.onIframeReady(c,h=>{t(c)&&(o++,s(h)),l()},l)})}createIterator(e,t,s){return document.createNodeIterator(e,t,s,!1)}createInstanceOnIframe(e){return new ce(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,s){const n=e.compareDocumentPosition(s),i=Node.DOCUMENT_POSITION_PRECEDING;if(n&i)if(t!==null){const r=t.compareDocumentPosition(s),o=Node.DOCUMENT_POSITION_FOLLOWING;if(r&o)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let s;return t===null?s=e.nextNode():s=e.nextNode()&&e.nextNode(),{prevNode:t,node:s}}checkIframeFilter(e,t,s,n){let i=!1,r=!1;return n.forEach((o,l)=>{o.val===s&&(i=l,r=o.handled)}),this.compareNodeIframe(e,t,s)?(i===!1&&!r?n.push({val:s,handled:!0}):i!==!1&&!r&&(n[i].handled=!0),!0):(i===!1&&n.push({val:s,handled:!1}),!1)}handleOpenIframes(e,t,s,n){e.forEach(i=>{i.handled||this.getIframeContents(i.val,r=>{this.createInstanceOnIframe(r).forEachNode(t,s,n)})})}iterateThroughNodes(e,t,s,n,i){const r=this.createIterator(t,e,n);let o=[],l=[],c,h,m=()=>({prevNode:h,node:c}=this.getIteratorNode(r),c);for(;m();)this.iframes&&this.forEachIframe(t,f=>this.checkIframeFilter(c,h,f,o),f=>{this.createInstanceOnIframe(f).forEachNode(e,b=>l.push(b),n)}),l.push(c);l.forEach(f=>{s(f)}),this.iframes&&this.handleOpenIframes(o,e,s,n),i()}forEachNode(e,t,s,n=()=>{}){const i=this.getContexts();let r=i.length;r||n(),i.forEach(o=>{const l=()=>{this.iterateThroughNodes(e,o,t,s,()=>{--r<=0&&n()})};this.iframes?this.waitForIframes(o,l):l()})}}let Vs=class{constructor(e){this.ctx=e,this.ie=!1;const t=window.navigator.userAgent;(t.indexOf("MSIE")>-1||t.indexOf("Trident")>-1)&&(this.ie=!0)}set opt(e){this._opt=Object.assign({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:()=>{},noMatch:()=>{},filter:()=>!0,done:()=>{},debug:!1,log:window.console},e)}get opt(){return this._opt}get iterator(){return new ce(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const s=this.opt.log;this.opt.debug&&typeof s=="object"&&typeof s[t]=="function"&&s[t](`mark.js: ${e}`)}escapeStr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}createRegExp(e){return this.opt.wildcards!=="disabled"&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),this.opt.wildcards!=="disabled"&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),e}createSynonymsRegExp(e){const t=this.opt.synonyms,s=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let i in t)if(t.hasOwnProperty(i)){const r=t[i],o=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i),l=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(r):this.escapeStr(r);o!==""&&l!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(o)}|${this.escapeStr(l)})`,`gm${s}`),n+`(${this.processSynomyms(o)}|${this.processSynomyms(l)})`+n))}return e}processSynomyms(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}setupWildcardsRegExp(e){return e=e.replace(/(?:\\)*\?/g,t=>t.charAt(0)==="\\"?"?":"�"),e.replace(/(?:\\)*\*/g,t=>t.charAt(0)==="\\"?"*":"�")}createWildcardsRegExp(e){let t=this.opt.wildcards==="withSpaces";return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}setupIgnoreJoinersRegExp(e){return e.replace(/[^(|)\\]/g,(t,s,n)=>{let i=n.charAt(s+1);return/[(|)\\]/.test(i)||i===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const s=this.opt.ignorePunctuation;return Array.isArray(s)&&s.length&&t.push(this.escapeStr(s.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join(`[${t.join("")}]*`):e}createDiacriticsRegExp(e){const t=this.opt.caseSensitive?"":"i",s=this.opt.caseSensitive?["aà áảãạÄằắẳẵặâầấẩẫáºÃ¤Ã¥ÄÄ
","AÃÃẢÃẠÄẰẮẲẴẶÃẦẤẨẪẬÃÃ
ÄÄ","cçÄÄ","CÃÄÄ","dÄÄ","DÄÄ","eèéẻẽẹêá»áº¿á»á»
á»Ã«ÄÄÄ","EÃÃẺẼẸÃá»áº¾á»á»á»ÃÄÄÄ","iìÃá»Ä©á»Ã®Ã¯Ä«","IÃÃá»Ä¨á»ÃÃĪ","lÅ","LÅ","nñÅÅ","NÃÅÅ","oòóá»Ãµá»Ã´á»á»á»á»á»Æ¡á»á»¡á»á»á»£Ã¶Ã¸Å","OÃÃá»Ãá»Ãá»á»á»á»á»Æ á»á» á»á»á»¢ÃÃÅ","rÅ","RÅ","sÅ¡ÅÈÅ","SÅ ÅÈÅ","tÅ¥ÈÅ£","TŤÈÅ¢","uùúủũụưừứá»á»¯á»±Ã»Ã¼Å¯Å«","UÃÃỦŨỤƯỪỨỬỮỰÃÃŮŪ","yýỳỷỹỵÿ","YÃỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aà áảãạÄằắẳẵặâầấẩẫáºÃ¤Ã¥ÄÄ
AÃÃẢÃẠÄẰẮẲẴẶÃẦẤẨẪẬÃÃ
ÄÄ","cçÄÄCÃÄÄ","dÄÄDÄÄ","eèéẻẽẹêá»áº¿á»á»
á»Ã«ÄÄÄEÃÃẺẼẸÃá»áº¾á»á»á»ÃÄÄÄ","iìÃá»Ä©á»Ã®Ã¯Ä«IÃÃá»Ä¨á»ÃÃĪ","lÅLÅ","nñÅÅNÃÅÅ","oòóá»Ãµá»Ã´á»á»á»á»á»Æ¡á»á»¡á»á»á»£Ã¶Ã¸ÅOÃÃá»Ãá»Ãá»á»á»á»á»Æ á»á» á»á»á»¢ÃÃÅ","rÅRÅ","sÅ¡ÅÈÅSÅ ÅÈÅ","tÅ¥ÈÅ£TŤÈÅ¢","uùúủũụưừứá»á»¯á»±Ã»Ã¼Å¯Å«UÃÃỦŨỤƯỪỨỬỮỰÃÃŮŪ","yýỳỷỹỵÿYÃỲỶỸỴŸ","zžżźZŽŻŹ"];let n=[];return e.split("").forEach(i=>{s.every(r=>{if(r.indexOf(i)!==-1){if(n.indexOf(r)>-1)return!1;e=e.replace(new RegExp(`[${r}]`,`gm${t}`),`[${r}]`),n.push(r)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let s=this.opt.accuracy,n=typeof s=="string"?s:s.value,i=typeof s=="string"?[]:s.limiters,r="";switch(i.forEach(o=>{r+=`|${this.escapeStr(o)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return r="\\s"+(r||this.escapeStr(t)),`()([^${r}]*${e}[^${r}]*)`;case"exactly":return`(^|\\s${r})(${e})(?=$|\\s${r})`}}getSeparatedKeywords(e){let t=[];return e.forEach(s=>{this.opt.separateWordSearch?s.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):s.trim()&&t.indexOf(s)===-1&&t.push(s)}),{keywords:t.sort((s,n)=>n.length-s.length),length:t.length}}isNumeric(e){return Number(parseFloat(e))==e}checkRanges(e){if(!Array.isArray(e)||Object.prototype.toString.call(e[0])!=="[object Object]")return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];const t=[];let s=0;return e.sort((n,i)=>n.start-i.start).forEach(n=>{let{start:i,end:r,valid:o}=this.callNoMatchOnInvalidRanges(n,s);o&&(n.start=i,n.length=r-i,t.push(n),s=r)}),t}callNoMatchOnInvalidRanges(e,t){let s,n,i=!1;return e&&typeof e.start<"u"?(s=parseInt(e.start,10),n=s+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-s>0?i=!0:(this.log(`Ignoring invalid or overlapping range: ${JSON.stringify(e)}`),this.opt.noMatch(e))):(this.log(`Ignoring invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)),{start:s,end:n,valid:i}}checkWhitespaceRanges(e,t,s){let n,i=!0,r=s.length,o=t-r,l=parseInt(e.start,10)-o;return l=l>r?r:l,n=l+parseInt(e.length,10),n>r&&(n=r,this.log(`End range automatically set to the max value of ${r}`)),l<0||n-l<0||l>r||n>r?(i=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):s.substring(l,n).replace(/\s+/g,"")===""&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:l,end:n,valid:i}}getTextNodes(e){let t="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{s.push({start:t.length,end:(t+=n.textContent).length,node:n})},n=>this.matchesExclude(n.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT,()=>{e({value:t,nodes:s})})}matchesExclude(e){return ce.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,s){const n=this.opt.element?this.opt.element:"mark",i=e.splitText(t),r=i.splitText(s-t);let o=document.createElement(n);return o.setAttribute("data-markjs","true"),this.opt.className&&o.setAttribute("class",this.opt.className),o.textContent=i.textContent,i.parentNode.replaceChild(o,i),r}wrapRangeInMappedTextNode(e,t,s,n,i){e.nodes.every((r,o)=>{const l=e.nodes[o+1];if(typeof l>"u"||l.start>t){if(!n(r.node))return!1;const c=t-r.start,h=(s>r.end?r.end:s)-r.start,m=e.value.substr(0,r.start),f=e.value.substr(h+r.start);if(r.node=this.wrapRangeInTextNode(r.node,c,h),e.value=m+f,e.nodes.forEach((b,y)=>{y>=o&&(e.nodes[y].start>0&&y!==o&&(e.nodes[y].start-=h),e.nodes[y].end-=h)}),s-=h,i(r.node.previousSibling,r.start),s>r.end)t=r.end;else return!1}return!0})}wrapMatches(e,t,s,n,i){const r=t===0?0:t+1;this.getTextNodes(o=>{o.nodes.forEach(l=>{l=l.node;let c;for(;(c=e.exec(l.textContent))!==null&&c[r]!=="";){if(!s(c[r],l))continue;let h=c.index;if(r!==0)for(let m=1;m<r;m++)h+=c[m].length;l=this.wrapRangeInTextNode(l,h,h+c[r].length),n(l.previousSibling),e.lastIndex=0}}),i()})}wrapMatchesAcrossElements(e,t,s,n,i){const r=t===0?0:t+1;this.getTextNodes(o=>{let l;for(;(l=e.exec(o.value))!==null&&l[r]!=="";){let c=l.index;if(r!==0)for(let m=1;m<r;m++)c+=l[m].length;const h=c+l[r].length;this.wrapRangeInMappedTextNode(o,c,h,m=>s(l[r],m),(m,f)=>{e.lastIndex=f,n(m)})}i()})}wrapRangeFromIndex(e,t,s,n){this.getTextNodes(i=>{const r=i.value.length;e.forEach((o,l)=>{let{start:c,end:h,valid:m}=this.checkWhitespaceRanges(o,r,i.value);m&&this.wrapRangeInMappedTextNode(i,c,h,f=>t(f,o,i.value.substring(c,h),l),f=>{s(f,o)})}),n()})}unwrapMatches(e){const t=e.parentNode;let s=document.createDocumentFragment();for(;e.firstChild;)s.appendChild(e.removeChild(e.firstChild));t.replaceChild(s,e),this.ie?this.normalizeTextNode(t):t.normalize()}normalizeTextNode(e){if(e){if(e.nodeType===3)for(;e.nextSibling&&e.nextSibling.nodeType===3;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}markRegExp(e,t){this.opt=t,this.log(`Searching with expression "${e}"`);let s=0,n="wrapMatches";const i=r=>{s++,this.opt.each(r)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(r,o)=>this.opt.filter(o,r,s),i,()=>{s===0&&this.opt.noMatch(e),this.opt.done(s)})}mark(e,t){this.opt=t;let s=0,n="wrapMatches";const{keywords:i,length:r}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),o=this.opt.caseSensitive?"":"i",l=c=>{let h=new RegExp(this.createRegExp(c),`gm${o}`),m=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(f,b)=>this.opt.filter(b,c,s,m),f=>{m++,s++,this.opt.each(f)},()=>{m===0&&this.opt.noMatch(c),i[r-1]===c?this.opt.done(s):l(i[i.indexOf(c)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),r===0?this.opt.done(s):l(i[0])}markRanges(e,t){this.opt=t;let s=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(i,r,o,l)=>this.opt.filter(i,r,o,l),(i,r)=>{s++,this.opt.each(i,r)},()=>{this.opt.done(s)})):this.opt.done(s)}unmark(e){this.opt=e;let t=this.opt.element?this.opt.element:"*";t+="[data-markjs]",this.opt.className&&(t+=`.${this.opt.className}`),this.log(`Removal selector "${t}"`),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,s=>{this.unwrapMatches(s)},s=>{const n=ce.matches(s,t),i=this.matchesExclude(s);return!n||i?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function $s(a){const e=new Vs(a);return this.mark=(t,s)=>(e.mark(t,s),this),this.markRegExp=(t,s)=>(e.markRegExp(t,s),this),this.markRanges=(t,s)=>(e.markRanges(t,s),this),this.unmark=t=>(e.unmark(t),this),this}const js="ENTRIES",xt="KEYS",_t="VALUES",D="";
8class Le{constructor(e,t){const s=e._tree,n=Array.from(s.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:s,keys:n}]:[]}next(){const e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};const{node:e,keys:t}=oe(this._path);if(oe(t)===D)return{done:!1,value:this.result()};const s=e.get(oe(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;const e=oe(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>oe(e)).filter(e=>e!==D).join("")}value(){return oe(this._path).node.get(D)}result(){switch(this._type){case _t:return this.value();case xt:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}}const oe=a=>a[a.length-1],Bs=(a,e,t)=>{const s=new Map;if(e===void 0)return s;const n=e.length+1,i=n+t,r=new Uint8Array(i*n).fill(t+1);for(let o=0;o<n;++o)r[o]=o;for(let o=1;o<i;++o)r[o*n]=o;return St(a,e,t,s,r,1,n,""),s},St=(a,e,t,s,n,i,r,o)=>{const l=i*r;e:for(const c of a.keys())if(c===D){const h=n[l-1];h<=t&&s.set(o,[a.get(c),h])}else{let h=i;for(let m=0;m<c.length;++m,++h){const f=c[m],b=r*h,y=b-r;let x=n[b];const w=Math.max(0,h-t-1),R=Math.min(r-1,h+t);for(let A=w;A<R;++A){const J=f!==e[A],Q=n[y+A]+ +J,W=n[y+A+1]+1,$=n[b+A]+1,j=n[b+A+1]=Math.min(Q,W,$);j<x&&(x=j)}if(x>t)continue e}St(a.get(c),e,t,s,n,h,r,o+c)}};class X{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");const[t,s]=Ce(this._tree,e.slice(this._prefix.length));if(t===void 0){const[n,i]=qe(s);for(const r of n.keys())if(r!==D&&r.startsWith(i)){const o=new Map;return o.set(r.slice(i.length),n.get(r)),new X(o,e)}}return new X(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Ws(this._tree,e)}entries(){return new Le(this,js)}forEach(e){for(const[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return Bs(this._tree,e,t)}get(e){const t=Ke(this._tree,e);return t!==void 0?t.get(D):void 0}has(e){const t=Ke(this._tree,e);return t!==void 0&&t.has(D)}keys(){return new Le(this,xt)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,De(this._tree,e).set(D,t),this}get size(){if(this._size)return this._size;this._size=0;const e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=De(this._tree,e);return s.set(D,t(s.get(D))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;const s=De(this._tree,e);let n=s.get(D);return n===void 0&&s.set(D,n=t()),n}values(){return new Le(this,_t)}[Symbol.iterator](){return this.entries()}static from(e){const t=new X;for(const[s,n]of e)t.set(s,n);return t}static fromObject(e){return X.from(Object.entries(e))}}const Ce=(a,e,t=[])=>{if(e.length===0||a==null)return[a,t];for(const s of a.keys())if(s!==D&&e.startsWith(s))return t.push([a,s]),Ce(a.get(s),e.slice(s.length),t);return t.push([a,e]),Ce(void 0,"",t)},Ke=(a,e)=>{if(e.length===0||a==null)return a;for(const t of a.keys())if(t!==D&&e.startsWith(t))return Ke(a.get(t),e.slice(t.length))},De=(a,e)=>{const t=e.length;e:for(let s=0;a&&s<t;){for(const i of a.keys())if(i!==D&&e[s]===i[0]){const r=Math.min(t-s,i.length);let o=1;for(;o<r&&e[s+o]===i[o];)++o;const l=a.get(i);if(o===i.length)a=l;else{const c=new Map;c.set(i.slice(o),l),a.set(e.slice(s,s+o),c),a.delete(i),a=c}s+=o;continue e}const n=new Map;return a.set(e.slice(s),n),n}return a},Ws=(a,e)=>{const[t,s]=Ce(a,e);if(t!==void 0){if(t.delete(D),t.size===0)Et(s);else if(t.size===1){const[n,i]=t.entries().next().value;Tt(s,n,i)}}},Et=a=>{if(a.length===0)return;const[e,t]=qe(a);if(e.delete(t),e.size===0)Et(a.slice(0,-1));else if(e.size===1){const[s,n]=e.entries().next().value;s!==D&&Tt(a.slice(0,-1),s,n)}},Tt=(a,e,t)=>{if(a.length===0)return;const[s,n]=qe(a);s.set(n+e,t),s.delete(n)},qe=a=>a[a.length-1],Ge="or",It="and",Ks="and_not";class ue{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');const t=e.autoVacuum==null||e.autoVacuum===!0?Ve:e.autoVacuum;this._options={...ze,...e,autoVacuum:t,searchOptions:{...dt,...e.searchOptions||{}},autoSuggestOptions:{...Hs,...e.autoSuggestOptions||{}}},this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=Ue,this.addFields(this._options.fields)}add(e){const{extractField:t,tokenize:s,processTerm:n,fields:i,idField:r}=this._options,o=t(e,r);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);if(this._idToShortId.has(o))throw new Error(`MiniSearch: duplicate ID ${o}`);const l=this.addDocumentId(o);this.saveStoredFields(l,e);for(const c of i){const h=t(e,c);if(h==null)continue;const m=s(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.addFieldLength(l,f,this._documentCount-1,b);for(const y of m){const x=n(y,c);if(Array.isArray(x))for(const w of x)this.addTerm(f,l,w);else x&&this.addTerm(f,l,x)}}}addAll(e){for(const t of e)this.add(t)}addAllAsync(e,t={}){const{chunkSize:s=10}=t,n={chunk:[],promise:Promise.resolve()},{chunk:i,promise:r}=e.reduce(({chunk:o,promise:l},c,h)=>(o.push(c),(h+1)%s===0?{chunk:[],promise:l.then(()=>new Promise(m=>setTimeout(m,0))).then(()=>this.addAll(o))}:{chunk:o,promise:l}),n);return r.then(()=>this.addAll(i))}remove(e){const{tokenize:t,processTerm:s,extractField:n,fields:i,idField:r}=this._options,o=n(e,r);if(o==null)throw new Error(`MiniSearch: document does not have ID field "${r}"`);const l=this._idToShortId.get(o);if(l==null)throw new Error(`MiniSearch: cannot remove document with ID ${o}: it is not in the index`);for(const c of i){const h=n(e,c);if(h==null)continue;const m=t(h.toString(),c),f=this._fieldIds[c],b=new Set(m).size;this.removeFieldLength(l,f,this._documentCount,b);for(const y of m){const x=s(y,c);if(Array.isArray(x))for(const w of x)this.removeTerm(f,l,w);else x&&this.removeTerm(f,l,x)}}this._storedFields.delete(l),this._documentIds.delete(l),this._idToShortId.delete(o),this._fieldLength.delete(l),this._documentCount-=1}removeAll(e){if(e)for(const t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new X,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){const t=this._idToShortId.get(e);if(t==null)throw new Error(`MiniSearch: cannot discard document with ID ${e}: it is not in the index`);this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEac
8h((s,n)=>{this.removeFieldLength(t,n,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;const{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:n}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:n},{minDirtCount:t,minDirtFactor:e})}discardAll(e){const t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(const s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){const{idField:t,extractField:s}=this._options,n=s(e,t);this.discard(n),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{const s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=Ue,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}async performVacuuming(e,t){const s=this._dirtCount;if(this.vacuumConditionsMet(t)){const n=e.batchSize||Je.batchSize,i=e.batchWait||Je.batchWait;let r=1;for(const[o,l]of this._index){for(const[c,h]of l)for(const[m]of h)this._documentIds.has(m)||(h.size<=1?l.delete(c):h.delete(m));this._index.get(o).size===0&&this._index.delete(o),r%n===0&&await new Promise(c=>setTimeout(c,i)),r+=1}this._dirtCount-=s}await null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||Ve.minDirtCount,s=s||Ve.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){const t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){const{searchOptions:s}=this._options,n={...s,...t},i=this.executeQuery(e,t),r=[];for(const[o,{score:l,terms:c,match:h}]of i){const m=c.length||1,f={id:this._documentIds.get(o),score:l*m,terms:Object.keys(h),queryTerms:c,match:h};Object.assign(f,this._storedFields.get(o)),(n.filter==null||n.filter(f))&&r.push(f)}return e===ue.wildcard&&n.boostDocument==null||r.sort(ft),r}autoSuggest(e,t={}){t={...this._options.autoSuggestOptions,...t};const s=new Map;for(const{score:i,terms:r}of this.search(e,t)){const o=r.join(" "),l=s.get(o);l!=null?(l.score+=i,l.count+=1):s.set(o,{score:i,terms:r,count:1})}const n=[];for(const[i,{score:r,terms:o,count:l}]of s)n.push({suggestion:i,terms:o,score:r/l});return n.sort(ft),n}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static async loadJSONAsync(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)}static getDefault(e){if(ze.hasOwnProperty(e))return Pe(ze,e);throw new Error(`MiniSearch: unknown option "${e}"`)}static loadJS(e,t){const{index:s,documentIds:n,fieldLength:i,storedFields:r,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=Te(n),l._fieldLength=Te(i),l._storedFields=Te(r);for(const[c,h]of l._documentIds)l._idToShortId.set(h,c);for(const[c,h]of s){const m=new Map;for(const f of Object.keys(h)){let b=h[f];o===1&&(b=b.ds),m.set(parseInt(f,10),Te(b))}l._index.set(c,m)}return l}static async loadJSAsync(e,t){const{index:s,documentIds:n,fieldLength:i,storedFields:r,serializationVersion:o}=e,l=this.instantiateMiniSearch(e,t);l._documentIds=await Ie(n),l._fieldLength=await Ie(i),l._storedFields=await Ie(r);for(const[h,m]of l._documentIds)l._idToShortId.set(m,h);let c=0;for(const[h,m]of s){const f=new Map;for(const b of Object.keys(m)){let y=m[b];o===1&&(y=y.ds),f.set(parseInt(b,10),await Ie(y))}++c%1e3===0&&await kt(0),l._index.set(h,f)}return l}static instantiateMiniSearch(e,t){const{documentCount:s,nextId:n,fieldIds:i,averageFieldLength:r,dirtCount:o,serializationVersion:l}=e;if(l!==1&&l!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");const c=new ue(t);return c._documentCount=s,c._nextId=n,c._idToShortId=new Map,c._fieldIds=i,c._avgFieldLength=r,c._dirtCount=o||0,c._index=new X,c}executeQuery(e,t={}){if(e===ue.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){const f={...t,...e,queries:void 0},b=e.queries.map(y=>this.executeQuery(y,f));return this.combineResults(b,f.combineWith)}const{tokenize:s,processTerm:n,searchOptions:i}=this._options,r={tokenize:s,processTerm:n,...i,...t},{tokenize:o,processTerm:l}=r,m=o(e).flatMap(f=>l(f)).filter(f=>!!f).map(Gs(r)).map(f=>this.executeQuerySpec(f,r));return this.combineResults(m,r.combineWith)}executeQuerySpec(e,t){const s={...this._options.searchOptions,...t},n=(s.fields||this._options.fields).reduce((x,w)=>({...x,[w]:Pe(s.boost,w)||1}),{}),{boostDocument:i,weights:r,maxFuzzy:o,bm25:l}=s,{fuzzy:c,prefix:h}={...dt.weights,...r},m=this._index.get(e.term),f=this.termResults(e.term,e.term,1,e.termBoost,m,n,i,l);let b,y;if(e.prefix&&(b=this._index.atPrefix(e.term)),e.fuzzy){const x=e.fuzzy===!0?.2:e.fuzzy,w=x<1?Math.min(o,Math.round(e.term.length*x)):x;w&&(y=this._index.fuzzyGet(e.term,w))}if(b)for(const[x,w]of b){const R=x.length-e.term.length;if(!R)continue;y==null||y.delete(x);const A=h*x.length/(x.length+.3*R);this.termResults(e.term,x,A,e.termBoost,w,n,i,l,f)}if(y)for(const x of y.keys()){const[w,R]=y.get(x);if(!R)continue;const A=c*x.length/(x.length+R);this.termResults(e.term,x,A,e.termBoost,w,n,i,l,f)}return f}executeWildcardQuery(e){const t=new Map,s={...this._options.searchOptions,...e};for(const[n,i]of this._documentIds){const r=s.boostDocument?s.boostDocument(i,"",this._storedFields.get(n)):1;t.set(n,{score:r,terms:[],match:{}})}return t}combineResults(e,t=Ge){if(e.length===0)return new Map;const s=t.toLowerCase(),n=Js[s];if(!n)throw new Error(`Invalid combination operator: ${t}`);return e.reduce(n)||new Map}toJSON(){const e=[];for(const[t,s]of this._index){const n={};for(const[i,r]of s)n[i]=Object.fromEntries(r);e.push([t,n])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,n,i,r,o,l,c=new Map){if(i==null)return c;for(const h of Object.keys(r)){const m=r[h],f=this._fieldIds[h],b=i.get(f);if(b==null)continue;let y=b.size;const x=this._avgFieldLength[f];
8for(const w of b.keys()){if(!this._documentIds.has(w)){this.removeTerm(f,w,t),y-=1;continue}const R=o?o(this._documentIds.get(w),t,this._storedFields.get(w)):1;if(!R)continue;const A=b.get(w),J=this._fieldLength.get(w)[f],Q=qs(A,y,this._documentCount,J,x,l),W=s*n*m*R*Q,$=c.get(w);if($){$.score+=W,Qs($.terms,e);const j=Pe($.match,t);j?j.push(h):$.match[t]=[h]}else c.set(w,{score:W,terms:[e],match:{[t]:[h]}})}}return c}addTerm(e,t,s){const n=this._index.fetch(s,pt);let i=n.get(e);if(i==null)i=new Map,i.set(t,1),n.set(e,i);else{const r=i.get(t);i.set(t,(r||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}const n=this._index.fetch(s,pt),i=n.get(e);i==null||i.get(t)==null?this.warnDocumentChanged(t,e,s):i.get(t)<=1?i.size<=1?n.delete(e):i.delete(t):i.set(t,i.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(const n of Object.keys(this._fieldIds))if(this._fieldIds[n]===t){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(e)} has changed before removal: term "${s}" was not present in field "${n}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(e){const t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,s,n){let i=this._fieldLength.get(e);i==null&&this._fieldLength.set(e,i=[]),i[t]=n;const o=(this._avgFieldLength[t]||0)*s+n;this._avgFieldLength[t]=o/(s+1)}removeFieldLength(e,t,s,n){if(s===1){this._avgFieldLength[t]=0;return}const i=this._avgFieldLength[t]*s-n;this._avgFieldLength[t]=i/(s-1)}saveStoredFields(e,t){const{storeFields:s,extractField:n}=this._options;if(s==null||s.length===0)return;let i=this._storedFields.get(e);i==null&&this._storedFields.set(e,i={});for(const r of s){const o=n(t,r);o!==void 0&&(i[r]=o)}}}ue.wildcard=Symbol("*");const Pe=(a,e)=>Object.prototype.hasOwnProperty.call(a,e)?a[e]:void 0,Js={[Ge]:(a,e)=>{for(const t of e.keys()){const s=a.get(t);if(s==null)a.set(t,e.get(t));else{const{score:n,terms:i,match:r}=e.get(t);s.score=s.score+n,s.match=Object.assign(s.match,r),ht(s.terms,i)}}return a},[It]:(a,e)=>{const t=new Map;for(const s of e.keys()){const n=a.get(s);if(n==null)continue;const{score:i,terms:r,match:o}=e.get(s);ht(n.terms,r),t.set(s,{score:n.score+i,terms:n.terms,match:Object.assign(n.match,o)})}return t},[Ks]:(a,e)=>{for(const t of e.keys())a.delete(t);return a}},Us={k:1.2,b:.7,d:.5},qs=(a,e,t,s,n,i)=>{const{k:r,b:o,d:l}=i;return Math.log(1+(t-e+.5)/(e+.5))*(l+a*(r+1)/(a+r*(1-o+o*s/n)))},Gs=a=>(e,t,s)=>{const n=typeof a.fuzzy=="function"?a.fuzzy(e,t,s):a.fuzzy||!1,i=typeof a.prefix=="function"?a.prefix(e,t,s):a.prefix===!0,r=typeof a.boostTerm=="function"?a.boostTerm(e,t,s):1;return{term:e,fuzzy:n,prefix:i,termBoost:r}},ze={idField:"id",extractField:(a,e)=>a[e],tokenize:a=>a.split(Ys),processTerm:a=>a.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(a,e)=>{typeof(console==null?void 0:console[a])=="function"&&console[a](e)},autoVacuum:!0},dt={combineWith:Ge,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Us},Hs={combineWith:It,prefix:(a,e,t)=>e===t.length-1},Je={batchSize:1e3,batchWait:10},Ue={minDirtFactor:.1,minDirtCount:20},Ve={...Je,...Ue},Qs=(a,e)=>{a.includes(e)||a.push(e)},ht=(a,e)=>{for(const t of e)a.includes(t)||a.push(t)},ft=({score:a},{score:e})=>e-a,pt=()=>new Map,Te=a=>{const e=new Map;for(const t of Object.keys(a))e.set(parseInt(t,10),a[t]);return e},Ie=async a=>{const e=new Map;let t=0;for(const s of Object.keys(a))e.set(parseInt(s,10),a[s]),++t%1e3===0&&await kt(0);return e},kt=a=>new Promise(e=>setTimeout(e,a)),Ys=/[\n\r\p{Z}\p{P}]+/u;class Zs{constructor(e=10){Re(this,"max");Re(this,"cache");this.max=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){this.cache.has(e)?this.cache.delete(e):this.cache.size===this.max&&this.cache.delete(this.first()),this.cache.set(e,t)}first(){return this.cache.keys().next().value}clear(){this.cache.clear()}}const Xs=["aria-owns"],en={class:"shell"},tn=["title"],sn={class:"search-actions before"},nn=["title"],rn=["aria-activedescendant","aria-controls","placeholder"],an={class:"search-actions"},on=["title"],ln=["disabled","title"],cn=["id","role","aria-labelledby"],un=["id","aria-selected"],dn=["href","aria-label","onMouseenter","onFocusin","data-index"],hn={class:"titles"},fn=["innerHTML"],pn={class:"title main"},vn=["innerHTML"],mn={key:0,class:"excerpt-wrapper"},gn={key:0,class:"excerpt",inert:""},bn=["innerHTML"],yn={key:0,class:"no-results"},wn={class:"search-keyboard-shortcuts"},xn=["aria-label"],_n=["aria-label"],Sn=["aria-label"],En=["aria-label"],Tn=At({__name:"VPLocalSearchBox",emits:["close"],setup(a,{emit:e}){var S,C;const t=e,s=le(),n=le(),i=le(ss),r=es(),{activate:o}=zs(s,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:l,theme:c}=r,h=tt(async()=>{var v,p,I,O,P,z,V,k,K;return it(ue.loadJSON((I=await((p=(v=i.value)[l.value])==null?void 0:p.call(v)))==null?void 0:I.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((O=c.value.search)==null?void 0:O.provider)==="local"&&((z=(P=c.value.search.options)==null?void 0:P.miniSearch)==null?void 0:z.searchOptions)},...((V=c.value.search)==null?void 0:V.provider)==="local"&&((K=(k=c.value.search.options)==null?void 0:k.miniSearch)==null?void 0:K.options)}))}),f=ge(()=>{var v,p;return((v=c.value.search)==null?void 0:v.provider)==="local"&&((p=c.value.search.options)==null?void 0:p.disableQueryPersistence)===!0}).value?he(""):Mt("vitepress:local-search-filter",""),b=Lt("vitepress:local-search-detailed-list",((S=c.value.search)==null?void 0:S.provider)==="local"&&((C=c.value.search.options)==null?void 0:C.detailedView)===!0),y=ge(()=>{var v,p,I;return((v=c.value.search)==null?void 0:v.provider)==="local"&&(((p=c.value.search.options)==null?void 0:p.disableDetailedView)===!0||((I=c.value.search.options)==null?void 0:I.detailedView)===!1)}),x=ge(()=>{var p,I,O,P,z,V,k;const v=((p=c.value.search)==null?void 0:p.options)??c.value.algolia;return((z=(P=(O=(I=v==null?void 0:v.locales)==null?void 0:I[l.value])==null?void 0:O.translations)==null?void 0:P.button)==null?void 0:z.buttonText)||((k=(V=v==null?void 0:v.translations)==null?void 0:V.button)==null?void 0:k.buttonText)||"Search"});Dt(()=>{y.value&&(b.value=!1)});const w=le([]),R=he(!1);je(f,()=>{R.value=!1});const A=tt(async()=>
8{if(n.value)return it(new $s(n.value))},null),J=new Zs(16);Pt(()=>[h.value,f.value,b.value],async([v,p,I],O,P)=>{var ee,we,He,Qe;(O==null?void 0:O[0])!==v&&J.clear();let z=!1;if(P(()=>{z=!0}),!v)return;w.value=v.search(p).slice(0,16),R.value=!0;const V=I?await Promise.all(w.value.map(B=>Q(B.id))):[];if(z)return;for(const{id:B,mod:te}of V){const se=B.slice(0,B.indexOf("#"));let Y=J.get(se);if(Y)continue;Y=new Map,J.set(se,Y);const G=te.default??te;if(G!=null&&G.render||G!=null&&G.setup){const ne=Ht(G);ne.config.warnHandler=()=>{},ne.provide(Qt,r),Object.defineProperties(ne.config.globalProperties,{$frontmatter:{get(){return r.frontmatter.value}},$params:{get(){return r.page.value.params}}});const Ye=document.createElement("div");ne.mount(Ye),Ye.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(de=>{var et;const xe=(et=de.querySelector("a"))==null?void 0:et.getAttribute("href"),Ze=(xe==null?void 0:xe.startsWith("#"))&&xe.slice(1);if(!Ze)return;let Xe="";for(;(de=de.nextElementSibling)&&!/^h[1-6]$/i.test(de.tagName);)Xe+=de.outerHTML;Y.set(Ze,Xe)}),ne.unmount()}if(z)return}const k=new Set;if(w.value=w.value.map(B=>{const[te,se]=B.id.split("#"),Y=J.get(te),G=(Y==null?void 0:Y.get(se))??"";for(const ne in B.match)k.add(ne);return{...B,text:G}}),await fe(),z)return;await new Promise(B=>{var te;(te=A.value)==null||te.unmark({done:()=>{var se;(se=A.value)==null||se.markRegExp(T(k),{done:B})}})});const K=((ee=s.value)==null?void 0:ee.querySelectorAll(".result .excerpt"))??[];for(const B of K)(we=B.querySelector('mark[data-markjs="true"]'))==null||we.scrollIntoView({block:"center"});(Qe=(He=n.value)==null?void 0:He.firstElementChild)==null||Qe.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function Q(v){const p=Yt(v.slice(0,v.indexOf("#")));try{if(!p)throw new Error(`Cannot find file for id: ${v}`);return{id:v,mod:await import(p)}}catch(I){return console.error(I),{id:v,mod:{}}}}const W=he(),$=ge(()=>{var v;return((v=f.value)==null?void 0:v.length)<=0});function j(v=!0){var p,I;(p=W.value)==null||p.focus(),v&&((I=W.value)==null||I.select())}Ae(()=>{j()});function ye(v){v.pointerType==="mouse"&&j()}const M=he(-1),U=he(!0);je(w,v=>{M.value=v.length?0:-1,q()});function q(){fe(()=>{const v=document.querySelector(".result.selected");v==null||v.scrollIntoView({block:"nearest"})})}_e("ArrowUp",v=>{v.preventDefault(),M.value--,M.value<0&&(M.value=w.value.length-1),U.value=!0,q()}),_e("ArrowDown",v=>{v.preventDefault(),M.value++,M.value>=w.value.length&&(M.value=0),U.value=!0,q()});const N=zt();_e("Enter",v=>{if(v.isComposing||v.target instanceof HTMLButtonElement&&v.target.type!=="submit")return;const p=w.value[M.value];if(v.target instanceof HTMLInputElement&&!p){v.preventDefault();return}p&&(N.go(p.id),t("close"))}),_e("Escape",()=>{t("close")});const d=ts({modal:{displayDetails:"Display detailed list",resetButtonTitle:"Reset search",backButtonTitle:"Close search",noResultsText:"No results for",footer:{selectText:"to select",selectKeyAriaLabel:"enter",navigateText:"to navigate",navigateUpKeyAriaLabel:"up arrow",navigateDownKeyAriaLabel:"down arrow",closeText:"to close",closeKeyAriaLabel:"escape"}}});Ae(()=>{window.history.pushState(null,"",null)}),Vt("popstate",v=>{v.preventDefault(),t("close")});const g=$t(jt?document.body:null);Ae(()=>{fe(()=>{g.value=!0,fe().then(()=>o())})}),Bt(()=>{g.value=!1});function E(){f.value="",fe().then(()=>j(!1))}function T(v){return new RegExp([...v].sort((p,I)=>I.length-p.length).map(p=>`(${Zt(p)})`).join("|"),"gi")}function F(v){var O;if(!U.value)return;const p=(O=v.target)==null?void 0:O.closest(".result"),I=Number.parseInt(p==null?void 0:p.dataset.index);I>=0&&I!==M.value&&(M.value=I),U.value=!1}return(v,p)=>{var I,O,P,z,V;return H(),Wt(Gt,{to:"body"},[_("div",{ref_key:"el",ref:s,role:"button","aria-owns":(I=w.value)!=null&&I.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[_("div",{class:"backdrop",onClick:p[0]||(p[0]=k=>v.$emit("close"))}),_("div",en,[_("form",{class:"search-bar",onPointerup:p[4]||(p[4]=k=>ye(k)),onSubmit:p[5]||(p[5]=Kt(()=>{},["prevent"]))},[_("label",{title:x.value,id:"localsearch-label",for:"localsearch-input"},p[7]||(p[7]=[_("span",{"aria-hidden":"true",class:"vpi-search search-icon local-search-icon"},null,-1)]),8,tn),_("div",sn,[_("button",{class:"back-button",title:L(d)("modal.backButtonTitle"),onClick:p[1]||(p[1]=k=>v.$emit("close"))},p[8]||(p[8]=[_("span",{class:"vpi-arrow-left local-search-icon"},null,-1)]),8,nn)]),Jt(_("input",{ref_key:"searchInput",ref:W,"onUpdate:modelValue":p[2]||(p[2]=k=>qt(f)?f.value=k:null),"aria-activedescendant":M.value>-1?"localsearch-item-"+M.value:void 0,"aria-autocomplete":"both","aria-controls":(O=w.value)!=null&&O.length?"localsearch-list":void 0,"aria-labelledby":"localsearch-label",autocapitalize:"off",autocomplete:"off",autocorrect:"off",class:"search-input",id:"localsearch-input",enterkeyhint:"go",maxlength:"64",placeholder:x.value,spellcheck:"false",type:"search"},null,8,rn),[[Ut,L(f)]]),_("div",an,[y.value?Se("",!0):(H(),Z("button",{key:0,class:st(["toggle-layout-button",{"detailed-list":L(b)}
8]),type:"button",title:L(d)("modal.displayDetails"),onClick:p[3]||(p[3]=k=>M.value>-1&&(b.value=!L(b)))},p[9]||(p[9]=[_("span",{class:"vpi-layout-list local-search-icon"},null,-1)]),10,on)),_("button",{class:"clear-button",type:"reset",disabled:$.value,title:L(d)("modal.resetButtonTitle"),onClick:E},p[10]||(p[10]=[_("span",{class:"vpi-delete local-search-icon"},null,-1)]),8,ln)])],32),_("ul",{ref_key:"resultsEl",ref:n,id:(P=w.value)!=null&&P.length?"localsearch-list":void 0,role:(z=w.value)!=null&&z.length?"listbox":void 0,"aria-labelledby":(V=w.value)!=null&&V.length?"localsearch-label":void 0,class:"results",onMousemove:F},[(H(!0),Z(rt,null,nt(w.value,(k,K)=>(H(),Z("li",{key:k.id,id:"localsearch-item-"+K,"aria-selected":M.value===K?"true":"false",role:"option"},[_("a",{href:k.id,class:st(["result",{selected:M.value===K}]),"aria-label":[...k.titles,k.title].join(" > "),onMouseenter:ee=>!U.value&&(M.value=K),onFocusin:ee=>M.value=K,onClick:p[6]||(p[6]=ee=>v.$emit("close")),"data-index":K},[_("div",null,[_("div",hn,[p[12]||(p[12]=_("span",{class:"title-icon"},"#",-1)),(H(!0),Z(rt,null,nt(k.titles,(ee,we)=>(H(),Z("span",{key:we,class:"title"},[_("span",{class:"text",innerHTML:ee},null,8,fn),p[11]||(p[11]=_("span",{class:"vpi-chevron-right local-search-icon"},null,-1))]))),128)),_("span",pn,[_("span",{class:"text",innerHTML:k.title},null,8,vn)])]),L(b)?(H(),Z("div",mn,[k.text?(H(),Z("div",gn,[_("div",{class:"vp-doc",innerHTML:k.text},null,8,bn)])):Se("",!0),p[13]||(p[13]=_("div",{class:"excerpt-gradient-bottom"},null,-1)),p[14]||(p[14]=_("div",{class:"excerpt-gradient-top"},null,-1))])):Se("",!0)])],42,dn)],8,un))),128)),L(f)&&!w.value.length&&R.value?(H(),Z("li",yn,[pe(ve(L(d)("modal.noResultsText"))+' "',1),_("strong",null,ve(L(f)),1),p[15]||(p[15]=pe('" ',-1))])):Se("",!0)],40,cn),_("div",wn,[_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.navigateUpKeyAriaLabel")},p[16]||(p[16]=[_("span",{class:"vpi-arrow-up navigate-icon"},null,-1)]),8,xn),_("kbd",{"aria-label":L(d)("modal.footer.navigateDownKeyAriaLabel")},p[17]||(p[17]=[_("span",{class:"vpi-arrow-down navigate-icon"},null,-1)]),8,_n),pe(" "+ve(L(d)("modal.footer.navigateText")),1)]),_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.selectKeyAriaLabel")},p[18]||(p[18]=[_("span",{class:"vpi-corner-down-left navigate-icon"},null,-1)]),8,Sn),pe(" "+ve(L(d)("modal.footer.selectText")),1)]),_("span",null,[_("kbd",{"aria-label":L(d)("modal.footer.closeKeyAriaLabel")},"esc",8,En),pe(" "+ve(L(d)("modal.footer.closeText")),1)])])])],8,Xs)])}}}),Cn=Xt(Tn,[["__scopeId","data-v-ce626c7c"]]);export{Cn as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.