@docx-editor.dev/core 2.30.0 → 2.31.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.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +16 -25
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +15 -16
- package/dist/binding.js +1 -1
- package/dist/bookmark-names-DDuAra_V.d.ts +37 -0
- package/dist/{chrome-print-BM3Js-6X.d.ts → chrome-print-BWvaVEhD.d.ts} +318 -33
- package/dist/chunk-243W4WW2.cjs +2 -0
- package/dist/{chunk-RJCQGJR7.js → chunk-2E2RPEKX.js} +1 -1
- package/dist/chunk-4S24UOPG.js +30 -0
- package/dist/chunk-5JPIEN54.cjs +3 -0
- package/dist/{chunk-KJRTNY2Q.cjs → chunk-5SO5QDMV.cjs} +1 -1
- package/dist/{chunk-WF7JZ755.cjs → chunk-6IDOVU6L.cjs} +1 -1
- package/dist/chunk-DBOOTED4.cjs +30 -0
- package/dist/chunk-EOTAXOJY.cjs +5 -0
- package/dist/chunk-FDAKJ2SJ.cjs +30 -0
- package/dist/chunk-FNNOJNGY.js +3 -0
- package/dist/chunk-FT33HRZP.js +5 -0
- package/dist/{chunk-HYASLE2G.cjs → chunk-HC6YNKUI.cjs} +1 -1
- package/dist/chunk-HZ66UCIS.js +2 -0
- package/dist/{chunk-5RRAZMBU.cjs → chunk-IBRBNT37.cjs} +1 -1
- package/dist/chunk-IVIN7X43.js +30 -0
- package/dist/chunk-LZY6B6IV.js +4 -0
- package/dist/chunk-MOYYRVFV.cjs +2 -0
- package/dist/{chunk-YZGUBCHP.js → chunk-N6B3BXCL.js} +1 -1
- package/dist/chunk-Q5K2GGNG.js +2 -0
- package/dist/chunk-R2XINWVE.js +7 -0
- package/dist/chunk-SUEXVBPR.js +1 -0
- package/dist/chunk-T2QQHG5C.js +18 -0
- package/dist/{chunk-T32MGBJS.js → chunk-VWIJKH4A.js} +1 -1
- package/dist/chunk-WO4V6PNS.cjs +18 -0
- package/dist/chunk-XMJKFURD.cjs +4 -0
- package/dist/{chunk-FLBEJC6X.cjs → chunk-XSTGE3NI.cjs} +1 -1
- package/dist/chunk-YQWMI6J5.cjs +7 -0
- package/dist/{chunk-WPDD2Y32.js → chunk-ZCJS7D7S.js} +1 -1
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +3 -4
- package/dist/contracts/document.d.ts +3 -3
- package/dist/contracts/editor.d.ts +8 -9
- package/dist/contracts/interaction.d.ts +2 -2
- package/dist/contracts/modules.d.ts +12 -13
- package/dist/contracts/types.d.ts +2 -2
- package/dist/{custom-node-writes-0v0Kgw1T.d.ts → custom-node-writes-TeUvMP13.d.ts} +2 -2
- package/dist/{diagnostic-context-CcAO4q1s.d.ts → diagnostic-context-DJ0P1uZE.d.ts} +3 -2
- package/dist/{diagnostic-hints-2Bke6H_w.d.ts → diagnostic-hints-C9JlLz1L.d.ts} +1 -1
- package/dist/{document-protection-8eyMWIJ0.d.ts → document-protection-C8x3P2J6.d.ts} +1 -1
- package/dist/{editor-DaEJd2so.d.ts → editor-B2ShlO23.d.ts} +292 -50
- package/dist/{editor-scope-7o9xweiJ.d.ts → editor-scope-C7ke1KJG.d.ts} +57 -4
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +5 -3
- package/dist/editor.d.ts +602 -31
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +13 -14
- package/dist/export.js +2 -2
- package/dist/{font-resolver-CL9BVKZo.d.ts → font-resolver-CWh40DYp.d.ts} +1 -1
- package/dist/{headless-document-view-DZQN8Bnx.d.ts → headless-document-view-qOpaCF82.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +22 -23
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-cEnVrhWg.d.ts → layout-shaping-CWS3j0Xr.d.ts} +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +87 -22
- package/dist/layout.js +1 -1
- package/dist/{note-properties-9FH8zAeG.d.ts → note-properties-QsKh24sM.d.ts} +1 -1
- package/dist/{omml-equation-DP2WpUbK.d.ts → omml-equation-BsLAa2lX.d.ts} +27 -9
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +20 -10
- package/dist/output.js +1 -1
- package/dist/{protocol-CZ1uUlPO.d.ts → protocol-COZJUKUY.d.ts} +94 -2
- package/dist/{review-paragraph-order-CqVelc5A.d.ts → review-paragraph-order-C_QbCKcH.d.ts} +1 -1
- package/dist/{semantic-cell-selection-Dr9yxFZt.d.ts → semantic-cell-selection-Cub9FDa8.d.ts} +2 -2
- package/dist/{semantic-interaction-Dc3pf3hr.d.ts → semantic-interaction-dApRIYpt.d.ts} +1 -1
- package/dist/{semantic-paint-Bz3FBAoH.d.ts → semantic-paint-DLzA8sjP.d.ts} +3 -3
- package/dist/{semantic-record-queries-Bx0pl6kL.d.ts → semantic-record-queries-3yp9o11g.d.ts} +1 -1
- package/dist/{semantic-records-CjcF26ZL.d.ts → semantic-records-B-akgRch.d.ts} +130 -87
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +48 -22
- package/dist/store.js +1 -1
- package/dist/{tree-package-store-DKhdEVym.d.ts → tree-package-store-B8l8DX3Z.d.ts} +675 -645
- package/dist/{tree-session-contract-CwnTEVLF.d.ts → tree-session-contract-DeLRqohz.d.ts} +26 -13
- package/dist/{types-barrel-CA0xB8kH.d.ts → types-barrel-CkF2JbU4.d.ts} +1146 -745
- package/package.json +2 -2
- package/dist/chunk-2PV5L5NJ.js +0 -5
- package/dist/chunk-5OTS2EJ7.js +0 -7
- package/dist/chunk-5P4223J4.cjs +0 -27
- package/dist/chunk-5SPITS5F.js +0 -18
- package/dist/chunk-7ATNKARV.js +0 -2
- package/dist/chunk-BGCUTKWE.cjs +0 -5
- package/dist/chunk-EBCXSH2W.js +0 -3
- package/dist/chunk-ERECKTIR.cjs +0 -2
- package/dist/chunk-JC47NRJC.cjs +0 -3
- package/dist/chunk-NKPUH3QJ.js +0 -1
- package/dist/chunk-PF5NJWS3.js +0 -2
- package/dist/chunk-PWTRJSES.cjs +0 -18
- package/dist/chunk-QFKGI242.cjs +0 -30
- package/dist/chunk-RPPV4S6T.cjs +0 -4
- package/dist/chunk-UM26GH5B.js +0 -30
- package/dist/chunk-VRCZBFLH.js +0 -27
- package/dist/chunk-WK5X2MMA.cjs +0 -7
- package/dist/chunk-YBMWBXST.cjs +0 -2
- package/dist/chunk-ZOS2PM4A.js +0 -4
- package/dist/image-resources-Bipz8toD.d.ts +0 -211
package/dist/editor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Vb as AUTO_ZOOM_MODE,$b as BROWSER_AUTOMATION_CAPABILITIES,kb as CHROME_GROUPS,ob as CHROME_MENUS,rb as CHROME_UNAVAILABLE_KEY,wb as CONTENT_CONTROL_PICTURE_ACCEPT,Pc as ChromeExportError,Rc as ChromePrintError,c as DEFAULT_REVIEW_PANE,ra as DEFAULT_TABLE_CHROME_DRAFT,W as DEFAULT_WATERMARK_FONT,Gc as DocumentRefreshError,da as EMU_PER_POINT,Wb as FIT_WIDTH_ZOOM_MODE,Ic as HIGHLIGHT_REFRESH_MS,ma as IMAGE_OVERLAY_NUDGE_PT,na as IMAGE_OVERLAY_NUDGE_SHIFT_PT,Dc as LINE_SPACING_PRESETS,f as LOADING_SNAPSHOT,vc as NO_MIXED_FIELDS,E as PX_PER_CM,D as PX_PER_INCH,Sb as REVIEW_MARKERS_GUTTER_PX,Kc as SEARCH_DEBOUNCE_MS,Nc as SEARCH_HIGHLIGHT_PRIORITY,Mc as SEARCH_HIGHLIGHT_SET,Lc as SEARCH_MATCH_LIMIT,K as SNAP_TWIPS_CM,J as SNAP_TWIPS_INCH,xa as TABLE_BORDER_STYLE_OPTIONS,wa as TABLE_BORDER_TARGET_OPTIONS,ya as TABLE_BORDER_WIDTH_OPTIONS,sa as TABLE_CHROME_SLOT_IDS,rc as TAB_ALIGNMENT_LABELS,Ra as TOOLBAR_COLLAPSE_ORDER,Ta as TOOLBAR_OVERFLOW_HYSTERESIS,Xa as TOOLBAR_PANEL_EDGE_MARGIN,Sa as TOOLBAR_PINNED_GROUPS,I as TWIPS_PER_CM,H as TWIPS_PER_INCH,Ub as ZOOM_MAX,Tb as ZOOM_MIN,zc as alignmentAfterDirectionChange,za as applyTableChromePick,R as applyThemeShade,Q as applyThemeTint,Wa as arrangeToolbarGroups,fb as barRoomWidth,Rb as beginEditorPreview,Cc as bindHistoryGroup,g as blankDocumentBytes,Zc as bookmarkDialogInitialName,_c as bookmarkDialogNameState,Uc as bookmarkDialogRows,Eb as calendarDateForKey,Gb as calendarDateFromText,Fb as calendarDateText,Cb as calendarMonth,Hb as calendarMonthNames,Ab as calendarMonthTitle,Bb as calendarWeekdays,ka as canExecuteImageCommand,ja as captureImageMutationPreconditions,yc as changedFields,ib as chordLetter,qb as chromeControlCount,pb as chromeMenuSlots,Da as chromeProbeForSlot,lb as chromeSlotId,Ja as chromeSlotIsToggle,i as clipboardDropLandsText,h as clipboardPasteLandsContent,Va as collapseOrder,bb as collapsibleGroupCost,O as commandExecOptions,Ea as commandForSlot,Ga as commandForSlotValue,Fa as commandForTableChromeSlotValue,lc as computeImageResizeResult,ha as computeMovedImagePosition,ga as computeResizedImageExtentEmu,ub as contentControlPopupKeyDown,vb as contentControlPopupOpener,gb as controlsOverflow,k as copyEditorStyles,ac as createBrowserAutomationHost,Ib as createContentControlListNavigation,Hc as createDocumentRefresh,Oc as createDocumentSearch,_b as createDocxEditor,B as createFontSource,mc as createImageOverlayScrollPort,b as createLayoutShaping,ba as cropPercentFromCropPermille,$ as cropPercentFromPermille,Y as cropPercentFromSourceCrop,aa as cropPermilleFromCropPercent,_ as cropPermilleFromPercent,hc as cssPixelsToLayoutPoints,C as customFonts,mb as defaultChromeGroups,ta as defaultTableLabel,N as dragIndent,Qa as editorCommandKey,o as editorHostDocument,n as editorHostElement,p as editorHostWindow,bc as editorInstanceScope,Qb as editorPreviewActive,fa as emuToOverlayPoints,Lb as equationAtPosition,la as executeImageCommand,nc as finalizeImageOverlayInteraction,zb as firstDayOfWeek,pc as formatInches,nb as formattingBarChromeGroups,F as generateRulerTicks,Yc as goToBookmarkGroups,Xc as goToBookmarkMatch,Vc as goToBookmarkRows,Wc as goToBookmarkTarget,L as handlePosition,dc as hasOpenNestedPopup,Kb as historyShortcutOf,l as hostDocumentOf,u as hostTimers,m as hostWindowOf,qc as inchesToTwips,Sc as isChromePrintShortcut,t as isDomNode,q as isElementNode,jb as isGoToChord,r as isHTMLElementNode,y as isInputEvent,v as isKeyboardEvent,x as isMouseEvent,w as isPointerEvent,pa as isStaleImageInteractionCommit,ua as isTableChromeSlot,s as isTextNode,xb as isoDateOf,gc as layoutPointsToCssPixels,Fc as lineSpacingMenuRowLabel,Ec as lineSpacingMenuRows,cc as listenForPopupEscape,ec as listenForPopupFocusLeave,A as loadFonts,T as lowerColorValueForBorder,U as lowerColorValueForFill,wc as mixedFieldsOf,Mb as mountPaginatedSurface,tb as observeContentControlPopup,j as openEditorWindow,ic as overlayFrameToSheetCssPixels,jc as overlayHostOrigin,yb as parseIsoDate,z as partOfNodeId,ea as pointsToEmu,sb as positionContentControlPopup,Aa as probeTableChromeCommand,hb as readAvailableWidth,eb as readColumnGap,db as readInlineMargins,Pb as reportAutomationException,Ob as reportAutomationRefusal,kc as resizePreservesAspect,V as resolveColorValueToCss,d as resolveReviewPane,S as resolveThemeColorHex,Xb as resolveZoomMode,Zb as reviewPaneEntitledZoom,e as reviewPaneListsItem,G as rulerPageBox,Qc as runChromeExport,Tc as runChromePrint,Na as runSave,La as runTableChromeCommand,Pa as runTableCommand,Ma as runToolbarCommand,Za as sameOverflow,xc as sameTabStops,Yb as sameZoomMode,uc as seedFields,oa as selectedDrawingOverlayTargetOf,ia as selectedImageStateOf,ab as separatorLeadingCost,Db as shiftMonth,tc as signedFirstLineOf,M as snapTwips,Z as sourceCropFromCropPercent,sc as specialOf,Jb as surfaceExtent,fc as surfacePaintScale,Ca as tableChromeIconPaths,Ba as tableChromeLabelKeyForTarget,Ha as tableChromeToolbarState,va as tableChromeVisible,qa as tableCommandState,Oa as tableCommandToolbarState,a as toEditorFontError,Ia as toolbarCommandState,Ka as toolbarCommandStates,Ua as toolbarGroupPriority,_a as toolbarOverflowGroups,Ya as toolbarPanelPlacement,$a as toolbarPopupLeft,cb as trailingGapCost,Bc as trapTabWithin,oc as twipsToInches,ca as validateImageCropPercent,P as validateThemeModifier,Jc as watchHighlights,X as watermarkShapeBox,Ac as withTabStop}from'./chunk-IVIN7X43.js';export{a as resolveEditorModules}from'./chunk-4HENIAFG.js';import'./chunk-LZY6B6IV.js';export{d as DEFAULT_FONT,i as FONT_RESOLVER_BRAND,h as FONT_RESOLVER_MARK_KEY,c as MAX_RESOLVER_FAMILIES,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,n as composeFontOrigins,j as defineFontResolver,k as isFontResolver}from'./chunk-HZ66UCIS.js';export{t as disposeLayoutShaping}from'./chunk-FNNOJNGY.js';import'./chunk-RIYSCEFQ.js';import'./chunk-R2XINWVE.js';import'./chunk-SUEXVBPR.js';export{Wa as DEFAULT_REVISION_MARKUP,Va as REVISION_MARKUP_COLORS,Xa as resolveRevisionMarkup}from'./chunk-4S24UOPG.js';import'./chunk-FT33HRZP.js';import'./chunk-2E2RPEKX.js';import'./chunk-ZCJS7D7S.js';import'./chunk-VWIJKH4A.js';import'./chunk-Q5K2GGNG.js';import'./chunk-6JIJOZDW.js';import'./chunk-N6B3BXCL.js';export{r as DEFAULT_IMAGE_RESOURCE_LIMITS,dl as DRAWING_REL_FROM_H,el as DRAWING_REL_FROM_V,Gd as IMAGE_WRAP_TARGETS,_i as TEXT_FORM_FORMATS,gl as positionInputFromPropertiesCommand,fl as propertiesCommandHasPositionFields,s as resolveImageResourceLimits,je as resolveSvgIntrinsicSize,fe as sniffImageMime,cl as validateDrawingPositionInput,ke as validateRasterHeader,hl as validateSetImagePositionCommand}from'./chunk-T2QQHG5C.js';import'./chunk-S6J4O5XP.js';
|
package/dist/export.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var chunkERECKTIR_cjs=require('./chunk-ERECKTIR.cjs'),chunkJC47NRJC_cjs=require('./chunk-JC47NRJC.cjs'),chunkHYASLE2G_cjs=require('./chunk-HYASLE2G.cjs'),chunkQFKGI242_cjs=require('./chunk-QFKGI242.cjs'),chunkFLBEJC6X_cjs=require('./chunk-FLBEJC6X.cjs');require('./chunk-5RRAZMBU.cjs');var chunkYBMWBXST_cjs=require('./chunk-YBMWBXST.cjs'),chunkPWTRJSES_cjs=require('./chunk-PWTRJSES.cjs');function M(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,c)=>d.id!==a.glyphs[c]?.id))return t;let r=[],s=0;for(let d of o.text){let c=d.toUpperCase()!==d,y=r.at(-1);y&&(y.lower===c||/\p{M}/u.test(d))?y.text+=d:r.push({text:d,start:s,lower:c}),s+=d.length;}let i=[],p=[],l=[],u=true,h=0;for(let d of o.environment.direction==="rtl"?r.reverse():r){let c=d.lower?.8:1,y=[],E=[],b="",f=d.start;for(let F of d.text){let m=d.lower?F.toUpperCase():F;for(let S=0;S<m.length;S++)y.push(f),E.push(f+F.length);b+=m,f+=F.length;}let g=e.shape({...n,text:b}),x=i.length;for(let[F,m]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:l.push(S*c),i.push({...m,cluster:y[m.cluster]??d.start,originX:chunkQFKGI242_cjs.n(h+Math.round(m.originX*c)),originY:chunkQFKGI242_cjs.n(Math.round(m.originY*c)),offsetX:chunkQFKGI242_cjs.n(Math.round(m.offsetX*c)),offsetY:chunkQFKGI242_cjs.n(Math.round(m.offsetY*c)),advanceX:chunkQFKGI242_cjs.n(Math.round(m.advanceX*c)),advanceY:chunkQFKGI242_cjs.n(Math.round(m.advanceY*c)),drawScale:c});}for(let F of g.clusters){let m=y[F.textStart]??d.start,S=E[F.textEnd-1]??f,R=chunkQFKGI242_cjs.n(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===m&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:chunkQFKGI242_cjs.n(T.advance+R),caretEdges:[chunkQFKGI242_cjs.n(0),chunkQFKGI242_cjs.n(T.advance+R)]}:p.push({...F,textStart:m,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:R,caretEdges:F.caretEdges.map(V=>chunkQFKGI242_cjs.n(Math.round(V*c))),fontSpan:0});}h+=g.glyphs.reduce((F,m)=>F+Math.round(m.advanceX*c),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var ut=new WeakMap;function Ht(e){let o=ut.get(e);return o===void 0&&(o=Vt(e.bytes,e.faceIndex),ut.set(e,o)),o}var Xt=new Set(["COLR","CBDT","sbix"]),Gt=512;function Vt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(pt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Gt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Xt.has(pt(e,s)))return true}return false}function pt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var Wt=/\p{Emoji_Presentation}|️/u;function Yt(e){return Wt.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Ht);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return Yt(o)?[...t,...n]:[...n,...t]}var $t=2048;function ft(e,o,t,n){if(!t.clusters.length||t.clusters.length>$t)return null;let a=(f,g)=>{let{context:x,...F}=o,m={...F,text:g,environment:chunkQFKGI242_cjs.p({...o.environment,font:f})};return M(e,m,e.shape(m))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),R=s.get(x)??z(n,S).find(T=>{try{return !a(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!R)return null;s.set(x,R),g=R;}let m=r.at(-1);m&&m.font===g&&m.end===f.textStart?m.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let i=[],p=[],l=[],u=[],h=true,d=0,c=0,y=0,E=0,b=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=a(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(m=>m.id===0))return null;let x=i.length,F=l.length;for(let m of g.glyphs)i.push({...m,cluster:f.start+m.cluster,originX:chunkQFKGI242_cjs.n(d+m.originX),originY:chunkQFKGI242_cjs.n(c+m.originY)});if(g.exactAdvancesX===void 0)h=false;else for(let m of g.exactAdvancesX)u.push(m);for(let m of g.clusters)p.push({...m,textStart:f.start+m.textStart,textEnd:f.start+m.textEnd,glyphStart:x+m.glyphStart,glyphEnd:x+m.glyphEnd,fontSpan:F});g.glyphs.length&&l.push({font:f.font,glyphStart:x,glyphEnd:i.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),d+=g.glyphs.reduce((m,S)=>m+S.advanceX,0),c+=g.glyphs.reduce((m,S)=>m+S.advanceY,0),y=Math.max(y,g.metrics.ascent),E=Math.max(E,g.metrics.descent),b=Math.max(b,g.metrics.lineGap);}return chunkQFKGI242_cjs.s({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:h&&u.length===i.length?u:void 0,metrics:{ascent:chunkQFKGI242_cjs.n(y),descent:chunkQFKGI242_cjs.n(E),lineGap:chunkQFKGI242_cjs.n(b)}},{...o.environment,fallbackOrder:n})}var Kt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Zt=512,mt=new WeakMap;function Jt(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",i=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let c=0;c<p;c+=1){let y=i+12+c*16;if(s(y)==="GSUB"){l=r(y+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let h=l+u,d=a(h);if(d<0)return t;for(let c=0;c<Math.min(d,Zt);c+=1){let y=s(h+2+c*6);y&&t.add(y);}return t}function Qt(e,o){let t=mt.get(e);return t||(t=Jt(e.bytes,e.faceIndex),mt.set(e,t)),(Kt.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function yt(e,o){let t=e.filter(n=>Qt(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return chunkQFKGI242_cjs.s({...r,text:o.text},o.environment)}catch{return t}}function ht(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof chunkQFKGI242_cjs.d)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=M(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)){let u=ft(n,i,l,t);if(u)return u}for(let u of yt(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let h={...i,environment:chunkQFKGI242_cjs.p({...i.environment,font:u})},d=M(n,h,n.shape(h));if(!d.glyphs.some(c=>c.id===0))return d}catch{}return l};return {...e,shaper:r}}var ee=chunkQFKGI242_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var eo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var gt=new WeakMap;function H(e){let o=gt.get(e);return o||gt.set(e,o=to(e)),o}function to(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function oo(e){return Object.freeze({...H(e),bytes:chunkQFKGI242_cjs.i(e)})}function no(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkQFKGI242_cjs.d?null:oo(t)}catch{return null}}function xt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return no(e.resolve(),o)}}function ro(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[]){let r=new Map;for(let i of [...e,o]){let p=i.toLowerCase();r.has(p)||r.set(p,i);}let s=[...r.values()].map(i=>{let p=[];for(let l of eo){let u=n?.({family:i,...l});!u||u instanceof chunkQFKGI242_cjs.d||p.push(Object.freeze({...l,sourceFamily:u.family,via:u.substitution?"substitution":"direct",identity:u.identity,id:u.id,hash:u.hash,faceIndex:u.faceIndex,substitution:u.substitution}));}return Object.freeze({family:i,coverage:p.length===4?"complete":p.length>0?"partial":"none",faces:Object.freeze(p)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(s),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ro(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof chunkERECKTIR_cjs.l))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof chunkERECKTIR_cjs.m?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new chunkHYASLE2G_cjs.d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkQFKGI242_cjs.h(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof chunkQFKGI242_cjs.d?null:s}function Ft(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function io(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let a=chunkQFKGI242_cjs.ua(n.style,n.fontSlot),r=chunkQFKGI242_cjs.ed(n)?chunkQFKGI242_cjs.fd(n):chunkQFKGI242_cjs.ba(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=G(e,o,s,a)??(chunkPWTRJSES_cjs.b(s)&&io(r)?G(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!chunkJC47NRJC_cjs.aa(e.shaper,e.environment,i,a,t))return null;let p=chunkJC47NRJC_cjs.$(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>H(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var N=new Map,bt=new WeakMap,se=0,C;var le=32,Rt=chunkQFKGI242_cjs.c;function St(){if(C)return C;let e=(async()=>(await chunkJC47NRJC_cjs.d(),chunkJC47NRJC_cjs.h({...chunkJC47NRJC_cjs.i,maxFontBytes:chunkQFKGI242_cjs.a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function Ot(e){let o=X();return chunkJC47NRJC_cjs.ca(e,{resolveFont(t){return Ft(e,o,t)},fallback:chunkQFKGI242_cjs.ha()})}async function vt(e,o,t=[],n=false,a){if(!chunkJC47NRJC_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunkJC47NRJC_cjs.k(a,chunkJC47NRJC_cjs.i),s=await St(),i=ht(await chunkJC47NRJC_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>Ot(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${chunkQFKGI242_cjs.ga}`].join("|"),extensionFingerprint:e.fingerprint})}function ao(e,o,t){if(!chunkJC47NRJC_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunkJC47NRJC_cjs.k(t,chunkJC47NRJC_cjs.i),a=chunkJC47NRJC_cjs.j(n),r=bt.get(e),s=r?.get(a);if(s)return s;let i=`${chunkJC47NRJC_cjs.o(e)}|${a}`,p=N.get(i);if(!p){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let d=chunkJC47NRJC_cjs.n(e).sources.reduce((y,E)=>y+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+d>Rt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Rt} process-wide`);se+=d;let c;try{let y=await St();c=await chunkJC47NRJC_cjs.t(e,y,n,o);}catch(y){throw se-=d,y}return Object.freeze({createMeasurer:()=>Ot(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),N.set(i,p),p.catch(()=>{N.get(i)===p&&N.delete(i);});}let l=e.fingerprint,u=p.then(h=>Object.freeze({createMeasurer:h.createMeasurer,shapeLaidOutText:h.shapeLaidOutText,producer:["node-export",l,h.shapingHash,`producer:${h.producerVersion}`,`fallback:${chunkQFKGI242_cjs.ga}`].join("|"),extensionFingerprint:l}));return r||bt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var so="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function lo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===so),n;if(t){let a=chunkPWTRJSES_cjs.J(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkPWTRJSES_cjs.if(o,n)}function wt(e,o){let t=lo(e);if(t.length!==0)return chunkERECKTIR_cjs.j(n=>{let a=new Set((n.resolvedFaces??[]).map(s=>chunkQFKGI242_cjs.h(s))),r=chunkERECKTIR_cjs.C(t,{maxFontBytes:chunkQFKGI242_cjs.a,aggregateBudget:co(n),shadowedRequests:a});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function co(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkQFKGI242_cjs.c:Math.max(0,chunkQFKGI242_cjs.c-o)}function uo(e){return te(e)&&ie(e)}var A=0,At=Symbol("font-resolution-timeout");function po(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>chunkQFKGI242_cjs.c)throw new chunkHYASLE2G_cjs.d("layoutFailed",`Active document export font bytes are limited to ${chunkQFKGI242_cjs.c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function fo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkPWTRJSES_cjs.la||t.namespaceUri===""))?.value}async function mo(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunkYBMWBXST_cjs.Ca(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...h}=o,d=Array.isArray(n)?n:[n],c=a===void 0?[]:Array.isArray(a)?a:[a],y,E;try{E=await yo(t.view,d,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:c,onFontResolution:R=>(y=R,i?.(R))});}catch(R){if(R instanceof chunkHYASLE2G_cjs.d&&R.code==="aborted")return {ok:false,reason:"aborted"};throw R}if(!y)throw E?.dispose(),new chunkHYASLE2G_cjs.d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=chunkHYASLE2G_cjs.e(t.view,{...h,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(R){throw E?.dispose(),R}if(!b.ok)return E?.dispose(),b;let f=b.session,g=E,x="active",F=()=>x==="aborted"?new chunkHYASLE2G_cjs.d("aborted","Export resource settlement was aborted"):new chunkHYASLE2G_cjs.d("disposed","Export session has been disposed"),m=R=>{if(x==="active"){x=R,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>m("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:y,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:R=>x==="active"?f.layoutFor(R):Promise.reject(F()),validatedImageBytes:R=>x==="active"?f.validatedImageBytes(R):null,admittedFontFace:xt({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Et({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>m("disposed")})}}async function yo(e,o,t={}){let n=chunkJC47NRJC_cjs.k(t.fontShaping,chunkJC47NRJC_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=ho(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(At),a);try{de(r.signal);let p=(async()=>{let l=po(t.onActiveFontBytesChange),u=!1;try{let h=xo(e).slice(0,chunkERECKTIR_cjs.c),d=chunkERECKTIR_cjs.x(e,h),c=[],y={dropped:[]},E=wt(e,y),b=[...o,...E?[E]:[],...t.lastResortFonts??[]],f=await chunkERECKTIR_cjs.o(b,{families:[...new Set([...(t.glyphFallbacks??[]).map(m=>m.family),...d.families])].slice(0,chunkERECKTIR_cjs.c),defaultFamily:chunkERECKTIR_cjs.d.family,signal:r.signal},{onOriginFailure:m=>c.push(m),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=chunkERECKTIR_cjs.z(chunkERECKTIR_cjs.f(f??{}),d);if(g.sources.length===0){let m=oe(h,g.defaultFont.family,c,void 0,y.dropped);ne(m,t),re(m,t,t.glyphFallbacks);return}let x=await vt(chunkJC47NRJC_cjs.q(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let F=oe(h,g.defaultFont.family,c,x.resolveFont,y.dropped);return ne(F,t),re(F,t,t.glyphFallbacks),u=!0,Object.freeze({...x,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p,go(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function ho(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function go(e){return new Promise((o,t)=>{let n=()=>{t(Tt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Tt(e){let o=e.reason===At;return new chunkHYASLE2G_cjs.d(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Tt(e)}function xo(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,h)=>{!h||a.has(h.name)||(a.add(h.name),u.push(h.root));};for(let u of e.headerFooterPartsBySection()){for(let h of u.headers.values())r(t,h);for(let h of u.footers.values())r(t,h);}for(let u of ["footnote","endnote"])n.push(...Fo(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,h)=>{let d=chunkFLBEJC6X_cjs.e(u,e.stylesRoot(),i,bo(u,h)),c=chunkERECKTIR_cjs.v(u,e.numberingRoot(),e.stylesRoot(),i);for(let y of [...d.direct,...Oo(u),...c,...chunkERECKTIR_cjs.s(u,e.stylesRoot(),i),...d.inherited]){let E=y.toLowerCase();p.has(E)||p.set(E,y);}};return l(o,"body"),l(t,"furniture"),l(n,"note"),[...p.values()]}function Fo(e,o){let t=chunkPWTRJSES_cjs.ch(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkPWTRJSES_cjs.dh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkPWTRJSES_cjs.zc(r),i=chunkPWTRJSES_cjs.yc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Eo="http://schemas.openxmlformats.org/officeDocument/2006/math";function bo(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===chunkPWTRJSES_cjs.la&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===chunkPWTRJSES_cjs.la&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Ro(s.paragraph,t,s.context);}return t}function Ro(e,o,t){let n=chunkQFKGI242_cjs.Vb(),a=null,r=null,s="",i=false,p=false,l=false,u=0,h=[];for(let d=e.children.length-1;d>=0;d-=1){let c=e.children[d];c.kind!=="textValue"&&h.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;h.length>0;){let{node:d,runId:c,visibility:y,containerDepth:E}=h.pop();if(E>=chunkPWTRJSES_cjs.wa||d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="p")continue;let b=d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="r"?d.id:c;if(d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="fldSimple"){let f=ce(d,"instr")??"";chunkQFKGI242_cjs.Yc(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&So(d)!==k&&o.add(d.id);}if(d.namespaceUri===chunkPWTRJSES_cjs.la&&d.localName==="fldChar"){let f=ce(d,"fldCharType");if(f==="begin")chunkQFKGI242_cjs.Yb(n),n.nesting===1&&(a=b,r=null,s="",i=false,p=false,l=chunkPWTRJSES_cjs.Bf(d),u=0);else if(f==="separate"){let g=n.nesting===1;if(chunkQFKGI242_cjs._b(n),g){let x=chunkQFKGI242_cjs.Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow,r=b,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=chunkQFKGI242_cjs.Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow;}if(!i&&chunkQFKGI242_cjs.Xc(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??a;x&&o.add(x);}}chunkQFKGI242_cjs.$b(n);}continue}if(d.namespaceUri===chunkPWTRJSES_cjs.la&&(d.localName==="instrText"||d.localName==="delInstrText")){chunkQFKGI242_cjs.Zb(n,It(d),d.localName==="delInstrText");continue}n.nesting>0&&chunkQFKGI242_cjs.ac(n)&&d.namespaceUri===chunkPWTRJSES_cjs.la&&Lt(d)&&(u|=y);for(let f=d.children.length-1;f>=0;f-=1){let g=d.children[f];g.kind!=="textValue"&&h.push({node:g,runId:b,visibility:y&kt(d),containerDepth:chunkPWTRJSES_cjs.xa(d,E)});}}chunkQFKGI242_cjs.Wb(n);}function Lt(e){return e.localName==="t"||e.localName==="delText"?It(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,Pt=2,Dt=4,k=ue|Pt|Dt;function So(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===chunkPWTRJSES_cjs.la&&n.localName==="p")){if(n.namespaceUri===chunkPWTRJSES_cjs.la&&Lt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&kt(n)});}}return t}function kt(e){return e.namespaceUri!==chunkPWTRJSES_cjs.la?k:e.localName==="ins"||e.localName==="moveTo"?ue|Pt:e.localName==="del"||e.localName==="moveFrom"?ue|Dt:k}function Oo(e){let o=new Map,t=n=>{let a=chunkFLBEJC6X_cjs.b(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Eo&&t(chunkQFKGI242_cjs.$c),r.namespaceUri===chunkPWTRJSES_cjs.la&&r.localName==="sym"&&t(chunkFLBEJC6X_cjs.c(fo(r,"font"))),r.namespaceUri===chunkPWTRJSES_cjs.la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkQFKGI242_cjs.Wc(s??"")?.font??null);}if(r.namespaceUri===chunkPWTRJSES_cjs.la&&r.localName==="p")for(let s of chunkERECKTIR_cjs.u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function It(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var Nt="FILE_TOO_LARGE",_t=8;function vo(e){return typeof e=="object"&&e!==null}function Ct(e){if(!(!vo(e)||typeof e.code!="string"))return e.code}function Ut(e){return e===""||e.toLowerCase()==="localhost"}function wo(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Bt(e){let o=wo(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function qt(e){let o=Bt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Ao(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function To(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!Ut(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=qt(o.pathname);if(t===null||Ao(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Lo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Po(e){let o=Lo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>_t)throw new TypeError(`trustedRoot must not exceed ${_t} directories`);return o.map(To)}function Do(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkQFKGI242_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkQFKGI242_cjs.a}`);return e}function ko(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Ut(e.host))return null;let t=Bt(e.pathname);if(t===null)return null;for(let n of o){let a=qt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function Io(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function _o(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Mt(e,o,t){return e.some(n=>_o(n,o,t))}async function Mo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(Ct(a)==="ENOENT")continue;throw a}return t}function No(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(y=>p.resolve(i(y.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Mt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let h=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",d=await a(u,h),c=()=>{d.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let y=await r(u);if(!Mt(await Mo(l,r),y,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await d.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Nt});let b=new Uint8Array(E),f=0;for(;f<b.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await d.read(b,f,b.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===b.byteLength?b:b.slice(0,f)}catch(y){throw t?.aborted?t.reason:y}finally{t?.removeEventListener("abort",c),await d.close().catch(()=>{});}}}function Co(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Po(e.trustedRoot),t=Do(e.maxBytes),n=e.read??No(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=Io(r);if(p.protocol!=="file:")return a(p,s);let l=ko(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,h=()=>u?.abort(i?.reason);i?.addEventListener("abort",h,{once:true});let d;try{if(d=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(d.byteLength>t)return new Response(null,{status:413})}catch(c){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let y=Ct(c);if(y===Nt)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw c}finally{i?.removeEventListener("abort",h);}return new Response(d,{status:200})})}
|
|
2
|
-
Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return
|
|
1
|
+
'use strict';var chunkMOYYRVFV_cjs=require('./chunk-MOYYRVFV.cjs'),chunk5JPIEN54_cjs=require('./chunk-5JPIEN54.cjs'),chunkHC6YNKUI_cjs=require('./chunk-HC6YNKUI.cjs'),chunkDBOOTED4_cjs=require('./chunk-DBOOTED4.cjs'),chunkXSTGE3NI_cjs=require('./chunk-XSTGE3NI.cjs');require('./chunk-IBRBNT37.cjs');var chunk243W4WW2_cjs=require('./chunk-243W4WW2.cjs'),chunkWO4V6PNS_cjs=require('./chunk-WO4V6PNS.cjs');function N(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},i=e.shape(n);if(t.glyphs.length!==i.glyphs.length||t.glyphs.some((l,c)=>l.id!==i.glyphs[c]?.id))return t;let r=[],s=0;for(let l of o.text){let c=l.toUpperCase()!==l,h=r.at(-1);h&&(h.lower===c||/\p{M}/u.test(l))?h.text+=l:r.push({text:l,start:s,lower:c}),s+=l.length;}let a=[],p=[],d=[],u=true,m=0;for(let l of o.environment.direction==="rtl"?r.reverse():r){let c=l.lower?.8:1,h=[],E=[],R="",f=l.start;for(let F of l.text){let y=l.lower?F.toUpperCase():F;for(let S=0;S<y.length;S++)h.push(f),E.push(f+F.length);R+=y,f+=F.length;}let g=e.shape({...n,text:R}),x=a.length;for(let[F,y]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:d.push(S*c),a.push({...y,cluster:h[y.cluster]??l.start,originX:chunkDBOOTED4_cjs.n(m+Math.round(y.originX*c)),originY:chunkDBOOTED4_cjs.n(Math.round(y.originY*c)),offsetX:chunkDBOOTED4_cjs.n(Math.round(y.offsetX*c)),offsetY:chunkDBOOTED4_cjs.n(Math.round(y.offsetY*c)),advanceX:chunkDBOOTED4_cjs.n(Math.round(y.advanceX*c)),advanceY:chunkDBOOTED4_cjs.n(Math.round(y.advanceY*c)),drawScale:c});}for(let F of g.clusters){let y=h[F.textStart]??l.start,S=E[F.textEnd-1]??f,b=chunkDBOOTED4_cjs.n(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===y&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:chunkDBOOTED4_cjs.n(T.advance+b),caretEdges:[chunkDBOOTED4_cjs.n(0),chunkDBOOTED4_cjs.n(T.advance+b)]}:p.push({...F,textStart:y,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:b,caretEdges:F.caretEdges.map(V=>chunkDBOOTED4_cjs.n(Math.round(V*c))),fontSpan:0});}m+=g.glyphs.reduce((F,y)=>F+Math.round(y.advanceX*c),0);}return {...t,glyphs:a,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:u&&d.length===a.length?d:void 0}}var ft=new WeakMap;function Gt(e){let o=ft.get(e);return o===void 0&&(o=Yt(e.bytes,e.faceIndex),ft.set(e,o)),o}var Vt=new Set(["COLR","CBDT","sbix"]),Wt=512;function Yt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(mt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let i=Math.min(t.getUint16(n+4),Wt);for(let r=0;r<i;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Vt.has(mt(e,s)))return true}return false}function mt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var $t=/\p{Emoji_Presentation}|️/u;function Kt(e){return $t.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Gt);if(t.length===0||t.length===e.length)return e;let n=e.filter(i=>!t.includes(i));return Kt(o)?[...t,...n]:[...n,...t]}var Zt=2048;function yt(e,o,t,n){if(!t.clusters.length||t.clusters.length>Zt)return null;let i=(f,g)=>{let{context:x,...F}=o,y={...F,text:g,environment:chunkDBOOTED4_cjs.r({...o.environment,font:f})};return N(e,y,e.shape(y))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),b=s.get(x)??z(n,S).find(T=>{try{return !i(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!b)return null;s.set(x,b),g=b;}let y=r.at(-1);y&&y.font===g&&y.end===f.textStart?y.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let a=[],p=[],d=[],u=[],m=true,l=0,c=0,h=0,E=0,R=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=i(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(y=>y.id===0))return null;let x=a.length,F=d.length;for(let y of g.glyphs)a.push({...y,cluster:f.start+y.cluster,originX:chunkDBOOTED4_cjs.n(l+y.originX),originY:chunkDBOOTED4_cjs.n(c+y.originY)});if(g.exactAdvancesX===void 0)m=false;else for(let y of g.exactAdvancesX)u.push(y);for(let y of g.clusters)p.push({...y,textStart:f.start+y.textStart,textEnd:f.start+y.textEnd,glyphStart:x+y.glyphStart,glyphEnd:x+y.glyphEnd,fontSpan:F});g.glyphs.length&&d.push({font:f.font,glyphStart:x,glyphEnd:a.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),l+=g.glyphs.reduce((y,S)=>y+S.advanceX,0),c+=g.glyphs.reduce((y,S)=>y+S.advanceY,0),h=Math.max(h,g.metrics.ascent),E=Math.max(E,g.metrics.descent),R=Math.max(R,g.metrics.lineGap);}return chunkDBOOTED4_cjs.u({...t,glyphs:a,clusters:p,fontSpans:d,exactAdvancesX:m&&u.length===a.length?u:void 0,metrics:{ascent:chunkDBOOTED4_cjs.n(h),descent:chunkDBOOTED4_cjs.n(E),lineGap:chunkDBOOTED4_cjs.n(R)}},{...o.environment,fallbackOrder:n})}var Jt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Qt=512,ht=new WeakMap;function eo(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",a=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(a=r(12+o*4),a<0))return t}let p=i(a+4);if(p<0||p>1024)return t;let d=-1;for(let c=0;c<p;c+=1){let h=a+12+c*16;if(s(h)==="GSUB"){d=r(h+8);break}}if(d<0)return t;let u=i(d+4);if(u<=0)return t;let m=d+u,l=i(m);if(l<0)return t;for(let c=0;c<Math.min(l,Qt);c+=1){let h=s(m+2+c*6);h&&t.add(h);}return t}function to(e,o){let t=ht.get(e);return t||(t=eo(e.bytes,e.faceIndex),ht.set(e,t)),(Jt.get(o)??[o.toLowerCase()]).some(i=>t.has(i))}function gt(e,o){let t=e.filter(n=>to(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let i=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(i===o.text)return t;try{let r=e.shape({...o,text:i});return chunkDBOOTED4_cjs.u({...r,text:o.text},o.environment)}catch{return t}}function xt(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(a=>e.fonts.resolve(a)).filter(a=>!(a instanceof chunkDBOOTED4_cjs.d)),n={shape(a){return Q(e.shaper,a,e.shaper.shape(a))}},i=new WeakMap,r={shape(a){let p=e.shaper.shape(a),d=i.get(p);if(d&&d.input.text===a.text&&d.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&d.input.bidiLevel===a.bidiLevel&&d.input.context?.before===a.context?.before&&d.input.context?.after===a.context?.after&&d.input.environment===a.environment)return d.run;let u=s(a,Q(e.shaper,a,p));return i.set(p,{input:a,run:u}),u}},s=(a,p)=>{let d=N(n,a,p);if(!d.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(a.text))return d;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let u=yt(n,a,d,t);if(u)return u}for(let u of gt(z(t,a.text),a.environment.script))if(!(u.hash===a.environment.font.hash&&u.faceIndex===a.environment.font.faceIndex))try{let m={...a,environment:chunkDBOOTED4_cjs.r({...a.environment,font:u})},l=N(n,m,n.shape(m));if(!l.glyphs.some(c=>c.id===0))return l}catch{}return d};return {...e,shaper:r}}var ee=chunkDBOOTED4_cjs.b;function te(e){return typeof e.admittedFontFace=="function"}var oo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var Ft=new WeakMap;function H(e){let o=Ft.get(e);return o||Ft.set(e,o=no(e)),o}function no(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function ro(e){return Object.freeze({...H(e),bytes:chunkDBOOTED4_cjs.i(e)})}function io(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof chunkDBOOTED4_cjs.d?null:ro(t)}catch{return null}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return io(e.resolve(),o)}}function ao(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,i=[],r=new Set){let s=new Map;for(let p of [...e,o]){let d=p.toLowerCase();s.has(d)||s.set(d,p);}let a=[...s.values()].map(p=>{let d=[];for(let m of oo){let l=n?.({family:p,...m});!l||l instanceof chunkDBOOTED4_cjs.d||d.push(Object.freeze({...m,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}let u=r.has(p.trim().toLowerCase())?d.filter(m=>m.via==="direct").length:d.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(d)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(a),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ao(i)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=d=>d.trim().toLowerCase(),i=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(d=>n(d.family))),s=d=>{if(!(d instanceof chunkMOYYRVFV_cjs.l))return true;let u=n(d.request.family);return i.has(u)||!r.has(u)},a=e.originFailures.some(({cause:d})=>d instanceof chunkMOYYRVFV_cjs.m?d.causes.length===0||d.causes.some(s):s(d));if(o.fontPolicy!=="strict"||!a&&e.families.every(d=>d.coverage==="complete"))return;let p=e.families.filter(d=>d.coverage!=="complete").map(d=>d.family).join(", ");throw new chunkHC6YNKUI_cjs.d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let i={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=chunkDBOOTED4_cjs.h(i),s=o.get(r);if(!s){try{s=e.fonts.resolve(i);}catch{return null}o.set(r,s);}return s instanceof chunkDBOOTED4_cjs.d?null:s}function bt(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function so(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let i=chunkDBOOTED4_cjs.wa(n.style,n.fontSlot),r=chunkDBOOTED4_cjs.gd(n)?chunkDBOOTED4_cjs.hd(n):chunkDBOOTED4_cjs.da(n.text,i);if(r.length===0)return null;let s=i.fontFamily??e.defaultFont.family,a=G(e,o,s,i)??(chunkWO4V6PNS_cjs.b(s)&&so(r)?G(e,o,e.defaultFont.family,i):null);if(!a)return null;try{if(i.smallCaps&&!chunk5JPIEN54_cjs.ea(e.shaper,e.environment,a,i,t))return null;let p=chunk5JPIEN54_cjs.da(e.shaper,e.environment,a,i,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??a),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(d=>H(d.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var M=new Map,St=new WeakMap,se=0,C;var le=32,Ot=chunkDBOOTED4_cjs.c;function vt(){if(C)return C;let e=(async()=>(await chunk5JPIEN54_cjs.d(),chunk5JPIEN54_cjs.h({...chunk5JPIEN54_cjs.i,maxFontBytes:chunkDBOOTED4_cjs.a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function wt(e){let o=X();return chunk5JPIEN54_cjs.ga(e,{resolveFont(t){return bt(e,o,t)},fallback:chunkDBOOTED4_cjs.ja()})}async function At(e,o,t=[],n=false,i){if(!chunk5JPIEN54_cjs.m(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=chunk5JPIEN54_cjs.k(i,chunk5JPIEN54_cjs.i),s=await vt(),a=xt(await chunk5JPIEN54_cjs.t(e,s,r,o,n),t);return Object.freeze({createMeasurer:()=>wt(a),resolveFont:p=>a.fonts.resolve(p),shapeLaidOutText:ae(a),producer:["node-export-session",JSON.stringify(t),e.fingerprint,a.operation.shapingHash,`producer:${a.operation.producerVersion}`,`fallback:${chunkDBOOTED4_cjs.ia}`].join("|"),extensionFingerprint:e.fingerprint})}function lo(e,o,t){if(!chunk5JPIEN54_cjs.m(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n=chunk5JPIEN54_cjs.k(t,chunk5JPIEN54_cjs.i),i=chunk5JPIEN54_cjs.j(n),r=St.get(e),s=r?.get(i);if(s)return s;let a=`${chunk5JPIEN54_cjs.o(e)}|${i}`,p=M.get(a);if(!p){if(M.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let l=chunk5JPIEN54_cjs.n(e).sources.reduce((h,E)=>h+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+l>Ot)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Ot} process-wide`);se+=l;let c;try{let h=await vt();c=await chunk5JPIEN54_cjs.t(e,h,n,o);}catch(h){throw se-=l,h}return Object.freeze({createMeasurer:()=>wt(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),M.set(a,p),p.catch(()=>{M.get(a)===p&&M.delete(a);});}let d=e.fingerprint,u=p.then(m=>Object.freeze({createMeasurer:m.createMeasurer,shapeLaidOutText:m.shapeLaidOutText,producer:["node-export",d,m.shapingHash,`producer:${m.producerVersion}`,`fallback:${chunkDBOOTED4_cjs.ia}`].join("|"),extensionFingerprint:d}));return r||St.set(e,r=new Map),r.set(i,u),u.catch(()=>{r?.get(i)===u&&r.delete(i);}),u}var co="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function uo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(i=>i.type===co),n;if(t){let i=chunkWO4V6PNS_cjs.J(t);i.mode==="Internal"&&i.target.ok&&(n=o.parts.get(i.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),chunkWO4V6PNS_cjs.lf(o,n)}function Tt(e,o){let t=uo(e);if(t.length!==0)return chunkMOYYRVFV_cjs.j(n=>{let i=new Set((n.resolvedFaces??[]).map(s=>chunkDBOOTED4_cjs.h(s))),r=chunkMOYYRVFV_cjs.E(t,{maxFontBytes:chunkDBOOTED4_cjs.a,aggregateBudget:po(n),shadowedRequests:i});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function po(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?chunkDBOOTED4_cjs.c:Math.max(0,chunkDBOOTED4_cjs.c-o)}function fo(e){return te(e)&&ie(e)}var A=0,Lt=Symbol("font-resolution-timeout");function mo(e){let o=0,t=false;return e?.(A),{reserve:i=>{if(t)throw new Error("Document font-byte lease is already released");if(A+i>chunkDBOOTED4_cjs.c)throw new chunkHC6YNKUI_cjs.d("layoutFailed",`Active document export font bytes are limited to ${chunkDBOOTED4_cjs.c}; requested ${i} bytes with ${A} bytes already active`);A+=i,o+=i,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=i,o-=i,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function yo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===chunkWO4V6PNS_cjs.la||t.namespaceUri===""))?.value}async function ho(e,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=chunk243W4WW2_cjs.Ca(e);if(!t.ok)return t;let{fonts:n,lastResortFonts:i,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:d,fontShaping:u,...m}=o,l=Array.isArray(n)?n:[n],c=i===void 0?[]:Array.isArray(i)?i:[i],h,E;try{E=await go(t.view,l,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:d,fontShaping:u,lastResortFonts:c,onFontResolution:b=>(h=b,a?.(b))});}catch(b){if(b instanceof chunkHC6YNKUI_cjs.d&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!h)throw E?.dispose(),new chunkHC6YNKUI_cjs.d("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=chunkHC6YNKUI_cjs.e(t.view,{...m,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(b){throw E?.dispose(),b}if(!R.ok)return E?.dispose(),R;let f=R.session,g=E,x="active",F=()=>x==="aborted"?new chunkHC6YNKUI_cjs.d("aborted","Export resource settlement was aborted"):new chunkHC6YNKUI_cjs.d("disposed","Export session has been disposed"),y=b=>{if(x==="active"){x=b,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>y("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:h,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:b=>x==="active"?f.layoutFor(b):Promise.reject(F()),validatedImageBytes:b=>x==="active"?f.validatedImageBytes(b):null,admittedFontFace:Et({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Rt({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>y("disposed")})}}async function go(e,o,t={}){let n=chunk5JPIEN54_cjs.k(t.fontShaping,chunk5JPIEN54_cjs.i);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let i=xo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let a=setTimeout(()=>r.abort(Lt),i);try{de(r.signal);let p=(async()=>{let d=mo(t.onActiveFontBytesChange),u=!1;try{let m=Eo(e).slice(0,chunkMOYYRVFV_cjs.c),l=chunkMOYYRVFV_cjs.x(e,m),c=[],h={dropped:[]},E=Tt(e,h),R=[...o,...E?[E]:[],...t.lastResortFonts??[]],f=await chunkMOYYRVFV_cjs.o(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(b=>b.family),...l.families])].slice(0,chunkMOYYRVFV_cjs.c),defaultFamily:chunkMOYYRVFV_cjs.d.family,signal:r.signal},{onOriginFailure:b=>c.push(b),reserveOwnedBytes:d.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=chunkMOYYRVFV_cjs.f(f??{}),x=chunkMOYYRVFV_cjs.z(g,l),F=chunkMOYYRVFV_cjs.A(g,x,l);if(x.sources.length===0){let b=oe(m,x.defaultFont.family,c,void 0,h.dropped);ne(b,t),re(b,t,t.glyphFallbacks);return}let y=await At(chunk5JPIEN54_cjs.q(x),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let S=oe(m,x.defaultFont.family,c,y.resolveFont,h.dropped,F);return ne(S,t),re(S,t,t.glyphFallbacks),u=!0,Object.freeze({...y,dispose:d.release})}finally{u||d.release();}})();return await Promise.race([p,Fo(r.signal)])}finally{clearTimeout(a),t.signal?.removeEventListener("abort",s);}}function xo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function Fo(e){return new Promise((o,t)=>{let n=()=>{t(Pt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Pt(e){let o=e.reason===Lt;return new chunkHC6YNKUI_cjs.d(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Pt(e)}function Eo(e){let o=[e.part().root],t=[],n=[],i=new Set([e.part().name]),r=(u,m)=>{!m||i.has(m.name)||(i.add(m.name),u.push(m.root));};for(let u of e.headerFooterPartsBySection()){for(let m of u.headers.values())r(t,m);for(let m of u.footers.values())r(t,m);}for(let u of ["footnote","endnote"])n.push(...bo(e,u));let s=e.documentThemeFonts(),a={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,d=(u,m)=>{let l=chunkXSTGE3NI_cjs.e(u,e.stylesRoot(),a,So(u,m)),c=chunkMOYYRVFV_cjs.v(u,e.numberingRoot(),e.stylesRoot(),a);for(let h of [...l.direct,...wo(u),...c,...chunkMOYYRVFV_cjs.s(u,e.stylesRoot(),a),...l.inherited]){let E=h.toLowerCase();p.has(E)||p.set(E,h);}};return d(o,"body"),d(t,"furniture"),d(n,"note"),[...p.values()]}function bo(e,o){let t=chunkWO4V6PNS_cjs.lh(e.currentPackage(),o);if(!t)return [];let n=new Set(chunkWO4V6PNS_cjs.mh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),i=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=chunkWO4V6PNS_cjs.zc(r),a=chunkWO4V6PNS_cjs.yc(r);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&i.push(r);}return i}var Ro="http://schemas.openxmlformats.org/officeDocument/2006/math";function So(e,o){let t=new Set;for(let n of e){let i=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:a}=r.pop();s.namespaceUri===chunkWO4V6PNS_cjs.la&&s.localName==="p"&&i.push({paragraph:s,context:a});let p=s.namespaceUri===chunkWO4V6PNS_cjs.la&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let d=s.children.length-1;d>=0;d-=1){let u=s.children[d];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of i)Oo(s.paragraph,t,s.context);}return t}function Oo(e,o,t){let n=chunkDBOOTED4_cjs.Xb(),i=null,r=null,s="",a=false,p=false,d=false,u=0,m=[];for(let l=e.children.length-1;l>=0;l-=1){let c=e.children[l];c.kind!=="textValue"&&m.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;m.length>0;){let{node:l,runId:c,visibility:h,containerDepth:E}=m.pop();if(E>=chunkWO4V6PNS_cjs.wa||l.namespaceUri===chunkWO4V6PNS_cjs.la&&l.localName==="p")continue;let R=l.namespaceUri===chunkWO4V6PNS_cjs.la&&l.localName==="r"?l.id:c;if(l.namespaceUri===chunkWO4V6PNS_cjs.la&&l.localName==="fldSimple"){let f=ce(l,"instr")??"";chunkDBOOTED4_cjs._c(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&vo(l)!==k&&o.add(l.id);}if(l.namespaceUri===chunkWO4V6PNS_cjs.la&&l.localName==="fldChar"){let f=ce(l,"fldCharType");if(f==="begin")chunkDBOOTED4_cjs._b(n),n.nesting===1&&(i=R,r=null,s="",a=false,p=false,d=chunkWO4V6PNS_cjs.Ef(l),u=0);else if(f==="separate"){let g=n.nesting===1;if(chunkDBOOTED4_cjs.ac(n),g){let x=chunkDBOOTED4_cjs.Zb(n);s=x.instruction,a=x.overflow||n.nestingOverflow,r=R,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=chunkDBOOTED4_cjs.Zb(n);s=x.instruction,a=x.overflow||n.nestingOverflow;}if(!a&&chunkDBOOTED4_cjs.Zc(s,{hasSeparate:p,hasLegacyFormData:d,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??i;x&&o.add(x);}}chunkDBOOTED4_cjs.bc(n);}continue}if(l.namespaceUri===chunkWO4V6PNS_cjs.la&&(l.localName==="instrText"||l.localName==="delInstrText")){chunkDBOOTED4_cjs.$b(n,Nt(l),l.localName==="delInstrText");continue}n.nesting>0&&chunkDBOOTED4_cjs.cc(n)&&l.namespaceUri===chunkWO4V6PNS_cjs.la&&Dt(l)&&(u|=h);for(let f=l.children.length-1;f>=0;f-=1){let g=l.children[f];g.kind!=="textValue"&&m.push({node:g,runId:R,visibility:h&_t(l),containerDepth:chunkWO4V6PNS_cjs.xa(l,E)});}}chunkDBOOTED4_cjs.Yb(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Nt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,kt=2,It=4,k=ue|kt|It;function vo(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:i}=o.pop();if(!(n.namespaceUri===chunkWO4V6PNS_cjs.la&&n.localName==="p")){if(n.namespaceUri===chunkWO4V6PNS_cjs.la&&Dt(n)&&(t|=i,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:i&_t(n)});}}return t}function _t(e){return e.namespaceUri!==chunkWO4V6PNS_cjs.la?k:e.localName==="ins"||e.localName==="moveTo"?ue|kt:e.localName==="del"||e.localName==="moveFrom"?ue|It:k}function wo(e){let o=new Map,t=n=>{let i=chunkXSTGE3NI_cjs.b(n??void 0);if(i===null)return;let r=i.toLowerCase();o.has(r)||o.set(r,i);};for(let n of e){let i=[n];for(;i.length>0;){let r=i.pop();if(r.namespaceUri===Ro&&t(chunkDBOOTED4_cjs.bd),r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="sym"&&t(chunkXSTGE3NI_cjs.c(yo(r,"font"))),r.localName==="textpath"&&t(chunkWO4V6PNS_cjs.pd(r)),r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(chunkDBOOTED4_cjs.Yc(s??"")?.font??null);}if(r.namespaceUri===chunkWO4V6PNS_cjs.la&&r.localName==="p")for(let s of chunkMOYYRVFV_cjs.u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let a=r.children[s];a.kind!=="textValue"&&i.push(a);}}}return [...o.values()]}function Nt(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let i=n.children.length-1;i>=0;i-=1)t.push(n.children[i]);}return o}var Ut="FILE_TOO_LARGE",Mt=8;function Ao(e){return typeof e=="object"&&e!==null}function Bt(e){if(!(!Ao(e)||typeof e.code!="string"))return e.code}function qt(e){return e===""||e.toLowerCase()==="localhost"}function To(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function zt(e){let o=To(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function jt(e){let o=zt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Lo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Po(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!qt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=jt(o.pathname);if(t===null||Lo(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Do(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function ko(e){let o=Do(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Mt)throw new TypeError(`trustedRoot must not exceed ${Mt} directories`);return o.map(Po)}function Io(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>chunkDBOOTED4_cjs.a)throw new TypeError(`maxBytes must not exceed ${chunkDBOOTED4_cjs.a}`);return e}function _o(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!qt(e.host))return null;let t=zt(e.pathname);if(t===null)return null;for(let n of o){let i=jt(n.pathname);if(i===null||!t.startsWith(i)||t.length<=i.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function No(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Mo(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Ct(e,o,t){return e.some(n=>Mo(n,o,t))}async function Co(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(i){if(Bt(i)==="ENOENT")continue;throw i}return t}function Uo(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:i,realpath:r},{constants:s},{fileURLToPath:a},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),d=e.map(h=>p.resolve(a(h.href))),u=p.resolve(a(typeof o=="string"?o:o.href));if(!Ct(d,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let m=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",l=await i(u,m),c=()=>{l.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let h=await r(u);if(!Ct(await Co(d,r),h,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await l.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Ut});let R=new Uint8Array(E),f=0;for(;f<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await l.read(R,f,R.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===R.byteLength?R:R.slice(0,f)}catch(h){throw t?.aborted?t.reason:h}finally{t?.removeEventListener("abort",c),await l.close().catch(()=>{});}}}function Bo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=ko(e.trustedRoot),t=Io(e.maxBytes),n=e.read??Uo(o),i=e.networkFetch??fetch;return(async(r,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let p=No(r);if(p.protocol!=="file:")return i(p,s);let d=_o(p,o);if(!d)return new Response(null,{status:404});let u=a?new AbortController:void 0,m=()=>u?.abort(a?.reason);a?.addEventListener("abort",m,{once:true});let l;try{if(l=await n(d,{maxBytes:t,...u?{signal:u.signal}:{}}),a?.aborted)throw a.reason;if(l.byteLength>t)return new Response(null,{status:413})}catch(c){if(a?.aborted)throw a.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let h=Bt(c);if(h===Ut)return new Response(null,{status:413});if(h==="ENOENT"||h==="ENOTDIR"||h==="ELOOP")return new Response(null,{status:404});throw c}finally{a?.removeEventListener("abort",m);}return new Response(l,{status:200})})}
|
|
2
|
+
Object.defineProperty(exports,"ExportResourceError",{enumerable:true,get:function(){return chunkHC6YNKUI_cjs.d}});Object.defineProperty(exports,"createNodeImageDecodePort",{enumerable:true,get:function(){return chunkHC6YNKUI_cjs.c}});Object.defineProperty(exports,"exportDestinationNamed",{enumerable:true,get:function(){return chunkHC6YNKUI_cjs.b}});Object.defineProperty(exports,"openDocumentForExport",{enumerable:true,get:function(){return chunkHC6YNKUI_cjs.e}});exports.MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS=le;exports.acquireSharedExportShaping=lo;exports.createPackagedFileFetch=Bo;exports.hasExportAdmittedFont=te;exports.hasExportLaidOutText=ie;exports.hasFontBackedExportCapabilities=fo;exports.openFontBackedDocumentForExport=ho;
|
package/dist/export.d.ts
CHANGED
|
@@ -7,23 +7,22 @@
|
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
|
-
import { S as SemanticLayout, a as ReviewDisplayMode, q as ResolvedRevisionMarkup, r as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, s as ListMarkerPictureRecord, t as RevisionMarkupOptions, T as TextMeasurer, p as FontRequest, u as FontSubstitution, v as ShapedRun, g as StyleSpanRecord } from './semantic-records-
|
|
11
|
-
import {
|
|
12
|
-
import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-
|
|
10
|
+
import { S as SemanticLayout, a as ReviewDisplayMode, q as ResolvedRevisionMarkup, r as SemanticReviewArtifactRecord, I as InlineDrawingRecord, A as AnchoredDrawingRecord, s as ListMarkerPictureRecord, t as RevisionMarkupOptions, T as TextMeasurer, p as FontRequest, u as FontSubstitution, v as ShapedRun, g as StyleSpanRecord } from './semantic-records-B-akgRch.js';
|
|
11
|
+
import { a8 as PreservedImageMime, aD as ImageResourceLimits, af as SupportedImageMime, aE as ImageDecodePort } from './types-barrel-CkF2JbU4.js';
|
|
12
|
+
import { D as DocumentProperties, H as HeadlessDocumentView, a as HeadlessDocumentRejection } from './headless-document-view-qOpaCF82.js';
|
|
13
13
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
14
|
-
import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-
|
|
15
|
-
import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-
|
|
16
|
-
import './
|
|
17
|
-
import './editor-scope-
|
|
18
|
-
import './
|
|
19
|
-
import './
|
|
20
|
-
import './
|
|
14
|
+
import { P as PreparedLayoutFontConfiguration, L as LayoutShapingInstrumentation } from './layout-shaping-CWS3j0Xr.js';
|
|
15
|
+
import { e as FontOriginFailure, d as FontOrigin } from './font-resolver-CWh40DYp.js';
|
|
16
|
+
import './omml-equation-BsLAa2lX.js';
|
|
17
|
+
import './editor-scope-C7ke1KJG.js';
|
|
18
|
+
import './tree-package-store-B8l8DX3Z.js';
|
|
19
|
+
import './editor-B2ShlO23.js';
|
|
20
|
+
import './diagnostic-hints-C9JlLz1L.js';
|
|
21
|
+
import './failure-NS2lsya4.js';
|
|
21
22
|
import './contracts/document.js';
|
|
22
23
|
import './contracts/interaction.js';
|
|
23
|
-
import './semantic-interaction-
|
|
24
|
-
import './document-protection-
|
|
25
|
-
import './failure-NS2lsya4.js';
|
|
26
|
-
import './diagnostic-hints-2Bke6H_w.js';
|
|
24
|
+
import './semantic-interaction-dApRIYpt.js';
|
|
25
|
+
import './document-protection-C8x3P2J6.js';
|
|
27
26
|
|
|
28
27
|
/** Source content that cannot be certified by the layout snapshot. @public */
|
|
29
28
|
interface ExportContentWarning {
|
package/dist/export.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {c as c$1,x,o,d as d$1,z as z$1,f,v,s as s$1,j as j$2,C as C$1,m as m$1,u,l as l$1}from'./chunk-7ATNKARV.js';import {l,j as j$1,h,i,n,m,s,p,c as c$2,g,$,_,ba as ba$1}from'./chunk-EBCXSH2W.js';import'./chunk-RIYSCEFQ.js';import {d,e}from'./chunk-NKPUH3QJ.js';export{d as ExportResourceError,c as createNodeImageDecodePort,b as exportDestinationNamed,e as openDocumentForExport}from'./chunk-NKPUH3QJ.js';import {c,ga,a,ua,ed,fd,ba,ha,h as h$1,d as d$2,Wc,b as b$1,i as i$1,Vb,Yc,Yb,_b,Xb,Xc,$b,Zb,ac,Wb,p as p$1,s as s$2,n as n$1,$c}from'./chunk-UM26GH5B.js';import {e as e$1,c as c$3,b as b$2}from'./chunk-RJCQGJR7.js';import'./chunk-T32MGBJS.js';import {Ca}from'./chunk-PF5NJWS3.js';import {ch,dh,zc,yc,b,la,J,if as _if,wa,Bf,xa}from'./chunk-5SPITS5F.js';function M(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},a=e.shape(n);if(t.glyphs.length!==a.glyphs.length||t.glyphs.some((d,c)=>d.id!==a.glyphs[c]?.id))return t;let r=[],s=0;for(let d of o.text){let c=d.toUpperCase()!==d,y=r.at(-1);y&&(y.lower===c||/\p{M}/u.test(d))?y.text+=d:r.push({text:d,start:s,lower:c}),s+=d.length;}let i=[],p=[],l=[],u=true,h=0;for(let d of o.environment.direction==="rtl"?r.reverse():r){let c=d.lower?.8:1,y=[],E=[],b="",f=d.start;for(let F of d.text){let m=d.lower?F.toUpperCase():F;for(let S=0;S<m.length;S++)y.push(f),E.push(f+F.length);b+=m,f+=F.length;}let g=e.shape({...n,text:b}),x=i.length;for(let[F,m]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:l.push(S*c),i.push({...m,cluster:y[m.cluster]??d.start,originX:n$1(h+Math.round(m.originX*c)),originY:n$1(Math.round(m.originY*c)),offsetX:n$1(Math.round(m.offsetX*c)),offsetY:n$1(Math.round(m.offsetY*c)),advanceX:n$1(Math.round(m.advanceX*c)),advanceY:n$1(Math.round(m.advanceY*c)),drawScale:c});}for(let F of g.clusters){let m=y[F.textStart]??d.start,S=E[F.textEnd-1]??f,R=n$1(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===m&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:n$1(T.advance+R),caretEdges:[n$1(0),n$1(T.advance+R)]}:p.push({...F,textStart:m,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:R,caretEdges:F.caretEdges.map(V=>n$1(Math.round(V*c))),fontSpan:0});}h+=g.glyphs.reduce((F,m)=>F+Math.round(m.advanceX*c),0);}return {...t,glyphs:i,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:i.length}],exactAdvancesX:u&&l.length===i.length?l:void 0}}var ut=new WeakMap;function Ht(e){let o=ut.get(e);return o===void 0&&(o=Vt(e.bytes,e.faceIndex),ut.set(e,o)),o}var Xt=new Set(["COLR","CBDT","sbix"]),Gt=512;function Vt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(pt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let a=Math.min(t.getUint16(n+4),Gt);for(let r=0;r<a;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Xt.has(pt(e,s)))return true}return false}function pt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var Wt=/\p{Emoji_Presentation}|️/u;function Yt(e){return Wt.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Ht);if(t.length===0||t.length===e.length)return e;let n=e.filter(a=>!t.includes(a));return Yt(o)?[...t,...n]:[...n,...t]}var $t=2048;function ft(e,o,t,n){if(!t.clusters.length||t.clusters.length>$t)return null;let a=(f,g)=>{let{context:x,...F}=o,m={...F,text:g,environment:p$1({...o.environment,font:f})};return M(e,m,e.shape(m))},r=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),R=s.get(x)??z(n,S).find(T=>{try{return !a(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!R)return null;s.set(x,R),g=R;}let m=r.at(-1);m&&m.font===g&&m.end===f.textStart?m.end=f.textEnd:r.push({start:f.textStart,end:f.textEnd,font:g});}let i=[],p=[],l=[],u=[],h=true,d=0,c=0,y=0,E=0,b=0;for(let f of o.environment.direction==="rtl"?r.reverse():r){let g=a(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(m=>m.id===0))return null;let x=i.length,F=l.length;for(let m of g.glyphs)i.push({...m,cluster:f.start+m.cluster,originX:n$1(d+m.originX),originY:n$1(c+m.originY)});if(g.exactAdvancesX===void 0)h=false;else for(let m of g.exactAdvancesX)u.push(m);for(let m of g.clusters)p.push({...m,textStart:f.start+m.textStart,textEnd:f.start+m.textEnd,glyphStart:x+m.glyphStart,glyphEnd:x+m.glyphEnd,fontSpan:F});g.glyphs.length&&l.push({font:f.font,glyphStart:x,glyphEnd:i.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),d+=g.glyphs.reduce((m,S)=>m+S.advanceX,0),c+=g.glyphs.reduce((m,S)=>m+S.advanceY,0),y=Math.max(y,g.metrics.ascent),E=Math.max(E,g.metrics.descent),b=Math.max(b,g.metrics.lineGap);}return s$2({...t,glyphs:i,clusters:p,fontSpans:l,exactAdvancesX:h&&u.length===i.length?u:void 0,metrics:{ascent:n$1(y),descent:n$1(E),lineGap:n$1(b)}},{...o.environment,fallbackOrder:n})}var Kt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Zt=512,mt=new WeakMap;function Jt(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),a=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",i=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(i=r(12+o*4),i<0))return t}let p=a(i+4);if(p<0||p>1024)return t;let l=-1;for(let c=0;c<p;c+=1){let y=i+12+c*16;if(s(y)==="GSUB"){l=r(y+8);break}}if(l<0)return t;let u=a(l+4);if(u<=0)return t;let h=l+u,d=a(h);if(d<0)return t;for(let c=0;c<Math.min(d,Zt);c+=1){let y=s(h+2+c*6);y&&t.add(y);}return t}function Qt(e,o){let t=mt.get(e);return t||(t=Jt(e.bytes,e.faceIndex),mt.set(e,t)),(Kt.get(o)??[o.toLowerCase()]).some(a=>t.has(a))}function yt(e,o){let t=e.filter(n=>Qt(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let a=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(a===o.text)return t;try{let r=e.shape({...o,text:a});return s$2({...r,text:o.text},o.environment)}catch{return t}}function ht(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(i=>e.fonts.resolve(i)).filter(i=>!(i instanceof d$2)),n={shape(i){return Q(e.shaper,i,e.shaper.shape(i))}},a=new WeakMap,r={shape(i){let p=e.shaper.shape(i),l=a.get(p);if(l&&l.input.text===i.text&&l.input.fontSizeHalfPoints===i.fontSizeHalfPoints&&l.input.bidiLevel===i.bidiLevel&&l.input.context?.before===i.context?.before&&l.input.context?.after===i.context?.after&&l.input.environment===i.environment)return l.run;let u=s(i,Q(e.shaper,i,p));return a.set(p,{input:i,run:u}),u}},s=(i,p)=>{let l=M(n,i,p);if(!l.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(i.text))return l;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(i.environment.script)){let u=ft(n,i,l,t);if(u)return u}for(let u of yt(z(t,i.text),i.environment.script))if(!(u.hash===i.environment.font.hash&&u.faceIndex===i.environment.font.faceIndex))try{let h={...i,environment:p$1({...i.environment,font:u})},d=M(n,h,n.shape(h));if(!d.glyphs.some(c=>c.id===0))return d}catch{}return l};return {...e,shaper:r}}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var eo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var gt=new WeakMap;function H(e){let o=gt.get(e);return o||gt.set(e,o=to(e)),o}function to(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function oo(e){return Object.freeze({...H(e),bytes:i$1(e)})}function no(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$2?null:oo(t)}catch{return null}}function xt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return no(e.resolve(),o)}}function ro(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,a=[]){let r=new Map;for(let i of [...e,o]){let p=i.toLowerCase();r.has(p)||r.set(p,i);}let s=[...r.values()].map(i=>{let p=[];for(let l of eo){let u=n?.({family:i,...l});!u||u instanceof d$2||p.push(Object.freeze({...l,sourceFamily:u.family,via:u.substitution?"substitution":"direct",identity:u.identity,id:u.id,hash:u.hash,faceIndex:u.faceIndex,substitution:u.substitution}));}return Object.freeze({family:i,coverage:p.length===4?"complete":p.length>0?"partial":"none",faces:Object.freeze(p)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(s),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ro(a)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=l=>l.trim().toLowerCase(),a=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(l=>n(l.family))),s=l=>{if(!(l instanceof l$1))return true;let u=n(l.request.family);return a.has(u)||!r.has(u)},i=e.originFailures.some(({cause:l})=>l instanceof m$1?l.causes.length===0||l.causes.some(s):s(l));if(o.fontPolicy!=="strict"||!i&&e.families.every(l=>l.coverage==="complete"))return;let p=e.families.filter(l=>l.coverage!=="complete").map(l=>l.family).join(", ");throw new d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let a={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$1(a),s=o.get(r);if(!s){try{s=e.fonts.resolve(a);}catch{return null}o.set(r,s);}return s instanceof d$2?null:s}function Ft(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function io(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let a=ua(n.style,n.fontSlot),r=ed(n)?fd(n):ba(n.text,a);if(r.length===0)return null;let s=a.fontFamily??e.defaultFont.family,i=G(e,o,s,a)??(b(s)&&io(r)?G(e,o,e.defaultFont.family,a):null);if(!i)return null;try{if(a.smallCaps&&!$(e.shaper,e.environment,i,a,t))return null;let p=_(e.shaper,e.environment,i,a,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??i),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(l=>H(l.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var N=new Map,bt=new WeakMap,se=0,C;var le=32,Rt=c;function St(){if(C)return C;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function Ot(e){let o=X();return ba$1(e,{resolveFont(t){return Ft(e,o,t)},fallback:ha()})}async function vt(e,o,t=[],n=false,a){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j$1(a,h),s$1=await St(),i=ht(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>Ot(i),resolveFont:p=>i.fonts.resolve(p),shapeLaidOutText:ae(i),producer:["node-export-session",JSON.stringify(t),e.fingerprint,i.operation.shapingHash,`producer:${i.operation.producerVersion}`,`fallback:${ga}`].join("|"),extensionFingerprint:e.fingerprint})}function ao(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j$1(t,h),a=i(n$1),r=bt.get(e),s$1=r?.get(a);if(s$1)return s$1;let i$1=`${n(e)}|${a}`,p=N.get(i$1);if(!p){if(N.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let d=m(e).sources.reduce((y,E)=>y+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+d>Rt)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Rt} process-wide`);se+=d;let c;try{let y=await St();c=await s(e,y,n$1,o);}catch(y){throw se-=d,y}return Object.freeze({createMeasurer:()=>Ot(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),N.set(i$1,p),p.catch(()=>{N.get(i$1)===p&&N.delete(i$1);});}let l$1=e.fingerprint,u=p.then(h=>Object.freeze({createMeasurer:h.createMeasurer,shapeLaidOutText:h.shapeLaidOutText,producer:["node-export",l$1,h.shapingHash,`producer:${h.producerVersion}`,`fallback:${ga}`].join("|"),extensionFingerprint:l$1}));return r||bt.set(e,r=new Map),r.set(a,u),u.catch(()=>{r?.get(a)===u&&r.delete(a);}),u}var so="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function lo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(a=>a.type===so),n;if(t){let a=J(t);a.mode==="Internal"&&a.target.ok&&(n=o.parts.get(a.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),_if(o,n)}function wt(e,o){let t=lo(e);if(t.length!==0)return j$2(n=>{let a$1=new Set((n.resolvedFaces??[]).map(s=>h$1(s))),r=C$1(t,{maxFontBytes:a,aggregateBudget:co(n),shadowedRequests:a$1});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function co(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function uo(e){return te(e)&&ie(e)}var A=0,At=Symbol("font-resolution-timeout");function po(e){let o=0,t=false;return e?.(A),{reserve:a=>{if(t)throw new Error("Document font-byte lease is already released");if(A+a>c)throw new d("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${a} bytes with ${A} bytes already active`);A+=a,o+=a,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=a,o-=a,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function fo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===la||t.namespaceUri===""))?.value}async function mo(e$1,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=Ca(e$1);if(!t.ok)return t;let{fonts:n,lastResortFonts:a,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:i,glyphFallbacks:p,documentLigatures:l,fontShaping:u,...h}=o,d$1=Array.isArray(n)?n:[n],c=a===void 0?[]:Array.isArray(a)?a:[a],y,E;try{E=await yo(t.view,d$1,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:l,fontShaping:u,lastResortFonts:c,onFontResolution:R=>(y=R,i?.(R))});}catch(R){if(R instanceof d&&R.code==="aborted")return {ok:false,reason:"aborted"};throw R}if(!y)throw E?.dispose(),new d("layoutFailed","Document font resolution completed without publishing its evidence");let b;try{b=e(t.view,{...h,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(R){throw E?.dispose(),R}if(!b.ok)return E?.dispose(),b;let f=b.session,g=E,x="active",F=()=>x==="aborted"?new d("aborted","Export resource settlement was aborted"):new d("disposed","Export session has been disposed"),m=R=>{if(x==="active"){x=R,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>m("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:y,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:R=>x==="active"?f.layoutFor(R):Promise.reject(F()),validatedImageBytes:R=>x==="active"?f.validatedImageBytes(R):null,admittedFontFace:xt({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Et({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>m("disposed")})}}async function yo(e,o$1,t={}){let n=j$1(t.fontShaping,h);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let a=ho(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let i=setTimeout(()=>r.abort(At),a);try{de(r.signal);let p$1=(async()=>{let l=po(t.onActiveFontBytesChange),u=!1;try{let h=xo(e).slice(0,c$1),d=x(e,h),c=[],y={dropped:[]},E=wt(e,y),b=[...o$1,...E?[E]:[],...t.lastResortFonts??[]],f$1=await o(b,{families:[...new Set([...(t.glyphFallbacks??[]).map(m=>m.family),...d.families])].slice(0,c$1),defaultFamily:d$1.family,signal:r.signal},{onOriginFailure:m=>c.push(m),reserveOwnedBytes:l.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=z$1(f(f$1??{}),d);if(g.sources.length===0){let m=oe(h,g.defaultFont.family,c,void 0,y.dropped);ne(m,t),re(m,t,t.glyphFallbacks);return}let x$1=await vt(p(g),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let F=oe(h,g.defaultFont.family,c,x$1.resolveFont,y.dropped);return ne(F,t),re(F,t,t.glyphFallbacks),u=!0,Object.freeze({...x$1,dispose:l.release})}finally{u||l.release();}})();return await Promise.race([p$1,go(r.signal)])}finally{clearTimeout(i),t.signal?.removeEventListener("abort",s);}}function ho(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function go(e){return new Promise((o,t)=>{let n=()=>{t(Tt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Tt(e){let o=e.reason===At;return new d(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Tt(e)}function xo(e){let o=[e.part().root],t=[],n=[],a=new Set([e.part().name]),r=(u,h)=>{!h||a.has(h.name)||(a.add(h.name),u.push(h.root));};for(let u of e.headerFooterPartsBySection()){for(let h of u.headers.values())r(t,h);for(let h of u.footers.values())r(t,h);}for(let u of ["footnote","endnote"])n.push(...Fo(e,u));let s=e.documentThemeFonts(),i={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,l=(u,h)=>{let d=e$1(u,e.stylesRoot(),i,bo(u,h)),c=v(u,e.numberingRoot(),e.stylesRoot(),i);for(let y of [...d.direct,...Oo(u),...c,...s$1(u,e.stylesRoot(),i),...d.inherited]){let E=y.toLowerCase();p.has(E)||p.set(E,y);}};return l(o,"body"),l(t,"furniture"),l(n,"note"),[...p.values()]}function Fo(e,o){let t=ch(e.currentPackage(),o);if(!t)return [];let n=new Set(dh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),a=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=zc(r),i=yc(r);(s==="separator"||s==="continuationSeparator"||i!==null&&n.has(i))&&a.push(r);}return a}var Eo="http://schemas.openxmlformats.org/officeDocument/2006/math";function bo(e,o){let t=new Set;for(let n of e){let a=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:i}=r.pop();s.namespaceUri===la&&s.localName==="p"&&a.push({paragraph:s,context:i});let p=s.namespaceUri===la&&s.localName==="txbxContent"&&(i==="body"||i==="note")?"detached":i;for(let l=s.children.length-1;l>=0;l-=1){let u=s.children[l];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of a)Ro(s.paragraph,t,s.context);}return t}function Ro(e,o,t){let n=Vb(),a=null,r=null,s="",i=false,p=false,l=false,u=0,h=[];for(let d=e.children.length-1;d>=0;d-=1){let c=e.children[d];c.kind!=="textValue"&&h.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;h.length>0;){let{node:d,runId:c,visibility:y,containerDepth:E}=h.pop();if(E>=wa||d.namespaceUri===la&&d.localName==="p")continue;let b=d.namespaceUri===la&&d.localName==="r"?d.id:c;if(d.namespaceUri===la&&d.localName==="fldSimple"){let f=ce(d,"instr")??"";Yc(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&So(d)!==k&&o.add(d.id);}if(d.namespaceUri===la&&d.localName==="fldChar"){let f=ce(d,"fldCharType");if(f==="begin")Yb(n),n.nesting===1&&(a=b,r=null,s="",i=false,p=false,l=Bf(d),u=0);else if(f==="separate"){let g=n.nesting===1;if(_b(n),g){let x=Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow,r=b,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=Xb(n);s=x.instruction,i=x.overflow||n.nestingOverflow;}if(!i&&Xc(s,{hasSeparate:p,hasLegacyFormData:l,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??a;x&&o.add(x);}}$b(n);}continue}if(d.namespaceUri===la&&(d.localName==="instrText"||d.localName==="delInstrText")){Zb(n,It(d),d.localName==="delInstrText");continue}n.nesting>0&&ac(n)&&d.namespaceUri===la&&Lt(d)&&(u|=y);for(let f=d.children.length-1;f>=0;f-=1){let g=d.children[f];g.kind!=="textValue"&&h.push({node:g,runId:b,visibility:y&kt(d),containerDepth:xa(d,E)});}}Wb(n);}function Lt(e){return e.localName==="t"||e.localName==="delText"?It(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,Pt=2,Dt=4,k=ue|Pt|Dt;function So(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:a}=o.pop();if(!(n.namespaceUri===la&&n.localName==="p")){if(n.namespaceUri===la&&Lt(n)&&(t|=a,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:a&kt(n)});}}return t}function kt(e){return e.namespaceUri!==la?k:e.localName==="ins"||e.localName==="moveTo"?ue|Pt:e.localName==="del"||e.localName==="moveFrom"?ue|Dt:k}function Oo(e){let o=new Map,t=n=>{let a=b$2(n??void 0);if(a===null)return;let r=a.toLowerCase();o.has(r)||o.set(r,a);};for(let n of e){let a=[n];for(;a.length>0;){let r=a.pop();if(r.namespaceUri===Eo&&t($c),r.namespaceUri===la&&r.localName==="sym"&&t(c$3(fo(r,"font"))),r.namespaceUri===la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(Wc(s??"")?.font??null);}if(r.namespaceUri===la&&r.localName==="p")for(let s of u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let i=r.children[s];i.kind!=="textValue"&&a.push(i);}}}return [...o.values()]}function It(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let a=n.children.length-1;a>=0;a-=1)t.push(n.children[a]);}return o}var Nt="FILE_TOO_LARGE",_t=8;function vo(e){return typeof e=="object"&&e!==null}function Ct(e){if(!(!vo(e)||typeof e.code!="string"))return e.code}function Ut(e){return e===""||e.toLowerCase()==="localhost"}function wo(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function Bt(e){let o=wo(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function qt(e){let o=Bt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Ao(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function To(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!Ut(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=qt(o.pathname);if(t===null||Ao(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Lo(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function Po(e){let o=Lo(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>_t)throw new TypeError(`trustedRoot must not exceed ${_t} directories`);return o.map(To)}function Do(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function ko(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!Ut(e.host))return null;let t=Bt(e.pathname);if(t===null)return null;for(let n of o){let a=qt(n.pathname);if(a===null||!t.startsWith(a)||t.length<=a.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function Io(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function _o(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Mt(e,o,t){return e.some(n=>_o(n,o,t))}async function Mo(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(a){if(Ct(a)==="ENOENT")continue;throw a}return t}function No(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:a,realpath:r},{constants:s},{fileURLToPath:i},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),l=e.map(y=>p.resolve(i(y.href))),u=p.resolve(i(typeof o=="string"?o:o.href));if(!Mt(l,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let h=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",d=await a(u,h),c=()=>{d.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let y=await r(u);if(!Mt(await Mo(l,r),y,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await d.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Nt});let b=new Uint8Array(E),f=0;for(;f<b.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await d.read(b,f,b.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===b.byteLength?b:b.slice(0,f)}catch(y){throw t?.aborted?t.reason:y}finally{t?.removeEventListener("abort",c),await d.close().catch(()=>{});}}}function Co(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=Po(e.trustedRoot),t=Do(e.maxBytes),n=e.read??No(o),a=e.networkFetch??fetch;return(async(r,s)=>{let i=s?.signal;if(i?.aborted)throw i.reason;let p=Io(r);if(p.protocol!=="file:")return a(p,s);let l=ko(p,o);if(!l)return new Response(null,{status:404});let u=i?new AbortController:void 0,h=()=>u?.abort(i?.reason);i?.addEventListener("abort",h,{once:true});let d;try{if(d=await n(l,{maxBytes:t,...u?{signal:u.signal}:{}}),i?.aborted)throw i.reason;if(d.byteLength>t)return new Response(null,{status:413})}catch(c){if(i?.aborted)throw i.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let y=Ct(c);if(y===Nt)return new Response(null,{status:413});if(y==="ENOENT"||y==="ENOTDIR"||y==="ELOOP")return new Response(null,{status:404});throw c}finally{i?.removeEventListener("abort",h);}return new Response(d,{status:200})})}
|
|
2
|
-
export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,
|
|
1
|
+
import {c as c$1,x,o,d as d$1,f,z as z$1,A as A$1,v,s as s$1,j as j$2,E,m as m$1,u,l as l$1}from'./chunk-HZ66UCIS.js';import {l,j as j$1,h,i,n,m,s,p,c as c$2,g,da as da$1,ca,fa}from'./chunk-FNNOJNGY.js';import'./chunk-RIYSCEFQ.js';import {d,e}from'./chunk-SUEXVBPR.js';export{d as ExportResourceError,c as createNodeImageDecodePort,b as exportDestinationNamed,e as openDocumentForExport}from'./chunk-SUEXVBPR.js';import {c,ia,a,wa,gd,hd,da,ja,h as h$1,d as d$2,Yc,b as b$1,i as i$1,Xb,_c,_b,ac,Zb,Zc,bc,$b,cc,Yb,r,u as u$1,n as n$1,bd}from'./chunk-4S24UOPG.js';import {e as e$1,c as c$3,b as b$2}from'./chunk-2E2RPEKX.js';import'./chunk-VWIJKH4A.js';import {Ca}from'./chunk-Q5K2GGNG.js';import {lh,mh,zc,yc,b,la,pd,J,lf,wa as wa$1,Ef,xa}from'./chunk-T2QQHG5C.js';function N(e,o,t){if(o.environment.features.smcp!==1||!/\p{Ll}/u.test(o.text))return t;let n={...o,environment:{...o.environment,features:{...o.environment.features,smcp:0}}},i=e.shape(n);if(t.glyphs.length!==i.glyphs.length||t.glyphs.some((l,c)=>l.id!==i.glyphs[c]?.id))return t;let r=[],s=0;for(let l of o.text){let c=l.toUpperCase()!==l,h=r.at(-1);h&&(h.lower===c||/\p{M}/u.test(l))?h.text+=l:r.push({text:l,start:s,lower:c}),s+=l.length;}let a=[],p=[],d=[],u=true,m=0;for(let l of o.environment.direction==="rtl"?r.reverse():r){let c=l.lower?.8:1,h=[],E=[],R="",f=l.start;for(let F of l.text){let y=l.lower?F.toUpperCase():F;for(let S=0;S<y.length;S++)h.push(f),E.push(f+F.length);R+=y,f+=F.length;}let g=e.shape({...n,text:R}),x=a.length;for(let[F,y]of g.glyphs.entries()){let S=g.exactAdvancesX?.[F];S===void 0?u=false:d.push(S*c),a.push({...y,cluster:h[y.cluster]??l.start,originX:n$1(m+Math.round(y.originX*c)),originY:n$1(Math.round(y.originY*c)),offsetX:n$1(Math.round(y.offsetX*c)),offsetY:n$1(Math.round(y.offsetY*c)),advanceX:n$1(Math.round(y.advanceX*c)),advanceY:n$1(Math.round(y.advanceY*c)),drawScale:c});}for(let F of g.clusters){let y=h[F.textStart]??l.start,S=E[F.textEnd-1]??f,b=n$1(Math.round(F.advance*c)),T=p.at(-1);T&&T.textStart===y&&T.textEnd===S?p[p.length-1]={...T,glyphEnd:x+F.glyphEnd,advance:n$1(T.advance+b),caretEdges:[n$1(0),n$1(T.advance+b)]}:p.push({...F,textStart:y,textEnd:S,glyphStart:x+F.glyphStart,glyphEnd:x+F.glyphEnd,advance:b,caretEdges:F.caretEdges.map(V=>n$1(Math.round(V*c))),fontSpan:0});}m+=g.glyphs.reduce((F,y)=>F+Math.round(y.advanceX*c),0);}return {...t,glyphs:a,clusters:p,fontSpans:[{...t.fontSpans[0],glyphStart:0,glyphEnd:a.length}],exactAdvancesX:u&&d.length===a.length?d:void 0}}var ft=new WeakMap;function Gt(e){let o=ft.get(e);return o===void 0&&(o=Yt(e.bytes,e.faceIndex),ft.set(e,o)),o}var Vt=new Set(["COLR","CBDT","sbix"]),Wt=512;function Yt(e,o){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.byteLength<12)return false;let n=0;if(mt(e,0)==="ttcf"){let r=t.getUint32(8);if(o<0||o>=r||12+4*o+4>e.byteLength||(n=t.getUint32(12+4*o),n+12>e.byteLength))return false}let i=Math.min(t.getUint16(n+4),Wt);for(let r=0;r<i;r++){let s=n+12+r*16;if(s+4>e.byteLength)return false;if(Vt.has(mt(e,s)))return true}return false}function mt(e,o){return String.fromCharCode(e[o],e[o+1],e[o+2],e[o+3])}var $t=/\p{Emoji_Presentation}|️/u;function Kt(e){return $t.test(e)}function z(e,o){if(e.length<2)return e;let t=e.filter(Gt);if(t.length===0||t.length===e.length)return e;let n=e.filter(i=>!t.includes(i));return Kt(o)?[...t,...n]:[...n,...t]}var Zt=2048;function yt(e,o,t,n){if(!t.clusters.length||t.clusters.length>Zt)return null;let i=(f,g)=>{let{context:x,...F}=o,y={...F,text:g,environment:r({...o.environment,font:f})};return N(e,y,e.shape(y))},r$1=[],s=new Map;for(let f of [...t.clusters].sort((g,x)=>g.textStart-x.textStart)){let g=o.environment.font,x=o.text.slice(f.textStart,f.textEnd),F=r$1.at(-1);if(/^[\uFE0E\uFE0F]$/.test(x)&&F&&F.end===f.textStart){F.end=f.textEnd;continue}if(o.environment.script==="Hebr"&&/^\s+$/u.test(x)&&F&&F.font!==o.environment.font&&F.end===f.textStart){F.end=f.textEnd;continue}if(t.glyphs.slice(f.glyphStart,f.glyphEnd).some(S=>S.id===0)){let S=o.text.slice(f.textStart,f.textEnd+1),b=s.get(x)??z(n,S).find(T=>{try{return !i(T,x).glyphs.some(V=>V.id===0)}catch{return false}});if(!b)return null;s.set(x,b),g=b;}let y=r$1.at(-1);y&&y.font===g&&y.end===f.textStart?y.end=f.textEnd:r$1.push({start:f.textStart,end:f.textEnd,font:g});}let a=[],p=[],d=[],u=[],m=true,l=0,c=0,h=0,E=0,R=0;for(let f of o.environment.direction==="rtl"?r$1.reverse():r$1){let g=i(f.font,o.text.slice(f.start,f.end));if(g.glyphs.some(y=>y.id===0))return null;let x=a.length,F=d.length;for(let y of g.glyphs)a.push({...y,cluster:f.start+y.cluster,originX:n$1(l+y.originX),originY:n$1(c+y.originY)});if(g.exactAdvancesX===void 0)m=false;else for(let y of g.exactAdvancesX)u.push(y);for(let y of g.clusters)p.push({...y,textStart:f.start+y.textStart,textEnd:f.start+y.textEnd,glyphStart:x+y.glyphStart,glyphEnd:x+y.glyphEnd,fontSpan:F});g.glyphs.length&&d.push({font:f.font,glyphStart:x,glyphEnd:a.length,fallbackIndex:f.font===o.environment.font?null:n.indexOf(f.font)}),l+=g.glyphs.reduce((y,S)=>y+S.advanceX,0),c+=g.glyphs.reduce((y,S)=>y+S.advanceY,0),h=Math.max(h,g.metrics.ascent),E=Math.max(E,g.metrics.descent),R=Math.max(R,g.metrics.lineGap);}return u$1({...t,glyphs:a,clusters:p,fontSpans:d,exactAdvancesX:m&&u.length===a.length?u:void 0,metrics:{ascent:n$1(h),descent:n$1(E),lineGap:n$1(R)}},{...o.environment,fallbackOrder:n})}var Jt=new Map([["Beng",["bng2","beng"]],["Deva",["dev2","deva"]],["Gujr",["gjr2","gujr"]],["Guru",["gur2","guru"]],["Knda",["knd2","knda"]],["Mlym",["mlm2","mlym"]],["Orya",["ory2","orya"]],["Taml",["tml2","taml"]],["Telu",["tel2","telu"]],["Nkoo",["nko "]]]),Qt=512,ht=new WeakMap;function eo(e,o){let t=new Set,n=new DataView(e.buffer,e.byteOffset,e.byteLength),i=c=>c+2<=n.byteLength?n.getUint16(c):-1,r=c=>c+4<=n.byteLength?n.getUint32(c):-1,s=c=>c+4<=n.byteLength?String.fromCharCode(n.getUint8(c),n.getUint8(c+1),n.getUint8(c+2),n.getUint8(c+3)):"",a=0;if(s(0)==="ttcf"){let c=r(8);if(c<0||o<0||o>=c||(a=r(12+o*4),a<0))return t}let p=i(a+4);if(p<0||p>1024)return t;let d=-1;for(let c=0;c<p;c+=1){let h=a+12+c*16;if(s(h)==="GSUB"){d=r(h+8);break}}if(d<0)return t;let u=i(d+4);if(u<=0)return t;let m=d+u,l=i(m);if(l<0)return t;for(let c=0;c<Math.min(l,Qt);c+=1){let h=s(m+2+c*6);h&&t.add(h);}return t}function to(e,o){let t=ht.get(e);return t||(t=eo(e.bytes,e.faceIndex),ht.set(e,t)),(Jt.get(o)??[o.toLowerCase()]).some(i=>t.has(i))}function gt(e,o){let t=e.filter(n=>to(n,o));return t.length===0||t.length===e.length?e:[...t,...e.filter(n=>!t.includes(n))]}function Q(e,o,t){if(!o.text.includes("\u2011"))return t;let n=new Set(t.glyphs.filter(r=>r.id===0).map(r=>r.cluster));if(!n.size)return t;let i=o.text.replace(/\u2011/g,(r,s)=>n.has(s)?"-":r);if(i===o.text)return t;try{let r=e.shape({...o,text:i});return u$1({...r,text:o.text},o.environment)}catch{return t}}function xt(e,o){if(o.length===0)return e;if(o.length>16)throw new RangeError("At most 16 glyph fallback faces are supported");let t=o.map(a=>e.fonts.resolve(a)).filter(a=>!(a instanceof d$2)),n={shape(a){return Q(e.shaper,a,e.shaper.shape(a))}},i=new WeakMap,r$1={shape(a){let p=e.shaper.shape(a),d=i.get(p);if(d&&d.input.text===a.text&&d.input.fontSizeHalfPoints===a.fontSizeHalfPoints&&d.input.bidiLevel===a.bidiLevel&&d.input.context?.before===a.context?.before&&d.input.context?.after===a.context?.after&&d.input.environment===a.environment)return d.run;let u=s(a,Q(e.shaper,a,p));return i.set(p,{input:a,run:u}),u}},s=(a,p)=>{let d=N(n,a,p);if(!d.glyphs.some(u=>u.id===0)||/^[\t\n\r\f]*$/.test(a.text))return d;if(/^(Latn|Cyrl|Grek|Hebr|Hani|Hira|Kana|Hang|Zyyy|Zinh)$/.test(a.environment.script)){let u=yt(n,a,d,t);if(u)return u}for(let u of gt(z(t,a.text),a.environment.script))if(!(u.hash===a.environment.font.hash&&u.faceIndex===a.environment.font.faceIndex))try{let m={...a,environment:r({...a.environment,font:u})},l=N(n,m,n.shape(m));if(!l.glyphs.some(c=>c.id===0))return l}catch{}return d};return {...e,shaper:r$1}}var ee=b$1;function te(e){return typeof e.admittedFontFace=="function"}var oo=Object.freeze([{weight:400,style:"normal"},{weight:700,style:"normal"},{weight:400,style:"italic"},{weight:700,style:"italic"}]);function j(e){return Object.freeze({family:e.family,weight:e.weight,style:e.style})}var Ft=new WeakMap;function H(e){let o=Ft.get(e);return o||Ft.set(e,o=no(e)),o}function no(e){let o=e.substitution;return Object.freeze({id:e.id,identity:e.identity,family:e.family,request:j(e.request),byteLength:e.byteLength,hash:e.hash,faceIndex:e.faceIndex,substitution:o?Object.freeze({requested:j(o.requested),resolved:j(o.resolved),...o.lineMetrics?{lineMetrics:Object.freeze({...o.lineMetrics})}:{}}):null})}function ro(e){return Object.freeze({...H(e),bytes:i$1(e)})}function io(e,o){if(!e)return null;try{let t=e(o);return !t||t instanceof d$2?null:ro(t)}catch{return null}}function Et(e){return o=>{if(e.status()!=="active")throw e.unavailable();return io(e.resolve(),o)}}function ao(e){return Object.freeze(e.slice(0,ee).map(o=>Object.freeze({request:j(o.request),partName:o.partName,reason:o.reason})))}function oe(e,o,t,n,i=[],r=new Set){let s=new Map;for(let p of [...e,o]){let d=p.toLowerCase();s.has(d)||s.set(d,p);}let a=[...s.values()].map(p=>{let d=[];for(let m of oo){let l=n?.({family:p,...m});!l||l instanceof d$2||d.push(Object.freeze({...m,sourceFamily:l.family,via:l.substitution?"substitution":"direct",identity:l.identity,id:l.id,hash:l.hash,faceIndex:l.faceIndex,substitution:l.substitution}));}let u=r.has(p.trim().toLowerCase())?d.filter(m=>m.via==="direct").length:d.length;return Object.freeze({family:p,coverage:u===4?"complete":u>0?"partial":"none",faces:Object.freeze(d)})});return Object.freeze({requestedFamilies:Object.freeze([...e]),defaultFamily:o,families:Object.freeze(a),originFailures:Object.freeze([...t]),droppedEmbeddedFonts:ao(i)})}function ne(e,o){if(o.onFontResolution){try{let t=o.onFontResolution(e);Promise.resolve(t).catch(n=>{console.warn("[fonts] font-resolution diagnostics callback failed",n);});}catch(t){console.warn("[fonts] font-resolution diagnostics callback failed",t);}return}for(let t of e.originFailures)console.warn("[fonts] a document export font origin failed and was skipped",t);for(let t of e.droppedEmbeddedFonts??[])console.warn("[fonts] a document embedded font face was dropped during export",t);}function re(e,o,t=[]){let n=d=>d.trim().toLowerCase(),i=new Set([...e.requestedFamilies,e.defaultFamily].map(n)),r=new Set(t.map(d=>n(d.family))),s=d=>{if(!(d instanceof l$1))return true;let u=n(d.request.family);return i.has(u)||!r.has(u)},a=e.originFailures.some(({cause:d})=>d instanceof m$1?d.causes.length===0||d.causes.some(s):s(d));if(o.fontPolicy!=="strict"||!a&&e.families.every(d=>d.coverage==="complete"))return;let p=e.families.filter(d=>d.coverage!=="complete").map(d=>d.family).join(", ");throw new d("layoutFailed",`Strict font policy refused export${p?`; incomplete families: ${p}`:"; a font origin failed"}`)}function X(){return new Map}function G(e,o,t,n){if(t.trim().length===0)return null;let i={family:t,weight:n.bold?700:400,style:n.italic?"italic":"normal"},r=h$1(i),s=o.get(r);if(!s){try{s=e.fonts.resolve(i);}catch{return null}o.set(r,s);}return s instanceof d$2?null:s}function bt(e,o,t){let n=t.fontFamily??e.defaultFont.family;return G(e,o,n,t)}function ie(e){return typeof e.shapeLaidOutText=="function"}function so(e){for(let o of e){let t=o.codePointAt(0);if(t!==32&&(t<=255||t>=61440&&t<=61695))return false}return true}function ae(e){let o=X(),t=new WeakMap;return n=>{let i=wa(n.style,n.fontSlot),r=gd(n)?hd(n):da(n.text,i);if(r.length===0)return null;let s=i.fontFamily??e.defaultFont.family,a=G(e,o,s,i)??(b(s)&&so(r)?G(e,o,e.defaultFont.family,i):null);if(!a)return null;try{if(i.smallCaps&&!da$1(e.shaper,e.environment,a,i,t))return null;let p=ca(e.shaper,e.environment,a,i,r);return Object.freeze({run:p,font:H(p.fontSpans[0]?.font??a),...p.fontSpans.length>1?{fonts:Object.freeze(p.fontSpans.map(d=>H(d.font)))}:{},fixedPointScale:e.environment.fixedPointScale})}catch{return null}}}function Rt(e){return o=>{if(e.status()!=="active")throw e.unavailable();return e.shaping()?.shapeLaidOutText(o)??null}}var M=new Map,St=new WeakMap,se=0,C;var le=32,Ot=c;function vt(){if(C)return C;let e=(async()=>(await c$2(),g({...h,maxFontBytes:a})))();return C=e,e.catch(()=>{C===e&&(C=void 0);}),e}function wt(e){let o=X();return fa(e,{resolveFont(t){return bt(e,o,t)},fallback:ja()})}async function At(e,o,t=[],n=false,i){if(!l(e))throw new TypeError("Session exporter shaping requires a prepared font handle");let r=j$1(i,h),s$1=await vt(),a=xt(await s(e,s$1,r,o,n),t);return Object.freeze({createMeasurer:()=>wt(a),resolveFont:p=>a.fonts.resolve(p),shapeLaidOutText:ae(a),producer:["node-export-session",JSON.stringify(t),e.fingerprint,a.operation.shapingHash,`producer:${a.operation.producerVersion}`,`fallback:${ia}`].join("|"),extensionFingerprint:e.fingerprint})}function lo(e,o,t){if(!l(e))return Promise.reject(new TypeError("Shared exporter shaping requires a prepared font handle"));let n$1=j$1(t,h),i$1=i(n$1),r=St.get(e),s$1=r?.get(i$1);if(s$1)return s$1;let a=`${n(e)}|${i$1}`,p=M.get(a);if(!p){if(M.size>=le)return Promise.reject(new RangeError(`Shared exporter shaping is limited to ${le} process-wide configurations`));p=(async()=>{let l=m(e).sources.reduce((h,E)=>h+(E.availability==="forbidden"?0:E.bytes.byteLength),0);if(se+l>Ot)throw new RangeError(`Shared exporter shaping font bytes are limited to ${Ot} process-wide`);se+=l;let c;try{let h=await vt();c=await s(e,h,n$1,o);}catch(h){throw se-=l,h}return Object.freeze({createMeasurer:()=>wt(c),shapeLaidOutText:ae(c),shapingHash:c.operation.shapingHash,producerVersion:c.operation.producerVersion})})(),M.set(a,p),p.catch(()=>{M.get(a)===p&&M.delete(a);});}let d=e.fingerprint,u=p.then(m=>Object.freeze({createMeasurer:m.createMeasurer,shapeLaidOutText:m.shapeLaidOutText,producer:["node-export",d,m.shapingHash,`producer:${m.producerVersion}`,`fallback:${ia}`].join("|"),extensionFingerprint:d}));return r||St.set(e,r=new Map),r.set(i$1,u),u.catch(()=>{r?.get(i$1)===u&&r.delete(i$1);}),u}var co="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";function uo(e){let o=e.currentPackage(),t=(o.relationships.get(o.mainDocumentPart)??[]).find(i=>i.type===co),n;if(t){let i=J(t);i.mode==="Internal"&&i.target.ok&&(n=o.parts.get(i.target.partName));}return n??=o.parts.get("/word/fontTable.xml"),lf(o,n)}function Tt(e,o){let t=uo(e);if(t.length!==0)return j$2(n=>{let i=new Set((n.resolvedFaces??[]).map(s=>h$1(s))),r=E(t,{maxFontBytes:a,aggregateBudget:po(n),shadowedRequests:i});if(o)for(let s of r.dropped){if(o.dropped.length>=ee)break;o.dropped.push(s);}return {sources:r.sources}})}function po(e){let o=e.committedSourceBytes;return o===void 0||!Number.isSafeInteger(o)||o<=0?c:Math.max(0,c-o)}function fo(e){return te(e)&&ie(e)}var A=0,Lt=Symbol("font-resolution-timeout");function mo(e){let o=0,t=false;return e?.(A),{reserve:i=>{if(t)throw new Error("Document font-byte lease is already released");if(A+i>c)throw new d("layoutFailed",`Active document export font bytes are limited to ${c}; requested ${i} bytes with ${A} bytes already active`);A+=i,o+=i,e?.(A);let r=false;return ()=>{r||t||(r=true,A-=i,o-=i,e?.(A));}},release:()=>{t||(t=true,A-=o,o=0,e?.(A));}}}function ce(e,o){return e.attributes.find(t=>t.localName===o)?.value}function yo(e,o){return e.attributes.find(t=>t.localName===o&&(t.namespaceUri===la||t.namespaceUri===""))?.value}async function ho(e$1,o){if(o.reuseAcrossRevisions===true)throw new TypeError("reuseAcrossRevisions requires a live view or caller-supplied measurer; document-aware byte sessions are immutable");if(o.signal?.aborted)return {ok:false,reason:"aborted"};let t=Ca(e$1);if(!t.ok)return t;let{fonts:n,lastResortFonts:i,fontResolutionTimeoutMs:r,fontPolicy:s,onFontResolution:a,glyphFallbacks:p,documentLigatures:d$1,fontShaping:u,...m}=o,l=Array.isArray(n)?n:[n],c=i===void 0?[]:Array.isArray(i)?i:[i],h,E;try{E=await go(t.view,l,{signal:o.signal,timeoutMs:r??o.resourceTimeoutMs,fontPolicy:s,glyphFallbacks:p,documentLigatures:d$1,fontShaping:u,lastResortFonts:c,onFontResolution:b=>(h=b,a?.(b))});}catch(b){if(b instanceof d&&b.code==="aborted")return {ok:false,reason:"aborted"};throw b}if(!h)throw E?.dispose(),new d("layoutFailed","Document font resolution completed without publishing its evidence");let R;try{R=e(t.view,{...m,reuseAcrossRevisions:!1,...E?{measurer:E.createMeasurer(),producer:o.producer??E.producer}:o.producer?{producer:o.producer}:{}});}catch(b){throw E?.dispose(),b}if(!R.ok)return E?.dispose(),R;let f=R.session,g=E,x="active",F=()=>x==="aborted"?new d("aborted","Export resource settlement was aborted"):new d("disposed","Export session has been disposed"),y=b=>{if(x==="active"){x=b,o.signal?.removeEventListener("abort",S);try{f.dispose();}finally{g?.dispose(),g=void 0;}}},S=()=>y("aborted");return o.signal?.addEventListener("abort",S,{once:true}),o.signal?.aborted&&S(),{ok:true,session:Object.freeze({fontResolution:h,layout:()=>x==="active"?f.layout():Promise.reject(F()),layoutFor:b=>x==="active"?f.layoutFor(b):Promise.reject(F()),validatedImageBytes:b=>x==="active"?f.validatedImageBytes(b):null,admittedFontFace:Et({status:()=>x,unavailable:F,resolve:()=>g?.resolveFont}),shapeLaidOutText:Rt({status:()=>x,unavailable:F,shaping:()=>g}),dispose:()=>y("disposed")})}}async function go(e,o$1,t={}){let n=j$1(t.fontShaping,h);if((t.glyphFallbacks?.length??0)>16)throw new RangeError("At most 16 glyph fallback faces are supported");let i=xo(t.timeoutMs),r=new AbortController,s=()=>r.abort(t.signal?.reason);t.signal?.addEventListener("abort",s,{once:true}),t.signal?.aborted&&s();let a=setTimeout(()=>r.abort(Lt),i);try{de(r.signal);let p$1=(async()=>{let d=mo(t.onActiveFontBytesChange),u=!1;try{let m=Eo(e).slice(0,c$1),l=x(e,m),c=[],h={dropped:[]},E=Tt(e,h),R=[...o$1,...E?[E]:[],...t.lastResortFonts??[]],f$1=await o(R,{families:[...new Set([...(t.glyphFallbacks??[]).map(b=>b.family),...l.families])].slice(0,c$1),defaultFamily:d$1.family,signal:r.signal},{onOriginFailure:b=>c.push(b),reserveOwnedBytes:d.reserve,maxExecutionFontBytes:n.maxFontBytes});de(r.signal);let g=f(f$1??{}),x$1=z$1(g,l),F=A$1(g,x$1,l);if(x$1.sources.length===0){let b=oe(m,x$1.defaultFont.family,c,void 0,h.dropped);ne(b,t),re(b,t,t.glyphFallbacks);return}let y=await At(p(x$1),void 0,t.glyphFallbacks,t.documentLigatures,{maxFontBytes:n.maxFontBytes});de(r.signal);let S=oe(m,x$1.defaultFont.family,c,y.resolveFont,h.dropped,F);return ne(S,t),re(S,t,t.glyphFallbacks),u=!0,Object.freeze({...y,dispose:d.release})}finally{u||d.release();}})();return await Promise.race([p$1,Fo(r.signal)])}finally{clearTimeout(a),t.signal?.removeEventListener("abort",s);}}function xo(e){if(e===void 0)return 6e4;if(!Number.isFinite(e)||e<=0)throw new RangeError("timeoutMs must be a positive finite number");return Math.max(1,e)}function Fo(e){return new Promise((o,t)=>{let n=()=>{t(Pt(e));};e.aborted?n():e.addEventListener("abort",n,{once:true});})}function Pt(e){let o=e.reason===Lt;return new d(o?"timedOut":"aborted",o?"Font resolution timed out":"Font resolution was aborted",o?void 0:{cause:e.reason})}function de(e){if(e.aborted)throw Pt(e)}function Eo(e){let o=[e.part().root],t=[],n=[],i=new Set([e.part().name]),r=(u,m)=>{!m||i.has(m.name)||(i.add(m.name),u.push(m.root));};for(let u of e.headerFooterPartsBySection()){for(let m of u.headers.values())r(t,m);for(let m of u.footers.values())r(t,m);}for(let u of ["footnote","endnote"])n.push(...bo(e,u));let s=e.documentThemeFonts(),a={...s,major:s.major,minor:s.minor,majorEastAsia:s.majorEastAsia??null,minorEastAsia:s.minorEastAsia??null},p=new Map,d=(u,m)=>{let l=e$1(u,e.stylesRoot(),a,So(u,m)),c=v(u,e.numberingRoot(),e.stylesRoot(),a);for(let h of [...l.direct,...wo(u),...c,...s$1(u,e.stylesRoot(),a),...l.inherited]){let E=h.toLowerCase();p.has(E)||p.set(E,h);}};return d(o,"body"),d(t,"furniture"),d(n,"note"),[...p.values()]}function bo(e,o){let t=lh(e.currentPackage(),o);if(!t)return [];let n=new Set(mh(e.part()).filter(r=>r.noteKind===o).map(r=>r.noteId)),i=[];for(let r of t.root.children){if(r.kind==="textValue")continue;let s=zc(r),a=yc(r);(s==="separator"||s==="continuationSeparator"||a!==null&&n.has(a))&&i.push(r);}return i}var Ro="http://schemas.openxmlformats.org/officeDocument/2006/math";function So(e,o){let t=new Set;for(let n of e){let i=[],r=[{node:n,context:o}];for(;r.length>0;){let{node:s,context:a}=r.pop();s.namespaceUri===la&&s.localName==="p"&&i.push({paragraph:s,context:a});let p=s.namespaceUri===la&&s.localName==="txbxContent"&&(a==="body"||a==="note")?"detached":a;for(let d=s.children.length-1;d>=0;d-=1){let u=s.children[d];u.kind!=="textValue"&&r.push({node:u,context:p});}}for(let s of i)Oo(s.paragraph,t,s.context);}return t}function Oo(e,o,t){let n=Xb(),i=null,r=null,s="",a=false,p=false,d=false,u=0,m=[];for(let l=e.children.length-1;l>=0;l-=1){let c=e.children[l];c.kind!=="textValue"&&m.push({node:c,runId:null,visibility:k,containerDepth:0});}for(;m.length>0;){let{node:l,runId:c,visibility:h,containerDepth:E}=m.pop();if(E>=wa$1||l.namespaceUri===la&&l.localName==="p")continue;let R=l.namespaceUri===la&&l.localName==="r"?l.id:c;if(l.namespaceUri===la&&l.localName==="fldSimple"){let f=ce(l,"instr")??"";_c(f,{allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&vo(l)!==k&&o.add(l.id);}if(l.namespaceUri===la&&l.localName==="fldChar"){let f=ce(l,"fldCharType");if(f==="begin")_b(n),n.nesting===1&&(i=R,r=null,s="",a=false,p=false,d=Ef(l),u=0);else if(f==="separate"){let g=n.nesting===1;if(ac(n),g){let x=Zb(n);s=x.instruction,a=x.overflow||n.nestingOverflow,r=R,p=true;}}else if(f==="end"){if(n.nesting===1){if(n.phase==="instruction"){let x=Zb(n);s=x.instruction,a=x.overflow||n.nestingOverflow;}if(!a&&Zc(s,{hasSeparate:p,hasLegacyFormData:d,allowPageFields:t==="body"||t==="furniture",allowRefFields:t==="body"||t==="note",allowPageRef:t==="body",allowAutonum:t==="body"||t==="note"})&&u!==k){let x=r??i;x&&o.add(x);}}bc(n);}continue}if(l.namespaceUri===la&&(l.localName==="instrText"||l.localName==="delInstrText")){$b(n,Nt(l),l.localName==="delInstrText");continue}n.nesting>0&&cc(n)&&l.namespaceUri===la&&Dt(l)&&(u|=h);for(let f=l.children.length-1;f>=0;f-=1){let g=l.children[f];g.kind!=="textValue"&&m.push({node:g,runId:R,visibility:h&_t(l),containerDepth:xa(l,E)});}}Yb(n);}function Dt(e){return e.localName==="t"||e.localName==="delText"?Nt(e).length>0:e.localName==="sym"||e.localName==="tab"||e.localName==="br"}var ue=1,kt=2,It=4,k=ue|kt|It;function vo(e){let o=[];for(let n of e.children)n.kind!=="textValue"&&o.push({node:n,visibility:k});let t=0;for(;o.length>0;){let{node:n,visibility:i}=o.pop();if(!(n.namespaceUri===la&&n.localName==="p")){if(n.namespaceUri===la&&Dt(n)&&(t|=i,t===k))return t;for(let r of n.children)r.kind!=="textValue"&&o.push({node:r,visibility:i&_t(n)});}}return t}function _t(e){return e.namespaceUri!==la?k:e.localName==="ins"||e.localName==="moveTo"?ue|kt:e.localName==="del"||e.localName==="moveFrom"?ue|It:k}function wo(e){let o=new Map,t=n=>{let i=b$2(n??void 0);if(i===null)return;let r=i.toLowerCase();o.has(r)||o.set(r,i);};for(let n of e){let i=[n];for(;i.length>0;){let r=i.pop();if(r.namespaceUri===Ro&&t(bd),r.namespaceUri===la&&r.localName==="sym"&&t(c$3(yo(r,"font"))),r.localName==="textpath"&&t(pd(r)),r.namespaceUri===la&&r.localName==="fldSimple"){let s=ce(r,"instr");t(Yc(s??"")?.font??null);}if(r.namespaceUri===la&&r.localName==="p")for(let s of u(r))t(s);for(let s=r.children.length-1;s>=0;s-=1){let a=r.children[s];a.kind!=="textValue"&&i.push(a);}}}return [...o.values()]}function Nt(e){let o="",t=[...e.children].reverse();for(;t.length>0&&o.length<=256;){let n=t.pop();if(n.kind==="textValue")o+=n.value;else for(let i=n.children.length-1;i>=0;i-=1)t.push(n.children[i]);}return o}var Ut="FILE_TOO_LARGE",Mt=8;function Ao(e){return typeof e=="object"&&e!==null}function Bt(e){if(!(!Ao(e)||typeof e.code!="string"))return e.code}function qt(e){return e===""||e.toLowerCase()==="localhost"}function To(e){try{let o=decodeURIComponent(e);return o.includes("\0")?null:o}catch{return null}}function zt(e){let o=To(e);if(o===null)return null;let t=[];for(let n of o.split(/[/\\]/))if(!(n===""||n===".")){if(n===".."){if(t.length===0)return null;t.pop();continue}t.push(n);}return `/${t.join("/")}`}function jt(e){let o=zt(e);return o===null?null:o.endsWith("/")?o:`${o}/`}function Lo(e){return e==="/"||/^\/[A-Za-z]:\/$/.test(e)}function Po(e){let o;try{o=typeof e=="string"?new URL(e):new URL("href"in e?e.href:String(e));}catch{throw new TypeError("trustedRoot must be an absolute file: URL")}if(o.protocol!=="file:")throw new TypeError("trustedRoot must use the file: protocol");if(o.username!==""||o.password!=="")throw new TypeError("trustedRoot must not include credentials");if(!qt(o.host))throw new TypeError("trustedRoot must be a local file: URL");let t=jt(o.pathname);if(t===null||Lo(t))throw new TypeError("trustedRoot must be a directory inside the filesystem");let n=new URL("file:///");return n.pathname=t,n}function Do(e){if(typeof e=="string")return [e];if(typeof e=="object"&&e!==null&&"href"in e)return [e];if(Array.isArray(e))return e;throw new TypeError("trustedRoot must be an absolute file: URL")}function ko(e){let o=Do(e);if(o.length===0)throw new TypeError("trustedRoot must name at least one directory");if(o.length>Mt)throw new TypeError(`trustedRoot must not exceed ${Mt} directories`);return o.map(Po)}function Io(e){if(!Number.isSafeInteger(e)||e<=0)throw new TypeError("maxBytes must be a positive safe integer");if(e>a)throw new TypeError(`maxBytes must not exceed ${a}`);return e}function _o(e,o){if(e.protocol!=="file:"||e.username!==""||e.password!==""||!qt(e.host))return null;let t=zt(e.pathname);if(t===null)return null;for(let n of o){let i=jt(n.pathname);if(i===null||!t.startsWith(i)||t.length<=i.length)continue;let r=new URL("file:///");return r.pathname=t,r}return null}function No(e){return typeof e=="string"?new URL(e):"href"in e&&typeof e.href=="string"?new URL(e.href):new URL("url"in e?e.url:String(e))}function Mo(e,o,t){let n=t.relative(t.resolve(e),t.resolve(o));return n!==""&&!n.startsWith("..")&&!t.isAbsolute(n)}function Ct(e,o,t){return e.some(n=>Mo(n,o,t))}async function Co(e,o){let t=[];for(let n of e)try{t.push(await o(n));}catch(i){if(Bt(i)==="ENOENT")continue;throw i}return t}function Uo(e){return async(o,{signal:t,maxBytes:n})=>{if(t?.aborted)throw t.reason;let[{open:i,realpath:r},{constants:s},{fileURLToPath:a},p]=await Promise.all([import('fs/promises'),import('fs'),import('url'),import('path')]),d=e.map(h=>p.resolve(a(h.href))),u=p.resolve(a(typeof o=="string"?o:o.href));if(!Ct(d,u,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let m=typeof s.O_NOFOLLOW=="number"?s.O_RDONLY|s.O_NOFOLLOW:"r",l=await i(u,m),c=()=>{l.close();};t?.addEventListener("abort",c,{once:true});try{if(t?.aborted)throw t.reason;let h=await r(u);if(!Ct(await Co(d,r),h,p))throw Object.assign(new Error("packaged file is outside trustedRoot"),{code:"ENOENT"});let E=(await l.stat()).size;if(!Number.isSafeInteger(E)||E<0||E>n)throw Object.assign(new Error("packaged file exceeds maxBytes"),{code:Ut});let R=new Uint8Array(E),f=0;for(;f<R.byteLength;){if(t?.aborted)throw t.reason;let{bytesRead:g}=await l.read(R,f,R.byteLength-f,f);if(g===0)break;f+=g;}if(t?.aborted)throw t.reason;return f===R.byteLength?R:R.slice(0,f)}catch(h){throw t?.aborted?t.reason:h}finally{t?.removeEventListener("abort",c),await l.close().catch(()=>{});}}}function Bo(e){if(e===null||typeof e!="object")throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");if(e.trustedRoot===void 0||e.maxBytes===void 0)throw new TypeError("createPackagedFileFetch requires trustedRoot and maxBytes");let o=ko(e.trustedRoot),t=Io(e.maxBytes),n=e.read??Uo(o),i=e.networkFetch??fetch;return(async(r,s)=>{let a=s?.signal;if(a?.aborted)throw a.reason;let p=No(r);if(p.protocol!=="file:")return i(p,s);let d=_o(p,o);if(!d)return new Response(null,{status:404});let u=a?new AbortController:void 0,m=()=>u?.abort(a?.reason);a?.addEventListener("abort",m,{once:true});let l;try{if(l=await n(d,{maxBytes:t,...u?{signal:u.signal}:{}}),a?.aborted)throw a.reason;if(l.byteLength>t)return new Response(null,{status:413})}catch(c){if(a?.aborted)throw a.reason;if(u?.signal.aborted)throw u.signal.reason??c;if(c instanceof DOMException&&c.name==="AbortError"||c instanceof Error&&c.name==="AbortError")throw c;let h=Bt(c);if(h===Ut)return new Response(null,{status:413});if(h==="ENOENT"||h==="ENOTDIR"||h==="ELOOP")return new Response(null,{status:404});throw c}finally{a?.removeEventListener("abort",m);}return new Response(l,{status:200})})}
|
|
2
|
+
export{le as MAX_SHARED_EXPORT_SHAPING_CONFIGURATIONS,lo as acquireSharedExportShaping,Bo as createPackagedFileFetch,te as hasExportAdmittedFont,ie as hasExportLaidOutText,fo as hasFontBackedExportCapabilities,ho as openFontBackedDocumentForExport};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as FontFaceRequest, Z as FontConfiguration, a0 as FontSource, a1 as FontSourceSubstitution } from './editor-B2ShlO23.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* A partial font configuration one origin contributes: sources, substitutions, or both.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HeaderFooterParts, a as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-
|
|
2
|
-
import { Q as OoxmlPackage, O as OoxmlPart,
|
|
1
|
+
import { H as HeaderFooterParts, a as HeaderFooterSectionResolution, T as TreePackageStore } from './tree-package-store-B8l8DX3Z.js';
|
|
2
|
+
import { Q as OoxmlPackage, O as OoxmlPart, ap as OoxmlElement, as as OoxmlPackageRejection } from './types-barrel-CkF2JbU4.js';
|
|
3
3
|
|
|
4
4
|
/** The package with a hyperlink relationship guaranteed present, and that relationship's id. */
|
|
5
5
|
interface EnsuredHyperlinkRelationship {
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkFDAKJ2SJ_cjs=require('./chunk-FDAKJ2SJ.cjs');require('./chunk-V3N4SOAK.cjs'),require('./chunk-XMJKFURD.cjs');var chunkMOYYRVFV_cjs=require('./chunk-MOYYRVFV.cjs');require('./chunk-5JPIEN54.cjs');var chunkYQWMI6J5_cjs=require('./chunk-YQWMI6J5.cjs');require('./chunk-HC6YNKUI.cjs'),require('./chunk-DBOOTED4.cjs'),require('./chunk-EOTAXOJY.cjs'),require('./chunk-XSTGE3NI.cjs'),require('./chunk-5SO5QDMV.cjs'),require('./chunk-IBRBNT37.cjs'),require('./chunk-243W4WW2.cjs'),require('./chunk-BTQKU64Q.cjs'),require('./chunk-6IDOVU6L.cjs'),require('./chunk-WO4V6PNS.cjs'),require('./chunk-UKVVUHZL.cjs');var P=1;var O={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function T(){return Object.keys(O)}Object.defineProperty(exports,"CHROME_GROUPS",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.kb}});Object.defineProperty(exports,"CHROME_MENUS",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.ob}});Object.defineProperty(exports,"ChromeExportError",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Pc}});Object.defineProperty(exports,"ChromePrintError",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Rc}});Object.defineProperty(exports,"bindHistoryGroup",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Cc}});Object.defineProperty(exports,"blankDocumentBytes",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.g}});Object.defineProperty(exports,"chromeMenuSlots",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.pb}});Object.defineProperty(exports,"commandForSlot",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ea}});Object.defineProperty(exports,"commandForSlotValue",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ga}});Object.defineProperty(exports,"createDocxEditor",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs._b}});Object.defineProperty(exports,"createFontSource",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.B}});Object.defineProperty(exports,"customFonts",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.C}});Object.defineProperty(exports,"diagnosticCodeOfRefusal",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Nb}});Object.defineProperty(exports,"isChromePrintShortcut",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Sc}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.A}});Object.defineProperty(exports,"runChromeExport",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Qc}});Object.defineProperty(exports,"runChromePrint",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Tc}});Object.defineProperty(exports,"runToolbarCommand",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ma}});Object.defineProperty(exports,"toolbarCommandState",{enumerable:true,get:function(){return chunkFDAKJ2SJ_cjs.Ia}});Object.defineProperty(exports,"DEFAULT_FONT",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.d}});Object.defineProperty(exports,"FONT_RESOLVER_BRAND",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.i}});Object.defineProperty(exports,"FONT_RESOLVER_MARK_KEY",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.h}});Object.defineProperty(exports,"WORD_DEFAULT_FONT",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.e}});Object.defineProperty(exports,"composeFontConfiguration",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.f}});Object.defineProperty(exports,"composeFontOrigins",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.n}});Object.defineProperty(exports,"defineFontResolver",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.j}});Object.defineProperty(exports,"isFontResolver",{enumerable:true,get:function(){return chunkMOYYRVFV_cjs.k}});Object.defineProperty(exports,"diagnosticCauses",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.y}});Object.defineProperty(exports,"diagnosticCodes",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.r}});Object.defineProperty(exports,"explainDiagnostic",{enumerable:true,get:function(){return chunkYQWMI6J5_cjs.q}});exports.DIAGNOSTIC_SCHEMA_VERSION=P;exports.diagnosticCommands=T;
|
package/dist/index.d.ts
CHANGED
|
@@ -24,36 +24,35 @@
|
|
|
24
24
|
* @packageDocumentation
|
|
25
25
|
* @public
|
|
26
26
|
*/
|
|
27
|
-
import { x as ExecErrorCode } from './types-barrel-
|
|
28
|
-
export { B as Block, r as ColorValue, C as CommentRecord, m as ContainerRef, s as ContentControl, n as ContentControlFilter, i as ContentControlType, t as DocAnchor, u as DocAnchorRange, q as DocComment, v as DocLocation, o as DocRange, j as DocTarget, w as DocumentBody, D as DocxDocument, W as DocxDocumentJSON, X as DrawingHorizontalReferenceFrame, Y as DrawingKind, Z as DrawingLocks, _ as DrawingPositionInput, $ as DrawingVerticalReferenceFrame, E as ExecResult, l as Extent, a0 as FontDefinition, H as HeaderFooterSet, a1 as ImageWrapTarget, y as IndentFormatting, I as InsertableContentControlType,
|
|
29
|
-
export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-
|
|
30
|
-
export {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, C as CanResult, e as ClearAnchorHighlightOptions, f as CollaborationParticipantsDiagnostic, g as CollaborationStatusDiagnostic, h as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, i as DiagnosticBase, j as DiagnosticFailureDetail, k as DocumentChange, l as DocumentEditingMode, m as DocumentHandle, n as DocumentOpenDiagnostic, o as DocumentSaveDiagnostic, p as DocumentShape, q as DocumentSource, r as EditRejectedDiagnostic, s as EditRejectionOrigin, t as Editor, u as EditorAnchorNavigation, v as EditorCommandShape, w as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, x as EditorError, y as EditorEvents, z as EditorFontError, B as EditorFontErrorCode, F as EditorFormatPainterCommands, G as EditorHeaderFooterCommands, H as EditorHighlights, I as EditorNoteCommands, J as EditorPosition, K as EditorQueries, L as EditorQuery, M as EditorQueryResults, N as EditorReviewHits, O as EditorSelection, P as EditorSnapshot, Q as FontConfiguration, S as FontFaceRequest, T as FontFailedDiagnostic, U as FontSource, V as FontSourceSubstitution, W as FormatPainterLevel, X as FormatPainterMode, Y as FormatPainterSurfaceState, Z as FurnitureVariant, _ as HeaderFooterSlotArgs, $ as HeaderFooterState, a0 as HighlightHit, a1 as HighlightOptions, a2 as HighlightRange, a3 as HighlightRect, a4 as HighlightResult, a5 as HistoryDiagnosticEvent, a6 as HyperlinkInfo, a7 as ImageContext, a8 as ImageCropPercent, a9 as NoteKind, aa as NotePropertiesSide, ab as NotePropertiesState, ac as PageSetup, ad as PerformanceDiagnostic, ae as ResolveReviewChangesOptions, af as ResolvedNoteNumbering, ag as ReviewActivationOptions, ah as ReviewChangesAttribution, ai as ReviewCommentPlacement, aj as ReviewCustomPlacement, ak as ReviewItemHit, al as ReviewItemPlacement, am as ReviewItemPlacementBase, an as ReviewItemQuery, ao as ReviewItemRevealEvent, ap as ReviewItemRevealSource, aq as ReviewRevisionPlacement, ar as ReviewSkippedDiagnostic, as as ScrollPlacement, at as ScrollToAnchorOptions, au as SelectedImageState, av as SessionActivity, aw as SessionDiagnostic, ax as SetReviewChangesAuthorOptions, ay as TableBorderEdgeTarget, az as TableBorderSpec, aA as TableBorderStyle, aB as TableBorderTarget, aC as TableCellVerticalAlignment, aD as TableColumnDividerResizeTarget, aE as TableColumnOccurrenceTarget, aF as TableContext, aG as TableRightEdgeResizeTarget, aH as TableRowOccurrenceTarget, aI as TextMatch, aJ as TimingSummary, aK as TrackedChangeFilterMode, aL as TrackedChangePredicate, aM as ZoomFitTarget, aN as ZoomMode } from './editor-DaEJd2so.js';
|
|
27
|
+
import { x as ExecErrorCode } from './types-barrel-CkF2JbU4.js';
|
|
28
|
+
export { B as Block, r as ColorValue, C as CommentRecord, m as ContainerRef, s as ContentControl, n as ContentControlFilter, i as ContentControlType, t as DocAnchor, u as DocAnchorRange, q as DocComment, v as DocLocation, o as DocRange, j as DocTarget, w as DocumentBody, D as DocxDocument, W as DocxDocumentJSON, X as DrawingHorizontalReferenceFrame, Y as DrawingKind, Z as DrawingLocks, _ as DrawingPositionInput, $ as DrawingVerticalReferenceFrame, E as ExecResult, l as Extent, a0 as FontDefinition, H as HeaderFooterSet, a1 as ImageResourceState, a2 as ImageWrapTarget, y as IndentFormatting, I as InsertableContentControlType, a3 as NumberingRef, a4 as PageMargins, P as Paragraph, a5 as ParagraphDisagreements, z as ParagraphFlags, a6 as ParagraphFormatCommand, A as ParagraphTabStop, a7 as Point, a8 as PreservedImageMime, a9 as Rect, aa as RenderableImageMime, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, p as Revision, h as RevisionAddress, ab as RevisionAuthorResult, ac as RevisionBatchResult, F as RevisionType, ad as Run, k as RunFormatting, G as Section, J as SectionProperties, ae as SelectionPin, K as StyleDefinition, S as StyleDefinitions, af as SupportedImageMime, T as Table, ag as TableCell, ah as TableRow, L as Theme, M as ThemeColorScheme, ai as Unsubscribe, aj as ValidatedImageBytesHandle, ak as VectorImageMime, al as Watermark, am as WatermarkLayout, an as WatermarkState } from './types-barrel-CkF2JbU4.js';
|
|
29
|
+
export { C as ContentLockPolicy, F as FieldResultsMode } from './tree-package-store-B8l8DX3Z.js';
|
|
30
|
+
export { D as DocumentProtectionEdit, a as DocumentProtectionState } from './document-protection-C8x3P2J6.js';
|
|
31
|
+
import { b as EditorCommand } from './editor-B2ShlO23.js';
|
|
32
|
+
export { A as AnchorHighlightAnimation, c as AnchorHighlightOptions, d as AuthoredNoteNumbering, B as BookmarkPlace, e as BookmarkStory, f as BookmarkSummary, C as CanResult, g as ClearAnchorHighlightOptions, h as CollaborationParticipantsDiagnostic, i as CollaborationStatusDiagnostic, j as CustomNodeDiagnosticEvent, D as DIAGNOSTIC_SCHEMA_VERSION, k as DiagnosticBase, l as DiagnosticFailureDetail, m as DocumentChange, n as DocumentEditingMode, o as DocumentHandle, p as DocumentOpenDiagnostic, q as DocumentOpenFailure, r as DocumentOpenFailureReason, s as DocumentSaveDiagnostic, t as DocumentShape, u as DocumentSource, v as EditRejectedDiagnostic, w as EditRejectionOrigin, x as Editor, y as EditorAnchorNavigation, z as EditorBookmarkCommands, F as EditorCommandShape, G as EditorCommands, E as EditorDiagnostic, a as EditorDiagnosticKind, H as EditorError, I as EditorEvents, J as EditorFontError, K as EditorFontErrorCode, L as EditorFormatPainterCommands, M as EditorHeaderFooterCommands, N as EditorHighlights, O as EditorHostChange, P as EditorHostDocument, Q as EditorNoteCommands, S as EditorPosition, T as EditorQueries, U as EditorQuery, V as EditorQueryResults, W as EditorReviewHits, X as EditorSelection, Y as EditorSnapshot, Z as FontConfiguration, _ as FontFaceRequest, $ as FontFailedDiagnostic, a0 as FontSource, a1 as FontSourceSubstitution, a2 as FormatPainterLevel, a3 as FormatPainterMode, a4 as FormatPainterSurfaceState, a5 as FurnitureVariant, a6 as HeaderFooterSlotArgs, a7 as HeaderFooterState, a8 as HighlightHit, a9 as HighlightOptions, aa as HighlightRange, ab as HighlightRect, ac as HighlightResult, ad as HistoryDiagnosticEvent, ae as HyperlinkInfo, af as ImageContext, ag as ImageCropPercent, ah as NoteKind, ai as NotePropertiesSide, aj as NotePropertiesState, ak as PageSetup, al as PerformanceDiagnostic, am as ResolveReviewChangesOptions, an as ResolvedNoteNumbering, ao as ReviewActivationOptions, ap as ReviewChangesAttribution, aq as ReviewCommentPlacement, ar as ReviewCustomPlacement, as as ReviewItemHit, at as ReviewItemPlacement, au as ReviewItemPlacementBase, av as ReviewItemQuery, aw as ReviewItemRevealEvent, ax as ReviewItemRevealSource, ay as ReviewRevisionPlacement, az as ReviewSkippedDiagnostic, aA as ScrollPlacement, aB as ScrollToAnchorOptions, aC as SelectedImageState, aD as SessionActivity, aE as SessionDiagnostic, aF as SetReviewChangesAuthorOptions, aG as TableBorderEdgeTarget, aH as TableBorderSpec, aI as TableBorderStyle, aJ as TableBorderTarget, aK as TableCellVerticalAlignment, aL as TableColumnDividerResizeTarget, aM as TableColumnOccurrenceTarget, aN as TableContext, aO as TableRightEdgeResizeTarget, aP as TableRowOccurrenceTarget, aQ as TextMatch, aR as TimingSummary, aS as TrackedChangeFilterMode, aT as TrackedChangePredicate, aU as ZoomFitTarget, aV as ZoomMode } from './editor-B2ShlO23.js';
|
|
34
33
|
export { CollectReviewItems, EditorModule, ReviewModuleContribution } from './contracts/modules.js';
|
|
35
34
|
export { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
36
|
-
export { a as ReviewDisplayMode, b as RevisionDisplayMode } from './semantic-records-
|
|
37
|
-
export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-
|
|
38
|
-
export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-
|
|
39
|
-
export { C as CHROME_GROUPS,
|
|
35
|
+
export { a as ReviewDisplayMode, b as RevisionDisplayMode } from './semantic-records-B-akgRch.js';
|
|
36
|
+
export { S as SemanticPosition, a as SemanticSelection } from './semantic-interaction-dApRIYpt.js';
|
|
37
|
+
export { C as ComposeFontOriginsOptions, D as DEFAULT_FONT, F as FONT_RESOLVER_BRAND, a as FONT_RESOLVER_MARK_KEY, b as FontConfigurationBase, c as FontConfigurationFragment, d as FontOrigin, e as FontOriginFailure, f as FontResolutionRequest, g as FontResolver, h as FontResolverMark, M as MarkedFontResolver, W as WORD_DEFAULT_FONT, i as composeFontConfiguration, j as composeFontOrigins, k as defineFontResolver, l as isFontResolver } from './font-resolver-CWh40DYp.js';
|
|
38
|
+
export { B as BookmarkMarkInfo, a as BookmarkMarkOptions, C as CHROME_GROUPS, b as CHROME_MENUS, c as ChromeExportError, d as ChromeExportFormat, e as ChromeExportHandlers, f as ChromeExportResult, g as ChromeMenu, h as ChromeMenuEntry, i as ChromeMenuId, j as ChromeMenuItemEntry, k as ChromeMenuSeparatorEntry, l as ChromeMenuSubmenuEntry, m as ChromePrintError, n as ChromePrintErrorCode, o as ChromePrintJob, p as ChromePrintOptions, q as ChromeSlotId, r as CommentDraftChromeHandlers, s as CustomFontsOptions, t as CustomFontsResolver, D as DocxEditorConfig, u as DocxEditorInstance, F as FontLoadFailure, v as FontLoadFailureReason, w as FontMeasurementState, x as FontUrlSource, G as GoToChromeHandlers, H as HistoryGroupBinding, y as HistoryGroupBindingOptions, z as HyperlinkActivation, A as HyperlinkChromeHandlers, L as LoadFontsRequest, E as LoadFontsResult, I as LockedControlNavigation, S as SurfaceHyperlink, T as ToolbarCommandState, J as bindHistoryGroup, K as blankDocumentBytes, M as chromeMenuSlots, N as commandForSlot, O as commandForSlotValue, P as createDocxEditor, Q as createFontSource, R as customFonts, U as isChromePrintShortcut, V as loadFonts, W as runChromeExport, X as runChromePrint, Y as runToolbarCommand, Z as toolbarCommandState } from './chrome-print-BWvaVEhD.js';
|
|
40
39
|
export { ApplyResult, ContentControlSummary, DocEdit, DocEdits, DocQueries, DocQuery, DocQueryResults, ParagraphSummary } from './contracts/document.js';
|
|
41
|
-
import { E as EditDiagnosticCode } from './diagnostic-hints-
|
|
42
|
-
export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, b as CountBucket, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, f as DocumentOpenDiagnosticCode, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, j as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-
|
|
43
|
-
export { d as diagnosticCauses } from './diagnostic-context-
|
|
44
|
-
export { a as EditorExecOptions, E as EditorScope, H as HistoryDiagnostic, b as HistoryGroup, c as HistoryGroupOutcome, V as ViewScope } from './editor-scope-
|
|
40
|
+
import { E as EditDiagnosticCode } from './diagnostic-hints-C9JlLz1L.js';
|
|
41
|
+
export { B as ByteSizeBucket, C as CollaborationDiagnosticCode, b as CountBucket, c as CustomNodeDiagnosticCode, d as DiagnosticCode, D as DiagnosticErrorName, e as DiagnosticExplanation, f as DocumentOpenDiagnosticCode, a as DocumentPartKind, g as DocumentSaveDiagnosticCode, F as FailureStage, h as FontDiagnosticCode, i as FormattingChangeKind, H as HistoryDiagnosticCode, P as PerformanceDiagnosticCode, R as ReviewChangeKind, j as ReviewDiagnosticCode, k as ReviewOperation, l as diagnosticCodes, m as explainDiagnostic } from './diagnostic-hints-C9JlLz1L.js';
|
|
42
|
+
export { d as diagnosticCauses } from './diagnostic-context-DJ0P1uZE.js';
|
|
43
|
+
export { a as EditorExecOptions, E as EditorScope, H as HistoryDiagnostic, b as HistoryGroup, c as HistoryGroupOptions, d as HistoryGroupOutcome, V as ViewScope } from './editor-scope-C7ke1KJG.js';
|
|
45
44
|
export { InteractionAffinity, InteractionOutcome, InteractionOutcomeCode, SemanticIdentity, SemanticTarget } from './contracts/interaction.js';
|
|
46
45
|
import './failure-NS2lsya4.js';
|
|
47
46
|
import './collaboration.js';
|
|
48
47
|
import './collaboration/replication.js';
|
|
49
|
-
import './omml-equation-
|
|
50
|
-
import './semantic-paint-
|
|
51
|
-
import './semantic-record-queries-
|
|
52
|
-
import './note-properties-
|
|
53
|
-
import './custom-node-writes-
|
|
54
|
-
import './semantic-cell-selection-
|
|
55
|
-
import './tree-session-contract-
|
|
56
|
-
import './headless-document-view-
|
|
48
|
+
import './omml-equation-BsLAa2lX.js';
|
|
49
|
+
import './semantic-paint-DLzA8sjP.js';
|
|
50
|
+
import './semantic-record-queries-3yp9o11g.js';
|
|
51
|
+
import './note-properties-QsKh24sM.js';
|
|
52
|
+
import './custom-node-writes-TeUvMP13.js';
|
|
53
|
+
import './semantic-cell-selection-Cub9FDa8.js';
|
|
54
|
+
import './tree-session-contract-DeLRqohz.js';
|
|
55
|
+
import './headless-document-view-qOpaCF82.js';
|
|
57
56
|
import 'prosemirror-model';
|
|
58
57
|
|
|
59
58
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{kb as CHROME_GROUPS,ob as CHROME_MENUS,Pc as ChromeExportError,Rc as ChromePrintError,Cc as bindHistoryGroup,g as blankDocumentBytes,pb as chromeMenuSlots,Ea as commandForSlot,Ga as commandForSlotValue,_b as createDocxEditor,B as createFontSource,C as customFonts,Nb as diagnosticCodeOfRefusal,Sc as isChromePrintShortcut,A as loadFonts,Qc as runChromeExport,Tc as runChromePrint,Ma as runToolbarCommand,Ia as toolbarCommandState}from'./chunk-IVIN7X43.js';import'./chunk-4HENIAFG.js';import'./chunk-LZY6B6IV.js';export{d as DEFAULT_FONT,i as FONT_RESOLVER_BRAND,h as FONT_RESOLVER_MARK_KEY,e as WORD_DEFAULT_FONT,f as composeFontConfiguration,n as composeFontOrigins,j as defineFontResolver,k as isFontResolver}from'./chunk-HZ66UCIS.js';import'./chunk-FNNOJNGY.js';import'./chunk-RIYSCEFQ.js';export{y as diagnosticCauses,r as diagnosticCodes,q as explainDiagnostic}from'./chunk-R2XINWVE.js';import'./chunk-SUEXVBPR.js';import'./chunk-4S24UOPG.js';import'./chunk-FT33HRZP.js';import'./chunk-2E2RPEKX.js';import'./chunk-ZCJS7D7S.js';import'./chunk-VWIJKH4A.js';import'./chunk-Q5K2GGNG.js';import'./chunk-6JIJOZDW.js';import'./chunk-N6B3BXCL.js';import'./chunk-T2QQHG5C.js';import'./chunk-S6J4O5XP.js';var P=1;var O={acceptAllRevisions:true,acceptRevision:true,addComment:true,addRepeatingSectionItem:true,adjustIndent:true,applyFormatting:true,applyVariables:true,clearFormatting:true,commitTableColumnDividerResize:true,commitTableRightEdgeResize:true,convertAllNotes:true,convertNote:true,copy:true,copyFormatting:true,cut:true,deleteBookmark:true,deleteColumn:true,deleteImage:true,deleteNote:true,deleteRow:true,deleteTable:true,deleteText:true,editHeaderFooter:true,editTextFormField:true,exitHeaderFooter:true,insertBreak:true,goToBookmark:true,keepFirstBookmark:true,insertBookmark:true,insertColumn:true,insertContentControl:true,insertHyperlink:true,insertImage:true,insertNote:true,insertPageField:true,insertRow:true,insertTable:true,insertText:true,insertTextBox:true,insertToc:true,linkHeaderFooterToPrevious:true,mergeCells:true,mergeParagraphs:true,navigateReviewChange:true,openBookmarkDialog:true,openGoTo:true,openRevisionMarkupDialog:true,paste:true,pasteFormatting:true,pasteWithoutFormatting:true,proposeDeletion:true,proposeInsertion:true,proposeReplacement:true,redo:true,refreshToc:true,rejectAllRevisions:true,rejectRevision:true,removeContentControl:true,removeHeaderFooter:true,removeHyperlink:true,removeRepeatingSectionItem:true,removeTabMark:true,replaceAllMatches:true,replaceImage:true,replaceMatch:true,replaceText:true,replyComment:true,resolveAllReviewChanges:true,resolveComment:true,selectAll:true,selectTableRegion:true,setAlignment:true,setCellFill:true,setContentControlValue:true,setEditingMode:true,setHeaderFooterOptions:true,setImagePosition:true,setImageProperties:true,setImageWrapType:true,setIndent:true,setLineSpacing:true,setMarkAttr:true,setNoteProperties:true,setPageSetup:true,setParagraphDirection:true,setParagraphFormat:true,setParagraphSpacing:true,setParagraphStyle:true,setReviewChangesAuthor:true,setReviewDisplayMode:true,setSelection:true,setTableBorders:true,setTableCellVerticalAlignment:true,setTableProperties:true,setVariable:true,setWatermark:true,splitCell:true,splitParagraph:true,toggleDocumentProtection:true,toggleHeaderRow:true,toggleList:true,toggleBookmarks:true,toggleMark:true,toggleParagraphMarks:true,toggleReviewPane:true,transformImage:true,undo:true,unlinkHeaderFooterFromPrevious:true};function T(){return Object.keys(O)}export{P as DIAGNOSTIC_SCHEMA_VERSION,T as diagnosticCommands};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as ShapingEnvironmentInput, k as TextShaper, l as ResolvedRunStyle, m as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, n as NormalizationPolicy, o as FixedPointRoundingMode, p as FontRequest } from './semantic-records-
|
|
1
|
+
import { j as ShapingEnvironmentInput, k as TextShaper, l as ResolvedRunStyle, m as ResolvedFont, T as TextMeasurer, F as FontResourceSnapshot, V as VersionedShapingLibrary, n as NormalizationPolicy, o as FixedPointRoundingMode, p as FontRequest } from './semantic-records-B-akgRch.js';
|
|
2
2
|
import { F as FontShapingOptions } from './font-shaping-policy-BvpkrfxM.js';
|
|
3
3
|
|
|
4
4
|
/** Immutable per-operation environment. Configuration, extension, shaping, and producer changes are
|