oasis-editor 0.0.223 → 0.0.224

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.
@@ -1 +1 @@
1
- import{A as e,Ar as t,B as o,Ba as r,C as n,Cr as i,D as s,Dr as a,E as l,Er as c,F as d,Fa as u,G as g,Gi as p,H as f,Hr as m,I as v,Ia as b,J as h,Jr as y,K as k,Ka as x,L as C,M as S,N as R,O as w,Or as P,P as T,Pa as _,Qi as B,Qt as I,R as L,Ra as F,Rr as D,S as $,Sr as A,T as E,Tr as M,Ur as O,V as j,Va as H,Vr as N,W as z,Wa as q,Y as J,Ya as W,Za as K,_ as X,_r as G,ao as U,br as V,co as Y,di as Q,eo as Z,fi as ee,gi as te,hi as oe,ii as re,j as ne,jr as ie,k as se,kr as ae,li as le,lo as ce,mi as de,oo as ue,pi as ge,q as pe,qr as fe,t as me,to as ve,ui as be,uo as he,v as ye,vr as ke,vt as xe,w as Ce,wr as Se,x as Re,yr as we,yt as Pe,z as Te,zr as _e}from"./defaultToolbar-Cow2Hv4N.js";function Be(e={}){const t=r(()=>e.ui?.locale??"pt-BR"),[o,n]=U(0),[i,s]=U(null),a=()=>{const t=e.ui?.loading;return"object"==typeof t&&null!==t?t:void 0};return ce(()=>{const e=performance.now();let t=!1;const o=()=>{if(t)return;const r=performance.now()-e;n(.9*(1-Math.exp(-r/5e3))),requestAnimationFrame(o)};requestAnimationFrame(o),Y(()=>{t=!0}),import("./OasisEditorApp-BOAA5LnD.js").then(e=>{t=!0,n(1),setTimeout(()=>s(()=>e.OasisEditorApp),180)}).catch(()=>{t=!0})}),ve(F,{translator:t,get children(){return ve(Z,{get when(){return i()},get fallback(){return ve(b,{variant:"fill",get progress(){return o()},get label(){return a()?.label},get class(){return a()?.class},get style(){return a()?.style}})},children:t=>{const o=t();return ve(o,e)}})}})}function Ie(e,t={}){const o=fe(),r=x(()=>Be({...t,runtime:{...t.runtime,client:o}}),e);return o.setDispose(()=>{r(),e.innerHTML=""}),o}function Le(e){return ve(Be,ue(e,{get ui(){return{...e.ui,showChrome:!1}}}))}function Fe(e,t={}){const o=fe(),r=x(()=>Le({...t,runtime:{...t.runtime,client:o}}),e);return o.setDispose(()=>{r(),e.innerHTML=""}),o}function De(e){return{execute(t,o){const r=u(t,o);return e.commands.execute(r.name,r.payload)},canExecute(t,o){const r=u(t,o);return e.commands.canExecute(r.name,r.payload)},state(t){const o=u(t);return e.commands.state(o.name,o.payload)}}}var $e=["selectAll","insertFootnote","insertText","insertEquation","updateEquation","insertTableOfContents","updateTableOfContents","pastePlainText","paste","pasteAsPlainText","pasteMergeFormatting","formatPainter","formatPainterContinuous","cancelFormatPainter","bold","italic","underline","strike","superscript","subscript","link","unlink","alignLeft","alignCenter","alignRight","alignJustify","orderedList","bulletList","find","replace","toggleTrackChanges","acceptRevisions","rejectRevisions","nextRevision","previousRevision","nextComment","previousComment","newComment","replyComment","editComment","toggleCommentsPanel","resolveComment","reopenComment","deleteComment","toggleShowMargins","toggleShowParagraphMarks","togglePreciseFonts","undo","redo","pageBreak","lineBreak","columnBreak","splitBlock","setFontFamily","setFontSize","increaseFontSize","decreaseFontSize","changeTextCase","clearFormatting","setColor","setHighlight","setTextShading","setStyleId","setCharacterStyleId","setUnderlineStyle","documentStyles","print","copy","cut","newDocument","exportDocx","exportPdf","importDocument","insertHtml","insertImage","editImageAlt","insertImageCaption","imageContext","imageWidthCm","imageHeightCm","imageCrop","imageCropAspect","imageCropShape","imageCropFill","imageCropFit","imageCropReset","imageBorder","outdent","indent","togglePageBreakBefore","toggleKeepWithNext","setSpacingAfter","setSpacingBefore","setIndentLeft","setIndentRight","setIndentFirstLine","setIndentHanging","setSpecialIndent","setParagraphShading","applyParagraphBorders","setLineHeight","setListFormat","setListStartAt","toggleOrientation","setOrientation","sectionBreakNextPage","sectionBreakContinuous","sectionBreakEvenPage","sectionBreakOddPage","sectionBreakNextColumn","setPageMargins","setSectionPageNumbering","setPaperSize","setPaperSizePreset","setColumns","setColumnsPreset","editHeader","editFooter","editFirstPageHeader","editEvenPageHeader","editFirstPageFooter","editEvenPageFooter","insertPageNumber","insertPageNumberXOfY","placePageNumberTop","placePageNumberBottom","insertBookmark","removeBookmark","insertDateField","insertCrossReference","exitHeaderFooter","applyDocumentTheme","setDocumentColorScheme","setDocumentFontScheme","setDocumentParagraphSpacing","setDocumentEffects","setDocumentPageColor","setDocumentWatermark","setDocumentPageBorder","setDocumentDesignDefault","tableContext","tableMerge","tableSplit","tableInsertColumnBefore","tableInsertColumnAfter","tableDeleteColumn","tableInsertRowBefore","tableInsertRowAfter","tableDeleteRow","tableCellShading","tableCellBorders","tableCellNoBorders","tableApplyBorderPreset","toggleTableDrawBorders","toggleTableGridlines","tableWidth100","tableAlignLeft","tableAlignCenter","tableAlignRight","tableSetCellWidth","tableToggleHeaderRow","tableToggleTotalRow","tableToggleBandedRows","tableToggleFirstColumn","tableToggleLastColumn","tableToggleBandedColumns","setTableStyle","tableToggleAutoFit","tableDistributeColumns","tableDistributeRows","insertTable","insertShape","openSymbolDialog","openEquationDialog"];function Ae(e,t={}){const o=fe(),r=x(()=>ve(Be,ue(t,{get runtime(){return{...t.runtime,client:o}}})),e);return o.setDispose(()=>{r(),e.innerHTML=""}),Object.assign(o,{unmount:()=>o.dispose()})}function Ee(e){const[t,o]=he(e,["level","class","classList","children"]),r=t.level??2;return ve(H,ue({component:`h${r}`,get class(){return`oasis-editor-ui-heading ${t.class??""}`},get classList(){return{[`oasis-editor-ui-heading-${r}`]:!0,...t.classList}}},o,{get children(){return t.children}}))}var Me=/*#__PURE__*/K("<div>");function Oe(e){const[t,o]=he(e,["align","wrap","class","classList","children"]);return r=Me(),W(r,ue({get class(){return`oasis-editor-ui-action-row ${t.class??""}`},get classList(){return{[`oasis-editor-ui-action-row-${t.align??"start"}`]:!0,"oasis-editor-ui-action-row-nowrap":!1===t.wrap,...t.classList}}},o),!1,!0),q(r,()=>t.children),r;var r}var je=/*#__PURE__*/K("<div>"),He={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Ne(e){const[t,o]=he(e,["align","class","style","children"]);return r=je(),W(r,ue({get class(){return`oasis-editor-ui-field-row ${t.class??""}`},get style(){return{"align-items":He[t.align??"end"],..."object"==typeof t.style?t.style:{}}}},o),!1,!0),q(r,()=>t.children),r;var r}var ze=/*#__PURE__*/K("<div>");function qe(e){const[t,o]=he(e,["align","class","classList","children"]);return r=ze(),W(r,ue({get class(){return`oasis-editor-ui-dialog-footer ${t.class??""}`},get classList(){return{[`oasis-editor-ui-dialog-footer-${t.align??"end"}`]:!0,...t.classList}}},o),!1,!0),q(r,()=>t.children),r;var r}function Je(e,t){return void 0===e.revisionId||e.revisionId===t}function We(e){e.matched=!0}function Ke(e,t){e.matched=!0,e.changed=!0,e.resolvedRevisionIds.add(t)}function Xe(e,t){e.matched=!0;const o=`${t.kind}:${t.revisionId??""}:${t.path}`;e.unresolvedKeys.has(o)||(e.unresolvedKeys.add(o),e.unresolved.push(t))}function Ge(e){const t=[],o=e=>{for(const r of e)if("paragraph"!==r.type)for(const e of r.rows)for(const t of e.cells)o(t.blocks);else{t.push(r);for(const e of r.runs)"textBox"===e.kind&&o(e.textBox.blocks)}};return o(e),t}function Ue(e){const t=Pe(e);if(t)return delete t.propertyRevision,Object.keys(t).length>0?t:void 0}function Ve(e){const t=xe(e);if(t)return delete t.propertyRevision,Object.keys(t).length>0?t:void 0}function Ye(e,t,o){if(e.revisionRangeMarker&&Je(o,e.revisionRangeMarker.id))return Ke(o,e.revisionRangeMarker.id),null;if(!function(e,t,o){const r=e.revision;return!r||!Je(o,r.id)||(Ke(o,r.id),"accept"===o.action?"insert"===r.type:"delete"===r.type)}(e,0,o))return null;let r=e;e.revision&&Je(o,e.revision.id)&&(r={...r,revision:void 0});const n=function(e,t,o){const r=e?.propertyRevision;return r&&Je(o,r.id)?(Ke(o,r.id),"accept"===o.action?Ue(e):Ue(r.previous)):e}(r.styles,0,o);if(n!==r.styles&&(r={...r,styles:n}),"textBox"===r.kind){const e=rt(r.textBox.blocks,`${t}.textBox.blocks`,o);e!==r.textBox.blocks&&(r={...r,textBox:{...r.textBox,blocks:e}})}return r}function Qe(e,t,o){const r=[],n=[];let i=0,s=0;for(let d=0;d<e.runs.length;d+=1){const a=e.runs[d],l=Ye(a,`${t}.runs[${d}]`,o);if(!l&&"textBox"===a.kind)for(const t of Ge(a.textBox.blocks))o.paragraphRelocations.has(t.id)||o.paragraphRelocations.set(t.id,{paragraphId:e.id,offset:s});const c=a.text.length;n.push({oldStart:i,oldEnd:i+c,newStart:s,kept:null!==l}),i+=c,l&&(r.push(l),s+=l.text.length)}i!==s&&o.paragraphOffsetTransforms.set(e.id,{segments:n,oldLength:i,newLength:s});let a=r.length===e.runs.length&&r.every((t,o)=>t===e.runs[o])?e:{...e,runs:r};const l=function(e,t,o){const r=e?.propertyRevision;return r&&Je(o,r.id)?(Ke(o,r.id),"accept"===o.action?Ve(e):Ve(r.previous)):e}(a.style,0,o);l!==a.style&&(a={...a,style:l});const c=a.numberingRevision;return c&&Je(o,c.id)&&(We(o),"accept"===o.action?(Ke(o,c.id),a={...a,numberingRevision:void 0}):Xe(o,{kind:"numbering-original-unavailable",revisionId:c.id,path:`${t}.numberingRevision`,message:"w:numberingChange only stores the previous rendered-number cache; it cannot reconstruct the previous numId/ilvl safely."})),a}function Ze(e){const t=e.mergeRevisionState;if("vertical"===t?.orientation&&1===t.currentCellCount&&1===t.previousCells.length)return structuredClone(t.previousCells[0]);const o=e.style?.revision;return"merge"===o?.type&&"continue"===o.previous?.vMerge?{...e,blocks:[],rowSpan:void 0,vMerge:"continue",style:e.style?{...e.style,revision:void 0}:e.style,mergeRevisionState:void 0}:void 0}function et(e,t,o){let r=function(e,t,o){const r=e.style?.revision,n=e.mergeRevisionState&&Je(o,e.mergeRevisionState.revisionId);if(r&&Je(o,r.id)){if(We(o),"reject"===o.action&&"merge"===r.type){const n=Ze(e);return n?(Ke(o,r.id),n):(Xe(o,{kind:"cell-merge-original-unavailable",revisionId:r.id,path:t,message:"The previous merge topology lacks an exact semantic snapshot for safe restoration."}),e)}return Ke(o,r.id),{...e,style:e.style?{...e.style,revision:void 0}:e.style,..."merge"===r.type?{mergeRevisionState:void 0}:{}}}if(n){const r=e.mergeRevisionState.revisionId;if(We(o),"accept"===o.action)return Ke(o,r),{...e,mergeRevisionState:void 0};const n=Ze(e);if(n)return Ke(o,r),n;Xe(o,{kind:"cell-merge-original-unavailable",revisionId:r,path:`${t}.mergeRevisionState`,message:"The preserved merge snapshot is not a supported exact vertical-cell restoration."})}return e}(e,t,o);const n=function(e,t,o){const r=e?.propertyRevision;if(!r||!Je(o,r.id))return e;Ke(o,r.id);const n=e.revision?structuredClone(e.revision):void 0,i=structuredClone("accept"===o.action?e:r.previous);return delete i.propertyRevision,n&&(i.revision=n),i}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=rt(r.blocks,`${t}.blocks`,o);return i!==r.blocks&&(r={...r,blocks:i}),r}function tt(e,t,o){let r=function(e,t,o){const r=e.style?.revision;return r&&Je(o,r.id)?(We(o),"reject"===o.action&&"merge"===r.type?(Xe(o,{kind:"cell-merge-original-unavailable",revisionId:r.id,path:t,message:"The original table structure for this merge revision is not reconstructed by the core resolver yet."}),e):(Ke(o,r.id),{...e,style:e.style?{...e.style,revision:void 0}:e.style})):e}(e,t,o);const n=function(e,t,o){const r=e?.propertyRevision;if(!r||!Je(o,r.id))return e;Ke(o,r.id);const n=e.revision?structuredClone(e.revision):void 0,i=structuredClone("accept"===o.action?e:r.previous);return delete i.propertyRevision,n&&(i.revision=n),i}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=r.propertyExceptionsRevision;if(i&&Je(o,i.id))Ke(o,i.id),r={...r,propertyExceptions:"accept"===o.action?r.propertyExceptions:structuredClone(i.previous),propertyExceptionsRevision:void 0,tblPrExChangeXml:void 0};else if(r.tblPrExChangeXml&&!i){const e=(s=r.tblPrExChangeXml,/\bw:id\s*=\s*["']([^"']+)["']/.exec(s)?.[1]);e&&Je(o,e)&&(We(o),"accept"===o.action?(Ke(o,e),r={...r,tblPrExChangeXml:void 0}):Xe(o,{kind:"table-property-exception-original-unavailable",revisionId:e,path:`${t}.tblPrExChangeXml`,message:"The imported w:tblPrExChange has no decodable previous w:tblPrEx snapshot."}))}var s;const a=[];let l=!1;for(let c=0;c<r.cells.length;c+=1){const e=r.cells[c],n=e.style?.revision;if(n&&Je(o,n.id)&&("accept"===o.action&&"delete"===n.type||"reject"===o.action&&"insert"===n.type)){Ke(o,n.id),l=!0;continue}const i=et(e,`${t}.cells[${c}]`,o);a.push(i),i!==e&&(l=!0)}return l&&(r={...r,cells:a}),r}function ot(e,t,o){let r=e;const n=function(e,t,o){const r=e?.revision;if(!r||!Je(o,r.id))return e;Ke(o,r.id);const n=structuredClone("accept"===o.action?e:r.previous);return delete n.revision,n}(r.style,0,o);n!==r.style&&(r={...r,style:n});const i=r.gridRevision;i&&Je(o,i.id)&&(Ke(o,i.id),r="accept"===o.action?{...r,gridRevision:void 0}:{...r,gridCols:[...i.previous],gridRevision:void 0});const s=[];let a=!1;for(let l=0;l<r.rows.length;l+=1){const e=r.rows[l],n=e.style?.revision;if(n&&Je(o,n.id)&&("accept"===o.action&&"delete"===n.type||"reject"===o.action&&"insert"===n.type)){Ke(o,n.id),a=!0;continue}const i=tt(e,`${t}.rows[${l}]`,o);s.push(i),i!==e&&(a=!0)}return a&&(r={...r,rows:s}),a&&(r=function(e){let t=!1;const o=e.rows.map((o,r)=>{let n=!1;const i=o.cells.map((t,o)=>{let i;if("restart"===t.vMerge){i=1;for(let t=r+1;t<e.rows.length;t+=1){const r=e.rows[t].cells[o];if(!r||"continue"!==r.vMerge)break;i+=1}}return t.rowSpan===i?t:(n=!0,{...t,rowSpan:i})});return n?(t=!0,{...o,cells:i}):o});return t?{...e,rows:o}:e}(r),function(e,t,o){const r=Ge([e]),n=Ge([t]),i=new Map(n.map(e=>[e.id,e]));for(let s=0;s<r.length;s+=1){const e=r[s];if(i.has(e.id)||o.paragraphRelocations.has(e.id))continue;let t=null;for(let o=s-1;o>=0;o-=1){const e=i.get(r[o].id);if(e){t={paragraphId:e.id,offset:B(e).length};break}}if(!t)for(let o=s+1;o<r.length;o+=1){const e=i.get(r[o].id);if(e){t={paragraphId:e.id,offset:0};break}}o.paragraphRelocations.set(e.id,t)}}(e,r,o)),r}function rt(e,t,o){let r=!1;const n=e.map((e,n)=>{const i=`${t}[${n}]`,s="paragraph"===e.type?Qe(e,i,o):ot(e,i,o);return s!==e&&(r=!0),s});return r?n:e}var nt=["header","firstPageHeader","evenPageHeader","footer","firstPageFooter","evenPageFooter"];function it(e,t,o){if(!e)return;let r=e.paragraphId,n=e.offset,i=!1;const s=/* @__PURE__ */new Set;for(;o.has(r);){if(s.has(r))return;s.add(r);const e=o.get(r);if(!e)return;r=e.paragraphId,n=e.offset,i=!0}if(!i){const e=t.get(r);e&&(n=function(e,t){const o=Math.max(0,Math.min(t,e.oldLength));for(const r of e.segments)if(!(o>r.oldEnd))return r.kept?r.newStart+Math.max(0,o-r.oldStart):r.newStart;return e.newLength}(e,n))}return r===e.paragraphId&&n===e.offset?e:{...e,paragraphId:r,offset:n}}function st(e,t,o){const r={action:t,revisionId:o,changed:!1,matched:!1,resolvedRevisionIds:/* @__PURE__ */new Set,unresolved:[],unresolvedKeys:/* @__PURE__ */new Set,paragraphOffsetTransforms:/* @__PURE__ */new Map,paragraphRelocations:/* @__PURE__ */new Map},i=p(e).map(n),s={...e,sections:i,footnotes:$(e.footnotes),endnotes:Re(e.endnotes)};return function(e,t){for(let o=0;o<e.length;o+=1){let r=e[o];const n=rt(r.blocks,`sections[${o}].blocks`,t);n!==r.blocks&&(r={...r,blocks:n});for(const e of nt){const n=r[e];if(!n)continue;const i=rt(n,`sections[${o}].${e}`,t);i!==n&&(r={...r,[e]:i})}e[o]=r}}(i,r),function(e,t){if(e.footnotes){for(const[o,r]of Object.entries(e.footnotes.items))r.blocks=rt(r.blocks,`footnotes.items[${JSON.stringify(o)}].blocks`,t);e.footnotes.separator&&(e.footnotes.separator=rt(e.footnotes.separator,"footnotes.separator",t)),e.footnotes.continuationSeparator&&(e.footnotes.continuationSeparator=rt(e.footnotes.continuationSeparator,"footnotes.continuationSeparator",t))}if(e.endnotes){for(const[o,r]of Object.entries(e.endnotes.items))r.blocks=rt(r.blocks,`endnotes.items[${JSON.stringify(o)}].blocks`,t);e.endnotes.separator&&(e.endnotes.separator=rt(e.endnotes.separator,"endnotes.separator",t)),e.endnotes.continuationSeparator&&(e.endnotes.continuationSeparator=rt(e.endnotes.continuationSeparator,"endnotes.continuationSeparator",t))}}(s,r),function(e,t){for(let o=0;o<e.length;o+=1){const r=e[o],n=r.propertyRevision;if(!n||!Je(t,n.id))continue;if(Ke(t,n.id),"accept"===t.action){e[o]={...r,propertyRevision:void 0};continue}const i=structuredClone(n.previous);e[o]={...r,pageSettings:i.pageSettings,pageBorder:i.pageBorder,pageNumbering:i.pageNumbering,verticalAlignment:i.verticalAlignment,bidi:i.bidi,propertyRevision:void 0};const s=e[o+1];s&&(e[o+1]={...s,breakType:i.nextBreakType})}}(i,r),function(e,t,o){if(!e.bookmarks||0===t.size&&0===o.size)return;let r=!1;const n={...e.bookmarks.items},i=[];for(const s of e.bookmarks.order){const a=e.bookmarks.items[s];if(!a)continue;const l=it(a.start,t,o),c=it(a.end,t,o),d=l??(a.start?c:void 0),u=c??(a.end?l:void 0);d||u?(i.push(s),d===a.start&&u===a.end||(n[s]={...a,start:d,end:u},r=!0)):(delete n[s],r=!0)}r&&(e.bookmarks={...e.bookmarks,items:n,order:i})}(s,r.paragraphOffsetTransforms,r.paragraphRelocations),s.comments=function(e,t,o){if(!e||0===t.size&&0===o.size)return e;let r=!1;const n={...e.items},i=[];for(const s of e.order){const a=e.items[s];if(!a)continue;const l=it(a.start,t,o),c=it(a.end,t,o),d=l??(a.start?c:void 0),u=c??(a.end?l:void 0);d||u?(i.push(s),d===a.start&&u===a.end||(n[s]={...a,start:d,end:u},r=!0)):(delete n[s],r=!0)}return r?{...e,items:n,order:i}:e}(s.comments,r.paragraphOffsetTransforms,r.paragraphRelocations),void 0===o||r.matched||r.unresolved.push({kind:"revision-not-found",revisionId:o,path:"document",message:`Tracked revision ${o} was not found in the modeled document.`}),{document:r.changed?s:e,changed:r.changed,complete:0===r.unresolved.length,resolvedRevisionIds:[...r.resolvedRevisionIds],unresolved:r.unresolved}}function at(e,t){return st(e,t)}function lt(e,t,o){return st(e,o,t)}function ct(e,t){return at(e,"final"===t?"accept":"reject")}var dt={newDocument:"editor-toolbar-new-document",importDocument:"editor-toolbar-import-document",exportDocx:"editor-toolbar-export-docx",exportPdf:"editor-toolbar-export-pdf",print:"editor-toolbar-print",undo:"editor-toolbar-undo",redo:"editor-toolbar-redo",style:"editor-toolbar-style",fontFamily:"editor-toolbar-font-family",fontSize:"editor-toolbar-font-size",color:"editor-toolbar-color",highlight:"editor-toolbar-highlight",textShading:"editor-toolbar-text-shading",bold:"editor-toolbar-bold",italic:"editor-toolbar-italic",underlineControl:"editor-toolbar-underline-control",strike:"editor-toolbar-strike",superscript:"editor-toolbar-superscript",subscript:"editor-toolbar-subscript",insertImage:"editor-toolbar-insert-image",insertTable:"editor-toolbar-insert-table",symbols:"editor-toolbar-symbols",link:"editor-toolbar-link",unlink:"editor-toolbar-unlink",footnote:"editor-toolbar-footnote",imageAlt:"editor-toolbar-image-alt",imageCaption:"editor-toolbar-image-caption",alignLeft:"editor-toolbar-align-left",alignCenter:"editor-toolbar-align-center",alignRight:"editor-toolbar-align-right",alignJustify:"editor-toolbar-align-justify",bulletList:"editor-toolbar-list-bullet",orderedList:"editor-toolbar-list-ordered",outdent:"editor-toolbar-list-outdent",indent:"editor-toolbar-list-indent",listOptions:"editor-toolbar-list-options",specialIndent:"editor-toolbar-special-indent",lineSpacing:"editor-toolbar-line-spacing-control",metrics:"editor-toolbar-metrics",margins:"editor-toolbar-margins",section:"editor-toolbar-section"},ut={fileNew:"file_new",fileImport:"file_import",fileSave:"file_save",fileExport:"file_export",fileExportPdf:"file_export_pdf",fileExportDocx:"file_export_docx",filePrint:"file_print",editUndo:"edit_undo",editRedo:"edit_redo",editCopy:"edit_copy",editFind:"edit_find",editSelectAll:"edit_selectAll",viewMargins:"view_margins",viewParagraphMarks:"view_paragraph_marks",viewPreciseFonts:"view_precise_fonts",insertImage:"insert_image",insertImageCaption:"insert_image_caption",insertTable:"insert_table",insertLink:"insert_link",insertFootnote:"insert_footnote",insertPageBreak:"insert_pageBreak",formatText:"format_text",formatTextBold:"format_text_bold",formatTextItalic:"format_text_italic",formatTextUnderline:"format_text_underline",formatTextStrike:"format_text_strike",formatAlign:"format_align",formatAlignLeft:"format_align_left",formatAlignCenter:"format_align_center",formatAlignRight:"format_align_right",formatAlignJustify:"format_align_justify",formatLists:"format_lists",formatListsBullet:"format_lists_bullet",formatListsNumbered:"format_lists_numbered"};export{Oe as ActionRow,o as BalloonShell,I as Button,e as Checkbox,ne as ColorField,M as ColorPicker,M as ToolbarColorPicker,m as CommandRegistry,i as DEFAULT_PALETTE,Te as Dialog,qe as DialogFooter,f as DocumentShell,le as EDITOR_SCHEMA_VERSION,N as Editor,E as FieldGroup,Ne as FieldRow,J as FloatingActionButton,T as FormField,d as Grid,Se as GridPicker,Se as ToolbarGridPicker,Ee as Heading,z as IconButton,j as InlineShell,ae as Menu,ae as ToolbarMenu,X as MenuRegistry,w as NumberField,$e as OASIS_BUILTIN_COMMANDS,ut as OASIS_MENU_ITEMS,dt as OASIS_TOOLBAR_ITEMS,Be as OasisEditorAppLazy,Le as OasisEditorContainer,b as OasisEditorLoading,O as PluginCollection,t as Popover,we as RIBBON_TABS,l as Radio,s as RadioGroup,P as Select,P as ToolbarSelect,se as SelectField,a as Separator,a as ToolbarSeparator,g as SidePanel,k as SidePanelBody,pe as SidePanelFooter,h as SidePanelHeader,c as SplitButton,c as ToolbarSplitButton,v as Stack,C as StatusText,A as StyleGallery,_e as SurfaceButton,L as Tabs,D as Text,S as TextAreaField,R as TextField,Ce as ToggleChip,G as Toolbar,ie as ToolbarButton,ke as buildRibbonTabDefinitions,be as cloneDocument,_ as commandRefName,me as createDefaultToolbarPreset,Q as createDocument,De as createEditorCommandBus,ee as createHeading,Ie as createOasisEditor,Fe as createOasisEditorContainer,ge as createParagraph,de as createTable,ye as createToolbarRegistry,y as exportEditorDocumentToHtml,re as importHtmlToEditorDocument,Ae as mount,oe as normalizeDocument,ct as projectTrackedRevisions,V as registerToolbarRenderer,at as resolveAllTrackedRevisions,u as resolveCommandRef,lt as resolveTrackedRevision,te as validateDocument};
1
+ import{$t as e,A as t,Ar as r,B as o,Br as a,Cr as i,D as s,Dr as n,E as l,Er as d,F as c,Fa as g,G as m,Ga as u,H as p,Ha as b,Hr as f,I as h,Ia as C,J as x,Jr as _,K as T,L as P,La as k,M as v,Mr as y,N as S,O as B,Or as w,P as F,Qa as L,R as D,T as A,Tr as R,U as I,Ur as E,V as H,Va as M,Wr as N,X as O,Xa as j,Y as z,Yr as $,_ as q,_i as W,ai as J,b as U,br as G,di as X,do as Y,fi as K,gi as V,hi as Q,j as Z,jr as ee,k as te,kr as re,lo as oe,mi as ae,no as ie,oo as se,pi as ne,q as le,qa as de,so as ce,t as ge,to as me,ui as ue,uo as pe,v as be,vr as fe,wr as he,x as Ce,xr as xe,y as _e,yr as Te,z as Pe,za as ke,zr as ve}from"./defaultToolbar-B_eMcwBq.js";function ye(e={}){const t=M(()=>e.ui?.locale??"pt-BR"),[r,o]=se(0),[a,i]=se(null),s=()=>{const t=e.ui?.loading;return"object"==typeof t&&null!==t?t:void 0};return pe(()=>{const e=performance.now();let t=!1;const r=()=>{if(t)return;const a=performance.now()-e;o(.9*(1-Math.exp(-a/5e3))),requestAnimationFrame(r)};requestAnimationFrame(r),oe(()=>{t=!0}),import("./OasisEditorApp-CkKJW0Db.js").then(e=>{t=!0,o(1),setTimeout(()=>i(()=>e.OasisEditorApp),180)}).catch(()=>{t=!0})}),ie(ke,{translator:t,get children(){return ie(me,{get when(){return a()},get fallback(){return ie(k,{variant:"fill",get progress(){return r()},get label(){return s()?.label},get class(){return s()?.class},get style(){return s()?.style}})},children:t=>{const r=t();return ie(r,e)}})}})}function Se(e,t={}){const r=_(),o=de(()=>ye({...t,runtime:{...t.runtime,client:r}}),e);return r.setDispose(()=>{o(),e.innerHTML=""}),r}function Be(e){return ie(ye,ce(e,{get ui(){return{...e.ui,showChrome:!1}}}))}function we(e,t={}){const r=_(),o=de(()=>Be({...t,runtime:{...t.runtime,client:r}}),e);return r.setDispose(()=>{o(),e.innerHTML=""}),r}function Fe(e){return{execute(t,r){const o=C(t,r);return e.commands.execute(o.name,o.payload)},canExecute(t,r){const o=C(t,r);return e.commands.canExecute(o.name,o.payload)},state(t){const r=C(t);return e.commands.state(r.name,r.payload)}}}var Le=["selectAll","insertFootnote","insertText","insertEquation","updateEquation","insertTableOfContents","updateTableOfContents","pastePlainText","paste","pasteAsPlainText","pasteMergeFormatting","formatPainter","formatPainterContinuous","cancelFormatPainter","bold","italic","underline","strike","superscript","subscript","link","unlink","alignLeft","alignCenter","alignRight","alignJustify","orderedList","bulletList","find","replace","toggleTrackChanges","acceptRevisions","rejectRevisions","acceptAllRevisions","rejectAllRevisions","nextRevision","previousRevision","nextComment","previousComment","newComment","replyComment","editComment","toggleCommentsPanel","resolveComment","reopenComment","deleteComment","toggleShowMargins","toggleShowParagraphMarks","togglePreciseFonts","undo","redo","pageBreak","lineBreak","columnBreak","splitBlock","setFontFamily","setFontSize","increaseFontSize","decreaseFontSize","changeTextCase","clearFormatting","setColor","setHighlight","setTextShading","setStyleId","setCharacterStyleId","setUnderlineStyle","documentStyles","print","copy","cut","newDocument","exportDocx","exportPdf","importDocument","insertHtml","insertImage","editImageAlt","insertImageCaption","imageContext","imageWidthCm","imageHeightCm","imageCrop","imageCropAspect","imageCropShape","imageCropFill","imageCropFit","imageCropReset","imageBorder","outdent","indent","togglePageBreakBefore","toggleKeepWithNext","setSpacingAfter","setSpacingBefore","setIndentLeft","setIndentRight","setIndentFirstLine","setIndentHanging","setSpecialIndent","setParagraphShading","applyParagraphBorders","setLineHeight","setListFormat","setListStartAt","toggleOrientation","setOrientation","sectionBreakNextPage","sectionBreakContinuous","sectionBreakEvenPage","sectionBreakOddPage","sectionBreakNextColumn","setPageMargins","setSectionPageNumbering","setPaperSize","setPaperSizePreset","setColumns","setColumnsPreset","editHeader","editFooter","editFirstPageHeader","editEvenPageHeader","editFirstPageFooter","editEvenPageFooter","insertPageNumber","insertPageNumberXOfY","placePageNumberTop","placePageNumberBottom","insertBookmark","removeBookmark","insertDateField","insertCrossReference","exitHeaderFooter","applyDocumentTheme","setDocumentColorScheme","setDocumentFontScheme","setDocumentParagraphSpacing","setDocumentEffects","setDocumentPageColor","setDocumentWatermark","setDocumentPageBorder","setDocumentDesignDefault","tableContext","tableMerge","tableSplit","tableInsertColumnBefore","tableInsertColumnAfter","tableDeleteColumn","tableInsertRowBefore","tableInsertRowAfter","tableDeleteRow","tableCellShading","tableCellBorders","tableCellNoBorders","tableApplyBorderPreset","toggleTableDrawBorders","toggleTableGridlines","tableWidth100","tableAlignLeft","tableAlignCenter","tableAlignRight","tableSetCellWidth","tableToggleHeaderRow","tableToggleTotalRow","tableToggleBandedRows","tableToggleFirstColumn","tableToggleLastColumn","tableToggleBandedColumns","setTableStyle","tableToggleAutoFit","tableDistributeColumns","tableDistributeRows","insertTable","insertShape","openSymbolDialog","openEquationDialog"];function De(e,t={}){const r=_(),o=de(()=>ie(ye,ce(t,{get runtime(){return{...t.runtime,client:r}}})),e);return r.setDispose(()=>{o(),e.innerHTML=""}),Object.assign(r,{unmount:()=>r.dispose()})}function Ae(e){const[t,r]=Y(e,["level","class","classList","children"]),o=t.level??2;return ie(b,ce({component:`h${o}`,get class(){return`oasis-editor-ui-heading ${t.class??""}`},get classList(){return{[`oasis-editor-ui-heading-${o}`]:!0,...t.classList}}},r,{get children(){return t.children}}))}var Re=/*#__PURE__*/L("<div>");function Ie(e){const[t,r]=Y(e,["align","wrap","class","classList","children"]);return o=Re(),j(o,ce({get class(){return`oasis-editor-ui-action-row ${t.class??""}`},get classList(){return{[`oasis-editor-ui-action-row-${t.align??"start"}`]:!0,"oasis-editor-ui-action-row-nowrap":!1===t.wrap,...t.classList}}},r),!1,!0),u(o,()=>t.children),o;var o}var Ee=/*#__PURE__*/L("<div>"),He={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function Me(e){const[t,r]=Y(e,["align","class","style","children"]);return o=Ee(),j(o,ce({get class(){return`oasis-editor-ui-field-row ${t.class??""}`},get style(){return{"align-items":He[t.align??"end"],..."object"==typeof t.style?t.style:{}}}},r),!1,!0),u(o,()=>t.children),o;var o}var Ne=/*#__PURE__*/L("<div>");function Oe(e){const[t,r]=Y(e,["align","class","classList","children"]);return o=Ne(),j(o,ce({get class(){return`oasis-editor-ui-dialog-footer ${t.class??""}`},get classList(){return{[`oasis-editor-ui-dialog-footer-${t.align??"end"}`]:!0,...t.classList}}},r),!1,!0),u(o,()=>t.children),o;var o}var je={newDocument:"editor-toolbar-new-document",importDocument:"editor-toolbar-import-document",exportDocx:"editor-toolbar-export-docx",exportPdf:"editor-toolbar-export-pdf",print:"editor-toolbar-print",undo:"editor-toolbar-undo",redo:"editor-toolbar-redo",style:"editor-toolbar-style",fontFamily:"editor-toolbar-font-family",fontSize:"editor-toolbar-font-size",color:"editor-toolbar-color",highlight:"editor-toolbar-highlight",textShading:"editor-toolbar-text-shading",bold:"editor-toolbar-bold",italic:"editor-toolbar-italic",underlineControl:"editor-toolbar-underline-control",strike:"editor-toolbar-strike",superscript:"editor-toolbar-superscript",subscript:"editor-toolbar-subscript",insertImage:"editor-toolbar-insert-image",insertTable:"editor-toolbar-insert-table",symbols:"editor-toolbar-symbols",link:"editor-toolbar-link",unlink:"editor-toolbar-unlink",footnote:"editor-toolbar-footnote",imageAlt:"editor-toolbar-image-alt",imageCaption:"editor-toolbar-image-caption",alignLeft:"editor-toolbar-align-left",alignCenter:"editor-toolbar-align-center",alignRight:"editor-toolbar-align-right",alignJustify:"editor-toolbar-align-justify",bulletList:"editor-toolbar-list-bullet",orderedList:"editor-toolbar-list-ordered",outdent:"editor-toolbar-list-outdent",indent:"editor-toolbar-list-indent",listOptions:"editor-toolbar-list-options",specialIndent:"editor-toolbar-special-indent",lineSpacing:"editor-toolbar-line-spacing-control",metrics:"editor-toolbar-metrics",margins:"editor-toolbar-margins",section:"editor-toolbar-section"},ze={fileNew:"file_new",fileImport:"file_import",fileSave:"file_save",fileExport:"file_export",fileExportPdf:"file_export_pdf",fileExportDocx:"file_export_docx",filePrint:"file_print",editUndo:"edit_undo",editRedo:"edit_redo",editCopy:"edit_copy",editFind:"edit_find",editSelectAll:"edit_selectAll",viewMargins:"view_margins",viewParagraphMarks:"view_paragraph_marks",viewPreciseFonts:"view_precise_fonts",insertImage:"insert_image",insertImageCaption:"insert_image_caption",insertTable:"insert_table",insertLink:"insert_link",insertFootnote:"insert_footnote",insertPageBreak:"insert_pageBreak",formatText:"format_text",formatTextBold:"format_text_bold",formatTextItalic:"format_text_italic",formatTextUnderline:"format_text_underline",formatTextStrike:"format_text_strike",formatAlign:"format_align",formatAlignLeft:"format_align_left",formatAlignCenter:"format_align_center",formatAlignRight:"format_align_right",formatAlignJustify:"format_align_justify",formatLists:"format_lists",formatListsBullet:"format_lists_bullet",formatListsNumbered:"format_lists_numbered"};export{Ie as ActionRow,H as BalloonShell,e as Button,Z as Checkbox,v as ColorField,d as ColorPicker,d as ToolbarColorPicker,E as CommandRegistry,he as DEFAULT_PALETTE,o as Dialog,Oe as DialogFooter,I as DocumentShell,ue as EDITOR_SCHEMA_VERSION,f as Editor,l as FieldGroup,Me as FieldRow,O as FloatingActionButton,c as FormField,h as Grid,R as GridPicker,R as ToolbarGridPicker,Ae as Heading,m as IconButton,p as InlineShell,r as Menu,r as ToolbarMenu,q as MenuRegistry,te as NumberField,Le as OASIS_BUILTIN_COMMANDS,ze as OASIS_MENU_ITEMS,je as OASIS_TOOLBAR_ITEMS,ye as OasisEditorAppLazy,Be as OasisEditorContainer,k as OasisEditorLoading,N as PluginCollection,ee as Popover,G as RIBBON_TABS,s as Radio,B as RadioGroup,re as Select,re as ToolbarSelect,t as SelectField,w as Separator,w as ToolbarSeparator,T as SidePanel,le as SidePanelBody,x as SidePanelFooter,z as SidePanelHeader,n as SplitButton,n as ToolbarSplitButton,P as Stack,D as StatusText,i as StyleGallery,a as SurfaceButton,Pe as Tabs,ve as Text,S as TextAreaField,F as TextField,A as ToggleChip,fe as Toolbar,y as ToolbarButton,Te as buildRibbonTabDefinitions,X as cloneDocument,g as commandRefName,ge as createDefaultToolbarPreset,K as createDocument,Fe as createEditorCommandBus,ne as createHeading,Se as createOasisEditor,we as createOasisEditorContainer,ae as createParagraph,Q as createTable,be as createToolbarRegistry,$ as exportEditorDocumentToHtml,J as importHtmlToEditorDocument,De as mount,V as normalizeDocument,_e as projectTrackedRevisions,xe as registerToolbarRenderer,U as resolveAllTrackedRevisions,C as resolveCommandRef,Ce as resolveTrackedRevision,W as validateDocument};