@fvc/richtext 1.3.6 → 1.3.7
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/lib/index.js +1 -1
- package/package.json +2 -2
package/dist/lib/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import{RichTextEditorComponent as e,Inject as t,Toolbar as n,HtmlEditor as r,Table as o,QuickToolbar as i}from"@cyber-wysiwyg/richtexteditor";import*as a from"react";import l,{useCallback as c}from"react";import"@cyber-wysiwyg/richtexteditor/ej2-base/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-icons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-buttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-splitbuttons/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-inputs/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-lists/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-navigations/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-popups/styles/material.css";import"@cyber-wysiwyg/richtexteditor/ej2-richtexteditor/styles/material.css";var s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},s.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;
|
|
2
2
|
/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
|
|
3
|
-
const{entries:u,setPrototypeOf:p,isFrozen:m,getPrototypeOf:d,getOwnPropertyDescriptor:f}=Object;let{freeze:g,seal:h,create:y}=Object,{apply:b,construct:T}="undefined"!=typeof Reflect&&Reflect;g||(g=function(e){return e}),h||(h=function(e){return e}),b||(b=function(e,t,n){return e.apply(t,n)}),T||(T=function(e,t){return new e(...t)});const E=M(Array.prototype.forEach),S=M(Array.prototype.lastIndexOf),v=M(Array.prototype.pop),A=M(Array.prototype.push),x=M(Array.prototype.splice),w=M(String.prototype.toLowerCase),_=M(String.prototype.toString),N=M(String.prototype.match),C=M(String.prototype.replace),R=M(String.prototype.indexOf),O=M(String.prototype.trim),k=M(Object.prototype.hasOwnProperty),L=M(RegExp.prototype.test),D=(I=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(I,t)});var I;function M(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return b(e,t,r)}}function z(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;p&&p(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(m(t)||(t[r]=e),o=e)}e[o]=!0}return e}function P(e){for(let t=0;t<e.length;t++){k(e,t)||(e[t]=null)}return e}function U(e){const t=y(null);for(const[n,r]of u(e)){k(e,n)&&(Array.isArray(r)?t[n]=P(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=U(r):t[n]=r)}return t}function H(e,t){for(;null!==e;){const n=f(e,t);if(n){if(n.get)return M(n.get);if("function"==typeof n.value)return M(n.value)}e=d(e)}return function(){return null}}const F=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),W=g(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Y=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q=g(["#text"]),X=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),K=g(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),V=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),J=h(/<%[\w\W]*|[\w\W]*%>/gm),Q=h(/\$\{[\w\W]*/gm),ee=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),te=h(/^aria-[\-\w]+$/),ne=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),re=h(/^(?:\w+script|data):/i),oe=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ie=h(/^html$/i),ae=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var le=Object.freeze({__proto__:null,ARIA_ATTR:te,ATTR_WHITESPACE:oe,CUSTOM_ELEMENT:ae,DATA_ATTR:ee,DOCTYPE_NAME:ie,ERB_EXPR:J,IS_ALLOWED_URI:ne,IS_SCRIPT_OR_DATA:re,MUSTACHE_EXPR:Z,TMPLIT_EXPR:Q});const ce=1,se=3,ue=7,pe=8,me=9,de=function(){return"undefined"==typeof window?null:window};var fe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==me||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:p,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=t,b=s.prototype,T=H(b,"cloneNode"),I=H(b,"remove"),M=H(b,"nextSibling"),P=H(b,"childNodes"),Z=H(b,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ae}=o;let fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof u&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ge,ERB_EXPR:he,TMPLIT_EXPR:ye,DATA_ATTR:be,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:Se,CUSTOM_ELEMENT:ve}=le;let{IS_ALLOWED_URI:Ae}=le,xe=null;const we=z({},[...F,...j,...B,...G,...q]);let _e=null;const Ne=z({},[...X,...K,...$,...V]);let Ce=Object.seal(y(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Oe=null,ke=!0,Le=!0,De=!1,Ie=!0,Me=!1,ze=!0,Pe=!1,Ue=!1,He=!1,Fe=!1,je=!1,Be=!1,We=!0,Ge=!1,Ye=!0,qe=!1,Xe={},Ke=null;const $e=z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=z({},["audio","video","img","source","image","track"]);let Je=null;const Qe=z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let rt=nt,ot=!1,it=null;const at=z({},[et,tt,nt],_);let lt=z({},["mi","mo","mn","ms","mtext"]),ct=z({},["annotation-xml"]);const st=z({},["title","style","font","a","script"]);let ut=null;const pt=["application/xhtml+xml","text/html"];let mt=null,dt=null;const ft=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=U(e),ut=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===ut?_:w,xe=k(e,"ALLOWED_TAGS")?z({},e.ALLOWED_TAGS,mt):we,_e=k(e,"ALLOWED_ATTR")?z({},e.ALLOWED_ATTR,mt):Ne,it=k(e,"ALLOWED_NAMESPACES")?z({},e.ALLOWED_NAMESPACES,_):at,Je=k(e,"ADD_URI_SAFE_ATTR")?z(U(Qe),e.ADD_URI_SAFE_ATTR,mt):Qe,Ve=k(e,"ADD_DATA_URI_TAGS")?z(U(Ze),e.ADD_DATA_URI_TAGS,mt):Ze,Ke=k(e,"FORBID_CONTENTS")?z({},e.FORBID_CONTENTS,mt):$e,Re=k(e,"FORBID_TAGS")?z({},e.FORBID_TAGS,mt):U({}),Oe=k(e,"FORBID_ATTR")?z({},e.FORBID_ATTR,mt):U({}),Xe=!!k(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,We=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||ne,rt=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Le=!1),je&&(Fe=!0),Xe&&(xe=z({},q),_e=[],!0===Xe.html&&(z(xe,F),z(_e,X)),!0===Xe.svg&&(z(xe,j),z(_e,K),z(_e,V)),!0===Xe.svgFilters&&(z(xe,B),z(_e,K),z(_e,V)),!0===Xe.mathMl&&(z(xe,G),z(_e,$),z(_e,V))),e.ADD_TAGS&&(xe===we&&(xe=U(xe)),z(xe,e.ADD_TAGS,mt)),e.ADD_ATTR&&(_e===Ne&&(_e=U(_e)),z(_e,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&z(Je,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(Ke===$e&&(Ke=U(Ke)),z(Ke,e.FORBID_CONTENTS,mt)),Ye&&(xe["#text"]=!0),Pe&&z(xe,["html","head","body"]),xe.table&&(z(xe,["tbody"]),delete Re.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,i)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));g&&g(e),dt=e}},yt=z({},[...j,...B,...W]),bt=z({},[...G,...Y]),Tt=function(e){A(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){I(e)}},Et=function(e,t){try{A(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){A(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||je)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},St=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=N(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&rt===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(rt===nt)try{t=(new f).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(rt,"template",null);try{t.documentElement.innerHTML=ot?Q:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===nt?oe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},vt=function(e){return te.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},At=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof c&&e instanceof c};function wt(e,t,r){E(e,e=>{e.call(n,t,r,dt)})}const _t=function(e){let t=null;if(wt(fe.beforeSanitizeElements,e,null),At(e))return Tt(e),!0;const r=mt(e.nodeName);if(wt(fe.uponSanitizeElement,e,{tagName:r,allowedTags:xe}),ze&&e.hasChildNodes()&&!xt(e.firstElementChild)&&L(/<[/\w!]/g,e.innerHTML)&&L(/<[/\w!]/g,e.textContent))return Tt(e),!0;if(e.nodeType===ue)return Tt(e),!0;if(ze&&e.nodeType===pe&&L(/<[/\w]/g,e.data))return Tt(e),!0;if(!xe[r]||Re[r]){if(!Re[r]&&Ct(r)){if(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ye&&!Ke[r]){const t=Z(e)||e.parentNode,n=P(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=T(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,M(e))}}}return Tt(e),!0}return e instanceof s&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=w(e.tagName),r=w(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(yt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[r]:Boolean(bt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[r])&&!(t.namespaceURI===et&&!lt[r])&&!bt[n]&&(st[n]||!yt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!L(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===se&&(t=e.textContent,E([ge,he,ye],e=>{t=C(t,e," ")}),e.textContent!==t&&(A(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(fe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Nt=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in r||n in ft))return!1;if(Le&&!Oe[t]&&L(be,t));else if(ke&&L(Te,t));else if(!_e[t]||Oe[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&L(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Je[t]);else if(L(Ae,C(n,Se,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==R(n,"data:")||!Ve[e]){if(De&&!L(Ee,C(n,Se,"")));else if(n)return!1}else;return!0},Ct=function(e){return"annotation-xml"!==e&&N(e,ve)},Rt=function(e){wt(fe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||At(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:l,value:c}=i,s=mt(a),u=c;let p="value"===a?u:O(u);if(r.attrName=s,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(fe.uponSanitizeAttribute,e,r),p=r.attrValue,!Ge||"id"!==s&&"name"!==s||(Et(a,e),p="user-content-"+p),ze&&L(/((--!?|])>)|<\/(style|title)/i,p)){Et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Et(a,e);continue}if(!Ie&&L(/\/>/i,p)){Et(a,e);continue}Me&&E([ge,he,ye],e=>{p=C(p,e," ")});const m=mt(e.nodeName);if(Nt(m,s,p)){if(J&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(m,s)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),At(e)?Tt(e):v(n.removed)}catch(t){Et(a,e)}}else Et(a,e)}wt(fe.afterSanitizeAttributes,e,null)},Ot=function e(t){let n=null;const r=vt(t);for(wt(fe.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(fe.uponSanitizeShadowNode,n,null),_t(n),Rt(n),n.content instanceof a&&e(n.content);wt(fe.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,l=null,s=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw D("toString is not a function");if("string"!=typeof(e=e.toString()))throw D("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||ht(t),n.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=mt(e.nodeName);if(!xe[t]||Re[t])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=St("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===ce&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Fe&&!Me&&!Pe&&-1===e.indexOf("<"))return J&&Be?J.createHTML(e):e;if(r=St(e),!r)return Fe?null:Be?Q:""}r&&He&&Tt(r.firstChild);const u=vt(qe?e:r);for(;l=u.nextNode();)_t(l),Rt(l),l.content instanceof a&&Ot(l.content);if(qe)return e;if(Fe){if(je)for(s=re.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(_e.shadowroot||_e.shadowrootmode)&&(s=ae.call(o,s,!0)),s}let p=Pe?r.outerHTML:r.innerHTML;return Pe&&xe["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&L(ie,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),Me&&E([ge,he,ye],e=>{p=C(p,e," ")}),J&&Be?J.createHTML(p):p},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},n.clearConfig=function(){dt=null,Ue=!1},n.isValidAttribute=function(e,t,n){dt||ht({});const r=mt(e),o=mt(t);return Nt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&A(fe[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=S(fe[e],t);return-1===n?void 0:x(fe[e],n,1)[0]}return v(fe[e])},n.removeHooks=function(e){fe[e]=[]},n.removeAllHooks=function(){fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),ge=function(e){return e.replace(/font-size\s*:\s*[^;"']+;?/gi,"").replace(/font-family\s*:\s*[^;"']+;?/gi,"")},he=function(e){return function(e){return e.replace(/<br\s*\/?>/gi,"<br>").replace(/<img\s+([^>]+?)\s*\/>/gi,"<img $1>")}(ge(e))},ye=["^","_","`","{","|","}","~"," ","¡","¢","£","¤","¥","₹","¦","§","¨","©","ª","«","¬","","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã"],be=function(e){var t=e.visible,n=e.onSelect,r=e.onClose;return t?l.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"special-char-modal-title",className:"special-char-modal-overlay",onClick:r},l.createElement("div",{className:"special-char-modal",onClick:function(e){return e.stopPropagation()}},l.createElement("h2",{id:"special-char-modal-title"},"Special Characters"),l.createElement("div",{className:"special-char-btn-container"},ye.map(function(e){return l.createElement("button",{key:e.charCodeAt(0),type:"button",onClick:function(){return n(e)},className:"special-char-btn",title:"Insert ".concat(e)},e)})),l.createElement("button",{onClick:r,type:"button",className:"special-char-cancel-btn"},"Cancel"),l.createElement("div",{className:"clearfix"}))):null};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}\n.e-content > * {\n font-size: 12px !important;\n font-family: Arial, sans-serif !important;\n}\n\n.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n position: relative;\n}\n\n.special-char-modal-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n}\n\n.special-char-modal {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n min-width: 280px;\n max-width: 90vw;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);\n position: relative;\n z-index: 10000;\n}\n\n.special-char-modal h2 {\n margin-bottom: 12px;\n}\n\n.special-char-btn-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.special-char-btn {\n cursor: pointer;\n font-size: 22px;\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 4px;\n user-select: none;\n background-color: white;\n transition: background-color 0.15s ease, border-color 0.15s ease;\n}\n\n.special-char-btn:hover,\n.special-char-btn:focus {\n background-color: #f0f0f0;\n border-color: #aaa;\n outline: none;\n}\n\n.special-char-cancel-btn {\n margin-top: 16px;\n float: right;\n padding: 6px 12px;\n cursor: pointer;\n background-color: #eee;\n border: none;\n border-radius: 4px;\n transition: background-color 0.15s ease;\n}\n\n.special-char-cancel-btn:hover,\n.special-char-cancel-btn:focus {\n background-color: #ddd;\n outline: none;\n}\n\n.clearfix::after {\n content: "";\n display: table;\n clear: both;\n}');var Te={items:["Bold","Italic","Underline","StrikeThrough","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|",{tooltipText:"Insert Symbol",template:'<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" id="insert-symbol-btn" tabindex="-1"><span class="e-btn e-lib e-icon-btn">Ω</span></button>'},"|","ClearFormat","|"]},Ee={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},Se=function(l){var u=l.autoSanitize,p=void 0===u||u;l.testId;var m=l.toolbarSettings,d=void 0===m?Te:m,f=l.quickToolbarSettings,g=void 0===f?Ee:f,h=l.height,y=void 0===h?450:h,b=l.enableTabKey,T=void 0===b||b,E=l.enableHtmlSanitizer,S=void 0===E||E,v=l.change,A=l.value,x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(l,["autoSanitize","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","change","value"]),w=a.useRef(null),_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(a.useState(!1),2),N=_[0],C=_[1],R=a.useRef(null),O=a.useMemo(function(){return"function"==typeof d?d(Te):d},[d]),k=c(function(e){var t=p?function(e){return function(e){return e.replace(/<br(\s*[^/>]*)>/gi,"<br />").replace(/<img(\s+[^>]*?)(?<!\/)>/gi,"<img$1 />")}(function(e){return e.replace(/<\/?o:p>/gi,"").replace(/\sclass="Mso[a-zA-Z]*"/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?xml[^>]*>/gi,"").replace(/<\/?w:[^>]*>/gi,"").replace(/<\/?m:[^>]*>/gi,"").replace(/\sxmlns(:\w+)?="[^"]*"/gi,"")}(ge(fe.sanitize(e))))}(e.value):e.value;null==v||v(s(s({},e),{value:t}))},[p,v]);a.useEffect(function(){var e=document.getElementById("insert-symbol-btn");return e&&e.addEventListener("click",function(){var e=window.getSelection();e&&e.rangeCount>0&&(R.current=e.getRangeAt(0)),C(!0)}),function(){e&&e.removeEventListener("click",function(){})}},[]);var L=p&&A?he(A):A;return a.createElement(a.Fragment,null,a.createElement(e,s({locale:"az",ref:w,tabIndex:0,height:y,enableTabKey:T,toolbarSettings:O,quickToolbarSettings:g,enableHtmlSanitizer:S,change:k,onPaste:function(e){var t,n,r=null===(t=null==e?void 0:e.clipboardData)||void 0===t?void 0:t.getData("text/html");if(r){var o=he(r);null===(n=e.preventDefault)||void 0===n||n.call(e);var i=w.current;i&&i.executeCommand("insertHTML",o)}},value:L},x),a.createElement(t,{services:[n,r,o,i]}),a.createElement(be,{visible:N,onSelect:function(e){C(!1);var t=w.current;if(t&&R.current){var n=window.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(R.current),t.executeCommand("insertText",e)}},onClose:function(){return C(!1)}})))};export{Se as Richtext};
|
|
3
|
+
const{entries:u,setPrototypeOf:p,isFrozen:m,getPrototypeOf:d,getOwnPropertyDescriptor:f}=Object;let{freeze:g,seal:h,create:y}=Object,{apply:b,construct:T}="undefined"!=typeof Reflect&&Reflect;g||(g=function(e){return e}),h||(h=function(e){return e}),b||(b=function(e,t,n){return e.apply(t,n)}),T||(T=function(e,t){return new e(...t)});const E=M(Array.prototype.forEach),S=M(Array.prototype.lastIndexOf),v=M(Array.prototype.pop),A=M(Array.prototype.push),x=M(Array.prototype.splice),w=M(String.prototype.toLowerCase),_=M(String.prototype.toString),N=M(String.prototype.match),C=M(String.prototype.replace),R=M(String.prototype.indexOf),O=M(String.prototype.trim),k=M(Object.prototype.hasOwnProperty),L=M(RegExp.prototype.test),D=(I=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return T(I,t)});var I;function M(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return b(e,t,r)}}function z(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;p&&p(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(m(t)||(t[r]=e),o=e)}e[o]=!0}return e}function P(e){for(let t=0;t<e.length;t++){k(e,t)||(e[t]=null)}return e}function U(e){const t=y(null);for(const[n,r]of u(e)){k(e,n)&&(Array.isArray(r)?t[n]=P(r):r&&"object"==typeof r&&r.constructor===Object?t[n]=U(r):t[n]=r)}return t}function H(e,t){for(;null!==e;){const n=f(e,t);if(n){if(n.get)return M(n.get);if("function"==typeof n.value)return M(n.value)}e=d(e)}return function(){return null}}const F=g(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=g(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),B=g(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),W=g(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),G=g(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Y=g(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),q=g(["#text"]),X=g(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),K=g(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),$=g(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),V=g(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Z=h(/\{\{[\w\W]*|[\w\W]*\}\}/gm),J=h(/<%[\w\W]*|[\w\W]*%>/gm),Q=h(/\$\{[\w\W]*/gm),ee=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),te=h(/^aria-[\-\w]+$/),ne=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),re=h(/^(?:\w+script|data):/i),oe=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ie=h(/^html$/i),ae=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var le=Object.freeze({__proto__:null,ARIA_ATTR:te,ATTR_WHITESPACE:oe,CUSTOM_ELEMENT:ae,DATA_ATTR:ee,DOCTYPE_NAME:ie,ERB_EXPR:J,IS_ALLOWED_URI:ne,IS_SCRIPT_OR_DATA:re,MUSTACHE_EXPR:Z,TMPLIT_EXPR:Q});const ce=1,se=3,ue=7,pe=8,me=9,de=function(){return"undefined"==typeof window?null:window};var fe=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:de();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||t.document.nodeType!==me||!t.Element)return n.isSupported=!1,n;let{document:r}=t;const o=r,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:c,Element:s,NodeFilter:p,NamedNodeMap:m=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=t,b=s.prototype,T=H(b,"cloneNode"),I=H(b,"remove"),M=H(b,"nextSibling"),P=H(b,"childNodes"),Z=H(b,"parentNode");if("function"==typeof l){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let J,Q="";const{implementation:ee,createNodeIterator:te,createDocumentFragment:re,getElementsByTagName:oe}=r,{importNode:ae}=o;let fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof u&&"function"==typeof Z&&ee&&void 0!==ee.createHTMLDocument;const{MUSTACHE_EXPR:ge,ERB_EXPR:he,TMPLIT_EXPR:ye,DATA_ATTR:be,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:Ee,ATTR_WHITESPACE:Se,CUSTOM_ELEMENT:ve}=le;let{IS_ALLOWED_URI:Ae}=le,xe=null;const we=z({},[...F,...j,...B,...G,...q]);let _e=null;const Ne=z({},[...X,...K,...$,...V]);let Ce=Object.seal(y(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Oe=null,ke=!0,Le=!0,De=!1,Ie=!0,Me=!1,ze=!0,Pe=!1,Ue=!1,He=!1,Fe=!1,je=!1,Be=!1,We=!0,Ge=!1,Ye=!0,qe=!1,Xe={},Ke=null;const $e=z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=z({},["audio","video","img","source","image","track"]);let Je=null;const Qe=z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let rt=nt,ot=!1,it=null;const at=z({},[et,tt,nt],_);let lt=z({},["mi","mo","mn","ms","mtext"]),ct=z({},["annotation-xml"]);const st=z({},["title","style","font","a","script"]);let ut=null;const pt=["application/xhtml+xml","text/html"];let mt=null,dt=null;const ft=r.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},ht=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!dt||dt!==e){if(e&&"object"==typeof e||(e={}),e=U(e),ut=-1===pt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,mt="application/xhtml+xml"===ut?_:w,xe=k(e,"ALLOWED_TAGS")?z({},e.ALLOWED_TAGS,mt):we,_e=k(e,"ALLOWED_ATTR")?z({},e.ALLOWED_ATTR,mt):Ne,it=k(e,"ALLOWED_NAMESPACES")?z({},e.ALLOWED_NAMESPACES,_):at,Je=k(e,"ADD_URI_SAFE_ATTR")?z(U(Qe),e.ADD_URI_SAFE_ATTR,mt):Qe,Ve=k(e,"ADD_DATA_URI_TAGS")?z(U(Ze),e.ADD_DATA_URI_TAGS,mt):Ze,Ke=k(e,"FORBID_CONTENTS")?z({},e.FORBID_CONTENTS,mt):$e,Re=k(e,"FORBID_TAGS")?z({},e.FORBID_TAGS,mt):U({}),Oe=k(e,"FORBID_ATTR")?z({},e.FORBID_ATTR,mt):U({}),Xe=!!k(e,"USE_PROFILES")&&e.USE_PROFILES,ke=!1!==e.ALLOW_ARIA_ATTR,Le=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ze=!1!==e.SAFE_FOR_XML,Pe=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,je=e.RETURN_DOM_FRAGMENT||!1,Be=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,We=!1!==e.SANITIZE_DOM,Ge=e.SANITIZE_NAMED_PROPS||!1,Ye=!1!==e.KEEP_CONTENT,qe=e.IN_PLACE||!1,Ae=e.ALLOWED_URI_REGEXP||ne,rt=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&>(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Le=!1),je&&(Fe=!0),Xe&&(xe=z({},q),_e=[],!0===Xe.html&&(z(xe,F),z(_e,X)),!0===Xe.svg&&(z(xe,j),z(_e,K),z(_e,V)),!0===Xe.svgFilters&&(z(xe,B),z(_e,K),z(_e,V)),!0===Xe.mathMl&&(z(xe,G),z(_e,$),z(_e,V))),e.ADD_TAGS&&(xe===we&&(xe=U(xe)),z(xe,e.ADD_TAGS,mt)),e.ADD_ATTR&&(_e===Ne&&(_e=U(_e)),z(_e,e.ADD_ATTR,mt)),e.ADD_URI_SAFE_ATTR&&z(Je,e.ADD_URI_SAFE_ATTR,mt),e.FORBID_CONTENTS&&(Ke===$e&&(Ke=U(Ke)),z(Ke,e.FORBID_CONTENTS,mt)),Ye&&(xe["#text"]=!0),Pe&&z(xe,["html","head","body"]),xe.table&&(z(xe,["tbody"]),delete Re.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw D('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=e.TRUSTED_TYPES_POLICY,Q=J.createHTML("")}else void 0===J&&(J=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(h,i)),null!==J&&"string"==typeof Q&&(Q=J.createHTML(""));g&&g(e),dt=e}},yt=z({},[...j,...B,...W]),bt=z({},[...G,...Y]),Tt=function(e){A(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){I(e)}},Et=function(e,t){try{A(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){A(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||je)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},St=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=N(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&rt===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=J?J.createHTML(e):e;if(rt===nt)try{t=(new f).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=ee.createDocument(rt,"template",null);try{t.documentElement.innerHTML=ot?Q:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),rt===nt?oe.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:i},vt=function(e){return te.call(e.ownerDocument||e,e,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},At=function(e){return e instanceof d&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof m)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},xt=function(e){return"function"==typeof c&&e instanceof c};function wt(e,t,r){E(e,e=>{e.call(n,t,r,dt)})}const _t=function(e){let t=null;if(wt(fe.beforeSanitizeElements,e,null),At(e))return Tt(e),!0;const r=mt(e.nodeName);if(wt(fe.uponSanitizeElement,e,{tagName:r,allowedTags:xe}),ze&&e.hasChildNodes()&&!xt(e.firstElementChild)&&L(/<[/\w!]/g,e.innerHTML)&&L(/<[/\w!]/g,e.textContent))return Tt(e),!0;if(e.nodeType===ue)return Tt(e),!0;if(ze&&e.nodeType===pe&&L(/<[/\w]/g,e.data))return Tt(e),!0;if(!xe[r]||Re[r]){if(!Re[r]&&Ct(r)){if(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ye&&!Ke[r]){const t=Z(e)||e.parentNode,n=P(e)||e.childNodes;if(n&&t){for(let r=n.length-1;r>=0;--r){const o=T(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,M(e))}}}return Tt(e),!0}return e instanceof s&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:rt,tagName:"template"});const n=w(e.tagName),r=w(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(yt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[r]:Boolean(bt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[r])&&!(t.namespaceURI===et&&!lt[r])&&!bt[n]&&(st[n]||!yt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!L(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===se&&(t=e.textContent,E([ge,he,ye],e=>{t=C(t,e," ")}),e.textContent!==t&&(A(n.removed,{element:e.cloneNode()}),e.textContent=t)),wt(fe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Nt=function(e,t,n){if(We&&("id"===t||"name"===t)&&(n in r||n in ft))return!1;if(Le&&!Oe[t]&&L(be,t));else if(ke&&L(Te,t));else if(!_e[t]||Oe[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&L(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&L(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if(Je[t]);else if(L(Ae,C(n,Se,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==R(n,"data:")||!Ve[e]){if(De&&!L(Ee,C(n,Se,"")));else if(n)return!1}else;return!0},Ct=function(e){return"annotation-xml"!==e&&N(e,ve)},Rt=function(e){wt(fe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||At(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:a,namespaceURI:l,value:c}=i,s=mt(a),u=c;let p="value"===a?u:O(u);if(r.attrName=s,r.attrValue=p,r.keepAttr=!0,r.forceKeepAttr=void 0,wt(fe.uponSanitizeAttribute,e,r),p=r.attrValue,!Ge||"id"!==s&&"name"!==s||(Et(a,e),p="user-content-"+p),ze&&L(/((--!?|])>)|<\/(style|title)/i,p)){Et(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Et(a,e);continue}if(!Ie&&L(/\/>/i,p)){Et(a,e);continue}Me&&E([ge,he,ye],e=>{p=C(p,e," ")});const m=mt(e.nodeName);if(Nt(m,s,p)){if(J&&"object"==typeof h&&"function"==typeof h.getAttributeType)if(l);else switch(h.getAttributeType(m,s)){case"TrustedHTML":p=J.createHTML(p);break;case"TrustedScriptURL":p=J.createScriptURL(p)}if(p!==u)try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),At(e)?Tt(e):v(n.removed)}catch(t){Et(a,e)}}else Et(a,e)}wt(fe.afterSanitizeAttributes,e,null)},Ot=function e(t){let n=null;const r=vt(t);for(wt(fe.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)wt(fe.uponSanitizeShadowNode,n,null),_t(n),Rt(n),n.content instanceof a&&e(n.content);wt(fe.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,i=null,l=null,s=null;if(ot=!e,ot&&(e="\x3c!--\x3e"),"string"!=typeof e&&!xt(e)){if("function"!=typeof e.toString)throw D("toString is not a function");if("string"!=typeof(e=e.toString()))throw D("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ue||ht(t),n.removed=[],"string"==typeof e&&(qe=!1),qe){if(e.nodeName){const t=mt(e.nodeName);if(!xe[t]||Re[t])throw D("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=St("\x3c!----\x3e"),i=r.ownerDocument.importNode(e,!0),i.nodeType===ce&&"BODY"===i.nodeName||"HTML"===i.nodeName?r=i:r.appendChild(i);else{if(!Fe&&!Me&&!Pe&&-1===e.indexOf("<"))return J&&Be?J.createHTML(e):e;if(r=St(e),!r)return Fe?null:Be?Q:""}r&&He&&Tt(r.firstChild);const u=vt(qe?e:r);for(;l=u.nextNode();)_t(l),Rt(l),l.content instanceof a&&Ot(l.content);if(qe)return e;if(Fe){if(je)for(s=re.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(_e.shadowroot||_e.shadowrootmode)&&(s=ae.call(o,s,!0)),s}let p=Pe?r.outerHTML:r.innerHTML;return Pe&&xe["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&L(ie,r.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+p),Me&&E([ge,he,ye],e=>{p=C(p,e," ")}),J&&Be?J.createHTML(p):p},n.setConfig=function(){ht(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},n.clearConfig=function(){dt=null,Ue=!1},n.isValidAttribute=function(e,t,n){dt||ht({});const r=mt(e),o=mt(t);return Nt(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&A(fe[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=S(fe[e],t);return-1===n?void 0:x(fe[e],n,1)[0]}return v(fe[e])},n.removeHooks=function(e){fe[e]=[]},n.removeAllHooks=function(){fe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}(),ge=function(e){return e.replace(/font-size\s*:\s*[^;]+;?/gi,"").replace(/font-family\s*:\s*[^;]+;?/gi,"")},he=function(e){return function(e){return e.replace(/<br\s*\/?>/gi,"<br>").replace(/<img\s+([^>]+?)\s*\/>/gi,"<img $1>")}(ge(e))},ye=["^","_","`","{","|","}","~"," ","¡","¢","£","¤","¥","₹","¦","§","¨","©","ª","«","¬","","®","¯","°","±","²","³","´","µ","¶","·","¸","¹","º","»","¼","½","¾","¿","À","Á","Â","Ã"],be=function(e){var t=e.visible,n=e.onSelect,r=e.onClose;return t?l.createElement("div",{role:"dialog","aria-modal":"true","aria-labelledby":"special-char-modal-title",className:"special-char-modal-overlay",onClick:r},l.createElement("div",{className:"special-char-modal",onClick:function(e){return e.stopPropagation()}},l.createElement("h2",{id:"special-char-modal-title"},"Special Characters"),l.createElement("div",{className:"special-char-btn-container"},ye.map(function(e){return l.createElement("button",{key:e.charCodeAt(0),type:"button",onClick:function(){return n(e)},className:"special-char-btn",title:"Insert ".concat(e)},e)})),l.createElement("button",{onClick:r,type:"button",className:"special-char-cancel-btn"},"Cancel"),l.createElement("div",{className:"clearfix"}))):null};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}('.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n}\n\n.e-content {\n max-width: 685px;\n padding: 0;\n}\n.e-content > * {\n font-size: 12px !important;\n font-family: Arial, sans-serif !important;\n}\n\n.e-rte-content {\n display: flex;\n justify-content: center;\n margin-bottom: 75px;\n margin-top: 75px;\n position: relative;\n}\n\n.special-char-modal-overlay {\n position: absolute;\n inset: 0;\n background-color: rgba(0, 0, 0, 0.4);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 9999;\n}\n\n.special-char-modal {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n min-width: 280px;\n max-width: 90vw;\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);\n position: relative;\n z-index: 10000;\n}\n\n.special-char-modal h2 {\n margin-bottom: 12px;\n}\n\n.special-char-btn-container {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.special-char-btn {\n cursor: pointer;\n font-size: 22px;\n width: 32px;\n height: 32px;\n line-height: 32px;\n text-align: center;\n border: 1px solid #ddd;\n border-radius: 4px;\n user-select: none;\n background-color: white;\n transition: background-color 0.15s ease, border-color 0.15s ease;\n}\n\n.special-char-btn:hover,\n.special-char-btn:focus {\n background-color: #f0f0f0;\n border-color: #aaa;\n outline: none;\n}\n\n.special-char-cancel-btn {\n margin-top: 16px;\n float: right;\n padding: 6px 12px;\n cursor: pointer;\n background-color: #eee;\n border: none;\n border-radius: 4px;\n transition: background-color 0.15s ease;\n}\n\n.special-char-cancel-btn:hover,\n.special-char-cancel-btn:focus {\n background-color: #ddd;\n outline: none;\n}\n\n.clearfix::after {\n content: "";\n display: table;\n clear: both;\n}');var Te={items:["Bold","Italic","Underline","StrikeThrough","FontColor","BackgroundColor","LowerCase","UpperCase","|","Alignments","OrderedList","UnorderedList","Outdent","Indent","|","CreateLink","CreateTable","|",{tooltipText:"Insert Symbol",template:'<button class="e-tbar-btn e-control e-btn e-lib e-icon-btn" id="insert-symbol-btn" tabindex="-1"><span class="e-btn e-lib e-icon-btn">Ω</span></button>'},"|","ClearFormat","|"]},Ee={table:["TableHeader","TableRows","TableColumns","TableCell","-","BackgroundColor","TableRemove","TableCellVerticalAlign","Styles"]},Se=function(l){var u=l.autoSanitize,p=void 0===u||u;l.testId;var m=l.toolbarSettings,d=void 0===m?Te:m,f=l.quickToolbarSettings,g=void 0===f?Ee:f,h=l.height,y=void 0===h?450:h,b=l.enableTabKey,T=void 0===b||b,E=l.enableHtmlSanitizer,S=void 0===E||E,v=l.change,A=l.value,x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(l,["autoSanitize","testId","toolbarSettings","quickToolbarSettings","height","enableTabKey","enableHtmlSanitizer","change","value"]),w=a.useRef(null),_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}(a.useState(!1),2),N=_[0],C=_[1],R=a.useRef(null),O=a.useMemo(function(){return"function"==typeof d?d(Te):d},[d]),k=c(function(e){var t=p?function(e){return function(e){return e.replace(/<br(\s*[^/>]*)>/gi,"<br />").replace(/<img(\s+[^>]*?)(?<!\/)>/gi,"<img$1 />")}(function(e){return e.replace(/<\/?o:p>/gi,"").replace(/\sclass="Mso[a-zA-Z]*"/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\/?xml[^>]*>/gi,"").replace(/<\/?w:[^>]*>/gi,"").replace(/<\/?m:[^>]*>/gi,"").replace(/\sxmlns(:\w+)?="[^"]*"/gi,"")}(ge(fe.sanitize(e))))}(e.value):e.value;null==v||v(s(s({},e),{value:t}))},[p,v]);a.useEffect(function(){var e=document.getElementById("insert-symbol-btn");return e&&e.addEventListener("click",function(){var e=window.getSelection();e&&e.rangeCount>0&&(R.current=e.getRangeAt(0)),C(!0)}),function(){e&&e.removeEventListener("click",function(){})}},[]);var L=p&&A?he(A):A;return a.createElement(a.Fragment,null,a.createElement(e,s({locale:"az",ref:w,tabIndex:0,height:y,enableTabKey:T,toolbarSettings:O,quickToolbarSettings:g,enableHtmlSanitizer:S,change:k,onPaste:function(e){var t,n,r=null===(t=null==e?void 0:e.clipboardData)||void 0===t?void 0:t.getData("text/html");if(r){var o=he(r);null===(n=e.preventDefault)||void 0===n||n.call(e);var i=w.current;i&&i.executeCommand("insertHTML",o)}},value:L},x),a.createElement(t,{services:[n,r,o,i]}),a.createElement(be,{visible:N,onSelect:function(e){C(!1);var t=w.current;if(t&&R.current){var n=window.getSelection();null==n||n.removeAllRanges(),null==n||n.addRange(R.current),t.executeCommand("insertText",e)}},onClose:function(){return C(!1)}})))};export{Se as Richtext};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fvc/richtext",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"main": "./dist/lib/index.js",
|
|
5
5
|
"types": "./dist/lib/richtext/src/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -35,4 +35,4 @@
|
|
|
35
35
|
"@types/dompurify": "^3.2.0",
|
|
36
36
|
"@types/minimatch": "^6.0.0"
|
|
37
37
|
}
|
|
38
|
-
}
|
|
38
|
+
}
|