@gkd-kit/docs 0.0.1709887455831 → 0.0.1709887931245

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.
Files changed (45) hide show
  1. package/.vitepress/dist/404.html +4 -4
  2. package/.vitepress/dist/api/index.html +7 -7
  3. package/.vitepress/dist/api/interfaces/RawApp.html +7 -7
  4. package/.vitepress/dist/api/interfaces/RawAppGroup.html +7 -7
  5. package/.vitepress/dist/api/interfaces/RawAppRule.html +9 -9
  6. package/.vitepress/dist/api/interfaces/RawAppRuleProps.html +7 -7
  7. package/.vitepress/dist/api/interfaces/RawCategory.html +7 -7
  8. package/.vitepress/dist/api/interfaces/RawCommonProps.html +7 -7
  9. package/.vitepress/dist/api/interfaces/RawGlobalApp.html +7 -7
  10. package/.vitepress/dist/api/interfaces/RawGlobalGroup.html +7 -7
  11. package/.vitepress/dist/api/interfaces/RawGlobalRule.html +9 -9
  12. package/.vitepress/dist/api/interfaces/RawGlobalRuleProps.html +7 -7
  13. package/.vitepress/dist/api/interfaces/RawGroupProps.html +7 -7
  14. package/.vitepress/dist/api/interfaces/RawRuleProps.html +9 -9
  15. package/.vitepress/dist/api/interfaces/RawSubscription.html +7 -7
  16. package/.vitepress/dist/api/type-aliases/IArray.html +7 -7
  17. package/.vitepress/dist/api/type-aliases/Integer.html +7 -7
  18. package/.vitepress/dist/api/type-aliases/Position.html +7 -7
  19. package/.vitepress/dist/assets/{api_interfaces_RawAppRule.md.D4aJ0cXX.js → api_interfaces_RawAppRule.md.fCYGDTZW.js} +1 -1
  20. package/.vitepress/dist/assets/{api_interfaces_RawGlobalRule.md.iy5NoLkD.js → api_interfaces_RawGlobalRule.md.OkSP1_IE.js} +1 -1
  21. package/.vitepress/dist/assets/{api_interfaces_RawRuleProps.md.eMzVU1UK.js → api_interfaces_RawRuleProps.md.npTyl4Oo.js} +1 -1
  22. package/.vitepress/dist/assets/{api_interfaces_RawRuleProps.md.eMzVU1UK.lean.js → api_interfaces_RawRuleProps.md.npTyl4Oo.lean.js} +1 -1
  23. package/.vitepress/dist/assets/app.M-T5VEeq.js +1 -1
  24. package/.vitepress/dist/assets/chunks/VPLocalSearchBox.WC66geE3.js +2 -2
  25. package/.vitepress/dist/assets/chunks/theme.2RE320ly.js +1 -1
  26. package/.vitepress/dist/assets/{faq_index.md.yRMs5HTc.js → faq_index.md.ph-N6xSv.js} +1 -1
  27. package/.vitepress/dist/assets/{faq_index.md.yRMs5HTc.lean.js → faq_index.md.ph-N6xSv.lean.js} +1 -1
  28. package/.vitepress/dist/assets/{guide_index.md.1ZPCSyuk.js → guide_index.md._1pgEGJ4.js} +1 -1
  29. package/.vitepress/dist/assets/{guide_index.md.1ZPCSyuk.lean.js → guide_index.md._1pgEGJ4.lean.js} +1 -1
  30. package/.vitepress/dist/assets/{index.md.WwfgC-xs.js → index.md.FS4tWg_N.js} +1 -1
  31. package/.vitepress/dist/assets/{index.md.WwfgC-xs.lean.js → index.md.FS4tWg_N.lean.js} +1 -1
  32. package/.vitepress/dist/assets/{scription_index.md.kdNnAdO_.js → scription_index.md.5wlfVdMw.js} +1 -1
  33. package/.vitepress/dist/assets/{scription_index.md.kdNnAdO_.lean.js → scription_index.md.5wlfVdMw.lean.js} +1 -1
  34. package/.vitepress/dist/assets/{selector_index.md.d5FcStLQ.js → selector_index.md.AUgBgYhh.js} +1 -1
  35. package/.vitepress/dist/assets/{selector_index.md.d5FcStLQ.lean.js → selector_index.md.AUgBgYhh.lean.js} +1 -1
  36. package/.vitepress/dist/assets/style.neYbxcEm.css +1 -1
  37. package/.vitepress/dist/faq/index.html +8 -8
  38. package/.vitepress/dist/guide/index.html +8 -8
  39. package/.vitepress/dist/hashmap.json +1 -1
  40. package/.vitepress/dist/index.html +7 -7
  41. package/.vitepress/dist/scription/index.html +8 -8
  42. package/.vitepress/dist/selector/index.html +8 -8
  43. package/package.json +1 -1
  44. /package/.vitepress/dist/assets/{api_interfaces_RawAppRule.md.D4aJ0cXX.lean.js → api_interfaces_RawAppRule.md.fCYGDTZW.lean.js} +0 -0
  45. /package/.vitepress/dist/assets/{api_interfaces_RawGlobalRule.md.iy5NoLkD.lean.js → api_interfaces_RawGlobalRule.md.OkSP1_IE.lean.js} +0 -0
