@aiquants/markdown-explorer 0.5.0 → 0.7.0

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 (66) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +65 -8
  3. package/dist/EditSurface-BCB-0vUK.js +371 -0
  4. package/dist/EditSurface-BZ98L7hy.cjs +2 -0
  5. package/dist/ExplorerSplit-BTRTah7R.cjs +1 -0
  6. package/dist/{ExplorerSplit-CWcK1E4I.js → ExplorerSplit-DpoMtzq3.js} +391 -417
  7. package/dist/MultiLayout-B7OiXgWH.cjs +1 -0
  8. package/dist/MultiLayout-BD2LiwOe.js +947 -0
  9. package/dist/{NativeScrollBar-DbzyQ85y.cjs → NativeScrollBar-B4j3Vigb.cjs} +1 -1
  10. package/dist/{NativeScrollBar-apXjIKRW.js → NativeScrollBar-EXOKhHP4.js} +1 -1
  11. package/dist/TreeLayout-B9dF2A3h.cjs +1 -0
  12. package/dist/TreeLayout-hn2bfU22.js +29 -0
  13. package/dist/client/MarkdownExplorer.d.cts +2 -1
  14. package/dist/client/MarkdownExplorer.d.ts +2 -1
  15. package/dist/client/storage.d.cts +1 -0
  16. package/dist/client/storage.d.ts +1 -0
  17. package/dist/core/contracts.d.cts +67 -6
  18. package/dist/core/contracts.d.ts +67 -6
  19. package/dist/core/labels.d.cts +53 -0
  20. package/dist/core/labels.d.ts +53 -0
  21. package/dist/core/location.d.cts +7 -0
  22. package/dist/core/location.d.ts +7 -0
  23. package/dist/dataRoute-CcZ8PK00.cjs +1 -0
  24. package/dist/dataRoute-D1vE1wFW.js +270 -0
  25. package/dist/index-C0gh_dRY.js +3188 -0
  26. package/dist/index-CCc6qUbM.cjs +5 -0
  27. package/dist/index.cjs +1 -1
  28. package/dist/index.d.cts +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +32 -31
  31. package/dist/location-DmzVAFvo.cjs +1 -0
  32. package/dist/{location-c1zdeySY.js → location-Q4sgRrUm.js} +202 -193
  33. package/dist/merge-0W6xtIxj.cjs +5 -0
  34. package/dist/merge-Bi41vtSe.js +20 -0
  35. package/dist/sanitizeWorker.cjs +1 -1
  36. package/dist/sanitizeWorker.js +173 -172
  37. package/dist/server/errors.d.cts +1 -1
  38. package/dist/server/errors.d.ts +1 -1
  39. package/dist/server/ports.d.cts +34 -1
  40. package/dist/server/ports.d.ts +34 -1
  41. package/dist/server.cjs +1 -1
  42. package/dist/server.d.cts +1 -1
  43. package/dist/server.d.ts +1 -1
  44. package/dist/server.js +889 -729
  45. package/dist/{storage-DA4ItHzl.js → storage-BSthKLSG.js} +14 -13
  46. package/dist/storage-Dgi4JXaB.cjs +1 -0
  47. package/dist/storage.cjs +1 -1
  48. package/dist/storage.js +1 -1
  49. package/dist/styles/markdown-explorer.css +1 -1
  50. package/docs/behavior/dom-hooks.md +20 -3
  51. package/docs/behavior/layout.md +11 -0
  52. package/docs/behavior/localization.md +4 -1
  53. package/docs/behavior/security.md +21 -4
  54. package/docs/behavior/url-contract.md +13 -4
  55. package/package.json +14 -5
  56. package/dist/ExplorerSplit-ajN3GSdA.cjs +0 -1
  57. package/dist/MultiLayout-BtWtCzJV.js +0 -922
  58. package/dist/MultiLayout-DvkcdO9c.cjs +0 -1
  59. package/dist/TreeLayout-BcHsv9G8.js +0 -23
  60. package/dist/TreeLayout-rwhJfLmU.cjs +0 -1
  61. package/dist/dataRoute-Btg4w3vO.js +0 -205
  62. package/dist/dataRoute-DHpu0fg2.cjs +0 -1
  63. package/dist/index-CIZw73j9.js +0 -2154
  64. package/dist/index-Cie6WPiM.cjs +0 -3
  65. package/dist/location-CSIhx-L4.cjs +0 -1
  66. package/dist/storage-Bkb2Axdi.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react/jsx-runtime"),u=require("react"),B=require("./location-CSIhx-L4.cjs"),k=require("./index-Cie6WPiM.cjs"),ne=require("./ExplorerSplit-ajN3GSdA.cjs"),D=require("@aiquants/drag-drop-panels"),me=require("react-router"),Z=require("./storage-Bkb2Axdi.cjs"),be=require("./dataRoute-DHpu0fg2.cjs"),Be=require("react-dom"),je=require("@aiquants/markdown"),Fe=require("./scrollBarGeometry-C46jBtmM.cjs"),Ve=()=>{const e=new Map;return{hold:(n,t)=>{e.set(n,t),queueMicrotask(()=>{e.get(n)===t&&e.delete(n)})},take:n=>{const t=e.get(n);return e.delete(n),t===void 0?null:t}}},Ce=u.createContext(null),re=()=>{const e=u.use(Ce);if(e===null)throw new Error("[markdown-explorer] multi-view panels must be rendered inside the multi-view stage");return e},Ue=(e,n)=>{const t=e.pendingHashes.get(n);return t===void 0?null:t},$e=0xcbf29ce484222325n,Ge=0x100000001b3n,Ye=(1n<<64n)-1n,We=(1n<<53n)-1n,Ke=new TextEncoder,Je=e=>{let n=$e;for(const t of Ke.encode(e))n=(n^BigInt(t))*Ge&Ye;return Number(n&We)},J=256,Xe=e=>`aqmx-p-${Je(e).toString(36)}`,Pe=(e,n)=>{const t=Xe(e);let o=t;for(let r=2;n.has(o);r+=1)o=`${t}-${String(r)}`;return o},Ze=new Map,Qe=(e,n=Ze)=>{const t=new Set(e.flatMap(r=>n.get(r)??[])),o=new Map;for(const r of e){const s=n.get(r)??Pe(r,t);t.add(s),o.set(r,s)}return o},Le=(e,n,t)=>{const o=e.columnOf.get(n);return o===void 0?void 0:Math.min(t-1,Math.max(0,o))},Me=(e,n)=>{const[t,...o]=B.columnGroups(n.logical,n.visible);if(t===void 0)throw new RangeError("[markdown-explorer] there must be at least one visible column");const r=([a,f])=>e.slice(a,f).reduce((c,g)=>c+g.length,0);let s=t;for(const a of o)r(a)<r(s)&&(s=a);let l=s[0];for(let a=s[0];a<s[1];a+=1)(e[a]?.length??0)<(e[l]?.length??0)&&(l=a);return l},X=(e,n)=>{const t=Array.from({length:n.logical},()=>[]),o=[];for(const r of e.docs){const s=Le(e,r,n.logical);s===void 0?o.push(r):t[s]?.push(r)}for(const r of o)t[Me(t,n)]?.push(r);return t},en=(e,n)=>B.columnGroups(e.length,n).map(([t,o])=>e.slice(t,o).flat()),nn=(e,n,t)=>{const[o,r]=n,s=r-o,l=e.length,a=Array.from({length:s},(d,p)=>{const m=[0];for(const O of e)m.push((m.at(-1)??0)+(t(O)===o+p?1:0));return m}),f=(d,p,m)=>(a[d]?.[m]??0)-(a[d]?.[p]??0),c=Array.from({length:s+1},()=>Array.from({length:l+1},()=>Number.NEGATIVE_INFINITY)),g=Array.from({length:s+1},()=>Array.from({length:l+1},()=>0)),S=c[0];S&&(S[0]=0);for(let d=0;d<s;d+=1)for(let p=0;p<=l;p+=1)for(let m=0;m<=p;m+=1){const O=(c[d]?.[m]??Number.NEGATIVE_INFINITY)+f(d,m,p),x=c[d+1],T=g[d+1];x&&T&&O>(x[p]??Number.NEGATIVE_INFINITY)&&(x[p]=O,T[p]=m)}const L=Array.from({length:s},()=>[]);let E=l;for(let d=s;d>0;d-=1){const p=g[d]?.[E]??0;L[d-1]=e.slice(p,E),E=p}return L},Te=(e,n)=>{const t=n.flat(),o=new Map(e.columnOf);for(const[r,s]of n.entries())for(const l of s)o.delete(l),o.set(l,r);for(const r of o.keys()){if(o.size<=J)break;o.delete(r)}return{docs:t,columnOf:o}},tn=(e,n,t,o)=>{if(e.docs.includes(n))return{state:e,outcome:"existing"};if(e.docs.length>=o)return{state:e,outcome:"rejected"};const r=X(e,t),s=Le(e,n,t.logical)??Me(r,t);r[s]?.push(n);const l=new Map(e.panelIds);return l.set(n,Pe(n,new Set(l.values()))),{state:{...e,...Te(e,r),panelIds:l},outcome:"opened"}},Re=(e,n)=>{if(!e.docs.includes(n))return e;const t=new Set(e.hidden);t.delete(n);const o=new Map(e.panelIds);return o.delete(n),{...e,docs:e.docs.filter(r=>r!==n),hidden:t,panelIds:o,maximized:e.maximized===n?null:e.maximized}},on=(e,n,t,o)=>{if(e.hidden.has(n))return{state:Ne(e,n,!1),outcome:"shown"};if(e.docs.includes(n))return{state:Re(e,n),outcome:"closed"};const r=tn(e,n,t,o);return{state:r.state,outcome:r.outcome==="rejected"?"rejected":"opened"}},rn=(e,n,t)=>{if(n===t||!e.docs.includes(n))return{state:e,outcome:"ignored"};if(e.docs.includes(t))return{state:e,outcome:"existing"};const o=new Map(e.columnOf),r=o.get(n);r!==void 0&&(o.delete(t),o.set(t,r));const s=new Set(e.hidden);s.delete(n);const l=new Map(e.panelIds),a=l.get(n);if(a===void 0)throw new Error(`[markdown-explorer] the open document ${JSON.stringify(n)} has no panel id`);return l.delete(n),l.set(t,a),{state:{docs:e.docs.map(f=>f===n?t:f),maximized:e.maximized===n?t:e.maximized,columnOf:o,hidden:s,panelIds:l},outcome:"navigated"}},Ne=(e,n,t)=>{if(!e.docs.includes(n)||e.hidden.has(n)===t)return e;const o=new Set(e.hidden);return t?o.add(n):o.delete(n),{...e,hidden:o,maximized:t&&e.maximized===n?null:e.maximized}},sn=(e,n)=>{if(e.maximized===n||n!==null&&!e.docs.includes(n))return e;if(n===null||!e.hidden.has(n))return{...e,maximized:n};const t=new Set(e.hidden);return t.delete(n),{...e,maximized:n,hidden:t}},ln=(e,n,t)=>{const o=X(e,t),r=new Map;for(const[c,g]of o.entries())for(const S of g)r.set(S,c);const s=new Set(e.docs),l=new Set,a=B.columnGroups(t.logical,t.visible),f=Array.from({length:t.logical},()=>[]);for(const[c,g]of a.entries()){const S=(n[c]??[]).filter(L=>s.has(L)&&!l.has(L));for(const L of S)l.add(L);for(const[L,E]of nn(S,g,d=>r.get(d)).entries())f[g[0]+L]?.push(...E)}for(const c of e.docs)l.has(c)||f[r.get(c)??0]?.push(c);return f.every((c,g)=>c.length===o[g]?.length&&c.every((S,L)=>o[g]?.[L]===S))?e:{...e,...Te(e,f)}},Q=(e,n)=>{const t=[...new Set(e.docs)].slice(0,n),o=new Set(t),r=e.maximized!==null&&o.has(e.maximized)?e.maximized:null;return{docs:t,maximized:r,columnOf:e.stored.columnOf,hidden:new Set([...e.stored.hidden].filter(s=>o.has(s)&&s!==r)),panelIds:Qe(t,e.panelIds)}},fe=(e,n)=>{if(e.docs.every(o=>e.columnOf.has(o)))return e;const t=new Map(e.columnOf);for(const[o,r]of X(e,n).entries())for(const s of r)t.delete(s),t.set(s,o);for(const o of t.keys()){if(t.size<=J)break;t.delete(o)}return{...e,columnOf:t}},Ie=1,F=Object.freeze({columnOf:new Map,hidden:new Set}),cn=(e,n)=>{if(e===null||e==="")return F;let t;try{t=JSON.parse(e)}catch{return F}if(t===null||typeof t!="object"||Array.isArray(t))return F;const o=t;if(o.v!==Ie)return F;const r=new Map;if(Array.isArray(o.columnOf))for(const l of o.columnOf.slice(-J))Array.isArray(l)&&l.length===2&&typeof l[0]=="string"&&l[0]!==""&&Number.isInteger(l[1])&&l[1]>=0&&l[1]<n&&(r.delete(l[0]),r.set(l[0],l[1]));const s=new Set(Array.isArray(o.hidden)?o.hidden.filter(l=>typeof l=="string"&&l!==""):[]);return{columnOf:r,hidden:s}},an=e=>JSON.stringify({v:Ie,columnOf:[...e.columnOf.entries()].slice(-J),hidden:e.docs.filter(n=>e.hidden.has(n))}),se=(e,n)=>{const t=e.get(n);return t===void 0?be.lastPathSegment(n):t},$=e=>{const n=new Map;for(const[t,o]of e.panelIds)n.set(o,t);return n},pe=e=>{if(!be.isAcceptableDocumentPath(e))throw new RangeError(`[markdown-explorer] not an acceptable document path: ${JSON.stringify(e.slice(0,80))}`)},un=({config:e,location:n,writeUrl:t,persist:o})=>{const{maxPanels:r,columns:s}=e.multiView,l=k.createEmitter(),a=new Map,f=new Map;let c={layout:Q({docs:n.docs,maximized:n.maximized,stored:F},r),source:n.source,visibleColumns:s,ready:!1,splitDragging:!1,titles:new Map,pendingHashes:new Map},g=!1;const S=i=>g?fe(i,{logical:s,visible:c.visibleColumns}):i,L=(i,v)=>B.explorerHref(e,{view:"multi",source:i,docs:v.docs,maximized:v.maximized});let E=L(n.source,n),d=n.source,p=E;const m=[],O=[];let x=null;const T=()=>{if(!(m.length>0))for(const i of O.splice(0))i()},h=i=>{c={...c,...i},l.emit()},b=()=>{if(!c.ready)return;const i=an(c.layout);i!==x&&(x=i,o(i))},y=(i,v,M)=>{const A=L(i,v);A!==E&&(E=A,d=i,m.push(A),t(A,M))},P=i=>{const v=new Set(i.panelIds.values());for(const C of[...a.keys()])v.has(C)||a.delete(C);for(const C of[...f.keys()])v.has(C)||f.delete(C);const M=new Set(i.docs),A=[...c.titles.keys()].every(C=>M.has(C))?c.titles:new Map([...c.titles].filter(([C])=>M.has(C))),w=[...c.pendingHashes.keys()].every(C=>v.has(C))?c.pendingHashes:new Map([...c.pendingHashes].filter(([C])=>v.has(C)));return{titles:A,pendingHashes:w}},N=i=>i===c.layout?!1:(h({layout:i,...P(i)}),y(d,i,"replace"),b(),!0),I=()=>({logical:s,visible:c.visibleColumns});return{getSnapshot:()=>c,subscribe:l.subscribe,toggle:i=>{pe(i);const{state:v,outcome:M}=on(c.layout,i,I(),r);return N(v),M},close:i=>N(Re(c.layout,i)),navigate:(i,v)=>{pe(v);const{state:M,outcome:A}=rn(c.layout,i,v);if(A!=="navigated")return A;const w=M.panelIds.get(v);return w!==void 0&&(a.delete(w),f.delete(w)),N(M),A},setHidden:(i,v)=>N(Ne(c.layout,i,v)),maximize:i=>N(sn(c.layout,i)),arrange:i=>N(ln(c.layout,i,{logical:s,visible:i.length})),changeSource:i=>{y(i,c.layout,"push")},revealSource:i=>{y(i,c.layout,"replace")},observeLocation:i=>{const v=L(i.source,i);if(v===E)return m.length=0,p=v,i.source!==c.source&&h({source:i.source}),T(),!1;if(v===p)return!1;p=v;const M=m.indexOf(v);if(M>=0)return m.splice(0,M+1),i.source!==c.source&&h({source:i.source}),T(),!1;m.length=0,E=v,d=i.source;const A=S(Q({docs:i.docs,maximized:i.maximized,stored:{columnOf:c.layout.columnOf,hidden:c.layout.hidden},panelIds:c.layout.panelIds},r));return h({layout:A,source:i.source,...P(A)}),b(),T(),!0},whenUrlRendered:i=>{O.push(i),T()},loadStored:i=>{h({layout:S(Q({docs:c.layout.docs,maximized:c.layout.maximized,stored:i,panelIds:c.layout.panelIds},r)),ready:!0}),b()},setVisibleColumns:i=>{if(!Number.isInteger(i)||i<1||i>s)throw new RangeError(`[markdown-explorer] visible columns must be an integer in 1..${String(s)}; got ${String(i)}`);g=!0;const v=fe(c.layout,{logical:s,visible:i});i===c.visibleColumns&&v===c.layout||(h({visibleColumns:i,layout:v}),v!==c.layout&&b())},setSplitDragging:i=>{i!==c.splitDragging&&h({splitDragging:i})},setTitle:(i,v)=>{!c.layout.docs.includes(i)||c.titles.get(i)===v||h({titles:new Map(c.titles).set(i,v)})},titleOf:i=>se(c.titles,i),setPendingHash:(i,v)=>{const M=c.pendingHashes.get(i);if(v===null||v===""){if(M===void 0)return;const A=new Map(c.pendingHashes);A.delete(i),h({pendingHashes:A});return}M!==v&&h({pendingHashes:new Map(c.pendingHashes).set(i,v)})},saveReadingPosition:(i,v,M)=>{c.layout.panelIds.get(v)===i&&a.set(i,{doc:v,position:M})},readingPositionOf:(i,v)=>{const M=a.get(i);return M===void 0||M.doc!==v?null:M.position},saveImageView:(i,v,M)=>{f.set(i,{url:v,state:M})},imageViewOf:(i,v)=>{const M=f.get(i);return M===void 0||M.url!==v?null:M.state}}},z=(e,n)=>{const t=()=>n(e.getSnapshot());return u.useSyncExternalStore(e.subscribe,t,t)},dn=e=>{const{config:n,storageNamespace:t}=k.useExplorer(),o=me.useNavigate(),r=u.useRef(o),s=Z.storageKeys(t).multiLayout,[l]=u.useState(()=>un({config:n,location:e,writeUrl:(c,g)=>{r.current(c,k.explorerNavigationOptions(g==="replace"?"browse":"switch-source"))},persist:c=>Z.writeStorage(s,c)}));u.useLayoutEffect(()=>{r.current=o},[o]);const a=me.useLocation(),f=u.useMemo(()=>({location:e,navigated:a}),[e,a]);return u.useLayoutEffect(()=>{l.observeLocation(f.location)},[l,f]),u.useLayoutEffect(()=>{l.loadStored(cn(Z.readStorage(s),n.multiView.columns))},[l,s,n]),l},mn=e=>{const n=e.closest(D.SCROLL_AREA_SELECTOR);if(n===null)throw new Error("[markdown-explorer] a panel's document region is not inside the panel's scroll area");return n},fn=({docPath:e,panelId:n,maximized:t,title:o,onContentShown:r})=>{const{store:s,followLink:l,revealInPanel:a}=re(),{announcer:f}=k.useExplorer(),c=z(s,x=>Ue(x,n)),g=u.useCallback((x,T)=>l(n,e,x,T),[l,n,e]),S=u.useCallback(()=>s.setPendingHash(n,null),[s,n]),L=u.useMemo(()=>({read:x=>s.imageViewOf(n,x),save:(x,T)=>s.saveImageView(n,x,T)}),[s,n]),E=u.useCallback((x,T)=>{T.kind!=="failure"&&s.setTitle(x,T.name),r(x)},[s,r]),d=u.useCallback(x=>{s.whenUrlRendered(()=>f.announce(x))},[s,f]),p=u.useMemo(()=>({scrollerOf:mn,reveal:x=>a(n,x)}),[a,n]),m=u.useMemo(()=>({kind:"panel",maximized:t,onDocumentLink:g,pendingHash:c,onHashConsumed:S,announceFailure:d,paneScroll:p}),[t,g,c,S,d,p]),O=u.useMemo(()=>({kind:"panel",documentName:o}),[o]);return R.jsxs(k.ImageViewMemoryContext,{value:L,children:[R.jsx(k.DocumentRefreshBar,{path:e,placement:O}),R.jsx(k.DocumentPane,{path:e,variant:m,onDocumentShown:E})]})},ge=()=>typeof HTMLElement<"u"&&typeof HTMLElement.prototype.showPopover=="function"&&typeof HTMLElement.prototype.hidePopover=="function",le="data-aqmx-column-probe",Y="data-panel-id",te="--aqmx-multi-panel-chrome",j=e=>e.endsWith("px")?Number.parseFloat(e):Number.NaN,pn=e=>e==="normal"?0:j(e),gn=(e,n)=>{const t=e.querySelector(D.SCROLL_ROOT_SELECTOR)?.firstElementChild,o=e.querySelector(`[${le}]`),r=o instanceof HTMLElement?o.getBoundingClientRect().width:Number.NaN;if(!(t instanceof HTMLElement))return{plan:{trackInlineSize:Number.NaN,gap:Number.NaN,minColumnInlineSize:r,logicalColumns:n},stageBlockSize:Number.NaN};const s=getComputedStyle(t),l=t.clientWidth-j(s.paddingLeft)-j(s.paddingRight),a=t.clientHeight-j(s.paddingTop)-j(s.paddingBottom);return{plan:{trackInlineSize:l,gap:pn(s.columnGap),minColumnInlineSize:r,logicalColumns:n},stageBlockSize:a}},hn=(e,n)=>{if(e.getClientRects().length===0)return Number.NaN;const t=getComputedStyle(e);return n.getBoundingClientRect().top-e.getBoundingClientRect().top+j(t.paddingBottom)+j(t.borderBottomWidth)},W="data-aqmx-panel-frame",he="--aqmx-multi-panel-pinned-block-size",vn=e=>{const{docPath:n,panelId:t}=e;if(typeof n!="string"||typeof t!="string")throw new TypeError("[markdown-explorer] a multi-view panel needs string docPath and panelId props");return{docPath:n,panelId:t}},yn=e=>{const n=getComputedStyle(e),t=Number.parseFloat(n.lineHeight);return Number.isFinite(t)?t:Number.parseFloat(n.fontSize)},Sn=(e,n,t)=>e.deltaMode===WheelEvent.DOM_DELTA_PAGE?e.deltaY*n.clientHeight:e.deltaMode!==WheelEvent.DOM_DELTA_LINE?e.deltaY:e.deltaY*t(n),V=e=>{const n=e.closest(D.SCROLL_AREA_SELECTOR);return n instanceof HTMLElement?n:null},Ae=e=>{const n=e.firstElementChild;return n instanceof HTMLElement&&getComputedStyle(n).position==="sticky"?n:null},De=(e,n)=>{const t=n.getBoundingClientRect().top,o=Ae(e);return o===null?t:Math.max(t,o.getBoundingClientRect().bottom)},ve=(e,n)=>{let t=0,o=e.length;for(;t<o;){const r=t+o>>>1;(e[r]?.getBoundingClientRect().bottom??Number.NEGATIVE_INFINITY)>n?o=r:t=r+1}return t<e.length?t:-1},xn=(e,n)=>{const t=De(e,n),o=[];let r=e;for(let s=ve([...r.children],t);s>=0;s=ve([...r.children],t)){const l=r.children[s];if(l===void 0)break;o.push(s),r=l}return{scrollTop:n.scrollTop,anchor:o.length===0?null:{path:o,offset:r.getBoundingClientRect().top-t}}},ye=(e,n,t)=>{if(n.scrollTop=t.scrollTop,t.anchor===null)return;let o=e;for(const r of t.anchor.path)o=o?.children[r];o!==void 0&&(n.scrollTop+=o.getBoundingClientRect().top-De(e,n)-t.anchor.offset)},wn=Object.freeze(["data-testid","aria-label","title","href","id","name"]),_e=e=>JSON.stringify([e.tagName,...wn.map(n=>e.getAttribute(n))]),En=(e,n)=>{if(n===null||!e.contains(n))return null;const t=[];for(let o=n;o!==e;){const r=o.parentElement;if(r===null)return null;t.unshift([...r.children].indexOf(o)),o=r}return{path:t,signature:_e(n)}},On=(e,n,t)=>{let o=e;for(const r of t.path)o=o?.children[r];o instanceof HTMLElement&&_e(o)===t.signature&&k.focusWithoutScroll(o)||n.focus({preventScroll:!0})},bn=(e,n,t)=>{if(e.shiftKey||Math.abs(e.deltaX)>Math.abs(e.deltaY))return;const o=e.ctrlKey||e.metaKey,r=o?V(n):n.closest(D.SCROLL_ROOT_SELECTOR);if(!(r instanceof HTMLElement))return;const s=Sn(e,r,t);(o||Cn(r,s))&&(e.preventDefault(),r.scrollTop+=s)},Cn=(e,n)=>n<0?e.scrollTop>0:n>0?Math.ceil(e.scrollTop+e.clientHeight)<e.scrollHeight:!1,Pn=e=>e.scrollHeight>e.clientHeight,Ln=(e,n,t)=>{let o=Number.NaN,r=Number.NaN;const s=Ae(t),l=()=>{const c=hn(e,n);if(!Number.isFinite(c))return;const g=s===null?0:s.getBoundingClientRect().height;g!==r&&(r=g,t.style.setProperty(he,`${String(g)}px`));const S=c+g;S!==o&&(o=S,e.style.setProperty(te,`${String(S)}px`))};l();let a=null;const f=typeof ResizeObserver>"u"?null:new ResizeObserver(()=>{a===null&&(a=requestAnimationFrame(()=>{a=null,l()}))});return f?.observe(e),f?.observe(n),s!==null&&f?.observe(s),()=>{f?.disconnect(),a!==null&&cancelAnimationFrame(a),e.style.removeProperty(te),t.style.removeProperty(he)}},Mn=e=>{const{docPath:n,panelId:t}=vn(e),{store:o,Body:r,maximize:s,focusCarry:l}=re(),a=z(o,d=>d.layout.maximized===n),f=z(o,d=>se(d.titles,n)),c=u.useRef(null),g=u.useRef(null),S=u.useRef(null);u.useEffect(()=>{const d=c.current,p=d===null?null:V(d);if(d===null||p===null||a)return;const m=new Map,O=y=>{const P=m.get(y);if(P!==void 0)return P;const N=yn(y);return m.set(y,N),N},x=y=>bn(y,d,O);let T=!1;const h=()=>{const y=Pn(p);y!==T&&(T=y,y?d.addEventListener("wheel",x,{capture:!0,passive:!1}):d.removeEventListener("wheel",x,{capture:!0}))};h();const b=typeof ResizeObserver>"u"?null:new ResizeObserver(h);return b?.observe(p),b?.observe(d),()=>{b?.disconnect(),d.removeEventListener("wheel",x,{capture:!0})}},[a]),u.useLayoutEffect(()=>{const d=c.current,p=d===null?null:V(d),m=d===null?null:d.closest(`[${Y}]`);if(!(d===null||p===null||!(m instanceof HTMLElement)))return Ln(m,p,d)},[]),u.useLayoutEffect(()=>{const d=c.current,p=d===null?null:V(d);if(d===null||p===null)return;const m=o.readingPositionOf(t,n);g.current=m===null?null:{doc:n,position:m},m!==null&&ye(d,p,m);let O=null;const x=()=>{O===null&&(O=requestAnimationFrame(()=>{O=null;const T=S.current;T!==null&&o.saveReadingPosition(t,T,xn(d,p))}))};return p.addEventListener("scroll",x,{passive:!0}),()=>{p.removeEventListener("scroll",x),O!==null&&cancelAnimationFrame(O)}},[o,t,n]),u.useLayoutEffect(()=>{const d=c.current,p=d===null?null:d.closest(`[${Y}]`);if(d===null||p===null)return;const m=l.take(t);return m!==null&&On(p,d,m),()=>{const O=En(p,p.ownerDocument.activeElement);O!==null&&l.hold(t,O)}},[l,t]);const L=u.useCallback(d=>{const p=c.current,m=p===null?null:V(p);if(p===null||m===null)return;const O=S.current;S.current=d;const x=g.current;g.current=null,x!==null&&x.doc===d?ye(p,m,x.position):O!==null&&O!==d&&(m.scrollTop=0)},[]),E=u.useCallback(()=>s(n),[s,n]);return R.jsx("div",{ref:c,role:"group","aria-label":f,className:"aqmx-multi-panel-frame",tabIndex:-1,"data-aqmx-panel-frame":t,"data-aqmx-maximized":a?"true":"false","data-testid":"markdown-explorer-panel-frame",onDoubleClick:a?void 0:E,children:R.jsx(r,{docPath:n,panelId:t,maximized:a,title:f,onContentShown:L})})},Tn=u.memo(Mn),G=(e,n)=>{const t=e.panelIds.get(n);if(t===void 0)throw new Error(`[markdown-explorer] the open document ${JSON.stringify(n)} has no panel id`);return t},Se=e=>Object.fromEntries(D.generateColumnIds(e).map(n=>[n,[]])),Rn=(e,n)=>{const t=en(X(e,n),n.visible);return Object.fromEntries(t.map((o,r)=>[D.generateColumnId(r),o.map(s=>G(e,s))]))},Nn=(e,n)=>{const t=$(e);return D.sortColumnIds(Object.keys(n)).map(o=>(n[o]??[]).flatMap(r=>{const s=t.get(r);return s===void 0?[]:[s]}))},In=e=>({switchToCustomDragMode:e.panelSwitchToCustomDrag,switchToNormalDragMode:e.panelSwitchToNormalDrag,hidePanel:e.panelHide,maximizePanel:e.panelMaximize,restorePanel:e.panelRestore,closePanel:e.panelClose,movePanelToPreviousColumn:e.panelMovePreviousColumn,movePanelToNextColumn:e.panelMoveNextColumn,movePanelUp:e.panelMoveUp,movePanelDown:e.panelMoveDown,customDragModeBadge:e.panelCustomDragBadge,panelMoved:e.panelMoved,panelMoveUnavailable:e.panelMoveUnavailable,panelDragStarted:e.panelDragStarted,panelDragCancelled:e.panelDragCancelled,hiddenPanels:e.hiddenPanelsTitle,hiddenPanelBadge:e.hiddenPanelBadge,hiddenPanelNotice:e.hiddenPanelNotice,emptyColumn:e.multiColumnEmpty,dropZone:e.multiColumnRegion,dropHere:e.panelDropHere}),An="--aqmx-multi-stage-bar-gutter",Dn=Object.freeze({[An]:`${String(Fe.NATIVE_SCROLL_BAR_WIDTH)}px`}),_n=Object.freeze({blockSize:"100%"}),kn=Object.freeze({[D.NO_PANEL_DRAG_ATTRIBUTE]:"",style:Object.freeze({display:"flex"})}),zn=e=>R.jsx("div",{...kn,children:R.jsx(k.LazyNativeScrollBar,{scroller:e,withCircle:!0})}),Hn=({props:e,children:n})=>R.jsx(je.HostedScrollArea,{scrollerProps:{...e,style:_n},renderScrollBar:zn,children:n}),qn=e=>R.jsx(k.LazyNativeScrollBar,{scroller:e,withCircle:!1}),ie="--aqmx-stage-block",Bn="--aqmx-multi-panel-body-floor",jn=`calc(var(${ie}) * ${String(B.PANEL_MIN_BLOCK_RATIO)})`,Fn=`max(calc(var(${ie}) * ${String(B.PANEL_MAX_BLOCK_RATIO)}), calc(var(${te}) + var(${Bn})))`,Vn=(e,n)=>{const t=Object.entries(e);return t.length!==Object.keys(n).length?!1:t.every(([o,r])=>{const s=n[o];return s!==void 0&&s.length===r.length&&s.every((l,a)=>r[a]===l)})},xe=["keydown","pointerdown","wheel","touchstart"],U=new WeakMap,we=(e,n,t)=>{for(let o=n;o!==null&&o!==t;o=o.parentElement){e.observe(o);for(let r=o.previousElementSibling;r!==null;r=r.previousElementSibling)e.observe(r)}},Un=e=>{const n=new Map;for(let t=e.parentElement;t!==null;t=t.parentElement)n.set(t,{top:t.scrollTop,left:t.scrollLeft});return n},K=(e,n,t)=>{U.get(e)?.();const o=e.querySelector(`[${Y}="${n}"]`);if(!(o instanceof HTMLElement))return;const r=t!==null&&o.contains(t)?t:null;let s=new Map;const l=()=>{if(!o.isConnected)return;o.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"});const S=r?.isConnected===!0?r:o;S!==o&&S.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"}),s=Un(S)};if(l(),typeof ResizeObserver>"u")return;const a=new ResizeObserver(l);we(a,o,o.closest(D.SCROLL_ROOT_SELECTOR)),r!==null&&we(a,r,o);const{ownerDocument:f}=e,c=S=>{const L=S.target===f?f.scrollingElement:S.target;if(!(L instanceof Element))return;const E=s.get(L);E!==void 0&&(L.scrollTop!==E.top||L.scrollLeft!==E.left)&&g()},g=()=>{a.disconnect();for(const S of xe)f.removeEventListener(S,g,!0);f.removeEventListener("scroll",c,!0),U.get(e)===g&&U.delete(e)};for(const S of xe)f.addEventListener(S,g,{capture:!0,passive:!0});f.addEventListener("scroll",c,{capture:!0,passive:!0}),U.set(e,g)},ke=(e,n)=>{const t=e.querySelector(`[${W}="${n}"]`);return t instanceof HTMLElement?(K(e,n,null),t.focus({preventScroll:!0}),!0):!1},ce=(e,n)=>{const t=e.querySelector(`[${Y}="${n}"]`);return t instanceof HTMLElement&&t.contains(e.ownerDocument.activeElement)},Ee=(e,n)=>{if(!ce(e,n))return null;const t=[...e.querySelectorAll(`[${W}]`)].map(l=>l.getAttribute(W)),o=t.indexOf(n),r=t[o+1];if(o>=0&&typeof r=="string")return{kind:"panel",panelId:r};const s=t[o-1];return o>0&&typeof s=="string"?{kind:"panel",panelId:s}:{kind:"stage"}},Oe=(e,n)=>{requestAnimationFrame(()=>{const t=e.current;t!==null&&(n.kind==="panel"&&ke(t,n.panelId)||t.focus({preventScroll:!0}))})},ze=(e,n)=>{requestAnimationFrame(()=>{const t=e.current;t!==null&&ke(t,n)})},$n=(e,n,t)=>{requestAnimationFrame(()=>{const o=e.current;if(o===null)return;const{activeElement:r,body:s}=o.ownerDocument;if(K(o,n,t&&ce(o,n)?r:null),!t||r!==null&&r!==s&&r.isConnected)return;const l=o.querySelector(`[${W}="${n}"]`);l instanceof HTMLElement&&l.focus({preventScroll:!0})})},Gn=({store:e,stageRef:n})=>{const{config:t,labels:o,announcer:r}=k.useExplorer(),{maximize:s}=re(),l=t.multiView.columns,a=z(e,w=>w.layout),f=z(e,w=>w.visibleColumns),c=z(e,w=>w.titles),g=z(e,w=>w.layout.maximized!==null||w.splitDragging),[S,L]=u.useState(!1),[E]=u.useState(()=>Se(f)),d=u.useMemo(()=>In(o),[o]),p=u.useCallback(w=>{e.arrange(Nn(e.getSnapshot().layout,w))},[e]),m=D.useDragDropColumns({initialColumnPanels:E,initialPanelVisibility:{},debugConfig:D.DEFAULT_DEBUG_CONFIG,onColumnPanelsChange:p}),{columnPanels:O,setColumnPanels:x}=m,T=u.useRef(g),h=u.useRef(O);u.useLayoutEffect(()=>{T.current=g,h.current=O},[g,O]);const b=u.useCallback(w=>{const C=n.current;if(C===null)return;const{plan:q,stageBlockSize:_}=gn(C,l);if(Number.isFinite(_)&&_>0&&C.style.setProperty(ie,`${String(_)}px`),T.current&&!w)return;const H=B.replanVisibleColumns(e.getSnapshot().visibleColumns,q);H!==null&&e.setVisibleColumns(H)},[e,n,l]);u.useLayoutEffect(()=>{b(!0),L(!0)},[b]),u.useEffect(()=>{const w=n.current;if(w===null||typeof ResizeObserver>"u")return;let C=null;const q=new ResizeObserver(()=>{C===null&&(C=requestAnimationFrame(()=>{C=null,b(!1)}))}),_=w.querySelector(D.SCROLL_ROOT_SELECTOR)?.firstElementChild,H=w.querySelector(`[${le}]`);return _ instanceof Element&&q.observe(_),H instanceof Element&&q.observe(H),()=>{q.disconnect(),C!==null&&cancelAnimationFrame(C)}},[n,b]),u.useEffect(()=>{g||b(!1)},[g,b]);const y=u.useMemo(()=>S?Rn(a,{logical:l,visible:f}):Se(f),[S,a,l,f]);u.useLayoutEffect(()=>{Vn(h.current,y)||x(y)},[y,x]);const P=u.useMemo(()=>D.sortColumnIds(Object.keys(O)).map(w=>({id:w,key:w,className:"aqmx-multi-column"})),[O]),N=u.useMemo(()=>a.docs.map(w=>{const C=G(a,w);return{id:C,component:Tn,title:se(c,w),props:{docPath:w,panelId:C},minHeight:jn,maxHeight:Fn}}),[a,c]),I=u.useMemo(()=>Object.fromEntries(a.docs.map(w=>[G(a,w),!a.hidden.has(w)])),[a]),i=a.maximized===null?null:G(a,a.maximized),v=u.useCallback(w=>{const{layout:C}=e.getSnapshot();for(const[q,_]of $(C)){const H=w[q];if(H===void 0||H!==C.hidden.has(_))continue;const ae=e.titleOf(_);if(H){if(!e.setHidden(_,!1))continue;r.announce(o.panelShown(ae)),ze(n,q);continue}const ue=n.current,de=ue===null?null:Ee(ue,q);e.setHidden(_,!0)&&(r.announce(o.panelHidden(ae)),de!==null&&Oe(n,de))}},[e,n,r,o]),M=u.useCallback(w=>{const C=$(e.getSnapshot().layout).get(w);if(C===void 0)return;const q=e.titleOf(C),_=n.current,H=_===null?null:Ee(_,w);e.close(C)&&(r.announce(o.panelClosed(q)),H!==null&&Oe(n,H))},[e,n,r,o]),A=u.useCallback(w=>{if(w===null){s(null);return}const C=$(e.getSnapshot().layout).get(w);C!==void 0&&s(C)},[e,s]);return R.jsx("div",{className:"aqmx-multi-layout","aria-busy":!S,children:R.jsx(D.DragDropLayout,{columns:P,panels:N,columnPanels:O,onColumnPanelsChange:p,panelVisibility:I,onPanelVisibilityChange:v,dragState:m.dragState,dragOverPosition:m.dragOverPosition,originalPanelPosition:m.originalPanelPosition,dragModes:m.dragModes,debugConfig:D.DEFAULT_DEBUG_CONFIG,panelSizes:m.panelSizes,customDrag:m.customDrag,setPanelRef:m.setPanelRef,onDragStart:m.handleDragStart,onDragEnd:m.handleDragEnd,onPlaceholderDragEnter:m.handlePlaceholderDragEnter,onPlaceholderDragLeave:m.handlePlaceholderDragLeave,onDragOverWithInsert:m.handleDragOverWithInsert,onDropWithInsert:m.handleDropWithInsert,onColumnDragLeave:m.handleColumnDragLeave,onPanelMouseDown:m.handleMouseDown,onPanelSizeInfoClick:m.handlePanelSizeInfoClick,onToggleDragMode:m.toggleDragMode,onPanelClose:M,onPanelMaximizeChange:A,maximizedPanel:i,dragHandle:"header",labels:d,panelClassName:"aqmx-multi-panel",renderPanelScrollArea:Hn,renderStageScrollBar:qn})})},ee={blockStart:"--aqmx-multi-toast-block-start",inlineEnd:"--aqmx-multi-toast-inline-end",room:"--aqmx-multi-toast-room"},Yn=(e,n)=>{const t=n.getBoundingClientRect(),o=[t.left+1,t.left+t.width/2,t.right-1],r=[t.top+1,t.top+t.height/2,t.bottom-1];return o.some(s=>r.some(l=>{const a=n.ownerDocument.elementsFromPoint(s,l),f=a.findIndex(g=>n.contains(g)),c=a.findIndex(g=>e.contains(g));return f!==-1&&c!==-1&&c<f}))},Wn=(e,n)=>{const t=n.getBoundingClientRect(),o=n.ownerDocument.documentElement.clientWidth,r=getComputedStyle(n).direction==="rtl";return e.style.setProperty(ee.blockStart,`${String(t.top)}px`),e.style.setProperty(ee.inlineEnd,`${String(r?t.left:o-t.right)}px`),e.style.setProperty(ee.room,`${String(t.width)}px`),e.showPopover(),()=>{e.isConnected&&e.hidePopover()}},Kn=({store:e,body:n,limitNotice:t,onLimitNoticeCovered:o,ref:r})=>{const{config:s,labels:l,announcer:a}=k.useExplorer(),f=u.useRef(null),c=u.useRef(null),g=z(e,h=>h.ready),S=z(e,h=>h.layout.docs.length>0),L=z(e,h=>h.visibleColumns),E=u.use(ne.SheetNoticeSlotContext),d=u.useCallback(h=>{const{layout:b}=e.getSnapshot(),y=b.maximized,P=h===null&&y!==null?b.panelIds.get(y):void 0,N=f.current,I=P!==void 0&&N!==null&&ce(N,P);e.maximize(h)&&(h!==null?a.announce(l.panelMaximized(e.titleOf(h))):y!==null&&a.announce(l.panelRestored(e.titleOf(y))),P!==void 0&&$n(f,P,I))},[e,a,l]),p=u.useCallback((h,b,y,P)=>{if(y===b){e.setPendingHash(h,P);return}const N=e.navigate(b,y);if(N==="navigated"){e.setPendingHash(h,P);return}if(N!=="existing")return;const{layout:I}=e.getSnapshot(),i=I.panelIds.get(y);i!==void 0&&(a.announce(l.panelAlreadyOpen(e.titleOf(y))),I.maximized===null?e.setHidden(y,!1):d(y),e.setPendingHash(i,P),ze(f,i))},[e,a,l,d]);u.useLayoutEffect(()=>{if(t===null||E!==null||!ge())return;const h=c.current,b=f.current;if(h===null||b===null)throw new Error("[markdown-explorer] the panel-limit notice and the stage must be mounted together");return Wn(h,b)},[t,E]),u.useEffect(()=>{const h=c.current;if(t===null||h===null)return;const{ownerDocument:b}=h;let y=null;const P=N=>{const I=N.target;I instanceof Element&&(y!==null&&cancelAnimationFrame(y),y=requestAnimationFrame(()=>{y=null,b.activeElement===I&&h.isConnected&&Yn(h,I)&&o()}))};return b.addEventListener("focusin",P,!0),()=>{b.removeEventListener("focusin",P,!0),y!==null&&cancelAnimationFrame(y)}},[t,E,o]),u.useImperativeHandle(r,()=>({bringIntoView:h=>{requestAnimationFrame(()=>{const b=f.current,y=e.getSnapshot().layout.panelIds.get(h);b!==null&&y!==void 0&&K(b,y,null)})}}),[e]),u.useEffect(()=>{const h=f.current;return()=>{h!==null&&U.get(h)?.()}},[]);const m=u.useCallback((h,b)=>{const y=f.current;y!==null&&K(y,h,b)},[]),[O]=u.useState(Ve),x=u.useMemo(()=>({store:e,Body:n,followLink:p,maximize:d,revealInPanel:m,focusCarry:O}),[e,n,p,d,m,O]),T=u.useMemo(()=>Array.from({length:s.multiView.columns},(h,b)=>D.generateColumnId(b)),[s]);return R.jsxs("section",{ref:f,className:"aqmx-multi-stage",style:Dn,tabIndex:-1,"aria-label":l.multiRegion,"aria-busy":S&&!g,"data-testid":"markdown-explorer-stage","data-aqmx-visible-columns":L,children:[R.jsx("span",{className:"aqmx-multi-probe","aria-hidden":"true",[le]:""}),S?g?R.jsx(Ce,{value:x,children:R.jsx(Gn,{store:e,stageRef:f})}):R.jsx("div",{className:"aqmx-multi-skeleton","aria-hidden":"true","data-testid":"markdown-explorer-stage-skeleton",children:T.map(h=>R.jsxs("div",{className:"aqmx-skeleton aqmx-multi-skeleton-column",children:[R.jsx("span",{}),R.jsx("span",{}),R.jsx("span",{})]},h))}):R.jsx("div",{className:"aqmx-empty","data-testid":"markdown-explorer-multi-empty",children:R.jsx("p",{className:"aqmx-empty-title",children:l.multiEmpty})}),t===null?null:E!==null?Be.createPortal(R.jsx("div",{ref:c,className:"aqmx-toast aqmx-multi-toast","data-testid":"markdown-explorer-panel-limit",children:t}),E):R.jsx("div",{ref:c,popover:ge()?"manual":void 0,className:"aqmx-toast aqmx-multi-toast","data-testid":"markdown-explorer-panel-limit",children:t})]})},He=3e3,qe=(e,n)=>{if(n!==null)return n;const[t]=e;return t===void 0?null:t},oe=(e,n,t)=>{const o=new Set(e),r=n.filter(l=>!o.has(l)),s=r.length>0?r.at(-1):t!==null&&n.includes(t)?t:n.at(-1);return s===void 0?null:s},Jn=(e,n,t)=>{switch(n){case"opened":return e.panelOpened(t);case"shown":return e.panelShown(t);case"closed":return e.panelClosed(t);default:{const o=n;throw new RangeError(`[markdown-explorer] unknown toggle outcome ${JSON.stringify(o)}`)}}},Xn=({location:e})=>{const{config:n,labels:t,announcer:o}=k.useExplorer(),r=dn(e),s=z(r,P=>P.layout.docs),l=z(r,P=>P.layout.maximized),a=z(r,P=>P.source),[f,c]=u.useState(()=>({docs:s,latest:oe([],s,null)}));f.docs!==s&&c({docs:s,latest:oe(f.docs,s,f.latest)});const g=l!==null?l:f.latest,[S,L]=u.useState(!1),E=u.useRef(null),[d,p]=u.useState(0),m=u.useRef(null),O=u.useRef(null);u.useLayoutEffect(()=>{const P=m.current;m.current=null,P!==null&&(r.whenUrlRendered(()=>o.announce(P.announcement)),O.current?.bringIntoView(P.doc))}),u.useEffect(()=>()=>{E.current!==null&&clearTimeout(E.current)},[]);const x=u.useCallback(()=>{E.current!==null&&clearTimeout(E.current),L(!0),E.current=setTimeout(()=>{E.current=null,L(!1)},He)},[]),T=u.useCallback(()=>{E.current!==null&&clearTimeout(E.current),E.current=null,L(!1)},[]),h=u.useCallback(P=>{const N=r.titleOf(P),I=r.toggle(P);I==="rejected"&&x();const i=I==="rejected"?t.panelLimit(n.multiView.maxPanels):Jn(t,I,N);if(I==="shown"){m.current={doc:P,announcement:i},p(v=>v+1);return}r.whenUrlRendered(()=>{o.announce(i),I==="opened"&&O.current?.bringIntoView(P)})},[r,x,o,t,n]),b=u.useMemo(()=>new Set(s),[s]),y=u.useMemo(()=>({href:B.explorerHref(n,{view:"tree",source:a,doc:qe(s,l)}),target:"tree"}),[n,a,s,l]);return R.jsx(ne.ExplorerSplit,{view:"multi",explorer:R.jsx(ne.ExplorerPane,{mode:"multi",sourceId:a,currentPath:g,openPaths:b,onOpenDocument:h,onSourceChange:r.changeSource,onRevealSource:r.revealSource,viewSwitch:y}),content:R.jsx(Kn,{ref:O,store:r,body:fn,limitNotice:S?t.panelLimit(n.multiView.maxPanels):null,onLimitNoticeCovered:T}),contentCoversPage:l!==null,sheetDismissals:d,onDraggingChange:r.setSplitDragging})};exports.MultiLayout=Xn;exports.PANEL_LIMIT_NOTICE_MS=He;exports.latestOpenedDocument=oe;exports.treeSwitchDocument=qe;
