"use strict";var d=Object.defineProperty;var u=(o,t,e)=>t in o?d(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var a=(o,t,e)=>(u(o,typeof t!="symbol"?t+"":t,e),e);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("../../../../parchment@3.0.0/node_modules/parchment/dist/parchment.js"),p=require("./break.js"),f=require("./text.js"),r=class r extends c.InlineBlot{static compare(t,e){const i=r.order.indexOf(t),s=r.order.indexOf(e);return i>=0||s>=0?i-s:t===e?0:t<e?-1:1}formatAt(t,e,i,s){if(r.compare(this.statics.blotName,i)<0&&this.scroll.query(i,c.Scope.BLOT)){const n=this.isolate(t,e);s&&n.wrap(i,s)}else super.formatAt(t,e,i,s)}optimize(t){if(super.optimize(t),this.parent instanceof r&&r.compare(this.statics.blotName,this.parent.statics.blotName)>0){const e=this.parent.isolate(this.offset(),this.length());this.moveChildren(e),e.wrap(this)}}};a(r,"allowedChildren",[r,p.default,c.EmbedBlot,f.default]),a(r,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let l=r;exports.default=l;
