dfish-widget 1.1.7 → 1.1.8
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/lib/index.cjs.js +1 -1
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("lodash"),e=require("jquery"),i=require("axios"),l=require("qs"),r=require("vue");let o=navigator.userAgent.toLowerCase(),a=o.match(/\bchrome\/(\d+)/),n=o.match(/\bfirefox\/(\d+)/);const h={agent:o,chrome:a&&parseFloat(a[1]),firefox:n&&parseFloat(n[1]),safari:!a&&o.indexOf("safari")>0,ie:("Microsoft Internet Explorer"===navigator.appName||o.indexOf("trident")>0)&&document.documentMode,compat:{gap:!1}};if(o.match(/\bmobile\b/)){h.mobile=!0,h.app="file:"===location.protocol;let t=o.match(/(MicroMessenger)\/([\d\.]+)/i);t&&(h.wechat={version:t[2].replace(/_/g,".")});let e=o.match(/(Android);?[\s\/]+([\d.]+)?/i);e&&(h.android=!0,h.version=e[2],h.isBadAndroid=!/Chrome\/\d/.test(window.navigator.appVersion));let i=o.match(/(iPhone\sOS)\s([\d_]+)/i);if(i)h.ios=h.iphone=!0,h.version=i[2].replace(/_/g,".");else{let t=o.match(/(iPad).*OS\s([\d_]+)/i);t&&(h.ios=h.ipad=!0,h.version=t[2].replace(/_/g,"."))}}(h.chrome&&h.chrome<84||h.firefox&&h.firefox<63)&&(h.compat.gap=!0);let c=0;const u=()=>(c++).toString(36)+":";function d(t){return t?t.uid||(t.uid=u()):u()}var p={yes:"是",no:"否",none:"无",to:"至",jump:"转到",confirm:"确定",search:"搜索",query:"查询",choose:"选择",save:"保存",remove:"删除",cancel:"取消",create:"新建",add:"添加",edit:"编辑",finish:"完成",refresh:"刷新",operfail:"操作失败",opertip:"操作提示",nodata:"暂无数据",more:"更多",field:"字段",close:"关闭",restore:"还原",rotate_left:"向左旋转",rotate_right:"向右旋转",dialog_max:"最大化",dialog_min:"最小化",detect_zoom:"温馨提示: 你的浏览器可能处于缩放({0}%)状态,这可能影响页面浏览效果,请尝试Ctrl+0重置,并刷新",no_tip_anymore:"不再提示",loading:"正在加载",wait:"请稍候..",submiting:"数据提交中,请稍候..",uploading:"正在上传,请稍侯..",click_preview:"点击预览",toomuch_wait:"次数过多,请稍候再试",toomuch_wait_countdown:"次数过多,请稍候再试(<em>{0}</em>)",preview_orginal_image:"查看原图",auth_success:"验证成功",auth_fail:"验证失败",choose_image:"选择图片",tree_movefail1:"无法移动:目标文件夹和源文件夹相同",tree_movefail2:"无法移动:目标文件夹是源文件夹的子文件夹",internet_error:"[{0} error] {1}<br>网络连接失败,请稍候再试",server_error:"[{0} error] {1}<br>系统异常,请联系管理员",preload_error:'获取预装载模板 "{0}" 失败',page:"页",page_text:{first:"首页",last:"尾页",next:"下页",prev:"上页"},print_preview:"打印预览",placeholder_input:"请输入{0}",placeholder_select:"请选择{0}",pulldown_refresh:"下拉刷新",release_refresh:"释放刷新",pullup_refresh:"上拉显示更多",pullup_nomore:"没有更多了",download_start:"开始下载..",download_complete:"下载完成",download_cannotopen:"无法打开此文件",download_fail:"下载失败",tab_close:"关闭标签",tab_close_others:"关闭其他标签",tab_close_all:"关闭全部标签",sort_asc:"升序",sort_desc:"降序",sort_cancel:"取消排序",column_choose:"选择列",connection_not_wifi:"您当前处于非wifi网络环境下,继续使用可能产生流量,确定继续吗?",debug:{sorry:"很抱歉,系统发生了错误",view_more:"点击“确定”,可在新窗口查看详细错误信息",no_command:"视图中没有定义此命令: {0}\nview path: {1}",no_combo:"选项列表(或树)没有设置combo参数\nname: {0}",error_template_type:'{0}\n请把此模板类型改为 "{1}"',error_type:"type错误或丢失\n{0}",tmpl_method_undefined:'"{0}" 方法不存在'},form:{required:"{0}不能为空",onlyone:"{0的}只能选择一条记录",maxLength:"{0}超出了{1}个字",reach_maxLength:"已到达可输入的最大字符长度",over_maxLength:"字符长度超出了{0}个字节",minLength:"{0}不能少于{1}个字节",maxValue:"{0}最大值为{1}",minValue:"{0}最小值为{1}",maxSize:"{0}最多选择{1}项",minSize:"{0}最少选择{1}项",pattern:"{0}格式不符合规范,或包含非法字符",password_weak:"弱",password_middle:"中",password_strong:"强",number_invalid:"{0}不是一个有效数字",number_integer:"{0}请填入一个整数",number_decimal_digit:"{0的}小数位不能超过{1}位",step_max_value:"已到达最大值",step_min_value:"已到达最小值",time_exceed:"{0的}年份超出有效范围。有效年份:{1}年 至 {2}年",time_format:"{0的}时间格式错误。正确格式范例:{1}",period_invalid:"{0的}起始时间应早于结束时间",beforeNow:"{0}不能大于当前时间",afterNow:"{0}不能小于当前时间",compare:"{0}需要满足条件:{1} {2} {3}",invalid_option:"存在无效选项",need_valid_option:"请输入一个有效选项",choose_atleastone:"请至少选择一项",complete_required:"请完成必填项",jigsaw_drag_right:"向右拖动滑块填充拼图",jigsaw_required:"请完成滑块验证",jigsaw_errorimg:"图片数据异常",upload_loading:"正在上传,请稍候..",upload_invalid_file:"存在无效文件",no_files:"<没有文件>",upload_error:"(上传失败)",upload_limit:"上传数量超过上限(最多{0}个)",upload_invalid_file_type:"无效的文件类型:<br>{0}<br><br>只能选择 {1} 格式文件",upload_invalid_data:"错误的文件数据格式:<br>{0}",upload_no_data:"缺少文件数据",upload_maxfilesize:"上传失败: {0}<br><br>文件大小不能超过{1}",upload_minfilesize:"上传失败: {0}<br><br>文件大小不能小于{1}"},year:"年",month:"月",day:"日",sky:"天",hour:"时",minute:"分",second:"秒",calendar:{now:"现在",today:"今天",weeknow:"本周",monthnow:"本月",yearnow:"本年",day_title:["日","一","二","三","四","五","六"],day_title_1:["一","二","三","四","五","六","日"],y:"{0}<span>年</span>",monthname:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],backdate:"返回日期",picktime:"选择时间",H:"时",m:"分",s:"秒",from_to:"{0} 至 {1}"},error:"错误",ps:(t,...e)=>(t&&(t=t.replace(/\{(\d+)([^\d]+)?\}/g,function(t,i,s){let l=e[parseFloat(i)];return null==l||""===l?"":s?l+s:l})),t),end:"结束"};const m=t=>null==t?"":""+t,f=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(s+e.length)},x=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(0,s)},g=(t,e)=>{if(!t)return 0;e||(e=$.x.cnBytes||2);let i=0;for(let s=0,l=t.length;s<l;s++)i+=t.charCodeAt(s)>128?e:1;return i},v=function(t,e,i){if(i=null==i?"0":i+"",!e)return t<10?i+t:t;for(t+="";t.length<e;)t=i+t;return t},w=function(t){return t.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},b=function(t,e,i){let s=[w(t)],l=t.length;if(e>0&&l>e)for(let i=l-1;i>=e;i--)for(let e,r=0,o=l-i;r<=o;r++)e=t.substr(r,i),s.push(w(e));return s},_="object",y=null,k=void 0,C=t=>{var e="string"==typeof t?parseFloat(t.replace(/[^\d\.-]|\b-/g,"")):+t;return isNaN(e)?0:e},S=t=>null!=t&&!isNaN(t),V=function(t,e){return e!=y&&(e.min&&!isNaN(e.min)&&(t=Math.max(t,e.min)),e.max&&!isNaN(e.max)&&(t=Math.min(t,e.max))),t},T=864e5,M="yyyy-MM-dd HH:mm:ss",P={0:"Q1",1:"Q1",2:"Q1",3:"Q2",4:"Q2",5:"Q2",6:"Q3",7:"Q3",8:"Q3",9:"Q4",10:"Q4",11:"Q4"},B=function(t,e){"string"==typeof t&&(t=z(t,e));let i={y:t.getFullYear(),m:t.getMonth(),d:t.getDate(),h:t.getHours(),i:t.getMinutes(),s:t.getSeconds()},s=(e||M).replace("yyyy",i.y).replace("MM",v(i.m+1)).replace("dd",v(i.d)).replace("HH",v(i.h)).replace("mm",v(i.i)).replace("ss",v(i.s)).replace("M",i.m+1).replace("d",i.d).replace("H",i.h).replace("m",i.i).replace("s",i.s);if(s.indexOf("w")>-1){let e=E(t);s=s.replace("ww",v(e[1])).replace("w",e[1])}if(s.indexOf("q")>-1){let t=P[i.m];s=s.replace("qq",t).replace("q",t)}return s},z=function(t,e){let i;t=(""+t).replace(/\b(\d)\b/g,"0$1");let s=(i=(e=(e||M).replace(/\b([MdHmsw])\b/g,"$1$1")).indexOf("yyyy"))>-1&&C(t.substr(i,4))||(new Date).getFullYear(),l=(i=e.indexOf("MM"))>-1?Math.max(C(t.substr(i,2))-1,0):0,r=(i=e.indexOf("dd"))>-1&&C(t.substr(i,2))||1,o=(i=e.indexOf("HH"))>-1?C(t.substr(i,2)):0,a=(i=e.indexOf("mm"))>-1?C(t.substr(i,2)):0,n=(i=e.indexOf("ss"))>-1?C(t.substr(i,2)):0;if((i=e.indexOf("qq"))>-1){let e=t.substr(i,2);return new Date(s,"Q1"===e?0:"Q2"===e?3:"Q3"===e?6:9,1)}if((i=e.indexOf("ww"))>-1){let e=C(t.substr(i,2)),l=E(new Date(s,0,1));return l[0]!=s&&(l=E(new Date(s,0,8))),new Date(l[2].getTime()+7*(e-1)*T)}return new Date(s,l,r,o,a,n)},D=function(t,e,i){i=C(i);let s=new Date(t.getTime());return"y"===e?s.setFullYear(t.getFullYear()+i):"M"===e?s.setMonth(s.getMonth()+i):"d"===e?s.setDate(s.getDate()+i):"H"===e?s.setHours(s.getHours()+i):"m"===e?s.setMinutes(s.getMinutes()+i):"s"===e&&s.setSeconds(s.getSeconds()+i),"y"!==e&&"M"!==e||s.getDate()==t.getDate()||(s=new Date(s.getTime()-s.getDate()*T)),s},E=function(t){let e=null!=$.x.weekPoint?$.x.weekPoint:1,i=null!=$.x.weekStart?$.x.weekStart:1,s=t.getDay()||7,l=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+e),r=Math.ceil((l-new Date(l.getFullYear(),0,0))/T),o=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+i);return[l.getFullYear(),Math.floor((r+6)/7),o,new Date(o.getTime()+6048e5-1)]};window.Range&&!Range.prototype.movePoint&&(Range.prototype.__defineGetter__&&(Range.prototype.__defineGetter__("text",function(){return this.toString()}),Range.prototype.__defineSetter__("text",function(t){this.deleteContents(),this.insertNode(document.createTextNode(t))})),Range.prototype.movePoint=function(t,e){var i,s=this.startContainer.firstChild||this.startContainer,l=t,r=0;e=null==e?t:e;do{this.selectNodeContents(s),l-=r=this.toString().length}while(l>0&&(s=s.nextSibling));s=i=this.startContainer;var o=e-t+(l+=r);r=0;do{this.selectNodeContents(i),o-=r=this.toString().length}while(o>0&&(i=i.nextSibling));if(this.setStart(s.firstChild||s,l),i){for(var a=i;a.firstChild;)a=a.firstChild;this.setEnd(a,r+o)}},Range.prototype.select=function(){let t=window.getSelection();t.removeAllRanges(),t.addRange(this)});const N=function(){let t=window.getSelection();return t.rangeCount&&t.getRangeAt(0)},L=function(t,e){return null==t&&(t=N()),null!=e&&(t.deleteContents?(t.deleteContents(),t.insertNode(document.createTextNode(e))):t.text=e),void 0===t.text?t.toString():t.text},F=["afterend","afterbegin","beforebegin","beforeend"],H=["after","prepend","before","append"],I=function(t){let e="string"==typeof t?function(t){let e=document.createElement("div");t&&(e.innerHTML=t);try{return e}catch(t){return!1}finally{e=null}}(t):t,i=document.createDocumentFragment();for(;e.firstChild;)i.appendChild(e.firstChild);try{return i}catch(t){return!1}finally{e=i=null}},Y=function(t,i,s){if(null==s){if(null==i)return t.innerHTML;try{t.innerHTML=i}catch(e){for(;t.firstChild;)t.removeChild(t.firstChild);Y(t,i,3)}}else if("string"==typeof i)try{3===t.nodeType?e(t)[H[s]](i):t.insertAdjacentHTML(F[s],i)}catch(e){Y(t,I(i),s)}else{let e=s%2?t:t.parentNode;e&&e.insertBefore(i,0===s?t.nextSibling:1===s?t.firstChild:2===s?t:null)}},O=function(t,e){return Y(t,e,3),t.lastElementChild||t.lastChild},j=function(t,e){return Y(t,e,2),t.previousElementSibling||t.previousSibling},q=function(){let t={float:"cssFloat"};return function(e){return t[e]||e.replace(/-./g,function(t){return t.charAt(1).toUpperCase()})}}(),R=function(t,e,i){if("string"==typeof i&&"="===i.charAt(1)){e=q(e);var s=t.style[e]||getComputedStyle(t,null)[e];i=C(i.replace("=",""));"width"===e||"height"===e?(s=C(s&&"auto"!==s?s:"w"===e.charAt(0)?t.offsetWidth:t.offsetHeight))<0&&(s=0):s=C(s),t.style[e]=s+i+("zIndex"===e?0:"px")}else"width"!==(e=q(e))&&"height"!==e||i&&"auto"!==i&&(i=Math.max(_number(i),0)),i&&!isNaN(i)&&"zIndex"!==e&&(i+="px"),t.style[e]=i;return t},W=!0,U=document,X=document.documentElement,Q=t=>t.split(","),G={h:Q("21,12,34,43"),v:Q("41,14,32,23"),a:Q("41,32,14,23,21,34,12,43,11"),t:["tt"],b:["bb"],l:["ll"],r:["rr"],c:["cc"],top:["tt"],bottom:["bb"],left:["ll"],right:["rr"],tl:["11"],tr:["22"],rt:["22"],rb:["33"],br:["33"],bl:["44"],lb:["44"],lt:["11"],1:["11"],2:["22"],3:["22"],4:["33"],5:["33"],6:["44"],7:["44"],8:["11"]},J=function(){var t,e=[14,23,34,43,33,44,"bb","tb"],i={pix:{r:{},b:{}},mag:{l:{},r:{},t:{},b:{}},inner:{}};for(t=(s=[23,22,33,32,21,34,"rr","rl"]).length;t--;)i.pix.r[s[t]]=W;for(t=e.length;t--;)i.pix.b[e[t]]=W;e=[41,32,44,33,"bt","bb"];var s,l=[12,43,11,44,"lr","ll"],r=[14,23,11,22,"tb","tt"];for(t=(s=[21,34,22,33,"rr","rl"]).length;t--;)i.mag.r[s[t]]=W;for(t=e.length;t--;)i.mag.b[e[t]]=W;for(t=l.length;t--;)i.mag.l[l[t]]=W;for(t=r.length;t--;)i.mag.t[r[t]]=W;for(t=(s=[11,22,33,44,"tt","bb","ll","rr"]).length;t--;)i.inner[s[t]]=W;return i}(),K=function(t){var e=X.clientLeft,i=X.scrollLeft,s=X.clientTop,l=X.scrollTop,r=t&&t!=U&&(t.isWidget?t.el():t),o=r&&r.getBoundingClientRect();return o?{left:o.left-e+i,top:o.top-s+l,right:o.right-e+i,bottom:o.bottom-s+l,width:o.width,height:o.height}:t==document?{left:i,top:l,right:X.clientWidth+i,bottom:X.clientHeight+l,width:X.clientWidth,height:X.clientHeight}:null},Z={},tt=function(e){e.fn&&(t.pull(Z[e.id][e.type],e),e.type=e.fn=e.args=null)},et=function(t){return t.indexOf(".")>-1?x(t,"."):t},it=function(t){return t.indexOf(".")>-1?"."+f(t,".").split(".").sort().join(".")+".":""},st=function(t,e){var i=Z[d(t)];if(i){var s=et(e),l=it(e);if(s)return i[s]&&(l?i[s].filter(t=>t.ns.indexOf(l)>-1):i[s]);var r=[];for(s in i)r.push.apply(r,i[s].filter(t=>t.ns.indexOf(l)>-1));return r}};function lt(e){if(!e||e.isWidget)return e;if("string"==typeof e||e.uid)return lt.vueMap.get(e.uid||e);if(e instanceof Event&&(e=e.currentTarget||e.target),e.$el){if(e.$attrs.orientUid)return lt.vueMap.get(e.$attrs.orientUid);const t=e.$el;if(8===t.nodeType&&e.$.subTree.component.data.uid)return lt.vueMap.get(e.$.subTree.component.data.uid);e=1!=t.nodeType?e.$el.nextElementSibling:e.$el}if(t.isElement(e))do{if(e.id){if(lt.vueMap.has(e.id))return lt.vueMap.get(e.id);let t=lt.strTo(e.id,":")+":";if(lt.vueMap.has(t))return lt.vueMap.get(t)}}while(e=e.parentNode);for(;e&&!e.isWidget;)e=e.$parent;return e||lt.docView}Object.assign(lt,{x:{defaultOptions:{}},vueMap:new Map,dfclsCache:{},q:e,lodash:t,http:i,br:h,loc:p,uid:d,EventListener:class{constructor(t){this.ctx=t}hasEvent(t){let e=st(this.ctx,t);return e&&e.length}addEvent(t,e,i){var s={id:d(this.ctx),type:et(t),ns:it(t),fn:e,one:i};return(function(t,e){for(var i=2,s=arguments.length-1;i<s;i++)e=e[arguments[i]]||(e[arguments[i]]={});return(e[arguments[s]]||(e[arguments[s]]=[])).push(t),e[arguments[s]]}(s,Z,s.id,s.type)).ori=!0,this}addEventOnce(t,e){return this.addEvent(t,e,!0)}fireEvent(t,e){var i=st(this.ctx,t.type||t);if(i)for(var s,l,r=0,o=i.length;r<o;r++)if((s=i[r])&&s.fn&&(l=s.fn.apply(this.ctx,e?[t].concat(e):[t]),s.one&&(tt(s),i.ori&&(r--,o--)),void 0!==l))return l;return this}removeEvent(t,e){if(t){var i=st(this.ctx,t);if(i)for(var s=i.length;s--;)e&&i[s].fn!==e||tt(i[s])}else{var l=Z[d(this.ctx)];for(s in l)this.removeEvent(s);delete Z[d(this.ctx)]}return this}},eventX:function(t){return t.targetTouches?t.targetTouches[0].clientX:t.clientX},eventY:function(t){return t.targetTouches?t.targetTouches[0].clientY:t.clientY},number:C,isNumber:S,numRange:function(t,e,i){return null==t?e||0===e?e:i||0===i?i:t:(e||0===e)&&t<e?e:(i||0===i)&&t>i?i:t},numAdd:function(...t){let e=0,i=0;return t.forEach(t=>{e=Math.max(e,f(t+"",".").length),i+=t}),e=Math.pow(10,e),Math.round(i*e)/e},numFormat:function(t,e,i,s){null==e&&(e=3),null==i&&(i=",");let l=(t=String(t)).replace(/[^.\d]/g,"").split("."),r=l[0],o=r.length,a=s?0:o,n="",h="-"===t.charAt(0)?"-":"";if(s)do{a+=e,n+=a<o?r.substr(a-e,e)+i:r.substr(a-e)}while(a<o);else do{a-=e,n=(a>0?i+r.substr(a,e):r.substr(0,e+a))+n}while(a>0);return h+n+(l.length>1?"."+f(t,".").replace(RegExp("[."+i+"]","g"),""):"")},numDecimal:function(t,e){if(e){if(e<0)return parseFloat(C(t));{let i=f(""+t,".");return i?x(""+t,".")+"."+i.slice(0,e):t}}return parseInt(C(t))},numScale:function(t,e,i){for(var s,l,r,o=0,a=t,n=e.length,h=0,c=0,u=Array(n);h<n;h++)(r=typeof e[h]===_?e[h].value:e[h])!=y&&isNaN(r)?t==y?u[h]=y:"*"===r?(l=h,c++):s=h:o+=u[h]=r==y||r<0?y:+r;if(t==y)return u;if(s!==k){t=Math.max(0,t-o);var d=0;for(h=o=0;h<=s;h++)r=typeof e[h]===_?e[h].value:e[h],u[h]===k&&typeof r===_STR&&r.indexOf("%")>0&&(d+=r=parseFloat(r),o+=u[h]=V(Math.floor(a*r/100),e[h]));l===k&&d>=100&&(u[s]=V(Math.max(0,u[s]+a-o),e[h]))}if(l!==k){for(t=Math.max(0,t-o),h=o=0;h<=l;h++)u[h]===k&&(o+=u[h]=V(Math.floor(t/c),e[h]));u[l]=V(Math.max(0,u[l]+t-o),e[l])}if(i&&s===k&&l===k){for(h=0,n=u.length,o=0,c=0;h<n;h++)S(u[h])&&(o+=u[h],c++);if(o<a){var p=Math.floor((a-o)/c);for(h=0;h<n;h++)S(u[h])&&(u[h]+=p);for(h=n;h>=0;h--)if(S(u[h])){u[h]+=a-o-p*c;break}}}return u},string:m,strTrim:t=>String(t).replace(/^\s+|\s+$/g,""),strEscape:function(t){return null!=t?(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,"""):""},strFrom:f,strTo:x,strPad:v,strLen:g,strExceed:(t,e,i)=>{let s=g(t,i);return i||(i=$.x.cnBytes||2),Math.ceil((s-e)/i)},strFormat:(e,i,s,l)=>(null!=e&&(e+=""),e&&i?Array.isArray(i)?e.replace(/\$\{?(\d+)\}?/g,function(t,e){return null==i[e]?l?t:"":s?encodeURIComponent(i[e]):i[e]}):e.replace(/\$\{?([a-z_][\w.]*)\}?/gi,function(e,r){let o=t.get(i,r);return null==o?l?e:"":s?encodeURIComponent(o):o}):e),strHighlight:function(t,e,i,s){return(t+="").replace(RegExp("(<[\\/!]?\\w+(?::\\w+)?\\s*(?:[-\\w]+(?:=('|\")?.*?\\2)?\\s*)*>)|("+b(e,i).join("|")+")","ig"),function(t,e,i,l){return void 0===l?e:'<em class="'+(s||"f-keyword")+'">'+l+"</em>"})},dateFormat:B,dateParse:z,dateAdd:D,dateValid:function(t,e){t=(""+t).replace(/\b(\d)\b/g,"0$1");let i=z(t,e),s=i.getFullYear();return s>=1e3&&s<=9999&&t==B(i,e)},dateDiff:function(t,e=new Date,i){switch("string"==typeof t&&(t=z(t)),"string"==typeof e&&(e=z(e)),i){case"y":let s=e.getFullYear()-t.getFullYear(),l=D(t,i,s);return l>e&&s--,s;case"M":let r=_dateDiff(t,e,"y"),o=D(t,"y",r);return s=o.getFullYear()<e.getFullYear()?e.getMonth()+11-o.getMonth():e.getMonth()-o.getMonth(),l=D(t,i,s),l>e&&s--,s+12*r;case"H":return Math.floor((e-t)/36e5);case"m":return Math.floor((e-t)/6e4);case"s":return Math.floor((e-t)/1e3);default:return Math.floor((e-t)/T)}},dateSheet:function(...t){return $.docView.dateSheet(...t)},dateWeek:E,dateWeekFirst:function(t){let e=$.dateWeek(new Date(t,0,1));return e[0]!=t&&(e=$.dateWeek(new Date(t,0,8))),e},dateWeekLast:function(t){let e=E(new Date(t,11,31));return e[0]!==t&&(e=E(new Date(t,11,24))),e},rngSelection:N,rngElement:function(){let t=N();return t&&t.startContainer.parentNode},rngCursor:function(t,e){let i=t;if(window.getSelection)if("number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd)t.selectionStart=t.selectionEnd=null!=e?e:t.value.length;else{let s=window.getSelection();1===t.nodeType&&(i=document.createRange()).selectNodeContents(t),null!=e&&i.movePoint(e),s.removeAllRanges(),s.addRange(i),s.collapseToEnd()}return i},rngCursorOffset:function(){let t=N(),e=t.startOffset;if(null!=e)return e;let i=document.body.createTextRange();return i.selectNodeContents(t.startContainer.parentNode),i.setEndPoint("EndToStart",t),L(i).length},rngText:L,el:function(t){if(t){const e=t.$el;return e?1===e.nodeType?e:e.nextElementSibling:t.isWidget?t.el():t}},html:Y,append:O,prepend:function(t,e){return Y(t,e,1),t.firstElementChild||t.firstChild},before:j,after:function(t,e){return Y(t,e,0),t.nextElementSibling||t.nextSibling},replaceWith:function(t,e){let i=t.nextSibling;if(i)return t.parentNode.removeChild(t),j(i,e);{let i=t.parentNode;return i.removeChild(t),O(i,e)}},moveup:function(t,e,i){let s,l,r=null==i,o=document.documentElement,a=t=>t.targetTouches?t.targetTouches[0].clientX:t.clientX,n=t=>t.targetTouches?t.targetTouches[0].clientY:t.clientY,c=t=>t.preventDefault();i.currentTarget&&(i.currentTarget.style.userSelect="none"),o.addEventListener(h.mobile?"touchmove":"mousemove",s=function(e){r?t(e):i&&(Math.abs(a(e)-a(i))>1||Math.abs(n(e)-n(i))>1)&&(r=!0)},!0),o.addEventListener(h.mobile?"touchend":"mouseup",l=function(t){o.removeEventListener(h.mobile?"touchmove":"mousemove",s,!0),o.removeEventListener(h.mobile?"touchend":"mouseup",l,!0),i.currentTarget&&(i.currentTarget.style.userSelect=""),h.mobile&&o.removeEventListener("touchmove",c,{passive:!1}),e&&e(t,r)},!0),h.mobile&&o.addEventListener("touchmove",c,{passive:!1})},bcr:K,offset:function(t,e){let i={top:0,left:0,width:t.offsetWidth,height:t.offsetHeight};do{i.top+=t.offsetTop,i.left+=t.offsetLeft}while((t=t.offsetParent)&&e!=t);return i},snap:function(t,e,i,s,l,r,o){i?i.nodeType?i=K(i):i.isWidget?i=K(i.el()):(i.originalEvent||null!=i.clientX)&&(i={left:(i=i.originalEvent||i).clientX,right:i.clientX,top:i.clientY,bottom:i.clientY}):i=K(U);var a,n,h=[],c=[],u=-1,d=X.clientWidth,p=X.clientHeight,m=s?G[s]||(""+s).split(","):G.a;if(/[1-4]/.test(m[0]))for(var f=0,x=0;f<m.length;f++){if(a=+m[f].charAt(0),n=+m[f].charAt(1),h.push((1===a||2===a?i.top:i.bottom)-(3===n||4===n?e:0)),c.push((1===a||4===a?i.left:i.right)-(2===n||3===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}var g=h[f]<0?-h[f]:0,v=c[f]+t>d?c[f]+t-d:0,w=h[f]+e>p?h[f]+e-p:0,b=c[f]<0?-c[f]:0;y="14"===m[f]||"34"===m[f]?(t-v)*(e-g):"23"===m[f]||"43"===m[f]?(t-b)*(e-g):"32"===m[f]||"12"===m[f]?(t-b)*(e-w):(t-v)*(e-w),(!x||x<y)&&(x=y,u=f)}else{var _,y;for(f=0,x=0;f<m.length;f++){if(a=m[f].charAt(0),n=m[f].charAt(1),h.push(("r"===a||"l"===a||"c"===a?(i.top+i.bottom)/2:"t"===a?i.top:i.bottom)-("r"===n||"l"===n||"c"===n?e/2:"b"===n?e:0)),c.push(("t"===a||"b"===a||"c"===a?(i.left+i.right)/2:"r"===a?i.right:i.left)-("t"===n||"b"===n||"c"===n?t/2:"r"===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}(S||_)&&(s?(y=s==G.v?1==a||2==a?-h[f]:h[f]+e-p:1==a||4==a?-c[f]:c[f]+t-d,(!x||x>y)&&(x=y,u=f)):u<0&&(u=f))}}u<0&&(u=0);var k=m[u],S={left:c[u],top:h[u],bottom:p-(h[u]+e),right:d-(c[u]+t),type:k};(J.pix.r[k]&&(S.pix_r=W),J.pix.b[k]&&(S.pix_b=W),J.mag.r[k]&&(S.mag_r=W,S.mag="r"),J.mag.b[k]&&(S.mag_b=W,S.mag="b"),J.mag.l[k]&&(S.mag_l=W,S.mag="l"),J.mag.t[k]&&(S.mag_t=W,S.mag="t"),J.inner[k]&&(S.inner=W),r&&S.mag)&&((f=r.indent||C(r))&&(f/=window.devicePixelRatio||1,S.inner?S.mag_t?(S.top-=f,S.bottom+=f):S.mag_b?(S.top+=f,S.bottom-=f):S.mag_r?(S.left+=f,S.right-=f):(S.left-=f,S.right+=f):S.mag_t?(S.top+=f,S.bottom-=f):S.mag_b?(S.top-=f,S.bottom+=f):S.mag_r?(S.left-=f,S.right+=f):(S.left+=f,S.right-=f)),r.top&&(S.top-=r.top),r.bottom&&(S.bottom-=r.bottom),r.left&&(S.left-=r.left),r.right&&(S.right-=r.right));if(l){c=S.left;var V=S.right;e=S.bottom,h=S.top;(S.mag_t||S.mag_b)&&(S.pix_r?(V=Math.max(0,c<0?V+c:V),c+=S.right-V):(c=Math.max(0,V<0?V+c:c),V+=S.left-c)),(S.mag_l||S.mag_r)&&(S.pix_b?(e=Math.max(0,h<0?e+h:e),h+=S.bottom-e):(h=Math.max(0,e<0?e+h:h),e+=S.top-h)),S.left=c,S.right=V,S.top=h,S.bottom=e}if("cc"===s&&S.top<0&&(S.top=0),o){m=function(t){var e=K(t);return e.right=X.clientWidth-e.right,e.bottom=X.clientHeight-e.bottom,e}(o);S.top-=m.top,S.left-=m.left,S.right-=m.right,S.bottom-=m.bottom}return S.width=t,S.height=e,S.target=i,S},snapTo:function(t,e){e.type?(e.pix_r?(t.style.right=e.right+"px",t.style.left=""):(t.style.left=e.left+"px",t.style.right=""),e.pix_b?(t.style.bottom=e.bottom+"px",t.style.top=""):(t.style.top=e.top+"px",t.style.bottom="")):function(t,e){if(!t||!e)return null;if("string"==typeof e){if(!(e.indexOf(":")>0))return t.style[e]||getComputedStyle(t,null)[e];for(var i,s,l=0,r=e.split(";"),o=r.length;l<o;l++)(i=x(r[l],":"))&&(s=f(r[l],":"))&&R(t,i,s)}for(var l in e)R(t,l,e[l])}(t,e)}}),lt.extend=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)i in t||void 0===e[i]||(t[i]=e[i])}),t},lt.extendDeep=function(t,...e){return e.forEach(e=>{if(null!=e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object)for(let i in e)i in t?null!=t[i]&&"object"==typeof t[i]&&"constructor"in t[i]&&t[i].constructor===Object&<.extendDeep(t[i],e[i]):null!=e[i]&&"object"==typeof e[i]&&"constructor"in e[i]&&e[i].constructor===Object?lt.extendDeep(t[i]={},e[i]):t[i]=e[i]}),t},lt.merge=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)t[i]=e[i]}),t},lt.mergeDeep=function(t,...e){return e.forEach(e=>{if(null!=e)for(let i in e)"object"==typeof t[i]?lt.mergeDeep(t[i],e[i]):t[i]=e[i]}),t},lt.cloneDeep=t.cloneDeep,lt.eval=function(t,e){if(e){let i=Object.keys(e);return Function(i.map(t=>t),`return (${t})`)(...i.map(t=>e[t]))}return Function(`return (${t})`)()},lt.string=function(t){return null==t?"":"object"==typeof t?JSON.stringify(t):""+t},lt.array=function(t){return Array.isArray(t)?t:null==t||""===t?[]:[t]},lt.arrayID=function(t){return Array.isArray(t)?t:null==t||""===t?[]:"string"==typeof t?t.split(","):[t]},lt.arrayNumber=function(t){return lt.array(t).map(t=>parseFloat(t))};lt.unitSize=function(t,e){return null==t||""===t||"*"===t?"":"auto"==t?"auto":isNaN(t)?t:e?t/e*100+"vw":`${t}px`},lt.idsAdd=(t,e,i)=>{if(t=m(t),e=m(e),i=null==i?",":""+i,!t||!e)return t||e;for(var s=0,l=(e=e.split(i)).length;s<l;s++)(i+t+i).indexOf(i+e[s]+i)<0&&(t+=(t?i:"")+e[s]);return t},lt.idsRemove=(t,e,i)=>{if(t=m(t),e=m(e),i=null==i?",":""+i,!t||!e)return t;for(var s,l=0,r=(e=e.split(i)).length;l<r;l++)do{(s=(i+t+i).indexOf(i+e[l]+i))>-1&&(t=t.slice(0,s?s-1:s)+t.slice(s+e[l].length+(s?0:1)))}while(t&&s>-1);return t},lt.idsAny=(t,e,i)=>{if(""===t&&e===t)return!0;if(t=m(t),e=m(e),i=null==i?",":""+i,!t||!e)return!1;if(t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)>-1)return!0;return!1},lt.idsAll=(t,e,i)=>{if(""===t&&e===t)return!0;if(i=null==i?",":""+i,!(t=null==t?"":""+t))return!1;if(!(e=null==e?"":""+e)||t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)<0)return!1;return!0},lt.classAdd=function(t,e,i){if(!t)return;let s=t.className;if(e.indexOf(" ")>-1)for(let t=0,l=(e=lt.strTrim(e).split(/ +/)).length;t<l;t++)s=(!1===i?lt.idsRemove:lt.idsAdd)(s,e[t]," ");else s=(!1===i?lt.idsRemove:lt.idsAdd)(s,e," ");t.className=s},lt.classRemove=function(t,e){t&&(e.indexOf(" ")>-1?lt.classAdd(t,e,!1):t.className=lt.idsRemove(t.className,e," "))},lt.classAny=function(t,e){if(!t)return;let i="string"==typeof t?t:t.className;if(!(e.indexOf(" ")>-1))return lt.idsAny(i,e," ");for(let t=0,s=(e=$strTrim(e).split(/ +/)).length;t<s;t++)if(lt.idsAny(i,e[t]," "))return t+1},lt.urlEncode=t=>null==t?"":encodeURIComponent("object"==typeof t?JSON.stringify(t):t),lt.urlDecode=t=>null==t?"":decodeURIComponent(t.replace(/\+/g," ")),lt.urlFormat=(t,...e)=>(e.forEach((i,s)=>null!=i&&(t=lt.strFormat(t,i,!0,s<e.length-1))),t),lt.urlParam=function(t,e){var i=(o=t.split("#"))[0],s=o[1];if("string"==typeof e)return"#"===e?s||"":lt.urlDecode((i.match(new RegExp("[\\?&]"+e+"=([^&]*)"),"g")||A)[1]);if(e&&"object"==typeof e)for(var l in e)if("#"===l)s=e[l];else{var r=lt.urlEncode(e[l]);i=(c=new RegExp("\\b"+l+"=[^&]*")).test(i)?i.replace(c,l+"="+r):i+(i.indexOf("?")<0?"?":"&")+l+"="+r}else if(1===arguments.length){var o={};if(r=(r=i.split("?"))[r.length-1]){r=r.split("&");for(var a,n,h,c=0;c<r.length;c++)-1!=(a=r[c].indexOf("="))&&(n=r[c].substring(0,a),h=r[c].substring(a+1),o[n]=lt.urlDecode(h.replace(/\+/g," ")))}return o}return i+(s?"#"+s:"")},lt.urlServer=function(e,...i){if(e){if(!e.startsWith("http://")&&!e.startsWith("https://")){let i=t.get(lt.x,"http.baseURL");i&&(e=i+(i.endsWith("/")?"":"/")+e)}return lt.strFormat(e,...i)}},lt.urlComplete=function(e){if(0!==e.indexOf("data:")){e=lt.urlServer(e);let i=t.get(lt.x,"http.params");i&&(e=lt.urlParam(e,i))}return e},lt.download=function(t,e){if(t=lt.urlComplete(t),h.app)lt.wifiConfirm(function(){let i=plus.downloader.createDownload(t,e);plus.nativeUI.showWaiting(),i.addEventListener("statechanged",function(t,e){switch(t.state){case 1:plus.nativeUI.toast(lt.loc.download_start);break;case 4:200==e?(plus.nativeUI.toast(lt.loc.download_complete),plus.runtime.openFile(t.filename,{},function(t){plus.nativeUI.alert(lt.loc.download_cannotopen)})):plus.nativeUI.toast(lt.loc.download_fail+e),plus.nativeUI.closeWaiting()}}),i.start()});else{let e=document.createElement("a");e.href=t,lt.x.downloadTarget&&(e.target=lt.x.downloadTarget),e.click(),e.remove()}},lt.wifiConfirm=(t,e)=>{lt.x.wifiConfirm&&3!=plus.networkinfo.getCurrentType()?plus.nativeUI.confirm(lt.loc.connection_not_wifi,function(i){0===i.index&&t.call(e)},{buttons:[lt.loc.confirm,lt.loc.cancel]}):t.call(e)},lt.vm=lt.view=t=>t?"string"==typeof t&<.vueMap.has(t)&&(t=lt.vueMap.get(t)).isView?t:null!=(t=lt(t))?t.isView?t:t.ownerView:void 0:lt.docView,lt.close=t=>{let e=lt.dialog(t);e&&e.close()},lt.closePopup=()=>{document.dispatchEvent(new Event("mousedown"))},lt.previewVideo=function(t){lt.vm().previewVideo(lt.urlServer(t))},lt.previewImage=function(t,e){t=lt.array(t).map(t=>lt.urlServer(t)),h.app?plus.nativeUI.previewImage(t,e):lt.vm().previewImage(t,e)},lt.slotsChildren=function(t,e="default"){let i=[];const s=t=>{t&&t.forEach(t=>{"symbol"==typeof t.type?Array.isArray(t.children)?s(t.children):"Symbol(v-txt)"===t.type.toString()&&i.push(t):i.push(t)})};return s(t[e]&&t[e]()),i},lt.hasChild=function(e,i="default"){let s=!1;const l=e=>{t.forEach(e,t=>{if("symbol"!=typeof t.type)return!(s=!0);Array.isArray(t.children)&&l(t.children)})};return l(e[i]&&e[i]()),s},lt.ease=function(t,e,i){t(0),null==e&&(e=200),null==i&&(i=Math.ceil(e/10));let s=Math.ceil(e/i),l=0,r=(new Date).getTime(),o=setInterval(function(){let e=(new Date).getTime()-r,a=Math.floor(e/s);l!=a&&(a<i?t(-Math.cos(a/i*Math.PI)/2+.5):(clearInterval(o),t(1)),l=a)},Math.max(s-10,5));return o},lt.print=function(t,e){let i=lt.el(t),s=i.ownerDocument,l=lt.q("link[media=print]",s),r=[];e=e||{},lt.q("meta",s).each(function(){r.push(this.outerHTML)}),(l.length>0?l:lt.q("link",s)).each(function(){r.push('<link rel="stylesheet" type="text/css" href="'+this.getAttribute("href")+'"/>')}),lt.q("style",s).each(function(){r.push(this.outerHTML)});let o=i.outerHTML;o=o.replace(/<div[^>]+w-scroll[^>]+>/gi,function(t){return t.replace(/height: \w+/gi,"")}),lt.q(":text,:password,textarea,select",i).each(function(){let t,i=this.outerHTML;if(e.input2text){let e=lt(this);e&&e.isFormWidget?(i=e.el("form").outerHTML,t=e.formText()):t=this.value,t='<div class="f-oh w-input-s">'+t+"</div>"}else t=i.replace('value="'+this.defaultValue+'"',()=>'value="'+this.value+'"');o=o.replace(i,()=>t+"")}),lt.q(":radio,:checkbox",i).each(function(){if(e.input2text){let t=lt(this);t&&t.isFormWidget&&(o=o.replace(t.el().outerHTML,()=>t.isChecked?'<div class="f-wdbr">'+t.text+"</div>":""))}else{let t=this.outerHTML,e=t.replace(/ checked=""/,"");this.checked&&(e=e.replace(/>$/," checked>")),o=o.replace(t,e)}}),e.input2text&<.q("input[type=hidden]",i).each(function(){var t=lt(this);t&&t.isFormWidget&&"w-hidden"!=t.$options.name&&(o=o.replace(t.el("form").outerHTML,()=>'<div class="f-wdbr f-print-input-text">'+t.formText()+"</div>"))}),lt.q(".w-input-placeholder",i).each(function(){o=o.replace(this.outerHTML,"")});return s=!1!==e.print?function(){let t=window.frames.wPrintFrame;return t||(lt.q("<div class=f-none><iframe name=wPrintFrame></iframe></div>").appendTo(document.body),t=window.frames.wPrintFrame),t}():window.open(),i=s.document,i.open("text/html","replace"),i.write("<!doctype html><html class=f-print><head><meta charset=utf-8><title>"+lt.loc.print_preview+'</title><style>.f-print .w-f-remark{height:auto;line-height:inherit}.f-print-input-text{line-height: var(--w-label-min-height);}.w-input{display: flex!important;}.w-input-s{word-break:normal;white-space:normal}.w-input-s:empty:before{content:" "}</style><script>var $={e:function(){}}<\/script>'+r.join("")+(e.head||"")+"</head><body><div class=x-print>"+o+"</div>"+(!1!==e.print?"<script>window.print();window.close()<\/script>":"")+"</body></html>"),i.close(),i};const rt=function(t,e){if(!t||t instanceof FormData)return t;return"application/x-www-form-urlencoded"==(lt.lodash.get(e,'headers["Content-Type"]')||lt.lodash.get(lt.x,'http.headers.post["Content-Type"]'))?l.stringify(t,{arrayFormat:"repeat"}):t};function ot(t,e){e.value?t.setAttribute("w-form-ignore",""):t.removeAttribute("w-form-ignore")}lt.ajax=async function(t,e){let i=e?lt.urlFormat(t.src,e):t.src;if(!i&&!t.request)return Promise.reject("$.ajax(): The first parameter must be an object, and the property(src) of the object is required.");let s=lt.lodash.pick(t,["headers","responseType","transformRequest","transformResponse","timeout","cancelToken"]);if(t.download&<.extend(s,{responseType:"blob"}),t.request)return t.request(t.data);{let e=(t.method||(t.data?"post":"get")).toLowerCase();return("post"===e||"put"===e||"patch"===e?lt.http[e](i,rt(t.data,s),s):lt.http[e](i,s)).then(e=>{let i=e.data;if(t.filter&&(i=t.filter(e)),t.success&&t.success(i),t.complete&&t.complete(e),t.download){let t=e.headers["content-disposition"];if(t){let i=decodeURI(t.substring(t.indexOf("filename=")+9,t.length)),s=new Blob([e.data]),l=document.createElement("a");l.href=URL.createObjectURL(s),l.download=i,l.click(),l.remove()}else console.error("download: none content-disposition")}return i}).catch(e=>(t.error&&t.error(e),t.complete&&t.complete(e.response,e),Promise.reject(e)))}},lt.extend(lt.ajax,{get:(t,e)=>lt.http.get(t,e).then(t=>t&&t.data),head:(t,e)=>lt.http.head(t,e),delete:(t,e)=>lt.http.delete(t,e).then(t=>t&&t.data),post:(t,e,i)=>lt.http.post(t,rt(e,i),i).then(t=>t&&t.data),put:(t,e,i)=>lt.http.put(t,rt(e,i),i).then(t=>t&&t.data),patch:(t,e,i)=>lt.http.patch(t,rt(e,i),i).then(t=>t&&t.data)},i),lt.alert=function(t,e,i,s){return lt.docView.pop("w-alert","object"==typeof t?{title:lt.loc.opertip,...t}:{title:lt.loc.opertip,text:t,position:e,timeout:i,yes:s})},lt.confirm=function(t,e,i,s=!0){return lt.docView.pop("w-confirm","object"==typeof t?{title:lt.loc.opertip,...t}:{title:lt.loc.opertip,text:t,yes:e,no:i,cover:s})},lt.dialog=t=>{if(t){for(t=lt.vm(t);t&&!t.isDialog;)t=t.ownerView;return t}},lt.config=function(t){lt.config_uid=d(),lt.mergeDeep(lt.x,t),t.http&&(lt.mergeDeep(i.defaults,t.http),i.interceptors.response.use(t.http.filter,t.http.error||function(t){return t.response&&(t.callback=()=>lt.alert({icon:".f-i .f-i-alert-warning",text:t.response.status+": "+t.config.url})),Promise.reject(t)}));const e=lt.x.defaultOptions;for(let t in e)if(t.includes(".")){let i=lt.strFrom(t,".").replace(/\./g," "),s=lt.strTo(t,".");(lt.dfclsCache[s]||(lt.dfclsCache[s]={}))[i]=e[t]}},lt.pop=(t,e,i,s)=>(i?lt(i):lt.vm()).pop(t,e,{mode:s}),lt.submit=(t,e={})=>(lt(e.target)||lt.vm()).submit(t,e),lt.symbol={leafSymbol:Symbol("leaf"),changeSymbol:Symbol("change")},window.addEventListener("unhandledrejection",t=>{lt.x.catchReject?lt.x.catchReject(t):(t.reason&&(t.reason.callback?t.reason.callback():"string"==typeof t.reason&&console.error(t.reason)),t.preventDefault())});var at={created:ot,updated:ot};function nt(t){let e=lt.dialog(t.currentTarget);if(e&&!1!==e.x.movable&&!e.x.fullScreen){let i,s=e.el(),l=s.style.left,r=s.style.right,o=s.style.top,a=s.style.bottom,n=a?-1:1,h=r?-1:1,c=n<0?"bottom":"top",u=h<0?"right":"left",d=t.clientX,p=t.clientY,m=lt.number(n<0?a:o),f=lt.number(h<0?r:l),x=document.documentElement.clientHeight,g=document.documentElement.clientWidth;lt.moveup(function(t){i||(i=lt.q("<div class=w-dialog-move-helper></div>").appendTo(document.body),e.el().style.transition="none");let s=lt.numRange(t.clientX,0,g),l=lt.numRange(t.clientY,0,x);e.setPosition({[c]:m+n*(l-p)+"px",[u]:f+h*(s-d)+"px"})},function(t,s){s&&i&&i.remove(),e.el().style.transition=""},t)}}var ht={mounted(t,e){e.value&&t.addEventListener("mousedown",nt)},unmounted(t){t.removeEventListener("mousedown",nt)}};function ct(t,e){t.style.setProperty("--v-label-width",lt.unitSize(e.value))}var ut={created:ct,updated:ct};function dt(t){t.directive("form-ignore",at),t.directive("dialog-move",ht),t.directive("label-width",ut)}const pt={};var mt={props:["data","width","height","colspan","rowspan","ownproperty","orientUid"],data(){return{isWidget:!0,uid:this.orientUid||lt.uid(),runtimeX:{}}},created(){lt.vueMap.set(this.uid,this);let t=this.getDefaultProp(),e=lt.config_uid,i={};this.x=new Proxy(this.runtimeX,{get:(i,s)=>s in i?i[s]:void 0!==this.$props[s]?this.$props[s]:(e!=lt.config_uid&&(e=lt.config_uid,t=this.getDefaultProp()),t[s]),set:(t,e,s)=>(i[e]||(i[e]=this.$watch(e,i=>t[e]=i)),t[e]=s,!0)})},unmounted(){lt.vueMap.delete(this.uid)},methods:{x_default(){},getDefaultProp(){let t;if(!this.ownproperty){let e=this.$options.name;if(t=lt.x.defaultOptions[e],lt.dfclsCache[e]){let i,s=this.$options.name+(this.$attrs.class?" "+this.$attrs.class:""),l=lt.dfclsCache[e];for(let t in l)lt.idsAll(s,t," ")&<.mergeDeep(i||(i={}),l[t]);i&&(t=lt.extendDeep(i,t))}}return{...this.x_default(),...t}},attr(t,e){if(2!=arguments.length)return this.x[t];this.x[t]=e},ajax(t){return this.setLoading&&this.setLoading(),lt.ajax(t).then(t=>(this.setLoading&&this.setLoading(!1),t))},submit(t,e){return"object"==typeof t&&(e=t,t=null),e||(e={}),t&&(e.request=t),new Promise(async t=>{await r.nextTick();const i=lt.vm(this);if(this.setLoading&&this.setLoading(),await i.valid(e.range,e.group)){let s=i.getPostData(e.range);e.data=e.data&&s?lt.extend({},e.data,s):e.data||s,t(this.ajax(e))}else this.setLoading&&this.setLoading(!1)})},pop(t,e,i){return lt.vm(this).createPop(this,t,e,i)},closePop(t){const e=lt.vm(this);e.getPops(t).forEach(t=>e.removePop(t))},createEvent(t,e){return{type:t,uid:this.uid,...e}},trigger(t,...e){let i=t.runType||t.type||t,s=this.getOn(i);s&&("string"==typeof t&&(t=this.createEvent(t)),Array.isArray(s)?s.forEach(i=>i(t,...e)):s(t,...e))},getOn(t){let e="on"+t.charAt(0).toUpperCase()+t.slice(1);return this.$.vnode.props&&this.$.vnode.props[e]||this.x[e]},getKey(){return this.$.vnode.key},closest(t,e){let i=this;const s=typeof t;do{if("string"===s){if(lt.idsAny(t,i.$options.name))return i}else if("function"===s&&t(i))return i;if(i.isDialog||i==e)return}while(i=i.$parent)},contains(t){return t&&this.el()&&this.el().contains(t.isWidget?t.el():t)},el(t){if(t&&/\W/.test(t)){const e=this.el();return e&<.q(t,e)[0]}return document.getElementById(this.uid+(t||""))},snapElem(){return this.el()},scrollIntoView(t=!1){const e=(e,i)=>{let s="hasScroll"+e.toUpperCase(),l=this.closest(t=>t[s]&&(t.scrollState()||!1)[e]);l?l.scrollTo(this,t.hasOwnProperty("y")?t.y:"auto",t.x,null==t.ease?200:t.ease,t.divide,i):i&&i()};e("y",()=>e("x",t.success))},hasBubble(t){if(!t)return!1;if(this.contains(t))return!0;let e=lt.dialog(t);return e&&e.commander?e.commander===t||this.hasBubble(e.commander):void 0},bind(t,e){let i=pt[this.uid]||(pt[this.uid]={});return i[t]||(i[t]=e||this[t]),i[t]},slots_children(t){return lt.slotsChildren(this.$slots,t)},slot(t="default"){return this.$slots[t]?this.$slots[t]():[]},html_icon(t,e,i){const s=t.startsWith(".")&&!t.includes("/"),l=this.$.vnode.scopeId||"";return s?r.h("i",{[`${l}`]:"",class:[e,t.replace(/\./g,"")],onclick:i}):r.h("img",{src:t,onclick:i,class:e,[`${l}`]:""})},html_slots(){return this.$slots},html_self(t){return r.h(this.tagName||"div",t?r.mergeProps(this.html_attrs,this.html_props,this.$attrs):r.mergeProps(this.html_attrs,this.html_props),this.html_slots())},html(){return this.html_self()}},computed:{dfish:()=>lt,ownerView(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},pubParent(){return this.providePubParent&<.idsAny(this.$options.pubParentName,this.providePubParent.$options.name)&&this.providePubParent},parentNode(){return lt(this.el().parentElement)},tagName:()=>"div",html_attrs(){return{id:this.uid,class:[this.$options.name,this.html_class],style:[{width:this.x.width&<.unitSize(this.x.width),height:this.x.height&<.unitSize(this.x.height),"--w-grid-colspan":this.x.colspan&&-1!=this.x.colspan?`span ${this.x.colspan}`:null,"--w-grid-rowspan":this.x.rowspan&&-1!=this.x.rowspan?`span ${this.x.rowspan}`:null},this.html_style],"w-key":this.getKey(),"w-width":"*"===this.x.width?"*":null,"w-height":"*"===this.x.height?"*":null}},html_style(){},html_class(){},html_props(){},html_binds(){return r.mergeProps(this.html_attrs,this.html_props,this.$attrs)}},render(){return this.html()},__file:"src/widgets/WidgetAbs.vue"},ft={props:["src","children","parentItem"],data:()=>({loading:!1,loaded:!1}),methods:{getSrc(){return(this.x||this.$props).src},request(t){let e=this.getSrc();if(e&&!this.loading&&(this.showLoading(!0),"function"==typeof e))return e(this).then(e=>{this.showLoading(!1),this.loaded=!0,t&&t()}).catch(t=>{this.showLoading(!1),this.loaded=!0})},showLoading(t){this.loading=t}},__file:"src/widgets/SrcParent.vue"},xt={name:"w-view",mixins:[ft],provide(){return{provideView:this}},props:["commands"],data:()=>({isView:!0,pops:[]}),beforeCreate(){this.popCommanders={}},methods:{find(t){const e=this.el().querySelectorAll(`[w-key="${t}"]`);for(let t of e)if((t=lt(t))&&t.ownerView===this)return t},fv(t,e){let i=this.f(t);if(2===arguments.length)i&&(i.groupFormVal?i.groupFormVal(e):i.val(e));else{if("object"!=typeof t)return i&&(i.groupFormVal?i.groupFormVal():i.formVal());for(let e in t)this.fv(e,t[e])}},f(t,e){return this.fAll(t,e)[0]},fAll(t,e){if("*"===t||null==t){for(var i,s,l=0,r=this.getFormList(e,!0),o=r.length,a=[];l<o;l++)(i=lt(r[l]))&&i!=s&&a.push(s=i);return a}let n=e?e.isWidget?e.el():e:this.el(),h=lt.q(':input[name="'+t+'"]',n);return h.length||(h=lt.q(':input[w-name="'+t+'"]',n)),lt.lodash.map(h.not("[w-form-ignore] :input"),t=>lt(t))},getFormList(t,e){let i,s=":input:not(button)"+(e?"":":not(:disabled)");if(t&&"string"==typeof t){let e="!"===t.charAt(0),l=t.replace(/\!/g,"").split(",").map(t=>`[w-key="${t}"] ${s}`);(l=l.join())&&(i=lt.q(e?`${s}:not(${l})`:l,this.el()))}else i=lt.q(s,Array.isArray(t)?lt.q(t.map(t=>lt.el(t))):t?lt.el(t):this.el());return i?lt.lodash.map(i.not("[w-form-ignore] :input")):[]},getPostData(t){let e={};return this.getFormList(t).forEach(t=>{let i=t.name,s=t.value;if(i){switch(t.type){case"text":"number"===t.getAttribute("w-valuetype")&&(s=s.replace(/[^\d\.-]/g,""));break;case"checkbox":if(!(t.value&&(t.checked||t.indeterminate&&t.getAttribute("w-partialsubmit"))))return null;break;case"radio":if(!t.value||!t.checked)return null;i=t.getAttribute("w-name")||i;break;case"select-one":if(t.selectedIndex<0)return null}s&&(s=lt.strTrim(s)),i in e?(Array.isArray(e[i])||(e[i]=[e[i]]),e[i].push(s)):e[i]=s}}),e},async getValidError(t){let e,i=this.getFormList(t);const s={};for(let t,l,r=0,o=i.length;r<o;r++)(t=lt(i[r]))&&t.isFormWidget&&(l=i[r].name in s?s[i[r].name]&<.extend({wid:t.uid},s[i[r].name]):await t.getValidError(),l&&(e||(e=[]),e.find(t=>t.wid==l.wid)||e.push(l))),"checkbox"!==i[r].type&&"radio"!==i[r].type||(s[i[r].name]=l);return e},async valid(t){this._err_ns&&this._err_ns.forEach(t=>{const e=lt.vueMap.get(t.wid);e&&e.warn(!1)});let e=await this.getValidError(t);return e&&(e.forEach(t=>lt.vueMap.get(t.wid).warn()),lt.vueMap.get(e[0].wid).showErrorTip(e[0].text)),!(this._err_ns=e)},isModified(t,e){return this.getFormList(t).find(t=>(t=lt(t)).isModified&&t.isModified(e))},saveModified(t,e){this.getFormList(t).forEach(t=>(t=lt(t)).saveModified&&t.saveModified(e))},resetFormStyle(t){this.getFormList(t).forEach(t=>{const e=lt(t);e.warn&&e.warn(!1)})},resetForm(t,e){this.getFormList(t).forEach(t=>{const i=lt(t);i.reset&&i.reset(e)})},showLoading(t){if(!1!==t)return this.pop("w-loading",{cover:!0,local:!0,...t});this.pop("w-loading",!1)},createPop(t,e,i,s={}){return new Promise((l,r)=>{const o=s.mode||"multiple",a=this.getPops(e)[0];if(a){if("component"===o)return void Object.assign(a,{props:i,options:s,resolve:l,reject:r});if("single"===o){let t=this.pops.indexOf(a);this.pops.splice(t,1)}}const n=lt.uid();this.pops.push({commander:t,template:e,props:i,options:s,orientUid:n,resolve:l,reject:r})})},removePop(t){let e="string"==typeof t?this.pops.findIndex(e=>e.orientUid==t):this.pops.indexOf(t);e>-1&&this.pops.splice(e,1)},getPops(t,e){return this.pops.filter(i=>(!t||r.toRaw(i.template)==r.toRaw(t))&&(!e||i.commander==e))},getPopById(t){return this.pops.find(e=>e.orientUid==t)},html_pops(){return this.pops.map(({template:t,orientUid:e,props:i})=>{const s="string"==typeof t?r.resolveComponent(t):r.toRaw(t);return s&&r.h(s,{key:e,orientUid:e,...i})})}},__file:"src/widgets/ViewAbs.vue"},gt={name:"SVGIcon"};const vt={style:{display:"none",width:"0",height:"0"},width:"0",height:"0",focusable:"false","aria-hidden":"true"};gt.render=function(t,e,i,s,l,o){return r.openBlock(),r.createElementBlock("svg",vt,e[0]||(e[0]=[r.createStaticVNode('<symbol id="f-svg-loading" viewBox="0 0 50 50"><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" transform="rotate(86.9154 25 25)"></path></symbol><symbol id="f-svg-loading-1" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20"></circle></symbol><symbol id="f-svg-loading-2" viewBox="0 0 24 30"><rect x="0" y="8.66115" width="4" height="12.6777" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="8" y="6.16115" width="4" height="17.6777" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="16" y="6.33885" width="4" height="17.3223" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate></rect></symbol>',3),r.createElementVNode("symbol",{id:"f-svg-loading-3",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{d:"M514.048 337.715a32 32 0 0 1-32-32V135.168a32 32 0 1 1 64 0v170.534a32 32 0 0 1-32 32z m-1.28 581.799a32 32 0 0 1-32-32V714.406a32 32 0 1 1 64 0v173.095a32 32 0 0 1-32 32zM305.011 543.347H135.744a32 32 0 0 1 0-64h169.267a32 32 0 0 1 0 64z m583.079 0H713.83a32 32 0 0 1 0-64h174.26a32 32 0 1 1 0 64zM245.978 806.4a32 32 0 0 1-22.656-54.669L342.643 632.32a32 32 0 0 1 45.325 45.325L268.646 796.979a31.898 31.898 0 0 1-22.668 9.344z m408.435-408.5a32 32 0 0 1-22.656-54.68l123.558-123.56a32 32 0 1 1 45.325 45.3L677.12 388.544a31.898 31.898 0 0 1-22.669 9.357z m121.523 411.06a31.885 31.885 0 0 1-22.669-9.344l-122.15-122.15a32 32 0 1 1 45.325-45.325l122.15 122.15a32 32 0 0 1-22.656 54.669zM364.672 397.632a31.923 31.923 0 0 1-22.669-9.344L221.273 267.52a32 32 0 1 1 45.325-45.325l120.73 120.743a32 32 0 0 1-22.656 54.668z m0 0","p-id":"4486"})],-1)]))},gt.__file="src/assets/SVGIcon.vue";var wt={props:["data"],data(){return{rotate:{},current:lt.lodash.get(this.data,"options.current",0)}},methods:{close(){lt.close(this)},rot(t){let e=this.$refs.swiper.focusIndex,i=this.rotate[e];null==i&&(i=this.rotate[e]=0);let s=this.$refs.swiper.getCurrentItem().el(),l=lt.bcr(s),r=l.width-40,o=l.height-80;t>0?i+=90:t<0&&(i-=90);let a=i/90%2;lt.q("._img",s).css({transform:"rotate("+i+"deg)",maxWidth:a?o:r,maxHeight:a?r:o}),this.rotate[e]=i}},computed:{loc:()=>lt.loc},mounted(){}};const bt={class:"f-height f-rel f-oh"},_t=["src"],yt={class:"_rotate"};wt.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-swiper-item"),n=r.resolveComponent("w-swiper"),h=r.resolveComponent("w-video"),c=r.resolveComponent("w-dialog");return r.openBlock(),r.createBlock(c,{class:"f-dialog-preview",width:"calc(100% - 100px)",height:"calc(100% - 100px)",ownproperty:!0,cover:!0,autoHide:!0},{default:r.withCtx(()=>["image"==i.data.type?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(n,{ref:"swiper",class:"f-height",current:l.current,arrow:i.data.imgs.length>1,"indicator-dots":i.data.imgs.length>1,duration:"300"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.data.imgs,(t,e)=>(r.openBlock(),r.createBlock(a,{key:e},{default:r.withCtx(()=>[r.createElementVNode("div",bt,[r.createElementVNode("img",{class:"_img",src:t},null,8,_t)])]),_:2},1024))),128))]),_:1},8,["current","arrow","indicator-dots"]),r.createElementVNode("div",yt,[r.createElementVNode("a",{class:"_l",onClick:e[0]||(e[0]=t=>o.rot(-1))},r.toDisplayString(o.loc.rotate_left),1),e[3]||(e[3]=r.createElementVNode("span",{class:"_s"},"|",-1)),r.createElementVNode("a",{class:"_r",onClick:e[1]||(e[1]=t=>o.rot(1))},r.toDisplayString(o.loc.rotate_right),1)])],64)):(r.openBlock(),r.createBlock(h,{key:1,class:"f-height",src:i.data.src},null,8,["src"])),r.createElementVNode("div",{class:"_dlg_x",onClick:e[2]||(e[2]=(...t)=>o.close&&o.close(...t))})]),_:1})},wt.__file="src/template/TemplatePreviewMedia.vue";var kt={props:["data"],data(){let t=this.data.format||"yyyy-MM-dd",e=this.data&&this.data.value?lt.dateParse(this.data.value,t):new Date,i=this.data&&this.data.minValue&<.dateParse(this.data.minValue,t),s=this.data&&this.data.maxValue&<.dateParse(this.data.maxValue,t);e=lt.numRange(e,i,s);let l,r,o,a=e.getFullYear();return t.includes("w")&&(l=lt.dateWeek(e)[1],r=lt.dateWeekFirst(a),o=lt.dateWeekLast(a)),{focusYear:a,focusMonth:e.getMonth(),focusDate:e.getDate(),focusHour:e.getHours(),focusMinute:e.getMinutes(),focusSecond:e.getSeconds(),startYear:lt.numRange(e.getFullYear()-30,i&&i.getFullYear()),endYear:lt.numRange(e.getFullYear()+30,null,s&&s.getFullYear()),monthDays:new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),focusWeek:l,weekFirst:r,weekLast:o,minTime:i,maxTime:s,format:t}},watch:{focusYear(t){t==this.yearList[0]&&t>1030?this.startYear=lt.numRange(this.startYear-30,this.minYear):t==this.yearList.at(-1)&&(this.endYear=lt.numRange(this.endYear+30,null,this.maxYear)),this.monthDays=new Date(t,this.focusMonth+1,0).getDate(),this.hasWeek&&(this.weekFirst=lt.dateWeekFirst(t),this.weekLast=lt.dateWeekLast(t))},focusMonth(t){this.monthDays=new Date(this.focusYear,t+1,0).getDate()}},methods:{weekText(t){},clickCancel(){lt.close(this)},clickOK(t){if(this.data.success){let e=this.hasWeek?lt.dateParse(`${this.focusYear}-${this.focusWeek}`,"yyyy-ww"):new Date(this.focusYear,this.focusMonth,this.focusDate,this.focusHour,this.focusMinute,this.focusSecond);this.data.success(lt.dateFormat(e,this.format),t)}lt.close(this)}},computed:{dfish:()=>lt,yearList(){return Array.from(Array(this.endYear-this.startYear+1)).map((t,e)=>this.startYear+e)},monthList:()=>Array.from(Array(12)).map((t,e)=>e),dateList(){return Array.from(Array(this.monthDays)).map((t,e)=>e+1)},hourList:()=>Array.from(Array(24)).map((t,e)=>e),minuteList:()=>Array.from(Array(60)).map((t,e)=>e),secondList:()=>Array.from(Array(60)).map((t,e)=>e),weekList(){let t=this.weekFirst[2];return Array.from(Array(this.weekLast[1])).map((e,i)=>{let s=t,l=lt.dateAdd(t,"d",6);return t=lt.dateAdd(t,"d",7),{value:i+1,text:`${lt.strPad(i+1)} (${lt.dateFormat(s,"MM.dd")} - ${lt.dateFormat(l,"MM.dd")})`}})},hasYear(){return this.format.includes("y")},hasMonth(){return this.format.includes("M")},hasDate(){return this.format.includes("d")},hasHour(){return this.format.includes("H")},hasMinute(){return this.format.includes("m")},hasSecond(){return this.format.includes("s")},hasWeek(){return this.format.includes("w")},minYear(){return this.minTime&&this.hasYear&&this.minTime.getFullYear()},maxYear(){return this.maxTime&&this.hasYear&&this.maxTime.getFullYear()},minMonth(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&this.minTime.getMonth()},maxMonth(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&this.maxTime.getMonth()},minDate(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&this.minTime.getDate()},maxDate(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&this.maxTime.getDate()},minHour(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&this.minTime.getHours()},maxHour(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&this.maxTime.getHours()},minMinute(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&this.minTime.getMinutes()},maxMinute(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&this.maxTime.getMinutes()},minSecond(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&(!this.hasMinute||this.minMinute==this.focusMinute)&&this.minTime.getSeconds()},maxSecond(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&(!this.hasMinute||this.maxMinute==this.focusMinute)&&this.maxTime.getSeconds()},minWeek(){},maxWeek(){}}};kt.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-button"),n=r.resolveComponent("w-buttonbar"),h=r.resolveComponent("w-html"),c=r.resolveComponent("w-option"),u=r.resolveComponent("w-slidepicker"),d=r.resolveComponent("w-vertical"),p=r.resolveComponent("w-horizontal"),m=r.resolveComponent("w-dialog");return r.openBlock(),r.createBlock(m,{class:"f-datesheet"},{default:r.withCtx(()=>[r.createVNode(n,{class:"f-datesheet-bbr",align:"between",height:"52",style:{padding:"0 10px"}},{default:r.withCtx(()=>[r.createVNode(a,{text:"取消",onClick:o.clickCancel},null,8,["onClick"]),r.createVNode(a,{text:"确定",onClick:o.clickOK,face:"primary"},null,8,["onClick"])]),_:1}),r.createVNode(p,{height:"*"},{default:r.withCtx(()=>[o.hasYear?(r.openBlock(),r.createBlock(d,{key:0,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[7]||(e[7]=[r.createTextVNode("年")])),_:1,__:[7]}),r.createVNode(u,{height:"*",modelValue:l.focusYear,"onUpdate:modelValue":e[0]||(e[0]=t=>l.focusYear=t),"min-value":o.minYear,"max-value":o.maxYear,"keep-index":!0,data:{mode:"year"}},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.yearList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:t},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasMonth?(r.openBlock(),r.createBlock(d,{key:1,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[8]||(e[8]=[r.createTextVNode("月")])),_:1,__:[8]}),r.createVNode(u,{height:"*",modelValue:l.focusMonth,"onUpdate:modelValue":e[1]||(e[1]=t=>l.focusMonth=t),"min-value":o.minMonth,"max-value":o.maxMonth,"keep-index":!0,data:{mode:"month"}},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.monthList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t+1)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasDate?(r.openBlock(),r.createBlock(d,{key:2,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[9]||(e[9]=[r.createTextVNode("日")])),_:1,__:[9]}),r.createVNode(u,{height:"*",modelValue:l.focusDate,"onUpdate:modelValue":e[2]||(e[2]=t=>l.focusDate=t),"min-value":o.minDate,"max-value":o.maxDate,"keep-index":!0,data:{mode:"date"}},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.dateList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasHour?(r.openBlock(),r.createBlock(d,{key:3,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[10]||(e[10]=[r.createTextVNode("时")])),_:1,__:[10]}),r.createVNode(u,{height:"*",modelValue:l.focusHour,"onUpdate:modelValue":e[3]||(e[3]=t=>l.focusHour=t),"min-value":o.minHour,"max-value":o.maxHour,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.hourList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasMinute?(r.openBlock(),r.createBlock(d,{key:4,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[11]||(e[11]=[r.createTextVNode("分")])),_:1,__:[11]}),r.createVNode(u,{height:"*",modelValue:l.focusMinute,"onUpdate:modelValue":e[4]||(e[4]=t=>l.focusMinute=t),"min-value":o.minMinute,"max-value":o.maxMinute,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.minuteList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasSecond?(r.openBlock(),r.createBlock(d,{key:5,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[12]||(e[12]=[r.createTextVNode("秒")])),_:1,__:[12]}),r.createVNode(u,{height:"*",modelValue:l.focusSecond,"onUpdate:modelValue":e[5]||(e[5]=t=>l.focusSecond=t),"min-value":o.minSecond,"max-value":o.maxSecond,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.secondList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasWeek?(r.openBlock(),r.createBlock(d,{key:6,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[13]||(e[13]=[r.createTextVNode("周")])),_:1,__:[13]}),r.createVNode(u,{height:"*",modelValue:l.focusWeek,"onUpdate:modelValue":e[6]||(e[6]=t=>l.focusWeek=t),"min-value":o.minWeek,"max-value":o.maxWeek,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.weekList,t=>(r.openBlock(),r.createBlock(c,{key:t.value,value:t.value,text:t.text},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0)]),_:1})]),_:1})},kt.__file="src/template/TemplateDateSheet.vue";var Ct={name:"w-docview",mixins:[mt,xt],provide:()=>({providePubParent:null,provideBoxParent:null,provideRangeParent:null,provideCompatGap:null,provideMenu_w:null,provideTripleboxContainer:null}),beforeCreate(){lt.docView=this,lt.q(document.body).prepend("<div id=w-dfish-pops></div>")},methods:{el:()=>document.getElementById("app")||document.body,getKey:()=>null,previewVideo(t){this.pop(wt,{data:{type:"video",src:t}})},previewImage(t,e){this.pop(wt,{data:{type:"image",imgs:t,options:e}})},dateSheet(t,e){this.pop(kt,{template:kt,width:"100%",height:"55%",position:"b",cover:!0,autoHide:!0,data:t,on:{"click:cover":lt.close}})},html(){return[this.$slots.default?this.$slots.default():null,this.html_pops(),r.h(gt)]}},__file:"src/widgets/DocView.vue"},St=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var i=-1;return t.some(function(t,s){return t[0]===e&&(i=s,!0)}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),s=this.__entries__[i];return s&&s[1]},e.prototype.set=function(e,i){var s=t(this.__entries__,e);~s?this.__entries__[s][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,s=t(i,e);~s&&i.splice(s,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,s=this.__entries__;i<s.length;i++){var l=s[i];t.call(e,l[1],l[0])}},e}()}(),Vt="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Tt="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Mt="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Tt):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)};var Pt=["top","right","bottom","left","width","height","size","weight"],$t="undefined"!=typeof MutationObserver,Bt=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,s=!1,l=0;function r(){i&&(i=!1,t()),s&&a()}function o(){Mt(r)}function a(){var t=Date.now();if(i){if(t-l<2)return;s=!0}else i=!0,s=!1,setTimeout(o,e);l=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){Vt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$t?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Vt&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;Pt.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),zt=function(t,e){for(var i=0,s=Object.keys(e);i<s.length;i++){var l=s[i];Object.defineProperty(t,l,{value:e[l],enumerable:!1,writable:!1,configurable:!0})}return t},Dt=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Tt},Et=It(0,0,0,0);function Nt(t){return parseFloat(t)||0}function Lt(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(e,i){return e+Nt(t["border-"+i+"-width"])},0)}function Ft(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return Et;var s=Dt(t).getComputedStyle(t),l=function(t){for(var e={},i=0,s=["top","right","bottom","left"];i<s.length;i++){var l=s[i],r=t["padding-"+l];e[l]=Nt(r)}return e}(s),r=l.left+l.right,o=l.top+l.bottom,a=Nt(s.width),n=Nt(s.height);if("border-box"===s.boxSizing&&(Math.round(a+r)!==e&&(a-=Lt(s,"left","right")+r),Math.round(n+o)!==i&&(n-=Lt(s,"top","bottom")+o)),!function(t){return t===Dt(t).document.documentElement}(t)){var h=Math.round(a+r)-e,c=Math.round(n+o)-i;1!==Math.abs(h)&&(a-=h),1!==Math.abs(c)&&(n-=c)}return It(l.left,l.top,a,n)}var At="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Dt(t).SVGGraphicsElement}:function(t){return t instanceof Dt(t).SVGElement&&"function"==typeof t.getBBox};function Ht(t){return Vt?At(t)?function(t){var e=t.getBBox();return It(0,0,e.width,e.height)}(t):Ft(t):Et}function It(t,e,i,s){return{x:t,y:e,width:i,height:s}}var Yt=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=It(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Ht(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Ot=function(t,e){var i,s,l,r,o,a,n,h=(s=(i=e).x,l=i.y,r=i.width,o=i.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,n=Object.create(a.prototype),zt(n,{x:s,y:l,width:r,height:o,top:l,right:s+r,bottom:o+l,left:s}),n);zt(this,{target:t,contentRect:h})},jt=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new St,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Dt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Yt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Dt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new Ot(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),qt="undefined"!=typeof WeakMap?new WeakMap:new St,Rt=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Bt.getInstance(),s=new jt(e,i,this);qt.set(this,s)};["observe","unobserve","disconnect"].forEach(function(t){Rt.prototype[t]=function(){var e;return(e=qt.get(this))[t].apply(e,arguments)}});var Wt=void 0!==Tt.ResizeObserver?Tt.ResizeObserver:Rt,Ut={mixins:[mt],inject:["provideView"],__file:"src/widgets/WidgetBase.vue"};const Xt=function(t){if(this.wScrollPercentX){let e=t.target.scrollLeft;this.scrollXPosition=0==e?"left":e>=this.wScrollSizeX?"right":"center",this.el("wScrollBarThumbX").style.transform=`translateX(${e/this.wScrollPercentX}px)`}if(this.wScrollPercentY){let e=t.target.scrollTop;this.scrollYPosition=0==e?"top":e>=this.wScrollSizeY?"bottom":"middle",this.el("wScrollBarThumbY").style.transform=`translateY(${e/this.wScrollPercentY}px)`}this.onScroll(t)},Qt=function(t){let e,i,s,l,r,o=this.el("wScrollOverflow"),a=this.wScrollPercentX,n=this.wScrollPercentY;lt.moveup(h=>{e||(e=this.el("wScrollBarThumbX")===t.target?"X":"Y",i=t.clientX,s=t.clientY,l=o.scrollLeft,r=o.scrollTop,t.target.parentNode.classList.add("z-drag")),"X"===e?o.scrollLeft=l+(h.clientX-i)*a:o.scrollTop=r+(h.clientY-s)*n},(e,i)=>{i&&t.target.parentNode.classList.remove("z-drag")},t)};var Gt={mixins:[Ut],props:["scrollX","scrollY","scrollView","scrollFlex"],emits:["scroll","resize"],data:()=>({wScrollPercentX:!1,wScrollPercentY:!1,wScrollSizeX:!1,wScrollSizeY:!1,scrollXPosition:"left",scrollYPosition:"top",isDeactivated:!1}),watch:{scrollXPosition(t){this.onScrollPosition(t)},scrollYPosition(t){this.onScrollPosition(t)},wScrollPercentX(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-x",""):e.removeAttribute("w-scroll-show-x"))},wScrollPercentY(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-y",""):e.removeAttribute("w-scroll-show-y"))}},methods:{onScroll(t){this.$emit("scroll",t)},onScrollPosition(){},onScrollAttributeChange(t){},onScrollResize(){},scrollTo(t,e,i,s,l,r){let o=this.ovf();if(!o)return r&&r();let a,n,h=this.el("wScrollCont")||o,c=lt.bcr(o),u=lt.bcr(h),d=t?lt.bcr(t):u;if(null!=e)if(isNaN(e))if(~e.indexOf("top")){a=0;let t=i.slice(3);t&&(a=o.scrollTop+ +t)}else if(~e.indexOf("bottom"))a=d.bottom-u.top-c.height+ +e.slice(6);else if("middle"===e)a=d.top-u.top-(c.height/2-d.height/2);else if("nearest"===e){let t=i.slice(7);t=t?t.split(","):[0,0],d.top-t[0]<c.top?a=o.scrollTop-c.top+d.top-t[0]:d.bottom>c.bottom-t[1]&&(a=o.scrollTop+d.bottom-c.bottom+ +t[1])}else(d.top<c.top||d.bottom>c.bottom)&&(a=d.top-u.top-(c.height/2-d.height/2));else a=lt.number(e),t&&(a=d.top-u.top-a);if(null!=i)if(isNaN(i))if(~i.indexOf("left")){n=0;let t=i.slice(4);t&&(n=o.scrollLeft+ +t)}else if(~i.indexOf("right"))n=d.right-u.left-c.width+ +i.slice(5);else if("center"===i)n=d.left-u.left-(c.width/2-d.width/2);else if(~i.indexOf("nearest")){let t=i.slice(7);t=t?t.split(","):[0,0],d.left-t[0]<c.left?n=o.scrollLeft-c.left+d.left-t[0]:d.right>c.right-t[1]&&(n=o.scrollLeft+d.right-c.right+ +t[1])}else(d.left<c.left||d.right>c.right)&&(n=d.left-u.left-(c.width/2-d.width/2));else n=lt.number(i),t&&(n=d.left-u.left-n);if(null!=l&&(null!=a&&(a-=a%l),null!=n&&(n-=n%l)),!s||null==a&&null==n)null!=a&&(o.scrollTop=a),null!=n&&(o.scrollLeft=n),r&&r();else{let t=o.scrollTop,e=o.scrollLeft;lt.ease(i=>{null!=a&&(o.scrollTop=t+(a-t)*i),null!=n&&(o.scrollLeft=e+(n-e)*i),1===i&&r&&r()},s)}},scrollToY(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollTop;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,e,null,i,s,l)},scrollToX(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollLeft;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,null,e,i,s,l)},ovf(){return lt.br.mobile?this.el():this.el("wScrollOverflow")||this.el("wScrollCont")},html_scroll_slots(t){return this.hasScrollX||this.hasScrollY?[r.h("div",{id:this.uid+"wScrollOverflow",class:"w-scroll-overflow",onscroll:Xt.bind(this),onmouseenter:this.initScroll},r.h("div",{class:"w-scroll-cont",style:this.html_scroll_cont_style,id:this.uid+"wScrollCont"},t||this.$slots.default&&this.$slots.default())),!lt.br.mobile&&this.hasScrollX&&[r.h("div",{class:"w-scrollbar-x",id:this.uid+"wScrollBarX",onmousedown:Qt.bind(this)},r.h("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbX"}))],!lt.br.mobile&&this.hasScrollY&&[r.h("div",{class:"w-scrollbar-y",id:this.uid+"wScrollBarY",onmousedown:Qt.bind(this)},r.h("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbY"}))]]:t||this.$slots.default&&this.$slots.default()},scrollState(){if(lt.br.mobile||!this.el("wScrollCont")||!this.el())return;const t=this.el("wScrollOverflow").getBoundingClientRect(),e=this.el("wScrollCont").getBoundingClientRect();let i,s;if(this.hasScrollX){let s=e.width>t.width&&e.width-t.width;s&&s<=1&&(s=!1),s&&(i={size:s,percent:t.width/e.width})}if(this.hasScrollY){let i=e.height>t.height&&e.height-t.height;i&&(s={size:i,percent:t.height/e.height})}return{x:i,y:s}},initScroll(){const t=this.scrollState();if(!t)return;const e=this.el().getBoundingClientRect(),{x:i,y:s}=t;if(i){let t=i.percent*e.width;this.el("wScrollBarThumbX").style.width=Math.max(20,t)+"px",this.wScrollSizeX=i.size,this.wScrollPercentX=i.size&&i.size/((1-i.percent)*(e.width-(t<20?20-t:0)))}else this.wScrollSizeX=this.wScrollPercentX=!1;if(s){let t=s.percent*e.height;this.el("wScrollBarThumbY").style.height=Math.max(20,t)+"px",this.wScrollSizeY=s.size,this.wScrollPercentY=s.size&&s.size/((1-s.percent)*(e.height-(t<20?20-t:0)))}else this.wScrollSizeY=this.wScrollPercentY=!1},scroll_observe_overflow(t){this.$emit("resize"),this.scroll_observe(t)},scroll_observe(t){this.isDeactivated||(this.initScroll(),this.onScrollResize(t),this.el("wScrollOverflow")&&this.el("wScrollOverflow").dispatchEvent(new Event("scroll")))}},computed:{hasScrollX(){return this.x.scrollX},hasScrollY(){return this.x.scrollY},html_scroll_cont_style(){},html_scroll_class(){let t=this.hasScrollX,e=this.hasScrollY;return{"w-scroll":t||e,"w-scroll-x":t,"w-scroll-y":e,"w-scroll-flex":this.x.scrollFlex}}},mounted(){this.x.scrollView&&this.el()&&setTimeout(()=>{let t=this.el().querySelector(this.x.scrollView);t&&this.scrollToY(t,"middle")}),lt.br.mobile||!this.hasScrollX&&!this.hasScrollY||(this.el("wScrollOverflow")&&new Wt(this.scroll_observe_overflow).observe(this.el("wScrollOverflow")),this.el("wScrollCont")&&new Wt(this.scroll_observe).observe(this.el("wScrollCont")),this.el()&&new MutationObserver(this.onScrollAttributeChange).observe(this.el(),{attributes:!0}))},deactivated(){this.isDeactivated=!0},activated(){this.isDeactivated=!1,this.hasScrollY&&this.el("wScrollBarThumbY")&&this.scrollToY(lt.number(this.el("wScrollBarThumbY").style.transform)*this.wScrollPercentY),this.hasScrollX&&this.el("wScrollBarThumbX")&&this.scrollToX(lt.number(this.el("wScrollBarThumbX").style.transform)*this.wScrollPercentX)},__file:"src/widgets/Scroll.vue"},Jt={props:["align","valign","gap"],computed:{dir:()=>"h",html_align_class(){return[this.x.align&&"z-"+(this.x.vertical?"v":this.dir)+"-align-"+this.x.align,this.x.valign&&"z-"+(this.x.vertical?"v":this.dir)+"-valign-"+this.x.valign]}},__file:"src/widgets/AlignParent.vue"},Kt={name:"w-horizontal",mixins:[Gt,Jt],props:["br","reverse"],provide(){return{provideLayout:this.$options.name,provideCompatGap:this.compatGap}},inject:["provideCompatGap"],methods:{html_slots(){return this.html_scroll_slots()}},computed:{dir:()=>"h",compatGap(){return lt.br.compat.gap?this.x?this.x.gap:this.gap:null},html_props_on(){},html_props(){let t=this.x.gap;return{class:[this.html_scroll_class,this.html_align_class,{"z-br":this.x.br,[`f-${this.dir}-gap${this.x.reverse?"-reverse":""}`]:null!=t&&""!==t&&(lt.br.compat.gap||t<0)}],style:!this.x.scrollX&&!this.x.scrollY&&this.html_scroll_cont_style,...this.html_props_on}},html_scroll_cont_style(){let t=this.x.gap,e={};return null!=t&&(e.gap=lt.unitSize(t)),(lt.br.compat.gap||t<0)&&(e["--w-gap"]=lt.unitSize(t)),lt.br.compat.gap&&null!=this.provideCompatGap&&(e["--w-compat-gap"]=lt.unitSize(this.provideCompatGap)),this.x.reverse&&(e["flex-direction"]=("h"==this.dir?"row":"column")+"-reverse"),e}},__file:"src/widgets/Horizontal.vue"},Zt={name:"w-vertical",mixins:[Kt],computed:{dir:()=>"v"},__file:"src/widgets/Vertical.vue"},te={name:"w-view",mixins:[Zt,xt],inject:["provideView"],methods:{html_slots(){return[this.html_scroll_slots(),this.html_pops()]}},computed:{html_class(){return["w-vertical f-rel",this.html_scroll_class]}},__file:"src/widgets/View.vue"},ee={__name:"DialogTarget",setup(t){const e=r.inject("provideView",null),i=e&&e.provideView;return r.provide("provideView",i),(t,e)=>r.renderSlot(t.$slots,"default")},__file:"src/widgets/DialogTarget.vue"};const ie={},se=!0,le=!1,re={t:"tt",r:"rr",b:"bb",l:"ll",c:"cc",lt:"11",tl:"11",tr:"22",rt:"22",rb:"33",br:"33",bl:"44",lb:"44","-t":"tb","-r":"rl","-b":"bt","-l":"lr","-c":"cc","-tl":"14","-tr":"23","-rt":"21","-rb":"34","-bl":"41","-br":"32","-lt":"12","-lb":"43"},oe=["minWidth","maxWidth","minHeight","maxHeight"];var ae={name:"w-dialog",mixins:[te],props:["title","autoHide","context","prong","independent","timeout","cover","coverProps","position","snap","indent","offsetRange","local","fullScreen","hoverShowDrop","visible",...oe],emits:["show","close","update:visible"],data:()=>({isDialog:!0,keepHover:!1,hoverTimer:null,hoverMove:null,animateState:null,isDeactivated:!1,_pos:null,snapStyle:null,unique:!1}),activated(){this.isDeactivated=!1},deactivated(){this.isDeactivated=!0},methods:{getKey:()=>null,getLocalElem(){if(!0===this.x.local){let t=this.getCommander();return t&<.el(t)}return"string"==typeof this.x.local?document.querySelector(this.x.local):this.x.local},snapTargetElem(){let t=this.x.snap;return"function"==typeof t?t():t?t.isWidget?t.snapElem():t:this.x.local?this.getLocalElem():this.defaultSnapTargetElem},fixSnapStyle(){let t=this._pos,e={};t.type?(t.pix_r?e.right=t.right:e.left=t.left,t.pix_b?(e.pix_b=!0,e.bottom=t.bottom):e.top=t.top,e.type=t.type):e=t,this.snapStyle=e},axis(){let t=this.x.position||this.defaultSnapPosition,e=t;if(this.slotTarget&&!this.x.visible)e={top:0,left:0};else if("string"==typeof t||!t){let s=this.el();if(!s||this.x.fullScreen)return;let l=this.x.local,r=this.snapTargetElem(),o=s.offsetWidth,a=s.offsetHeight,n=null!=this.x.indent?this.x.indent:this.x.prong&&-9;if(e=lt.snap(o,a,r,"string"==typeof(i=t)&&i.split(",").map(t=>re[t]||t).join(),this._fitpos,n,l&&r),!this.x.snap){let i=lt.q(`[w-dialog-position="${e.type}"]:not([id="${this.uid}"]):last`)[0];if(i){let s=lt(i)._pos;"tl"==t||"tr"==t||"t"==t?(e.top=s.top+s.height+5,e.bottom=s.bottom-s.height-5):"br"==t||"bl"==t||"b"==t?(e.top=s.top-s.height-5,e.bottom=s.bottom+s.height+5):"lb"==t||"lt"==t||"l"==t?(e.left=s.left+s.width+5,e.right=s.right-s.width-5):"rb"!=t&&"rt"!=t&&"r"!=t||(e.left=s.left-s.width-5,e.right=s.right+s.width+5)}this.animateState="animating"}}var i;this._pos=e,this.fixSnapStyle(),"string"==typeof this.x.position&&this.x.snap&&this.checkOutScreen()},setPosition(t){this.x.position=t},checkOutScreen(){let t=this._pos;t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},close(){!1!==this.x.visible&&(this.closeRelease(),this.trigger("close"),this.ownerView.removePop(this.uid),this.setVisible(!1))},closeRelease(){this.x.autoHide&&this.listenHide(le);let t=this.x.position,e=this._pos;if(t&&"string"==typeof t&&e&&this.el()){lt.q(`~[w-dialog-position="${e.type}"]`,this.el()).each((i,s)=>{const l=lt(s),r=l._pos;"tl"==t||"tr"==t||"t"==t?(r.top-=e.height+5,r.bottom+=e.height+5):"br"==t||"bl"==t||"b"==t?(r.top+=e.height+5,r.bottom-=e.height+5):"lb"==t||"lt"==t||"l"==t?(r.left-=e.width+5,r.right+=e.width+5):"rb"!=t&&"rt"!=t&&"r"!=t||(r.left+=e.width+5,r.right-=e.width+5),l.fixSnapStyle()})}},listenHide(t){t===le?this.setListenHide(t):setTimeout(()=>{!1!==this.x.visible&&this.setListenHide(t)},100)},setListenHide(t){let e=this.x.hoverShowDrop,i=t?"addEventListener":"removeEventListener",s=lt.br.firefox?"DOMMouseScroll":"mousewheel";if((lt.br.mobile?["touchend"]:["mousedown",s]).forEach(t=>document[i](t,this.bind("listenHideClose",t=>{let e;!1!==this.x.visible&&(t.target.classList.contains("w-dialog-cover")||this.isForceWheelHide&&t.type===s||!(this.hasBubble(t.target)||!this.x.independent&&((e=this.getCommander()).isWidget?e.hasBubble(t.target):e.contains(t.target))))&&(t.target.id==this.id+"cvr"&&t.stopPropagation(),this.close())}),se)),window.plus&&plus.key[i]("backbutton",this.bind("close"),le),e){let t=e===se?this.x.snap?this.snapTargetElem():lt.el(this.getCommander()):lt.el(e),s=this.bind("listenHideHoverOver",t=>{clearTimeout(this.hoverTimer),this.hoverTimer=null}),l=this.bind("listenHideHoverMove",e=>{t.contains(e.target)||this.hasBubble(e.target)||this.keepHover?s():this.hoverTimer||(this.hoverTimer=setTimeout(()=>{this.close(),s()},200))});[t,this.el()].forEach(t=>t&&t[i]("mouseenter",s)),document[i]("mousemove",l)}},autoSetMaxHeight(t){null==this.maxHeight&&(this.x.maxHeight=t)},setVisible(t){t=null==t||t,this.x.visible=t,this.$emit("update:visible",t),this.slotTarget&&(t?this.getTargetElem().setAttribute("w-pop-visible",""):this.getTargetElem().removeAttribute("w-pop-visible")),this.setVisibleSub(t)},setVisibleSub(t){},getTargetElem(){return this.$el?3===this.$el.nodeType?this.$el.nextElementSibling:this.$el:null},getPop(){return this.ownerView.getPopById(this.uid)},getCommander(){if(this.context)return this.context;let t=this.getPop();return t?t.commander:this.slotTarget?this.getTargetElem():this.ownerView},resolve(t){let e=this.getPop();e&&e.resolve&&e.resolve(t)},reject(t){let e=this.getPop();e&&e.reject&&e.reject(t)},html_slots_default:()=>null,html_slots(){let t,e=this._pos;if(this.x.prong&&e){let i=e.inner?e.mag_b?"b":e.mag_t?"t":e.mag_l?"l":"r":e.mag_b?"t":e.mag_t?"b":e.mag_l?"r":"l";t=r.h("div",{class:"w-dialog-prong z-"+i},[r.h("i",{class:"w-dialog-prong-out f-arw f-arw-"+i+"5"}),r.h("i",{class:"w-dialog-prong-in f-arw f-arw-"+i+"4"})])}return[t||[],this.html_scroll_slots(this.html_slots_default()),this.html_pops()]},html(){let t=this.x.local?this.getLocalElem():"#w-dfish-pops",e=null;if(this.x.cover&&!1!==this.x.visible&&!this.isDeactivated){let t={class:"w-dialog-cover f-abs-full",...this.scope_props};this.x.coverProps&&(t=r.mergeProps(t,this.x.coverProps)),e=r.h("div",t)}let i=[e,this.html_self(!0)],s=t?r.h(r.Teleport,{to:t},i):i;return this.slotTarget?[s,r.h(ee,null,{default:()=>[this.slotTarget()]})]:s}},computed:{commander(){return this.getCommander()},defaultSnapTargetElem(){},defaultSnapPosition:()=>"cc",isForceWheelHide:()=>!1,slotTarget(){return this.$slots.target},scope_props(){let t=this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}},html_props(){return{class:"w-dialog","w-dialog-position":(this._pos||ie).type,...this.scope_props}},html_class(){const t=this._pos||ie,e=this.x.position;return["w-vertical",this.html_align_class,this.html_scroll_class,{"z-hide":this.isDeactivated||(null!=this.x.visible?!this.x.visible:!!this.slotTarget),"z-full":this.x.fullScreen,["z-face-"+this.x.face]:this.x.face,["z-mag-"+(t.mag_t?"t":t.mag_l?"l":t.mag_b?"b":"r")]:t.type,["z-snap z-snap-"+t.type]:t.type,[`w-dialog-animate-${e}`]:re[e]&&"string"==typeof e&&"animating"!=this.animateState}]},html_style(){if(this.x.fullScreen)return{width:"100%",height:"100%",top:0,left:0};{let t=this.x.position,e=this.snapStyle,i={};t&&"object"==typeof t?(lt.extend(i,t),e&&(null==i.top&&null==i.bottom&<.extend(i,lt.lodash.pick(e,"top","bottom")),null==i.left&&null==i.right&<.extend(i,lt.lodash.pick(e,"left","right")))):e&<.extend(i,e);for(let t in i)i[t]=lt.unitSize(i[t]);return oe.forEach(t=>{null!=this.x[t]&&(i[t]=lt.unitSize(this.x[t]))}),i}}},mounted(){this.x.local&<.q(this.getLocalElem()).addClass("f-dialog-local-wrap"),this.$nextTick(()=>{if(this.$watch(()=>this.x.position,this.axis),this.$watch(()=>this.x.visible,t=>{!1!==t&&this.x.autoHide&&this.listenHide(se),this.axis()},{immediate:!0}),setTimeout(()=>{this.axis(),this.$nextTick(()=>this.trigger("show"))}),this.slotTarget){let t=this.getTargetElem();t&&(this.hoverShowDrop?t.addEventListener("mouseenter",()=>null==this.visible&&this.setVisible(),!1):t.addEventListener("click",t=>{t.stopPropagation(),null==this.visible&&this.setVisible()},!1))}new Wt(t=>{!1!==this.x.visible&&"animating"!=this.animateState&&this.el()&&this.axis()}).observe(this.el()),this.x.timeout&&setTimeout(this.close,this.x.timeout)})},unmounted(){!1!==this.x.visible&&this.closeRelease()},__file:"src/widgets/Dialog.vue"},ne={__name:"TemplateAlert",props:["text","escape","title","icon","button","showButton","yesText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},o=t=>{s("save",t)},a=t=>{s("close",t)},n=r.computed(()=>l[i.icon]||i.icon||l.info),h=r.computed(()=>i.yesText||"确定");return(e,i)=>{const s=r.resolveComponent("w-html"),l=r.resolveComponent("w-vertical"),c=r.resolveComponent("w-horizontal"),u=r.resolveComponent("w-img"),d=r.resolveComponent("w-button"),p=r.resolveComponent("w-buttonbar"),m=r.resolveDirective("dialog-move");return r.openBlock(),r.createBlock(l,{class:"w-alert-wrap"},{default:r.withCtx(()=>[r.createVNode(c,{class:"w-alert-head"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(l,{class:"w-alert-move","w-width":"*"},{default:r.withCtx(()=>[r.createVNode(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[m,!0]]),r.createVNode(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:r.withCtx(()=>i[0]||(i[0]=[r.createElementVNode("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),r.createVNode(l,{class:"w-alert-body"},{default:r.withCtx(()=>[r.createVNode(c,{class:"w-alert-main"},{default:r.withCtx(()=>[r.createVNode(u,{class:"w-alert-icon",src:n.value},null,8,["src"]),r.renderSlot(e.$slots,"default",{width:"*"},()=>[t.escape?(r.openBlock(),r.createBlock(s,{key:0,width:"*",class:"w-alert-text"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.text),1)]),_:1})):(r.openBlock(),r.createBlock(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),!1!==t.showButton?(r.openBlock(),r.createBlock(p,{key:0,gap:"10",class:"w-alert-buttonbar"},{default:r.withCtx(()=>[t.button?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(t.button,t=>(r.openBlock(),r.createBlock(d,{face:t.face,class:r.normalizeClass(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(r.openBlock(),r.createBlock(d,{key:1,face:"primary",class:"w-alert-button",text:h.value,onClick:o,ownproperty:!0},null,8,["text"]))]),_:1})):r.createCommentVNode("v-if",!0)]),_:3})]),_:3})}},__file:"src/template/TemplateAlert.vue"},he={name:"w-alert",mixins:[ae],props:["text","title","escape","yes","no","button","showButton","yesText"],methods:{x_default:()=>({title:lt.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return r.h(ne,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Alert.vue"},ce={__name:"TemplateConfirm",props:["text","escape","title","icon","button","showButton","yesText","noText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},o=t=>{s("save",t)},a=t=>{s("close",t)},n=r.computed(()=>l[i.icon]||i.icon||l.question),h=r.computed(()=>i.yesText||"确定"),c=r.computed(()=>i.noText||"取消");return(e,i)=>{const s=r.resolveComponent("w-html"),l=r.resolveComponent("w-vertical"),u=r.resolveComponent("w-horizontal"),d=r.resolveComponent("w-img"),p=r.resolveComponent("w-button"),m=r.resolveComponent("w-buttonbar"),f=r.resolveDirective("dialog-move");return r.openBlock(),r.createBlock(l,{class:"w-alert-wrap"},{default:r.withCtx(()=>[r.createVNode(u,{class:"w-alert-head"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(l,{class:"w-alert-move","w-width":"*"},{default:r.withCtx(()=>[r.createVNode(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[f,!0]]),r.createVNode(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:r.withCtx(()=>i[0]||(i[0]=[r.createElementVNode("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),r.createVNode(l,{class:"w-alert-body"},{default:r.withCtx(()=>[r.createVNode(u,{class:"w-alert-main",valign:"middle"},{default:r.withCtx(()=>[r.createVNode(d,{class:"w-alert-icon",src:n.value},null,8,["src"]),r.renderSlot(e.$slots,"default",{width:"*"},()=>[t.escape?(r.openBlock(),r.createBlock(s,{key:0,width:"*",class:"w-alert-text"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.text),1)]),_:1})):(r.openBlock(),r.createBlock(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),r.createVNode(m,{gap:"10",class:"w-alert-buttonbar"},{default:r.withCtx(()=>[t.button?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(t.button,t=>(r.openBlock(),r.createBlock(p,{face:t.face,class:r.normalizeClass(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(p,{face:"primary",class:"w-alert-button",text:h.value,onClick:o,ownproperty:!0},null,8,["text"]),r.createVNode(p,{class:"w-alert-button",text:c.value,onClick:a,ownproperty:!0},null,8,["text"])],64))]),_:1})]),_:3})]),_:3})}},__file:"src/template/TemplateConfirm.vue"},ue={name:"w-confirm",mixins:[ae],props:["text","title","escape","yes","no","yesText","noText","button","showButton"],methods:{x_default:()=>({title:lt.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return r.h(ce,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,noText:this.x.noText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Confirm.vue"};const de={class:"w-tip-body"},pe={key:0,class:"w-tip-text"},me=["innerHTML"];var fe={__name:"TemplateTip",props:["text","escape"],setup:t=>(e,i)=>(r.openBlock(),r.createElementBlock("div",de,[r.renderSlot(e.$slots,"text",{},()=>[t.escape?(r.openBlock(),r.createElementBlock("div",pe,r.toDisplayString(t.text),1)):(r.openBlock(),r.createElementBlock("div",{key:1,class:"w-tip-text",innerHTML:t.text},null,8,me))])])),__file:"src/template/TemplateTip.vue"};let xe=null,ge={time:(new Date).getTime(),list:[]};var ve={name:"w-tip",mixins:[ae],props:["face","text","escape"],provide(){return{provideView:this.provideView}},methods:{x_default:()=>({prong:!0,autoHide:!0,face:"normal",escape:!0}),html_slots_default(){return r.h(fe,{text:this.x.text,escape:this.x.escape},this.$slots)},setVisibleSub(t){if(t)for(let t of ge.list)t!=this.uid&<.close(t)}},computed:{isForceWheelHide:()=>!0,slotTarget(){return this.$slots.default},defaultSnapTargetElem(){const t=this.commander;return t.snapElem?t.snapElem():t},defaultSnapPosition:()=>"-t,-r,-b,-l,-tl,-tr,-rt,-tb,-bl,-br,-lt,-lb,c"},mounted(){ge.time=(new Date).getTime(),xe&<.close(xe),xe=this.uid,ge.list.push(this.uid)},unmounted(){xe=null;let t=ge.list.indexOf(this.uid);t>-1&&ge.list.splice(t,1)},__file:"src/widgets/Tip.vue"},we={name:"w-img",pubParentName:"w-album",mixins:[Ut],inject:["providePubParent"],props:["src","text","square","imgWidth","imgHeight","dataUrl","vertical","disabled"],data:()=>({hover:!1}),methods:{x_default:()=>({vertical:!0}),onerror(t){this.dataUrl&&(t.target.src=this.dataUrl)},html_slots(){let t=this.x.src,e=t&&t.startsWith(".")&&!t.includes("/"),i=t&&t.startsWith("#"),s=this.$slots.default||(this.x.text?{default:()=>this.x.text}:null);return t=t||this.dataUrl,[t&&r.h("div",{class:"w-img-gut"},[e?r.h("i",{class:"w-img-icon "+t.replace(/\./g,"")}):i?r.h("svg",{class:"f-svg "+t.slice(1)},r.h("use",{"xlink:href":t})):r.h("img",{ref:"img",src:t,class:"w-img-icon",onerror:this.onerror}),this.$slots.cover&&r.h("div",{class:"w-img-cover f-abs-full"},this.$slots.cover())]),s&&r.h(Zt,{class:"w-img-description"},s)]}},computed:{isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=lt.unitSize(this.x.imgWidth?this.x.imgWidth:this.x.width),e=lt.unitSize(this.x.imgHeight?this.x.imgHeight:this.x.height);return{class:{"z-hv":this.hover,"z-on":this.isCurrent,"z-ds":this.x.disabled,"z-square":this.x.square,"z-canplay":this.x.canPlay,"z-vertical":this.x.vertical,[`f-${this.x.vertical?"v":"h"}-gap`]:lt.br.compat.gap},style:{"--w-img-icon-width":t,"--w-img-icon-height":e},onmouseenter:t=>!this.x.disabled&&(this.hover=!0),onmouseleave:t=>!this.x.disabled&&(this.hover=!1)}}},__file:"src/widgets/Img.vue"},be={pubParentName:"w-buttonbar",mixins:[Ut],props:["text","icon","focusIcon","dropIcon","focusDropIcon","arrowIcon","face","target","closable","dropToggle","loading","disabled","vertical","hoverShowDrop","dropProps","showArrowIcon"],inject:["providePubParent","provideMenu_w"],emits:["click:close","dropClose"],data(){return{dropper:null,showDrop:!1,mouses:{onmouseenter:t=>{this.showDrop||(this.pubParent&&Se(this.pubParent)&&!Se(this)&&Ce(),this.x.hoverShowDrop&&(this.drop(),this.$nextTick(()=>t.currentTarget.classList.add("z-hv")))),t.currentTarget.classList.add("z-hv")},onmouseleave:t=>t.currentTarget.classList.remove("z-hv"),onmousedown:t=>t.currentTarget.classList.add("z-down"),onmouseup:t=>t.currentTarget.classList.remove("z-down")}}},watch:{disabled(t){t&<.q(".z-hv",this.el()).removeClass("z-hv")}},methods:{setLoading(t){t=null==t||t,this.x.loading=t},drop(){this.hasChild?this.showDrop=!0:Ce()},isShowDrop(){return this.showDrop},closeDrop(){this.showDrop=!1},onclick(t){this.isMore&&(this.showDrop&&this.x.dropToggle?this.closeDrop():this.drop()),this.pubParent&&this.pubParent.$emit("click:item",t)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},clickDrop(t){this.isDisabled||(t.stopPropagation(),this.drop())},html_drop(){if(this.showDrop&&this.hasChild){let t={context:this,ownproperty:!0,minWidth:lt.bcr(this.el()).width,autoHide:!0,hoverShowDrop:this.x.hoverShowDrop,snap:()=>this.el(),position:this.pubParent&&this.pubParent.x.vertical?"-rt,-lt":"v",indent:1,onClose:()=>{this.showDrop=!1,this.$emit("dropClose")}};return this.x.dropProps&&(t=r.mergeProps(t,this.x.dropProps)),r.h(r.resolveComponent("w-menu"),t,this.$slots)}return[]},html_slots(){let t=this.x.text,e=[];if(this.x.loading&&e.push(r.h("div",{class:"w-button-loading f-abs-full f-flex-center"},r.h(we,{src:"#f-svg-loading"}))),this.x.icon){let t=this.x.focusDropIcon&&this.isCurrent&&this.showDrop?this.x.focusDropIcon:this.x.focusIcon&&this.isCurrent?this.x.focusIcon:this.x.dropIcon&&this.showDrop?this.x.dropIcon:this.x.icon;e.push(this.html_icon(t,"w-button-icon f-flex-center"+(this.x.vertical?"":" f-height")))}if(t){const i=this.pubParent&&this.pubParent.x.flexSize&&t;e.push(r.h("div",{class:"w-button-text"},r.h("span",{class:"w-button-text-line f-line-1",title:i||""},t)))}return this.isMore&&this.x.showArrowIcon&&e.push(r.h(we,{class:"w-button-more f-flex-center f-height",src:this.x.arrowIcon||".f-i .f-i-caret-down"})),this.x.closable&&e.push(r.h("div",{class:"w-button-close f-flex-center"},r.h("i",{class:"w-button-close-icon f-i f-i-close",onclick:this.clickClose}))),[r.h("div",{class:"w-button-main f-oh f-height",...this.isCombo&&!this.isDisabled&&this.mouses},e),this.isCombo&&r.h(we,{class:"w-button-drop f-flex-center f-height",src:".f-i .f-i-caret-down",...!this.isDisabled&&this.mouses,onclick:this.clickDrop}),this.html_drop()]}},computed:{tagName:()=>"button",hasChild(){const t=this.slots_children();return t&&t.length},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},isMore(){return this.hasChild&&!this.getOn("click")},isCombo(){return!!(this.hasChild&&this.x.showArrowIcon&&this.getOn("click"))},isDisabled(){return!!this.x.disabled||!!this.x.loading},html_props(){return{disabled:this.isDisabled,class:{[`z-face-${this.x.face}`]:this.x.face,"z-combo":this.isCombo,"z-more":this.isMore,"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-loading":!!this.x.loading,"z-vertical":!!this.x.vertical,"z-closable":!!this.x.closable,"z-drop":this.showDrop},onclick:this.onclick,...!this.isCombo&&!this.isDisabled&&this.mouses}}},__file:"src/widgets/ButtonAbs.vue"},_e={name:"w-menubutton",mixins:[be],methods:{ajax(...t){return this.parentMenu.rootCommander.ajax(...t)},submit(...t){return this.parentMenu.rootCommander.submit(...t)},drop(){this.showDrop||(this.closeSub(),this.showDrop=!0,this.parentMenu.currentMenuButton=this)},onclick(t){this.isMore||setTimeout(()=>this.parentMenu.root.close(),10)},onmouseenter(t){!this.x.disabled&&t.currentTarget.classList.add("z-hv"),this.isMore?this.drop():this.closeSub()},closeSub(){this.parentMenu.currentMenuButton&&(this.parentMenu.currentMenuButton.showDrop=!1,this.parentMenu.currentMenuButton=null)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},html_slots(){let t=this.x.text,e=[],i=this.x.icon,s=i&&i.startsWith(".")&&!i.includes("/");if(e.push(!i||s?r.h("i",{class:"w-menubutton-icon f-flex-center f-height "+(i?i.replace(/\./g,""):"")}):r.h("img",{src:i,class:"w-menubutton-icon f-flex-center f-height"})),t&&e.push(r.h("div",{class:"w-menubutton-text f-line-1"},t)),this.x.closable&&e.push(r.h("div",{class:"w-menubutton-close"},r.h("i",{class:"w-menubutton-close-icon f-i f-i-close",onclick:this.clickClose}))),e.push(r.h(we,{class:"w-menubutton-drop f-flex-center f-height",src:this.isMore?this.x.arrowIcon||".f-i .f-i-caret-right":""})),this.showDrop){let t={autoHide:!0,context:this,ownproperty:!0,snap:()=>this.el(),position:"21,12",indent:{top:1,bottom:1},onClose:()=>this.showDrop=null};this.x.dropProps&&(t=r.mergeProps(t,this.x.dropProps)),e.push(r.h(r.resolveComponent("w-menu"),t,this.$slots))}return e}},computed:{tagName:()=>"button",isMore(){return!!this.hasChild},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},ownerView(){const t=this.parentMenu.rootCommander;return t?t.ownerView:this.parentMenu.root.provideView},html_props(){return{disabled:!!this.x.disabled,class:{"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-drop":this.showDrop},onmouseenter:this.onmouseenter,onmouseleave:!this.x.disabled&&(t=>t.currentTarget.classList.remove("z-hv")),onclick:this.onclick}}},__file:"src/widgets/MenuButton.vue"},ye={name:"w-button",mixins:[be],props:["autoMenuButton"],methods:{x_default:()=>({showArrowIcon:!0,autoMenuButton:!0})},render(){return this.provideMenu_w&&this.x.autoMenuButton?r.h(_e,this.$props,this.$slots):this.html()},__file:"src/widgets/Button.vue"};let ke=null;function Ce(){ke&&(lt.close(ke),ke=null)}function Se(t){return ke&&(t.hasBubble(ke.context)||ke.hasBubble(t))}var Ve={name:"w-menu",mixins:[ae],provide(){return{provideMenu_w:this}},methods:{x_default:()=>({autoHide:!0,independent:!1}),hasBubble(t,e){if(this.contains(t,e))return!0;let i=lt(t).closest("w-menu,w-menubutton");return!(!i||!(i=i.parentMenu)||i.rootCommander!=this.rootCommander)||void 0},arrow(t){let e=this.$refs.bbr.el(),i=lt.bcr(e);e.scrollTop+=i.height*t},mousewheel(t){this.arrow(t.deltaY<0?1:-1)},getRoot(){let t=this;for(;t.getCommander()&&t.getCommander().isWidget&&"w-menubutton"===t.getCommander().$options.name;)t=t.getCommander().parentMenu;return t},setVisibleSub(t){!1===t&&this.currentMenuButton&&(this.currentMenuButton.showDrop=!1)},checkOutScreen(){let t=this._pos;t.mag_l||t.mag_r?t.bottom<0?(t.top+=t.bottom,t.top<0&&(this.autoSetMaxHeight(t.height+t.top),t.top=0),this.fixSnapStyle()):t.top<0&&(t.bottom+=t.top,t.bottom<0&&(this.autoSetMaxHeight(t.height+t.bottom),t.bottom=0),this.fixSnapStyle()):t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},html_buttons(){return this.slots_children()},html_slots(){return[this.x.maxHeight&&r.h("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(-1)},r.h("i",{class:"f-i f-i-caret-up"})),r.h(Zt,{class:"w-menu-bbr",height:"*",ref:"bbr",onwheel:this.mousewheel},this.$slots),this.x.maxHeight&&r.h("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(1)},r.h("i",{class:"f-i f-i-caret-down"}))]}},computed:{root(){return this.getRoot()},rootCommander(){return this.root.commander},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},defaultSnapTargetElem(){let t=this.getCommander();if(t)return t.isWidget?t.snapElem():t},defaultSnapPosition:()=>"-bl,-br,-tl,-tr",scope_props(){if(this.rootCommander){let t=lt(this.rootCommander).$.vnode.scopeId||this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}}}},mounted(){(!this.context||this.context.$options&&"w-menubutton"!==this.context.$options.name)&&(ke&&ke.context!==this.context&<.close(ke),ke=this)},__file:"src/widgets/Menu.vue"},Te={name:"w-loading",mixins:[ae],props:["text","icon"],methods:{x_default:()=>({}),html_slots(){return r.h(we,{src:void 0!==this.x.icon?this.x.icon:"#f-svg-loading",text:void 0!==this.x.text?this.x.text:lt.loc.loading})}},mounted(){this.resolve(this)},__file:"src/widgets/Loading.vue"},Me={name:"w-table",mixins:[Ut],props:["face","scroll-x","scroll-y"],provide(){return{_provideTable:this,provideLevel:-1,provideParentTR:null,provideTripleboxContainer:this}},data:()=>({sticky:r.markRaw({left:null,right:null,observers:[]})}),methods:{observeSticky(){for(let t of this.sticky.observers)t.disconnect();let t=[];lt.lodash.each(this.initFixedCells(),e=>{let i=new Wt(this.setFixedStyle);i.observe(e),t.push(i)}),this.sticky.observers=t},setFixedStyle(){this.initFixedCells();let t={};if(this.sticky.left&&this.sticky.left.forEach(e=>t[`--w-td-fixed-left-${e.colIndex}`]=`${e.offset}px`),this.sticky.right&&this.sticky.right.forEach(e=>t[`--w-td-fixed-right-${e.colIndex}`]=`${e.offset}px`),this.$el)for(let e in t)this.$el.style.setProperty(e,t[e])},initFixedCells(){return this.getFixedCells("left").concat(this.getFixedCells("right"))},getFixedCells(t){let e=null,i=0,s=lt.lodash.map(this.$el.querySelector("thead").querySelectorAll(`td[w-fixed="${t}"]`));return"right"===t&&s.reverse(),s.forEach(t=>{(e||(e=[])).push({colIndex:t.cellIndex,offset:i}),i+=t.offsetWidth}),this.sticky[t]=e,s},html_slots(){return[this.slotHooks.thead,this.slotHooks.tbody,this.slotHooks.hiddens||[]]}},computed:{slotHooks(){const t={};return this.slots_children().forEach(e=>{let i=e.type.name&&e.type.name.slice(2);i&&("hidden"===i?(t.hiddens||(t.hiddens=[])).push(e):t[i]=e)}),t},colgroup(){return lt.slotsChildren(this.slotHooks.columns.children).map(t=>t.props)},stickyState(){let t="";for(let e of this.colgroup)e.fixed&&(t+=e.fixed);return t},html_class(){return["f-flex-column",this.x.face&&"z-face-"+this.x.face]}},mounted(){this.$watch("stickyState",t=>{this.$nextTick(()=>this.observeSticky())},{immediate:!0}),this.$el.setAttribute("w-scroll-x","left"),lt.br.chrome&<.br.chrome<=60&&new Wt(()=>{this.$el.setAttribute("w-compact-resize-sticky",""),requestAnimationFrame(()=>this.$el.removeAttribute("w-compact-resize-sticky"))}).observe(this.$el)},__file:"src/widgets/Table.vue"},Pe={name:"w-columns",__file:"src/widgets/TableColumns.vue"},$e={name:"w-column",props:["width","minWidth"],__file:"src/widgets/TableColumn.vue"},Be={props:["pub","current"],provide(){return{providePubParent:this}},methods:{inCurrent(t){let e=this.x.current;if(null!=e)return Array.isArray(e)?-1<e.findIndex(e=>this.isCurrentChild(e,t)):this.isCurrentChild(e,t)},isCurrentChild(t,e){if("object"==typeof t){let i=e.isWidget?(e.x||e).data:e.props&&e.props.data;if(i)for(let e in t)if(lt.lodash.get(i,e)==t[e])return!0}else if(t==(e.isWidget?e.getKey():e.key))return!0}}};Be.__file="src/widgets/PubParent.vue";const ze={render:function(t,e){return r.renderSlot(t.$slots,"default")},__file:"src/widgets/SlotDefault.vue"};var De={name:"w-thead",mixins:[Ut,Be],props:["br","sort"],inject:["_provideTable"],provide(){return{provideLeafLevel:-2,provideParentLeaf:null,provideInBody:!1,_provideThead:this,_provideTBody:!1}},data:()=>({rows:null,sortUID:null}),methods:{isExpanded:()=>!0,slot_rows(){if(this.$slots.row){let t,e=this.x.children;if(Array.isArray(e)){let i=0;t=e.map((t,e)=>{let s;const l=this.$slots.row({item:t,index:e}).map(t=>(t.props||(t.props={}),t.props.rowIndex=i++,s||(s=t.key),t));return s?r.h(ze,{key:s},{default:()=>l}):l})}return t||[]}return this.slots_children().map((t,e)=>lt.lodash.set(t,"props.rowIndex",e))},html_tbody(){let t=this._provideTable.colgroup,e=this.slot_rows(),i={};if(!this._provideTable.fixed){let e=0;t.forEach(t=>{e+=lt.number(t.width)||lt.number(t["min-width"])}),e&&(i.minWidth=lt.unitSize(e))}return this.rows=r.markRaw({}),r.h("div",{class:"w-table-tbl-wrap"},r.h("table",{ref:"table",cellpadding:0,cellspacing:0,class:"w-table-tbl",style:i},[r.h("thead",null,r.h("tr",null,t.map(t=>r.h("td",{style:{width:"*"==t.width?null:lt.unitSize(t.width),minWidth:lt.unitSize(t["min-width"])},"w-fixed":t.fixed})))),r.h("tbody",e)]))},html_slots(){return this.html_tbody()}},computed:{isEscape(){return this.x.escape}},__file:"src/widgets/TableTHead.vue"},Ee={name:"w-tbody",mixins:[De,Gt],inject:["_provideTable"],props:["children"],provide(){return{_provideThead:null,provideInBody:!0,_provideTBody:this}},created(){this.$watch(()=>this._provideTable.x,t=>{this.x.scrollX=t.scrollX,this.x.scrollY=!!this._provideTable.fixed||t.scrollY},{immediate:!0}),this.$watch("current",()=>this.viewCurrent())},methods:{getCurrent(){const t=lt.q(".w-tr.z-on",this.el())[0];return t&<(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},onScroll(t){let e=this._provideTable.slotHooks.thead;e&&(e.el.scrollLeft=t.target.scrollLeft)},onScrollPosition(t){let e=this._provideTable.el();(e&&"left"==t||"center"==t||"right"==t)&&e.setAttribute("w-scroll-x",t)},onScrollAttributeChange(t){let e=this._provideTable.el();e&&t.forEach(t=>{let i=t.attributeName;t.target.hasAttribute(i)?e.setAttribute(i,""):e.removeAttribute(i)})},html_slots(){return this.html_scroll_slots(this.html_tbody())}},computed:{inBody:()=>!0,html_class(){return["w-vertical f-flex-1 f-oh",this.html_scroll_class]}},__file:"src/widgets/TableTBody.vue"},Ne={name:"w-tr",pubParentName:"w-tbody,w-thead",mixins:[Ut,ft],props:["rowIndex","expanded","children"],inject:["_provideTable","providePubParent","provideInBody","_provideTBody","provideLevel","provideParentTR"],provide(){return{provideParentTR:this,provideLevel:this.provideLevel+1}},methods:{hasChild(){return lt.hasChild(this.$slots,"rows")},isDisplay(){if(!this.provideParentTR)return!0;let t=this;for(;t=t.provideParentTR;)if(!t.isExpanded())return!1;return!0},isExpanded(){return this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},expandToView(){let t=this;for(;(t=t.provideParentTR)&&t.$options.name===this.$options.name;)t.toggle(!0)},toggle(t,e){const i=this.el(".w-leaf");let s=i&<(i);s?s.toggle(t,e):(this.setExpanded(t),e&&this.$nextTick(e))},onmouseenter(t){this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},html_slots(){let t=this.rowIndex,e=this.pubParent.rows,i=0;return this.slots_children().map(s=>{for(;e[t]&&e[t][i];)i+=e[t][i];if(s.dfishColIndex=i,s.props){if(s.props.rowspan>1)for(let l,r=1;r<s.props.rowspan;r++)l=e[t+r]||(e[t+r]={}),l[i]=lt.number(s.props.colspan)||1;s.props.colspan>1&&(i+=s.props.colspan-1)}return i++,s})},html(){return this.x.children&&Array.isArray(this.x.children)&&this._provideTBody&&this._provideTBody.$slots.row?[this.html_self(!0),this.x.children.map((t,e)=>{let i;const s=this._provideTBody.$slots.row({item:t,index:e});for(let t of s)i||(i=t.key);return i?r.h(ze,{key:i},{default:()=>s}):s})]:this.$slots.row?[this.html_self(!0),this.$slots.row()]:this.html_self()}},computed:{tagName:()=>"tr",level(){return this.provideLevel+1},isEscape(){return this.pubParent.x.escape},inCurrent(){return this.pubParent.inCurrent(this)},html_props(){if(this.provideInBody)return{class:{"z-on":this.inCurrent,"z-expanded":this.isExpanded(),"f-hide":!this.isDisplay()},onmouseenter:this.onmouseenter,onmouseleave:this.onmouseleave}}},mounted(){this.inCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/TableTR.vue"},Le={name:"w-td",props:["colspan","rowspan","align","valign","data"],inject:["_provideTable","provideInBody"],methods:{td_props(){let t=this.$.vnode.dfishColIndex,e=this._provideTable.colgroup[t]||!1,i=this._provideTable.colgroup.length,s=this.colspan;return-1==s&&(s=i),{class:["w-td",t+(s||1)==i&&"w-td-lastborder",this.provideInBody&&e.class,e.fixed&&{[`w-td-fixed-${e.fixed}`]:!0,"w-td-fixed-left-last":"left"===e.fixed&&this._provideTable.colgroup[t+1]&&this._provideTable.colgroup[t+1].fixed!=e.fixed,"w-td-fixed-right-first":"right"===e.fixed&&this._provideTable.colgroup[t-1]&&this._provideTable.colgroup[t-1].fixed!=e.fixed}],style:[this.provideInBody&&e.style,e.fixed&&{[`${e.fixed}`]:`var(--w-td-fixed-${e.fixed}-${t})`}],colspan:s,rowspan:this.rowspan,align:this.align||e.align,valign:this.valign||e.valign}}},render(){return r.h("td",this.td_props(),this.$slots)},__file:"src/widgets/TableTD.vue"},Fe={name:"w-th",mixins:[Le,Ut],props:["sortable","sortOrders","sortOrderDefault"],inject:["_provideThead"],emits:["click:sort"],data:()=>({sortType:null,sortOrder:null}),methods:{onClick(t){this.x.sortable&&this.clickSort(t,"toggle")},clickSort(t,e){t.stopPropagation();let i=this.sortOrder;this._provideThead.sortUID!=this.uid&&(i=null);let s=this.x.sortOrders||["asc","desc",null];if("toggle"===e){let t=s.indexOf(i);i=s[t<0||2==t?0:t+1]}else i=i==e?null:e;this.sortOrder=i,this._provideThead.sortUID=this.uid,t.value=i,this.$emit("click:sort",t,i)},html_slots(){return r.h(Kt,{class:"w-th-wrap",valign:"middle",align:this.align||this.col.align},{default:()=>[r.h("div",{class:"w-th-title"},this.$slots),this.x.sortable?r.h("div",{class:"w-th-sort f-flex-column f-flex-center f-oh"},[r.h("i",{class:"f-i f-i-caret-up f-oh w-th-sort-up",onClick:t=>this.clickSort(t,"asc")}),r.h("i",{class:"f-i f-i-caret-down f-oh w-th-sort-down",onClick:t=>this.clickSort(t,"desc")})]):[]]})}},computed:{col(){return this._provideTable.colgroup[this.$.vnode.dfishColIndex]||!1},tagName:()=>"th",html_props(){return r.mergeProps(this.td_props(),{class:{"z-sortable":this.x.sortable,[`z-${this.sortOrder}`]:this.sortOrder&&this._provideThead.sortUID==this.uid},onClick:this.onClick})}},__file:"src/widgets/TableTH.vue"};const Ae={class:"'w-table-v2-th-text f-line-1"},He={class:"w-tree-loading w-table-v2-loading"},Ie=["onClick"],Ye=["onClick"],Oe=["title"],je={class:"'w-table-v2-td-text f-line-1"},qe={name:"w-table-v2"};var Re=Object.assign(qe,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:40},src:{type:Function},columns:{type:Array,default:()=>[]},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:o,itemHeight:a,current:n}=l;const h=o.value||"id";o.text;const c=o.children||"children",u=o.class||"class",d=Symbol("leaf"),p=r.ref(0),m=r.ref(0),f=r.ref([]),x=r.ref(),g=r.ref(),v=r.ref(),w=r.ref(!1),b=r.computed(()=>l.loading||w.value);r.provide("provideTripleboxContainer",r.getCurrentInstance());const _=r.computed(()=>({height:f.value.length*a+"px"})),y=(t,e)=>{const i={};return t.width&&"*"!=t.width?i.width=lt.unitSize(t.width):i.flex=1,t.minWidth&&(i.minWidth=lt.unitSize(t.minWidth)),i},k=t=>"function"==typeof u?u(t):t[u],C=t=>({height:`${a}px`,top:t[d].showIndex*a+"px"}),S=t=>({paddingLeft:16*t[d].level+"px"}),V=t=>M(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,T=t=>t[d].loading,M=t=>t[c]&&t[c].length||t[d].src&&!t[d].loaded,P=t=>Array.isArray(l.current)?l.current.includes(t[h]):l.current===t[h];let $,B=!0;const z=async(t,e)=>{if("string"==typeof t&&(t=F(t)),!t)return;const i=t[d];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[c]){const e=f.value.indexOf(t),i=N(t[c],t),s=f.value.slice(0,e+1),l=f.value.slice(e+1);f.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,z(t,t.expanded));else{const e=f.value.indexOf(t),i=L(t[c]),s=f.value.slice(0,e+1),l=f.value.slice(e+1+i);f.value=s.concat(l)}},D=t=>{m.value!==t.target.scrollTop&&(m.value=t.target.scrollTop)},E=()=>{Y()},N=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[d];s||(t[d]={level:e?e[d].level+1:0,parent:e,src:l.src&&l.src(t)}),t[c]&&t[c].length?t.expanded?i=i.concat(N(t[c],t)):s||N(t[c],t):t.expanded&&t[d].src&&r.nextTick(()=>z(t,!0))}),i},L=t=>{let e=0;for(let i of t)e++,i[c]&&i.expanded&&(e+=L(i[c]));return e},F=(t,e)=>{e||(e=l.children);for(let i of e){if(i[h]===t)return i;if(i[c]&&i[c].length){const e=F(t,i[c]);if(e)return e}}},A=t=>{const e=F(t);if(e){let t=e,i=t;for(;t=t[d].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&z(i,!0)}return e},H=(t,e)=>{for(let i of t){let t=e.find(t=>t[h]===i[h]);t&&(t[c]&&(i[c]?H(i[c],t[c]):i[c]=t[c]),null!=t.expanded&&(i.expanded=t.expanded))}},I=r.computed(()=>{const t=Math.floor(m.value/a),e=f.value.slice(t,t+p.value).map((e,i)=>(e[d].showIndex=i+t,e));return e}),Y=()=>{v.value=g.value.el("wScrollOverflow").getBoundingClientRect(),p.value=Math.ceil(v.value.height/a)+1},O=async t=>{I.value.find(e=>t===e[h])||A(t);const e=I.value.findIndex(e=>t===e[h]);if(-1===e||e===I.value.length-1){const e=F(t),i=f.value.indexOf(e);i>-1&&(await r.nextTick(),x.value.scrollToY((i+1)*a-v.value.height/2))}},j=async t=>{if(await r.nextTick(),n=t,(t=t&<.arrayID(t))&&t.length){for(let e of t)I.value.find(t=>e===t[h])||A(e);B&&O(t[0])}};return r.onMounted(async()=>{if(r.watch(()=>g.value.wScrollSizeY,t=>{Y()},{immediate:!0}),r.watch(()=>l.children,t=>{f.value=N(t),n&&n==l.current&&j(l.current)},{immediate:!0}),r.watch(()=>l.current,j,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(w.value=!0,await t().catch(()=>{}),w.value=!1)}}),e({toggle:z,focus:O,find:F,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));H(t,e),l.children.length=0,l.children.push.apply(l.children,t),f.value=N(t)}}),(e,i)=>{const l=r.resolveComponent("w-horizontal"),o=r.resolveComponent("w-img"),n=r.resolveComponent("w-vertical");return r.openBlock(),r.createBlock(n,{ref_key:"root",ref:x,class:"w-table-v2"},{default:r.withCtx(()=>[r.createVNode(l,{class:"w-table-v2-thead",style:r.normalizeStyle({height:`${r.unref(a)}px`})},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.columns,(t,e)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-table-v2-th",{[`z-align-${t.align}`]:t.align}]),style:r.normalizeStyle(y(t)),key:e},[r.createElementVNode("div",Ae,r.toDisplayString(t.text),1)],6))),128))]),_:1},8,["style"]),r.createVNode(n,{ref_key:"wrap",ref:g,height:"*",class:"w-table-v2-tbody","scroll-y":!0,onScroll:D,onResize:E},{default:r.withCtx(()=>[b.value?r.renderSlot(e.$slots,"loading",{key:0},()=>[r.createElementVNode("div",He,[r.createVNode(o,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(r.openBlock(),r.createElementBlock("div",{key:1,class:"w-table-v2-wrap",style:r.normalizeStyle(_.value)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(I.value,(i,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass(["w-table-v2-tr",k(i),{"z-on":P(i)}]),style:r.normalizeStyle(C(i)),onClick:t=>((t,e)=>{B=!1,clearTimeout($),$=setTimeout(()=>B=!0,500),s("click:item",t,e)})(t,i)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.columns,(t,s)=>(r.openBlock(),r.createElementBlock("div",{key:s,class:r.normalizeClass(["w-table-v2-td",{[`z-align-${t.align}`]:t.align}]),style:r.normalizeStyle(y(t))},["leaf"==t.type?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["w-leaf",{"z-folder":M(i)}]),style:r.normalizeStyle(S(i))},[T(i)?(r.openBlock(),r.createBlock(o,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["w-leaf-toggle f-i",i.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),z(e)})(t,i)},null,10,Ye)),V(i)?(r.openBlock(),r.createBlock(o,{key:2,src:V(i),class:"w-leaf-icon"},null,8,["src"])):r.createCommentVNode("v-if",!0),r.createElementVNode("div",{class:"w-leaf-text f-line-1",title:i[t.field]},r.toDisplayString(i[t.field]),9,Oe)],6)):r.renderSlot(e.$slots,t.field,{key:1,item:i,rowIndex:l,column:t,colIndex:s},()=>[r.createElementVNode("div",je,r.toDisplayString(i[t.field]),1)])],6))),128))],14,Ie))),128))],4))]),_:3},512)]),_:3},512)}}});Re.__file="src/widgets/TableV2.vue";var We={name:"w-grid",mixins:[Gt],props:["columns","rows","gap","defaultColspan","face","labelWidth"],methods:{x_default:()=>({columns:12,gap:0,face:"normal"}),html_slots(){return this.x.scrollX||this.x.scrollY?this.html_scroll_slots():r.h("div",{class:"w-grid-cont",style:this.html_scroll_cont_style},this.$slots)}},computed:{html_props(){return{class:[this.x.rows?"z-full":"z-auto",this.x.face&&"z-face-"+this.x.face,this.html_scroll_class],style:{"--important-label-width":lt.unitSize(this.x.labelWidth)}}},html_scroll_cont_style(){let t=this.x.columns;lt.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;lt.isNumber(e)&&(e=`repeat(${e}, 1fr)`);let i=this.x.defaultColspan;return{"grid-template-columns":t,"grid-template-rows":e,"grid-gap":"var(--w-grid-gap)","--w-grid-gap":this.x.gap?lt.unitSize(this.x.gap):"","--w-grid-colspan":-1!=i&&i?`span ${i}`:""}}},__file:"src/widgets/Grid.vue"},Ue={name:"w-swiper-item",pubParentName:"w-swiper",inject:["providePubParent"],mixins:[Ut],props:["lazy"],data:()=>({loaded:!1}),methods:{x_default:()=>({lazy:!0}),html_slots(){return this.loaded||!this.lazy?this.$slots:this.isCurrent?(this.loaded=!0,this.$slots):void 0}},computed:{html_class(){return{"z-on":this.isCurrent}},isCurrent(){return this.pubParent.inCurrent(this)}},__file:"src/widgets/SwiperItem.vue"},Xe={name:"w-swiper",mixins:[Ut,Be],props:["arrow","indicatorDots","duration"],data:()=>({focusIndex:null}),watch:{current(t){this.setFocus(t)}},methods:{setFocus(t){let e=this.slots_children().findIndex(e=>this.isCurrentChild(t,e));this.focusIndex=e},getCurrentItem(){if(this.el()){let t=lt.q(">.w-swiper-cont>.w-swiper-item",this.el())[this.focusIndex];return t&<(t)}},clickArrow(t){this.focusIndex+=t},clickIndicator(t){this.focusIndex=t},html_slots(){null==this.focusIndex&&this.setFocus(this.x.current);let t=this.x.vertical,e=t?"up":"left",i=t?"down":"right";return[r.h("div",{class:"w-swiper-cont",id:this.uid+"cont"},this.$slots),this.x.arrow&&r.h("div",{class:"w-swiper-arrow z-"+e,onclick:t=>this.clickArrow(-1)},r.h("i",{class:"f-i f-i-angle-"+e})),this.x.arrow&&r.h("div",{class:"w-swiper-arrow z-"+i,onclick:t=>this.clickArrow(1)},r.h("i",{class:"f-i f-i-angle-"+i})),this.x.indicatorDots&&r.h("div",{class:"w-swiper-indicator f-flex-center"},this.slots_children().map((t,e)=>r.h("div",{class:"w-swiper-indicator-dot"+(e==this.focusIndex?" z-on":""),onclick:t=>this.clickIndicator(e)})))]}},computed:{html_class(){let t=this.focusIndex;return{"z-at-first":0==t,"z-at-last":t>-1&&t==this.slots_children().length-1}},html_style(){return{"--w-swiper-translate-x":100*-this.focusIndex+"%","--w-swiper-transition":this.x.duration?`left ${this.x.duration}ms`:0}}},mounted(){this.el("cont")&&new MutationObserver(()=>{this.setFocus(this.x.current)}).observe(this.el("cont"),{childList:!0})},__file:"src/widgets/Swiper.vue"},Qe={name:"w-buttonbar",mixins:[Kt,Be],props:["vertical"],emits:["click:item"],methods:{x_default(){return{gap:0,valign:this.vertical?null:"middle"}},html_slots(){let t=this.slots_children().concat(),e=this.$slots.split;if(e)for(let i=s.length-1;i>0;i--)t.splice(i,0,e);return this.html_scroll_slots(t)}},computed:{dir(){return this.x.vertical?"v":"h"},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal"]}},__file:"src/widgets/ButtonBar.vue"},Ge={name:"w-tabbar",mixins:[Qe],props:["vertical","arrow","quickCloseButton","flexSize","buttons"],emits:["click:item","click:quickCloseButton"],data:()=>({resizeObserver:1,isMouseEnter:!1,runButtonFlexWidth:null,runArrow:!1,isClickCloseLastChild:!1}),methods:{onScrollResize(t){this.resizeObserver++},clickArrow(t){this.scrollToX("left"+240*t,240)},closeAll(t){this.$emit("click:quickCloseButton","closeAll")},onMouseenter(t){this.isMouseEnter=!0,this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth)},onMouseleave(t){t&&this.hasBubble(t.relatedTarget)||(this.isMouseEnter=!1,this.x.flexSize&&(this.runButtonFlexWidth=null))},onBeforeEnter(t){this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton","")},onAfterEnter(t){this.fixQuickCloseButton&&(this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.resizeObserver++);const e=lt(t);e&&e.vis&&e.vis()},onBeforeLeave(t){t.nextElementSibling||(this.isClickCloseLastChild=!0,this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton",""),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=null))},onAfterLeave(t){this.isClickCloseLastChild&&(this.isClickCloseLastChild=!1,this.fixQuickCloseButton&&this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth))},html_slots(){let t=r.h(r.TransitionGroup,{name:"w-tabbar",onBeforeEnter:this.onBeforeEnter,onAfterEnter:this.onAfterEnter,onBeforeLeave:this.onBeforeLeave,onAfterLeave:this.onAfterLeave},{default:()=>this.buttons}),e=[r.h(this.x.vertical?Zt:Kt,{ref:"gut",width:"*",class:"w-tabbar-gut",gap:this.x.gap,align:this.x.align,valign:this.x.valign},{default:()=>t})];if(this.$slots.append&&e.push(r.h("div",{ref:"append",class:"w-tabbar-append"},this.slot("append"))),this.x.arrow&&(e.unshift(r.h("div",{class:"w-tabbar-arrow-start",onClick:()=>this.clickArrow(-1)},r.h("i",{class:"f-i f-i-caret-left"}))),e.push(r.h("div",{class:"w-tabbar-arrow-end",onClick:()=>this.clickArrow(1)},r.h("i",{class:"f-i f-i-caret-right"})))),this.x.quickCloseButton){let t=!this.buttons.find(t=>t.props.closable);this.buttons.length&&e.push(r.h(ye,{ref:"quickCloseButton",data:{isQuickCloseButton:!0},showArrowIcon:!1,icon:".f-i .f-i-close",class:"w-tabbar-quickclosebutton",onClick:this.closeAll,disabled:t,title:"关闭全部标签"}))}return this.html_scroll_slots(e)}},computed:{hasScrollX(){return this.x.arrow&&"h"===this.dir||this.x.scrollX},showArrow(){if(this.x.arrow){if(this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[0]}return this.wScrollPercentX}},fixQuickCloseButton(){if(this.x.quickCloseButton&&this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[1]}},gutWidth(){const t=this.x.arrow&&this.wScrollPercentX;if(this.resizeObserver&&this.el()){let e=this.el().clientWidth;return t&&(e-=40),this.x.quickCloseButton&&(e-=20),this.$refs.append&&(e-=this.$refs.append.offsetWidth),e}},buttonCalcWidth(){if(this.x.flexSize){let t,e=this.buttons.length,i=this.gutWidth;return i&&e&&(t=i/e),t}},buttonFlexWidth(){if(this.x.flexSize){let t=this.x.flexSize[0],e=this.x.flexSize[1],i=e;return this.buttonCalcWidth&&(i=lt.numRange(this.buttonCalcWidth,t,e)),i+1}},html_props_on(){return{onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave}},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal",{"z-arrow":this.x.arrow,"z-quickclosebutton":this.x.quickCloseButton,"z-flexsize":this.x.flexSize,"z-show-arrow":this.showArrow}]},html_style(){const t={};return this.x.flexSize&&(t["--w-tabbar-flex-width"]=`${this.runButtonFlexWidth||this.buttonFlexWidth}px`),t}},mounted(){if(this.x.flexSize&&this.$refs.gut){new ResizeObserver(()=>this.resizeObserver++).observe(this.$refs.gut.el());let t=this.$watch(()=>this.buttons.length,e=>{e&&this.$nextTick(()=>{t(),setTimeout(()=>{const t=this.el();t&&t.setAttribute("w-tabbar-flex-all","")},150)})},{immediate:!0})}},__file:"src/widgets/TabBar.vue"},Je={name:"w-tabbutton",pubParentName:"w-tabbar",mixins:[ye],methods:{vis(){let t=[20,20];this.pubParent.x.quickCloseButton&&(t[1]+=20),this.scrollIntoView({x:`nearest${t}`,y:null})}},computed:{html_class:()=>"w-button"},mounted(){this.$watch("isCurrent",t=>t&&this.vis(),{immediate:!0})},__file:"src/widgets/TabButton.vue"},Ke={name:"w-tabs",mixins:[Ut],props:["current","position","gap","face","quickCloseButton","flexSize"],emits:["click:quickCloseButton"],methods:{x_default:()=>({position:"top",face:"line",gap:-1}),clickTab(t){const e=lt(t);!e.data||e.data.isQuickCloseButton},clickQuickCloseButton(t){this.$emit("click:quickCloseButton",t)},html_slots(){let t=[],e=[],i=this.x.position;return this.slots_children().forEach((i,s)=>{i.props&&null!=i.props.key||lt.lodash.set(i,"props.key",s),t.push(r.h(Je,i.props)),e.push(r.h(Ue,{lazy:null==i.props.lazy||i.props.lazy,key:i.props.key},i.children))}),[r.h(Ge,{ref:"tabBar",class:"w-tabs-buttonbar",current:this.x.current,gap:this.x.gap,vertical:"left"==i||"right"==i,arrow:!0,flexSize:this.x.flexSize,quickCloseButton:this.x.quickCloseButton,"onClick:item":this.clickTab,"onClick:quickCloseButton":this.clickQuickCloseButton,buttons:t},this.$slots),r.h(Xe,{class:"w-tabs-swiper f-flex-1 f-oh",current:this.x.current},{default:()=>e})]}},computed:{tabBar(){return this.$refs.tabBar},html_class(){let t=this.x.position;return"f-oh f-flex"+("top"==t||"bottom"==t?"-column":"")+" z-pos-"+t+" z-face-"+this.x.face}},__file:"src/widgets/Tabs.vue"},Ze={name:"w-tab",__file:"src/widgets/Tab.vue"},ti={name:"w-album",mixins:[Kt,Be],methods:{x_default:()=>({gap:0,br:!0,valign:"top"})},computed:{html_class:()=>"w-horizontal"},__file:"src/widgets/Album.vue"},ei={name:"w-html",mixins:[Ut,Jt],props:["line"],computed:{html_props(){let t=this.x.line;return{class:[(this.x.align||this.x.valign)&&"w-horizontal",null!=t&&"f-line",this.html_align_class],style:null!=t&&{"-webkit-line-clamp":t}}}},__file:"src/widgets/Html.vue"},ii={name:"w-tree",mixins:[Gt,Be,ft],emits:["click:item"],provide(){return{provideLevel:-1,provideParentLeaf:null,provideParentTR:null,provideTripleboxContainer:this}},methods:{load(){return this.request()},getCurrent(){const t=lt.q(".w-leaf.z-on",this.el())[0];return t&<(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},html_slots(){let t;if(this.loading){const e=this.slot("loading");t=e&&e.length?e:r.h("div",{class:"w-tree-loading"},r.h(we,{src:"#f-svg-loading-1",width:28,height:28}))}else{let e=this.x.children;this.$slots.default&&(t=Array.isArray(e)?e.map((t,e)=>{let i;const s=this.$slots.default({item:t,index:e});for(let t of s)i||(i=t.key);return i?r.h(ze,{key:i},{default:()=>s}):s}):[])}return this.html_scroll_slots(t)}},computed:{level:()=>-1,html_props(){return{class:this.html_scroll_class}}},mounted(){this.x.children&&this.x.children.length||this.request()},__file:"src/widgets/Tree.vue"};const si={class:"w-tree-loading w-tree-v2-loading"},li=["onClick"],ri=["onClick"],oi={class:"w-leaf-text f-line-1"},ai=["title"],ni={name:"w-tree-v2"};var hi=Object.assign(ni,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:32},src:{type:Function},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:o,itemHeight:a,current:n}=l;const h=o.value||"id",c=o.text||"text",u=o.children||"children",d=o.class||"class",p=o.disabled||"disabled",m=Symbol("leaf"),f=r.ref(0),x=r.ref(0),g=r.ref([]),v=r.ref(),w=r.ref(),b=r.ref(!1),_=r.computed(()=>l.loading||b.value);r.provide("provideTripleboxContainer",r.getCurrentInstance);const y=r.computed(()=>({height:g.value.length*a+"px"})),k=(t,e)=>"function"==typeof d?d(t,e):t[d],C=t=>({height:`${a}px`,top:t[m].showIndex*a+"px",paddingLeft:16*t[m].level+"px"}),S=t=>T(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,V=t=>t[m].loading,T=t=>t[u]&&t[u].length||t[m].src&&!t[m].loaded,M=t=>Array.isArray(l.current)?l.current.includes(t[h]):l.current===t[h],P=(t,e)=>"function"==typeof p?p(t,e):t[p];let $,B=!0;const z=async(t,e)=>{if("string"==typeof t&&(t=F(t)),!t)return;const i=t[m];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[u]){const e=g.value.indexOf(t),i=N(t[u],t),s=g.value.slice(0,e+1),l=g.value.slice(e+1);g.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,z(t,t.expanded));else{const e=g.value.indexOf(t),i=L(t[u]),s=g.value.slice(0,e+1),l=g.value.slice(e+1+i);g.value=s.concat(l)}},D=t=>{x.value!==t.target.scrollTop&&(x.value=t.target.scrollTop)},E=()=>{Y()},N=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[m];s||(t[m]={level:e?e[m].level+1:0,parent:e,src:l.src&&l.src(t)}),t[u]&&t[u].length?t.expanded?i=i.concat(N(t[u],t)):s||N(t[u],t):t.expanded&&t[m].src&&r.nextTick(()=>z(t,!0))}),i},L=t=>{let e=0;for(let i of t)e++,i[u]&&i.expanded&&(e+=L(i[u]));return e},F=(t,e)=>{if(t&&t[m])return t;e||(e=l.children);for(let i of e){if(i[h]===t)return i;if(i[u]&&i[u].length){const e=F(t,i[u]);if(e)return e}}},A=t=>{const e=F(t);if(e){let t=e,i=t;for(;t=t[m].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&z(i,!0)}return e},H=(t,e)=>{for(let i of t){let t=e.find(t=>t[h]===i[h]);t&&(t[u]&&(i[u]?H(i[u],t[u]):i[u]=t[u]),null!=t.expanded&&(i.expanded=t.expanded))}},I=r.computed(()=>{const t=Math.floor(x.value/a),e=g.value.slice(t,t+f.value).map((e,i)=>(e[m].showIndex=i+t,e));return e}),Y=()=>{w.value=v.value.el("wScrollOverflow").getBoundingClientRect(),f.value=Math.ceil(w.value.height/a)+1},O=async t=>{await r.nextTick(),I.value.find(e=>t===e[h])||A(t);const e=I.value.findIndex(e=>t===e[h]);if(-1===e||e===I.value.length-1){const e=F(t),i=g.value.indexOf(e);i>-1&&(await r.nextTick(),v.value.scrollToY((i+1)*a-w.value.height/2))}},j=async t=>{if(await r.nextTick(),n=t,(t=t&<.arrayID(t))&&t.length){for(let e of t)I.value.find(t=>e===t[h])||A(e);B&&O(t[0])}};return r.onMounted(async()=>{if(r.watch(()=>v.value.wScrollSizeY,t=>{Y()},{immediate:!0}),r.watch(()=>l.children,t=>{g.value=N(t),n&&n==l.current&&j(l.current)},{immediate:!0}),r.watch(()=>l.current,j,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(b.value=!0,await t().catch(()=>{}),b.value=!1)}}),e({toggle:z,focus:O,find:F,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));H(t,e),l.children.length=0,l.children.push.apply(l.children,t),g.value=N(t)}}),(t,e)=>{const i=r.resolveComponent("w-img"),l=r.resolveComponent("w-vertical");return r.openBlock(),r.createBlock(l,{ref_key:"root",ref:v,class:"w-tree w-tree-v2","scroll-y":!0,onScroll:D,onResize:E},{default:r.withCtx(()=>[_.value?r.renderSlot(t.$slots,"loading",{key:0},()=>[r.createElementVNode("div",si,[r.createVNode(i,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(r.openBlock(),r.createElementBlock("div",{key:1,class:"w-tree-v2-wrap",style:r.normalizeStyle(y.value)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(I.value,(e,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass(["w-leaf w-leaf-v2",k(e,l),{"z-folder":T(e),"z-on":M(e),"z-ds":P(e,l)}]),style:r.normalizeStyle(C(e)),onClick:t=>((t,e)=>{P(e)||(B=!1,clearTimeout($),$=setTimeout(()=>B=!0,500),s("click:item",t,e))})(t,e)},[V(e)?(r.openBlock(),r.createBlock(i,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["w-leaf-toggle f-i",e.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),z(e)})(t,e)},null,10,ri)),r.renderSlot(t.$slots,"box",{item:e}),S(e)?(r.openBlock(),r.createBlock(i,{key:2,src:S(e),class:"w-leaf-icon"},null,8,["src"])):r.createCommentVNode("v-if",!0),r.createElementVNode("div",oi,[r.renderSlot(t.$slots,"text",{item:e},()=>[r.createElementVNode("span",{title:e[r.unref(c)]},r.toDisplayString(e[r.unref(c)]),9,ai)])])],14,li))),128))],4))]),_:3},512)}}});hi.__file="src/widgets/TreeV2.vue";var ci={name:"w-label",mixins:[Ut,Jt],props:["text","suffix","vertical"],methods:{html_slots(){return r.h("label",{class:"w-label-text"},r.h("span",this.$slots.default?this.$slots.default():this.x.text+(null==this.x.suffix?"":this.x.suffix)))}},computed:{html_class(){return this.x.vertical&&(this.$parent.labelVertical=!0),["f-oh f-br"+(this.x.vertical?" z-vertical":""),this.html_align_class]},html_style(){return{width:null,"--label-width":this.x.width&<.unitSize(this.x.width)}}},__file:"src/widgets/Label.vue"},ui={mixins:[Ut,Jt],props:["name","value","modelValue","placeholder","label","readonly","readonlyValidate","disabled","required","validateDefault","validateHandler","inputWidth","inputHeight"],emits:["update:modelValue","change","blur","focus"],data(){let t=this.modelValue;return{isFormWidget:!0,isFocus:!1,hasBorder:!1,isPlural:!1,isEdit:!1,loading:!1,warnClass:"",labelVertical:!1,modifiedValue:t,defaultValue:t,placeholder_type:"",validIndex:0}},watch:{modelValue(t,e){this.isEdit?this.isEdit=!1:(null==t&&(t=""),null==e&&(e=""),this.watchModelValue(t,e))}},methods:{val(t,e){if(0==arguments.length)return this.x.modelValue;let i=this.x.modelValue;this.x.modelValue=t,null==i&&(i=""),null==t&&(t="");let s=i!==t;if("object"==typeof i&&(s=JSON.stringify(i)!=JSON.stringify(t)),s&&(this.warnClass&&this.warn(!1),this.isUsableVal(t))){this.isEdit=!0,this.$emit("update:modelValue",t);const i=this.createEvent("change",{originalEvent:e});this.trigger(i,t)}return t},formVal(){return this.input_value},isUsableVal:t=>!0,defaultRuleValue(t){let e=this.rules[t];if(null!=e)return Array.isArray(e)&&(e=e[0]),e&&e.value?e.value:e},watchModelValue(t,e){e!=t&&this.trigger("change",t)},async valid(t){let e=await this.getValidError(t);return e&&(this.warn(),this.showErrorTip(e.text)),!e},async getValidError(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let t=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof t&&(t=Array.isArray(t)?t.join(","):null==t?"":""+t),t=t.trim();let s=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule,l=await s[e.type](t,i,e);if(l)return l}}},getValidErrorSync(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let s=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof s&&(s=Array.isArray(s)?s.join(","):null==s?"":""+s),s=s.trim();let l=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule;if(!e.rule||e.rule.trigger==t){let t=l[e.type](s,i,e);if(t&&!(t instanceof Promise))return t}}}},formErr(t,e){let i=this.getLabelText(),s=t.type,l=t.rule&&t.rule.text;return l||(l=lt.loc.ps.apply(null,[lt.loc.form[s],i||""].concat(null!=e&&""!==e?e:[]))||""),{wid:this.uid,name:this.x.name,type:s,label:i,text:l}},warn(t){let e="string"==typeof t?t:!1!==t?"z-err":"";this.warnClass=e,!e&&this._tip&&this._tip.close()},showErrorTip(t){this.scrollIntoView({ease:200,success:()=>{this.pop("w-tip",{text:t,face:"warn",independent:!0,snap:this.errorTipTarget,onClose:()=>this._tip=null},t=>{this._tip=t})}})},focus(){return this.$refs.v.focus(),this},formText(){let t=this.val();return null==t?"":t},getLabelText(){let t=this.x.label||this.pubParent&&this.pubParent.x.label;return t?t.text||t:""},onCloseDrop(){this.showDrop=!1},mergeDropProps(t){return this.x.dropProps&&(t=r.mergeProps(t,this.x.dropProps)),t.onClose=()=>{this.onCloseDrop(),this.x.dropProps&&this.x.dropProps.onClose&&this.x.dropProps.onClose()},t},oninput(t){this.val(t.target.value),this.baseValid("change")},baseFocus(t){this.isFocus=!0,this.warn(!1),this.trigger(t),this.baseValid("focus")},baseBlur(t){this.isFocusTarget(t.relatedTarget)||(this.isFocus=!1),this.trigger(t),this.baseValid("blur")},baseValid(t){this.validTriggers[t]&&(clearTimeout(this._baseValidTimer),this._baseValidTimer=setTimeout(()=>{if(!this.$.isUnmounted&&!this.$.isDeactivated){(new Date).getTime()-ge.time>100&&this.valid(t)}},100))},snapElem(){return this.el("form")},hasBubble(t){return this.snapElem().contains(t.isWidget?t.el():t)},isFocusTarget(t){},getInputValue:t=>t,isModified(t){let e=t?this.defaultValue:this.modifiedValue,i=this.x.modelValue;return null==e&&(e=""),null==i&&(i=""),e!=i&&this.getInputValue(e)!=this.getInputValue(i)},saveModified(t){this.modifiedValue=lt.lodash.clone(this.x.modelValue),t&&(this.defaultValue=this.modifiedValue)},reset(t){this.warn(!1),this.val(t||null==this.defaultValue?"":this.defaultValue)},html_label(){if(this.$slots.label)return this.$slots.label();if(this.x.label&&"object"==typeof this.x.label){const t=lt.cloneDeep(this.x.label);if(null==t.width&&delete t.width,0!=t.width)return r.h(ci,t)}},html_input(){return r.h(this.input_tag,{class:"w-input-value",ref:"v",id:this.uid+"v",type:this.input_type,name:this.input_name,value:this.input_value,readonly:this.isReadonly,disabled:this.isDisabled,placeholder:this.input_placeholder,autocomplete:"off",oninput:this.oninput,onfocus:this.baseFocus,onblur:this.baseBlur,...this.input_prop})},html_input_hidden(){return this.x.name?r.h("input",{type:"hidden",ref:"v",name:this.input_name,value:this.input_value,disabled:this.isDisabled,class:"f-hide"}):[]},html_button:()=>[],html_form_slot(){return[this.slot("prepend"),this.html_input(),this.html_button(),this.slot("append")]},html_slot_down(){return this.slot("down")},html_main(){return r.h("div",{class:"w-formbase-main"},[this.html_form(),this.html_slot_down()])},html_form(){let t=this.x.inputHeight&<.unitSize(this.x.inputHeight);return r.h("div",r.mergeProps({ref:"form",id:this.uid+"form",class:["w-input",{"w-input-border":this.hasBorder,[`f-${this.dir}-gap`]:lt.br.compat.gap&&this.x.gap}],style:{height:t},title:this.input_title},this.form_prop),this.html_form_slot())},html_slots(){return[this.html_label(),this.html_main(),this.slot("right")]}},computed:{rules(){return this.x},pubValidHooks(){return{required:(t,e,i)=>{if(e&&!t)return this.formErr(i)},pattern:(t,e,i)=>{if(t&&e&&("string"==typeof e?!lt.eval(`${e}.test(v)`,{rule:e,v:t}):e.test&&!e.test(t)))return this.formErr(i)},validateHandler:async(t,e,i)=>{let s=e&&e(t);if(s){let t=await s;if(t)return this.formErr({type:"validateHandler",rule:{text:t}})}}}},validHooks(){return this.pubValidHooks},validQueues(){let t=[],e="validateDefault";this.validHooks[e]&&t.push({type:e});for(let e in this.validHooks)if(!t.includes(e)){let i=this.rules[e];null!=i&&(Array.isArray(i)?i.forEach(i=>t.push({type:e,rule:i})):t.push({type:e,rule:i}))}return t},validTriggers(){let t={};return Object.keys(this.validHooks).forEach(e=>{let i=this.rules[e];if(i)if(Array.isArray(i))for(let s of i)s.trigger&&(t[s.trigger]||(t[s.trigger]=[])).push({type:e,rule:s});else i.trigger&&(t[i.trigger]||(t[i.trigger]=[])).push({type:e,rule:i})}),t},input_value(){return this.getInputValue(this.x.modelValue)},input_name(){return this.x.name},input_tag:()=>"input",input_type:()=>"text",input_title(){},input_prop(){},input_placeholder(){if(!this.isNormal)return;let t=this.x.placeholder;return null==t&<.x.autoPlaceholder&&this.x.label&&(t=lt.loc.ps(lt.loc[this.placeholder_type||"placeholder_input"],this.x.label.text||this.x.label)),t},form_prop(){},hasVal(){return null!=this.x.modelValue&&""!==this.x.modelValue},isNormal(){return!this.isReadonly&&!this.isDisabled},isDisabled(){return!!this.x.disabled},isReadonly(){return!!this.x.readonly},errorTipTarget(){return this},hasClassSlotDown(){return!!this.$slots.down},html_on(){},html_props(){return this.x.inputWidth&<.unitSize(this.x.inputWidth),{class:["w-formbase",this.warnClass,this.html_align_class,{"z-on":this.isFocus,"z-ds":!this.isNormal,"z-req":this.rules.required,"z-label-vertical":this.labelVertical,"z-slot-down":this.hasClassSlotDown}],...this.html_on}}},__file:"src/widgets/FormBase.vue"};const{leafSymbol:di,changeSymbol:pi}=lt.symbol;var mi={name:"w-checkbox",pubParentName:"w-checkboxgroup",mixins:[ui],props:["text","checked","partialSubmit","minSize","maxSize"],inject:["providePubParent","provideBoxParent"],emits:["change","update:checked","click"],data:()=>({isPlural:!0,indeterminate:!1,modifiedChecked:!1,defaultChecked:!1}),created(){this.provideBoxParent&&(this.provideBoxParent.boxProxy=this),this.defaultChecked=this.isChecked,this.modifiedChecked=this.isChecked},methods:{val(t,e){if(0==arguments.length)return this.getVal();const i=this.createEvent("change",{target:this.$refs.v,originalEvent:e});this.setVal(t,i)},getVal(){return this.isChecked?this.value:""},setVal(t,e){this.pubParent;let i=this.checkValue,s="radio"===this.input_type,l=this.x.modelValue;l=s?t?lt.string(i):"":t?lt.idsAdd(l,i):lt.idsRemove(l,i),this.x.modelValue=l,s&&this.siblings().forEach(t=>t.x.modelValue=l),this.$emit("update:modelValue",l),this.trigger(e,l),this.parentTrigger(e,l)},formVal(){return!this.isDisabled&&this.isChecked?this.x.value:""},groupFormVal(t){if(null==t){let t=[];return lt.lodash.each(this.siblings(null,!0),e=>{let i=e.formVal();null!=i&&""!==i&&t.push(i)}),t.join(",")}Array.isArray(t)&&(t=t.join(",")),lt.lodash.each(this.siblings(),e=>e.val(lt.idsAny(t,e.checkValue)))},watchModelValue(t,e){e!=t&&this.parentTrigger("change",t)},getInputValue:t=>null==t?"":t,parentTrigger(t,e){this.pubParent&&this.pubParent.watchValue!=e&&(this.pubParent.watchValue=e,this.pubParent.trigger(t,e))},check(t){this.isNormal&&this.val(t)},siblingsContainer(){return this.ownerView.el()},siblings(t,e){return lt.lodash.map(lt.q(':input[name="'+this.input_name+'"]:not([w-form-ignore] :input)'+(e?":not(:disabled)":"")+(!0===t?":checked":!1===t?":not(:checked)":t||""),this.siblingsContainer()),t=>lt(t))},relate(){},reset(t){this.pubParent?this.pubParent.reset(t):this.val(!(t||!this.defaultChecked))},onclick(t){t.stopPropagation()},onbasechange(t){this.warnClass&&this.siblings().forEach(t=>t.warn&&t.warn(!1)),this.setVal(t.target.checked,t)},onchange(t){this.onbasechange(t)},isModified(t){return(t?this.defaultChecked:this.modifiedChecked)!=this.isChecked},saveModified(t){this.modifiedChecked=this.isChecked,t&&(this.defaultChecked=this.modifiedChecked)},snapElem(){return this.el()},html_input(){return[r.h(this.input_tag,{ref:"v",class:"w-input-value",type:this.input_type,name:this.input_name,value:this.input_value,checked:this.isChecked,disabled:this.isDisabled,onclick:t=>{this.isNormal?(this.indeterminate=!1,this.x.cancelable&&this.isChecked&&(t.preventDefault(),this.val(!1),setTimeout(()=>{this.$refs.v.checked=!1}))):t.preventDefault()},onchange:this.onchange,...this.input_prop}),r.h("em",{ref:"appear",class:this.$options.name+"-appear"},r.h("i",{class:this.input_icon})),this.$slots.text||this.x.text?r.h("span",{class:this.$options.name+"-text"},this.$slots.text?this.$slots.text():this.x.text):null]},html_main(){return r.h("label",{class:"w-input",onclick:this.onclick},this.html_input())},html_target(){return this.$slots.default?r.h(Kt,{class:this.$options.name+"-target",width:"*",ref:"target"},this.$slots):[]},html(){return this.$slots.default?[this.html_self(!0),this.html_target()]:this.html_self()}},computed:{validHooks(){return{...this.pubValidHooks,minSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length<lt.number(e))return this.formErr(i,[e])},maxSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length>lt.number(e))return this.formErr(i,[e])}}},rules(){return{required:null!=this.x.required?!!this.x.required:!(!this.pubParent||!this.pubParent.x.required),minSize:null!=this.x.minSize?this.x.minSize:this.pubParent&&this.pubParent.x.minSize,maxSize:null!=this.x.maxSize?this.x.maxSize:this.pubParent&&this.pubParent.x.maxSize}},input_type:()=>"checkbox",input_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_value(){return null==this.x.value?"":this.x.value},isIndeterminate(){return this.data&&this.data[di]?this.data[di].indeterminate:this.indeterminate},input_prop(){return{indeterminate:this.isIndeterminate,"w-partialsubmit":this.x.partialSubmit?1:null,"w-all":this.x.all?"":null}},input_icon:()=>"f-i f-i-check",checkValue(){return this.x.value},isChecked(){return lt.idsAny(this.x.modelValue,this.checkValue)},isDisabled(){return null!=this.x.disabled?!!this.x.disabled:this.pubParent&&this.pubParent.disabled},isReadonly(){return null!=this.x.readonly?!!this.x.readonly:this.pubParent&&this.pubParent.readonly},html_class(){return{"z-half":this.isIndeterminate,"z-target":!!this.$slots.default,"z-checked":this.isChecked}}},mounted(){this.$refs.target&&this.$watch(()=>this.x.modelValue,t=>{this.siblings().forEach(t=>{let e=t.$refs.target;e&&this.ownerView.fAll(null,e.$el).forEach(e=>e.x.disabled=!t.isChecked)})},{immediate:!0})},__file:"src/widgets/CheckBox.vue"};const{leafSymbol:fi}=lt.symbol;var xi={name:"w-triplebox",mixins:[mi],props:["all"],inject:["provideTripleboxContainer"],created(){if(this.provideBoxParent){if(this.data&&!this.data[fi]){const t=this.provideBoxParent.provideParentLeaf,e=t&&t.boxProxy&&t.boxProxy.data,i=r.computed(()=>{if(this.data.children&&this.data.children.length){let t,e;const i=this.x.modelValue;for(let s of this.data.children){if(!s[fi])return!1;if(s[fi].indeterminate)return!0;lt.idsAny(i,s[fi].checkValue)?t=!0:e=!0}return!(!t||!e)}return!1});this.data[fi]={parent:e,checkValue:this.value,indeterminate:i}}}else this.$watch(()=>this.x.modelValue,(t,e)=>{(null!=t&&""!==t||null!=e&&""!==e)&&(this.x.all||this.relate())})},methods:{getVal(){let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.value:""},checkDescendant(t,e,i){if(t.children)for(let s of t.children){const t=s[fi];e=i?lt.idsAdd(e,t.checkValue):lt.idsRemove(e,t.checkValue),e=this.checkDescendant(s,e,i)}return e},checkAncestor(t,e){const i=t.children.find(t=>!lt.idsAny(e,t[fi].checkValue));return e=i?lt.idsRemove(e,t[fi].checkValue):lt.idsAdd(e,t[fi].checkValue),t[fi].parent&&(e=this.checkAncestor(t[fi].parent,e)),e},setVal(t,e){this.pubParent;let i=this.checkValue,s=this.x.modelValue;if(s=t?lt.idsAdd(s,i):lt.idsRemove(s,i),this.data){this.data.children&&(s=this.checkDescendant(this.data,s,t));const e=this.data[fi];e.parent&&(s=this.checkAncestor(e.parent,s,t))}this.x.modelValue=s,this.$emit("update:modelValue",s),this.x.all||this.parentTrigger(e,this.groupFormVal())},formVal(){if(this.isDisabled)return"";let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.$refs.v.value:""},siblingsContainer(){let t=this.provideTripleboxContainer;return t&&t.el()||this.ownerView.el()},parentTrigger(t,e){let i=this.provideTripleboxContainer,s=i&&i.el();e&&(e=e.split(",").sort().join(",")),s&&s.getAttribute("wTripleboxValue")!=e&&(s.setAttribute("wTripleboxValue",e),this.trigger(t,e))},onchange(t){this.onbasechange(t),this.relate()},checkstate(t){let e=this.indeterminate?2:this.isChecked?1:0;if(null==t)return e;this.val(1==t),this.indeterminate=2==t},isPartial(){return 2==this.checkstate()},relate(){if(this.x.name&<.q(`[name="${this.x.name}"][w-all]`,lt.el(this.ownerView))[0]){const n=this.ownerView.fAll(this.x.name);for(var t,e=0,i=this.isPartial(),s=n.length,l=s,r=0,o=0,a=0;e<s;e++)if(n[e].isNormal)if(this.x.all)if(this!=n[e]){if(i){this.checkstate(n[e].checkstate());break}n[e].checkstate(this.isChecked?1:0)}else 1==s&&(t=this);else n[e].x.all?t=n[e]:n[e].isChecked?o++:n[e].isPartial()?a++:r++;else l--;t&&(r+o+a||1==s)&&t.checkstate(r==l-1?0:o==l-1?1:2)}},check(t){if(!this.isNormal)return;this.checkstate()!=t&&(this.checkstate(t),this.relate())}},computed:{checkValue(){return this.x.all?"checked":this.x.value}},mounted(){},__file:"src/widgets/TripleBox.vue"},gi={name:"w-leaf",pubParentName:"w-tree",mixins:[Ut,ft],props:["text","expanded","expandedIcon","collapsedIcon","icon","boxSync","src","disabled"],inject:["providePubParent","provideLevel","provideParentLeaf","provideParentTR"],emits:["click"],provide(){return{provideParentLeaf:this,provideLevel:this.provideLevel+1,provideBoxParent:this}},data(){return{hover:!1,loading:!1,loaded:this.getInitLoaded()}},methods:{hasChild(){let t=(this.x||this.$props).children;if(!0===t||Array.isArray(t)&&t.length)return!0},childrenList(){return lt.lodash.map(this.$refs.cont.querySelectorAll(":scope > .w-leaf"),t=>lt(t))},getInitLoaded(){return!(!this.hasChild()&&this.getSrc())},isExpanded(){return this.provideParentTR?this.provideParentTR.isExpanded():this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},isFolder(){return!!this.hasChild()||!(!this.getSrc()||this.loaded)},toggle(t,e){(this.provideParentTR||this).setExpanded(t),this.isExpanded()&&!this.loaded?this.request(e):e&&this.$nextTick(e)},onmouseenter(t){!this.x.disabled&&this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},onclick(t){this.x.disabled||(this.boxProxy&&this.x.boxSync&&this.boxProxy.check(!this.boxProxy.isChecked),this.$emit("click",t))},triple(){if(!this.boxProxy||"w-triplebox"!==this.boxProxy.$options.name)return;let t=this;for(;(t=t.provideParentLeaf)&&"w-leaf"===t.$options.name;)if(t.boxProxy){let e=t.childrenList(),i=[0,0,0],s=e.length;e.forEach(t=>{let e=t.boxProxy;e&&i[e.checkstate()]++}),t.boxProxy.check(i[0]===s?0:i[1]===s?1:2)}let e=this.boxProxy.checkstate();2!=e&&this.tripleAll(e)},tripleAll(t){this.childrenList().forEach(e=>{e.boxProxy&&(e.boxProxy.check(t),e.tripleAll(t))})},expandToView(){let t=this;for(;(t=t.provideParentLeaf)&&t.$options.name===this.$options.name;)t.toggle(!0)},html_self(){let t=this.isExpanded(),e=this.isFolder()?t?this.x.expandedIcon:this.x.collapsedIcon:this.x.icon;return r.h("div",r.mergeProps(this.html_attrs,this.html_props,this.$attrs),[this.loading?r.h(we,{src:"#f-svg-loading",class:"w-leaf-loading"}):r.h("div",{ref:"toggle",class:["w-leaf-toggle f-i",t?"f-i-caret-down":"f-i-caret-right"],onclick:t=>{t.stopPropagation(),this.toggle()}}),this.$slots.box&&this.$slots.box(),e&&r.h(we,{src:e,class:"w-leaf-icon"}),r.h("div",{class:"w-leaf-text f-line-1",title:this.x.text},this.$slots.text?this.$slots.text():this.x.text)])},html_cont(){let t,e=this.x.children,i=this.pubParent;return Array.isArray(e)&&i&&(t=e.map((t,e)=>{let s;const l=i.$slots.default({item:t,index:e});for(let t of l)s||(s=t.key);return s?r.h(ze,{key:s},{default:()=>l}):l})),r.h("div",{id:this.uid+"cont",ref:"cont",class:"w-leaf-cont",style:{display:this.x.expanded?"":"none"}},t)},html(){return[this.html_self(),this.html_cont()]}},computed:{tree(){return this.pubParent},level(){return this.provideParentTR?this.provideParentTR.level:this.provideLevel+1},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=this.isExpanded(),e=this.isFolder(),i=!!this.x.disabled,s={class:{"z-on":this.isCurrent,"z-ds":i,"z-folder":e,"z-expanded":e&&t,"z-collapse":e&&!t},style:"padding-left:"+lt.unitSize(16*this.level)};return this.pubParent&&(s.onmouseenter=this.onmouseenter,s.onmouseleave=this.onmouseleave,s.onclick=this.onclick),s}},mounted(){this.x.expanded&&this.toggle(!0),this.isCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/Leaf.vue"},vi={name:"w-pagebar",mixins:[Qe],emits:["click:item"],props:["limit","size","offset","buttonCount","noFirstLast","face","jump"],data:()=>({isJumpFocus:!1,showDrop:!1}),methods:{x_default:()=>({limit:1,size:0,offset:0,buttonCount:5,face:"normal",gap:0,valign:"middle"}),inCurrent(t){return this.currentPage==t.text},clickItem(t,e){let i=(e-1)*this.x.limit;i!=this.x.offset&&(t.runType="click:item",t.value=i,this.trigger(t,i))},clickDrop(t){this.showDrop=!0},onJumpClick(t){let e=Math.max(0,lt.number(this.$refs.jumpInput.value));this.clickItem(t,e)},html_button(t,e,i,s){return r.h("button",{class:["w-pagebar-button w-pagebar-num",{"z-on":!e&&!i&&t==this.currentPage,"z-ds":s,[i]:i}],disabled:s,onclick:e=>this.clickItem(e,t)},e||(i?"":t))},html_slots(){return"button"===this.x.face?this.html_face_button():"simple"===this.x.face?this.html_face_simple():this.html_face_normal()},html_buttons(){return[r.h(ye,{class:"w-pagebar-button w-pagebar-prev",icon:".f-i .f-i-angle-left",disabled:1==this.currentPage,title:lt.loc.page_text.prev,onclick:t=>this.clickItem(t,this.currentPage-1)}),r.h(ye,{class:"w-pagebar-button w-pagebar-next",icon:".f-i .f-i-angle-right",disabled:this.currentPage==this.sumPage,title:lt.loc.page_text.next,onclick:t=>this.clickItem(t,this.currentPage+1)})]},html_drop(){let t=[];if(this.x.buttonCount&&t.push(r.h(ye,{class:"w-pagebar-button w-pagebar-button-count w-pagebar-prev",ref:"drop",text:this.currentPage+"/"+this.sumPage,onclick:t=>this.clickDrop(t)})),this.showDrop){let e=[];for(let t=1,i=this.sumPage;t<=i;t++)e.push(r.h(ye,{text:t,onClick:e=>this.clickItem(e,t)}));t.push(r.h(Ve,{snap:()=>this.$refs.drop,position:"v",indent:1,onClose:()=>this.showDrop=!1},{default:()=>e}))}return t},html_face_simple(){return this.html_drop().concat(this.html_buttons())},html_face_button(){let t=this.html_buttons();return t.splice(1,0,...this.html_drop()),t},html_face_normal(){const t=[];let e=this.sumPage,i=this.currentPage,s=lt.number(this.x.buttonCount),l=Math.max(1,i-Math.ceil(s/2)+1),o=Math.min(e+1,l+s),a=o-l<s?Math.max(1,o-s):l;this.x.noFirstLast||t.push(this.html_button(1,this.labelFirst,this.iconFirst,1==i)),t.push(this.html_button(i-1,this.labelPrev,this.iconPrev,1==i));for(let e=a;e<o;e++)t.push(this.html_button(e));return t.push(this.html_button(i+1,this.labelNext,this.iconNext,i>=this.sumPage)),this.x.noFirstLast||t.push(this.html_button(e,this.labelLast,this.iconLast,i>=this.sumPage)),this.x.jump&&(t.push(r.h("span",{class:"w-pagebar-jump-to"},lt.loc.to)),t.push(r.h("input",{class:"w-pagebar-jump-input",ref:"jumpInput",onfocus:t=>this.isJumpFocus=!0,onblur:t=>this.isJumpFocus=!1,onkeydown:t=>13==t.keyCode&&this.onJumpClick(t)})),t.push(r.h("button",{class:"w-pagebar-button w-pagebar-jump-button",onclick:this.onJumpClick},"GO")),t.push(r.h("span",{class:"w-pagebar-jump-page"},lt.loc.page))),t},html_face_mini(){return this.html_face_normal()}},computed:{currentPage(){return(Math.ceil(this.x.offset/this.x.limit)||0)+1},sumPage(){return Math.ceil(this.x.size/this.x.limit)||1},labelFirst(){return"normal"===this.x.face?lt.loc.page_text.first:""},labelLast(){return"normal"===this.x.face?lt.loc.page_text.last:""},labelNext(){return"normal"===this.x.face?lt.loc.page_text.next:""},labelPrev(){return"normal"===this.x.face?lt.loc.page_text.prev:""},iconFirst(){return"mini"===this.x.face?"f-i f-i-angle-first":""},iconLast(){return"mini"===this.x.face?"f-i f-i-angle-last":""},iconNext(){return"mini"===this.x.face?"f-i f-i-angle-right":""},iconPrev(){return"mini"===this.x.face?"f-i f-i-angle-left":""},html_class(){return["w-buttonbar w-horizontal","z-face-"+this.x.face,this.html_align_class,this.isJumpFocus&&"z-jump-on"]}},__file:"src/widgets/PageBar.vue"},wi={name:"w-split",mixins:[Ut],props:["collapsedIcon","expandedIcon","movable","range","toNext","expanded"],inject:["provideLayout"],created(){this.$watch("expanded",t=>{"boolean"==typeof t?this.x.expanded=t:null==this.x.expanded&&(this.x.expanded=!0)},{immediate:!0})},methods:{toggle(t){this.x.expanded=null==t?!this.x.expanded:t;let e=this.x.toNext?this.el().nextElementSibling:this.el().previousElementSibling;e&<.q(e).toggleClass("f-split-collapsed",!this.x.expanded)},dragstart(t){let e=this.el().previousElementSibling,i=this.el().nextElementSibling;if(e&&i){let s,l,r=this.inVertical,o=this.x.toNext?i:e,a=lt.eventX(t),n=lt.eventY(t),h=r?"top":"left",c=r?"height":"width",u=r?"clientY":"clientX",d=r?n:a,p=lt.bcr(e)[h],m=lt.bcr(i)[r?"bottom":"right"]-5,f=lt.lodash.pick(lt.bcr(this.$refs.movable),["width","height","top","left"]);lt.moveup(t=>{l||(l=lt.q('<div style="position:absolute;background:rgba(0,0,0,.3);z-index:101;"></div>').css(f).appendTo(document.body)),s=lt.numRange(f[h]+t[u]-d,p,m),l.css({[h]:s})},(t,e)=>{if(e&&l){l.remove();let t=(this.x.expanded?lt.bcr(o)[c]:0)+(this.x.toNext?1:-1)*(d-s);t<=0?this.toggle(!1):(this.x.expanded||this.toggle(!0),lt.q(o).css({[c]:t}))}},t)}},html_slots(){let t=[],e=this.x.expandedIcon||this.x.collapsedIcon,i=this.x.collapsedIcon||e;return e&&t.push(this.html_icon(this.x.expanded?e:i,"w-split-icon",()=>this.toggle())),this.x.movable&&t.push(r.h("div",{ref:"movable",class:"w-split-movable",onmousedown:this.dragstart})),t}},computed:{inVertical(){return"w-vertical"===this.provideLayout},html_props(){return{class:["f-rel z-"+(this.inVertical?"vertical":"horizontal"),{"z-tonext":this.x.toNext}]}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Split.vue"},bi={name:"w-toggle",mixins:[Ut,Jt],props:["collapsedIcon","expandedIcon","expanded","align","valign"],methods:{x_default:()=>({expanded:!0,valign:"middle"}),toggle(t=!0){let e="boolean"==typeof t?t:!this.x.expanded;this.x.expanded=e,lt.q(this.el()).nextUntil(".w-toggle").toggle(e)},html_slots(){let t=this.x.expanded?this.x.expandedIcon:this.x.collapsedIcon;return[t&&r.h(we,{src:t,class:"w-toggle-icon"}),r.h("div",{class:"w-toggle-main"},this.$slots.default())]}},computed:{html_props(){let t=this.x.expanded;return{class:["w-horizontal f-pointer",{"z-expanded":t,"z-collapse":!t},this.html_align_class],onclick:this.toggle}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Toggle.vue"},_i={name:"w-video",mixins:[Ut],props:["src","poster"],data:()=>({playing:!1}),methods:{getMimeType(){let t=lt.strTo(this.x.src,"?")||this.x.src,e=lt.strFrom(t,"/",!0)||t;return lt.strFrom(e,".",!0)?mimeType(e):"video/mp4"},html_slots(){return[r.h("video",{class:"w-video-vd f-width f-height",ref:"vd",src:this.x.src,poster:this.x.poster,onplay:t=>this.playing=!0,onpause:t=>this.playing=!1,controls:!0,"webkit-playsinline":!0,playsinline:!0,"x-webkit-airplay":!0,"x5-playsinline":!0,"x5-video-player-type":"h5","x5-video-orientation":"h5","x5-video-player-fullscreen":!0}),r.h("div",{class:"w-video-play f-abs-center f-flex-center",innerHTML:'<i class="f-i f-i-play"></i>',onclick:t=>{let e=this.$refs.vd;e.paused?e.play():e.pause()}})]}},computed:{html_class(){return["f-rel f-flex-center",{"z-play":this.playing}]}},__file:"src/widgets/Video.vue"},yi={name:"w-progress",mixins:[Ut],props:["percent","range","text"],methods:{html_slots(){let t=lt.number(this.x.percent),e=this.x.text;return null==e&&(e=t+"%"),[r.h("span",{class:"w-progress-text"},e),r.h("div",{class:"w-progress-gut",style:{width:`${t}%`}},r.h("div",{class:"w-progress-bar f-flex f-flex-center",style:{width:`${0==t?t:1e4/t}%`}},r.h("span",{class:"w-progress-text"},e)))]}},computed:{html_class(){if(this.x.range){let t=this.x.range.split(",");for(let e=t.length-1;e>=0;e--)if(lt.number(this.x.percent)>=lt.number(t[e]))return"z-"+t[e]}}},__file:"src/widgets/Progress.vue"},ki={name:"w-calendar",mixins:[Ut],emits:["click:item","change"],props:["value","minValue","maxValue","current","pad","face","format","success","cg","start","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data(){return{dt:this.value2date(),currentDate:null,headPopYear:null,headPopMonth:null}},watch:{value(t){this.dt=this.value2date()},dt(t,e){let i=t.getFullYear(),s=e.getFullYear();if("year"===this.x.face){(""+i).slice(-2,-1)!=(""+s).slice(-2,-1)&&this.trigger("change",t)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?i!=s&&this.trigger("change",t):"date"===this.x.face&&(i==s&&t.getMonth()==e.getMonth()||this.trigger("change",t))},current(t){if(!t)return;let e="string"==typeof t?lt.dateParse(t,this.formatter):t,i=this.dt,s=e.getFullYear(),l=i.getFullYear();if("year"===this.x.face){(""+s).slice(-2,-1)!=(""+l).slice(-2,-1)&&(this.dt=e)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?s!=l&&(this.dt=e):"date"===this.x.face&&(s==l&&e.getMonth()==i.getMonth()||(this.dt=e))}},methods:{x_default(){let t=this.format||"";return{face:"yyyy"===t?"year":t.includes("MM")&&!t.includes("dd")?"month":t.includes("ww")?"week":t.includes("qq")?"quarter":"date"}},value2date(){let t=this.value,e=this.minValue,i=this.maxValue,s=this.format||"";return e&&(!t||t<e)&&(t=e),i&&(!t||t>i)&&(t=i),t=t?lt.dateParse(t,s):new Date,this.value||this.setDefaultTime(t),t},weekday(t){let e=t.getDay();return 0==e?6:e-1},setDefaultTime(t){let e=null==this.defaultHour?t.getHours():parseFloat(this.defaultHour);if(this.enableHour){let t=lt.arrayNumber(this.enableHour);t.includes(e)||(e=t[0])}t.setHours(e);let i=null==this.defaultMinute?t.getMinutes():parseFloat(this.defaultMinute);if(this.enableMinute){let t=lt.arrayNumber(this.enableMinute);t.includes(i)||(i=t[0])}t.setMinutes(i);let s=null==this.defaultSecond?t.getSeconds():parseFloat(this.defaultSecond);if(this.enableSecond){let t=lt.arrayNumber(this.enableSecond);t.includes(s)||(s=t[0])}return t.setSeconds(s),t},fixDate(t){return this.beginDate&&t<this.beginDate&&(t=this.beginDate),this.endDate&&t>this.endDate&&(t=this.endDate),this.setDefaultTime(new Date(t.getTime()))},clickStep(t){let e=new Date(this.dt.getTime());"year"==this.x.face?e=lt.dateAdd(e,"y",10*t):"quarter"==this.x.face||"month"==this.x.face?e=lt.dateAdd(e,"y",t):"date"==this.x.face?e=lt.dateAdd(e,"M",t):"week"==this.x.face&&(e=lt.dateAdd(e,"y",t)),this.dt=e},clickPopYear(t){(t=t||this.dt.getFullYear()-4)<1e3&&(t=1e3),this.headPopYear=Array.from(Array(10)).map((e,i)=>t+i)},clickPopYearItem(t){let e=new Date(this.dt.getTime());e.setFullYear(t),this.dt=e,this.headPopYear=null},clickPopYearStep(t){let e=this.headPopYear,i=t<0?e[0]-10:e[e.length-1]+1;this.clickPopYear(i)},mousewheelPopYear(t){this.clickPopYearStep(t.deltaY>0?-1:1)},clickPopMonth(){this.headPopMonth=Array.from(Array(12)).map((t,e)=>e+1)},clickPopMonthItem(t){this.dt.getMonth(),this.dt=lt.dateAdd(this.dt,"M",t-1-this.dt.getMonth()),this.headPopMonth=null},clickItem(t,e){e.disabled||(void 0!==this.x.current&&(this.dt=this.fixDate(e.date)),t.runType="click:item",t.value=e,this.trigger(t,e),this.hasTime||this.callback(e.value,t))},clickNow(t){this.callback(this.fixDate(new Date),t)},clickConfirm(t){let e=this.dt,i=this.focusDate,s=this.fixDate(new Date(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()));this.callback(s,t)},callback(t,e){"object"==typeof t&&(t=this.fm(t)),this.x.success&&this.x.success(t,e)},clickHour(t,e){this.dt.setHours(e),this.dt=this.fixDate(this.dt),this.$refs.hour.scrollToY(t.currentTarget,"middle",150)},clickMinute(t,e){this.dt.setMinutes(e),this.dt=this.fixDate(this.dt),this.$refs.minute.scrollToY(t.currentTarget,"middle",150)},clickSecond(t,e){this.dt.setSeconds(e),this.dt=this.fixDate(this.dt),this.$refs.second.scrollToY(t.currentTarget,"middle",150)},fm(t){return lt.dateFormat("string"==typeof t?lt.dateParse(t,this.formatter):t,this.formatter)},isHourDisabled(t){let e=this.minHour,i=this.maxHour;return e&&e>t||i&&i<t},isMinuteDisabled(t){let e=this.minMinute,i=this.maxMinute;return e&&e>t||i&&i<t},isSecondDisabled(t){let e=this.minSecond,i=this.maxSecond;return e&&e>t||i&&i<t}},computed:{loc:()=>lt.loc,formatter(){return this.x.format||"yyyy-MM-dd"},hasTime(){return/[Hms]/.test(this.formatter)},onlyTime(){return this.hasTime&&!/[yMd]/.test(this.formatter)},focusValue(){let t=this.focusDate;return t&&this.fm(t)},focusDate(){let t=this.x.current;return t?lt.dateParse(t,this.x.format):!this.x.value&&this.x.success?this.x.format&&this.dt:void 0},beginDate(){return this.x.minValue&<.dateParse(this.x.minValue,this.formatter)},endDate(){return this.x.maxValue&<.dateParse(this.x.maxValue,this.formatter)},focusHour(){return this.x.format.includes("H")&&this.dt.getHours()},focusMinute(){return this.x.format.includes("m")&&this.dt.getMinutes()},focusSecond(){return this.x.format.includes("s")&&this.dt.getSeconds()},minHour(){if(this.beginDate){let t=this.beginDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},maxHour(){if(this.endDate){let t=this.endDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},minMinute(){if(this.minHour===this.dt.getHours())return this.beginDate.getMinutes()},maxMinute(){if(this.maxHour===this.dt.getHours())return this.endDate.getMinutes()},minSecond(){if(this.minMinute===this.dt.getMinutes())return this.beginDate.getSeconds()},maxSecond(){if(this.maxMinute===this.dt.getMinutes())return this.endDate.getSeconds()},headYear(){let t=this.dt.getFullYear();return"year"===this.x.face&&(t=this.dt.getFullYear()-this.dt.getFullYear()%10,t+=" - "+(t+9)),lt.loc.ps(lt.loc.calendar.y,t)},headMonth(){return lt.loc.calendar.monthname[this.dt.getMonth()]},bodyList(){return"year"===this.x.face?this.bodyListYear:"quarter"===this.x.face?this.bodyListQuarter:"month"===this.x.face?this.bodyListMonth:"week"===this.x.face?this.bodyListWeek:this.bodyListDate},bodyListYear(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=this.dt.getFullYear()-this.dt.getFullYear()%10-1,r=new Date(this.dt.getTime());r.setDate(1),r.setFullYear(l);for(let o=0;o<12;o++){let a=l+o,n={value:a,text:a,date:new Date(r.getTime()),pad:0==o||11==o,disabled:!!(e&&e>a||i&&i<a),focus:s==a};t.push(n),r.setFullYear(r.getFullYear()+1)}return t},bodyListQuarter(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=1;r<=4;r++){let o=this.fm(l),a={text:`Q${r}`,value:o,date:new Date(l.getTime()),disabled:!!(e&&e>o||i&&i<o),focus:s==o};l.setMonth(l.getMonth()+3),t.push(a)}return t},bodyListMonth(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=0;r<12;r++){let o=this.fm(l),a={text:lt.loc.calendar.monthname[r],value:o,date:new Date(l.getTime()),disabled:!!(e&&e>o||i&&i<o),focus:s==o};l.setMonth(l.getMonth()+1),t.push(a)}return t},bodyListWeek(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=lt.dateWeek(this.dt)[0],r=lt.dateWeekLast(l),o=lt.dateWeekFirst(l)[2];for(let a=1,n=r[1];a<=n;a++){let r=this.fm(o),n={text:a,value:l+"-"+lt.strPad(a),date:new Date(o.getTime()),disabled:!!(e&&e>r||i&&i<r),focus:s==r,title:lt.loc.ps(lt.loc.calendar.from_to,lt.dateFormat(o,"yyyy-MM-dd"),lt.dateFormat(lt.dateAdd(o,"d",6),"yyyy-MM-dd"))};o.setDate(o.getDate()+7),t.push(n)}return t},bodyListDate(){let t=new Date(this.dt.getTime()),e=t.getMonth(),i=new Date(t.getTime()),s=this.focusValue,l=s&<.dateFormat(lt.dateParse(s,this.x.format),"yyyy-MM-dd"),r=this.beginDate&<.dateFormat(this.beginDate,"yyyy-MM-dd"),o=this.endDate&<.dateFormat(this.endDate,"yyyy-MM-dd"),a=[];t.setDate(1),i.setDate(new Date(t.getFullYear(),e+1,0).getDate());let n=7-(this.weekday(t)+i.getDate())%7;for(n&&n<7&&i.setDate(i.getDate()+n),this.weekday(t)>0&&t.setDate(1-this.weekday(t)),this.x.pad&&(n=1+(i.getTime()-t.getTime())/864e5,n<42&&i.setDate(i.getDate()+42-n));t<=i;){let i=this.fm(t),s=lt.dateFormat(t,"yyyy-MM-dd"),n={text:t.getDate(),value:i,date:new Date(t.getTime()),pad:t.getMonth()!==e,disabled:!!(r&&r>s||o&&o<s),focus:l===s};a.push(n),t.setDate(t.getDate()+1)}return a},bodyListHour(){return this.enableHour?lt.arrayNumber(this.enableHour):Array.from(Array(24).keys())},bodyListMinute(){return this.enableMinute?lt.arrayNumber(this.enableMinute):Array.from(Array(60).keys())},bodyListSecond(){return this.enableSecond?lt.arrayNumber(this.enableSecond):Array.from(Array(60).keys())}}};const Ci=["innerHTML"],Si=["onClick"],Vi=["onClick"],Ti={class:"w-calendar-body"},Mi={class:"w-calendar-daytitle"},Pi=["title","onClick"],$i={class:"w-calendar-item-text"},Bi={class:"w-calendar-time-th"},zi={class:"w-calendar-time-th"},Di={class:"w-calendar-time-th"};ki.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-html"),n=r.resolveComponent("w-dialog"),h=r.resolveComponent("w-horizontal"),c=r.resolveComponent("w-vertical"),u=r.resolveComponent("w-button"),d=r.resolveComponent("w-buttonbar");return r.openBlock(),r.createBlock(c,r.mergeProps(t.html_binds,{class:["f-rel","w-calendar-"+this.x.face]}),{default:r.withCtx(()=>[o.onlyTime?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createBlock(c,{key:0,class:"w-calendar-main"},{default:r.withCtx(()=>[r.createVNode(h,{class:r.normalizeClass(["w-calendar-head",{"f-h-gap":t.dfish.br.compat.gap}]),valign:"middle",align:"center"},{default:r.withCtx(()=>["date"==t.x.face?(r.openBlock(),r.createElementBlock("i",{key:0,class:"w-calendar-head-prev-year f-i f-i-angle-double-left f-pointer",onClick:e[0]||(e[0]=t=>o.clickStep(-12))})):r.createCommentVNode("v-if",!0),r.createElementVNode("i",{class:"w-calendar-head-prev f-i f-i-angle-single-left f-pointer",onClick:e[1]||(e[1]=t=>o.clickStep(-1))}),r.createVNode(h,{class:r.normalizeClass(["w-calendar-head-pop",{"f-h-gap":t.dfish.br.compat.gap}])},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"w-calendar-head-year f-link",ref:"popYear",onClick:e[2]||(e[2]=t=>o.clickPopYear()),innerHTML:o.headYear},null,8,Ci),l.headPopYear?(r.openBlock(),r.createBlock(n,{key:0,class:"f-dfish-dialog",width:"72",context:t.$refs.popYear,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popYear,onClose:e[5]||(e[5]=t=>l.headPopYear=null)},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"w-calendar-head-year-item",onClick:e[3]||(e[3]=t=>o.clickPopYearStep(-1))},e[11]||(e[11]=[r.createElementVNode("i",{class:"f-i f-i-minus"},null,-1)])),r.createVNode(a,{height:"*",onWheelPassive:o.mousewheelPopYear},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.headPopYear,t=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-calendar-head-year-item",{"z-on":t==l.dt.getFullYear()}]),onClick:e=>o.clickPopYearItem(t)},r.toDisplayString(t),11,Si))),256))]),_:1},8,["onWheelPassive"]),r.createVNode(a,{class:"w-calendar-head-year-item",onClick:e[4]||(e[4]=t=>o.clickPopYearStep(1))},{default:r.withCtx(()=>e[12]||(e[12]=[r.createElementVNode("i",{class:"f-i f-i-plus"},null,-1)])),_:1,__:[12]})]),_:1},8,["context","snap"])):r.createCommentVNode("v-if",!0),"date"==t.x.face?(r.openBlock(),r.createBlock(a,{key:1,class:"w-calendar-head-month f-link",ref:"popMonth",onClick:o.clickPopMonth},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.headMonth),1)]),_:1},8,["onClick"])):r.createCommentVNode("v-if",!0),l.headPopMonth?(r.openBlock(),r.createBlock(n,{key:2,class:"f-dfish-dialog",width:"72",context:t.$refs.popMonth,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popMonth,onClose:e[6]||(e[6]=t=>l.headPopMonth=null)},{default:r.withCtx(()=>[r.createVNode(a,{height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.headPopMonth,t=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-calendar-head-year-item",{"z-on":t==l.dt.getMonth()+1}]),onClick:e=>o.clickPopMonthItem(t)},r.toDisplayString(t),11,Vi))),256))]),_:1})]),_:1},8,["context","snap"])):r.createCommentVNode("v-if",!0)]),_:1},8,["class"]),r.createElementVNode("i",{class:"w-calendar-head-next f-i f-i-angle-single-right f-pointer",onClick:e[7]||(e[7]=t=>o.clickStep(1))}),"date"==t.x.face?(r.openBlock(),r.createElementBlock("i",{key:1,class:"w-calendar-head-next-year f-i f-i-angle-double-right f-pointer",onClick:e[8]||(e[8]=t=>o.clickStep(12))})):r.createCommentVNode("v-if",!0),e[13]||(e[13]=r.createElementVNode("div",{class:"w-calendar-head-blank"},null,-1))]),_:1,__:[13]},8,["class"]),r.renderSlot(t.$slots,"head"),r.createElementVNode("div",Ti,["date"==t.x.face?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(o.loc.calendar.day_title_1,t=>(r.openBlock(),r.createElementBlock("div",Mi,r.toDisplayString(t),1))),256)):r.createCommentVNode("v-if",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyList,(e,i)=>(r.openBlock(),r.createElementBlock("div",{title:e.title,class:r.normalizeClass(["w-calendar-item",{"z-on":e.focus&&!e.disabled,"z-pad":e.pad,"z-ds":e.disabled}]),onClick:t=>o.clickItem(t,e)},[r.renderSlot(t.$slots,"default",{item:e,index:i},()=>[r.createElementVNode("div",$i,r.toDisplayString(e.text),1)])],10,Pi))),256))])]),_:3})),o.hasTime?(r.openBlock(),r.createBlock(h,{key:1,class:"w-calendar-time"},{default:r.withCtx(()=>[!1!==o.focusHour?(r.openBlock(),r.createBlock(c,{key:0,class:"w-calendar-time-col w-calendar-time-hour",width:"*"},{default:r.withCtx(()=>[r.createElementVNode("div",Bi,r.toDisplayString(o.loc.hour),1),r.createVNode(d,{class:"w-calendar-time-body",ref:"hour",current:o.focusHour,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyListHour,e=>(r.openBlock(),r.createBlock(u,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:o.isHourDisabled(e),onClick:t=>o.clickHour(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):r.createCommentVNode("v-if",!0),!1!==o.focusMinute?(r.openBlock(),r.createBlock(c,{key:1,class:"w-calendar-time-col w-calendar-time-minute",width:"*"},{default:r.withCtx(()=>[r.createElementVNode("div",zi,r.toDisplayString(o.loc.minute),1),r.createVNode(d,{class:"w-calendar-time-body",ref:"minute",current:o.focusMinute,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyListMinute,e=>(r.openBlock(),r.createBlock(u,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:o.isMinuteDisabled(e),onClick:t=>o.clickMinute(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):r.createCommentVNode("v-if",!0),!1!==o.focusSecond?(r.openBlock(),r.createBlock(c,{key:2,class:"w-calendar-time-col w-calendar-time-second",width:"*"},{default:r.withCtx(()=>[r.createElementVNode("div",Di,r.toDisplayString(o.loc.second),1),r.createVNode(d,{class:"w-calendar-time-body",ref:"second",current:o.focusSecond,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyListSecond,e=>(r.openBlock(),r.createBlock(u,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:o.isSecondDisabled(e),onClick:t=>o.clickSecond(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):r.createCommentVNode("v-if",!0)]),_:1})):r.createCommentVNode("v-if",!0),i.success?(r.openBlock(),r.createBlock(h,{key:2,class:r.normalizeClass(["w-calendar-foot",{"f-h-gap":t.dfish.br.compat.gap}]),align:"between",valign:"middle"},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"w-calendar-button-now f-link",onClick:e[9]||(e[9]=(...t)=>o.clickNow&&o.clickNow(...t))},r.toDisplayString(o.loc.calendar.now),1),r.createElementVNode("div",{class:"w-calendar-button-confirm f-link",onClick:e[10]||(e[10]=(...t)=>o.clickConfirm&&o.clickConfirm(...t))},r.toDisplayString(o.loc.confirm),1)]),_:1},8,["class"])):r.createCommentVNode("v-if",!0)]),_:3},16,["class"])},ki.__file="src/widgets/Calendar.vue";var Ei={name:"w-timeline",mixins:[Gt,Be],props:["face","vertical"],methods:{indent(){let t=this.$refs.wrap.querySelectorAll(":scope>.w-timeline-half>.w-timeline-item").length;if(t>0){let e=this.x.vertical,i=e?"width":"height",s=0,l=0;for(let r=0;r<t;r++){let o=this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r}"]`),a=r<t-1&&this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r+1}"]`),n=lt.bcr(o.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));if(o.parentNode==this.$refs.prev?s=Math.max(s,n[i]):l=Math.max(l,n[i]),a&&o.parentNode!=a.parentNode){let t=lt.bcr(a.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));e&&n.bottom+25>t.top?lt.q(a).css({marginTop:n.bottom+25-t.top}):!e&&n.right+50>t.left&<.q(a).css({marginLeft:n.right+50-t.left})}}let r=lt.q(">.w-timeline-item",this.$refs.prev);r.each((t,l)=>{let r=lt.q(">.w-timeline-item-icon",l),o=lt.bcr(r[0]);r.css({[e?"marginRight":"marginBottom"]:(s-o[i])/2})}),lt.q(">.w-timeline-item",this.$refs.next).each((t,s)=>{let r=lt.q(">.w-timeline-item-icon",s),o=lt.bcr(r[0]);r.css({[e?"marginLeft":"marginTop"]:(l-o[i])/2})}),r.length&<.q(this.$refs.next).css({[e?"marginLeft":"marginTop"]:`-${l/2+s/2}px`})}if(0==t)lt.q(this.$refs.line).css({width:0,height:0});else{const e=lt.bcr(this.$refs.wrap),i=[];let s=[],l=0,r="#ddd";for(let e=0;e<t;e++){let t=lt.q(`>.w-timeline-half>.w-timeline-item[w-index="${e}"]`,this.$refs.wrap),s=lt.bcr(t.find(">.w-timeline-item-icon>.w-timeline-item-icon-img")[0]),l={x:s.left+s.width/2,y:s.top+s.height/2,color:t.attr("w-line-color")};i.push(l)}i.sort((t,e)=>this.x.vertical?t.y<e.y?-1:0:t.x<e.x?-1:0);for(let e=0;e<t;e++){const t=i[e];if(e>0){const e=i[0];l=this.x.vertical?t.y-e.y:t.x-e.x,s.push(`${r} ${l}px`)}t.color&&(r=t.color),e>0&&s.push(`${r} ${l}px`)}this.x.vertical?lt.q(this.$refs.line).css({width:2,height:i[t-1].y-i[0].y,top:i[0].y-e.top,left:i[0].x-e.left-1}):lt.q(this.$refs.line).css({width:i[t-1].x-i[0].x,height:2,top:i[0].y-e.top-1,left:i[0].x-e.left,background:`linear-gradient(to right, ${s.join()})`})}},html_slots(){let t=[],e=[],i=this.x.vertical;return this.slots_children().forEach((s,l)=>{lt.lodash.set(s,"props.index",l),i?("right"==s.props.position?t:e).push(s):("bottom"==s.props.position?e:t).push(s)}),this.html_scroll_slots(r.h("div",{ref:"wrap",class:"w-timeline-wrap"},[r.h("div",{ref:"line",class:"w-timeline-line"}),r.h("div",{ref:"prev",class:["w-timeline-half w-timeline-prev",{[`f-${this.x.vertical?"v":"h"}-gap`]:lt.br.compat.gap}]},t),r.h("div",{ref:"next",class:["w-timeline-half w-timeline-next",{[`f-${this.x.vertical?"v":"h"}-gap`]:lt.br.compat.gap}]},e)]))}},computed:{html_class(){return[this.html_scroll_class,{["z-face-"+this.x.face]:this.x.face,"z-horizontal":!this.x.vertical,"z-vertical":this.x.vertical}]}},mounted(){this.indent();const t=lt.lodash.debounce(()=>{this.$refs.wrap&&this.$refs.next&&(lt.q(">.w-timeline-half>.w-timeline-item",this.$refs.wrap).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),lt.q(this.$refs.next).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),this.indent())});new MutationObserver(t).observe(this.$refs.wrap,{childList:!0,attributes:!0,subtree:!0})},__file:"src/widgets/Timeline.vue"},Ni={name:"w-timeline-item",pubParentName:"w-timeline",mixins:[Ut],inject:["providePubParent"],props:["position","index","align","lineColor"],watch:{lineColor(t){this.$nextTick(()=>this.providePubParent.indent())}},methods:{html_slots(){let t=r.h("div",{class:"w-timeline-item-main f-br"},r.h("div",{class:"w-timeline-item-main-text"},this.$slots));return[r.h("div",{ref:"icon",class:"w-timeline-item-icon"},this.$slots.icon?r.h("div",{class:"w-timeline-item-icon-img"},this.$slots.icon()):r.h("i",{class:"w-timeline-item-icon-img z-default"})),t]}},computed:{html_class(){return"z-position-"+(this.x.position||(this.pubParent.x.vertical?"left":"bottom"))+" z-align-"+(this.x.align||"left")},html_props(){return{"w-index":this.x.index,"w-line-color":this.x.lineColor}}},__file:"src/widgets/TimelineItem.vue"},Li={name:"w-slidepicker",mixins:[Ut],provide(){return{provideOptionParent:this}},props:["optionHeight","modelValue","minValue","maxValue","keepIndex","cover"],emits:["update:modelValue","change"],setup(t,e){const i=r.getCurrentInstance().ctx,s=r.ref(),l=r.ref();let o,a,n,h,c,u;const d=function(t){let e,i,s,r=lt.eventY(t),o=0,a=null;l.value.style.transition="",lt.moveup(t=>{let d=lt.eventY(t),p=t.timeStamp;e=c+d-r,i&&s&&p>s&&(a=o,o=(d-i)/(p-s)),i=d,s=p,e=lt.numRange(e,n-u,h+u),l.value.style.transform=`translateY(${e}px)`},(i,s)=>{if(!s)return m(t);if(null==e)return;let r=.15;Math.abs(o)<r||a&&Math.abs(a)<r?o=0:a&&Math.abs(a)>Math.abs(o)&&(o=a);let d=e+200*o,p=Math.abs(o/2),f=(h-d)%u;d+=f,f>u/2&&(d-=u),c=lt.numRange(d,n,h),c!=e&&((e<n||e>n||p<r)&&(p=r),Math.abs(c-e)<10&&(p=.05),l.value.style.transform=`translateY(${c}px)`,l.value.style.transition=`transform ${p}s ease-out`)},t)},p=function(t){c+=(t.deltaY<0?-1:1)*u,c=lt.numRange(c,n,h),l.value.style.transform=`translateY(${c}px)`,l.value.style.transition="transform .12s ease-out"},m=function(t){let e=lt(t);"w-option"==e.$options.name&&(x(e.$props.value),f(!0))},f=function(t){if(!s.value||!l.value)return;let e=i.slots_children();if(!e.length)return;let r=i.x.modelValue,d=i.x.minValue,p=i.x.maxValue;(d||0===d||p||0===p)&&(r=lt.numRange(r,d,p),r!=i.x.modelValue&&x(r));let m=lt.bcr(s.value),f=lt.bcr(l.value),g=-1,v=-1,w=!0;if(u=i.x.optionHeight,o=h=(m.height-u)/2,a=n=o-f.height+u,(d||0===d)&&(g=e.findIndex(t=>t.props.value==d)),(p||0===p)&&(v=e.findIndex(t=>t.props.value==p)),(g>-1||v>-1)&&e[0].props.value>e[e.length-1].props.value&&(w=!1),g>-1&&(w?h-=g*u:n+=g*u),v>-1&&(w?n+=(e.length-1-v)*u:h-=(e.length-1-v)*u),null!=r){let t=e.findIndex(t=>t.props.value==r);-1===t?x(null!=c&&c<a&&i.keepIndex?e[e.length-1].props.value:e[0].props.value):c=o-u*t}else c=o;c=lt.numRange(c,n,h),l.value.style.transition="",l.value.style.transform=`translateY(${c}px)`,t&&(l.value.style.transition="transform .15s ease-out")},x=function(t){i.x.modelValue=t},g=function(){let t=i.slots_children()[(o-c)/u];t&&x(t.props.value)},v=r.computed(()=>({style:{"--w-option-height":lt.unitSize(i.x.optionHeight)},...lt.br.mobile?{ontouchstart:d}:{onmousedown:d,onwheel:p}}));return r.onMounted(()=>{r.watch(()=>i.x.modelValue,t=>{e.emit("update:modelValue",t),e.emit("change",t)}),r.watch(()=>i.x.minValue,f),r.watch(()=>i.x.maxValue,f),new Wt(()=>{l.value&&(f(),g())}).observe(l.value),l.value.addEventListener("transitionend",g)}),{root:s,options:l,x_default:function(){return{optionHeight:32,cover:!0}},onmousedown:d,onwheel:p,html_props:v}}};const Fi={ref:"options",class:"w-slidepicker-options"},Ai={key:0,class:"w-slidepicker-bg-top"},Hi={key:1,class:"w-slidepicker-bg-bottom"};Li.render=function(t,e,i,s,l,o){return r.openBlock(),r.createElementBlock("div",r.mergeProps({ref:"root"},t.html_binds),[r.createElementVNode("div",Fi,[r.renderSlot(t.$slots,"default")],512),t.x.cover?(r.openBlock(),r.createElementBlock("div",Ai)):r.createCommentVNode("v-if",!0),t.x.cover?(r.openBlock(),r.createElementBlock("div",Hi)):r.createCommentVNode("v-if",!0)],16)},Li.__file="src/widgets/SlidePicker.vue";var Ii={name:"w-hidden",mixins:[ui],methods:{isModified:()=>!1,html(){return r.h("input",{type:"hidden",id:this.uid,class:"w-hidden",name:this.x.name,value:this.x.modelValue,ref:"v"})}},__file:"src/widgets/Hidden.vue"},Yi={name:"w-text",mixins:[ui],props:["minLength","maxLength","pattern","clearable","showCount","dropProps","suggest"],emits:["input","clear"],data:()=>({hasBorder:!0,showSuggest:!1,sug_timer:null,sug_completed:!1}),methods:{clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val(""),this.focus(),this.$emit("clear",t))},baseInput(t){let e=t.target.value;this.val(e,t),this.baseValid("change"),this.trigger(t,e)},oninput(t){if(this.x.suggest)if(clearTimeout(this.sug_timer),""===t.target.value)this.baseInput(t),this.doSuggest(!1);else if("input"!==t.type)t.runType="input",this.baseInput(t),this.doSuggest(!0);else{let e=t.target.value;this.val(e,t),this.sug_timer=setTimeout(()=>{this.trigger(t,e),this.baseValid("change"),this.doSuggest(!0)},500)}else this.baseInput(t)},onfocus(t){this.isFocus=!0,this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t),this.sug_completed&&(this.sug_completed=!1),this.trigger("focus")},onclick(t){this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t)},doSuggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},onCloseDrop(){this.showSuggest=!1},complete(t){return this.val(t),this.sug_completed=!0,this.$nextTick(this.focus),this},closeDrop(){return this.doSuggest(!1),this},html_button(){let t=[];if(this.isNormal&&this.x.clearable&&t.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:lt.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(r.h(ae,e,this.$slots.suggest))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&<.strLen(t)<e)return this.formErr(i,[e])},maxLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t&<.strLen(t)>e)return this.formErr(i,[lt.strExceed(t,e)])}}},input_prop(){let t={oninput:this.oninput,onfocus:this.onfocus,onclick:this.onclick};return this.x.maxLength&&(t.maxlength=this.x.maxLength),t},html_class(){return{"z-val":this.hasVal,"z-clearable":this.x.clearable}}},__file:"src/widgets/Text.vue"},Oi={name:"w-textarea",mixins:[Yi],methods:{html_slot_down(){const t=this.slot("down");if(this.x.showCount||t&&t.length){let e="";if(this.x.showCount&&this.x.maxLength){let t=this.x.modelValue||"",i=lt.strLen(t);if(i>this.x.maxLength){i=`<em class=w-textarea-show-count-exceed>超出${lt.strExceed(t,this.x.maxLength)}个字</em>`}e=`${i} / ${this.x.maxLength}`}return r.h("div",{class:"w-textarea-down"},[r.h("div",{class:"w-textarea-down-left"},t),r.h("div",{class:"w-textarea-down-right w-textarea-show-count",innerHTML:e})])}return t}},computed:{input_tag:()=>"textarea",hasClassSlotDown(){return this.x.showCount&&this.x.maxLength||!!this.$slots.down}},__file:"src/widgets/Textarea.vue"},ji={name:"w-checkboxgroup",mixins:[ui],props:["modelValue","required","vertical","gap","minSize","maxSize","br"],provide(){return{providePubParent:this}},data:()=>({watchValue:null}),methods:{x_default:()=>({br:!0,gap:15}),watchModelValue(t,e){},html_form_slot(){return this.x.vertical?r.h("div",{class:"w-boxgroup-grid"},this.$slots):this.$slots}},computed:{html_class(){return{"z-br":this.x.br}},html_style(){return this.x.gap&&{"--w-boxgroup-gap":lt.unitSize(this.x.gap)}}},__file:"src/widgets/CheckBoxGroup.vue"},qi={name:"w-radiogroup",mixins:[ji],__file:"src/widgets/RadioGroup.vue"},Ri={name:"w-radio",pubParentName:"w-radiogroup",mixins:[mi],props:["cancelable"],methods:{},computed:{input_type:()=>"radio",input_icon:()=>"f-i",input_name(){return this.w_name&&this.w_name+"@"+this.ownerView.uid},w_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_prop(){return{"w-name":this.w_name}}},mounted(){},__file:"src/widgets/Radio.vue"},Wi={name:"w-switch",pubParentName:"w-checkboxgroup",mixins:[ui],props:["checkedText","uncheckedText","checkedValue","uncheckedValue"],inject:["providePubParent"],methods:{x_default:()=>({checkedValue:1,uncheckedValue:0}),onclick(t){let e=!this.isChecked?this.x.checkedValue:this.x.uncheckedValue;this.val(e)},formText(){return this.isChecked?this.x.checkedText:this.x.uncheckedText},html_input(){return[this.html_input_hidden(),r.h("div",{class:"w-switch-box",onclick:this.isNormal&&this.onclick},[r.h("i",{class:"w-switch-icon"}),r.h("span",{class:"w-switch-text"},this.isChecked?this.x.checkedText:this.x.uncheckedText)])]}},computed:{input_value(){return this.isChecked?this.x.checkedValue:this.x.uncheckedValue},html_class(){return this.isChecked?"z-checked":"z-unchecked"},isChecked(){return this.x.modelValue==this.x.checkedValue}},__file:"src/widgets/Switch.vue"};const Ui={".323":"text/h323",".3gp":"video/3gpp",".aab":"application/x-authoware-bin",".aam":"application/x-authoware-map",".aas":"application/x-authoware-seg",".acx":"application/internet-property-stream",".ai":"application/postscript",".aif":"audio/x-aiff",".aifc":"audio/x-aiff",".aiff":"audio/x-aiff",".als":"audio/X-Alpha5",".amc":"application/x-mpeg",".apk":"application/vnd.android.package-archive",".asc":"text/plain",".asd":"application/astound",".asf":"video/x-ms-asf",".asn":"application/astound",".asp":"application/x-asap",".asr":"video/x-ms-asf",".asx":"video/x-ms-asf",".au":"audio/basic",".avi":"video/x-msvideo",".awb":"audio/amr-wb",".axs":"application/olescript",".bas":"text/plain",".bcpio":"application/x-bcpio",".bld":"application/bld",".bld2":"application/bld2",".bmp":"image/bmp",".bz2":"application/x-bzip2",".c":"text/plain",".cal":"image/x-cals",".cat":"application/vnd.ms-pkiseccat",".ccn":"application/x-cnc",".cco":"application/x-cocoa",".cdf":"application/x-cdf",".cer":"application/x-x509-ca-cert",".cgi":"magnus-internal/cgi",".chat":"application/x-chat",".clp":"application/x-msclip",".cmx":"image/x-cmx",".co":"application/x-cult3d-object",".cod":"image/cis-cod",".conf":"text/plain",".cpio":"application/x-cpio",".cpp":"text/plain",".cpt":"application/mac-compactpro",".crd":"application/x-mscardfile",".crl":"application/pkix-crl",".crt":"application/x-x509-ca-cert",".csh":"application/x-csh",".csm":"chemical/x-csml",".csml":"chemical/x-csml",".css":"text/css",".dcm":"x-lml/x-evm",".dcr":"application/x-director",".dcx":"image/x-dcx",".der":"application/x-x509-ca-cert",".dhtml":"text/html",".dir":"application/x-director",".dll":"application/x-msdownload",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".dot":"application/msword",".dvi":"application/x-dvi",".dwf":"drawing/x-dwf",".dwg":"application/x-autocad",".dxf":"application/x-autocad",".dxr":"application/x-director",".ebk":"application/x-expandedbook",".emb":"chemical/x-embl-dl-nucleotide",".embl":"chemical/x-embl-dl-nucleotide",".eps":"application/postscript",".epub":"application/epub+zip",".eri":"image/x-eri",".es":"audio/echospeech",".esl":"audio/echospeech",".etc":"application/x-earthtime",".etx":"text/x-setext",".evm":"x-lml/x-evm",".evy":"application/envoy",".fh4":"image/x-freehand",".fh5":"image/x-freehand",".fhc":"image/x-freehand",".fif":"application/fractals",".flr":"x-world/x-vrml",".flv":"flv-application/octet-stream",".fm":"application/x-maker",".fpx":"image/x-fpx",".fvi":"video/isivideo",".gau":"chemical/x-gaussian-input",".gca":"application/x-gca-compressed",".gdb":"x-lml/x-gdb",".gif":"image/gif",".gps":"application/x-gps",".gtar":"application/x-gtar",".gz":"application/x-gzip",".h":"text/plain",".hdf":"application/x-hdf",".hdm":"text/x-hdml",".hdml":"text/x-hdml",".hlp":"application/winhlp",".hqx":"application/mac-binhex40",".hta":"application/hta",".htc":"text/x-component",".htm":"text/html",".html":"text/html",".hts":"text/html",".htt":"text/webviewhtml",".ice":"x-conference/x-cooltalk",".ico":"image/x-icon",".ief":"image/ief",".ifm":"image/gif",".ifs":"image/ifs",".iii":"application/x-iphone",".imy":"audio/melody",".ins":"application/x-internet-signup",".ips":"application/x-ipscript",".ipx":"application/x-ipix",".isp":"application/x-internet-signup",".it":"audio/x-mod",".itz":"audio/x-mod",".ivr":"i-world/i-vrml",".j2k":"image/j2k",".jad":"text/vnd.sun.j2me.app-descriptor",".jam":"application/x-jam",".jar":"application/java-archive",".java":"text/plain",".jfif":"image/pipeg",".jnlp":"application/x-java-jnlp-file",".jpe":"image/jpeg",".jpeg":"image/jpeg",".jpg":"image/jpeg",".jpz":"image/jpeg",".js":"application/x-javascript",".jwc":"application/jwc",".kjx":"application/x-kjx",".lak":"x-lml/x-lak",".latex":"application/x-latex",".lcc":"application/fastman",".lcl":"application/x-digitalloca",".lcr":"application/x-digitalloca",".lgh":"application/lgh",".lml":"x-lml/x-lml",".lmlpack":"x-lml/x-lmlpack",".log":"text/plain",".lsf":"video/x-la-asf",".lsx":"video/x-la-asf",".m13":"application/x-msmediaview",".m14":"application/x-msmediaview",".m15":"audio/x-mod",".m3u":"audio/x-mpegurl",".m3url":"audio/x-mpegurl",".m4a":"audio/mp4a-latm",".m4b":"audio/mp4a-latm",".m4p":"audio/mp4a-latm",".m4u":"video/vnd.mpegurl",".m4v":"video/x-m4v",".ma1":"audio/ma1",".ma2":"audio/ma2",".ma3":"audio/ma3",".ma5":"audio/ma5",".man":"application/x-troff-man",".map":"magnus-internal/imagemap",".mbd":"application/mbedlet",".mct":"application/x-mascot",".mdb":"application/x-msaccess",".mdz":"audio/x-mod",".me":"application/x-troff-me",".mel":"text/x-vmel",".mht":"message/rfc822",".mhtml":"message/rfc822",".mi":"application/x-mif",".mid":"audio/mid",".midi":"audio/midi",".mif":"application/x-mif",".mil":"image/x-cals",".mio":"audio/x-mio",".mmf":"application/x-skt-lbs",".mng":"video/x-mng",".mny":"application/x-msmoney",".moc":"application/x-mocha",".mocha":"application/x-mocha",".mod":"audio/x-mod",".mof":"application/x-yumekara",".mol":"chemical/x-mdl-molfile",".mop":"chemical/x-mopac-input",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"video/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mpa":"video/mpeg",".mpc":"application/vnd.mpohun.certificate",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".mpn":"application/vnd.mophun.application",".mpp":"application/vnd.ms-project",".mps":"application/x-mapserver",".mpv2":"video/mpeg",".mrl":"text/x-mrml",".mrm":"application/x-mrm",".ms":"application/x-troff-ms",".msg":"application/vnd.ms-outlook",".mts":"application/metastream",".mtx":"application/metastream",".mtz":"application/metastream",".mvb":"application/x-msmediaview",".mzv":"application/metastream",".nar":"application/zip",".nbmp":"image/nbmp",".nc":"application/x-netcdf",".ndb":"x-lml/x-ndb",".ndwn":"application/ndwn",".nif":"application/x-nif",".nmz":"application/x-scream",".nokia-op-logo":"image/vnd.nok-oplogo-color",".npx":"application/x-netfpx",".nsnd":"audio/nsnd",".nva":"application/x-neva1",".nws":"message/rfc822",".oda":"application/oda",".ogg":"audio/ogg",".oom":"application/x-AtlasMate-Plugin",".p10":"application/pkcs10",".p12":"application/x-pkcs12",".p7b":"application/x-pkcs7-certificates",".p7c":"application/x-pkcs7-mime",".p7m":"application/x-pkcs7-mime",".p7r":"application/x-pkcs7-certreqresp",".p7s":"application/x-pkcs7-signature",".pac":"audio/x-pac",".pae":"audio/x-epac",".pan":"application/x-pan",".pbm":"image/x-portable-bitmap",".pcx":"image/x-pcx",".pda":"image/x-pda",".pdb":"chemical/x-pdb",".pdf":"application/pdf",".pfr":"application/font-tdpfr",".pfx":"application/x-pkcs12",".pgm":"image/x-portable-graymap",".pict":"image/x-pict",".pko":"application/ynd.ms-pkipko",".pm":"application/x-perl",".pma":"application/x-perfmon",".pmc":"application/x-perfmon",".pmd":"application/x-pmd",".pml":"application/x-perfmon",".pmr":"application/x-perfmon",".pmw":"application/x-perfmon",".png":"image/png",".pnm":"image/x-portable-anymap",".pnz":"image/png",".pot":"application/vnd.ms-powerpoint",".ppm":"image/x-portable-pixmap",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".pqf":"application/x-cprplayer",".pqi":"application/cprplayer",".prc":"application/x-prc",".prf":"application/pics-rules",".prop":"text/plain",".proxy":"application/x-ns-proxy-autoconfig",".ps":"application/postscript",".ptlk":"application/listenup",".pub":"application/x-mspublisher",".pvx":"video/x-pv-pvx",".qcp":"audio/vnd.qcelp",".qt":"video/quicktime",".qti":"image/x-quicktime",".qtif":"image/x-quicktime",".r3t":"text/vnd.rn-realtext3d",".ra":"audio/x-pn-realaudio",".ram":"audio/x-pn-realaudio",".ras":"image/x-cmu-raster",".rc":"text/plain",".rdf":"application/rdf+xml",".rf":"image/vnd.rn-realflash",".rgb":"image/x-rgb",".rlf":"application/x-richlink",".rm":"audio/x-pn-realaudio",".rmf":"audio/x-rmf",".rmi":"audio/mid",".rmm":"audio/x-pn-realaudio",".rmvb":"audio/x-pn-realaudio",".rnx":"application/vnd.rn-realplayer",".roff":"application/x-troff",".rp":"image/vnd.rn-realpix",".rpm":"audio/x-pn-realaudio-plugin",".rt":"text/vnd.rn-realtext",".rte":"x-lml/x-gps",".rtf":"application/rtf",".rtg":"application/metastream",".rtx":"text/richtext",".rv":"video/vnd.rn-realvideo",".rwc":"application/x-rogerwilco",".s3m":"audio/x-mod",".s3z":"audio/x-mod",".sca":"application/x-supercard",".scd":"application/x-msschedule",".sct":"text/scriptlet",".sdf":"application/e-score",".sea":"application/x-stuffit",".setpay":"application/set-payment-initiation",".setreg":"application/set-registration-initiation",".sgm":"text/x-sgml",".sgml":"text/x-sgml",".sh":"application/x-sh",".shar":"application/x-shar",".shtml":"magnus-internal/parsed-html",".shw":"application/presentations",".si6":"image/si6",".si7":"image/vnd.stiwap.sis",".si9":"image/vnd.lgtwap.sis",".sis":"application/vnd.symbian.install",".sit":"application/x-stuffit",".skd":"application/x-Koan",".skm":"application/x-Koan",".skp":"application/x-Koan",".skt":"application/x-Koan",".slc":"application/x-salsa",".smd":"audio/x-smd",".smi":"application/smil",".smil":"application/smil",".smp":"application/studiom",".smz":"audio/x-smd",".snd":"audio/basic",".spc":"application/x-pkcs7-certificates",".spl":"application/futuresplash",".spr":"application/x-sprite",".sprite":"application/x-sprite",".sdp":"application/sdp",".spt":"application/x-spt",".src":"application/x-wais-source",".sst":"application/vnd.ms-pkicertstore",".stk":"application/hyperstudio",".stl":"application/vnd.ms-pkistl",".stm":"text/html",".svg":"image/svg+xml",".sv4cpio":"application/x-sv4cpio",".sv4crc":"application/x-sv4crc",".svf":"image/vnd",".svh":"image/svh",".svr":"x-world/x-svr",".swf":"application/x-shockwave-flash",".swfl":"application/x-shockwave-flash",".t":"application/x-troff",".talk":"text/x-speech",".tar":"application/x-tar",".taz":"application/x-tar",".tbp":"application/x-timbuktu",".tbt":"application/x-timbuktu",".tcl":"application/x-tcl",".tex":"application/x-tex",".texi":"application/x-texinfo",".texinfo":"application/x-texinfo",".tgz":"application/x-compressed",".thm":"application/vnd.eri.thm",".tif":"image/tiff",".tiff":"image/tiff",".tki":"application/x-tkined",".tkined":"application/x-tkined",".toc":"application/toc",".toy":"image/toy",".tr":"application/x-troff",".trk":"x-lml/x-gps",".trm":"application/x-msterminal",".tsi":"audio/tsplayer",".tsp":"application/dsptype",".tsv":"text/tab-separated-values",".ttz":"application/t-time",".txt":"text/plain",".uls":"text/iuls",".ult":"audio/x-mod",".ustar":"application/x-ustar",".uu":"application/x-uuencode",".uue":"application/x-uuencode",".vcd":"application/x-cdlink",".vcf":"text/x-vcard",".vdo":"video/vdo",".vib":"audio/vib",".viv":"video/vivo",".vivo":"video/vivo",".vmd":"application/vocaltec-media-desc",".vmf":"application/vocaltec-media-file",".vmi":"application/x-dreamcast-vms-info",".vms":"application/x-dreamcast-vms",".vox":"audio/voxware",".vqe":"audio/x-twinvq-plugin",".vqf":"audio/x-twinvq",".vql":"audio/x-twinvq",".vre":"x-world/x-vream",".vrml":"x-world/x-vrml",".vrt":"x-world/x-vrt",".vrw":"x-world/x-vream",".vts":"workbook/formulaone",".wav":"audio/x-wav",".wax":"audio/x-ms-wax",".wbmp":"image/vnd.wap.wbmp",".wcm":"application/vnd.ms-works",".wdb":"application/vnd.ms-works",".web":"application/vnd.xara",".webm":"video/webm",".wi":"image/wavelet",".wis":"application/x-InstallShield",".wks":"application/vnd.ms-works",".wm":"video/x-ms-wm",".wma":"audio/x-ms-wma",".wmd":"application/x-ms-wmd",".wmf":"application/x-msmetafile",".wml":"text/vnd.wap.wml",".wmlc":"application/vnd.wap.wmlc",".wmls":"text/vnd.wap.wmlscript",".wmlsc":"application/vnd.wap.wmlscriptc",".wmlscript":"text/vnd.wap.wmlscript",".wmv":"audio/x-ms-wmv",".wmx":"video/x-ms-wmx",".wmz":"application/x-ms-wmz",".wpng":"image/x-up-wpng",".wpt":"x-lml/x-gps",".wri":"application/x-mswrite",".wrl":"x-world/x-vrml",".wrz":"x-world/x-vrml",".ws":"text/vnd.wap.wmlscript",".wsc":"application/vnd.wap.wmlscriptc",".wv":"video/wavelet",".wvx":"video/x-ms-wvx",".wxl":"application/x-wxl",".x-gzip":"application/x-gzip",".xaf":"x-world/x-vrml",".xar":"application/vnd.xara",".xbm":"image/x-xbitmap",".xdm":"application/x-xdma",".xdma":"application/x-xdma",".xdw":"application/vnd.fujixerox.docuworks",".xht":"application/xhtml+xml",".xhtm":"application/xhtml+xml",".xhtml":"application/xhtml+xml",".xla":"application/vnd.ms-excel",".xlc":"application/vnd.ms-excel",".xll":"application/x-excel",".xlm":"application/vnd.ms-excel",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xlt":"application/vnd.ms-excel",".xlw":"application/vnd.ms-excel",".xm":"audio/x-mod",".xml":"application/xml",".xmz":"audio/x-mod",".xof":"x-world/x-vrml",".xpi":"application/x-xpinstall",".xpm":"image/x-xpixmap",".xsit":"text/xml",".xsl":"text/xml",".xul":"text/xul",".xwd":"image/x-xwindowdump",".xyz":"chemical/x-pdb",".yz1":"application/x-yz1",".z":"application/x-compress",".zac":"application/x-zaurus-zac",".json":"application/json",".vsd":"application/vnd.visio",".et":"application/kset",".wps":"application/kswps",".dps":"application/ksdps"};const Xi={0:"js.css.pdf.psd.ai.txt.eps.txt",xls:"xls.xlsx",doc:"doc.docx.rtf",ppt:"ppt.pptx",htm:"htm.html",zip:"rar.zip.tar.jar.z.7z.ace.lzh.arj.gzip.bz2.cab.uue",fla:"fla.swf",fon:"eot.otf.fon.font.ttf.ttc.woff.woff2",iso:"iso.nrg.mds.mdf.bin.cue.img.fcd.lcd.dmg",vid:"avi.asf.wmv.avs.flv.mkv.mov.3gp.mp4.webm.mpa.mpe.mpg.mpeg.dat.dsm.ogm.vob.rm.rmvb.ts.tp.ifo.nsv.m4u.m4v.asx.asr.movie.fvi.pvx.rv.vdo.viv.vivo.wm.wmx.wv.wvx.mpv2.mpg4",aud:"aif.aifc.aiff.als.awb.mp3.aac.au.wav.wma.cda.flac.m4a.mid.mka.mp2.mpc.ape.ofr.ogg.ra.wv.tta.ac3.dts.wv.shn.vqf.spc.nsf.adx.psf.minipsf.psf2.minipsf2.rsn.zst",img:"jpg.jpeg.gif.png.bmp.tif.tiff.ico"},Qi={};for(let t in Xi)Xi[t].split(".").forEach(e=>{Qi[e]="0"==t?e:t});const Gi={video:Xi.vid,audio:Xi.aud,image:Xi.img};for(let t in Gi)Gi[t]=Gi[t].split(".").map(t=>`*.${t};`).join("");const Ji=function(t){let e=lt.strFrom(t||"",".",!0).toLowerCase();return Qi[e]||"file"},Ki=function(t){let e;return null==t||isNaN(t)||(t+="K"),(t=lt.number(t.replace(/[a-z]+$/i,function(t){return e=t.charAt(0).toUpperCase(),""})))*("K"===e?1024:"M"===e?1048576:"G"===e?1073741824:"T"===e?1099511627776:1)};var Zi={name:"w-fileupload",mixins:[ui],props:["uploadSrc","thumbnailSrc","downloadSrc","uploadLimit","sizeLimit","maxFileSize","minFileSize","fileTypes","filter","success","error","itemWidth","align","vertical","gap","checkFile"],data:()=>({list:[],emiting:!1}),created(){this.$watch(()=>this.x.modelValue,t=>{if(this.emiting)return this.emiting=!1;t&&"string"==typeof t&&(t=JSON.parse(t)),this.list=Array.isArray(t)?t.map(t=>({value:t})):t?[{value:t}]:[]},{immediate:!0})},methods:{x_default:()=>({gap:10,vertical:!0}),val(t){if(0==arguments.length){let t=[];return this.list.forEach(e=>e.value&&t.push(e.value)),t}this.x.modelValue=t,this.$emit("update:modelValue",t),this.trigger("change",t)},getInputValue:t=>0==t.length?"":JSON.stringify(t),getFileTypes(){let t=this.x.fileTypes;return Gi[t]&&(t=Gi[t]),t&&"*.*"!==t?t.replace(/\*/g,"").replace(/;/g,",").toLowerCase():""},getAccept(){let t=[],e=this.getFileTypes();if(!e)return;let i=[];return e.toLowerCase().split(",").forEach(t=>{t&&i.push(t)}),i.forEach(e=>{e&&t.push(function(t){let e=f(t,".",!0)||t;return Ui["."+e]}(e)||e)}),t.join(",")},isImage:t=>"img"==Ji(t.value?t.value.name:t.file.name),isVideo:t=>"vid"==Ji(t.value?t.value.name:t.file.name),isAudio:t=>"aud"==Ji(t.value?t.value.name:t.file.name),fileSelected(t){if(this.x.uploadLimit>1&&t.target.files.length+this.list.length>this.x.uploadLimit)return t.target.value="",lt.alert(lt.loc.ps(lt.loc.form.upload_limit,this.x.uploadLimit));let e,i,s,l,r=this.x.maxFileSize&&Ki(this.x.maxFileSize),o=this.x.minFileSize&&Ki(this.x.minFileSize),a=this.getFileTypes(),n=this.x.checkFile,h=n&&this.list.filter(t=>t.file).map(t=>t.file),c=n&&this.list.filter(t=>t.value).map(t=>t.value);lt.lodash.each(t.target.files,u=>{let d="."+lt.strFrom(u.name,".",!0).toLowerCase();if(r&&u.size>r)(e||(e=[])).push(u.name);else if(o&&u.size<o)(i||(i=[])).push(u.name);else if(a&&!lt.idsAny(a,d,","))(s||(s=[])).push(u.name);else{let e=n&&n(u,t.target.files,h,c);e?(l||(l=[])).push(e):this.list.push({file:u})}}),e?lt.alert(lt.loc.ps(lt.loc.form.upload_maxfilesize,e.join("<br>"),this.x.maxFileSize)):i?lt.alert(lt.loc.ps(lt.loc.form.upload_minfilesize,i.join("<br>"),this.x.minFileSize)):s?lt.alert(lt.loc.ps(lt.loc.form.upload_invalid_file_type,s.join("<br>"),a)):l&<.alert(l.join("<br>")),t.target.value="",this.nextUpload()},upload(t){if(this.x.uploadSrc&&!t.loading){let e=lt.urlFormat(this.x.uploadSrc,this.x.data,this.x),i=new FormData;i.append("Filedata",t.file),t.loading=!0,t.source=lt.http.CancelToken.source(),lt.http.post(e,i,{onUploadProgress:e=>t.progress=Math.floor(e.loaded/e.total*100),cancelToken:t.source.token}).then(e=>{t.loading=!1,t.loaded=!0,t.source=null;let i=this.x.filter?this.x.filter(e,this):e.data;i?i.error?t.error=i.error:i.id?(t.value=i,this.x.success&&this.x.success(t.value,this,e)):t.error={message:lt.loc.ps(lt.loc.form.upload_invalid_data,JSON.stringify(i))}:t.error={message:lt.loc.form.upload_no_data},t.error&&t.error.message&<.alert(t.error.message),this.nextUpload()}).catch(e=>{t.error=e,t.loading=!1,t.loaded=!0,t.source=null,this.nextUpload(),e.response&&e.response.status&<.alert(e.response.status+": "+e)})}else if(!this.x.uploadSrc){let e="请给上传组件配置uploadSrc";t.error={message:e},console.error(e),this.nextUpload()}},nextUpload(){for(let t of this.list){if(t.loading)return;if(!t.error&&(t.file&&!t.loaded))return this.upload(t)}this.emiting=!0;let t=this.val();this.$emit("update:modelValue",t),this.trigger("change",t)},clickItem(t,e){e.value&&(this.getOn("click:item")?(t.runType="click:item",this.trigger(t,e.value,this.val())):this.x.downloadSrc&<.download(lt.urlServer(this.x.downloadSrc,e.value,this.x.data)))},remove(t){t.source&&t.source.cancel();let e=this.list.findIndex(e=>e==t);this.list.splice(e,1),this.nextUpload()},formText(){return this.val().map(t=>t.name).join(", ")},chooseFile(){this.$refs.file.click()},html_list(){return this.list.map(t=>{let e=t.value,i=e?e.name:t.file.name,s=[r.h("div",{class:"w-fileupload-value-close f-i f-i-trash",title:lt.loc.remove,onclick:e=>this.remove(t)})];e&&this.$slots.menu&&s.push(r.h(Ve,null,{target:()=>r.h("div",{class:"w-fileupload-value-menu f-i f-i-ellipsis",title:lt.loc.more}),default:()=>this.$slots.menu({item:e})}));let l=e?e.id:t.key;return l||(t.key=l=lt.uid()),r.h("div",{key:l,class:["w-fileupload-value",{"z-loading":!t.error&&(t.loading||t.file&&!t.loaded),"z-err":t.error}],style:{"--w-upload-progress":t.file?`${t.progress||0}%`:"",width:lt.unitSize(this.x.itemWidth)},title:t.error?t.error.message:i},[r.h("i",{class:["w-fileupload-value-icon f-i","f-i-file-"+Ji(i)],onclick:e=>this.clickItem(e,t)}),t.error&&r.h("div",{class:"w-fileupload-value-error"},lt.loc.form.upload_error),r.h("div",{class:"w-fileupload-value-text f-line-1",onclick:e=>this.clickItem(e,t)},i),s])})},html_input_form(){return[this.html_input_hidden(),r.h("input",{type:"file",ref:"file",multiple:1!=this.x.uploadLimit,accept:this.getAccept(),onchange:this.fileSelected,class:"f-hide"})]},html_input_button(){return r.h("div",{},[r.h(Qe,{ref:"uploadbbr",class:"w-fileupload-bbr",gap:10},{default:()=>[this.$slots.button?this.$slots.button(this):r.h(ye,{text:"选择文件",icon:".f-i .f-i-upload",class:"w-fileupload-button",onclick:this.chooseFile,disabled:!this.canUpload}),this.slot("right")]}),this.slot("down")])},html_input_list(){return this.list.length?r.h("div",{ref:"list",class:["w-fileupload-list",{"f-clearfix":this.x.vertical}]},this.html_list()):null},html_input(){return this.html_input_form().concat(this.html_input_button(),this.html_input_list())},html_main(){return r.h("div",{class:"w-formbase-main"},this.html_form())},html_slots(){return[this.html_label(),this.html_main()]}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{for(let t of this.list){if(t.loading)return this.formErr({type:"upload_loading"});if(t.error)return this.formErr({type:"upload_invalid_file"})}}}},input_value(){return this.getInputValue(this.val())},errorTipTarget(){return this.$refs.uploadbbr||this},canUpload(){return!!this.isNormal&&!(this.x.uploadLimit>0&&this.list.length>=this.x.uploadLimit)},dir:()=>"v",html_class(){return{"z-vertical":this.x.vertical,"z-horizontal":!this.x.vertical,"z-compat":lt.br.compat.gap}},html_style:()=>({"--w-label-min-height":"32px"}),html_on(){return{onclick:()=>this.warn(!1)}}},__file:"src/widgets/FileUpload.vue"},ts={props:["item"],inject:["provideUpload"],data:()=>({dataURL:null}),methods:{click(t){this.provideUpload.clickItem(t,this.item,this.provideUpload)},createImageThumbnail(){let t=new FileReader;t.onload=t=>{this.item.loaded||(this.dataURL=t.target.result)},t.readAsDataURL(this.item.file)},createVideoThumbnail(){let t=document.createElement("video");t.addEventListener("loadeddata",()=>{setTimeout(()=>{if(this.item.loaded)return;let e=document.createElement("canvas"),i=e.getContext("2d");e.width=t.videoWidth,e.height=t.videoHeight,i.drawImage(t,0,0),this.dataURL=e.toDataURL("image/png"),t.pause(),lt.q(t).remove()},150)}),t.src=URL.createObjectURL(this.item.file),t.muted=!0,t.play()},setProgress(t){let e=this.$refs.loading;if(!this.item.loading||!e)return;let i=e.getContext("2d");e.width=e.width,i.beginPath(),i.translate(17,17),i.moveTo(0,0),i.arc(0,0,15,.5*-Math.PI,Math.PI*(2*t/100-.5)),i.closePath(),i.fillStyle="rgba(255,255,255,.7)",i.fill(),i.beginPath(),i.arc(0,0,16,0,2*Math.PI),i.strokeStyle="#fff",i.stroke()},remove(t){this.upload.remove(this.item),t.stopPropagation()}},computed:{upload(){return this.provideUpload},img(){return this.$refs.thumbnail.$refs.img},src(){return this.item.value?lt.urlServer(this.item.value.thumbnail||this.upload.x.thumbnailSrc,this.item.value,this.upload.x.data):""},name(){return this.item.value?this.item.value.name:this.item.file.name},tip(){return this.item.error?this.item.error.message:this.name},titleRemove:()=>lt.loc.remove,titleMore:()=>lt.loc.more,canPlay(){return this.item.value&&(this.upload.isVideo(this.item)||this.upload.isAudio(this.item))},menus(){return this.upload.$slots.menu({item:this.item.value})}},mounted(){!this.item.loaded&&this.item.file&&(this.upload.isVideo(this.item)?this.createVideoThumbnail():this.upload.isImage(this.item)&&this.createImageThumbnail(),this.$watch(()=>this.item.progress,t=>this.setProgress(t),{immediate:!0}))}};const es={class:"f-line-1"},is={key:0,ref:"loading",width:"34",height:"34",class:"w-mediaupload-progress-loading f-abs-center"},ss={key:1,class:"w-mediaupload-cover-play f-abs-center f-flex-center f-i f-i-play"},ls={class:"w-mediaupload-value-oper"},rs=["title"],os=["title"];ts.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-menu"),n=r.resolveComponent("w-img");return r.openBlock(),r.createBlock(n,{class:r.normalizeClass(["w-mediaupload-value",{"z-loading":i.item.loading,"z-canplay":o.canPlay,"z-err":i.item.error}]),ref:"thumbnail",src:o.src,"data-url":l.dataURL,width:o.upload.x.thumbnailWidth,"img-width":o.upload.x.thumbnailWidth-2,"img-height":o.upload.x.thumbnailHeight-2,tip:o.tip,onClick:o.click},r.createSlots({cover:r.withCtx(()=>[i.item.loading?(r.openBlock(),r.createElementBlock("canvas",is,null,512)):o.canPlay?(r.openBlock(),r.createElementBlock("i",ss)):r.createCommentVNode("v-if",!0),r.createElementVNode("div",ls,[o.upload.isNormal?(r.openBlock(),r.createElementBlock("i",{key:0,class:"w-mediaupload-value-close f-flex-center f-i f-i-trash",title:o.titleRemove,onClick:e[0]||(e[0]=(...t)=>o.remove&&o.remove(...t))},null,8,rs)):r.createCommentVNode("v-if",!0),i.item.value&&o.upload.$slots.menu?(r.openBlock(),r.createBlock(a,{key:1},{target:r.withCtx(()=>[r.createElementVNode("i",{class:"w-mediaupload-value-menu f-flex-center f-i f-i-ellipsis",title:o.titleMore},null,8,os)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.menus,t=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(t)))),256))]),_:1})):r.createCommentVNode("v-if",!0)])]),_:2},[o.upload.x.showFileName?{name:"default",fn:r.withCtx(()=>[r.createElementVNode("div",es,r.toDisplayString(o.name),1)]),key:"0"}:void 0]),1032,["class","src","data-url","width","img-width","img-height","tip","onClick"])},ts.__file="src/widgets/MediaUploadItem.vue";var as={name:"w-mediaupload",mixins:[Zi],props:["thumbnailWidth","thumbnailHeight","showFileName"],provide(){return{provideUpload:this}},methods:{x_default:()=>({fileTypes:"video",thumbnailWidth:80,thumbnailHeight:80,gap:10}),html_list(){return this.list.map((t,e)=>{let i=t.value?t.value.id:t.key;return i||(t.key=i=lt.uid()),r.h(ts,{item:t,index:e,key:i})})},html_input_button(){return r.h("div",{},[r.h(Qe,{ref:"uploadbbr",class:"w-fileupload-bbr"},{default:()=>[this.$slots.button?this.$slots.button(this):r.h(ye,{ref:"uploadbutton",title:lt.loc.form.choose_image,icon:".f-i .f-i-plus",class:"w-mediaupload-button",style:{width:lt.unitSize(this.x.thumbnailWidth),height:lt.unitSize(this.x.thumbnailHeight)},onclick:this.chooseFile}),this.slot("right")]}),this.slot("down")])},html_input(){return this.html_input_form().concat(r.h(Kt,{width:"*",class:"w-mediaupload-list",align:this.x.align,gap:this.x.gap},{default:()=>[this.html_list(),this.canUpload&&this.html_input_button()]}))}},computed:{html_style(){return{"--w-thumbnail-width":lt.unitSize(this.x.thumbnailWidth),"--w-label-min-height":lt.unitSize(this.x.thumbnailHeight),"--w-gap":lt.unitSize(this.x.gap)}}},__file:"src/widgets/MediaUpload.vue"},ns={name:"w-imageupload",mixins:[as],methods:{x_default:()=>({fileTypes:"image",thumbnailWidth:80,thumbnailHeight:80,gap:10})},computed:{html_class:()=>"w-mediaupload"},__file:"src/widgets/ImageUpload.vue"},hs={name:"w-option",mixins:[Ut],props:["value","text","disabled"],inject:["provideOptionParent"],methods:{click(t){this.provideOptionParent.clickOption&&this.provideOptionParent.clickOption(this,t)}},computed:{isFocus(){let t=this.provideOptionParent.x.modelValue;return Array.isArray(t)?t.includes(this.value):lt.idsAny(t,this.value)},isMul(){return this.provideOptionParent.x.multiple}}};const cs=["disabled","title"],us={class:"f-flex-1 f-line-1"};hs.render=function(t,e,i,s,l,o){return r.openBlock(),r.createElementBlock("button",r.mergeProps(t.html_attrs,{class:["f-flex-align",o.provideOptionParent.$options.name+"-option",{"z-on":o.isFocus,"z-ds":i.disabled,"z-mul":o.isMul}],onClick:e[0]||(e[0]=(...t)=>o.click&&o.click(...t)),disabled:i.disabled,title:i.text}),[r.createElementVNode("div",us,[r.renderSlot(t.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(i.text),1)])]),o.isMul?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["w-option-checked",{"f-i f-i-check":o.isFocus}])},null,2)):r.createCommentVNode("v-if",!0)],16,cs)},hs.__file="src/widgets/Option.vue";var ds={name:"w-spinner",mixins:[Yi],inject:["provideRangeParent"],props:["decimal","format","showButton","buttonPosition","step","autoFix","compare","minValue","maxValue"],mounted(){this.x.format&&this.doFormat()},methods:{x_default:()=>({step:1,autoFix:!0,showButton:!0,buttonPosition:"right"}),doFormat(t){let e=""+this.x.modelValue,i=this.x.format.separator||",",s=RegExp(i.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),"g"),l=lt.numFormat(e,this.x.format.length,i,this.x.format.rightward);if(e!==l){let i=this.$refs.v.selectionStart,r=e.slice(0,i).replace(s,"");if(this.val(l,t),document.activeElement===this.$refs.v){let t=l.slice(0,i).replace(s,"");this.$nextTick(()=>lt.rngCursor(this.$refs.v,i+(r.length-t.length)))}}},stepBy(t,e){if(!this.isNormal)return;let i=this.defaultRuleValue("maxValue"),s=this.defaultRuleValue("minValue"),l=this.val(),r=lt.numAdd(lt.number(l),t*this.x.step),o=this.provideRangeParent&&this.provideRangeParent.forms(),a=r;if(null!=i&&(a=Math.min(i,a)),null!=s&&(a=Math.max(s,a)),o)if(o[0]==this){let t=o[1].val();null!=t&&(a=Math.min(t,a))}else if(o[1]==this){let t=o[0].val();null!=t&&(a=Math.max(t,a))}this.warn(!1),this.focus(),this.val(a,e),a==r&&this.tip_uid&&(lt.close(this.tip_uid),this.tip_uid=null),this.x.format&&this.doFormat(e)},isUsableVal(t){return!this.getValidErrorSync(null,t)},isFocusTarget(t){return this.$refs.buttonMinus&&this.$refs.buttonMinus.contains(t)||this.$refs.buttonPlus&&this.$refs.buttonPlus.contains(t)},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"<=",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&<.isNumber(t)&<.isNumber(l)){let e=lt.number(t),r=lt.number(l);if(!lt.eval("d"+i+"td",{d:e,td:r}))return[this.getLabelText(),i,s.getLabelText()]}}},oninput(t){this.val(t.target.value,t),this.x.format&&this.doFormat(t)},onfocus(t){this.baseFocus(t)},onblur(t){let e=this.x.modelValue;if(e&&!this.isUsableVal(e)&&this.x.autoFix){let i=lt.numDecimal(e,this.x.decimal);i=lt.numRange(i,this.x.minValue,this.x.maxValue),this.val(i,t)}this.baseBlur(t)},html_button(){let t,e=[];return this.x.clearable&&this.isNormal&&(t=r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton?(t&&e.push(t),"right"===this.x.buttonPosition?e.push(r.h("div",{class:"w-spinner-step w-input-button f-flex-column f-oh"},[r.h("button",{ref:"buttonPlus",class:"w-spinner-step-up f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-up"></i>'}),r.h("button",{ref:"buttonMinus",class:"w-spinner-step-down f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-down"></i>'})])):"between"===this.x.buttonPosition&&e.push(r.h("button",{ref:"buttonMinus",class:"w-spinner-step-minus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-minus"></i>'}),r.h("button",{ref:"buttonPlus",class:"w-spinner-step-plus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-plus"></i>'}))):t&&e.push(t),e}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(lt.isNumber(e)?lt.number(t)<lt.number(e):t<e))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(lt.isNumber(e)?lt.number(t)>lt.number(e):t>e))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:t=>{if(this.x.format&&(t=t.replace(RegExp(this.x.format.separator||",","g"),"")),null!=t){if(!lt.isNumber(t))return this.formErr({type:"number_invalid"});let e=this.x.decimal;if(t=""+t,!e&&t.includes("."))return this.formErr({type:"number_integer"});if(e&&e>0&<.strFrom(t,".").length>e)return this.formErr({type:"number_decimal_digit"},[e]);let i=this.provideRangeParent&&this.provideRangeParent.getRangeError();if(i)return this.formErr({type:"compare"},i)}}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return{"w-valuetype":"number",oninput:this.oninput,onfocus:this.onfocus,onblur:this.onblur}},html_class(){return["z-buttonposition-"+this.x.buttonPosition,{"z-val":this.hasVal,"z-clearable":!!this.x.clearable}]}},__file:"src/widgets/Spinner.vue"},ps={name:"w-datepicker",mixins:[Yi],inject:["provideRangeParent"],props:["showButton","multiple","format","autoFix","compare","minValue","maxValue","dropProps","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data:()=>({showDrop:!1,currentDate:null,lastValue:null,placeholder_type:"placeholder_select"}),methods:{x_default:()=>({format:"yyyy-MM-dd",autoFix:!0,showButton:!0}),isUsableVal(t){if(!t)return!0;if(!lt.dateValid(t,this.x.format))return!1;let e=this.x.enableHour&<.arrayNumber(this.x.enableHour),i=this.x.enableMinute&<.arrayNumber(this.x.enableMinute),s=this.x.enableSecond&<.arrayNumber(this.x.enableSecond);if(e||i||s){let l=lt.dateParse(t,this.x.format);if(e&&!e.includes(l.getHours())||i&&!i.includes(l.getMinutes())||s&&!s.includes(l.getSeconds()))return!1}return!0},onfocus(t){this.lastValue=this.x.modelValue,this.baseFocus(t)},onkeyup(){this.isNormal&&(this.showDrop=!0)},onCloseDrop(){this.showDrop=!1,this.currentDate=null,this.doAutoFix()},clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val("",t),this.$emit("clear",t))},doAutoFix(){let t=this.x.modelValue;if(t)if(this.isUsableVal(t)){let e=/\b(\d)\b/g;e.test(t)&&this.val(t.replace(e,"0$1"))}else this.x.autoFix&&this.val(this.lastValue)},drop(){lt.br.mobile?lt.dateSheet({value:this.x.modelValue,format:this.x.format,...this.getPeriod(),success:this.calendarCallback}):this.showDrop=!0},calendarCallback(t,e){this.val(t,e),this.showDrop=!1,this.currentDate=null,lt.br.mobile||this.focus()},getPeriod(){let t=this.x.minValue,e=this.x.maxValue,i=this.provideRangeParent&&this.provideRangeParent.forms();if(i)if(i[0]==this){let t=i[1].formVal();null!=t&&(null==e||e>t)&&(e=t)}else if(i[1]==this){let e=i[0].formVal();null!=e&&(null==t||t<e)&&(t=e)}return{minValue:t,maxValue:e}},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=this.x.format,s=e.mode||"<=",l=e.target.isWidget?e.target:this.ownerView.f(e.target),r=l&&l.formVal();if(t&&r&<.dateValid(t,i)&<.dateValid(r,i)){let e=lt.dateParse(t,i),o=lt.dateParse(r,i);if(!lt.eval("d"+s+"td",{d:e,td:o}))return[this.getLabelText(),s,l.getLabelText()]}}},html_button(){let t=[],e=this.x.format||"",i=0;e.includes("H")&&i++,e.includes("m")&&i++,e.includes("s")&&i++;let s,l=/[Hms]/.test(e)&&!/[yMd]/.test(e);if(this.x.clearable&&this.isNormal&&(s=r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton){let e=[r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-date"})];s&&e.push(s),t.push(r.h("div",{class:"w-input-buttonbar"},e))}else s&&t.push(s);if(this.showDrop){let e={ownproperty:!0,class:["f-dfish-dialog w-calendar-dialog",{"z-hastime":i,"z-onlytime":l}],style:{"--w-datepicker-time-cols":i||""},context:this,autoHide:!0,snap:()=>this.snapElem(),position:"v",indent:1};e=this.mergeDropProps(e),t.push(r.h(ae,e,{default:()=>r.h(ki,{height:"*",pad:!0,current:this.currentDate||this.x.modelValue||"",value:this.x.modelValue,format:this.x.format,...this.getPeriod(),enableHour:this.x.enableHour,enableMinute:this.x.enableMinute,enableSecond:this.x.enableSecond,defaultHour:this.x.defaultHour,defaultMinute:this.x.defaultMinute,defaultSecond:this.x.defaultSecond,success:this.calendarCallback,"onClick:item":(t,e)=>{this.currentDate=e.value}})}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&<.dateParse(t,this.x.format)<lt.dateParse(e,this.x.format))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&<.dateParse(t,this.x.format)>lt.dateParse(e,this.x.format))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:(t,e,i)=>{if(this.x.multiple)return;if(t){let e=t,i=lt.dateParse(e,this.x.format),s=i.getFullYear(),l=9999,r=1e3;if(s>l||s<r)return this.formErr({type:"time_exceed"},[r,l]);if(e!=lt.dateFormat(i,this.x.format))return this.formErr({type:"time_format"},[lt.dateFormat(new Date,this.x.format)])}if(this.defaultRuleValue("beforeNow")&&t&&t>lt.dateFormat(new Date,this.x.format))return this.formErr({type:"beforeNow"},[this.x.beforeNow]);if(this.defaultRuleValue("afterNow")&&t&&t<lt.dateFormat(new Date,this.x.format))return this.formErr({type:"afterNow"},[this.x.afterNow]);let s=this.provideRangeParent&&this.provideRangeParent.getRangeError();return s?this.formErr({type:"compare"},s):void 0}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return lt.br.mobile?{readonly:!0}:{onfocus:this.onfocus,onkeyup:this.onkeyup}},form_prop(){return{onclick:this.isNormal&&this.drop}},html_class(){return{"z-drop":this.showDrop,"z-val":this.hasVal,"z-droppable":!0,"z-clearable":this.x.clearable}}},mounted(){this.$watch("modelValue",t=>{if(this.x.autoFix&&t&&(t=lt.strTrim(t))){if(!lt.dateValid(t,this.x.format)){let e=lt.dateParse(t,this.x.format);t=lt.dateFormat(e,this.x.format),this.val(t)}this.lastValue=t}},{immediate:!0})},__file:"src/widgets/DatePicker.vue"},ms={name:"w-dropbox",mixins:[ui],provide(){return{provideOptionParent:this}},props:["multiple","cancelable","clearable","dropProps"],emits:["clear"],data:()=>({hasBorder:!0,text:"",dropper:null,showDrop:!1,placeholder_type:"placeholder_select"}),methods:{click(){this.$slots.default&&(this.showDrop=!this.showDrop,this.warn(!1))},clickOption(t,e){if(this.x.multiple){let e=lt.arrayID(this.val()).concat();t.isFocus?lt.lodash.pull(e,t.value):e.push(t.value),this.val(e)}else{let i=this.x.cancelable&&t.isFocus?"":t.value;this.val(i,e),this.showDrop=!1}},clickButtonClear(t){this.x.clearable&&this.hasVal&&(t.stopPropagation(),this.val(""),this.$emit("clear",t))},formText(){return this.input_text},html_input(){let t=lt.string(this.input_text),e=this.input_placeholder,i=!!lt.br.mobile,s=[this.html_input_hidden(),r.h("div",{class:"w-dropbox-text f-line-1",title:t||e},t||e&&r.h("div",{class:"w-input-placeholder"},e))];if(this.showDrop){let t={context:this,ownproperty:!0,class:"f-dfish-dialog w-dropbox-dialog"+(i?" z-mob":""),width:i?"100%":lt.bcr(this.el("form")).width,autoHide:!0,cover:i,snap:i?null:()=>this.el("form"),position:i?null:"v",indent:1,scrollY:!0,scrollView:".z-on"};t=this.mergeDropProps(t),s.push(r.h(ae,t,this.$slots))}return s},html_button(){let t=[r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})];return this.x.clearable&&this.isNormal&&t.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),r.h("div",{class:"w-input-buttonbar"},t)}},computed:{input_text(){let t=[],e=this.slots_children(),i=lt.arrayID(this.x.modelValue);return lt.lodash.each(i,i=>{let s=e.findIndex(t=>t.props.value==i);if(s>-1&&t.push(s),!this.x.multiple)return!1}),t.sort().map(t=>e[t].props.text).join(", ")},form_prop(){return{onclick:this.isNormal&&this.click}},html_class(){return{"z-val":this.hasVal,"z-drop":this.showDrop,"z-droppable":!0,"z-clearable":this.x.clearable}}},__file:"src/widgets/DropBox.vue"},fs={name:"w-pickbox",mixins:[ms],props:["picker"],methods:{getInputValue:t=>"string"==typeof t?t:lt.array(t).map(t=>t.value).join(","),click(t){this.$slots.default?(this.showDrop=!this.showDrop,this.warn(!1)):this.x.picker&&this.clickButtonPicker(t)},clickButtonPicker(t){t&&t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},closeDrop(){return this.showDrop=!1,this},html_button(){let t=[];if(this.$slots.default||this.x.clearable&&this.isNormal){let e=[];this.$slots.default&&e.push(r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&this.isNormal&&e.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(r.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(r.h("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{hasVal(){return this.input_text},input_text(){let t=this.x.modelValue;return t&&"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)?t.map(t=>t.text).join(", "):t&&t.text||""}},__file:"src/widgets/PickBox.vue"},xs={name:"w-password",mixins:[Yi],props:["compare","showPassword"],data:()=>({passwordVisible:!1}),methods:{getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"==",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&&!lt.eval("v"+i+"tv",{v:t,tv:l}))return[this.getLabelText(),i,s.getLabelText()]}},clickButtonShowPassword(){this.passwordVisible=!this.passwordVisible},html_button(){let t=[];return this.isNormal&&this.x.clearable&&t.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.x.showPassword&&t.push(r.h("button",{class:"w-input-button-showpassword w-input-button f-i "+(this.passwordVisible?"f-i-visible":"f-i-invisible"),onclick:this.clickButtonShowPassword})),t}},computed:{validHooks(){return{...this.pubValidHooks,compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)}}},input_type(){return this.passwordVisible?"text":"password"}},__file:"src/widgets/Password.vue"},gs={name:"w-range",mixins:[ui],provide(){return{provideRangeParent:this}},props:["mode"],methods:{getRangeError(){let t=this.forms();if(t&&t.length)return t[0].getCompareError(t[0].formVal(),{target:t[1],mode:this.x.mode})},forms(){const t=this.$refs.to;return t&&this.ownerView.fAll(null,t.parentNode)},snapElem(){return this.forms()[0]||this.el("form")},html_form(){let t=this.slots_children();return t.splice(1,0,r.h("div",{ref:"to",class:"w-range-to"},lt.loc.to)),t}},computed:{html_on(){return{onclick:t=>this.warnClass=""}}},__file:"src/widgets/Range.vue"},vs={name:"w-combobox",mixins:[ui],props:["multiple","strict","dropper","picker","dropProps","br","clearable"],emits:["input","click:item","blur","focus","clear"],data(){return{hasBorder:!0,text:"",showSuggest:!1,sug_timer:null,sensor_text:this.getInputText(this.modelValue),sensor_width:null}},methods:{x_default:()=>({strict:!0}),watchModelValue(t,e){this.clear(),this.x.strict||(this.sensor_text=this.getInputText(t));(e&&e.map?e.map(t=>t.value).join(","):"")!=(t&&t.map?t.map(t=>t.value).join(","):"")&&this.trigger("change",t)},getInputValue(t){if("string"==typeof t)return t;let e=lt.array(t).filter(t=>t.value).map(t=>t.value);return!this.x.strict&&this.sensor_text&&e.push(this.sensor_text),e.join(",")},getInputText(t){const e=lt.array(t).find(t=>!t.value&&t.text);return e?e.text:""},addVal(t,e){let i;i=this.x.multiple?lt.lodash.unionBy(lt.array(this.x.modelValue),lt.array(t),"value"):[t],lt.lodash.remove(i,t=>!t||!t.text),this.val(i,e)},complete(t,e){return e=e||new CustomEvent("complete"),this.addVal(t,e),this.clear(),this.$nextTick(this.focus),this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},clear(){this.sensor_text="",this.isNormal&&(this.$refs.input.value="")},reset(t){this.warn(!1),this.clear(),this.val(t||null==this.defaultValue?"":this.defaultValue)},focus(t){this.isNormal&&(this.$refs.input.focus(),t&&this.$refs.input.value&<.rngCursor(this.$refs.input),this.warn(!1))},onclick(t){this.sensor_text||"function"!=typeof this.x.dropper||(this.suggest(),this.x.dropper(this));const e=t&&t.target==this.$refs.list;this.focus(e)},oninput(t){let e=t.target.value;this.sensor_text=e,clearTimeout(this.sug_timer),""===e?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0),t.value=e,this.trigger(t,e)},500)},onkeydown(t){if(8===t.keyCode&&0===t.target.selectionStart&&0===t.target.selectionEnd){let t=lt.array(this.x.modelValue).concat();t.length&&(t.splice(t.length-1,1),this.val(t))}},onblur(t){this.trigger("blur"),setTimeout(()=>{this.$.isUnmounted||this.$.isDeactivated||(this.valid("blur"),this.$refs.list.contains(document.activeElement)||(this.isFocus=!1))},100)},onfocus(t){this.isFocus=!0,!this.showSuggest&&t.target.value&&t.target.dispatchEvent(new Event("input")),this.trigger("focus")},onwheel(t){this.$refs.list.scrollWidth>this.$refs.list.clientWidth&&(this.$refs.list.scrollLeft+=50*(t.deltaY>0?1:-1),t.preventDefault())},onCloseDrop(){this.showSuggest=!1},clickItem(t,e){t.runType="click:item",t.value=e,this.trigger(t,e)},clickClose(t,e){t.stopPropagation();let i=lt.array(this.x.modelValue).concat(),s=i.findIndex(t=>t.value==e.value);s>-1&&(i.splice(s,1),this.val(i,t))},clickButtonPicker(t){t.stopPropagation(),this.warn(!1);let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.val("",t),this.clear(),this.suggest(!1),this.focus(),this.$emit("clear",t)},formText(){return this.input_title},html_options(){let t=this.x.modelValue;if(t&&"string"!=typeof t)return lt.array(t).filter(t=>t.value).map(t=>r.h("div",{class:["w-combobox-option f-flex-center",{"z-forbid":t.forbid}],onclick:e=>this.clickItem(e,t)},[r.h("div",{class:"w-combobox-option-text f-line-1",title:t.text},t.text),this.isNormal&&r.h("div",{class:"w-combobox-option-close f-i f-i-close",onclick:e=>this.clickClose(e,t)})]))},html_var(){return r.h("div",{class:"w-combobox-input-wrap"},[r.h("div",{class:"w-combobox-sensor",ref:"sensor"},this.sensor_text||(this.input_value?null:this.input_placeholder)),r.h("input",{type:"text",ref:"input",value:this.sensor_text,class:"w-combobox-input",style:{width:this.sensor_width},readonly:!this.isNormal,placeholder:this.input_value?null:this.input_placeholder,oninput:this.oninput,onkeydown:this.onkeydown,onblur:this.isNormal&&this.onblur,onfocus:this.isNormal&&this.onfocus})])},html_input(){const t=[this.html_options()];if(t.push(this.html_var()),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:lt.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(r.h(ae,e,this.$slots))}return[this.html_input_hidden(),r.h("div",{ref:"list",class:["w-combobox-list f-flex-1 f-flex f-oh f-height",{"f-h-gap":lt.br.compat.gap}],onWheel:!this.x.br&&this.onwheel},t)]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(r.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(r.h("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{validHooks(){return{validateDefault:t=>{if(this.sensor_text){if(this.x.strict)return this.formErr({type:"invalid_option"});if(!this.x.multiple){const t=lt.array(this.x.modelValue).find(t=>t.value);if(t)return this.formErr({type:"maxSize"},1)}}},...this.pubValidHooks}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":lt.array(this.x.modelValue).map(t=>t.text).join(", ")},html_class(){return{"z-br":this.x.br,"z-drop":this.showSuggest,"z-val":this.hasVal||this.sensor_text,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable,"z-on":this.isFocus}},form_prop(){return{onclick:this.isNormal&&this.onclick}}},mounted(){this.$refs.sensor&&new Wt(()=>{this.$refs.sensor&&(this.sensor_width=this.$refs.sensor.offsetWidth+"px")}).observe(this.$refs.sensor)},__file:"src/widgets/ComboBox.vue"},ws={name:"w-linkbox",mixins:[ui],props:["multiple","picker","dropProps","separator","strict","br","clearable"],emits:["input","dblclick:item","clear"],created(){this.$watch(()=>this.x.modelValue,t=>{this.isFocus||this.initOptions(t)})},data:()=>({hasBorder:!0,text:"",sugger:null,showSuggest:!1,sug_timer:null,_KC:null,imeMode:!1,paste_rng:null,currOpt:null,store:[]}),methods:{x_default:()=>({strict:!0}),getInputValue:t=>"string"==typeof t?t:lt.array(t).map(t=>t.value).join(","),initOptions(t){null==t&&(t=this.x.modelValue),t&&"string"!=typeof t&&(t=lt.array(t),this.store.length&&(this.store=[]),this.addStore(t),this.inp().innerHTML=this.html_options(t))},addVal(t,e){let i;i=this.x.multiple?lt.lodash.unionBy(lt.array(this.x.modelValue),lt.array(t),"value"):[t],this.val(i,e)},complete(t,e){e=e||new CustomEvent("complete"),this.addStore(t),this.focus();let i=this.currOpt||lt.rngElement(),s=this.x.separator||",";if(i){"U"===i.tagName||("I"===i.tagName?i.nextSibling&&"U"===i.nextSibling.tagName?i=i.nextSibling:(i=lt.after(i,"<u></u>"),this.x.multiple&<.after(i,"<i>"+s+"</i>")):i=!this.x.multiple&&this.inp().querySelector("u")||lt.append(this.inp(),"<u></u>")),this.rng_text(i,0,t.text),lt.classAdd(i,"_o"),i.setAttribute("data-value",t.value),t.forbid&&i.setAttribute("data-forbid","");let l=i.nextSibling;lt.rngCursor(l&&!l.nextSibling?l:i),this.x.multiple&&!l&<.rngCursor(lt.after(i,"<i>"+s+"</i>"));let r=lt.q(`u[data-value="${t.value}"]`,this.inp());r.length>1&&r.eq(0).next("i").addBack().remove(),this.save(e)}return this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},input(t,e){this.currOpt=t;let i=t.innerText.replace(/^[\s,]+|[\s,]+$/g,"");clearTimeout(this.sug_timer),""===i?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0);const t=this.createEvent("input",{originalEvent:e});this.trigger(t,i)},500)},focus(){return this.$refs.inp.focus(),this.warn(!1),this},inp(){return this.$refs.inp},fixStyle(t){let e,i=lt.rngElement(),s=!1,l=this.uid,r=this.inp();if(r.contains(i)||(i=r),e=i.innerText,this.paste_rng&&(i=this.paste_rng.parentElement()),i.id===l&&(i=r),i.id===l+"t"){if(!e)return this.closeDrop();if(3===i.firstChild.nodeType){let t=lt.rngCursor(i),s=document.createElement("u");t.extractContents(),s.appendChild(document.createTextNode(e)),t.insertNode(s),lt.rngCursor(s),i=s}else lt.q("br",r).remove(),i.firstChild?i=i.firstChild:lt.rngCursor(i)}if(lt.q("br",r).remove(),"FONT"===i.tagName)if("U"===i.parentNode.tagName){let t=e.previousSibling.nodeValue,e=e.parentNode,i=e.innerText;this.rng_text(e,i.indexOf(t)+t.length+1,i)}else i.parentNode.id===l+"t"&&(e=i.parentNode.innerText,i=lt.replaceWith(i,"<u></u>"),i.innerText=e);i!==r&&"I"!==i.tagName&&i.nextSibling&&"I"!==i.nextSibling.tagName&&(3===i.nextSibling.nodeType?i.nextSibling.parentNode.removeChild(i.nextSibling):(e=i.innerText,this.rng_text(i,e.length,e+i.nextSibling.innerText),i.nextSibling.parentNode.removeChild(i.nextSibling),s=!0)),lt.q("u:has(br)",r).remove(),e=i.innerText;let o=[],a=this.x.separator||",";if(this.x.multiple&&e.length>1&&e.indexOf(a)>-1){let l,n=[],h=e.length-lt.rngCursorOffset(),c=[];e.split(a).forEach(t=>{(l=lt.strTrim(t))?(s=this.param(l),n.push("<u"+(s?' class=_o data-value="'+s.value+'"'+(s.forbid?" data-forbid":""):"")+">"+l+"</u>"),s?c.push('u[data-value="'+s.value+'"]'):o.push(l)):n.push("")}),c.length&&(c=lt.q(c.join(","),r).next("i").addBack());let u=lt.replaceWith(i,n.join("<i>"+a+"</i>")),d=0;if(!this.paste_rng||188===this._KC)do{if((d+=u.innerText.length)>=h){this.rng_text(u,d-h);break}}while(u=u.previousSibling);c.length&&(c.remove(),lt.q("i + i, i:first-child",r).remove()),s=!0,(i=lt.rngElement())&&"U"===i.tagName&&!i.getAttribute("data-value")?this.input(i,t):this.closeDrop()}else e?(lt.classAny(i,"_o")&&!this.param(e)?(lt.classRemove(i,"_o"),i.removeAttribute("data-value"),s=!0):this.x.strict||(s=!0),this.input(i,t)):(s=!0,this.closeDrop());s&&this.save(t),this.paste_rng=null},rng_text(t,e,i){let s=lt.rngSelection();null!=i&&(t.innerText=i),s.selectNodeContents(t),lt.rngCursor(s,e)},clickPicker(t){t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.x.clearable&&this.hasVal&&(this.val([],t),this.$nextTick(this.focus),this.$emit("clear",t))},addStore(t){if(t&&"string"!=typeof t){let e=lt.array(t).filter(t=>!this.store.find(e=>e.value==t.value));e.length&&(this.store=this.store.concat(e))}},param(t){return this.store.find(e=>e.text==t)},save(t){let e=this.x.strict,i=[];lt.q("> u",this.inp()).each((t,s)=>{let l=s.getAttribute("data-value"),r=s.innerText;l?i.push({value:l,text:r}):e||i.push({value:r})}),this.val(i,t)},onkeydown(t){13===t.keyCode&&t.preventDefault()},onkeyup(t){if(!this.imeMode){let e=this._KC=t.keyCode;13===e||38===e||40===e||17===e?t.stopPropagation():this.fixStyle(t),this._KC=null}},onclick(t){if(this.isNormal)if(t.target&&"U"===t.target.tagName&&!t.target.getAttribute("data-value"))this.input(t.target,t);else{let e=lt.rngElement();"U"===e.tagName?this.input(e,t):"function"==typeof this.x.dropper?this.x.dropper(this):this.closeDrop()}},ondblclick(t){if("U"===t.target.tagName&&t.target.getAttribute("data-value")){let e=lt.array(this.x.modelValue).find(e=>e.value==t.target.getAttribute("data-value"));e&&(t.runType="dblclick:item",t.value=e,this.trigger(t,e),window.getSelection().removeAllRanges())}},onCloseDrop(){this.showSuggest=!1},formText(){return this.input_title},html_options(t){let e=this.x.separator||",";if(null==t&&(t=this.x.modelValue),"string"!==t){let i=lt.array(t),s=[];return lt.lodash.each(i,(t,i)=>{if(s.push("<u"+(t.value?' class=_o data-value="'+t.value+'"':"")+(t.forbid?" data-forbid":"")+">"+t.text+"</u>"),!this.x.multiple)return!1;s.push("<i>"+e+"</i>")}),s.join("")}},html_var(){return r.h("div",{class:"w-linkbox-input f-flex-1",ref:"inp",id:this.uid+"t",contentEditable:this.isNormal,onkeyup:this.onkeyup,onkeydown:this.onkeydown,onclick:this.onclick,ondblclick:this.ondblclick,onfocus:t=>{this.isFocus=!0},onblur:t=>{this.isFocus=!1}})},html_input(){let t=[];if(this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:lt.bcr(this.el("form")).width,scrollY:!0,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(r.h(ae,e,this.$slots))}return[this.html_input_hidden(),this.html_var(),r.h("div",{class:"w-input-placeholder"},this.input_value?null:this.input_placeholder),t]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(r.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(r.h("button",{class:"w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickPicker})),t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(this.x.strict&<.q("u:not([data-value])").length>0)return this.formErr({type:"invalid_option"})}}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":lt.array(this.x.modelValue).map(t=>t.text||t.value).join(", ")},html_class(){return{"z-br":this.x.br,"z-dc":this.getOn("dblclick:item"),"z-drop":this.showSuggest,"z-val":this.hasVal,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable}}},mounted(){this.initOptions(),this.inp().addEventListener("compositionstart",()=>{this.imeMode=!0}),this.inp().addEventListener("compositionend",()=>{this.imeMode=!1})},__file:"src/widgets/LinkBox.vue"},bs={props:["width","height","context"],data:()=>({smallLeft:0}),watch:{"context.x.modelValue":{handler(t){let e=this.context.max(),i=this.context.min();this.smallLeft=(this.width-this.smallWidth)*(t/(e-i))}}},mounted(){},methods:{refresh(t){this.context.refresh(t)},dragstart(t){},mousedown(t){this.context.dragstart(t)}},computed:{bigSrc(){return this.context.x.big.src},smallSrc(){return this.context.x.small.src},smallWidth(){return this.height*(this.context.x.small.width/this.context.x.small.height)}}};const _s=["src"],ys=["src","width"];bs.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-dialog");return r.openBlock(),r.createBlock(a,{ref:"dialog",class:"w-jigsaw-dialog",width:i.width,height:i.height,context:i.context},{default:r.withCtx(()=>[r.createElementVNode("img",{class:"w-jigsaw-big",src:o.bigSrc},null,8,_s),r.createElementVNode("img",{class:"w-jigsaw-small",src:o.smallSrc,width:o.smallWidth,style:r.normalizeStyle({left:l.smallLeft+"px"}),onDragstart:e[0]||(e[0]=r.withModifiers((...t)=>o.dragstart&&o.dragstart(...t),["prevent"])),onMousedown:e[1]||(e[1]=(...t)=>o.mousedown&&o.mousedown(...t))},null,44,ys),r.createElementVNode("span",{onClick:e[2]||(e[2]=(...t)=>o.refresh&&o.refresh(...t)),class:"w-jigsaw-refresh"},"刷新")]),_:1},8,["width","height","context"])},bs.__file="src/template/TemplateJigsaw.vue";const ks=lt.loc.form.jigsaw_drag_right;var Cs={name:"w-jigsaw",mixins:[ui],emits:["drop","click:refresh"],props:["big","small","dropWidth"],data:()=>({hasBorder:!0,text:ks,locked:!1,isSuccess:!1,isError:!1,showDrop:!1}),methods:{success(t){this.text=t,this.locked=!0,this.isSuccess=!0,this.showDrop=!1,this.setThumbLeft()},error(t,e,i){if(t||(t=""),this.text=t,this.isError=!0,this.showDrop=!1,this.warn(!0),this.setThumbLeft(0),e){this.locked=!0,this.text=t+`(${e/1e3})`;let s=setInterval(()=>{e-=1e3,this.text=t+`(${e/1e3})`,e<=0&&(clearInterval(s),this.reset(),i&&i())},1e3)}else i&&i()},reset(){this.locked=!1,this.isError=!1,this.isSuccess=!1,this.text=ks,this.setThumbLeft(0),this.warn(!1)},refresh(t){t.runType="click:refresh",this.trigger(t)},setThumbLeft(t){null==t?t=lt.number(this.$refs.thumb.style.left):this.$refs.thumb.style.left=t+"px";let e=this.thumbWidth(),i=this.mainWidth(),s=t+e/2>i/2;this.$refs.text.style.left=s?0:t+e+"px",this.$refs.text.style.right=s?i-t+"px":0,this.el().classList.remove("z-drag")},dragstart(t){if(!this.isNormal||this.locked)return;this.warn(!1);let e=this.$refs.thumb,i=lt.eventX(t),s=this.max(),l=this.min(),r=lt.number(e.style.left),o=this.thumbWidth(),a=this.mainWidth();lt.moveup(t=>{let n=lt.eventX(t),h=lt.numRange(r+n-i,0,a-o);e.style.left=h+"px",this.$refs.track.style.width=h+o+"px",this.x.modelValue=(s-l)*h/(a-o),this.el().classList.add("z-drag")},(t,i)=>{i&&e.dispatchEvent(new Event("drop"))},t)},mouseenter(t){!this.x.big||this.isSuccess||this.locked||(this.warn(!1),this.showDrop=!0)},drop(t){this.trigger(t,this.x.modelValue)},max(){let t=this.x.maxValue;return null==t?100:t},min(){let t=this.x.minValue;return null==t?0:t},thumbWidth(){return lt.bcr(this.$refs.thumb).width},mainWidth(){return lt.bcr(this.$refs.form).width},html_input(){return[this.html_input_hidden(),[r.h("div",{ref:"track",class:"w-jigsaw-track"}),r.h("div",{ref:"text",class:"w-jigsaw-text f-flex-center f-line-1"},this.text)]]},html_button(){let t=[r.h("button",{ref:"thumb",class:["w-jigsaw-thumb w-input-button f-i",this.isSuccess?"f-i-check":"f-i-long-arrow-right"],disabled:!!this.x.disabled,onmousedown:this.dragstart,onmouseenter:this.mouseenter,ondrop:this.drop})];if(this.showDrop){let e=Math.max(lt.number(this.x.dropWidth),lt.bcr(this.el("form")).width),i=Math.ceil(e*(this.x.big.height/this.x.big.width));t.push(r.h(bs,{ownproperty:!0,width:e,height:i,autoHide:!0,context:this,snap:()=>this.el("form"),position:"v",onClose:()=>this.showDrop=null}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(!this.isSuccess)return this.formErr({type:"jigsaw_required"})}}},html_class(){return{"z-success":this.isSuccess}},form_prop(){return{onmouseenter:this.mouseenter}}},__file:"src/widgets/Jigsaw.vue"},Ss={name:"w-form",mixins:[ui],props:["vertical"],methods:{getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks,required:(t,e,i)=>{if(e&&(!t||"[]"===t||"{}"===t))return this.formErr(i)}}},html_class(){return[{"z-vertical":this.x.vertical}]},html_style(){return{"--w-form-gap":lt.unitSize(this.x.gap)}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/Form.vue"},Vs={name:"w-formgroup",mixins:[ui],props:["columns","rows","gap","defaultColspan"],methods:{x_default:()=>({columns:12,gap:0}),getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks}},html_style(){let t=this.x.columns;lt.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;return lt.isNumber(e)&&(e=`repeat(${e}, 1fr)`),this.x.defaultColspan,{"--w-fromgroup-template-columns":t,"--w-fromgroup-template-rows":e,"--w-grid-gap":this.x.gap?lt.unitSize(this.x.gap):""}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/FormGroup.vue"},Ts={name:"w-rate",mixins:[ui],props:["allowHalf","cancelable","sum","count","text"],data:()=>({hoverWrap:!1,hoverIndex:-1}),methods:{x_default:()=>({sum:5,count:5}),hoverItem(t,e){this.isNormal&&(this.hoverIndex=e)},clickItem(t,e){this.isNormal&&(this.x.modelValue=this.x.cancelable&&this.x.modelValue==e?"":e)},html_star(t){return r.h(we,{class:["w-rate-star-icon",{"z-hv":this.hoverWrap&&t<=this.hoverIndex,"z-on":!this.hoverWrap&&t<=this.x.modelValue}],src:".f-i .f-i-star-full",onMouseenter:e=>this.hoverItem(e,t),onClick:e=>this.clickItem(e,t),disabled:!this.isNormal})},html_input(){let t=this.x.allowHalf?.5:1,e=(this.x.sum||5)*t/(this.x.count||5),i=[];for(let s=e;s<=this.x.sum;s+=e/t){let t=[this.html_star(s)];this.x.allowHalf&&t.push(this.html_star(s+e)),i.push(r.h("li",{class:"w-rate-star"},t))}return[this.html_input_hidden(),r.h("ul",{class:"w-rate-wrap",onMouseenter:t=>this.isNormal&&(this.hoverWrap=!0),onMouseleave:t=>this.isNormal&&(this.hoverWrap=!1)},i),this.x.text&&this.x.modelValue&&r.h("span",{class:"w-rate-text"},this.x.text[(this.x.modelValue-e)/t])]}},computed:{html_class(){return{"z-allow-half":this.x.allowHalf}}}};function Ms(t,{trimZeros:e=!1}={}){let i=Number(t).toLocaleString("fullwide",{useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:20});if(i.includes("e")){const[e,s]=i.split("e"),l=parseInt(s,10);i=Number(t).toFixed(Math.abs(l)+(e.split(".").length||0))}const[s,l]=i.split(".");if(!l)return 0;return(e?l.replace(/0+$/,""):l).length}Ts.__file="src/widgets/Rate.vue";var Ps={name:"w-slider",mixins:[ui],props:["minValue","maxValue","step"],emits:["drop"],data:()=>({grabbing:!1,left:0}),methods:{x_default:()=>({minValue:0,maxValue:100,step:1}),onmousedown(t){const e=lt.bcr(this.$refs.bar);let i=lt.number(this.x.modelValue),s=t.clientX;this.grabbing=!0;const l=Ms(this.x.step);lt.moveup(t=>{let r=t.clientX-s,o=i+r/e.width*(this.x.maxValue-this.x.minValue);o=lt.numRange(o,this.x.minValue,this.x.maxValue),o=Number(Number(o).toFixed(l)),this.val(o)},t=>{this.grabbing=!1,this.trigger("drop",this.x.modelValue)},t)},onclick(t){if(t.target!==this.$refs.button){const e=Ms(this.x.step),i=lt.bcr(this.$refs.bar);let s=t.clientX-i.left,l=+this.x.minValue+(s-10)/i.width*(this.x.maxValue-this.x.minValue);l=lt.numRange(l,this.x.minValue,this.x.maxValue),l=Number(Number(l).toFixed(e)),this.val(l),this.trigger("drop",l)}},html_input(){return[this.html_input_hidden(),r.h("div",{onClick:this.onclick,class:["w-slider-wrap"]},[r.h("div",{class:["w-slider-progress"]}),r.h("div",{ref:"bar",class:"w-slider-bar"},r.h("div",{ref:"button",onMousedown:this.onmousedown,class:["w-slider-button",{"z-grabbing":this.grabbing}]}))])]}},computed:{html_style(){return{"--w-slider-left":`${100*(this.x.modelValue-this.x.minValue)/(this.x.maxValue-this.x.minValue)||0}%`}}},__file:"src/widgets/Slider.vue"};const $s=[Ct,te,ae,he,ue,ve,Ve,Te,We,Zt,Kt,Me,Pe,$e,Ee,De,Ne,Le,Fe,Re,Xe,Ue,Ke,Ze,ti,we,Qe,ye,_e,ei,ii,gi,hi,vi,wi,bi,_i,yi,ki,Ei,Ni,Li,ci,Ii,Yi,Oi,ji,mi,qi,Ri,xi,Wi,Zi,as,ns,hs,ds,ps,ms,fs,xs,gs,vs,ws,Cs,Ss,Vs,Ts,Ps],Bs={};lt.WIDGET=Bs,lt.install=t=>{$s.forEach(e=>{t.component(e.name,e),Bs[e.name]=e}),t.use(dt)},module.exports=lt;
|
|
1
|
+
"use strict";var t=require("lodash"),e=require("jquery"),i=require("axios"),l=require("qs"),r=require("vue");let o=navigator.userAgent.toLowerCase(),a=o.match(/\bchrome\/(\d+)/),n=o.match(/\bfirefox\/(\d+)/);const h={agent:o,chrome:a&&parseFloat(a[1]),firefox:n&&parseFloat(n[1]),safari:!a&&o.indexOf("safari")>0,ie:("Microsoft Internet Explorer"===navigator.appName||o.indexOf("trident")>0)&&document.documentMode,compat:{gap:!1}};if(o.match(/\bmobile\b/)){h.mobile=!0,h.app="file:"===location.protocol;let t=o.match(/(MicroMessenger)\/([\d\.]+)/i);t&&(h.wechat={version:t[2].replace(/_/g,".")});let e=o.match(/(Android);?[\s\/]+([\d.]+)?/i);e&&(h.android=!0,h.version=e[2],h.isBadAndroid=!/Chrome\/\d/.test(window.navigator.appVersion));let i=o.match(/(iPhone\sOS)\s([\d_]+)/i);if(i)h.ios=h.iphone=!0,h.version=i[2].replace(/_/g,".");else{let t=o.match(/(iPad).*OS\s([\d_]+)/i);t&&(h.ios=h.ipad=!0,h.version=t[2].replace(/_/g,"."))}}(h.chrome&&h.chrome<84||h.firefox&&h.firefox<63)&&(h.compat.gap=!0);let c=0;const u=()=>(c++).toString(36)+":";function d(t){return t?t.uid||(t.uid=u()):u()}var p={yes:"是",no:"否",none:"无",to:"至",jump:"转到",confirm:"确定",search:"搜索",query:"查询",choose:"选择",save:"保存",remove:"删除",cancel:"取消",create:"新建",add:"添加",edit:"编辑",finish:"完成",refresh:"刷新",operfail:"操作失败",opertip:"操作提示",nodata:"暂无数据",more:"更多",field:"字段",close:"关闭",restore:"还原",rotate_left:"向左旋转",rotate_right:"向右旋转",dialog_max:"最大化",dialog_min:"最小化",detect_zoom:"温馨提示: 你的浏览器可能处于缩放({0}%)状态,这可能影响页面浏览效果,请尝试Ctrl+0重置,并刷新",no_tip_anymore:"不再提示",loading:"正在加载",wait:"请稍候..",submiting:"数据提交中,请稍候..",uploading:"正在上传,请稍侯..",click_preview:"点击预览",toomuch_wait:"次数过多,请稍候再试",toomuch_wait_countdown:"次数过多,请稍候再试(<em>{0}</em>)",preview_orginal_image:"查看原图",auth_success:"验证成功",auth_fail:"验证失败",choose_image:"选择图片",tree_movefail1:"无法移动:目标文件夹和源文件夹相同",tree_movefail2:"无法移动:目标文件夹是源文件夹的子文件夹",internet_error:"[{0} error] {1}<br>网络连接失败,请稍候再试",server_error:"[{0} error] {1}<br>系统异常,请联系管理员",preload_error:'获取预装载模板 "{0}" 失败',page:"页",page_text:{first:"首页",last:"尾页",next:"下页",prev:"上页"},print_preview:"打印预览",placeholder_input:"请输入{0}",placeholder_select:"请选择{0}",pulldown_refresh:"下拉刷新",release_refresh:"释放刷新",pullup_refresh:"上拉显示更多",pullup_nomore:"没有更多了",download_start:"开始下载..",download_complete:"下载完成",download_cannotopen:"无法打开此文件",download_fail:"下载失败",tab_close:"关闭标签",tab_close_others:"关闭其他标签",tab_close_all:"关闭全部标签",sort_asc:"升序",sort_desc:"降序",sort_cancel:"取消排序",column_choose:"选择列",connection_not_wifi:"您当前处于非wifi网络环境下,继续使用可能产生流量,确定继续吗?",debug:{sorry:"很抱歉,系统发生了错误",view_more:"点击“确定”,可在新窗口查看详细错误信息",no_command:"视图中没有定义此命令: {0}\nview path: {1}",no_combo:"选项列表(或树)没有设置combo参数\nname: {0}",error_template_type:'{0}\n请把此模板类型改为 "{1}"',error_type:"type错误或丢失\n{0}",tmpl_method_undefined:'"{0}" 方法不存在'},form:{required:"{0}不能为空",onlyone:"{0的}只能选择一条记录",maxLength:"{0}超出了{1}个字",reach_maxLength:"已到达可输入的最大字符长度",over_maxLength:"字符长度超出了{0}个字节",minLength:"{0}不能少于{1}个字节",maxValue:"{0}最大值为{1}",minValue:"{0}最小值为{1}",maxSize:"{0}最多选择{1}项",minSize:"{0}最少选择{1}项",pattern:"{0}格式不符合规范,或包含非法字符",password_weak:"弱",password_middle:"中",password_strong:"强",number_invalid:"{0}不是一个有效数字",number_integer:"{0}请填入一个整数",number_decimal_digit:"{0的}小数位不能超过{1}位",step_max_value:"已到达最大值",step_min_value:"已到达最小值",time_exceed:"{0的}年份超出有效范围。有效年份:{1}年 至 {2}年",time_format:"{0的}时间格式错误。正确格式范例:{1}",period_invalid:"{0的}起始时间应早于结束时间",beforeNow:"{0}不能大于当前时间",afterNow:"{0}不能小于当前时间",compare:"{0}需要满足条件:{1} {2} {3}",invalid_option:"存在无效选项",need_valid_option:"请输入一个有效选项",choose_atleastone:"请至少选择一项",complete_required:"请完成必填项",jigsaw_drag_right:"向右拖动滑块填充拼图",jigsaw_required:"请完成滑块验证",jigsaw_errorimg:"图片数据异常",upload_loading:"正在上传,请稍候..",upload_invalid_file:"存在无效文件",no_files:"<没有文件>",upload_error:"(上传失败)",upload_limit:"上传数量超过上限(最多{0}个)",upload_invalid_file_type:"无效的文件类型:<br>{0}<br><br>只能选择 {1} 格式文件",upload_invalid_data:"错误的文件数据格式:<br>{0}",upload_no_data:"缺少文件数据",upload_maxfilesize:"上传失败: {0}<br><br>文件大小不能超过{1}",upload_minfilesize:"上传失败: {0}<br><br>文件大小不能小于{1}"},year:"年",month:"月",day:"日",sky:"天",hour:"时",minute:"分",second:"秒",calendar:{now:"现在",today:"今天",weeknow:"本周",monthnow:"本月",yearnow:"本年",day_title:["日","一","二","三","四","五","六"],day_title_1:["一","二","三","四","五","六","日"],y:"{0}<span>年</span>",monthname:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],backdate:"返回日期",picktime:"选择时间",H:"时",m:"分",s:"秒",from_to:"{0} 至 {1}"},error:"错误",ps:(t,...e)=>(t&&(t=t.replace(/\{(\d+)([^\d]+)?\}/g,function(t,i,s){let l=e[parseFloat(i)];return null==l||""===l?"":s?l+s:l})),t),end:"结束"};const m=t=>null==t?"":""+t,f=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(s+e.length)},x=(t,e,i)=>{let s=i?t.lastIndexOf(e):t.indexOf(e);return s<0?"":t.substr(0,s)},g=(t,e)=>{if(!t)return 0;e||(e=$.x.cnBytes||2);let i=0;for(let s=0,l=t.length;s<l;s++)i+=t.charCodeAt(s)>128?e:1;return i},v=function(t,e,i){if(i=null==i?"0":i+"",!e)return t<10?i+t:t;for(t+="";t.length<e;)t=i+t;return t},w=function(t){return t.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},b=function(t,e,i){let s=[w(t)],l=t.length;if(e>0&&l>e)for(let i=l-1;i>=e;i--)for(let e,r=0,o=l-i;r<=o;r++)e=t.substr(r,i),s.push(w(e));return s},_="object",y=null,k=void 0,C=t=>{var e="string"==typeof t?parseFloat(t.replace(/[^\d\.-]|\b-/g,"")):+t;return isNaN(e)?0:e},S=t=>null!=t&&!isNaN(t),V=function(t,e){return e!=y&&(e.min&&!isNaN(e.min)&&(t=Math.max(t,e.min)),e.max&&!isNaN(e.max)&&(t=Math.min(t,e.max))),t},T=864e5,M="yyyy-MM-dd HH:mm:ss",P={0:"Q1",1:"Q1",2:"Q1",3:"Q2",4:"Q2",5:"Q2",6:"Q3",7:"Q3",8:"Q3",9:"Q4",10:"Q4",11:"Q4"},B=function(t,e){"string"==typeof t&&(t=z(t,e));let i={y:t.getFullYear(),m:t.getMonth(),d:t.getDate(),h:t.getHours(),i:t.getMinutes(),s:t.getSeconds()},s=(e||M).replace("yyyy",i.y).replace("MM",v(i.m+1)).replace("dd",v(i.d)).replace("HH",v(i.h)).replace("mm",v(i.i)).replace("ss",v(i.s)).replace("M",i.m+1).replace("d",i.d).replace("H",i.h).replace("m",i.i).replace("s",i.s);if(s.indexOf("w")>-1){let e=E(t);s=s.replace("ww",v(e[1])).replace("w",e[1])}if(s.indexOf("q")>-1){let t=P[i.m];s=s.replace("qq",t).replace("q",t)}return s},z=function(t,e){let i;t=(""+t).replace(/\b(\d)\b/g,"0$1");let s=(i=(e=(e||M).replace(/\b([MdHmsw])\b/g,"$1$1")).indexOf("yyyy"))>-1&&C(t.substr(i,4))||(new Date).getFullYear(),l=(i=e.indexOf("MM"))>-1?Math.max(C(t.substr(i,2))-1,0):0,r=(i=e.indexOf("dd"))>-1&&C(t.substr(i,2))||1,o=(i=e.indexOf("HH"))>-1?C(t.substr(i,2)):0,a=(i=e.indexOf("mm"))>-1?C(t.substr(i,2)):0,n=(i=e.indexOf("ss"))>-1?C(t.substr(i,2)):0;if((i=e.indexOf("qq"))>-1){let e=t.substr(i,2);return new Date(s,"Q1"===e?0:"Q2"===e?3:"Q3"===e?6:9,1)}if((i=e.indexOf("ww"))>-1){let e=C(t.substr(i,2)),l=E(new Date(s,0,1));return l[0]!=s&&(l=E(new Date(s,0,8))),new Date(l[2].getTime()+7*(e-1)*T)}return new Date(s,l,r,o,a,n)},D=function(t,e,i){i=C(i);let s=new Date(t.getTime());return"y"===e?s.setFullYear(t.getFullYear()+i):"M"===e?s.setMonth(s.getMonth()+i):"d"===e?s.setDate(s.getDate()+i):"H"===e?s.setHours(s.getHours()+i):"m"===e?s.setMinutes(s.getMinutes()+i):"s"===e&&s.setSeconds(s.getSeconds()+i),"y"!==e&&"M"!==e||s.getDate()==t.getDate()||(s=new Date(s.getTime()-s.getDate()*T)),s},E=function(t){let e=null!=$.x.weekPoint?$.x.weekPoint:1,i=null!=$.x.weekStart?$.x.weekStart:1,s=t.getDay()||7,l=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+e),r=Math.ceil((l-new Date(l.getFullYear(),0,0))/T),o=new Date(t.getFullYear(),t.getMonth(),t.getDate()-s+i);return[l.getFullYear(),Math.floor((r+6)/7),o,new Date(o.getTime()+6048e5-1)]};window.Range&&!Range.prototype.movePoint&&(Range.prototype.__defineGetter__&&(Range.prototype.__defineGetter__("text",function(){return this.toString()}),Range.prototype.__defineSetter__("text",function(t){this.deleteContents(),this.insertNode(document.createTextNode(t))})),Range.prototype.movePoint=function(t,e){var i,s=this.startContainer.firstChild||this.startContainer,l=t,r=0;e=null==e?t:e;do{this.selectNodeContents(s),l-=r=this.toString().length}while(l>0&&(s=s.nextSibling));s=i=this.startContainer;var o=e-t+(l+=r);r=0;do{this.selectNodeContents(i),o-=r=this.toString().length}while(o>0&&(i=i.nextSibling));if(this.setStart(s.firstChild||s,l),i){for(var a=i;a.firstChild;)a=a.firstChild;this.setEnd(a,r+o)}},Range.prototype.select=function(){let t=window.getSelection();t.removeAllRanges(),t.addRange(this)});const N=function(){let t=window.getSelection();return t.rangeCount&&t.getRangeAt(0)},L=function(t,e){return null==t&&(t=N()),null!=e&&(t.deleteContents?(t.deleteContents(),t.insertNode(document.createTextNode(e))):t.text=e),void 0===t.text?t.toString():t.text},F=["afterend","afterbegin","beforebegin","beforeend"],H=["after","prepend","before","append"],I=function(t){let e="string"==typeof t?function(t){let e=document.createElement("div");t&&(e.innerHTML=t);try{return e}catch(t){return!1}finally{e=null}}(t):t,i=document.createDocumentFragment();for(;e.firstChild;)i.appendChild(e.firstChild);try{return i}catch(t){return!1}finally{e=i=null}},Y=function(t,i,s){if(null==s){if(null==i)return t.innerHTML;try{t.innerHTML=i}catch(e){for(;t.firstChild;)t.removeChild(t.firstChild);Y(t,i,3)}}else if("string"==typeof i)try{3===t.nodeType?e(t)[H[s]](i):t.insertAdjacentHTML(F[s],i)}catch(e){Y(t,I(i),s)}else{let e=s%2?t:t.parentNode;e&&e.insertBefore(i,0===s?t.nextSibling:1===s?t.firstChild:2===s?t:null)}},O=function(t,e){return Y(t,e,3),t.lastElementChild||t.lastChild},j=function(t,e){return Y(t,e,2),t.previousElementSibling||t.previousSibling},q=function(){let t={float:"cssFloat"};return function(e){return t[e]||e.replace(/-./g,function(t){return t.charAt(1).toUpperCase()})}}(),R=function(t,e,i){if("string"==typeof i&&"="===i.charAt(1)){e=q(e);var s=t.style[e]||getComputedStyle(t,null)[e];i=C(i.replace("=",""));"width"===e||"height"===e?(s=C(s&&"auto"!==s?s:"w"===e.charAt(0)?t.offsetWidth:t.offsetHeight))<0&&(s=0):s=C(s),t.style[e]=s+i+("zIndex"===e?0:"px")}else"width"!==(e=q(e))&&"height"!==e||i&&"auto"!==i&&(i=Math.max(_number(i),0)),i&&!isNaN(i)&&"zIndex"!==e&&(i+="px"),t.style[e]=i;return t},W=!0,U=document,X=document.documentElement,Q=t=>t.split(","),G={h:Q("21,12,34,43"),v:Q("41,14,32,23"),a:Q("41,32,14,23,21,34,12,43,11"),t:["tt"],b:["bb"],l:["ll"],r:["rr"],c:["cc"],top:["tt"],bottom:["bb"],left:["ll"],right:["rr"],tl:["11"],tr:["22"],rt:["22"],rb:["33"],br:["33"],bl:["44"],lb:["44"],lt:["11"],1:["11"],2:["22"],3:["22"],4:["33"],5:["33"],6:["44"],7:["44"],8:["11"]},J=function(){var t,e=[14,23,34,43,33,44,"bb","tb"],i={pix:{r:{},b:{}},mag:{l:{},r:{},t:{},b:{}},inner:{}};for(t=(s=[23,22,33,32,21,34,"rr","rl"]).length;t--;)i.pix.r[s[t]]=W;for(t=e.length;t--;)i.pix.b[e[t]]=W;e=[41,32,44,33,"bt","bb"];var s,l=[12,43,11,44,"lr","ll"],r=[14,23,11,22,"tb","tt"];for(t=(s=[21,34,22,33,"rr","rl"]).length;t--;)i.mag.r[s[t]]=W;for(t=e.length;t--;)i.mag.b[e[t]]=W;for(t=l.length;t--;)i.mag.l[l[t]]=W;for(t=r.length;t--;)i.mag.t[r[t]]=W;for(t=(s=[11,22,33,44,"tt","bb","ll","rr"]).length;t--;)i.inner[s[t]]=W;return i}(),K=function(t){var e=X.clientLeft,i=X.scrollLeft,s=X.clientTop,l=X.scrollTop,r=t&&t!=U&&(t.isWidget?t.el():t),o=r&&r.getBoundingClientRect();return o?{left:o.left-e+i,top:o.top-s+l,right:o.right-e+i,bottom:o.bottom-s+l,width:o.width,height:o.height}:t==document?{left:i,top:l,right:X.clientWidth+i,bottom:X.clientHeight+l,width:X.clientWidth,height:X.clientHeight}:null},Z={},tt=function(e){e.fn&&(t.pull(Z[e.id][e.type],e),e.type=e.fn=e.args=null)},et=function(t){return t.indexOf(".")>-1?x(t,"."):t},it=function(t){return t.indexOf(".")>-1?"."+f(t,".").split(".").sort().join(".")+".":""},st=function(t,e){var i=Z[d(t)];if(i){var s=et(e),l=it(e);if(s)return i[s]&&(l?i[s].filter(t=>t.ns.indexOf(l)>-1):i[s]);var r=[];for(s in i)r.push.apply(r,i[s].filter(t=>t.ns.indexOf(l)>-1));return r}};function lt(e){if(!e||e.isWidget)return e;if("string"==typeof e||e.uid)return lt.vueMap.get(e.uid||e);if(e instanceof Event&&(e=e.currentTarget||e.target),e.$el){if(e.$attrs.orientUid)return lt.vueMap.get(e.$attrs.orientUid);const t=e.$el;if(8===t.nodeType&&e.$.subTree.component.data.uid)return lt.vueMap.get(e.$.subTree.component.data.uid);e=1!=t.nodeType?e.$el.nextElementSibling:e.$el}if(t.isElement(e))do{if(e.id){if(lt.vueMap.has(e.id))return lt.vueMap.get(e.id);let t=lt.strTo(e.id,":")+":";if(lt.vueMap.has(t))return lt.vueMap.get(t)}}while(e=e.parentNode);for(;e&&!e.isWidget;)e=e.$parent;return e||lt.docView}Object.assign(lt,{x:{defaultOptions:{}},vueMap:new Map,dfclsCache:{},q:e,lodash:t,http:i,br:h,loc:p,uid:d,EventListener:class{constructor(t){this.ctx=t}hasEvent(t){let e=st(this.ctx,t);return e&&e.length}addEvent(t,e,i){var s={id:d(this.ctx),type:et(t),ns:it(t),fn:e,one:i};return(function(t,e){for(var i=2,s=arguments.length-1;i<s;i++)e=e[arguments[i]]||(e[arguments[i]]={});return(e[arguments[s]]||(e[arguments[s]]=[])).push(t),e[arguments[s]]}(s,Z,s.id,s.type)).ori=!0,this}addEventOnce(t,e){return this.addEvent(t,e,!0)}fireEvent(t,e){var i=st(this.ctx,t.type||t);if(i)for(var s,l,r=0,o=i.length;r<o;r++)if((s=i[r])&&s.fn&&(l=s.fn.apply(this.ctx,e?[t].concat(e):[t]),s.one&&(tt(s),i.ori&&(r--,o--)),void 0!==l))return l;return this}removeEvent(t,e){if(t){var i=st(this.ctx,t);if(i)for(var s=i.length;s--;)e&&i[s].fn!==e||tt(i[s])}else{var l=Z[d(this.ctx)];for(s in l)this.removeEvent(s);delete Z[d(this.ctx)]}return this}},eventX:function(t){return t.targetTouches?t.targetTouches[0].clientX:t.clientX},eventY:function(t){return t.targetTouches?t.targetTouches[0].clientY:t.clientY},number:C,isNumber:S,numRange:function(t,e,i){return null==t?e||0===e?e:i||0===i?i:t:(e||0===e)&&t<e?e:(i||0===i)&&t>i?i:t},numAdd:function(...t){let e=0,i=0;return t.forEach(t=>{e=Math.max(e,f(t+"",".").length),i+=t}),e=Math.pow(10,e),Math.round(i*e)/e},numFormat:function(t,e,i,s){null==e&&(e=3),null==i&&(i=",");let l=(t=String(t)).replace(/[^.\d]/g,"").split("."),r=l[0],o=r.length,a=s?0:o,n="",h="-"===t.charAt(0)?"-":"";if(s)do{a+=e,n+=a<o?r.substr(a-e,e)+i:r.substr(a-e)}while(a<o);else do{a-=e,n=(a>0?i+r.substr(a,e):r.substr(0,e+a))+n}while(a>0);return h+n+(l.length>1?"."+f(t,".").replace(RegExp("[."+i+"]","g"),""):"")},numDecimal:function(t,e){if(e){if(e<0)return parseFloat(C(t));{let i=f(""+t,".");return i?x(""+t,".")+"."+i.slice(0,e):t}}return parseInt(C(t))},numScale:function(t,e,i){for(var s,l,r,o=0,a=t,n=e.length,h=0,c=0,u=Array(n);h<n;h++)(r=typeof e[h]===_?e[h].value:e[h])!=y&&isNaN(r)?t==y?u[h]=y:"*"===r?(l=h,c++):s=h:o+=u[h]=r==y||r<0?y:+r;if(t==y)return u;if(s!==k){t=Math.max(0,t-o);var d=0;for(h=o=0;h<=s;h++)r=typeof e[h]===_?e[h].value:e[h],u[h]===k&&typeof r===_STR&&r.indexOf("%")>0&&(d+=r=parseFloat(r),o+=u[h]=V(Math.floor(a*r/100),e[h]));l===k&&d>=100&&(u[s]=V(Math.max(0,u[s]+a-o),e[h]))}if(l!==k){for(t=Math.max(0,t-o),h=o=0;h<=l;h++)u[h]===k&&(o+=u[h]=V(Math.floor(t/c),e[h]));u[l]=V(Math.max(0,u[l]+t-o),e[l])}if(i&&s===k&&l===k){for(h=0,n=u.length,o=0,c=0;h<n;h++)S(u[h])&&(o+=u[h],c++);if(o<a){var p=Math.floor((a-o)/c);for(h=0;h<n;h++)S(u[h])&&(u[h]+=p);for(h=n;h>=0;h--)if(S(u[h])){u[h]+=a-o-p*c;break}}}return u},string:m,strTrim:t=>String(t).replace(/^\s+|\s+$/g,""),strEscape:function(t){return null!=t?(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,"""):""},strFrom:f,strTo:x,strPad:v,strLen:g,strExceed:(t,e,i)=>{let s=g(t,i);return i||(i=$.x.cnBytes||2),Math.ceil((s-e)/i)},strFormat:(e,i,s,l)=>(null!=e&&(e+=""),e&&i?Array.isArray(i)?e.replace(/\$\{?(\d+)\}?/g,function(t,e){return null==i[e]?l?t:"":s?encodeURIComponent(i[e]):i[e]}):e.replace(/\$\{?([a-z_][\w.]*)\}?/gi,function(e,r){let o=t.get(i,r);return null==o?l?e:"":s?encodeURIComponent(o):o}):e),strHighlight:function(t,e,i,s){return(t+="").replace(RegExp("(<[\\/!]?\\w+(?::\\w+)?\\s*(?:[-\\w]+(?:=('|\")?.*?\\2)?\\s*)*>)|("+b(e,i).join("|")+")","ig"),function(t,e,i,l){return void 0===l?e:'<em class="'+(s||"f-keyword")+'">'+l+"</em>"})},dateFormat:B,dateParse:z,dateAdd:D,dateValid:function(t,e){t=(""+t).replace(/\b(\d)\b/g,"0$1");let i=z(t,e),s=i.getFullYear();return s>=1e3&&s<=9999&&t==B(i,e)},dateDiff:function(t,e=new Date,i){switch("string"==typeof t&&(t=z(t)),"string"==typeof e&&(e=z(e)),i){case"y":let s=e.getFullYear()-t.getFullYear(),l=D(t,i,s);return l>e&&s--,s;case"M":let r=_dateDiff(t,e,"y"),o=D(t,"y",r);return s=o.getFullYear()<e.getFullYear()?e.getMonth()+11-o.getMonth():e.getMonth()-o.getMonth(),l=D(t,i,s),l>e&&s--,s+12*r;case"H":return Math.floor((e-t)/36e5);case"m":return Math.floor((e-t)/6e4);case"s":return Math.floor((e-t)/1e3);default:return Math.floor((e-t)/T)}},dateSheet:function(...t){return $.docView.dateSheet(...t)},dateWeek:E,dateWeekFirst:function(t){let e=$.dateWeek(new Date(t,0,1));return e[0]!=t&&(e=$.dateWeek(new Date(t,0,8))),e},dateWeekLast:function(t){let e=E(new Date(t,11,31));return e[0]!==t&&(e=E(new Date(t,11,24))),e},rngSelection:N,rngElement:function(){let t=N();return t&&t.startContainer.parentNode},rngCursor:function(t,e){let i=t;if(window.getSelection)if("number"==typeof t.selectionStart&&"number"==typeof t.selectionEnd)t.selectionStart=t.selectionEnd=null!=e?e:t.value.length;else{let s=window.getSelection();1===t.nodeType&&(i=document.createRange()).selectNodeContents(t),null!=e&&i.movePoint(e),s.removeAllRanges(),s.addRange(i),s.collapseToEnd()}return i},rngCursorOffset:function(){let t=N(),e=t.startOffset;if(null!=e)return e;let i=document.body.createTextRange();return i.selectNodeContents(t.startContainer.parentNode),i.setEndPoint("EndToStart",t),L(i).length},rngText:L,el:function(t){if(t){const e=t.$el;return e?1===e.nodeType?e:e.nextElementSibling:t.isWidget?t.el():t}},html:Y,append:O,prepend:function(t,e){return Y(t,e,1),t.firstElementChild||t.firstChild},before:j,after:function(t,e){return Y(t,e,0),t.nextElementSibling||t.nextSibling},replaceWith:function(t,e){let i=t.nextSibling;if(i)return t.parentNode.removeChild(t),j(i,e);{let i=t.parentNode;return i.removeChild(t),O(i,e)}},moveup:function(t,e,i){let s,l,r=null==i,o=document.documentElement,a=t=>t.targetTouches?t.targetTouches[0].clientX:t.clientX,n=t=>t.targetTouches?t.targetTouches[0].clientY:t.clientY,c=t=>t.preventDefault();i.currentTarget&&(i.currentTarget.style.userSelect="none"),o.addEventListener(h.mobile?"touchmove":"mousemove",s=function(e){r?t(e):i&&(Math.abs(a(e)-a(i))>1||Math.abs(n(e)-n(i))>1)&&(r=!0)},!0),o.addEventListener(h.mobile?"touchend":"mouseup",l=function(t){o.removeEventListener(h.mobile?"touchmove":"mousemove",s,!0),o.removeEventListener(h.mobile?"touchend":"mouseup",l,!0),i.currentTarget&&(i.currentTarget.style.userSelect=""),h.mobile&&o.removeEventListener("touchmove",c,{passive:!1}),e&&e(t,r)},!0),h.mobile&&o.addEventListener("touchmove",c,{passive:!1})},bcr:K,offset:function(t,e){let i={top:0,left:0,width:t.offsetWidth,height:t.offsetHeight};do{i.top+=t.offsetTop,i.left+=t.offsetLeft}while((t=t.offsetParent)&&e!=t);return i},snap:function(t,e,i,s,l,r,o){i?i.nodeType?i=K(i):i.isWidget?i=K(i.el()):(i.originalEvent||null!=i.clientX)&&(i={left:(i=i.originalEvent||i).clientX,right:i.clientX,top:i.clientY,bottom:i.clientY}):i=K(U);var a,n,h=[],c=[],u=-1,d=X.clientWidth,p=X.clientHeight,m=s?G[s]||(""+s).split(","):G.a;if(/[1-4]/.test(m[0]))for(var f=0,x=0;f<m.length;f++){if(a=+m[f].charAt(0),n=+m[f].charAt(1),h.push((1===a||2===a?i.top:i.bottom)-(3===n||4===n?e:0)),c.push((1===a||4===a?i.left:i.right)-(2===n||3===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}var g=h[f]<0?-h[f]:0,v=c[f]+t>d?c[f]+t-d:0,w=h[f]+e>p?h[f]+e-p:0,b=c[f]<0?-c[f]:0;y="14"===m[f]||"34"===m[f]?(t-v)*(e-g):"23"===m[f]||"43"===m[f]?(t-b)*(e-g):"32"===m[f]||"12"===m[f]?(t-b)*(e-w):(t-v)*(e-w),(!x||x<y)&&(x=y,u=f)}else{var _,y;for(f=0,x=0;f<m.length;f++){if(a=m[f].charAt(0),n=m[f].charAt(1),h.push(("r"===a||"l"===a||"c"===a?(i.top+i.bottom)/2:"t"===a?i.top:i.bottom)-("r"===n||"l"===n||"c"===n?e/2:"b"===n?e:0)),c.push(("t"===a||"b"===a||"c"===a?(i.left+i.right)/2:"r"===a?i.right:i.left)-("t"===n||"b"===n||"c"===n?t/2:"r"===n?t:0)),S=h[f]>=0&&h[f]+e<=p,_=c[f]+t<=d&&c[f]>=0,S&&_){u=f;break}(S||_)&&(s?(y=s==G.v?1==a||2==a?-h[f]:h[f]+e-p:1==a||4==a?-c[f]:c[f]+t-d,(!x||x>y)&&(x=y,u=f)):u<0&&(u=f))}}u<0&&(u=0);var k=m[u],S={left:c[u],top:h[u],bottom:p-(h[u]+e),right:d-(c[u]+t),type:k};(J.pix.r[k]&&(S.pix_r=W),J.pix.b[k]&&(S.pix_b=W),J.mag.r[k]&&(S.mag_r=W,S.mag="r"),J.mag.b[k]&&(S.mag_b=W,S.mag="b"),J.mag.l[k]&&(S.mag_l=W,S.mag="l"),J.mag.t[k]&&(S.mag_t=W,S.mag="t"),J.inner[k]&&(S.inner=W),r&&S.mag)&&((f=r.indent||C(r))&&(f/=window.devicePixelRatio||1,S.inner?S.mag_t?(S.top-=f,S.bottom+=f):S.mag_b?(S.top+=f,S.bottom-=f):S.mag_r?(S.left+=f,S.right-=f):(S.left-=f,S.right+=f):S.mag_t?(S.top+=f,S.bottom-=f):S.mag_b?(S.top-=f,S.bottom+=f):S.mag_r?(S.left-=f,S.right+=f):(S.left+=f,S.right-=f)),r.top&&(S.top-=r.top),r.bottom&&(S.bottom-=r.bottom),r.left&&(S.left-=r.left),r.right&&(S.right-=r.right));if(l){c=S.left;var V=S.right;e=S.bottom,h=S.top;(S.mag_t||S.mag_b)&&(S.pix_r?(V=Math.max(0,c<0?V+c:V),c+=S.right-V):(c=Math.max(0,V<0?V+c:c),V+=S.left-c)),(S.mag_l||S.mag_r)&&(S.pix_b?(e=Math.max(0,h<0?e+h:e),h+=S.bottom-e):(h=Math.max(0,e<0?e+h:h),e+=S.top-h)),S.left=c,S.right=V,S.top=h,S.bottom=e}if("cc"===s&&S.top<0&&(S.top=0),o){m=function(t){var e=K(t);return e.right=X.clientWidth-e.right,e.bottom=X.clientHeight-e.bottom,e}(o);S.top-=m.top,S.left-=m.left,S.right-=m.right,S.bottom-=m.bottom}return S.width=t,S.height=e,S.target=i,S},snapTo:function(t,e){e.type?(e.pix_r?(t.style.right=e.right+"px",t.style.left=""):(t.style.left=e.left+"px",t.style.right=""),e.pix_b?(t.style.bottom=e.bottom+"px",t.style.top=""):(t.style.top=e.top+"px",t.style.bottom="")):function(t,e){if(!t||!e)return null;if("string"==typeof e){if(!(e.indexOf(":")>0))return t.style[e]||getComputedStyle(t,null)[e];for(var i,s,l=0,r=e.split(";"),o=r.length;l<o;l++)(i=x(r[l],":"))&&(s=f(r[l],":"))&&R(t,i,s)}for(var l in e)R(t,l,e[l])}(t,e)}}),lt.extend=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)i in t||void 0===e[i]||(t[i]=e[i])}),t},lt.extendDeep=function(t,...e){return e.forEach(e=>{if(null!=e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object)for(let i in e)i in t?null!=t[i]&&"object"==typeof t[i]&&"constructor"in t[i]&&t[i].constructor===Object&<.extendDeep(t[i],e[i]):null!=e[i]&&"object"==typeof e[i]&&"constructor"in e[i]&&e[i].constructor===Object?lt.extendDeep(t[i]={},e[i]):t[i]=e[i]}),t},lt.merge=function(t,...e){return e.forEach(e=>{if(e)for(let i in e)t[i]=e[i]}),t},lt.mergeDeep=function(t,...e){return e.forEach(e=>{if(null!=e)for(let i in e)"object"==typeof t[i]?lt.mergeDeep(t[i],e[i]):t[i]=e[i]}),t},lt.cloneDeep=t.cloneDeep,lt.eval=function(t,e){if(e){let i=Object.keys(e);return Function(i.map(t=>t),`return (${t})`)(...i.map(t=>e[t]))}return Function(`return (${t})`)()},lt.string=function(t){return null==t?"":"object"==typeof t?JSON.stringify(t):""+t},lt.array=function(t){return Array.isArray(t)?t:null==t||""===t?[]:[t]},lt.arrayID=function(t){return Array.isArray(t)?t:null==t||""===t?[]:"string"==typeof t?t.split(","):[t]},lt.arrayNumber=function(t){return lt.array(t).map(t=>parseFloat(t))};lt.unitSize=function(t,e){return null==t||""===t||"*"===t?"":"auto"==t?"auto":isNaN(t)?t:e?t/e*100+"vw":`${t}px`},lt.idsAdd=(t,e,i)=>{if(t=m(t),e=m(e),i=null==i?",":""+i,!t||!e)return t||e;for(var s=0,l=(e=e.split(i)).length;s<l;s++)(i+t+i).indexOf(i+e[s]+i)<0&&(t+=(t?i:"")+e[s]);return t},lt.idsRemove=(t,e,i)=>{if(t=m(t),e=m(e),i=null==i?",":""+i,!t||!e)return t;for(var s,l=0,r=(e=e.split(i)).length;l<r;l++)do{(s=(i+t+i).indexOf(i+e[l]+i))>-1&&(t=t.slice(0,s?s-1:s)+t.slice(s+e[l].length+(s?0:1)))}while(t&&s>-1);return t},lt.idsAny=(t,e,i)=>{if(""===t&&e===t)return!0;if(t=m(t),e=m(e),i=null==i?",":""+i,!t||!e)return!1;if(t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)>-1)return!0;return!1},lt.idsAll=(t,e,i)=>{if(""===t&&e===t)return!0;if(i=null==i?",":""+i,!(t=null==t?"":""+t))return!1;if(!(e=null==e?"":""+e)||t==e)return!0;for(let s of e.split(i))if((i+t+i).indexOf(i+s+i)<0)return!1;return!0},lt.classAdd=function(t,e,i){if(!t)return;let s=t.className;if(e.indexOf(" ")>-1)for(let t=0,l=(e=lt.strTrim(e).split(/ +/)).length;t<l;t++)s=(!1===i?lt.idsRemove:lt.idsAdd)(s,e[t]," ");else s=(!1===i?lt.idsRemove:lt.idsAdd)(s,e," ");t.className=s},lt.classRemove=function(t,e){t&&(e.indexOf(" ")>-1?lt.classAdd(t,e,!1):t.className=lt.idsRemove(t.className,e," "))},lt.classAny=function(t,e){if(!t)return;let i="string"==typeof t?t:t.className;if(!(e.indexOf(" ")>-1))return lt.idsAny(i,e," ");for(let t=0,s=(e=$strTrim(e).split(/ +/)).length;t<s;t++)if(lt.idsAny(i,e[t]," "))return t+1},lt.urlEncode=t=>null==t?"":encodeURIComponent("object"==typeof t?JSON.stringify(t):t),lt.urlDecode=t=>null==t?"":decodeURIComponent(t.replace(/\+/g," ")),lt.urlFormat=(t,...e)=>(e.forEach((i,s)=>null!=i&&(t=lt.strFormat(t,i,!0,s<e.length-1))),t),lt.urlParam=function(t,e){var i=(o=t.split("#"))[0],s=o[1];if("string"==typeof e)return"#"===e?s||"":lt.urlDecode((i.match(new RegExp("[\\?&]"+e+"=([^&]*)"),"g")||A)[1]);if(e&&"object"==typeof e)for(var l in e)if("#"===l)s=e[l];else{var r=lt.urlEncode(e[l]);i=(c=new RegExp("\\b"+l+"=[^&]*")).test(i)?i.replace(c,l+"="+r):i+(i.indexOf("?")<0?"?":"&")+l+"="+r}else if(1===arguments.length){var o={};if(r=(r=i.split("?"))[r.length-1]){r=r.split("&");for(var a,n,h,c=0;c<r.length;c++)-1!=(a=r[c].indexOf("="))&&(n=r[c].substring(0,a),h=r[c].substring(a+1),o[n]=lt.urlDecode(h.replace(/\+/g," ")))}return o}return i+(s?"#"+s:"")},lt.urlServer=function(e,...i){if(e){if(!e.startsWith("http://")&&!e.startsWith("https://")){let i=t.get(lt.x,"http.baseURL");i&&(e=i+(i.endsWith("/")?"":"/")+e)}return lt.strFormat(e,...i)}},lt.urlComplete=function(e){if(0!==e.indexOf("data:")){e=lt.urlServer(e);let i=t.get(lt.x,"http.params");i&&(e=lt.urlParam(e,i))}return e},lt.download=function(t,e){if(t=lt.urlComplete(t),h.app)lt.wifiConfirm(function(){let i=plus.downloader.createDownload(t,e);plus.nativeUI.showWaiting(),i.addEventListener("statechanged",function(t,e){switch(t.state){case 1:plus.nativeUI.toast(lt.loc.download_start);break;case 4:200==e?(plus.nativeUI.toast(lt.loc.download_complete),plus.runtime.openFile(t.filename,{},function(t){plus.nativeUI.alert(lt.loc.download_cannotopen)})):plus.nativeUI.toast(lt.loc.download_fail+e),plus.nativeUI.closeWaiting()}}),i.start()});else{let e=document.createElement("a");e.href=t,lt.x.downloadTarget&&(e.target=lt.x.downloadTarget),e.click(),e.remove()}},lt.wifiConfirm=(t,e)=>{lt.x.wifiConfirm&&3!=plus.networkinfo.getCurrentType()?plus.nativeUI.confirm(lt.loc.connection_not_wifi,function(i){0===i.index&&t.call(e)},{buttons:[lt.loc.confirm,lt.loc.cancel]}):t.call(e)},lt.vm=lt.view=t=>t?"string"==typeof t&<.vueMap.has(t)&&(t=lt.vueMap.get(t)).isView?t:null!=(t=lt(t))?t.isView?t:t.ownerView:void 0:lt.docView,lt.close=t=>{let e=lt.dialog(t);e&&e.close()},lt.closePopup=()=>{document.dispatchEvent(new Event("mousedown"))},lt.previewVideo=function(t){lt.vm().previewVideo(lt.urlServer(t))},lt.previewImage=function(t,e){t=lt.array(t).map(t=>lt.urlServer(t)),h.app?plus.nativeUI.previewImage(t,e):lt.vm().previewImage(t,e)},lt.slotsChildren=function(t,e="default"){let i=[];const s=t=>{t&&t.forEach(t=>{"symbol"==typeof t.type?Array.isArray(t.children)?s(t.children):"Symbol(v-txt)"===t.type.toString()&&i.push(t):i.push(t)})};return s(t[e]&&t[e]()),i},lt.hasChild=function(e,i="default"){let s=!1;const l=e=>{t.forEach(e,t=>{if("symbol"!=typeof t.type)return!(s=!0);Array.isArray(t.children)&&l(t.children)})};return l(e[i]&&e[i]()),s},lt.ease=function(t,e,i){t(0),null==e&&(e=200),null==i&&(i=Math.ceil(e/10));let s=Math.ceil(e/i),l=0,r=(new Date).getTime(),o=setInterval(function(){let e=(new Date).getTime()-r,a=Math.floor(e/s);l!=a&&(a<i?t(-Math.cos(a/i*Math.PI)/2+.5):(clearInterval(o),t(1)),l=a)},Math.max(s-10,5));return o},lt.print=function(t,e){let i=lt.el(t),s=i.ownerDocument,l=lt.q("link[media=print]",s),r=[];e=e||{},lt.q("meta",s).each(function(){r.push(this.outerHTML)}),(l.length>0?l:lt.q("link",s)).each(function(){r.push('<link rel="stylesheet" type="text/css" href="'+this.getAttribute("href")+'"/>')}),lt.q("style",s).each(function(){r.push(this.outerHTML)});let o=i.outerHTML;o=o.replace(/<div[^>]+w-scroll[^>]+>/gi,function(t){return t.replace(/height: \w+/gi,"")}),lt.q(":text,:password,textarea,select",i).each(function(){let t,i=this.outerHTML;if(e.input2text){let e=lt(this);e&&e.isFormWidget?(i=e.el("form").outerHTML,t=e.formText()):t=this.value,t='<div class="f-oh w-input-s">'+t+"</div>"}else t=i.replace('value="'+this.defaultValue+'"',()=>'value="'+this.value+'"');o=o.replace(i,()=>t+"")}),lt.q(":radio,:checkbox",i).each(function(){if(e.input2text){let t=lt(this);t&&t.isFormWidget&&(o=o.replace(t.el().outerHTML,()=>t.isChecked?'<div class="f-wdbr">'+t.text+"</div>":""))}else{let t=this.outerHTML,e=t.replace(/ checked=""/,"");this.checked&&(e=e.replace(/>$/," checked>")),o=o.replace(t,e)}}),e.input2text&<.q("input[type=hidden]",i).each(function(){var t=lt(this);t&&t.isFormWidget&&"w-hidden"!=t.$options.name&&(o=o.replace(t.el("form").outerHTML,()=>'<div class="f-wdbr f-print-input-text">'+t.formText()+"</div>"))}),lt.q(".w-input-placeholder",i).each(function(){o=o.replace(this.outerHTML,"")});return s=!1!==e.print?function(){let t=window.frames.wPrintFrame;return t||(lt.q("<div class=f-none><iframe name=wPrintFrame></iframe></div>").appendTo(document.body),t=window.frames.wPrintFrame),t}():window.open(),i=s.document,i.open("text/html","replace"),i.write("<!doctype html><html class=f-print><head><meta charset=utf-8><title>"+lt.loc.print_preview+'</title><style>.f-print .w-f-remark{height:auto;line-height:inherit}.f-print-input-text{line-height: var(--w-label-min-height);}.w-input{display: flex!important;}.w-input-s{word-break:normal;white-space:normal}.w-input-s:empty:before{content:" "}</style><script>var $={e:function(){}}<\/script>'+r.join("")+(e.head||"")+"</head><body><div class=x-print>"+o+"</div>"+(!1!==e.print?"<script>window.print();window.close()<\/script>":"")+"</body></html>"),i.close(),i};const rt=function(t,e){if(!t||t instanceof FormData)return t;return"application/x-www-form-urlencoded"==(lt.lodash.get(e,'headers["Content-Type"]')||lt.lodash.get(lt.x,'http.headers.post["Content-Type"]'))?l.stringify(t,{arrayFormat:"repeat"}):t};function ot(t,e){e.value?t.setAttribute("w-form-ignore",""):t.removeAttribute("w-form-ignore")}lt.ajax=async function(t,e){let i=e?lt.urlFormat(t.src,e):t.src;if(!i&&!t.request)return Promise.reject("$.ajax(): The first parameter must be an object, and the property(src) of the object is required.");let s=lt.lodash.pick(t,["headers","responseType","transformRequest","transformResponse","timeout","cancelToken"]);if(t.download&<.extend(s,{responseType:"blob"}),t.request)return t.request(t.data);{let e=(t.method||(t.data?"post":"get")).toLowerCase();return("post"===e||"put"===e||"patch"===e?lt.http[e](i,rt(t.data,s),s):lt.http[e](i,s)).then(e=>{let i=e.data;if(t.filter&&(i=t.filter(e)),t.success&&t.success(i),t.complete&&t.complete(e),t.download){let t=e.headers["content-disposition"];if(t){let i=decodeURI(t.substring(t.indexOf("filename=")+9,t.length)),s=new Blob([e.data]),l=document.createElement("a");l.href=URL.createObjectURL(s),l.download=i,l.click(),l.remove()}else console.error("download: none content-disposition")}return i}).catch(e=>(t.error&&t.error(e),t.complete&&t.complete(e.response,e),Promise.reject(e)))}},lt.extend(lt.ajax,{get:(t,e)=>lt.http.get(t,e).then(t=>t&&t.data),head:(t,e)=>lt.http.head(t,e),delete:(t,e)=>lt.http.delete(t,e).then(t=>t&&t.data),post:(t,e,i)=>lt.http.post(t,rt(e,i),i).then(t=>t&&t.data),put:(t,e,i)=>lt.http.put(t,rt(e,i),i).then(t=>t&&t.data),patch:(t,e,i)=>lt.http.patch(t,rt(e,i),i).then(t=>t&&t.data)},i),lt.alert=function(t,e,i,s){return lt.docView.pop("w-alert","object"==typeof t?{title:lt.loc.opertip,...t}:{title:lt.loc.opertip,text:t,position:e,timeout:i,yes:s})},lt.confirm=function(t,e,i,s=!0){return lt.docView.pop("w-confirm","object"==typeof t?{title:lt.loc.opertip,...t}:{title:lt.loc.opertip,text:t,yes:e,no:i,cover:s})},lt.dialog=t=>{if(t){for(t=lt.vm(t);t&&!t.isDialog;)t=t.ownerView;return t}},lt.config=function(t){lt.config_uid=d(),lt.mergeDeep(lt.x,t),t.http&&(lt.mergeDeep(i.defaults,t.http),i.interceptors.response.use(t.http.filter,t.http.error||function(t){return t.response&&(t.callback=()=>lt.alert({icon:".f-i .f-i-alert-warning",text:t.response.status+": "+t.config.url})),Promise.reject(t)}));const e=lt.x.defaultOptions;for(let t in e)if(t.includes(".")){let i=lt.strFrom(t,".").replace(/\./g," "),s=lt.strTo(t,".");(lt.dfclsCache[s]||(lt.dfclsCache[s]={}))[i]=e[t]}},lt.pop=(t,e,i,s)=>(i?lt(i):lt.vm()).pop(t,e,{mode:s}),lt.submit=(t,e={})=>(lt(e.target)||lt.vm()).submit(t,e),lt.symbol={leafSymbol:Symbol("leaf"),changeSymbol:Symbol("change")},window.addEventListener("unhandledrejection",t=>{lt.x.catchReject?lt.x.catchReject(t):(t.reason&&(t.reason.callback?t.reason.callback():"string"==typeof t.reason&&console.error(t.reason)),t.preventDefault())});var at={created:ot,updated:ot};function nt(t){let e=lt.dialog(t.currentTarget);if(e&&!1!==e.x.movable&&!e.x.fullScreen){let i,s=e.el(),l=s.style.left,r=s.style.right,o=s.style.top,a=s.style.bottom,n=a?-1:1,h=r?-1:1,c=n<0?"bottom":"top",u=h<0?"right":"left",d=t.clientX,p=t.clientY,m=lt.number(n<0?a:o),f=lt.number(h<0?r:l),x=document.documentElement.clientHeight,g=document.documentElement.clientWidth;lt.moveup(function(t){i||(i=lt.q("<div class=w-dialog-move-helper></div>").appendTo(document.body),e.el().style.transition="none");let s=lt.numRange(t.clientX,0,g),l=lt.numRange(t.clientY,0,x);e.setPosition({[c]:m+n*(l-p)+"px",[u]:f+h*(s-d)+"px"})},function(t,s){s&&i&&i.remove(),e.el().style.transition=""},t)}}var ht={mounted(t,e){e.value&&t.addEventListener("mousedown",nt)},unmounted(t){t.removeEventListener("mousedown",nt)}};function ct(t,e){t.style.setProperty("--v-label-width",lt.unitSize(e.value))}var ut={created:ct,updated:ct};function dt(t){t.directive("form-ignore",at),t.directive("dialog-move",ht),t.directive("label-width",ut)}const pt={};var mt={props:["data","width","height","colspan","rowspan","ownproperty","orientUid"],data(){return{isWidget:!0,uid:this.orientUid||lt.uid(),runtimeX:{}}},created(){lt.vueMap.set(this.uid,this);let t=this.getDefaultProp(),e=lt.config_uid,i={};this.x=new Proxy(this.runtimeX,{get:(i,s)=>s in i?i[s]:void 0!==this.$props[s]?this.$props[s]:(e!=lt.config_uid&&(e=lt.config_uid,t=this.getDefaultProp()),t[s]),set:(t,e,s)=>(i[e]||(i[e]=this.$watch(e,i=>t[e]=i)),t[e]=s,!0)})},unmounted(){lt.vueMap.delete(this.uid)},methods:{x_default(){},getDefaultProp(){let t;if(!this.ownproperty){let e=this.$options.name;if(t=lt.x.defaultOptions[e],lt.dfclsCache[e]){let i,s=this.$options.name+(this.$attrs.class?" "+this.$attrs.class:""),l=lt.dfclsCache[e];for(let t in l)lt.idsAll(s,t," ")&<.mergeDeep(i||(i={}),l[t]);i&&(t=lt.extendDeep(i,t))}}return{...this.x_default(),...t}},attr(t,e){if(2!=arguments.length)return this.x[t];this.x[t]=e},ajax(t){return this.setLoading&&this.setLoading(),lt.ajax(t).then(t=>(this.setLoading&&this.setLoading(!1),t))},submit(t,e){return"object"==typeof t&&(e=t,t=null),e||(e={}),t&&(e.request=t),new Promise(async t=>{await r.nextTick();const i=lt.vm(this);if(this.setLoading&&this.setLoading(),await i.valid(e.range,e.group)){let s=i.getPostData(e.range);e.data=e.data&&s?lt.extend({},e.data,s):e.data||s,t(this.ajax(e))}else this.setLoading&&this.setLoading(!1)})},pop(t,e,i){return lt.vm(this).createPop(this,t,e,i)},closePop(t){const e=lt.vm(this);e.getPops(t).forEach(t=>e.removePop(t))},createEvent(t,e){return{type:t,uid:this.uid,...e}},trigger(t,...e){let i=t.runType||t.type||t,s=this.getOn(i);s&&("string"==typeof t&&(t=this.createEvent(t)),Array.isArray(s)?s.forEach(i=>i(t,...e)):s(t,...e))},getOn(t){let e="on"+t.charAt(0).toUpperCase()+t.slice(1);return this.$.vnode.props&&this.$.vnode.props[e]||this.x[e]},getKey(){return this.$.vnode.key},closest(t,e){let i=this;const s=typeof t;do{if("string"===s){if(lt.idsAny(t,i.$options.name))return i}else if("function"===s&&t(i))return i;if(i.isDialog||i==e)return}while(i=i.$parent)},contains(t){return t&&this.el()&&this.el().contains(t.isWidget?t.el():t)},el(t){if(t&&/\W/.test(t)){const e=this.el();return e&<.q(t,e)[0]}return document.getElementById(this.uid+(t||""))},snapElem(){return this.el()},scrollIntoView(t=!1){const e=(e,i)=>{let s="hasScroll"+e.toUpperCase(),l=this.closest(t=>t[s]&&(t.scrollState()||!1)[e]);l?l.scrollTo(this,t.hasOwnProperty("y")?t.y:"auto",t.x,null==t.ease?200:t.ease,t.divide,i):i&&i()};e("y",()=>e("x",t.success))},hasBubble(t){if(!t)return!1;if(this.contains(t))return!0;let e=lt.dialog(t);return e&&e.commander?e.commander===t||this.hasBubble(e.commander):void 0},bind(t,e){let i=pt[this.uid]||(pt[this.uid]={});return i[t]||(i[t]=e||this[t]),i[t]},slots_children(t){return lt.slotsChildren(this.$slots,t)},slot(t="default"){return this.$slots[t]?this.$slots[t]():[]},html_icon(t,e,i){const s=t.startsWith(".")&&!t.includes("/"),l=this.$.vnode.scopeId||"";return s?r.h("i",{[`${l}`]:"",class:[e,t.replace(/\./g,"")],onclick:i}):r.h("img",{src:t,onclick:i,class:e,[`${l}`]:""})},html_slots(){return this.$slots},html_self(t){return r.h(this.tagName||"div",t?r.mergeProps(this.html_attrs,this.html_props,this.$attrs):r.mergeProps(this.html_attrs,this.html_props),this.html_slots())},html(){return this.html_self()}},computed:{dfish:()=>lt,ownerView(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},pubParent(){return this.providePubParent&<.idsAny(this.$options.pubParentName,this.providePubParent.$options.name)&&this.providePubParent},parentNode(){return lt(this.el().parentElement)},tagName:()=>"div",html_attrs(){return{id:this.uid,class:[this.$options.name,this.html_class],style:[{width:this.x.width&<.unitSize(this.x.width),height:this.x.height&<.unitSize(this.x.height),"--w-grid-colspan":this.x.colspan&&-1!=this.x.colspan?`span ${this.x.colspan}`:null,"--w-grid-rowspan":this.x.rowspan&&-1!=this.x.rowspan?`span ${this.x.rowspan}`:null},this.html_style],"w-key":this.getKey(),"w-width":"*"===this.x.width?"*":null,"w-height":"*"===this.x.height?"*":null}},html_style(){},html_class(){},html_props(){},html_binds(){return r.mergeProps(this.html_attrs,this.html_props,this.$attrs)}},render(){return this.html()},__file:"src/widgets/WidgetAbs.vue"},ft={props:["src","children","parentItem"],data:()=>({loading:!1,loaded:!1}),methods:{getSrc(){return(this.x||this.$props).src},request(t){let e=this.getSrc();if(e&&!this.loading&&(this.showLoading(!0),"function"==typeof e))return e(this).then(e=>{this.showLoading(!1),this.loaded=!0,t&&t()}).catch(t=>{this.showLoading(!1),this.loaded=!0})},showLoading(t){this.loading=t}},__file:"src/widgets/SrcParent.vue"},xt={name:"w-view",mixins:[ft],provide(){return{provideView:this}},props:["commands"],data:()=>({isView:!0,pops:[]}),beforeCreate(){this.popCommanders={}},methods:{find(t){const e=this.el().querySelectorAll(`[w-key="${t}"]`);for(let t of e)if((t=lt(t))&&t.ownerView===this)return t},fv(t,e){let i=this.f(t);if(2===arguments.length)i&&(i.groupFormVal?i.groupFormVal(e):i.val(e));else{if("object"!=typeof t)return i&&(i.groupFormVal?i.groupFormVal():i.formVal());for(let e in t)this.fv(e,t[e])}},f(t,e){return this.fAll(t,e)[0]},fAll(t,e){if("*"===t||null==t){for(var i,s,l=0,r=this.getFormList(e,!0),o=r.length,a=[];l<o;l++)(i=lt(r[l]))&&i!=s&&a.push(s=i);return a}let n=e?e.isWidget?e.el():e:this.el(),h=lt.q(':input[name="'+t+'"]',n);return h.length||(h=lt.q(':input[w-name="'+t+'"]',n)),lt.lodash.map(h.not("[w-form-ignore] :input"),t=>lt(t))},getFormList(t,e){let i,s=":input:not(button)"+(e?"":":not(:disabled)");if(t&&"string"==typeof t){let e="!"===t.charAt(0),l=t.replace(/\!/g,"").split(",").map(t=>`[w-key="${t}"] ${s}`);(l=l.join())&&(i=lt.q(e?`${s}:not(${l})`:l,this.el()))}else i=lt.q(s,Array.isArray(t)?lt.q(t.map(t=>lt.el(t))):t?lt.el(t):this.el());return i?lt.lodash.map(i.not("[w-form-ignore] :input")):[]},getPostData(t){let e={};return this.getFormList(t).forEach(t=>{let i=t.name,s=t.value;if(i){switch(t.type){case"text":"number"===t.getAttribute("w-valuetype")&&(s=s.replace(/[^\d\.-]/g,""));break;case"checkbox":if(!(t.value&&(t.checked||t.indeterminate&&t.getAttribute("w-partialsubmit"))))return null;break;case"radio":if(!t.value||!t.checked)return null;i=t.getAttribute("w-name")||i;break;case"select-one":if(t.selectedIndex<0)return null}s&&(s=lt.strTrim(s)),i in e?(Array.isArray(e[i])||(e[i]=[e[i]]),e[i].push(s)):e[i]=s}}),e},async getValidError(t){let e,i=this.getFormList(t);const s={};for(let t,l,r=0,o=i.length;r<o;r++)(t=lt(i[r]))&&t.isFormWidget&&(l=i[r].name in s?s[i[r].name]&<.extend({wid:t.uid},s[i[r].name]):await t.getValidError(),l&&(e||(e=[]),e.find(t=>t.wid==l.wid)||e.push(l))),"checkbox"!==i[r].type&&"radio"!==i[r].type||(s[i[r].name]=l);return e},async valid(t){this._err_ns&&this._err_ns.forEach(t=>{const e=lt.vueMap.get(t.wid);e&&e.warn(!1)});let e=await this.getValidError(t);return e&&(e.forEach(t=>lt.vueMap.get(t.wid).warn()),lt.vueMap.get(e[0].wid).showErrorTip(e[0].text)),!(this._err_ns=e)},isModified(t,e){return this.getFormList(t).find(t=>(t=lt(t)).isModified&&t.isModified(e))},saveModified(t,e){this.getFormList(t).forEach(t=>(t=lt(t)).saveModified&&t.saveModified(e))},resetFormStyle(t){this.getFormList(t).forEach(t=>{const e=lt(t);e.warn&&e.warn(!1)})},resetForm(t,e){this.getFormList(t).forEach(t=>{const i=lt(t);i.reset&&i.reset(e)})},showLoading(t){if(!1!==t)return this.pop("w-loading",{cover:!0,local:!0,...t});this.pop("w-loading",!1)},createPop(t,e,i,s={}){return new Promise((l,r)=>{const o=s.mode||"multiple",a=this.getPops(e)[0];if(a){if("component"===o)return void Object.assign(a,{props:i,options:s,resolve:l,reject:r});if("single"===o){let t=this.pops.indexOf(a);this.pops.splice(t,1)}}const n=lt.uid();this.pops.push({commander:t,template:e,props:i,options:s,orientUid:n,resolve:l,reject:r})})},removePop(t){let e="string"==typeof t?this.pops.findIndex(e=>e.orientUid==t):this.pops.indexOf(t);e>-1&&this.pops.splice(e,1)},getPops(t,e){return this.pops.filter(i=>(!t||r.toRaw(i.template)==r.toRaw(t))&&(!e||i.commander==e))},getPopById(t){return this.pops.find(e=>e.orientUid==t)},html_pops(){return this.pops.map(({template:t,orientUid:e,props:i})=>{const s="string"==typeof t?r.resolveComponent(t):r.toRaw(t);return s&&r.h(s,{key:e,orientUid:e,...i})})}},__file:"src/widgets/ViewAbs.vue"},gt={name:"SVGIcon"};const vt={style:{display:"none",width:"0",height:"0"},width:"0",height:"0",focusable:"false","aria-hidden":"true"};gt.render=function(t,e,i,s,l,o){return r.openBlock(),r.createElementBlock("svg",vt,e[0]||(e[0]=[r.createStaticVNode('<symbol id="f-svg-loading" viewBox="0 0 50 50"><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" transform="rotate(86.9154 25 25)"></path></symbol><symbol id="f-svg-loading-1" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20"></circle></symbol><symbol id="f-svg-loading-2" viewBox="0 0 24 30"><rect x="0" y="8.66115" width="4" height="12.6777" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="8" y="6.16115" width="4" height="17.6777" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="16" y="6.33885" width="4" height="17.3223" opacity="0.2"><animate attributeName="opacity" values="0.2; 1; .2" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="height" values="10; 20; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" values="10; 5; 10" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate></rect></symbol>',3),r.createElementVNode("symbol",{id:"f-svg-loading-3",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{d:"M514.048 337.715a32 32 0 0 1-32-32V135.168a32 32 0 1 1 64 0v170.534a32 32 0 0 1-32 32z m-1.28 581.799a32 32 0 0 1-32-32V714.406a32 32 0 1 1 64 0v173.095a32 32 0 0 1-32 32zM305.011 543.347H135.744a32 32 0 0 1 0-64h169.267a32 32 0 0 1 0 64z m583.079 0H713.83a32 32 0 0 1 0-64h174.26a32 32 0 1 1 0 64zM245.978 806.4a32 32 0 0 1-22.656-54.669L342.643 632.32a32 32 0 0 1 45.325 45.325L268.646 796.979a31.898 31.898 0 0 1-22.668 9.344z m408.435-408.5a32 32 0 0 1-22.656-54.68l123.558-123.56a32 32 0 1 1 45.325 45.3L677.12 388.544a31.898 31.898 0 0 1-22.669 9.357z m121.523 411.06a31.885 31.885 0 0 1-22.669-9.344l-122.15-122.15a32 32 0 1 1 45.325-45.325l122.15 122.15a32 32 0 0 1-22.656 54.669zM364.672 397.632a31.923 31.923 0 0 1-22.669-9.344L221.273 267.52a32 32 0 1 1 45.325-45.325l120.73 120.743a32 32 0 0 1-22.656 54.668z m0 0","p-id":"4486"})],-1)]))},gt.__file="src/assets/SVGIcon.vue";var wt={props:["data"],data(){return{rotate:{},current:lt.lodash.get(this.data,"options.current",0)}},methods:{close(){lt.close(this)},rot(t){let e=this.$refs.swiper.focusIndex,i=this.rotate[e];null==i&&(i=this.rotate[e]=0);let s=this.$refs.swiper.getCurrentItem().el(),l=lt.bcr(s),r=l.width-40,o=l.height-80;t>0?i+=90:t<0&&(i-=90);let a=i/90%2;lt.q("._img",s).css({transform:"rotate("+i+"deg)",maxWidth:a?o:r,maxHeight:a?r:o}),this.rotate[e]=i}},computed:{loc:()=>lt.loc},mounted(){}};const bt={class:"f-height f-rel f-oh"},_t=["src"],yt={class:"_rotate"};wt.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-swiper-item"),n=r.resolveComponent("w-swiper"),h=r.resolveComponent("w-video"),c=r.resolveComponent("w-dialog");return r.openBlock(),r.createBlock(c,{class:"f-dialog-preview",width:"calc(100% - 100px)",height:"calc(100% - 100px)",ownproperty:!0,cover:!0,autoHide:!0},{default:r.withCtx(()=>["image"==i.data.type?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(n,{ref:"swiper",class:"f-height",current:l.current,arrow:i.data.imgs.length>1,"indicator-dots":i.data.imgs.length>1,duration:"300"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.data.imgs,(t,e)=>(r.openBlock(),r.createBlock(a,{key:e},{default:r.withCtx(()=>[r.createElementVNode("div",bt,[r.createElementVNode("img",{class:"_img",src:t},null,8,_t)])]),_:2},1024))),128))]),_:1},8,["current","arrow","indicator-dots"]),r.createElementVNode("div",yt,[r.createElementVNode("a",{class:"_l",onClick:e[0]||(e[0]=t=>o.rot(-1))},r.toDisplayString(o.loc.rotate_left),1),e[3]||(e[3]=r.createElementVNode("span",{class:"_s"},"|",-1)),r.createElementVNode("a",{class:"_r",onClick:e[1]||(e[1]=t=>o.rot(1))},r.toDisplayString(o.loc.rotate_right),1)])],64)):(r.openBlock(),r.createBlock(h,{key:1,class:"f-height",src:i.data.src},null,8,["src"])),r.createElementVNode("div",{class:"_dlg_x",onClick:e[2]||(e[2]=(...t)=>o.close&&o.close(...t))})]),_:1})},wt.__file="src/template/TemplatePreviewMedia.vue";var kt={props:["data"],data(){let t=this.data.format||"yyyy-MM-dd",e=this.data&&this.data.value?lt.dateParse(this.data.value,t):new Date,i=this.data&&this.data.minValue&<.dateParse(this.data.minValue,t),s=this.data&&this.data.maxValue&<.dateParse(this.data.maxValue,t);e=lt.numRange(e,i,s);let l,r,o,a=e.getFullYear();return t.includes("w")&&(l=lt.dateWeek(e)[1],r=lt.dateWeekFirst(a),o=lt.dateWeekLast(a)),{focusYear:a,focusMonth:e.getMonth(),focusDate:e.getDate(),focusHour:e.getHours(),focusMinute:e.getMinutes(),focusSecond:e.getSeconds(),startYear:lt.numRange(e.getFullYear()-30,i&&i.getFullYear()),endYear:lt.numRange(e.getFullYear()+30,null,s&&s.getFullYear()),monthDays:new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),focusWeek:l,weekFirst:r,weekLast:o,minTime:i,maxTime:s,format:t}},watch:{focusYear(t){t==this.yearList[0]&&t>1030?this.startYear=lt.numRange(this.startYear-30,this.minYear):t==this.yearList.at(-1)&&(this.endYear=lt.numRange(this.endYear+30,null,this.maxYear)),this.monthDays=new Date(t,this.focusMonth+1,0).getDate(),this.hasWeek&&(this.weekFirst=lt.dateWeekFirst(t),this.weekLast=lt.dateWeekLast(t))},focusMonth(t){this.monthDays=new Date(this.focusYear,t+1,0).getDate()}},methods:{weekText(t){},clickCancel(){lt.close(this)},clickOK(t){if(this.data.success){let e=this.hasWeek?lt.dateParse(`${this.focusYear}-${this.focusWeek}`,"yyyy-ww"):new Date(this.focusYear,this.focusMonth,this.focusDate,this.focusHour,this.focusMinute,this.focusSecond);this.data.success(lt.dateFormat(e,this.format),t)}lt.close(this)}},computed:{dfish:()=>lt,yearList(){return Array.from(Array(this.endYear-this.startYear+1)).map((t,e)=>this.startYear+e)},monthList:()=>Array.from(Array(12)).map((t,e)=>e),dateList(){return Array.from(Array(this.monthDays)).map((t,e)=>e+1)},hourList:()=>Array.from(Array(24)).map((t,e)=>e),minuteList:()=>Array.from(Array(60)).map((t,e)=>e),secondList:()=>Array.from(Array(60)).map((t,e)=>e),weekList(){let t=this.weekFirst[2];return Array.from(Array(this.weekLast[1])).map((e,i)=>{let s=t,l=lt.dateAdd(t,"d",6);return t=lt.dateAdd(t,"d",7),{value:i+1,text:`${lt.strPad(i+1)} (${lt.dateFormat(s,"MM.dd")} - ${lt.dateFormat(l,"MM.dd")})`}})},hasYear(){return this.format.includes("y")},hasMonth(){return this.format.includes("M")},hasDate(){return this.format.includes("d")},hasHour(){return this.format.includes("H")},hasMinute(){return this.format.includes("m")},hasSecond(){return this.format.includes("s")},hasWeek(){return this.format.includes("w")},minYear(){return this.minTime&&this.hasYear&&this.minTime.getFullYear()},maxYear(){return this.maxTime&&this.hasYear&&this.maxTime.getFullYear()},minMonth(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&this.minTime.getMonth()},maxMonth(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&this.maxTime.getMonth()},minDate(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&this.minTime.getDate()},maxDate(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&this.maxTime.getDate()},minHour(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&this.minTime.getHours()},maxHour(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&this.maxTime.getHours()},minMinute(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&this.minTime.getMinutes()},maxMinute(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&this.maxTime.getMinutes()},minSecond(){return this.minTime&&(!this.hasYear||this.minYear==this.focusYear)&&(!this.hasMonth||this.minMonth==this.focusMonth)&&(!this.hasDate||this.minDate==this.focusDate)&&(!this.hasHour||this.minHour==this.focusHour)&&(!this.hasMinute||this.minMinute==this.focusMinute)&&this.minTime.getSeconds()},maxSecond(){return this.maxTime&&(!this.hasYear||this.maxYear==this.focusYear)&&(!this.hasMonth||this.maxMonth==this.focusMonth)&&(!this.hasDate||this.maxDate==this.focusDate)&&(!this.hasHour||this.maxHour==this.focusHour)&&(!this.hasMinute||this.maxMinute==this.focusMinute)&&this.maxTime.getSeconds()},minWeek(){},maxWeek(){}}};kt.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-button"),n=r.resolveComponent("w-buttonbar"),h=r.resolveComponent("w-html"),c=r.resolveComponent("w-option"),u=r.resolveComponent("w-slidepicker"),d=r.resolveComponent("w-vertical"),p=r.resolveComponent("w-horizontal"),m=r.resolveComponent("w-dialog");return r.openBlock(),r.createBlock(m,{class:"f-datesheet"},{default:r.withCtx(()=>[r.createVNode(n,{class:"f-datesheet-bbr",align:"between",height:"52",style:{padding:"0 10px"}},{default:r.withCtx(()=>[r.createVNode(a,{text:"取消",onClick:o.clickCancel},null,8,["onClick"]),r.createVNode(a,{text:"确定",onClick:o.clickOK,face:"primary"},null,8,["onClick"])]),_:1}),r.createVNode(p,{height:"*"},{default:r.withCtx(()=>[o.hasYear?(r.openBlock(),r.createBlock(d,{key:0,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[7]||(e[7]=[r.createTextVNode("年")])),_:1,__:[7]}),r.createVNode(u,{height:"*",modelValue:l.focusYear,"onUpdate:modelValue":e[0]||(e[0]=t=>l.focusYear=t),"min-value":o.minYear,"max-value":o.maxYear,"keep-index":!0,data:{mode:"year"}},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.yearList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:t},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasMonth?(r.openBlock(),r.createBlock(d,{key:1,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[8]||(e[8]=[r.createTextVNode("月")])),_:1,__:[8]}),r.createVNode(u,{height:"*",modelValue:l.focusMonth,"onUpdate:modelValue":e[1]||(e[1]=t=>l.focusMonth=t),"min-value":o.minMonth,"max-value":o.maxMonth,"keep-index":!0,data:{mode:"month"}},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.monthList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t+1)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasDate?(r.openBlock(),r.createBlock(d,{key:2,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[9]||(e[9]=[r.createTextVNode("日")])),_:1,__:[9]}),r.createVNode(u,{height:"*",modelValue:l.focusDate,"onUpdate:modelValue":e[2]||(e[2]=t=>l.focusDate=t),"min-value":o.minDate,"max-value":o.maxDate,"keep-index":!0,data:{mode:"date"}},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.dateList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasHour?(r.openBlock(),r.createBlock(d,{key:3,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[10]||(e[10]=[r.createTextVNode("时")])),_:1,__:[10]}),r.createVNode(u,{height:"*",modelValue:l.focusHour,"onUpdate:modelValue":e[3]||(e[3]=t=>l.focusHour=t),"min-value":o.minHour,"max-value":o.maxHour,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.hourList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasMinute?(r.openBlock(),r.createBlock(d,{key:4,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[11]||(e[11]=[r.createTextVNode("分")])),_:1,__:[11]}),r.createVNode(u,{height:"*",modelValue:l.focusMinute,"onUpdate:modelValue":e[4]||(e[4]=t=>l.focusMinute=t),"min-value":o.minMinute,"max-value":o.maxMinute,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.minuteList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasSecond?(r.openBlock(),r.createBlock(d,{key:5,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[12]||(e[12]=[r.createTextVNode("秒")])),_:1,__:[12]}),r.createVNode(u,{height:"*",modelValue:l.focusSecond,"onUpdate:modelValue":e[5]||(e[5]=t=>l.focusSecond=t),"min-value":o.minSecond,"max-value":o.maxSecond,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.secondList,t=>(r.openBlock(),r.createBlock(c,{key:t,value:t,text:o.dfish.strPad(t)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0),o.hasWeek?(r.openBlock(),r.createBlock(d,{key:6,width:"*"},{default:r.withCtx(()=>[r.createVNode(h,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:r.withCtx(()=>e[13]||(e[13]=[r.createTextVNode("周")])),_:1,__:[13]}),r.createVNode(u,{height:"*",modelValue:l.focusWeek,"onUpdate:modelValue":e[6]||(e[6]=t=>l.focusWeek=t),"min-value":o.minWeek,"max-value":o.maxWeek,"keep-index":!0},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.weekList,t=>(r.openBlock(),r.createBlock(c,{key:t.value,value:t.value,text:t.text},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):r.createCommentVNode("v-if",!0)]),_:1})]),_:1})},kt.__file="src/template/TemplateDateSheet.vue";var Ct={name:"w-docview",mixins:[mt,xt],provide:()=>({providePubParent:null,provideBoxParent:null,provideRangeParent:null,provideCompatGap:null,provideMenu_w:null,provideTripleboxContainer:null}),beforeCreate(){lt.docView=this,lt.q(document.body).prepend("<div id=w-dfish-pops></div>")},methods:{el:()=>document.getElementById("app")||document.body,getKey:()=>null,previewVideo(t){this.pop(wt,{data:{type:"video",src:t}})},previewImage(t,e){this.pop(wt,{data:{type:"image",imgs:t,options:e}})},dateSheet(t,e){this.pop(kt,{template:kt,width:"100%",height:"55%",position:"b",cover:!0,autoHide:!0,data:t,on:{"click:cover":lt.close}})},html(){return[this.$slots.default?this.$slots.default():null,this.html_pops(),r.h(gt)]}},__file:"src/widgets/DocView.vue"},St=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var i=-1;return t.some(function(t,s){return t[0]===e&&(i=s,!0)}),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),s=this.__entries__[i];return s&&s[1]},e.prototype.set=function(e,i){var s=t(this.__entries__,e);~s?this.__entries__[s][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,s=t(i,e);~s&&i.splice(s,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,s=this.__entries__;i<s.length;i++){var l=s[i];t.call(e,l[1],l[0])}},e}()}(),Vt="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Tt="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Mt="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Tt):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)};var Pt=["top","right","bottom","left","width","height","size","weight"],$t="undefined"!=typeof MutationObserver,Bt=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,s=!1,l=0;function r(){i&&(i=!1,t()),s&&a()}function o(){Mt(r)}function a(){var t=Date.now();if(i){if(t-l<2)return;s=!0}else i=!0,s=!1,setTimeout(o,e);l=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){Vt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$t?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Vt&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;Pt.some(function(t){return!!~i.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),zt=function(t,e){for(var i=0,s=Object.keys(e);i<s.length;i++){var l=s[i];Object.defineProperty(t,l,{value:e[l],enumerable:!1,writable:!1,configurable:!0})}return t},Dt=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Tt},Et=It(0,0,0,0);function Nt(t){return parseFloat(t)||0}function Lt(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(e,i){return e+Nt(t["border-"+i+"-width"])},0)}function Ft(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return Et;var s=Dt(t).getComputedStyle(t),l=function(t){for(var e={},i=0,s=["top","right","bottom","left"];i<s.length;i++){var l=s[i],r=t["padding-"+l];e[l]=Nt(r)}return e}(s),r=l.left+l.right,o=l.top+l.bottom,a=Nt(s.width),n=Nt(s.height);if("border-box"===s.boxSizing&&(Math.round(a+r)!==e&&(a-=Lt(s,"left","right")+r),Math.round(n+o)!==i&&(n-=Lt(s,"top","bottom")+o)),!function(t){return t===Dt(t).document.documentElement}(t)){var h=Math.round(a+r)-e,c=Math.round(n+o)-i;1!==Math.abs(h)&&(a-=h),1!==Math.abs(c)&&(n-=c)}return It(l.left,l.top,a,n)}var At="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Dt(t).SVGGraphicsElement}:function(t){return t instanceof Dt(t).SVGElement&&"function"==typeof t.getBBox};function Ht(t){return Vt?At(t)?function(t){var e=t.getBBox();return It(0,0,e.width,e.height)}(t):Ft(t):Et}function It(t,e,i,s){return{x:t,y:e,width:i,height:s}}var Yt=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=It(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Ht(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),Ot=function(t,e){var i,s,l,r,o,a,n,h=(s=(i=e).x,l=i.y,r=i.width,o=i.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,n=Object.create(a.prototype),zt(n,{x:s,y:l,width:r,height:o,top:l,right:s+r,bottom:o+l,left:s}),n);zt(this,{target:t,contentRect:h})},jt=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new St,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Dt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Yt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Dt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new Ot(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),qt="undefined"!=typeof WeakMap?new WeakMap:new St,Rt=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Bt.getInstance(),s=new jt(e,i,this);qt.set(this,s)};["observe","unobserve","disconnect"].forEach(function(t){Rt.prototype[t]=function(){var e;return(e=qt.get(this))[t].apply(e,arguments)}});var Wt=void 0!==Tt.ResizeObserver?Tt.ResizeObserver:Rt,Ut={mixins:[mt],inject:["provideView"],__file:"src/widgets/WidgetBase.vue"};const Xt=function(t){if(this.wScrollPercentX){let e=t.target.scrollLeft;this.scrollXPosition=0==e?"left":e>=this.wScrollSizeX?"right":"center",this.el("wScrollBarThumbX").style.transform=`translateX(${e/this.wScrollPercentX}px)`}if(this.wScrollPercentY){let e=t.target.scrollTop;this.scrollYPosition=0==e?"top":e>=this.wScrollSizeY?"bottom":"middle",this.el("wScrollBarThumbY").style.transform=`translateY(${e/this.wScrollPercentY}px)`}this.onScroll(t)},Qt=function(t){let e,i,s,l,r,o=this.el("wScrollOverflow"),a=this.wScrollPercentX,n=this.wScrollPercentY;lt.moveup(h=>{e||(e=this.el("wScrollBarThumbX")===t.target?"X":"Y",i=t.clientX,s=t.clientY,l=o.scrollLeft,r=o.scrollTop,t.target.parentNode.classList.add("z-drag")),"X"===e?o.scrollLeft=l+(h.clientX-i)*a:o.scrollTop=r+(h.clientY-s)*n},(e,i)=>{i&&t.target.parentNode.classList.remove("z-drag")},t)};var Gt={mixins:[Ut],props:["scrollX","scrollY","scrollView","scrollFlex"],emits:["scroll","resize"],data:()=>({wScrollPercentX:!1,wScrollPercentY:!1,wScrollSizeX:!1,wScrollSizeY:!1,scrollXPosition:"left",scrollYPosition:"top",isDeactivated:!1}),watch:{scrollXPosition(t){this.onScrollPosition(t)},scrollYPosition(t){this.onScrollPosition(t)},wScrollPercentX(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-x",""):e.removeAttribute("w-scroll-show-x"))},wScrollPercentY(t){let e=this.el();e&&(t?e.setAttribute("w-scroll-show-y",""):e.removeAttribute("w-scroll-show-y"))}},methods:{onScroll(t){this.$emit("scroll",t)},onScrollPosition(){},onScrollAttributeChange(t){},onScrollResize(){},scrollTo(t,e,i,s,l,r){let o=this.ovf();if(!o)return r&&r();let a,n,h=this.el("wScrollCont")||o,c=lt.bcr(o),u=lt.bcr(h),d=t?lt.bcr(t):u;if(null!=e)if(isNaN(e))if(~e.indexOf("top")){a=0;let t=i.slice(3);t&&(a=o.scrollTop+ +t)}else if(~e.indexOf("bottom"))a=d.bottom-u.top-c.height+ +e.slice(6);else if("middle"===e)a=d.top-u.top-(c.height/2-d.height/2);else if("nearest"===e){let t=i.slice(7);t=t?t.split(","):[0,0],d.top-t[0]<c.top?a=o.scrollTop-c.top+d.top-t[0]:d.bottom>c.bottom-t[1]&&(a=o.scrollTop+d.bottom-c.bottom+ +t[1])}else(d.top<c.top||d.bottom>c.bottom)&&(a=d.top-u.top-(c.height/2-d.height/2));else a=lt.number(e),t&&(a=d.top-u.top-a);if(null!=i)if(isNaN(i))if(~i.indexOf("left")){n=0;let t=i.slice(4);t&&(n=o.scrollLeft+ +t)}else if(~i.indexOf("right"))n=d.right-u.left-c.width+ +i.slice(5);else if("center"===i)n=d.left-u.left-(c.width/2-d.width/2);else if(~i.indexOf("nearest")){let t=i.slice(7);t=t?t.split(","):[0,0],d.left-t[0]<c.left?n=o.scrollLeft-c.left+d.left-t[0]:d.right>c.right-t[1]&&(n=o.scrollLeft+d.right-c.right+ +t[1])}else(d.left<c.left||d.right>c.right)&&(n=d.left-u.left-(c.width/2-d.width/2));else n=lt.number(i),t&&(n=d.left-u.left-n);if(null!=l&&(null!=a&&(a-=a%l),null!=n&&(n-=n%l)),!s||null==a&&null==n)null!=a&&(o.scrollTop=a),null!=n&&(o.scrollLeft=n),r&&r();else{let t=o.scrollTop,e=o.scrollLeft;lt.ease(i=>{null!=a&&(o.scrollTop=t+(a-t)*i),null!=n&&(o.scrollLeft=e+(n-e)*i),1===i&&r&&r()},s)}},scrollToY(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollTop;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,e,null,i,s,l)},scrollToX(t,e,i,s,l){if(0===arguments.length)return this.ovf().scrollLeft;"object"!=typeof t&&(l=s,s=i,i=e,e=t,t=null),"function"==typeof s&&(l=s,s=null),this.scrollTo(t,null,e,i,s,l)},ovf(){return lt.br.mobile?this.el():this.el("wScrollOverflow")||this.el("wScrollCont")},html_scroll_slots(t){return this.hasScrollX||this.hasScrollY?[r.h("div",{id:this.uid+"wScrollOverflow",class:"w-scroll-overflow",onscroll:Xt.bind(this),onmouseenter:this.initScroll},r.h("div",{class:"w-scroll-cont",style:this.html_scroll_cont_style,id:this.uid+"wScrollCont"},t||this.$slots.default&&this.$slots.default())),!lt.br.mobile&&this.hasScrollX&&[r.h("div",{class:"w-scrollbar-x",id:this.uid+"wScrollBarX",onmousedown:Qt.bind(this)},r.h("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbX"}))],!lt.br.mobile&&this.hasScrollY&&[r.h("div",{class:"w-scrollbar-y",id:this.uid+"wScrollBarY",onmousedown:Qt.bind(this)},r.h("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbY"}))]]:t||this.$slots.default&&this.$slots.default()},scrollState(){if(lt.br.mobile||!this.el("wScrollCont")||!this.el())return;const t=this.el("wScrollOverflow").getBoundingClientRect(),e=this.el("wScrollCont").getBoundingClientRect();let i,s;if(this.hasScrollX){let s=e.width>t.width&&e.width-t.width;s&&s<=1&&(s=!1),s&&(i={size:s,percent:t.width/e.width})}if(this.hasScrollY){let i=e.height>t.height&&e.height-t.height;i&&(s={size:i,percent:t.height/e.height})}return{x:i,y:s}},initScroll(){const t=this.scrollState();if(!t)return;const e=this.el().getBoundingClientRect(),{x:i,y:s}=t;if(i){let t=i.percent*e.width;this.el("wScrollBarThumbX").style.width=Math.max(20,t)+"px",this.wScrollSizeX=i.size,this.wScrollPercentX=i.size&&i.size/((1-i.percent)*(e.width-(t<20?20-t:0)))}else this.wScrollSizeX=this.wScrollPercentX=!1;if(s){let t=s.percent*e.height;this.el("wScrollBarThumbY").style.height=Math.max(20,t)+"px",this.wScrollSizeY=s.size,this.wScrollPercentY=s.size&&s.size/((1-s.percent)*(e.height-(t<20?20-t:0)))}else this.wScrollSizeY=this.wScrollPercentY=!1},scroll_observe_overflow(t){this.$emit("resize"),this.scroll_observe(t)},scroll_observe(t){this.isDeactivated||(this.initScroll(),this.onScrollResize(t),this.el("wScrollOverflow")&&this.el("wScrollOverflow").dispatchEvent(new Event("scroll")))}},computed:{hasScrollX(){return this.x.scrollX},hasScrollY(){return this.x.scrollY},html_scroll_cont_style(){},html_scroll_class(){let t=this.hasScrollX,e=this.hasScrollY;return{"w-scroll":t||e,"w-scroll-x":t,"w-scroll-y":e,"w-scroll-flex":this.x.scrollFlex}}},mounted(){this.x.scrollView&&this.el()&&setTimeout(()=>{let t=this.el().querySelector(this.x.scrollView);t&&this.scrollToY(t,"middle")}),lt.br.mobile||!this.hasScrollX&&!this.hasScrollY||(this.el("wScrollOverflow")&&new Wt(this.scroll_observe_overflow).observe(this.el("wScrollOverflow")),this.el("wScrollCont")&&new Wt(this.scroll_observe).observe(this.el("wScrollCont")),this.el()&&new MutationObserver(this.onScrollAttributeChange).observe(this.el(),{attributes:!0}))},deactivated(){this.isDeactivated=!0},activated(){this.isDeactivated=!1,this.hasScrollY&&this.el("wScrollBarThumbY")&&this.scrollToY(lt.number(this.el("wScrollBarThumbY").style.transform)*this.wScrollPercentY),this.hasScrollX&&this.el("wScrollBarThumbX")&&this.scrollToX(lt.number(this.el("wScrollBarThumbX").style.transform)*this.wScrollPercentX)},__file:"src/widgets/Scroll.vue"},Jt={props:["align","valign","gap"],computed:{dir:()=>"h",html_align_class(){return[this.x.align&&"z-"+(this.x.vertical?"v":this.dir)+"-align-"+this.x.align,this.x.valign&&"z-"+(this.x.vertical?"v":this.dir)+"-valign-"+this.x.valign]}},__file:"src/widgets/AlignParent.vue"},Kt={name:"w-horizontal",mixins:[Gt,Jt],props:["br","reverse"],provide(){return{provideLayout:this.$options.name,provideCompatGap:this.compatGap}},inject:["provideCompatGap"],methods:{html_slots(){return this.html_scroll_slots()}},computed:{dir:()=>"h",compatGap(){return lt.br.compat.gap?this.x?this.x.gap:this.gap:null},html_props_on(){},html_props(){let t=this.x.gap;return{class:[this.html_scroll_class,this.html_align_class,{"z-br":this.x.br,[`f-${this.dir}-gap${this.x.reverse?"-reverse":""}`]:null!=t&&""!==t&&(lt.br.compat.gap||t<0)}],style:!this.x.scrollX&&!this.x.scrollY&&this.html_scroll_cont_style,...this.html_props_on}},html_scroll_cont_style(){let t=this.x.gap,e={};return null!=t&&(e.gap=lt.unitSize(t)),(lt.br.compat.gap||t<0)&&(e["--w-gap"]=lt.unitSize(t)),lt.br.compat.gap&&null!=this.provideCompatGap&&(e["--w-compat-gap"]=lt.unitSize(this.provideCompatGap)),this.x.reverse&&(e["flex-direction"]=("h"==this.dir?"row":"column")+"-reverse"),e}},__file:"src/widgets/Horizontal.vue"},Zt={name:"w-vertical",mixins:[Kt],computed:{dir:()=>"v"},__file:"src/widgets/Vertical.vue"},te={name:"w-view",mixins:[Zt,xt],inject:["provideView"],methods:{html_slots(){return[this.html_scroll_slots(),this.html_pops()]}},computed:{html_class(){return["w-vertical f-rel",this.html_scroll_class]}},__file:"src/widgets/View.vue"},ee={__name:"DialogTarget",setup(t){const e=r.inject("provideView",null),i=e&&e.provideView;return r.provide("provideView",i),(t,e)=>r.renderSlot(t.$slots,"default")},__file:"src/widgets/DialogTarget.vue"};const ie={},se=!0,le=!1,re={t:"tt",r:"rr",b:"bb",l:"ll",c:"cc",lt:"11",tl:"11",tr:"22",rt:"22",rb:"33",br:"33",bl:"44",lb:"44","-t":"tb","-r":"rl","-b":"bt","-l":"lr","-c":"cc","-tl":"14","-tr":"23","-rt":"21","-rb":"34","-bl":"41","-br":"32","-lt":"12","-lb":"43"},oe=["minWidth","maxWidth","minHeight","maxHeight"];var ae={name:"w-dialog",mixins:[te],props:["title","autoHide","context","prong","independent","timeout","cover","coverProps","position","snap","indent","offsetRange","local","fullScreen","hoverShowDrop","visible",...oe],emits:["show","close","update:visible"],data:()=>({isDialog:!0,keepHover:!1,hoverTimer:null,hoverMove:null,animateState:null,isDeactivated:!1,_pos:null,snapStyle:null,unique:!1}),activated(){this.isDeactivated=!1},deactivated(){this.isDeactivated=!0},methods:{getKey:()=>null,getLocalElem(){if(!0===this.x.local){let t=this.getCommander();return t&<.el(t)}return"string"==typeof this.x.local?document.querySelector(this.x.local):this.x.local},snapTargetElem(){let t=this.x.snap;return"function"==typeof t?t():t?t.isWidget?t.snapElem():t:this.x.local?this.getLocalElem():this.defaultSnapTargetElem},fixSnapStyle(){let t=this._pos,e={};t.type?(t.pix_r?e.right=t.right:e.left=t.left,t.pix_b?(e.pix_b=!0,e.bottom=t.bottom):e.top=t.top,e.type=t.type):e=t,this.snapStyle=e},axis(){let t=this.x.position||this.defaultSnapPosition,e=t;if(this.slotTarget&&!this.x.visible)e={top:0,left:0};else if("string"==typeof t||!t){let s=this.el();if(!s||this.x.fullScreen)return;let l=this.x.local,r=this.snapTargetElem(),o=s.offsetWidth,a=s.offsetHeight,n=null!=this.x.indent?this.x.indent:this.x.prong&&-9;if(e=lt.snap(o,a,r,"string"==typeof(i=t)&&i.split(",").map(t=>re[t]||t).join(),this._fitpos,n,l&&r),!this.x.snap){let i=lt.q(`[w-dialog-position="${e.type}"]:not([id="${this.uid}"]):last`)[0];if(i){let s=lt(i)._pos;"tl"==t||"tr"==t||"t"==t?(e.top=s.top+s.height+5,e.bottom=s.bottom-s.height-5):"br"==t||"bl"==t||"b"==t?(e.top=s.top-s.height-5,e.bottom=s.bottom+s.height+5):"lb"==t||"lt"==t||"l"==t?(e.left=s.left+s.width+5,e.right=s.right-s.width-5):"rb"!=t&&"rt"!=t&&"r"!=t||(e.left=s.left-s.width-5,e.right=s.right+s.width+5)}this.animateState="animating"}}var i;this._pos=e,this.fixSnapStyle(),"string"==typeof this.x.position&&this.x.snap&&this.checkOutScreen()},setPosition(t){this.x.position=t},checkOutScreen(){let t=this._pos;t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},close(){!1!==this.x.visible&&(this.closeRelease(),this.trigger("close"),this.ownerView.removePop(this.uid),this.setVisible(!1))},closeRelease(){this.x.autoHide&&this.listenHide(le);let t=this.x.position,e=this._pos;if(t&&"string"==typeof t&&e&&this.el()){lt.q(`~[w-dialog-position="${e.type}"]`,this.el()).each((i,s)=>{const l=lt(s),r=l._pos;"tl"==t||"tr"==t||"t"==t?(r.top-=e.height+5,r.bottom+=e.height+5):"br"==t||"bl"==t||"b"==t?(r.top+=e.height+5,r.bottom-=e.height+5):"lb"==t||"lt"==t||"l"==t?(r.left-=e.width+5,r.right+=e.width+5):"rb"!=t&&"rt"!=t&&"r"!=t||(r.left+=e.width+5,r.right-=e.width+5),l.fixSnapStyle()})}},listenHide(t){t===le?this.setListenHide(t):setTimeout(()=>{!1!==this.x.visible&&this.setListenHide(t)},100)},setListenHide(t){let e=this.x.hoverShowDrop,i=t?"addEventListener":"removeEventListener",s=lt.br.firefox?"DOMMouseScroll":"mousewheel";if((lt.br.mobile?["touchend"]:["mousedown",s]).forEach(t=>document[i](t,this.bind("listenHideClose",t=>{let e;!1!==this.x.visible&&(t.target.classList.contains("w-dialog-cover")||this.isForceWheelHide&&t.type===s||!(this.hasBubble(t.target)||!this.x.independent&&((e=this.getCommander()).isWidget?e.hasBubble(t.target):e.contains(t.target))))&&(t.target.id==this.id+"cvr"&&t.stopPropagation(),this.close())}),se)),window.plus&&plus.key[i]("backbutton",this.bind("close"),le),e){let t=e===se?this.x.snap?this.snapTargetElem():lt.el(this.getCommander()):lt.el(e),s=this.bind("listenHideHoverOver",t=>{clearTimeout(this.hoverTimer),this.hoverTimer=null}),l=this.bind("listenHideHoverMove",e=>{t.contains(e.target)||this.hasBubble(e.target)||this.keepHover?s():this.hoverTimer||(this.hoverTimer=setTimeout(()=>{this.close(),s()},200))});[t,this.el()].forEach(t=>t&&t[i]("mouseenter",s)),document[i]("mousemove",l)}},autoSetMaxHeight(t){null==this.maxHeight&&(this.x.maxHeight=t)},setVisible(t){t=null==t||t,this.x.visible=t,this.$emit("update:visible",t),this.slotTarget&&(t?this.getTargetElem().setAttribute("w-pop-visible",""):this.getTargetElem().removeAttribute("w-pop-visible")),this.setVisibleSub(t)},setVisibleSub(t){},getTargetElem(){return this.$el?3===this.$el.nodeType?this.$el.nextElementSibling:this.$el:null},getPop(){return this.ownerView.getPopById(this.uid)},getCommander(){if(this.context)return this.context;let t=this.getPop();return t?t.commander:this.slotTarget?this.getTargetElem():this.ownerView},resolve(t){let e=this.getPop();e&&e.resolve&&e.resolve(t)},reject(t){let e=this.getPop();e&&e.reject&&e.reject(t)},html_slots_default:()=>null,html_slots(){let t,e=this._pos;if(this.x.prong&&e){let i=e.inner?e.mag_b?"b":e.mag_t?"t":e.mag_l?"l":"r":e.mag_b?"t":e.mag_t?"b":e.mag_l?"r":"l";t=r.h("div",{class:"w-dialog-prong z-"+i},[r.h("i",{class:"w-dialog-prong-out f-arw f-arw-"+i+"5"}),r.h("i",{class:"w-dialog-prong-in f-arw f-arw-"+i+"4"})])}return[t||[],this.html_scroll_slots(this.html_slots_default()),this.html_pops()]},html(){let t=this.x.local?this.getLocalElem():"#w-dfish-pops",e=null;if(this.x.cover&&!1!==this.x.visible&&!this.isDeactivated){let t={class:"w-dialog-cover f-abs-full",...this.scope_props};this.x.coverProps&&(t=r.mergeProps(t,this.x.coverProps)),e=r.h("div",t)}let i=[e,this.html_self(!0)],s=t?r.h(r.Teleport,{to:t},i):i;return this.slotTarget?[s,r.h(ee,null,{default:()=>[this.slotTarget()]})]:s}},computed:{commander(){return this.getCommander()},defaultSnapTargetElem(){},defaultSnapPosition:()=>"cc",isForceWheelHide:()=>!1,slotTarget(){return this.$slots.target},scope_props(){let t=this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}},html_props(){return{class:"w-dialog","w-dialog-position":(this._pos||ie).type,...this.scope_props}},html_class(){const t=this._pos||ie,e=this.x.position;return["w-vertical",this.html_align_class,this.html_scroll_class,{"z-hide":this.isDeactivated||(null!=this.x.visible?!this.x.visible:!!this.slotTarget),"z-full":this.x.fullScreen,["z-face-"+this.x.face]:this.x.face,["z-mag-"+(t.mag_t?"t":t.mag_l?"l":t.mag_b?"b":"r")]:t.type,["z-snap z-snap-"+t.type]:t.type,[`w-dialog-animate-${e}`]:re[e]&&"string"==typeof e&&"animating"!=this.animateState}]},html_style(){if(this.x.fullScreen)return{width:"100%",height:"100%",top:0,left:0};{let t=this.x.position,e=this.snapStyle,i={};t&&"object"==typeof t?(lt.extend(i,t),e&&(null==i.top&&null==i.bottom&<.extend(i,lt.lodash.pick(e,"top","bottom")),null==i.left&&null==i.right&<.extend(i,lt.lodash.pick(e,"left","right")))):e&<.extend(i,e);for(let t in i)i[t]=lt.unitSize(i[t]);return oe.forEach(t=>{null!=this.x[t]&&(i[t]=lt.unitSize(this.x[t]))}),i}}},mounted(){this.x.local&<.q(this.getLocalElem()).addClass("f-dialog-local-wrap"),this.$nextTick(()=>{if(this.$watch(()=>this.x.position,this.axis),this.$watch(()=>this.x.visible,t=>{!1!==t&&this.x.autoHide&&this.listenHide(se),this.axis()},{immediate:!0}),setTimeout(()=>{this.axis(),this.$nextTick(()=>this.trigger("show"))}),this.slotTarget){let t=this.getTargetElem();t&&(this.hoverShowDrop?t.addEventListener("mouseenter",()=>null==this.visible&&this.setVisible(),!1):t.addEventListener("click",t=>{t.stopPropagation(),null==this.visible&&this.setVisible()},!1))}new Wt(t=>{!1!==this.x.visible&&"animating"!=this.animateState&&this.el()&&this.axis()}).observe(this.el()),this.x.timeout&&setTimeout(this.close,this.x.timeout)})},unmounted(){!1!==this.x.visible&&this.closeRelease()},__file:"src/widgets/Dialog.vue"},ne={__name:"TemplateAlert",props:["text","escape","title","icon","button","showButton","yesText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},o=t=>{s("save",t)},a=t=>{s("close",t)},n=r.computed(()=>l[i.icon]||i.icon||l.info),h=r.computed(()=>i.yesText||"确定");return(e,i)=>{const s=r.resolveComponent("w-html"),l=r.resolveComponent("w-vertical"),c=r.resolveComponent("w-horizontal"),u=r.resolveComponent("w-img"),d=r.resolveComponent("w-button"),p=r.resolveComponent("w-buttonbar"),m=r.resolveDirective("dialog-move");return r.openBlock(),r.createBlock(l,{class:"w-alert-wrap"},{default:r.withCtx(()=>[r.createVNode(c,{class:"w-alert-head"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(l,{class:"w-alert-move","w-width":"*"},{default:r.withCtx(()=>[r.createVNode(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[m,!0]]),r.createVNode(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:r.withCtx(()=>i[0]||(i[0]=[r.createElementVNode("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),r.createVNode(l,{class:"w-alert-body"},{default:r.withCtx(()=>[r.createVNode(c,{class:"w-alert-main"},{default:r.withCtx(()=>[r.createVNode(u,{class:"w-alert-icon",src:n.value},null,8,["src"]),r.renderSlot(e.$slots,"default",{width:"*"},()=>[t.escape?(r.openBlock(),r.createBlock(s,{key:0,width:"*",class:"w-alert-text"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.text),1)]),_:1})):(r.openBlock(),r.createBlock(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),!1!==t.showButton?(r.openBlock(),r.createBlock(p,{key:0,gap:"10",class:"w-alert-buttonbar"},{default:r.withCtx(()=>[t.button?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(t.button,t=>(r.openBlock(),r.createBlock(d,{face:t.face,class:r.normalizeClass(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(r.openBlock(),r.createBlock(d,{key:1,face:"primary",class:"w-alert-button",text:h.value,onClick:o,ownproperty:!0},null,8,["text"]))]),_:1})):r.createCommentVNode("v-if",!0)]),_:3})]),_:3})}},__file:"src/template/TemplateAlert.vue"},he={name:"w-alert",mixins:[ae],props:["text","title","escape","yes","no","button","showButton","yesText"],methods:{x_default:()=>({title:lt.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return r.h(ne,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Alert.vue"},ce={__name:"TemplateConfirm",props:["text","escape","title","icon","button","showButton","yesText","noText"],emits:["save","close"],setup(t,{emit:e}){const i=t,s=e,l={info:".f-i .f-i-alert-info",warning:".f-i .f-i-alert-warning",success:".f-i .f-i-alert-success",question:".f-i .f-i-alert-question",error:".f-i .f-i-alert-error"},o=t=>{s("save",t)},a=t=>{s("close",t)},n=r.computed(()=>l[i.icon]||i.icon||l.question),h=r.computed(()=>i.yesText||"确定"),c=r.computed(()=>i.noText||"取消");return(e,i)=>{const s=r.resolveComponent("w-html"),l=r.resolveComponent("w-vertical"),u=r.resolveComponent("w-horizontal"),d=r.resolveComponent("w-img"),p=r.resolveComponent("w-button"),m=r.resolveComponent("w-buttonbar"),f=r.resolveDirective("dialog-move");return r.openBlock(),r.createBlock(l,{class:"w-alert-wrap"},{default:r.withCtx(()=>[r.createVNode(u,{class:"w-alert-head"},{default:r.withCtx(()=>[r.withDirectives((r.openBlock(),r.createBlock(l,{class:"w-alert-move","w-width":"*"},{default:r.withCtx(()=>[r.createVNode(s,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[f,!0]]),r.createVNode(s,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:r.withCtx(()=>i[0]||(i[0]=[r.createElementVNode("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])),_:1,__:[0]})]),_:1}),r.createVNode(l,{class:"w-alert-body"},{default:r.withCtx(()=>[r.createVNode(u,{class:"w-alert-main",valign:"middle"},{default:r.withCtx(()=>[r.createVNode(d,{class:"w-alert-icon",src:n.value},null,8,["src"]),r.renderSlot(e.$slots,"default",{width:"*"},()=>[t.escape?(r.openBlock(),r.createBlock(s,{key:0,width:"*",class:"w-alert-text"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(t.text),1)]),_:1})):(r.openBlock(),r.createBlock(s,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),r.createVNode(m,{gap:"10",class:"w-alert-buttonbar"},{default:r.withCtx(()=>[t.button?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(t.button,t=>(r.openBlock(),r.createBlock(p,{face:t.face,class:r.normalizeClass(["w-alert-button",t.class]),text:t.text,onClick:t.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(p,{face:"primary",class:"w-alert-button",text:h.value,onClick:o,ownproperty:!0},null,8,["text"]),r.createVNode(p,{class:"w-alert-button",text:c.value,onClick:a,ownproperty:!0},null,8,["text"])],64))]),_:1})]),_:3})]),_:3})}},__file:"src/template/TemplateConfirm.vue"},ue={name:"w-confirm",mixins:[ae],props:["text","title","escape","yes","no","yesText","noText","button","showButton"],methods:{x_default:()=>({title:lt.loc.opertip}),async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(t){console.error(t)}this.resolve(e),this.close()},async onClose(t){let e;this.x.no&&(e=await this.x.no(t)),this.resolve(e),this.close()},html_slots_default(){return r.h(ce,{text:this.x.text,title:this.x.title,icon:this.x.icon,escape:this.x.escape,yesText:this.x.yesText,noText:this.x.noText,showButton:this.x.showButton,onSave:this.onSave,onClose:this.onClose,button:this.x.button},this.$slots)}},__file:"src/widgets/Confirm.vue"};const de={class:"w-tip-body"},pe={key:0,class:"w-tip-text"},me=["innerHTML"];var fe={__name:"TemplateTip",props:["text","escape"],setup:t=>(e,i)=>(r.openBlock(),r.createElementBlock("div",de,[r.renderSlot(e.$slots,"text",{},()=>[t.escape?(r.openBlock(),r.createElementBlock("div",pe,r.toDisplayString(t.text),1)):(r.openBlock(),r.createElementBlock("div",{key:1,class:"w-tip-text",innerHTML:t.text},null,8,me))])])),__file:"src/template/TemplateTip.vue"};let xe=null,ge={time:(new Date).getTime(),list:[]};var ve={name:"w-tip",mixins:[ae],props:["face","text","escape"],provide(){return{provideView:this.provideView}},methods:{x_default:()=>({prong:!0,autoHide:!0,face:"normal",escape:!0}),html_slots_default(){return r.h(fe,{text:this.x.text,escape:this.x.escape},this.$slots)},setVisibleSub(t){if(t)for(let t of ge.list)t!=this.uid&<.close(t)}},computed:{isForceWheelHide:()=>!0,slotTarget(){return this.$slots.default},defaultSnapTargetElem(){const t=this.commander;return t.snapElem?t.snapElem():t},defaultSnapPosition:()=>"-t,-r,-b,-l,-tl,-tr,-rt,-tb,-bl,-br,-lt,-lb,c"},mounted(){ge.time=(new Date).getTime(),xe&<.close(xe),xe=this.uid,ge.list.push(this.uid)},unmounted(){xe=null;let t=ge.list.indexOf(this.uid);t>-1&&ge.list.splice(t,1)},__file:"src/widgets/Tip.vue"},we={name:"w-img",pubParentName:"w-album",mixins:[Ut],inject:["providePubParent"],props:["src","text","square","imgWidth","imgHeight","dataUrl","vertical","disabled"],data:()=>({hover:!1}),methods:{x_default:()=>({vertical:!0}),onerror(t){this.dataUrl&&(t.target.src=this.dataUrl)},html_slots(){let t=this.x.src,e=t&&t.startsWith(".")&&!t.includes("/"),i=t&&t.startsWith("#"),s=this.$slots.default||(this.x.text?{default:()=>this.x.text}:null);return t=t||this.dataUrl,[t&&r.h("div",{class:"w-img-gut"},[e?r.h("i",{class:"w-img-icon "+t.replace(/\./g,"")}):i?r.h("svg",{class:"f-svg "+t.slice(1)},r.h("use",{"xlink:href":t})):r.h("img",{ref:"img",src:t,class:"w-img-icon",onerror:this.onerror}),this.$slots.cover&&r.h("div",{class:"w-img-cover f-abs-full"},this.$slots.cover())]),s&&r.h(Zt,{class:"w-img-description"},s)]}},computed:{isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=lt.unitSize(this.x.imgWidth?this.x.imgWidth:this.x.width),e=lt.unitSize(this.x.imgHeight?this.x.imgHeight:this.x.height);return{class:{"z-hv":this.hover,"z-on":this.isCurrent,"z-ds":this.x.disabled,"z-square":this.x.square,"z-canplay":this.x.canPlay,"z-vertical":this.x.vertical,[`f-${this.x.vertical?"v":"h"}-gap`]:lt.br.compat.gap},style:{"--w-img-icon-width":t,"--w-img-icon-height":e},onmouseenter:t=>!this.x.disabled&&(this.hover=!0),onmouseleave:t=>!this.x.disabled&&(this.hover=!1)}}},__file:"src/widgets/Img.vue"},be={pubParentName:"w-buttonbar",mixins:[Ut],props:["text","icon","focusIcon","dropIcon","focusDropIcon","arrowIcon","face","target","closable","dropToggle","loading","disabled","vertical","hoverShowDrop","dropProps","showArrowIcon"],inject:["providePubParent","provideMenu_w"],emits:["click:close","dropClose"],data(){return{dropper:null,showDrop:!1,mouses:{onmouseenter:t=>{this.showDrop||(this.pubParent&&Se(this.pubParent)&&!Se(this)&&Ce(),this.x.hoverShowDrop&&(this.drop(),this.$nextTick(()=>t.currentTarget.classList.add("z-hv")))),t.currentTarget.classList.add("z-hv")},onmouseleave:t=>t.currentTarget.classList.remove("z-hv"),onmousedown:t=>t.currentTarget.classList.add("z-down"),onmouseup:t=>t.currentTarget.classList.remove("z-down")}}},watch:{disabled(t){t&<.q(".z-hv",this.el()).removeClass("z-hv")}},methods:{setLoading(t){t=null==t||t,this.x.loading=t},drop(){this.hasChild?this.showDrop=!0:Ce()},isShowDrop(){return this.showDrop},closeDrop(){this.showDrop=!1},onclick(t){this.isMore&&(this.showDrop&&this.x.dropToggle?this.closeDrop():this.drop()),this.pubParent&&this.pubParent.$emit("click:item",t)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},clickDrop(t){this.isDisabled||(t.stopPropagation(),this.drop())},html_drop(){if(this.showDrop&&this.hasChild){let t={context:this,ownproperty:!0,minWidth:lt.bcr(this.el()).width,autoHide:!0,hoverShowDrop:this.x.hoverShowDrop,snap:()=>this.el(),position:this.pubParent&&this.pubParent.x.vertical?"-rt,-lt":"v",indent:1,onClose:()=>{this.showDrop=!1,this.$emit("dropClose")}};return this.x.dropProps&&(t=r.mergeProps(t,this.x.dropProps)),r.h(r.resolveComponent("w-menu"),t,this.$slots)}return[]},html_slots(){let t=this.x.text,e=[];if(this.x.loading&&e.push(r.h("div",{class:"w-button-loading f-abs-full f-flex-center"},r.h(we,{src:"#f-svg-loading"}))),this.x.icon){let t=this.x.focusDropIcon&&this.isCurrent&&this.showDrop?this.x.focusDropIcon:this.x.focusIcon&&this.isCurrent?this.x.focusIcon:this.x.dropIcon&&this.showDrop?this.x.dropIcon:this.x.icon;e.push(this.html_icon(t,"w-button-icon f-flex-center"+(this.x.vertical?"":" f-height")))}if(t){const i=this.pubParent&&this.pubParent.x.flexSize&&t;e.push(r.h("div",{class:"w-button-text"},r.h("span",{class:"w-button-text-line f-line-1",title:i||""},t)))}return this.isMore&&this.x.showArrowIcon&&e.push(r.h(we,{class:"w-button-more f-flex-center f-height",src:this.x.arrowIcon||".f-i .f-i-caret-down"})),this.x.closable&&e.push(r.h("div",{class:"w-button-close f-flex-center"},r.h("i",{class:"w-button-close-icon f-i f-i-close",onclick:this.clickClose}))),[r.h("div",{class:"w-button-main f-oh f-height",...this.isCombo&&!this.isDisabled&&this.mouses},e),this.isCombo&&r.h(we,{class:"w-button-drop f-flex-center f-height",src:".f-i .f-i-caret-down",...!this.isDisabled&&this.mouses,onclick:this.clickDrop}),this.html_drop()]}},computed:{tagName:()=>"button",hasChild(){const t=this.slots_children();return t&&t.length},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},isMore(){return this.hasChild&&!this.getOn("click")},isCombo(){return!!(this.hasChild&&this.x.showArrowIcon&&this.getOn("click"))},isDisabled(){return!!this.x.disabled||!!this.x.loading},html_props(){return{disabled:this.isDisabled,class:{[`z-face-${this.x.face}`]:this.x.face,"z-combo":this.isCombo,"z-more":this.isMore,"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-loading":!!this.x.loading,"z-vertical":!!this.x.vertical,"z-closable":!!this.x.closable,"z-drop":this.showDrop},onclick:this.onclick,...!this.isCombo&&!this.isDisabled&&this.mouses}}},__file:"src/widgets/ButtonAbs.vue"},_e={name:"w-menubutton",mixins:[be],methods:{ajax(...t){return this.parentMenu.rootCommander.ajax(...t)},submit(...t){return this.parentMenu.rootCommander.submit(...t)},drop(){this.showDrop||(this.closeSub(),this.showDrop=!0,this.parentMenu.currentMenuButton=this)},onclick(t){this.isMore||setTimeout(()=>this.parentMenu.root.close(),10)},onmouseenter(t){!this.x.disabled&&t.currentTarget.classList.add("z-hv"),this.isMore?this.drop():this.closeSub()},closeSub(){this.parentMenu.currentMenuButton&&(this.parentMenu.currentMenuButton.showDrop=!1,this.parentMenu.currentMenuButton=null)},clickClose(t){t.stopPropagation(),t.runType="click:close",this.trigger(t)},html_slots(){let t=this.x.text,e=[],i=this.x.icon,s=i&&i.startsWith(".")&&!i.includes("/");if(e.push(!i||s?r.h("i",{class:"w-menubutton-icon f-flex-center f-height "+(i?i.replace(/\./g,""):"")}):r.h("img",{src:i,class:"w-menubutton-icon f-flex-center f-height"})),t&&e.push(r.h("div",{class:"w-menubutton-text f-line-1"},t)),this.x.closable&&e.push(r.h("div",{class:"w-menubutton-close"},r.h("i",{class:"w-menubutton-close-icon f-i f-i-close",onclick:this.clickClose}))),e.push(r.h(we,{class:"w-menubutton-drop f-flex-center f-height",src:this.isMore?this.x.arrowIcon||".f-i .f-i-caret-right":""})),this.showDrop){let t={autoHide:!0,context:this,ownproperty:!0,snap:()=>this.el(),position:"21,12",indent:{top:1,bottom:1},onClose:()=>this.showDrop=null};this.x.dropProps&&(t=r.mergeProps(t,this.x.dropProps)),e.push(r.h(r.resolveComponent("w-menu"),t,this.$slots))}return e}},computed:{tagName:()=>"button",isMore(){return!!this.hasChild},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},ownerView(){const t=this.parentMenu.rootCommander;return t?t.ownerView:this.parentMenu.root.provideView},html_props(){return{disabled:!!this.x.disabled,class:{"z-on":this.isCurrent,"z-ds":!!this.x.disabled,"z-drop":this.showDrop},onmouseenter:this.onmouseenter,onmouseleave:!this.x.disabled&&(t=>t.currentTarget.classList.remove("z-hv")),onclick:this.onclick}}},__file:"src/widgets/MenuButton.vue"},ye={name:"w-button",mixins:[be],props:["autoMenuButton"],methods:{x_default:()=>({showArrowIcon:!0,autoMenuButton:!0})},render(){return this.provideMenu_w&&this.x.autoMenuButton?r.h(_e,this.$props,this.$slots):this.html()},__file:"src/widgets/Button.vue"};let ke=null;function Ce(){ke&&(lt.close(ke),ke=null)}function Se(t){return ke&&(t.hasBubble(ke.context)||ke.hasBubble(t))}var Ve={name:"w-menu",mixins:[ae],provide(){return{provideMenu_w:this}},methods:{x_default:()=>({autoHide:!0,independent:!1}),hasBubble(t,e){if(this.contains(t,e))return!0;let i=lt(t).closest("w-menu,w-menubutton");return!(!i||!(i=i.parentMenu)||i.rootCommander!=this.rootCommander)||void 0},arrow(t){let e=this.$refs.bbr.el(),i=lt.bcr(e);e.scrollTop+=i.height*t},mousewheel(t){this.arrow(t.deltaY<0?1:-1)},getRoot(){let t=this;for(;t.getCommander()&&t.getCommander().isWidget&&"w-menubutton"===t.getCommander().$options.name;)t=t.getCommander().parentMenu;return t},setVisibleSub(t){!1===t&&this.currentMenuButton&&(this.currentMenuButton.showDrop=!1)},checkOutScreen(){let t=this._pos;t.mag_l||t.mag_r?t.bottom<0?(t.top+=t.bottom,t.top<0&&(this.autoSetMaxHeight(t.height+t.top),t.top=0),this.fixSnapStyle()):t.top<0&&(t.bottom+=t.top,t.bottom<0&&(this.autoSetMaxHeight(t.height+t.bottom),t.bottom=0),this.fixSnapStyle()):t.bottom<0?this.autoSetMaxHeight(t.height+t.bottom):t.top<0&&this.autoSetMaxHeight(t.height+t.top)},html_buttons(){return this.slots_children()},html_slots(){return[this.x.maxHeight&&r.h("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(-1)},r.h("i",{class:"f-i f-i-caret-up"})),r.h(Zt,{class:"w-menu-bbr",height:"*",ref:"bbr",onwheel:this.mousewheel},this.$slots),this.x.maxHeight&&r.h("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(1)},r.h("i",{class:"f-i f-i-caret-down"}))]}},computed:{root(){return this.getRoot()},rootCommander(){return this.root.commander},parentMenu(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},defaultSnapTargetElem(){let t=this.getCommander();if(t)return t.isWidget?t.snapElem():t},defaultSnapPosition:()=>"-bl,-br,-tl,-tr",scope_props(){if(this.rootCommander){let t=lt(this.rootCommander).$.vnode.scopeId||this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(t)return{[`${t}`]:""}}}},mounted(){(!this.context||this.context.$options&&"w-menubutton"!==this.context.$options.name)&&(ke&&ke.context!==this.context&<.close(ke),ke=this)},__file:"src/widgets/Menu.vue"},Te={name:"w-loading",mixins:[ae],props:["text","icon"],methods:{x_default:()=>({}),html_slots(){return r.h(we,{src:void 0!==this.x.icon?this.x.icon:"#f-svg-loading",text:void 0!==this.x.text?this.x.text:lt.loc.loading})}},mounted(){this.resolve(this)},__file:"src/widgets/Loading.vue"},Me={name:"w-table",mixins:[Ut],props:["face","scroll-x","scroll-y"],provide(){return{_provideTable:this,provideLevel:-1,provideParentTR:null,provideTripleboxContainer:this}},data:()=>({sticky:r.markRaw({left:null,right:null,observers:[]})}),methods:{observeSticky(){for(let t of this.sticky.observers)t.disconnect();let t=[];lt.lodash.each(this.initFixedCells(),e=>{let i=new Wt(this.setFixedStyle);i.observe(e),t.push(i)}),this.sticky.observers=t},setFixedStyle(){this.initFixedCells();let t={};if(this.sticky.left&&this.sticky.left.forEach(e=>t[`--w-td-fixed-left-${e.colIndex}`]=`${e.offset}px`),this.sticky.right&&this.sticky.right.forEach(e=>t[`--w-td-fixed-right-${e.colIndex}`]=`${e.offset}px`),this.$el)for(let e in t)this.$el.style.setProperty(e,t[e])},initFixedCells(){return this.getFixedCells("left").concat(this.getFixedCells("right"))},getFixedCells(t){let e=null,i=0,s=lt.lodash.map(this.$el.querySelector("thead").querySelectorAll(`td[w-fixed="${t}"]`));return"right"===t&&s.reverse(),s.forEach(t=>{(e||(e=[])).push({colIndex:t.cellIndex,offset:i}),i+=t.offsetWidth}),this.sticky[t]=e,s},html_slots(){return[this.slotHooks.thead,this.slotHooks.tbody,this.slotHooks.hiddens||[]]}},computed:{slotHooks(){const t={};return this.slots_children().forEach(e=>{let i=e.type.name&&e.type.name.slice(2);i&&("hidden"===i?(t.hiddens||(t.hiddens=[])).push(e):t[i]=e)}),t},colgroup(){return lt.slotsChildren(this.slotHooks.columns.children).map(t=>t.props)},stickyState(){let t="";for(let e of this.colgroup)e.fixed&&(t+=e.fixed);return t},html_class(){return["f-flex-column",this.x.face&&"z-face-"+this.x.face]}},mounted(){this.$watch("stickyState",t=>{this.$nextTick(()=>this.observeSticky())},{immediate:!0}),this.$el.setAttribute("w-scroll-x","left"),lt.br.chrome&<.br.chrome<=60&&new Wt(()=>{this.$el.setAttribute("w-compact-resize-sticky",""),requestAnimationFrame(()=>this.$el.removeAttribute("w-compact-resize-sticky"))}).observe(this.$el)},__file:"src/widgets/Table.vue"},Pe={name:"w-columns",__file:"src/widgets/TableColumns.vue"},$e={name:"w-column",props:["width","minWidth"],__file:"src/widgets/TableColumn.vue"},Be={props:["pub","current"],provide(){return{providePubParent:this}},methods:{inCurrent(t){let e=this.x.current;if(null!=e)return Array.isArray(e)?-1<e.findIndex(e=>this.isCurrentChild(e,t)):this.isCurrentChild(e,t)},isCurrentChild(t,e){if("object"==typeof t){let i=e.isWidget?(e.x||e).data:e.props&&e.props.data;if(i)for(let e in t)if(lt.lodash.get(i,e)==t[e])return!0}else if(t==(e.isWidget?e.getKey():e.key))return!0}}};Be.__file="src/widgets/PubParent.vue";const ze={render:function(t,e){return r.renderSlot(t.$slots,"default")},__file:"src/widgets/SlotDefault.vue"};var De={name:"w-thead",mixins:[Ut,Be],props:["br","sort"],inject:["_provideTable"],provide(){return{provideLeafLevel:-2,provideParentLeaf:null,provideInBody:!1,_provideThead:this,_provideTBody:!1}},data:()=>({rows:null,sortUID:null}),methods:{isExpanded:()=>!0,slot_rows(){if(this.$slots.row){let t,e=this.x.children;if(Array.isArray(e)){let i=0;t=e.map((t,e)=>{let s;const l=this.$slots.row({item:t,index:e}).map(t=>(t.props||(t.props={}),t.props.rowIndex=i++,s||(s=t.key),t));return s?r.h(ze,{key:s},{default:()=>l}):l})}return t||[]}return this.slots_children().map((t,e)=>lt.lodash.set(t,"props.rowIndex",e))},html_tbody(){let t=this._provideTable.colgroup,e=this.slot_rows(),i={};if(!this._provideTable.fixed){let e=0;t.forEach(t=>{e+=lt.number(t.width)||lt.number(t["min-width"])}),e&&(i.minWidth=lt.unitSize(e))}return this.rows=r.markRaw({}),r.h("div",{class:"w-table-tbl-wrap"},r.h("table",{ref:"table",cellpadding:0,cellspacing:0,class:"w-table-tbl",style:i},[r.h("thead",null,r.h("tr",null,t.map(t=>r.h("td",{style:{width:"*"==t.width?null:lt.unitSize(t.width),minWidth:lt.unitSize(t["min-width"])},"w-fixed":t.fixed})))),r.h("tbody",e)]))},html_slots(){return this.html_tbody()}},computed:{isEscape(){return this.x.escape}},__file:"src/widgets/TableTHead.vue"},Ee={name:"w-tbody",mixins:[De,Gt],inject:["_provideTable"],props:["children"],provide(){return{_provideThead:null,provideInBody:!0,_provideTBody:this}},created(){this.$watch(()=>this._provideTable.x,t=>{this.x.scrollX=t.scrollX,this.x.scrollY=!!this._provideTable.fixed||t.scrollY},{immediate:!0}),this.$watch("current",()=>this.viewCurrent())},methods:{getCurrent(){const t=lt.q(".w-tr.z-on",this.el())[0];return t&<(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},onScroll(t){let e=this._provideTable.slotHooks.thead;e&&(e.el.scrollLeft=t.target.scrollLeft)},onScrollPosition(t){let e=this._provideTable.el();(e&&"left"==t||"center"==t||"right"==t)&&e.setAttribute("w-scroll-x",t)},onScrollAttributeChange(t){let e=this._provideTable.el();e&&t.forEach(t=>{let i=t.attributeName;t.target.hasAttribute(i)?e.setAttribute(i,""):e.removeAttribute(i)})},html_slots(){return this.html_scroll_slots(this.html_tbody())}},computed:{inBody:()=>!0,html_class(){return["w-vertical f-flex-1 f-oh",this.html_scroll_class]}},__file:"src/widgets/TableTBody.vue"},Ne={name:"w-tr",pubParentName:"w-tbody,w-thead",mixins:[Ut,ft],props:["rowIndex","expanded","children"],inject:["_provideTable","providePubParent","provideInBody","_provideTBody","provideLevel","provideParentTR"],provide(){return{provideParentTR:this,provideLevel:this.provideLevel+1}},methods:{hasChild(){return lt.hasChild(this.$slots,"rows")},isDisplay(){if(!this.provideParentTR)return!0;let t=this;for(;t=t.provideParentTR;)if(!t.isExpanded())return!1;return!0},isExpanded(){return this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},expandToView(){let t=this;for(;(t=t.provideParentTR)&&t.$options.name===this.$options.name;)t.toggle(!0)},toggle(t,e){const i=this.el(".w-leaf");let s=i&<(i);s?s.toggle(t,e):(this.setExpanded(t),e&&this.$nextTick(e))},onmouseenter(t){this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},html_slots(){let t=this.rowIndex,e=this.pubParent.rows,i=0;return this.slots_children().map(s=>{for(;e[t]&&e[t][i];)i+=e[t][i];if(s.dfishColIndex=i,s.props){if(s.props.rowspan>1)for(let l,r=1;r<s.props.rowspan;r++)l=e[t+r]||(e[t+r]={}),l[i]=lt.number(s.props.colspan)||1;s.props.colspan>1&&(i+=s.props.colspan-1)}return i++,s})},html(){return this.x.children&&Array.isArray(this.x.children)&&this._provideTBody&&this._provideTBody.$slots.row?[this.html_self(!0),this.x.children.map((t,e)=>{let i;const s=this._provideTBody.$slots.row({item:t,index:e});for(let t of s)i||(i=t.key);return i?r.h(ze,{key:i},{default:()=>s}):s})]:this.$slots.row?[this.html_self(!0),this.$slots.row()]:this.html_self()}},computed:{tagName:()=>"tr",level(){return this.provideLevel+1},isEscape(){return this.pubParent.x.escape},inCurrent(){return this.pubParent.inCurrent(this)},html_props(){if(this.provideInBody)return{class:{"z-on":this.inCurrent,"z-expanded":this.isExpanded(),"f-hide":!this.isDisplay()},onmouseenter:this.onmouseenter,onmouseleave:this.onmouseleave}}},mounted(){this.inCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/TableTR.vue"},Le={name:"w-td",props:["colspan","rowspan","align","valign","data"],inject:["_provideTable","provideInBody"],methods:{td_props(){let t=this.$.vnode.dfishColIndex,e=this._provideTable.colgroup[t]||!1,i=this._provideTable.colgroup.length,s=this.colspan;return-1==s&&(s=i),{class:["w-td",t+(s||1)==i&&"w-td-lastborder",this.provideInBody&&e.class,e.fixed&&{[`w-td-fixed-${e.fixed}`]:!0,"w-td-fixed-left-last":"left"===e.fixed&&this._provideTable.colgroup[t+1]&&this._provideTable.colgroup[t+1].fixed!=e.fixed,"w-td-fixed-right-first":"right"===e.fixed&&this._provideTable.colgroup[t-1]&&this._provideTable.colgroup[t-1].fixed!=e.fixed}],style:[this.provideInBody&&e.style,e.fixed&&{[`${e.fixed}`]:`var(--w-td-fixed-${e.fixed}-${t})`}],colspan:s,rowspan:this.rowspan,align:this.align||e.align,valign:this.valign||e.valign}}},render(){return r.h("td",this.td_props(),this.$slots)},__file:"src/widgets/TableTD.vue"},Fe={name:"w-th",mixins:[Le,Ut],props:["sortable","sortOrders","sortOrderDefault"],inject:["_provideThead"],emits:["click:sort"],data:()=>({sortType:null,sortOrder:null}),methods:{onClick(t){this.x.sortable&&this.clickSort(t,"toggle")},clickSort(t,e){t.stopPropagation();let i=this.sortOrder;this._provideThead.sortUID!=this.uid&&(i=null);let s=this.x.sortOrders||["asc","desc",null];if("toggle"===e){let t=s.indexOf(i);i=s[t<0||2==t?0:t+1]}else i=i==e?null:e;this.sortOrder=i,this._provideThead.sortUID=this.uid,t.value=i,this.$emit("click:sort",t,i)},html_slots(){return r.h(Kt,{class:"w-th-wrap",valign:"middle",align:this.align||this.col.align},{default:()=>[r.h("div",{class:"w-th-title"},this.$slots),this.x.sortable?r.h("div",{class:"w-th-sort f-flex-column f-flex-center f-oh"},[r.h("i",{class:"f-i f-i-caret-up f-oh w-th-sort-up",onClick:t=>this.clickSort(t,"asc")}),r.h("i",{class:"f-i f-i-caret-down f-oh w-th-sort-down",onClick:t=>this.clickSort(t,"desc")})]):[]]})}},computed:{col(){return this._provideTable.colgroup[this.$.vnode.dfishColIndex]||!1},tagName:()=>"th",html_props(){return r.mergeProps(this.td_props(),{class:{"z-sortable":this.x.sortable,[`z-${this.sortOrder}`]:this.sortOrder&&this._provideThead.sortUID==this.uid},onClick:this.onClick})}},__file:"src/widgets/TableTH.vue"};const Ae={class:"'w-table-v2-th-text f-line-1"},He={class:"w-tree-loading w-table-v2-loading"},Ie=["onClick"],Ye=["onClick"],Oe=["title"],je={class:"'w-table-v2-td-text f-line-1"},qe={name:"w-table-v2"};var Re=Object.assign(qe,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:40},src:{type:Function},columns:{type:Array,default:()=>[]},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:o,itemHeight:a,current:n}=l;const h=o.value||"id";o.text;const c=o.children||"children",u=o.class||"class",d=Symbol("leaf"),p=r.ref(0),m=r.ref(0),f=r.ref([]),x=r.ref(),g=r.ref(),v=r.ref(),w=r.ref(!1),b=r.computed(()=>l.loading||w.value);r.provide("provideTripleboxContainer",r.getCurrentInstance());const _=r.computed(()=>({height:f.value.length*a+"px"})),y=(t,e)=>{const i={};return t.width&&"*"!=t.width?i.width=lt.unitSize(t.width):i.flex=1,t.minWidth&&(i.minWidth=lt.unitSize(t.minWidth)),i},k=t=>"function"==typeof u?u(t):t[u],C=t=>({height:`${a}px`,top:t[d].showIndex*a+"px"}),S=t=>({paddingLeft:16*t[d].level+"px"}),V=t=>M(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,T=t=>t[d].loading,M=t=>t[c]&&t[c].length||t[d].src&&!t[d].loaded,P=t=>Array.isArray(l.current)?l.current.includes(t[h]):l.current===t[h];let $,B=!0;const z=async(t,e)=>{if("string"==typeof t&&(t=F(t)),!t)return;const i=t[d];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[c]){const e=f.value.indexOf(t),i=N(t[c],t),s=f.value.slice(0,e+1),l=f.value.slice(e+1);f.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,z(t,t.expanded));else{const e=f.value.indexOf(t),i=L(t[c]),s=f.value.slice(0,e+1),l=f.value.slice(e+1+i);f.value=s.concat(l)}},D=t=>{m.value!==t.target.scrollTop&&(m.value=t.target.scrollTop)},E=()=>{Y()},N=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[d];s||(t[d]={level:e?e[d].level+1:0,parent:e,src:l.src&&l.src(t)}),t[c]&&t[c].length?t.expanded?i=i.concat(N(t[c],t)):s||N(t[c],t):t.expanded&&t[d].src&&r.nextTick(()=>z(t,!0))}),i},L=t=>{let e=0;for(let i of t)e++,i[c]&&i.expanded&&(e+=L(i[c]));return e},F=(t,e)=>{e||(e=l.children);for(let i of e){if(i[h]===t)return i;if(i[c]&&i[c].length){const e=F(t,i[c]);if(e)return e}}},A=t=>{const e=F(t);if(e){let t=e,i=t;for(;t=t[d].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&z(i,!0)}return e},H=(t,e)=>{for(let i of t){let t=e.find(t=>t[h]===i[h]);t&&(t[c]&&(i[c]?H(i[c],t[c]):i[c]=t[c]),null!=t.expanded&&(i.expanded=t.expanded))}},I=r.computed(()=>{const t=Math.floor(m.value/a),e=f.value.slice(t,t+p.value).map((e,i)=>(e[d].showIndex=i+t,e));return e}),Y=()=>{v.value=g.value.el("wScrollOverflow").getBoundingClientRect(),p.value=Math.ceil(v.value.height/a)+1},O=async t=>{I.value.find(e=>t===e[h])||A(t);const e=I.value.findIndex(e=>t===e[h]);if(-1===e||e===I.value.length-1){const e=F(t),i=f.value.indexOf(e);i>-1&&(await r.nextTick(),x.value.scrollToY((i+1)*a-v.value.height/2))}},j=async t=>{if(await r.nextTick(),n=t,(t=t&<.arrayID(t))&&t.length){for(let e of t)I.value.find(t=>e===t[h])||A(e);B&&O(t[0])}};return r.onMounted(async()=>{if(r.watch(()=>g.value.wScrollSizeY,t=>{Y()},{immediate:!0}),r.watch(()=>l.children,t=>{f.value=N(t),n&&n==l.current&&j(l.current)},{immediate:!0}),r.watch(()=>l.current,j,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(w.value=!0,await t().catch(()=>{}),w.value=!1)}}),e({toggle:z,focus:O,find:F,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));H(t,e),l.children.length=0,l.children.push.apply(l.children,t),f.value=N(t)}}),(e,i)=>{const l=r.resolveComponent("w-horizontal"),o=r.resolveComponent("w-img"),n=r.resolveComponent("w-vertical");return r.openBlock(),r.createBlock(n,{ref_key:"root",ref:x,class:"w-table-v2"},{default:r.withCtx(()=>[r.createVNode(l,{class:"w-table-v2-thead",style:r.normalizeStyle({height:`${r.unref(a)}px`})},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.columns,(t,e)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-table-v2-th",{[`z-align-${t.align}`]:t.align}]),style:r.normalizeStyle(y(t)),key:e},[r.createElementVNode("div",Ae,r.toDisplayString(t.text),1)],6))),128))]),_:1},8,["style"]),r.createVNode(n,{ref_key:"wrap",ref:g,height:"*",class:"w-table-v2-tbody","scroll-y":!0,onScroll:D,onResize:E},{default:r.withCtx(()=>[b.value?r.renderSlot(e.$slots,"loading",{key:0},()=>[r.createElementVNode("div",He,[r.createVNode(o,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(r.openBlock(),r.createElementBlock("div",{key:1,class:"w-table-v2-wrap",style:r.normalizeStyle(_.value)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(I.value,(i,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass(["w-table-v2-tr",k(i),{"z-on":P(i)}]),style:r.normalizeStyle(C(i)),onClick:t=>((t,e)=>{B=!1,clearTimeout($),$=setTimeout(()=>B=!0,500),s("click:item",t,e)})(t,i)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(t.columns,(t,s)=>(r.openBlock(),r.createElementBlock("div",{key:s,class:r.normalizeClass(["w-table-v2-td",{[`z-align-${t.align}`]:t.align}]),style:r.normalizeStyle(y(t))},["leaf"==t.type?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["w-leaf",{"z-folder":M(i)}]),style:r.normalizeStyle(S(i))},[T(i)?(r.openBlock(),r.createBlock(o,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["w-leaf-toggle f-i",i.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),z(e)})(t,i)},null,10,Ye)),V(i)?(r.openBlock(),r.createBlock(o,{key:2,src:V(i),class:"w-leaf-icon"},null,8,["src"])):r.createCommentVNode("v-if",!0),r.createElementVNode("div",{class:"w-leaf-text f-line-1",title:i[t.field]},r.toDisplayString(i[t.field]),9,Oe)],6)):r.renderSlot(e.$slots,t.field,{key:1,item:i,rowIndex:l,column:t,colIndex:s},()=>[r.createElementVNode("div",je,r.toDisplayString(i[t.field]),1)])],6))),128))],14,Ie))),128))],4))]),_:3},512)]),_:3},512)}}});Re.__file="src/widgets/TableV2.vue";var We={name:"w-grid",mixins:[Gt],props:["columns","rows","gap","defaultColspan","face","labelWidth"],methods:{x_default:()=>({columns:12,gap:0,face:"normal"}),html_slots(){return this.x.scrollX||this.x.scrollY?this.html_scroll_slots():r.h("div",{class:"w-grid-cont",style:this.html_scroll_cont_style},this.$slots)}},computed:{html_props(){return{class:[this.x.rows?"z-full":"z-auto",this.x.face&&"z-face-"+this.x.face,this.html_scroll_class],style:{"--important-label-width":lt.unitSize(this.x.labelWidth)}}},html_scroll_cont_style(){let t=this.x.columns;lt.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;lt.isNumber(e)&&(e=`repeat(${e}, 1fr)`);let i=this.x.defaultColspan;return{"grid-template-columns":t,"grid-template-rows":e,"grid-gap":"var(--w-grid-gap)","--w-grid-gap":this.x.gap?lt.unitSize(this.x.gap):"","--w-grid-colspan":-1!=i&&i?`span ${i}`:""}}},__file:"src/widgets/Grid.vue"},Ue={name:"w-swiper-item",pubParentName:"w-swiper",inject:["providePubParent"],mixins:[Ut],props:["lazy"],data:()=>({loaded:!1}),methods:{x_default:()=>({lazy:!0}),html_slots(){return this.loaded||!this.lazy?this.$slots:this.isCurrent?(this.loaded=!0,this.$slots):void 0}},computed:{html_class(){return{"z-on":this.isCurrent}},isCurrent(){return this.pubParent.inCurrent(this)}},__file:"src/widgets/SwiperItem.vue"},Xe={name:"w-swiper",mixins:[Ut,Be],props:["arrow","indicatorDots","duration"],data:()=>({focusIndex:null}),watch:{current(t){this.setFocus(t)}},methods:{setFocus(t){let e=this.slots_children().findIndex(e=>this.isCurrentChild(t,e));this.focusIndex=e},getCurrentItem(){if(this.el()){let t=lt.q(">.w-swiper-cont>.w-swiper-item",this.el())[this.focusIndex];return t&<(t)}},clickArrow(t){this.focusIndex+=t},clickIndicator(t){this.focusIndex=t},html_slots(){null==this.focusIndex&&this.setFocus(this.x.current);let t=this.x.vertical,e=t?"up":"left",i=t?"down":"right";return[r.h("div",{class:"w-swiper-cont",id:this.uid+"cont"},this.$slots),this.x.arrow&&r.h("div",{class:"w-swiper-arrow z-"+e,onclick:t=>this.clickArrow(-1)},r.h("i",{class:"f-i f-i-angle-"+e})),this.x.arrow&&r.h("div",{class:"w-swiper-arrow z-"+i,onclick:t=>this.clickArrow(1)},r.h("i",{class:"f-i f-i-angle-"+i})),this.x.indicatorDots&&r.h("div",{class:"w-swiper-indicator f-flex-center"},this.slots_children().map((t,e)=>r.h("div",{class:"w-swiper-indicator-dot"+(e==this.focusIndex?" z-on":""),onclick:t=>this.clickIndicator(e)})))]}},computed:{html_class(){let t=this.focusIndex;return{"z-at-first":0==t,"z-at-last":t>-1&&t==this.slots_children().length-1}},html_style(){return{"--w-swiper-translate-x":100*-this.focusIndex+"%","--w-swiper-transition":this.x.duration?`left ${this.x.duration}ms`:0}}},mounted(){this.el("cont")&&new MutationObserver(()=>{this.setFocus(this.x.current)}).observe(this.el("cont"),{childList:!0})},__file:"src/widgets/Swiper.vue"},Qe={name:"w-buttonbar",mixins:[Kt,Be],props:["vertical"],emits:["click:item"],methods:{x_default(){return{gap:0,valign:this.vertical?null:"middle"}},html_slots(){let t=this.slots_children().concat(),e=this.$slots.split;if(e)for(let i=s.length-1;i>0;i--)t.splice(i,0,e);return this.html_scroll_slots(t)}},computed:{dir(){return this.x.vertical?"v":"h"},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal"]}},__file:"src/widgets/ButtonBar.vue"},Ge={name:"w-tabbar",mixins:[Qe],props:["vertical","arrow","quickCloseButton","flexSize","buttons"],emits:["click:item","click:quickCloseButton"],data:()=>({resizeObserver:1,isMouseEnter:!1,runButtonFlexWidth:null,runArrow:!1,isClickCloseLastChild:!1}),methods:{onScrollResize(t){this.resizeObserver++},clickArrow(t){this.scrollToX("left"+240*t,240)},closeAll(t){this.$emit("click:quickCloseButton","closeAll")},onMouseenter(t){this.isMouseEnter=!0,this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth)},onMouseleave(t){t&&this.hasBubble(t.relatedTarget)||(this.isMouseEnter=!1,this.x.flexSize&&(this.runButtonFlexWidth=null))},onBeforeEnter(t){this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton","")},onAfterEnter(t){this.fixQuickCloseButton&&(this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.resizeObserver++);const e=lt(t);e&&e.vis&&e.vis()},onBeforeLeave(t){t.nextElementSibling||(this.isClickCloseLastChild=!0,this.fixQuickCloseButton&&this.el().setAttribute("w-tabbar-fixed-quickclosebutton",""),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=null))},onAfterLeave(t){this.isClickCloseLastChild&&(this.isClickCloseLastChild=!1,this.fixQuickCloseButton&&this.el().removeAttribute("w-tabbar-fixed-quickclosebutton"),this.isMouseEnter&&this.x.flexSize&&(this.runButtonFlexWidth=this.buttonFlexWidth))},html_slots(){let t=r.h(r.TransitionGroup,{name:"w-tabbar",onBeforeEnter:this.onBeforeEnter,onAfterEnter:this.onAfterEnter,onBeforeLeave:this.onBeforeLeave,onAfterLeave:this.onAfterLeave},{default:()=>this.buttons}),e=[r.h(this.x.vertical?Zt:Kt,{ref:"gut",width:"*",class:"w-tabbar-gut",gap:this.x.gap,align:this.x.align,valign:this.x.valign},{default:()=>t})];if(this.$slots.append&&e.push(r.h("div",{ref:"append",class:"w-tabbar-append"},this.slot("append"))),this.x.arrow&&(e.unshift(r.h("div",{class:"w-tabbar-arrow-start",onClick:()=>this.clickArrow(-1)},r.h("i",{class:"f-i f-i-caret-left"}))),e.push(r.h("div",{class:"w-tabbar-arrow-end",onClick:()=>this.clickArrow(1)},r.h("i",{class:"f-i f-i-caret-right"})))),this.x.quickCloseButton){let t=!this.buttons.find(t=>t.props.closable);this.buttons.length&&e.push(r.h(ye,{ref:"quickCloseButton",data:{isQuickCloseButton:!0},showArrowIcon:!1,icon:".f-i .f-i-close",class:"w-tabbar-quickclosebutton",onClick:this.closeAll,disabled:t,title:"关闭全部标签"}))}return this.html_scroll_slots(e)}},computed:{hasScrollX(){return this.x.arrow&&"h"===this.dir||this.x.scrollX},showArrow(){if(this.x.arrow){if(this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[0]}return this.wScrollPercentX}},fixQuickCloseButton(){if(this.x.quickCloseButton&&this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[1]}},gutWidth(){const t=this.x.arrow&&this.wScrollPercentX;if(this.resizeObserver&&this.el()){let e=this.el().clientWidth;return t&&(e-=40),this.x.quickCloseButton&&(e-=20),this.$refs.append&&(e-=this.$refs.append.offsetWidth),e}},buttonCalcWidth(){if(this.x.flexSize){let t,e=this.buttons.length,i=this.gutWidth;return i&&e&&(t=i/e),t}},buttonFlexWidth(){if(this.x.flexSize){let t=this.x.flexSize[0],e=this.x.flexSize[1],i=e;return this.buttonCalcWidth&&(i=lt.numRange(this.buttonCalcWidth,t,e)),i+1}},html_props_on(){return{onMouseenter:this.onMouseenter,onMouseleave:this.onMouseleave}},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal",{"z-arrow":this.x.arrow,"z-quickclosebutton":this.x.quickCloseButton,"z-flexsize":this.x.flexSize,"z-show-arrow":this.showArrow}]},html_style(){const t={};return this.x.flexSize&&(t["--w-tabbar-flex-width"]=`${this.runButtonFlexWidth||this.buttonFlexWidth}px`),t}},mounted(){if(this.x.flexSize&&this.$refs.gut){new ResizeObserver(()=>this.resizeObserver++).observe(this.$refs.gut.el());let t=this.$watch(()=>this.buttons.length,e=>{e&&this.$nextTick(()=>{t(),setTimeout(()=>{const t=this.el();t&&t.setAttribute("w-tabbar-flex-all","")},150)})},{immediate:!0})}},__file:"src/widgets/TabBar.vue"},Je={name:"w-tabbutton",pubParentName:"w-tabbar",mixins:[ye],methods:{vis(){let t=[20,20];this.pubParent.x.quickCloseButton&&(t[1]+=20),this.scrollIntoView({x:`nearest${t}`,y:null})}},computed:{html_class:()=>"w-button"},mounted(){this.$watch("isCurrent",t=>t&&this.vis(),{immediate:!0})},__file:"src/widgets/TabButton.vue"},Ke={name:"w-tabs",mixins:[Ut],props:["current","position","gap","face","quickCloseButton","flexSize"],emits:["click:quickCloseButton"],methods:{x_default:()=>({position:"top",face:"line",gap:-1}),clickTab(t){const e=lt(t);!e.data||e.data.isQuickCloseButton},clickQuickCloseButton(t){this.$emit("click:quickCloseButton",t)},html_slots(){let t=[],e=[],i=this.x.position;return this.slots_children().forEach((i,s)=>{i.props&&null!=i.props.key||lt.lodash.set(i,"props.key",s),t.push(r.h(Je,i.props)),e.push(r.h(Ue,{lazy:null==i.props.lazy||i.props.lazy,key:i.props.key},i.children))}),[r.h(Ge,{ref:"tabBar",class:"w-tabs-buttonbar",current:this.x.current,gap:this.x.gap,vertical:"left"==i||"right"==i,arrow:!0,flexSize:this.x.flexSize,quickCloseButton:this.x.quickCloseButton,"onClick:item":this.clickTab,"onClick:quickCloseButton":this.clickQuickCloseButton,buttons:t},this.$slots),r.h(Xe,{class:"w-tabs-swiper f-flex-1 f-oh",current:this.x.current},{default:()=>e})]}},computed:{tabBar(){return this.$refs.tabBar},html_class(){let t=this.x.position;return"f-oh f-flex"+("top"==t||"bottom"==t?"-column":"")+" z-pos-"+t+" z-face-"+this.x.face}},__file:"src/widgets/Tabs.vue"},Ze={name:"w-tab",__file:"src/widgets/Tab.vue"},ti={name:"w-album",mixins:[Kt,Be],methods:{x_default:()=>({gap:0,br:!0,valign:"top"})},computed:{html_class:()=>"w-horizontal"},__file:"src/widgets/Album.vue"},ei={name:"w-html",mixins:[Ut,Jt],props:["line"],computed:{html_props(){let t=this.x.line;return{class:[(this.x.align||this.x.valign)&&"w-horizontal",null!=t&&"f-line",this.html_align_class],style:null!=t&&{"-webkit-line-clamp":t}}}},__file:"src/widgets/Html.vue"},ii={name:"w-tree",mixins:[Gt,Be,ft],emits:["click:item"],provide(){return{provideLevel:-1,provideParentLeaf:null,provideParentTR:null,provideTripleboxContainer:this}},methods:{load(){return this.request()},getCurrent(){const t=lt.q(".w-leaf.z-on",this.el())[0];return t&<(t)},viewCurrent(t){this.$nextTick(()=>{(t=t||this.getCurrent())&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},html_slots(){let t;if(this.loading){const e=this.slot("loading");t=e&&e.length?e:r.h("div",{class:"w-tree-loading"},r.h(we,{src:"#f-svg-loading-1",width:28,height:28}))}else{let e=this.x.children;this.$slots.default&&(t=Array.isArray(e)?e.map((t,e)=>{let i;const s=this.$slots.default({item:t,index:e});for(let t of s)i||(i=t.key);return i?r.h(ze,{key:i},{default:()=>s}):s}):[])}return this.html_scroll_slots(t)}},computed:{level:()=>-1,html_props(){return{class:this.html_scroll_class}}},mounted(){this.x.children&&this.x.children.length||this.request()},__file:"src/widgets/Tree.vue"};const si={class:"w-tree-loading w-tree-v2-loading"},li=["onClick"],ri=["onClick"],oi={class:"w-leaf-text f-line-1"},ai=["title"],ni={name:"w-tree-v2"};var hi=Object.assign(ni,{props:{alias:{type:Object,default:()=>({})},children:{type:Array,default:()=>[]},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:32},src:{type:Function},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const s=i,l=t;let{alias:o,itemHeight:a,current:n}=l;const h=o.value||"id",c=o.text||"text",u=o.children||"children",d=o.class||"class",p=o.disabled||"disabled",m=Symbol("leaf"),f=r.ref(0),x=r.ref(0),g=r.ref([]),v=r.ref(),w=r.ref(),b=r.ref(!1),_=r.computed(()=>l.loading||b.value);r.provide("provideTripleboxContainer",r.getCurrentInstance);const y=r.computed(()=>({height:g.value.length*a+"px"})),k=(t,e)=>"function"==typeof d?d(t,e):t[d],C=t=>({height:`${a}px`,top:t[m].showIndex*a+"px",paddingLeft:16*t[m].level+"px"}),S=t=>T(t)?t.expanded?t.expandedIcon:t.collapsedIcon:t.icon,V=t=>t[m].loading,T=t=>t[u]&&t[u].length||t[m].src&&!t[m].loaded,M=t=>Array.isArray(l.current)?l.current.includes(t[h]):l.current===t[h],P=(t,e)=>"function"==typeof p?p(t,e):t[p];let $,B=!0;const z=async(t,e)=>{if("string"==typeof t&&(t=F(t)),!t)return;const i=t[m];if(!i.loading)if(t.expanded=null!=e?e:!t.expanded,t.expanded)if(t[u]){const e=g.value.indexOf(t),i=N(t[u],t),s=g.value.slice(0,e+1),l=g.value.slice(e+1);g.value=s.concat(i,l)}else i.src&&!i.loaded&&(i.loading=!0,await i.src().catch(()=>{}),i.loading=!1,i.loaded=!0,z(t,t.expanded));else{const e=g.value.indexOf(t),i=L(t[u]),s=g.value.slice(0,e+1),l=g.value.slice(e+1+i);g.value=s.concat(l)}},D=t=>{x.value!==t.target.scrollTop&&(x.value=t.target.scrollTop)},E=()=>{Y()},N=(t,e)=>{let i=[];return t&&t.forEach(t=>{i.push(t);const s=t[m];s||(t[m]={level:e?e[m].level+1:0,parent:e,src:l.src&&l.src(t)}),t[u]&&t[u].length?t.expanded?i=i.concat(N(t[u],t)):s||N(t[u],t):t.expanded&&t[m].src&&r.nextTick(()=>z(t,!0))}),i},L=t=>{let e=0;for(let i of t)e++,i[u]&&i.expanded&&(e+=L(i[u]));return e},F=(t,e)=>{if(t&&t[m])return t;e||(e=l.children);for(let i of e){if(i[h]===t)return i;if(i[u]&&i[u].length){const e=F(t,i[u]);if(e)return e}}},A=t=>{const e=F(t);if(e){let t=e,i=t;for(;t=t[m].parent;)t.expanded||(t.expanded=!0,i=t);i&&i!=e&&z(i,!0)}return e},H=(t,e)=>{for(let i of t){let t=e.find(t=>t[h]===i[h]);t&&(t[u]&&(i[u]?H(i[u],t[u]):i[u]=t[u]),null!=t.expanded&&(i.expanded=t.expanded))}},I=r.computed(()=>{const t=Math.floor(x.value/a),e=g.value.slice(t,t+f.value).map((e,i)=>(e[m].showIndex=i+t,e));return e}),Y=()=>{w.value=v.value.el("wScrollOverflow").getBoundingClientRect(),f.value=Math.ceil(w.value.height/a)+1},O=async t=>{await r.nextTick(),I.value.find(e=>t===e[h])||A(t);const e=I.value.findIndex(e=>t===e[h]);if(-1===e||e===I.value.length-1){const e=F(t),i=g.value.indexOf(e);i>-1&&(await r.nextTick(),v.value.scrollToY((i+1)*a-w.value.height/2))}},j=async t=>{if(await r.nextTick(),n=t,(t=t&<.arrayID(t))&&t.length){for(let e of t)I.value.find(t=>e===t[h])||A(e);B&&O(t[0])}};return r.onMounted(async()=>{if(r.watch(()=>v.value.wScrollSizeY,t=>{Y()},{immediate:!0}),r.watch(()=>l.children,t=>{g.value=N(t),n&&n==l.current&&j(l.current)},{immediate:!0}),r.watch(()=>l.current,j,{deep:!0}),!l.children||0==l.children.length){const t=l.src&&l.src();t&&(b.value=!0,await t().catch(()=>{}),b.value=!1)}}),e({toggle:z,focus:O,find:F,merge:t=>{if(!Array.isArray(t))return[];const e=JSON.parse(JSON.stringify(l.children));H(t,e),l.children.length=0,l.children.push.apply(l.children,t),g.value=N(t)}}),(t,e)=>{const i=r.resolveComponent("w-img"),l=r.resolveComponent("w-vertical");return r.openBlock(),r.createBlock(l,{ref_key:"root",ref:v,class:"w-tree w-tree-v2","scroll-y":!0,onScroll:D,onResize:E},{default:r.withCtx(()=>[_.value?r.renderSlot(t.$slots,"loading",{key:0},()=>[r.createElementVNode("div",si,[r.createVNode(i,{src:"#f-svg-loading-1",width:"28",height:"28"})])]):(r.openBlock(),r.createElementBlock("div",{key:1,class:"w-tree-v2-wrap",style:r.normalizeStyle(y.value)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(I.value,(e,l)=>(r.openBlock(),r.createElementBlock("div",{key:l,class:r.normalizeClass(["w-leaf w-leaf-v2",k(e,l),{"z-folder":T(e),"z-on":M(e),"z-ds":P(e,l)}]),style:r.normalizeStyle(C(e)),onClick:t=>((t,e)=>{P(e)||(B=!1,clearTimeout($),$=setTimeout(()=>B=!0,500),s("click:item",t,e))})(t,e)},[V(e)?(r.openBlock(),r.createBlock(i,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["w-leaf-toggle f-i",e.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:t=>((t,e)=>{t.stopPropagation(),z(e)})(t,e)},null,10,ri)),r.renderSlot(t.$slots,"box",{item:e}),S(e)?(r.openBlock(),r.createBlock(i,{key:2,src:S(e),class:"w-leaf-icon"},null,8,["src"])):r.createCommentVNode("v-if",!0),r.createElementVNode("div",oi,[r.renderSlot(t.$slots,"text",{item:e},()=>[r.createElementVNode("span",{title:e[r.unref(c)]},r.toDisplayString(e[r.unref(c)]),9,ai)])])],14,li))),128))],4))]),_:3},512)}}});hi.__file="src/widgets/TreeV2.vue";var ci={name:"w-label",mixins:[Ut,Jt],props:["text","suffix","vertical"],methods:{html_slots(){return r.h("label",{class:"w-label-text"},r.h("span",this.$slots.default?this.$slots.default():this.x.text+(null==this.x.suffix?"":this.x.suffix)))}},computed:{html_class(){return this.x.vertical&&(this.$parent.labelVertical=!0),["f-oh f-br"+(this.x.vertical?" z-vertical":""),this.html_align_class]},html_style(){return{width:null,"--label-width":this.x.width&<.unitSize(this.x.width)}}},__file:"src/widgets/Label.vue"},ui={mixins:[Ut,Jt],props:["name","value","modelValue","placeholder","label","readonly","readonlyValidate","disabled","required","validateDefault","validateHandler","inputWidth","inputHeight"],emits:["update:modelValue","change","blur","focus"],data(){let t=this.modelValue;return{isFormWidget:!0,isFocus:!1,hasBorder:!1,isPlural:!1,isEdit:!1,loading:!1,warnClass:"",labelVertical:!1,modifiedValue:t,defaultValue:t,placeholder_type:"",validIndex:0}},watch:{modelValue(t,e){this.isEdit?this.isEdit=!1:(null==t&&(t=""),null==e&&(e=""),this.watchModelValue(t,e))}},methods:{val(t,e){if(0==arguments.length)return this.x.modelValue;let i=this.x.modelValue;this.x.modelValue=t,null==i&&(i=""),null==t&&(t="");let s=i!==t;if("object"==typeof i&&(s=JSON.stringify(i)!=JSON.stringify(t)),s&&(this.warnClass&&this.warn(!1),this.isUsableVal(t))){this.isEdit=!0,this.$emit("update:modelValue",t);const i=this.createEvent("change",{originalEvent:e});this.trigger(i,t)}return t},formVal(){return this.input_value},isUsableVal:t=>!0,defaultRuleValue(t){let e=this.rules[t];if(null!=e)return Array.isArray(e)&&(e=e[0]),e&&e.value?e.value:e},watchModelValue(t,e){e!=t&&this.trigger("change",t)},async valid(t){let e=await this.getValidError(t);return e&&(this.warn(),this.showErrorTip(e.text)),!e},async getValidError(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let t=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof t&&(t=Array.isArray(t)?t.join(","):null==t?"":""+t),t=t.trim();let s=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule,l=await s[e.type](t,i,e);if(l)return l}}},getValidErrorSync(t,e){let i=t?this.validTriggers[t]:this.validQueues;if(i&&(this.isNormal||this.isReadonly&&this.x.readonlyValidate)){let s=void 0!==e?e:this.isPlural?this.groupFormVal():this.formVal();"string"!=typeof s&&(s=Array.isArray(s)?s.join(","):null==s?"":""+s),s=s.trim();let l=this.validHooks;for(let e of i){let i="object"!=typeof e.rule?e.rule:void 0!==e.rule.value?e.rule.value:e.rule;if(!e.rule||e.rule.trigger==t){let t=l[e.type](s,i,e);if(t&&!(t instanceof Promise))return t}}}},formErr(t,e){let i=this.getLabelText(),s=t.type,l=t.rule&&t.rule.text;return l||(l=lt.loc.ps.apply(null,[lt.loc.form[s],i||""].concat(null!=e&&""!==e?e:[]))||""),{wid:this.uid,name:this.x.name,type:s,label:i,text:l}},warn(t){let e="string"==typeof t?t:!1!==t?"z-err":"";this.warnClass=e,!e&&this._tip&&this._tip.close()},showErrorTip(t){this.scrollIntoView({ease:200,success:()=>{this.pop("w-tip",{text:t,face:"warn",independent:!0,snap:this.errorTipTarget,onClose:()=>this._tip=null},t=>{this._tip=t})}})},focus(){return this.$refs.v.focus(),this},formText(){let t=this.val();return null==t?"":t},getLabelText(){let t=this.x.label||this.pubParent&&this.pubParent.x.label;return t?t.text||t:""},onCloseDrop(){this.showDrop=!1},mergeDropProps(t){return this.x.dropProps&&(t=r.mergeProps(t,this.x.dropProps)),t.onClose=()=>{this.onCloseDrop(),this.x.dropProps&&this.x.dropProps.onClose&&this.x.dropProps.onClose()},t},oninput(t){this.val(t.target.value),this.baseValid("change")},baseFocus(t){this.isFocus=!0,this.warn(!1),this.trigger(t),this.baseValid("focus")},baseBlur(t){this.isFocusTarget(t.relatedTarget)||(this.isFocus=!1),this.trigger(t),this.baseValid("blur")},baseValid(t){this.validTriggers[t]&&(clearTimeout(this._baseValidTimer),this._baseValidTimer=setTimeout(()=>{if(!this.$.isUnmounted&&!this.$.isDeactivated){(new Date).getTime()-ge.time>100&&this.valid(t)}},100))},snapElem(){return this.el("form")},hasBubble(t){return this.snapElem().contains(t.isWidget?t.el():t)},isFocusTarget(t){},getInputValue:t=>t,isModified(t){let e=t?this.defaultValue:this.modifiedValue,i=this.x.modelValue;return null==e&&(e=""),null==i&&(i=""),e!=i&&this.getInputValue(e)!=this.getInputValue(i)},saveModified(t){this.modifiedValue=lt.lodash.clone(this.x.modelValue),t&&(this.defaultValue=this.modifiedValue)},reset(t){this.warn(!1),this.val(t||null==this.defaultValue?"":this.defaultValue)},html_label(){if(this.$slots.label)return this.$slots.label();if(this.x.label&&"object"==typeof this.x.label){const t=lt.cloneDeep(this.x.label);if(null==t.width&&delete t.width,0!=t.width)return r.h(ci,t)}},html_input(){return r.h(this.input_tag,{class:"w-input-value",ref:"v",id:this.uid+"v",type:this.input_type,name:this.input_name,value:this.input_value,readonly:this.isReadonly,disabled:this.isDisabled,placeholder:this.input_placeholder,autocomplete:"off",oninput:this.oninput,onfocus:this.baseFocus,onblur:this.baseBlur,...this.input_prop})},html_input_hidden(){return this.x.name?r.h("input",{type:"hidden",ref:"v",name:this.input_name,value:this.input_value,disabled:this.isDisabled,class:"f-hide"}):[]},html_button:()=>[],html_form_slot(){return[this.slot("prepend"),this.html_input(),this.html_button(),this.slot("append")]},html_slot_down(){return this.slot("down")},html_main(){return r.h("div",{class:"w-formbase-main"},[this.html_form(),this.html_slot_down()])},html_form(){let t=this.x.inputHeight&<.unitSize(this.x.inputHeight);return r.h("div",r.mergeProps({ref:"form",id:this.uid+"form",class:["w-input",{"w-input-border":this.hasBorder,[`f-${this.dir}-gap`]:lt.br.compat.gap&&this.x.gap}],style:{height:t},title:this.input_title},this.form_prop),this.html_form_slot())},html_slots(){return[this.html_label(),this.html_main(),this.slot("right")]}},computed:{rules(){return this.x},pubValidHooks(){return{required:(t,e,i)=>{if(e&&!t)return this.formErr(i)},pattern:(t,e,i)=>{if(t&&e&&("string"==typeof e?!lt.eval(`${e}.test(v)`,{rule:e,v:t}):e.test&&!e.test(t)))return this.formErr(i)},validateHandler:async(t,e,i)=>{let s=e&&e(t);if(s){let t=await s;if(t)return this.formErr({type:"validateHandler",rule:{text:t}})}}}},validHooks(){return this.pubValidHooks},validQueues(){let t=[],e="validateDefault";this.validHooks[e]&&t.push({type:e});for(let e in this.validHooks)if(!t.includes(e)){let i=this.rules[e];null!=i&&(Array.isArray(i)?i.forEach(i=>t.push({type:e,rule:i})):t.push({type:e,rule:i}))}return t},validTriggers(){let t={};return Object.keys(this.validHooks).forEach(e=>{let i=this.rules[e];if(i)if(Array.isArray(i))for(let s of i)s.trigger&&(t[s.trigger]||(t[s.trigger]=[])).push({type:e,rule:s});else i.trigger&&(t[i.trigger]||(t[i.trigger]=[])).push({type:e,rule:i})}),t},input_value(){return this.getInputValue(this.x.modelValue)},input_name(){return this.x.name},input_tag:()=>"input",input_type:()=>"text",input_title(){},input_prop(){},input_placeholder(){if(!this.isNormal)return;let t=this.x.placeholder;return null==t&<.x.autoPlaceholder&&this.x.label&&(t=lt.loc.ps(lt.loc[this.placeholder_type||"placeholder_input"],this.x.label.text||this.x.label)),t},form_prop(){},hasVal(){return null!=this.x.modelValue&&""!==this.x.modelValue},isNormal(){return!this.isReadonly&&!this.isDisabled},isDisabled(){return!!this.x.disabled},isReadonly(){return!!this.x.readonly},errorTipTarget(){return this},hasClassSlotDown(){return!!this.$slots.down},html_on(){},html_props(){return this.x.inputWidth&<.unitSize(this.x.inputWidth),{class:["w-formbase",this.warnClass,this.html_align_class,{"z-on":this.isFocus,"z-ds":!this.isNormal,"z-req":this.rules.required,"z-label-vertical":this.labelVertical,"z-slot-down":this.hasClassSlotDown}],...this.html_on}}},__file:"src/widgets/FormBase.vue"};const{leafSymbol:di,changeSymbol:pi}=lt.symbol;var mi={name:"w-checkbox",pubParentName:"w-checkboxgroup",mixins:[ui],props:["text","checked","partialSubmit","minSize","maxSize"],inject:["providePubParent","provideBoxParent"],emits:["change","update:checked","click"],data:()=>({isPlural:!0,indeterminate:!1,modifiedChecked:!1,defaultChecked:!1}),created(){this.provideBoxParent&&(this.provideBoxParent.boxProxy=this),this.defaultChecked=this.isChecked,this.modifiedChecked=this.isChecked},methods:{val(t,e){if(0==arguments.length)return this.getVal();const i=this.createEvent("change",{target:this.$refs.v,originalEvent:e});this.setVal(t,i)},getVal(){return this.isChecked?this.value:""},setVal(t,e){this.pubParent;let i=this.checkValue,s="radio"===this.input_type,l=this.x.modelValue;l=s?t?lt.string(i):"":t?lt.idsAdd(l,i):lt.idsRemove(l,i),this.x.modelValue=l,s&&this.siblings().forEach(t=>t.x.modelValue=l),this.$emit("update:modelValue",l),this.trigger(e,l),this.parentTrigger(e,l)},formVal(){return!this.isDisabled&&this.isChecked?this.x.value:""},groupFormVal(t){if(null==t){let t=[];return lt.lodash.each(this.siblings(null,!0),e=>{let i=e.formVal();null!=i&&""!==i&&t.push(i)}),t.join(",")}Array.isArray(t)&&(t=t.join(",")),lt.lodash.each(this.siblings(),e=>e.val(lt.idsAny(t,e.checkValue)))},watchModelValue(t,e){e!=t&&this.parentTrigger("change",t)},getInputValue:t=>null==t?"":t,parentTrigger(t,e){this.pubParent&&this.pubParent.watchValue!=e&&(this.pubParent.watchValue=e,this.pubParent.trigger(t,e))},check(t){this.isNormal&&this.val(t)},siblingsContainer(){return this.ownerView.el()},siblings(t,e){return lt.lodash.map(lt.q(':input[name="'+this.input_name+'"]:not([w-form-ignore] :input)'+(e?":not(:disabled)":"")+(!0===t?":checked":!1===t?":not(:checked)":t||""),this.siblingsContainer()),t=>lt(t))},relate(){},reset(t){this.pubParent?this.pubParent.reset(t):this.val(!(t||!this.defaultChecked))},onclick(t){t.stopPropagation()},onbasechange(t){this.warnClass&&this.siblings().forEach(t=>t.warn&&t.warn(!1)),this.setVal(t.target.checked,t)},onchange(t){this.onbasechange(t)},isModified(t){return(t?this.defaultChecked:this.modifiedChecked)!=this.isChecked},saveModified(t){this.modifiedChecked=this.isChecked,t&&(this.defaultChecked=this.modifiedChecked)},snapElem(){return this.el()},html_input(){return[r.h(this.input_tag,{ref:"v",class:"w-input-value",type:this.input_type,name:this.input_name,value:this.input_value,checked:this.isChecked,disabled:this.isDisabled,onclick:t=>{this.isNormal?(this.indeterminate=!1,this.x.cancelable&&this.isChecked&&(t.preventDefault(),this.val(!1),setTimeout(()=>{this.$refs.v.checked=!1}))):t.preventDefault()},onchange:this.onchange,...this.input_prop}),r.h("em",{ref:"appear",class:this.$options.name+"-appear"},r.h("i",{class:this.input_icon})),this.$slots.text||this.x.text?r.h("span",{class:this.$options.name+"-text"},this.$slots.text?this.$slots.text():this.x.text):null]},html_main(){return r.h("label",{class:"w-input",onclick:this.onclick},this.html_input())},html_target(){return this.$slots.default?r.h(Kt,{class:this.$options.name+"-target",width:"*",ref:"target"},this.$slots):[]},html(){return this.$slots.default?[this.html_self(!0),this.html_target()]:this.html_self()}},computed:{validHooks(){return{...this.pubValidHooks,minSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length<lt.number(e))return this.formErr(i,[e])},maxSize:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t.split(",").length>lt.number(e))return this.formErr(i,[e])}}},rules(){return{required:null!=this.x.required?!!this.x.required:!(!this.pubParent||!this.pubParent.x.required),minSize:null!=this.x.minSize?this.x.minSize:this.pubParent&&this.pubParent.x.minSize,maxSize:null!=this.x.maxSize?this.x.maxSize:this.pubParent&&this.pubParent.x.maxSize}},input_type:()=>"checkbox",input_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_value(){return null==this.x.value?"":this.x.value},isIndeterminate(){return this.data&&this.data[di]?this.data[di].indeterminate:this.indeterminate},input_prop(){return{indeterminate:this.isIndeterminate,"w-partialsubmit":this.x.partialSubmit?1:null,"w-all":this.x.all?"":null}},input_icon:()=>"f-i f-i-check",checkValue(){return this.x.value},isChecked(){return lt.idsAny(this.x.modelValue,this.checkValue)},isDisabled(){return null!=this.x.disabled?!!this.x.disabled:this.pubParent&&this.pubParent.disabled},isReadonly(){return null!=this.x.readonly?!!this.x.readonly:this.pubParent&&this.pubParent.readonly},html_class(){return{"z-half":this.isIndeterminate,"z-target":!!this.$slots.default,"z-checked":this.isChecked}}},mounted(){this.$refs.target&&this.$watch(()=>this.x.modelValue,t=>{this.siblings().forEach(t=>{let e=t.$refs.target;e&&this.ownerView.fAll(null,e.$el).forEach(e=>e.x.disabled=!t.isChecked)})},{immediate:!0})},__file:"src/widgets/CheckBox.vue"};const{leafSymbol:fi}=lt.symbol;var xi={name:"w-triplebox",mixins:[mi],props:["all"],inject:["provideTripleboxContainer"],created(){if(this.provideBoxParent){if(this.data&&!this.data[fi]){const t=this.provideBoxParent.provideParentLeaf,e=t&&t.boxProxy&&t.boxProxy.data,i=r.computed(()=>{if(this.data.children&&this.data.children.length){let t,e;const i=this.x.modelValue;for(let s of this.data.children){if(!s[fi])return!1;if(s[fi].indeterminate)return!0;lt.idsAny(i,s[fi].checkValue)?t=!0:e=!0}return!(!t||!e)}return!1});this.data[fi]={parent:e,checkValue:this.value,indeterminate:i}}}else this.$watch(()=>this.x.modelValue,(t,e)=>{(null!=t&&""!==t||null!=e&&""!==e)&&(this.x.all||this.relate())})},methods:{getVal(){let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.value:""},checkDescendant(t,e,i){if(t.children)for(let s of t.children){const t=s[fi];e=i?lt.idsAdd(e,t.checkValue):lt.idsRemove(e,t.checkValue),e=this.checkDescendant(s,e,i)}return e},checkAncestor(t,e){const i=t.children.find(t=>!lt.idsAny(e,t[fi].checkValue));return e=i?lt.idsRemove(e,t[fi].checkValue):lt.idsAdd(e,t[fi].checkValue),t[fi].parent&&(e=this.checkAncestor(t[fi].parent,e)),e},setVal(t,e){this.pubParent;let i=this.checkValue,s=this.x.modelValue;if(s=t?lt.idsAdd(s,i):lt.idsRemove(s,i),this.data){this.data.children&&(s=this.checkDescendant(this.data,s,t));const e=this.data[fi];e.parent&&(s=this.checkAncestor(e.parent,s,t))}this.x.modelValue=s,this.$emit("update:modelValue",s),this.x.all||this.parentTrigger(e,this.groupFormVal())},formVal(){if(this.isDisabled)return"";let t=this.checkstate();return 1==t||this.x.partialSubmit&&2==t?this.$refs.v.value:""},siblingsContainer(){let t=this.provideTripleboxContainer;return t&&t.el()||this.ownerView.el()},parentTrigger(t,e){let i=this.provideTripleboxContainer,s=i&&i.el();e&&(e=e.split(",").sort().join(",")),s&&s.getAttribute("wTripleboxValue")!=e&&(s.setAttribute("wTripleboxValue",e),this.trigger(t,e))},onchange(t){this.onbasechange(t),this.relate()},checkstate(t){let e=this.indeterminate?2:this.isChecked?1:0;if(null==t)return e;this.val(1==t),this.indeterminate=2==t},isPartial(){return 2==this.checkstate()},relate(){if(this.x.name&<.q(`[name="${this.x.name}"][w-all]`,lt.el(this.ownerView))[0]){const n=this.ownerView.fAll(this.x.name);for(var t,e=0,i=this.isPartial(),s=n.length,l=s,r=0,o=0,a=0;e<s;e++)if(n[e].isNormal)if(this.x.all)if(this!=n[e]){if(i){this.checkstate(n[e].checkstate());break}n[e].checkstate(this.isChecked?1:0)}else 1==s&&(t=this);else n[e].x.all?t=n[e]:n[e].isChecked?o++:n[e].isPartial()?a++:r++;else l--;t&&(r+o+a||1==s)&&t.checkstate(r==l-1?0:o==l-1?1:2)}},check(t){if(!this.isNormal)return;this.checkstate()!=t&&(this.checkstate(t),this.relate())}},computed:{checkValue(){return this.x.all?"checked":this.x.value}},mounted(){},__file:"src/widgets/TripleBox.vue"},gi={name:"w-leaf",pubParentName:"w-tree",mixins:[Ut,ft],props:["text","expanded","expandedIcon","collapsedIcon","icon","boxSync","src","disabled"],inject:["providePubParent","provideLevel","provideParentLeaf","provideParentTR"],emits:["click"],provide(){return{provideParentLeaf:this,provideLevel:this.provideLevel+1,provideBoxParent:this}},data(){return{hover:!1,loading:!1,loaded:this.getInitLoaded()}},methods:{hasChild(){let t=(this.x||this.$props).children;if(!0===t||Array.isArray(t)&&t.length)return!0},childrenList(){return lt.lodash.map(this.$refs.cont.querySelectorAll(":scope > .w-leaf"),t=>lt(t))},getInitLoaded(){return!(!this.hasChild()&&this.getSrc())},isExpanded(){return this.provideParentTR?this.provideParentTR.isExpanded():this.x.expanded},setExpanded(t){this.x.expanded=null!=t?t:!this.x.expanded},isFolder(){return!!this.hasChild()||!(!this.getSrc()||this.loaded)},toggle(t,e){(this.provideParentTR||this).setExpanded(t),this.isExpanded()&&!this.loaded?this.request(e):e&&this.$nextTick(e)},onmouseenter(t){!this.x.disabled&&this.el().classList.add("z-hv")},onmouseleave(t){this.el().classList.remove("z-hv")},onclick(t){this.x.disabled||(this.boxProxy&&this.x.boxSync&&this.boxProxy.check(!this.boxProxy.isChecked),this.$emit("click",t))},triple(){if(!this.boxProxy||"w-triplebox"!==this.boxProxy.$options.name)return;let t=this;for(;(t=t.provideParentLeaf)&&"w-leaf"===t.$options.name;)if(t.boxProxy){let e=t.childrenList(),i=[0,0,0],s=e.length;e.forEach(t=>{let e=t.boxProxy;e&&i[e.checkstate()]++}),t.boxProxy.check(i[0]===s?0:i[1]===s?1:2)}let e=this.boxProxy.checkstate();2!=e&&this.tripleAll(e)},tripleAll(t){this.childrenList().forEach(e=>{e.boxProxy&&(e.boxProxy.check(t),e.tripleAll(t))})},expandToView(){let t=this;for(;(t=t.provideParentLeaf)&&t.$options.name===this.$options.name;)t.toggle(!0)},html_self(){let t=this.isExpanded(),e=this.isFolder()?t?this.x.expandedIcon:this.x.collapsedIcon:this.x.icon;return r.h("div",r.mergeProps(this.html_attrs,this.html_props,this.$attrs),[this.loading?r.h(we,{src:"#f-svg-loading",class:"w-leaf-loading"}):r.h("div",{ref:"toggle",class:["w-leaf-toggle f-i",t?"f-i-caret-down":"f-i-caret-right"],onclick:t=>{t.stopPropagation(),this.toggle()}}),this.$slots.box&&this.$slots.box(),e&&r.h(we,{src:e,class:"w-leaf-icon"}),r.h("div",{class:"w-leaf-text f-line-1",title:this.x.text},this.$slots.text?this.$slots.text():this.x.text)])},html_cont(){let t,e=this.x.children,i=this.pubParent;return Array.isArray(e)&&i&&(t=e.map((t,e)=>{let s;const l=i.$slots.default({item:t,index:e});for(let t of l)s||(s=t.key);return s?r.h(ze,{key:s},{default:()=>l}):l})),r.h("div",{id:this.uid+"cont",ref:"cont",class:"w-leaf-cont",style:{display:this.x.expanded?"":"none"}},t)},html(){return[this.html_self(),this.html_cont()]}},computed:{tree(){return this.pubParent},level(){return this.provideParentTR?this.provideParentTR.level:this.provideLevel+1},isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=this.isExpanded(),e=this.isFolder(),i=!!this.x.disabled,s={class:{"z-on":this.isCurrent,"z-ds":i,"z-folder":e,"z-expanded":e&&t,"z-collapse":e&&!t},style:"padding-left:"+lt.unitSize(16*this.level)};return this.pubParent&&(s.onmouseenter=this.onmouseenter,s.onmouseleave=this.onmouseleave,s.onclick=this.onclick),s}},mounted(){this.x.expanded&&this.toggle(!0),this.isCurrent&&this.pubParent.viewCurrent(this)},__file:"src/widgets/Leaf.vue"},vi={name:"w-pagebar",mixins:[Qe],emits:["click:item"],props:["limit","size","offset","buttonCount","noFirstLast","face","jump"],data:()=>({isJumpFocus:!1,showDrop:!1}),methods:{x_default:()=>({limit:1,size:0,offset:0,buttonCount:5,face:"normal",gap:0,valign:"middle"}),inCurrent(t){return this.currentPage==t.text},clickItem(t,e){let i=(e-1)*this.x.limit;i!=this.x.offset&&(t.runType="click:item",t.value=i,this.trigger(t,i))},clickDrop(t){this.showDrop=!0},onJumpClick(t){let e=Math.max(0,lt.number(this.$refs.jumpInput.value));this.clickItem(t,e)},html_button(t,e,i,s){return r.h("button",{class:["w-pagebar-button w-pagebar-num",{"z-on":!e&&!i&&t==this.currentPage,"z-ds":s,[i]:i}],disabled:s,onclick:e=>this.clickItem(e,t)},e||(i?"":t))},html_slots(){return"button"===this.x.face?this.html_face_button():"simple"===this.x.face?this.html_face_simple():this.html_face_normal()},html_buttons(){return[r.h(ye,{class:"w-pagebar-button w-pagebar-prev",icon:".f-i .f-i-angle-left",disabled:1==this.currentPage,title:lt.loc.page_text.prev,onclick:t=>this.clickItem(t,this.currentPage-1)}),r.h(ye,{class:"w-pagebar-button w-pagebar-next",icon:".f-i .f-i-angle-right",disabled:this.currentPage==this.sumPage,title:lt.loc.page_text.next,onclick:t=>this.clickItem(t,this.currentPage+1)})]},html_drop(){let t=[];if(this.x.buttonCount&&t.push(r.h(ye,{class:"w-pagebar-button w-pagebar-button-count w-pagebar-prev",ref:"drop",text:this.currentPage+"/"+this.sumPage,onclick:t=>this.clickDrop(t)})),this.showDrop){let e=[];for(let t=1,i=this.sumPage;t<=i;t++)e.push(r.h(ye,{text:t,onClick:e=>this.clickItem(e,t)}));t.push(r.h(Ve,{snap:()=>this.$refs.drop,position:"v",indent:1,onClose:()=>this.showDrop=!1},{default:()=>e}))}return t},html_face_simple(){return this.html_drop().concat(this.html_buttons())},html_face_button(){let t=this.html_buttons();return t.splice(1,0,...this.html_drop()),t},html_face_normal(){const t=[];let e=this.sumPage,i=this.currentPage,s=lt.number(this.x.buttonCount),l=Math.max(1,i-Math.ceil(s/2)+1),o=Math.min(e+1,l+s),a=o-l<s?Math.max(1,o-s):l;this.x.noFirstLast||t.push(this.html_button(1,this.labelFirst,this.iconFirst,1==i)),t.push(this.html_button(i-1,this.labelPrev,this.iconPrev,1==i));for(let e=a;e<o;e++)t.push(this.html_button(e));return t.push(this.html_button(i+1,this.labelNext,this.iconNext,i>=this.sumPage)),this.x.noFirstLast||t.push(this.html_button(e,this.labelLast,this.iconLast,i>=this.sumPage)),this.x.jump&&(t.push(r.h("span",{class:"w-pagebar-jump-to"},lt.loc.to)),t.push(r.h("input",{class:"w-pagebar-jump-input",ref:"jumpInput",onfocus:t=>this.isJumpFocus=!0,onblur:t=>this.isJumpFocus=!1,onkeydown:t=>13==t.keyCode&&this.onJumpClick(t)})),t.push(r.h("button",{class:"w-pagebar-button w-pagebar-jump-button",onclick:this.onJumpClick},"GO")),t.push(r.h("span",{class:"w-pagebar-jump-page"},lt.loc.page))),t},html_face_mini(){return this.html_face_normal()}},computed:{currentPage(){return(Math.ceil(this.x.offset/this.x.limit)||0)+1},sumPage(){return Math.ceil(this.x.size/this.x.limit)||1},labelFirst(){return"normal"===this.x.face?lt.loc.page_text.first:""},labelLast(){return"normal"===this.x.face?lt.loc.page_text.last:""},labelNext(){return"normal"===this.x.face?lt.loc.page_text.next:""},labelPrev(){return"normal"===this.x.face?lt.loc.page_text.prev:""},iconFirst(){return"mini"===this.x.face?"f-i f-i-angle-first":""},iconLast(){return"mini"===this.x.face?"f-i f-i-angle-last":""},iconNext(){return"mini"===this.x.face?"f-i f-i-angle-right":""},iconPrev(){return"mini"===this.x.face?"f-i f-i-angle-left":""},html_class(){return["w-buttonbar w-horizontal","z-face-"+this.x.face,this.html_align_class,this.isJumpFocus&&"z-jump-on"]}},__file:"src/widgets/PageBar.vue"},wi={name:"w-split",mixins:[Ut],props:["collapsedIcon","expandedIcon","movable","range","toNext","expanded"],inject:["provideLayout"],created(){this.$watch("expanded",t=>{"boolean"==typeof t?this.x.expanded=t:null==this.x.expanded&&(this.x.expanded=!0)},{immediate:!0})},methods:{toggle(t){this.x.expanded=null==t?!this.x.expanded:t;let e=this.x.toNext?this.el().nextElementSibling:this.el().previousElementSibling;e&<.q(e).toggleClass("f-split-collapsed",!this.x.expanded)},dragstart(t){let e=this.el().previousElementSibling,i=this.el().nextElementSibling;if(e&&i){let s,l,r=this.inVertical,o=this.x.toNext?i:e,a=lt.eventX(t),n=lt.eventY(t),h=r?"top":"left",c=r?"height":"width",u=r?"clientY":"clientX",d=r?n:a,p=lt.bcr(e)[h],m=lt.bcr(i)[r?"bottom":"right"]-5,f=lt.lodash.pick(lt.bcr(this.$refs.movable),["width","height","top","left"]);lt.moveup(t=>{l||(l=lt.q('<div style="position:absolute;background:rgba(0,0,0,.3);z-index:101;"></div>').css(f).appendTo(document.body)),s=lt.numRange(f[h]+t[u]-d,p,m),l.css({[h]:s})},(t,e)=>{if(e&&l){l.remove();let t=(this.x.expanded?lt.bcr(o)[c]:0)+(this.x.toNext?1:-1)*(d-s);t<=0?this.toggle(!1):(this.x.expanded||this.toggle(!0),lt.q(o).css({[c]:t}))}},t)}},html_slots(){let t=[],e=this.x.expandedIcon||this.x.collapsedIcon,i=this.x.collapsedIcon||e;return e&&t.push(this.html_icon(this.x.expanded?e:i,"w-split-icon",()=>this.toggle())),this.x.movable&&t.push(r.h("div",{ref:"movable",class:"w-split-movable",onmousedown:this.dragstart})),t}},computed:{inVertical(){return"w-vertical"===this.provideLayout},html_props(){return{class:["f-rel z-"+(this.inVertical?"vertical":"horizontal"),{"z-tonext":this.x.toNext}]}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Split.vue"},bi={name:"w-toggle",mixins:[Ut,Jt],props:["collapsedIcon","expandedIcon","expanded","align","valign"],methods:{x_default:()=>({expanded:!0,valign:"middle"}),toggle(t=!0){let e="boolean"==typeof t?t:!this.x.expanded;this.x.expanded=e,lt.q(this.el()).nextUntil(".w-toggle").toggle(e)},html_slots(){let t=this.x.expanded?this.x.expandedIcon:this.x.collapsedIcon;return[t&&r.h(we,{src:t,class:"w-toggle-icon"}),r.h("div",{class:"w-toggle-main"},this.$slots.default())]}},computed:{html_props(){let t=this.x.expanded;return{class:["w-horizontal f-pointer",{"z-expanded":t,"z-collapse":!t},this.html_align_class],onclick:this.toggle}}},mounted(){this.x.expanded||this.toggle(!1)},__file:"src/widgets/Toggle.vue"},_i={name:"w-video",mixins:[Ut],props:["src","poster"],data:()=>({playing:!1}),methods:{getMimeType(){let t=lt.strTo(this.x.src,"?")||this.x.src,e=lt.strFrom(t,"/",!0)||t;return lt.strFrom(e,".",!0)?mimeType(e):"video/mp4"},html_slots(){return[r.h("video",{class:"w-video-vd f-width f-height",ref:"vd",src:this.x.src,poster:this.x.poster,onplay:t=>this.playing=!0,onpause:t=>this.playing=!1,controls:!0,"webkit-playsinline":!0,playsinline:!0,"x-webkit-airplay":!0,"x5-playsinline":!0,"x5-video-player-type":"h5","x5-video-orientation":"h5","x5-video-player-fullscreen":!0}),r.h("div",{class:"w-video-play f-abs-center f-flex-center",innerHTML:'<i class="f-i f-i-play"></i>',onclick:t=>{let e=this.$refs.vd;e.paused?e.play():e.pause()}})]}},computed:{html_class(){return["f-rel f-flex-center",{"z-play":this.playing}]}},__file:"src/widgets/Video.vue"},yi={name:"w-progress",mixins:[Ut],props:["percent","range","text"],methods:{html_slots(){let t=lt.number(this.x.percent),e=this.x.text;return null==e&&(e=t+"%"),[r.h("span",{class:"w-progress-text"},e),r.h("div",{class:"w-progress-gut",style:{width:`${t}%`}},r.h("div",{class:"w-progress-bar f-flex f-flex-center",style:{width:`${0==t?t:1e4/t}%`}},r.h("span",{class:"w-progress-text"},e)))]}},computed:{html_class(){if(this.x.range){let t=this.x.range.split(",");for(let e=t.length-1;e>=0;e--)if(lt.number(this.x.percent)>=lt.number(t[e]))return"z-"+t[e]}}},__file:"src/widgets/Progress.vue"},ki={name:"w-calendar",mixins:[Ut],emits:["click:item","change"],props:["value","minValue","maxValue","current","pad","face","format","success","cg","start","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data(){return{dt:this.value2date(),currentDate:null,headPopYear:null,headPopMonth:null}},watch:{value(t){this.dt=this.value2date()},dt(t,e){let i=t.getFullYear(),s=e.getFullYear();if("year"===this.x.face){(""+i).slice(-2,-1)!=(""+s).slice(-2,-1)&&this.trigger("change",t)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?i!=s&&this.trigger("change",t):"date"===this.x.face&&(i==s&&t.getMonth()==e.getMonth()||this.trigger("change",t))},current(t){if(!t)return;let e="string"==typeof t?lt.dateParse(t,this.formatter):t,i=this.dt,s=e.getFullYear(),l=i.getFullYear();if("year"===this.x.face){(""+s).slice(-2,-1)!=(""+l).slice(-2,-1)&&(this.dt=e)}else"quarter"===this.x.face||"month"===this.x.face||"week"===this.x.face?s!=l&&(this.dt=e):"date"===this.x.face&&(s==l&&e.getMonth()==i.getMonth()||(this.dt=e))}},methods:{x_default(){let t=this.format||"";return{face:"yyyy"===t?"year":t.includes("MM")&&!t.includes("dd")?"month":t.includes("ww")?"week":t.includes("qq")?"quarter":"date"}},value2date(){let t=this.value,e=this.minValue,i=this.maxValue,s=this.format||"";return e&&(!t||t<e)&&(t=e),i&&(!t||t>i)&&(t=i),t=t?lt.dateParse(t,s):new Date,this.value||this.setDefaultTime(t),t},weekday(t){let e=t.getDay();return 0==e?6:e-1},setDefaultTime(t){let e=null==this.defaultHour?t.getHours():parseFloat(this.defaultHour);if(this.enableHour){let t=lt.arrayNumber(this.enableHour);t.includes(e)||(e=t[0])}t.setHours(e);let i=null==this.defaultMinute?t.getMinutes():parseFloat(this.defaultMinute);if(this.enableMinute){let t=lt.arrayNumber(this.enableMinute);t.includes(i)||(i=t[0])}t.setMinutes(i);let s=null==this.defaultSecond?t.getSeconds():parseFloat(this.defaultSecond);if(this.enableSecond){let t=lt.arrayNumber(this.enableSecond);t.includes(s)||(s=t[0])}return t.setSeconds(s),t},fixDate(t){return this.beginDate&&t<this.beginDate&&(t=this.beginDate),this.endDate&&t>this.endDate&&(t=this.endDate),this.setDefaultTime(new Date(t.getTime()))},clickStep(t){let e=new Date(this.dt.getTime());"year"==this.x.face?e=lt.dateAdd(e,"y",10*t):"quarter"==this.x.face||"month"==this.x.face?e=lt.dateAdd(e,"y",t):"date"==this.x.face?e=lt.dateAdd(e,"M",t):"week"==this.x.face&&(e=lt.dateAdd(e,"y",t)),this.dt=e},clickPopYear(t){(t=t||this.dt.getFullYear()-4)<1e3&&(t=1e3),this.headPopYear=Array.from(Array(10)).map((e,i)=>t+i)},clickPopYearItem(t){let e=new Date(this.dt.getTime());e.setFullYear(t),this.dt=e,this.headPopYear=null},clickPopYearStep(t){let e=this.headPopYear,i=t<0?e[0]-10:e[e.length-1]+1;this.clickPopYear(i)},mousewheelPopYear(t){this.clickPopYearStep(t.deltaY>0?-1:1)},clickPopMonth(){this.headPopMonth=Array.from(Array(12)).map((t,e)=>e+1)},clickPopMonthItem(t){this.dt.getMonth(),this.dt=lt.dateAdd(this.dt,"M",t-1-this.dt.getMonth()),this.headPopMonth=null},clickItem(t,e){e.disabled||(void 0!==this.x.current&&(this.dt=this.fixDate(e.date)),t.runType="click:item",t.value=e,this.trigger(t,e),this.hasTime||this.callback(e.value,t))},clickNow(t){this.callback(this.fixDate(new Date),t)},clickConfirm(t){let e=this.dt,i=this.focusDate,s=this.fixDate(new Date(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()));this.callback(s,t)},callback(t,e){"object"==typeof t&&(t=this.fm(t)),this.x.success&&this.x.success(t,e)},clickHour(t,e){this.dt.setHours(e),this.dt=this.fixDate(this.dt),this.$refs.hour.scrollToY(t.currentTarget,"middle",150)},clickMinute(t,e){this.dt.setMinutes(e),this.dt=this.fixDate(this.dt),this.$refs.minute.scrollToY(t.currentTarget,"middle",150)},clickSecond(t,e){this.dt.setSeconds(e),this.dt=this.fixDate(this.dt),this.$refs.second.scrollToY(t.currentTarget,"middle",150)},fm(t){return lt.dateFormat("string"==typeof t?lt.dateParse(t,this.formatter):t,this.formatter)},isHourDisabled(t){let e=this.minHour,i=this.maxHour;return e&&e>t||i&&i<t},isMinuteDisabled(t){let e=this.minMinute,i=this.maxMinute;return e&&e>t||i&&i<t},isSecondDisabled(t){let e=this.minSecond,i=this.maxSecond;return e&&e>t||i&&i<t}},computed:{loc:()=>lt.loc,formatter(){return this.x.format||"yyyy-MM-dd"},hasTime(){return/[Hms]/.test(this.formatter)},onlyTime(){return this.hasTime&&!/[yMd]/.test(this.formatter)},focusValue(){let t=this.focusDate;return t&&this.fm(t)},focusDate(){let t=this.x.current;return t?lt.dateParse(t,this.x.format):!this.x.value&&this.x.success?this.x.format&&this.dt:void 0},beginDate(){return this.x.minValue&<.dateParse(this.x.minValue,this.formatter)},endDate(){return this.x.maxValue&<.dateParse(this.x.maxValue,this.formatter)},focusHour(){return this.x.format.includes("H")&&this.dt.getHours()},focusMinute(){return this.x.format.includes("m")&&this.dt.getMinutes()},focusSecond(){return this.x.format.includes("s")&&this.dt.getSeconds()},minHour(){if(this.beginDate){let t=this.beginDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},maxHour(){if(this.endDate){let t=this.endDate,e=this.dt;if(t.getFullYear()==e.getFullYear()&&t.getMonth()==e.getMonth()&&t.getDate()==e.getDate())return t.getHours()}},minMinute(){if(this.minHour===this.dt.getHours())return this.beginDate.getMinutes()},maxMinute(){if(this.maxHour===this.dt.getHours())return this.endDate.getMinutes()},minSecond(){if(this.minMinute===this.dt.getMinutes())return this.beginDate.getSeconds()},maxSecond(){if(this.maxMinute===this.dt.getMinutes())return this.endDate.getSeconds()},headYear(){let t=this.dt.getFullYear();return"year"===this.x.face&&(t=this.dt.getFullYear()-this.dt.getFullYear()%10,t+=" - "+(t+9)),lt.loc.ps(lt.loc.calendar.y,t)},headMonth(){return lt.loc.calendar.monthname[this.dt.getMonth()]},bodyList(){return"year"===this.x.face?this.bodyListYear:"quarter"===this.x.face?this.bodyListQuarter:"month"===this.x.face?this.bodyListMonth:"week"===this.x.face?this.bodyListWeek:this.bodyListDate},bodyListYear(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=this.dt.getFullYear()-this.dt.getFullYear()%10-1,r=new Date(this.dt.getTime());r.setDate(1),r.setFullYear(l);for(let o=0;o<12;o++){let a=l+o,n={value:a,text:a,date:new Date(r.getTime()),pad:0==o||11==o,disabled:!!(e&&e>a||i&&i<a),focus:s==a};t.push(n),r.setFullYear(r.getFullYear()+1)}return t},bodyListQuarter(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=1;r<=4;r++){let o=this.fm(l),a={text:`Q${r}`,value:o,date:new Date(l.getTime()),disabled:!!(e&&e>o||i&&i<o),focus:s==o};l.setMonth(l.getMonth()+3),t.push(a)}return t},bodyListMonth(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue;this.dt.getFullYear();let l=new Date(this.dt.getTime());l.setDate(1),l.setMonth(0);for(let r=0;r<12;r++){let o=this.fm(l),a={text:lt.loc.calendar.monthname[r],value:o,date:new Date(l.getTime()),disabled:!!(e&&e>o||i&&i<o),focus:s==o};l.setMonth(l.getMonth()+1),t.push(a)}return t},bodyListWeek(){let t=[],e=this.x.minValue,i=this.x.maxValue,s=this.focusValue,l=lt.dateWeek(this.dt)[0],r=lt.dateWeekLast(l),o=lt.dateWeekFirst(l)[2];for(let a=1,n=r[1];a<=n;a++){let r=this.fm(o),n={text:a,value:l+"-"+lt.strPad(a),date:new Date(o.getTime()),disabled:!!(e&&e>r||i&&i<r),focus:s==r,title:lt.loc.ps(lt.loc.calendar.from_to,lt.dateFormat(o,"yyyy-MM-dd"),lt.dateFormat(lt.dateAdd(o,"d",6),"yyyy-MM-dd"))};o.setDate(o.getDate()+7),t.push(n)}return t},bodyListDate(){let t=new Date(this.dt.getTime()),e=t.getMonth(),i=new Date(t.getTime()),s=this.focusValue,l=s&<.dateFormat(lt.dateParse(s,this.x.format),"yyyy-MM-dd"),r=this.beginDate&<.dateFormat(this.beginDate,"yyyy-MM-dd"),o=this.endDate&<.dateFormat(this.endDate,"yyyy-MM-dd"),a=[];t.setDate(1),i.setDate(new Date(t.getFullYear(),e+1,0).getDate());let n=7-(this.weekday(t)+i.getDate())%7;for(n&&n<7&&i.setDate(i.getDate()+n),this.weekday(t)>0&&t.setDate(1-this.weekday(t)),this.x.pad&&(n=1+(i.getTime()-t.getTime())/864e5,n<42&&i.setDate(i.getDate()+42-n));t<=i;){let i=this.fm(t),s=lt.dateFormat(t,"yyyy-MM-dd"),n={text:t.getDate(),value:i,date:new Date(t.getTime()),pad:t.getMonth()!==e,disabled:!!(r&&r>s||o&&o<s),focus:l===s};a.push(n),t.setDate(t.getDate()+1)}return a},bodyListHour(){return this.enableHour?lt.arrayNumber(this.enableHour):Array.from(Array(24).keys())},bodyListMinute(){return this.enableMinute?lt.arrayNumber(this.enableMinute):Array.from(Array(60).keys())},bodyListSecond(){return this.enableSecond?lt.arrayNumber(this.enableSecond):Array.from(Array(60).keys())}}};const Ci=["innerHTML"],Si=["onClick"],Vi=["onClick"],Ti={class:"w-calendar-body"},Mi={class:"w-calendar-daytitle"},Pi=["title","onClick"],$i={class:"w-calendar-item-text"},Bi={class:"w-calendar-time-th"},zi={class:"w-calendar-time-th"},Di={class:"w-calendar-time-th"};ki.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-html"),n=r.resolveComponent("w-dialog"),h=r.resolveComponent("w-horizontal"),c=r.resolveComponent("w-vertical"),u=r.resolveComponent("w-button"),d=r.resolveComponent("w-buttonbar");return r.openBlock(),r.createBlock(c,r.mergeProps(t.html_binds,{class:["f-rel","w-calendar-"+this.x.face]}),{default:r.withCtx(()=>[o.onlyTime?r.createCommentVNode("v-if",!0):(r.openBlock(),r.createBlock(c,{key:0,class:"w-calendar-main"},{default:r.withCtx(()=>[r.createVNode(h,{class:r.normalizeClass(["w-calendar-head",{"f-h-gap":t.dfish.br.compat.gap}]),valign:"middle",align:"center"},{default:r.withCtx(()=>["date"==t.x.face?(r.openBlock(),r.createElementBlock("i",{key:0,class:"w-calendar-head-prev-year f-i f-i-angle-double-left f-pointer",onClick:e[0]||(e[0]=t=>o.clickStep(-12))})):r.createCommentVNode("v-if",!0),r.createElementVNode("i",{class:"w-calendar-head-prev f-i f-i-angle-single-left f-pointer",onClick:e[1]||(e[1]=t=>o.clickStep(-1))}),r.createVNode(h,{class:r.normalizeClass(["w-calendar-head-pop",{"f-h-gap":t.dfish.br.compat.gap}])},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"w-calendar-head-year f-link",ref:"popYear",onClick:e[2]||(e[2]=t=>o.clickPopYear()),innerHTML:o.headYear},null,8,Ci),l.headPopYear?(r.openBlock(),r.createBlock(n,{key:0,class:"f-dfish-dialog",width:"72",context:t.$refs.popYear,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popYear,onClose:e[5]||(e[5]=t=>l.headPopYear=null)},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"w-calendar-head-year-item",onClick:e[3]||(e[3]=t=>o.clickPopYearStep(-1))},e[11]||(e[11]=[r.createElementVNode("i",{class:"f-i f-i-minus"},null,-1)])),r.createVNode(a,{height:"*",onWheelPassive:o.mousewheelPopYear},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.headPopYear,t=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-calendar-head-year-item",{"z-on":t==l.dt.getFullYear()}]),onClick:e=>o.clickPopYearItem(t)},r.toDisplayString(t),11,Si))),256))]),_:1},8,["onWheelPassive"]),r.createVNode(a,{class:"w-calendar-head-year-item",onClick:e[4]||(e[4]=t=>o.clickPopYearStep(1))},{default:r.withCtx(()=>e[12]||(e[12]=[r.createElementVNode("i",{class:"f-i f-i-plus"},null,-1)])),_:1,__:[12]})]),_:1},8,["context","snap"])):r.createCommentVNode("v-if",!0),"date"==t.x.face?(r.openBlock(),r.createBlock(a,{key:1,class:"w-calendar-head-month f-link",ref:"popMonth",onClick:o.clickPopMonth},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.headMonth),1)]),_:1},8,["onClick"])):r.createCommentVNode("v-if",!0),l.headPopMonth?(r.openBlock(),r.createBlock(n,{key:2,class:"f-dfish-dialog",width:"72",context:t.$refs.popMonth,"auto-hide":!0,ownproperty:!0,snap:t.$refs.popMonth,onClose:e[6]||(e[6]=t=>l.headPopMonth=null)},{default:r.withCtx(()=>[r.createVNode(a,{height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.headPopMonth,t=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["w-calendar-head-year-item",{"z-on":t==l.dt.getMonth()+1}]),onClick:e=>o.clickPopMonthItem(t)},r.toDisplayString(t),11,Vi))),256))]),_:1})]),_:1},8,["context","snap"])):r.createCommentVNode("v-if",!0)]),_:1},8,["class"]),r.createElementVNode("i",{class:"w-calendar-head-next f-i f-i-angle-single-right f-pointer",onClick:e[7]||(e[7]=t=>o.clickStep(1))}),"date"==t.x.face?(r.openBlock(),r.createElementBlock("i",{key:1,class:"w-calendar-head-next-year f-i f-i-angle-double-right f-pointer",onClick:e[8]||(e[8]=t=>o.clickStep(12))})):r.createCommentVNode("v-if",!0),e[13]||(e[13]=r.createElementVNode("div",{class:"w-calendar-head-blank"},null,-1))]),_:1,__:[13]},8,["class"]),r.renderSlot(t.$slots,"head"),r.createElementVNode("div",Ti,["date"==t.x.face?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(o.loc.calendar.day_title_1,t=>(r.openBlock(),r.createElementBlock("div",Mi,r.toDisplayString(t),1))),256)):r.createCommentVNode("v-if",!0),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyList,(e,i)=>(r.openBlock(),r.createElementBlock("div",{title:e.title,class:r.normalizeClass(["w-calendar-item",{"z-on":e.focus&&!e.disabled,"z-pad":e.pad,"z-ds":e.disabled}]),onClick:t=>o.clickItem(t,e)},[r.renderSlot(t.$slots,"default",{item:e,index:i},()=>[r.createElementVNode("div",$i,r.toDisplayString(e.text),1)])],10,Pi))),256))])]),_:3})),o.hasTime?(r.openBlock(),r.createBlock(h,{key:1,class:"w-calendar-time"},{default:r.withCtx(()=>[!1!==o.focusHour?(r.openBlock(),r.createBlock(c,{key:0,class:"w-calendar-time-col w-calendar-time-hour",width:"*"},{default:r.withCtx(()=>[r.createElementVNode("div",Bi,r.toDisplayString(o.loc.hour),1),r.createVNode(d,{class:"w-calendar-time-body",ref:"hour",current:o.focusHour,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyListHour,e=>(r.openBlock(),r.createBlock(u,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:o.isHourDisabled(e),onClick:t=>o.clickHour(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):r.createCommentVNode("v-if",!0),!1!==o.focusMinute?(r.openBlock(),r.createBlock(c,{key:1,class:"w-calendar-time-col w-calendar-time-minute",width:"*"},{default:r.withCtx(()=>[r.createElementVNode("div",zi,r.toDisplayString(o.loc.minute),1),r.createVNode(d,{class:"w-calendar-time-body",ref:"minute",current:o.focusMinute,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyListMinute,e=>(r.openBlock(),r.createBlock(u,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:o.isMinuteDisabled(e),onClick:t=>o.clickMinute(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):r.createCommentVNode("v-if",!0),!1!==o.focusSecond?(r.openBlock(),r.createBlock(c,{key:2,class:"w-calendar-time-col w-calendar-time-second",width:"*"},{default:r.withCtx(()=>[r.createElementVNode("div",Di,r.toDisplayString(o.loc.second),1),r.createVNode(d,{class:"w-calendar-time-body",ref:"second",current:o.focusSecond,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.bodyListSecond,e=>(r.openBlock(),r.createBlock(u,{class:"w-calendar-time-item",key:e,text:t.dfish.strPad(e),disabled:o.isSecondDisabled(e),onClick:t=>o.clickSecond(t,e)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):r.createCommentVNode("v-if",!0)]),_:1})):r.createCommentVNode("v-if",!0),i.success?(r.openBlock(),r.createBlock(h,{key:2,class:r.normalizeClass(["w-calendar-foot",{"f-h-gap":t.dfish.br.compat.gap}]),align:"between",valign:"middle"},{default:r.withCtx(()=>[r.createElementVNode("div",{class:"w-calendar-button-now f-link",onClick:e[9]||(e[9]=(...t)=>o.clickNow&&o.clickNow(...t))},r.toDisplayString(o.loc.calendar.now),1),r.createElementVNode("div",{class:"w-calendar-button-confirm f-link",onClick:e[10]||(e[10]=(...t)=>o.clickConfirm&&o.clickConfirm(...t))},r.toDisplayString(o.loc.confirm),1)]),_:1},8,["class"])):r.createCommentVNode("v-if",!0)]),_:3},16,["class"])},ki.__file="src/widgets/Calendar.vue";var Ei={name:"w-timeline",mixins:[Gt,Be],props:["face","vertical"],methods:{indent(){let t=this.$refs.wrap.querySelectorAll(":scope>.w-timeline-half>.w-timeline-item").length;if(t>0){let e=this.x.vertical,i=e?"width":"height",s=0,l=0;for(let r=0;r<t;r++){let o=this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r}"]`),a=r<t-1&&this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${r+1}"]`),n=lt.bcr(o.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));if(o.parentNode==this.$refs.prev?s=Math.max(s,n[i]):l=Math.max(l,n[i]),a&&o.parentNode!=a.parentNode){let t=lt.bcr(a.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));e&&n.bottom+25>t.top?lt.q(a).css({marginTop:n.bottom+25-t.top}):!e&&n.right+50>t.left&<.q(a).css({marginLeft:n.right+50-t.left})}}let r=lt.q(">.w-timeline-item",this.$refs.prev);r.each((t,l)=>{let r=lt.q(">.w-timeline-item-icon",l),o=lt.bcr(r[0]);r.css({[e?"marginRight":"marginBottom"]:(s-o[i])/2})}),lt.q(">.w-timeline-item",this.$refs.next).each((t,s)=>{let r=lt.q(">.w-timeline-item-icon",s),o=lt.bcr(r[0]);r.css({[e?"marginLeft":"marginTop"]:(l-o[i])/2})}),r.length&<.q(this.$refs.next).css({[e?"marginLeft":"marginTop"]:`-${l/2+s/2}px`})}if(0==t)lt.q(this.$refs.line).css({width:0,height:0});else{const e=lt.bcr(this.$refs.wrap),i=[];let s=[],l=0,r="#ddd";for(let e=0;e<t;e++){let t=lt.q(`>.w-timeline-half>.w-timeline-item[w-index="${e}"]`,this.$refs.wrap),s=lt.bcr(t.find(">.w-timeline-item-icon>.w-timeline-item-icon-img")[0]),l={x:s.left+s.width/2,y:s.top+s.height/2,color:t.attr("w-line-color")};i.push(l)}i.sort((t,e)=>this.x.vertical?t.y<e.y?-1:0:t.x<e.x?-1:0);for(let e=0;e<t;e++){const t=i[e];if(e>0){const e=i[0];l=this.x.vertical?t.y-e.y:t.x-e.x,s.push(`${r} ${l}px`)}t.color&&(r=t.color),e>0&&s.push(`${r} ${l}px`)}this.x.vertical?lt.q(this.$refs.line).css({width:2,height:i[t-1].y-i[0].y,top:i[0].y-e.top,left:i[0].x-e.left-1}):lt.q(this.$refs.line).css({width:i[t-1].x-i[0].x,height:2,top:i[0].y-e.top-1,left:i[0].x-e.left,background:`linear-gradient(to right, ${s.join()})`})}},html_slots(){let t=[],e=[],i=this.x.vertical;return this.slots_children().forEach((s,l)=>{lt.lodash.set(s,"props.index",l),i?("right"==s.props.position?t:e).push(s):("bottom"==s.props.position?e:t).push(s)}),this.html_scroll_slots(r.h("div",{ref:"wrap",class:"w-timeline-wrap"},[r.h("div",{ref:"line",class:"w-timeline-line"}),r.h("div",{ref:"prev",class:["w-timeline-half w-timeline-prev",{[`f-${this.x.vertical?"v":"h"}-gap`]:lt.br.compat.gap}]},t),r.h("div",{ref:"next",class:["w-timeline-half w-timeline-next",{[`f-${this.x.vertical?"v":"h"}-gap`]:lt.br.compat.gap}]},e)]))}},computed:{html_class(){return[this.html_scroll_class,{["z-face-"+this.x.face]:this.x.face,"z-horizontal":!this.x.vertical,"z-vertical":this.x.vertical}]}},mounted(){this.indent();const t=lt.lodash.debounce(()=>{this.$refs.wrap&&this.$refs.next&&(lt.q(">.w-timeline-half>.w-timeline-item",this.$refs.wrap).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),lt.q(this.$refs.next).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),this.indent())});new MutationObserver(t).observe(this.$refs.wrap,{childList:!0,attributes:!0,subtree:!0})},__file:"src/widgets/Timeline.vue"},Ni={name:"w-timeline-item",pubParentName:"w-timeline",mixins:[Ut],inject:["providePubParent"],props:["position","index","align","lineColor"],watch:{lineColor(t){this.$nextTick(()=>this.providePubParent.indent())}},methods:{html_slots(){let t=r.h("div",{class:"w-timeline-item-main f-br"},r.h("div",{class:"w-timeline-item-main-text"},this.$slots));return[r.h("div",{ref:"icon",class:"w-timeline-item-icon"},this.$slots.icon?r.h("div",{class:"w-timeline-item-icon-img"},this.$slots.icon()):r.h("i",{class:"w-timeline-item-icon-img z-default"})),t]}},computed:{html_class(){return"z-position-"+(this.x.position||(this.pubParent.x.vertical?"left":"bottom"))+" z-align-"+(this.x.align||"left")},html_props(){return{"w-index":this.x.index,"w-line-color":this.x.lineColor}}},__file:"src/widgets/TimelineItem.vue"},Li={name:"w-slidepicker",mixins:[Ut],provide(){return{provideOptionParent:this}},props:["optionHeight","modelValue","minValue","maxValue","keepIndex","cover"],emits:["update:modelValue","change"],setup(t,e){const i=r.getCurrentInstance().ctx,s=r.ref(),l=r.ref();let o,a,n,h,c,u;const d=function(t){let e,i,s,r=lt.eventY(t),o=0,a=null;l.value.style.transition="",lt.moveup(t=>{let d=lt.eventY(t),p=t.timeStamp;e=c+d-r,i&&s&&p>s&&(a=o,o=(d-i)/(p-s)),i=d,s=p,e=lt.numRange(e,n-u,h+u),l.value.style.transform=`translateY(${e}px)`},(i,s)=>{if(!s)return m(t);if(null==e)return;let r=.15;Math.abs(o)<r||a&&Math.abs(a)<r?o=0:a&&Math.abs(a)>Math.abs(o)&&(o=a);let d=e+200*o,p=Math.abs(o/2),f=(h-d)%u;d+=f,f>u/2&&(d-=u),c=lt.numRange(d,n,h),c!=e&&((e<n||e>n||p<r)&&(p=r),Math.abs(c-e)<10&&(p=.05),l.value.style.transform=`translateY(${c}px)`,l.value.style.transition=`transform ${p}s ease-out`)},t)},p=function(t){c+=(t.deltaY<0?-1:1)*u,c=lt.numRange(c,n,h),l.value.style.transform=`translateY(${c}px)`,l.value.style.transition="transform .12s ease-out"},m=function(t){let e=lt(t);"w-option"==e.$options.name&&(x(e.$props.value),f(!0))},f=function(t){if(!s.value||!l.value)return;let e=i.slots_children();if(!e.length)return;let r=i.x.modelValue,d=i.x.minValue,p=i.x.maxValue;(d||0===d||p||0===p)&&(r=lt.numRange(r,d,p),r!=i.x.modelValue&&x(r));let m=lt.bcr(s.value),f=lt.bcr(l.value),g=-1,v=-1,w=!0;if(u=i.x.optionHeight,o=h=(m.height-u)/2,a=n=o-f.height+u,(d||0===d)&&(g=e.findIndex(t=>t.props.value==d)),(p||0===p)&&(v=e.findIndex(t=>t.props.value==p)),(g>-1||v>-1)&&e[0].props.value>e[e.length-1].props.value&&(w=!1),g>-1&&(w?h-=g*u:n+=g*u),v>-1&&(w?n+=(e.length-1-v)*u:h-=(e.length-1-v)*u),null!=r){let t=e.findIndex(t=>t.props.value==r);-1===t?x(null!=c&&c<a&&i.keepIndex?e[e.length-1].props.value:e[0].props.value):c=o-u*t}else c=o;c=lt.numRange(c,n,h),l.value.style.transition="",l.value.style.transform=`translateY(${c}px)`,t&&(l.value.style.transition="transform .15s ease-out")},x=function(t){i.x.modelValue=t},g=function(){let t=i.slots_children()[(o-c)/u];t&&x(t.props.value)},v=r.computed(()=>({style:{"--w-option-height":lt.unitSize(i.x.optionHeight)},...lt.br.mobile?{ontouchstart:d}:{onmousedown:d,onwheel:p}}));return r.onMounted(()=>{r.watch(()=>i.x.modelValue,t=>{e.emit("update:modelValue",t),e.emit("change",t)}),r.watch(()=>i.x.minValue,f),r.watch(()=>i.x.maxValue,f),new Wt(()=>{l.value&&(f(),g())}).observe(l.value),l.value.addEventListener("transitionend",g)}),{root:s,options:l,x_default:function(){return{optionHeight:32,cover:!0}},onmousedown:d,onwheel:p,html_props:v}}};const Fi={ref:"options",class:"w-slidepicker-options"},Ai={key:0,class:"w-slidepicker-bg-top"},Hi={key:1,class:"w-slidepicker-bg-bottom"};Li.render=function(t,e,i,s,l,o){return r.openBlock(),r.createElementBlock("div",r.mergeProps({ref:"root"},t.html_binds),[r.createElementVNode("div",Fi,[r.renderSlot(t.$slots,"default")],512),t.x.cover?(r.openBlock(),r.createElementBlock("div",Ai)):r.createCommentVNode("v-if",!0),t.x.cover?(r.openBlock(),r.createElementBlock("div",Hi)):r.createCommentVNode("v-if",!0)],16)},Li.__file="src/widgets/SlidePicker.vue";var Ii={name:"w-hidden",mixins:[ui],methods:{isModified:()=>!1,html(){return r.h("input",{type:"hidden",id:this.uid,class:"w-hidden",name:this.x.name,value:this.x.modelValue,ref:"v"})}},__file:"src/widgets/Hidden.vue"},Yi={name:"w-text",mixins:[ui],props:["minLength","maxLength","pattern","clearable","showCount","dropProps","suggest"],emits:["input","clear"],data:()=>({hasBorder:!0,showSuggest:!1,sug_timer:null,sug_completed:!1}),methods:{clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val(""),this.focus(),this.$emit("clear",t))},baseInput(t){let e=t.target.value;this.val(e,t),this.baseValid("change"),this.trigger(t,e)},oninput(t){if(this.x.suggest)if(clearTimeout(this.sug_timer),""===t.target.value)this.baseInput(t),this.doSuggest(!1);else if("input"!==t.type)t.runType="input",this.baseInput(t),this.doSuggest(!0);else{let e=t.target.value;this.val(e,t),this.sug_timer=setTimeout(()=>{this.trigger(t,e),this.baseValid("change"),this.doSuggest(!0)},500)}else this.baseInput(t)},onfocus(t){this.isFocus=!0,this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t),this.sug_completed&&(this.sug_completed=!1),this.trigger("focus")},onclick(t){this.x.suggest&&!this.showSuggest&&t.target.value&&!this.sug_completed&&this.oninput(t)},doSuggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},onCloseDrop(){this.showSuggest=!1},complete(t){return this.val(t),this.sug_completed=!0,this.$nextTick(this.focus),this},closeDrop(){return this.doSuggest(!1),this},html_button(){let t=[];if(this.isNormal&&this.x.clearable&&t.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:lt.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(r.h(ae,e,this.$slots.suggest))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&<.strLen(t)<e)return this.formErr(i,[e])},maxLength:(t,e,i)=>{if(t&&null!=e&&""!==e&&e>0&&t&<.strLen(t)>e)return this.formErr(i,[lt.strExceed(t,e)])}}},input_prop(){let t={oninput:this.oninput,onfocus:this.onfocus,onclick:this.onclick};return this.x.maxLength&&(t.maxlength=this.x.maxLength),t},html_class(){return{"z-val":this.hasVal,"z-clearable":this.x.clearable}}},__file:"src/widgets/Text.vue"},Oi={name:"w-textarea",mixins:[Yi],methods:{html_slot_down(){const t=this.slot("down");if(this.x.showCount||t&&t.length){let e="";if(this.x.showCount&&this.x.maxLength){let t=this.x.modelValue||"",i=lt.strLen(t);if(i>this.x.maxLength){i=`<em class=w-textarea-show-count-exceed>超出${lt.strExceed(t,this.x.maxLength)}个字</em>`}e=`${i} / ${this.x.maxLength}`}return r.h("div",{class:"w-textarea-down"},[r.h("div",{class:"w-textarea-down-left"},t),r.h("div",{class:"w-textarea-down-right w-textarea-show-count",innerHTML:e})])}return t}},computed:{input_tag:()=>"textarea",hasClassSlotDown(){return this.x.showCount&&this.x.maxLength||!!this.$slots.down}},__file:"src/widgets/Textarea.vue"},ji={name:"w-checkboxgroup",mixins:[ui],props:["modelValue","required","vertical","gap","minSize","maxSize","br"],provide(){return{providePubParent:this}},data:()=>({watchValue:null}),methods:{x_default:()=>({br:!0,gap:15}),watchModelValue(t,e){},html_form_slot(){return this.x.vertical?r.h("div",{class:"w-boxgroup-grid"},this.$slots):this.$slots}},computed:{html_class(){return{"z-br":this.x.br}},html_style(){return this.x.gap&&{"--w-boxgroup-gap":lt.unitSize(this.x.gap)}}},__file:"src/widgets/CheckBoxGroup.vue"},qi={name:"w-radiogroup",mixins:[ji],__file:"src/widgets/RadioGroup.vue"},Ri={name:"w-radio",pubParentName:"w-radiogroup",mixins:[mi],props:["cancelable"],methods:{},computed:{input_type:()=>"radio",input_icon:()=>"f-i",input_name(){return this.w_name&&this.w_name+"@"+this.ownerView.uid},w_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_prop(){return{"w-name":this.w_name}}},mounted(){},__file:"src/widgets/Radio.vue"},Wi={name:"w-switch",pubParentName:"w-checkboxgroup",mixins:[ui],props:["checkedText","uncheckedText","checkedValue","uncheckedValue"],inject:["providePubParent"],methods:{x_default:()=>({checkedValue:1,uncheckedValue:0}),onclick(t){let e=!this.isChecked?this.x.checkedValue:this.x.uncheckedValue;this.val(e)},formText(){return this.isChecked?this.x.checkedText:this.x.uncheckedText},html_input(){return[this.html_input_hidden(),r.h("div",{class:"w-switch-box",onclick:this.isNormal&&this.onclick},[r.h("i",{class:"w-switch-icon"}),r.h("span",{class:"w-switch-text"},this.isChecked?this.x.checkedText:this.x.uncheckedText)])]}},computed:{input_value(){return this.isChecked?this.x.checkedValue:this.x.uncheckedValue},html_class(){return this.isChecked?"z-checked":"z-unchecked"},isChecked(){return this.x.modelValue==this.x.checkedValue}},__file:"src/widgets/Switch.vue"};const Ui={".323":"text/h323",".3gp":"video/3gpp",".aab":"application/x-authoware-bin",".aam":"application/x-authoware-map",".aas":"application/x-authoware-seg",".acx":"application/internet-property-stream",".ai":"application/postscript",".aif":"audio/x-aiff",".aifc":"audio/x-aiff",".aiff":"audio/x-aiff",".als":"audio/X-Alpha5",".amc":"application/x-mpeg",".apk":"application/vnd.android.package-archive",".asc":"text/plain",".asd":"application/astound",".asf":"video/x-ms-asf",".asn":"application/astound",".asp":"application/x-asap",".asr":"video/x-ms-asf",".asx":"video/x-ms-asf",".au":"audio/basic",".avi":"video/x-msvideo",".awb":"audio/amr-wb",".axs":"application/olescript",".bas":"text/plain",".bcpio":"application/x-bcpio",".bld":"application/bld",".bld2":"application/bld2",".bmp":"image/bmp",".bz2":"application/x-bzip2",".c":"text/plain",".cal":"image/x-cals",".cat":"application/vnd.ms-pkiseccat",".ccn":"application/x-cnc",".cco":"application/x-cocoa",".cdf":"application/x-cdf",".cer":"application/x-x509-ca-cert",".cgi":"magnus-internal/cgi",".chat":"application/x-chat",".clp":"application/x-msclip",".cmx":"image/x-cmx",".co":"application/x-cult3d-object",".cod":"image/cis-cod",".conf":"text/plain",".cpio":"application/x-cpio",".cpp":"text/plain",".cpt":"application/mac-compactpro",".crd":"application/x-mscardfile",".crl":"application/pkix-crl",".crt":"application/x-x509-ca-cert",".csh":"application/x-csh",".csm":"chemical/x-csml",".csml":"chemical/x-csml",".css":"text/css",".dcm":"x-lml/x-evm",".dcr":"application/x-director",".dcx":"image/x-dcx",".der":"application/x-x509-ca-cert",".dhtml":"text/html",".dir":"application/x-director",".dll":"application/x-msdownload",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".dot":"application/msword",".dvi":"application/x-dvi",".dwf":"drawing/x-dwf",".dwg":"application/x-autocad",".dxf":"application/x-autocad",".dxr":"application/x-director",".ebk":"application/x-expandedbook",".emb":"chemical/x-embl-dl-nucleotide",".embl":"chemical/x-embl-dl-nucleotide",".eps":"application/postscript",".epub":"application/epub+zip",".eri":"image/x-eri",".es":"audio/echospeech",".esl":"audio/echospeech",".etc":"application/x-earthtime",".etx":"text/x-setext",".evm":"x-lml/x-evm",".evy":"application/envoy",".fh4":"image/x-freehand",".fh5":"image/x-freehand",".fhc":"image/x-freehand",".fif":"application/fractals",".flr":"x-world/x-vrml",".flv":"flv-application/octet-stream",".fm":"application/x-maker",".fpx":"image/x-fpx",".fvi":"video/isivideo",".gau":"chemical/x-gaussian-input",".gca":"application/x-gca-compressed",".gdb":"x-lml/x-gdb",".gif":"image/gif",".gps":"application/x-gps",".gtar":"application/x-gtar",".gz":"application/x-gzip",".h":"text/plain",".hdf":"application/x-hdf",".hdm":"text/x-hdml",".hdml":"text/x-hdml",".hlp":"application/winhlp",".hqx":"application/mac-binhex40",".hta":"application/hta",".htc":"text/x-component",".htm":"text/html",".html":"text/html",".hts":"text/html",".htt":"text/webviewhtml",".ice":"x-conference/x-cooltalk",".ico":"image/x-icon",".ief":"image/ief",".ifm":"image/gif",".ifs":"image/ifs",".iii":"application/x-iphone",".imy":"audio/melody",".ins":"application/x-internet-signup",".ips":"application/x-ipscript",".ipx":"application/x-ipix",".isp":"application/x-internet-signup",".it":"audio/x-mod",".itz":"audio/x-mod",".ivr":"i-world/i-vrml",".j2k":"image/j2k",".jad":"text/vnd.sun.j2me.app-descriptor",".jam":"application/x-jam",".jar":"application/java-archive",".java":"text/plain",".jfif":"image/pipeg",".jnlp":"application/x-java-jnlp-file",".jpe":"image/jpeg",".jpeg":"image/jpeg",".jpg":"image/jpeg",".jpz":"image/jpeg",".js":"application/x-javascript",".jwc":"application/jwc",".kjx":"application/x-kjx",".lak":"x-lml/x-lak",".latex":"application/x-latex",".lcc":"application/fastman",".lcl":"application/x-digitalloca",".lcr":"application/x-digitalloca",".lgh":"application/lgh",".lml":"x-lml/x-lml",".lmlpack":"x-lml/x-lmlpack",".log":"text/plain",".lsf":"video/x-la-asf",".lsx":"video/x-la-asf",".m13":"application/x-msmediaview",".m14":"application/x-msmediaview",".m15":"audio/x-mod",".m3u":"audio/x-mpegurl",".m3url":"audio/x-mpegurl",".m4a":"audio/mp4a-latm",".m4b":"audio/mp4a-latm",".m4p":"audio/mp4a-latm",".m4u":"video/vnd.mpegurl",".m4v":"video/x-m4v",".ma1":"audio/ma1",".ma2":"audio/ma2",".ma3":"audio/ma3",".ma5":"audio/ma5",".man":"application/x-troff-man",".map":"magnus-internal/imagemap",".mbd":"application/mbedlet",".mct":"application/x-mascot",".mdb":"application/x-msaccess",".mdz":"audio/x-mod",".me":"application/x-troff-me",".mel":"text/x-vmel",".mht":"message/rfc822",".mhtml":"message/rfc822",".mi":"application/x-mif",".mid":"audio/mid",".midi":"audio/midi",".mif":"application/x-mif",".mil":"image/x-cals",".mio":"audio/x-mio",".mmf":"application/x-skt-lbs",".mng":"video/x-mng",".mny":"application/x-msmoney",".moc":"application/x-mocha",".mocha":"application/x-mocha",".mod":"audio/x-mod",".mof":"application/x-yumekara",".mol":"chemical/x-mdl-molfile",".mop":"chemical/x-mopac-input",".mov":"video/quicktime",".movie":"video/x-sgi-movie",".mp2":"video/mpeg",".mp3":"audio/mpeg",".mp4":"video/mp4",".mpa":"video/mpeg",".mpc":"application/vnd.mpohun.certificate",".mpe":"video/mpeg",".mpeg":"video/mpeg",".mpg":"video/mpeg",".mpg4":"video/mp4",".mpga":"audio/mpeg",".mpn":"application/vnd.mophun.application",".mpp":"application/vnd.ms-project",".mps":"application/x-mapserver",".mpv2":"video/mpeg",".mrl":"text/x-mrml",".mrm":"application/x-mrm",".ms":"application/x-troff-ms",".msg":"application/vnd.ms-outlook",".mts":"application/metastream",".mtx":"application/metastream",".mtz":"application/metastream",".mvb":"application/x-msmediaview",".mzv":"application/metastream",".nar":"application/zip",".nbmp":"image/nbmp",".nc":"application/x-netcdf",".ndb":"x-lml/x-ndb",".ndwn":"application/ndwn",".nif":"application/x-nif",".nmz":"application/x-scream",".nokia-op-logo":"image/vnd.nok-oplogo-color",".npx":"application/x-netfpx",".nsnd":"audio/nsnd",".nva":"application/x-neva1",".nws":"message/rfc822",".oda":"application/oda",".ogg":"audio/ogg",".oom":"application/x-AtlasMate-Plugin",".p10":"application/pkcs10",".p12":"application/x-pkcs12",".p7b":"application/x-pkcs7-certificates",".p7c":"application/x-pkcs7-mime",".p7m":"application/x-pkcs7-mime",".p7r":"application/x-pkcs7-certreqresp",".p7s":"application/x-pkcs7-signature",".pac":"audio/x-pac",".pae":"audio/x-epac",".pan":"application/x-pan",".pbm":"image/x-portable-bitmap",".pcx":"image/x-pcx",".pda":"image/x-pda",".pdb":"chemical/x-pdb",".pdf":"application/pdf",".pfr":"application/font-tdpfr",".pfx":"application/x-pkcs12",".pgm":"image/x-portable-graymap",".pict":"image/x-pict",".pko":"application/ynd.ms-pkipko",".pm":"application/x-perl",".pma":"application/x-perfmon",".pmc":"application/x-perfmon",".pmd":"application/x-pmd",".pml":"application/x-perfmon",".pmr":"application/x-perfmon",".pmw":"application/x-perfmon",".png":"image/png",".pnm":"image/x-portable-anymap",".pnz":"image/png",".pot":"application/vnd.ms-powerpoint",".ppm":"image/x-portable-pixmap",".pps":"application/vnd.ms-powerpoint",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".pqf":"application/x-cprplayer",".pqi":"application/cprplayer",".prc":"application/x-prc",".prf":"application/pics-rules",".prop":"text/plain",".proxy":"application/x-ns-proxy-autoconfig",".ps":"application/postscript",".ptlk":"application/listenup",".pub":"application/x-mspublisher",".pvx":"video/x-pv-pvx",".qcp":"audio/vnd.qcelp",".qt":"video/quicktime",".qti":"image/x-quicktime",".qtif":"image/x-quicktime",".r3t":"text/vnd.rn-realtext3d",".ra":"audio/x-pn-realaudio",".ram":"audio/x-pn-realaudio",".ras":"image/x-cmu-raster",".rc":"text/plain",".rdf":"application/rdf+xml",".rf":"image/vnd.rn-realflash",".rgb":"image/x-rgb",".rlf":"application/x-richlink",".rm":"audio/x-pn-realaudio",".rmf":"audio/x-rmf",".rmi":"audio/mid",".rmm":"audio/x-pn-realaudio",".rmvb":"audio/x-pn-realaudio",".rnx":"application/vnd.rn-realplayer",".roff":"application/x-troff",".rp":"image/vnd.rn-realpix",".rpm":"audio/x-pn-realaudio-plugin",".rt":"text/vnd.rn-realtext",".rte":"x-lml/x-gps",".rtf":"application/rtf",".rtg":"application/metastream",".rtx":"text/richtext",".rv":"video/vnd.rn-realvideo",".rwc":"application/x-rogerwilco",".s3m":"audio/x-mod",".s3z":"audio/x-mod",".sca":"application/x-supercard",".scd":"application/x-msschedule",".sct":"text/scriptlet",".sdf":"application/e-score",".sea":"application/x-stuffit",".setpay":"application/set-payment-initiation",".setreg":"application/set-registration-initiation",".sgm":"text/x-sgml",".sgml":"text/x-sgml",".sh":"application/x-sh",".shar":"application/x-shar",".shtml":"magnus-internal/parsed-html",".shw":"application/presentations",".si6":"image/si6",".si7":"image/vnd.stiwap.sis",".si9":"image/vnd.lgtwap.sis",".sis":"application/vnd.symbian.install",".sit":"application/x-stuffit",".skd":"application/x-Koan",".skm":"application/x-Koan",".skp":"application/x-Koan",".skt":"application/x-Koan",".slc":"application/x-salsa",".smd":"audio/x-smd",".smi":"application/smil",".smil":"application/smil",".smp":"application/studiom",".smz":"audio/x-smd",".snd":"audio/basic",".spc":"application/x-pkcs7-certificates",".spl":"application/futuresplash",".spr":"application/x-sprite",".sprite":"application/x-sprite",".sdp":"application/sdp",".spt":"application/x-spt",".src":"application/x-wais-source",".sst":"application/vnd.ms-pkicertstore",".stk":"application/hyperstudio",".stl":"application/vnd.ms-pkistl",".stm":"text/html",".svg":"image/svg+xml",".sv4cpio":"application/x-sv4cpio",".sv4crc":"application/x-sv4crc",".svf":"image/vnd",".svh":"image/svh",".svr":"x-world/x-svr",".swf":"application/x-shockwave-flash",".swfl":"application/x-shockwave-flash",".t":"application/x-troff",".talk":"text/x-speech",".tar":"application/x-tar",".taz":"application/x-tar",".tbp":"application/x-timbuktu",".tbt":"application/x-timbuktu",".tcl":"application/x-tcl",".tex":"application/x-tex",".texi":"application/x-texinfo",".texinfo":"application/x-texinfo",".tgz":"application/x-compressed",".thm":"application/vnd.eri.thm",".tif":"image/tiff",".tiff":"image/tiff",".tki":"application/x-tkined",".tkined":"application/x-tkined",".toc":"application/toc",".toy":"image/toy",".tr":"application/x-troff",".trk":"x-lml/x-gps",".trm":"application/x-msterminal",".tsi":"audio/tsplayer",".tsp":"application/dsptype",".tsv":"text/tab-separated-values",".ttz":"application/t-time",".txt":"text/plain",".uls":"text/iuls",".ult":"audio/x-mod",".ustar":"application/x-ustar",".uu":"application/x-uuencode",".uue":"application/x-uuencode",".vcd":"application/x-cdlink",".vcf":"text/x-vcard",".vdo":"video/vdo",".vib":"audio/vib",".viv":"video/vivo",".vivo":"video/vivo",".vmd":"application/vocaltec-media-desc",".vmf":"application/vocaltec-media-file",".vmi":"application/x-dreamcast-vms-info",".vms":"application/x-dreamcast-vms",".vox":"audio/voxware",".vqe":"audio/x-twinvq-plugin",".vqf":"audio/x-twinvq",".vql":"audio/x-twinvq",".vre":"x-world/x-vream",".vrml":"x-world/x-vrml",".vrt":"x-world/x-vrt",".vrw":"x-world/x-vream",".vts":"workbook/formulaone",".wav":"audio/x-wav",".wax":"audio/x-ms-wax",".wbmp":"image/vnd.wap.wbmp",".wcm":"application/vnd.ms-works",".wdb":"application/vnd.ms-works",".web":"application/vnd.xara",".webm":"video/webm",".wi":"image/wavelet",".wis":"application/x-InstallShield",".wks":"application/vnd.ms-works",".wm":"video/x-ms-wm",".wma":"audio/x-ms-wma",".wmd":"application/x-ms-wmd",".wmf":"application/x-msmetafile",".wml":"text/vnd.wap.wml",".wmlc":"application/vnd.wap.wmlc",".wmls":"text/vnd.wap.wmlscript",".wmlsc":"application/vnd.wap.wmlscriptc",".wmlscript":"text/vnd.wap.wmlscript",".wmv":"audio/x-ms-wmv",".wmx":"video/x-ms-wmx",".wmz":"application/x-ms-wmz",".wpng":"image/x-up-wpng",".wpt":"x-lml/x-gps",".wri":"application/x-mswrite",".wrl":"x-world/x-vrml",".wrz":"x-world/x-vrml",".ws":"text/vnd.wap.wmlscript",".wsc":"application/vnd.wap.wmlscriptc",".wv":"video/wavelet",".wvx":"video/x-ms-wvx",".wxl":"application/x-wxl",".x-gzip":"application/x-gzip",".xaf":"x-world/x-vrml",".xar":"application/vnd.xara",".xbm":"image/x-xbitmap",".xdm":"application/x-xdma",".xdma":"application/x-xdma",".xdw":"application/vnd.fujixerox.docuworks",".xht":"application/xhtml+xml",".xhtm":"application/xhtml+xml",".xhtml":"application/xhtml+xml",".xla":"application/vnd.ms-excel",".xlc":"application/vnd.ms-excel",".xll":"application/x-excel",".xlm":"application/vnd.ms-excel",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".xlt":"application/vnd.ms-excel",".xlw":"application/vnd.ms-excel",".xm":"audio/x-mod",".xml":"application/xml",".xmz":"audio/x-mod",".xof":"x-world/x-vrml",".xpi":"application/x-xpinstall",".xpm":"image/x-xpixmap",".xsit":"text/xml",".xsl":"text/xml",".xul":"text/xul",".xwd":"image/x-xwindowdump",".xyz":"chemical/x-pdb",".yz1":"application/x-yz1",".z":"application/x-compress",".zac":"application/x-zaurus-zac",".json":"application/json",".vsd":"application/vnd.visio",".et":"application/kset",".wps":"application/kswps",".dps":"application/ksdps"};const Xi={0:"js.css.pdf.psd.ai.txt.eps.txt",xls:"xls.xlsx",doc:"doc.docx.rtf",ppt:"ppt.pptx",htm:"htm.html",zip:"rar.zip.tar.jar.z.7z.ace.lzh.arj.gzip.bz2.cab.uue",fla:"fla.swf",fon:"eot.otf.fon.font.ttf.ttc.woff.woff2",iso:"iso.nrg.mds.mdf.bin.cue.img.fcd.lcd.dmg",vid:"avi.asf.wmv.avs.flv.mkv.mov.3gp.mp4.webm.mpa.mpe.mpg.mpeg.dat.dsm.ogm.vob.rm.rmvb.ts.tp.ifo.nsv.m4u.m4v.asx.asr.movie.fvi.pvx.rv.vdo.viv.vivo.wm.wmx.wv.wvx.mpv2.mpg4",aud:"aif.aifc.aiff.als.awb.mp3.aac.au.wav.wma.cda.flac.m4a.mid.mka.mp2.mpc.ape.ofr.ogg.ra.wv.tta.ac3.dts.wv.shn.vqf.spc.nsf.adx.psf.minipsf.psf2.minipsf2.rsn.zst",img:"jpg.jpeg.gif.png.bmp.tif.tiff.ico"},Qi={};for(let t in Xi)Xi[t].split(".").forEach(e=>{Qi[e]="0"==t?e:t});const Gi={video:Xi.vid,audio:Xi.aud,image:Xi.img};for(let t in Gi)Gi[t]=Gi[t].split(".").map(t=>`*.${t};`).join("");const Ji=function(t){let e=lt.strFrom(t||"",".",!0).toLowerCase();return Qi[e]||"file"},Ki=function(t){let e;return null==t||isNaN(t)||(t+="K"),(t=lt.number(t.replace(/[a-z]+$/i,function(t){return e=t.charAt(0).toUpperCase(),""})))*("K"===e?1024:"M"===e?1048576:"G"===e?1073741824:"T"===e?1099511627776:1)};var Zi={name:"w-fileupload",mixins:[ui],props:["uploadSrc","thumbnailSrc","downloadSrc","uploadLimit","sizeLimit","maxFileSize","minFileSize","fileTypes","filter","success","error","itemWidth","align","vertical","gap","checkFile"],data:()=>({list:[],emiting:!1}),created(){this.$watch(()=>this.x.modelValue,t=>{if(this.emiting)return this.emiting=!1;t&&"string"==typeof t&&(t=JSON.parse(t)),this.list=Array.isArray(t)?t.map(t=>({value:t})):t?[{value:t}]:[]},{immediate:!0})},methods:{x_default:()=>({gap:10,vertical:!0}),val(t){if(0==arguments.length){let t=[];return this.list.forEach(e=>e.value&&t.push(e.value)),t}this.x.modelValue=t,this.$emit("update:modelValue",t),this.trigger("change",t)},getInputValue:t=>0==t.length?"":JSON.stringify(t),getFileTypes(){let t=this.x.fileTypes;return Gi[t]&&(t=Gi[t]),t&&"*.*"!==t?t.replace(/\*/g,"").replace(/;/g,",").toLowerCase():""},getAccept(){let t=[],e=this.getFileTypes();if(!e)return;let i=[];return e.toLowerCase().split(",").forEach(t=>{t&&i.push(t)}),i.forEach(e=>{e&&t.push(function(t){let e=f(t,".",!0)||t;return Ui["."+e]}(e)||e)}),t.join(",")},isImage:t=>"img"==Ji(t.value?t.value.name:t.file.name),isVideo:t=>"vid"==Ji(t.value?t.value.name:t.file.name),isAudio:t=>"aud"==Ji(t.value?t.value.name:t.file.name),fileSelected(t){if(this.x.uploadLimit>1&&t.target.files.length+this.list.length>this.x.uploadLimit)return t.target.value="",lt.alert(lt.loc.ps(lt.loc.form.upload_limit,this.x.uploadLimit));let e,i,s,l,r=this.x.maxFileSize&&Ki(this.x.maxFileSize),o=this.x.minFileSize&&Ki(this.x.minFileSize),a=this.getFileTypes(),n=this.x.checkFile,h=n&&this.list.filter(t=>t.file).map(t=>t.file),c=n&&this.list.filter(t=>t.value).map(t=>t.value);lt.lodash.each(t.target.files,u=>{let d="."+lt.strFrom(u.name,".",!0).toLowerCase();if(r&&u.size>r)(e||(e=[])).push(u.name);else if(o&&u.size<o)(i||(i=[])).push(u.name);else if(a&&!lt.idsAny(a,d,","))(s||(s=[])).push(u.name);else{let e=n&&n(u,t.target.files,h,c);e?(l||(l=[])).push(e):this.list.push({file:u})}}),e?lt.alert(lt.loc.ps(lt.loc.form.upload_maxfilesize,e.join("<br>"),this.x.maxFileSize)):i?lt.alert(lt.loc.ps(lt.loc.form.upload_minfilesize,i.join("<br>"),this.x.minFileSize)):s?lt.alert(lt.loc.ps(lt.loc.form.upload_invalid_file_type,s.join("<br>"),a)):l&<.alert(l.join("<br>")),t.target.value="",this.nextUpload()},upload(t){if(this.x.uploadSrc&&!t.loading){let e=lt.urlFormat(this.x.uploadSrc,this.x.data,this.x),i=new FormData;i.append("Filedata",t.file),t.loading=!0,t.source=lt.http.CancelToken.source(),lt.http.post(e,i,{onUploadProgress:e=>t.progress=Math.floor(e.loaded/e.total*100),cancelToken:t.source.token}).then(e=>{t.loading=!1,t.loaded=!0,t.source=null;let i=this.x.filter?this.x.filter(e,this):e.data;i?i.error?t.error=i.error:i.id?(t.value=i,this.x.success&&this.x.success(t.value,this,e)):t.error={message:lt.loc.ps(lt.loc.form.upload_invalid_data,JSON.stringify(i))}:t.error={message:lt.loc.form.upload_no_data},t.error&&t.error.message&<.alert(t.error.message),this.nextUpload()}).catch(e=>{t.error=e,t.loading=!1,t.loaded=!0,t.source=null,this.nextUpload(),e.response&&e.response.status&<.alert(e.response.status+": "+e)})}else if(!this.x.uploadSrc){let e="请给上传组件配置uploadSrc";t.error={message:e},console.error(e),this.nextUpload()}},nextUpload(){for(let t of this.list){if(t.loading)return;if(!t.error&&(t.file&&!t.loaded))return this.upload(t)}this.emiting=!0;let t=this.val();this.$emit("update:modelValue",t),this.trigger("change",t)},clickItem(t,e){e.value&&(this.getOn("click:item")?(t.runType="click:item",this.trigger(t,e.value,this.val())):this.x.downloadSrc&<.download(lt.urlServer(this.x.downloadSrc,e.value,this.x.data)))},remove(t){t.source&&t.source.cancel();let e=this.list.findIndex(e=>e==t);this.list.splice(e,1),this.nextUpload()},formText(){return this.val().map(t=>t.name).join(", ")},chooseFile(){this.$refs.file.click()},html_list(){return this.list.map(t=>{let e=t.value,i=e?e.name:t.file.name,s=[r.h("div",{class:"w-fileupload-value-close f-i f-i-trash",title:lt.loc.remove,onclick:e=>this.remove(t)})];e&&this.$slots.menu&&s.push(r.h(Ve,null,{target:()=>r.h("div",{class:"w-fileupload-value-menu f-i f-i-ellipsis",title:lt.loc.more}),default:()=>this.$slots.menu({item:e})}));let l=e?e.id:t.key;return l||(t.key=l=lt.uid()),this.$slots.name&&(i=this.$slots.name({item:e})),r.h("div",{key:l,class:["w-fileupload-value",{"z-loading":!t.error&&(t.loading||t.file&&!t.loaded),"z-err":t.error}],style:{"--w-upload-progress":t.file?`${t.progress||0}%`:"",width:lt.unitSize(this.x.itemWidth)},title:t.error?t.error.message:i},[r.h("i",{class:["w-fileupload-value-icon f-i","f-i-file-"+Ji(i)],onclick:e=>this.clickItem(e,t)}),t.error&&r.h("div",{class:"w-fileupload-value-error"},lt.loc.form.upload_error),r.h("div",{class:"w-fileupload-value-text f-line-1",onclick:e=>this.clickItem(e,t)},i),s])})},html_input_form(){return[this.html_input_hidden(),r.h("input",{type:"file",ref:"file",multiple:1!=this.x.uploadLimit,accept:this.getAccept(),onchange:this.fileSelected,class:"f-hide"})]},html_input_button(){return r.h("div",{},[r.h(Qe,{ref:"uploadbbr",class:"w-fileupload-bbr",gap:10},{default:()=>[this.$slots.button?this.$slots.button(this):r.h(ye,{text:"选择文件",icon:".f-i .f-i-upload",class:"w-fileupload-button",onclick:this.chooseFile,disabled:!this.canUpload}),this.slot("right")]}),this.slot("down")])},html_input_list(){return this.list.length?r.h("div",{ref:"list",class:["w-fileupload-list",{"f-clearfix":this.x.vertical}]},this.html_list()):null},html_input(){return this.html_input_form().concat(this.html_input_button(),this.html_input_list())},html_main(){return r.h("div",{class:"w-formbase-main"},this.html_form())},html_slots(){return[this.html_label(),this.html_main()]}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{for(let t of this.list){if(t.loading)return this.formErr({type:"upload_loading"});if(t.error)return this.formErr({type:"upload_invalid_file"})}}}},input_value(){return this.getInputValue(this.val())},errorTipTarget(){return this.$refs.uploadbbr||this},canUpload(){return!!this.isNormal&&!(this.x.uploadLimit>0&&this.list.length>=this.x.uploadLimit)},dir:()=>"v",html_class(){return{"z-vertical":this.x.vertical,"z-horizontal":!this.x.vertical,"z-compat":lt.br.compat.gap}},html_style:()=>({"--w-label-min-height":"32px"}),html_on(){return{onclick:()=>this.warn(!1)}}},__file:"src/widgets/FileUpload.vue"},ts={props:["item"],inject:["provideUpload"],data:()=>({dataURL:null}),methods:{click(t){this.provideUpload.clickItem(t,this.item,this.provideUpload)},createImageThumbnail(){let t=new FileReader;t.onload=t=>{this.item.loaded||(this.dataURL=t.target.result)},t.readAsDataURL(this.item.file)},createVideoThumbnail(){let t=document.createElement("video");t.addEventListener("loadeddata",()=>{setTimeout(()=>{if(this.item.loaded)return;let e=document.createElement("canvas"),i=e.getContext("2d");e.width=t.videoWidth,e.height=t.videoHeight,i.drawImage(t,0,0),this.dataURL=e.toDataURL("image/png"),t.pause(),lt.q(t).remove()},150)}),t.src=URL.createObjectURL(this.item.file),t.muted=!0,t.play()},setProgress(t){let e=this.$refs.loading;if(!this.item.loading||!e)return;let i=e.getContext("2d");e.width=e.width,i.beginPath(),i.translate(17,17),i.moveTo(0,0),i.arc(0,0,15,.5*-Math.PI,Math.PI*(2*t/100-.5)),i.closePath(),i.fillStyle="rgba(255,255,255,.7)",i.fill(),i.beginPath(),i.arc(0,0,16,0,2*Math.PI),i.strokeStyle="#fff",i.stroke()},remove(t){this.upload.remove(this.item),t.stopPropagation()}},computed:{upload(){return this.provideUpload},img(){return this.$refs.thumbnail.$refs.img},src(){return this.item.value?lt.urlServer(this.item.value.thumbnail||this.upload.x.thumbnailSrc,this.item.value,this.upload.x.data):""},name(){return this.item.value?this.item.value.name:this.item.file.name},tip(){return this.item.error?this.item.error.message:this.name},titleRemove:()=>lt.loc.remove,titleMore:()=>lt.loc.more,canPlay(){return this.item.value&&(this.upload.isVideo(this.item)||this.upload.isAudio(this.item))},menus(){return this.upload.$slots.menu({item:this.item.value})}},mounted(){!this.item.loaded&&this.item.file&&(this.upload.isVideo(this.item)?this.createVideoThumbnail():this.upload.isImage(this.item)&&this.createImageThumbnail(),this.$watch(()=>this.item.progress,t=>this.setProgress(t),{immediate:!0}))}};const es={class:"f-line-1"},is={key:0,ref:"loading",width:"34",height:"34",class:"w-mediaupload-progress-loading f-abs-center"},ss={key:1,class:"w-mediaupload-cover-play f-abs-center f-flex-center f-i f-i-play"},ls={class:"w-mediaupload-value-oper"},rs=["title"],os=["title"];ts.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-menu"),n=r.resolveComponent("w-img");return r.openBlock(),r.createBlock(n,{class:r.normalizeClass(["w-mediaupload-value",{"z-loading":i.item.loading,"z-canplay":o.canPlay,"z-err":i.item.error}]),ref:"thumbnail",src:o.src,"data-url":l.dataURL,width:o.upload.x.thumbnailWidth,"img-width":o.upload.x.thumbnailWidth-2,"img-height":o.upload.x.thumbnailHeight-2,tip:o.tip,onClick:o.click},r.createSlots({cover:r.withCtx(()=>[i.item.loading?(r.openBlock(),r.createElementBlock("canvas",is,null,512)):o.canPlay?(r.openBlock(),r.createElementBlock("i",ss)):r.createCommentVNode("v-if",!0),r.createElementVNode("div",ls,[o.upload.isNormal?(r.openBlock(),r.createElementBlock("i",{key:0,class:"w-mediaupload-value-close f-flex-center f-i f-i-trash",title:o.titleRemove,onClick:e[0]||(e[0]=(...t)=>o.remove&&o.remove(...t))},null,8,rs)):r.createCommentVNode("v-if",!0),i.item.value&&o.upload.$slots.menu?(r.openBlock(),r.createBlock(a,{key:1},{target:r.withCtx(()=>[r.createElementVNode("i",{class:"w-mediaupload-value-menu f-flex-center f-i f-i-ellipsis",title:o.titleMore},null,8,os)]),default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.menus,t=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(t)))),256))]),_:1})):r.createCommentVNode("v-if",!0)])]),_:2},[o.upload.x.showFileName?{name:"default",fn:r.withCtx(()=>[r.createElementVNode("div",es,r.toDisplayString(o.name),1)]),key:"0"}:void 0]),1032,["class","src","data-url","width","img-width","img-height","tip","onClick"])},ts.__file="src/widgets/MediaUploadItem.vue";var as={name:"w-mediaupload",mixins:[Zi],props:["thumbnailWidth","thumbnailHeight","showFileName"],provide(){return{provideUpload:this}},methods:{x_default:()=>({fileTypes:"video",thumbnailWidth:80,thumbnailHeight:80,gap:10}),html_list(){return this.list.map((t,e)=>{let i=t.value?t.value.id:t.key;return i||(t.key=i=lt.uid()),r.h(ts,{item:t,index:e,key:i})})},html_input_button(){return r.h("div",{},[r.h(Qe,{ref:"uploadbbr",class:"w-fileupload-bbr"},{default:()=>[this.$slots.button?this.$slots.button(this):r.h(ye,{ref:"uploadbutton",title:lt.loc.form.choose_image,icon:".f-i .f-i-plus",class:"w-mediaupload-button",style:{width:lt.unitSize(this.x.thumbnailWidth),height:lt.unitSize(this.x.thumbnailHeight)},onclick:this.chooseFile}),this.slot("right")]}),this.slot("down")])},html_input(){return this.html_input_form().concat(r.h(Kt,{width:"*",class:"w-mediaupload-list",align:this.x.align,gap:this.x.gap},{default:()=>[this.html_list(),this.canUpload&&this.html_input_button()]}))}},computed:{html_style(){return{"--w-thumbnail-width":lt.unitSize(this.x.thumbnailWidth),"--w-label-min-height":lt.unitSize(this.x.thumbnailHeight),"--w-gap":lt.unitSize(this.x.gap)}}},__file:"src/widgets/MediaUpload.vue"},ns={name:"w-imageupload",mixins:[as],methods:{x_default:()=>({fileTypes:"image",thumbnailWidth:80,thumbnailHeight:80,gap:10})},computed:{html_class:()=>"w-mediaupload"},__file:"src/widgets/ImageUpload.vue"},hs={name:"w-option",mixins:[Ut],props:["value","text","disabled"],inject:["provideOptionParent"],methods:{click(t){this.provideOptionParent.clickOption&&this.provideOptionParent.clickOption(this,t)}},computed:{isFocus(){let t=this.provideOptionParent.x.modelValue;return Array.isArray(t)?t.includes(this.value):lt.idsAny(t,this.value)},isMul(){return this.provideOptionParent.x.multiple}}};const cs=["disabled","title"],us={class:"f-flex-1 f-line-1"};hs.render=function(t,e,i,s,l,o){return r.openBlock(),r.createElementBlock("button",r.mergeProps(t.html_attrs,{class:["f-flex-align",o.provideOptionParent.$options.name+"-option",{"z-on":o.isFocus,"z-ds":i.disabled,"z-mul":o.isMul}],onClick:e[0]||(e[0]=(...t)=>o.click&&o.click(...t)),disabled:i.disabled,title:i.text}),[r.createElementVNode("div",us,[r.renderSlot(t.$slots,"default",{},()=>[r.createTextVNode(r.toDisplayString(i.text),1)])]),o.isMul?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["w-option-checked",{"f-i f-i-check":o.isFocus}])},null,2)):r.createCommentVNode("v-if",!0)],16,cs)},hs.__file="src/widgets/Option.vue";var ds={name:"w-spinner",mixins:[Yi],inject:["provideRangeParent"],props:["decimal","format","showButton","buttonPosition","step","autoFix","compare","minValue","maxValue"],mounted(){this.x.format&&this.doFormat()},methods:{x_default:()=>({step:1,autoFix:!0,showButton:!0,buttonPosition:"right"}),doFormat(t){let e=""+this.x.modelValue,i=this.x.format.separator||",",s=RegExp(i.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),"g"),l=lt.numFormat(e,this.x.format.length,i,this.x.format.rightward);if(e!==l){let i=this.$refs.v.selectionStart,r=e.slice(0,i).replace(s,"");if(this.val(l,t),document.activeElement===this.$refs.v){let t=l.slice(0,i).replace(s,"");this.$nextTick(()=>lt.rngCursor(this.$refs.v,i+(r.length-t.length)))}}},stepBy(t,e){if(!this.isNormal)return;let i=this.defaultRuleValue("maxValue"),s=this.defaultRuleValue("minValue"),l=this.val(),r=lt.numAdd(lt.number(l),t*this.x.step),o=this.provideRangeParent&&this.provideRangeParent.forms(),a=r;if(null!=i&&(a=Math.min(i,a)),null!=s&&(a=Math.max(s,a)),o)if(o[0]==this){let t=o[1].val();null!=t&&(a=Math.min(t,a))}else if(o[1]==this){let t=o[0].val();null!=t&&(a=Math.max(t,a))}this.warn(!1),this.focus(),this.val(a,e),a==r&&this.tip_uid&&(lt.close(this.tip_uid),this.tip_uid=null),this.x.format&&this.doFormat(e)},isUsableVal(t){return!this.getValidErrorSync(null,t)},isFocusTarget(t){return this.$refs.buttonMinus&&this.$refs.buttonMinus.contains(t)||this.$refs.buttonPlus&&this.$refs.buttonPlus.contains(t)},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"<=",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&<.isNumber(t)&<.isNumber(l)){let e=lt.number(t),r=lt.number(l);if(!lt.eval("d"+i+"td",{d:e,td:r}))return[this.getLabelText(),i,s.getLabelText()]}}},oninput(t){this.val(t.target.value,t),this.x.format&&this.doFormat(t)},onfocus(t){this.baseFocus(t)},onblur(t){let e=this.x.modelValue;if(e&&!this.isUsableVal(e)&&this.x.autoFix){let i=lt.numDecimal(e,this.x.decimal);i=lt.numRange(i,this.x.minValue,this.x.maxValue),this.val(i,t)}this.baseBlur(t)},html_button(){let t,e=[];return this.x.clearable&&this.isNormal&&(t=r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton?(t&&e.push(t),"right"===this.x.buttonPosition?e.push(r.h("div",{class:"w-spinner-step w-input-button f-flex-column f-oh"},[r.h("button",{ref:"buttonPlus",class:"w-spinner-step-up f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-up"></i>'}),r.h("button",{ref:"buttonMinus",class:"w-spinner-step-down f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-caret-down"></i>'})])):"between"===this.x.buttonPosition&&e.push(r.h("button",{ref:"buttonMinus",class:"w-spinner-step-minus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(-1,t),innerHTML:'<i class="f-abs-center f-i f-i-minus"></i>'}),r.h("button",{ref:"buttonPlus",class:"w-spinner-step-plus f-rel",disabled:!!this.x.disabled,onclick:t=>this.stepBy(1,t),innerHTML:'<i class="f-abs-center f-i f-i-plus"></i>'}))):t&&e.push(t),e}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(lt.isNumber(e)?lt.number(t)<lt.number(e):t<e))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&null!=e&&""!==e&&(lt.isNumber(e)?lt.number(t)>lt.number(e):t>e))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:t=>{if(this.x.format&&(t=t.replace(RegExp(this.x.format.separator||",","g"),"")),null!=t){if(!lt.isNumber(t))return this.formErr({type:"number_invalid"});let e=this.x.decimal;if(t=""+t,!e&&t.includes("."))return this.formErr({type:"number_integer"});if(e&&e>0&<.strFrom(t,".").length>e)return this.formErr({type:"number_decimal_digit"},[e]);let i=this.provideRangeParent&&this.provideRangeParent.getRangeError();if(i)return this.formErr({type:"compare"},i)}}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return{"w-valuetype":"number",oninput:this.oninput,onfocus:this.onfocus,onblur:this.onblur}},html_class(){return["z-buttonposition-"+this.x.buttonPosition,{"z-val":this.hasVal,"z-clearable":!!this.x.clearable}]}},__file:"src/widgets/Spinner.vue"},ps={name:"w-datepicker",mixins:[Yi],inject:["provideRangeParent"],props:["showButton","multiple","format","autoFix","compare","minValue","maxValue","dropProps","enableHour","enableMinute","enableSecond","defaultHour","defaultMinute","defaultSecond"],data:()=>({showDrop:!1,currentDate:null,lastValue:null,placeholder_type:"placeholder_select"}),methods:{x_default:()=>({format:"yyyy-MM-dd",autoFix:!0,showButton:!0}),isUsableVal(t){if(!t)return!0;if(!lt.dateValid(t,this.x.format))return!1;let e=this.x.enableHour&<.arrayNumber(this.x.enableHour),i=this.x.enableMinute&<.arrayNumber(this.x.enableMinute),s=this.x.enableSecond&<.arrayNumber(this.x.enableSecond);if(e||i||s){let l=lt.dateParse(t,this.x.format);if(e&&!e.includes(l.getHours())||i&&!i.includes(l.getMinutes())||s&&!s.includes(l.getSeconds()))return!1}return!0},onfocus(t){this.lastValue=this.x.modelValue,this.baseFocus(t)},onkeyup(){this.isNormal&&(this.showDrop=!0)},onCloseDrop(){this.showDrop=!1,this.currentDate=null,this.doAutoFix()},clickButtonClear(t){t.stopPropagation(),this.hasVal&&(this.val("",t),this.$emit("clear",t))},doAutoFix(){let t=this.x.modelValue;if(t)if(this.isUsableVal(t)){let e=/\b(\d)\b/g;e.test(t)&&this.val(t.replace(e,"0$1"))}else this.x.autoFix&&this.val(this.lastValue)},drop(){lt.br.mobile?lt.dateSheet({value:this.x.modelValue,format:this.x.format,...this.getPeriod(),success:this.calendarCallback}):this.showDrop=!0},calendarCallback(t,e){this.val(t,e),this.showDrop=!1,this.currentDate=null,lt.br.mobile||this.focus()},getPeriod(){let t=this.x.minValue,e=this.x.maxValue,i=this.provideRangeParent&&this.provideRangeParent.forms();if(i)if(i[0]==this){let t=i[1].formVal();null!=t&&(null==e||e>t)&&(e=t)}else if(i[1]==this){let e=i[0].formVal();null!=e&&(null==t||t<e)&&(t=e)}return{minValue:t,maxValue:e}},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=this.x.format,s=e.mode||"<=",l=e.target.isWidget?e.target:this.ownerView.f(e.target),r=l&&l.formVal();if(t&&r&<.dateValid(t,i)&<.dateValid(r,i)){let e=lt.dateParse(t,i),o=lt.dateParse(r,i);if(!lt.eval("d"+s+"td",{d:e,td:o}))return[this.getLabelText(),s,l.getLabelText()]}}},html_button(){let t=[],e=this.x.format||"",i=0;e.includes("H")&&i++,e.includes("m")&&i++,e.includes("s")&&i++;let s,l=/[Hms]/.test(e)&&!/[yMd]/.test(e);if(this.x.clearable&&this.isNormal&&(s=r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton){let e=[r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-date"})];s&&e.push(s),t.push(r.h("div",{class:"w-input-buttonbar"},e))}else s&&t.push(s);if(this.showDrop){let e={ownproperty:!0,class:["f-dfish-dialog w-calendar-dialog",{"z-hastime":i,"z-onlytime":l}],style:{"--w-datepicker-time-cols":i||""},context:this,autoHide:!0,snap:()=>this.snapElem(),position:"v",indent:1};e=this.mergeDropProps(e),t.push(r.h(ae,e,{default:()=>r.h(ki,{height:"*",pad:!0,current:this.currentDate||this.x.modelValue||"",value:this.x.modelValue,format:this.x.format,...this.getPeriod(),enableHour:this.x.enableHour,enableMinute:this.x.enableMinute,enableSecond:this.x.enableSecond,defaultHour:this.x.defaultHour,defaultMinute:this.x.defaultMinute,defaultSecond:this.x.defaultSecond,success:this.calendarCallback,"onClick:item":(t,e)=>{this.currentDate=e.value}})}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&<.dateParse(t,this.x.format)<lt.dateParse(e,this.x.format))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&<.dateParse(t,this.x.format)>lt.dateParse(e,this.x.format))return this.formErr(i,[e])},compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)},validateDefault:(t,e,i)=>{if(this.x.multiple)return;if(t){let e=t,i=lt.dateParse(e,this.x.format),s=i.getFullYear(),l=9999,r=1e3;if(s>l||s<r)return this.formErr({type:"time_exceed"},[r,l]);if(e!=lt.dateFormat(i,this.x.format))return this.formErr({type:"time_format"},[lt.dateFormat(new Date,this.x.format)])}if(this.defaultRuleValue("beforeNow")&&t&&t>lt.dateFormat(new Date,this.x.format))return this.formErr({type:"beforeNow"},[this.x.beforeNow]);if(this.defaultRuleValue("afterNow")&&t&&t<lt.dateFormat(new Date,this.x.format))return this.formErr({type:"afterNow"},[this.x.afterNow]);let s=this.provideRangeParent&&this.provideRangeParent.getRangeError();return s?this.formErr({type:"compare"},s):void 0}}},isReadonly(){if(null==this.x.readonly){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(null==this.x.disabled){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return lt.br.mobile?{readonly:!0}:{onfocus:this.onfocus,onkeyup:this.onkeyup}},form_prop(){return{onclick:this.isNormal&&this.drop}},html_class(){return{"z-drop":this.showDrop,"z-val":this.hasVal,"z-droppable":!0,"z-clearable":this.x.clearable}}},mounted(){this.$watch("modelValue",t=>{if(this.x.autoFix&&t&&(t=lt.strTrim(t))){if(!lt.dateValid(t,this.x.format)){let e=lt.dateParse(t,this.x.format);t=lt.dateFormat(e,this.x.format),this.val(t)}this.lastValue=t}},{immediate:!0})},__file:"src/widgets/DatePicker.vue"},ms={name:"w-dropbox",mixins:[ui],provide(){return{provideOptionParent:this}},props:["multiple","cancelable","clearable","dropProps"],emits:["clear"],data:()=>({hasBorder:!0,text:"",dropper:null,showDrop:!1,placeholder_type:"placeholder_select"}),methods:{click(){this.$slots.default&&(this.showDrop=!this.showDrop,this.warn(!1))},clickOption(t,e){if(this.x.multiple){let e=lt.arrayID(this.val()).concat();t.isFocus?lt.lodash.pull(e,t.value):e.push(t.value),this.val(e)}else{let i=this.x.cancelable&&t.isFocus?"":t.value;this.val(i,e),this.showDrop=!1}},clickButtonClear(t){this.x.clearable&&this.hasVal&&(t.stopPropagation(),this.val(""),this.$emit("clear",t))},formText(){return this.input_text},html_input(){let t=lt.string(this.input_text),e=this.input_placeholder,i=!!lt.br.mobile,s=[this.html_input_hidden(),r.h("div",{class:"w-dropbox-text f-line-1",title:t||e},t||e&&r.h("div",{class:"w-input-placeholder"},e))];if(this.showDrop){let t={context:this,ownproperty:!0,class:"f-dfish-dialog w-dropbox-dialog"+(i?" z-mob":""),width:i?"100%":lt.bcr(this.el("form")).width,autoHide:!0,cover:i,snap:i?null:()=>this.el("form"),position:i?null:"v",indent:1,scrollY:!0,scrollView:".z-on"};t=this.mergeDropProps(t),s.push(r.h(ae,t,this.$slots))}return s},html_button(){let t=[r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})];return this.x.clearable&&this.isNormal&&t.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),r.h("div",{class:"w-input-buttonbar"},t)}},computed:{input_text(){let t=[],e=this.slots_children(),i=lt.arrayID(this.x.modelValue);return lt.lodash.each(i,i=>{let s=e.findIndex(t=>t.props.value==i);if(s>-1&&t.push(s),!this.x.multiple)return!1}),t.sort().map(t=>e[t].props.text).join(", ")},form_prop(){return{onclick:this.isNormal&&this.click}},html_class(){return{"z-val":this.hasVal,"z-drop":this.showDrop,"z-droppable":!0,"z-clearable":this.x.clearable}}},__file:"src/widgets/DropBox.vue"},fs={name:"w-pickbox",mixins:[ms],props:["picker"],methods:{getInputValue:t=>"string"==typeof t?t:lt.array(t).map(t=>t.value).join(","),click(t){this.$slots.default?(this.showDrop=!this.showDrop,this.warn(!1)):this.x.picker&&this.clickButtonPicker(t)},clickButtonPicker(t){t&&t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},closeDrop(){return this.showDrop=!1,this},html_button(){let t=[];if(this.$slots.default||this.x.clearable&&this.isNormal){let e=[];this.$slots.default&&e.push(r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&this.isNormal&&e.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(r.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(r.h("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{hasVal(){return this.input_text},input_text(){let t=this.x.modelValue;return t&&"string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)?t.map(t=>t.text).join(", "):t&&t.text||""}},__file:"src/widgets/PickBox.vue"},xs={name:"w-password",mixins:[Yi],props:["compare","showPassword"],data:()=>({passwordVisible:!1}),methods:{getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"==",s=e.target.isWidget?e.target:this.ownerView.f(e.target),l=s&&s.formVal();if(t&&l&&!lt.eval("v"+i+"tv",{v:t,tv:l}))return[this.getLabelText(),i,s.getLabelText()]}},clickButtonShowPassword(){this.passwordVisible=!this.passwordVisible},html_button(){let t=[];return this.isNormal&&this.x.clearable&&t.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.x.showPassword&&t.push(r.h("button",{class:"w-input-button-showpassword w-input-button f-i "+(this.passwordVisible?"f-i-visible":"f-i-invisible"),onclick:this.clickButtonShowPassword})),t}},computed:{validHooks(){return{...this.pubValidHooks,compare:(t,e,i)=>{let s=this.getCompareError(t,e);if(s)return this.formErr(i,s)}}},input_type(){return this.passwordVisible?"text":"password"}},__file:"src/widgets/Password.vue"},gs={name:"w-range",mixins:[ui],provide(){return{provideRangeParent:this}},props:["mode"],methods:{getRangeError(){let t=this.forms();if(t&&t.length)return t[0].getCompareError(t[0].formVal(),{target:t[1],mode:this.x.mode})},forms(){const t=this.$refs.to;return t&&this.ownerView.fAll(null,t.parentNode)},snapElem(){return this.forms()[0]||this.el("form")},html_form(){let t=this.slots_children();return t.splice(1,0,r.h("div",{ref:"to",class:"w-range-to"},lt.loc.to)),t}},computed:{html_on(){return{onclick:t=>this.warnClass=""}}},__file:"src/widgets/Range.vue"},vs={name:"w-combobox",mixins:[ui],props:["multiple","strict","dropper","picker","dropProps","br","clearable"],emits:["input","click:item","blur","focus","clear"],data(){return{hasBorder:!0,text:"",showSuggest:!1,sug_timer:null,sensor_text:this.getInputText(this.modelValue),sensor_width:null}},methods:{x_default:()=>({strict:!0}),watchModelValue(t,e){this.clear(),this.x.strict||(this.sensor_text=this.getInputText(t));(e&&e.map?e.map(t=>t.value).join(","):"")!=(t&&t.map?t.map(t=>t.value).join(","):"")&&this.trigger("change",t)},getInputValue(t){if("string"==typeof t)return t;let e=lt.array(t).filter(t=>t.value).map(t=>t.value);return!this.x.strict&&this.sensor_text&&e.push(this.sensor_text),e.join(",")},getInputText(t){const e=lt.array(t).find(t=>!t.value&&t.text);return e?e.text:""},addVal(t,e){let i;i=this.x.multiple?lt.lodash.unionBy(lt.array(this.x.modelValue),lt.array(t),"value"):[t],lt.lodash.remove(i,t=>!t||!t.text),this.val(i,e)},complete(t,e){return e=e||new CustomEvent("complete"),this.addVal(t,e),this.clear(),this.$nextTick(this.focus),this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},clear(){this.sensor_text="",this.isNormal&&(this.$refs.input.value="")},reset(t){this.warn(!1),this.clear(),this.val(t||null==this.defaultValue?"":this.defaultValue)},focus(t){this.isNormal&&(this.$refs.input.focus(),t&&this.$refs.input.value&<.rngCursor(this.$refs.input),this.warn(!1))},onclick(t){this.sensor_text||"function"!=typeof this.x.dropper||(this.suggest(),this.x.dropper(this));const e=t&&t.target==this.$refs.list;this.focus(e)},oninput(t){let e=t.target.value;this.sensor_text=e,clearTimeout(this.sug_timer),""===e?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0),t.value=e,this.trigger(t,e)},500)},onkeydown(t){if(8===t.keyCode&&0===t.target.selectionStart&&0===t.target.selectionEnd){let t=lt.array(this.x.modelValue).concat();t.length&&(t.splice(t.length-1,1),this.val(t))}},onblur(t){this.trigger("blur"),setTimeout(()=>{this.$.isUnmounted||this.$.isDeactivated||(this.valid("blur"),this.$refs.list.contains(document.activeElement)||(this.isFocus=!1))},100)},onfocus(t){this.isFocus=!0,!this.showSuggest&&t.target.value&&t.target.dispatchEvent(new Event("input")),this.trigger("focus")},onwheel(t){this.$refs.list.scrollWidth>this.$refs.list.clientWidth&&(this.$refs.list.scrollLeft+=50*(t.deltaY>0?1:-1),t.preventDefault())},onCloseDrop(){this.showSuggest=!1},clickItem(t,e){t.runType="click:item",t.value=e,this.trigger(t,e)},clickClose(t,e){t.stopPropagation();let i=lt.array(this.x.modelValue).concat(),s=i.findIndex(t=>t.value==e.value);s>-1&&(i.splice(s,1),this.val(i,t))},clickButtonPicker(t){t.stopPropagation(),this.warn(!1);let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.val("",t),this.clear(),this.suggest(!1),this.focus(),this.$emit("clear",t)},formText(){return this.input_title},html_options(){let t=this.x.modelValue;if(t&&"string"!=typeof t)return lt.array(t).filter(t=>t.value).map(t=>r.h("div",{class:["w-combobox-option f-flex-center",{"z-forbid":t.forbid}],onclick:e=>this.clickItem(e,t)},[r.h("div",{class:"w-combobox-option-text f-line-1",title:t.text},t.text),this.isNormal&&r.h("div",{class:"w-combobox-option-close f-i f-i-close",onclick:e=>this.clickClose(e,t)})]))},html_var(){return r.h("div",{class:"w-combobox-input-wrap"},[r.h("div",{class:"w-combobox-sensor",ref:"sensor"},this.sensor_text||(this.input_value?null:this.input_placeholder)),r.h("input",{type:"text",ref:"input",value:this.sensor_text,class:"w-combobox-input",style:{width:this.sensor_width},readonly:!this.isNormal,placeholder:this.input_value?null:this.input_placeholder,oninput:this.oninput,onkeydown:this.onkeydown,onblur:this.isNormal&&this.onblur,onfocus:this.isNormal&&this.onfocus})])},html_input(){const t=[this.html_options()];if(t.push(this.html_var()),this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:lt.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(r.h(ae,e,this.$slots))}return[this.html_input_hidden(),r.h("div",{ref:"list",class:["w-combobox-list f-flex-1 f-flex f-oh f-height",{"f-h-gap":lt.br.compat.gap}],onWheel:!this.x.br&&this.onwheel},t)]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(r.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(r.h("button",{class:"w-input-button-picker w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickButtonPicker})),t}},computed:{validHooks(){return{validateDefault:t=>{if(this.sensor_text){if(this.x.strict)return this.formErr({type:"invalid_option"});if(!this.x.multiple){const t=lt.array(this.x.modelValue).find(t=>t.value);if(t)return this.formErr({type:"maxSize"},1)}}},...this.pubValidHooks}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":lt.array(this.x.modelValue).map(t=>t.text).join(", ")},html_class(){return{"z-br":this.x.br,"z-drop":this.showSuggest,"z-val":this.hasVal||this.sensor_text,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable,"z-on":this.isFocus}},form_prop(){return{onclick:this.isNormal&&this.onclick}}},mounted(){this.$refs.sensor&&new Wt(()=>{this.$refs.sensor&&(this.sensor_width=this.$refs.sensor.offsetWidth+"px")}).observe(this.$refs.sensor)},__file:"src/widgets/ComboBox.vue"},ws={name:"w-linkbox",mixins:[ui],props:["multiple","picker","dropProps","separator","strict","br","clearable"],emits:["input","dblclick:item","clear"],created(){this.$watch(()=>this.x.modelValue,t=>{this.isFocus||this.initOptions(t)})},data:()=>({hasBorder:!0,text:"",sugger:null,showSuggest:!1,sug_timer:null,_KC:null,imeMode:!1,paste_rng:null,currOpt:null,store:[]}),methods:{x_default:()=>({strict:!0}),getInputValue:t=>"string"==typeof t?t:lt.array(t).map(t=>t.value).join(","),initOptions(t){null==t&&(t=this.x.modelValue),t&&"string"!=typeof t&&(t=lt.array(t),this.store.length&&(this.store=[]),this.addStore(t),this.inp().innerHTML=this.html_options(t))},addVal(t,e){let i;i=this.x.multiple?lt.lodash.unionBy(lt.array(this.x.modelValue),lt.array(t),"value"):[t],this.val(i,e)},complete(t,e){e=e||new CustomEvent("complete"),this.addStore(t),this.focus();let i=this.currOpt||lt.rngElement(),s=this.x.separator||",";if(i){"U"===i.tagName||("I"===i.tagName?i.nextSibling&&"U"===i.nextSibling.tagName?i=i.nextSibling:(i=lt.after(i,"<u></u>"),this.x.multiple&<.after(i,"<i>"+s+"</i>")):i=!this.x.multiple&&this.inp().querySelector("u")||lt.append(this.inp(),"<u></u>")),this.rng_text(i,0,t.text),lt.classAdd(i,"_o"),i.setAttribute("data-value",t.value),t.forbid&&i.setAttribute("data-forbid","");let l=i.nextSibling;lt.rngCursor(l&&!l.nextSibling?l:i),this.x.multiple&&!l&<.rngCursor(lt.after(i,"<i>"+s+"</i>"));let r=lt.q(`u[data-value="${t.value}"]`,this.inp());r.length>1&&r.eq(0).next("i").addBack().remove(),this.save(e)}return this},closeDrop(){return this.suggest(!1),this},suggest(t){!1===(t=null==t||t)&&clearTimeout(this.sug_timer),this.showSuggest=t,this.warn(!1)},input(t,e){this.currOpt=t;let i=t.innerText.replace(/^[\s,]+|[\s,]+$/g,"");clearTimeout(this.sug_timer),""===i?this.suggest(!1):this.sug_timer=setTimeout(()=>{this.suggest(!0);const t=this.createEvent("input",{originalEvent:e});this.trigger(t,i)},500)},focus(){return this.$refs.inp.focus(),this.warn(!1),this},inp(){return this.$refs.inp},fixStyle(t){let e,i=lt.rngElement(),s=!1,l=this.uid,r=this.inp();if(r.contains(i)||(i=r),e=i.innerText,this.paste_rng&&(i=this.paste_rng.parentElement()),i.id===l&&(i=r),i.id===l+"t"){if(!e)return this.closeDrop();if(3===i.firstChild.nodeType){let t=lt.rngCursor(i),s=document.createElement("u");t.extractContents(),s.appendChild(document.createTextNode(e)),t.insertNode(s),lt.rngCursor(s),i=s}else lt.q("br",r).remove(),i.firstChild?i=i.firstChild:lt.rngCursor(i)}if(lt.q("br",r).remove(),"FONT"===i.tagName)if("U"===i.parentNode.tagName){let t=e.previousSibling.nodeValue,e=e.parentNode,i=e.innerText;this.rng_text(e,i.indexOf(t)+t.length+1,i)}else i.parentNode.id===l+"t"&&(e=i.parentNode.innerText,i=lt.replaceWith(i,"<u></u>"),i.innerText=e);i!==r&&"I"!==i.tagName&&i.nextSibling&&"I"!==i.nextSibling.tagName&&(3===i.nextSibling.nodeType?i.nextSibling.parentNode.removeChild(i.nextSibling):(e=i.innerText,this.rng_text(i,e.length,e+i.nextSibling.innerText),i.nextSibling.parentNode.removeChild(i.nextSibling),s=!0)),lt.q("u:has(br)",r).remove(),e=i.innerText;let o=[],a=this.x.separator||",";if(this.x.multiple&&e.length>1&&e.indexOf(a)>-1){let l,n=[],h=e.length-lt.rngCursorOffset(),c=[];e.split(a).forEach(t=>{(l=lt.strTrim(t))?(s=this.param(l),n.push("<u"+(s?' class=_o data-value="'+s.value+'"'+(s.forbid?" data-forbid":""):"")+">"+l+"</u>"),s?c.push('u[data-value="'+s.value+'"]'):o.push(l)):n.push("")}),c.length&&(c=lt.q(c.join(","),r).next("i").addBack());let u=lt.replaceWith(i,n.join("<i>"+a+"</i>")),d=0;if(!this.paste_rng||188===this._KC)do{if((d+=u.innerText.length)>=h){this.rng_text(u,d-h);break}}while(u=u.previousSibling);c.length&&(c.remove(),lt.q("i + i, i:first-child",r).remove()),s=!0,(i=lt.rngElement())&&"U"===i.tagName&&!i.getAttribute("data-value")?this.input(i,t):this.closeDrop()}else e?(lt.classAny(i,"_o")&&!this.param(e)?(lt.classRemove(i,"_o"),i.removeAttribute("data-value"),s=!0):this.x.strict||(s=!0),this.input(i,t)):(s=!0,this.closeDrop());s&&this.save(t),this.paste_rng=null},rng_text(t,e,i){let s=lt.rngSelection();null!=i&&(t.innerText=i),s.selectNodeContents(t),lt.rngCursor(s,e)},clickPicker(t){t.stopPropagation();let e=this.x.picker;"function"==typeof e&&e(t,this)},clickButtonClear(t){t.stopPropagation(),this.x.clearable&&this.hasVal&&(this.val([],t),this.$nextTick(this.focus),this.$emit("clear",t))},addStore(t){if(t&&"string"!=typeof t){let e=lt.array(t).filter(t=>!this.store.find(e=>e.value==t.value));e.length&&(this.store=this.store.concat(e))}},param(t){return this.store.find(e=>e.text==t)},save(t){let e=this.x.strict,i=[];lt.q("> u",this.inp()).each((t,s)=>{let l=s.getAttribute("data-value"),r=s.innerText;l?i.push({value:l,text:r}):e||i.push({value:r})}),this.val(i,t)},onkeydown(t){13===t.keyCode&&t.preventDefault()},onkeyup(t){if(!this.imeMode){let e=this._KC=t.keyCode;13===e||38===e||40===e||17===e?t.stopPropagation():this.fixStyle(t),this._KC=null}},onclick(t){if(this.isNormal)if(t.target&&"U"===t.target.tagName&&!t.target.getAttribute("data-value"))this.input(t.target,t);else{let e=lt.rngElement();"U"===e.tagName?this.input(e,t):"function"==typeof this.x.dropper?this.x.dropper(this):this.closeDrop()}},ondblclick(t){if("U"===t.target.tagName&&t.target.getAttribute("data-value")){let e=lt.array(this.x.modelValue).find(e=>e.value==t.target.getAttribute("data-value"));e&&(t.runType="dblclick:item",t.value=e,this.trigger(t,e),window.getSelection().removeAllRanges())}},onCloseDrop(){this.showSuggest=!1},formText(){return this.input_title},html_options(t){let e=this.x.separator||",";if(null==t&&(t=this.x.modelValue),"string"!==t){let i=lt.array(t),s=[];return lt.lodash.each(i,(t,i)=>{if(s.push("<u"+(t.value?' class=_o data-value="'+t.value+'"':"")+(t.forbid?" data-forbid":"")+">"+t.text+"</u>"),!this.x.multiple)return!1;s.push("<i>"+e+"</i>")}),s.join("")}},html_var(){return r.h("div",{class:"w-linkbox-input f-flex-1",ref:"inp",id:this.uid+"t",contentEditable:this.isNormal,onkeyup:this.onkeyup,onkeydown:this.onkeydown,onclick:this.onclick,ondblclick:this.ondblclick,onfocus:t=>{this.isFocus=!0},onblur:t=>{this.isFocus=!1}})},html_input(){let t=[];if(this.showSuggest){let e={context:this,ownproperty:!0,class:"f-dfish-dialog",width:lt.bcr(this.el("form")).width,scrollY:!0,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(r.h(ae,e,this.$slots))}return[this.html_input_hidden(),this.html_var(),r.h("div",{class:"w-input-placeholder"},this.input_value?null:this.input_placeholder),t]},html_button(){let t=[];if(this.x.dropper||this.x.clearable&&this.isNormal){let e=[];this.x.dropper&&e.push(r.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(r.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(r.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(r.h("button",{class:"w-input-button f-i f-i-ellipsis",disabled:!this.isNormal,onclick:this.clickPicker})),t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(this.x.strict&<.q("u:not([data-value])").length>0)return this.formErr({type:"invalid_option"})}}},hasVal(){return this.input_value},input_title(){return"string"==typeof this.x.modelValue?"":lt.array(this.x.modelValue).map(t=>t.text||t.value).join(", ")},html_class(){return{"z-br":this.x.br,"z-dc":this.getOn("dblclick:item"),"z-drop":this.showSuggest,"z-val":this.hasVal,"z-droppable":this.x.dropper,"z-clearable":this.x.clearable}}},mounted(){this.initOptions(),this.inp().addEventListener("compositionstart",()=>{this.imeMode=!0}),this.inp().addEventListener("compositionend",()=>{this.imeMode=!1})},__file:"src/widgets/LinkBox.vue"},bs={props:["width","height","context"],data:()=>({smallLeft:0}),watch:{"context.x.modelValue":{handler(t){let e=this.context.max(),i=this.context.min();this.smallLeft=(this.width-this.smallWidth)*(t/(e-i))}}},mounted(){},methods:{refresh(t){this.context.refresh(t)},dragstart(t){},mousedown(t){this.context.dragstart(t)}},computed:{bigSrc(){return this.context.x.big.src},smallSrc(){return this.context.x.small.src},smallWidth(){return this.height*(this.context.x.small.width/this.context.x.small.height)}}};const _s=["src"],ys=["src","width"];bs.render=function(t,e,i,s,l,o){const a=r.resolveComponent("w-dialog");return r.openBlock(),r.createBlock(a,{ref:"dialog",class:"w-jigsaw-dialog",width:i.width,height:i.height,context:i.context},{default:r.withCtx(()=>[r.createElementVNode("img",{class:"w-jigsaw-big",src:o.bigSrc},null,8,_s),r.createElementVNode("img",{class:"w-jigsaw-small",src:o.smallSrc,width:o.smallWidth,style:r.normalizeStyle({left:l.smallLeft+"px"}),onDragstart:e[0]||(e[0]=r.withModifiers((...t)=>o.dragstart&&o.dragstart(...t),["prevent"])),onMousedown:e[1]||(e[1]=(...t)=>o.mousedown&&o.mousedown(...t))},null,44,ys),r.createElementVNode("span",{onClick:e[2]||(e[2]=(...t)=>o.refresh&&o.refresh(...t)),class:"w-jigsaw-refresh"},"刷新")]),_:1},8,["width","height","context"])},bs.__file="src/template/TemplateJigsaw.vue";const ks=lt.loc.form.jigsaw_drag_right;var Cs={name:"w-jigsaw",mixins:[ui],emits:["drop","click:refresh"],props:["big","small","dropWidth"],data:()=>({hasBorder:!0,text:ks,locked:!1,isSuccess:!1,isError:!1,showDrop:!1}),methods:{success(t){this.text=t,this.locked=!0,this.isSuccess=!0,this.showDrop=!1,this.setThumbLeft()},error(t,e,i){if(t||(t=""),this.text=t,this.isError=!0,this.showDrop=!1,this.warn(!0),this.setThumbLeft(0),e){this.locked=!0,this.text=t+`(${e/1e3})`;let s=setInterval(()=>{e-=1e3,this.text=t+`(${e/1e3})`,e<=0&&(clearInterval(s),this.reset(),i&&i())},1e3)}else i&&i()},reset(){this.locked=!1,this.isError=!1,this.isSuccess=!1,this.text=ks,this.setThumbLeft(0),this.warn(!1)},refresh(t){t.runType="click:refresh",this.trigger(t)},setThumbLeft(t){null==t?t=lt.number(this.$refs.thumb.style.left):this.$refs.thumb.style.left=t+"px";let e=this.thumbWidth(),i=this.mainWidth(),s=t+e/2>i/2;this.$refs.text.style.left=s?0:t+e+"px",this.$refs.text.style.right=s?i-t+"px":0,this.el().classList.remove("z-drag")},dragstart(t){if(!this.isNormal||this.locked)return;this.warn(!1);let e=this.$refs.thumb,i=lt.eventX(t),s=this.max(),l=this.min(),r=lt.number(e.style.left),o=this.thumbWidth(),a=this.mainWidth();lt.moveup(t=>{let n=lt.eventX(t),h=lt.numRange(r+n-i,0,a-o);e.style.left=h+"px",this.$refs.track.style.width=h+o+"px",this.x.modelValue=(s-l)*h/(a-o),this.el().classList.add("z-drag")},(t,i)=>{i&&e.dispatchEvent(new Event("drop"))},t)},mouseenter(t){!this.x.big||this.isSuccess||this.locked||(this.warn(!1),this.showDrop=!0)},drop(t){this.trigger(t,this.x.modelValue)},max(){let t=this.x.maxValue;return null==t?100:t},min(){let t=this.x.minValue;return null==t?0:t},thumbWidth(){return lt.bcr(this.$refs.thumb).width},mainWidth(){return lt.bcr(this.$refs.form).width},html_input(){return[this.html_input_hidden(),[r.h("div",{ref:"track",class:"w-jigsaw-track"}),r.h("div",{ref:"text",class:"w-jigsaw-text f-flex-center f-line-1"},this.text)]]},html_button(){let t=[r.h("button",{ref:"thumb",class:["w-jigsaw-thumb w-input-button f-i",this.isSuccess?"f-i-check":"f-i-long-arrow-right"],disabled:!!this.x.disabled,onmousedown:this.dragstart,onmouseenter:this.mouseenter,ondrop:this.drop})];if(this.showDrop){let e=Math.max(lt.number(this.x.dropWidth),lt.bcr(this.el("form")).width),i=Math.ceil(e*(this.x.big.height/this.x.big.width));t.push(r.h(bs,{ownproperty:!0,width:e,height:i,autoHide:!0,context:this,snap:()=>this.el("form"),position:"v",onClose:()=>this.showDrop=null}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,validateDefault:t=>{if(!this.isSuccess)return this.formErr({type:"jigsaw_required"})}}},html_class(){return{"z-success":this.isSuccess}},form_prop(){return{onmouseenter:this.mouseenter}}},__file:"src/widgets/Jigsaw.vue"},Ss={name:"w-form",mixins:[ui],props:["vertical"],methods:{getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks,required:(t,e,i)=>{if(e&&(!t||"[]"===t||"{}"===t))return this.formErr(i)}}},html_class(){return[{"z-vertical":this.x.vertical}]},html_style(){return{"--w-form-gap":lt.unitSize(this.x.gap)}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/Form.vue"},Vs={name:"w-formgroup",mixins:[ui],props:["columns","rows","gap","defaultColspan"],methods:{x_default:()=>({columns:12,gap:0}),getInputValue:t=>null==t?"":"object"==typeof t?JSON.stringify(t):t,html_input(){return[this.html_input_hidden(),this.$slots.default&&this.$slots.default()]}},computed:{validHooks(){return{...this.pubValidHooks}},html_style(){let t=this.x.columns;lt.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;return lt.isNumber(e)&&(e=`repeat(${e}, 1fr)`),this.x.defaultColspan,{"--w-fromgroup-template-columns":t,"--w-fromgroup-template-rows":e,"--w-grid-gap":this.x.gap?lt.unitSize(this.x.gap):""}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}},__file:"src/widgets/FormGroup.vue"},Ts={name:"w-rate",mixins:[ui],props:["allowHalf","cancelable","sum","count","text"],data:()=>({hoverWrap:!1,hoverIndex:-1}),methods:{x_default:()=>({sum:5,count:5}),hoverItem(t,e){this.isNormal&&(this.hoverIndex=e)},clickItem(t,e){this.isNormal&&(this.x.modelValue=this.x.cancelable&&this.x.modelValue==e?"":e)},html_star(t){return r.h(we,{class:["w-rate-star-icon",{"z-hv":this.hoverWrap&&t<=this.hoverIndex,"z-on":!this.hoverWrap&&t<=this.x.modelValue}],src:".f-i .f-i-star-full",onMouseenter:e=>this.hoverItem(e,t),onClick:e=>this.clickItem(e,t),disabled:!this.isNormal})},html_input(){let t=this.x.allowHalf?.5:1,e=(this.x.sum||5)*t/(this.x.count||5),i=[];for(let s=e;s<=this.x.sum;s+=e/t){let t=[this.html_star(s)];this.x.allowHalf&&t.push(this.html_star(s+e)),i.push(r.h("li",{class:"w-rate-star"},t))}return[this.html_input_hidden(),r.h("ul",{class:"w-rate-wrap",onMouseenter:t=>this.isNormal&&(this.hoverWrap=!0),onMouseleave:t=>this.isNormal&&(this.hoverWrap=!1)},i),this.x.text&&this.x.modelValue&&r.h("span",{class:"w-rate-text"},this.x.text[(this.x.modelValue-e)/t])]}},computed:{html_class(){return{"z-allow-half":this.x.allowHalf}}}};function Ms(t,{trimZeros:e=!1}={}){let i=Number(t).toLocaleString("fullwide",{useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:20});if(i.includes("e")){const[e,s]=i.split("e"),l=parseInt(s,10);i=Number(t).toFixed(Math.abs(l)+(e.split(".").length||0))}const[s,l]=i.split(".");if(!l)return 0;return(e?l.replace(/0+$/,""):l).length}Ts.__file="src/widgets/Rate.vue";var Ps={name:"w-slider",mixins:[ui],props:["minValue","maxValue","step"],emits:["drop"],data:()=>({grabbing:!1,left:0}),methods:{x_default:()=>({minValue:0,maxValue:100,step:1}),onmousedown(t){const e=lt.bcr(this.$refs.bar);let i=lt.number(this.x.modelValue),s=t.clientX;this.grabbing=!0;const l=Ms(this.x.step);lt.moveup(t=>{let r=t.clientX-s,o=i+r/e.width*(this.x.maxValue-this.x.minValue);o=lt.numRange(o,this.x.minValue,this.x.maxValue),o=Number(Number(o).toFixed(l)),this.val(o)},t=>{this.grabbing=!1,this.trigger("drop",this.x.modelValue)},t)},onclick(t){if(t.target!==this.$refs.button){const e=Ms(this.x.step),i=lt.bcr(this.$refs.bar);let s=t.clientX-i.left,l=+this.x.minValue+(s-10)/i.width*(this.x.maxValue-this.x.minValue);l=lt.numRange(l,this.x.minValue,this.x.maxValue),l=Number(Number(l).toFixed(e)),this.val(l),this.trigger("drop",l)}},html_input(){return[this.html_input_hidden(),r.h("div",{onClick:this.onclick,class:["w-slider-wrap"]},[r.h("div",{class:["w-slider-progress"]}),r.h("div",{ref:"bar",class:"w-slider-bar"},r.h("div",{ref:"button",onMousedown:this.onmousedown,class:["w-slider-button",{"z-grabbing":this.grabbing}]}))])]}},computed:{html_style(){return{"--w-slider-left":`${100*(this.x.modelValue-this.x.minValue)/(this.x.maxValue-this.x.minValue)||0}%`}}},__file:"src/widgets/Slider.vue"};const $s=[Ct,te,ae,he,ue,ve,Ve,Te,We,Zt,Kt,Me,Pe,$e,Ee,De,Ne,Le,Fe,Re,Xe,Ue,Ke,Ze,ti,we,Qe,ye,_e,ei,ii,gi,hi,vi,wi,bi,_i,yi,ki,Ei,Ni,Li,ci,Ii,Yi,Oi,ji,mi,qi,Ri,xi,Wi,Zi,as,ns,hs,ds,ps,ms,fs,xs,gs,vs,ws,Cs,Ss,Vs,Ts,Ps],Bs={};lt.WIDGET=Bs,lt.install=t=>{$s.forEach(e=>{t.component(e.name,e),Bs[e.name]=e}),t.use(dt)},module.exports=lt;
|