@@ -1,23 +0,0 @@
1
- import { jsx as a, jsxs as g } from "react/jsx-runtime";
2
- import { useState as P, useMemo as u, useCallback as i } from "react";
3
- import { useLocation as D } from "react-router";
4
- import { e as s, c as b } from "./location-c1zdeySY.js";
5
- import { u as C, a as N, D as O, P as T, b as M } from "./index-CIZw73j9.js";
6
- import { E as R, a as _, b as G } from "./ExplorerSplit-CWcK1E4I.js";
7
- const H = /* @__PURE__ */ new Set(), I = ({ location: p }) => {
8
- const { config: e } = C(), t = N(), { hash: m } = D(), { source: n, doc: o, overrides: r } = p, [l, h] = P(R), d = u(() => ({ gathered: l, onGatheredChange: h }), [l]), v = i((c) => t(s(e, { view: "tree", source: n, doc: c, overrides: r }), "browse"), [t, e, n, r]), w = i((c) => t(s(e, { view: "tree", source: c, doc: o, overrides: r }), "switch-source"), [t, e, o, r]), S = i((c) => t(`${s(e, { view: "tree", source: c, doc: o, overrides: r })}${m}`, "browse"), [t, e, o, r, m]), E = i((c) => t(s(e, { view: "multi", source: n, docs: b(e, c) }), "switch-view"), [t, e, n]), x = u(() => ({ href: s(e, { view: "multi", source: n, docs: o === null ? [] : [o] }), target: "multi" }), [e, n, o]), f = u(() => ({ kind: "page", view: "tree", overrides: r, embed: {} }), [r]);
9
- return /* @__PURE__ */ a(
10
- _,
11
- {
12
- view: "tree",
13
- explorer: /* @__PURE__ */ a(G, { mode: "tree", sourceId: n, currentPath: o, openPaths: H, onOpenDocument: v, onSourceChange: w, onRevealSource: S, viewSwitch: x, tray: d, onOpenSelection: E }),
14
- content: /* @__PURE__ */ g("div", { className: "aqmx-document-column aqmx-tree-document", children: [
15
- o === null ? null : /* @__PURE__ */ a(O, { path: o, placement: T }),
16
- /* @__PURE__ */ a(M, { path: o, variant: f })
17
- ] })
18
- }
19
- );
20
- };
21
- export {
22
- I as TreeLayout
23
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),n=require("react"),f=require("react-router"),a=require("./location-CSIhx-L4.cjs"),l=require("./index-Cie6WPiM.cjs"),i=require("./ExplorerSplit-ajN3GSdA.cjs"),q=new Set,C=({location:x})=>{const{config:e}=l.useExplorer(),r=l.useExplorerNavigate(),{hash:p}=f.useLocation(),{source:c,doc:o,overrides:t}=x,[m,d]=n.useState(i.EMPTY_SELECTION),h=n.useMemo(()=>({gathered:m,onGatheredChange:d}),[m]),v=n.useCallback(s=>r(a.explorerHref(e,{view:"tree",source:c,doc:s,overrides:t}),"browse"),[r,e,c,t]),S=n.useCallback(s=>r(a.explorerHref(e,{view:"tree",source:s,doc:o,overrides:t}),"switch-source"),[r,e,o,t]),w=n.useCallback(s=>r(`${a.explorerHref(e,{view:"tree",source:s,doc:o,overrides:t})}${p}`,"browse"),[r,e,o,t,p]),E=n.useCallback(s=>r(a.explorerHref(e,{view:"multi",source:c,docs:a.canonicalMultiDocuments(e,s)}),"switch-view"),[r,e,c]),g=n.useMemo(()=>({href:a.explorerHref(e,{view:"multi",source:c,docs:o===null?[]:[o]}),target:"multi"}),[e,c,o]),b=n.useMemo(()=>({kind:"page",view:"tree",overrides:t,embed:{}}),[t]);return u.jsx(i.ExplorerSplit,{view:"tree",explorer:u.jsx(i.ExplorerPane,{mode:"tree",sourceId:c,currentPath:o,openPaths:q,onOpenDocument:v,onSourceChange:S,onRevealSource:w,viewSwitch:g,tray:h,onOpenSelection:E}),content:u.jsxs("div",{className:"aqmx-document-column aqmx-tree-document",children:[o===null?null:u.jsx(l.DocumentRefreshBar,{path:o,placement:l.PAGE_DOCUMENT_REFRESH}),u.jsx(l.DocumentPane,{path:o,variant:b})]})})};exports.TreeLayout=C;
@@ -1,205 +0,0 @@
1
- const Q = 4096;
2
- const O = Object.freeze([
3
- ".env*",
4
- "*.env",
5
- "*.env.*",
6
- "*.env~*",
7
- "*.env-*",
8
- "*.env_*",
9
- "*.env#*",
10
- ".git",
11
- ".git-credentials",
12
- ".svn",
13
- ".hg",
14
- "node_modules",
15
- "secrets",
16
- ".secrets",
17
- "secrets.json",
18
- "secrets.yml",
19
- "secrets.yaml",
20
- "secrets.toml",
21
- "secrets.ini",
22
- "secrets.txt",
23
- ".ssh",
24
- ".aws",
25
- ".gnupg",
26
- ".docker",
27
- ".kube",
28
- ".terraform",
29
- ".npmrc",
30
- ".yarnrc",
31
- ".yarnrc.yml",
32
- ".netrc",
33
- "_netrc",
34
- ".pypirc",
35
- ".pgpass",
36
- ".my.cnf",
37
- ".htpasswd",
38
- ".vault-token",
39
- "id_rsa*",
40
- "id_dsa*",
41
- "id_ecdsa*",
42
- "id_ed25519*",
43
- "*.pem",
44
- "*.key",
45
- "*.p8",
46
- "*.p12",
47
- "*.pfx",
48
- "*.ppk",
49
- "*.jks",
50
- "*.keystore",
51
- "*.kdbx",
52
- "*credentials*.json",
53
- "service-account*.json",
54
- "*.tfstate",
55
- "*.tfstate.*",
56
- "*.tfvars",
57
- "*.tfvars.json",
58
- ".*_history",
59
- "fish_history"
60
- ]), h = /[\u0000-\u001f\u007f]/u, b = /\p{Cs}/u, W = (e) => {
61
- const t = e.split("/").filter((n) => n !== "").at(-1);
62
- return t === void 0 ? e : t;
63
- }, m = (e) => e.length > 0 && e.length <= 4096 && !b.test(e) && !h.test(e) && !e.includes("\\"), y = (e) => e.normalize("NFKC").toUpperCase().toLowerCase(), T = /(?:%[0-9A-Fa-f]{2})+/gu, L = new TextDecoder("utf-8"), P = /[/\\]/u, S = (e) => e.replace(
64
- T,
65
- (t) => L.decode(
66
- Uint8Array.from(
67
- t.slice(1).split("%").map((n) => Number.parseInt(n, 16))
68
- )
69
- )
70
- ), x = (e) => {
71
- const t = [e];
72
- let n = e;
73
- for (let r = 0; r < 3 && n.includes("%"); r += 1) {
74
- const s = S(n);
75
- if (s === n) break;
76
- t.push(s), n = s;
77
- }
78
- return t.map(y);
79
- }, D = (e) => {
80
- if (typeof e != "string" || e.trim() === "" || e.includes("/") || e.includes("\\"))
81
- throw new RangeError(`[markdown-explorer] a deny pattern must be one non-blank path segment; got ${JSON.stringify(e)}`);
82
- const t = y(e).split("*").map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join(".*");
83
- return new RegExp(`^${t}$`, "su");
84
- }, f = (e) => {
85
- if (!Array.isArray(e)) throw new RangeError("[markdown-explorer] deny rules must be an array of segment patterns");
86
- const t = e.map(D), n = (s) => s !== "" && t.some((o) => o.test(s)), r = (s) => s !== "" && x(s).some((o) => n(o) || o.split(P).some(n));
87
- return {
88
- deniesPath: (s) => s.split("/").some(r),
89
- deniesName: r
90
- };
91
- }, N = f(O), j = Object.freeze({ deniesPath: () => !1, deniesName: () => !1 }), Z = (e) => e === void 0 ? N : e === !1 ? j : f(e), ee = (e, t) => f(e).deniesPath(t), R = Object.freeze(["unauthorized", "forbidden", "not-found", "not-configured", "invalid", "too-large", "unsupported", "failed"]), k = Object.freeze(["file", "directory"]), C = Object.freeze(["video", "audio", "pdf"]), w = Object.freeze(["info", "warning", "danger"]), U = Object.freeze(["markdown", "text", "image", "media", "file", "failure"]), d = Object.freeze({ min: 1, max: 6 }), te = 1e4, l = (e) => typeof e == "string" && /^\/(?![/\\])[\x21-\x7E]*$/u.test(e), ne = Object.freeze(["http:", "https:", "mailto:"]), $ = /^[a-z0-9-]{1,64}$/u, z = "https://relative.invalid/", E = 64, c = (e, t) => typeof t == "string" && e.includes(t), a = (e) => typeof e == "string" ? JSON.stringify(e.length > E ? `${e.slice(0, E)}…` : e) : typeof e, I = (e) => c(R, e), H = (e) => c(k, e), X = (e) => c(C, e), re = (e) => c(w, e), v = (e) => c(U, e), g = (e) => typeof e == "string" && $.test(e), se = (e, t) => {
92
- if (typeof e != "string") return !1;
93
- try {
94
- return t.includes(new URL(e, z).protocol);
95
- } catch {
96
- return !1;
97
- }
98
- }, u = (e) => {
99
- if (e === null || typeof e != "object") return "a failure must be an object";
100
- const { reason: t, code: n } = e;
101
- return I(t) ? n !== void 0 && !g(n) ? `a failure code must be 1 to 64 lowercase letters, digits or hyphens; got ${a(n)}` : null : `unknown failure reason ${a(t)}`;
102
- }, F = (e) => {
103
- if (e === null || typeof e != "object") return "an entry must be an object";
104
- const { name: t, path: n, type: r, mimeType: s, children: o, lazy: i } = e;
105
- return typeof t != "string" || t === "" ? "an entry needs a non-empty name" : typeof n != "string" || !m(n) ? "an entry needs an acceptable path" : H(r) ? s !== void 0 && typeof s != "string" ? "an entry mimeType must be a string" : i !== void 0 && typeof i != "boolean" ? "an entry lazy flag must be a boolean" : o !== void 0 && !Array.isArray(o) ? "entry children must be an array" : r === "file" && (o !== void 0 || i === !0) ? "a file entry cannot have children or be lazy" : i === !0 && Array.isArray(o) && o.length > 0 ? "a lazy directory must not list children" : null : `an entry type must be "file" or "directory"; got ${a(r)}`;
106
- }, _ = (e) => {
107
- if (F(e) !== null) return !1;
108
- const { children: t } = e;
109
- return t === void 0 || t.every(_);
110
- }, M = (e) => {
111
- if (e === null || typeof e != "object") return !1;
112
- const { status: t, entries: n, failure: r } = e;
113
- return t === "ok" ? Array.isArray(n) && n.every(_) : t === "error" && u(r) === null;
114
- }, oe = (e) => {
115
- if (e === null || typeof e != "object") return !1;
116
- const { status: t, ancestors: n, failure: r } = e;
117
- return t === "ok" ? n === null || A(n) : t === "error" && u(r) === null;
118
- }, A = (e) => Array.isArray(e) && e.every((t) => typeof t == "string" && m(t)) && new Set(e).size === e.length, ie = (e) => {
119
- if (e === null || typeof e != "object") return !1;
120
- const { status: t, source: n, ancestors: r, failure: s } = e;
121
- return t === "ok" ? n === null && r === null || typeof n == "string" && n !== "" && A(r) : t === "error" && u(s) === null;
122
- }, ae = (e) => {
123
- if (e === null || typeof e != "object") return !1;
124
- const { status: t, loadedAt: n } = e;
125
- return t === "ok" && !(Number.isSafeInteger(n) && n >= 0) ? !1 : M(e);
126
- }, V = (e) => {
127
- if (e === null || typeof e != "object") return "a heading must be an object";
128
- const { text: t, depth: n, id: r } = e;
129
- return typeof t != "string" || typeof r != "string" ? "a heading needs text and id strings" : typeof n != "number" || !Number.isInteger(n) || n < d.min || n > d.max ? `a heading depth must be an integer in 1..6; got ${String(n)}` : null;
130
- }, G = (e) => {
131
- if (e === null || typeof e != "object") return "a document must be an object";
132
- const t = e, { kind: n } = t;
133
- if (!v(n)) return `unknown document kind ${a(n)}`;
134
- if (n === "failure") return u(t.failure);
135
- if (typeof t.name != "string") return "a document needs a name string";
136
- switch (n) {
137
- case "markdown": {
138
- const { htmlContent: r, headings: s } = t;
139
- if (typeof r != "string" || !Array.isArray(s)) return "a markdown document needs htmlContent and headings";
140
- for (const o of s) {
141
- const i = V(o);
142
- if (i !== null) return i;
143
- }
144
- return null;
145
- }
146
- case "text":
147
- return typeof t.text != "string" || typeof t.truncated != "boolean" ? "a text document needs text and truncated" : l(t.url) ? null : "a text document needs a root-relative url";
148
- case "image":
149
- return l(t.url) ? null : "an image document needs a root-relative url";
150
- case "media":
151
- return l(t.url) ? X(t.mediaType) ? null : `unknown media type ${a(t.mediaType)}` : "a media document needs a root-relative url";
152
- case "file":
153
- return l(t.url) ? null : "a file document needs a root-relative url";
154
- }
155
- }, ce = (e) => G(e) === null, le = (e, t) => ({ kind: "failure", failure: Y(e, t) }), Y = (e, t) => g(t) ? { reason: e, code: t } : { reason: e }, K = Object.freeze(["tree", "children", "ancestors", "reveal", "document", "refresh", "asset", "link-card"]), p = Object.freeze({ source: "source", path: "path", version: "v" }), B = "asset", J = "link-card", ue = (e, t, n) => {
156
- const r = `${e}/${B}?${p.path}=${encodeURIComponent(t)}`;
157
- return n === null ? r : `${r}&${p.version}=${encodeURIComponent(n)}`;
158
- }, fe = (e) => `${e}/${J}`, de = "X-Markdown-Explorer-Scope", Ee = "X-Markdown-Explorer", pe = "refresh", me = (e) => K.includes(e), q = Object.freeze({
159
- invalid: 400,
160
- unauthorized: 401,
161
- forbidden: 403,
162
- "not-found": 404,
163
- "too-large": 413,
164
- "not-configured": 500,
165
- unsupported: 500,
166
- failed: 500
167
- }), ye = (e) => {
168
- const [t, ...n] = R.filter((r) => q[r] === e);
169
- return t !== void 0 && n.length === 0 ? t : "failed";
170
- };
171
- export {
172
- u as A,
173
- ae as B,
174
- ce as C,
175
- O as D,
176
- te as E,
177
- R as F,
178
- Q as M,
179
- fe as a,
180
- I as b,
181
- g as c,
182
- re as d,
183
- ue as e,
184
- Y as f,
185
- se as g,
186
- X as h,
187
- m as i,
188
- G as j,
189
- F as k,
190
- ne as l,
191
- me as m,
192
- q as n,
193
- Ee as o,
194
- pe as p,
195
- de as q,
196
- Z as r,
197
- p as s,
198
- le as t,
199
- ee as u,
200
- W as v,
201
- ye as w,
202
- ie as x,
203
- oe as y,
204
- M as z
205
- };
@@ -1 +0,0 @@
1
- "use strict";const _=Object.freeze([".env*","*.env","*.env.*","*.env~*","*.env-*","*.env_*","*.env#*",".git",".git-credentials",".svn",".hg","node_modules","secrets",".secrets","secrets.json","secrets.yml","secrets.yaml","secrets.toml","secrets.ini","secrets.txt",".ssh",".aws",".gnupg",".docker",".kube",".terraform",".npmrc",".yarnrc",".yarnrc.yml",".netrc","_netrc",".pypirc",".pgpass",".my.cnf",".htpasswd",".vault-token","id_rsa*","id_dsa*","id_ecdsa*","id_ed25519*","*.pem","*.key","*.p8","*.p12","*.pfx","*.ppk","*.jks","*.keystore","*.kdbx","*credentials*.json","service-account*.json","*.tfstate","*.tfstate.*","*.tfvars","*.tfvars.json",".*_history","fish_history"]),x=/[\u0000-\u001f\u007f]/u,N=/\p{Cs}/u,C=e=>{const t=e.split("/").filter(n=>n!=="").at(-1);return t===void 0?e:t},f=e=>e.length>0&&e.length<=4096&&!N.test(e)&&!x.test(e)&&!e.includes("\\"),A=e=>e.normalize("NFKC").toUpperCase().toLowerCase(),U=/(?:%[0-9A-Fa-f]{2})+/gu,k=new TextDecoder("utf-8"),H=/[/\\]/u,j=e=>e.replace(U,t=>k.decode(Uint8Array.from(t.slice(1).split("%").map(n=>Number.parseInt(n,16))))),X=e=>{const t=[e];let n=e;for(let r=0;r<3&&n.includes("%");r+=1){const o=j(n);if(o===n)break;t.push(o),n=o}return t.map(A)},w=e=>{if(typeof e!="string"||e.trim()===""||e.includes("/")||e.includes("\\"))throw new RangeError(`[markdown-explorer] a deny pattern must be one non-blank path segment; got ${JSON.stringify(e)}`);const t=A(e).split("*").map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*");return new RegExp(`^${t}$`,"su")},d=e=>{if(!Array.isArray(e))throw new RangeError("[markdown-explorer] deny rules must be an array of segment patterns");const t=e.map(w),n=o=>o!==""&&t.some(s=>s.test(o)),r=o=>o!==""&&X(o).some(s=>n(s)||s.split(H).some(n));return{deniesPath:o=>o.split("/").some(r),deniesName:r}},I=d(_),$=Object.freeze({deniesPath:()=>!1,deniesName:()=>!1}),z=e=>e===void 0?I:e===!1?$:d(e),F=(e,t)=>d(e).deniesPath(t),p=Object.freeze(["unauthorized","forbidden","not-found","not-configured","invalid","too-large","unsupported","failed"]),v=Object.freeze(["file","directory"]),M=Object.freeze(["video","audio","pdf"]),V=Object.freeze(["info","warning","danger"]),G=Object.freeze(["markdown","text","image","media","file","failure"]),m=Object.freeze({min:1,max:6}),Y=1e4,u=e=>typeof e=="string"&&/^\/(?![/\\])[\x21-\x7E]*$/u.test(e),K=Object.freeze(["http:","https:","mailto:"]),J=/^[a-z0-9-]{1,64}$/u,Q="https://relative.invalid/",y=64,c=(e,t)=>typeof t=="string"&&e.includes(t),a=e=>typeof e=="string"?JSON.stringify(e.length>y?`${e.slice(0,y)}…`:e):typeof e,O=e=>c(p,e),B=e=>c(v,e),g=e=>c(M,e),W=e=>c(V,e),q=e=>c(G,e),R=e=>typeof e=="string"&&J.test(e),Z=(e,t)=>{if(typeof e!="string")return!1;try{return t.includes(new URL(e,Q).protocol)}catch{return!1}},l=e=>{if(e===null||typeof e!="object")return"a failure must be an object";const{reason:t,code:n}=e;return O(t)?n!==void 0&&!R(n)?`a failure code must be 1 to 64 lowercase letters, digits or hyphens; got ${a(n)}`:null:`unknown failure reason ${a(t)}`},h=e=>{if(e===null||typeof e!="object")return"an entry must be an object";const{name:t,path:n,type:r,mimeType:o,children:s,lazy:i}=e;return typeof t!="string"||t===""?"an entry needs a non-empty name":typeof n!="string"||!f(n)?"an entry needs an acceptable path":B(r)?o!==void 0&&typeof o!="string"?"an entry mimeType must be a string":i!==void 0&&typeof i!="boolean"?"an entry lazy flag must be a boolean":s!==void 0&&!Array.isArray(s)?"entry children must be an array":r==="file"&&(s!==void 0||i===!0)?"a file entry cannot have children or be lazy":i===!0&&Array.isArray(s)&&s.length>0?"a lazy directory must not list children":null:`an entry type must be "file" or "directory"; got ${a(r)}`},T=e=>{if(h(e)!==null)return!1;const{children:t}=e;return t===void 0||t.every(T)},L=e=>{if(e===null||typeof e!="object")return!1;const{status:t,entries:n,failure:r}=e;return t==="ok"?Array.isArray(n)&&n.every(T):t==="error"&&l(r)===null},ee=e=>{if(e===null||typeof e!="object")return!1;const{status:t,ancestors:n,failure:r}=e;return t==="ok"?n===null||P(n):t==="error"&&l(r)===null},P=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"&&f(t))&&new Set(e).size===e.length,te=e=>{if(e===null||typeof e!="object")return!1;const{status:t,source:n,ancestors:r,failure:o}=e;return t==="ok"?n===null&&r===null||typeof n=="string"&&n!==""&&P(r):t==="error"&&l(o)===null},ne=e=>{if(e===null||typeof e!="object")return!1;const{status:t,loadedAt:n}=e;return t==="ok"&&!(Number.isSafeInteger(n)&&n>=0)?!1:L(e)},re=e=>{if(e===null||typeof e!="object")return"a heading must be an object";const{text:t,depth:n,id:r}=e;return typeof t!="string"||typeof r!="string"?"a heading needs text and id strings":typeof n!="number"||!Number.isInteger(n)||n<m.min||n>m.max?`a heading depth must be an integer in 1..6; got ${String(n)}`:null},b=e=>{if(e===null||typeof e!="object")return"a document must be an object";const t=e,{kind:n}=t;if(!q(n))return`unknown document kind ${a(n)}`;if(n==="failure")return l(t.failure);if(typeof t.name!="string")return"a document needs a name string";switch(n){case"markdown":{const{htmlContent:r,headings:o}=t;if(typeof r!="string"||!Array.isArray(o))return"a markdown document needs htmlContent and headings";for(const s of o){const i=re(s);if(i!==null)return i}return null}case"text":return typeof t.text!="string"||typeof t.truncated!="boolean"?"a text document needs text and truncated":u(t.url)?null:"a text document needs a root-relative url";case"image":return u(t.url)?null:"an image document needs a root-relative url";case"media":return u(t.url)?g(t.mediaType)?null:`unknown media type ${a(t.mediaType)}`:"a media document needs a root-relative url";case"file":return u(t.url)?null:"a file document needs a root-relative url"}},oe=e=>b(e)===null,se=(e,t)=>({kind:"failure",failure:S(e,t)}),S=(e,t)=>R(t)?{reason:e,code:t}:{reason:e},ie=Object.freeze(["tree","children","ancestors","reveal","document","refresh","asset","link-card"]),E=Object.freeze({source:"source",path:"path",version:"v"}),ae="asset",ce="link-card",le=(e,t,n)=>{const r=`${e}/${ae}?${E.path}=${encodeURIComponent(t)}`;return n===null?r:`${r}&${E.version}=${encodeURIComponent(n)}`},ue=e=>`${e}/${ce}`,Ee="X-Markdown-Explorer-Scope",fe="X-Markdown-Explorer",de="refresh",pe=e=>ie.includes(e),D=Object.freeze({invalid:400,unauthorized:401,forbidden:403,"not-found":404,"too-large":413,"not-configured":500,unsupported:500,failed:500}),Re=e=>{const[t,...n]=p.filter(r=>D[r]===e);return t!==void 0&&n.length===0?t:"failed"};exports.DEFAULT_DENIED_PATH_SEGMENTS=_;exports.EXPLORER_DATA_QUERY=E;exports.EXPLORER_FAILURE_REASONS=p;exports.EXPLORER_FAILURE_STATUS=D;exports.EXPLORER_LINK_PROTOCOLS=K;exports.EXPLORER_MAX_HEADINGS=Y;exports.EXPLORER_REFRESH_HEADER=fe;exports.EXPLORER_REFRESH_HEADER_VALUE=de;exports.EXPLORER_SCOPE_HEADER=Ee;exports.MAX_DOCUMENT_PATH_LENGTH=4096;exports.documentViolation=b;exports.entryViolation=h;exports.explorerAssetHref=le;exports.explorerLinkCardEndpoint=ue;exports.failureDocument=se;exports.failureOf=S;exports.failureReasonOfStatus=Re;exports.failureViolation=l;exports.isAcceptableDocumentPath=f;exports.isAcceptableUrl=Z;exports.isDeniedPath=F;exports.isExplorerAncestorsResult=ee;exports.isExplorerChildrenResult=L;exports.isExplorerDataOperation=pe;exports.isExplorerDocument=oe;exports.isExplorerFailureCode=R;exports.isExplorerFailureReason=O;exports.isExplorerMediaType=g;exports.isExplorerNoticeTone=W;exports.isExplorerRevealResult=te;exports.isExplorerTreeResult=ne;exports.lastPathSegment=C;exports.resolvePathRules=z;