dfish-widget 1.1.13 → 2.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -28
- package/css/style.css +1 -1
- package/lib/assets/entity.d.ts +1 -0
- package/lib/dfish.d.ts +22 -0
- package/lib/directive/dialog-move.d.ts +5 -0
- package/lib/directive/form-ignore.d.ts +6 -0
- package/lib/directive/index.d.ts +1 -0
- package/lib/directive/label-width.d.ts +6 -0
- package/lib/directive/tip.d.ts +4 -0
- package/lib/index.cjs.js +46 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.esm.js +10870 -1
- package/lib/template/TemplateAlert.vue.d.ts +41 -0
- package/lib/template/TemplateConfirm.vue.d.ts +43 -0
- package/lib/template/TemplateDateSheet.vue.d.ts +59 -0
- package/lib/template/TemplateJigsaw.vue.d.ts +20 -0
- package/lib/template/TemplatePreviewMedia.vue.d.ts +14 -0
- package/lib/template/TemplateTip.vue.d.ts +23 -0
- package/lib/util/browser.d.ts +44 -0
- package/lib/util/css.d.ts +2 -0
- package/lib/util/date.d.ts +10 -0
- package/lib/util/elem.d.ts +8 -0
- package/lib/util/event.d.ts +18 -0
- package/lib/util/json.d.ts +3 -0
- package/lib/util/loc/zh-CN.d.ts +155 -0
- package/lib/util/mime.d.ts +1 -0
- package/lib/util/number.d.ts +9 -0
- package/lib/util/range.d.ts +6 -0
- package/lib/util/snap.d.ts +5 -0
- package/lib/util/str.d.ts +14 -0
- package/lib/util/uid.d.ts +1 -0
- package/lib/util/v-directive.d.ts +8 -0
- package/lib/widgets/Album.vue.d.ts +167 -0
- package/lib/widgets/Alert.vue.d.ts +334 -0
- package/lib/widgets/AlignParent.vue.d.ts +20 -0
- package/lib/widgets/Button.vue.d.ts +150 -0
- package/lib/widgets/ButtonAbs.vue.d.ts +171 -0
- package/lib/widgets/ButtonBar.vue.d.ts +177 -0
- package/lib/widgets/Calendar.vue.d.ts +202 -0
- package/lib/widgets/CheckBox.vue.d.ts +293 -0
- package/lib/widgets/CheckBoxGroup.vue.d.ts +254 -0
- package/lib/widgets/ComboBox.vue.d.ts +296 -0
- package/lib/widgets/Confirm.vue.d.ts +338 -0
- package/lib/widgets/DatePicker.vue.d.ts +353 -0
- package/lib/widgets/Dialog.vue.d.ts +331 -0
- package/lib/widgets/DialogTarget.vue.d.ts +17 -0
- package/lib/widgets/DocView.vue.d.ts +129 -0
- package/lib/widgets/DropBox.vue.d.ts +254 -0
- package/lib/widgets/FileUpload.vue.d.ts +324 -0
- package/lib/widgets/Form.vue.d.ts +226 -0
- package/lib/widgets/FormBase.vue.d.ts +232 -0
- package/lib/widgets/FormGroup.vue.d.ts +241 -0
- package/lib/widgets/Grid.vue.d.ts +168 -0
- package/lib/widgets/Hidden.vue.d.ts +210 -0
- package/lib/widgets/Horizontal.vue.d.ts +153 -0
- package/lib/widgets/Html.vue.d.ts +97 -0
- package/lib/widgets/ImageUpload.vue.d.ts +328 -0
- package/lib/widgets/Img.vue.d.ts +136 -0
- package/lib/widgets/Jigsaw.vue.d.ts +255 -0
- package/lib/widgets/Label.vue.d.ts +108 -0
- package/lib/widgets/Leaf.vue.d.ts +158 -0
- package/lib/widgets/LinkBox.vue.d.ts +295 -0
- package/lib/widgets/Loading.vue.d.ts +306 -0
- package/lib/widgets/MediaUpload.vue.d.ts +326 -0
- package/lib/widgets/MediaUploadItem.vue.d.ts +27 -0
- package/lib/widgets/Menu.vue.d.ts +318 -0
- package/lib/widgets/MenuButton.vue.d.ts +163 -0
- package/lib/widgets/Option.vue.d.ts +93 -0
- package/lib/widgets/PageBar.vue.d.ts +248 -0
- package/lib/widgets/Password.vue.d.ts +267 -0
- package/lib/widgets/PickBox.vue.d.ts +261 -0
- package/lib/widgets/Progress.vue.d.ts +93 -0
- package/lib/widgets/PubParent.vue.d.ts +18 -0
- package/lib/widgets/Radio.vue.d.ts +297 -0
- package/lib/widgets/RadioGroup.vue.d.ts +239 -0
- package/lib/widgets/Range.vue.d.ts +223 -0
- package/lib/widgets/Rate.vue.d.ts +246 -0
- package/lib/widgets/Scroll.vue.d.ts +129 -0
- package/lib/widgets/SlidePicker.vue.d.ts +125 -0
- package/lib/widgets/Slider.vue.d.ts +238 -0
- package/lib/widgets/SlotDefault.vue.d.ts +17 -0
- package/lib/widgets/Spinner.vue.d.ts +317 -0
- package/lib/widgets/Split.vue.d.ts +110 -0
- package/lib/widgets/SrcParent.vue.d.ts +24 -0
- package/lib/widgets/Swiper.vue.d.ts +117 -0
- package/lib/widgets/SwiperItem.vue.d.ts +91 -0
- package/lib/widgets/Switch.vue.d.ts +236 -0
- package/lib/widgets/Tab.vue.d.ts +2 -0
- package/lib/widgets/TabBar.vue.d.ts +235 -0
- package/lib/widgets/TabButton.vue.d.ts +151 -0
- package/lib/widgets/Table.vue.d.ts +109 -0
- package/lib/widgets/TableColumn.vue.d.ts +13 -0
- package/lib/widgets/TableColumns.vue.d.ts +2 -0
- package/lib/widgets/TableTBody.vue.d.ts +246 -0
- package/lib/widgets/TableTD.vue.d.ts +34 -0
- package/lib/widgets/TableTH.vue.d.ts +125 -0
- package/lib/widgets/TableTHead.vue.d.ts +112 -0
- package/lib/widgets/TableTR.vue.d.ts +130 -0
- package/lib/widgets/TableV2.vue.d.ts +85 -0
- package/lib/widgets/Tabs.vue.d.ts +115 -0
- package/lib/widgets/Text.vue.d.ts +262 -0
- package/lib/widgets/Textarea.vue.d.ts +252 -0
- package/lib/widgets/Timeline.vue.d.ts +147 -0
- package/lib/widgets/TimelineItem.vue.d.ts +101 -0
- package/lib/widgets/Tip.vue.d.ts +328 -0
- package/lib/widgets/Toggle.vue.d.ts +120 -0
- package/lib/widgets/Tree.vue.d.ts +163 -0
- package/lib/widgets/TreeV2.vue.d.ts +75 -0
- package/lib/widgets/TreeV2Wrap.vue.d.ts +155 -0
- package/lib/widgets/TripleBox.vue.d.ts +304 -0
- package/lib/widgets/Vertical.vue.d.ts +150 -0
- package/lib/widgets/Video.vue.d.ts +94 -0
- package/lib/widgets/View.vue.d.ts +197 -0
- package/lib/widgets/ViewAbs.vue.d.ts +48 -0
- package/lib/widgets/WidgetAbs.vue.d.ts +87 -0
- package/lib/widgets/WidgetBase.vue.d.ts +72 -0
- package/lib/widgets/index.d.ts +2 -0
- package/package.json +11 -25
- package/css/f/iconfont.ttf +0 -0
- package/css/f/iconfont.woff +0 -0
- package/css/f/iconfont.woff2 +0 -0
- package/css/g/f.png +0 -0
- package/css/g/i.png +0 -0
- package/css/reset.css +0 -32
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1,46 @@
|
|
|
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={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 vt={class:"f-height f-rel f-oh"},wt=["src"],bt={class:"_rotate"};gt.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",vt,[r.createElementVNode("img",{class:"_img",src:t},null,8,wt)])]),_:2},1024))),128))]),_:1},8,["current","arrow","indicator-dots"]),r.createElementVNode("div",bt,[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})},gt.__file="src/template/TemplatePreviewMedia.vue";var _t={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(){}}};_t.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})},_t.__file="src/template/TemplateDateSheet.vue";var yt={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>"),lt.q(document.body).append('<svg style="display:none;width:0;height:0" width="0" height="0" focusable="false" aria-hidden="true">\n <symbol id="f-svg-loading" viewBox="0 0 50 50">\n <path\n 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"\n transform="rotate(86.9154 25 25)">\n </path>\n </symbol>\n <symbol id="f-svg-loading-1" viewBox="0 0 50 50">\n <circle cx="25" cy="25" r="20" />\n </symbol>\n <symbol id="f-svg-loading-2" viewBox="0 0 24 30">\n <rect x="0" y="8.66115" width="4" height="12.6777" opacity="0.2">\n <animate attributeName="opacity" values="0.2; 1; .2" begin="0s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="height" values="10; 20; 10" begin="0s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="y" values="10; 5; 10" begin="0s" dur="0.6s"\n repeatCount="indefinite"></animate>\n </rect>\n <rect x="8" y="6.16115" width="4" height="17.6777" opacity="0.2">\n <animate attributeName="opacity" values="0.2; 1; .2" begin="0.15s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="height" values="10; 20; 10" begin="0.15s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="y" values="10; 5; 10" begin="0.15s" dur="0.6s"\n repeatCount="indefinite"></animate>\n </rect>\n <rect x="16" y="6.33885" width="4" height="17.3223" opacity="0.2">\n <animate attributeName="opacity" values="0.2; 1; .2" begin="0.3s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="height" values="10; 20; 10" begin="0.3s" dur="0.6s"\n repeatCount="indefinite"></animate>\n <animate attributeName="y" values="10; 5; 10" begin="0.3s" dur="0.6s"\n repeatCount="indefinite"></animate>\n </rect>\n </symbol>\n <symbol id="f-svg-loading-3" viewBox="0 0 1024 1024">\n <path\n 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"\n p-id="4486"></path>\n </symbol>\n </svg>')},methods:{el:()=>document.getElementById("app")||document.body,getKey:()=>null,previewVideo(t){this.pop(gt,{data:{type:"video",src:t}})},previewImage(t,e){this.pop(gt,{data:{type:"image",imgs:t,options:e}})},dateSheet(t,e){this.pop(_t,{template:_t,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()]}},__file:"src/widgets/DocView.vue"},kt=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}()}(),Ct="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,St="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Vt="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(St):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)};var Tt=["top","right","bottom","left","width","height","size","weight"],Mt="undefined"!=typeof MutationObserver,Pt=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(){Vt(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(){Ct&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Mt?(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(){Ct&&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;Tt.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}(),$t=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},Bt=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||St},zt=At(0,0,0,0);function Dt(t){return parseFloat(t)||0}function Et(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(e,i){return e+Dt(t["border-"+i+"-width"])},0)}function Nt(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return zt;var s=Bt(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]=Dt(r)}return e}(s),r=l.left+l.right,o=l.top+l.bottom,a=Dt(s.width),n=Dt(s.height);if("border-box"===s.boxSizing&&(Math.round(a+r)!==e&&(a-=Et(s,"left","right")+r),Math.round(n+o)!==i&&(n-=Et(s,"top","bottom")+o)),!function(t){return t===Bt(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 At(l.left,l.top,a,n)}var Lt="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Bt(t).SVGGraphicsElement}:function(t){return t instanceof Bt(t).SVGElement&&"function"==typeof t.getBBox};function Ft(t){return Ct?Lt(t)?function(t){var e=t.getBBox();return At(0,0,e.width,e.height)}(t):Nt(t):zt}function At(t,e,i,s){return{x:t,y:e,width:i,height:s}}var Ht=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=At(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=Ft(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}(),It=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),$t(n,{x:s,y:l,width:r,height:o,top:l,right:s+r,bottom:o+l,left:s}),n);$t(this,{target:t,contentRect:h})},Yt=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new kt,"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 Bt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Ht(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 Bt(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 It(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}(),Ot="undefined"!=typeof WeakMap?new WeakMap:new kt,jt=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=Pt.getInstance(),s=new Yt(e,i,this);Ot.set(this,s)};["observe","unobserve","disconnect"].forEach(function(t){jt.prototype[t]=function(){var e;return(e=Ot.get(this))[t].apply(e,arguments)}});var qt=void 0!==St.ResizeObserver?St.ResizeObserver:jt,Rt={mixins:[mt],inject:["provideView"],__file:"src/widgets/WidgetBase.vue"};const Wt=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)},Ut=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 Xt={mixins:[Rt],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:Wt.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:Ut.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:Ut.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.el("wScrollOverflow")&&(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 qt(this.scroll_observe_overflow).observe(this.el("wScrollOverflow")),this.el("wScrollCont")&&new qt(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"},Qt={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"},Gt={name:"w-horizontal",mixins:[Xt,Qt],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"},Jt={name:"w-vertical",mixins:[Gt],computed:{dir:()=>"v"},__file:"src/widgets/Vertical.vue"},Kt={name:"w-view",mixins:[Jt,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"},Zt={__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 te={},ee=!0,ie=!1,se={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"},le=["minWidth","maxWidth","minHeight","maxHeight"];var re={name:"w-dialog",mixins:[Kt],props:["title","autoHide","context","prong","independent","timeout","cover","coverProps","position","snap","indent","offsetRange","local","fullScreen","hoverShowDrop","visible",...le],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=>se[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(ie);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===ie?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())}),ee)),window.plus&&plus.key[i]("backbutton",this.bind("close"),ie),e){let t=e===ee?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(Zt,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||te).type,...this.scope_props}},html_class(){const t=this._pos||te,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}`]:se[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 le.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(ee),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 qt(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"},oe={__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"},ae={name:"w-alert",mixins:[re],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(oe,{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"},ne={__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"},he={name:"w-confirm",mixins:[re],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(ne,{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 ce={class:"w-tip-body"},ue={key:0,class:"w-tip-text"},de=["innerHTML"];var pe={__name:"TemplateTip",props:["text","escape"],setup:t=>(e,i)=>(r.openBlock(),r.createElementBlock("div",ce,[r.renderSlot(e.$slots,"text",{},()=>[t.escape?(r.openBlock(),r.createElementBlock("div",ue,r.toDisplayString(t.text),1)):(r.openBlock(),r.createElementBlock("div",{key:1,class:"w-tip-text",innerHTML:t.text},null,8,de))])])),__file:"src/template/TemplateTip.vue"};let me=null,fe={time:(new Date).getTime(),list:[]};var xe={name:"w-tip",mixins:[re],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(pe,{text:this.x.text,escape:this.x.escape},this.$slots)},setVisibleSub(t){if(t)for(let t of fe.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(){fe.time=(new Date).getTime(),me&<.close(me),me=this.uid,fe.list.push(this.uid)},unmounted(){me=null;let t=fe.list.indexOf(this.uid);t>-1&&fe.list.splice(t,1)},__file:"src/widgets/Tip.vue"},ge={name:"w-img",pubParentName:"w-album",mixins:[Rt],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(Jt,{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"},ve={pubParentName:"w-buttonbar",mixins:[Rt],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&&ke(this.pubParent)&&!ke(this)&&ye(),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:ye()},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(ge,{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(ge,{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(ge,{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"},we={name:"w-menubutton",mixins:[ve],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(ge,{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"},be={name:"w-button",mixins:[ve],props:["autoMenuButton"],methods:{x_default:()=>({showArrowIcon:!0,autoMenuButton:!0})},render(){return this.provideMenu_w&&this.x.autoMenuButton?r.h(we,this.$props,this.$slots):this.html()},__file:"src/widgets/Button.vue"};let _e=null;function ye(){_e&&(lt.close(_e),_e=null)}function ke(t){return _e&&(t.hasBubble(_e.context)||_e.hasBubble(t))}var Ce={name:"w-menu",mixins:[re],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(Jt,{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)&&(_e&&_e.context!==this.context&<.close(_e),_e=this)},__file:"src/widgets/Menu.vue"},Se={name:"w-loading",mixins:[re],props:["text","icon"],methods:{x_default:()=>({}),html_slots(){return r.h(ge,{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"},Ve={name:"w-table",mixins:[Rt],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 qt(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 qt(()=>{this.$el.setAttribute("w-compact-resize-sticky",""),requestAnimationFrame(()=>this.$el.removeAttribute("w-compact-resize-sticky"))}).observe(this.$el)},__file:"src/widgets/Table.vue"},Te={name:"w-columns",__file:"src/widgets/TableColumns.vue"},Me={name:"w-column",props:["width","minWidth"],__file:"src/widgets/TableColumn.vue"},Pe={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}}};Pe.__file="src/widgets/PubParent.vue";const $e={render:function(t,e){return r.renderSlot(t.$slots,"default")},__file:"src/widgets/SlotDefault.vue"};var Be={name:"w-thead",mixins:[Rt,Pe],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($e,{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"},ze={name:"w-tbody",mixins:[Be,Xt],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"},De={name:"w-tr",pubParentName:"w-tbody,w-thead",mixins:[Rt,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($e,{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"},Ee={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"},Ne={name:"w-th",mixins:[Ee,Rt],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(Gt,{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 Le={class:"'w-table-v2-th-text f-line-1"},Fe={class:"w-tree-loading w-table-v2-loading"},Ae=["onClick"],He=["onClick"],Ie=["title"],Ye={class:"'w-table-v2-td-text f-line-1"},Oe={name:"w-table-v2"};var je=Object.assign(Oe,{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",Le,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",Fe,[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,He)),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,Ie)],6)):r.renderSlot(e.$slots,t.field,{key:1,item:i,rowIndex:l,column:t,colIndex:s},()=>[r.createElementVNode("div",Ye,r.toDisplayString(i[t.field]),1)])],6))),128))],14,Ae))),128))],4))]),_:3},512)]),_:3},512)}}});je.__file="src/widgets/TableV2.vue";var qe={name:"w-grid",mixins:[Xt],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"},Re={name:"w-swiper-item",pubParentName:"w-swiper",inject:["providePubParent"],mixins:[Rt],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"},We={name:"w-swiper",mixins:[Rt,Pe],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"},Ue={name:"w-buttonbar",mixins:[Gt,Pe],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"},Xe={name:"w-tabbar",mixins:[Ue],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?Jt:Gt,{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(be,{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"},Qe={name:"w-tabbutton",pubParentName:"w-tabbar",mixins:[be],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"},Ge={name:"w-tabs",mixins:[Rt],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(Qe,i.props)),e.push(r.h(Re,{lazy:null==i.props.lazy||i.props.lazy,key:i.props.key},i.children))}),[r.h(Xe,{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(We,{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"},Je={name:"w-tab",__file:"src/widgets/Tab.vue"},Ke={name:"w-album",mixins:[Gt,Pe],methods:{x_default:()=>({gap:0,br:!0,valign:"top"})},computed:{html_class:()=>"w-horizontal"},__file:"src/widgets/Album.vue"},Ze={name:"w-html",mixins:[Rt,Qt],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"},ti={name:"w-tree",mixins:[Xt,Pe,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(ge,{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($e,{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 ei={class:"w-tree-loading w-tree-v2-loading"},ii=["onClick"],si=["onClick"],li={class:"w-leaf-text f-line-1"},ri=["title"],oi={name:"w-tree-v2"};var ai=Object.assign(oi,{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",ei,[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,si)),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",li,[r.renderSlot(t.$slots,"text",{item:e},()=>[r.createElementVNode("span",{title:e[r.unref(c)]},r.toDisplayString(e[r.unref(c)]),9,ri)])])],14,ii))),128))],4))]),_:3},512)}}});ai.__file="src/widgets/TreeV2.vue";var ni={name:"w-label",mixins:[Rt,Qt],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"},hi={mixins:[Rt,Qt],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()-fe.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(ni,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:ci,changeSymbol:ui}=lt.symbol;var di={name:"w-checkbox",pubParentName:"w-checkboxgroup",mixins:[hi],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(Gt,{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[ci]?this.data[ci].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:pi}=lt.symbol;var mi={name:"w-triplebox",mixins:[di],props:["all"],inject:["provideTripleboxContainer"],created(){if(this.provideBoxParent){if(this.data&&!this.data[pi]){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[pi])return!1;if(s[pi].indeterminate)return!0;lt.idsAny(i,s[pi].checkValue)?t=!0:e=!0}return!(!t||!e)}return!1});this.data[pi]={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[pi];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[pi].checkValue));return e=i?lt.idsRemove(e,t[pi].checkValue):lt.idsAdd(e,t[pi].checkValue),t[pi].parent&&(e=this.checkAncestor(t[pi].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[pi];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"},fi={name:"w-leaf",pubParentName:"w-tree",mixins:[Rt,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(ge,{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(ge,{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($e,{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"},xi={name:"w-pagebar",mixins:[Ue],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(be,{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(be,{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(be,{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(be,{text:t,onClick:e=>this.clickItem(e,t)}));t.push(r.h(Ce,{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"},gi={name:"w-split",mixins:[Rt],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"},vi={name:"w-toggle",mixins:[Rt,Qt],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(ge,{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"},wi={name:"w-video",mixins:[Rt],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"},bi={name:"w-progress",mixins:[Rt],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"},_i={name:"w-calendar",mixins:[Rt],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 yi=["innerHTML"],ki=["onClick"],Ci=["onClick"],Si={class:"w-calendar-body"},Vi={class:"w-calendar-daytitle"},Ti=["title","onClick"],Mi={class:"w-calendar-item-text"},Pi={class:"w-calendar-time-th"},$i={class:"w-calendar-time-th"},Bi={class:"w-calendar-time-th"};_i.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,yi),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,ki))),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,Ci))),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",Si,["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",Vi,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",Mi,r.toDisplayString(e.text),1)])],10,Ti))),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",Pi,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",$i,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",Bi,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"])},_i.__file="src/widgets/Calendar.vue";var zi={name:"w-timeline",mixins:[Xt,Pe],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"},Di={name:"w-timeline-item",pubParentName:"w-timeline",mixins:[Rt],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"},Ei={name:"w-slidepicker",mixins:[Rt],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 qt(()=>{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 Ni={ref:"options",class:"w-slidepicker-options"},Li={key:0,class:"w-slidepicker-bg-top"},Fi={key:1,class:"w-slidepicker-bg-bottom"};Ei.render=function(t,e,i,s,l,o){return r.openBlock(),r.createElementBlock("div",r.mergeProps({ref:"root"},t.html_binds),[r.createElementVNode("div",Ni,[r.renderSlot(t.$slots,"default")],512),t.x.cover?(r.openBlock(),r.createElementBlock("div",Li)):r.createCommentVNode("v-if",!0),t.x.cover?(r.openBlock(),r.createElementBlock("div",Fi)):r.createCommentVNode("v-if",!0)],16)},Ei.__file="src/widgets/SlidePicker.vue";var Ai={name:"w-hidden",mixins:[hi],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"},Hi={name:"w-text",mixins:[hi],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(re,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"},Ii={name:"w-textarea",mixins:[Hi],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"},Yi={name:"w-checkboxgroup",mixins:[hi],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"},Oi={name:"w-radiogroup",mixins:[Yi],__file:"src/widgets/RadioGroup.vue"},ji={name:"w-radio",pubParentName:"w-radiogroup",mixins:[di],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"},qi={name:"w-switch",pubParentName:"w-checkboxgroup",mixins:[hi],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 Ri={".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 Wi={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"},Ui={};for(let t in Wi)Wi[t].split(".").forEach(e=>{Ui[e]="0"==t?e:t});const Xi={video:Wi.vid,audio:Wi.aud,image:Wi.img};for(let t in Xi)Xi[t]=Xi[t].split(".").map(t=>`*.${t};`).join("");const Qi=function(t){let e=lt.strFrom(t||"",".",!0).toLowerCase();return Ui[e]||"file"},Gi=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 Ji={name:"w-fileupload",mixins:[hi],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 Xi[t]&&(t=Xi[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 Ri["."+e]}(e)||e)}),t.join(",")},isImage:t=>"img"==Qi(t.value?t.value.name:t.file.name),isVideo:t=>"vid"==Qi(t.value?t.value.name:t.file.name),isAudio:t=>"aud"==Qi(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&&Gi(this.x.maxFileSize),o=this.x.minFileSize&&Gi(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(Ce,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:t.value||t.file})),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-"+Qi(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(Ue,{ref:"uploadbbr",class:"w-fileupload-bbr",gap:10},{default:()=>[this.$slots.button?this.$slots.button(this):r.h(be,{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"},Ki={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 Zi={class:"f-line-1"},ts={key:0,ref:"loading",width:"34",height:"34",class:"w-mediaupload-progress-loading f-abs-center"},es={key:1,class:"w-mediaupload-cover-play f-abs-center f-flex-center f-i f-i-play"},is={class:"w-mediaupload-value-oper"},ss=["title"],ls=["title"];Ki.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",ts,null,512)):o.canPlay?(r.openBlock(),r.createElementBlock("i",es)):r.createCommentVNode("v-if",!0),r.createElementVNode("div",is,[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,ss)):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,ls)]),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",Zi,r.toDisplayString(o.name),1)]),key:"0"}:void 0]),1032,["class","src","data-url","width","img-width","img-height","tip","onClick"])},Ki.__file="src/widgets/MediaUploadItem.vue";var rs={name:"w-mediaupload",mixins:[Ji],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(Ki,{item:t,index:e,key:i})})},html_input_button(){return r.h("div",{},[r.h(Ue,{ref:"uploadbbr",class:"w-fileupload-bbr"},{default:()=>[this.$slots.button?this.$slots.button(this):r.h(be,{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(Gt,{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"},os={name:"w-imageupload",mixins:[rs],methods:{x_default:()=>({fileTypes:"image",thumbnailWidth:80,thumbnailHeight:80,gap:10})},computed:{html_class:()=>"w-mediaupload"},__file:"src/widgets/ImageUpload.vue"},as={name:"w-option",mixins:[Rt],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 ns=["disabled","title"],hs={class:"f-flex-1 f-line-1"};as.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",hs,[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,ns)},as.__file="src/widgets/Option.vue";var cs={name:"w-spinner",mixins:[Hi],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"},us={name:"w-datepicker",mixins:[Hi],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(re,e,{default:()=>r.h(_i,{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"},ds={name:"w-dropbox",mixins:[hi],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(re,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"},ps={name:"w-pickbox",mixins:[ds],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"},ms={name:"w-password",mixins:[Hi],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"},fs={name:"w-range",mixins:[hi],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"},xs={name:"w-combobox",mixins:[hi],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&&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(re,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 qt(()=>{this.$refs.sensor&&(this.sensor_width=this.$refs.sensor.offsetWidth+"px")}).observe(this.$refs.sensor)},__file:"src/widgets/ComboBox.vue"},gs={name:"w-linkbox",mixins:[hi],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(re,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"},vs={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 ws=["src"],bs=["src","width"];vs.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,ws),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,bs),r.createElementVNode("span",{onClick:e[2]||(e[2]=(...t)=>o.refresh&&o.refresh(...t)),class:"w-jigsaw-refresh"},"刷新")]),_:1},8,["width","height","context"])},vs.__file="src/template/TemplateJigsaw.vue";const _s=lt.loc.form.jigsaw_drag_right;var ys={name:"w-jigsaw",mixins:[hi],emits:["drop","click:refresh"],props:["big","small","dropWidth"],data:()=>({hasBorder:!0,text:_s,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=_s,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(vs,{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"},ks={name:"w-form",mixins:[hi],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"},Cs={name:"w-formgroup",mixins:[hi],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"},Ss={name:"w-rate",mixins:[hi],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(ge,{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 Vs(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}Ss.__file="src/widgets/Rate.vue";var Ts={name:"w-slider",mixins:[hi],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=Vs(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=Vs(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 Ms=[yt,Kt,re,ae,he,xe,Ce,Se,qe,Jt,Gt,Ve,Te,Me,ze,Be,De,Ee,Ne,je,We,Re,Ge,Je,Ke,ge,Ue,be,we,Ze,ti,fi,ai,xi,gi,vi,wi,bi,_i,zi,Di,Ei,ni,Ai,Hi,Ii,Yi,di,Oi,ji,mi,qi,Ji,rs,os,as,cs,us,ds,ps,ms,fs,xs,gs,ys,ks,Cs,Ss,Ts],Ps={};lt.WIDGET=Ps,lt.install=t=>{Ms.forEach(e=>{t.component(e.name,e),Ps[e.name]=e}),t.use(dt)},module.exports=lt;
|
|
1
|
+
"use strict";var vi=Object.defineProperty;var bi=(t,e,i)=>e in t?vi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var de=(t,e,i)=>bi(t,typeof e!="symbol"?e+"":e,i);const lt=require("lodash"),Le=require("jquery"),qt=require("axios"),yi=require("qs"),s=require("vue"),et=navigator.userAgent.toLowerCase(),ie=et.match(/\bchrome\/(\d+)/),pe=et.match(/\bfirefox\/(\d+)/),D={agent:et,chrome:ie&&parseFloat(ie[1]),firefox:pe&&parseFloat(pe[1]),safari:!ie&&et.indexOf("safari")>0,ie:(navigator.appName==="Microsoft Internet Explorer"||et.indexOf("trident")>0)&&document.documentMode,compat:{gap:!1}};if(et.match(/\bmobile\b/)){D.mobile=!0,D.app=location.protocol==="file:";const t=et.match(/(MicroMessenger)\/([\d\.]+)/i);t&&(D.wechat={version:t[2].replace(/_/g,".")});const e=et.match(/(Android);?[\s\/]+([\d.]+)?/i);e&&(D.android=!0,D.version=e[2],D.isBadAndroid=!/Chrome\/\d/.test(window.navigator.appVersion));const i=et.match(/(iPhone\sOS)\s([\d_]+)/i);if(i)D.ios=D.iphone=!0,D.version=i[2].replace(/_/g,".");else{const l=et.match(/(iPad).*OS\s([\d_]+)/i);l&&(D.ios=D.ipad=!0,D.version=l[2].replace(/_/g,"."))}}(D.chrome&&D.chrome<84||D.firefox&&D.firefox<63)&&(D.compat.gap=!0);let _i=0;const fe="uid",me=()=>(_i++).toString(36)+":";function wt(t){return t?t[fe]||(t[fe]=me()):me()}const ki={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}
|
|
2
|
+
view path: {1}`,no_combo:`选项列表(或树)没有设置combo参数
|
|
3
|
+
name: {0}`,error_template_type:`{0}
|
|
4
|
+
请把此模板类型改为 "{1}"`,error_type:`type错误或丢失
|
|
5
|
+
{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){return t&&(t=t.replace(/\{(\d+)([^\d]+)?\}/g,function(i,l,r){let o=e[parseFloat(l)];return o==null||o===""?"":r?o+r:o})),t},end:"结束"},Ci=t=>String(t).replace(/^\s+|\s+$/g,""),ct=t=>t==null?"":""+t,ft=(t,e,i)=>{const l=i?t.lastIndexOf(e):t.indexOf(e);return l<0?"":t.substr(l+e.length)},Xt=(t,e,i)=>{const l=i?t.lastIndexOf(e):t.indexOf(e);return l<0?"":t.substr(0,l)},Fe=(t,e)=>{if(!t)return 0;e||(e=n.x.cnBytes||2);let i=0;for(let l=0,r=t.length;l<r;l++)i+=t.charCodeAt(l)>128?e:1;return i},Si=(t,e,i)=>{const l=Fe(t,i);return i||(i=n.x.cnBytes||2),Math.ceil((l-e)/i)},ht=function(t,e,i){if(i=i==null?"0":i+"",!e)return t<10?i+t:t;for(t=t+"";t.length<e;)t=i+t;return t},$i=(t,e,i,l)=>(t!=null&&(t+=""),!t||!e?t:Array.isArray(e)?t.replace(/\$\{?(\d+)\}?/g,function(r,o){return e[o]==null?l?r:"":i?encodeURIComponent(e[o]):e[o]}):t.replace(/\$\{?([a-z_][\w.]*)\}?/gi,function(r,o){const a=lt.get(e,o);return a==null?l?r:"":i?encodeURIComponent(a):a})),Vi=function(t){return t!=null?(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\"/g,"""):""},Ti=function(t,e,i,l){return(t=t+"").replace(RegExp(`(<[\\/!]?\\w+(?::\\w+)?\\s*(?:[-\\w]+(?:=('|")?.*?\\2)?\\s*)*>)|(`+Mi(e,i).join("|")+")","ig"),function(r,o,a,h){return h===void 0?o:'<em class="'+(l||"f-keyword")+'">'+h+"</em>"})},ge=function(t){return t.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},Mi=function(t,e,i){const l=[ge(t)],r=t.length;if(e&&e>0&&r>e)for(let o=r-1;o>=e;o--)for(let a=0,h=r-o,u;a<=h;a++)u=t.substr(a,o),l.push(ge(u));return l},xe="object",Pi="string",ut=null,ot=void 0,O=t=>{const e=typeof t=="string"?parseFloat(t.replace(/[^\d\.-]|\b-/g,"")):+t;return isNaN(e)?0:e},Ot=t=>t!=null&&!isNaN(t),zi=function(t,e,i){return t==null?e||e===0?e:i||i===0?i:t:(e||e===0)&&t<e?e:(i||i===0)&&t>i?i:t},Di=function(...t){let e=0,i=0;return t.forEach(l=>{e=Math.max(e,ft(l+"",".").length),i+=l}),e=Math.pow(10,e),Math.round(i*e)/e},Bi=function(t,e,i,l){t=String(t),e==null&&(e=3),i==null&&(i=",");const r=t.replace(/[^.\d]/g,"").split("."),o=r[0],a=o.length;let h=l?0:a,u="";const c=t.charAt(0)==="-"?"-":"";if(l)do h+=e,u+=h<a?o.substr(h-e,e)+i:o.substr(h-e);while(h<a);else do h-=e,u=(h>0?i+o.substr(h,e):o.substr(0,e+h))+u;while(h>0);return c+u+(r.length>1?"."+ft(t,".").replace(RegExp("[."+i+"]","g"),""):"")},Ei=function(t,e){if(e){if(e<0)return parseFloat(String(O(t)));{const i=ft(""+t,".");return i?Xt(""+t,".")+"."+i.slice(0,e):t}}else return parseInt(String(O(t)))},At=function(t,e){return e!=ut&&(e.min&&!isNaN(e.min)&&(t=Math.max(t,e.min)),e.max&&!isNaN(e.max)&&(t=Math.min(t,e.max))),t},Ni=function(t,e,i){for(var l=0,r=t,o=e.length,a=0,h,u,c,p=0,f=Array(o);a<o;a++)c=typeof e[a]===xe?e[a].value:e[a],c!=ut&&isNaN(c)?t==ut?f[a]=ut:c==="*"?(u=a,p++):h=a:l+=f[a]=c==ut||c<0?ut:+c;if(t==ut)return f;if(h!==ot){t=Math.max(0,t-l);var m=0;for(a=l=0;a<=h;a++)c=typeof e[a]===xe?e[a].value:e[a],f[a]===ot&&typeof c===Pi&&c.indexOf("%")>0&&(m+=c=parseFloat(c),l+=f[a]=At(Math.floor(r*c/100),e[a]));u===ot&&m>=100&&(f[h]=At(Math.max(0,f[h]+r-l),e[a]))}if(u!==ot){for(t=Math.max(0,t-l),a=l=0;a<=u;a++)f[a]===ot&&(l+=f[a]=At(Math.floor(t/p),e[a]));f[u]=At(Math.max(0,f[u]+t-l),e[u])}if(i&&h===ot&&u===ot){for(a=0,o=f.length,l=0,p=0;a<o;a++)Ot(f[a])&&(l+=f[a],p++);if(l<r){var v=Math.floor((r-l)/p);for(a=0;a<o;a++)Ot(f[a])&&(f[a]+=v);for(a=o;a>=0;a--)if(Ot(f[a])){f[a]+=r-l-v*p;break}}}return f},Dt=864e5,He="yyyy-MM-dd HH:mm:ss",Li={0:"Q1",1:"Q1",2:"Q1",3:"Q2",4:"Q2",5:"Q2",6:"Q3",7:"Q3",8:"Q3",9:"Q4",10:"Q4",11:"Q4"},Ae=function(t,e){typeof t=="string"&&(t=Bt(t,e));const i={y:t.getFullYear(),m:t.getMonth(),d:t.getDate(),h:t.getHours(),i:t.getMinutes(),s:t.getSeconds()};let l=(e||He).replace("yyyy",i.y).replace("MM",ht(i.m+1)).replace("dd",ht(i.d)).replace("HH",ht(i.h)).replace("mm",ht(i.i)).replace("ss",ht(i.s)).replace("M",i.m+1).replace("d",i.d).replace("H",i.h).replace("m",i.i).replace("s",i.s);if(l.indexOf("w")>-1){const r=vt(t);l=l.replace("ww",ht(r[1])).replace("w",String(r[1]))}if(l.indexOf("q")>-1){const r=Li[i.m];l=l.replace("qq",r).replace("q",r)}return l},Bt=function(t,e){t=(""+t).replace(/\b(\d)\b/g,"0$1"),e=(e||He).replace(/\b([MdHmsw])\b/g,"$1$1");let i;const l=(i=e.indexOf("yyyy"))>-1?O(t.substr(i,4))||new Date().getFullYear():new Date().getFullYear(),r=(i=e.indexOf("MM"))>-1?Math.max(O(t.substr(i,2))-1,0):0,o=(i=e.indexOf("dd"))>-1&&O(t.substr(i,2))||1,a=(i=e.indexOf("HH"))>-1?O(t.substr(i,2)):0,h=(i=e.indexOf("mm"))>-1?O(t.substr(i,2)):0,u=(i=e.indexOf("ss"))>-1?O(t.substr(i,2)):0;if((i=e.indexOf("qq"))>-1){const c=t.substr(i,2),p=c==="Q1"?0:c==="Q2"?3:c==="Q3"?6:9;return new Date(l,p,1)}if((i=e.indexOf("ww"))>-1){const c=O(t.substr(i,2));let p=vt(new Date(l,0,1));return p[0]!=l&&(p=vt(new Date(l,0,8))),new Date(p[2].getTime()+(c-1)*7*Dt)}return new Date(l,r,o,a,h,u)},Rt=function(t,e,i){i=O(i);let l=new Date(t.getTime());return e==="y"?l.setFullYear(t.getFullYear()+i):e==="M"?l.setMonth(l.getMonth()+i):e==="d"?l.setDate(l.getDate()+i):e==="H"?l.setHours(l.getHours()+i):e==="m"?l.setMinutes(l.getMinutes()+i):e==="s"&&l.setSeconds(l.getSeconds()+i),(e==="y"||e==="M")&&l.getDate()!=t.getDate()&&(l=new Date(l.getTime()-l.getDate()*Dt)),l},vt=function(t){const e=n.x.weekPoint!=null?n.x.weekPoint:1,i=n.x.weekStart!=null?n.x.weekStart:1,l=t.getDay()||7,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()-l+e),o=Math.ceil((r.getTime()-new Date(r.getFullYear(),0,0).getTime())/Dt),a=new Date(t.getFullYear(),t.getMonth(),t.getDate()-l+i);return[r.getFullYear(),Math.floor((o+6)/7),a,new Date(a.getTime()+7*Dt-1)]},Fi=function(t){let e=n.dateWeek(new Date(t,0,1));return e[0]!=t&&(e=n.dateWeek(new Date(t,0,8))),e},Hi=function(t){let e=vt(new Date(t,11,31));return e[0]!==t&&(e=vt(new Date(t,11,24))),e},Ai=function(t,e){t=(""+t).replace(/\b(\d)\b/g,"0$1");const i=Bt(t,e),l=i.getFullYear();return l>=1e3&&l<=9999&&t==Ae(i,e)},Ie=function(t,e=new Date,i){switch(typeof t=="string"&&(t=Bt(t)),typeof e=="string"&&(e=Bt(e)),i){case"y":{let l=e.getFullYear()-t.getFullYear();return Rt(t,i,l)>e&&l--,l}case"M":{const l=Ie(t,e,"y"),r=Rt(t,"y",l);let o=r.getFullYear()<e.getFullYear()?e.getMonth()+11-r.getMonth():e.getMonth()-r.getMonth();return Rt(t,i,o)>e&&o--,o+l*12}case"H":return Math.floor((e.getTime()-t.getTime())/(60*60*1e3));case"m":return Math.floor((e.getTime()-t.getTime())/(60*1e3));case"s":return Math.floor((e.getTime()-t.getTime())/1e3);default:return Math.floor((e.getTime()-t.getTime())/Dt)}},Ii=function(...t){return n.docView.dateSheet(...t)},gt=Range;window.Range&&!gt.prototype.movePoint&&(gt.prototype.__defineGetter__&&(gt.prototype.__defineGetter__("text",function(){return this.toString()}),gt.prototype.__defineSetter__("text",function(t){this.deleteContents(),this.insertNode(document.createTextNode(t))})),gt.prototype.movePoint=function(t,e){var i=this.startContainer.firstChild||this.startContainer,l,r=t,a=0;e=e??t;do this.selectNodeContents(i),a=this.toString().length,r-=a;while(r>0&&(i=i.nextSibling));i=l=this.startContainer,r+=a;var o=e-t+r,a=0;do this.selectNodeContents(l),a=this.toString().length,o-=a;while(o>0&&(l=l.nextSibling));if(this.setStart(i.firstChild||i,r),l){for(var h=l;h.firstChild;)h=h.firstChild;this.setEnd(h,a+o)}},gt.prototype.select=function(){const t=window.getSelection();t.removeAllRanges(),t.addRange(this)});const Qt=function(){const t=window.getSelection();return t.rangeCount&&t.getRangeAt(0)},Yi=function(){const t=Qt();return t&&t.startContainer.parentNode},Oi=function(t,e){let i=t;if(window.getSelection)if(typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number")t.selectionStart=t.selectionEnd=e??t.value.length;else{const l=window.getSelection();t.nodeType===1&&(i=document.createRange()).selectNodeContents(t),e!=null&&i.movePoint(e),l.removeAllRanges(),l.addRange(i),l.collapseToEnd()}return i},Ri=function(){const t=Qt(),e=t.startOffset;if(e!=null)return e;const i=document.body.createTextRange();return i.selectNodeContents(t.startContainer.parentNode),i.setEndPoint("EndToStart",t),Ye(i).length},Ye=function(t,e){return t==null&&(t=Qt()),e!=null&&(t.deleteContents?(t.deleteContents(),t.insertNode(document.createTextNode(e))):t.text=e),t.text===void 0?t.toString():t.text},ji=["afterend","afterbegin","beforebegin","beforeend"],qi=["after","prepend","before","append"],Wi=function(t){let e=document.createElement("div");t&&(e.innerHTML=t);try{return e}catch{return!1}finally{e=null}},Ui=function(t){let e=typeof t=="string"?Wi(t):t,i=document.createDocumentFragment();for(;e.firstChild;)i.appendChild(e.firstChild);try{return i}catch{return!1}finally{e=i=null}},Xi=function(t){if(t){const e=t.$el;return e?e.nodeType===1?e:e.nextElementSibling:t.isWidget?t.el():t}},dt=function(t,e,i){if(i==null){if(e==null)return t.innerHTML;try{t.innerHTML=e}catch{for(;t.firstChild;)t.removeChild(t.firstChild);dt(t,e,3)}}else if(typeof e=="string")try{t.nodeType===3?Le(t)[qi[i]](e):t.insertAdjacentHTML(ji[i],e)}catch{dt(t,Ui(e),i)}else{let l=i%2?t:t.parentNode;l&&l.insertBefore(e,i===0?t.nextSibling:i===1?t.firstChild:i===2?t:null)}},Oe=function(t,e){return dt(t,e,3),t.lastElementChild||t.lastChild},Qi=function(t,e){return dt(t,e,1),t.firstElementChild||t.firstChild},Re=function(t,e){return dt(t,e,2),t.previousElementSibling||t.previousSibling},Gi=function(t,e){return dt(t,e,0),t.nextElementSibling||t.nextSibling},Ji=function(t,e){let i=t.nextSibling;if(i)return t.parentNode.removeChild(t),Re(i,e);{let l=t.parentNode;return l.removeChild(t),Oe(l,e)}},we=function(){const t={float:"cssFloat"};return function(e){return t[e]||e.replace(/-./g,function(i){return i.charAt(1).toUpperCase()})}}(),ve=function(t,e,i){if(typeof i=="string"&&i.charAt(1)==="="){e=we(e);let l=t.style[e]||getComputedStyle(t,null)[e];i=O(i.replace("=","")),e==="width"||e==="height"?(l=O(l&&l!=="auto"?l:e.charAt(0)==="w"?t.offsetWidth:t.offsetHeight),l<0&&(l=0)):l=O(l),t.style[e]=l+i+(e==="zIndex"?0:"px")}else e=we(e),(e==="width"||e==="height")&&i&&i!=="auto"&&(i=Math.max(O(i),0)),i&&!isNaN(i)&&e!=="zIndex"&&(i+="px"),t.style[e]=i;return t},Ki=function(t,e,i){if(!t||!e)return null;{if(typeof e=="string")if(e.indexOf(":")>0)for(let l=0,r=e.split(";"),o=r.length,a,h;l<o;l++)(a=Xt(r[l],":"))&&(h=ft(r[l],":"))&&ve(t,a,h);else return t.style[e]||getComputedStyle(t,null)[e];for(const l in e)ve(t,l,e[l])}},q=!0,je=null,qe=document,U=document.documentElement,se=t=>t.split(","),le={h:se("21,12,34,43"),v:se("41,14,32,23"),a:se("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"]},at=function(){var o=[23,22,33,32,21,34,"rr","rl"],i=[14,23,34,43,33,44,"bb","tb"],t,e={pix:{r:{},b:{}},mag:{l:{},r:{},t:{},b:{}},inner:{}};for(t=o.length;t--;)e.pix.r[o[t]]=q;for(t=i.length;t--;)e.pix.b[i[t]]=q;var o=[21,34,22,33,"rr","rl"],i=[41,32,44,33,"bt","bb"],l=[12,43,11,44,"lr","ll"],r=[14,23,11,22,"tb","tt"];for(t=o.length;t--;)e.mag.r[o[t]]=q;for(t=i.length;t--;)e.mag.b[i[t]]=q;for(t=l.length;t--;)e.mag.l[l[t]]=q;for(t=r.length;t--;)e.mag.t[r[t]]=q;var o=[11,22,33,44,"tt","bb","ll","rr"];for(t=o.length;t--;)e.inner[o[t]]=q;return e}(),Zi=function(t){var e=Tt(t);return e.right=U.clientWidth-e.right,e.bottom=U.clientHeight-e.bottom,e},ts=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},Tt=function(t){var e=U.clientLeft,i=U.scrollLeft,l=U.clientTop,r=U.scrollTop,o=t&&t!=qe&&(t.isWidget?t.el():t),a=o&&o.getBoundingClientRect();return a?{left:a.left-e+i,top:a.top-l+r,right:a.right-e+i,bottom:a.bottom-l+r,width:a.width,height:a.height}:t==document?{left:i,top:r,right:U.clientWidth+i,bottom:U.clientHeight+r,width:U.clientWidth,height:U.clientHeight}:je},es=function(t,e,i,l,r,o,a){i?i.nodeType?i=Tt(i):i.isWidget?i=Tt(i.el()):(i.originalEvent||i.clientX!=je)&&(i=i.originalEvent||i,i={left:i.clientX,right:i.clientX,top:i.clientY,bottom:i.clientY}):i=Tt(qe);var h=[],u=[],c,p,f=-1,m=U.clientWidth,v=U.clientHeight,x=l?le[l]||(""+l).split(","):le.a;if(/[1-4]/.test(x[0]))for(var _=0,k,M,V,L=0;_<x.length;_++)if(c=+x[_].charAt(0),p=+x[_].charAt(1),h.push((c===1||c===2?i.top:i.bottom)-(p===3||p===4?e:0)),u.push((c===1||c===4?i.left:i.right)-(p===2||p===3?t:0)),k=h[_]>=0&&h[_]+e<=v,M=u[_]+t<=m&&u[_]>=0,k&&M){f=_;break}else{var P=h[_]<0?-h[_]:0,B=u[_]+t>m?u[_]+t-m:0,F=h[_]+e>v?h[_]+e-v:0,I=u[_]<0?-u[_]:0;V=x[_]==="14"||x[_]==="34"?(t-B)*(e-P):x[_]==="23"||x[_]==="43"?(t-I)*(e-P):x[_]==="32"||x[_]==="12"?(t-I)*(e-F):(t-B)*(e-F),(!L||L<V)&&(L=V,f=_)}else for(var _=0,k,M,V,L=0;_<x.length;_++)if(c=x[_].charAt(0),p=x[_].charAt(1),h.push((c==="r"||c==="l"||c==="c"?(i.top+i.bottom)/2:c==="t"?i.top:i.bottom)-(p==="r"||p==="l"||p==="c"?e/2:p==="b"?e:0)),u.push((c==="t"||c==="b"||c==="c"?(i.left+i.right)/2:c==="r"?i.right:i.left)-(p==="t"||p==="b"||p==="c"?t/2:p==="r"?t:0)),k=h[_]>=0&&h[_]+e<=v,M=u[_]+t<=m&&u[_]>=0,k&&M){f=_;break}else(k||M)&&(l?(V=l==le.v?c==1||c==2?-h[_]:h[_]+e-v:c==1||c==4?-u[_]:u[_]+t-m,(!L||L>V)&&(L=V,f=_)):f<0&&(f=_));f<0&&(f=0);var E=x[f],b={left:u[f],top:h[f],bottom:v-(h[f]+e),right:m-(u[f]+t),type:E};if(at.pix.r[E]&&(b.pix_r=q),at.pix.b[E]&&(b.pix_b=q),at.mag.r[E]&&(b.mag_r=q,b.mag="r"),at.mag.b[E]&&(b.mag_b=q,b.mag="b"),at.mag.l[E]&&(b.mag_l=q,b.mag="l"),at.mag.t[E]&&(b.mag_t=q,b.mag="t"),at.inner[E]&&(b.inner=q),o&&b.mag){var S=o.indent||O(o);S&&(S=S/(window.devicePixelRatio||1),b.inner?b.mag_t?(b.top-=S,b.bottom+=S):b.mag_b?(b.top+=S,b.bottom-=S):b.mag_r?(b.left+=S,b.right-=S):(b.left-=S,b.right+=S):b.mag_t?(b.top+=S,b.bottom-=S):b.mag_b?(b.top-=S,b.bottom+=S):b.mag_r?(b.left-=S,b.right+=S):(b.left+=S,b.right-=S)),o.top&&(b.top-=o.top),o.bottom&&(b.bottom-=o.bottom),o.left&&(b.left-=o.left),o.right&&(b.right-=o.right)}if(r){var H=b.left,N=b.right,T=b.bottom,z=b.top;(b.mag_t||b.mag_b)&&(b.pix_r?(N=Math.max(0,H<0?N+H:N),H+=b.right-N):(H=Math.max(0,N<0?N+H:H),N+=b.left-H)),(b.mag_l||b.mag_r)&&(b.pix_b?(T=Math.max(0,z<0?T+z:T),z+=b.bottom-T):(z=Math.max(0,T<0?T+z:z),T+=b.top-z)),b.left=H,b.right=N,b.top=z,b.bottom=T}if(l==="cc"&&b.top<0&&(b.top=0),a){var R=Zi(a);b.top-=R.top,b.left-=R.left,b.right-=R.right,b.bottom-=R.bottom}return b.width=t,b.height=e,b.target=i,console.log("snap",b),b},is=function(t,e){var i=e.type;i?(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="")):Ki(t,e)},ss=function(t,e,...i){for(var l=2,r=arguments.length-1;l<r;l++)e=e[arguments[l]]||(e[arguments[l]]={});return(e[arguments[r]]||(e[arguments[r]]=[])).push(t),e[arguments[r]]},Mt={},be=function(t){t.fn&&(lt.pull(Mt[t.id][t.type],t),t.type=t.fn=t.args=null)},We=function(t){return t.indexOf(".")>-1?Xt(t,"."):t},Ue=function(t){return t.indexOf(".")>-1?"."+ft(t,".").split(".").sort().join(".")+".":""},ne=function(t,e){var i=Mt[wt(t)];if(i){var l=We(e),r=Ue(e);if(l)return i[l]&&(r?i[l].filter(a=>a.ns.indexOf(r)>-1):i[l]);var o=[];for(l in i)o.push.apply(o,i[l].filter(a=>a.ns.indexOf(r)>-1));return o}};class ls{constructor(e){de(this,"ctx");this.ctx=e}hasEvent(e){const i=ne(this.ctx,e);return i&&i.length}addEvent(e,i,l){const r={id:wt(this.ctx),type:We(e),ns:Ue(e),fn:i,one:l};return ss(r,Mt,r.id,r.type).ori=!0,this}addEventOnce(e,i){return this.addEvent(e,i,!0)}fireEvent(e,i){var l=ne(this.ctx,e.type||e);if(l){for(var r=0,o,a=l.length,h;r<a;r++)if((o=l[r])&&o.fn&&(h=o.fn.apply(this.ctx,i?[e].concat(i):[e]),o.one&&(be(o),l.ori&&(r--,a--)),h!==void 0))return h}return this}removeEvent(e,i){if(e){var l=ne(this.ctx,e);if(l)for(var r=l.length;r--;)(!i||l[r].fn===i)&&be(l[r])}else{var o=Mt[wt(this.ctx)];for(const a in o)this.removeEvent(a);delete Mt[wt(this.ctx)]}return this}}const ns=function(t){return t.targetTouches?t.targetTouches[0].clientX:t.clientX},rs=function(t){return t.targetTouches?t.targetTouches[0].clientY:t.clientY},os=function(t,e,i){let l,r,o=i==null,a=document.documentElement,h=p=>p.targetTouches?p.targetTouches[0].clientX:p.clientX,u=p=>p.targetTouches?p.targetTouches[0].clientY:p.clientY,c=p=>p.preventDefault();i.currentTarget&&(i.currentTarget.style.userSelect="none"),a.addEventListener(D.mobile?"touchmove":"mousemove",l=function(p){o?t(p):i&&(Math.abs(h(p)-h(i))>1||Math.abs(u(p)-u(i))>1)&&(o=!0)},!0),a.addEventListener(D.mobile?"touchend":"mouseup",r=function(p){a.removeEventListener(D.mobile?"touchmove":"mousemove",l,!0),a.removeEventListener(D.mobile?"touchend":"mouseup",r,!0),i.currentTarget&&(i.currentTarget.style.userSelect=""),D.mobile&&a.removeEventListener("touchmove",c,{passive:!1}),e&&e(p,o)},!0),D.mobile&&a.addEventListener("touchmove",c,{passive:!1})},n=function(t){if(!t||t.isWidget)return t;if(typeof t=="string"||t.uid)return n.vueMap.get(t.uid||t);if(t instanceof Event&&(t=t.currentTarget||t.target),t.$el){if(t.$attrs.orientUid)return n.vueMap.get(t.$attrs.orientUid);const e=t.$el;if(e.nodeType===8&&t.$.subTree.component.data.uid)return n.vueMap.get(t.$.subTree.component.data.uid);t=e.nodeType!=1?t.$el.nextElementSibling:t.$el}if(lt.isElement(t))do if(t.id){if(n.vueMap.has(t.id))return n.vueMap.get(t.id);let e=n.strTo(t.id,":")+":";if(n.vueMap.has(e))return n.vueMap.get(e)}while(t=t.parentNode);for(;t&&!t.isWidget;)t=t.$parent;return t||n.docView};Object.assign(n,{x:{defaultOptions:{}},vueMap:new Map,dfclsCache:{},q:Le,lodash:lt,http:qt,br:D,loc:ki,uid:wt,EventListener:ls,eventX:ns,eventY:rs,number:O,isNumber:Ot,numRange:zi,numAdd:Di,numFormat:Bi,numDecimal:Ei,numScale:Ni,string:ct,strTrim:Ci,strEscape:Vi,strFrom:ft,strTo:Xt,strPad:ht,strLen:Fe,strExceed:Si,strFormat:$i,strHighlight:Ti,dateFormat:Ae,dateParse:Bt,dateAdd:Rt,dateValid:Ai,dateDiff:Ie,dateSheet:Ii,dateWeek:vt,dateWeekFirst:Fi,dateWeekLast:Hi,rngSelection:Qt,rngElement:Yi,rngCursor:Oi,rngCursorOffset:Ri,rngText:Ye,el:Xi,html:dt,append:Oe,prepend:Qi,before:Re,after:Gi,replaceWith:Ji,moveup:os,bcr:Tt,offset:ts,snap:es,snapTo:is});n.extend=function(t,...e){return e.forEach(i=>{if(i)for(let l in i)!(l in t)&&i[l]!==void 0&&(t[l]=i[l])}),t};n.extendDeep=function(t,...e){return e.forEach(i=>{if(i!=null&&typeof i=="object"&&"constructor"in i&&i.constructor===Object)for(let l in i)l in t?t[l]!=null&&typeof t[l]=="object"&&"constructor"in t[l]&&t[l].constructor===Object&&n.extendDeep(t[l],i[l]):i[l]!=null&&typeof i[l]=="object"&&"constructor"in i[l]&&i[l].constructor===Object?n.extendDeep(t[l]={},i[l]):t[l]=i[l]}),t};n.merge=function(t,...e){return e.forEach(i=>{if(i)for(let l in i)t[l]=i[l]}),t};n.mergeDeep=function(t,...e){return e.forEach(i=>{if(i!=null)for(let l in i)typeof t[l]=="object"?n.mergeDeep(t[l],i[l]):t[l]=i[l]}),t};n.cloneDeep=lt.cloneDeep;n.eval=function(t,e){if(e){let i=Object.keys(e);return Function(...i,`return (${t})`)(...i.map(l=>e[l]))}return Function(`return (${t})`)()};n.string=function(t){return t==null?"":typeof t=="object"?JSON.stringify(t):""+t};n.array=function(t){return Array.isArray(t)?t:t==null||t===""?[]:[t]};n.arrayID=function(t){return Array.isArray(t)?t:t==null||t===""?[]:typeof t=="string"?t.split(","):[t]};n.arrayNumber=function(t){return n.array(t).map(e=>parseFloat(e))};const as=(t,e)=>t/e*100+"vw";n.unitSize=function(t,e){return t==null||t===""||t==="*"?"":t=="auto"?"auto":isNaN(t)?t:e?as(t,e):`${t}px`};n.idsAdd=(t,e,i)=>{if(t=ct(t),e=ct(e),i=i==null?",":""+i,!t||!e)return t||e;for(var l=0,e=e.split(i),r=e.length;l<r;l++)(i+t+i).indexOf(i+e[l]+i)<0&&(t+=(t?i:"")+e[l]);return t};n.idsRemove=(t,e,i)=>{if(t=ct(t),e=ct(e),i=i==null?",":""+i,!t||!e)return t;for(var l=0,r,e=e.split(i),o=e.length;l<o;l++)do r=(i+t+i).indexOf(i+e[l]+i),r>-1&&(t=t.slice(0,r&&r-1)+t.slice(r+e[l].length+(r?0:1)));while(t&&r>-1);return t};n.idsAny=(t,e,i)=>{if(t===""&&e===t)return!0;if(t=ct(t),e=ct(e),i=i==null?",":""+i,!t||!e)return!1;if(t==e)return!0;for(let l of e.split(i))if((i+t+i).indexOf(i+l+i)>-1)return!0;return!1};n.idsAll=(t,e,i)=>{if(t===""&&e===t)return!0;if(t=t==null?"":""+t,e=e==null?"":""+e,i=i==null?",":""+i,!t)return!1;if(!e||t==e)return!0;for(let l of e.split(i))if((i+t+i).indexOf(i+l+i)<0)return!1;return!0};n.classAdd=function(t,e,i){if(!t)return;let l=t.className;if(e.indexOf(" ")>-1){e=n.strTrim(e).split(/ +/);for(let r=0,o=e.length;r<o;r++)l=(i===!1?n.idsRemove:n.idsAdd)(l,e[r]," ")}else l=(i===!1?n.idsRemove:n.idsAdd)(l,e," ");t.className=l};n.classRemove=function(t,e){t&&(e.indexOf(" ")>-1?n.classAdd(t,e,!1):t.className=n.idsRemove(t.className,e," "))};n.classAny=function(t,e){if(!t)return;let i=typeof t=="string"?t:t.className;if(e.indexOf(" ")>-1){e=n.strTrim(e).split(/ +/);for(let l=0,r=e.length;l<r;l++)if(n.idsAny(i,e[l]," "))return l+1}else return n.idsAny(i,e," ")};n.urlEncode=t=>t==null?"":encodeURIComponent(typeof t=="object"?JSON.stringify(t):t);n.urlDecode=t=>t==null?"":decodeURIComponent(t.replace(/\+/g," "));n.urlFormat=(t,...e)=>(e.forEach((i,l)=>i!=null&&(t=n.strFormat(t,i,!0,l<e.length-1))),t);n.urlParam=function(t,e){const i=t.split("#");let l=i[0],r=i[1];if(typeof e=="string"){if(e==="#")return r||"";const o=l.match(new RegExp("[\\?&]"+e+"=([^&]*)"));return n.urlDecode(o?o[1]:"")}else if(e&&typeof e=="object")for(const o in e)if(o==="#")r=e[o];else{const a=n.urlEncode(e[o]),h=new RegExp("\\b"+o+"=[^&]*");l=h.test(l)?l.replace(h,o+"="+a):l+(l.indexOf("?")<0?"?":"&")+o+"="+a}else if(arguments.length===1){const o={};let a=l.split("?");a=a[a.length-1].split("&");for(let h=0;h<a.length;h++){const u=a[h].indexOf("=");if(u===-1)continue;const c=a[h].substring(0,u),p=a[h].substring(u+1);o[c]=n.urlDecode(p.replace(/\+/g," "))}return o}return l+(r?"#"+r:"")};n.urlServer=function(t,...e){if(t){if(!(t.startsWith("http://")||t.startsWith("https://"))){let i=lt.get(n.x,"http.baseURL");i&&(t=i+(i.endsWith("/")?"":"/")+t)}return n.strFormat(t,...e)}};n.urlComplete=function(t){if(t.indexOf("data:")!==0){t=n.urlServer(t);let e=lt.get(n.x,"http.params");e&&(t=n.urlParam(t,e))}return t};n.download=function(t,e){if(t=n.urlComplete(t),D.app)n.wifiConfirm(function(){let i=plus.downloader.createDownload(t,e);plus.nativeUI.showWaiting(),i.addEventListener("statechanged",function(l,r){switch(l.state){case 1:plus.nativeUI.toast(n.loc.download_start);break;case 4:r==200?(plus.nativeUI.toast(n.loc.download_complete),plus.runtime.openFile(l.filename,{},function(o){plus.nativeUI.alert(n.loc.download_cannotopen)})):plus.nativeUI.toast(n.loc.download_fail+r),plus.nativeUI.closeWaiting();break}}),i.start()});else{let i=document.createElement("a");i.href=t,n.x.downloadTarget&&(i.target=n.x.downloadTarget),i.click(),i.remove()}};n.wifiConfirm=(t,e)=>{n.x.wifiConfirm&&plus.networkinfo.getCurrentType()!=3?plus.nativeUI.confirm(n.loc.connection_not_wifi,function(i){i.index===0&&t.call(e)},{buttons:[n.loc.confirm,n.loc.cancel]}):t.call(e)};n.vm=n.view=t=>{if(!t)return n.docView;if(typeof t=="string"&&n.vueMap.has(t)&&(t=n.vueMap.get(t),t.isView))return t;if(t=n(t),t!=null)return t.isView?t:t.ownerView};n.close=t=>{let e=n.dialog(t);e&&e.close()};n.closePopup=()=>{document.dispatchEvent(new Event("mousedown"))};n.previewVideo=function(t){n.vm().previewVideo(n.urlServer(t))};n.previewImage=function(t,e){t=n.array(t).map(i=>n.urlServer(i)),D.app?plus.nativeUI.previewImage(t,e):n.vm().previewImage(t,e)};n.slotsChildren=function(t,e="default"){let i=[];const l=r=>{r&&r.forEach(o=>{typeof o.type=="symbol"?Array.isArray(o.children)?l(o.children):o.type.toString()==="Symbol(v-txt)"&&i.push(o):i.push(o)})};return l(t[e]&&t[e]()),i};n.hasChild=function(t,e="default"){let i=!1;const l=r=>{lt.forEach(r,o=>{if(typeof o.type=="symbol")Array.isArray(o.children)&&l(o.children);else return!(i=!0)})};return l(t[e]&&t[e]()),i};n.ease=function(t,e,i){t(0),e==null&&(e=200),i==null&&(i=Math.ceil(e/10));let l=Math.ceil(e/i),r=0,o=new Date().getTime(),a=setInterval(function(){let u=new Date().getTime()-o,c=Math.floor(u/l);r!=c&&(c<i?t(-Math.cos(c/i*Math.PI)/2+.5):(clearInterval(a),t(1)),r=c)},Math.max(l-10,5));return a};n.print=function(t,e){let i=n.el(t),l=i.ownerDocument,r=n.q("link[media=print]",l),o=[];e=e||{},n.q("meta",l).each(function(){o.push(this.outerHTML)}),(r.length>0?r:n.q("link",l)).each(function(){o.push('<link rel="stylesheet" type="text/css" href="'+this.getAttribute("href")+'"/>')}),n.q("style",l).each(function(){o.push(this.outerHTML)});let a=i.outerHTML;a=a.replace(/<div[^>]+w-scroll[^>]+>/gi,function(u){return u.replace(/height: \w+/gi,"")}),n.q(":text,:password,textarea,select",i).each(function(){let u=this.outerHTML,c;if(e.input2text){let p=n(this);p&&p.isFormWidget?(u=p.el("form").outerHTML,c=p.formText()):c=this.value,c='<div class="f-oh w-input-s">'+c+"</div>"}else c=u.replace('value="'+this.defaultValue+'"',()=>'value="'+this.value+'"');a=a.replace(u,()=>c+"")}),n.q(":radio,:checkbox",i).each(function(){if(e.input2text){let u=n(this);u&&u.isFormWidget&&(a=a.replace(u.el().outerHTML,()=>u.isChecked?'<div class="f-wdbr">'+u.text+"</div>":""))}else{let u=this.outerHTML,c=u.replace(/ checked=""/,"");this.checked&&(c=c.replace(/>$/," checked>")),a=a.replace(u,c)}}),e.input2text&&n.q("input[type=hidden]",i).each(function(){var u=n(this);u&&u.isFormWidget&&u.$options.name!="w-hidden"&&(a=a.replace(u.el("form").outerHTML,()=>'<div class="f-wdbr f-print-input-text">'+u.formText()+"</div>"))}),n.q(".w-input-placeholder",i).each(function(){a=a.replace(this.outerHTML,"")});const h=function(){let u=window.frames.wPrintFrame;return u||(n.q("<div class=f-none><iframe name=wPrintFrame></iframe></div>").appendTo(document.body),u=window.frames.wPrintFrame),u};return l=e.print!==!1?h():window.open(),i=l.document,i.open("text/html","replace"),i.write("<!doctype html><html class=f-print><head><meta charset=utf-8><title>"+n.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>'+o.join("")+(e.head||"")+"</head><body><div class=x-print>"+a+"</div>"+(e.print!==!1?"<script>window.print();window.close()<\/script>":"")+"</body></html>"),i.close(),i};const jt=function(t,e){return!t||t instanceof FormData?t:(n.lodash.get(e,'headers["Content-Type"]')||n.lodash.get(n.x,'http.headers.post["Content-Type"]'))=="application/x-www-form-urlencoded"?yi.stringify(t,{arrayFormat:"repeat"}):t};n.ajax=async function(t,e){let i=e?n.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 l=n.lodash.pick(t,["headers","responseType","transformRequest","transformResponse","timeout","cancelToken"]);if(t.download&&n.extend(l,{responseType:"blob"}),t.request)return t.request(t.data);{let r=(t.method||(t.data?"post":"get")).toLowerCase();return(r==="post"||r==="put"||r==="patch"?n.http[r](i,jt(t.data,l),l):n.http[r](i,l)).then(o=>{let a=o.data;if(t.filter&&(a=t.filter(o)),t.success&&t.success(a),t.complete&&t.complete(o),t.download){let h=o.headers["content-disposition"];if(h){let u=decodeURI(h.substring(h.indexOf("filename=")+9,h.length)),c=new Blob([o.data]),p=document.createElement("a");p.href=URL.createObjectURL(c),p.download=u,p.click(),p.remove()}else console.error("download: none content-disposition")}return a}).catch(o=>(t.error&&t.error(o),t.complete&&t.complete(o.response,o),Promise.reject(o)))}};n.extend(n.ajax,{get(t,e){return n.http.get(t,e).then(i=>i&&i.data)},head(t,e){return n.http.head(t,e)},delete(t,e){return n.http.delete(t,e).then(i=>i&&i.data)},post(t,e,i){return n.http.post(t,jt(e,i),i).then(l=>l&&l.data)},put(t,e,i){return n.http.put(t,jt(e,i),i).then(l=>l&&l.data)},patch(t,e,i){return n.http.patch(t,jt(e,i),i).then(l=>l&&l.data)}},qt);n.alert=function(t,e,i,l){return n.docView.pop("w-alert",typeof t=="object"?{title:n.loc.opertip,...t}:{title:n.loc.opertip,text:t,position:e,timeout:i,yes:l})};n.confirm=function(t,e,i,l=!0){return n.docView.pop("w-confirm",typeof t=="object"?{title:n.loc.opertip,...t}:{title:n.loc.opertip,text:t,yes:e,no:i,cover:l})};n.dialog=t=>{if(t){for(t=n.vm(t);t&&!t.isDialog;)t=t.ownerView;return t}};n.config=function(t){n.config_uid=wt(),n.mergeDeep(n.x,t),t.http&&(n.mergeDeep(qt.defaults,t.http),qt.interceptors.response.use(t.http.filter,t.http.error||function(i){return i.response&&(i.callback=()=>n.alert({icon:".f-i .f-i-alert-warning",text:i.response.status+": "+i.config.url})),Promise.reject(i)}));const e=n.x.defaultOptions;for(let i in e)if(i.includes(".")){let l=n.strFrom(i,".").replace(/\./g," "),r=n.strTo(i,".");(n.dfclsCache[r]||(n.dfclsCache[r]={}))[l]=e[i]}};n.pop=(t,e,i,l)=>(i?n(i):n.vm()).pop(t,e,{mode:l});n.submit=(t,e={})=>(n(e.target)||n.vm()).submit(t,e);n.symbol={leafSymbol:Symbol("leaf"),changeSymbol:Symbol("change")};window.addEventListener("unhandledrejection",t=>{n.x.catchReject?n.x.catchReject(t):(t.reason&&(t.reason.callback?t.reason.callback():typeof t.reason=="string"&&console.error(t.reason)),t.preventDefault())});function ye(t,e){e.value?t.setAttribute("w-form-ignore",""):t.removeAttribute("w-form-ignore")}const hs={created:ye,updated:ye};function _e(t){let e=n.dialog(t.currentTarget);if(e&&e.x.movable!==!1&&!e.x.fullScreen){let i=e.el(),l=i.style.left,r=i.style.right,o=i.style.top,a=i.style.bottom,h=a?-1:1,u=r?-1:1,c=h<0?"bottom":"top",p=u<0?"right":"left",f=t.clientX,m=t.clientY,v=n.number(h<0?a:o),x=n.number(u<0?r:l),_,k=document.documentElement.clientHeight,M=document.documentElement.clientWidth;n.moveup(function(V){_||(_=n.q("<div class=w-dialog-move-helper></div>").appendTo(document.body),e.el().style.transition="none");let L=n.numRange(V.clientX,0,M),P=n.numRange(V.clientY,0,k);e.setPosition({[c]:v+h*(P-m)+"px",[p]:x+u*(L-f)+"px"})},function(V,L){L&&_&&_.remove(),e.el().style.transition=""},t)}}const us={mounted(t,e){e.value&&t.addEventListener("mousedown",_e)},unmounted(t){t.removeEventListener("mousedown",_e)}};function ke(t,e){t.style.setProperty("--v-label-width",n.unitSize(e.value))}const cs={created:ke,updated:ke};function ds(t){t.directive("form-ignore",hs),t.directive("dialog-move",us),t.directive("label-width",cs)}const Ce={},Xe=s.defineComponent({props:{data:null,width:null,height:null,colspan:null,rowspan:null,ownproperty:null,orientUid:null},data(){return{isWidget:!0,uid:this.orientUid||n.uid(),runtimeX:{},x:{}}},created(){n.vueMap.set(this.uid,this);let t=this.getDefaultProp(),e=n.config_uid,i={};this.x=new Proxy(this.runtimeX,{get:(l,r)=>r in l?l[r]:this.$props[r]!==void 0?this.$props[r]:(e!=n.config_uid&&(e=n.config_uid,t=this.getDefaultProp()),t[r]),set:(l,r,o)=>(i[r]||(i[r]=this.$watch(r,a=>l[r]=a)),l[r]=o,!0)})},unmounted(){n.vueMap.delete(this.uid)},methods:{x_default(){},getDefaultProp(){let t;if(!this.ownproperty){let e=this.$options.name;if(t=n.x.defaultOptions[e],n.dfclsCache[e]){let i=this.$options.name+(this.$attrs.class?" "+this.$attrs.class:""),l=n.dfclsCache[e],r;for(let o in l)n.idsAll(i,o," ")&&n.mergeDeep(r||(r={}),l[o]);r&&(t=n.extendDeep(r,t))}}return{...this.x_default(),...t}},attr(t,e){if(arguments.length==2)this.x[t]=e;else return this.x[t]},ajax(t){return this.setLoading&&this.setLoading(),n.ajax(t).then(e=>(this.setLoading&&this.setLoading(!1),e))},submit(t,e){return typeof t=="object"&&(e=t,t=null),e||(e={}),t&&(e.request=t),new Promise(async i=>{await s.nextTick();const l=n.vm(this);if(this.setLoading&&this.setLoading(),await l.valid(e.range,e.group)){let o=l.getPostData(e.range);e.data=e.data&&o?n.extend({},e.data,o):e.data||o,i(this.ajax(e))}else this.setLoading&&this.setLoading(!1)})},pop(t,e,i){return n.vm(this).createPop(this,t,e,i)},closePop(t){const e=n.vm(this);e.getPops(t).forEach(i=>e.removePop(i))},createEvent(t,e){return{type:t,uid:this.uid,...e}},trigger(t,...e){let i=t.runType||t.type||t,l=this.getOn(i);l&&(typeof t=="string"&&(t=this.createEvent(t)),Array.isArray(l)?l.forEach(r=>r(t,...e)):l(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 l=typeof t;do{if(l==="string"){if(n.idsAny(t,i.$options.name))return i}else if(l==="function"&&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&&n.q(t,e)[0]}return document.getElementById(this.uid+(t||""))},snapElem(){return this.el()},scrollIntoView(t=!1){const e=(i,l)=>{let r="hasScroll"+i.toUpperCase(),o=this.closest(a=>a[r]&&(a.scrollState()||!1)[i]);o?o.scrollTo(this,t.hasOwnProperty("y")?t.y:"auto",t.x,t.ease==null?200:t.ease,t.divide,l):l&&l()};e("y",()=>e("x",t.success))},hasBubble(t){if(!t)return!1;if(this.contains(t))return!0;let e=n.dialog(t);if(e&&e.commander)return e.commander===t?!0:this.hasBubble(e.commander)},bind(t,e){let i=Ce[this.uid]||(Ce[this.uid]={});return i[t]||(i[t]=e||this[t]),i[t]},slots_children(t){return n.slotsChildren(this.$slots,t)},slot(t="default"){return this.$slots[t]?this.$slots[t]():[]},html_icon(t,e,i){const l=t.startsWith(".")&&!t.includes("/"),r=this.$.vnode.scopeId||"";return l?s.h("i",{[`${r}`]:"",class:[e,t.replace(/\./g,"")],onclick:i}):s.h("img",{src:t,onclick:i,class:e,[`${r}`]:""})},html_slots(){return this.$slots},html_self(t){return s.h(this.tagName||"div",t?s.mergeProps(this.html_attrs,this.html_props,this.$attrs):s.mergeProps(this.html_attrs,this.html_props),this.html_slots())},html(){return this.html_self()}},computed:{dfish(){return n},ownerView(){let t=this.provideView;for(;t&&!t.isView;)t=t.provideView;return t},pubParent(){return this.providePubParent&&n.idsAny(this.$options.pubParentName,this.providePubParent.$options.name)&&this.providePubParent},parentNode(){return n(this.el().parentElement)},tagName(){return"div"},html_attrs(){return{id:this.uid,class:[this.$options.name,this.html_class],style:[{width:this.x.width&&n.unitSize(this.x.width),height:this.x.height&&n.unitSize(this.x.height),"--w-grid-colspan":!this.x.colspan||this.x.colspan==-1?null:`span ${this.x.colspan}`,"--w-grid-rowspan":!this.x.rowspan||this.x.rowspan==-1?null:`span ${this.x.rowspan}`},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 s.mergeProps(this.html_attrs,this.html_props,this.$attrs)}},render(){return this.html()}}),Gt=s.defineComponent({props:{src:null,children:null,parentItem:null},data(){return{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),typeof e=="function"))return e(this).then(i=>{this.showLoading(!1),this.loaded=!0,t&&t()}).catch(i=>{this.showLoading(!1),this.loaded=!0})},showLoading(t){this.loading=t}}}),Qe=s.defineComponent({name:"w-view",mixins:[Gt],provide(){return{provideView:this}},props:{commands:null},data(){return{isView:!0,pops:[]}},beforeCreate(){this.popCommanders={}},methods:{find(t){const e=this.el().querySelectorAll(`[w-key="${t}"]`);for(let i of e)if((i=n(i))&&i.ownerView===this)return i},fv(t,e){let i=this.f(t);if(arguments.length===2)i&&(i.groupFormVal?i.groupFormVal(e):i.val(e));else if(typeof t=="object")for(let l in t)this.fv(l,t[l]);else return i&&(i.groupFormVal?i.groupFormVal():i.formVal())},f(t,e){return this.fAll(t,e)[0]},fAll(t,e){if(t==="*"||t==null){for(var i=0,l=this.getFormList(e,!0),r=l.length,o,a,h=[];i<r;i++)(o=n(l[i]))&&o!=a&&h.push(a=o);return h}let u=e?e.isWidget?e.el():e:this.el(),c=n.q(':input[name="'+t+'"]',u);return c.length||(c=n.q(':input[w-name="'+t+'"]',u)),n.lodash.map(c.not("[w-form-ignore] :input"),p=>n(p))},getFormList(t,e){let i,l=":input:not(button)"+(e?"":":not(:disabled)");if(t&&typeof t=="string"){let r=t.charAt(0)==="!",o=t.replace(/\!/g,"").split(",").map(a=>`[w-key="${a}"] ${l}`).join(",");o&&(i=n.q(r?`${l}:not(${o})`:o,this.el()))}else i=n.q(l,Array.isArray(t)?n.q(t.map(r=>n.el(r))):t?n.el(t):this.el());return i?n.lodash.map(i.not("[w-form-ignore] :input")):[]},getPostData(t){let e={};return this.getFormList(t).forEach(i=>{let l=i.name,r=i.value;if(l){switch(i.type){case"text":i.getAttribute("w-valuetype")==="number"&&(r=r.replace(/[^\d\.-]/g,""));break;case"checkbox":if(!i.value||!i.checked&&!(i.indeterminate&&i.getAttribute("w-partialsubmit")))return null;break;case"radio":if(!i.value||!i.checked)return null;l=i.getAttribute("w-name")||l;break;case"select-one":if(i.selectedIndex<0)return null;break}r&&(r=n.strTrim(r)),l in e?(Array.isArray(e[l])||(e[l]=[e[l]]),e[l].push(r)):e[l]=r}}),e},async getValidError(t){let e,i=this.getFormList(t);const l={};for(let r=0,o=i.length,a,h;r<o;r++)(a=n(i[r]))&&a.isFormWidget&&(i[r].name in l?h=l[i[r].name]&&n.extend({wid:a.uid},l[i[r].name]):h=await a.getValidError(),h&&(e||(e=[]),e.find(u=>u.wid==h.wid)||e.push(h))),(i[r].type==="checkbox"||i[r].type==="radio")&&(l[i[r].name]=h);return e},async valid(t){this._err_ns&&this._err_ns.forEach(i=>{const l=n.vueMap.get(i.wid);l&&l.warn(!1)});let e=await this.getValidError(t);return e&&(e.forEach(i=>n.vueMap.get(i.wid).warn()),n.vueMap.get(e[0].wid).showErrorTip(e[0].text)),!(this._err_ns=e)},isModified(t,e){return this.getFormList(t).find(i=>(i=n(i)).isModified&&i.isModified(e))},saveModified(t,e){this.getFormList(t).forEach(i=>(i=n(i)).saveModified&&i.saveModified(e))},resetFormStyle(t){this.getFormList(t).forEach(e=>{const i=n(e);i.warn&&i.warn(!1)})},resetForm(t,e){this.getFormList(t).forEach(i=>{const l=n(i);l.reset&&l.reset(e)})},showLoading(t){if(t===!1)this.pop("w-loading",!1);else return this.pop("w-loading",{cover:!0,local:!0,...t})},createPop(t,e,i,l={}){return new Promise((r,o)=>{const a=l.mode||"multiple",h=this.getPops(e)[0];if(h){if(a==="component"){Object.assign(h,{props:i,options:l,resolve:r,reject:o});return}else if(a==="single"){let c=this.pops.indexOf(h);this.pops.splice(c,1)}}const u=n.uid();this.pops.push({commander:t,template:e,props:i,options:l,orientUid:u,resolve:r,reject:o})})},removePop(t){let e=typeof t=="string"?this.pops.findIndex(i=>i.orientUid==t):this.pops.indexOf(t);e>-1&&this.pops.splice(e,1)},getPops(t,e){return this.pops.filter(i=>!(t&&s.toRaw(i.template)!=s.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 l=typeof t=="string"?s.resolveComponent(t):s.toRaw(t);return l&&s.h(l,{key:e,orientUid:e,...i})})}}}),ps=s.defineComponent({props:["data"],data(){return{rotate:{},current:n.lodash.get(this.data,"options.current",0)}},methods:{close(){n.close(this)},rot(t){let e=this.$refs.swiper.focusIndex,i=this.rotate[e];i==null&&(i=this.rotate[e]=0);let l=this.$refs.swiper.getCurrentItem().el(),r=n.bcr(l),o=r.width-40,a=r.height-80;t>0?i+=90:t<0&&(i-=90);let h=i/90%2;n.q("._img",l).css({transform:"rotate("+i+"deg)",maxWidth:h?a:o,maxHeight:h?o:a}),this.rotate[e]=i}},computed:{loc(){return n.loc}},mounted(){}}),nt=(t,e)=>{const i=t.__vccOpts||t;for(const[l,r]of e)i[l]=r;return i},fs={class:"f-height f-rel f-oh"},ms=["src"],gs={class:"_rotate"};function xs(t,e,i,l,r,o){const a=s.resolveComponent("w-swiper-item"),h=s.resolveComponent("w-swiper"),u=s.resolveComponent("w-video"),c=s.resolveComponent("w-dialog");return s.openBlock(),s.createBlock(c,{class:"f-dialog-preview",width:"calc(100% - 100px)",height:"calc(100% - 100px)",ownproperty:!0,cover:!0,autoHide:!0},{default:s.withCtx(()=>[t.data.type=="image"?(s.openBlock(),s.createElementBlock(s.Fragment,{key:0},[s.createVNode(h,{ref:"swiper",class:"f-height",current:t.current,arrow:t.data.imgs.length>1,"indicator-dots":t.data.imgs.length>1,duration:"300"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.data.imgs,(p,f)=>(s.openBlock(),s.createBlock(a,{key:f},{default:s.withCtx(()=>[s.createElementVNode("div",fs,[s.createElementVNode("img",{class:"_img",src:p},null,8,ms)])]),_:2},1024))),128))]),_:1},8,["current","arrow","indicator-dots"]),s.createElementVNode("div",gs,[s.createElementVNode("a",{class:"_l",onClick:e[0]||(e[0]=p=>t.rot(-1))},s.toDisplayString(t.loc.rotate_left),1),e[3]||(e[3]=s.createElementVNode("span",{class:"_s"},"|",-1)),s.createElementVNode("a",{class:"_r",onClick:e[1]||(e[1]=p=>t.rot(1))},s.toDisplayString(t.loc.rotate_right),1)])],64)):(s.openBlock(),s.createBlock(u,{key:1,class:"f-height",src:t.data.src},null,8,["src"])),s.createElementVNode("div",{class:"_dlg_x",onClick:e[2]||(e[2]=(...p)=>t.close&&t.close(...p))})]),_:1})}const Se=nt(ps,[["render",xs]]),ws=s.defineComponent({props:["data"],data(){let t=this.data.format||"yyyy-MM-dd",e=this.data&&this.data.value?n.dateParse(this.data.value,t):new Date,i=this.data&&this.data.minValue&&n.dateParse(this.data.minValue,t),l=this.data&&this.data.maxValue&&n.dateParse(this.data.maxValue,t);e=n.numRange(e,i,l);let r=e.getFullYear(),o,a,h;return t.includes("w")&&(o=n.dateWeek(e)[1],a=n.dateWeekFirst(r),h=n.dateWeekLast(r)),{focusYear:r,focusMonth:e.getMonth(),focusDate:e.getDate(),focusHour:e.getHours(),focusMinute:e.getMinutes(),focusSecond:e.getSeconds(),startYear:n.numRange(e.getFullYear()-30,i&&i.getFullYear()),endYear:n.numRange(e.getFullYear()+30,null,l&&l.getFullYear()),monthDays:new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),focusWeek:o,weekFirst:a,weekLast:h,minTime:i,maxTime:l,format:t}},watch:{focusYear(t){t==this.yearList[0]&&t>1030?this.startYear=n.numRange(this.startYear-30,this.minYear):t==this.yearList.at(-1)&&(this.endYear=n.numRange(this.endYear+30,null,this.maxYear)),this.monthDays=new Date(t,this.focusMonth+1,0).getDate(),this.hasWeek&&(this.weekFirst=n.dateWeekFirst(t),this.weekLast=n.dateWeekLast(t))},focusMonth(t){this.monthDays=new Date(this.focusYear,t+1,0).getDate()}},methods:{weekText(t){},clickCancel(){n.close(this)},clickOK(t){if(this.data.success){let e=this.hasWeek?n.dateParse(`${this.focusYear}-${this.focusWeek}`,"yyyy-ww"):new Date(this.focusYear,this.focusMonth,this.focusDate,this.focusHour,this.focusMinute,this.focusSecond);this.data.success(n.dateFormat(e,this.format),t)}n.close(this)}},computed:{dfish(){return n},yearList(){return Array.from(Array(this.endYear-this.startYear+1)).map((t,e)=>this.startYear+e)},monthList(){return Array.from(Array(12)).map((t,e)=>e)},dateList(){return Array.from(Array(this.monthDays)).map((t,e)=>e+1)},hourList(){return Array.from(Array(24)).map((t,e)=>e)},minuteList(){return Array.from(Array(60)).map((t,e)=>e)},secondList(){return 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 l=t,r=n.dateAdd(t,"d",6);return t=n.dateAdd(t,"d",7),{value:i+1,text:`${n.strPad(i+1)} (${n.dateFormat(l,"MM.dd")} - ${n.dateFormat(r,"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(){}}});function vs(t,e,i,l,r,o){const a=s.resolveComponent("w-button"),h=s.resolveComponent("w-buttonbar"),u=s.resolveComponent("w-html"),c=s.resolveComponent("w-option"),p=s.resolveComponent("w-slidepicker"),f=s.resolveComponent("w-vertical"),m=s.resolveComponent("w-horizontal"),v=s.resolveComponent("w-dialog");return s.openBlock(),s.createBlock(v,{class:"f-datesheet"},{default:s.withCtx(()=>[s.createVNode(h,{class:"f-datesheet-bbr",align:"between",height:"52",style:{padding:"0 10px"}},{default:s.withCtx(()=>[s.createVNode(a,{text:"取消",onClick:t.clickCancel},null,8,["onClick"]),s.createVNode(a,{text:"确定",onClick:t.clickOK,face:"primary"},null,8,["onClick"])]),_:1}),s.createVNode(m,{height:"*"},{default:s.withCtx(()=>[t.hasYear?(s.openBlock(),s.createBlock(f,{key:0,width:"*"},{default:s.withCtx(()=>[s.createVNode(u,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:s.withCtx(()=>[...e[7]||(e[7]=[s.createTextVNode("年",-1)])]),_:1}),s.createVNode(p,{height:"*",modelValue:t.focusYear,"onUpdate:modelValue":e[0]||(e[0]=x=>t.focusYear=x),"min-value":t.minYear,"max-value":t.maxYear,"keep-index":!0,data:{mode:"year"}},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.yearList,x=>(s.openBlock(),s.createBlock(c,{key:x,value:x,text:x},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):s.createCommentVNode("",!0),t.hasMonth?(s.openBlock(),s.createBlock(f,{key:1,width:"*"},{default:s.withCtx(()=>[s.createVNode(u,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:s.withCtx(()=>[...e[8]||(e[8]=[s.createTextVNode("月",-1)])]),_:1}),s.createVNode(p,{height:"*",modelValue:t.focusMonth,"onUpdate:modelValue":e[1]||(e[1]=x=>t.focusMonth=x),"min-value":t.minMonth,"max-value":t.maxMonth,"keep-index":!0,data:{mode:"month"}},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.monthList,x=>(s.openBlock(),s.createBlock(c,{key:x,value:x,text:t.dfish.strPad(x+1)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):s.createCommentVNode("",!0),t.hasDate?(s.openBlock(),s.createBlock(f,{key:2,width:"*"},{default:s.withCtx(()=>[s.createVNode(u,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:s.withCtx(()=>[...e[9]||(e[9]=[s.createTextVNode("日",-1)])]),_:1}),s.createVNode(p,{height:"*",modelValue:t.focusDate,"onUpdate:modelValue":e[2]||(e[2]=x=>t.focusDate=x),"min-value":t.minDate,"max-value":t.maxDate,"keep-index":!0,data:{mode:"date"}},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.dateList,x=>(s.openBlock(),s.createBlock(c,{key:x,value:x,text:t.dfish.strPad(x)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):s.createCommentVNode("",!0),t.hasHour?(s.openBlock(),s.createBlock(f,{key:3,width:"*"},{default:s.withCtx(()=>[s.createVNode(u,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:s.withCtx(()=>[...e[10]||(e[10]=[s.createTextVNode("时",-1)])]),_:1}),s.createVNode(p,{height:"*",modelValue:t.focusHour,"onUpdate:modelValue":e[3]||(e[3]=x=>t.focusHour=x),"min-value":t.minHour,"max-value":t.maxHour,"keep-index":!0},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.hourList,x=>(s.openBlock(),s.createBlock(c,{key:x,value:x,text:t.dfish.strPad(x)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):s.createCommentVNode("",!0),t.hasMinute?(s.openBlock(),s.createBlock(f,{key:4,width:"*"},{default:s.withCtx(()=>[s.createVNode(u,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:s.withCtx(()=>[...e[11]||(e[11]=[s.createTextVNode("分",-1)])]),_:1}),s.createVNode(p,{height:"*",modelValue:t.focusMinute,"onUpdate:modelValue":e[4]||(e[4]=x=>t.focusMinute=x),"min-value":t.minMinute,"max-value":t.maxMinute,"keep-index":!0},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.minuteList,x=>(s.openBlock(),s.createBlock(c,{key:x,value:x,text:t.dfish.strPad(x)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):s.createCommentVNode("",!0),t.hasSecond?(s.openBlock(),s.createBlock(f,{key:5,width:"*"},{default:s.withCtx(()=>[s.createVNode(u,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:s.withCtx(()=>[...e[12]||(e[12]=[s.createTextVNode("秒",-1)])]),_:1}),s.createVNode(p,{height:"*",modelValue:t.focusSecond,"onUpdate:modelValue":e[5]||(e[5]=x=>t.focusSecond=x),"min-value":t.minSecond,"max-value":t.maxSecond,"keep-index":!0},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.secondList,x=>(s.openBlock(),s.createBlock(c,{key:x,value:x,text:t.dfish.strPad(x)},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):s.createCommentVNode("",!0),t.hasWeek?(s.openBlock(),s.createBlock(f,{key:6,width:"*"},{default:s.withCtx(()=>[s.createVNode(u,{class:"f-datesheet-head",align:"center",valign:"middle"},{default:s.withCtx(()=>[...e[13]||(e[13]=[s.createTextVNode("周",-1)])]),_:1}),s.createVNode(p,{height:"*",modelValue:t.focusWeek,"onUpdate:modelValue":e[6]||(e[6]=x=>t.focusWeek=x),"min-value":t.minWeek,"max-value":t.maxWeek,"keep-index":!0},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.weekList,x=>(s.openBlock(),s.createBlock(c,{key:x.value,value:x.value,text:x.text},null,8,["value","text"]))),128))]),_:1},8,["modelValue","min-value","max-value"])]),_:1})):s.createCommentVNode("",!0)]),_:1})]),_:1})}const $e=nt(ws,[["render",vs]]),bs=`<svg style="display:none;width:0;height:0" width="0" height="0" focusable="false" aria-hidden="true">
|
|
6
|
+
<symbol id="f-svg-loading" viewBox="0 0 50 50">
|
|
7
|
+
<path
|
|
8
|
+
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"
|
|
9
|
+
transform="rotate(86.9154 25 25)">
|
|
10
|
+
</path>
|
|
11
|
+
</symbol>
|
|
12
|
+
<symbol id="f-svg-loading-1" viewBox="0 0 50 50">
|
|
13
|
+
<circle cx="25" cy="25" r="20" />
|
|
14
|
+
</symbol>
|
|
15
|
+
<symbol id="f-svg-loading-2" viewBox="0 0 24 30">
|
|
16
|
+
<rect x="0" y="8.66115" width="4" height="12.6777" opacity="0.2">
|
|
17
|
+
<animate attributeName="opacity" values="0.2; 1; .2" begin="0s" dur="0.6s"
|
|
18
|
+
repeatCount="indefinite"></animate>
|
|
19
|
+
<animate attributeName="height" values="10; 20; 10" begin="0s" dur="0.6s"
|
|
20
|
+
repeatCount="indefinite"></animate>
|
|
21
|
+
<animate attributeName="y" values="10; 5; 10" begin="0s" dur="0.6s"
|
|
22
|
+
repeatCount="indefinite"></animate>
|
|
23
|
+
</rect>
|
|
24
|
+
<rect x="8" y="6.16115" width="4" height="17.6777" opacity="0.2">
|
|
25
|
+
<animate attributeName="opacity" values="0.2; 1; .2" begin="0.15s" dur="0.6s"
|
|
26
|
+
repeatCount="indefinite"></animate>
|
|
27
|
+
<animate attributeName="height" values="10; 20; 10" begin="0.15s" dur="0.6s"
|
|
28
|
+
repeatCount="indefinite"></animate>
|
|
29
|
+
<animate attributeName="y" values="10; 5; 10" begin="0.15s" dur="0.6s"
|
|
30
|
+
repeatCount="indefinite"></animate>
|
|
31
|
+
</rect>
|
|
32
|
+
<rect x="16" y="6.33885" width="4" height="17.3223" opacity="0.2">
|
|
33
|
+
<animate attributeName="opacity" values="0.2; 1; .2" begin="0.3s" dur="0.6s"
|
|
34
|
+
repeatCount="indefinite"></animate>
|
|
35
|
+
<animate attributeName="height" values="10; 20; 10" begin="0.3s" dur="0.6s"
|
|
36
|
+
repeatCount="indefinite"></animate>
|
|
37
|
+
<animate attributeName="y" values="10; 5; 10" begin="0.3s" dur="0.6s"
|
|
38
|
+
repeatCount="indefinite"></animate>
|
|
39
|
+
</rect>
|
|
40
|
+
</symbol>
|
|
41
|
+
<symbol id="f-svg-loading-3" viewBox="0 0 1024 1024">
|
|
42
|
+
<path
|
|
43
|
+
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"
|
|
44
|
+
p-id="4486"></path>
|
|
45
|
+
</symbol>
|
|
46
|
+
</svg>`,ys=s.defineComponent({name:"w-docview",mixins:[Xe,Qe],provide(){return{providePubParent:null,provideBoxParent:null,provideRangeParent:null,provideCompatGap:null,provideMenu_w:null,provideTripleboxContainer:null}},beforeCreate(){n.docView=this,n.q(document.body).prepend("<div id=w-dfish-pops></div>"),n.q(document.body).append(bs)},methods:{el(){return document.getElementById("app")||document.body},getKey(){return null},previewVideo(t){this.pop(Se,{data:{type:"video",src:t}})},previewImage(t,e){this.pop(Se,{data:{type:"image",imgs:t,options:e}})},dateSheet(t,e){this.pop($e,{template:$e,width:"100%",height:"55%",position:"b",cover:!0,autoHide:!0,data:t,on:{"click:cover":n.close}})},html(){return[this.$slots.default?this.$slots.default():null,this.html_pops()]}}});var Ge=function(){if(typeof Map<"u")return Map;function t(e,i){var l=-1;return e.some(function(r,o){return r[0]===i?(l=o,!0):!1}),l}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(i){var l=t(this.__entries__,i),r=this.__entries__[l];return r&&r[1]},e.prototype.set=function(i,l){var r=t(this.__entries__,i);~r?this.__entries__[r][1]=l:this.__entries__.push([i,l])},e.prototype.delete=function(i){var l=this.__entries__,r=t(l,i);~r&&l.splice(r,1)},e.prototype.has=function(i){return!!~t(this.__entries__,i)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(i,l){l===void 0&&(l=null);for(var r=0,o=this.__entries__;r<o.length;r++){var a=o[r];i.call(l,a[1],a[0])}},e}()}(),ae=typeof window<"u"&&typeof document<"u"&&window.document===document,Wt=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),_s=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Wt):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),ks=2;function Cs(t,e){var i=!1,l=!1,r=0;function o(){i&&(i=!1,t()),l&&h()}function a(){_s(o)}function h(){var u=Date.now();if(i){if(u-r<ks)return;l=!0}else i=!0,l=!1,setTimeout(a,e);r=u}return h}var Ss=20,$s=["top","right","bottom","left","width","height","size","weight"],Vs=typeof MutationObserver<"u",Ts=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Cs(this.refresh.bind(this),Ss)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var i=this.observers_,l=i.indexOf(e);~l&&i.splice(l,1),!i.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(i){return i.gatherActive(),i.hasActive()});return e.forEach(function(i){return i.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!ae||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Vs?(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(){!ae||!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(e){var i=e.propertyName,l=i===void 0?"":i,r=$s.some(function(o){return!!~l.indexOf(o)});r&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Je=function(t,e){for(var i=0,l=Object.keys(e);i<l.length;i++){var r=l[i];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},bt=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||Wt},Ke=Jt(0,0,0,0);function Ut(t){return parseFloat(t)||0}function Ve(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce(function(l,r){var o=t["border-"+r+"-width"];return l+Ut(o)},0)}function Ms(t){for(var e=["top","right","bottom","left"],i={},l=0,r=e;l<r.length;l++){var o=r[l],a=t["padding-"+o];i[o]=Ut(a)}return i}function Ps(t){var e=t.getBBox();return Jt(0,0,e.width,e.height)}function zs(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return Ke;var l=bt(t).getComputedStyle(t),r=Ms(l),o=r.left+r.right,a=r.top+r.bottom,h=Ut(l.width),u=Ut(l.height);if(l.boxSizing==="border-box"&&(Math.round(h+o)!==e&&(h-=Ve(l,"left","right")+o),Math.round(u+a)!==i&&(u-=Ve(l,"top","bottom")+a)),!Bs(t)){var c=Math.round(h+o)-e,p=Math.round(u+a)-i;Math.abs(c)!==1&&(h-=c),Math.abs(p)!==1&&(u-=p)}return Jt(r.left,r.top,h,u)}var Ds=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof bt(t).SVGGraphicsElement}:function(t){return t instanceof bt(t).SVGElement&&typeof t.getBBox=="function"}}();function Bs(t){return t===bt(t).document.documentElement}function Es(t){return ae?Ds(t)?Ps(t):zs(t):Ke}function Ns(t){var e=t.x,i=t.y,l=t.width,r=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return Je(a,{x:e,y:i,width:l,height:r,top:i,right:e+l,bottom:r+i,left:e}),a}function Jt(t,e,i,l){return{x:t,y:e,width:i,height:l}}var Ls=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Jt(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=Es(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),Fs=function(){function t(e,i){var l=Ns(i);Je(this,{target:e,contentRect:l})}return t}(),Hs=function(){function t(e,i,l){if(this.activeObservations_=[],this.observations_=new Ge,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=i,this.callbackCtx_=l}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof bt(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var i=this.observations_;i.has(e)||(i.set(e,new Ls(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof bt(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var i=this.observations_;i.has(e)&&(i.delete(e),i.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(i){i.isActive()&&e.activeObservations_.push(i)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,i=this.activeObservations_.map(function(l){return new Fs(l.target,l.broadcastRect())});this.callback_.call(e,i,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Ze=typeof WeakMap<"u"?new WeakMap:new Ge,ti=function(){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=Ts.getInstance(),l=new Hs(e,i,this);Ze.set(this,l)}return t}();["observe","unobserve","disconnect"].forEach(function(t){ti.prototype[t]=function(){var e;return(e=Ze.get(this))[t].apply(e,arguments)}});var pt=function(){return typeof Wt.ResizeObserver<"u"?Wt.ResizeObserver:ti}();const A=s.defineComponent({mixins:[Xe],inject:["provideView"]}),As=function(t){if(this.wScrollPercentX){let e=t.target.scrollLeft;this.scrollXPosition=e==0?"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=e==0?"top":e>=this.wScrollSizeY?"bottom":"middle",this.el("wScrollBarThumbY").style.transform=`translateY(${e/this.wScrollPercentY}px)`}this.onScroll(t)},Te=function(t){let e,i,l,r,o,a=this.el("wScrollOverflow"),h=this.wScrollPercentX,u=this.wScrollPercentY;n.moveup(c=>{e||(e=this.el("wScrollBarThumbX")===t.target?"X":"Y",i=t.clientX,l=t.clientY,r=a.scrollLeft,o=a.scrollTop,t.target.parentNode.classList.add("z-drag")),e==="X"?a.scrollLeft=r+(c.clientX-i)*h:a.scrollTop=o+(c.clientY-l)*u},(c,p)=>{p&&t.target.parentNode.classList.remove("z-drag")},t)},Et=s.defineComponent({mixins:[A],props:{scrollX:null,scrollY:null,scrollView:null,scrollFlex:null},emits:["scroll","resize"],data(){return{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,l,r,o){let a=this.ovf();if(!a)return o&&o();let h=this.el("wScrollCont")||a,u=n.bcr(a),c=n.bcr(h),p=t?n.bcr(t):c,f,m;if(e!=null)if(!isNaN(e))f=n.number(e),t&&(f=p.top-c.top-f);else if(~e.indexOf("top")){f=0;let v=i.slice(3);v&&(f=a.scrollTop+ +v)}else if(~e.indexOf("bottom"))f=p.bottom-c.top-u.height+ +e.slice(6);else if(e==="middle")f=p.top-c.top-(u.height/2-p.height/2);else if(e==="nearest"){let v=i.slice(7);v=v?v.split(","):[0,0],p.top-v[0]<u.top?f=a.scrollTop-u.top+p.top-v[0]:p.bottom>u.bottom-v[1]&&(f=a.scrollTop+p.bottom-u.bottom+ +v[1])}else(p.top<u.top||p.bottom>u.bottom)&&(f=p.top-c.top-(u.height/2-p.height/2));if(i!=null)if(!isNaN(i))m=n.number(i),t&&(m=p.left-c.left-m);else if(~i.indexOf("left")){m=0;let v=i.slice(4);v&&(m=a.scrollLeft+ +v)}else if(~i.indexOf("right"))m=p.right-c.left-u.width+ +i.slice(5);else if(i==="center")m=p.left-c.left-(u.width/2-p.width/2);else if(~i.indexOf("nearest")){let v=i.slice(7);v=v?v.split(","):[0,0],p.left-v[0]<u.left?m=a.scrollLeft-u.left+p.left-v[0]:p.right>u.right-v[1]&&(m=a.scrollLeft+p.right-u.right+ +v[1])}else(p.left<u.left||p.right>u.right)&&(m=p.left-c.left-(u.width/2-p.width/2));if(r!=null&&(f!=null&&(f=f-f%r),m!=null&&(m=m-m%r)),l&&(f!=null||m!=null)){let v=a.scrollTop,x=a.scrollLeft;n.ease(_=>{f!=null&&(a.scrollTop=v+(f-v)*_),m!=null&&(a.scrollLeft=x+(m-x)*_),_===1&&o&&o()},l)}else f!=null&&(a.scrollTop=f),m!=null&&(a.scrollLeft=m),o&&o()},scrollToY(t,e,i,l,r){if(arguments.length===0)return this.ovf().scrollTop;typeof t!="object"&&(r=l,l=i,i=e,e=t,t=null),typeof l=="function"&&(r=l,l=null),this.scrollTo(t,e,null,i,l,r)},scrollToX(t,e,i,l,r){if(arguments.length===0)return this.ovf().scrollLeft;typeof t!="object"&&(r=l,l=i,i=e,e=t,t=null),typeof l=="function"&&(r=l,l=null),this.scrollTo(t,null,e,i,l,r)},ovf(){return n.br.mobile?this.el():this.el("wScrollOverflow")||this.el("wScrollCont")},html_scroll_slots(t){return this.hasScrollX||this.hasScrollY?[s.h("div",{id:this.uid+"wScrollOverflow",class:"w-scroll-overflow",onscroll:As.bind(this),onmouseenter:this.initScroll},s.h("div",{class:"w-scroll-cont",style:this.html_scroll_cont_style,id:this.uid+"wScrollCont"},t||this.$slots.default&&this.$slots.default())),!n.br.mobile&&this.hasScrollX&&[s.h("div",{class:"w-scrollbar-x",id:this.uid+"wScrollBarX",onmousedown:Te.bind(this)},s.h("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbX"}))],!n.br.mobile&&this.hasScrollY&&[s.h("div",{class:"w-scrollbar-y",id:this.uid+"wScrollBarY",onmousedown:Te.bind(this)},s.h("div",{class:"w-scrollbar-thumb",id:this.uid+"wScrollBarThumbY"}))]]:t||this.$slots.default&&this.$slots.default()},scrollState(){if(n.br.mobile||!this.el("wScrollCont")||!this.el())return;const t=this.el("wScrollOverflow").getBoundingClientRect(),e=this.el("wScrollCont").getBoundingClientRect();let i,l;if(this.hasScrollX){let r=e.width>t.width&&e.width-t.width;r&&r<=1&&(r=!1),r&&(i={size:r,percent:t.width/e.width})}if(this.hasScrollY){let r=e.height>t.height&&e.height-t.height;r&&(l={size:r,percent:t.height/e.height})}return{x:i,y:l}},initScroll(){const t=this.scrollState();if(!t)return;const e=this.el().getBoundingClientRect(),{x:i,y:l}=t;if(i){let r=i.percent*e.width;this.el("wScrollBarThumbX").style.width=Math.max(20,r)+"px",this.wScrollSizeX=i.size,this.wScrollPercentX=i.size&&i.size/((1-i.percent)*(e.width-(r<20?20-r:0)))}else this.wScrollSizeX=this.wScrollPercentX=!1;if(l){let r=l.percent*e.height;this.el("wScrollBarThumbY").style.height=Math.max(20,r)+"px",this.wScrollSizeY=l.size,this.wScrollPercentY=l.size&&l.size/((1-l.percent)*(e.height-(r<20?20-r:0)))}else this.wScrollSizeY=this.wScrollPercentY=!1},scroll_observe_overflow(t){this.el("wScrollOverflow")&&(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")}),!(n.br.mobile||!(this.hasScrollX||this.hasScrollY))&&(this.el("wScrollOverflow")&&new pt(this.scroll_observe_overflow).observe(this.el("wScrollOverflow")),this.el("wScrollCont")&&new pt(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(n.number(this.el("wScrollBarThumbY").style.transform)*this.wScrollPercentY),this.hasScrollX&&this.el("wScrollBarThumbX")&&this.scrollToX(n.number(this.el("wScrollBarThumbX").style.transform)*this.wScrollPercentX)}}),Nt=s.defineComponent({props:{align:null,valign:null,gap:null},computed:{dir(){return"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]}}}),rt=s.defineComponent({name:"w-horizontal",mixins:[Et,Nt],props:{br:null,reverse:null},provide(){return{provideLayout:this.$options.name,provideCompatGap:this.compatGap}},inject:["provideCompatGap"],methods:{html_slots(){return this.html_scroll_slots()}},computed:{dir(){return"h"},compatGap(){return n.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":""}`]:t!=null&&t!==""&&(n.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 t!=null&&(e.gap=n.unitSize(t)),(n.br.compat.gap||t<0)&&(e["--w-gap"]=n.unitSize(t)),n.br.compat.gap&&this.provideCompatGap!=null&&(e["--w-compat-gap"]=n.unitSize(this.provideCompatGap)),this.x.reverse&&(e["flex-direction"]=`${this.dir=="h"?"row":"column"}-reverse`),e}}}),Lt=s.defineComponent({name:"w-vertical",mixins:[rt],computed:{dir(){return"v"}}}),ei=s.defineComponent({name:"w-view",mixins:[Lt,Qe],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]}}}),Is=s.defineComponent({__name:"DialogTarget",setup(t){const e=s.inject("provideView",null),i=e&&e.provideView;return s.provide("provideView",i),(l,r)=>s.renderSlot(l.$slots,"default")}}),Me={},re=!0,oe=!1,ii={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"},Ys=["minWidth","maxWidth","minHeight","maxHeight"],Os=t=>typeof t=="string"&&t.split(",").map(e=>ii[e]||e).join(),tt=s.defineComponent({name:"w-dialog",mixins:[ei],props:{title:null,autoHide:null,context:null,prong:null,independent:null,timeout:null,cover:null,coverProps:null,position:null,snap:null,indent:null,offsetRange:null,local:null,fullScreen:null,hoverShowDrop:null,visible:null,minWidth:null,maxWidth:null,minHeight:null,maxHeight:null},emits:["show","close","update:visible"],data(){return{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(){return null},getLocalElem(){if(this.x.local===!0){let t=this.getCommander();return t&&n.el(t)}else return typeof this.x.local=="string"?document.querySelector(this.x.local):this.x.local},snapTargetElem(){let t=this.x.snap;return typeof t=="function"?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(typeof t=="string"||!t){let i=this.el();if(!i||this.x.fullScreen)return;let l=this.x.local,r=this.snapTargetElem(),o=i.offsetWidth,a=i.offsetHeight,h=this.x.indent!=null?this.x.indent:this.x.prong&&-9;if(e=n.snap(o,a,r,Os(t),this._fitpos,h,l&&r),!this.x.snap){let u=n.q(`[w-dialog-position="${e.type}"]:not([id="${this.uid}"]):last`)[0];if(u){let c=n(u)._pos;t=="tl"||t=="tr"||t=="t"?(e.top=c.top+c.height+5,e.bottom=c.bottom-c.height-5):t=="br"||t=="bl"||t=="b"?(e.top=c.top-c.height-5,e.bottom=c.bottom+c.height+5):t=="lb"||t=="lt"||t=="l"?(e.left=c.left+c.width+5,e.right=c.right-c.width-5):(t=="rb"||t=="rt"||t=="r")&&(e.left=c.left-c.width-5,e.right=c.right+c.width+5)}this.animateState="animating"}}this._pos=e,this.fixSnapStyle(),typeof this.x.position=="string"&&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(){this.x.visible!==!1&&(this.closeRelease(),this.trigger("close"),this.ownerView.removePop(this.uid),this.setVisible(!1))},closeRelease(){this.x.autoHide&&this.listenHide(oe);let t=this.x.position,e=this._pos;t&&typeof t=="string"&&e&&this.el()&&n.q(`~[w-dialog-position="${e.type}"]`,this.el()).each((l,r)=>{const o=n(r),a=o._pos;t=="tl"||t=="tr"||t=="t"?(a.top-=e.height+5,a.bottom+=e.height+5):t=="br"||t=="bl"||t=="b"?(a.top+=e.height+5,a.bottom-=e.height+5):t=="lb"||t=="lt"||t=="l"?(a.left-=e.width+5,a.right+=e.width+5):(t=="rb"||t=="rt"||t=="r")&&(a.left+=e.width+5,a.right-=e.width+5),o.fixSnapStyle()})},listenHide(t){t===oe?this.setListenHide(t):setTimeout(()=>{this.x.visible!==!1&&this.setListenHide(t)},100)},setListenHide(t){let e=this.x.hoverShowDrop,i=t?"addEventListener":"removeEventListener",l=n.br.firefox?"DOMMouseScroll":"mousewheel";if((n.br.mobile?["touchend"]:["mousedown",l]).forEach(o=>document[i](o,this.bind("listenHideClose",a=>{let h;this.x.visible!==!1&&(a.target.classList.contains("w-dialog-cover")||this.isForceWheelHide&&a.type===l||!(this.hasBubble(a.target)||!this.x.independent&&((h=this.getCommander()).isWidget?h.hasBubble(a.target):h.contains(a.target))))&&(a.target.id==this.id+"cvr"&&a.stopPropagation(),this.close())}),re)),window.plus&&plus.key[i]("backbutton",this.bind("close"),oe),e){let o=e===re?this.x.snap?this.snapTargetElem():n.el(this.getCommander()):n.el(e),a=this.bind("listenHideHoverOver",u=>{clearTimeout(this.hoverTimer),this.hoverTimer=null}),h=this.bind("listenHideHoverMove",u=>{!o.contains(u.target)&&!this.hasBubble(u.target)&&!this.keepHover?this.hoverTimer||(this.hoverTimer=setTimeout(()=>{this.close(),a()},200)):a()});[o,this.el()].forEach(u=>u&&u[i]("mouseenter",a)),document[i]("mousemove",h)}},autoSetMaxHeight(t){this.maxHeight==null&&(this.x.maxHeight=t)},setVisible(t){t=t??!0,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?this.$el.nodeType===3?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(){return 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=s.h("div",{class:"w-dialog-prong z-"+i},[s.h("i",{class:"w-dialog-prong-out f-arw f-arw-"+i+"5"}),s.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():n.x.dialogContainer||"#w-dfish-pops",e=null;if(this.x.cover&&this.x.visible!==!1&&!this.isDeactivated){let r={class:"w-dialog-cover f-abs-full",...this.scope_props};this.x.coverProps&&(r=s.mergeProps(r,this.x.coverProps)),e=s.h("div",r)}let i=[e,this.html_self(!0)],l=t?s.h(s.Teleport,{to:t},i):i;return this.slotTarget?[l,s.h(Is,null,{default:()=>[this.slotTarget()]})]:l}},computed:{commander(){return this.getCommander()},defaultSnapTargetElem(){},defaultSnapPosition(){return"cc"},isForceWheelHide(){return!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||Me).type,...this.scope_props}},html_class(){const t=this._pos||Me,e=this.x.position;return["w-vertical",this.html_align_class,this.html_scroll_class,{"z-hide":this.isDeactivated||(this.x.visible!=null?!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}`]:ii[e]&&typeof e=="string"&&this.animateState!="animating"}]},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&&typeof t=="object"?(n.extend(i,t),e&&(i.top==null&&i.bottom==null&&n.extend(i,n.lodash.pick(e,"top","bottom")),i.left==null&&i.right==null&&n.extend(i,n.lodash.pick(e,"left","right")))):e&&n.extend(i,e);for(let l in i)i[l]=n.unitSize(i[l]);return Ys.forEach(l=>{this.x[l]!=null&&(i[l]=n.unitSize(this.x[l]))}),i}}},mounted(){this.x.local&&n.q(this.getLocalElem()).addClass("f-dialog-local-wrap"),this.$nextTick(()=>{if(this.$watch(()=>this.x.position,this.axis),this.$watch(()=>this.x.visible,e=>{e!==!1&&this.x.autoHide&&this.listenHide(re),this.axis()},{immediate:!0}),setTimeout(()=>{this.axis(),this.$nextTick(()=>this.trigger("show"))}),this.slotTarget){let e=this.getTargetElem();e&&(this.hoverShowDrop?e.addEventListener("mouseenter",()=>this.visible==null&&this.setVisible(),!1):e.addEventListener("click",i=>{i.stopPropagation(),this.visible==null&&this.setVisible()},!1))}const t=e=>{this.x.visible===!1||this.animateState=="animating"||!this.el()||this.axis()};new pt(t).observe(this.el()),this.x.timeout&&setTimeout(this.close,this.x.timeout)})},unmounted(){this.x.visible!==!1&&this.closeRelease()}}),Rs=s.defineComponent({__name:"TemplateAlert",props:["text","escape","title","icon","button","showButton","yesText"],emits:["save","close"],setup(t,{emit:e}){const i=t,l=e,r={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=c=>{l("save",c)},a=c=>{l("close",c)},h=s.computed(()=>r[i.icon]||i.icon||r.info),u=s.computed(()=>i.yesText||"确定");return(c,p)=>{const f=s.resolveComponent("w-html"),m=s.resolveComponent("w-vertical"),v=s.resolveComponent("w-horizontal"),x=s.resolveComponent("w-img"),_=s.resolveComponent("w-button"),k=s.resolveComponent("w-buttonbar"),M=s.resolveDirective("dialog-move");return s.openBlock(),s.createBlock(m,{class:"w-alert-wrap"},{default:s.withCtx(()=>[s.createVNode(v,{class:"w-alert-head"},{default:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createBlock(m,{class:"w-alert-move","w-width":"*"},{default:s.withCtx(()=>[s.createVNode(f,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[M,!0]]),s.createVNode(f,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:s.withCtx(()=>[...p[0]||(p[0]=[s.createElementVNode("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])]),_:1})]),_:1}),s.createVNode(m,{class:"w-alert-body"},{default:s.withCtx(()=>[s.createVNode(v,{class:"w-alert-main"},{default:s.withCtx(()=>[s.createVNode(x,{class:"w-alert-icon",src:h.value},null,8,["src"]),s.renderSlot(c.$slots,"default",{width:"*"},()=>[t.escape?(s.openBlock(),s.createBlock(f,{key:0,width:"*",class:"w-alert-text"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.text),1)]),_:1})):(s.openBlock(),s.createBlock(f,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),t.showButton!==!1?(s.openBlock(),s.createBlock(k,{key:0,gap:"10",class:"w-alert-buttonbar"},{default:s.withCtx(()=>[t.button?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(t.button,V=>(s.openBlock(),s.createBlock(_,{face:V.face,class:s.normalizeClass(["w-alert-button",V.class]),text:V.text,onClick:V.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(s.openBlock(),s.createBlock(_,{key:1,face:"primary",class:"w-alert-button",text:u.value,onClick:o,ownproperty:!0},null,8,["text"]))]),_:1})):s.createCommentVNode("",!0)]),_:3})]),_:3})}}}),js=s.defineComponent({name:"w-alert",mixins:[tt],props:{text:null,title:null,escape:null,yes:null,no:null,button:null,showButton:null,yesText:null},methods:{x_default(){return{title:n.loc.opertip}},async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(i){console.error(i)}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 s.h(Rs,{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)}}}),qs=s.defineComponent({__name:"TemplateConfirm",props:["text","escape","title","icon","button","showButton","yesText","noText"],emits:["save","close"],setup(t,{emit:e}){const i=t,l=e,r={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=p=>{l("save",p)},a=p=>{l("close",p)},h=s.computed(()=>r[i.icon]||i.icon||r.question),u=s.computed(()=>i.yesText||"确定"),c=s.computed(()=>i.noText||"取消");return(p,f)=>{const m=s.resolveComponent("w-html"),v=s.resolveComponent("w-vertical"),x=s.resolveComponent("w-horizontal"),_=s.resolveComponent("w-img"),k=s.resolveComponent("w-button"),M=s.resolveComponent("w-buttonbar"),V=s.resolveDirective("dialog-move");return s.openBlock(),s.createBlock(v,{class:"w-alert-wrap"},{default:s.withCtx(()=>[s.createVNode(x,{class:"w-alert-head"},{default:s.withCtx(()=>[s.withDirectives((s.openBlock(),s.createBlock(v,{class:"w-alert-move","w-width":"*"},{default:s.withCtx(()=>[s.createVNode(m,{class:"w-alert-title",valign:"middle",height:"*",innerHTML:t.title},null,8,["innerHTML"])]),_:1})),[[V,!0]]),s.createVNode(m,{class:"w-alert-close",align:"center",valign:"middle",onClick:a},{default:s.withCtx(()=>[...f[0]||(f[0]=[s.createElementVNode("i",{class:"w-alert-close-icon f-i f-i-close"},null,-1)])]),_:1})]),_:1}),s.createVNode(v,{class:"w-alert-body"},{default:s.withCtx(()=>[s.createVNode(x,{class:"w-alert-main",valign:"middle"},{default:s.withCtx(()=>[s.createVNode(_,{class:"w-alert-icon",src:h.value},null,8,["src"]),s.renderSlot(p.$slots,"default",{width:"*"},()=>[t.escape?(s.openBlock(),s.createBlock(m,{key:0,width:"*",class:"w-alert-text"},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.text),1)]),_:1})):(s.openBlock(),s.createBlock(m,{key:1,width:"*",class:"w-alert-text",innerHTML:t.text},null,8,["innerHTML"]))])]),_:3}),s.createVNode(M,{gap:"10",class:"w-alert-buttonbar"},{default:s.withCtx(()=>[t.button?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(t.button,L=>(s.openBlock(),s.createBlock(k,{face:L.face,class:s.normalizeClass(["w-alert-button",L.class]),text:L.text,onClick:L.click,ownproperty:!0},null,8,["face","class","text","onClick"]))),256)):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[s.createVNode(k,{face:"primary",class:"w-alert-button",text:u.value,onClick:o,ownproperty:!0},null,8,["text"]),s.createVNode(k,{class:"w-alert-button",text:c.value,onClick:a,ownproperty:!0},null,8,["text"])],64))]),_:1})]),_:3})]),_:3})}}}),Ws=s.defineComponent({name:"w-confirm",mixins:[tt],props:{text:null,title:null,escape:null,yes:null,no:null,yesText:null,noText:null,button:null,showButton:null},methods:{x_default(){return{title:n.loc.opertip}},async onSave(t){let e;if(this.x.yes)try{e=await this.x.yes(t)}catch(i){console.error(i)}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 s.h(qs,{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)}}}),Us={class:"w-tip-body"},Xs={key:0,class:"w-tip-text"},Qs=["innerHTML"],Gs=s.defineComponent({__name:"TemplateTip",props:["text","escape"],setup(t){return(e,i)=>(s.openBlock(),s.createElementBlock("div",Us,[s.renderSlot(e.$slots,"text",{},()=>[t.escape?(s.openBlock(),s.createElementBlock("div",Xs,s.toDisplayString(t.text),1)):(s.openBlock(),s.createElementBlock("div",{key:1,class:"w-tip-text",innerHTML:t.text},null,8,Qs))])]))}});let It=null,xt={time:new Date().getTime(),list:[]};const Js=s.defineComponent({name:"w-tip",mixins:[tt],props:{face:null,text:null,escape:null},provide(){return{provideView:this.provideView}},methods:{x_default(){return{prong:!0,autoHide:!0,face:"normal",escape:!0}},html_slots_default(){return s.h(Gs,{text:this.x.text,escape:this.x.escape},this.$slots)},setVisibleSub(t){if(t)for(let e of xt.list)e!=this.uid&&n.close(e)}},computed:{isForceWheelHide(){return!0},slotTarget(){return this.$slots.default},defaultSnapTargetElem(){const t=this.commander;return t.snapElem?t.snapElem():t},defaultSnapPosition(){return"-t,-r,-b,-l,-tl,-tr,-rt,-tb,-bl,-br,-lt,-lb,c"}},mounted(){xt.time=new Date().getTime(),It&&n.close(It),It=this.uid,xt.list.push(this.uid)},unmounted(){It=null;let t=xt.list.indexOf(this.uid);t>-1&&xt.list.splice(t,1)}});let it=null;function Pe(){it&&(n.close(it),it=null)}function ze(t){return it&&(t.hasBubble(it.context)||it.hasBubble(t))}const he=s.defineComponent({name:"w-menu",mixins:[tt],provide(){return{provideMenu_w:this}},methods:{x_default(){return{autoHide:!0,independent:!1}},hasBubble(t,e){if(this.contains(t,e))return!0;let i=n(t).closest("w-menu,w-menubutton");if(i&&(i=i.parentMenu)&&i.rootCommander==this.rootCommander)return!0},arrow(t){let e=this.$refs.bbr.el(),i=n.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&&t.getCommander().$options.name==="w-menubutton";)t=t.getCommander().parentMenu;return t},setVisibleSub(t){t===!1&&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&&s.h("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(-1)},s.h("i",{class:"f-i f-i-caret-up"})),s.h(Lt,{class:"w-menu-bbr",height:"*",ref:"bbr",onwheel:this.mousewheel},this.$slots),this.x.maxHeight&&s.h("div",{class:"w-menu-arr f-oh",onclick:t=>this.arrow(1)},s.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(){return"-bl,-br,-tl,-tr"},scope_props(){if(this.rootCommander){let e=n(this.rootCommander).$.vnode.scopeId||this.$.vnode.scopeId||this.$.parent.vnode.scopeId;if(e)return{[`${e}`]:""}}}},mounted(){(!this.context||this.context.$options&&this.context.$options.name!=="w-menubutton")&&(it&&it.context!==this.context&&n.close(it),it=this)}}),Z=s.defineComponent({name:"w-img",pubParentName:"w-album",mixins:[A],inject:["providePubParent"],props:{src:null,text:null,square:null,imgWidth:null,imgHeight:null,dataUrl:null,vertical:null,disabled:null},data(){return{hover:!1}},methods:{x_default(){return{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("#"),l=this.$slots.default||(this.x.text?{default:()=>this.x.text}:null);return t=t||this.dataUrl,[t&&s.h("div",{class:"w-img-gut"},[e?s.h("i",{class:"w-img-icon "+t.replace(/\./g,"")}):i?s.h("svg",{class:"f-svg "+t.slice(1)},s.h("use",{"xlink:href":t})):s.h("img",{ref:"img",src:t,class:"w-img-icon",onerror:this.onerror}),this.$slots.cover&&s.h("div",{class:"w-img-cover f-abs-full"},this.$slots.cover())]),l&&s.h(Lt,{class:"w-img-description"},l)]}},computed:{isCurrent(){return this.pubParent&&this.pubParent.inCurrent(this)},html_props(){let t=n.unitSize(this.x.imgWidth?this.x.imgWidth:this.x.width),e=n.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`]:n.br.compat.gap},style:{"--w-img-icon-width":t,"--w-img-icon-height":e},onmouseenter:i=>!this.x.disabled&&(this.hover=!0),onmouseleave:i=>!this.x.disabled&&(this.hover=!1)}}}}),Ks=s.defineComponent({name:"w-loading",mixins:[tt],props:{text:null,icon:null},methods:{x_default(){return{}},html_slots(){return s.h(Z,{src:this.x.icon!==void 0?this.x.icon:"#f-svg-loading",text:this.x.text!==void 0?this.x.text:n.loc.loading})}},mounted(){this.resolve(this)}}),Zs=s.defineComponent({name:"w-table",mixins:[A],props:{face:null,"scroll-x":null,"scroll-y":null},provide(){return{_provideTable:this,provideLevel:-1,provideParentTR:null,provideTripleboxContainer:this}},data(){return{sticky:s.markRaw({left:null,right:null,observers:[]})}},methods:{observeSticky(){for(let e of this.sticky.observers)e.disconnect();let t=[];n.lodash.each(this.initFixedCells(),e=>{let i=new pt(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,l=n.lodash.map(this.$el.querySelector("thead").querySelectorAll(`td[w-fixed="${t}"]`));return t==="right"&&l.reverse(),l.forEach(r=>{(e||(e=[])).push({colIndex:r.cellIndex,offset:i}),i+=r.offsetWidth}),this.sticky[t]=e,l},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&&(i==="hidden"?(t.hiddens||(t.hiddens=[])).push(e):t[i]=e)}),t},colgroup(){return n.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"),n.br.chrome&&n.br.chrome<=60&&new pt(()=>{this.$el.setAttribute("w-compact-resize-sticky",""),requestAnimationFrame(()=>this.$el.removeAttribute("w-compact-resize-sticky"))}).observe(this.$el)}}),tl=s.defineComponent({name:"w-columns"}),el=s.defineComponent({name:"w-column",props:{width:null,minWidth:null}}),yt=s.defineComponent({props:{pub:null,current:null},provide(){return{providePubParent:this}},methods:{inCurrent(t){let e=this.x.current;if(e!=null)return Array.isArray(e)?-1<e.findIndex(i=>this.isCurrentChild(i,t)):this.isCurrentChild(e,t)},isCurrentChild(t,e){if(typeof t=="object"){let i=e.isWidget?(e.x||e).data:e.props&&e.props.data;if(i){for(let l in t)if(n.lodash.get(i,l)==t[l])return!0}}else if(t==(e.isWidget?e.getKey():e.key))return!0}}}),il={};function sl(t,e){return s.renderSlot(t.$slots,"default")}const Kt=nt(il,[["render",sl]]),si=s.defineComponent({name:"w-thead",mixins:[A,yt],props:{br:null,sort:null},inject:["_provideTable"],provide(){return{provideLeafLevel:-2,provideParentLeaf:null,provideInBody:!1,_provideThead:this,_provideTBody:!1}},data(){return{rows:null,sortUID:null}},methods:{isExpanded(){return!0},slot_rows(){if(this.$slots.row){let t,e=this.x.children;if(Array.isArray(e)){let i=0;t=e.map((l,r)=>{let o;const a=this.$slots.row({item:l,index:r}).map(h=>(h.props||(h.props={}),h.props.rowIndex=i++,o||(o=h.key),h));return o?s.h(Kt,{key:o},{default:()=>a}):a})}return t||[]}else return this.slots_children().map((t,e)=>n.lodash.set(t,"props.rowIndex",e))},html_tbody(){let t=this._provideTable.colgroup,e=this.slot_rows(),i={};if(!this._provideTable.fixed){let l=0;t.forEach(r=>{l+=n.number(r.width)||n.number(r["min-width"])}),l&&(i.minWidth=n.unitSize(l))}return this.rows=s.markRaw({}),s.h("div",{class:"w-table-tbl-wrap"},s.h("table",{ref:"table",cellpadding:0,cellspacing:0,class:"w-table-tbl",style:i},[s.h("thead",null,s.h("tr",null,t.map(l=>s.h("td",{style:{width:l.width=="*"?null:n.unitSize(l.width),minWidth:n.unitSize(l["min-width"])},"w-fixed":l.fixed})))),s.h("tbody",e)]))},html_slots(){return this.html_tbody()}},computed:{isEscape(){return this.x.escape}}}),ll=s.defineComponent({name:"w-tbody",mixins:[si,Et],inject:["_provideTable"],props:{children:null},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?!0:t.scrollY},{immediate:!0}),this.$watch("current",()=>this.viewCurrent())},methods:{getCurrent(){const t=n.q(".w-tr.z-on",this.el())[0];return t&&n(t)},viewCurrent(t){this.$nextTick(()=>{t=t||this.getCurrent(),t&&(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&&t=="left"||t=="center"||t=="right")&&e.setAttribute("w-scroll-x",t)},onScrollAttributeChange(t){let e=this._provideTable.el();e&&t.forEach(i=>{let l=i.attributeName;i.target.hasAttribute(l)?e.setAttribute(l,""):e.removeAttribute(l)})},html_slots(){return this.html_scroll_slots(this.html_tbody())}},computed:{inBody(){return!0},html_class(){return["w-vertical f-flex-1 f-oh",this.html_scroll_class]}}}),nl=s.defineComponent({name:"w-tr",pubParentName:"w-tbody,w-thead",mixins:[A,Gt],props:{rowIndex:null,expanded:null,children:null},inject:["_provideTable","providePubParent","provideInBody","_provideTBody","provideLevel","provideParentTR"],provide(){return{provideParentTR:this,provideLevel:this.provideLevel+1}},methods:{hasChild(){return n.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=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 l=i&&n(i);l?l.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(l=>{for(;e[t]&&e[t][i];)i+=e[t][i];if(l.dfishColIndex=i,l.props){if(l.props.rowspan>1)for(let r=1,o;r<l.props.rowspan;r++)o=e[t+r]||(e[t+r]={}),o[i]=n.number(l.props.colspan)||1;l.props.colspan>1&&(i+=l.props.colspan-1)}return i++,l})},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 l=this._provideTBody.$slots.row({item:t,index:e});for(let r of l)i||(i=r.key);return i?s.h(Kt,{key:i},{default:()=>l}):l})]:this.$slots.row?[this.html_self(!0),this.$slots.row()]:this.html_self()}},computed:{tagName(){return"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)}}),li=s.defineComponent({name:"w-td",props:{colspan:null,rowspan:null,align:null,valign:null,data:null},inject:["_provideTable","provideInBody"],methods:{td_props(){let t=this.$.vnode.dfishColIndex,e=this._provideTable.colgroup[t]||!1,i=this._provideTable.colgroup.length,l=this.colspan;return l==-1&&(l=i),{class:["w-td",t+(l||1)==i&&"w-td-lastborder",this.provideInBody&&e.class,e.fixed&&{[`w-td-fixed-${e.fixed}`]:!0,"w-td-fixed-left-last":e.fixed==="left"&&this._provideTable.colgroup[t+1]&&this._provideTable.colgroup[t+1].fixed!=e.fixed,"w-td-fixed-right-first":e.fixed==="right"&&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:l,rowspan:this.rowspan,align:this.align||e.align,valign:this.valign||e.valign}}},render(){return s.h("td",this.td_props(),this.$slots)}}),rl=s.defineComponent({name:"w-th",mixins:[li,A],props:{sortable:null,sortOrders:null,sortOrderDefault:null},inject:["_provideThead"],emits:["click:sort"],data(){return{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 l=this.x.sortOrders||["asc","desc",null];if(e==="toggle"){let r=l.indexOf(i);i=l[r<0||r==2?0:r+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 s.h(rt,{class:"w-th-wrap",valign:"middle",align:this.align||this.col.align},{default:()=>[s.h("div",{class:"w-th-title"},this.$slots),this.x.sortable?s.h("div",{class:"w-th-sort f-flex-column f-flex-center f-oh"},[s.h("i",{class:"f-i f-i-caret-up f-oh w-th-sort-up",onClick:t=>this.clickSort(t,"asc")}),s.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(){return"th"},html_props(){return s.mergeProps(this.td_props(),{class:{"z-sortable":this.x.sortable,[`z-${this.sortOrder}`]:this.sortOrder&&this._provideThead.sortUID==this.uid},onClick:this.onClick})}}}),ol={class:"'w-table-v2-th-text f-line-1"},al={class:"w-tree-loading w-table-v2-loading"},hl=["onClick"],ul=["onClick"],cl=["title"],dl={class:"'w-table-v2-td-text f-line-1"},pl={name:"w-table-v2"},fl=s.defineComponent({...pl,props:{alias:{type:Object,default(){return{}}},children:{type:Array,default(){return[]}},current:{type:[String,Number,Array]},itemHeight:{type:[String,Number],default:40},src:{type:Function},columns:{type:Array,default(){return[]}},loading:{type:Boolean}},emits:["click:item"],setup(t,{expose:e,emit:i}){const l=i,r=t,o=r.alias,a=r.itemHeight;let h=r.current;const u=o.value||"id";o.text;const c=o.children||"children",p=o.class||"class",f=Symbol("leaf"),m=s.ref(0),v=s.ref(0),x=s.ref([]),_=s.ref(),k=s.ref(),M=s.ref(),V=s.ref(!1),L=s.computed(()=>r.loading||V.value);s.provide("provideTripleboxContainer",s.getCurrentInstance());const P=s.computed(()=>({height:`${x.value.length*a}px`})),B=(d,y)=>{const g={};return!d.width||d.width=="*"?g.flex=1:g.width=n.unitSize(d.width),d.minWidth&&(g.minWidth=n.unitSize(d.minWidth)),g},F=(d,y)=>typeof p=="function"?p(d):d[p],I=d=>({height:`${a}px`,top:`${d[f].showIndex*a}px`}),E=d=>({paddingLeft:`${d[f].level*16}px`}),b=d=>H(d)?d.expanded?d.expandedIcon:d.collapsedIcon:d.icon,S=d=>d[f].loading,H=d=>d[c]&&d[c].length||d[f].src&&!d[f].loaded,N=d=>Array.isArray(r.current)?r.current.includes(d[u]):r.current===d[u];let T=!0,z;const R=(d,y)=>{T=!1,clearTimeout(z),z=setTimeout(()=>T=!0,500),l("click:item",d,y)},mt=(d,y)=>{d.stopPropagation(),X(y)},X=async(d,y)=>{if(typeof d=="string"&&(d=G(d)),!d)return;const g=d[f];if(!g.loading)if(d.expanded=y??!d.expanded,d.expanded)if(d[c]){const w=x.value.indexOf(d),C=Q(d[c],d),$=x.value.slice(0,w+1),Y=x.value.slice(w+1);x.value=$.concat(C,Y)}else g.src&&!g.loaded&&(g.loading=!0,await g.src().catch(()=>{}),g.loading=!1,g.loaded=!0,X(d,d.expanded));else{const w=x.value.indexOf(d),C=_t(d[c]),$=x.value.slice(0,w+1),Y=x.value.slice(w+1+C);x.value=$.concat(Y)}},Zt=d=>{v.value!==d.target.scrollTop&&(v.value=d.target.scrollTop)},te=()=>{St()},Q=(d,y)=>{let g=[];return d&&d.forEach(w=>{g.push(w);const C=w[f];C||(w[f]={level:y?y[f].level+1:0,parent:y,src:r.src&&r.src(w)}),w[c]&&w[c].length?w.expanded?g=g.concat(Q(w[c],w)):C||Q(w[c],w):w.expanded&&w[f].src&&s.nextTick(()=>X(w,!0))}),g},_t=d=>{let y=0;for(let g of d)y++,g[c]&&g.expanded&&(y+=_t(g[c]));return y},G=(d,y)=>{y||(y=r.children);for(let g of y){if(g[u]===d)return g;if(g[c]&&g[c].length){const w=G(d,g[c]);if(w)return w}}},kt=d=>{const y=G(d);if(y){let g=y,w=g;for(;g=g[f].parent;)g.expanded||(g.expanded=!0,w=g);w&&w!=y&&X(w,!0)}return y},ee=d=>{if(!Array.isArray(d))return[];const y=JSON.parse(JSON.stringify(r.children));Ct(d,y),r.children.length=0,r.children.push.apply(r.children,d),x.value=Q(d)},Ct=(d,y)=>{for(let g of d){let w=y.find(C=>C[u]===g[u]);w&&(w[c]&&(g[c]?Ct(g[c],w[c]):g[c]=w[c]),w.expanded!=null&&(g.expanded=w.expanded))}},J=s.computed(()=>{const d=Math.floor(v.value/a);return x.value.slice(d,d+m.value).map((g,w)=>(g[f].showIndex=w+d,g))}),St=()=>{M.value=k.value.el("wScrollOverflow").getBoundingClientRect(),m.value=Math.ceil(M.value.height/a)+1},$t=async d=>{J.value.find(g=>d===g[u])||kt(d);const y=J.value.findIndex(g=>d===g[u]);if(y===-1||y===J.value.length-1){const g=G(d),w=x.value.indexOf(g);w>-1&&(await s.nextTick(),_.value.scrollToY((w+1)*a-M.value.height/2))}},Vt=async d=>{if(await s.nextTick(),h=d,d=d&&n.arrayID(d),!(!d||!d.length)){for(let y of d)J.value.find(g=>y===g[u])||kt(y);T&&$t(d[0])}};return s.onMounted(async()=>{if(s.watch(()=>k.value.wScrollSizeY,d=>{St()},{immediate:!0}),s.watch(()=>r.children,d=>{x.value=Q(d),h&&h==r.current&&Vt(r.current)},{immediate:!0}),s.watch(()=>r.current,Vt,{deep:!0}),!r.children||r.children.length==0){const d=r.src&&r.src();d&&(V.value=!0,await d().catch(()=>{}),V.value=!1)}}),e({toggle:X,focus:$t,find:G,merge:ee}),(d,y)=>{const g=s.resolveComponent("w-horizontal"),w=s.resolveComponent("w-img"),C=s.resolveComponent("w-vertical");return s.openBlock(),s.createBlock(C,{ref_key:"root",ref:_,class:"w-table-v2"},{default:s.withCtx(()=>[s.createVNode(g,{class:"w-table-v2-thead",style:s.normalizeStyle({height:`${s.unref(a)}px`})},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.columns,($,Y)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["w-table-v2-th",{[`z-align-${$.align}`]:$.align}]),style:s.normalizeStyle(B($)),key:Y},[s.createElementVNode("div",ol,s.toDisplayString($.text),1)],6))),128))]),_:1},8,["style"]),s.createVNode(C,{ref_key:"wrap",ref:k,height:"*",class:"w-table-v2-tbody","scroll-y":!0,onScroll:Zt,onResize:te},{default:s.withCtx(()=>[L.value?s.renderSlot(d.$slots,"loading",{},()=>[s.createElementVNode("div",al,[s.createVNode(w,{src:"#f-svg-loading-1",width:"28",height:"28"})])],void 0,0):(s.openBlock(),s.createElementBlock("div",{key:1,class:"w-table-v2-wrap",style:s.normalizeStyle(P.value)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(J.value,($,Y)=>(s.openBlock(),s.createElementBlock("div",{key:Y,class:s.normalizeClass(["w-table-v2-tr",F($),{"z-on":N($)}]),style:s.normalizeStyle(I($)),onClick:K=>R(K,$)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.columns,(K,ce)=>(s.openBlock(),s.createElementBlock("div",{key:ce,class:s.normalizeClass(["w-table-v2-td",{[`z-align-${K.align}`]:K.align}]),style:s.normalizeStyle(B(K))},[K.type=="leaf"?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["w-leaf",{"z-folder":H($)}]),style:s.normalizeStyle(E($))},[S($)?(s.openBlock(),s.createBlock(w,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["w-leaf-toggle f-i",$.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:wi=>mt(wi,$)},null,10,ul)),b($)?(s.openBlock(),s.createBlock(w,{key:2,src:b($),class:"w-leaf-icon"},null,8,["src"])):s.createCommentVNode("",!0),s.createElementVNode("div",{class:"w-leaf-text f-line-1",title:$[K.field]},s.toDisplayString($[K.field]),9,cl)],6)):s.renderSlot(d.$slots,K.field,{item:$,rowIndex:Y,column:K,colIndex:ce},()=>[s.createElementVNode("div",dl,s.toDisplayString($[K.field]),1)],void 0,1)],6))),128))],14,hl))),128))],4))]),_:3},512)]),_:3},512)}}}),ml=s.defineComponent({name:"w-grid",mixins:[Et],props:{columns:null,rows:null,gap:null,defaultColspan:null,face:null,labelWidth:null},methods:{x_default(){return{columns:12,gap:0,face:"normal"}},html_slots(){return this.x.scrollX||this.x.scrollY?this.html_scroll_slots():s.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":n.unitSize(this.x.labelWidth)}}},html_scroll_cont_style(){let t=this.x.columns;n.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;n.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?n.unitSize(this.x.gap):"","--w-grid-colspan":i==-1||!i?"":`span ${i}`}}}}),ni=s.defineComponent({name:"w-swiper",mixins:[A,yt],props:{arrow:null,indicatorDots:null,duration:null},data(){return{focusIndex:null}},watch:{current(t){this.setFocus(t)}},methods:{setFocus(t){let i=this.slots_children().findIndex(l=>this.isCurrentChild(t,l));this.focusIndex=i},getCurrentItem(){if(this.el()){let t=n.q(">.w-swiper-cont>.w-swiper-item",this.el())[this.focusIndex];return t&&n(t)}},clickArrow(t){this.focusIndex+=t},clickIndicator(t){this.focusIndex=t},html_slots(){this.focusIndex==null&&this.setFocus(this.x.current);let t=this.x.vertical,e=t?"up":"left",i=t?"down":"right";return[s.h("div",{class:"w-swiper-cont",id:this.uid+"cont"},this.$slots),this.x.arrow&&s.h("div",{class:"w-swiper-arrow z-"+e,onclick:l=>this.clickArrow(-1)},s.h("i",{class:"f-i f-i-angle-"+e})),this.x.arrow&&s.h("div",{class:"w-swiper-arrow z-"+i,onclick:l=>this.clickArrow(1)},s.h("i",{class:"f-i f-i-angle-"+i})),this.x.indicatorDots&&s.h("div",{class:"w-swiper-indicator f-flex-center"},this.slots_children().map((l,r)=>s.h("div",{class:"w-swiper-indicator-dot"+(r==this.focusIndex?" z-on":""),onclick:o=>this.clickIndicator(r)})))]}},computed:{html_class(){let t=this.focusIndex;return{"z-at-first":t==0,"z-at-last":t>-1&&t==this.slots_children().length-1}},html_style(){return{"--w-swiper-translate-x":-this.focusIndex*100+"%","--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})}}),ri=s.defineComponent({name:"w-swiper-item",pubParentName:"w-swiper",inject:["providePubParent"],mixins:[A],props:{lazy:null},data(){return{loaded:!1}},methods:{x_default(){return{lazy:!0}},html_slots(){if(this.loaded||!this.lazy)return this.$slots;if(this.isCurrent)return this.loaded=!0,this.$slots}},computed:{html_class(){return{"z-on":this.isCurrent}},isCurrent(){return this.pubParent.inCurrent(this)}}}),Ft=s.defineComponent({name:"w-buttonbar",mixins:[rt,yt],props:{vertical:null},emits:["click:item"],methods:{x_default(){return{gap:0,valign:this.vertical?null:"middle"}},html_slots(){let t=this.slots_children(),e=t.concat(),i=this.$slots.split;if(i)for(let l=t.length-1;l>0;l--)e.splice(l,0,i);return this.html_scroll_slots(e)}},computed:{dir(){return this.x.vertical?"v":"h"},html_class(){return[this.x.vertical?"w-vertical":"w-horizontal"]}}}),oi=s.defineComponent({pubParentName:"w-buttonbar",mixins:[A],props:{text:null,icon:null,focusIcon:null,dropIcon:null,focusDropIcon:null,arrowIcon:null,face:null,target:null,closable:null,dropToggle:null,loading:null,disabled:null,vertical:null,hoverShowDrop:null,dropProps:null,showArrowIcon:null},inject:["providePubParent","provideMenu_w"],emits:["click:close","dropClose"],data(){return{dropper:null,showDrop:!1,mouses:{onmouseenter:t=>{this.showDrop||(this.pubParent&&ze(this.pubParent)&&!ze(this)&&Pe(),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&&n.q(".z-hv",this.el()).removeClass("z-hv")}},methods:{setLoading(t){t=t??!0,this.x.loading=t},drop(){this.hasChild?this.showDrop=!0:Pe()},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:n.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=s.mergeProps(t,this.x.dropProps)),s.h(s.resolveComponent("w-menu"),t,this.$slots)}else return[]},html_slots(){let t=this.x.text,e=[];if(this.x.loading&&e.push(s.h("div",{class:"w-button-loading f-abs-full f-flex-center"},s.h(Z,{src:"#f-svg-loading"}))),this.x.icon){let i=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(i,"w-button-icon f-flex-center"+(this.x.vertical?"":" f-height")))}if(t){const i=this.pubParent&&this.pubParent.x.flexSize&&t;e.push(s.h("div",{class:"w-button-text"},s.h("span",{class:"w-button-text-line f-line-1",title:i||""},t)))}return this.isMore&&this.x.showArrowIcon&&e.push(s.h(Z,{class:"w-button-more f-flex-center f-height",src:this.x.arrowIcon||".f-i .f-i-caret-down"})),this.x.closable&&e.push(s.h("div",{class:"w-button-close f-flex-center"},s.h("i",{class:"w-button-close-icon f-i f-i-close",onclick:this.clickClose}))),[s.h("div",{class:"w-button-main f-oh f-height",...this.isCombo&&!this.isDisabled&&this.mouses},e),this.isCombo&&s.h(Z,{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(){return"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}}}}),ai=s.defineComponent({name:"w-menubutton",mixins:[oi],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,l=i&&i.startsWith(".")&&!i.includes("/");if(e.push(!i||l?s.h("i",{class:"w-menubutton-icon f-flex-center f-height "+(i?i.replace(/\./g,""):"")}):s.h("img",{src:i,class:"w-menubutton-icon f-flex-center f-height"})),t&&e.push(s.h("div",{class:"w-menubutton-text f-line-1"},t)),this.x.closable&&e.push(s.h("div",{class:"w-menubutton-close"},s.h("i",{class:"w-menubutton-close-icon f-i f-i-close",onclick:this.clickClose}))),e.push(s.h(Z,{class:"w-menubutton-drop f-flex-center f-height",src:this.isMore?this.x.arrowIcon||".f-i .f-i-caret-right":""})),this.showDrop){let r={autoHide:!0,context:this,ownproperty:!0,snap:()=>this.el(),position:"21,12",indent:{top:1,bottom:1},onClose:()=>this.showDrop=null};this.x.dropProps&&(r=s.mergeProps(r,this.x.dropProps)),e.push(s.h(s.resolveComponent("w-menu"),r,this.$slots))}return e}},computed:{tagName(){return"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}}}}),st=s.defineComponent({name:"w-button",mixins:[oi],props:{autoMenuButton:null},methods:{x_default(){return{showArrowIcon:!0,autoMenuButton:!0}}},render(){return this.provideMenu_w&&this.x.autoMenuButton?s.h(ai,this.$props,this.$slots):this.html()}}),gl=s.defineComponent({name:"w-tabbar",mixins:[Ft],props:{vertical:null,arrow:null,quickCloseButton:null,flexSize:null,buttons:null},emits:["click:item","click:quickCloseButton"],data(){return{resizeObserver:1,isMouseEnter:!1,runButtonFlexWidth:null,runArrow:!1,isClickCloseLastChild:!1}},methods:{onScrollResize(t){this.resizeObserver++},clickArrow(t){this.scrollToX(`left${t*240}`,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=n(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=s.h(s.TransitionGroup,{name:"w-tabbar",onBeforeEnter:this.onBeforeEnter,onAfterEnter:this.onAfterEnter,onBeforeLeave:this.onBeforeLeave,onAfterLeave:this.onAfterLeave},{default:()=>this.buttons}),e=[s.h(this.x.vertical?Lt:rt,{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(s.h("div",{ref:"append",class:"w-tabbar-append"},this.slot("append"))),this.x.arrow&&(e.unshift(s.h("div",{class:"w-tabbar-arrow-start",onClick:()=>this.clickArrow(-1)},s.h("i",{class:"f-i f-i-caret-left"}))),e.push(s.h("div",{class:"w-tabbar-arrow-end",onClick:()=>this.clickArrow(1)},s.h("i",{class:"f-i f-i-caret-right"})))),this.x.quickCloseButton){let i=!this.buttons.find(l=>l.props.closable);this.buttons.length&&e.push(s.h(st,{ref:"quickCloseButton",data:{isQuickCloseButton:!0},showArrowIcon:!1,icon:".f-i .f-i-close",class:"w-tabbar-quickclosebutton",onClick:this.closeAll,disabled:i,title:"关闭全部标签"}))}return this.html_scroll_slots(e)}},computed:{hasScrollX(){return this.x.arrow&&this.dir==="h"||this.x.scrollX},showArrow(){if(this.x.arrow)if(this.x.flexSize){let t=this.buttonCalcWidth;return t&&t<this.x.flexSize[0]}else 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 i=this.el().clientWidth;return t&&(i-=40),this.x.quickCloseButton&&(i-=20),this.$refs.append&&(i-=this.$refs.append.offsetWidth),i}},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=n.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 i=this.el();i&&i.setAttribute("w-tabbar-flex-all","")},150)})},{immediate:!0})}}}),xl=s.defineComponent({name:"w-tabbutton",pubParentName:"w-tabbar",mixins:[st],methods:{vis(){let t=[20,20];this.pubParent.x.quickCloseButton&&(t[1]+=20),this.scrollIntoView({x:`nearest${t}`,y:null})}},computed:{html_class(){return"w-button"}},mounted(){this.$watch("isCurrent",t=>t&&this.vis(),{immediate:!0})}}),wl=s.defineComponent({name:"w-tabs",mixins:[A],props:{current:null,position:null,gap:null,face:null,quickCloseButton:null,flexSize:null},emits:["click:quickCloseButton"],methods:{x_default(){return{position:"top",face:"line",gap:-1}},clickTab(t){const e=n(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((l,r)=>{(!l.props||l.props.key==null)&&n.lodash.set(l,"props.key",r),t.push(s.h(xl,l.props)),e.push(s.h(ri,{lazy:l.props.lazy==null?!0:l.props.lazy,key:l.props.key},l.children))}),[s.h(gl,{ref:"tabBar",class:"w-tabs-buttonbar",current:this.x.current,gap:this.x.gap,vertical:i=="left"||i=="right",arrow:!0,flexSize:this.x.flexSize,quickCloseButton:this.x.quickCloseButton,"onClick:item":this.clickTab,"onClick:quickCloseButton":this.clickQuickCloseButton,buttons:t},this.$slots),s.h(ni,{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"+(t=="top"||t=="bottom"?"-column":"")+" z-pos-"+t+" z-face-"+this.x.face}}}),vl=s.defineComponent({name:"w-tab"}),bl=s.defineComponent({name:"w-album",mixins:[rt,yt],methods:{x_default(){return{gap:0,br:!0,valign:"top"}}},computed:{html_class(){return"w-horizontal"}}}),yl=s.defineComponent({name:"w-html",mixins:[A,Nt],props:{line:null},computed:{html_props(){let t=this.x.line;return{class:[(this.x.align||this.x.valign)&&"w-horizontal",t!=null&&"f-line",this.html_align_class],style:t!=null&&{"-webkit-line-clamp":t}}}}}),_l=s.defineComponent({name:"w-tree",mixins:[Et,yt,Gt],emits:["click:item"],provide(){return{provideLevel:-1,provideParentLeaf:null,provideParentTR:null,provideTripleboxContainer:this}},methods:{load(){return this.request()},getCurrent(){const t=n.q(".w-leaf.z-on",this.el())[0];return t&&n(t)},viewCurrent(t){this.$nextTick(()=>{t=t||this.getCurrent(),t&&(t.expandToView(),this.$nextTick(()=>t.scrollIntoView()))})},html_slots(){let t;if(this.loading){const e=this.slot("loading");t=e&&e.length?e:s.h("div",{class:"w-tree-loading"},s.h(Z,{src:"#f-svg-loading-1",width:28,height:28}))}else{let e=this.x.children;this.$slots.default&&(Array.isArray(e)?t=e.map((i,l)=>{let r;const o=this.$slots.default({item:i,index:l});for(let a of o)r||(r=a.key);return r?s.h(Kt,{key:r},{default:()=>o}):o}):t=[])}return this.html_scroll_slots(t)}},computed:{level(){return-1},html_props(){return{class:this.html_scroll_class}}},mounted(){(!this.x.children||!this.x.children.length)&&this.request()}}),kl={class:"w-tree-loading w-tree-v2-loading"},Cl=["onClick"],Sl=["onClick"],$l={class:"w-leaf-text f-line-1"},Vl=["title"],Tl={name:"w-tree-v2"},Ml=s.defineComponent({...Tl,props:{alias:{type:Object,default(){return{}}},children:{type:Array,default(){return[]}},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 l=i,r=t,o=r.alias,a=r.itemHeight;let h=r.current;const u=o.value||"id",c=o.text||"text",p=o.children||"children",f=o.class||"class",m=o.disabled||"disabled",v=Symbol("leaf"),x=s.ref(0),_=s.ref(0),k=s.ref([]),M=s.ref(),V=s.ref(),L=s.ref(!1),P=s.computed(()=>r.loading||L.value);s.provide("provideTripleboxContainer",s.getCurrentInstance);const B=s.computed(()=>({height:`${k.value.length*a}px`})),F=(d,y)=>typeof f=="function"?f(d,y):d[f],I=d=>({height:`${a}px`,top:`${d[v].showIndex*a}px`,paddingLeft:`${d[v].level*16}px`}),E=d=>S(d)?d.expanded?d.expandedIcon:d.collapsedIcon:d.icon,b=d=>d[v].loading,S=d=>d[p]&&d[p].length||d[v].src&&!d[v].loaded,H=d=>Array.isArray(r.current)?r.current.includes(d[u]):r.current===d[u],N=(d,y)=>typeof m=="function"?m(d,y):d[m];let T=!0,z;const R=(d,y)=>{N(y)||(T=!1,clearTimeout(z),z=setTimeout(()=>T=!0,500),l("click:item",d,y))},mt=(d,y)=>{d.stopPropagation(),X(y)},X=async(d,y)=>{if(typeof d=="string"&&(d=G(d)),!d)return;const g=d[v];if(!g.loading)if(d.expanded=y??!d.expanded,d.expanded)if(d[p]){const w=k.value.indexOf(d),C=Q(d[p],d),$=k.value.slice(0,w+1),Y=k.value.slice(w+1);k.value=$.concat(C,Y)}else g.src&&!g.loaded&&(g.loading=!0,await g.src().catch(()=>{}),g.loading=!1,g.loaded=!0,X(d,d.expanded));else{const w=k.value.indexOf(d),C=_t(d[p]),$=k.value.slice(0,w+1),Y=k.value.slice(w+1+C);k.value=$.concat(Y)}},Zt=d=>{_.value!==d.target.scrollTop&&(_.value=d.target.scrollTop)},te=()=>{St()},Q=(d,y)=>{let g=[];return d&&d.forEach(w=>{g.push(w);const C=w[v];C||(w[v]={level:y?y[v].level+1:0,parent:y,src:r.src&&r.src(w)}),w[p]&&w[p].length?w.expanded?g=g.concat(Q(w[p],w)):C||Q(w[p],w):w.expanded&&w[v].src&&s.nextTick(()=>X(w,!0))}),g},_t=d=>{let y=0;for(let g of d)y++,g[p]&&g.expanded&&(y+=_t(g[p]));return y},G=(d,y)=>{if(d&&d[v])return d;y||(y=r.children);for(let g of y){if(g[u]===d)return g;if(g[p]&&g[p].length){const w=G(d,g[p]);if(w)return w}}},kt=d=>{const y=G(d);if(y){let g=y,w=g;for(;g=g[v].parent;)g.expanded||(g.expanded=!0,w=g);w&&w!=y&&X(w,!0)}return y},ee=d=>{if(!Array.isArray(d))return[];const y=JSON.parse(JSON.stringify(r.children));Ct(d,y),r.children.length=0,r.children.push.apply(r.children,d),k.value=Q(d)},Ct=(d,y)=>{for(let g of d){let w=y.find(C=>C[u]===g[u]);w&&(w[p]&&(g[p]?Ct(g[p],w[p]):g[p]=w[p]),w.expanded!=null&&(g.expanded=w.expanded))}},J=s.computed(()=>{const d=Math.floor(_.value/a);return k.value.slice(d,d+x.value).map((g,w)=>(g[v].showIndex=w+d,g))}),St=()=>{V.value=M.value.el("wScrollOverflow").getBoundingClientRect(),x.value=Math.ceil(V.value.height/a)+1},$t=async d=>{await s.nextTick(),J.value.find(g=>d===g[u])||kt(d);const y=J.value.findIndex(g=>d===g[u]);if(y===-1||y===J.value.length-1){const g=G(d),w=k.value.indexOf(g);w>-1&&(await s.nextTick(),M.value.scrollToY((w+1)*a-V.value.height/2))}},Vt=async d=>{if(await s.nextTick(),h=d,d=d&&n.arrayID(d),!(!d||!d.length)){for(let y of d)J.value.find(g=>y===g[u])||kt(y);T&&$t(d[0])}};return s.onMounted(async()=>{if(s.watch(()=>M.value.wScrollSizeY,d=>{St()},{immediate:!0}),s.watch(()=>r.children,d=>{k.value=Q(d),h&&h==r.current&&Vt(r.current)},{immediate:!0}),s.watch(()=>r.current,Vt,{deep:!0}),!r.children||r.children.length==0){const d=r.src&&r.src();d&&(L.value=!0,await d().catch(()=>{}),L.value=!1)}}),e({toggle:X,focus:$t,find:G,merge:ee}),(d,y)=>{const g=s.resolveComponent("w-img"),w=s.resolveComponent("w-vertical");return s.openBlock(),s.createBlock(w,{ref_key:"root",ref:M,class:"w-tree w-tree-v2","scroll-y":!0,onScroll:Zt,onResize:te},{default:s.withCtx(()=>[P.value?s.renderSlot(d.$slots,"loading",{},()=>[s.createElementVNode("div",kl,[s.createVNode(g,{src:"#f-svg-loading-1",width:"28",height:"28"})])],void 0,0):(s.openBlock(),s.createElementBlock("div",{key:1,class:"w-tree-v2-wrap",style:s.normalizeStyle(B.value)},[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(J.value,(C,$)=>(s.openBlock(),s.createElementBlock("div",{key:$,class:s.normalizeClass(["w-leaf w-leaf-v2",F(C,$),{"z-folder":S(C),"z-on":H(C),"z-ds":N(C,$)}]),style:s.normalizeStyle(I(C)),onClick:Y=>R(Y,C)},[b(C)?(s.openBlock(),s.createBlock(g,{key:0,src:"#f-svg-loading",class:"w-leaf-loading"})):(s.openBlock(),s.createElementBlock("div",{key:1,class:s.normalizeClass(["w-leaf-toggle f-i",C.expanded?"f-i-caret-down":"f-i-caret-right"]),onClick:Y=>mt(Y,C)},null,10,Sl)),s.renderSlot(d.$slots,"box",{item:C}),E(C)?(s.openBlock(),s.createBlock(g,{key:2,src:E(C),class:"w-leaf-icon"},null,8,["src"])):s.createCommentVNode("",!0),s.createElementVNode("div",$l,[s.renderSlot(d.$slots,"text",{item:C},()=>[s.createElementVNode("span",{title:C[s.unref(c)]},s.toDisplayString(C[s.unref(c)]),9,Vl)])])],14,Cl))),128))],4))]),_:3},512)}}}),Pl=s.defineComponent({name:"w-leaf",pubParentName:"w-tree",mixins:[A,Gt],props:{text:null,expanded:null,expandedIcon:null,collapsedIcon:null,icon:null,boxSync:null,src:null,disabled:null},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(t===!0||Array.isArray(t)&&t.length)return!0},childrenList(){return n.lodash.map(this.$refs.cont.querySelectorAll(":scope > .w-leaf"),t=>n(t))},getInitLoaded(){return!!(this.hasChild()||!this.getSrc())},isExpanded(){return this.provideParentTR?this.provideParentTR.isExpanded():this.x.expanded},setExpanded(t){this.x.expanded=t??!this.x.expanded},isFolder(){return this.hasChild()?!0:!!(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||this.boxProxy.$options.name!=="w-triplebox")return;let t=this;for(;(t=t.provideParentLeaf)&&t.$options.name==="w-leaf";)if(t.boxProxy){let i=t.childrenList(),l=[0,0,0],r=i.length;i.forEach(o=>{let a=o.boxProxy;a&&l[a.checkstate()]++}),t.boxProxy.check(l[0]===r?0:l[1]===r?1:2)}let e=this.boxProxy.checkstate();e!=2&&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 s.h("div",s.mergeProps(this.html_attrs,this.html_props,this.$attrs),[this.loading?s.h(Z,{src:"#f-svg-loading",class:"w-leaf-loading"}):s.h("div",{ref:"toggle",class:["w-leaf-toggle f-i",t?"f-i-caret-down":"f-i-caret-right"],onclick:i=>{i.stopPropagation(),this.toggle()}}),this.$slots.box&&this.$slots.box(),e&&s.h(Z,{src:e,class:"w-leaf-icon"}),s.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((l,r)=>{let o;const a=i.$slots.default({item:l,index:r});for(let h of a)o||(o=h.key);return o?s.h(Kt,{key:o},{default:()=>a}):a})),s.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,l={class:{"z-on":this.isCurrent,"z-ds":i,"z-folder":e,"z-expanded":e&&t,"z-collapse":e&&!t},style:"padding-left:"+n.unitSize(this.level*16)};return this.pubParent&&(l.onmouseenter=this.onmouseenter,l.onmouseleave=this.onmouseleave,l.onclick=this.onclick),l}},mounted(){this.x.expanded&&this.toggle(!0),this.isCurrent&&this.pubParent.viewCurrent(this)}}),zl=s.defineComponent({name:"w-pagebar",mixins:[Ft],emits:["click:item"],props:{limit:null,size:null,offset:null,buttonCount:null,noFirstLast:null,face:null,jump:null},data(){return{isJumpFocus:!1,showDrop:!1}},methods:{x_default(){return{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,n.number(this.$refs.jumpInput.value));this.clickItem(t,e)},html_button(t,e,i,l){return s.h("button",{class:["w-pagebar-button w-pagebar-num",{"z-on":!e&&!i&&t==this.currentPage,"z-ds":l,[i]:i}],disabled:l,onclick:r=>this.clickItem(r,t)},e||(i?"":t))},html_slots(){return this.x.face==="button"?this.html_face_button():this.x.face==="simple"?this.html_face_simple():this.html_face_normal()},html_buttons(){return[s.h(st,{class:"w-pagebar-button w-pagebar-prev",icon:".f-i .f-i-angle-left",disabled:this.currentPage==1,title:n.loc.page_text.prev,onclick:t=>this.clickItem(t,this.currentPage-1)}),s.h(st,{class:"w-pagebar-button w-pagebar-next",icon:".f-i .f-i-angle-right",disabled:this.currentPage==this.sumPage,title:n.loc.page_text.next,onclick:t=>this.clickItem(t,this.currentPage+1)})]},html_drop(){let t=[];if(this.x.buttonCount&&t.push(s.h(st,{class:"w-pagebar-button w-pagebar-button-count w-pagebar-prev",ref:"drop",text:this.currentPage+"/"+this.sumPage,onclick:e=>this.clickDrop(e)})),this.showDrop){let e=[];for(let i=1,l=this.sumPage;i<=l;i++)e.push(s.h(st,{text:i,onClick:r=>this.clickItem(r,i)}));t.push(s.h(he,{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,l=n.number(this.x.buttonCount),r=Math.max(1,i-Math.ceil(l/2)+1),o=Math.min(e+1,r+l),a=o-r<l?Math.max(1,o-l):r;this.x.noFirstLast||t.push(this.html_button(1,this.labelFirst,this.iconFirst,i==1)),t.push(this.html_button(i-1,this.labelPrev,this.iconPrev,i==1));for(let h=a;h<o;h++)t.push(this.html_button(h));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(s.h("span",{class:"w-pagebar-jump-to"},n.loc.to)),t.push(s.h("input",{class:"w-pagebar-jump-input",ref:"jumpInput",onfocus:h=>this.isJumpFocus=!0,onblur:h=>this.isJumpFocus=!1,onkeydown:h=>h.keyCode==13&&this.onJumpClick(h)})),t.push(s.h("button",{class:"w-pagebar-button w-pagebar-jump-button",onclick:this.onJumpClick},"GO")),t.push(s.h("span",{class:"w-pagebar-jump-page"},n.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 this.x.face==="normal"?n.loc.page_text.first:""},labelLast(){return this.x.face==="normal"?n.loc.page_text.last:""},labelNext(){return this.x.face==="normal"?n.loc.page_text.next:""},labelPrev(){return this.x.face==="normal"?n.loc.page_text.prev:""},iconFirst(){return this.x.face==="mini"?"f-i f-i-angle-first":""},iconLast(){return this.x.face==="mini"?"f-i f-i-angle-last":""},iconNext(){return this.x.face==="mini"?"f-i f-i-angle-right":""},iconPrev(){return this.x.face==="mini"?"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"]}}}),Dl=s.defineComponent({name:"w-split",mixins:[A],props:{collapsedIcon:null,expandedIcon:null,movable:null,range:null,toNext:null,expanded:null},inject:["provideLayout"],created(){this.$watch("expanded",t=>{typeof t=="boolean"?this.x.expanded=t:this.x.expanded==null&&(this.x.expanded=!0)},{immediate:!0})},methods:{toggle(t){this.x.expanded=t??!this.x.expanded;let e=this.x.toNext?this.el().nextElementSibling:this.el().previousElementSibling;e&&n.q(e).toggleClass("f-split-collapsed",!this.x.expanded)},dragstart(t){let e=this.el().previousElementSibling,i=this.el().nextElementSibling;if(e&&i){let l=this.inVertical,r=this.x.toNext?i:e,o=n.eventX(t),a=n.eventY(t),h=l?"top":"left",u=l?"height":"width",c=l?"clientY":"clientX",p=l?a:o,f=n.bcr(e)[h],m=n.bcr(i)[l?"bottom":"right"]-5,v=n.lodash.pick(n.bcr(this.$refs.movable),["width","height","top","left"]),x,_;n.moveup(k=>{_||(_=n.q('<div style="position:absolute;background:rgba(0,0,0,.3);z-index:101;"></div>').css(v).appendTo(document.body)),x=n.numRange(v[h]+k[c]-p,f,m),_.css({[h]:x})},(k,M)=>{if(M&&_){_.remove();let V=(this.x.expanded?n.bcr(r)[u]:0)+(this.x.toNext?1:-1)*(p-x);V<=0?this.toggle(!1):(this.x.expanded||this.toggle(!0),n.q(r).css({[u]:V}))}},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(s.h("div",{ref:"movable",class:"w-split-movable",onmousedown:this.dragstart})),t}},computed:{inVertical(){return this.provideLayout==="w-vertical"},html_props(){return{class:["f-rel z-"+(this.inVertical?"vertical":"horizontal"),{"z-tonext":this.x.toNext}]}}},mounted(){this.x.expanded||this.toggle(!1)}}),Bl=s.defineComponent({name:"w-toggle",mixins:[A,Nt],props:{collapsedIcon:null,expandedIcon:null,expanded:null,align:null,valign:null},methods:{x_default(){return{expanded:!0,valign:"middle"}},toggle(t=!0){let e=typeof t=="boolean"?t:!this.x.expanded;this.x.expanded=e,n.q(this.el()).nextUntil(".w-toggle").toggle(e)},html_slots(){let e=this.x.expanded?this.x.expandedIcon:this.x.collapsedIcon;return[e&&s.h(Z,{src:e,class:"w-toggle-icon"}),s.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)}}),El={".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"};function hi(t){let e=ft(t,".",!0)||t;return El["."+e]}const Nl=s.defineComponent({name:"w-video",mixins:[A],props:{src:null,poster:null},data(){return{playing:!1}},methods:{getMimeType(){let t=n.strTo(this.x.src,"?")||this.x.src,e=n.strFrom(t,"/",!0)||t;return n.strFrom(e,".",!0)?hi(e):"video/mp4"},html_slots(){return[s.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}),s.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}]}}}),Ll=s.defineComponent({name:"w-progress",mixins:[A],props:{percent:null,range:null,text:null},methods:{html_slots(){let t=n.number(this.x.percent),e=this.x.text;return e==null&&(e=t+"%"),[s.h("span",{class:"w-progress-text"},e),s.h("div",{class:"w-progress-gut",style:{width:`${t}%`}},s.h("div",{class:"w-progress-bar f-flex f-flex-center",style:{width:`${t==0?t:100*100/t}%`}},s.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(n.number(this.x.percent)>=n.number(t[e]))return"z-"+t[e]}}}}),Fl=s.defineComponent({name:"w-calendar",mixins:[A],emits:["click:item","change"],props:{value:null,minValue:null,maxValue:null,current:null,pad:null,face:null,format:null,success:null,cg:null,start:null,enableHour:null,enableMinute:null,enableSecond:null,defaultHour:null,defaultMinute:null,defaultSecond:null},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(),l=e.getFullYear();if(this.x.face==="year"){let r=(""+i).slice(-2,-1),o=(""+l).slice(-2,-1);r!=o&&this.trigger("change",t)}else this.x.face==="quarter"||this.x.face==="month"||this.x.face==="week"?i!=l&&this.trigger("change",t):this.x.face==="date"&&(i!=l||t.getMonth()!=e.getMonth())&&this.trigger("change",t)},current(t){if(!t)return;let e=typeof t=="string"?n.dateParse(t,this.formatter):t,i=this.dt,l=e.getFullYear(),r=i.getFullYear();if(this.x.face==="year"){let o=(""+l).slice(-2,-1),a=(""+r).slice(-2,-1);o!=a&&(this.dt=e)}else this.x.face==="quarter"||this.x.face==="month"||this.x.face==="week"?l!=r&&(this.dt=e):this.x.face==="date"&&(l!=r||e.getMonth()!=i.getMonth())&&(this.dt=e)}},methods:{x_default(){let t=this.format||"";return{face:t==="yyyy"?"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,l=this.format||"";return e&&(!t||t<e)&&(t=e),i&&(!t||t>i)&&(t=i),t=t?n.dateParse(t,l):new Date,this.value||this.setDefaultTime(t),t},weekday(t){let e=t.getDay();return e==0?6:e-1},setDefaultTime(t){let e=this.defaultHour==null?t.getHours():parseFloat(this.defaultHour);if(this.enableHour){let r=n.arrayNumber(this.enableHour);r.includes(e)||(e=r[0])}t.setHours(e);let i=this.defaultMinute==null?t.getMinutes():parseFloat(this.defaultMinute);if(this.enableMinute){let r=n.arrayNumber(this.enableMinute);r.includes(i)||(i=r[0])}t.setMinutes(i);let l=this.defaultSecond==null?t.getSeconds():parseFloat(this.defaultSecond);if(this.enableSecond){let r=n.arrayNumber(this.enableSecond);r.includes(l)||(l=r[0])}return t.setSeconds(l),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());this.x.face=="year"?e=n.dateAdd(e,"y",10*t):this.x.face=="quarter"||this.x.face=="month"?e=n.dateAdd(e,"y",t):this.x.face=="date"?e=n.dateAdd(e,"M",t):this.x.face=="week"&&(e=n.dateAdd(e,"y",t)),this.dt=e},clickPopYear(t){t=t||this.dt.getFullYear()-4,t<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=n.dateAdd(this.dt,"M",t-1-this.dt.getMonth()),this.headPopMonth=null},clickItem(t,e){e.disabled||(this.x.current!==void 0&&(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,l=this.fixDate(new Date(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds()));this.callback(l,t)},callback(t,e){typeof t=="object"&&(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 n.dateFormat(typeof t=="string"?n.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(){return n.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;if(t)return n.dateParse(t,this.x.format);if(!this.x.value&&this.x.success)return this.x.format&&this.dt},beginDate(){return this.x.minValue&&n.dateParse(this.x.minValue,this.formatter)},endDate(){return this.x.maxValue&&n.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 this.x.face==="year"&&(t=this.dt.getFullYear()-this.dt.getFullYear()%10,t+=" - "+(t+9)),n.loc.ps(n.loc.calendar.y,t)},headMonth(){return n.loc.calendar.monthname[this.dt.getMonth()]},bodyList(){return this.x.face==="year"?this.bodyListYear:this.x.face==="quarter"?this.bodyListQuarter:this.x.face==="month"?this.bodyListMonth:this.x.face==="week"?this.bodyListWeek:this.bodyListDate},bodyListYear(){let t=[],e=this.x.minValue,i=this.x.maxValue,l=this.focusValue,r=this.dt.getFullYear()-this.dt.getFullYear()%10-1,o=new Date(this.dt.getTime());o.setDate(1),o.setFullYear(r);for(let a=0;a<12;a++){let h=r+a,u={value:h,text:h,date:new Date(o.getTime()),pad:a==0||a==11,disabled:!!(e&&e>h||i&&i<h),focus:l==h};t.push(u),o.setFullYear(o.getFullYear()+1)}return t},bodyListQuarter(){let t=[],e=this.x.minValue,i=this.x.maxValue,l=this.focusValue;this.dt.getFullYear();let r=new Date(this.dt.getTime());r.setDate(1),r.setMonth(0);for(let o=1;o<=4;o++){let a=this.fm(r),h={text:`Q${o}`,value:a,date:new Date(r.getTime()),disabled:!!(e&&e>a||i&&i<a),focus:l==a};r.setMonth(r.getMonth()+3),t.push(h)}return t},bodyListMonth(){let t=[],e=this.x.minValue,i=this.x.maxValue,l=this.focusValue;this.dt.getFullYear();let r=new Date(this.dt.getTime());r.setDate(1),r.setMonth(0);for(let o=0;o<12;o++){let a=this.fm(r),h={text:n.loc.calendar.monthname[o],value:a,date:new Date(r.getTime()),disabled:!!(e&&e>a||i&&i<a),focus:l==a};r.setMonth(r.getMonth()+1),t.push(h)}return t},bodyListWeek(){let t=[],e=this.x.minValue,i=this.x.maxValue,l=this.focusValue,o=n.dateWeek(this.dt)[0],a=n.dateWeekLast(o),u=n.dateWeekFirst(o)[2];for(let c=1,p=a[1];c<=p;c++){let f=this.fm(u),m={text:c,value:o+"-"+n.strPad(c),date:new Date(u.getTime()),disabled:!!(e&&e>f||i&&i<f),focus:l==f,title:n.loc.ps(n.loc.calendar.from_to,n.dateFormat(u,"yyyy-MM-dd"),n.dateFormat(n.dateAdd(u,"d",6),"yyyy-MM-dd"))};u.setDate(u.getDate()+7),t.push(m)}return t},bodyListDate(){let t=new Date(this.dt.getTime()),e=t.getMonth(),i=new Date(t.getTime()),l=this.focusValue,r=l&&n.dateFormat(n.dateParse(l,this.x.format),"yyyy-MM-dd"),o=this.beginDate&&n.dateFormat(this.beginDate,"yyyy-MM-dd"),a=this.endDate&&n.dateFormat(this.endDate,"yyyy-MM-dd"),h=[];t.setDate(1),i.setDate(new Date(t.getFullYear(),e+1,0).getDate());let u=7-(this.weekday(t)+i.getDate())%7;for(u&&u<7&&i.setDate(i.getDate()+u),this.weekday(t)>0&&t.setDate(1-this.weekday(t)),this.x.pad&&(u=1+(i.getTime()-t.getTime())/864e5,u<42&&i.setDate(i.getDate()+42-u));t<=i;){let c=this.fm(t),p=n.dateFormat(t,"yyyy-MM-dd"),f={text:t.getDate(),value:c,date:new Date(t.getTime()),pad:t.getMonth()!==e,disabled:!!(o&&o>p||a&&a<p),focus:r===p};h.push(f),t.setDate(t.getDate()+1)}return h},bodyListHour(){return this.enableHour?n.arrayNumber(this.enableHour):Array.from(Array(24).keys())},bodyListMinute(){return this.enableMinute?n.arrayNumber(this.enableMinute):Array.from(Array(60).keys())},bodyListSecond(){return this.enableSecond?n.arrayNumber(this.enableSecond):Array.from(Array(60).keys())}}}),Hl=["innerHTML"],Al=["onClick"],Il=["onClick"],Yl={class:"w-calendar-body"},Ol={class:"w-calendar-daytitle"},Rl=["title","onClick"],jl={class:"w-calendar-item-text"},ql={class:"w-calendar-time-th"},Wl={class:"w-calendar-time-th"},Ul={class:"w-calendar-time-th"};function Xl(t,e,i,l,r,o){const a=s.resolveComponent("w-html"),h=s.resolveComponent("w-dialog"),u=s.resolveComponent("w-horizontal"),c=s.resolveComponent("w-vertical"),p=s.resolveComponent("w-button"),f=s.resolveComponent("w-buttonbar");return s.openBlock(),s.createBlock(c,s.mergeProps(t.html_binds,{class:["f-rel","w-calendar-"+t.x.face]}),{default:s.withCtx(()=>[t.onlyTime?s.createCommentVNode("",!0):(s.openBlock(),s.createBlock(c,{key:0,class:"w-calendar-main"},{default:s.withCtx(()=>[s.createVNode(u,{class:s.normalizeClass(["w-calendar-head",{"f-h-gap":t.dfish.br.compat.gap}]),valign:"middle",align:"center"},{default:s.withCtx(()=>[t.x.face=="date"?(s.openBlock(),s.createElementBlock("i",{key:0,class:"w-calendar-head-prev-year f-i f-i-angle-double-left f-pointer",onClick:e[0]||(e[0]=m=>t.clickStep(-12))})):s.createCommentVNode("",!0),s.createElementVNode("i",{class:"w-calendar-head-prev f-i f-i-angle-single-left f-pointer",onClick:e[1]||(e[1]=m=>t.clickStep(-1))}),s.createVNode(u,{class:s.normalizeClass(["w-calendar-head-pop",{"f-h-gap":t.dfish.br.compat.gap}])},{default:s.withCtx(()=>[s.createElementVNode("div",{class:"w-calendar-head-year f-link",ref:"popYear",onClick:e[2]||(e[2]=m=>t.clickPopYear()),innerHTML:t.headYear},null,8,Hl),t.headPopYear?(s.openBlock(),s.createBlock(h,{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]=m=>t.headPopYear=null)},{default:s.withCtx(()=>[s.createElementVNode("div",{class:"w-calendar-head-year-item",onClick:e[3]||(e[3]=m=>t.clickPopYearStep(-1))},[...e[11]||(e[11]=[s.createElementVNode("i",{class:"f-i f-i-minus"},null,-1)])]),s.createVNode(a,{height:"*",onWheelPassive:t.mousewheelPopYear},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.headPopYear,m=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["w-calendar-head-year-item",{"z-on":m==t.dt.getFullYear()}]),onClick:v=>t.clickPopYearItem(m)},s.toDisplayString(m),11,Al))),256))]),_:1},8,["onWheelPassive"]),s.createVNode(a,{class:"w-calendar-head-year-item",onClick:e[4]||(e[4]=m=>t.clickPopYearStep(1))},{default:s.withCtx(()=>[...e[12]||(e[12]=[s.createElementVNode("i",{class:"f-i f-i-plus"},null,-1)])]),_:1})]),_:1},8,["context","snap"])):s.createCommentVNode("",!0),t.x.face=="date"?(s.openBlock(),s.createBlock(a,{key:1,class:"w-calendar-head-month f-link",ref:"popMonth",onClick:t.clickPopMonth},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(t.headMonth),1)]),_:1},8,["onClick"])):s.createCommentVNode("",!0),t.headPopMonth?(s.openBlock(),s.createBlock(h,{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]=m=>t.headPopMonth=null)},{default:s.withCtx(()=>[s.createVNode(a,{height:"*"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.headPopMonth,m=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["w-calendar-head-year-item",{"z-on":m==t.dt.getMonth()+1}]),onClick:v=>t.clickPopMonthItem(m)},s.toDisplayString(m),11,Il))),256))]),_:1})]),_:1},8,["context","snap"])):s.createCommentVNode("",!0)]),_:1},8,["class"]),s.createElementVNode("i",{class:"w-calendar-head-next f-i f-i-angle-single-right f-pointer",onClick:e[7]||(e[7]=m=>t.clickStep(1))}),t.x.face=="date"?(s.openBlock(),s.createElementBlock("i",{key:1,class:"w-calendar-head-next-year f-i f-i-angle-double-right f-pointer",onClick:e[8]||(e[8]=m=>t.clickStep(12))})):s.createCommentVNode("",!0),e[13]||(e[13]=s.createElementVNode("div",{class:"w-calendar-head-blank"},null,-1))]),_:1},8,["class"]),s.renderSlot(t.$slots,"head"),s.createElementVNode("div",Yl,[t.x.face=="date"?(s.openBlock(!0),s.createElementBlock(s.Fragment,{key:0},s.renderList(t.loc.calendar.day_title_1,m=>(s.openBlock(),s.createElementBlock("div",Ol,s.toDisplayString(m),1))),256)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.bodyList,(m,v)=>(s.openBlock(),s.createElementBlock("div",{title:m.title,class:s.normalizeClass(["w-calendar-item",{"z-on":m.focus&&!m.disabled,"z-pad":m.pad,"z-ds":m.disabled}]),onClick:x=>t.clickItem(x,m)},[s.renderSlot(t.$slots,"default",{item:m,index:v},()=>[s.createElementVNode("div",jl,s.toDisplayString(m.text),1)])],10,Rl))),256))])]),_:3})),t.hasTime?(s.openBlock(),s.createBlock(u,{key:1,class:"w-calendar-time"},{default:s.withCtx(()=>[t.focusHour!==!1?(s.openBlock(),s.createBlock(c,{key:0,class:"w-calendar-time-col w-calendar-time-hour",width:"*"},{default:s.withCtx(()=>[s.createElementVNode("div",ql,s.toDisplayString(t.loc.hour),1),s.createVNode(f,{class:"w-calendar-time-body",ref:"hour",current:t.focusHour,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.bodyListHour,m=>(s.openBlock(),s.createBlock(p,{class:"w-calendar-time-item",key:m,text:t.dfish.strPad(m),disabled:t.isHourDisabled(m),onClick:v=>t.clickHour(v,m)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):s.createCommentVNode("",!0),t.focusMinute!==!1?(s.openBlock(),s.createBlock(c,{key:1,class:"w-calendar-time-col w-calendar-time-minute",width:"*"},{default:s.withCtx(()=>[s.createElementVNode("div",Wl,s.toDisplayString(t.loc.minute),1),s.createVNode(f,{class:"w-calendar-time-body",ref:"minute",current:t.focusMinute,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.bodyListMinute,m=>(s.openBlock(),s.createBlock(p,{class:"w-calendar-time-item",key:m,text:t.dfish.strPad(m),disabled:t.isMinuteDisabled(m),onClick:v=>t.clickMinute(v,m)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):s.createCommentVNode("",!0),t.focusSecond!==!1?(s.openBlock(),s.createBlock(c,{key:2,class:"w-calendar-time-col w-calendar-time-second",width:"*"},{default:s.withCtx(()=>[s.createElementVNode("div",Ul,s.toDisplayString(t.loc.second),1),s.createVNode(f,{class:"w-calendar-time-body",ref:"second",current:t.focusSecond,vertical:!0,"scroll-y":!0,"scroll-view":".z-on",height:"*"},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.bodyListSecond,m=>(s.openBlock(),s.createBlock(p,{class:"w-calendar-time-item",key:m,text:t.dfish.strPad(m),disabled:t.isSecondDisabled(m),onClick:v=>t.clickSecond(v,m)},null,8,["text","disabled","onClick"]))),128))]),_:1},8,["current"])]),_:1})):s.createCommentVNode("",!0)]),_:1})):s.createCommentVNode("",!0),t.success?(s.openBlock(),s.createBlock(u,{key:2,class:s.normalizeClass(["w-calendar-foot",{"f-h-gap":t.dfish.br.compat.gap}]),align:"between",valign:"middle"},{default:s.withCtx(()=>[s.createElementVNode("div",{class:"w-calendar-button-now f-link",onClick:e[9]||(e[9]=(...m)=>t.clickNow&&t.clickNow(...m))},s.toDisplayString(t.loc.calendar.now),1),s.createElementVNode("div",{class:"w-calendar-button-confirm f-link",onClick:e[10]||(e[10]=(...m)=>t.clickConfirm&&t.clickConfirm(...m))},s.toDisplayString(t.loc.confirm),1)]),_:1},8,["class"])):s.createCommentVNode("",!0)]),_:3},16,["class"])}const ui=nt(Fl,[["render",Xl]]),Ql=s.defineComponent({name:"w-timeline",mixins:[Et,yt],props:{face:null,vertical:null},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",l=0,r=0;for(let a=0;a<t;a++){let h=this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${a}"]`),u=a<t-1&&this.$refs.wrap.querySelector(`:scope>.w-timeline-half>.w-timeline-item[w-index="${a+1}"]`),c=n.bcr(h.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));if(h.parentNode==this.$refs.prev?l=Math.max(l,c[i]):r=Math.max(r,c[i]),u&&h.parentNode!=u.parentNode){let p=n.bcr(u.querySelector(":scope>.w-timeline-item-icon>.w-timeline-item-icon-img"));e&&c.bottom+25>p.top?n.q(u).css({marginTop:c.bottom+25-p.top}):!e&&c.right+50>p.left&&n.q(u).css({marginLeft:c.right+50-p.left})}}let o=n.q(">.w-timeline-item",this.$refs.prev);o.each((a,h)=>{let u=n.q(">.w-timeline-item-icon",h),c=n.bcr(u[0]);u.css({[e?"marginRight":"marginBottom"]:(l-c[i])/2})}),n.q(">.w-timeline-item",this.$refs.next).each((a,h)=>{let u=n.q(">.w-timeline-item-icon",h),c=n.bcr(u[0]);u.css({[e?"marginLeft":"marginTop"]:(r-c[i])/2})}),o.length&&n.q(this.$refs.next).css({[e?"marginLeft":"marginTop"]:`-${r/2+l/2}px`})}if(t==0)n.q(this.$refs.line).css({width:0,height:0});else{const e=n.bcr(this.$refs.wrap),i=[];let l=[],r=0,o="#ddd";for(let a=0;a<t;a++){let h=n.q(`>.w-timeline-half>.w-timeline-item[w-index="${a}"]`,this.$refs.wrap),u=n.bcr(h.find(">.w-timeline-item-icon>.w-timeline-item-icon-img")[0]),c={x:u.left+u.width/2,y:u.top+u.height/2,color:h.attr("w-line-color")};i.push(c)}i.sort((a,h)=>this.x.vertical?a.y<h.y?-1:0:a.x<h.x?-1:0);for(let a=0;a<t;a++){const h=i[a];if(a>0){const u=i[0];r=this.x.vertical?h.y-u.y:h.x-u.x,l.push(`${o} ${r}px`)}h.color&&(o=h.color),a>0&&l.push(`${o} ${r}px`)}this.x.vertical?n.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}):n.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, ${l.join()})`})}},html_slots(){let t=[],e=[],i=this.x.vertical;return this.slots_children().forEach((l,r)=>{n.lodash.set(l,"props.index",r),i?(l.props.position=="right"?t:e).push(l):(l.props.position=="bottom"?e:t).push(l)}),this.html_scroll_slots(s.h("div",{ref:"wrap",class:"w-timeline-wrap"},[s.h("div",{ref:"line",class:"w-timeline-line"}),s.h("div",{ref:"prev",class:["w-timeline-half w-timeline-prev",{[`f-${this.x.vertical?"v":"h"}-gap`]:n.br.compat.gap}]},t),s.h("div",{ref:"next",class:["w-timeline-half w-timeline-next",{[`f-${this.x.vertical?"v":"h"}-gap`]:n.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=n.lodash.debounce(()=>{this.$refs.wrap&&this.$refs.next&&(n.q(">.w-timeline-half>.w-timeline-item",this.$refs.wrap).css({[this.x.vertical?"marginTop":"marginLeft"]:0}),n.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})}}),Gl=s.defineComponent({name:"w-timeline-item",pubParentName:"w-timeline",mixins:[A],inject:["providePubParent"],props:{position:null,index:null,align:null,lineColor:null},watch:{lineColor(t){this.$nextTick(()=>this.providePubParent.indent())}},methods:{html_slots(){let t=s.h("div",{class:"w-timeline-item-main f-br"},s.h("div",{class:"w-timeline-item-main-text"},this.$slots));return[s.h("div",{ref:"icon",class:"w-timeline-item-icon"},this.$slots.icon?s.h("div",{class:"w-timeline-item-icon-img"},this.$slots.icon()):s.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}}}}),Jl=s.defineComponent({name:"w-slidepicker",mixins:[A],provide(){return{provideOptionParent:this}},props:{optionHeight:null,modelValue:null,minValue:null,maxValue:null,keepIndex:null,cover:null},emits:["update:modelValue","change"],setup(t,e){const i=s.getCurrentInstance().ctx,l=s.ref(),r=s.ref();let o,a,h,u,c,p;const f=function(P){let B=n.eventY(P),F,I,E,b=0,S=null;r.value.style.transition="",n.moveup(H=>{let N=n.eventY(H),T=H.timeStamp;F=c+N-B,I&&E&&T>E&&(S=b,b=(N-I)/(T-E)),I=N,E=T,F=n.numRange(F,h-p,u+p),r.value.style.transform=`translateY(${F}px)`},(H,N)=>{if(!N)return v(P);if(F==null)return;let T=.15;Math.abs(b)<T||S&&Math.abs(S)<T?b=0:S&&Math.abs(S)>Math.abs(b)&&(b=S);let z=F+b*200,R=Math.abs(b/2),mt=(u-z)%p;z+=mt,mt>p/2&&(z-=p),c=n.numRange(z,h,u),c!=F&&((F<h||F>h||R<T)&&(R=T),Math.abs(c-F)<10&&(R=.05),r.value.style.transform=`translateY(${c}px)`,r.value.style.transition=`transform ${R}s ease-out`)},P)},m=function(P){c+=(P.deltaY<0?-1:1)*p,c=n.numRange(c,h,u),r.value.style.transform=`translateY(${c}px)`,r.value.style.transition="transform .12s ease-out"},v=function(P){let B=n(P);B.$options.name=="w-option"&&(_(B.$props.value),x(!0))},x=function(P){if(!l.value||!r.value)return;let B=i.slots_children();if(!B.length)return;let F=i.x.modelValue,I=i.x.minValue,E=i.x.maxValue;(I||I===0||E||E===0)&&(F=n.numRange(F,I,E),F!=i.x.modelValue&&_(F));let b=n.bcr(l.value),S=n.bcr(r.value),H=-1,N=-1,T=!0;if(p=i.x.optionHeight,o=u=(b.height-p)/2,a=h=o-S.height+p,(I||I===0)&&(H=B.findIndex(z=>z.props.value==I)),(E||E===0)&&(N=B.findIndex(z=>z.props.value==E)),(H>-1||N>-1)&&B[0].props.value>B[B.length-1].props.value&&(T=!1),H>-1&&(T?u-=H*p:h+=H*p),N>-1&&(T?h+=(B.length-1-N)*p:u-=(B.length-1-N)*p),F!=null){let z=B.findIndex(R=>R.props.value==F);z===-1?_(c!=null&&c<a&&i.keepIndex?B[B.length-1].props.value:B[0].props.value):c=o-p*z}else c=o;c=n.numRange(c,h,u),r.value.style.transition="",r.value.style.transform=`translateY(${c}px)`,P&&(r.value.style.transition="transform .15s ease-out")},_=function(P){i.x.modelValue=P},k=function(){return(o-c)/p},M=function(){let P=i.slots_children()[k()];P&&_(P.props.value)},V=function(){return{optionHeight:32,cover:!0}},L=s.computed(()=>({style:{"--w-option-height":n.unitSize(i.x.optionHeight)},...n.br.mobile?{ontouchstart:f}:{onmousedown:f,onwheel:m}}));return s.onMounted(()=>{s.watch(()=>i.x.modelValue,P=>{e.emit("update:modelValue",P),e.emit("change",P)}),s.watch(()=>i.x.minValue,x),s.watch(()=>i.x.maxValue,x),new pt(()=>{r.value&&(x(),M())}).observe(r.value),r.value.addEventListener("transitionend",M)}),{root:l,options:r,x_default:V,onmousedown:f,onwheel:m,html_props:L}}}),Kl={ref:"options",class:"w-slidepicker-options"},Zl={key:0,class:"w-slidepicker-bg-top"},tn={key:1,class:"w-slidepicker-bg-bottom"};function en(t,e,i,l,r,o){return s.openBlock(),s.createElementBlock("div",s.mergeProps({ref:"root"},t.html_binds),[s.createElementVNode("div",Kl,[s.renderSlot(t.$slots,"default")],512),t.x.cover?(s.openBlock(),s.createElementBlock("div",Zl)):s.createCommentVNode("",!0),t.x.cover?(s.openBlock(),s.createElementBlock("div",tn)):s.createCommentVNode("",!0)],16)}const sn=nt(Jl,[["render",en]]),ci=s.defineComponent({name:"w-label",mixins:[A,Nt],props:{text:null,suffix:null,vertical:null},methods:{html_slots(){return s.h("label",{class:"w-label-text"},s.h("span",this.$slots.default?this.$slots.default():this.x.text+(this.x.suffix==null?"":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&&n.unitSize(this.x.width)}}}}),j=s.defineComponent({mixins:[A,Nt],props:{name:null,value:null,modelValue:null,placeholder:null,label:null,readonly:null,readonlyValidate:null,disabled:null,required:null,validateDefault:null,validateHandler:null,inputWidth:null,inputHeight:null},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:(t==null&&(t=""),e==null&&(e=""),this.watchModelValue(t,e))}},methods:{val(t,e){if(arguments.length==0)return this.x.modelValue;let i=this.x.modelValue;this.x.modelValue=t,i==null&&(i=""),t==null&&(t="");let l=i!==t;if(typeof i=="object"&&(l=JSON.stringify(i)!=JSON.stringify(t)),l&&(this.warnClass&&this.warn(!1),this.isUsableVal(t))){this.isEdit=!0,this.$emit("update:modelValue",t);const r=this.createEvent("change",{originalEvent:e});this.trigger(r,t)}return t},formVal(){return this.input_value},isUsableVal(t){return!0},defaultRuleValue(t){let e=this.rules[t];if(e!=null)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 l=e!==void 0?e:this.isPlural?this.groupFormVal():this.formVal();typeof l!="string"&&(l=Array.isArray(l)?l.join(","):l==null?"":""+l),l=l.trim();let r=this.validHooks;for(let o of i){let a=typeof o.rule!="object"?o.rule:o.rule.value!==void 0?o.rule.value:o.rule,h=await r[o.type](l,a,o);if(h)return h}}},formErr(t,e){let i=this.getLabelText(),l=t.type,r=t.rule&&t.rule.text;return r||(r=n.loc.ps.apply(null,[n.loc.form[l],i||""].concat(e!=null&&e!==""?e:[]))||""),{wid:this.uid,name:this.x.name,type:l,label:i,text:r}},warn(t){let e=typeof t=="string"?t:t!==!1?"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},e=>{this._tip=e})}})},focus(){return this.$refs.v.focus(),this},formText(){let t=this.val();return 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=s.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(()=>{!this.$.isUnmounted&&!this.$.isDeactivated&&new Date().getTime()-xt.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){return t},isModified(t){let e=t?this.defaultValue:this.modifiedValue,i=this.x.modelValue;return e==null&&(e=""),i==null&&(i=""),e==i?!1:this.getInputValue(e)!=this.getInputValue(i)},saveModified(t){this.modifiedValue=n.lodash.clone(this.x.modelValue),t&&(this.defaultValue=this.modifiedValue)},reset(t){this.warn(!1),this.val(t||this.defaultValue==null?"":this.defaultValue)},html_label(){if(this.$slots.label)return this.$slots.label();if(this.x.label&&typeof this.x.label=="object"){const t=n.cloneDeep(this.x.label);if(t.width==null&&delete t.width,t.width!=0)return s.h(ci,t)}},html_input(){return s.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?s.h("input",{type:"hidden",ref:"v",name:this.input_name,value:this.input_value,disabled:this.isDisabled,class:"f-hide"}):[]},html_button(){return[]},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 s.h("div",{class:"w-formbase-main"},[this.html_form(),this.html_slot_down()])},html_form(){let t=this.x.inputHeight&&n.unitSize(this.x.inputHeight);return s.h("div",s.mergeProps({ref:"form",id:this.uid+"form",class:["w-input",{"w-input-border":this.hasBorder,[`f-${this.dir}-gap`]:n.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&&(typeof e=="string"?!n.eval(`${e}.test(v)`,{rule:e,v:t}):e.test&&!e.test(t)))return this.formErr(i)},validateHandler:async(t,e,i)=>{let l=e&&e(t);if(l){let r=await l;if(r)return this.formErr({type:"validateHandler",rule:{text:r}})}}}},validHooks(){return this.pubValidHooks},validQueues(){let t=[],e="validateDefault";this.validHooks[e]&&t.push({type:e});for(let i in this.validHooks)if(!t.includes(i)){let l=this.rules[i];l!=null&&(Array.isArray(l)?l.forEach(r=>t.push({type:i,rule:r})):t.push({type:i,rule:l}))}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 l of i)l.trigger&&(t[l.trigger]||(t[l.trigger]=[])).push({type:e,rule:l});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(){return"input"},input_type(){return"text"},input_title(){},input_prop(){},input_placeholder(){if(!this.isNormal)return;let t=this.x.placeholder;return t==null&&n.x.autoPlaceholder&&this.x.label&&(t=n.loc.ps(n.loc[this.placeholder_type||"placeholder_input"],this.x.label.text||this.x.label)),t},form_prop(){},hasVal(){return this.x.modelValue!=null&&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&&n.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}}}}),ln=s.defineComponent({name:"w-hidden",mixins:[j],methods:{isModified(){return!1},html(){return s.h("input",{type:"hidden",id:this.uid,class:"w-hidden",name:this.x.name,value:this.x.modelValue,ref:"v"})}}}),Ht=s.defineComponent({name:"w-text",mixins:[j],props:{minLength:null,maxLength:null,pattern:null,clearable:null,showCount:null,dropProps:null,suggest:null},emits:["input","clear"],data(){return{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(t.type!=="input")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){t=t??!0,t===!1&&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(s.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:n.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(s.h(tt,e,this.$slots.suggest))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minLength:(t,e,i)=>{if(t&&e!=null&&e!==""&&e>0&&n.strLen(t)<e)return this.formErr(i,[e])},maxLength:(t,e,i)=>{if(t&&e!=null&&e!==""&&e>0&&t&&n.strLen(t)>e)return this.formErr(i,[n.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}}}}),nn=s.defineComponent({name:"w-textarea",mixins:[Ht],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 i=this.x.modelValue||"",l=n.strLen(i);l>this.x.maxLength&&(l=`<em class=w-textarea-show-count-exceed>超出${n.strExceed(i,this.x.maxLength)}个字</em>`),e=`${l} / ${this.x.maxLength}`}return s.h("div",{class:"w-textarea-down"},[s.h("div",{class:"w-textarea-down-left"},t),s.h("div",{class:"w-textarea-down-right w-textarea-show-count",innerHTML:e})])}return t}},computed:{input_tag(){return"textarea"},hasClassSlotDown(){return this.x.showCount&&this.x.maxLength||!!this.$slots.down}}}),di=s.defineComponent({name:"w-checkboxgroup",mixins:[j],props:{modelValue:null,required:null,vertical:null,gap:null,minSize:null,maxSize:null,br:null},provide(){return{providePubParent:this}},data(){return{watchValue:null}},methods:{x_default(){return{br:!0,gap:15}},watchModelValue(t,e){},html_form_slot(){return this.x.vertical?s.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":n.unitSize(this.x.gap)}}}}),{leafSymbol:De,changeSymbol:jn}=n.symbol,ue=s.defineComponent({name:"w-checkbox",pubParentName:"w-checkboxgroup",mixins:[j],props:{text:null,checked:null,partialSubmit:null,minSize:null,maxSize:null},inject:["providePubParent","provideBoxParent"],emits:["change","update:checked","click"],data(){return{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(arguments.length==0)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,l=this.input_type==="radio",r=this.x.modelValue;l?r=t?n.string(i):"":r=t?n.idsAdd(r,i):n.idsRemove(r,i),this.x.modelValue=r,l&&this.siblings().forEach(o=>o.x.modelValue=r),this.$emit("update:modelValue",r),this.trigger(e,r),this.parentTrigger(e,r)},formVal(){return!this.isDisabled&&this.isChecked?this.x.value:""},groupFormVal(t){if(t==null){let e=[];return n.lodash.each(this.siblings(null,!0),i=>{let l=i.formVal();l!=null&&l!==""&&e.push(l)}),e.join(",")}Array.isArray(t)&&(t=t.join(",")),n.lodash.each(this.siblings(),e=>e.val(n.idsAny(t,e.checkValue)))},watchModelValue(t,e){e!=t&&this.parentTrigger("change",t)},getInputValue(t){return 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 n.lodash.map(n.q(':input[name="'+this.input_name+'"]:not([w-form-ignore] :input)'+(e?":not(:disabled)":"")+(t===!0?":checked":t===!1?":not(:checked)":t||""),this.siblingsContainer()),i=>n(i))},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(e=>e.warn&&e.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[s.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}),s.h("em",{ref:"appear",class:this.$options.name+"-appear"},s.h("i",{class:this.input_icon})),this.$slots.text||this.x.text?s.h("span",{class:this.$options.name+"-text"},this.$slots.text?this.$slots.text():this.x.text):null]},html_main(){return s.h("label",{class:"w-input",onclick:this.onclick},this.html_input())},html_target(){return this.$slots.default?s.h(rt,{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&&e!=null&&e!==""&&e>0&&t.split(",").length<n.number(e))return this.formErr(i,[e])},maxSize:(t,e,i)=>{if(t&&e!=null&&e!==""&&e>0&&t.split(",").length>n.number(e))return this.formErr(i,[e])}}},rules(){return{required:this.x.required!=null?!!this.x.required:!!(this.pubParent&&this.pubParent.x.required),minSize:this.x.minSize!=null?this.x.minSize:this.pubParent&&this.pubParent.x.minSize,maxSize:this.x.maxSize!=null?this.x.maxSize:this.pubParent&&this.pubParent.x.maxSize}},input_type(){return"checkbox"},input_name(){return this.x.name||this.pubParent&&this.pubParent.x.name},input_value(){return this.x.value==null?"":this.x.value},isIndeterminate(){return this.data&&this.data[De]?this.data[De].indeterminate:this.indeterminate},input_prop(){return{indeterminate:this.isIndeterminate,"w-partialsubmit":this.x.partialSubmit?1:null,"w-all":this.x.all?"":null}},input_icon(){return"f-i f-i-check"},checkValue(){return this.x.value},isChecked(){return n.idsAny(this.x.modelValue,this.checkValue)},isDisabled(){return this.x.disabled!=null?!!this.x.disabled:this.pubParent&&this.pubParent.disabled},isReadonly(){return this.x.readonly!=null?!!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(e=>{let i=e.$refs.target;i&&this.ownerView.fAll(null,i.$el).forEach(l=>l.x.disabled=!e.isChecked)})},{immediate:!0})}}),rn=s.defineComponent({name:"w-radiogroup",mixins:[di]}),on=s.defineComponent({name:"w-radio",pubParentName:"w-radiogroup",mixins:[ue],props:{cancelable:null},methods:{},computed:{input_type(){return"radio"},input_icon(){return"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(){}}),{leafSymbol:W}=n.symbol,an=s.defineComponent({name:"w-triplebox",mixins:[ue],props:{all:null},inject:["provideTripleboxContainer"],created(){if(this.provideBoxParent){if(this.data&&!this.data[W]){const t=this.provideBoxParent.provideParentLeaf,e=t&&t.boxProxy&&t.boxProxy.data,i=s.computed(()=>{if(this.data.children&&this.data.children.length){let l,r;const o=this.x.modelValue;for(let a of this.data.children){if(!a[W])return!1;if(a[W].indeterminate)return!0;n.idsAny(o,a[W].checkValue)?l=!0:r=!0}return!!(l&&r)}return!1});this.data[W]={parent:e,checkValue:this.value,indeterminate:i}}}else this.$watch(()=>this.x.modelValue,(t,e)=>{(t==null||t==="")&&(e==null||e==="")||this.x.all||this.relate()})},methods:{getVal(){let t=this.checkstate();return t==1||this.x.partialSubmit&&t==2?this.value:""},checkDescendant(t,e,i){if(t.children)for(let l of t.children){const r=l[W];e=i?n.idsAdd(e,r.checkValue):n.idsRemove(e,r.checkValue),e=this.checkDescendant(l,e,i)}return e},checkAncestor(t,e){return e=t.children.find(l=>!n.idsAny(e,l[W].checkValue))?n.idsRemove(e,t[W].checkValue):n.idsAdd(e,t[W].checkValue),t[W].parent&&(e=this.checkAncestor(t[W].parent,e)),e},setVal(t,e){this.pubParent;let i=this.checkValue,l=this.x.modelValue;if(l=t?n.idsAdd(l,i):n.idsRemove(l,i),this.data){this.data.children&&(l=this.checkDescendant(this.data,l,t));const r=this.data[W];r.parent&&(l=this.checkAncestor(r.parent,l,t))}this.x.modelValue=l,this.$emit("update:modelValue",l),this.x.all||this.parentTrigger(e,this.groupFormVal())},formVal(){if(this.isDisabled)return"";let t=this.checkstate();return t==1||this.x.partialSubmit&&t==2?this.$refs.v.value:""},siblingsContainer(){let t=this.provideTripleboxContainer;return t&&t.el()||this.ownerView.el()},parentTrigger(t,e){let i=this.provideTripleboxContainer,l=i&&i.el();e&&(e=e.split(",").sort().join(",")),l&&l.getAttribute("wTripleboxValue")!=e&&(l.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(t==null)return e;this.val(t==1),this.indeterminate=t==2},isPartial(){return this.checkstate()==2},relate(){if(this.x.name&&n.q(`[name="${this.x.name}"][w-all]`,n.el(this.ownerView))[0]){const c=this.ownerView.fAll(this.x.name);for(var e=0,i=this.isPartial(),l=c.length,r=l,o=0,a=0,h=0,u;e<l;e++){if(!c[e].isNormal){r--;continue}if(this.x.all)if(this!=c[e])if(i){this.checkstate(c[e].checkstate());break}else c[e].checkstate(this.isChecked?1:0);else l==1&&(u=this);else c[e].x.all?u=c[e]:c[e].isChecked?a++:c[e].isPartial()?h++:o++}u&&(o+a+h||l==1)&&u.checkstate(o==r-1?0:a==r-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(){}}),hn=s.defineComponent({name:"w-switch",pubParentName:"w-checkboxgroup",mixins:[j],props:{checkedText:null,uncheckedText:null,checkedValue:null,uncheckedValue:null},inject:["providePubParent"],methods:{x_default(){return{checkedValue:1,uncheckedValue:0}},onclick(t){let i=!this.isChecked?this.x.checkedValue:this.x.uncheckedValue;this.val(i)},formText(){return this.isChecked?this.x.checkedText:this.x.uncheckedText},html_input(){return[this.html_input_hidden(),s.h("div",{class:"w-switch-box",onclick:this.isNormal&&this.onclick},[s.h("i",{class:"w-switch-icon"}),s.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}}}),Pt={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"},pi={};for(let t in Pt)Pt[t].split(".").forEach(e=>{pi[e]=t=="0"?e:t});const zt={video:Pt.vid,audio:Pt.aud,image:Pt.img};for(let t in zt)zt[t]=zt[t].split(".").map(e=>`*.${e};`).join("");const Yt=function(t){let e=n.strFrom(t||"",".",!0).toLowerCase();return pi[e]||"file"},Be=function(t){let e;return t!=null&&!isNaN(t)&&(t+="K"),t=n.number(t.replace(/[a-z]+$/i,function(i){return e=i.charAt(0).toUpperCase(),""})),t*(e==="K"?1024:e==="M"?1024*1024:e==="G"?1024*1024*1024:e==="T"?1024*1024*1024*1024:1)},fi=s.defineComponent({name:"w-fileupload",mixins:[j],props:{uploadSrc:null,thumbnailSrc:null,downloadSrc:null,uploadLimit:null,sizeLimit:null,maxFileSize:null,minFileSize:null,fileTypes:null,filter:null,success:null,error:null,itemWidth:null,align:null,vertical:null,gap:null,checkFile:null},data(){return{list:[],emiting:!1}},created(){this.$watch(()=>this.x.modelValue,t=>{if(this.emiting)return this.emiting=!1;t&&typeof t=="string"&&(t=JSON.parse(t)),this.list=Array.isArray(t)?t.map(e=>({value:e})):t?[{value:t}]:[]},{immediate:!0})},methods:{x_default(){return{gap:10,vertical:!0}},val(t){if(arguments.length==0){let e=[];return this.list.forEach(i=>i.value&&e.push(i.value)),e}this.x.modelValue=t,this.$emit("update:modelValue",t),this.trigger("change",t)},getInputValue(t){return t.length==0?"":JSON.stringify(t)},getFileTypes(){let t=this.x.fileTypes;return zt[t]&&(t=zt[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(l=>{l&&i.push(l)}),i.forEach(l=>{l&&t.push(hi(l)||l)}),t.join(",")},isImage(t){return Yt(t.value?t.value.name:t.file.name)=="img"},isVideo(t){return Yt(t.value?t.value.name:t.file.name)=="vid"},isAudio(t){return Yt(t.value?t.value.name:t.file.name)=="aud"},fileSelected(t){if(this.x.uploadLimit>1&&t.target.files.length+this.list.length>this.x.uploadLimit)return t.target.value="",n.alert(n.loc.ps(n.loc.form.upload_limit,this.x.uploadLimit));let e=this.x.maxFileSize&&Be(this.x.maxFileSize),i=this.x.minFileSize&&Be(this.x.minFileSize),l=this.getFileTypes(),r=this.x.checkFile,o,a,h,u,c=r&&this.list.filter(f=>f.file).map(f=>f.file),p=r&&this.list.filter(f=>f.value).map(f=>f.value);n.lodash.each(t.target.files,f=>{let m="."+n.strFrom(f.name,".",!0).toLowerCase();if(e&&f.size>e)(o||(o=[])).push(f.name);else if(i&&f.size<i)(a||(a=[])).push(f.name);else if(l&&!n.idsAny(l,m,","))(h||(h=[])).push(f.name);else{let v=r&&r(f,t.target.files,c,p);v?(u||(u=[])).push(v):this.list.push({file:f})}}),o?n.alert(n.loc.ps(n.loc.form.upload_maxfilesize,o.join("<br>"),this.x.maxFileSize)):a?n.alert(n.loc.ps(n.loc.form.upload_minfilesize,a.join("<br>"),this.x.minFileSize)):h?n.alert(n.loc.ps(n.loc.form.upload_invalid_file_type,h.join("<br>"),l)):u&&n.alert(u.join("<br>")),t.target.value="",this.nextUpload()},upload(t){if(this.x.uploadSrc&&!t.loading){let e=n.urlFormat(this.x.uploadSrc,this.x.data,this.x),i=new FormData;i.append("Filedata",t.file),t.loading=!0,t.source=n.http.CancelToken.source(),n.http.post(e,i,{onUploadProgress:l=>t.progress=Math.floor(l.loaded/l.total*100),cancelToken:t.source.token}).then(l=>{t.loading=!1,t.loaded=!0,t.source=null;let r=this.x.filter?this.x.filter(l,this):l.data;r?r.error?t.error=r.error:r.id?(t.value=r,this.x.success&&this.x.success(t.value,this,l)):t.error={message:n.loc.ps(n.loc.form.upload_invalid_data,JSON.stringify(r))}:t.error={message:n.loc.form.upload_no_data},t.error&&t.error.message&&n.alert(t.error.message),this.nextUpload()}).catch(l=>{t.error=l,t.loading=!1,t.loaded=!0,t.source=null,this.nextUpload(),l.response&&l.response.status&&n.alert(l.response.status+": "+l)})}else if(!this.x.uploadSrc){let e="请给上传组件配置uploadSrc";t.error={message:e},console.error(e),this.nextUpload()}},nextUpload(){for(let e of this.list){if(e.loading)return;if(!e.error&&e.file&&!e.loaded)return this.upload(e)}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&&n.download(n.urlServer(this.x.downloadSrc,e.value,this.x.data)))},remove(t){t.source&&t.source.cancel();let e=this.list.findIndex(i=>i==t);this.list.splice(e,1),this.nextUpload()},formText(){return this.val().map(e=>e.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,l=[s.h("div",{class:"w-fileupload-value-close f-i f-i-trash",title:n.loc.remove,onclick:o=>this.remove(t)})];e&&this.$slots.menu&&l.push(s.h(he,null,{target:()=>s.h("div",{class:"w-fileupload-value-menu f-i f-i-ellipsis",title:n.loc.more}),default:()=>this.$slots.menu({item:e})}));let r=e?e.id:t.key;return r||(t.key=r=n.uid()),this.$slots.name&&(i=this.$slots.name({item:t.value||t.file})),s.h("div",{key:r,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:n.unitSize(this.x.itemWidth)},title:t.error?t.error.message:i},[s.h("i",{class:["w-fileupload-value-icon f-i","f-i-file-"+Yt(i)],onclick:o=>this.clickItem(o,t)}),t.error&&s.h("div",{class:"w-fileupload-value-error"},n.loc.form.upload_error),s.h("div",{class:"w-fileupload-value-text f-line-1",onclick:o=>this.clickItem(o,t)},i),l])})},html_input_form(){return[this.html_input_hidden(),s.h("input",{type:"file",ref:"file",multiple:this.x.uploadLimit!=1,accept:this.getAccept(),onchange:this.fileSelected,class:"f-hide"})]},html_input_button(){return s.h("div",{},[s.h(Ft,{ref:"uploadbbr",class:"w-fileupload-bbr",gap:10},{default:()=>[this.$slots.button?this.$slots.button(this):s.h(st,{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?s.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 s.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 e of this.list){if(e.loading)return this.formErr({type:"upload_loading"});if(e.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(){return"v"},html_class(){return{"z-vertical":this.x.vertical,"z-horizontal":!this.x.vertical,"z-compat":n.br.compat.gap}},html_style(){return{"--w-label-min-height":"32px"}},html_on(){return{onclick:()=>this.warn(!1)}}}}),un=s.defineComponent({props:{item:null},inject:["provideUpload"],data(){return{dataURL:null}},methods:{click(t){this.provideUpload.clickItem(t,this.item,this.provideUpload)},createImageThumbnail(){let t=new FileReader;t.onload=e=>{this.item.loaded||(this.dataURL=e.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(),n.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,-Math.PI*.5,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,Math.PI*2),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?n.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(){return n.loc.remove},titleMore(){return n.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}))}}),cn={class:"f-line-1"},dn={key:0,ref:"loading",width:"34",height:"34",class:"w-mediaupload-progress-loading f-abs-center"},pn={key:1,class:"w-mediaupload-cover-play f-abs-center f-flex-center f-i f-i-play"},fn={class:"w-mediaupload-value-oper"},mn=["title"],gn=["title"];function xn(t,e,i,l,r,o){const a=s.resolveComponent("w-menu"),h=s.resolveComponent("w-img");return s.openBlock(),s.createBlock(h,{class:s.normalizeClass(["w-mediaupload-value",{"z-loading":t.item.loading,"z-canplay":t.canPlay,"z-err":t.item.error}]),ref:"thumbnail",src:t.src,"data-url":t.dataURL,width:t.upload.x.thumbnailWidth,"img-width":t.upload.x.thumbnailWidth-2,"img-height":t.upload.x.thumbnailHeight-2,tip:t.tip,onClick:t.click},s.createSlots({cover:s.withCtx(()=>[t.item.loading?(s.openBlock(),s.createElementBlock("canvas",dn,null,512)):t.canPlay?(s.openBlock(),s.createElementBlock("i",pn)):s.createCommentVNode("",!0),s.createElementVNode("div",fn,[t.upload.isNormal?(s.openBlock(),s.createElementBlock("i",{key:0,class:"w-mediaupload-value-close f-flex-center f-i f-i-trash",title:t.titleRemove,onClick:e[0]||(e[0]=(...u)=>t.remove&&t.remove(...u))},null,8,mn)):s.createCommentVNode("",!0),t.item.value&&t.upload.$slots.menu?(s.openBlock(),s.createBlock(a,{key:1},{target:s.withCtx(()=>[s.createElementVNode("i",{class:"w-mediaupload-value-menu f-flex-center f-i f-i-ellipsis",title:t.titleMore},null,8,gn)]),default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(t.menus,u=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(u)))),256))]),_:1})):s.createCommentVNode("",!0)])]),_:2},[t.upload.x.showFileName?{name:"default",fn:s.withCtx(()=>[s.createElementVNode("div",cn,s.toDisplayString(t.name),1)]),key:"0"}:void 0]),1032,["class","src","data-url","width","img-width","img-height","tip","onClick"])}const wn=nt(un,[["render",xn]]),mi=s.defineComponent({name:"w-mediaupload",mixins:[fi],props:{thumbnailWidth:null,thumbnailHeight:null,showFileName:null},provide(){return{provideUpload:this}},methods:{x_default(){return{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=n.uid()),s.h(wn,{item:t,index:e,key:i})})},html_input_button(){return s.h("div",{},[s.h(Ft,{ref:"uploadbbr",class:"w-fileupload-bbr"},{default:()=>[this.$slots.button?this.$slots.button(this):s.h(st,{ref:"uploadbutton",title:n.loc.form.choose_image,icon:".f-i .f-i-plus",class:"w-mediaupload-button",style:{width:n.unitSize(this.x.thumbnailWidth),height:n.unitSize(this.x.thumbnailHeight)},onclick:this.chooseFile}),this.slot("right")]}),this.slot("down")])},html_input(){return this.html_input_form().concat(s.h(rt,{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":n.unitSize(this.x.thumbnailWidth),"--w-label-min-height":n.unitSize(this.x.thumbnailHeight),"--w-gap":n.unitSize(this.x.gap)}}}}),vn=s.defineComponent({name:"w-imageupload",mixins:[mi],methods:{x_default(){return{fileTypes:"image",thumbnailWidth:80,thumbnailHeight:80,gap:10}}},computed:{html_class(){return"w-mediaupload"}}}),bn=s.defineComponent({name:"w-option",mixins:[A],props:{value:null,text:null,disabled:null},inject:["provideOptionParent"],methods:{click(t){this.provideOptionParent.clickOption&&this.provideOptionParent.clickOption(this,t)}},computed:{optionParent(){return this.provideOptionParent},isFocus(){let t=this.provideOptionParent.x.modelValue;return Array.isArray(t)?t.includes(this.value):n.idsAny(t,this.value)},isMul(){return this.provideOptionParent.x.multiple}}}),yn=["disabled","title"],_n={class:"f-flex-1 f-line-1"};function kn(t,e,i,l,r,o){return s.openBlock(),s.createElementBlock("button",s.mergeProps(t.html_attrs,{class:["f-flex-align",t.optionParent.$options.name+"-option",{"z-on":t.isFocus,"z-ds":t.disabled,"z-mul":t.isMul}],onClick:e[0]||(e[0]=(...a)=>t.click&&t.click(...a)),disabled:t.disabled,title:t.text}),[s.createElementVNode("div",_n,[s.renderSlot(t.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(t.text),1)])]),t.isMul?(s.openBlock(),s.createElementBlock("div",{key:0,class:s.normalizeClass(["w-option-checked",{"f-i f-i-check":t.isFocus}])},null,2)):s.createCommentVNode("",!0)],16,yn)}const Cn=nt(bn,[["render",kn]]),Sn=s.defineComponent({name:"w-spinner",mixins:[Ht],inject:["provideRangeParent"],props:{decimal:null,format:null,showButton:null,buttonPosition:null,step:null,autoFix:null,compare:null,minValue:null,maxValue:null},mounted(){this.x.format&&this.doFormat()},methods:{x_default(){return{step:1,autoFix:!0,showButton:!0,buttonPosition:"right"}},doFormat(t){let e=""+this.x.modelValue,i=this.x.format.separator||",",l=RegExp(i.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),"g"),r=n.numFormat(e,this.x.format.length,i,this.x.format.rightward);if(e!==r){let o=this.$refs.v.selectionStart,a=e.slice(0,o).replace(l,"");if(this.val(r,t),document.activeElement===this.$refs.v){let h=r.slice(0,o).replace(l,"");this.$nextTick(()=>n.rngCursor(this.$refs.v,o+(a.length-h.length)))}}},stepBy(t,e){if(!this.isNormal)return;let i=this.defaultRuleValue("maxValue"),l=this.defaultRuleValue("minValue"),r=this.val(),o=n.numAdd(n.number(r),t*this.x.step),a=this.provideRangeParent&&this.provideRangeParent.forms(),h=o;if(i!=null&&(h=Math.min(i,h)),l!=null&&(h=Math.max(l,h)),a){if(a[0]==this){let u=a[1].val();u!=null&&(h=Math.min(u,h))}else if(a[1]==this){let u=a[0].val();u!=null&&(h=Math.max(u,h))}}this.warn(!1),this.focus(),this.val(h,e),h==o&&this.tip_uid&&(n.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)},getValidErrorSync(t){if(this.x.format&&(t=t.replace(RegExp(this.x.format.separator||",","g"),"")),t!=null){if(!n.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&&n.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)}},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"<=",l=e.target.isWidget?e.target:this.ownerView.f(e.target),r=l&&l.formVal();if(t&&r&&n.isNumber(t)&&n.isNumber(r)){let o=n.number(t),a=n.number(r);if(!n.eval("d"+i+"td",{d:o,td:a}))return[this.getLabelText(),i,l.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=n.numDecimal(e,this.x.decimal);i=n.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&&(e=s.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton?(e&&t.push(e),this.x.buttonPosition==="right"?t.push(s.h("div",{class:"w-spinner-step w-input-button f-flex-column f-oh"},[s.h("button",{ref:"buttonPlus",class:"w-spinner-step-up f-rel",disabled:!!this.x.disabled,onclick:i=>this.stepBy(1,i),innerHTML:'<i class="f-abs-center f-i f-i-caret-up"></i>'}),s.h("button",{ref:"buttonMinus",class:"w-spinner-step-down f-rel",disabled:!!this.x.disabled,onclick:i=>this.stepBy(-1,i),innerHTML:'<i class="f-abs-center f-i f-i-caret-down"></i>'})])):this.x.buttonPosition==="between"&&t.push(s.h("button",{ref:"buttonMinus",class:"w-spinner-step-minus f-rel",disabled:!!this.x.disabled,onclick:i=>this.stepBy(-1,i),innerHTML:'<i class="f-abs-center f-i f-i-minus"></i>'}),s.h("button",{ref:"buttonPlus",class:"w-spinner-step-plus f-rel",disabled:!!this.x.disabled,onclick:i=>this.stepBy(1,i),innerHTML:'<i class="f-abs-center f-i f-i-plus"></i>'}))):e&&t.push(e),t}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&e!=null&&e!==""&&(n.isNumber(e)?n.number(t)<n.number(e):t<e))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&e!=null&&e!==""&&(n.isNumber(e)?n.number(t)>n.number(e):t>e))return this.formErr(i,[e])},compare:(t,e,i)=>{let l=this.getCompareError(t,e);if(l)return this.formErr(i,l)},validateDefault:t=>this.getValidErrorSync(t)}},isReadonly(){if(this.x.readonly==null){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(this.x.disabled==null){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}]}}}),$n=s.defineComponent({name:"w-datepicker",mixins:[Ht],inject:["provideRangeParent"],props:{showButton:null,multiple:null,format:null,autoFix:null,compare:null,minValue:null,maxValue:null,dropProps:null,enableHour:null,enableMinute:null,enableSecond:null,defaultHour:null,defaultMinute:null,defaultSecond:null},data(){return{showDrop:!1,currentDate:null,lastValue:null,placeholder_type:"placeholder_select"}},methods:{x_default(){return{format:"yyyy-MM-dd",autoFix:!0,showButton:!0}},isUsableVal(t){if(!t)return!0;if(!n.dateValid(t,this.x.format))return!1;let e=this.x.enableHour&&n.arrayNumber(this.x.enableHour),i=this.x.enableMinute&&n.arrayNumber(this.x.enableMinute),l=this.x.enableSecond&&n.arrayNumber(this.x.enableSecond);if(e||i||l){let r=n.dateParse(t,this.x.format);if(e&&!e.includes(r.getHours())||i&&!i.includes(r.getMinutes())||l&&!l.includes(r.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))this.x.autoFix&&this.val(this.lastValue);else{let e=/\b(\d)\b/g;e.test(t)&&this.val(t.replace(e,"0$1"))}},drop(){n.br.mobile?n.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,n.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 l=i[1].formVal();l!=null&&(e==null||e>l)&&(e=l)}else if(i[1]==this){let l=i[0].formVal();l!=null&&(t==null||t<l)&&(t=l)}}return{minValue:t,maxValue:e}},getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=this.x.format,l=e.mode||"<=",r=e.target.isWidget?e.target:this.ownerView.f(e.target),o=r&&r.formVal();if(t&&o&&n.dateValid(t,i)&&n.dateValid(o,i)){let a=n.dateParse(t,i),h=n.dateParse(o,i);if(!n.eval("d"+l+"td",{d:a,td:h}))return[this.getLabelText(),l,r.getLabelText()]}}},html_button(){let t=[],e=this.x.format||"",i=0;e.includes("H")&&i++,e.includes("m")&&i++,e.includes("s")&&i++;let l=/[Hms]/.test(e)&&!/[yMd]/.test(e),r;if(this.x.clearable&&this.isNormal&&(r=s.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),this.x.showButton){let o=[s.h("button",{class:"w-input-button-drop w-input-button f-i f-i-date"})];r&&o.push(r),t.push(s.h("div",{class:"w-input-buttonbar"},o))}else r&&t.push(r);if(this.showDrop){let o={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};o=this.mergeDropProps(o),t.push(s.h(tt,o,{default:()=>s.h(ui,{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":(a,h)=>{this.currentDate=h.value}})}))}return t}},computed:{validHooks(){return{...this.pubValidHooks,minValue:(t,e,i)=>{if(t&&n.dateParse(t,this.x.format)<n.dateParse(e,this.x.format))return this.formErr(i,[e])},maxValue:(t,e,i)=>{if(t&&n.dateParse(t,this.x.format)>n.dateParse(e,this.x.format))return this.formErr(i,[e])},compare:(t,e,i)=>{let l=this.getCompareError(t,e);if(l)return this.formErr(i,l)},validateDefault:(t,e,i)=>{if(this.x.multiple)return;if(t){let r=t,o=n.dateParse(r,this.x.format),a=o.getFullYear(),h=9999,u=1e3;if(a>h||a<u)return this.formErr({type:"time_exceed"},[u,h]);if(r!=n.dateFormat(o,this.x.format))return this.formErr({type:"time_format"},[n.dateFormat(new Date,this.x.format)])}if(this.defaultRuleValue("beforeNow")&&t&&t>n.dateFormat(new Date,this.x.format))return this.formErr({type:"beforeNow"},[this.x.beforeNow]);if(this.defaultRuleValue("afterNow")&&t&&t<n.dateFormat(new Date,this.x.format))return this.formErr({type:"afterNow"},[this.x.afterNow]);let l=this.provideRangeParent&&this.provideRangeParent.getRangeError();if(l)return this.formErr({type:"compare"},l)}}},isReadonly(){if(this.x.readonly==null){let t=this.provideRangeParent;if(t&&t.x.readonly)return!0}return!!this.x.readonly},isDisabled(){if(this.x.disabled==null){let t=this.provideRangeParent;if(t&&t.x.disabled)return!0}return!!this.x.disabled},input_prop(){return n.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=n.strTrim(t))){if(!n.dateValid(t,this.x.format)){let e=n.dateParse(t,this.x.format);t=n.dateFormat(e,this.x.format),this.val(t)}this.lastValue=t}},{immediate:!0})}}),gi=s.defineComponent({name:"w-dropbox",mixins:[j],provide(){return{provideOptionParent:this}},props:{multiple:null,cancelable:null,clearable:null,dropProps:null},emits:["clear"],data(){return{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 i=n.arrayID(this.val()).concat();t.isFocus?n.lodash.pull(i,t.value):i.push(t.value),this.val(i)}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=n.string(this.input_text),e=this.input_placeholder,i=!!n.br.mobile,l=[this.html_input_hidden(),s.h("div",{class:"w-dropbox-text f-line-1",title:t||e},t||e&&s.h("div",{class:"w-input-placeholder"},e))];if(this.showDrop){let r={context:this,ownproperty:!0,class:"f-dfish-dialog w-dropbox-dialog"+(i?" z-mob":""),width:i?"100%":n.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"};r=this.mergeDropProps(r),l.push(s.h(tt,r,this.$slots))}return l},html_button(){let t=[s.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})];return this.x.clearable&&this.isNormal&&t.push(s.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),s.h("div",{class:"w-input-buttonbar"},t)}},computed:{input_text(){let t=[],e=this.slots_children(),i=n.arrayID(this.x.modelValue);return n.lodash.each(i,l=>{let r=e.findIndex(o=>o.props.value==l);if(r>-1&&t.push(r),!this.x.multiple)return!1}),t.sort().map(l=>e[l].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}}}}),Vn=s.defineComponent({name:"w-pickbox",mixins:[gi],props:{picker:null},methods:{getInputValue(t){return typeof t=="string"?t:n.array(t).map(e=>e.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;typeof e=="function"&&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(s.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&this.isNormal&&e.push(s.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(s.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(s.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&&typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)?t.map(e=>e.text).join(", "):t&&t.text||""}}}),Tn=s.defineComponent({name:"w-password",mixins:[Ht],props:{compare:null,showPassword:null},data(){return{passwordVisible:!1}},methods:{getCompareError(t,e){if(t&&e&&e.target&&this.ownerView){let i=e.mode||"==",l=e.target.isWidget?e.target:this.ownerView.f(e.target),r=l&&l.formVal();if(t&&r&&!n.eval("v"+i+"tv",{v:t,tv:r}))return[this.getLabelText(),i,l.getLabelText()]}},clickButtonShowPassword(){this.passwordVisible=!this.passwordVisible},html_button(){let t=[];return this.isNormal&&this.x.clearable&&t.push(s.h("button",{class:"w-input-button-clear w-input-button f-i f-i-close",onclick:this.clickButtonClear})),this.x.showPassword&&t.push(s.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 l=this.getCompareError(t,e);if(l)return this.formErr(i,l)}}},input_type(){return this.passwordVisible?"text":"password"}}}),Mn=s.defineComponent({name:"w-range",mixins:[j],provide(){return{provideRangeParent:this}},props:{mode:null},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,s.h("div",{ref:"to",class:"w-range-to"},n.loc.to)),t}},computed:{html_on(){return{onclick:t=>this.warnClass=""}}}}),Pn=s.defineComponent({name:"w-combobox",mixins:[j],props:{multiple:null,strict:null,dropper:null,picker:null,dropProps:null,br:null,clearable:null},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(){return{strict:!0}},watchModelValue(t,e){this.clear(),this.x.strict||(this.sensor_text=this.getInputText(t));const i=e&&e.map?e.map(r=>r.value).join(","):"",l=t&&t.map?t.map(r=>r.value).join(","):"";i!=l&&this.trigger("change",t)},getInputValue(t){if(typeof t=="string"&&t)return t;let e=n.array(t).filter(i=>i.value).map(i=>i.value);return!this.x.strict&&this.sensor_text&&e.push(this.sensor_text),e.join(",")},getInputText(t){const e=n.array(t).find(i=>!i.value&&i.text);return e?e.text:""},addVal(t,e){let i;this.x.multiple?i=n.lodash.unionBy(n.array(this.x.modelValue),n.array(t),"value"):i=[t],n.lodash.remove(i,l=>!l||!l.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){t=t??!0,t===!1&&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||this.defaultValue==null?"":this.defaultValue)},focus(t){this.isNormal&&(this.$refs.input.focus(),t&&this.$refs.input.value&&n.rngCursor(this.$refs.input),this.warn(!1))},onclick(t){!this.sensor_text&&typeof this.x.dropper=="function"&&(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(t.keyCode===8&&t.target.selectionStart===0&&t.target.selectionEnd===0){let i=n.array(this.x.modelValue).concat();i.length&&(i.splice(i.length-1,1),this.val(i))}},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+=(t.deltaY>0?1:-1)*50,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=n.array(this.x.modelValue).concat(),l=i.findIndex(r=>r.value==e.value);l>-1&&(i.splice(l,1),this.val(i,t))},clickButtonPicker(t){t.stopPropagation(),this.warn(!1);let e=this.x.picker;typeof e=="function"&&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&&typeof t!="string")return n.array(t).filter(e=>e.value).map(e=>s.h("div",{class:["w-combobox-option f-flex-center",{"z-forbid":e.forbid}],onclick:i=>this.clickItem(i,e)},[s.h("div",{class:"w-combobox-option-text f-line-1",title:e.text},e.text),this.isNormal&&s.h("div",{class:"w-combobox-option-close f-i f-i-close",onclick:i=>this.clickClose(i,e)})]))},html_var(){return s.h("div",{class:"w-combobox-input-wrap"},[s.h("div",{class:"w-combobox-sensor",ref:"sensor"},this.sensor_text||(this.input_value?null:this.input_placeholder)),s.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:n.bcr(this.el("form")).width,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1,scrollY:!0};e=this.mergeDropProps(e),t.push(s.h(tt,e,this.$slots))}return[this.html_input_hidden(),s.h("div",{ref:"list",class:["w-combobox-list f-flex-1 f-flex f-oh f-height",{"f-h-gap":n.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(s.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(s.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(s.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(s.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&&n.array(this.x.modelValue).find(i=>i.value))return this.formErr({type:"maxSize"},1)}},...this.pubValidHooks}},hasVal(){return this.input_value},input_title(){return typeof this.x.modelValue=="string"?"":n.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 pt(()=>{this.$refs.sensor&&(this.sensor_width=this.$refs.sensor.offsetWidth+"px")}).observe(this.$refs.sensor)}}),zn=s.defineComponent({name:"w-linkbox",mixins:[j],props:{multiple:null,picker:null,dropProps:null,separator:null,strict:null,br:null,clearable:null},emits:["input","dblclick:item","clear"],created(){this.$watch(()=>this.x.modelValue,t=>{this.isFocus||this.initOptions(t)})},data(){return{hasBorder:!0,text:"",sugger:null,showSuggest:!1,sug_timer:null,_KC:null,imeMode:!1,paste_rng:null,currOpt:null,store:[]}},methods:{x_default(){return{strict:!0}},getInputValue(t){return typeof t=="string"?t:n.array(t).map(e=>e.value).join(",")},initOptions(t){t==null&&(t=this.x.modelValue),t&&typeof t!="string"&&(t=n.array(t),this.store.length&&(this.store=[]),this.addStore(t),this.inp().innerHTML=this.html_options(t))},addVal(t,e){let i;this.x.multiple?i=n.lodash.unionBy(n.array(this.x.modelValue),n.array(t),"value"):i=[t],this.val(i,e)},complete(t,e){e=e||new CustomEvent("complete"),this.addStore(t),this.focus();let i=this.currOpt||n.rngElement(),l=this.x.separator||",";if(i){i.tagName==="U"?this.rng_text(i,0,t.text):(i.tagName==="I"?i.nextSibling&&i.nextSibling.tagName==="U"?i=i.nextSibling:(i=n.after(i,"<u></u>"),this.x.multiple&&n.after(i,"<i>"+l+"</i>")):i=!this.x.multiple&&this.inp().querySelector("u")||n.append(this.inp(),"<u></u>"),this.rng_text(i,0,t.text)),n.classAdd(i,"_o"),i.setAttribute("data-value",t.value),t.forbid&&i.setAttribute("data-forbid","");let r=i.nextSibling;n.rngCursor(r&&!r.nextSibling?r:i),this.x.multiple&&!r&&n.rngCursor(n.after(i,"<i>"+l+"</i>"));let o=n.q(`u[data-value="${t.value}"]`,this.inp());o.length>1&&o.eq(0).next("i").addBack().remove(),this.save(e)}return this},closeDrop(){return this.suggest(!1),this},suggest(t){t=t??!0,t===!1&&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 l=this.createEvent("input",{originalEvent:e});this.trigger(l,i)},500)},focus(){return this.$refs.inp.focus(),this.warn(!1),this},inp(){return this.$refs.inp},fixStyle(t){let e=n.rngElement(),i=!1,l,r=this.uid,o=this.inp();if(o.contains(e)||(e=o),l=e.innerText,this.paste_rng&&(e=this.paste_rng.parentElement()),e.id===r&&(e=o),e.id===r+"t")if(l)if(e.firstChild.nodeType===3){let u=n.rngCursor(e),c=document.createElement("u");u.extractContents(),c.appendChild(document.createTextNode(l)),u.insertNode(c),n.rngCursor(c),e=c}else n.q("br",o).remove(),e.firstChild?e=e.firstChild:n.rngCursor(e);else return this.closeDrop();if(n.q("br",o).remove(),e.tagName==="FONT")if(e.parentNode.tagName==="U"){let u=e.previousSibling.nodeValue;e=e.parentNode;let c=e.innerText;this.rng_text(e,c.indexOf(u)+u.length+1,c)}else e.parentNode.id===r+"t"&&(l=e.parentNode.innerText,e=n.replaceWith(e,"<u></u>"),e.innerText=l);e!==o&&e.tagName!=="I"&&e.nextSibling&&e.nextSibling.tagName!=="I"&&(e.nextSibling.nodeType===3?e.nextSibling.parentNode.removeChild(e.nextSibling):(l=e.innerText,this.rng_text(e,l.length,l+e.nextSibling.innerText),e.nextSibling.parentNode.removeChild(e.nextSibling),i=!0)),n.q("u:has(br)",o).remove(),l=e.innerText;let a=[],h=this.x.separator||",";if(this.x.multiple&&l.length>1&&l.indexOf(h)>-1){let u=[],c=l.length-n.rngCursorOffset(),p,f=[];l.split(h).forEach(x=>{(p=n.strTrim(x))?(i=this.param(p),u.push("<u"+(i?' class=_o data-value="'+i.value+'"'+(i.forbid?" data-forbid":""):"")+">"+p+"</u>"),i?f.push('u[data-value="'+i.value+'"]'):a.push(p)):u.push("")}),f.length&&(f=n.q(f.join(","),o).next("i").addBack());let m=n.replaceWith(e,u.join("<i>"+h+"</i>")),v=0;if(!this.paste_rng||this._KC===188)do if((v+=m.innerText.length)>=c){this.rng_text(m,v-c);break}while(m=m.previousSibling);f.length&&(f.remove(),n.q("i + i, i:first-child",o).remove()),i=!0,(e=n.rngElement())&&e.tagName==="U"&&!e.getAttribute("data-value")?this.input(e,t):this.closeDrop()}else l?(n.classAny(e,"_o")&&!this.param(l)?(n.classRemove(e,"_o"),e.removeAttribute("data-value"),i=!0):this.x.strict||(i=!0),this.input(e,t)):(i=!0,this.closeDrop());i&&this.save(t),this.paste_rng=null},rng_text(t,e,i){let l=n.rngSelection();i!=null&&(t.innerText=i),l.selectNodeContents(t),n.rngCursor(l,e)},clickPicker(t){t.stopPropagation();let e=this.x.picker;typeof e=="function"&&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&&typeof t!="string"){let e=n.array(t).filter(i=>!this.store.find(l=>l.value==i.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=[];n.q("> u",this.inp()).each((l,r)=>{let o=r.getAttribute("data-value"),a=r.innerText;o?i.push({value:o,text:a}):e||i.push({value:a})}),this.val(i,t)},onkeydown(t){t.keyCode===13&&t.preventDefault()},onkeyup(t){if(!this.imeMode){let e=this._KC=t.keyCode;e===13||e===38||e===40||e===17?t.stopPropagation():this.fixStyle(t),this._KC=null}},onclick(t){if(this.isNormal)if(t.target&&t.target.tagName==="U"&&!t.target.getAttribute("data-value"))this.input(t.target,t);else{let e=n.rngElement();e.tagName==="U"?this.input(e,t):typeof this.x.dropper=="function"?this.x.dropper(this):this.closeDrop()}},ondblclick(t){if(t.target.tagName==="U"&&t.target.getAttribute("data-value")){let e=n.array(this.x.modelValue).find(i=>i.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(t==null&&(t=this.x.modelValue),t!=="string"){let i=n.array(t),l=[];return n.lodash.each(i,(r,o)=>{if(l.push("<u"+(r.value?' class=_o data-value="'+r.value+'"':"")+(r.forbid?" data-forbid":"")+">"+r.text+"</u>"),!this.x.multiple)return!1;l.push("<i>"+e+"</i>")}),l.join("")}},html_var(){return s.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:n.bcr(this.el("form")).width,scrollY:!0,autoHide:!0,snap:()=>this.el("form"),position:"v",indent:1};e=this.mergeDropProps(e),t.push(s.h(tt,e,this.$slots))}return[this.html_input_hidden(),this.html_var(),s.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(s.h("button",{class:"w-input-button-drop w-input-button f-i f-i-caret-down"})),this.x.clearable&&e.push(s.h("button",{class:"w-input-button-clear w-input-button f-i f-i-caret-down",onclick:this.clickButtonClear})),t.push(s.h("div",{class:"w-input-buttonbar"},e))}return this.x.picker&&t.push(s.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&&n.q("u:not([data-value])").length>0)return this.formErr({type:"invalid_option"})}}},hasVal(){return this.input_value},input_title(){return typeof this.x.modelValue=="string"?"":n.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})}}),Dn=s.defineComponent({props:["width","height","context"],data(){return{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)}}}),Bn=["src"],En=["src","width"];function Nn(t,e,i,l,r,o){const a=s.resolveComponent("w-dialog");return s.openBlock(),s.createBlock(a,{ref:"dialog",class:"w-jigsaw-dialog",width:t.width,height:t.height,context:t.context},{default:s.withCtx(()=>[s.createElementVNode("img",{class:"w-jigsaw-big",src:t.bigSrc},null,8,Bn),s.createElementVNode("img",{class:"w-jigsaw-small",src:t.smallSrc,width:t.smallWidth,style:s.normalizeStyle({left:t.smallLeft+"px"}),onDragstart:e[0]||(e[0]=s.withModifiers((...h)=>t.dragstart&&t.dragstart(...h),["prevent"])),onMousedown:e[1]||(e[1]=(...h)=>t.mousedown&&t.mousedown(...h))},null,44,En),s.createElementVNode("span",{onClick:e[2]||(e[2]=(...h)=>t.refresh&&t.refresh(...h)),class:"w-jigsaw-refresh"},"刷新")]),_:1},8,["width","height","context"])}const Ln=nt(Dn,[["render",Nn]]),Ee=n.loc.form.jigsaw_drag_right,Fn=s.defineComponent({name:"w-jigsaw",mixins:[j],emits:["drop","click:refresh"],props:{big:null,small:null,dropWidth:null},data(){return{hasBorder:!0,text:Ee,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 l=setInterval(()=>{e-=1e3,this.text=t+`(${e/1e3})`,e<=0&&(clearInterval(l),this.reset(),i&&i())},1e3)}else i&&i()},reset(){this.locked=!1,this.isError=!1,this.isSuccess=!1,this.text=Ee,this.setThumbLeft(0),this.warn(!1)},refresh(t){t.runType="click:refresh",this.trigger(t)},setThumbLeft(t){t==null?t=n.number(this.$refs.thumb.style.left):this.$refs.thumb.style.left=t+"px";let e=this.thumbWidth(),i=this.mainWidth(),l=t+e/2>i/2;this.$refs.text.style.left=l?0:t+e+"px",this.$refs.text.style.right=l?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=n.eventX(t),l=this.max(),r=this.min(),o=n.number(e.style.left),a=this.thumbWidth(),h=this.mainWidth();n.moveup(u=>{let c=n.eventX(u),p=n.numRange(o+c-i,0,h-a);e.style.left=p+"px",this.$refs.track.style.width=p+a+"px",this.x.modelValue=(l-r)*p/(h-a),this.el().classList.add("z-drag")},(u,c)=>{c&&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 t??100},min(){let t=this.x.minValue;return t??0},thumbWidth(){return n.bcr(this.$refs.thumb).width},mainWidth(){return n.bcr(this.$refs.form).width},html_input(){return[this.html_input_hidden(),[s.h("div",{ref:"track",class:"w-jigsaw-track"}),s.h("div",{ref:"text",class:"w-jigsaw-text f-flex-center f-line-1"},this.text)]]},html_button(){let t=[s.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(n.number(this.x.dropWidth),n.bcr(this.el("form")).width),i=Math.ceil(e*(this.x.big.height/this.x.big.width));t.push(s.h(Ln,{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}}}}),Hn=s.defineComponent({name:"w-form",mixins:[j],props:{vertical:null},methods:{getInputValue(t){return t==null?"":typeof t=="object"?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":n.unitSize(this.x.gap)}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}}}),An=s.defineComponent({name:"w-formgroup",mixins:[j],props:{columns:null,rows:null,gap:null,defaultColspan:null},methods:{x_default(){return{columns:12,gap:0}},getInputValue(t){return t==null?"":typeof t=="object"?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;n.isNumber(t)&&(t=`repeat(${t}, 1fr)`);let e=this.x.rows;return n.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?n.unitSize(this.x.gap):""}},form_prop(){return this.name&&{onclick:t=>this.warn(!1)}}}}),In=s.defineComponent({name:"w-rate",mixins:[j],props:{allowHalf:null,cancelable:null,sum:null,count:null,text:null},data(){return{hoverWrap:!1,hoverIndex:-1}},methods:{x_default(){return{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 s.h(Z,{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,i=this.x.count||5,l=e*t/i,r=[];for(let o=l;o<=this.x.sum;o+=l/t){let a=[this.html_star(o)];this.x.allowHalf&&a.push(this.html_star(o+l)),r.push(s.h("li",{class:"w-rate-star"},a))}return[this.html_input_hidden(),s.h("ul",{class:"w-rate-wrap",onMouseenter:o=>this.isNormal&&(this.hoverWrap=!0),onMouseleave:o=>this.isNormal&&(this.hoverWrap=!1)},r),this.x.text&&this.x.modelValue&&s.h("span",{class:"w-rate-text"},this.x.text[(this.x.modelValue-l)/t])]}},computed:{html_class(){return{"z-allow-half":this.x.allowHalf}}}});function Ne(t,{trimZeros:e=!1}={}){let i=Number(t).toLocaleString("fullwide",{useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:20});if(i.includes("e")){const[a,h]=i.split("e"),u=parseInt(h,10);i=Number(t).toFixed(Math.abs(u)+(a.split(".").length||0))}const[l,r]=i.split(".");return r?(e?r.replace(/0+$/,""):r).length:0}const Yn=s.defineComponent({name:"w-slider",mixins:[j],props:{minValue:null,maxValue:null,step:null},emits:["drop"],data(){return{grabbing:!1,left:0}},methods:{x_default(){return{minValue:0,maxValue:100,step:1}},onmousedown(t){const e=n.bcr(this.$refs.bar);let i=n.number(this.x.modelValue),l=t.clientX;this.grabbing=!0;const r=Ne(this.x.step);n.moveup(o=>{let a=o.clientX-l,h=i+a/e.width*(this.x.maxValue-this.x.minValue);h=n.numRange(h,this.x.minValue,this.x.maxValue),h=Number(Number(h).toFixed(r)),this.val(h)},o=>{this.grabbing=!1,this.trigger("drop",this.x.modelValue)},t)},onclick(t){if(t.target!==this.$refs.button){const e=Ne(this.x.step),i=n.bcr(this.$refs.bar);let l=t.clientX-i.left,r=+this.x.minValue+(l-10)/i.width*(this.x.maxValue-this.x.minValue);r=n.numRange(r,this.x.minValue,this.x.maxValue),r=Number(Number(r).toFixed(e)),this.val(r),this.trigger("drop",r)}},html_input(){return[this.html_input_hidden(),s.h("div",{onClick:this.onclick,class:["w-slider-wrap"]},[s.h("div",{class:["w-slider-progress"]}),s.h("div",{ref:"bar",class:"w-slider-bar"},s.h("div",{ref:"button",onMousedown:this.onmousedown,class:["w-slider-button",{"z-grabbing":this.grabbing}]}))])]}},computed:{html_style(){return{"--w-slider-left":`${(this.x.modelValue-this.x.minValue)*100/(this.x.maxValue-this.x.minValue)||0}%`}}}}),On=[ys,ei,tt,js,Ws,Js,he,Ks,ml,Lt,rt,Zs,tl,el,ll,si,nl,li,rl,fl,ni,ri,wl,vl,bl,Z,Ft,st,ai,yl,_l,Pl,Ml,zl,Dl,Bl,Nl,Ll,ui,Ql,Gl,sn,ci,ln,Ht,nn,di,ue,rn,on,an,hn,fi,mi,vn,Cn,Sn,$n,gi,Vn,Tn,Mn,Pn,zn,Fn,Hn,An,In,Yn],xi={};n.WIDGET=xi;n.install=t=>{On.forEach(e=>{t.component(e.name,e),xi[e.name]=e}),t.use(ds)};module.exports=n;
|