@codady/axui
Version:
The AXUI front-end framework is built on HTML5, CSS3, and JavaScript standards, with TypeScript used for type management. It has no library dependencies and is designed to meet diverse needs with a focus on design.
15 lines • 752 kB
JavaScript
/*!
* @since Last modified: 2025-3-29 21:6:38
* @name AXUI front-end framework.
* @version 3.0.35
* @author AXUI development team <3217728223@qq.com>
* @description The AXUI front-end framework is built on HTML5, CSS3, and JavaScript standards, with TypeScript used for type management.
* @see {@link https://www.axui.cn|Official website}
* @see {@link https://github.com/codady/axui/issues|github issues}
* @see {@link https://gitee.com/codady/axui/issues|Gitee issues}
* @see {@link https://www.npmjs.com/package/@codady/axui|NPM}
* @issue QQ Group No.1:952502085
* @copyright This software supports the MIT License, allowing free learning and commercial use, but please retain the terms 'ax,' 'axui,' 'AX,' and 'AXUI' within the software.
* @license MIT license
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ax=e()}(this,(function(){"use strict";const getComputedVar=t=>getComputedStyle(document.documentElement).getPropertyValue(t).trim(),t=getComputedVar("--PREFIX"),e=getComputedVar("--ALIAS"),s={initial:!0,support:!1,privacy:!1,lang:{name:"zh-CN",support:{content:"由于AXUI使用了<code>:has</code>的css伪类选择器,而您的浏览器相对陈旧,请更新至<code>Chrome105</code>以上内核的浏览器!",cancel:"下次再提醒我",confirm:"我知道了"},privacy:{content:"我们使用Cookie来确保您在我们的网站上获得最佳体验,并为您提供个性化服务。继续浏览即表示您同意我们的Cookie政策。",cancel:"拒绝",confirm:"接受"},ajax:{abort:`<i class="${t}c-warn">中止了请求!</i>`,timeout:`<i class="${t}c-error">请求超时了!</i>`,error:`<i class="${t}c-error">错误状态:{{this.status}}</i>`,submit:{btn:"正在提交",succ:"恭喜,提交成功!",fail:"对不起,提交失败!"}},more:{unfold:"收起",fold:"折叠"},button:{default:"新按钮",confirm:"确定",cancel:"取消",clear:"清除",close:"关闭",reset:"重置",submit:"提交",now:"现在",prev:"上一个",next:"下一个"},placehold:{note:"请写上备注内容!",fileName:"新文件",downloadName:"下载文件"},form:{placeholder:"请输入...",fileLabel:"请选择文件...",fileMulti:"{{this.data}}个文件:",maxLength:"最多可输入{{this.total}}个字符,已输入{{this.value}}个,还可以输入{{this.remaining}}个。",minLength:"至少输入{{this.min}}个字符,已输入{{this.value}}个,还要输入{{this.remaining}}个。",limitLength:"至少输入{{this.min}}个字符,最多可输入{{this.max}}个字符,已输入{{this.value}}个。",maxNumber:"最大取值{{this.max}}。",minNumber:"最小取值{{this.min}}。",limitNumber:"取值范围{{this.min}}~{{this.max}}。",exceed:"已超限。",range:"取值范围{{this.min}}~{{this.max}}。"},range:{result:"结果:{{this.multiple?this.range[0]+'-'+this.range[1]:this.value}}"},valid:{regLocal:"一-龥",types:{a:"小写字母",A:"大写字母",d:"数字","~":"特殊字符","@":"中文字符"},message:{wrongRule:"校验规则错误,请修正!",wrongFormat:"值格式错误,应该为文本格式!",noValids:"表单没有任何校验字段!"},strFormat:"值格式错误,应该为文本格式!",arrFormat:"参数格式错误,应该为数组格式!",succ:'{{ this.label || "" }}通过校验!',fail:'{{ this.label || "" }}校验失败!',required:"{{ this.label }}是必填项!",email:"{{ this.label }}请填写正确的邮箱!",cellphone:"{{ this.label }}请填写11位手机号!",landline:"{{ this.label }}请填写正确的座机号码!",ip:"{{ this.label }}请填写正确的IP地址!",id:"{{ this.label }}请填写正确的身份证号!",zip:"{{ this.label }}只能填写6位数字邮编!",url:"{{ this.label }}请填写正确的域名!",plate:"{{ this.label }}请填写正确的车牌号!",locale:"{{ this.label }}只能填写中文!",letter:"{{ this.label }}只能填写大小写英文字母!",string:"{{ this.label }}只能填写大小写英文字母和数字!",password:"{{ this.label }}只能填写大小写英文字母、数字以及特殊字符!",ymdhms:"{{ this.label }}只能填写类似2022-11-13 2:56:12的日期格式!",ymd:"{{ this.label }}只能填写类似2022-11-13的日期格式!",hms:"{{ this.label }}只能填写类似2:56:12的日期格式!",ym:"{{ this.label }}只能填写类似2022-11的日期格式!",y:"{{ this.label }}只能填写4位数字年份!",m:"{{ this.label }}只能填写1~12月份!",d:"{{ this.label }}只能填写1~31日!",date:"{{ this.label }}请填写有效的日期!",integer:"{{ this.label }}只能填写非0开头的正整数!",number:"{{ this.label }}只能填写数字,包括正数、负数、整数、小数!","date=":"{{ this.label }}只能是{{ this.data }}!","date>":"{{ this.label }}需超过{{ this.data }}!","date>=":"{{ this.label }}不可早于{{ this.data }}!","date<":"{{ this.label }}不可超过{{ this.data }}!","date<=":"{{ this.label }}不可晚于{{ this.data }}!","date><":"{{ this.label }}需超过{{ this.data[0] }},且不可超过{{ this.data[1] }}!","date><=":"{{ this.label }}需超过{{ this.data[0] }},且不可超过或等于{{ this.data[1] }}!","date>=<":"{{ this.label }}需超过或等于{{ this.data[0] }},且不可超过{{ this.data[1] }}!","date>=<=":"{{ this.label }}不可早于{{ this.data[0] }},且不可晚于{{ this.data[1] }}!","than=":"{{ this.label }}需要等于{{ this.data }}!","than>":"{{ this.label }}需要大于{{ this.data }}!","than>=":"{{ this.label }}需要大于或等于{{ this.data }}!","than<":"{{ this.label }}需要小于{{ this.data }}!","than<=":"{{ this.label }}需要小于或等于{{ this.data }}!","than><":"{{ this.label }}需要大于{{ this.data[0] }},且小于{{ this.data[1] }}!","than><=":"{{ this.label }}需要大于{{ this.data[0] }}个,且小于等于{{ this.data[1] }}!","than>=<":"{{ this.label }}需要大于等于{{ this.data[0] }}个,且小于{{ this.data[1] }}!","than>=<=":"{{ this.label }}需要大于等于{{ this.data[0] }}个,且小于等于{{ this.data[1] }}!","length=":"{{ this.label }}已输入{{ this.value.length }}个字符,只能填写{{ this.data }}个字符!","length>":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于{{ this.data }}个!","length>=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量不可少于{{ this.data }}个!","length<":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需少于{{ this.data }}个!","length<=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量不可多于{{ this.data }}个!","length><":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于{{ this.data[0] }}个,且少于{{ this.data[1] }}个!","length><=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于{{ this.data[0] }}个,且少于或等于{{ this.data[1] }}个!","length>=<":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量需多于或等于{{ this.data[0] }}个,且少于{{ this.data[1] }}个!","length>=<=":"{{ this.label }}已输入{{ this.value.length }}个字符,字符数量不可少于{{ this.data[0] }}个,且不可多于{{ this.data[1] }}个!","count=":"{{ this.label }}有{{ this.value }}项,必须且只能选择{{ this.data }}项!","count>":"{{ this.label }}有{{ this.value }}项,选择项需要多于{{ this.data }}!","count>=":"{{ this.label }}有{{ this.value }}项,至少选择{{ this.data }}项!","count<":"{{ this.label }}有{{ this.value }}项,选择项需要少于{{ this.data }}!","count<=":"{{ this.label }}有{{ this.value }}项,最多选择{{ this.data }}项!","count><":"{{ this.label }}有{{ this.value }}项,选择项需多于{{ this.data[0] }},且少于{{ this.data[1] }}!","count><=":"{{ this.label }}有{{ this.value }}项,选择项需多于{{ this.data[0] }},且少于或等于{{ this.data[1] }}!","count>=<":"{{ this.label }}有{{ this.value }}项,选择项需多于或等于{{ this.data[0] }},且少于{{ this.data[1] }}!","count>=<=":"{{ this.label }}有{{ this.value }}项,至少选择{{ this.data[0] }}项,且不能多于{{ this.data[1] }}项!",include:'{{ this.label }}的值应该在"{{ this.data }}"之中!',exclude:'{{ this.label }}的值不能在"{{ this.data }}"之中!',same:'{{ this.label }}字段值与"{{ this.data[1] || this.data[0] }}"字段值不一致!',different:'{{ this.label }}字段值不能与"{{ this.data[1] || this.data[0] }}"字段值一致!',strength:"{{ this.label }}的当前强度为{{ this.value}},要求达到{{ this.data }}!",specific:"{{ this.label }}要求{{ for(let k in this.data){/}}{{k+'至少'+this.data[k]+'个'}}{{ (Object.keys(this.data).slice(-1)[0] !== k)? ',':''}}{{}/}}!",combine:"{{ this.label }}要求{{ this.data.types.join('、') }}至少{{ this.data.total }}种!"},status:{warn:"有警告",succ:"完成了",error:"有报错",issue:"有疑问",info:"有消息",confirm:"已确认",cancel:"已取消",forbid:"已禁用"},message:{heading:{warn:"操作警告!",succ:"操作成功!",error:"操作失败!",issue:"操作疑问!",info:"信息提示!"},content:{warn:"警告!运行过程中可能存在故障,请注意排查!",succ:"恭喜!运行顺利或者操作成功!",error:"失败!运行过程中发生了错误或操作失败!",issue:"有疑问!运行过程中遇到一些问题需要解决!",info:"提示!运行中未出现状况,请继续!"}},tree:{label:"新分支",title:{folder:"新增枝干分支",file:"新增叶子分支",edit:"编辑分支",remove:"删除分支",arrow:"点击折叠或展开"},message:{remove:'确定要删除"{{this.label}}"分支么'},paginated:{more:"查看更多",next:"下一页",first:"返回首页",info:'"{{this.label}}"还剩{{this.rest}}条信息',main:"主分支"},result:`<i ${e}="holder">还未选择...</i>`},accordion:{label:"新板块",content:"新内容",extra:"更多内容",title:{add:"新增板块",edit:"编辑板块",remove:"删除板块",arrow:"点击折叠或展开"},message:{remove:'确定要删除"{{this.label}}"板块么'}},tab:{label:"新标签",content:"新内容",title:{add:"新增页签",edit:"编辑页签",close:"删除页签",move:"移动页签",update:"更新页签"},message:{add:'确定要新增"{{this.label}}"页签么',edit:'确定要编辑"{{this.label}}"页签么',close:'确定要删除"{{this.label}}"页签么',move:'确定要移动"{{this.label}}"页签么',update:'确定要更新"{{this.label}}"页签么'}},flat:{label:"新项目"},spy:{isObserved:"媒体文件{{ this.src }}已经处于监听状态,不需要添加监听操作!",isUnobserved:"媒体文件{{ this.src }}还未被监听,不需要取消监听操作!"},tags:{emptyholder:"还没有创建标签!",placeholder:"请输入...",includePart:"包含了重复的标签!",includeFull:"标签完全重复,添加失败!"},retrieval:{status:"共有<u>{{this.value}}</u>个结果符合<s>{{this.keys}}</s>要求!",nullKeys:"没有检索词且没有检索结果!"},drag:{holderDrag:"转移中...",holderDrop:"释放到这里..."},progress:{complete:"已完成!",tips:"当前进度"},infinite:{finish:"没有更多内容了",error:"请求终止,已停止加载",next:'<ax-btn width="x5">查看更多</ax-btn>',preload:"等待加载数据",loading:"正在加载数据",loaded:"单页数据加载完成!"},virtualize:{preload:"等待加载数据"},pagination:{first:"首页",last:"尾页",prev:"上一页",next:"下一页",ellipsis:"...",tips:"{{this.current}}/{{this.pages}}",total:"共有{{this.total}}条数据",locate:"跳到",count:"每页",page:"页",unit:"条"},datetime:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],week:["一","二","三","四","五","六","日"],weeks:["周日","周一","周二","周三","周四","周五","周六"],year:{prev:"上一页",next:"下一页",placeholder:"输入年份"},range:{hyphen:"至",checkbox:"选择同一天"},unit:{Y:"年",M:"月",D:"日",W:"周",h:"时",m:"分",s:"秒"},bc:"公元前",daytime:{select:"时间选择",start:"开始时间",end:"结束时间"},toolTip:{restore:"还原初始值",reset:"归零",now:"设为当前时间",close:"关闭时间选择器"},empty:`<i class="${t}c-ignore">还未选择日期!</i>`,message:{requireTwoValue:"区间模式至少需要选择两个日期!",requireYearFormat:"请填入正确的年份格式!",requireOneSelected:"请至少选择一个日期!"},noEvent:`<i class="${t}c-ignore">今天没有需要安排的事项!</i>`},rate:{title:{dft:"暂无评星",clear:"评星归零"},template:{result:"{{this.stars}}星",tooltip:"{{this.stars}}星,总分:{{this.value}}"},star:"星"},editor:{defer:"点击加载内容",placeholder:"请输入...",path:"路径:",chars:"文字:",paras:"段落:",fontsizeDft:"默认字号",alignDft:"默认排列",tagsDft:"特殊标签",tips:{bold:"加粗",italic:"斜体",through:"删除线",underline:"下划线",alignDft:"默认对齐",alignLeft:"左对齐",alignRight:"右对齐",alignCenter:"居中对齐",alignJustify:"两端对齐",indentMore:"增加缩进",indentLess:"减少缩进",sub:"下标",sup:"上标",highlight:"高亮(MARK)",em:"强调(EM)",ruby:"拼音(RUBY)",rt:"拼音(RT)",address:"地址(ADDRESS)",time:"时间(TIME)",blockquote:"段落引用(BLOCKQUOTE)",cite:"行内引用(CITE)",codeInline:"行内代码(CODE)",codeBlock:"代码块(PRE+CODE)",source:"源码模式",heading:"设置标题",hr:"插入水平线(HR)",br:"插入换行符(BR)",p:"插入段落符(P)",listOl:"有序列表(OL+LI)",listUl:"无序列表(UL+LI)",listCheck:"任务列表(CHECKBOX)",paragraph:"插入段落(DIV+BR)",fontSet:"文字设置",fontSize:"字号大小",fontColor:"文字颜色",fontBg:"文字背景色",h1:"一号标题",h2:"二号标题",h3:"三号标题",h4:"四号标题",h5:"五号标题",h6:"六号标题",text:"正文"}},select:{placeholder:"请选择...",title:{close:"清空"},search:{fail:'没有找到符合"{{this.keys}}"的选项',succ:'找到了{{this.value}}项符合"{{this.keys}}"',start:"还没有输入检索关键字",placeholder:"请输入关键字..."},check:{ed:"未勾选,选择全部",ing:"勾选了部分,选择全部",none:"已勾选全部,取消全部"},stats:"已选择了{{this.value}}/{{this.total}}项"},upload:{paste:{before:"点击这里粘贴上传",ing:"请使用ctrl+v组合键",after:"完成了粘贴!"},tips:{suffix:"支持{{this.value}}格式",size:"单文件子节数不超过{{this.value}}MB",min:"至少上传{{this.value}}个文件",max:"最多上传{{this.value}}个文件",free:"上传文件未做限制"},progress:{passed:"文件合格",notPassed:"文件不合格",rendered:"等待上传",uploading:"上传中",uploaded:"已上传",received:"已接收",getAuth:"获取授权中",authorized:"已授权",unauthorized:"未获得授权",failed:"上传失败"},summary:"提交了{{this.total}}个文件,成功上传了{{this.count}}个,共{{this.size}}",message:{single:{passed:"通过校验!",max:"文件数量太多,请删除!",size:"文件体积太大,请删除!",suffix:"文件格式错误,请删除!",success:"上传成功!",failed:"提交地址可能错误,请删除!"},global:{passed:"所有文件通过校验!",min:"请至少上传{{this.value}}个文件!",max:"最多只能上传{{this.value}}个文件,可先删除再添加!"}},button:{choose:"选择文件",upload:"批量上传",clear:"批量删除",gallery:"点击或拖拽上传",picture:"选择文件"},thead:["图示","文件名","文件体积","上传进度","实时消息","上传状态","操作"]},confirm:{heading:""},twilight:{day:"白天",night:"黑夜"}},attrs:{ajaxSpin:"spinning",ajaxState:"ajax"},debounce:200,throttle:500,rootStart:-1,idStart:0,floorStart:0,pathHyphen:"~",rangeHyphen:"~",labelHyphen:"/",splitHyphen:",",wordHyphen:" ",actClass:`${t}opened`,reqProp:"REQRETRY",parser:"new Function",warn:{init:"The initialization process of the instance has been stopped. You will need to manually initialize it using the init() method later!",emptyCont:"Data was not obtained, but execution was not halted!"},error:{parse:"Getting data from HTML resulted in an error, an empty array was returned, but execution was not interrupted!"},message:{},valid:{regChars:"~!@#$%^&*",lengthStr:6},popup:{},alert:{},more:{},menu:{},tree:{},drawer:{}},isNull=t=>[void 0,null,"undefined","null"].includes(t),augment=function(t){if(isNull(t)||!t.name)return;let e;if(t.target&&"ax"!==t.target){for(let s in this)if(this[s].name===t.target){e=this[s];break}if(!e)throw new Error(`Cannot find the ${t.target} property in the ax object!`)}else e=this;"method"===t.type?e[e.prototype?"prototype":"__proto__"][t.name]=t.data:Reflect.set(e,t.name,t.data)},getDataType=t=>{let e,s=Object.prototype.toString.call(t).slice(8,-1);return e="Function"===s&&/^\s*class\s+/.test(t.toString())?"Class":"Object"===s&&Object.getPrototypeOf(t)!==Object.prototype?"Instance":s,e},isEmpty=t=>{let e,s=getDataType(t);return e=!t||("Object"===s?0===Object.keys(t).length:"Array"===s?""===t.join(""):"Function"===s?"{}"===t.toString().replace(/\s+/g,"").match(/{.*}/g)[0]:"Symbol"===s&&"()"===t.toString().replace(/\s+/g,"").match(/\(.*\)/g)[0]),e},getEl=(t,e)=>{let s=getDataType(t),i=getDataType(e).includes("HTML")?e:document.querySelector(e),a=null;if(t)if(s.includes("HTML"))a=t;else if("String"===s)try{a=(i||document).querySelector(t.trim())}catch{a=null}return a},deepClone=t=>{let e,s=getDataType(t);if("Object"===s){let s={},i=Object.getOwnPropertySymbols(t);for(let e in t)s[e]=deepClone(t[e]);if(i.length>0)for(let e of i)s[e]=deepClone(t[e]);e=s}else e="Array"===s?t.map((t=>deepClone(t))):"Date"===s?new Date(t):t;return e},deepMerge=(t,e,s)=>{let i=getDataType(t),a=getDataType(e),l=Object.assign({arrAppend:!1,propAppend:!0,targetClone:!1,override:"partial"},s),n=l.targetClone?deepClone(t):t;if("Object"!==i||"Object"!==a)return n;for(let t in e)if(e.hasOwnProperty(t)&&n.hasOwnProperty(t)){let s=getDataType(n[t]),i=getDataType(e[t]);s!==i?"partial"===l.override&&n.hasOwnProperty(t)&&n[t]?.hasOwnProperty("enable")&&"boolean"==typeof e[t]?n[t]?.hasOwnProperty("enable")&&"boolean"==typeof e[t]?n[t].enable=e[t]:e[t]?.hasOwnProperty("enable")&&"boolean"==typeof n[t]?n=Object.assign({enable:n[t]},e[t]):n[t]=e[t]:n[t]=e[t]:"Object"===i?n[t]=deepMerge(n[t],e[t],l):"Array"===i&&l.arrAppend?n[t].push(...e[t]):n[t]=e[t]}else e.hasOwnProperty(t)&&!n.hasOwnProperty(t)&&l.propAppend&&(n[t]=e[t]);let r=Object.getOwnPropertySymbols(e);if(r.length>0)for(let t of r)n[t]=e[t];return n},requireTypes=(t,e,s)=>{let i=getDataType(t).toLowerCase(),a="string"==typeof e?[e]:e;if(i.includes("html")&&(i="element"),a=a.map((t=>t.toLowerCase())),s)try{if(!a.includes(i))throw new Error(`Wrong data type,Require types: "${""+a}"!`)}catch(t){s(t)}else if(!a.includes(i))throw new Error(`Wrong data type,Require types: "${""+a}"!`)},parseStr=({content:t="",type:e="object",method:i=s.parser,catchable:a=!1,error:l})=>{let n={start:"object"===e?"{":"[",end:"object"===e?"}":"]",return:"object"===e?{}:"array"===e?[]:null},r=n.return;if(!t)return n.return;let o=t.trim();if(["object","array"].includes(e)&&(!o.startsWith(n.start)||!o.endsWith(n.end)))return r;try{r="function"==typeof i?i(o):"JSON.parse"===i?JSON.parse(o):new Function(`"use strict"; return ${o}`)()}catch(t){if(l&&l(t),a)throw t}return r},strToJson=(t,e="object")=>{let s="array"===e?[]:{};if("string"!=typeof t)return s;if(!(t=t.trim()))return s;t=t.startsWith("[")&&t.endsWith("]")||t.startsWith("{")&&t.endsWith("}")?t:`{${t}}`;try{return parseStr({content:t,type:e,catchable:!0})}catch{return s}},attrToJson=(t,e)=>{requireTypes(e,"string");let s=getEl(t),i=s.getAttribute(e),a={};return s&&e&&i&&(a=strToJson(i)),a},extend=({target:t={},source:e={},host:s=null,attr:i=""})=>{let a=getDataType(t),l=getEl(s);return"Object"!==a||(e&&deepMerge(t,e),l&&i&&deepMerge(t,attrToJson(l,i))),t},i={frame:0,ajaxStorage:[0,0,0,0,0,0,0,0,0,0],prefix:t,alias:e,compSign:"comp",embedSign:"embed",namePfx:"TMP_",messages:[],valids:[],config:s,augment:augment,tasks:[],install(t,e){!isEmpty(e)&&extend({target:this.config,source:e}),t.config.globalProperties.$ax=this}},a=["input","file","textarea","range","number","datetime","upload","select","radio","checkbox","radios","checkboxes"],renderTpl=(t,e)=>{if(requireTypes(t,"string"),requireTypes(e,["array","object"]),!t||0===Object.keys(e).length)return"";let s,i=new RegExp("\\{\\{([\\s\\S]+?)?\\}\\}","g"),a='"use strict";let str=[];\n',l=0,n="",add=(t,e)=>(a+=e?t.endsWith("/")?t.replace("=>","=>").slice(0,-1)+"\n":"str.push("+t+");\n":""!==t?'str.push("'+t.replace(/"/g,'\\"')+'");\n':"",add);for(;s=i.exec(t);)add(t.slice(l,s.index))(s[1],!0),l=s.index+s[0].length;add(t.slice(l)),a+="return str.join('');";try{n=new Function(a.replace(/[\r\t\n]/g,"")).apply(e)}catch(t){}return n},getScreenSize=()=>getComputedVar("--SCREEN"),startUpper=t=>(t=t.trim()).slice(0,1).toUpperCase()+t.slice(1),sliceStrEnd=({str:t="",key:e="#",type:s="afterend",contain:i=!0})=>{t=t.toString();let a="",l=0,n=(e=e.toString()).length,r=t.length,o=0;return t&&e?((t=t.trim()).includes(e)&&("beforebegin"===s?(l=t.indexOf(e),i&&(l+=n),r=l):"afterbegin"===s?(l=t.indexOf(e),!i&&(l+=n),o=l):"beforeend"===s?(l=t.lastIndexOf(e),i&&(l+=n),r=l):"afterend"===s&&(l=t.lastIndexOf(e),!i&&(l+=n),o=l),a=t.substring(o,r)),a):a},delay=function({duration:t=2e3,todo:e,doing:s,done:i,frame:a=0}){return t<0&&Promise.reject(new Error("Invalid duration")),e&&e(a),new Promise(((e,l)=>{try{t||(i&&i(a),e(a));let l=Date.now()+t,listen=()=>{Date.now()>=l?(cancelAnimationFrame(a),i&&i(a),e(a),a=0):(a=requestAnimationFrame(listen),s&&s(a))};listen()}catch(t){l(t)}}))},getPlaces=t=>t.toString().split(".")[1]?.length||0,toNumber=(t,e)=>{let s=0,i=Number(t),a=Object.assign({places:10,mode:"round",zero:!1,epsilon:!0},e);if(!t||!i)return 0;if(a.places<0)return i;{let t=i+(a.epsilon?Number.EPSILON:0),e=Number(`1${"0".repeat(a.places)}`),l=t*e;if(s="floor"===a.mode?Math.floor(l)/e:"ceil"===a.mode?Math.ceil(l)/e:Math.round(l)/e,a.zero){let t=getPlaces(s);a.places>t&&(s=s+(t?"":".")+"0".repeat(a.places-t))}return s}},toPixel=(e,s)=>{let i=0;return e?(s=s||parseInt(getComputedVar(`--${t}fs-base`))||10,"string"==typeof e?i=(e=e.trim()).endsWith("rem")||e.endsWith("REM")?~~(toNumber(e.replace("rem","").replace("REM",""))*s):e.endsWith("px")||e.endsWith("PX")?~~toNumber(e.replace("px","").replace("PX","")):~~e:"number"==typeof e&&(i=~~e),i):i},preventDft=(t,e=!1)=>{t.cancelable&&t.preventDefault(),e&&t.stopPropagation()},l="ontouchstart"in document.documentElement,n=l?["touchstart","touchmove","touchend","touchcancel"]:["mousedown","mousemove","mouseup","mouseleave"],r={font:{succ:`<i class="${t}icon-check-o"></i>`,error:`<i class="${t}icon-close-o"></i>`,warn:`<i class="${t}icon-warn-o"></i>`,info:`<i class="${t}icon-info-o"></i>`,issue:`<i class="${t}icon-issue-o"></i>`,"succ-t":`<i class="${t}icon-check-o-t"></i>`,"error-t":`<i class="${t}icon-close-o-t"></i>`,"warn-t":`<i class="${t}icon-warn-o-t"></i>`,"info-t":`<i class="${t}icon-info-o-t"></i>`,"issue-t":`<i class="${t}icon-issue-o-t"></i>`,"succ-f":`<i class="${t}icon-check-o-f"></i>`,"error-f":`<i class="${t}icon-close-o-f"></i>`,"warn-f":`<i class="${t}icon-warn-o-f"></i>`,"info-f":`<i class="${t}icon-info-o-f"></i>`,"issue-f":`<i class="${t}icon-issue-o-f"></i>`},svg:{succ:`<svg class="${t}svg-succ" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${t}line ${t}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}in-1" d="M26.316,42.859L37.9984,54.5414L60.3826,32.1572"></path></svg>`,error:`<svg class="${t}svg-error" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${t}line ${t}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}in-1" d="M28.774,57.9246L57.9247,28.7739"></path><path class="${t}line ${t}in-2" d="M57.9246,57.9246L28.7739,28.7739"></path></svg>`,warn:`<svg class="${t}svg-warn" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${t}line ${t}bg" d="M43.4611 7.24c2.8081,0.0924 4.39,1.7 5.3045,3.1159l17.4543 29.9414 17.3445 29.7538c0.5448,1.0193 1.596,4.0544 0.1109,6.4168 -1.4849,2.3626 -3.6815,2.9155 -5.3768,2.992l-34.9082 0.0002 -34.6892 -0.0002c-1.1636,-0.0421 -4.3433,-0.6583 -5.6666,-3.1131 -1.3232,-2.4549 -0.7085,-4.6157 0.0723,-6.1078l17.454 -29.9417 17.3449 -29.7537c0.6185,-0.977 2.7471,-3.396 5.5554,-3.3036z"></path><path class="${t}line ${t}out" d="M43.4611 7.24c2.8081,0.0924 4.39,1.7 5.3045,3.1159l17.4543 29.9414 17.3445 29.7538c0.5448,1.0193 1.596,4.0544 0.1109,6.4168 -1.4849,2.3626 -3.6815,2.9155 -5.3768,2.992l-34.9082 0.0002 -34.6892 -0.0002c-1.1636,-0.0421 -4.3433,-0.6583 -5.6666,-3.1131 -1.3232,-2.4549 -0.7085,-4.6157 0.0723,-6.1078l17.454 -29.9417 17.3449 -29.7537c0.6185,-0.977 2.7471,-3.396 5.5554,-3.3036z"></path><path class="${t}line ${t}in-1" d="M43.3493,27.8713L43.3493,57.2858"></path><circle class="${t}circle ${t}in-2" cx="43.3492" cy="64.3337" r="2.1166"></circle></svg>`,info:`<svg class="${t}svg-info" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${t}line ${t}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}in-1" d="M43.3493,65.0602L43.3493,30.9723"></path><circle class="${t}circle ${t}in-2" cx="43.3492" cy="23.5856" r="2.1166"></circle></svg>`,issue:`<svg class="${t}svg-issue" xmlns="http://www.w3.org/2000/svg" width="86.6986mm" height="86.6986mm" viewBox="0 0 86.6986 86.6986"><path class="${t}line ${t}bg" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}out" d="M7.238500000000002,43.3493A36.1108,36.1108 0,1,1 79.4601,43.3493A36.1108,36.1108 0,1,1 7.238500000000002,43.3493"></path><path class="${t}line ${t}in-1" d="M32.3757 35.7255c-0.2203,-11.823 12.5789,-14.1087 18.4056,-9.4189 5.4663,4.3995 4.7426,12.804 -3.1088,17.9938 -3.0015,1.9839 -3.0003,3.8403 -3.0003,10.1707"></path><circle class="${t}circle ${t}in-2" cx="44.6612" cy="60.5502" r="2.1166"></circle></svg>`}},getFullGap=()=>getComputedVar(`--${t}g-full`),o={x:{axis:"x",position:"left",overflow:"overflowX",inner:"clientWidth",outer:"offsetWidth",scroll:"scrollLeft",client:"clientX",size:"width",index:4,offset:"offsetLeft",gap:"marginLeft"},y:{axis:"y",position:"top",overflow:"overflowY",inner:"clientHeight",outer:"offsetHeight",scroll:"scrollTop",client:"clientY",size:"height",index:5,offset:"offsetTop",gap:"marginTop"}},h={data:[],destroyFun:t=>{if(!t)return!1;t.ins.hasOwnProperty("destroyed")&&t.ins.destroyed||!t.ins.__proto__.destroy||(t.ins.destroy(),t.destTime=Date.now())},initFun:t=>{if(!t)return!1;t.ins.hasOwnProperty("destroyed")&&!t.ins.destroyed||!t.ins.__proto__.init||(t.ins.init(),t.initTime=Date.now())},push:function(t,e="",s=""){if(!t)return!1;let i={name:e,ins:t,type:s,pushTime:Date.now()};return this.data.some((e=>e.ins===t))||this.data.push(i),this},find:function(t,e="",s=!1){if(!t)return null;let i;return i=this.data.find((i=>{let a=!e||i.type===e;return i.ins.hasOwnProperty("destroyed")?i.name===t&&i.ins.destroyed===s&&a:i.name===t&&a})),i?i.ins:null},findAll:function(t="",e=!1){let s=[];return s=t?this.data.filter((s=>s.ins.hasOwnProperty("destroyed")?s.type===t&&s.ins.destroyed===e:s.type===t)):this.data.filter((t=>t.ins.destroyed===e)),s.length>0?s.map((t=>t.ins)):[]},destroy:function(t,e){if(!t)return!1;let s=e?this.data.find((s=>s.name===t&&s.type===e)):this.data.find((e=>e.name===t));return s&&this.destroyFun(s),this},destroyAll:function(t){return(t?this.data.filter((e=>e.type===t)):this.data).forEach((t=>{this.destroyFun(t)})),this},clear:function(){return this.data.forEach((t=>{this.destroyFun(t)})),this.data.length=0,this},init:function(t,e){if(!t)return!1;let s=e?this.data.find((s=>s.name===t&&s.type===e)):this.data.find((e=>e.name===t));return s&&this.initFun(s),this},initAll:function(t){return(t?this.data.filter((e=>e.type===t)):this.data).forEach((t=>{this.initFun(t)})),this}},getEls=(t,e)=>{let s=getDataType(t),i=getEl(e)||document,a=[];return isEmpty(t)?a:(s.includes("HTML")?a.push(t):"String"===s?a=(t=t.trim()).split(",").map((t=>[...i.querySelectorAll(t)])).flat():"Array"===s&&(a=t.map((t=>getEl(t,i)))),a.filter(Boolean))},createEl=(t,e,s)=>{let i=(t=t||"div").toUpperCase().trim(),a=document.createElement(i),l=getDataType(e);if(e&&"Object"===l)for(let t in e)e.hasOwnProperty(t)&&a.setAttribute(t,e[t]);return((t,e)=>{if(""===e||null==e)return!1;let s=getDataType(e);if("TEMPLATE"===i)t.innerHTML=e.toString();else if("Array"===s&&e.length>0)for(let s of e){if(getDataType(s).includes("HTML"))t.appendChild(s);else{let e=createEl(s.name,s.attrs,s.content);e&&t.appendChild(e)}}else if(s.includes("HTML"))t.appendChild(e);else if("String"===s&&e.trim().startsWith("#")&&e.trim().length>1){let s=getEl(e);if(!s)return;"TEMPLATE"===s.nodeName?t.appendChild(s.content.cloneNode(!0)):t.insertAdjacentHTML("beforeEnd",s.innerHTML)}else t.insertAdjacentHTML("beforeEnd",e)})(a,s),a},trim=(t,e)=>(requireTypes(t,"string"),"start"===e?t.trimStart():"end"===e?t.trimEnd():"both"===e?t.trim():"global"===e?t.replace(/[\s\r\n]+/g,""):t.trim().replace(/[\s\r\n]+/g," ")),allToEls=(t,e)=>{if(isEmpty(t))return[];let i=[],a=getDataType(t);if(a.includes("HTML"))i.push(t);else if("String"===a){let a=trim(t),l=a.includes(s.splitHyphen)?s.splitHyphen:s.wordHyphen;a.split(l).forEach((t=>{let s=getEl(t,e);s&&i.push(s)}))}else"Array"===a?t.forEach((t=>{let s=getEl(t,e);s&&i.push(s)})):"NodeList"===a&&(i=[...t]);return i},ajax=t=>{if(isEmpty(t))throw new Error("There is no options!");let a={target:"",url:"",type:"post",async:!0,data:null,holdTime:0,stopTime:36e5,contType:"",headers:{},respType:"",catchable:!1,spinStr:"<ax-spin></ax-spin>",spinSel:"",xhrName:"",repeat:{index:0,max:0,keyword:""},xhrFields:{},abort:t=>{},timeout:t=>{},opened:t=>{},before:t=>{},downloading:t=>{},uploading:t=>{},complete:t=>{},success:t=>{},error:t=>{},cb:t=>{}};extend({target:a,source:t}),!a.type&&(a.type="post");let l=createEl("span",{[e]:"message"}),n=getEl(a.target);n&&(n.innerHTML="",n.appendChild(l));let r,o=allToEls(a.spinSel),h=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");if(!isEmpty(a.data)){let t=getDataType(a.data);"FormData"===t?r=a.data:"Object"===t?a.contType?.includes("json")?r=JSON.stringify(a.data):(r=new URLSearchParams(a.data).toString(),a.contType="application/x-www-form-urlencoded"):(a.data=a.data.trim(),r=a.data.startsWith("&")||a.data.startsWith("?")?a.data.slice(1):a.data,a.contType="application/x-www-form-urlencoded")}if(a.contType&&(a.headers["Content-Type"]=a.contType,!a.contType.includes("urlencoded")&&"get"===a.type.toLowerCase()))throw new Error("Please request data with post!");h.timeout=a.stopTime,h.responseType=a.respType;let p,d,c,u={target:n,label:l,xhr:h,spins:o},abortFun=()=>{p&&h.removeEventListener("timeout",p),h.abort(),n&&n.setAttribute(s.attrs.ajaxState,"abort"),isEmpty(a.abort)?n&&(l.innerHTML=s.lang.ajax.abort):a.abort(Object.assign({status:h.status,content:h.response},u))};return new Promise(((t,e)=>{let progress=(t,e)=>{let s=t.loaded,i=t.total,l=0,n=0,r="0%",o=new Date(t.timeStamp).getTime();if(t.lengthComputable){l=s/i,n=Math.round(100*l),r=n+"%";let t=Object.assign({result:r,percent:n,current:s,total:i,ratio:l,time:o,status:h.status,abort:abortFun},u);e&&e(t),n>=100&&a.complete&&a.complete(t)}};h.upload.onprogress=t=>{progress(t,(t=>{!isEmpty(a.uploading)&&a.uploading(t)}))},h.onprogress=t=>{progress(t,(t=>{!isEmpty(a.downloading)&&a.downloading(t)}))},p=()=>{let t=Object.assign({status:h.status,content:h.response},u);n&&n.setAttribute(s.attrs.ajaxState,"timeout"),isEmpty(a.timeout)?n&&(l.innerHTML=s.lang.ajax.timeout):a.timeout(t),a.catchable&&e(t),a.cb&&a.cb(t)},d=t=>{var i;n&&n.setAttribute(s.attrs.ajaxState,"error"),isEmpty(a.error)?(i=t,n&&(l.innerHTML=renderTpl(s.lang.ajax.error,{status:i.status}))):a.error(t),a.catchable&&e(t),a.cb&&a.cb(t)},c=e=>{if(a.repeat.max&&a.repeat.keyword&&i.ajaxStorage[a.repeat.index]<a.repeat.max&&"string"==typeof e.content&&e.content.includes(a.repeat.keyword))ajax(a),i.ajaxStorage[a.repeat.index]++;else{if(i.ajaxStorage[a.repeat.index]=0,o.length>0)for(let t of o)t.removeAttribute(s.attrs.ajaxSpin);n&&n.setAttribute(s.attrs.ajaxState,"success"),isEmpty(a.success)?(l=e,n&&(n.innerHTML=l.content)):a.success(e),t(e),a.cb&&a.cb(e)}var l},h.addEventListener("timeout",p),h.onreadystatechange=function(){if(h.readyState<4){let e=Object.assign({status:h.status,content:a.spinStr,abort:abortFun},u);if(1===h.readyState&&(a.xhrName&&(this[a.xhrName]=h),!isEmpty(a.opened)&&a.opened(e)),o.length>0)for(let t of o)t.toggleAttribute(s.attrs.ajaxSpin,!0);n&&n.setAttribute(s.attrs.ajaxState,"before"),isEmpty(a.before)?(t=e,n&&(l.innerHTML=t.content)):a.before(e)}else{let t=Object.assign({status:h.status},u);if(h.status>=200&&h.status<300||304===h.status){if(a.respType&&"text"!==h.responseType)t.content=h.response;else{let e=createEl("div","",h.responseText),s="",i=/(<head\b[^<]*(?:(?!<\/head>)<[^<]*)*<\/head>)|(<\/?html.*?>)|(<\!DOCTYPE.*?html.*?>)|(<\/?body.*?>)/gi,l=sliceStrEnd({str:a.url}),n="string"==typeof a.data?a.data:l,r=getEl(n,e);s=r?r.innerHTML:(isEmpty(n)||r)&&(h.responseText.trim().startsWith("{")||h.responseText.trim().startsWith("["))?JSON.parse(h.responseText.trim()):h.responseText.replace(i,"").trim(),t.content=s}a.holdTime?delay({duration:a.holdTime,done:()=>{c(t)}}):c(t)}else t.content=h.response,a.holdTime?delay({duration:a.holdTime,done:()=>{d(t)}}):d(t)}var t};let g=[],m=null;"get"===a.type.toLowerCase()?g=["get",a.url+"?now="+Date.now()+"&"+r,a.async]:"post"===a.type.toLowerCase()&&(g=["post",a.url,a.async],m=r);for(let t in a.xhrFields)a.xhrFields.hasOwnProperty(t)&&(h[t]=a.xhrFields[t]);h.open(...g);for(let t in a.headers)a.headers.hasOwnProperty(t)&&h.setRequestHeader(t,a.headers[t]);h.send(m)}))},valToArr=(t,e,i=!0)=>{let a=getDataType(t),l=[];return[void 0,null,"undefined","null",""].includes(t)?l:("Array"===a?l=t.filter((t=>!isNull(t))):"String"===a?(l=t.trim().split(e||s.splitHyphen),l=l.filter((t=>""!==(t=t.trim())&&!isNull(t))),i&&(l=l.map((t=>isNaN(+t)?t:+t)))):l.push(t),[...new Set(l)])},getValsFromAttrs=t=>{let e=getEl(t),s={};if(e){s.label=e.textContent.trim(),[...e.attributes].forEach((t=>{s[t.name]=!!["selected","disabled","readonly","active","checked","expanded","draggable"].includes(t.name)||t.value.trim()})),!s.hasOwnProperty("value")&&(s.value=s.label),s.value&&!s.label&&(s.label=s.value)}return s},select2Tree=t=>{let e=getEl(t),s=[];if(!e)return s;let getJson=t=>{let e={node:t,...getValsFromAttrs(t)};return"OPTGROUP"==t.nodeName&&(e.children=[],[...t.children].forEach((t=>{e.children.push(getJson(t))}))),e};return s=(()=>{let t=[];return[...e.children].forEach((e=>{t.push(getJson(e))})),t})(),s},ul2Tree=(s,i="tree")=>{let a=getEl(s),l=[];if(!a)return l;let getJson=s=>{let a={node:s.firstElementChild},l=a.node.querySelector(`:scope> [${e}="label"]`),n=a.node.querySelector(`:scope> [${e}="badge"]`)||a.node.querySelector(":scope> AX-BADGE"),r=a.node.querySelector(`:scope> [${e}="tips"]`),o=a.node.querySelector(`:scope> [${e}="icon"]`),h=a.node.querySelector(`:scope> [${e}="disk"]`),p=a.node.querySelector(`:scope> [${e}="cube"]`),d=a.node.querySelector(`:scope> [${e}="custom"]`),c=s.querySelector(`:scope> .${t}${i}-brief`),u=s.querySelector(`:scope> .${t}${i}-cont`),g=s.querySelector(`:scope> .${t}${i}-extra`);a.node.classList.contains(`${t}${i}-head`)&&(a.headEl=a.node),l&&(a.labelEl=l),n&&(a.badgeEl=n),r&&(a.tipsEl=r),d&&(a.customEl=d),o&&(a.iconEl=o),h&&(a.diskEl=h),p&&(a.cubeEl=p),c&&(a.briefEl=c),u&&(a.contEl=u),g&&(a.extraEl=g),Object.assign(a,{...getValsFromAttrs(a.wrapEl),...getValsFromAttrs(a.node),...getValsFromAttrs(a.labelEl)}),a.headEl&&!a.labelEl&&(a.headEl.innerHTML="");let m=s.querySelector(":scope> ul,:scope> ol");return m&&(a.children=[],[...m.children].forEach((t=>{a.children.push(getJson(t))}))),a};return l=(()=>{let t=[];return[...a.children].forEach((e=>{t.push(getJson(e))})),t})(),l},getContent=async function(l){let n,r=getDataType(l.content),getListArr=t=>{let e,s,i=getEl(t,l.parent)||createEl("div",{},t),a=i.nodeName;if(i&&(e=["SELECT","DATALIST","UL","OL"].includes(a)?i:"TEMPLATE"===a?i.content.cloneNode(!0).querySelector("ul,ol,select,datalist"):i.querySelector("ul,ol,select,datalist")),e){let t=e.nodeName;s=["SELECT","DATALIST"].includes(t)?select2Tree(e):["UL","OL"].includes(t)?ul2Tree(e):[]}else s=[];return s},getIframe=s=>{let i={src:s},a=createEl("iframe",Object.assign(i,l.contData)),n=createEl("div",{[e]:"media"},a);return createEl("div",{class:`${t}box-iframe`},n)},getImage=s=>{let i={src:s},a=createEl("img",Object.assign(i,l.contData)),n=createEl("div",{[e]:"media"},a);return createEl("div",{class:`${t}box-image`},n)},getVideo=s=>{let i={src:s,controls:"controls"},a=createEl("video",Object.assign(i,l.contData)),n=createEl("div",{[e]:"media"},a);return createEl("div",{class:`${t}box-video`},n)},getAudio=s=>{let i={src:s,controls:"controls"},a=createEl("audio",Object.assign(i,l.contData)),n=createEl("div",{[e]:"media"},a);return createEl("div",{class:`${t}box-audio`},n)},getMedias=t=>{let e={iframe:getIframe,audio:getAudio,video:getVideo,image:getImage},i=valToArr(l.content,l.hyphen||s.splitHyphen).map((t=>t.trim())),a=[];for(let s of i)a.push(e[t](s));return a},getAsync=async t=>{let e,s=Object.assign({url:t,data:l.contData,success:t=>{e=t.content},cb:t=>{l.request&&l.request(t)}},l.ajax);return await ajax.call(this,s),e};if("Number"===r)n=l.content+"";else if("String"===r)if(l.content=l.content.trim(),"text"===l.contType)n=l.content;else if("html"===l.contType)n=getEl(l.content,l.parent)?getEl(l.content,l.parent).innerHTML:"";else if("node"===l.contType)n=getEl(l.content,l.parent);else if("list"===l.contType)n=getListArr(l.content);else if("form"===l.contType){let t=getEl(l.content,l.parent),e="TEMPLATE"===t?.nodeName?t.content.cloneNode(!0):t;n=e?.querySelector("form")||""}else if("iframe"===l.contType)n=getIframe(l.content);else if("iframes"===l.contType)n=getMedias("iframe");else if("image"===l.contType)n=getImage(l.content);else if("images"===l.contType)n=getMedias("image");else if("video"===l.contType)n=getVideo(l.content);else if("videos"===l.contType)n=getMedias("video");else if("audio"===l.contType)n=getAudio(l.content);else if("audios"===l.contType)n=getMedias("audio");else if("async"===l.contType)await getAsync(l.content).then((t=>{n=t}));else if("asyncs"===l.contType)await(async()=>{let t=valToArr(l.content,l.hyphen||s.splitHyphen),e=[];for(let s of t)await getAsync(s).then((t=>{e.push(t)}));return e})().then((t=>{n=t}));else if(a.includes(l.contType)){let t="datetime"===l.contType?{feature:"flat",full:!0}:"upload"===l.contType?{feature:"gallery"}:["radios","checkboxes","checkbox"].includes(l.contType)?{type:"text"}:{full:!0},e={[["checkboxes","radios","select"].includes(l.contType)?"content":["checkbox","radio"].includes(l.contType)?"label":"upload"===l.contType?"url":"file"===l.contType?"placeholder":"value"]:l.content,...t,...Object.assign({name:i.namePfx+Date.now()},l.contData)};n=createEl(`ax-${l.contType}`,e)}else n=l.content;else"Promise"===r?await l.content.then((t=>{n=t})):"AsyncFunction"===r?await l.content.call(this).then((t=>{n=t})):"Function"===r?n=l.content.call(this):"Object"===r||"Array"===r?"Object"===r&&l.content[s.reqProp]?await getContent(l.content).then((t=>{n=t})):n=deepClone(l.content):n=r.includes("HTML")&&"list"===l.contType?getListArr(l.content):l.content;return l.cb&&l.cb.call(this,n),n},style=(t,e)=>{let s=getEl(t);return s?document.defaultView.getComputedStyle(s,e):{}},getClasses=t=>{let e,i=[];return"Array"===getDataType(t)?i=t.filter((t=>t&&"string"==typeof t)):(e=(t=trim(t)).includes(s.splitHyphen)?s.splitHyphen:s.wordHyphen,i=t.split(e)),i.map((t=>trim(t,"global"))).filter(Boolean)},classes=t=>{let e=getEl(t);return{get:()=>e?getClasses(e.getAttrubute("class")):[],add:function(t,s){let i=getClasses(t);return e&&0!==i.length?(i.forEach((t=>{let i;s?(i=s(t),!0===i?e.classList.add(t):"string"==typeof i&&i&&e.classList.add(i)):e.classList.add(t)})),this):this},remove:function(t,s){let i=getClasses(t);return e&&0!==i.length?(i.forEach((t=>{let i;s?(i=s(t),!0===i?e.classList.remove(t):"string"==typeof i&&i&&e.classList.remove(i)):e.classList.remove(t)})),this):this},replace:function(t,s){return e&&t?(e&&s&&t&&(e.classList.remove(t),e.classList.add(s)),this):this},has:function(t){if(!e||isEmpty(t))return this;let s=getClasses(t);for(let t of s)if(!e.classList.contains(t))return!1;return!0}}},elState=t=>{let e,s=getEl(t),i=!!s;if(s){let t=getComputedStyle(s),a=!t.display,l="none"===t.display||"hidden"===t.visibility,n=!(!t.display||"none"===t.display);e={isExist:i,isVirtual:a,isHidden:l,isVisible:!(!n||"visible"!==t.visibility),isCalc:n,isUncalc:a||l}}else e={isExist:i,isCalc:!1,isUncalc:!0};return e},p=[{attr:"ins-name",prop:"insName",value:""},{attr:"stor-name",prop:"storName",value:""},{attr:"stor-keys",prop:"storKeys",value:[]},{attr:"breakpoints",prop:"breakpoints",value:{}},{attr:"lang",prop:"lang",value:{}},{attr:"b4-init",prop:"b4Init",value:null},{attr:"on-constructed",prop:"onConstructed",value:null},{attr:"on-initiate",prop:"onInitiate",value:null},{attr:"on-initiated",prop:"onInitiated",value:null},{attr:"on-destroyed",prop:"onDestroyed",value:null},{attr:"on-error",prop:"onError",value:null},{attr:"on-reset",prop:"onReset",value:null},{attr:"on-updated",prop:"onUpdated",value:null},{attr:"on-saved",prop:"onSaved",value:null},{attr:"on-clearedcache",prop:"onClearedCache",value:null},{attr:"on-updatedcache",prop:"onUpdatedCache",value:null}];const d=[{attr:"heading",prop:"heading",value:""},{attr:"divider",prop:"divider",value:!1},{attr:"duration",prop:"duration",value:0},{attr:"auto-dur",prop:"autoDur",value:!1},{attr:"asleep",prop:"asleep",value:!1},{attr:"dead-show",prop:"deadShow",value:!1},{attr:"keep-show",prop:"keepShow",value:!1},{attr:"classes",prop:"classes",value:""},{attr:"padding",prop:"padding",value:{enable:!0,value:""}},{attr:"content",prop:"content",value:""},{attr:"cont-type",prop:"contType",value:"text"},{attr:"cont-data",prop:"contData",value:{}},{attr:"ajax",prop:"ajax",value:{}},{attr:"act-class",prop:"actClass",value:s.actClass},{attr:"tpl-str",prop:"tplStr",value:""},{attr:"tpl-eng",prop:"tplEng",value:null},{attr:"z-index",prop:"zIndex",value:0},{attr:"dedicated",prop:"dedicated",value:!1},{attr:"can-click",prop:"canClick",value:null},{attr:"media",prop:"media",value:{caption:"",brief:""}},{attr:"auto-fill",prop:"autoFill",value:{enable:!1,inputSel:"",childSel:"",detectable:!1,attr:""}},{attr:"bullet",prop:"bullet",value:{enable:!1,type:"custom",parentNode:"ul",childNode:"li",unpadded:!1,hoverable:!1,divisible:!1,multiline:!1,cols:0,lines:"",action:null}},{attr:"tools",prop:"tools",value:{enable:!0,placement:"inside",children:["close"]}},{attr:"footer",prop:"footer",value:{enable:!0,layout:"plain",note:!1,divider:!1,padding:!1,children:["cancel","confirm"]}},{attr:"b4-show",prop:"b4Show",value:null},{attr:"b4-hide",prop:"b4Hide",value:null},{attr:"b4-fill",prop:"b4Fill",value:null},{attr:"b4-confirm",prop:"b4Confirm",value:null},{attr:"b4-cancel",prop:"b4Cancel",value:null},{attr:"on-show",prop:"onShow",value:null},{attr:"on-hide",prop:"onHide",value:null},{attr:"on-shown",prop:"onShown",value:null},{attr:"on-hidden",prop:"onHidden",value:null},{attr:"on-invalidated",prop:"onInvalidated",value:null},{attr:"on-validated",prop:"onValidated",value:null},{attr:"on-sended",prop:"onSended",value:null},{attr:"on-render",prop:"onRender",value:null},{attr:"on-rendered",prop:"onRendered",value:null},{attr:"on-updatedcont",prop:"onUpdatedCont",value:null},{attr:"on-transferred",prop:"onTransferred",value:null},{attr:"on-confirmed",prop:"onConfirmed",value:null},{attr:"on-canceled",prop:"onCanceled",value:null},{attr:"on-closed",prop:"onClosed",value:null},{attr:"on-cleared",prop:"onCleared",value:null},{attr:"on-request",prop:"onRequest",value:null},{attr:"on-bulletschecked",prop:"onBulletsChecked",value:null},{attr:"on-bulletsselected",prop:"onBulletsSelected",value:null},{attr:"on-targetset",prop:"onTargetSet",value:null},...p],c=[{attr:"placement",prop:"placement",value:"right"},{attr:"trigger",prop:"trigger",value:"click"},{attr:"offset",prop:"offset",value:"100px"},{attr:"size",prop:"size",value:"sm"},{attr:"parent",prop:"parent",value:""},{attr:"wing",prop:"wing",value:{selector:"",actClass:""}},{attr:"mask",prop:"mask",value:{enable:!0,closable:!0}},...d],getEvtTarget=t=>{if(t.targetTouches){let e=t.targetTouches[0]||t.changedTouches[0];return document.elementFromPoint(e.clientX,e.clientY)}return t.target},removeStyle=(t,e)=>{let s=getEl(t);s&&e&&(s.style.cssText=s.style.cssText.replace(`${e}:`,""))},addStyle=(t,e,s)=>{let i=getEl(t);if(e=(e+"").toLowerCase(),s+="",!i||!e||!s)return;let a=e.replace(/-([a-z])/g,((t,e)=>e.toUpperCase()));i.style[a]=s},isDateStr=t=>"string"==typeof t&&!isNaN(Date.parse(t)),getUTCTimestamp=t=>{let e,s,i,a=getDataType(t);return e="Date"===a?t:"String"===a?isDateStr(t)?new Date(t):new Date:"Number"===a?new Date(t):new Date,i=e.getTime(),s=6e4*e.getTimezoneOffset(),i+s},getExpiration=(t="d",e=365,s="locale")=>{let i;if(isDateStr(e))i=new Date(e);else switch(i=new Date,t){case"s":i.setSeconds(i.getSeconds()+~~e);break;case"m":i.setMinutes(i.getMinutes()+~~e);break;case"h":i.setHours(i.getHours()+~~e);break;default:i.setDate(i.getDate()+~~e)}return"utc"===s?getUTCTimestamp(i):i.getTime()},u={set:function(t,e,s){if(isEmpty(t)&&"string"!=typeof t)return;let i=Object.assign({unit:"d",expires:0,override:!0,type:"local"},s),a=deepClone(e),l=getDataType(e),n="session"===i.type?window.sessionStorage:window.localStorage,filterProps=t=>(Object.keys(t).forEach((e=>{let s=t[e],i=getDataType(s);["Array","Object"].includes(i)&&filterProps(s),(i.includes("HTML")||i.includes("Function")||["Promise","Symbol","Instance"].includes(i))&&delete t[e]})),t);["Array","Object"].includes(l)&&!isEmpty(a)&&filterProps(a);let r=0!==i.expires?getExpiration(i.unit,i.expires):0,o=this.get(t,i.type),h={data:!i.override&&this.get(t,i.type)?extend({target:o,source:a}):a,expires:r};return("number"==typeof i.expires&&i.expires<0||null===a)&&this.get(t,i.type)?this.remove(t,i.type):n.setItem(t,JSON.stringify(h)),this},get:function(t,e="local"){if(isEmpty(t)||"string"!=typeof t)return!1;let s=Date.now(),i="session"===e?window.sessionStorage:window.localStorage,a=i.getItem(t);if(a){let e=new Function('"use strict";return '+a)();return 0===e.expires||s<=e.expires?e.data:(i.removeItem(t),null)}return null},remove:function(t,e="local"){if(isEmpty(t)||"string"!=typeof t)return!1;return("session"===e?window.sessionStorage:window.localStorage).removeItem(t),this},clear:function(t="local"){return("session"===t?window.sessionStorage:window.localStorage).clear(),this}},g=[{attr:"deep",prop:"deep",value:{enable:!1,include:[],exclude:[]}},{attr:"filter",prop:"filter",value:null},{attr:"tpyes",prop:"tpyes",value:["Object","Array","Function"]},{attr:"accept",prop:"accept",value:!0},{attr:"lenient",prop:"lenient",value:!0},{attr:"once",prop:"once",value:!1},{attr:"methods",prop:"methods",value:["set","delete"]},{attr:"on-added",prop:"onAdded",value:null},{attr:"on-edited",prop:"onEdited",value:null},{attr:"on-set",prop:"onSet",value:null},{attr:"on-deleted",prop:"onDeleted",value:null},{attr:"on-crud",prop:"onCrud",value:null},{attr:"on-new",prop:"onNew",value:null},{attr:"on-applied",prop:"onApplied",value:null},{attr:"on-trigger",prop:"onTrigger",value:null},{attr:"on-completed",prop:"onCompleted",value:null},...p],deepEqual=(t,e)=>{if(t===e)return!0;let s=getDataType(t);if(s===getDataType(e)&&"Object"===s){let getStr=t=>{let e=new Set;return JSON.stringify(t,((t,s)=>{if("object"==typeof s&&null!==s){if(e.has(s))return;e.add(s)}return s}))};return getStr(t)===getStr(e)}return!1},isProxy=t=>!0===t?._isProxy,unique=(t,e)=>{let s;if(isEmpty(t))s=[...t];else if(s=[...new Set(t)],"object"==typeof s[0]&&e){let t=new Map;for(let i of s)!t.has(i[e])&&t.set(i[e],i);s=[...t.values()]}return s},m={handle:(t,e,s)=>{let i=[];if("String"===e?i=(t=trim(t)).includes(",")?t.split(","):t.split(" "):"Array"===e&&(i=t.map((t=>trim(t)))),i.length>0)for(let t of i)s(t)},add:function(t,e,s){let i=getDataType(t);return this.handle(t,i,(t=>(t=>{e.plans.hasOwnProperty(t)||(e.plans[t]=[]);let i=s.toString().replace(/\s/g,"").replace(/\;/g,"").match(/{(\S*)}/),a=e.plans[t].toString().replace(/\s/g,"").replace(/\;/g,"");i&&!a.includes(i[1])&&e.plans[t].push(s)})(t))),this},remove:function(t,e,s){let i=getDataType(t);return this.handle(t,i,(t=>(t=>{if(e.plans.hasOwnProperty(t))if(s){let i=e.plans[t].findIndex((t=>t===s));if(i<0)return;e.plans[t].splice(i,1),0===e.plans[t].length&&delete e.plans[t]}else delete e.plans[t]})(t))),this},do:function(t,e,...s){let i=getDataType(t);return this.handle(t,i,(t=>{return i=t,void(e.plans.hasOwnProperty(i)&&e.plans[i].forEach((t=>{t.call(e,...s)})));var i})),this}},attrJoinVal=(t,e,s)=>{let i=s?s.find((e=>e.attr===t)):null,a=(()=>{let e=t.trim(),s=!!i&&"function"==typeof i?.value;return e.startsWith("on-")||e.startsWith("b4-")||s})()?(t=>{let e=t.trim();return e.startsWith("function")||e.startsWith("(")||e.endsWith("}")?t:`function(){${t}}`})(e):e;try{if(i){if(null===e)return{[i.prop]:i.value};{let t=getDataType(i.value),s=e.trim(),l=["","1","true",!0],n=[null,"null","undefined","0","false","NaN"];return"ignore"===i.type?{[i.prop]:e}:"String"===t?{[i.prop]:e}:"Number"===t?{[i.prop]:parseFloat(e)}:"Boolean"===t&&l.includes(s)?{[i.prop]:!0}:"Boolean"===t&&n.includes(s)?{[i.prop]:!1}:"Object"===t&&i.value.hasOwnProperty("enable")&&l.includes(s)?{[i.prop]:!0}:"Object"===t&&i.value.hasOwnProperty("enable")&&i.value.hasOwnProperty("children")&&s.startsWith("[")&&s.endsWith("]")?{[i.prop]:{enable:!0,children:parseStr({content:`${e}`,type:"array",catchable:!0})}}:"Object"===t&&e.includes(":")?{[i.prop]:strToJson(e)}:parseStr({content:`{"${i.prop}":${a}}`,type:"object",catchable:!0})}}return""===e?{[t]:""}:parseStr({content:`{"${t}":${a}}`,type:"object",catchable:!0})}catch(s){return{[t]:e}}},breakpoints=(t,e)=>{if(isEmpty(t))return!1;let s=[],i={},a=document.body.clientWidth,n=getScreenSize(),validFun=(t,e)=>{let i=~~t;0===i?t.startsWith("screen")?n===t.split("-")[1]&&s.push(e):t.startsWith("width")?~~t.split("-")[1]>a&&s.push(e):t.startsWith("mobile")&&JSON.parse(t.split("-")[1])===l&&s.push(e):i>a&&s.push(e)};for(let t in e)e.hasOwnProperty(t)&&(Reflect.deleteProperty(e[t],"breakpoints"),validFun(t,e[t]));if(0===s.length)return!1;i=Object.assign({},...s),extend({target:t,source:i})},elProps=t=>{let e=getEl(t),s=null;return e&&(!e.hasOwnProperty("ax")&&(e.ax={}),s={add:(t,s=!0)=>(t&&(e.ax[t]=s),e),remove:t=>(t&&delete e.ax[t],e)}),s},keyCond=t=>!/^(stor-keys|ins-name|stor-name|storKeys|insName|storName|on-|b4-|on[A-Z]|b4[A-Z])/.test(t),spreadBool=(t,e)=>{let s=t,i=getDataType(t);if("Object"===getDataType(e))if("Boolean"===i)Reflect.deleteProperty(e,"enable"),s={enable:t,...e};else if("Object"===i)if(t.hasOwnProperty("enable"))t=Object.assign({},e,t);else for(let s in e)e.hasOwnProperty(s)&&t.hasOwnProperty(s)&&(t[s]=spreadBool(t[s],e[s]));return s};class ModBase{targetEl;targetData;options;destroyed;timestamp;renderCount;respSource;initialized;moduleName;dftOpts;rawOpts;rawHtml;rawEl;tplStr;tplEng;initCount;constructor(){this.timestamp=Date.now(),this.respSource=null,this.initialized=!1,this.initCount=0,this.renderCount=0,this.targetEl=null,this.targetData=null,this.rawOpts={},this.dftOpts={},this.options={},this.rawHtml="",this.rawEl=null,this.destroyed=!1,this.moduleName=this.constructor.name.toLowerCase(),this.tplStr="",this.tplEng=null}getOptsFromMap(t){let e={};for(let s of t)e[s.prop]=s.value;return e}isComp(t){return"slot-host"===t.getAttribute(e)}getElOptsMap(t){if(isEmpty(t))return{el:null,attr:{}};{let e=this.isComp(t);return{el:e?t.parentNode:t,attr:e?"initiated":`ax-${this.moduleName}`}}}mergeOpts({source:t={},map:e=[],el:i=null,component:a=!1}){let l=getEl(i),n=this.getElOptsMap(l),r=deepClone(this.getOptsFromMap(e));return this.rawOpts=deepClone(r),!isEmpty(s.lang[this.moduleName])&&(r.lang=extend({target:deepClone(s.lang[this.moduleName]),source:r.lang})),extend({target:r,source:s[this.moduleName]||{}}),extend({target:r,source:t,host:n.el,attr:n.attr}),a&&extend({target:r,source:this.mergeCompAttrs(l,e)}),this.dftOpts=deepClone(r),r}mergeCompAttrs(t,e){let s={};if(this.isComp(t)){let i=t.parentNode,a=i?.attributes;if(!i||i.nodeName.toLowerCase()!==`ax-${this.moduleName}`||!a)return{};for(let t of a){let i=e.find((e=>e.attr===t.name));if(i){let e=attrJoinVal(i.attr,t.value,[i]);Object.assign(s,e)}}}return s}getOptsAttr(t){return t.nodeName===`AX-${this.moduleName.toUpperCase()}`?"options":`ax-${this.moduleName}`}getStrFromContent(t){let e=getEl(t);return e?e.innerHTML:t}revertHtml(t){this.rawHtml&&(t.innerHTML=this.rawHtml),1===t.children.length&&(this.rawEl=t.children[0])}replaceMult(t="",s,i={}){let a=Object.assign({ignore:!0,nodename:"i"},i),l=new RegExp(`(${s.join("|")})`,"g"+(a.ignore?"i":"")),n=`<${a.nodename} ${e}="mark"${a.classes?' class="'+a.classes+'"':""}>$1</${a.nodename}>`;return(t+"").replace(l,n)}parseLayout(t=this.targetEl,s="",i={}){let