@memoarchitect/architect 0.6.6 → 0.8.26
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/README.md +26 -4
- package/dist/assets/AiWorkspace-Z3BbnmaP.js +7 -0
- package/dist/assets/AnalysisWorkspace-DjaUOo7U.js +39 -0
- package/dist/assets/{ComplianceWizard-k98NZ2ec.js → ComplianceWizard-DKxZ1z25.js} +1 -1
- package/dist/assets/DSMView-DJhmrXYm.js +5 -0
- package/dist/assets/Dashboard-CYT7KjqU.js +1 -0
- package/dist/assets/DhfDashboard-DacdOtkU.js +1 -0
- package/dist/assets/DhfWorkbench-CIhopT8J.js +69 -0
- package/dist/assets/DiagramCanvas-CLE_nv7Y.js +4 -0
- package/dist/assets/DiagramEditor-puQuE8gB.js +4 -0
- package/dist/assets/DiagramToolbarControls-XMGLx08e.js +1 -0
- package/dist/assets/ElementDetailView-D5XvAL_i.js +2 -0
- package/dist/assets/ExplorerTreeRow-DUmcEsqf.js +3 -0
- package/dist/assets/{ImportView-CyMm-tSP.js → ImportView-9y1nhQS4.js} +1 -1
- package/dist/assets/{LayerGrid-DNPZYTsD.js → LayerGrid-bhFpOIbe.js} +1 -1
- package/dist/assets/{LayerTable-DhOq1DHo.js → LayerTable-RuswZVUI.js} +2 -2
- package/dist/assets/{MaxGraphCanvas-DqKU1PTY.js → MaxGraphCanvas-D3BXQK2y.js} +6 -6
- package/dist/assets/{ModelDiff-BbqIoesG.js → ModelDiff-Cl2dhlk3.js} +1 -1
- package/dist/assets/OntologyDecompositionDiagram-aONGngg4.js +1 -0
- package/dist/assets/{OntologyViewer-BIpJC66j.js → OntologyViewer-VOrKTRuQ.js} +2 -2
- package/dist/assets/{RelationshipOverlay-B9bqt4zl.js → RelationshipOverlay-B3AN-bM-.js} +1 -1
- package/dist/assets/{RelationshipsSection-DttMvF2i.js → RelationshipsSection-DggeGBKP.js} +1 -1
- package/dist/assets/{ReviewDashboard-DKoExM8K.js → ReviewDashboard--LMXZ3F4.js} +1 -1
- package/dist/assets/ScenarioEditor-bB4iBbgO.js +3 -0
- package/dist/assets/{StatisticsDashboard-B8BduIDz.js → StatisticsDashboard-iXimfU20.js} +1 -1
- package/dist/assets/{SysmlCodeEditor-Die2RUsz.js → SysmlCodeEditor-i0BHj3of.js} +117 -117
- package/dist/assets/TabularView-DnIfq-TB.js +1 -0
- package/dist/assets/TraceabilityMatrix-eilGn6Sr.js +3 -0
- package/dist/assets/UiScreensWorkspace-Cs1ivqzc.js +1 -0
- package/dist/assets/{WorkflowWizard-7--f9OH2.js → WorkflowWizard-C7jI6C59.js} +1 -1
- package/dist/assets/html2canvas.esm-QH1iLAAe.js +22 -0
- package/dist/assets/index-CG-gfw-s.js +4067 -0
- package/dist/assets/index-DXB4CKwW.css +1 -0
- package/dist/assets/index.es-DABt8CUc.js +18 -0
- package/dist/assets/jspdf.es.min-G-Vwo9yG.js +170 -0
- package/dist/assets/{layout-providers-Dr743WlP.js → layout-providers-BSDYNZu0.js} +1 -1
- package/dist/assets/notation-scene-DLZms6VR.js +1 -0
- package/dist/assets/purify.es-DP5U8-sc.js +3 -0
- package/dist/assets/{reactflow-CsCqNKB-.js → reactflow-C9OlmOYw.js} +5 -5
- package/dist/assets/xlsx-CkFp8p6R.js +105 -0
- package/dist/index.html +3 -3
- package/dist-standalone/index.html +5504 -0
- package/lib/__tests__/compiler-bundling.test.d.ts +2 -0
- package/lib/__tests__/compiler-bundling.test.d.ts.map +1 -0
- package/lib/__tests__/compiler-bundling.test.js +32 -0
- package/lib/__tests__/compiler-bundling.test.js.map +1 -0
- package/lib/__tests__/standalone-distribution.test.d.ts +2 -0
- package/lib/__tests__/standalone-distribution.test.d.ts.map +1 -0
- package/lib/__tests__/standalone-distribution.test.js +51 -0
- package/lib/__tests__/standalone-distribution.test.js.map +1 -0
- package/lib/__tests__/standard-sysml-diagrams-smoke.test.d.ts +2 -0
- package/lib/__tests__/standard-sysml-diagrams-smoke.test.d.ts.map +1 -0
- package/lib/__tests__/standard-sysml-diagrams-smoke.test.js +22 -0
- package/lib/__tests__/standard-sysml-diagrams-smoke.test.js.map +1 -0
- package/lib/__tests__/supervised-child-args.test.d.ts +2 -0
- package/lib/__tests__/supervised-child-args.test.d.ts.map +1 -0
- package/lib/__tests__/supervised-child-args.test.js +55 -0
- package/lib/__tests__/supervised-child-args.test.js.map +1 -0
- package/lib/bin/memo-architect.js +30 -4
- package/lib/bin/memo-architect.js.map +1 -1
- package/lib/commands/build.d.ts.map +1 -1
- package/lib/commands/build.js +15 -18
- package/lib/commands/build.js.map +1 -1
- package/lib/commands/dev.d.ts +32 -2
- package/lib/commands/dev.d.ts.map +1 -1
- package/lib/commands/dev.js +95 -8
- package/lib/commands/dev.js.map +1 -1
- package/lib/commands/example.d.ts +1 -0
- package/lib/commands/example.d.ts.map +1 -1
- package/lib/commands/example.js +2 -0
- package/lib/commands/example.js.map +1 -1
- package/lib/feature-grants.d.ts.map +1 -1
- package/lib/feature-grants.js +3 -1
- package/lib/feature-grants.js.map +1 -1
- package/package.json +16 -6
- package/dist/assets/AiWorkspace-DS79vBOT.js +0 -3
- package/dist/assets/AnalysisWorkspace-D_u4shRY.js +0 -39
- package/dist/assets/DSMView-DGheBwZ0.js +0 -1
- package/dist/assets/Dashboard-BRUQvUFK.js +0 -1
- package/dist/assets/DhfDashboard-B9V_n7kg.js +0 -1
- package/dist/assets/DhfSettingsPanel-B8aLsWn6.js +0 -1
- package/dist/assets/DhfWorkbench-TOnZkdUU.js +0 -69
- package/dist/assets/DiagramCanvas-B9d4aLKt.js +0 -1
- package/dist/assets/DiagramEditor-CJ7OG2IC.js +0 -4
- package/dist/assets/ElementDetailView-CDcm1rvf.js +0 -2
- package/dist/assets/OntologyDecompositionDiagram-DkxTe2C_.js +0 -1
- package/dist/assets/ScenarioEditor-JQ3huCnz.js +0 -3
- package/dist/assets/TabularView-BXfFSluC.js +0 -1
- package/dist/assets/TraceabilityMatrix-CHZHFucA.js +0 -1
- package/dist/assets/editor.worker-DyuDvpVp.js +0 -26
- package/dist/assets/index-CVW92JY7.js +0 -3280
- package/dist/assets/index-Y1UZTZg-.css +0 -1
- package/dist/assets/layout-selection-ClQ295Xc.js +0 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function ke(o,i){(i==null||i>o.length)&&(i=o.length);for(var s=0,c=Array(i);s<i;s++)c[s]=o[s];return c}function wn(o){if(Array.isArray(o))return o}function Cn(o,i){var s=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(s!=null){var c,f,d,S,lt=[],P=!0,ct=!1;try{if(d=(s=s.call(o)).next,i!==0)for(;!(P=(c=d.call(s)).done)&&(lt.push(c.value),lt.length!==i);P=!0);}catch(Pt){ct=!0,f=Pt}finally{try{if(!P&&s.return!=null&&(S=s.return(),Object(S)!==S))return}finally{if(ct)throw f}}return lt}}function Mn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pn(o,i){return wn(o)||Cn(o,i)||xn(o,i)||Mn()}function xn(o,i){if(o){if(typeof o=="string")return ke(o,i);var s={}.toString.call(o).slice(8,-1);return s==="Object"&&o.constructor&&(s=o.constructor.name),s==="Map"||s==="Set"?Array.from(o):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?ke(o,i):void 0}}const Ke=Object.entries,ve=Object.setPrototypeOf,kn=Object.isFrozen,vn=Object.getPrototypeOf,Un=Object.getOwnPropertyDescriptor;let R=Object.freeze,N=Object.seal,st=Object.create,Ze=typeof Reflect<"u"&&Reflect,ie=Ze.apply,ae=Ze.construct;R||(R=function(i){return i});N||(N=function(i){return i});ie||(ie=function(i,s){for(var c=arguments.length,f=new Array(c>2?c-2:0),d=2;d<c;d++)f[d-2]=arguments[d];return i.apply(s,f)});ae||(ae=function(i){for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return new i(...c)});const it=y(Array.prototype.forEach),Fn=y(Array.prototype.lastIndexOf),Ue=y(Array.prototype.pop),at=y(Array.prototype.push),zn=y(Array.prototype.splice),j=Array.isArray,_t=y(String.prototype.toLowerCase),te=y(String.prototype.toString),Fe=y(String.prototype.match),Tt=y(String.prototype.replace),ze=y(String.prototype.indexOf),Hn=y(String.prototype.trim),Gn=y(Number.prototype.toString),Bn=y(Boolean.prototype.toString),He=typeof BigInt>"u"?null:y(BigInt.prototype.toString),Ge=typeof Symbol>"u"?null:y(Symbol.prototype.toString),O=y(Object.prototype.hasOwnProperty),ht=y(Object.prototype.toString),b=y(RegExp.prototype.test),Z=Wn(TypeError);function y(o){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return ie(o,i,c)}}function Wn(o){return function(){for(var i=arguments.length,s=new Array(i),c=0;c<i;c++)s[c]=arguments[c];return ae(o,s)}}function p(o,i){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_t;if(ve&&ve(o,null),!j(i))return o;let c=i.length;for(;c--;){let f=i[c];if(typeof f=="string"){const d=s(f);d!==f&&(kn(i)||(i[c]=d),f=d)}o[f]=!0}return o}function Yn(o){for(let i=0;i<o.length;i++)O(o,i)||(o[i]=null);return o}function I(o){const i=st(null);for(const c of Ke(o)){var s=Pn(c,2);const f=s[0],d=s[1];O(o,f)&&(j(d)?i[f]=Yn(d):d&&typeof d=="object"&&d.constructor===Object?i[f]=I(d):i[f]=d)}return i}function jn(o){switch(typeof o){case"string":return o;case"number":return Gn(o);case"boolean":return Bn(o);case"bigint":return He?He(o):"0";case"symbol":return Ge?Ge(o):"Symbol()";case"undefined":return ht(o);case"function":case"object":{if(o===null)return ht(o);const i=o,s=k(i,"toString");if(typeof s=="function"){const c=s(i);return typeof c=="string"?c:ht(c)}return ht(o)}default:return ht(o)}}function k(o,i){for(;o!==null;){const c=Un(o,i);if(c){if(c.get)return y(c.get);if(typeof c.value=="function")return y(c.value)}o=vn(o)}function s(){return null}return s}function $n(o){try{return b(o,""),!0}catch{return!1}}const Be=R(["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","search","section","select","shadow","slot","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"]),ee=R(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ne=R(["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"]),Xn=R(["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"]),oe=R(["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"]),Vn=R(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),We=R(["#text"]),Ye=R(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),re=R(["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","dominant-baseline","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","mask-type","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-orientation","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"]),je=R(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),Mt=R(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qn=N(/{{[\w\W]*|^[\w\W]*}}/g),Kn=N(/<%[\w\W]*|^[\w\W]*%>/g),Zn=N(/\${[\w\W]*/g),Jn=N(/^data-[\-\w.\u00B7-\uFFFF]+$/),Qn=N(/^aria-[\-\w]+$/),$e=N(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),to=N(/^(?:\w+script|data):/i),eo=N(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),no=N(/^html$/i),oo=N(/^[a-z][.\w]*(-[.\w]+)+$/i),Xe=N(/<[/\w!]/g),Ve=N(/<[/\w]/g),ro=N(/<\/no(script|embed|frames)/i),io=N(/\/>/i),x={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ao=function(){return typeof window>"u"?null:window},so=function(i,s){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let c=null;const f="data-tt-policy-suffix";s&&s.hasAttribute(f)&&(c=s.getAttribute(f));const d="dompurify"+(c?"#"+c:"");try{return i.createPolicy(d,{createHTML(S){return S},createScriptURL(S){return S}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},qe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Y=function(i,s,c,f){return O(i,s)&&j(i[s])?p(f.base?I(f.base):{},i[s],f.transform):c};function Je(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ao();const i=r=>Je(r);if(i.version="3.4.13",i.removed=[],!o||!o.document||o.document.nodeType!==x.document||!o.Element)return i.isSupported=!1,i;let s=o.document;const c=s,f=c.currentScript;o.DocumentFragment;const d=o.HTMLTemplateElement,S=o.Node,lt=o.Element,P=o.NodeFilter,ct=o.NamedNodeMap;ct===void 0&&(o.NamedNodeMap||o.MozNamedAttrMap),o.HTMLFormElement;const Pt=o.DOMParser,gt=o.trustedTypes,$=lt.prototype,Qe=k($,"cloneNode"),xt=k($,"remove"),tn=k($,"nextSibling"),J=k($,"childNodes"),X=k($,"parentNode"),se=k($,"shadowRoot"),kt=k($,"attributes"),D=S&&S.prototype?k(S.prototype,"nodeType"):null,v=S&&S.prototype?k(S.prototype,"nodeName"):null,Et=S&&S.prototype?k(S.prototype,"ownerDocument"):null;if(typeof d=="function"){const r=s.createElement("template");r.content&&r.content.ownerDocument&&(s=r.content.ownerDocument)}let w,V="",vt,le=!1,ut=0;const ce=function(){if(ut>0)throw Z('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Q=function(t){ce(),ut++;try{return w.createHTML(t)}finally{ut--}},en=function(t){ce(),ut++;try{return w.createScriptURL(t)}finally{ut--}},nn=function(){return le||(vt=so(gt,f),le=!0),vt},At=s,Ut=At.implementation,ue=At.createNodeIterator,on=At.createDocumentFragment,rn=At.getElementsByTagName,an=c.importNode;let T=qe();i.isSupported=typeof Ke=="function"&&typeof X=="function"&&Ut&&Ut.createHTMLDocument!==void 0;const sn=qn,ln=Kn,cn=Zn,un=Jn,fn=Qn,pn=to,fe=eo,mn=oo;let pe=$e,h=null;const Ft=p({},[...Be,...ee,...ne,...oe,...We]);let _=null;const zt=p({},[...Ye,...re,...je,...Mt]);let A=Object.seal(st(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}})),ft=null,me=null;const H=Object.seal(st(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let de=!0,Ht=!0,Te=!1,he=!0,G=!1,B=!0,q=!1,Gt=!1,yt=null,St=null,Bt=!1,tt=!1,bt=!1,Ot=!1,_e=!0,ge=!1;const Ee="user-content-";let Wt=!0,Rt=!1,et={},U=null;const Yt=p({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ae=null;const ye=p({},["audio","video","img","source","image","track"]);let jt=null;const Se=p({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Nt="http://www.w3.org/1998/Math/MathML",It="http://www.w3.org/2000/svg",F="http://www.w3.org/1999/xhtml";let nt=F,$t=!1,Xt=null;const dn=p({},[Nt,It,F],te),be=R(["mi","mo","mn","ms","mtext"]);let Vt=p({},be);const Oe=R(["annotation-xml"]);let qt=p({},Oe);const Tn=p({},["title","style","font","a","script"]);let pt=null;const hn=["application/xhtml+xml","text/html"],_n="text/html";let g=null,ot=null;const gn=s.createElement("form"),Re=function(t){return t instanceof RegExp||t instanceof Function},Kt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ot&&ot===t)return;(!t||typeof t!="object")&&(t={}),t=I(t),pt=hn.indexOf(t.PARSER_MEDIA_TYPE)===-1?_n:t.PARSER_MEDIA_TYPE,g=pt==="application/xhtml+xml"?te:_t,h=Y(t,"ALLOWED_TAGS",Ft,{transform:g}),_=Y(t,"ALLOWED_ATTR",zt,{transform:g}),Xt=Y(t,"ALLOWED_NAMESPACES",dn,{transform:te}),jt=Y(t,"ADD_URI_SAFE_ATTR",Se,{transform:g,base:Se}),Ae=Y(t,"ADD_DATA_URI_TAGS",ye,{transform:g,base:ye}),U=Y(t,"FORBID_CONTENTS",Yt,{transform:g}),ft=Y(t,"FORBID_TAGS",I({}),{transform:g}),me=Y(t,"FORBID_ATTR",I({}),{transform:g}),et=O(t,"USE_PROFILES")?t.USE_PROFILES&&typeof t.USE_PROFILES=="object"?I(t.USE_PROFILES):t.USE_PROFILES:!1,de=t.ALLOW_ARIA_ATTR!==!1,Ht=t.ALLOW_DATA_ATTR!==!1,Te=t.ALLOW_UNKNOWN_PROTOCOLS||!1,he=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,G=t.SAFE_FOR_TEMPLATES||!1,B=t.SAFE_FOR_XML!==!1,q=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,bt=t.RETURN_DOM_FRAGMENT||!1,Ot=t.RETURN_TRUSTED_TYPE||!1,Bt=t.FORCE_BODY||!1,_e=t.SANITIZE_DOM!==!1,ge=t.SANITIZE_NAMED_PROPS||!1,Wt=t.KEEP_CONTENT!==!1,Rt=t.IN_PLACE||!1,pe=$n(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:$e,nt=typeof t.NAMESPACE=="string"?t.NAMESPACE:F,Vt=O(t,"MATHML_TEXT_INTEGRATION_POINTS")&&t.MATHML_TEXT_INTEGRATION_POINTS&&typeof t.MATHML_TEXT_INTEGRATION_POINTS=="object"?I(t.MATHML_TEXT_INTEGRATION_POINTS):p({},be),qt=O(t,"HTML_INTEGRATION_POINTS")&&t.HTML_INTEGRATION_POINTS&&typeof t.HTML_INTEGRATION_POINTS=="object"?I(t.HTML_INTEGRATION_POINTS):p({},Oe);const e=O(t,"CUSTOM_ELEMENT_HANDLING")&&t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING=="object"?I(t.CUSTOM_ELEMENT_HANDLING):st(null);if(A=st(null),O(e,"tagNameCheck")&&Re(e.tagNameCheck)&&(A.tagNameCheck=e.tagNameCheck),O(e,"attributeNameCheck")&&Re(e.attributeNameCheck)&&(A.attributeNameCheck=e.attributeNameCheck),O(e,"allowCustomizedBuiltInElements")&&typeof e.allowCustomizedBuiltInElements=="boolean"&&(A.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),N(A),G&&(Ht=!1),bt&&(tt=!0),et&&(h=p({},We),_=st(null),et.html===!0&&(p(h,Be),p(_,Ye)),et.svg===!0&&(p(h,ee),p(_,re),p(_,Mt)),et.svgFilters===!0&&(p(h,ne),p(_,re),p(_,Mt)),et.mathMl===!0&&(p(h,oe),p(_,je),p(_,Mt))),H.tagCheck=null,H.attributeCheck=null,O(t,"ADD_TAGS")&&(typeof t.ADD_TAGS=="function"?H.tagCheck=t.ADD_TAGS:j(t.ADD_TAGS)&&(h===Ft&&(h=I(h)),p(h,t.ADD_TAGS,g))),O(t,"ADD_ATTR")&&(typeof t.ADD_ATTR=="function"?H.attributeCheck=t.ADD_ATTR:j(t.ADD_ATTR)&&(_===zt&&(_=I(_)),p(_,t.ADD_ATTR,g))),O(t,"ADD_URI_SAFE_ATTR")&&j(t.ADD_URI_SAFE_ATTR)&&p(jt,t.ADD_URI_SAFE_ATTR,g),O(t,"FORBID_CONTENTS")&&j(t.FORBID_CONTENTS)&&(U===Yt&&(U=I(U)),p(U,t.FORBID_CONTENTS,g)),O(t,"ADD_FORBID_CONTENTS")&&j(t.ADD_FORBID_CONTENTS)&&(U===Yt&&(U=I(U)),p(U,t.ADD_FORBID_CONTENTS,g)),Wt&&(h["#text"]=!0),q&&p(h,["html","head","body"]),h.table&&(p(h,["tbody"]),delete ft.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const n=w;w=t.TRUSTED_TYPES_POLICY;try{V=Q("")}catch(a){throw w=n,a}}else t.TRUSTED_TYPES_POLICY===null?(w=void 0,V=""):(w===void 0&&(w=nn()),w&&typeof V=="string"&&(V=Q("")));R&&R(t),ot=t},Ne=p({},[...ee,...ne,...Xn]),Ie=p({},[...oe,...Vn]),En=function(t,e,n){return e.namespaceURI===F?t==="svg":e.namespaceURI===Nt?t==="svg"&&(n==="annotation-xml"||Vt[n]):!!Ne[t]},An=function(t,e,n){return e.namespaceURI===F?t==="math":e.namespaceURI===It?t==="math"&&qt[n]:!!Ie[t]},yn=function(t,e,n){return e.namespaceURI===It&&!qt[n]||e.namespaceURI===Nt&&!Vt[n]?!1:!Ie[t]&&(Tn[t]||!Ne[t])},Sn=function(t){let e=X(t);(!e||!e.tagName)&&(e={namespaceURI:nt,tagName:"template"});const n=_t(t.tagName),a=_t(e.tagName);return Xt[t.namespaceURI]?t.namespaceURI===It?En(n,e,a):t.namespaceURI===Nt?An(n,e,a):t.namespaceURI===F?yn(n,e,a):!!(pt==="application/xhtml+xml"&&Xt[t.namespaceURI]):!1},W=function(t){at(i.removed,{element:t});try{X(t).removeChild(t)}catch{if(xt(t),!X(t))throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Dt=function(t){mt(t);const e=J(t);if(e){const a=[];it(e,l=>{at(a,l)}),it(a,l=>{try{xt(l)}catch{}})}const n=kt(t);if(n)for(let a=n.length-1;a>=0;--a){const l=n[a],u=l&&l.name;if(typeof u=="string")try{t.removeAttribute(u)}catch{}}},K=function(t,e){try{at(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch{at(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),t==="is")if(tt||bt)try{W(e)}catch{}else try{e.setAttribute(t,"")}catch{}},bn=function(t){const e=kt(t);if(e)for(let n=e.length-1;n>=0;--n){const a=e[n],l=a&&a.name;if(!(typeof l!="string"||_[g(l)]))try{t.removeAttribute(l)}catch{}}},mt=function(t){const e=[t];for(;e.length>0;){const n=e.pop();(D?D(n):n.nodeType)===x.element&&bn(n);const l=J(n);if(l)for(let u=l.length-1;u>=0;--u)e.push(l[u])}},On=function(t){if(!B)return;const e=[t];for(;e.length>0;){const n=e.pop(),a=D?D(n):n.nodeType;if(a===x.processingInstruction||a===x.comment&&b(Ve,n.data)){try{xt(n)}catch{}continue}if(a===x.element){const u=n,m=g(v?v(n):n.nodeName);try{u.hasAttribute&&u.hasAttribute("patchsrc")&&u.removeAttribute("patchsrc"),u.hasAttribute&&u.hasAttribute("for")&&m!=="label"&&m!=="output"&&u.removeAttribute("for")}catch{}}const l=J(n);if(l)for(let u=l.length-1;u>=0;--u)e.push(l[u])}},De=function(t){let e=null,n=null;if(Bt)t="<remove></remove>"+t;else{const u=Fe(t,/^[\r\n\t ]+/);n=u&&u[0]}pt==="application/xhtml+xml"&&nt===F&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=w?Q(t):t;if(nt===F)try{e=new Pt().parseFromString(a,pt)}catch{}if(!e||!e.documentElement){e=Ut.createDocument(nt,"template",null);try{e.documentElement.innerHTML=$t?V:a}catch{}}const l=e.body||e.documentElement;return t&&n&&l.insertBefore(s.createTextNode(n),l.childNodes[0]||null),nt===F?rn.call(e,q?"html":"body")[0]:q?e.documentElement:l},Le=function(t){const e=Et?Et(t):t.ownerDocument;return ue.call(e||t,t,P.SHOW_ELEMENT|P.SHOW_COMMENT|P.SHOW_TEXT|P.SHOW_PROCESSING_INSTRUCTION|P.SHOW_CDATA_SECTION,null)},Lt=function(t){return t=Tt(t,sn," "),t=Tt(t,ln," "),t=Tt(t,cn," "),t},Zt=function(t){var e;t.normalize();const n=Et?Et(t):t.ownerDocument,a=ue.call(n||t,t,P.SHOW_TEXT|P.SHOW_COMMENT|P.SHOW_CDATA_SECTION|P.SHOW_PROCESSING_INSTRUCTION,null);let l=a.nextNode();for(;l;)l.data=Lt(l.data),l=a.nextNode();const u=(e=t.querySelectorAll)===null||e===void 0?void 0:e.call(t,"template");u&&it(u,m=>{rt(m.content)&&Zt(m.content)})},wt=function(t){const e=v?v(t):null;return typeof e!="string"||g(e)!=="form"?!1:typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||t.attributes!==kt(t)||typeof t.removeAttribute!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function"||t.nodeType!==D(t)||t.childNodes!==J(t)},rt=function(t){if(!D||typeof t!="object"||t===null)return!1;try{return D(t)===x.documentFragment}catch{return!1}},dt=function(t){if(!D||typeof t!="object"||t===null)return!1;try{return typeof D(t)=="number"}catch{return!1}};function z(r,t,e){r.length!==0&&it(r,n=>{n.call(i,t,e,ot)})}const Rn=function(t,e){return!!(B&&t.hasChildNodes()&&!dt(t.firstElementChild)&&b(Xe,t.textContent)&&b(Xe,t.innerHTML)||B&&t.namespaceURI===F&&e==="style"&&dt(t.firstElementChild)||t.nodeType===x.processingInstruction||B&&t.nodeType===x.comment&&b(Ve,t.data))},Nn=function(t,e,n){if(!ft[e]&&Pe(e)&&(A.tagNameCheck instanceof RegExp&&b(A.tagNameCheck,e)||A.tagNameCheck instanceof Function&&A.tagNameCheck(e)))return!1;if(Wt&&!U[e]){const a=X(t),l=J(t);if(l&&a){const u=l.length;for(let m=u-1;m>=0;--m){const E=t===n?Qe(l[m],!0):l[m];a.insertBefore(E,tn(t))}}}return W(t),!0},we=function(t,e,n,a){return t.length===0?e:e===n||e===a?I(e):e},Ce=function(t,e){if(z(T.beforeSanitizeElements,t,null),t!==e&&X(t)===null)return Rt&&mt(t),!0;if(wt(t))return W(t),!0;const n=g(v?v(t):t.nodeName);if(h=we(T.uponSanitizeElement,h,Ft,yt),z(T.uponSanitizeElement,t,{tagName:n,allowedTags:h}),t!==e&&X(t)===null)return Rt&&mt(t),!0;if(Rn(t,n))return W(t),!0;if(ft[n]||!(H.tagCheck instanceof Function&&H.tagCheck(n))&&!h[n]){const l=Nn(t,n,e);return l===!1&&z(T.afterSanitizeElements,t,null),l}if((D?D(t):t.nodeType)===x.element&&!Sn(t)||(n==="noscript"||n==="noembed"||n==="noframes")&&b(ro,t.innerHTML))return W(t),!0;if(G&&t.nodeType===x.text){const l=Lt(t.textContent);t.textContent!==l&&(at(i.removed,{element:t.cloneNode()}),t.textContent=l)}return z(T.afterSanitizeElements,t,null),!1},Me=function(t,e,n){if(me[e]||B&&e==="patchsrc"||B&&e==="for"&&t!=="label"&&t!=="output"||_e&&(e==="id"||e==="name")&&(n in s||n in gn))return!1;const a=_[e]||H.attributeCheck instanceof Function&&H.attributeCheck(e,t);if(!(Ht&&b(un,e))){if(!(de&&b(fn,e))){if(a){if(!jt[e]){if(!b(pe,Tt(n,fe,""))){if(!((e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&ze(n,"data:")===0&&Ae[t])){if(!(Te&&!b(pn,Tt(n,fe,"")))){if(n)return!1}}}}}else if(!(Pe(t)&&(A.tagNameCheck instanceof RegExp&&b(A.tagNameCheck,t)||A.tagNameCheck instanceof Function&&A.tagNameCheck(t))&&(A.attributeNameCheck instanceof RegExp&&b(A.attributeNameCheck,e)||A.attributeNameCheck instanceof Function&&A.attributeNameCheck(e,t))||e==="is"&&A.allowCustomizedBuiltInElements&&(A.tagNameCheck instanceof RegExp&&b(A.tagNameCheck,n)||A.tagNameCheck instanceof Function&&A.tagNameCheck(n))))return!1}}return!0},In=p({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Pe=function(t){return!In[_t(t)]&&b(mn,t)},Dn=function(t,e,n,a){if(w&&typeof gt=="object"&&typeof gt.getAttributeType=="function"&&!n)switch(gt.getAttributeType(t,e)){case"TrustedHTML":return Q(a);case"TrustedScriptURL":return en(a)}return a},Ln=function(t,e,n,a){try{n?t.setAttributeNS(n,e,a):t.setAttribute(e,a),wt(t)?W(t):Ue(i.removed)}catch{K(e,t)}},xe=function(t){z(T.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||wt(t))return;_=we(T.uponSanitizeAttribute,_,zt,St);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_,forceKeepAttr:void 0};let a=e.length;const l=g(t.nodeName);for(;a--;){const u=e[a],m=u.name,E=u.namespaceURI,C=u.value,M=g(m),Qt=C;let L=m==="value"?Qt:Hn(Qt);if(n.attrName=M,n.attrValue=L,n.keepAttr=!0,n.forceKeepAttr=void 0,z(T.uponSanitizeAttribute,t,n),L=n.attrValue,ge&&(M==="id"||M==="name")&&ze(L,Ee)!==0&&(K(m,t),L=Ee+L),B&&b(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,L)){K(m,t);continue}if(M==="attributename"&&Fe(L,"href")){K(m,t);continue}if(!n.forceKeepAttr){if(!n.keepAttr){K(m,t);continue}if(!he&&b(io,L)){K(m,t);continue}if(G&&(L=Lt(L)),!Me(l,M,L)){K(m,t);continue}L=Dn(l,M,E,L),L!==Qt&&Ln(t,m,E,L)}}z(T.afterSanitizeAttributes,t,null)},Ct=function(t){let e=null;const n=Le(t);for(z(T.beforeSanitizeShadowDOM,t,null);e=n.nextNode();)if(z(T.uponSanitizeShadowNode,e,null),Ce(e,t),xe(e),rt(e.content)&&Ct(e.content),(D?D(e):e.nodeType)===x.element){const l=se(e);rt(l)&&(Jt(l),Ct(l))}z(T.afterSanitizeShadowDOM,t,null)},Jt=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const n=e.pop();if(n.shadow){Ct(n.shadow);continue}const a=n.node,u=(D?D(a):a.nodeType)===x.element,m=J(a);if(m)for(let E=m.length-1;E>=0;--E)e.push({node:m[E],shadow:null});if(u){const E=v?v(a):null;if(typeof E=="string"&&g(E)==="template"){const C=a.content;rt(C)&&e.push({node:C,shadow:null})}}if(u){const E=se(a);rt(E)&&e.push({node:null,shadow:E},{node:E,shadow:null})}}};return i.sanitize=function(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,n=null,a=null,l=null;if($t=!r,$t&&(r="<!-->"),typeof r!="string"&&!dt(r)&&(r=jn(r),typeof r!="string"))throw Z("dirty is not a string, aborting");if(!i.isSupported)return r;Gt?(h=yt,_=St):Kt(t),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(h=I(h)),T.uponSanitizeAttribute.length>0&&(_=I(_)),i.removed=[];const u=Rt&&typeof r!="string"&&dt(r);if(u){On(r);const C=v?v(r):r.nodeName;if(typeof C=="string"){const M=g(C);if(!h[M]||ft[M])throw Dt(r),Z("root node is forbidden and cannot be sanitized in-place")}if(wt(r))throw Dt(r),Z("root node is clobbered and cannot be sanitized in-place");try{Jt(r)}catch(M){throw Dt(r),M}}else if(dt(r))e=De("<!---->"),n=e.ownerDocument.importNode(r,!0),n.nodeType===x.element&&n.nodeName==="BODY"||n.nodeName==="HTML"?e=n:e.appendChild(n),Jt(n);else{if(!tt&&!G&&!q&&r.indexOf("<")===-1)return w&&Ot?Q(r):r;if(e=De(r),!e)return tt?null:Ot?V:""}e&&Bt&&W(e.firstChild);const m=u?r:e;try{const C=Le(m);for(;a=C.nextNode();)Ce(a,m),xe(a),rt(a.content)&&Ct(a.content)}catch(C){throw u&&(Dt(r),it(i.removed,M=>{M.element&&mt(M.element)})),C}if(u)return it(i.removed,C=>{C.element&&mt(C.element)}),G&&Zt(r),r;if(tt){if(G&&Zt(e),bt)for(l=on.call(e.ownerDocument);e.firstChild;)l.appendChild(e.firstChild);else l=e;return(_.shadowroot||_.shadowrootmode)&&(l=an.call(c,l,!0)),l}let E=q?e.outerHTML:e.innerHTML;return q&&h["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&b(no,e.ownerDocument.doctype.name)&&(E="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
|
|
3
|
+
`+E),G&&(E=Lt(E)),w&&Ot?Q(E):E},i.setConfig=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Kt(r),Gt=!0,yt=h,St=_},i.clearConfig=function(){ot=null,Gt=!1,yt=null,St=null,w=vt,V=""},i.isValidAttribute=function(r,t,e){ot||Kt({});const n=g(r),a=g(t);return Me(n,a,e)},i.addHook=function(r,t){typeof t=="function"&&O(T,r)&&at(T[r],t)},i.removeHook=function(r,t){if(O(T,r)){if(t!==void 0){const e=Fn(T[r],t);return e===-1?void 0:zn(T[r],e,1)[0]}return Ue(T[r])}},i.removeHooks=function(r){O(T,r)&&(T[r]=[])},i.removeAllHooks=function(){T=qe()},i}var lo=Je();export{lo as default};
|