@@ -1 +1 @@
1
- import{_ as e,c as a,o,V as t}from"./chunks/framework.CR5kvWbS.js";const k=JSON.parse('{"title":"RawRuleProps","description":"","frontmatter":{},"headers":[],"relativePath":"api/interfaces/RawRuleProps.md","filePath":"api/interfaces/RawRuleProps.md","lastUpdated":null}'),i={name:"api/interfaces/RawRuleProps.md"},s=t('<h1 id="rawruleprops" tabindex="-1">RawRuleProps <a class="header-anchor" href="#rawruleprops" aria-label="Permalink to &quot;RawRuleProps&quot;">​</a></h1><p>全局规则和应用规则的基础通用属性</p><h2 id="extends" tabindex="-1">Extends <a class="header-anchor" href="#extends" aria-label="Permalink to &quot;Extends&quot;">​</a></h2><ul><li><a href="./RawCommonProps.html"><code>RawCommonProps</code></a></li></ul><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;">​</a></h2><h3 id="actioncd" tabindex="-1">actionCd? <a class="header-anchor" href="#actioncd" aria-label="Permalink to &quot;actionCd?&quot;">​</a></h3><blockquote><p><strong>actionCd</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>当前规则的冷却时间, 或者执行 action 最小间隔</p><h4 id="default" tabindex="-1">Default <a class="header-anchor" href="#default" aria-label="Permalink to &quot;Default&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1000</span></span></code></pre></div><h4 id="inherited-from" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actioncd"><code>actionCd</code></a></p><hr><h3 id="actiondelay" tabindex="-1">actionDelay? <a class="header-anchor" href="#actiondelay" aria-label="Permalink to &quot;actionDelay?&quot;">​</a></h3><blockquote><p><strong>actionDelay</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>延迟执行: 查询到节点-&gt;等待一段时间-&gt;再次查询到节点则执行对应 action</p><h4 id="inherited-from-1" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-1" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actiondelay"><code>actionDelay</code></a></p><hr><h3 id="quickfind" tabindex="-1">quickFind? <a class="header-anchor" href="#quickfind" aria-label="Permalink to &quot;quickFind?&quot;">​</a></h3><blockquote><p><strong>quickFind</strong>?: <code>boolean</code></p></blockquote><p>如果开启, 此规则下的所有 <code>末尾属性选择器</code>的<code>第一个属性选择表达式</code>符合下面的结构之一的选择器 将使用快速查找</p><ul><li>[id=&#39;abc&#39;]</li><li>[vid=&#39;abc&#39;]</li><li>[text=&#39;abc&#39;]</li><li>[text^=&#39;abc&#39;]</li><li>[text*=&#39;abc&#39;]</li><li>[text$=&#39;abc&#39;]</li></ul><p>比如 <code>A &gt; B + C[id=&#39;x&#39;][childCount=2]</code> 符合, 但 <code>A &gt; B + C[childCount=2][id=&#39;x&#39;]</code> 不符合</p><p>它的底层原理是 跳过手动遍历所有节点 直接调用 <a href="https://developer.android.google.cn/reference/android/view/accessibility/AccessibilityNodeInfo#findAccessibilityNodeInfosByViewId(java.lang.String)" target="_blank" rel="noreferrer">findAccessibilityNodeInfosByViewId</a> / <a href="https://developer.android.google.cn/reference/android/view/accessibility/AccessibilityNodeInfo#findAccessibilityNodeInfosByText(java.lang.String)" target="_blank" rel="noreferrer">findAccessibilityNodeInfosByText</a> 得到可匹配节点</p><p>大多数情况下都能查询到, 在少数某些复杂结构下, 即使目标节点存在, 快速查询也不一定查询到</p><p>比如 <a href="https://github.com/gkd-kit/subscription/blob/1ae87452d287b558f58f9c4e4448a3190e212ca1/src/apps/com.zidongdianji.ts#L26" target="_blank" rel="noreferrer">Image &lt; @View + View &gt;2 [text*=&#39;广告&#39;]</a> 虽然符合快速查询的条件但是使用 <code>findAccessibilityNodeInfosByText(&quot;广告&quot;)</code> 并不能查询到节点</p><p>它是优点是快速, 因为遍历所有节点是一个耗时行为, 虽然多数情况下这种耗时较低</p><p>但是在某些软件比如 哔哩哔哩 的开屏广告在这种耗时下延迟可达 1-2s, 这也是导致 <a href="https://github.com/gkd-kit/gkd/issues/60" target="_blank" rel="noreferrer">gkd-kit/gkd#60</a> 的原因</p><p>如果你想对某个局部选择器关闭快速查找,只需要调整你的选择器的属性选择表达式的顺序使得它不符合快速查找的条件即可</p><h4 id="inherited-from-2" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-2" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#quickfind"><code>quickFind</code></a></p><hr><h3 id="matchdelay" tabindex="-1">matchDelay? <a class="header-anchor" href="#matchdelay" aria-label="Permalink to &quot;matchDelay?&quot;">​</a></h3><blockquote><p><strong>matchDelay</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>匹配延迟</p><p>规则准备匹配/或被唤醒时, 等待一段时间, 使此规则参与查询屏幕节点</p><h4 id="inherited-from-3" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-3" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#matchdelay"><code>matchDelay</code></a></p><hr><h3 id="matchtime" tabindex="-1">matchTime? <a class="header-anchor" href="#matchtime" aria-label="Permalink to &quot;matchTime?&quot;">​</a></h3><blockquote><p><strong>matchTime</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>规则匹配时间, 此规则参与查询屏幕节点时, 等待一段时间, 休眠此规则</p><p>例如某些应用的 开屏广告 的 activityId 容易误触/太广泛, 而开屏广告几乎只在应用切出来时出现, 设置一个有限匹配时间能避免后续的误触</p><h4 id="inherited-from-4" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-4" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#matchtime"><code>matchTime</code></a></p><hr><h3 id="actionmaximum" tabindex="-1">actionMaximum? <a class="header-anchor" href="#actionmaximum" aria-label="Permalink to &quot;actionMaximum?&quot;">​</a></h3><blockquote><p><strong>actionMaximum</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>最大执行次数</p><p>规则的 action 被执行的最大次数, 达到最大次数时, 休眠此规则</p><p>功能类似 matchTime, 适用于只需要执行一次的: 开屏广告/更新弹窗/青少年弹窗 一类规则</p><p>当规则准备匹配/或被唤醒时, 将重新计算次数</p><h4 id="inherited-from-5" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-5" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actionmaximum"><code>actionMaximum</code></a></p><hr><h3 id="resetmatch" tabindex="-1">resetMatch? <a class="header-anchor" href="#resetmatch" aria-label="Permalink to &quot;resetMatch?&quot;">​</a></h3><blockquote><p><strong>resetMatch</strong>?: <code>&quot;activity&quot;</code> | <code>&quot;app&quot;</code></p></blockquote><p>当规则因为 matchTime/actionMaximum 而休眠时, 如何唤醒此规则</p><h4 id="default-1" tabindex="-1">Default <a class="header-anchor" href="#default-1" aria-label="Permalink to &quot;Default&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;activity&#39;</span></span></code></pre></div><h4 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;activity&#39;</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 当 activity 刷新时, 唤醒规则</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 刷新 activity 并不代表 activityId 变化</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 如 哔哩哔哩视频播放页 底部点击推荐视频 进入另一个 视频播放页, 进入了新 activity 但是 activityId 并没有变化</span></span></code></pre></div><h4 id="example-1" tabindex="-1">Example <a class="header-anchor" href="#example-1" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;app&#39;</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 重新进入 app 时, 唤醒规则</span></span></code></pre></div><h4 id="inherited-from-6" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-6" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#resetmatch"><code>resetMatch</code></a></p><hr><h3 id="actioncdkey" tabindex="-1">actionCdKey? <a class="header-anchor" href="#actioncdkey" aria-label="Permalink to &quot;actionCdKey?&quot;">​</a></h3><blockquote><p><strong>actionCdKey</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>与这个 key 的 rule 共享 cd</p><p>比如开屏广告可能需要多个 rule 去匹配, 当一个 rule 触发时, 其它 rule 的触发是无意义的</p><p>如果你对这个 key 的 rule 设置 actionCd=3000, 那么当这个 rule 和 本 rule 触发任意一个时, 在 3000毫秒 内两个 rule 都将进入 cd</p><h4 id="inherited-from-7" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-7" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actioncdkey"><code>actionCdKey</code></a></p><hr><h3 id="actionmaximumkey" tabindex="-1">actionMaximumKey? <a class="header-anchor" href="#actionmaximumkey" aria-label="Permalink to &quot;actionMaximumKey?&quot;">​</a></h3><blockquote><p><strong>actionMaximumKey</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>与这个 key 的 rule 共享次数</p><p>比如开屏广告可能需要多个 rule 去匹配, 当一个 rule 触发时, 其它 rule 的触发是无意义的</p><p>如果你对这个 key 的 rule 设置 actionMaximum=1, 那么当这个 rule 和 本 rule 触发任意一个时, 两个 rule 都将进入休眠</p><h4 id="inherited-from-8" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-8" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actionmaximumkey"><code>actionMaximumKey</code></a></p><hr><h3 id="order" tabindex="-1">order? <a class="header-anchor" href="#order" aria-label="Permalink to &quot;order?&quot;">​</a></h3><blockquote><p><strong>order</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>规则参与匹配的顺序, 数字越小越先匹配</p><p>如果两个规则 order 相同, 按照 groups 中的数组顺序匹配, app 类型规则顺序优先于 global 类型规则</p><p>属于不同订阅的规则按照订阅列表中顺序匹配, 长按订阅卡片可以拖动排序</p><h4 id="default-2" tabindex="-1">Default <a class="header-anchor" href="#default-2" aria-label="Permalink to &quot;Default&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span></span></code></pre></div><h4 id="version" tabindex="-1">Version <a class="header-anchor" href="#version" aria-label="Permalink to &quot;Version&quot;">​</a></h4><p>1.7.0</p><h4 id="inherited-from-9" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-9" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#order"><code>order</code></a></p><hr><h3 id="forcedtime" tabindex="-1">forcedTime? <a class="header-anchor" href="#forcedtime" aria-label="Permalink to &quot;forcedTime?&quot;">​</a></h3><blockquote><p><strong>forcedTime</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>在开始匹配后的一段时间内, 不管界面没有通知变化, 主动使此规则参与屏幕查询</p><p>GKD 借助 <a href="https://developer.android.com/reference/android/accessibilityservice/AccessibilityService#onAccessibilityEvent(android.view.accessibility.AccessibilityEvent)" target="_blank" rel="noreferrer">onAccessibilityEvent</a> 感知界面变化</p><p>但是某些基于 flutter/webview 开发的应用/页面在变化时并不会通知系统去触发 onAccessibilityEvent, 但是屏幕上的节点信息确实产生变化</p><p>唯一的办法是在开始匹配的一定时间内主动查询屏幕节点</p><h4 id="version-1" tabindex="-1">Version <a class="header-anchor" href="#version-1" aria-label="Permalink to &quot;Version&quot;">​</a></h4><p>1.7.0</p><h4 id="inherited-from-10" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-10" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#forcedtime"><code>forcedTime</code></a></p><hr><h3 id="snapshoturls" tabindex="-1">snapshotUrls? <a class="header-anchor" href="#snapshoturls" aria-label="Permalink to &quot;snapshotUrls?&quot;">​</a></h3><blockquote><p><strong>snapshotUrls</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>当前 规则/规则组 的快照链接, 增强订阅可维护性</p><h4 id="inherited-from-11" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-11" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#snapshoturls"><code>snapshotUrls</code></a></p><hr><h3 id="exampleurls" tabindex="-1">exampleUrls? <a class="header-anchor" href="#exampleurls" aria-label="Permalink to &quot;exampleUrls?&quot;">​</a></h3><blockquote><p><strong>exampleUrls</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>当前 规则/规则组 的规则在手机上的运行示例, 支持 jpg/png/webp/gif</p><p>如果规则是多个规则组合起来的, 可以更好看懂规则到底在干啥, 比如 点击关闭按钮-选择关闭原因-确认关闭 这种广告用 gif 看着更清楚在干啥</p><h4 id="inherited-from-12" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-12" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#exampleurls"><code>exampleUrls</code></a></p><hr><h3 id="key" tabindex="-1">key? <a class="header-anchor" href="#key" aria-label="Permalink to &quot;key?&quot;">​</a></h3><blockquote><p><strong>key</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>当前规则在列表中的唯一标识</p><p>key 没有顺序大小之分, 可以是任意数字</p><p>设置后不可更改, 否则造成点击记录错乱</p><hr><h3 id="name" tabindex="-1">name? <a class="header-anchor" href="#name" aria-label="Permalink to &quot;name?&quot;">​</a></h3><blockquote><p><strong>name</strong>?: <code>string</code></p></blockquote><p>规则名称</p><hr><h3 id="prekeys" tabindex="-1">preKeys? <a class="header-anchor" href="#prekeys" aria-label="Permalink to &quot;preKeys?&quot;">​</a></h3><blockquote><p><strong>preKeys</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<a href="./../type-aliases/Integer.html"><code>Integer</code></a>&gt;</p></blockquote><p>要求当前列表里某个 key 刚刚执行</p><p>比如点击关闭按钮-选择关闭原因-确认关闭, key 分别是 1,2,3, preKeys 分别是 [],[1],[2]</p><p>那么 选择关闭原因 必须要求 比如点击关闭按钮 刚刚点击过才能执行, 确认关闭 也要求 选择关闭原因 刚刚点击过才执行</p><p>否则后面的规则不会触发, 也就是要求规则按顺序执行, 这是为了防止规则匹配范围太过广泛而误触</p><hr><h3 id="action" tabindex="-1">action? <a class="header-anchor" href="#action" aria-label="Permalink to &quot;action?&quot;">​</a></h3><blockquote><p><strong>action</strong>?: <code>&quot;click&quot;</code> | <code>&quot;clickNode&quot;</code> | <code>&quot;clickCenter&quot;</code> | <code>&quot;back&quot;</code> | <code>&quot;longClick&quot;</code> | <code>&quot;longClickNode&quot;</code> | <code>&quot;longClickCenter&quot;</code></p></blockquote><p>规则匹配后的操作行为</p><p>在 position 存在的情况下, action 的默认值为 <code>clickCenter</code></p><h4 id="example-2" tabindex="-1">Example <a class="header-anchor" href="#example-2" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`click`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 为默认值, 如果目标节点是 clickable 的, 则使用 `clickNode`, 反之使用 `clickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 并且当 `clickNode` 事件没有被应用接收时, 则使用 `clickCenter`</span></span></code></pre></div><h4 id="example-3" tabindex="-1">Example <a class="header-anchor" href="#example-3" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`clickNode`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 向系统发起一个点击无障碍节点事件. 即使节点在屏幕外部/或者被其它节点遮挡,也依然能够正确触发点击目标节点</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 但是如果目标节点不是 clickable 的, 目标应用通常不响应这个点击事件, 也就是点击无效果</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 在极少数情况下, 即使节点是 clickable 的,应用显示接收但是不响应节点点击事件, 此时需要手动设置 `clickCenter`</span></span></code></pre></div><h4 id="example-4" tabindex="-1">Example <a class="header-anchor" href="#example-4" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`clickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 计算出此控件的中心的坐标并且如果这个坐标在屏幕内部,那么就向系统发起一个点击屏幕坐标事件</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 如果这个坐标不在屏幕内部, 当作未匹配</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 另外如果目标节点的位置被其它节点遮挡覆盖, 则会点击触发最上层的节点(可能不是目标节点)</span></span></code></pre></div><h4 id="example-5" tabindex="-1">Example <a class="header-anchor" href="#example-5" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`back`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 向系统发起一个返回事件, 相当于按下返回键</span></span></code></pre></div><h4 id="example-6" tabindex="-1">Example <a class="header-anchor" href="#example-6" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`longClick`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 如果目标节点是 longClickable 的, 则使用 `longClickNode`, 反之使用 `longClickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 并且当 `longClickNode` 事件没有被应用接收时, 则使用 `longClickCenter`</span></span></code></pre></div><h4 id="example-7" tabindex="-1">Example <a class="header-anchor" href="#example-7" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`longClickNode`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 向系统发起一个长按无障碍节点事件,与 clickNode 类似</span></span></code></pre></div><h4 id="example-8" tabindex="-1">Example <a class="header-anchor" href="#example-8" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`longClickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 与 clickCenter 类似, 长按时间为 400 毫秒</span></span></code></pre></div><hr><h3 id="position" tabindex="-1">position? <a class="header-anchor" href="#position" aria-label="Permalink to &quot;position?&quot;">​</a></h3><blockquote><p><strong>position</strong>?: <a href="./../type-aliases/Position.html"><code>Position</code></a></p></blockquote><p>在使用 clickCenter/longClickCenter 时的自定义点击位置</p><p>默认坐标为节点中心</p><p>如果计算出的坐标不在屏幕内部, 当作未匹配</p><p>在 position 存在的情况下, action 的默认值为 <code>clickCenter</code></p><h4 id="version-2" tabindex="-1">Version <a class="header-anchor" href="#version-2" aria-label="Permalink to &quot;Version&quot;">​</a></h4><p>1.7.0</p><hr><h3 id="matches" tabindex="-1">matches? <a class="header-anchor" href="#matches" aria-label="Permalink to &quot;matches?&quot;">​</a></h3><blockquote><p><strong>matches</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>一个或者多个合法的 GKD 选择器, 如果每个选择器都能匹配上节点, 那么点击最后一个选择器的目标节点</p><hr><h3 id="excludematches" tabindex="-1">excludeMatches? <a class="header-anchor" href="#excludematches" aria-label="Permalink to &quot;excludeMatches?&quot;">​</a></h3><blockquote><p><strong>excludeMatches</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>一个或者多个合法的 GKD 选择器, 如果存在一个选择器匹配上节点, 则停止匹配此规则</p>',177),r=[s];function l(n,c,h,d,p,m){return o(),a("div",null,r)}const b=e(i,[["render",l]]);export{k as __pageData,b as default};
1
+ import{_ as e,c as a,o,V as t}from"./chunks/framework.CR5kvWbS.js";const k=JSON.parse('{"title":"RawRuleProps","description":"","frontmatter":{},"headers":[],"relativePath":"api/interfaces/RawRuleProps.md","filePath":"api/interfaces/RawRuleProps.md","lastUpdated":null}'),i={name:"api/interfaces/RawRuleProps.md"},s=t('<h1 id="rawruleprops" tabindex="-1">RawRuleProps <a class="header-anchor" href="#rawruleprops" aria-label="Permalink to &quot;RawRuleProps&quot;">​</a></h1><p>全局规则和应用规则的基础通用属性</p><h2 id="extends" tabindex="-1">Extends <a class="header-anchor" href="#extends" aria-label="Permalink to &quot;Extends&quot;">​</a></h2><ul><li><a href="./RawCommonProps.html"><code>RawCommonProps</code></a></li></ul><h2 id="properties" tabindex="-1">Properties <a class="header-anchor" href="#properties" aria-label="Permalink to &quot;Properties&quot;">​</a></h2><h3 id="actioncd" tabindex="-1">actionCd? <a class="header-anchor" href="#actioncd" aria-label="Permalink to &quot;actionCd?&quot;">​</a></h3><blockquote><p><strong>actionCd</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>当前规则的冷却时间, 或者执行 action 最小间隔</p><h4 id="default" tabindex="-1">Default <a class="header-anchor" href="#default" aria-label="Permalink to &quot;Default&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1000</span></span></code></pre></div><h4 id="inherited-from" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actioncd"><code>actionCd</code></a></p><hr><h3 id="actiondelay" tabindex="-1">actionDelay? <a class="header-anchor" href="#actiondelay" aria-label="Permalink to &quot;actionDelay?&quot;">​</a></h3><blockquote><p><strong>actionDelay</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>延迟执行: 查询到节点-&gt;等待一段时间-&gt;再次查询到节点则执行对应 action</p><h4 id="inherited-from-1" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-1" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actiondelay"><code>actionDelay</code></a></p><hr><h3 id="quickfind" tabindex="-1">quickFind? <a class="header-anchor" href="#quickfind" aria-label="Permalink to &quot;quickFind?&quot;">​</a></h3><blockquote><p><strong>quickFind</strong>?: <code>boolean</code></p></blockquote><p>如果开启, 此规则下的所有 <code>末尾属性选择器</code>的<code>第一个属性选择表达式</code>符合下面的结构之一的选择器 将使用快速查找</p><ul><li>[id=&#39;abc&#39;]</li><li>[vid=&#39;abc&#39;]</li><li>[text=&#39;abc&#39;]</li><li>[text^=&#39;abc&#39;]</li><li>[text*=&#39;abc&#39;]</li><li>[text$=&#39;abc&#39;]</li></ul><p>比如 <code>A &gt; B + C[id=&#39;x&#39;][childCount=2]</code> 符合, 但 <code>A &gt; B + C[childCount=2][id=&#39;x&#39;]</code> 不符合</p><p>它的底层原理是 跳过手动遍历所有节点 直接调用 <a href="https://developer.android.google.cn/reference/android/view/accessibility/AccessibilityNodeInfo#findAccessibilityNodeInfosByViewId(java.lang.String)" target="_blank" rel="noreferrer">findAccessibilityNodeInfosByViewId</a> / <a href="https://developer.android.google.cn/reference/android/view/accessibility/AccessibilityNodeInfo#findAccessibilityNodeInfosByText(java.lang.String)" target="_blank" rel="noreferrer">findAccessibilityNodeInfosByText</a> 得到可匹配节点</p><p>大多数情况下都能查询到, 在少数某些复杂结构下, 即使目标节点存在, 快速查询也不一定查询到</p><p>比如 <a href="https://github.com/gkd-kit/subscription/blob/1ae87452d287b558f58f9c4e4448a3190e212ca1/src/apps/com.zidongdianji.ts#L26" target="_blank" rel="noreferrer">Image &lt; @View + View &gt;2 [text*=&#39;广告&#39;]</a> 虽然符合快速查询的条件但是使用 <code>findAccessibilityNodeInfosByText(&quot;广告&quot;)</code> 并不能查询到节点</p><p>它是优点是快速, 因为遍历所有节点是一个耗时行为, 虽然多数情况下这种耗时较低</p><p>但是在某些软件比如 哔哩哔哩 的开屏广告在这种耗时下延迟可达 1-2s, 这也是导致 <a href="https://github.com/gkd-kit/gkd/issues/60" target="_blank" rel="noreferrer">gkd-kit/gkd#60</a> 的原因</p><p>如果你想对某个局部选择器关闭快速查找,只需要调整你的选择器的属性选择表达式的顺序使得它不符合快速查找的条件即可</p><h4 id="inherited-from-2" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-2" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#quickfind"><code>quickFind</code></a></p><hr><h3 id="matchdelay" tabindex="-1">matchDelay? <a class="header-anchor" href="#matchdelay" aria-label="Permalink to &quot;matchDelay?&quot;">​</a></h3><blockquote><p><strong>matchDelay</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>匹配延迟</p><p>规则准备匹配/或被唤醒时, 等待一段时间, 使此规则参与查询屏幕节点</p><h4 id="inherited-from-3" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-3" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#matchdelay"><code>matchDelay</code></a></p><hr><h3 id="matchtime" tabindex="-1">matchTime? <a class="header-anchor" href="#matchtime" aria-label="Permalink to &quot;matchTime?&quot;">​</a></h3><blockquote><p><strong>matchTime</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>规则匹配时间, 此规则参与查询屏幕节点时, 等待一段时间, 休眠此规则</p><p>例如某些应用的 开屏广告 的 activityId 容易误触/太广泛, 而开屏广告几乎只在应用切出来时出现, 设置一个有限匹配时间能避免后续的误触</p><h4 id="inherited-from-4" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-4" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#matchtime"><code>matchTime</code></a></p><hr><h3 id="actionmaximum" tabindex="-1">actionMaximum? <a class="header-anchor" href="#actionmaximum" aria-label="Permalink to &quot;actionMaximum?&quot;">​</a></h3><blockquote><p><strong>actionMaximum</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>最大执行次数</p><p>规则的 action 被执行的最大次数, 达到最大次数时, 休眠此规则</p><p>功能类似 matchTime, 适用于只需要执行一次的: 开屏广告/更新弹窗/青少年弹窗 一类规则</p><p>当规则准备匹配/或被唤醒时, 将重新计算次数</p><h4 id="inherited-from-5" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-5" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actionmaximum"><code>actionMaximum</code></a></p><hr><h3 id="resetmatch" tabindex="-1">resetMatch? <a class="header-anchor" href="#resetmatch" aria-label="Permalink to &quot;resetMatch?&quot;">​</a></h3><blockquote><p><strong>resetMatch</strong>?: <code>&quot;activity&quot;</code> | <code>&quot;app&quot;</code></p></blockquote><p>当规则因为 matchTime/actionMaximum 而休眠时, 如何唤醒此规则</p><h4 id="default-1" tabindex="-1">Default <a class="header-anchor" href="#default-1" aria-label="Permalink to &quot;Default&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;activity&#39;</span></span></code></pre></div><h4 id="example" tabindex="-1">Example <a class="header-anchor" href="#example" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;activity&#39;</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 当 activity 刷新时, 唤醒规则</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 刷新 activity 并不代表 activityId 变化</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 如 哔哩哔哩视频播放页 底部点击推荐视频 进入另一个 视频播放页, 进入了新 activity 但是 activityId 并没有变化</span></span></code></pre></div><h4 id="example-1" tabindex="-1">Example <a class="header-anchor" href="#example-1" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;app&#39;</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 重新进入 app 时, 唤醒规则</span></span></code></pre></div><h4 id="inherited-from-6" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-6" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#resetmatch"><code>resetMatch</code></a></p><hr><h3 id="actioncdkey" tabindex="-1">actionCdKey? <a class="header-anchor" href="#actioncdkey" aria-label="Permalink to &quot;actionCdKey?&quot;">​</a></h3><blockquote><p><strong>actionCdKey</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>与这个 key 的 rule 共享 cd</p><p>比如开屏广告可能需要多个 rule 去匹配, 当一个 rule 触发时, 其它 rule 的触发是无意义的</p><p>如果你对这个 key 的 rule 设置 actionCd=3000, 那么当这个 rule 和 本 rule 触发任意一个时, 在 3000毫秒 内两个 rule 都将进入 cd</p><h4 id="inherited-from-7" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-7" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actioncdkey"><code>actionCdKey</code></a></p><hr><h3 id="actionmaximumkey" tabindex="-1">actionMaximumKey? <a class="header-anchor" href="#actionmaximumkey" aria-label="Permalink to &quot;actionMaximumKey?&quot;">​</a></h3><blockquote><p><strong>actionMaximumKey</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>与这个 key 的 rule 共享次数</p><p>比如开屏广告可能需要多个 rule 去匹配, 当一个 rule 触发时, 其它 rule 的触发是无意义的</p><p>如果你对这个 key 的 rule 设置 actionMaximum=1, 那么当这个 rule 和 本 rule 触发任意一个时, 两个 rule 都将进入休眠</p><h4 id="inherited-from-8" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-8" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#actionmaximumkey"><code>actionMaximumKey</code></a></p><hr><h3 id="order" tabindex="-1">order? <a class="header-anchor" href="#order" aria-label="Permalink to &quot;order?&quot;">​</a></h3><blockquote><p><strong>order</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>规则参与匹配的顺序, 数字越小越先匹配</p><p>如果两个规则 order 相同, 按照 groups 中的数组顺序匹配, app 类型规则顺序优先于 global 类型规则</p><p>属于不同订阅的规则按照订阅列表中顺序匹配, 长按订阅卡片可以拖动排序</p><h4 id="default-2" tabindex="-1">Default <a class="header-anchor" href="#default-2" aria-label="Permalink to &quot;Default&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">0</span></span></code></pre></div><h4 id="version" tabindex="-1">Version <a class="header-anchor" href="#version" aria-label="Permalink to &quot;Version&quot;">​</a></h4><p>1.7.0</p><h4 id="inherited-from-9" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-9" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#order"><code>order</code></a></p><hr><h3 id="forcedtime" tabindex="-1">forcedTime? <a class="header-anchor" href="#forcedtime" aria-label="Permalink to &quot;forcedTime?&quot;">​</a></h3><blockquote><p><strong>forcedTime</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>单位: 毫秒</p><p>在开始匹配后的一段时间内, 不管界面没有通知变化, 主动使此规则参与屏幕查询</p><p>GKD 借助 <a href="https://developer.android.com/reference/android/accessibilityservice/AccessibilityService#onAccessibilityEvent(android.view.accessibility.AccessibilityEvent)" target="_blank" rel="noreferrer">onAccessibilityEvent</a> 感知界面变化</p><p>但是某些基于 flutter/webview 开发的应用/页面在变化时并不会通知系统去触发 onAccessibilityEvent, 但是屏幕上的节点信息确实产生变化</p><p>唯一的办法是在开始匹配的一定时间内主动查询屏幕节点</p><h4 id="version-1" tabindex="-1">Version <a class="header-anchor" href="#version-1" aria-label="Permalink to &quot;Version&quot;">​</a></h4><p>1.7.0</p><h4 id="inherited-from-10" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-10" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#forcedtime"><code>forcedTime</code></a></p><hr><h3 id="snapshoturls" tabindex="-1">snapshotUrls? <a class="header-anchor" href="#snapshoturls" aria-label="Permalink to &quot;snapshotUrls?&quot;">​</a></h3><blockquote><p><strong>snapshotUrls</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>当前 规则/规则组 的快照链接, 增强订阅可维护性</p><h4 id="inherited-from-11" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-11" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#snapshoturls"><code>snapshotUrls</code></a></p><hr><h3 id="exampleurls" tabindex="-1">exampleUrls? <a class="header-anchor" href="#exampleurls" aria-label="Permalink to &quot;exampleUrls?&quot;">​</a></h3><blockquote><p><strong>exampleUrls</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>当前 规则/规则组 的规则在手机上的运行示例, 支持 jpg/png/webp/gif</p><p>如果规则是多个规则组合起来的, 可以更好看懂规则到底在干啥, 比如 点击关闭按钮-选择关闭原因-确认关闭 这种广告用 gif 看着更清楚在干啥</p><h4 id="inherited-from-12" tabindex="-1">Inherited from <a class="header-anchor" href="#inherited-from-12" aria-label="Permalink to &quot;Inherited from&quot;">​</a></h4><p><a href="./RawCommonProps.html"><code>RawCommonProps</code></a>.<a href="./RawCommonProps.html#exampleurls"><code>exampleUrls</code></a></p><hr><h3 id="key" tabindex="-1">key? <a class="header-anchor" href="#key" aria-label="Permalink to &quot;key?&quot;">​</a></h3><blockquote><p><strong>key</strong>?: <a href="./../type-aliases/Integer.html"><code>Integer</code></a></p></blockquote><p>当前规则在列表中的唯一标识</p><p>key 没有顺序大小之分, 可以是任意数字</p><p>设置后不可更改, 否则造成点击记录错乱</p><hr><h3 id="name" tabindex="-1">name? <a class="header-anchor" href="#name" aria-label="Permalink to &quot;name?&quot;">​</a></h3><blockquote><p><strong>name</strong>?: <code>string</code></p></blockquote><p>规则名称</p><hr><h3 id="prekeys" tabindex="-1">preKeys? <a class="header-anchor" href="#prekeys" aria-label="Permalink to &quot;preKeys?&quot;">​</a></h3><blockquote><p><strong>preKeys</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<a href="./../type-aliases/Integer.html"><code>Integer</code></a>&gt;</p></blockquote><p>要求当前列表里某个 key 刚刚执行</p><p>比如点击关闭按钮-选择关闭原因-确认关闭, key 分别是 1,2,3, preKeys 分别是 [],[1],[2]</p><p>那么 选择关闭原因 必须要求 比如点击关闭按钮 刚刚点击过才能执行, 确认关闭 也要求 选择关闭原因 刚刚点击过才执行</p><p>否则后面的规则不会触发, 也就是要求规则按顺序执行, 这是为了防止规则匹配范围太过广泛而误触</p><hr><h3 id="action" tabindex="-1">action? <a class="header-anchor" href="#action" aria-label="Permalink to &quot;action?&quot;">​</a></h3><blockquote><p><strong>action</strong>?: <code>&quot;click&quot;</code> | <code>&quot;clickNode&quot;</code> | <code>&quot;clickCenter&quot;</code> | <code>&quot;back&quot;</code> | <code>&quot;longClick&quot;</code> | <code>&quot;longClickNode&quot;</code> | <code>&quot;longClickCenter&quot;</code></p></blockquote><p>规则匹配后的操作行为</p><p>在 <a href="./RawRuleProps.html#position">position</a> 存在的情况下, action 的默认值为 <code>clickCenter</code></p><h4 id="example-2" tabindex="-1">Example <a class="header-anchor" href="#example-2" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`click`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 为默认值, 如果目标节点是 clickable 的, 则使用 `clickNode`, 反之使用 `clickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 并且当 `clickNode` 事件没有被应用接收时, 则使用 `clickCenter`</span></span></code></pre></div><h4 id="example-3" tabindex="-1">Example <a class="header-anchor" href="#example-3" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`clickNode`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 向系统发起一个点击无障碍节点事件. 即使节点在屏幕外部/或者被其它节点遮挡,也依然能够正确触发点击目标节点</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 但是如果目标节点不是 clickable 的, 目标应用通常不响应这个点击事件, 也就是点击无效果</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 在极少数情况下, 即使节点是 clickable 的,应用显示接收但是不响应节点点击事件, 此时需要手动设置 `clickCenter`</span></span></code></pre></div><h4 id="example-4" tabindex="-1">Example <a class="header-anchor" href="#example-4" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`clickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 计算出此控件的中心的坐标并且如果这个坐标在屏幕内部,那么就向系统发起一个点击屏幕坐标事件</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 如果这个坐标不在屏幕内部, 当作未匹配</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 另外如果目标节点的位置被其它节点遮挡覆盖, 则会点击触发最上层的节点(可能不是目标节点)</span></span></code></pre></div><h4 id="example-5" tabindex="-1">Example <a class="header-anchor" href="#example-5" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`back`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 向系统发起一个返回事件, 相当于按下返回键</span></span></code></pre></div><h4 id="example-6" tabindex="-1">Example <a class="header-anchor" href="#example-6" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`longClick`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 如果目标节点是 longClickable 的, 则使用 `longClickNode`, 反之使用 `longClickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 并且当 `longClickNode` 事件没有被应用接收时, 则使用 `longClickCenter`</span></span></code></pre></div><h4 id="example-7" tabindex="-1">Example <a class="header-anchor" href="#example-7" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`longClickNode`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 向系统发起一个长按无障碍节点事件,与 clickNode 类似</span></span></code></pre></div><h4 id="example-8" tabindex="-1">Example <a class="header-anchor" href="#example-8" aria-label="Permalink to &quot;Example&quot;">​</a></h4><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code"><code><span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">`longClickCenter`</span></span>\n<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 与 clickCenter 类似, 长按时间为 400 毫秒</span></span></code></pre></div><hr><h3 id="position" tabindex="-1">position? <a class="header-anchor" href="#position" aria-label="Permalink to &quot;position?&quot;">​</a></h3><blockquote><p><strong>position</strong>?: <a href="./../type-aliases/Position.html"><code>Position</code></a></p></blockquote><p>在使用 clickCenter/longClickCenter 时的自定义点击位置</p><p>默认坐标为节点中心</p><p>如果计算出的坐标不在屏幕内部, 当作未匹配</p><p>在 position 存在的情况下, <a href="./RawRuleProps.html#action">action</a> 的默认值为 <code>clickCenter</code></p><h4 id="version-2" tabindex="-1">Version <a class="header-anchor" href="#version-2" aria-label="Permalink to &quot;Version&quot;">​</a></h4><p>1.7.0</p><hr><h3 id="matches" tabindex="-1">matches? <a class="header-anchor" href="#matches" aria-label="Permalink to &quot;matches?&quot;">​</a></h3><blockquote><p><strong>matches</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>一个或者多个合法的 GKD 选择器, 如果每个选择器都能匹配上节点, 那么点击最后一个选择器的目标节点</p><hr><h3 id="excludematches" tabindex="-1">excludeMatches? <a class="header-anchor" href="#excludematches" aria-label="Permalink to &quot;excludeMatches?&quot;">​</a></h3><blockquote><p><strong>excludeMatches</strong>?: <a href="./../type-aliases/IArray.html"><code>IArray</code></a>&lt;<code>string</code>&gt;</p></blockquote><p>一个或者多个合法的 GKD 选择器, 如果存在一个选择器匹配上节点, 则停止匹配此规则</p>',177),r=[s];function l(n,h,c,d,p,m){return o(),a("div",null,r)}const b=e(i,[["render",l]]);export{k as __pageData,b as default};
@@ -1 +1 @@
1
- import{_ as e,c as a,o,V as t}from"./chunks/framework.CR5kvWbS.js";const k=JSON.parse('{"title":"RawRuleProps","description":"","frontmatter":{},"headers":[],"relativePath":"api/interfaces/RawRuleProps.md","filePath":"api/interfaces/RawRuleProps.md","lastUpdated":null}'),i={name:"api/interfaces/RawRuleProps.md"},s=t("",177),r=[s];function l(n,c,h,d,p,m){return o(),a("div",null,r)}const b=e(i,[["render",l]]);export{k as __pageData,b as default};
1
+ import{_ as e,c as a,o,V as t}from"./chunks/framework.CR5kvWbS.js";const k=JSON.parse('{"title":"RawRuleProps","description":"","frontmatter":{},"headers":[],"relativePath":"api/interfaces/RawRuleProps.md","filePath":"api/interfaces/RawRuleProps.md","lastUpdated":null}'),i={name:"api/interfaces/RawRuleProps.md"},s=t("",177),r=[s];function l(n,h,c,d,p,m){return o(),a("div",null,r)}const b=e(i,[["render",l]]);export{k as __pageData,b as default};
@@ -1,4 +1,4 @@
1
- import{j as o,a4 as p,a5 as u,a6 as c,a7 as l,a8 as f,a9 as d,aa as m,ab as h,ac as A,ad as g,Y as v,d as P,u as w,l as y,z as C,ae as R,af as _,ag as b,ah as E}from"./chunks/framework.CR5kvWbS.js";import{R as D}from"./chunks/theme.2RE320ly.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(D),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=w();return y(()=>{C(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&R(),_(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function j(){const e=O(),a=L();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function L(){return h(T)}function O(){let e=o,a;return A(t=>{let n=g(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=v(()=>import(((u)=>{if(u.startsWith('/')){return"https://registry.npmmirror.com/@gkd-kit/docs/0.0.1709887455831/files/.vitepress/dist"+u}return u})(n)),__vite__mapDeps([]))),o&&(e=!1),r},s.NotFound)}o&&j().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{j as createApp};
1
+ import{j as o,a4 as p,a5 as u,a6 as c,a7 as l,a8 as f,a9 as d,aa as m,ab as h,ac as A,ad as g,Y as v,d as P,u as w,l as y,z as C,ae as R,af as _,ag as b,ah as E}from"./chunks/framework.CR5kvWbS.js";import{R as D}from"./chunks/theme.2RE320ly.js";function i(e){if(e.extends){const a=i(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=i(D),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=w();return y(()=>{C(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&R(),_(),b(),s.setup&&s.setup(),()=>E(s.Layout)}});async function j(){const e=O(),a=L();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function L(){return h(T)}function O(){let e=o,a;return A(t=>{let n=g(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=v(()=>import(((u)=>{if(u.startsWith('/')){return"https://registry.npmmirror.com/@gkd-kit/docs/0.0.1709887931245/files/.vitepress/dist"+u}return u})(n)),__vite__mapDeps([]))),o&&(e=!1),r},s.NotFound)}o&&j().then(({app:e,router:a,data:t})=>{a.go().then(()=>{p(a.route,t.site),e.mount("#app")})});export{j as createApp};
2
2
  function __vite__mapDeps(indexes) {
3
3
  if (!__vite__mapDeps.viteFileDeps) {
4
4
  __vite__mapDeps.viteFileDeps = []
@@ -1,10 +1,10 @@
1
- var kt=Object.defineProperty;var It=(o,e,t)=>e in o?kt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var Oe=(o,e,t)=>(It(o,typeof e!="symbol"?e+"":e,t),t);import{Y as mt,h as oe,y as $e,ai as Dt,aj as Ot,d as _t,H as xe,ak as tt,k as Fe,al as Rt,am as Mt,z as Lt,an as zt,l as _e,S as de,Q as Ee,ao as Pt,ap as Bt,Z as Vt,j as $t,aq as Wt,o as ee,b as jt,m as E,a2 as Kt,p as U,ar as Jt,as as Ut,at as Ht,c as re,n as rt,e as Se,G as at,F as nt,a as ve,t as pe,au as Gt,q as qt,s as Qt,av as it,aw as Yt,a7 as Zt,ad as Xt,ax as er,_ as tr}from"./framework.CR5kvWbS.js";import{u as rr,c as ar}from"./theme.2RE320ly.js";const nr={root:()=>mt(()=>import(((u)=>{if(u.startsWith('/')){return"https://registry.npmmirror.com/@gkd-kit/docs/0.0.1709887455831/files/.vitepress/dist"+u}return u})("./@localSearchIndexroot.Rjxgd9P0.js")),__vite__mapDeps([]))};/*!
1
+ var kt=Object.defineProperty;var It=(o,e,t)=>e in o?kt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var Oe=(o,e,t)=>(It(o,typeof e!="symbol"?e+"":e,t),t);import{Y as mt,h as oe,y as $e,ai as Dt,aj as Ot,d as _t,H as xe,ak as tt,k as Fe,al as Rt,am as Mt,z as Lt,an as zt,l as _e,S as de,Q as Ee,ao as Pt,ap as Bt,Z as Vt,j as $t,aq as Wt,o as ee,b as jt,m as E,a2 as Kt,p as U,ar as Jt,as as Ut,at as Ht,c as re,n as rt,e as Se,G as at,F as nt,a as ve,t as pe,au as Gt,q as qt,s as Qt,av as it,aw as Yt,a7 as Zt,ad as Xt,ax as er,_ as tr}from"./framework.CR5kvWbS.js";import{u as rr,c as ar}from"./theme.2RE320ly.js";const nr={root:()=>mt(()=>import(((u)=>{if(u.startsWith('/')){return"https://registry.npmmirror.com/@gkd-kit/docs/0.0.1709887931245/files/.vitepress/dist"+u}return u})("./@localSearchIndexroot.Rjxgd9P0.js")),__vite__mapDeps([]))};/*!
2
2
  * tabbable 6.2.0
3
3
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
4
4
  */var yt=["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])"],Te=yt.join(","),gt=typeof Element>"u",ue=gt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ne=!gt&&Element.prototype.getRootNode?function(o){var e;return o==null||(e=o.getRootNode)===null||e===void 0?void 0:e.call(o)}:function(o){return o==null?void 0:o.ownerDocument},ke=function o(e,t){var r;t===void 0&&(t=!0);var n=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),a=n===""||n==="true",i=a||t&&e&&o(e.parentNode);return i},ir=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},bt=function(e,t,r){if(ke(e))return[];var n=Array.prototype.slice.apply(e.querySelectorAll(Te));return t&&ue.call(e,Te)&&n.unshift(e),n=n.filter(r),n},wt=function o(e,t,r){for(var n=[],a=Array.from(e);a.length;){var i=a.shift();if(!ke(i,!1))if(i.tagName==="SLOT"){var s=i.assignedElements(),u=s.length?s:i.children,l=o(u,!0,r);r.flatten?n.push.apply(n,l):n.push({scopeParent:i,candidates:l})}else{var h=ue.call(i,Te);h&&r.filter(i)&&(t||!e.includes(i))&&n.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),v=!ke(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&v){var m=o(d===!0?i.children:d.children,!0,r);r.flatten?n.push.apply(n,m):n.push({scopeParent:i,candidates:m})}else a.unshift.apply(a,i.children)}}return n},xt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},se=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ir(e))&&!xt(e)?0:e.tabIndex},or=function(e,t){var r=se(e);return r<0&&t&&!xt(e)?0:r},sr=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ft=function(e){return e.tagName==="INPUT"},ur=function(e){return Ft(e)&&e.type==="hidden"},lr=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},cr=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},fr=function(e){if(!e.name)return!0;var t=e.form||Ne(e),r=function(s){return t.querySelectorAll('input[type="radio"][name="'+s+'"]')},n;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")n=r(window.CSS.escape(e.name));else try{n=r(e.name)}catch(i){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",i.message),!1}var a=cr(n,e.form);return!a||a===e},hr=function(e){return Ft(e)&&e.type==="radio"},dr=function(e){return hr(e)&&!fr(e)},vr=function(e){var t,r=e&&Ne(e),n=(t=r)===null||t===void 0?void 0:t.host,a=!1;if(r&&r!==e){var i,s,u;for(a=!!((i=n)!==null&&i!==void 0&&(s=i.ownerDocument)!==null&&s!==void 0&&s.contains(n)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!a&&n;){var l,h,d;r=Ne(n),n=(l=r)===null||l===void 0?void 0:l.host,a=!!((h=n)!==null&&h!==void 0&&(d=h.ownerDocument)!==null&&d!==void 0&&d.contains(n))}}return a},ot=function(e){var t=e.getBoundingClientRect(),r=t.width,n=t.height;return r===0&&n===0},pr=function(e,t){var r=t.displayCheck,n=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var a=ue.call(e,"details>summary:first-of-type"),i=a?e.parentElement:e;if(ue.call(i,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof n=="function"){for(var s=e;e;){var u=e.parentElement,l=Ne(e);if(u&&!u.shadowRoot&&n(u)===!0)return ot(e);e.assignedSlot?e=e.assignedSlot:!u&&l!==e.ownerDocument?e=l.host:e=u}e=s}if(vr(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ot(e);return!1},mr=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var n=t.children.item(r);if(n.tagName==="LEGEND")return ue.call(t,"fieldset[disabled] *")?!0:!n.contains(e)}return!0}t=t.parentElement}return!1},Ie=function(e,t){return!(t.disabled||ke(t)||ur(t)||pr(t,e)||lr(t)||mr(t))},We=function(e,t){return!(dr(t)||se(t)<0||!Ie(e,t))},yr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},gr=function o(e){var t=[],r=[];return e.forEach(function(n,a){var i=!!n.scopeParent,s=i?n.scopeParent:n,u=or(s,i),l=i?o(n.candidates):s;u===0?i?t.push.apply(t,l):t.push(s):r.push({documentOrder:a,tabIndex:u,item:n,isScope:i,content:l})}),r.sort(sr).reduce(function(n,a){return a.isScope?n.push.apply(n,a.content):n.push(a.content),n},[]).concat(t)},br=function(e,t){t=t||{};var r;return t.getShadowRoot?r=wt([e],t.includeContainer,{filter:We.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:yr}):r=bt(e,t.includeContainer,We.bind(null,t)),gr(r)},wr=function(e,t){t=t||{};var r;return t.getShadowRoot?r=wt([e],t.includeContainer,{filter:Ie.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=bt(e,t.includeContainer,Ie.bind(null,t)),r},le=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ue.call(e,Te)===!1?!1:We(t,e)},xr=yt.concat("iframe").join(","),Re=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return ue.call(e,xr)===!1?!1:Ie(t,e)};/*!
5
5
  * focus-trap 7.5.4
6
6
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
7
- */function st(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function ut(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?st(Object(t),!0).forEach(function(r){Fr(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):st(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Fr(o,e,t){return e=Sr(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Er(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function Sr(o){var e=Er(o,"string");return typeof e=="symbol"?e:String(e)}var lt={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r.pause()}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},Ar=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Cr=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ge=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Tr=function(e){return ge(e)&&!e.shiftKey},Nr=function(e){return ge(e)&&e.shiftKey},ct=function(e){return setTimeout(e,0)},ft=function(e,t){var r=-1;return e.every(function(n,a){return t(n)?(r=a,!1):!0}),r},me=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return typeof e=="function"?e.apply(void 0,r):e},Ae=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},kr=[],Ir=function(e,t){var r=(t==null?void 0:t.document)||document,n=(t==null?void 0:t.trapStack)||kr,a=ut({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Tr,isKeyBackward:Nr},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,u=function(c,f,p){return c&&c[f]!==void 0?c[f]:a[p||f]},l=function(c,f){var p=typeof(f==null?void 0:f.composedPath)=="function"?f.composedPath():void 0;return i.containerGroups.findIndex(function(k){var I=k.container,M=k.tabbableNodes;return I.contains(c)||(p==null?void 0:p.includes(I))||M.find(function(z){return z===c})})},h=function(c){var f=a[c];if(typeof f=="function"){for(var p=arguments.length,k=new Array(p>1?p-1:0),I=1;I<p;I++)k[I-1]=arguments[I];f=f.apply(void 0,k)}if(f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(c,"` was specified but was not a node, or did not return a node"))}var M=f;if(typeof f=="string"&&(M=r.querySelector(f),!M))throw new Error("`".concat(c,"` as selector refers to no known node"));return M},d=function(){var c=h("initialFocus");if(c===!1)return!1;if(c===void 0||!Re(c,a.tabbableOptions))if(l(r.activeElement)>=0)c=r.activeElement;else{var f=i.tabbableGroups[0],p=f&&f.firstTabbableNode;c=p||h("fallbackFocus")}if(!c)throw new Error("Your focus-trap needs to have at least one focusable element");return c},v=function(){if(i.containerGroups=i.containers.map(function(c){var f=br(c,a.tabbableOptions),p=wr(c,a.tabbableOptions),k=f.length>0?f[0]:void 0,I=f.length>0?f[f.length-1]:void 0,M=p.find(function(y){return le(y)}),z=p.slice().reverse().find(function(y){return le(y)}),P=!!f.find(function(y){return se(y)>0});return{container:c,tabbableNodes:f,focusableNodes:p,posTabIndexesFound:P,firstTabbableNode:k,lastTabbableNode:I,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,j=f.indexOf(x);return j<0?$?p.slice(p.indexOf(x)+1).find(function(G){return le(G)}):p.slice(0,p.indexOf(x)).reverse().find(function(G){return le(G)}):f[j+($?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(c){return c.tabbableNodes.length>0}),i.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(i.containerGroups.find(function(c){return c.posTabIndexesFound})&&i.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.")},m=function w(c){var f=c.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?w(f.shadowRoot):f},b=function w(c){if(c!==!1&&c!==m(document)){if(!c||!c.focus){w(d());return}c.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=c,Ar(c)&&c.select()}},S=function(c){var f=h("setReturnFocus",c);return f||(f===!1?!1:c)},g=function(c){var f=c.target,p=c.event,k=c.isBackward,I=k===void 0?!1:k;f=f||Ae(p),v();var M=null;if(i.tabbableGroups.length>0){var z=l(f,p),P=z>=0?i.containerGroups[z]:void 0;if(z<0)I?M=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:M=i.tabbableGroups[0].firstTabbableNode;else if(I){var y=ft(i.tabbableGroups,function(B){var J=B.firstTabbableNode;return f===J});if(y<0&&(P.container===f||Re(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f,!1))&&(y=z),y>=0){var x=y===0?i.tabbableGroups.length-1:y-1,$=i.tabbableGroups[x];M=se(f)>=0?$.lastTabbableNode:$.lastDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f,!1))}else{var j=ft(i.tabbableGroups,function(B){var J=B.lastTabbableNode;return f===J});if(j<0&&(P.container===f||Re(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f))&&(j=z),j>=0){var G=j===i.tabbableGroups.length-1?0:j+1,q=i.tabbableGroups[G];M=se(f)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f))}}else M=h("fallbackFocus");return M},A=function(c){var f=Ae(c);if(!(l(f,c)>=0)){if(me(a.clickOutsideDeactivates,c)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}me(a.allowOutsideClick,c)||c.preventDefault()}},T=function(c){var f=Ae(c),p=l(f,c)>=0;if(p||f instanceof Document)p&&(i.mostRecentlyFocusedNode=f);else{c.stopImmediatePropagation();var k,I=!0;if(i.mostRecentlyFocusedNode)if(se(i.mostRecentlyFocusedNode)>0){var M=l(i.mostRecentlyFocusedNode),z=i.containerGroups[M].tabbableNodes;if(z.length>0){var P=z.findIndex(function(y){return y===i.mostRecentlyFocusedNode});P>=0&&(a.isKeyForward(i.recentNavEvent)?P+1<z.length&&(k=z[P+1],I=!1):P-1>=0&&(k=z[P-1],I=!1))}}else i.containerGroups.some(function(y){return y.tabbableNodes.some(function(x){return se(x)>0})})||(I=!1);else I=!1;I&&(k=g({target:i.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(i.recentNavEvent)})),b(k||i.mostRecentlyFocusedNode||d())}i.recentNavEvent=void 0},F=function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=c;var p=g({event:c,isBackward:f});p&&(ge(c)&&c.preventDefault(),b(p))},L=function(c){if(Cr(c)&&me(a.escapeDeactivates,c)!==!1){c.preventDefault(),s.deactivate();return}(a.isKeyForward(c)||a.isKeyBackward(c))&&F(c,a.isKeyBackward(c))},R=function(c){var f=Ae(c);l(f,c)>=0||me(a.clickOutsideDeactivates,c)||me(a.allowOutsideClick,c)||(c.preventDefault(),c.stopImmediatePropagation())},V=function(){if(i.active)return lt.activateTrap(n,s),i.delayInitialFocusTimer=a.delayInitialFocus?ct(function(){b(d())}):b(d()),r.addEventListener("focusin",T,!0),r.addEventListener("mousedown",A,{capture:!0,passive:!1}),r.addEventListener("touchstart",A,{capture:!0,passive:!1}),r.addEventListener("click",R,{capture:!0,passive:!1}),r.addEventListener("keydown",L,{capture:!0,passive:!1}),s},N=function(){if(i.active)return r.removeEventListener("focusin",T,!0),r.removeEventListener("mousedown",A,!0),r.removeEventListener("touchstart",A,!0),r.removeEventListener("click",R,!0),r.removeEventListener("keydown",L,!0),s},_=function(c){var f=c.some(function(p){var k=Array.from(p.removedNodes);return k.some(function(I){return I===i.mostRecentlyFocusedNode})});f&&b(d())},C=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(_):void 0,O=function(){C&&(C.disconnect(),i.active&&!i.paused&&i.containers.map(function(c){C.observe(c,{subtree:!0,childList:!0})}))};return s={get active(){return i.active},get paused(){return i.paused},activate:function(c){if(i.active)return this;var f=u(c,"onActivate"),p=u(c,"onPostActivate"),k=u(c,"checkCanFocusTrap");k||v(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,f==null||f();var I=function(){k&&v(),V(),O(),p==null||p()};return k?(k(i.containers.concat()).then(I,I),this):(I(),this)},deactivate:function(c){if(!i.active)return this;var f=ut({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},c);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,N(),i.active=!1,i.paused=!1,O(),lt.deactivateTrap(n,s);var p=u(f,"onDeactivate"),k=u(f,"onPostDeactivate"),I=u(f,"checkCanReturnFocus"),M=u(f,"returnFocus","returnFocusOnDeactivate");p==null||p();var z=function(){ct(function(){M&&b(S(i.nodeFocusedBeforeActivation)),k==null||k()})};return M&&I?(I(S(i.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(c){if(i.paused||!i.active)return this;var f=u(c,"onPause"),p=u(c,"onPostPause");return i.paused=!0,f==null||f(),N(),O(),p==null||p(),this},unpause:function(c){if(!i.paused||!i.active)return this;var f=u(c,"onUnpause"),p=u(c,"onPostUnpause");return i.paused=!1,f==null||f(),v(),V(),O(),p==null||p(),this},updateContainerElements:function(c){var f=[].concat(c).filter(Boolean);return i.containers=f.map(function(p){return typeof p=="string"?r.querySelector(p):p}),i.active&&v(),O(),this}},s.updateContainerElements(e),s};function Dr(o,e={}){let t;const{immediate:r,...n}=e,a=oe(!1),i=oe(!1),s=d=>t&&t.activate(d),u=d=>t&&t.deactivate(d),l=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)};return $e(()=>Dt(o),d=>{d&&(t=Ir(d,{...n,onActivate(){a.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){a.value=!1,e.onDeactivate&&e.onDeactivate()}}),r&&s())},{flush:"post"}),Ot(()=>u()),{hasFocus:a,isPaused:i,activate:s,deactivate:u,pause:l,unpause:h}}class fe{constructor(e,t=!0,r=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=r,this.iframesTimeout=n}static matches(e,t){const r=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let a=!1;return r.every(i=>n.call(e,i)?(a=!0,!1):!0),a}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(r=>{const n=t.filter(a=>a.contains(r)).length>0;t.indexOf(r)===-1&&!n&&t.push(r)}),t}getIframeContents(e,t,r=()=>{}){let n;try{const a=e.contentWindow;if(n=a.document,!a||!n)throw new Error("iframe inaccessible")}catch{r()}n&&t(n)}isIframeBlank(e){const t="about:blank",r=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&r!==t&&r}observeIframeLoad(e,t,r){let n=!1,a=null;const i=()=>{if(!n){n=!0,clearTimeout(a);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,r))}catch{r()}}};e.addEventListener("load",i),a=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,r){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,r):this.getIframeContents(e,t,r):this.observeIframeLoad(e,t,r)}catch{r()}}waitForIframes(e,t){let r=0;this.forEachIframe(e,()=>!0,n=>{r++,this.waitForIframes(n.querySelector("html"),()=>{--r||t()})},n=>{n||t()})}forEachIframe(e,t,r,n=()=>{}){let a=e.querySelectorAll("iframe"),i=a.length,s=0;a=Array.prototype.slice.call(a);const u=()=>{--i<=0&&n(s)};i||u(),a.forEach(l=>{fe.matches(l,this.exclude)?u():this.onIframeReady(l,h=>{t(l)&&(s++,r(h)),u()},u)})}createIterator(e,t,r){return document.createNodeIterator(e,t,r,!1)}createInstanceOnIframe(e){return new fe(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,r){const n=e.compareDocumentPosition(r),a=Node.DOCUMENT_POSITION_PRECEDING;if(n&a)if(t!==null){const i=t.compareDocumentPosition(r),s=Node.DOCUMENT_POSITION_FOLLOWING;if(i&s)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let r;return t===null?r=e.nextNode():r=e.nextNode()&&e.nextNode(),{prevNode:t,node:r}}checkIframeFilter(e,t,r,n){let a=!1,i=!1;return n.forEach((s,u)=>{s.val===r&&(a=u,i=s.handled)}),this.compareNodeIframe(e,t,r)?(a===!1&&!i?n.push({val:r,handled:!0}):a!==!1&&!i&&(n[a].handled=!0),!0):(a===!1&&n.push({val:r,handled:!1}),!1)}handleOpenIframes(e,t,r,n){e.forEach(a=>{a.handled||this.getIframeContents(a.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,r,n)})})}iterateThroughNodes(e,t,r,n,a){const i=this.createIterator(t,e,n);let s=[],u=[],l,h,d=()=>({prevNode:h,node:l}=this.getIteratorNode(i),l);for(;d();)this.iframes&&this.forEachIframe(t,v=>this.checkIframeFilter(l,h,v,s),v=>{this.createInstanceOnIframe(v).forEachNode(e,m=>u.push(m),n)}),u.push(l);u.forEach(v=>{r(v)}),this.iframes&&this.handleOpenIframes(s,e,r,n),a()}forEachNode(e,t,r,n=()=>{}){const a=this.getContexts();let i=a.length;i||n(),a.forEach(s=>{const u=()=>{this.iterateThroughNodes(e,s,t,r,()=>{--i<=0&&n()})};this.iframes?this.waitForIframes(s,u):u()})}}let Or=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 fe(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const r=this.opt.log;this.opt.debug&&typeof r=="object"&&typeof r[t]=="function"&&r[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,r=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let a in t)if(t.hasOwnProperty(a)){const i=t[a],s=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(a):this.escapeStr(a),u=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);s!==""&&u!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(s)}|${this.escapeStr(u)})`,`gm${r}`),n+`(${this.processSynomyms(s)}|${this.processSynomyms(u)})`+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,r,n)=>{let a=n.charAt(r+1);return/[(|)\\]/.test(a)||a===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const r=this.opt.ignorePunctuation;return Array.isArray(r)&&r.length&&t.push(this.escapeStr(r.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",r=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(a=>{r.every(i=>{if(i.indexOf(a)!==-1){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let r=this.opt.accuracy,n=typeof r=="string"?r:r.value,a=typeof r=="string"?[]:r.limiters,i="";switch(a.forEach(s=>{i+=`|${this.escapeStr(s)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(r=>{this.opt.separateWordSearch?r.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):r.trim()&&t.indexOf(r)===-1&&t.push(r)}),{keywords:t.sort((r,n)=>n.length-r.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 r=0;return e.sort((n,a)=>n.start-a.start).forEach(n=>{let{start:a,end:i,valid:s}=this.callNoMatchOnInvalidRanges(n,r);s&&(n.start=a,n.length=i-a,t.push(n),r=i)}),t}callNoMatchOnInvalidRanges(e,t){let r,n,a=!1;return e&&typeof e.start<"u"?(r=parseInt(e.start,10),n=r+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-r>0?a=!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:r,end:n,valid:a}}checkWhitespaceRanges(e,t,r){let n,a=!0,i=r.length,s=t-i,u=parseInt(e.start,10)-s;return u=u>i?i:u,n=u+parseInt(e.length,10),n>i&&(n=i,this.log(`End range automatically set to the max value of ${i}`)),u<0||n-u<0||u>i||n>i?(a=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):r.substring(u,n).replace(/\s+/g,"")===""&&(a=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:u,end:n,valid:a}}getTextNodes(e){let t="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{r.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:r})})}matchesExclude(e){return fe.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,r){const n=this.opt.element?this.opt.element:"mark",a=e.splitText(t),i=a.splitText(r-t);let s=document.createElement(n);return s.setAttribute("data-markjs","true"),this.opt.className&&s.setAttribute("class",this.opt.className),s.textContent=a.textContent,a.parentNode.replaceChild(s,a),i}wrapRangeInMappedTextNode(e,t,r,n,a){e.nodes.every((i,s)=>{const u=e.nodes[s+1];if(typeof u>"u"||u.start>t){if(!n(i.node))return!1;const l=t-i.start,h=(r>i.end?i.end:r)-i.start,d=e.value.substr(0,i.start),v=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,l,h),e.value=d+v,e.nodes.forEach((m,b)=>{b>=s&&(e.nodes[b].start>0&&b!==s&&(e.nodes[b].start-=h),e.nodes[b].end-=h)}),r-=h,a(i.node.previousSibling,i.start),r>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,r,n,a){const i=t===0?0:t+1;this.getTextNodes(s=>{s.nodes.forEach(u=>{u=u.node;let l;for(;(l=e.exec(u.textContent))!==null&&l[i]!=="";){if(!r(l[i],u))continue;let h=l.index;if(i!==0)for(let d=1;d<i;d++)h+=l[d].length;u=this.wrapRangeInTextNode(u,h,h+l[i].length),n(u.previousSibling),e.lastIndex=0}}),a()})}wrapMatchesAcrossElements(e,t,r,n,a){const i=t===0?0:t+1;this.getTextNodes(s=>{let u;for(;(u=e.exec(s.value))!==null&&u[i]!=="";){let l=u.index;if(i!==0)for(let d=1;d<i;d++)l+=u[d].length;const h=l+u[i].length;this.wrapRangeInMappedTextNode(s,l,h,d=>r(u[i],d),(d,v)=>{e.lastIndex=v,n(d)})}a()})}wrapRangeFromIndex(e,t,r,n){this.getTextNodes(a=>{const i=a.value.length;e.forEach((s,u)=>{let{start:l,end:h,valid:d}=this.checkWhitespaceRanges(s,i,a.value);d&&this.wrapRangeInMappedTextNode(a,l,h,v=>t(v,s,a.value.substring(l,h),u),v=>{r(v,s)})}),n()})}unwrapMatches(e){const t=e.parentNode;let r=document.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.removeChild(e.firstChild));t.replaceChild(r,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 r=0,n="wrapMatches";const a=i=>{r++,this.opt.each(i)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(i,s)=>this.opt.filter(s,i,r),a,()=>{r===0&&this.opt.noMatch(e),this.opt.done(r)})}mark(e,t){this.opt=t;let r=0,n="wrapMatches";const{keywords:a,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),s=this.opt.caseSensitive?"":"i",u=l=>{let h=new RegExp(this.createRegExp(l),`gm${s}`),d=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(v,m)=>this.opt.filter(m,l,r,d),v=>{d++,r++,this.opt.each(v)},()=>{d===0&&this.opt.noMatch(l),a[i-1]===l?this.opt.done(r):u(a[a.indexOf(l)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),i===0?this.opt.done(r):u(a[0])}markRanges(e,t){this.opt=t;let r=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(a,i,s,u)=>this.opt.filter(a,i,s,u),(a,i)=>{r++,this.opt.each(a,i)},()=>{this.opt.done(r)})):this.opt.done(r)}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,r=>{this.unwrapMatches(r)},r=>{const n=fe.matches(r,t),a=this.matchesExclude(r);return!n||a?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function _r(o){const e=new Or(o);return this.mark=(t,r)=>(e.mark(t,r),this),this.markRegExp=(t,r)=>(e.markRegExp(t,r),this),this.markRanges=(t,r)=>(e.markRanges(t,r),this),this.unmark=t=>(e.unmark(t),this),this}var W=function(){return W=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},W.apply(this,arguments)};function Rr(o,e,t,r){function n(a){return a instanceof t?a:new t(function(i){i(a)})}return new(t||(t=Promise))(function(a,i){function s(h){try{l(r.next(h))}catch(d){i(d)}}function u(h){try{l(r.throw(h))}catch(d){i(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,u)}l((r=r.apply(o,e||[])).next())})}function Mr(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(l){return function(h){return u([l,h])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(t=0)),t;)try{if(r=1,n&&(a=l[0]&2?n.return:l[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,l[1])).done)return a;switch(n=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,n=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){t.label=l[1];break}if(l[0]===6&&t.label<a[1]){t.label=a[1],a=l;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(l);break}a[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(o,t)}catch(h){l=[6,h],n=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function D(o){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&o[e],r=0;if(t)return t.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&r>=o.length&&(o=void 0),{value:o&&o[r++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function K(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),n,a=[],i;try{for(;(e===void 0||e-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(i)throw i.error}}return a}var Lr="ENTRIES",Et="KEYS",St="VALUES",H="",Me=function(){function o(e,t){var r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}return o.prototype.next=function(){var e=this.dive();return this.backtrack(),e},o.prototype.dive=function(){if(this._path.length===0)return{done:!0,value:void 0};var e=ce(this._path),t=e.node,r=e.keys;if(ce(r)===H)return{done:!1,value:this.result()};var n=t.get(ce(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},o.prototype.backtrack=function(){if(this._path.length!==0){var e=ce(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},o.prototype.key=function(){return this.set._prefix+this._path.map(function(e){var t=e.keys;return ce(t)}).filter(function(e){return e!==H}).join("")},o.prototype.value=function(){return ce(this._path).node.get(H)},o.prototype.result=function(){switch(this._type){case St:return this.value();case Et:return this.key();default:return[this.key(),this.value()]}},o.prototype[Symbol.iterator]=function(){return this},o}(),ce=function(o){return o[o.length-1]},zr=function(o,e,t){var r=new Map;if(e===void 0)return r;for(var n=e.length+1,a=n+t,i=new Uint8Array(a*n).fill(t+1),s=0;s<n;++s)i[s]=s;for(var u=1;u<a;++u)i[u*n]=u;return At(o,e,t,r,i,1,n,""),r},At=function(o,e,t,r,n,a,i,s){var u,l,h=a*i;try{e:for(var d=D(o.keys()),v=d.next();!v.done;v=d.next()){var m=v.value;if(m===H){var b=n[h-1];b<=t&&r.set(s,[o.get(m),b])}else{for(var S=a,g=0;g<m.length;++g,++S){for(var A=m[g],T=i*S,F=T-i,L=n[T],R=Math.max(0,S-t-1),V=Math.min(i-1,S+t),N=R;N<V;++N){var _=A!==e[N],C=n[F+N]+ +_,O=n[F+N+1]+1,w=n[T+N]+1,c=n[T+N+1]=Math.min(C,O,w);c<L&&(L=c)}if(L>t)continue e}At(o.get(m),e,t,r,n,S,i,s+m)}}}catch(f){u={error:f}}finally{try{v&&!v.done&&(l=d.return)&&l.call(d)}finally{if(u)throw u.error}}},Le=function(){function o(e,t){e===void 0&&(e=new Map),t===void 0&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return o.prototype.atPrefix=function(e){var t,r;if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");var n=K(De(this._tree,e.slice(this._prefix.length)),2),a=n[0],i=n[1];if(a===void 0){var s=K(Ue(i),2),u=s[0],l=s[1];try{for(var h=D(u.keys()),d=h.next();!d.done;d=h.next()){var v=d.value;if(v!==H&&v.startsWith(l)){var m=new Map;return m.set(v.slice(l.length),u.get(v)),new o(m,e)}}}catch(b){t={error:b}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(t)throw t.error}}}return new o(a,e)},o.prototype.clear=function(){this._size=void 0,this._tree.clear()},o.prototype.delete=function(e){return this._size=void 0,Pr(this._tree,e)},o.prototype.entries=function(){return new Me(this,Lr)},o.prototype.forEach=function(e){var t,r;try{for(var n=D(this),a=n.next();!a.done;a=n.next()){var i=K(a.value,2),s=i[0],u=i[1];e(s,u,this)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},o.prototype.fuzzyGet=function(e,t){return zr(this._tree,e,t)},o.prototype.get=function(e){var t=je(this._tree,e);return t!==void 0?t.get(H):void 0},o.prototype.has=function(e){var t=je(this._tree,e);return t!==void 0&&t.has(H)},o.prototype.keys=function(){return new Me(this,Et)},o.prototype.set=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=ze(this._tree,e);return r.set(H,t),this},Object.defineProperty(o.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),o.prototype.update=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=ze(this._tree,e);return r.set(H,t(r.get(H))),this},o.prototype.fetch=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=ze(this._tree,e),n=r.get(H);return n===void 0&&r.set(H,n=t()),n},o.prototype.values=function(){return new Me(this,St)},o.prototype[Symbol.iterator]=function(){return this.entries()},o.from=function(e){var t,r,n=new o;try{for(var a=D(e),i=a.next();!i.done;i=a.next()){var s=K(i.value,2),u=s[0],l=s[1];n.set(u,l)}}catch(h){t={error:h}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return n},o.fromObject=function(e){return o.from(Object.entries(e))},o}(),De=function(o,e,t){var r,n;if(t===void 0&&(t=[]),e.length===0||o==null)return[o,t];try{for(var a=D(o.keys()),i=a.next();!i.done;i=a.next()){var s=i.value;if(s!==H&&e.startsWith(s))return t.push([o,s]),De(o.get(s),e.slice(s.length),t)}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return t.push([o,e]),De(void 0,"",t)},je=function(o,e){var t,r;if(e.length===0||o==null)return o;try{for(var n=D(o.keys()),a=n.next();!a.done;a=n.next()){var i=a.value;if(i!==H&&e.startsWith(i))return je(o.get(i),e.slice(i.length))}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},ze=function(o,e){var t,r,n=e.length;e:for(var a=0;o&&a<n;){try{for(var i=(t=void 0,D(o.keys())),s=i.next();!s.done;s=i.next()){var u=s.value;if(u!==H&&e[a]===u[0]){for(var l=Math.min(n-a,u.length),h=1;h<l&&e[a+h]===u[h];)++h;var d=o.get(u);if(h===u.length)o=d;else{var v=new Map;v.set(u.slice(h),d),o.set(e.slice(a,a+h),v),o.delete(u),o=v}a+=h;continue e}}}catch(b){t={error:b}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}var m=new Map;return o.set(e.slice(a),m),m}return o},Pr=function(o,e){var t=K(De(o,e),2),r=t[0],n=t[1];if(r!==void 0){if(r.delete(H),r.size===0)Ct(n);else if(r.size===1){var a=K(r.entries().next().value,2),i=a[0],s=a[1];Tt(n,i,s)}}},Ct=function(o){if(o.length!==0){var e=K(Ue(o),2),t=e[0],r=e[1];if(t.delete(r),t.size===0)Ct(o.slice(0,-1));else if(t.size===1){var n=K(t.entries().next().value,2),a=n[0],i=n[1];a!==H&&Tt(o.slice(0,-1),a,i)}}},Tt=function(o,e,t){if(o.length!==0){var r=K(Ue(o),2),n=r[0],a=r[1];n.set(a+e,t),n.delete(a)}},Ue=function(o){return o[o.length-1]},ye,He="or",Nt="and",Br="and_not",Vr=function(){function o(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');var t=e.autoVacuum==null||e.autoVacuum===!0?Ve:e.autoVacuum;this._options=W(W(W({},Be),e),{autoVacuum:t,searchOptions:W(W({},ht),e.searchOptions||{}),autoSuggestOptions:W(W({},Jr),e.autoSuggestOptions||{})}),this._index=new Le,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=Je,this.addFields(this._options.fields)}return o.prototype.add=function(e){var t,r,n,a,i,s,u=this._options,l=u.extractField,h=u.tokenize,d=u.processTerm,v=u.fields,m=u.idField,b=l(e,m);if(b==null)throw new Error('MiniSearch: document does not have ID field "'.concat(m,'"'));if(this._idToShortId.has(b))throw new Error("MiniSearch: duplicate ID ".concat(b));var S=this.addDocumentId(b);this.saveStoredFields(S,e);try{for(var g=D(v),A=g.next();!A.done;A=g.next()){var T=A.value,F=l(e,T);if(F!=null){var L=h(F.toString(),T),R=this._fieldIds[T],V=new Set(L).size;this.addFieldLength(S,R,this._documentCount-1,V);try{for(var N=(n=void 0,D(L)),_=N.next();!_.done;_=N.next()){var C=_.value,O=d(C,T);if(Array.isArray(O))try{for(var w=(i=void 0,D(O)),c=w.next();!c.done;c=w.next()){var f=c.value;this.addTerm(R,S,f)}}catch(p){i={error:p}}finally{try{c&&!c.done&&(s=w.return)&&s.call(w)}finally{if(i)throw i.error}}else O&&this.addTerm(R,S,O)}}catch(p){n={error:p}}finally{try{_&&!_.done&&(a=N.return)&&a.call(N)}finally{if(n)throw n.error}}}}}catch(p){t={error:p}}finally{try{A&&!A.done&&(r=g.return)&&r.call(g)}finally{if(t)throw t.error}}},o.prototype.addAll=function(e){var t,r;try{for(var n=D(e),a=n.next();!a.done;a=n.next()){var i=a.value;this.add(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},o.prototype.addAllAsync=function(e,t){var r=this;t===void 0&&(t={});var n=t.chunkSize,a=n===void 0?10:n,i={chunk:[],promise:Promise.resolve()},s=e.reduce(function(h,d,v){var m=h.chunk,b=h.promise;return m.push(d),(v+1)%a===0?{chunk:[],promise:b.then(function(){return new Promise(function(S){return setTimeout(S,0)})}).then(function(){return r.addAll(m)})}:{chunk:m,promise:b}},i),u=s.chunk,l=s.promise;return l.then(function(){return r.addAll(u)})},o.prototype.remove=function(e){var t,r,n,a,i,s,u=this._options,l=u.tokenize,h=u.processTerm,d=u.extractField,v=u.fields,m=u.idField,b=d(e,m);if(b==null)throw new Error('MiniSearch: document does not have ID field "'.concat(m,'"'));var S=this._idToShortId.get(b);if(S==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(b,": it is not in the index"));try{for(var g=D(v),A=g.next();!A.done;A=g.next()){var T=A.value,F=d(e,T);if(F!=null){var L=l(F.toString(),T),R=this._fieldIds[T],V=new Set(L).size;this.removeFieldLength(S,R,this._documentCount,V);try{for(var N=(n=void 0,D(L)),_=N.next();!_.done;_=N.next()){var C=_.value,O=h(C,T);if(Array.isArray(O))try{for(var w=(i=void 0,D(O)),c=w.next();!c.done;c=w.next()){var f=c.value;this.removeTerm(R,S,f)}}catch(p){i={error:p}}finally{try{c&&!c.done&&(s=w.return)&&s.call(w)}finally{if(i)throw i.error}}else O&&this.removeTerm(R,S,O)}}catch(p){n={error:p}}finally{try{_&&!_.done&&(a=N.return)&&a.call(N)}finally{if(n)throw n.error}}}}}catch(p){t={error:p}}finally{try{A&&!A.done&&(r=g.return)&&r.call(g)}finally{if(t)throw t.error}}this._storedFields.delete(S),this._documentIds.delete(S),this._idToShortId.delete(b),this._fieldLength.delete(S),this._documentCount-=1},o.prototype.removeAll=function(e){var t,r;if(e)try{for(var n=D(e),a=n.next();!a.done;a=n.next()){var i=a.value;this.remove(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Le,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},o.prototype.discard=function(e){var t=this,r=this._idToShortId.get(e);if(r==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(r),this._storedFields.delete(r),(this._fieldLength.get(r)||[]).forEach(function(n,a){t.removeFieldLength(r,a,t._documentCount,n)}),this._fieldLength.delete(r),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()},o.prototype.maybeAutoVacuum=function(){if(this._options.autoVacuum!==!1){var e=this._options.autoVacuum,t=e.minDirtFactor,r=e.minDirtCount,n=e.batchSize,a=e.batchWait;this.conditionalVacuum({batchSize:n,batchWait:a},{minDirtCount:r,minDirtFactor:t})}},o.prototype.discardAll=function(e){var t,r,n=this._options.autoVacuum;try{this._options.autoVacuum=!1;try{for(var a=D(e),i=a.next();!i.done;i=a.next()){var s=i.value;this.discard(s)}}catch(u){t={error:u}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()},o.prototype.replace=function(e){var t=this._options,r=t.idField,n=t.extractField,a=n(e,r);this.discard(a),this.add(e)},o.prototype.vacuum=function(e){return e===void 0&&(e={}),this.conditionalVacuum(e)},o.prototype.conditionalVacuum=function(e,t){var r=this;return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(function(){var n=r._enqueuedVacuumConditions;return r._enqueuedVacuumConditions=Je,r.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)},o.prototype.performVacuuming=function(e,t){return Rr(this,void 0,void 0,function(){var r,n,a,i,s,u,l,h,d,v,m,b,S,g,A,T,F,L,R,V,N,_,C,O,w;return Mr(this,function(c){switch(c.label){case 0:if(r=this._dirtCount,!this.vacuumConditionsMet(t))return[3,10];n=e.batchSize||Ke.batchSize,a=e.batchWait||Ke.batchWait,i=1,c.label=1;case 1:c.trys.push([1,7,8,9]),s=D(this._index),u=s.next(),c.label=2;case 2:if(u.done)return[3,6];l=K(u.value,2),h=l[0],d=l[1];try{for(v=(_=void 0,D(d)),m=v.next();!m.done;m=v.next()){b=K(m.value,2),S=b[0],g=b[1];try{for(A=(O=void 0,D(g)),T=A.next();!T.done;T=A.next())F=K(T.value,1),L=F[0],!this._documentIds.has(L)&&(g.size<=1?d.delete(S):g.delete(L))}catch(f){O={error:f}}finally{try{T&&!T.done&&(w=A.return)&&w.call(A)}finally{if(O)throw O.error}}}}catch(f){_={error:f}}finally{try{m&&!m.done&&(C=v.return)&&C.call(v)}finally{if(_)throw _.error}}return this._index.get(h).size===0&&this._index.delete(h),i%n!==0?[3,4]:[4,new Promise(function(f){return setTimeout(f,a)})];case 3:c.sent(),c.label=4;case 4:i+=1,c.label=5;case 5:return u=s.next(),[3,2];case 6:return[3,9];case 7:return R=c.sent(),V={error:R},[3,9];case 8:try{u&&!u.done&&(N=s.return)&&N.call(s)}finally{if(V)throw V.error}return[7];case 9:this._dirtCount-=r,c.label=10;case 10:return[4,null];case 11:return c.sent(),this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null,[2]}})})},o.prototype.vacuumConditionsMet=function(e){if(e==null)return!0;var t=e.minDirtCount,r=e.minDirtFactor;return t=t||Ve.minDirtCount,r=r||Ve.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=r},Object.defineProperty(o.prototype,"isVacuuming",{get:function(){return this._currentVacuum!=null},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtCount",{get:function(){return this._dirtCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtFactor",{get:function(){return this._dirtCount/(1+this._documentCount+this._dirtCount)},enumerable:!1,configurable:!0}),o.prototype.has=function(e){return this._idToShortId.has(e)},o.prototype.getStoredFields=function(e){var t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)},o.prototype.search=function(e,t){var r,n;t===void 0&&(t={});var a=this.executeQuery(e,t),i=[];try{for(var s=D(a),u=s.next();!u.done;u=s.next()){var l=K(u.value,2),h=l[0],d=l[1],v=d.score,m=d.terms,b=d.match,S=m.length||1,g={id:this._documentIds.get(h),score:v*S,terms:Object.keys(b),queryTerms:m,match:b};Object.assign(g,this._storedFields.get(h)),(t.filter==null||t.filter(g))&&i.push(g)}}catch(A){r={error:A}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return e===o.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(vt),i},o.prototype.autoSuggest=function(e,t){var r,n,a,i;t===void 0&&(t={}),t=W(W({},this._options.autoSuggestOptions),t);var s=new Map;try{for(var u=D(this.search(e,t)),l=u.next();!l.done;l=u.next()){var h=l.value,d=h.score,v=h.terms,m=v.join(" "),b=s.get(m);b!=null?(b.score+=d,b.count+=1):s.set(m,{score:d,terms:v,count:1})}}catch(R){r={error:R}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}var S=[];try{for(var g=D(s),A=g.next();!A.done;A=g.next()){var T=K(A.value,2),b=T[0],F=T[1],d=F.score,v=F.terms,L=F.count;S.push({suggestion:b,terms:v,score:d/L})}}catch(R){a={error:R}}finally{try{A&&!A.done&&(i=g.return)&&i.call(g)}finally{if(a)throw a.error}}return S.sort(vt),S},Object.defineProperty(o.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"termCount",{get:function(){return this._index.size},enumerable:!1,configurable:!0}),o.loadJSON=function(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)},o.getDefault=function(e){if(Be.hasOwnProperty(e))return Pe(Be,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},o.loadJS=function(e,t){var r,n,a,i,s,u,l=e.index,h=e.documentCount,d=e.nextId,v=e.documentIds,m=e.fieldIds,b=e.fieldLength,S=e.averageFieldLength,g=e.storedFields,A=e.dirtCount,T=e.serializationVersion;if(T!==1&&T!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var F=new o(t);F._documentCount=h,F._nextId=d,F._documentIds=Ce(v),F._idToShortId=new Map,F._fieldIds=m,F._fieldLength=Ce(b),F._avgFieldLength=S,F._storedFields=Ce(g),F._dirtCount=A||0,F._index=new Le;try{for(var L=D(F._documentIds),R=L.next();!R.done;R=L.next()){var V=K(R.value,2),N=V[0],_=V[1];F._idToShortId.set(_,N)}}catch(P){r={error:P}}finally{try{R&&!R.done&&(n=L.return)&&n.call(L)}finally{if(r)throw r.error}}try{for(var C=D(l),O=C.next();!O.done;O=C.next()){var w=K(O.value,2),c=w[0],f=w[1],p=new Map;try{for(var k=(s=void 0,D(Object.keys(f))),I=k.next();!I.done;I=k.next()){var M=I.value,z=f[M];T===1&&(z=z.ds),p.set(parseInt(M,10),Ce(z))}}catch(P){s={error:P}}finally{try{I&&!I.done&&(u=k.return)&&u.call(k)}finally{if(s)throw s.error}}F._index.set(c,p)}}catch(P){a={error:P}}finally{try{O&&!O.done&&(i=C.return)&&i.call(C)}finally{if(a)throw a.error}}return F},o.prototype.executeQuery=function(e,t){var r=this;if(t===void 0&&(t={}),e===o.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){var n=W(W(W({},t),e),{queries:void 0}),a=e.queries.map(function(g){return r.executeQuery(g,n)});return this.combineResults(a,n.combineWith)}var i=this._options,s=i.tokenize,u=i.processTerm,l=i.searchOptions,h=W(W({tokenize:s,processTerm:u},l),t),d=h.tokenize,v=h.processTerm,m=d(e).flatMap(function(g){return v(g)}).filter(function(g){return!!g}),b=m.map(Kr(h)),S=b.map(function(g){return r.executeQuerySpec(g,h)});return this.combineResults(S,h.combineWith)},o.prototype.executeQuerySpec=function(e,t){var r,n,a,i,s=W(W({},this._options.searchOptions),t),u=(s.fields||this._options.fields).reduce(function(M,z){var P;return W(W({},M),(P={},P[z]=Pe(s.boost,z)||1,P))},{}),l=s.boostDocument,h=s.weights,d=s.maxFuzzy,v=s.bm25,m=W(W({},ht.weights),h),b=m.fuzzy,S=m.prefix,g=this._index.get(e.term),A=this.termResults(e.term,e.term,1,g,u,l,v),T,F;if(e.prefix&&(T=this._index.atPrefix(e.term)),e.fuzzy){var L=e.fuzzy===!0?.2:e.fuzzy,R=L<1?Math.min(d,Math.round(e.term.length*L)):L;R&&(F=this._index.fuzzyGet(e.term,R))}if(T)try{for(var V=D(T),N=V.next();!N.done;N=V.next()){var _=K(N.value,2),C=_[0],O=_[1],w=C.length-e.term.length;if(w){F==null||F.delete(C);var c=S*C.length/(C.length+.3*w);this.termResults(e.term,C,c,O,u,l,v,A)}}}catch(M){r={error:M}}finally{try{N&&!N.done&&(n=V.return)&&n.call(V)}finally{if(r)throw r.error}}if(F)try{for(var f=D(F.keys()),p=f.next();!p.done;p=f.next()){var C=p.value,k=K(F.get(C),2),I=k[0],w=k[1];if(w){var c=b*C.length/(C.length+w);this.termResults(e.term,C,c,I,u,l,v,A)}}}catch(M){a={error:M}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(a)throw a.error}}return A},o.prototype.executeWildcardQuery=function(e){var t,r,n=new Map,a=W(W({},this._options.searchOptions),e);try{for(var i=D(this._documentIds),s=i.next();!s.done;s=i.next()){var u=K(s.value,2),l=u[0],h=u[1],d=a.boostDocument?a.boostDocument(h,"",this._storedFields.get(l)):1;n.set(l,{score:d,terms:[],match:{}})}}catch(v){t={error:v}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},o.prototype.combineResults=function(e,t){if(t===void 0&&(t=He),e.length===0)return new Map;var r=t.toLowerCase();return e.reduce($r[r])||new Map},o.prototype.toJSON=function(){var e,t,r,n,a=[];try{for(var i=D(this._index),s=i.next();!s.done;s=i.next()){var u=K(s.value,2),l=u[0],h=u[1],d={};try{for(var v=(r=void 0,D(h)),m=v.next();!m.done;m=v.next()){var b=K(m.value,2),S=b[0],g=b[1];d[S]=Object.fromEntries(g)}}catch(A){r={error:A}}finally{try{m&&!m.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}a.push([l,d])}}catch(A){e={error:A}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}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:a,serializationVersion:2}},o.prototype.termResults=function(e,t,r,n,a,i,s,u){var l,h,d,v,m;if(u===void 0&&(u=new Map),n==null)return u;try{for(var b=D(Object.keys(a)),S=b.next();!S.done;S=b.next()){var g=S.value,A=a[g],T=this._fieldIds[g],F=n.get(T);if(F!=null){var L=F.size,R=this._avgFieldLength[T];try{for(var V=(d=void 0,D(F.keys())),N=V.next();!N.done;N=V.next()){var _=N.value;if(!this._documentIds.has(_)){this.removeTerm(T,_,t),L-=1;continue}var C=i?i(this._documentIds.get(_),t,this._storedFields.get(_)):1;if(C){var O=F.get(_),w=this._fieldLength.get(_)[T],c=jr(O,L,this._documentCount,w,R,s),f=r*A*C*c,p=u.get(_);if(p){p.score+=f,Ur(p.terms,e);var k=Pe(p.match,t);k?k.push(g):p.match[t]=[g]}else u.set(_,{score:f,terms:[e],match:(m={},m[t]=[g],m)})}}}catch(I){d={error:I}}finally{try{N&&!N.done&&(v=V.return)&&v.call(V)}finally{if(d)throw d.error}}}}}catch(I){l={error:I}}finally{try{S&&!S.done&&(h=b.return)&&h.call(b)}finally{if(l)throw l.error}}return u},o.prototype.addTerm=function(e,t,r){var n=this._index.fetch(r,pt),a=n.get(e);if(a==null)a=new Map,a.set(t,1),n.set(e,a);else{var i=a.get(t);a.set(t,(i||0)+1)}},o.prototype.removeTerm=function(e,t,r){if(!this._index.has(r)){this.warnDocumentChanged(t,e,r);return}var n=this._index.fetch(r,pt),a=n.get(e);a==null||a.get(t)==null?this.warnDocumentChanged(t,e,r):a.get(t)<=1?a.size<=1?n.delete(e):a.delete(t):a.set(t,a.get(t)-1),this._index.get(r).size===0&&this._index.delete(r)},o.prototype.warnDocumentChanged=function(e,t,r){var n,a;try{for(var i=D(Object.keys(this._fieldIds)),s=i.next();!s.done;s=i.next()){var u=s.value;if(this._fieldIds[u]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(r,'" was not present in field "').concat(u,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}}catch(l){n={error:l}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}},o.prototype.addDocumentId=function(e){var t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},o.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},o.prototype.addFieldLength=function(e,t,r,n){var a=this._fieldLength.get(e);a==null&&this._fieldLength.set(e,a=[]),a[t]=n;var i=this._avgFieldLength[t]||0,s=i*r+n;this._avgFieldLength[t]=s/(r+1)},o.prototype.removeFieldLength=function(e,t,r,n){if(r===1){this._avgFieldLength[t]=0;return}var a=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=a/(r-1)},o.prototype.saveStoredFields=function(e,t){var r,n,a=this._options,i=a.storeFields,s=a.extractField;if(!(i==null||i.length===0)){var u=this._storedFields.get(e);u==null&&this._storedFields.set(e,u={});try{for(var l=D(i),h=l.next();!h.done;h=l.next()){var d=h.value,v=s(t,d);v!==void 0&&(u[d]=v)}}catch(m){r={error:m}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}},o.wildcard=Symbol("*"),o}(),Pe=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0},$r=(ye={},ye[He]=function(o,e){var t,r;try{for(var n=D(e.keys()),a=n.next();!a.done;a=n.next()){var i=a.value,s=o.get(i);if(s==null)o.set(i,e.get(i));else{var u=e.get(i),l=u.score,h=u.terms,d=u.match;s.score=s.score+l,s.match=Object.assign(s.match,d),dt(s.terms,h)}}}catch(v){t={error:v}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return o},ye[Nt]=function(o,e){var t,r,n=new Map;try{for(var a=D(e.keys()),i=a.next();!i.done;i=a.next()){var s=i.value,u=o.get(s);if(u!=null){var l=e.get(s),h=l.score,d=l.terms,v=l.match;dt(u.terms,d),n.set(s,{score:u.score+h,terms:u.terms,match:Object.assign(u.match,v)})}}}catch(m){t={error:m}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return n},ye[Br]=function(o,e){var t,r;try{for(var n=D(e.keys()),a=n.next();!a.done;a=n.next()){var i=a.value;o.delete(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return o},ye),Wr={k:1.2,b:.7,d:.5},jr=function(o,e,t,r,n,a){var i=a.k,s=a.b,u=a.d,l=Math.log(1+(t-e+.5)/(e+.5));return l*(u+o*(i+1)/(o+i*(1-s+s*r/n)))},Kr=function(o){return function(e,t,r){var n=typeof o.fuzzy=="function"?o.fuzzy(e,t,r):o.fuzzy||!1,a=typeof o.prefix=="function"?o.prefix(e,t,r):o.prefix===!0;return{term:e,fuzzy:n,prefix:a}}},Be={idField:"id",extractField:function(o,e){return o[e]},tokenize:function(o){return o.split(Hr)},processTerm:function(o){return o.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[],logger:function(o,e){typeof(console==null?void 0:console[o])=="function"&&console[o](e)},autoVacuum:!0},ht={combineWith:He,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Wr},Jr={combineWith:Nt,prefix:function(o,e,t){return e===t.length-1}},Ke={batchSize:1e3,batchWait:10},Je={minDirtFactor:.1,minDirtCount:20},Ve=W(W({},Ke),Je),Ur=function(o,e){o.includes(e)||o.push(e)},dt=function(o,e){var t,r;try{for(var n=D(e),a=n.next();!a.done;a=n.next()){var i=a.value;o.includes(i)||o.push(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},vt=function(o,e){var t=o.score,r=e.score;return r-t},pt=function(){return new Map},Ce=function(o){var e,t,r=new Map;try{for(var n=D(Object.keys(o)),a=n.next();!a.done;a=n.next()){var i=a.value;r.set(parseInt(i,10),o[i])}}catch(s){e={error:s}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},Hr=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;class Gr{constructor(e=10){Oe(this,"max");Oe(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 Y=o=>(qt("data-v-dd73f37c"),o=o(),Qt(),o),qr=["aria-owns"],Qr={class:"shell"},Yr=["title"],Zr=Y(()=>E("svg",{class:"search-icon",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[E("circle",{cx:"11",cy:"11",r:"8"}),E("path",{d:"m21 21l-4.35-4.35"})])],-1)),Xr=[Zr],ea={class:"search-actions before"},ta=["title"],ra=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 12H5m7 7l-7-7l7-7"})],-1)),aa=[ra],na=["placeholder"],ia={class:"search-actions"},oa=["title"],sa=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 14h7v7H3zM3 3h7v7H3zm11 1h7m-7 5h7m-7 6h7m-7 5h7"})],-1)),ua=[sa],la=["disabled","title"],ca=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 5H9l-7 7l7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2Zm-2 4l-6 6m0-6l6 6"})],-1)),fa=[ca],ha=["id","role","aria-labelledby"],da=["aria-selected"],va=["href","aria-label","onMouseenter","onFocusin"],pa={class:"titles"},ma=Y(()=>E("span",{class:"title-icon"},"#",-1)),ya=["innerHTML"],ga=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"})],-1)),ba={class:"title main"},wa=["innerHTML"],xa={key:0,class:"excerpt-wrapper"},Fa={key:0,class:"excerpt",inert:""},Ea=["innerHTML"],Sa=Y(()=>E("div",{class:"excerpt-gradient-bottom"},null,-1)),Aa=Y(()=>E("div",{class:"excerpt-gradient-top"},null,-1)),Ca={key:0,class:"no-results"},Ta={class:"search-keyboard-shortcuts"},Na=["aria-label"],ka=Y(()=>E("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19V5m-7 7l7-7l7 7"})],-1)),Ia=[ka],Da=["aria-label"],Oa=Y(()=>E("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v14m7-7l-7 7l-7-7"})],-1)),_a=[Oa],Ra=["aria-label"],Ma=Y(()=>E("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[E("g",{fill:"none",stroke:"currentcolor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[E("path",{d:"m9 10l-5 5l5 5"}),E("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"})])],-1)),La=[Ma],za=["aria-label"],Pa=_t({__name:"VPLocalSearchBox",emits:["close"],setup(o,{emit:e}){var z,P;const t=e,r=xe(),n=xe(),a=xe(nr),i=rr(),{activate:s}=Dr(r,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:u,theme:l}=i,h=tt(async()=>{var y,x,$,j,G,q,B,J,Z;return it(Vr.loadJSON(($=await((x=(y=a.value)[u.value])==null?void 0:x.call(y)))==null?void 0:$.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((j=l.value.search)==null?void 0:j.provider)==="local"&&((q=(G=l.value.search.options)==null?void 0:G.miniSearch)==null?void 0:q.searchOptions)},...((B=l.value.search)==null?void 0:B.provider)==="local"&&((Z=(J=l.value.search.options)==null?void 0:J.miniSearch)==null?void 0:Z.options)}))}),v=Fe(()=>{var y,x;return((y=l.value.search)==null?void 0:y.provider)==="local"&&((x=l.value.search.options)==null?void 0:x.disableQueryPersistence)===!0}).value?oe(""):Rt("vitepress:local-search-filter",""),m=Mt("vitepress:local-search-detailed-list",((z=l.value.search)==null?void 0:z.provider)==="local"&&((P=l.value.search.options)==null?void 0:P.detailedView)===!0),b=Fe(()=>{var y,x,$;return((y=l.value.search)==null?void 0:y.provider)==="local"&&(((x=l.value.search.options)==null?void 0:x.disableDetailedView)===!0||(($=l.value.search.options)==null?void 0:$.detailedView)===!1)}),S=Fe(()=>{var x,$,j,G,q,B,J;const y=((x=l.value.search)==null?void 0:x.options)??l.value.algolia;return((q=(G=(j=($=y==null?void 0:y.locales)==null?void 0:$[u.value])==null?void 0:j.translations)==null?void 0:G.button)==null?void 0:q.buttonText)||((J=(B=y==null?void 0:y.translations)==null?void 0:B.button)==null?void 0:J.buttonText)||"Search"});Lt(()=>{b.value&&(m.value=!1)});const g=xe([]),A=oe(!1);$e(v,()=>{A.value=!1});const T=tt(async()=>{if(n.value)return it(new _r(n.value))},null),F=new Gr(16);zt(()=>[h.value,v.value,m.value],async([y,x,$],j,G)=>{var be,Ge,qe,Qe;(j==null?void 0:j[0])!==y&&F.clear();let q=!1;if(G(()=>{q=!0}),!y)return;g.value=y.search(x).slice(0,16),A.value=!0;const B=$?await Promise.all(g.value.map(Q=>L(Q.id))):[];if(q)return;for(const{id:Q,mod:ae}of B){const ne=Q.slice(0,Q.indexOf("#"));let te=F.get(ne);if(te)continue;te=new Map,F.set(ne,te);const X=ae.default??ae;if(X!=null&&X.render||X!=null&&X.setup){const ie=Yt(X);ie.config.warnHandler=()=>{},ie.provide(Zt,i),Object.defineProperties(ie.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const Ye=document.createElement("div");ie.mount(Ye),Ye.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(he=>{var et;const we=(et=he.querySelector("a"))==null?void 0:et.getAttribute("href"),Ze=(we==null?void 0:we.startsWith("#"))&&we.slice(1);if(!Ze)return;let Xe="";for(;(he=he.nextElementSibling)&&!/^h[1-6]$/i.test(he.tagName);)Xe+=he.outerHTML;te.set(Ze,Xe)}),ie.unmount()}if(q)return}const J=new Set;if(g.value=g.value.map(Q=>{const[ae,ne]=Q.id.split("#"),te=F.get(ae),X=(te==null?void 0:te.get(ne))??"";for(const ie in Q.match)J.add(ie);return{...Q,text:X}}),await de(),q)return;await new Promise(Q=>{var ae;(ae=T.value)==null||ae.unmark({done:()=>{var ne;(ne=T.value)==null||ne.markRegExp(M(J),{done:Q})}})});const Z=((be=r.value)==null?void 0:be.querySelectorAll(".result .excerpt"))??[];for(const Q of Z)(Ge=Q.querySelector('mark[data-markjs="true"]'))==null||Ge.scrollIntoView({block:"center"});(Qe=(qe=n.value)==null?void 0:qe.firstElementChild)==null||Qe.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function L(y){const x=Xt(y.slice(0,y.indexOf("#")));try{if(!x)throw new Error(`Cannot find file for id: ${y}`);return{id:y,mod:await mt(()=>import(((u)=>{if(u.startsWith('/')){return"https://registry.npmmirror.com/@gkd-kit/docs/0.0.1709887455831/files/.vitepress/dist"+u}return u})(x)),__vite__mapDeps([]))}}catch($){return console.error($),{id:y,mod:{}}}}const R=oe(),V=Fe(()=>{var y;return((y=v.value)==null?void 0:y.length)<=0});function N(y=!0){var x,$;(x=R.value)==null||x.focus(),y&&(($=R.value)==null||$.select())}_e(()=>{N()});function _(y){y.pointerType==="mouse"&&N()}const C=oe(-1),O=oe(!1);$e(g,y=>{C.value=y.length?0:-1,w()});function w(){de(()=>{const y=document.querySelector(".result.selected");y&&y.scrollIntoView({block:"nearest"})})}Ee("ArrowUp",y=>{y.preventDefault(),C.value--,C.value<0&&(C.value=g.value.length-1),O.value=!0,w()}),Ee("ArrowDown",y=>{y.preventDefault(),C.value++,C.value>=g.value.length&&(C.value=0),O.value=!0,w()});const c=Pt();Ee("Enter",y=>{if(y.isComposing||y.target instanceof HTMLButtonElement&&y.target.type!=="submit")return;const x=g.value[C.value];if(y.target instanceof HTMLInputElement&&!x){y.preventDefault();return}x&&(c.go(x.id),t("close"))}),Ee("Escape",()=>{t("close")});const p=ar({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"}}});_e(()=>{window.history.pushState(null,"",null)}),Bt("popstate",y=>{y.preventDefault(),t("close")});const k=Vt($t?document.body:null);_e(()=>{de(()=>{k.value=!0,de().then(()=>s())})}),Wt(()=>{k.value=!1});function I(){v.value="",de().then(()=>N(!1))}function M(y){return new RegExp([...y].sort((x,$)=>$.length-x.length).map(x=>`(${er(x)})`).join("|"),"gi")}return(y,x)=>{var $,j,G,q;return ee(),jt(Gt,{to:"body"},[E("div",{ref_key:"el",ref:r,role:"button","aria-owns":($=g.value)!=null&&$.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[E("div",{class:"backdrop",onClick:x[0]||(x[0]=B=>y.$emit("close"))}),E("div",Qr,[E("form",{class:"search-bar",onPointerup:x[4]||(x[4]=B=>_(B)),onSubmit:x[5]||(x[5]=Kt(()=>{},["prevent"]))},[E("label",{title:S.value,id:"localsearch-label",for:"localsearch-input"},Xr,8,Yr),E("div",ea,[E("button",{class:"back-button",title:U(p)("modal.backButtonTitle"),onClick:x[1]||(x[1]=B=>y.$emit("close"))},aa,8,ta)]),Jt(E("input",{ref_key:"searchInput",ref:R,"onUpdate:modelValue":x[2]||(x[2]=B=>Ht(v)?v.value=B:null),placeholder:S.value,id:"localsearch-input","aria-labelledby":"localsearch-label",class:"search-input"},null,8,na),[[Ut,U(v)]]),E("div",ia,[b.value?Se("",!0):(ee(),re("button",{key:0,class:rt(["toggle-layout-button",{"detailed-list":U(m)}]),type:"button",title:U(p)("modal.displayDetails"),onClick:x[3]||(x[3]=B=>C.value>-1&&(m.value=!U(m)))},ua,10,oa)),E("button",{class:"clear-button",type:"reset",disabled:V.value,title:U(p)("modal.resetButtonTitle"),onClick:I},fa,8,la)])],32),E("ul",{ref_key:"resultsEl",ref:n,id:(j=g.value)!=null&&j.length?"localsearch-list":void 0,role:(G=g.value)!=null&&G.length?"listbox":void 0,"aria-labelledby":(q=g.value)!=null&&q.length?"localsearch-label":void 0,class:"results",onMousemove:x[7]||(x[7]=B=>O.value=!1)},[(ee(!0),re(nt,null,at(g.value,(B,J)=>(ee(),re("li",{key:B.id,role:"option","aria-selected":C.value===J?"true":"false"},[E("a",{href:B.id,class:rt(["result",{selected:C.value===J}]),"aria-label":[...B.titles,B.title].join(" > "),onMouseenter:Z=>!O.value&&(C.value=J),onFocusin:Z=>C.value=J,onClick:x[6]||(x[6]=Z=>y.$emit("close"))},[E("div",null,[E("div",pa,[ma,(ee(!0),re(nt,null,at(B.titles,(Z,be)=>(ee(),re("span",{key:be,class:"title"},[E("span",{class:"text",innerHTML:Z},null,8,ya),ga]))),128)),E("span",ba,[E("span",{class:"text",innerHTML:B.title},null,8,wa)])]),U(m)?(ee(),re("div",xa,[B.text?(ee(),re("div",Fa,[E("div",{class:"vp-doc",innerHTML:B.text},null,8,Ea)])):Se("",!0),Sa,Aa])):Se("",!0)])],42,va)],8,da))),128)),U(v)&&!g.value.length&&A.value?(ee(),re("li",Ca,[ve(pe(U(p)("modal.noResultsText"))+' "',1),E("strong",null,pe(U(v)),1),ve('" ')])):Se("",!0)],40,ha),E("div",Ta,[E("span",null,[E("kbd",{"aria-label":U(p)("modal.footer.navigateUpKeyAriaLabel")},Ia,8,Na),E("kbd",{"aria-label":U(p)("modal.footer.navigateDownKeyAriaLabel")},_a,8,Da),ve(" "+pe(U(p)("modal.footer.navigateText")),1)]),E("span",null,[E("kbd",{"aria-label":U(p)("modal.footer.selectKeyAriaLabel")},La,8,Ra),ve(" "+pe(U(p)("modal.footer.selectText")),1)]),E("span",null,[E("kbd",{"aria-label":U(p)("modal.footer.closeKeyAriaLabel")},"esc",8,za),ve(" "+pe(U(p)("modal.footer.closeText")),1)])])])],8,qr)])}}}),Ka=tr(Pa,[["__scopeId","data-v-dd73f37c"]]);export{Ka as default};
7
+ */function st(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function ut(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?st(Object(t),!0).forEach(function(r){Fr(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):st(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Fr(o,e,t){return e=Sr(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Er(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function Sr(o){var e=Er(o,"string");return typeof e=="symbol"?e:String(e)}var lt={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r.pause()}var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&e[e.length-1].unpause()}},Ar=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Cr=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},ge=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Tr=function(e){return ge(e)&&!e.shiftKey},Nr=function(e){return ge(e)&&e.shiftKey},ct=function(e){return setTimeout(e,0)},ft=function(e,t){var r=-1;return e.every(function(n,a){return t(n)?(r=a,!1):!0}),r},me=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return typeof e=="function"?e.apply(void 0,r):e},Ae=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},kr=[],Ir=function(e,t){var r=(t==null?void 0:t.document)||document,n=(t==null?void 0:t.trapStack)||kr,a=ut({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Tr,isKeyBackward:Nr},t),i={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},s,u=function(c,f,p){return c&&c[f]!==void 0?c[f]:a[p||f]},l=function(c,f){var p=typeof(f==null?void 0:f.composedPath)=="function"?f.composedPath():void 0;return i.containerGroups.findIndex(function(k){var I=k.container,M=k.tabbableNodes;return I.contains(c)||(p==null?void 0:p.includes(I))||M.find(function(z){return z===c})})},h=function(c){var f=a[c];if(typeof f=="function"){for(var p=arguments.length,k=new Array(p>1?p-1:0),I=1;I<p;I++)k[I-1]=arguments[I];f=f.apply(void 0,k)}if(f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(c,"` was specified but was not a node, or did not return a node"))}var M=f;if(typeof f=="string"&&(M=r.querySelector(f),!M))throw new Error("`".concat(c,"` as selector refers to no known node"));return M},d=function(){var c=h("initialFocus");if(c===!1)return!1;if(c===void 0||!Re(c,a.tabbableOptions))if(l(r.activeElement)>=0)c=r.activeElement;else{var f=i.tabbableGroups[0],p=f&&f.firstTabbableNode;c=p||h("fallbackFocus")}if(!c)throw new Error("Your focus-trap needs to have at least one focusable element");return c},v=function(){if(i.containerGroups=i.containers.map(function(c){var f=br(c,a.tabbableOptions),p=wr(c,a.tabbableOptions),k=f.length>0?f[0]:void 0,I=f.length>0?f[f.length-1]:void 0,M=p.find(function(y){return le(y)}),z=p.slice().reverse().find(function(y){return le(y)}),P=!!f.find(function(y){return se(y)>0});return{container:c,tabbableNodes:f,focusableNodes:p,posTabIndexesFound:P,firstTabbableNode:k,lastTabbableNode:I,firstDomTabbableNode:M,lastDomTabbableNode:z,nextTabbableNode:function(x){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,j=f.indexOf(x);return j<0?$?p.slice(p.indexOf(x)+1).find(function(G){return le(G)}):p.slice(0,p.indexOf(x)).reverse().find(function(G){return le(G)}):f[j+($?1:-1)]}}}),i.tabbableGroups=i.containerGroups.filter(function(c){return c.tabbableNodes.length>0}),i.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(i.containerGroups.find(function(c){return c.posTabIndexesFound})&&i.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.")},m=function w(c){var f=c.activeElement;if(f)return f.shadowRoot&&f.shadowRoot.activeElement!==null?w(f.shadowRoot):f},b=function w(c){if(c!==!1&&c!==m(document)){if(!c||!c.focus){w(d());return}c.focus({preventScroll:!!a.preventScroll}),i.mostRecentlyFocusedNode=c,Ar(c)&&c.select()}},S=function(c){var f=h("setReturnFocus",c);return f||(f===!1?!1:c)},g=function(c){var f=c.target,p=c.event,k=c.isBackward,I=k===void 0?!1:k;f=f||Ae(p),v();var M=null;if(i.tabbableGroups.length>0){var z=l(f,p),P=z>=0?i.containerGroups[z]:void 0;if(z<0)I?M=i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:M=i.tabbableGroups[0].firstTabbableNode;else if(I){var y=ft(i.tabbableGroups,function(B){var J=B.firstTabbableNode;return f===J});if(y<0&&(P.container===f||Re(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f,!1))&&(y=z),y>=0){var x=y===0?i.tabbableGroups.length-1:y-1,$=i.tabbableGroups[x];M=se(f)>=0?$.lastTabbableNode:$.lastDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f,!1))}else{var j=ft(i.tabbableGroups,function(B){var J=B.lastTabbableNode;return f===J});if(j<0&&(P.container===f||Re(f,a.tabbableOptions)&&!le(f,a.tabbableOptions)&&!P.nextTabbableNode(f))&&(j=z),j>=0){var G=j===i.tabbableGroups.length-1?0:j+1,q=i.tabbableGroups[G];M=se(f)>=0?q.firstTabbableNode:q.firstDomTabbableNode}else ge(p)||(M=P.nextTabbableNode(f))}}else M=h("fallbackFocus");return M},A=function(c){var f=Ae(c);if(!(l(f,c)>=0)){if(me(a.clickOutsideDeactivates,c)){s.deactivate({returnFocus:a.returnFocusOnDeactivate});return}me(a.allowOutsideClick,c)||c.preventDefault()}},T=function(c){var f=Ae(c),p=l(f,c)>=0;if(p||f instanceof Document)p&&(i.mostRecentlyFocusedNode=f);else{c.stopImmediatePropagation();var k,I=!0;if(i.mostRecentlyFocusedNode)if(se(i.mostRecentlyFocusedNode)>0){var M=l(i.mostRecentlyFocusedNode),z=i.containerGroups[M].tabbableNodes;if(z.length>0){var P=z.findIndex(function(y){return y===i.mostRecentlyFocusedNode});P>=0&&(a.isKeyForward(i.recentNavEvent)?P+1<z.length&&(k=z[P+1],I=!1):P-1>=0&&(k=z[P-1],I=!1))}}else i.containerGroups.some(function(y){return y.tabbableNodes.some(function(x){return se(x)>0})})||(I=!1);else I=!1;I&&(k=g({target:i.mostRecentlyFocusedNode,isBackward:a.isKeyBackward(i.recentNavEvent)})),b(k||i.mostRecentlyFocusedNode||d())}i.recentNavEvent=void 0},F=function(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;i.recentNavEvent=c;var p=g({event:c,isBackward:f});p&&(ge(c)&&c.preventDefault(),b(p))},L=function(c){if(Cr(c)&&me(a.escapeDeactivates,c)!==!1){c.preventDefault(),s.deactivate();return}(a.isKeyForward(c)||a.isKeyBackward(c))&&F(c,a.isKeyBackward(c))},R=function(c){var f=Ae(c);l(f,c)>=0||me(a.clickOutsideDeactivates,c)||me(a.allowOutsideClick,c)||(c.preventDefault(),c.stopImmediatePropagation())},V=function(){if(i.active)return lt.activateTrap(n,s),i.delayInitialFocusTimer=a.delayInitialFocus?ct(function(){b(d())}):b(d()),r.addEventListener("focusin",T,!0),r.addEventListener("mousedown",A,{capture:!0,passive:!1}),r.addEventListener("touchstart",A,{capture:!0,passive:!1}),r.addEventListener("click",R,{capture:!0,passive:!1}),r.addEventListener("keydown",L,{capture:!0,passive:!1}),s},N=function(){if(i.active)return r.removeEventListener("focusin",T,!0),r.removeEventListener("mousedown",A,!0),r.removeEventListener("touchstart",A,!0),r.removeEventListener("click",R,!0),r.removeEventListener("keydown",L,!0),s},_=function(c){var f=c.some(function(p){var k=Array.from(p.removedNodes);return k.some(function(I){return I===i.mostRecentlyFocusedNode})});f&&b(d())},C=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(_):void 0,O=function(){C&&(C.disconnect(),i.active&&!i.paused&&i.containers.map(function(c){C.observe(c,{subtree:!0,childList:!0})}))};return s={get active(){return i.active},get paused(){return i.paused},activate:function(c){if(i.active)return this;var f=u(c,"onActivate"),p=u(c,"onPostActivate"),k=u(c,"checkCanFocusTrap");k||v(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,f==null||f();var I=function(){k&&v(),V(),O(),p==null||p()};return k?(k(i.containers.concat()).then(I,I),this):(I(),this)},deactivate:function(c){if(!i.active)return this;var f=ut({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},c);clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,N(),i.active=!1,i.paused=!1,O(),lt.deactivateTrap(n,s);var p=u(f,"onDeactivate"),k=u(f,"onPostDeactivate"),I=u(f,"checkCanReturnFocus"),M=u(f,"returnFocus","returnFocusOnDeactivate");p==null||p();var z=function(){ct(function(){M&&b(S(i.nodeFocusedBeforeActivation)),k==null||k()})};return M&&I?(I(S(i.nodeFocusedBeforeActivation)).then(z,z),this):(z(),this)},pause:function(c){if(i.paused||!i.active)return this;var f=u(c,"onPause"),p=u(c,"onPostPause");return i.paused=!0,f==null||f(),N(),O(),p==null||p(),this},unpause:function(c){if(!i.paused||!i.active)return this;var f=u(c,"onUnpause"),p=u(c,"onPostUnpause");return i.paused=!1,f==null||f(),v(),V(),O(),p==null||p(),this},updateContainerElements:function(c){var f=[].concat(c).filter(Boolean);return i.containers=f.map(function(p){return typeof p=="string"?r.querySelector(p):p}),i.active&&v(),O(),this}},s.updateContainerElements(e),s};function Dr(o,e={}){let t;const{immediate:r,...n}=e,a=oe(!1),i=oe(!1),s=d=>t&&t.activate(d),u=d=>t&&t.deactivate(d),l=()=>{t&&(t.pause(),i.value=!0)},h=()=>{t&&(t.unpause(),i.value=!1)};return $e(()=>Dt(o),d=>{d&&(t=Ir(d,{...n,onActivate(){a.value=!0,e.onActivate&&e.onActivate()},onDeactivate(){a.value=!1,e.onDeactivate&&e.onDeactivate()}}),r&&s())},{flush:"post"}),Ot(()=>u()),{hasFocus:a,isPaused:i,activate:s,deactivate:u,pause:l,unpause:h}}class fe{constructor(e,t=!0,r=[],n=5e3){this.ctx=e,this.iframes=t,this.exclude=r,this.iframesTimeout=n}static matches(e,t){const r=typeof t=="string"?[t]:t,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(n){let a=!1;return r.every(i=>n.call(e,i)?(a=!0,!1):!0),a}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(r=>{const n=t.filter(a=>a.contains(r)).length>0;t.indexOf(r)===-1&&!n&&t.push(r)}),t}getIframeContents(e,t,r=()=>{}){let n;try{const a=e.contentWindow;if(n=a.document,!a||!n)throw new Error("iframe inaccessible")}catch{r()}n&&t(n)}isIframeBlank(e){const t="about:blank",r=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&r!==t&&r}observeIframeLoad(e,t,r){let n=!1,a=null;const i=()=>{if(!n){n=!0,clearTimeout(a);try{this.isIframeBlank(e)||(e.removeEventListener("load",i),this.getIframeContents(e,t,r))}catch{r()}}};e.addEventListener("load",i),a=setTimeout(i,this.iframesTimeout)}onIframeReady(e,t,r){try{e.contentWindow.document.readyState==="complete"?this.isIframeBlank(e)?this.observeIframeLoad(e,t,r):this.getIframeContents(e,t,r):this.observeIframeLoad(e,t,r)}catch{r()}}waitForIframes(e,t){let r=0;this.forEachIframe(e,()=>!0,n=>{r++,this.waitForIframes(n.querySelector("html"),()=>{--r||t()})},n=>{n||t()})}forEachIframe(e,t,r,n=()=>{}){let a=e.querySelectorAll("iframe"),i=a.length,s=0;a=Array.prototype.slice.call(a);const u=()=>{--i<=0&&n(s)};i||u(),a.forEach(l=>{fe.matches(l,this.exclude)?u():this.onIframeReady(l,h=>{t(l)&&(s++,r(h)),u()},u)})}createIterator(e,t,r){return document.createNodeIterator(e,t,r,!1)}createInstanceOnIframe(e){return new fe(e.querySelector("html"),this.iframes)}compareNodeIframe(e,t,r){const n=e.compareDocumentPosition(r),a=Node.DOCUMENT_POSITION_PRECEDING;if(n&a)if(t!==null){const i=t.compareDocumentPosition(r),s=Node.DOCUMENT_POSITION_FOLLOWING;if(i&s)return!0}else return!0;return!1}getIteratorNode(e){const t=e.previousNode();let r;return t===null?r=e.nextNode():r=e.nextNode()&&e.nextNode(),{prevNode:t,node:r}}checkIframeFilter(e,t,r,n){let a=!1,i=!1;return n.forEach((s,u)=>{s.val===r&&(a=u,i=s.handled)}),this.compareNodeIframe(e,t,r)?(a===!1&&!i?n.push({val:r,handled:!0}):a!==!1&&!i&&(n[a].handled=!0),!0):(a===!1&&n.push({val:r,handled:!1}),!1)}handleOpenIframes(e,t,r,n){e.forEach(a=>{a.handled||this.getIframeContents(a.val,i=>{this.createInstanceOnIframe(i).forEachNode(t,r,n)})})}iterateThroughNodes(e,t,r,n,a){const i=this.createIterator(t,e,n);let s=[],u=[],l,h,d=()=>({prevNode:h,node:l}=this.getIteratorNode(i),l);for(;d();)this.iframes&&this.forEachIframe(t,v=>this.checkIframeFilter(l,h,v,s),v=>{this.createInstanceOnIframe(v).forEachNode(e,m=>u.push(m),n)}),u.push(l);u.forEach(v=>{r(v)}),this.iframes&&this.handleOpenIframes(s,e,r,n),a()}forEachNode(e,t,r,n=()=>{}){const a=this.getContexts();let i=a.length;i||n(),a.forEach(s=>{const u=()=>{this.iterateThroughNodes(e,s,t,r,()=>{--i<=0&&n()})};this.iframes?this.waitForIframes(s,u):u()})}}let Or=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 fe(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}log(e,t="debug"){const r=this.opt.log;this.opt.debug&&typeof r=="object"&&typeof r[t]=="function"&&r[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,r=this.opt.caseSensitive?"":"i",n=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(let a in t)if(t.hasOwnProperty(a)){const i=t[a],s=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(a):this.escapeStr(a),u=this.opt.wildcards!=="disabled"?this.setupWildcardsRegExp(i):this.escapeStr(i);s!==""&&u!==""&&(e=e.replace(new RegExp(`(${this.escapeStr(s)}|${this.escapeStr(u)})`,`gm${r}`),n+`(${this.processSynomyms(s)}|${this.processSynomyms(u)})`+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,r,n)=>{let a=n.charAt(r+1);return/[(|)\\]/.test(a)||a===""?t:t+"\0"})}createJoinersRegExp(e){let t=[];const r=this.opt.ignorePunctuation;return Array.isArray(r)&&r.length&&t.push(this.escapeStr(r.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",r=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(a=>{r.every(i=>{if(i.indexOf(a)!==-1){if(n.indexOf(i)>-1)return!1;e=e.replace(new RegExp(`[${i}]`,`gm${t}`),`[${i}]`),n.push(i)}return!0})}),e}createMergedBlanksRegExp(e){return e.replace(/[\s]+/gmi,"[\\s]+")}createAccuracyRegExp(e){const t="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿";let r=this.opt.accuracy,n=typeof r=="string"?r:r.value,a=typeof r=="string"?[]:r.limiters,i="";switch(a.forEach(s=>{i+=`|${this.escapeStr(s)}`}),n){case"partially":default:return`()(${e})`;case"complementary":return i="\\s"+(i||this.escapeStr(t)),`()([^${i}]*${e}[^${i}]*)`;case"exactly":return`(^|\\s${i})(${e})(?=$|\\s${i})`}}getSeparatedKeywords(e){let t=[];return e.forEach(r=>{this.opt.separateWordSearch?r.split(" ").forEach(n=>{n.trim()&&t.indexOf(n)===-1&&t.push(n)}):r.trim()&&t.indexOf(r)===-1&&t.push(r)}),{keywords:t.sort((r,n)=>n.length-r.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 r=0;return e.sort((n,a)=>n.start-a.start).forEach(n=>{let{start:a,end:i,valid:s}=this.callNoMatchOnInvalidRanges(n,r);s&&(n.start=a,n.length=i-a,t.push(n),r=i)}),t}callNoMatchOnInvalidRanges(e,t){let r,n,a=!1;return e&&typeof e.start<"u"?(r=parseInt(e.start,10),n=r+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&n-t>0&&n-r>0?a=!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:r,end:n,valid:a}}checkWhitespaceRanges(e,t,r){let n,a=!0,i=r.length,s=t-i,u=parseInt(e.start,10)-s;return u=u>i?i:u,n=u+parseInt(e.length,10),n>i&&(n=i,this.log(`End range automatically set to the max value of ${i}`)),u<0||n-u<0||u>i||n>i?(a=!1,this.log(`Invalid range: ${JSON.stringify(e)}`),this.opt.noMatch(e)):r.substring(u,n).replace(/\s+/g,"")===""&&(a=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:u,end:n,valid:a}}getTextNodes(e){let t="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,n=>{r.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:r})})}matchesExclude(e){return fe.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}wrapRangeInTextNode(e,t,r){const n=this.opt.element?this.opt.element:"mark",a=e.splitText(t),i=a.splitText(r-t);let s=document.createElement(n);return s.setAttribute("data-markjs","true"),this.opt.className&&s.setAttribute("class",this.opt.className),s.textContent=a.textContent,a.parentNode.replaceChild(s,a),i}wrapRangeInMappedTextNode(e,t,r,n,a){e.nodes.every((i,s)=>{const u=e.nodes[s+1];if(typeof u>"u"||u.start>t){if(!n(i.node))return!1;const l=t-i.start,h=(r>i.end?i.end:r)-i.start,d=e.value.substr(0,i.start),v=e.value.substr(h+i.start);if(i.node=this.wrapRangeInTextNode(i.node,l,h),e.value=d+v,e.nodes.forEach((m,b)=>{b>=s&&(e.nodes[b].start>0&&b!==s&&(e.nodes[b].start-=h),e.nodes[b].end-=h)}),r-=h,a(i.node.previousSibling,i.start),r>i.end)t=i.end;else return!1}return!0})}wrapMatches(e,t,r,n,a){const i=t===0?0:t+1;this.getTextNodes(s=>{s.nodes.forEach(u=>{u=u.node;let l;for(;(l=e.exec(u.textContent))!==null&&l[i]!=="";){if(!r(l[i],u))continue;let h=l.index;if(i!==0)for(let d=1;d<i;d++)h+=l[d].length;u=this.wrapRangeInTextNode(u,h,h+l[i].length),n(u.previousSibling),e.lastIndex=0}}),a()})}wrapMatchesAcrossElements(e,t,r,n,a){const i=t===0?0:t+1;this.getTextNodes(s=>{let u;for(;(u=e.exec(s.value))!==null&&u[i]!=="";){let l=u.index;if(i!==0)for(let d=1;d<i;d++)l+=u[d].length;const h=l+u[i].length;this.wrapRangeInMappedTextNode(s,l,h,d=>r(u[i],d),(d,v)=>{e.lastIndex=v,n(d)})}a()})}wrapRangeFromIndex(e,t,r,n){this.getTextNodes(a=>{const i=a.value.length;e.forEach((s,u)=>{let{start:l,end:h,valid:d}=this.checkWhitespaceRanges(s,i,a.value);d&&this.wrapRangeInMappedTextNode(a,l,h,v=>t(v,s,a.value.substring(l,h),u),v=>{r(v,s)})}),n()})}unwrapMatches(e){const t=e.parentNode;let r=document.createDocumentFragment();for(;e.firstChild;)r.appendChild(e.removeChild(e.firstChild));t.replaceChild(r,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 r=0,n="wrapMatches";const a=i=>{r++,this.opt.each(i)};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),this[n](e,this.opt.ignoreGroups,(i,s)=>this.opt.filter(s,i,r),a,()=>{r===0&&this.opt.noMatch(e),this.opt.done(r)})}mark(e,t){this.opt=t;let r=0,n="wrapMatches";const{keywords:a,length:i}=this.getSeparatedKeywords(typeof e=="string"?[e]:e),s=this.opt.caseSensitive?"":"i",u=l=>{let h=new RegExp(this.createRegExp(l),`gm${s}`),d=0;this.log(`Searching with expression "${h}"`),this[n](h,1,(v,m)=>this.opt.filter(m,l,r,d),v=>{d++,r++,this.opt.each(v)},()=>{d===0&&this.opt.noMatch(l),a[i-1]===l?this.opt.done(r):u(a[a.indexOf(l)+1])})};this.opt.acrossElements&&(n="wrapMatchesAcrossElements"),i===0?this.opt.done(r):u(a[0])}markRanges(e,t){this.opt=t;let r=0,n=this.checkRanges(e);n&&n.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(n)),this.wrapRangeFromIndex(n,(a,i,s,u)=>this.opt.filter(a,i,s,u),(a,i)=>{r++,this.opt.each(a,i)},()=>{this.opt.done(r)})):this.opt.done(r)}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,r=>{this.unwrapMatches(r)},r=>{const n=fe.matches(r,t),a=this.matchesExclude(r);return!n||a?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},this.opt.done)}};function _r(o){const e=new Or(o);return this.mark=(t,r)=>(e.mark(t,r),this),this.markRegExp=(t,r)=>(e.markRegExp(t,r),this),this.markRanges=(t,r)=>(e.markRanges(t,r),this),this.unmark=t=>(e.unmark(t),this),this}var W=function(){return W=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},W.apply(this,arguments)};function Rr(o,e,t,r){function n(a){return a instanceof t?a:new t(function(i){i(a)})}return new(t||(t=Promise))(function(a,i){function s(h){try{l(r.next(h))}catch(d){i(d)}}function u(h){try{l(r.throw(h))}catch(d){i(d)}}function l(h){h.done?a(h.value):n(h.value).then(s,u)}l((r=r.apply(o,e||[])).next())})}function Mr(o,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(l){return function(h){return u([l,h])}}function u(l){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,l[0]&&(t=0)),t;)try{if(r=1,n&&(a=l[0]&2?n.return:l[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,l[1])).done)return a;switch(n=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,n=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){t.label=l[1];break}if(l[0]===6&&t.label<a[1]){t.label=a[1],a=l;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(l);break}a[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(o,t)}catch(h){l=[6,h],n=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function D(o){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&o[e],r=0;if(t)return t.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&r>=o.length&&(o=void 0),{value:o&&o[r++],done:!o}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function K(o,e){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),n,a=[],i;try{for(;(e===void 0||e-- >0)&&!(n=r.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(i)throw i.error}}return a}var Lr="ENTRIES",Et="KEYS",St="VALUES",H="",Me=function(){function o(e,t){var r=e._tree,n=Array.from(r.keys());this.set=e,this._type=t,this._path=n.length>0?[{node:r,keys:n}]:[]}return o.prototype.next=function(){var e=this.dive();return this.backtrack(),e},o.prototype.dive=function(){if(this._path.length===0)return{done:!0,value:void 0};var e=ce(this._path),t=e.node,r=e.keys;if(ce(r)===H)return{done:!1,value:this.result()};var n=t.get(ce(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()},o.prototype.backtrack=function(){if(this._path.length!==0){var e=ce(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}},o.prototype.key=function(){return this.set._prefix+this._path.map(function(e){var t=e.keys;return ce(t)}).filter(function(e){return e!==H}).join("")},o.prototype.value=function(){return ce(this._path).node.get(H)},o.prototype.result=function(){switch(this._type){case St:return this.value();case Et:return this.key();default:return[this.key(),this.value()]}},o.prototype[Symbol.iterator]=function(){return this},o}(),ce=function(o){return o[o.length-1]},zr=function(o,e,t){var r=new Map;if(e===void 0)return r;for(var n=e.length+1,a=n+t,i=new Uint8Array(a*n).fill(t+1),s=0;s<n;++s)i[s]=s;for(var u=1;u<a;++u)i[u*n]=u;return At(o,e,t,r,i,1,n,""),r},At=function(o,e,t,r,n,a,i,s){var u,l,h=a*i;try{e:for(var d=D(o.keys()),v=d.next();!v.done;v=d.next()){var m=v.value;if(m===H){var b=n[h-1];b<=t&&r.set(s,[o.get(m),b])}else{for(var S=a,g=0;g<m.length;++g,++S){for(var A=m[g],T=i*S,F=T-i,L=n[T],R=Math.max(0,S-t-1),V=Math.min(i-1,S+t),N=R;N<V;++N){var _=A!==e[N],C=n[F+N]+ +_,O=n[F+N+1]+1,w=n[T+N]+1,c=n[T+N+1]=Math.min(C,O,w);c<L&&(L=c)}if(L>t)continue e}At(o.get(m),e,t,r,n,S,i,s+m)}}}catch(f){u={error:f}}finally{try{v&&!v.done&&(l=d.return)&&l.call(d)}finally{if(u)throw u.error}}},Le=function(){function o(e,t){e===void 0&&(e=new Map),t===void 0&&(t=""),this._size=void 0,this._tree=e,this._prefix=t}return o.prototype.atPrefix=function(e){var t,r;if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");var n=K(De(this._tree,e.slice(this._prefix.length)),2),a=n[0],i=n[1];if(a===void 0){var s=K(Ue(i),2),u=s[0],l=s[1];try{for(var h=D(u.keys()),d=h.next();!d.done;d=h.next()){var v=d.value;if(v!==H&&v.startsWith(l)){var m=new Map;return m.set(v.slice(l.length),u.get(v)),new o(m,e)}}}catch(b){t={error:b}}finally{try{d&&!d.done&&(r=h.return)&&r.call(h)}finally{if(t)throw t.error}}}return new o(a,e)},o.prototype.clear=function(){this._size=void 0,this._tree.clear()},o.prototype.delete=function(e){return this._size=void 0,Pr(this._tree,e)},o.prototype.entries=function(){return new Me(this,Lr)},o.prototype.forEach=function(e){var t,r;try{for(var n=D(this),a=n.next();!a.done;a=n.next()){var i=K(a.value,2),s=i[0],u=i[1];e(s,u,this)}}catch(l){t={error:l}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},o.prototype.fuzzyGet=function(e,t){return zr(this._tree,e,t)},o.prototype.get=function(e){var t=je(this._tree,e);return t!==void 0?t.get(H):void 0},o.prototype.has=function(e){var t=je(this._tree,e);return t!==void 0&&t.has(H)},o.prototype.keys=function(){return new Me(this,Et)},o.prototype.set=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=ze(this._tree,e);return r.set(H,t),this},Object.defineProperty(o.prototype,"size",{get:function(){if(this._size)return this._size;this._size=0;for(var e=this.entries();!e.next().done;)this._size+=1;return this._size},enumerable:!1,configurable:!0}),o.prototype.update=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=ze(this._tree,e);return r.set(H,t(r.get(H))),this},o.prototype.fetch=function(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;var r=ze(this._tree,e),n=r.get(H);return n===void 0&&r.set(H,n=t()),n},o.prototype.values=function(){return new Me(this,St)},o.prototype[Symbol.iterator]=function(){return this.entries()},o.from=function(e){var t,r,n=new o;try{for(var a=D(e),i=a.next();!i.done;i=a.next()){var s=K(i.value,2),u=s[0],l=s[1];n.set(u,l)}}catch(h){t={error:h}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return n},o.fromObject=function(e){return o.from(Object.entries(e))},o}(),De=function(o,e,t){var r,n;if(t===void 0&&(t=[]),e.length===0||o==null)return[o,t];try{for(var a=D(o.keys()),i=a.next();!i.done;i=a.next()){var s=i.value;if(s!==H&&e.startsWith(s))return t.push([o,s]),De(o.get(s),e.slice(s.length),t)}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return t.push([o,e]),De(void 0,"",t)},je=function(o,e){var t,r;if(e.length===0||o==null)return o;try{for(var n=D(o.keys()),a=n.next();!a.done;a=n.next()){var i=a.value;if(i!==H&&e.startsWith(i))return je(o.get(i),e.slice(i.length))}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},ze=function(o,e){var t,r,n=e.length;e:for(var a=0;o&&a<n;){try{for(var i=(t=void 0,D(o.keys())),s=i.next();!s.done;s=i.next()){var u=s.value;if(u!==H&&e[a]===u[0]){for(var l=Math.min(n-a,u.length),h=1;h<l&&e[a+h]===u[h];)++h;var d=o.get(u);if(h===u.length)o=d;else{var v=new Map;v.set(u.slice(h),d),o.set(e.slice(a,a+h),v),o.delete(u),o=v}a+=h;continue e}}}catch(b){t={error:b}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}var m=new Map;return o.set(e.slice(a),m),m}return o},Pr=function(o,e){var t=K(De(o,e),2),r=t[0],n=t[1];if(r!==void 0){if(r.delete(H),r.size===0)Ct(n);else if(r.size===1){var a=K(r.entries().next().value,2),i=a[0],s=a[1];Tt(n,i,s)}}},Ct=function(o){if(o.length!==0){var e=K(Ue(o),2),t=e[0],r=e[1];if(t.delete(r),t.size===0)Ct(o.slice(0,-1));else if(t.size===1){var n=K(t.entries().next().value,2),a=n[0],i=n[1];a!==H&&Tt(o.slice(0,-1),a,i)}}},Tt=function(o,e,t){if(o.length!==0){var r=K(Ue(o),2),n=r[0],a=r[1];n.set(a+e,t),n.delete(a)}},Ue=function(o){return o[o.length-1]},ye,He="or",Nt="and",Br="and_not",Vr=function(){function o(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');var t=e.autoVacuum==null||e.autoVacuum===!0?Ve:e.autoVacuum;this._options=W(W(W({},Be),e),{autoVacuum:t,searchOptions:W(W({},ht),e.searchOptions||{}),autoSuggestOptions:W(W({},Jr),e.autoSuggestOptions||{})}),this._index=new Le,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=Je,this.addFields(this._options.fields)}return o.prototype.add=function(e){var t,r,n,a,i,s,u=this._options,l=u.extractField,h=u.tokenize,d=u.processTerm,v=u.fields,m=u.idField,b=l(e,m);if(b==null)throw new Error('MiniSearch: document does not have ID field "'.concat(m,'"'));if(this._idToShortId.has(b))throw new Error("MiniSearch: duplicate ID ".concat(b));var S=this.addDocumentId(b);this.saveStoredFields(S,e);try{for(var g=D(v),A=g.next();!A.done;A=g.next()){var T=A.value,F=l(e,T);if(F!=null){var L=h(F.toString(),T),R=this._fieldIds[T],V=new Set(L).size;this.addFieldLength(S,R,this._documentCount-1,V);try{for(var N=(n=void 0,D(L)),_=N.next();!_.done;_=N.next()){var C=_.value,O=d(C,T);if(Array.isArray(O))try{for(var w=(i=void 0,D(O)),c=w.next();!c.done;c=w.next()){var f=c.value;this.addTerm(R,S,f)}}catch(p){i={error:p}}finally{try{c&&!c.done&&(s=w.return)&&s.call(w)}finally{if(i)throw i.error}}else O&&this.addTerm(R,S,O)}}catch(p){n={error:p}}finally{try{_&&!_.done&&(a=N.return)&&a.call(N)}finally{if(n)throw n.error}}}}}catch(p){t={error:p}}finally{try{A&&!A.done&&(r=g.return)&&r.call(g)}finally{if(t)throw t.error}}},o.prototype.addAll=function(e){var t,r;try{for(var n=D(e),a=n.next();!a.done;a=n.next()){var i=a.value;this.add(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},o.prototype.addAllAsync=function(e,t){var r=this;t===void 0&&(t={});var n=t.chunkSize,a=n===void 0?10:n,i={chunk:[],promise:Promise.resolve()},s=e.reduce(function(h,d,v){var m=h.chunk,b=h.promise;return m.push(d),(v+1)%a===0?{chunk:[],promise:b.then(function(){return new Promise(function(S){return setTimeout(S,0)})}).then(function(){return r.addAll(m)})}:{chunk:m,promise:b}},i),u=s.chunk,l=s.promise;return l.then(function(){return r.addAll(u)})},o.prototype.remove=function(e){var t,r,n,a,i,s,u=this._options,l=u.tokenize,h=u.processTerm,d=u.extractField,v=u.fields,m=u.idField,b=d(e,m);if(b==null)throw new Error('MiniSearch: document does not have ID field "'.concat(m,'"'));var S=this._idToShortId.get(b);if(S==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(b,": it is not in the index"));try{for(var g=D(v),A=g.next();!A.done;A=g.next()){var T=A.value,F=d(e,T);if(F!=null){var L=l(F.toString(),T),R=this._fieldIds[T],V=new Set(L).size;this.removeFieldLength(S,R,this._documentCount,V);try{for(var N=(n=void 0,D(L)),_=N.next();!_.done;_=N.next()){var C=_.value,O=h(C,T);if(Array.isArray(O))try{for(var w=(i=void 0,D(O)),c=w.next();!c.done;c=w.next()){var f=c.value;this.removeTerm(R,S,f)}}catch(p){i={error:p}}finally{try{c&&!c.done&&(s=w.return)&&s.call(w)}finally{if(i)throw i.error}}else O&&this.removeTerm(R,S,O)}}catch(p){n={error:p}}finally{try{_&&!_.done&&(a=N.return)&&a.call(N)}finally{if(n)throw n.error}}}}}catch(p){t={error:p}}finally{try{A&&!A.done&&(r=g.return)&&r.call(g)}finally{if(t)throw t.error}}this._storedFields.delete(S),this._documentIds.delete(S),this._idToShortId.delete(b),this._fieldLength.delete(S),this._documentCount-=1},o.prototype.removeAll=function(e){var t,r;if(e)try{for(var n=D(e),a=n.next();!a.done;a=n.next()){var i=a.value;this.remove(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Le,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}},o.prototype.discard=function(e){var t=this,r=this._idToShortId.get(e);if(r==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(r),this._storedFields.delete(r),(this._fieldLength.get(r)||[]).forEach(function(n,a){t.removeFieldLength(r,a,t._documentCount,n)}),this._fieldLength.delete(r),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()},o.prototype.maybeAutoVacuum=function(){if(this._options.autoVacuum!==!1){var e=this._options.autoVacuum,t=e.minDirtFactor,r=e.minDirtCount,n=e.batchSize,a=e.batchWait;this.conditionalVacuum({batchSize:n,batchWait:a},{minDirtCount:r,minDirtFactor:t})}},o.prototype.discardAll=function(e){var t,r,n=this._options.autoVacuum;try{this._options.autoVacuum=!1;try{for(var a=D(e),i=a.next();!i.done;i=a.next()){var s=i.value;this.discard(s)}}catch(u){t={error:u}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}finally{this._options.autoVacuum=n}this.maybeAutoVacuum()},o.prototype.replace=function(e){var t=this._options,r=t.idField,n=t.extractField,a=n(e,r);this.discard(a),this.add(e)},o.prototype.vacuum=function(e){return e===void 0&&(e={}),this.conditionalVacuum(e)},o.prototype.conditionalVacuum=function(e,t){var r=this;return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(function(){var n=r._enqueuedVacuumConditions;return r._enqueuedVacuumConditions=Je,r.performVacuuming(e,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)},o.prototype.performVacuuming=function(e,t){return Rr(this,void 0,void 0,function(){var r,n,a,i,s,u,l,h,d,v,m,b,S,g,A,T,F,L,R,V,N,_,C,O,w;return Mr(this,function(c){switch(c.label){case 0:if(r=this._dirtCount,!this.vacuumConditionsMet(t))return[3,10];n=e.batchSize||Ke.batchSize,a=e.batchWait||Ke.batchWait,i=1,c.label=1;case 1:c.trys.push([1,7,8,9]),s=D(this._index),u=s.next(),c.label=2;case 2:if(u.done)return[3,6];l=K(u.value,2),h=l[0],d=l[1];try{for(v=(_=void 0,D(d)),m=v.next();!m.done;m=v.next()){b=K(m.value,2),S=b[0],g=b[1];try{for(A=(O=void 0,D(g)),T=A.next();!T.done;T=A.next())F=K(T.value,1),L=F[0],!this._documentIds.has(L)&&(g.size<=1?d.delete(S):g.delete(L))}catch(f){O={error:f}}finally{try{T&&!T.done&&(w=A.return)&&w.call(A)}finally{if(O)throw O.error}}}}catch(f){_={error:f}}finally{try{m&&!m.done&&(C=v.return)&&C.call(v)}finally{if(_)throw _.error}}return this._index.get(h).size===0&&this._index.delete(h),i%n!==0?[3,4]:[4,new Promise(function(f){return setTimeout(f,a)})];case 3:c.sent(),c.label=4;case 4:i+=1,c.label=5;case 5:return u=s.next(),[3,2];case 6:return[3,9];case 7:return R=c.sent(),V={error:R},[3,9];case 8:try{u&&!u.done&&(N=s.return)&&N.call(s)}finally{if(V)throw V.error}return[7];case 9:this._dirtCount-=r,c.label=10;case 10:return[4,null];case 11:return c.sent(),this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null,[2]}})})},o.prototype.vacuumConditionsMet=function(e){if(e==null)return!0;var t=e.minDirtCount,r=e.minDirtFactor;return t=t||Ve.minDirtCount,r=r||Ve.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=r},Object.defineProperty(o.prototype,"isVacuuming",{get:function(){return this._currentVacuum!=null},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtCount",{get:function(){return this._dirtCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"dirtFactor",{get:function(){return this._dirtCount/(1+this._documentCount+this._dirtCount)},enumerable:!1,configurable:!0}),o.prototype.has=function(e){return this._idToShortId.has(e)},o.prototype.getStoredFields=function(e){var t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)},o.prototype.search=function(e,t){var r,n;t===void 0&&(t={});var a=this.executeQuery(e,t),i=[];try{for(var s=D(a),u=s.next();!u.done;u=s.next()){var l=K(u.value,2),h=l[0],d=l[1],v=d.score,m=d.terms,b=d.match,S=m.length||1,g={id:this._documentIds.get(h),score:v*S,terms:Object.keys(b),queryTerms:m,match:b};Object.assign(g,this._storedFields.get(h)),(t.filter==null||t.filter(g))&&i.push(g)}}catch(A){r={error:A}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return e===o.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(vt),i},o.prototype.autoSuggest=function(e,t){var r,n,a,i;t===void 0&&(t={}),t=W(W({},this._options.autoSuggestOptions),t);var s=new Map;try{for(var u=D(this.search(e,t)),l=u.next();!l.done;l=u.next()){var h=l.value,d=h.score,v=h.terms,m=v.join(" "),b=s.get(m);b!=null?(b.score+=d,b.count+=1):s.set(m,{score:d,terms:v,count:1})}}catch(R){r={error:R}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}var S=[];try{for(var g=D(s),A=g.next();!A.done;A=g.next()){var T=K(A.value,2),b=T[0],F=T[1],d=F.score,v=F.terms,L=F.count;S.push({suggestion:b,terms:v,score:d/L})}}catch(R){a={error:R}}finally{try{A&&!A.done&&(i=g.return)&&i.call(g)}finally{if(a)throw a.error}}return S.sort(vt),S},Object.defineProperty(o.prototype,"documentCount",{get:function(){return this._documentCount},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"termCount",{get:function(){return this._index.size},enumerable:!1,configurable:!0}),o.loadJSON=function(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)},o.getDefault=function(e){if(Be.hasOwnProperty(e))return Pe(Be,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))},o.loadJS=function(e,t){var r,n,a,i,s,u,l=e.index,h=e.documentCount,d=e.nextId,v=e.documentIds,m=e.fieldIds,b=e.fieldLength,S=e.averageFieldLength,g=e.storedFields,A=e.dirtCount,T=e.serializationVersion;if(T!==1&&T!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");var F=new o(t);F._documentCount=h,F._nextId=d,F._documentIds=Ce(v),F._idToShortId=new Map,F._fieldIds=m,F._fieldLength=Ce(b),F._avgFieldLength=S,F._storedFields=Ce(g),F._dirtCount=A||0,F._index=new Le;try{for(var L=D(F._documentIds),R=L.next();!R.done;R=L.next()){var V=K(R.value,2),N=V[0],_=V[1];F._idToShortId.set(_,N)}}catch(P){r={error:P}}finally{try{R&&!R.done&&(n=L.return)&&n.call(L)}finally{if(r)throw r.error}}try{for(var C=D(l),O=C.next();!O.done;O=C.next()){var w=K(O.value,2),c=w[0],f=w[1],p=new Map;try{for(var k=(s=void 0,D(Object.keys(f))),I=k.next();!I.done;I=k.next()){var M=I.value,z=f[M];T===1&&(z=z.ds),p.set(parseInt(M,10),Ce(z))}}catch(P){s={error:P}}finally{try{I&&!I.done&&(u=k.return)&&u.call(k)}finally{if(s)throw s.error}}F._index.set(c,p)}}catch(P){a={error:P}}finally{try{O&&!O.done&&(i=C.return)&&i.call(C)}finally{if(a)throw a.error}}return F},o.prototype.executeQuery=function(e,t){var r=this;if(t===void 0&&(t={}),e===o.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){var n=W(W(W({},t),e),{queries:void 0}),a=e.queries.map(function(g){return r.executeQuery(g,n)});return this.combineResults(a,n.combineWith)}var i=this._options,s=i.tokenize,u=i.processTerm,l=i.searchOptions,h=W(W({tokenize:s,processTerm:u},l),t),d=h.tokenize,v=h.processTerm,m=d(e).flatMap(function(g){return v(g)}).filter(function(g){return!!g}),b=m.map(Kr(h)),S=b.map(function(g){return r.executeQuerySpec(g,h)});return this.combineResults(S,h.combineWith)},o.prototype.executeQuerySpec=function(e,t){var r,n,a,i,s=W(W({},this._options.searchOptions),t),u=(s.fields||this._options.fields).reduce(function(M,z){var P;return W(W({},M),(P={},P[z]=Pe(s.boost,z)||1,P))},{}),l=s.boostDocument,h=s.weights,d=s.maxFuzzy,v=s.bm25,m=W(W({},ht.weights),h),b=m.fuzzy,S=m.prefix,g=this._index.get(e.term),A=this.termResults(e.term,e.term,1,g,u,l,v),T,F;if(e.prefix&&(T=this._index.atPrefix(e.term)),e.fuzzy){var L=e.fuzzy===!0?.2:e.fuzzy,R=L<1?Math.min(d,Math.round(e.term.length*L)):L;R&&(F=this._index.fuzzyGet(e.term,R))}if(T)try{for(var V=D(T),N=V.next();!N.done;N=V.next()){var _=K(N.value,2),C=_[0],O=_[1],w=C.length-e.term.length;if(w){F==null||F.delete(C);var c=S*C.length/(C.length+.3*w);this.termResults(e.term,C,c,O,u,l,v,A)}}}catch(M){r={error:M}}finally{try{N&&!N.done&&(n=V.return)&&n.call(V)}finally{if(r)throw r.error}}if(F)try{for(var f=D(F.keys()),p=f.next();!p.done;p=f.next()){var C=p.value,k=K(F.get(C),2),I=k[0],w=k[1];if(w){var c=b*C.length/(C.length+w);this.termResults(e.term,C,c,I,u,l,v,A)}}}catch(M){a={error:M}}finally{try{p&&!p.done&&(i=f.return)&&i.call(f)}finally{if(a)throw a.error}}return A},o.prototype.executeWildcardQuery=function(e){var t,r,n=new Map,a=W(W({},this._options.searchOptions),e);try{for(var i=D(this._documentIds),s=i.next();!s.done;s=i.next()){var u=K(s.value,2),l=u[0],h=u[1],d=a.boostDocument?a.boostDocument(h,"",this._storedFields.get(l)):1;n.set(l,{score:d,terms:[],match:{}})}}catch(v){t={error:v}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},o.prototype.combineResults=function(e,t){if(t===void 0&&(t=He),e.length===0)return new Map;var r=t.toLowerCase();return e.reduce($r[r])||new Map},o.prototype.toJSON=function(){var e,t,r,n,a=[];try{for(var i=D(this._index),s=i.next();!s.done;s=i.next()){var u=K(s.value,2),l=u[0],h=u[1],d={};try{for(var v=(r=void 0,D(h)),m=v.next();!m.done;m=v.next()){var b=K(m.value,2),S=b[0],g=b[1];d[S]=Object.fromEntries(g)}}catch(A){r={error:A}}finally{try{m&&!m.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}a.push([l,d])}}catch(A){e={error:A}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}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:a,serializationVersion:2}},o.prototype.termResults=function(e,t,r,n,a,i,s,u){var l,h,d,v,m;if(u===void 0&&(u=new Map),n==null)return u;try{for(var b=D(Object.keys(a)),S=b.next();!S.done;S=b.next()){var g=S.value,A=a[g],T=this._fieldIds[g],F=n.get(T);if(F!=null){var L=F.size,R=this._avgFieldLength[T];try{for(var V=(d=void 0,D(F.keys())),N=V.next();!N.done;N=V.next()){var _=N.value;if(!this._documentIds.has(_)){this.removeTerm(T,_,t),L-=1;continue}var C=i?i(this._documentIds.get(_),t,this._storedFields.get(_)):1;if(C){var O=F.get(_),w=this._fieldLength.get(_)[T],c=jr(O,L,this._documentCount,w,R,s),f=r*A*C*c,p=u.get(_);if(p){p.score+=f,Ur(p.terms,e);var k=Pe(p.match,t);k?k.push(g):p.match[t]=[g]}else u.set(_,{score:f,terms:[e],match:(m={},m[t]=[g],m)})}}}catch(I){d={error:I}}finally{try{N&&!N.done&&(v=V.return)&&v.call(V)}finally{if(d)throw d.error}}}}}catch(I){l={error:I}}finally{try{S&&!S.done&&(h=b.return)&&h.call(b)}finally{if(l)throw l.error}}return u},o.prototype.addTerm=function(e,t,r){var n=this._index.fetch(r,pt),a=n.get(e);if(a==null)a=new Map,a.set(t,1),n.set(e,a);else{var i=a.get(t);a.set(t,(i||0)+1)}},o.prototype.removeTerm=function(e,t,r){if(!this._index.has(r)){this.warnDocumentChanged(t,e,r);return}var n=this._index.fetch(r,pt),a=n.get(e);a==null||a.get(t)==null?this.warnDocumentChanged(t,e,r):a.get(t)<=1?a.size<=1?n.delete(e):a.delete(t):a.set(t,a.get(t)-1),this._index.get(r).size===0&&this._index.delete(r)},o.prototype.warnDocumentChanged=function(e,t,r){var n,a;try{for(var i=D(Object.keys(this._fieldIds)),s=i.next();!s.done;s=i.next()){var u=s.value;if(this._fieldIds[u]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(r,'" was not present in field "').concat(u,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}}catch(l){n={error:l}}finally{try{s&&!s.done&&(a=i.return)&&a.call(i)}finally{if(n)throw n.error}}},o.prototype.addDocumentId=function(e){var t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t},o.prototype.addFields=function(e){for(var t=0;t<e.length;t++)this._fieldIds[e[t]]=t},o.prototype.addFieldLength=function(e,t,r,n){var a=this._fieldLength.get(e);a==null&&this._fieldLength.set(e,a=[]),a[t]=n;var i=this._avgFieldLength[t]||0,s=i*r+n;this._avgFieldLength[t]=s/(r+1)},o.prototype.removeFieldLength=function(e,t,r,n){if(r===1){this._avgFieldLength[t]=0;return}var a=this._avgFieldLength[t]*r-n;this._avgFieldLength[t]=a/(r-1)},o.prototype.saveStoredFields=function(e,t){var r,n,a=this._options,i=a.storeFields,s=a.extractField;if(!(i==null||i.length===0)){var u=this._storedFields.get(e);u==null&&this._storedFields.set(e,u={});try{for(var l=D(i),h=l.next();!h.done;h=l.next()){var d=h.value,v=s(t,d);v!==void 0&&(u[d]=v)}}catch(m){r={error:m}}finally{try{h&&!h.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}},o.wildcard=Symbol("*"),o}(),Pe=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)?o[e]:void 0},$r=(ye={},ye[He]=function(o,e){var t,r;try{for(var n=D(e.keys()),a=n.next();!a.done;a=n.next()){var i=a.value,s=o.get(i);if(s==null)o.set(i,e.get(i));else{var u=e.get(i),l=u.score,h=u.terms,d=u.match;s.score=s.score+l,s.match=Object.assign(s.match,d),dt(s.terms,h)}}}catch(v){t={error:v}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return o},ye[Nt]=function(o,e){var t,r,n=new Map;try{for(var a=D(e.keys()),i=a.next();!i.done;i=a.next()){var s=i.value,u=o.get(s);if(u!=null){var l=e.get(s),h=l.score,d=l.terms,v=l.match;dt(u.terms,d),n.set(s,{score:u.score+h,terms:u.terms,match:Object.assign(u.match,v)})}}}catch(m){t={error:m}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return n},ye[Br]=function(o,e){var t,r;try{for(var n=D(e.keys()),a=n.next();!a.done;a=n.next()){var i=a.value;o.delete(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return o},ye),Wr={k:1.2,b:.7,d:.5},jr=function(o,e,t,r,n,a){var i=a.k,s=a.b,u=a.d,l=Math.log(1+(t-e+.5)/(e+.5));return l*(u+o*(i+1)/(o+i*(1-s+s*r/n)))},Kr=function(o){return function(e,t,r){var n=typeof o.fuzzy=="function"?o.fuzzy(e,t,r):o.fuzzy||!1,a=typeof o.prefix=="function"?o.prefix(e,t,r):o.prefix===!0;return{term:e,fuzzy:n,prefix:a}}},Be={idField:"id",extractField:function(o,e){return o[e]},tokenize:function(o){return o.split(Hr)},processTerm:function(o){return o.toLowerCase()},fields:void 0,searchOptions:void 0,storeFields:[],logger:function(o,e){typeof(console==null?void 0:console[o])=="function"&&console[o](e)},autoVacuum:!0},ht={combineWith:He,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:Wr},Jr={combineWith:Nt,prefix:function(o,e,t){return e===t.length-1}},Ke={batchSize:1e3,batchWait:10},Je={minDirtFactor:.1,minDirtCount:20},Ve=W(W({},Ke),Je),Ur=function(o,e){o.includes(e)||o.push(e)},dt=function(o,e){var t,r;try{for(var n=D(e),a=n.next();!a.done;a=n.next()){var i=a.value;o.includes(i)||o.push(i)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},vt=function(o,e){var t=o.score,r=e.score;return r-t},pt=function(){return new Map},Ce=function(o){var e,t,r=new Map;try{for(var n=D(Object.keys(o)),a=n.next();!a.done;a=n.next()){var i=a.value;r.set(parseInt(i,10),o[i])}}catch(s){e={error:s}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},Hr=/[\n\r -#%-*,-/:;?@[-\]_{}\u00A0\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u1680\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2000-\u200A\u2010-\u2029\u202F-\u2043\u2045-\u2051\u2053-\u205F\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u3000-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]+/u;class Gr{constructor(e=10){Oe(this,"max");Oe(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 Y=o=>(qt("data-v-dd73f37c"),o=o(),Qt(),o),qr=["aria-owns"],Qr={class:"shell"},Yr=["title"],Zr=Y(()=>E("svg",{class:"search-icon",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[E("circle",{cx:"11",cy:"11",r:"8"}),E("path",{d:"m21 21l-4.35-4.35"})])],-1)),Xr=[Zr],ea={class:"search-actions before"},ta=["title"],ra=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 12H5m7 7l-7-7l7-7"})],-1)),aa=[ra],na=["placeholder"],ia={class:"search-actions"},oa=["title"],sa=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 14h7v7H3zM3 3h7v7H3zm11 1h7m-7 5h7m-7 6h7m-7 5h7"})],-1)),ua=[sa],la=["disabled","title"],ca=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 5H9l-7 7l7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2Zm-2 4l-6 6m0-6l6 6"})],-1)),fa=[ca],ha=["id","role","aria-labelledby"],da=["aria-selected"],va=["href","aria-label","onMouseenter","onFocusin"],pa={class:"titles"},ma=Y(()=>E("span",{class:"title-icon"},"#",-1)),ya=["innerHTML"],ga=Y(()=>E("svg",{width:"18",height:"18",viewBox:"0 0 24 24"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"})],-1)),ba={class:"title main"},wa=["innerHTML"],xa={key:0,class:"excerpt-wrapper"},Fa={key:0,class:"excerpt",inert:""},Ea=["innerHTML"],Sa=Y(()=>E("div",{class:"excerpt-gradient-bottom"},null,-1)),Aa=Y(()=>E("div",{class:"excerpt-gradient-top"},null,-1)),Ca={key:0,class:"no-results"},Ta={class:"search-keyboard-shortcuts"},Na=["aria-label"],ka=Y(()=>E("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 19V5m-7 7l7-7l7 7"})],-1)),Ia=[ka],Da=["aria-label"],Oa=Y(()=>E("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[E("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 5v14m7-7l-7 7l-7-7"})],-1)),_a=[Oa],Ra=["aria-label"],Ma=Y(()=>E("svg",{width:"14",height:"14",viewBox:"0 0 24 24"},[E("g",{fill:"none",stroke:"currentcolor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[E("path",{d:"m9 10l-5 5l5 5"}),E("path",{d:"M20 4v7a4 4 0 0 1-4 4H4"})])],-1)),La=[Ma],za=["aria-label"],Pa=_t({__name:"VPLocalSearchBox",emits:["close"],setup(o,{emit:e}){var z,P;const t=e,r=xe(),n=xe(),a=xe(nr),i=rr(),{activate:s}=Dr(r,{immediate:!0,allowOutsideClick:!0,clickOutsideDeactivates:!0,escapeDeactivates:!0}),{localeIndex:u,theme:l}=i,h=tt(async()=>{var y,x,$,j,G,q,B,J,Z;return it(Vr.loadJSON(($=await((x=(y=a.value)[u.value])==null?void 0:x.call(y)))==null?void 0:$.default,{fields:["title","titles","text"],storeFields:["title","titles"],searchOptions:{fuzzy:.2,prefix:!0,boost:{title:4,text:2,titles:1},...((j=l.value.search)==null?void 0:j.provider)==="local"&&((q=(G=l.value.search.options)==null?void 0:G.miniSearch)==null?void 0:q.searchOptions)},...((B=l.value.search)==null?void 0:B.provider)==="local"&&((Z=(J=l.value.search.options)==null?void 0:J.miniSearch)==null?void 0:Z.options)}))}),v=Fe(()=>{var y,x;return((y=l.value.search)==null?void 0:y.provider)==="local"&&((x=l.value.search.options)==null?void 0:x.disableQueryPersistence)===!0}).value?oe(""):Rt("vitepress:local-search-filter",""),m=Mt("vitepress:local-search-detailed-list",((z=l.value.search)==null?void 0:z.provider)==="local"&&((P=l.value.search.options)==null?void 0:P.detailedView)===!0),b=Fe(()=>{var y,x,$;return((y=l.value.search)==null?void 0:y.provider)==="local"&&(((x=l.value.search.options)==null?void 0:x.disableDetailedView)===!0||(($=l.value.search.options)==null?void 0:$.detailedView)===!1)}),S=Fe(()=>{var x,$,j,G,q,B,J;const y=((x=l.value.search)==null?void 0:x.options)??l.value.algolia;return((q=(G=(j=($=y==null?void 0:y.locales)==null?void 0:$[u.value])==null?void 0:j.translations)==null?void 0:G.button)==null?void 0:q.buttonText)||((J=(B=y==null?void 0:y.translations)==null?void 0:B.button)==null?void 0:J.buttonText)||"Search"});Lt(()=>{b.value&&(m.value=!1)});const g=xe([]),A=oe(!1);$e(v,()=>{A.value=!1});const T=tt(async()=>{if(n.value)return it(new _r(n.value))},null),F=new Gr(16);zt(()=>[h.value,v.value,m.value],async([y,x,$],j,G)=>{var be,Ge,qe,Qe;(j==null?void 0:j[0])!==y&&F.clear();let q=!1;if(G(()=>{q=!0}),!y)return;g.value=y.search(x).slice(0,16),A.value=!0;const B=$?await Promise.all(g.value.map(Q=>L(Q.id))):[];if(q)return;for(const{id:Q,mod:ae}of B){const ne=Q.slice(0,Q.indexOf("#"));let te=F.get(ne);if(te)continue;te=new Map,F.set(ne,te);const X=ae.default??ae;if(X!=null&&X.render||X!=null&&X.setup){const ie=Yt(X);ie.config.warnHandler=()=>{},ie.provide(Zt,i),Object.defineProperties(ie.config.globalProperties,{$frontmatter:{get(){return i.frontmatter.value}},$params:{get(){return i.page.value.params}}});const Ye=document.createElement("div");ie.mount(Ye),Ye.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(he=>{var et;const we=(et=he.querySelector("a"))==null?void 0:et.getAttribute("href"),Ze=(we==null?void 0:we.startsWith("#"))&&we.slice(1);if(!Ze)return;let Xe="";for(;(he=he.nextElementSibling)&&!/^h[1-6]$/i.test(he.tagName);)Xe+=he.outerHTML;te.set(Ze,Xe)}),ie.unmount()}if(q)return}const J=new Set;if(g.value=g.value.map(Q=>{const[ae,ne]=Q.id.split("#"),te=F.get(ae),X=(te==null?void 0:te.get(ne))??"";for(const ie in Q.match)J.add(ie);return{...Q,text:X}}),await de(),q)return;await new Promise(Q=>{var ae;(ae=T.value)==null||ae.unmark({done:()=>{var ne;(ne=T.value)==null||ne.markRegExp(M(J),{done:Q})}})});const Z=((be=r.value)==null?void 0:be.querySelectorAll(".result .excerpt"))??[];for(const Q of Z)(Ge=Q.querySelector('mark[data-markjs="true"]'))==null||Ge.scrollIntoView({block:"center"});(Qe=(qe=n.value)==null?void 0:qe.firstElementChild)==null||Qe.scrollIntoView({block:"start"})},{debounce:200,immediate:!0});async function L(y){const x=Xt(y.slice(0,y.indexOf("#")));try{if(!x)throw new Error(`Cannot find file for id: ${y}`);return{id:y,mod:await mt(()=>import(((u)=>{if(u.startsWith('/')){return"https://registry.npmmirror.com/@gkd-kit/docs/0.0.1709887931245/files/.vitepress/dist"+u}return u})(x)),__vite__mapDeps([]))}}catch($){return console.error($),{id:y,mod:{}}}}const R=oe(),V=Fe(()=>{var y;return((y=v.value)==null?void 0:y.length)<=0});function N(y=!0){var x,$;(x=R.value)==null||x.focus(),y&&(($=R.value)==null||$.select())}_e(()=>{N()});function _(y){y.pointerType==="mouse"&&N()}const C=oe(-1),O=oe(!1);$e(g,y=>{C.value=y.length?0:-1,w()});function w(){de(()=>{const y=document.querySelector(".result.selected");y&&y.scrollIntoView({block:"nearest"})})}Ee("ArrowUp",y=>{y.preventDefault(),C.value--,C.value<0&&(C.value=g.value.length-1),O.value=!0,w()}),Ee("ArrowDown",y=>{y.preventDefault(),C.value++,C.value>=g.value.length&&(C.value=0),O.value=!0,w()});const c=Pt();Ee("Enter",y=>{if(y.isComposing||y.target instanceof HTMLButtonElement&&y.target.type!=="submit")return;const x=g.value[C.value];if(y.target instanceof HTMLInputElement&&!x){y.preventDefault();return}x&&(c.go(x.id),t("close"))}),Ee("Escape",()=>{t("close")});const p=ar({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"}}});_e(()=>{window.history.pushState(null,"",null)}),Bt("popstate",y=>{y.preventDefault(),t("close")});const k=Vt($t?document.body:null);_e(()=>{de(()=>{k.value=!0,de().then(()=>s())})}),Wt(()=>{k.value=!1});function I(){v.value="",de().then(()=>N(!1))}function M(y){return new RegExp([...y].sort((x,$)=>$.length-x.length).map(x=>`(${er(x)})`).join("|"),"gi")}return(y,x)=>{var $,j,G,q;return ee(),jt(Gt,{to:"body"},[E("div",{ref_key:"el",ref:r,role:"button","aria-owns":($=g.value)!=null&&$.length?"localsearch-list":void 0,"aria-expanded":"true","aria-haspopup":"listbox","aria-labelledby":"localsearch-label",class:"VPLocalSearchBox"},[E("div",{class:"backdrop",onClick:x[0]||(x[0]=B=>y.$emit("close"))}),E("div",Qr,[E("form",{class:"search-bar",onPointerup:x[4]||(x[4]=B=>_(B)),onSubmit:x[5]||(x[5]=Kt(()=>{},["prevent"]))},[E("label",{title:S.value,id:"localsearch-label",for:"localsearch-input"},Xr,8,Yr),E("div",ea,[E("button",{class:"back-button",title:U(p)("modal.backButtonTitle"),onClick:x[1]||(x[1]=B=>y.$emit("close"))},aa,8,ta)]),Jt(E("input",{ref_key:"searchInput",ref:R,"onUpdate:modelValue":x[2]||(x[2]=B=>Ht(v)?v.value=B:null),placeholder:S.value,id:"localsearch-input","aria-labelledby":"localsearch-label",class:"search-input"},null,8,na),[[Ut,U(v)]]),E("div",ia,[b.value?Se("",!0):(ee(),re("button",{key:0,class:rt(["toggle-layout-button",{"detailed-list":U(m)}]),type:"button",title:U(p)("modal.displayDetails"),onClick:x[3]||(x[3]=B=>C.value>-1&&(m.value=!U(m)))},ua,10,oa)),E("button",{class:"clear-button",type:"reset",disabled:V.value,title:U(p)("modal.resetButtonTitle"),onClick:I},fa,8,la)])],32),E("ul",{ref_key:"resultsEl",ref:n,id:(j=g.value)!=null&&j.length?"localsearch-list":void 0,role:(G=g.value)!=null&&G.length?"listbox":void 0,"aria-labelledby":(q=g.value)!=null&&q.length?"localsearch-label":void 0,class:"results",onMousemove:x[7]||(x[7]=B=>O.value=!1)},[(ee(!0),re(nt,null,at(g.value,(B,J)=>(ee(),re("li",{key:B.id,role:"option","aria-selected":C.value===J?"true":"false"},[E("a",{href:B.id,class:rt(["result",{selected:C.value===J}]),"aria-label":[...B.titles,B.title].join(" > "),onMouseenter:Z=>!O.value&&(C.value=J),onFocusin:Z=>C.value=J,onClick:x[6]||(x[6]=Z=>y.$emit("close"))},[E("div",null,[E("div",pa,[ma,(ee(!0),re(nt,null,at(B.titles,(Z,be)=>(ee(),re("span",{key:be,class:"title"},[E("span",{class:"text",innerHTML:Z},null,8,ya),ga]))),128)),E("span",ba,[E("span",{class:"text",innerHTML:B.title},null,8,wa)])]),U(m)?(ee(),re("div",xa,[B.text?(ee(),re("div",Fa,[E("div",{class:"vp-doc",innerHTML:B.text},null,8,Ea)])):Se("",!0),Sa,Aa])):Se("",!0)])],42,va)],8,da))),128)),U(v)&&!g.value.length&&A.value?(ee(),re("li",Ca,[ve(pe(U(p)("modal.noResultsText"))+' "',1),E("strong",null,pe(U(v)),1),ve('" ')])):Se("",!0)],40,ha),E("div",Ta,[E("span",null,[E("kbd",{"aria-label":U(p)("modal.footer.navigateUpKeyAriaLabel")},Ia,8,Na),E("kbd",{"aria-label":U(p)("modal.footer.navigateDownKeyAriaLabel")},_a,8,Da),ve(" "+pe(U(p)("modal.footer.navigateText")),1)]),E("span",null,[E("kbd",{"aria-label":U(p)("modal.footer.selectKeyAriaLabel")},La,8,Ra),ve(" "+pe(U(p)("modal.footer.selectText")),1)]),E("span",null,[E("kbd",{"aria-label":U(p)("modal.footer.closeKeyAriaLabel")},"esc",8,za),ve(" "+pe(U(p)("modal.footer.closeText")),1)])])])],8,qr)])}}}),Ka=tr(Pa,[["__scopeId","data-v-dd73f37c"]]);export{Ka as default};
8
8
  function __vite__mapDeps(indexes) {
9
9
  if (!__vite__mapDeps.viteFileDeps) {
10
10
  __vite__mapDeps.viteFileDeps = []