amis-rpc-design/dist/3672.ec397cd3.bundle.js

2 lines
537 KiB
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/*! For license information please see 3672.ec397cd3.bundle.js.LICENSE.txt */
(self.webpackChunkamis_rpc_design=self.webpackChunkamis_rpc_design||[]).push([[3672],{80214:function(e){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,n,r){if("string"!=typeof e)return new t.Bootstrap(e,n,r);var a=document.querySelectorAll(e);n&&n.iframe_document&&(a=n.iframe_document.querySelectorAll(e));for(var o=[],i=0;i<a.length;i++){var s=a[i]["data-froala.editor"];s?o.push(s):o.push(new t.Bootstrap(a[i],n,r))}return 1==o.length?o[0]:o}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var a=arguments[r];if(null!=a)for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},writable:!0,configurable:!0}),function(){var e=/^\s*:scope/gi,t=/,\s*:scope/gi,n=document.createElement("div");function r(r,a){var o=r[a];r[a]=function(r){var a,i=!1,s=!1;if(r&&(r.match(e)||r.match(t))){this.parentNode||(n.appendChild(this),s=!0);var l=this.parentNode;return this.id||(this.id="rootedQuerySelector_id_".concat((new Date).getTime()),i=!0),a=o.call(l,r.replace(e,"#".concat(this.id)).replace(t,",#".concat(this.id))),i&&(this.id=""),s&&n.removeChild(this),a}return o.call(this,r)}}try{n.querySelectorAll(":scope *")}catch(e){r(Element.prototype,"querySelector"),r(Element.prototype,"querySelectorAll"),r(HTMLElement.prototype,"querySelector"),r(HTMLElement.prototype,"querySelectorAll")}}(),t.RegisterPlugins=function(e){for(var n=0;n<e.length;n++)e[n].call(t)},Object.assign(t,{DEFAULTS:{initOnClick:!1,pluginsEnabled:null},MODULES:{},PLUGINS:{},VERSION:"3.1.0",INSTANCES:[],OPTS_MAPPING:{},SHARED:{},ID:0}),t.MODULES.node=function(e){var n=e.$;function r(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]}function a(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&0<=t.BLOCK_TAGS.indexOf(e.tagName.toLowerCase())}function o(e){var t={},n=e.attributes;if(n)for(var r=0;r<n.length;r++){var a=n[r];t[a.nodeName]=a.value}return t}function i(e){for(var t="",n=o(e),r=Object.keys(n).sort(),a=0;a<r.length;a++){var i=r[a],s=n[i];s.indexOf("'")<0&&0<=s.indexOf('"')?t+=" ".concat(i,"='").concat(s,"'"):(0<=s.indexOf('"')&&0<=s.indexOf("'")&&(s=s.replace(/"/g,"&quot;")),t+=" ".concat(i,'="').concat(s,'"'))}return t}function s(t){return t===e.el}return{isBlock:a,isEmpty:function(n,o){if(!n)return!0;if(n.querySelector("table"))return!1;var i=r(n);1===i.length&&a(i[0])&&(i=r(i[0]));for(var s=!1,l=0;l<i.length;l++){var c=i[l];if(!(o&&e.node.hasClass(c,"fr-marker")||c.nodeType===Node.TEXT_NODE&&0===c.textContent.length)){if("BR"!==c.tagName&&0<(c.textContent||"").replace(/\u200B/gi,"").replace(/\n/g,"").length)return!1;if(s)return!1;"BR"===c.tagName&&(s=!0)}}return!(n.querySelectorAll(t.VOID_ELEMENTS.join(",")).length-n.querySelectorAll("br").length||n.querySelector("".concat(e.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||1<n.querySelectorAll(t.BLOCK_TAGS.join(",")).length||n